@nine-lab/nine-ux 0.1.73 → 0.1.75
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/nine-ux.es.js +102 -103
- package/dist/nine-ux.es.js.map +1 -1
- package/dist/nine-ux.umd.js +2 -2
- package/dist/nine-ux.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/nine-ux.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var li = (n) => {
|
|
|
5
5
|
var Sl = (n, e, t) => e in n ? xl(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
6
|
var ye = (n, e, t) => Sl(n, typeof e != "symbol" ? e + "" : e, t), Jn = (n, e, t) => e.has(n) || li("Cannot " + t);
|
|
7
7
|
var O = (n, e, t) => (Jn(n, e, "read from private field"), t ? t.call(n) : e.get(n)), F = (n, e, t) => e.has(n) ? li("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), oe = (n, e, t, r) => (Jn(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), q = (n, e, t) => (Jn(n, e, "access private method"), t);
|
|
8
|
-
import { nine as
|
|
8
|
+
import { nine as Rt, subscribeConfig as Ml } from "@nine-lab/nine-util";
|
|
9
9
|
const wl = `
|
|
10
10
|
dialog::backdrop {
|
|
11
11
|
background: rgba(0, 0, 0, 0.3);
|
|
@@ -577,7 +577,7 @@ class Tl {
|
|
|
577
577
|
// 1. 값만 깔끔하게 반환
|
|
578
578
|
get cssPath() {
|
|
579
579
|
var e;
|
|
580
|
-
return ((e =
|
|
580
|
+
return ((e = Rt.config.ux) == null ? void 0 : e.cssPath) || O(this, jt);
|
|
581
581
|
}
|
|
582
582
|
set cssPath(e) {
|
|
583
583
|
oe(this, jt, e);
|
|
@@ -627,7 +627,7 @@ jt = new WeakMap(), Kt = new WeakSet(), hr = function(e, t, r, i) {
|
|
|
627
627
|
}), a;
|
|
628
628
|
};
|
|
629
629
|
const Ae = new Tl();
|
|
630
|
-
var Jt, Ze, Ut, ae,
|
|
630
|
+
var Jt, Ze, Ut, ae, Tt, pr, mr, _t, In;
|
|
631
631
|
class Ol extends HTMLElement {
|
|
632
632
|
constructor() {
|
|
633
633
|
super();
|
|
@@ -639,7 +639,7 @@ class Ol extends HTMLElement {
|
|
|
639
639
|
F(this, Ut, !1);
|
|
640
640
|
ye(this, "getData", () => {
|
|
641
641
|
const t = {};
|
|
642
|
-
return q(this, ae,
|
|
642
|
+
return q(this, ae, Tt).call(this).forEach((r) => {
|
|
643
643
|
const i = r.name;
|
|
644
644
|
if (!i) return;
|
|
645
645
|
let s;
|
|
@@ -652,7 +652,7 @@ class Ol extends HTMLElement {
|
|
|
652
652
|
});
|
|
653
653
|
// 파라미터가 있으면 해당 값으로, 없으면 전체 공백 초기화
|
|
654
654
|
ye(this, "clearData", (t = {}) => {
|
|
655
|
-
q(this, ae, mr).call(this), q(this, ae,
|
|
655
|
+
q(this, ae, mr).call(this), q(this, ae, Tt).call(this).forEach((r) => {
|
|
656
656
|
const i = r.name;
|
|
657
657
|
if (!i) return;
|
|
658
658
|
const s = t && t[i] !== void 0 ? t[i] : "";
|
|
@@ -663,7 +663,7 @@ class Ol extends HTMLElement {
|
|
|
663
663
|
if (!t || typeof t != "object") return;
|
|
664
664
|
q(this, ae, mr).call(this);
|
|
665
665
|
let r = !1;
|
|
666
|
-
q(this, ae,
|
|
666
|
+
q(this, ae, Tt).call(this).forEach((i) => {
|
|
667
667
|
const s = i.name;
|
|
668
668
|
!s || !t.hasOwnProperty(s) || q(this, ae, pr).call(this, i, t[s]) && (r = !0);
|
|
669
669
|
}), r && (this.changed = !0);
|
|
@@ -701,7 +701,7 @@ class Ol extends HTMLElement {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
Jt = new WeakMap(), Ze = new WeakMap(), Ut = new WeakMap(), ae = new WeakSet(), // 공통 쿼리 함수: 현재 root(Shadow 또는 Light DOM)에서 요소를 찾음
|
|
704
|
-
|
|
704
|
+
Tt = function() {
|
|
705
705
|
return ninegrid.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]", O(this, Ze));
|
|
706
706
|
}, // [공통 로직 1] 특정 요소에 값을 쓰거나 초기화하는 핵심 함수
|
|
707
707
|
pr = function(t, r) {
|
|
@@ -721,7 +721,7 @@ pr = function(t, r) {
|
|
|
721
721
|
return o;
|
|
722
722
|
}, // [공통 로직 2] 이벤트 리스너 일괄 등록
|
|
723
723
|
mr = function() {
|
|
724
|
-
q(this, ae,
|
|
724
|
+
q(this, ae, Tt).call(this).forEach((t) => {
|
|
725
725
|
t.removeEventListener("input", O(this, _t)), t.addEventListener("input", O(this, _t));
|
|
726
726
|
});
|
|
727
727
|
}, _t = new WeakMap(), In = new WeakMap();
|
|
@@ -1396,7 +1396,7 @@ function Qe(n, e) {
|
|
|
1396
1396
|
let t = e.length - 1;
|
|
1397
1397
|
t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function Nt(n, e, t, r) {
|
|
1400
1400
|
let i = (e || n).node(t), s = 0, o = e ? e.index(t) : i.childCount;
|
|
1401
1401
|
n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Qe(n.nodeAfter, r), s++));
|
|
1402
1402
|
for (let l = s; l < o; l++)
|
|
@@ -1408,15 +1408,15 @@ function et(n, e) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
function As(n, e, t, r, i) {
|
|
1410
1410
|
let s = n.depth > i && yr(n, e, i + 1), o = r.depth > i && yr(t, r, i + 1), l = [];
|
|
1411
|
-
return
|
|
1411
|
+
return Nt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Ns(s, o), Qe(et(s, As(n, e, t, r, i + 1)), l)) : (s && Qe(et(s, yn(n, e, i + 1)), l), Nt(e, t, i, l), o && Qe(et(o, yn(t, r, i + 1)), l)), Nt(r, null, i, l), new b(l);
|
|
1412
1412
|
}
|
|
1413
1413
|
function yn(n, e, t) {
|
|
1414
1414
|
let r = [];
|
|
1415
|
-
if (
|
|
1415
|
+
if (Nt(null, n, t, r), n.depth > t) {
|
|
1416
1416
|
let i = yr(n, e, t + 1);
|
|
1417
1417
|
Qe(et(i, yn(n, e, t + 1)), r);
|
|
1418
1418
|
}
|
|
1419
|
-
return
|
|
1419
|
+
return Nt(e, null, t, r), new b(r);
|
|
1420
1420
|
}
|
|
1421
1421
|
function El(n, e) {
|
|
1422
1422
|
let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
|
|
@@ -3014,13 +3014,13 @@ const Vs = {
|
|
|
3014
3014
|
script: !0,
|
|
3015
3015
|
style: !0,
|
|
3016
3016
|
title: !0
|
|
3017
|
-
}, Hs = { ol: !0, ul: !0 }, Bt = 1, kr = 2,
|
|
3017
|
+
}, Hs = { ol: !0, ul: !0 }, Bt = 1, kr = 2, At = 4;
|
|
3018
3018
|
function hi(n, e, t) {
|
|
3019
|
-
return e != null ? (e ? Bt : 0) | (e === "full" ? kr : 0) : n && n.whitespace == "pre" ? Bt | kr : t & ~
|
|
3019
|
+
return e != null ? (e ? Bt : 0) | (e === "full" ? kr : 0) : n && n.whitespace == "pre" ? Bt | kr : t & ~At;
|
|
3020
3020
|
}
|
|
3021
3021
|
class tn {
|
|
3022
3022
|
constructor(e, t, r, i, s, o) {
|
|
3023
|
-
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o &
|
|
3023
|
+
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o & At ? null : e.contentMatch);
|
|
3024
3024
|
}
|
|
3025
3025
|
findWrapping(e) {
|
|
3026
3026
|
if (!this.match) {
|
|
@@ -3054,7 +3054,7 @@ class tn {
|
|
|
3054
3054
|
class pi {
|
|
3055
3055
|
constructor(e, t, r) {
|
|
3056
3056
|
this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
|
|
3057
|
-
let i = t.topNode, s, o = hi(null, t.preserveWhitespace, 0) | (r ?
|
|
3057
|
+
let i = t.topNode, s, o = hi(null, t.preserveWhitespace, 0) | (r ? At : 0);
|
|
3058
3058
|
i ? s = new tn(i.type, i.attrs, A.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new tn(null, null, A.none, !0, null, o) : s = new tn(e.schema.topNodeType, null, A.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
|
|
3059
3059
|
}
|
|
3060
3060
|
get top() {
|
|
@@ -3237,7 +3237,7 @@ class pi {
|
|
|
3237
3237
|
let o = this.top;
|
|
3238
3238
|
o.match = o.match && o.match.matchType(e);
|
|
3239
3239
|
let l = hi(e, s, o.options);
|
|
3240
|
-
o.options &
|
|
3240
|
+
o.options & At && o.content.length == 0 && (l |= At);
|
|
3241
3241
|
let a = A.none;
|
|
3242
3242
|
return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : gi(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new tn(e, t, a, i, null, l)), this.open++, r;
|
|
3243
3243
|
}
|
|
@@ -4226,7 +4226,7 @@ function Fr(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
4226
4226
|
function ea(n, e, t) {
|
|
4227
4227
|
return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
|
|
4228
4228
|
}
|
|
4229
|
-
function
|
|
4229
|
+
function wt(n) {
|
|
4230
4230
|
let t = n.parent.content.cutByIndex(n.startIndex, n.endIndex);
|
|
4231
4231
|
for (let r = n.depth, i = 0, s = 0; ; --r) {
|
|
4232
4232
|
let o = n.$from.node(r), l = n.$from.index(r) + i, a = n.$to.indexAfter(r) - s;
|
|
@@ -4529,9 +4529,9 @@ class fa {
|
|
|
4529
4529
|
let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Xn(e, t);
|
|
4530
4530
|
if (i.childCount <= 1 && t > 0) {
|
|
4531
4531
|
let s = e.size - t <= t + i.size;
|
|
4532
|
-
this.unplaced = new k(
|
|
4532
|
+
this.unplaced = new k(Ot(e, t - 1, 1), t - 1, s ? t - 1 : r);
|
|
4533
4533
|
} else
|
|
4534
|
-
this.unplaced = new k(
|
|
4534
|
+
this.unplaced = new k(Ot(e, t, 1), t, r);
|
|
4535
4535
|
}
|
|
4536
4536
|
// Move content from the unplaced slice at `sliceDepth` to the
|
|
4537
4537
|
// frontier node at `frontierDepth`. Close that frontier node when
|
|
@@ -4556,12 +4556,12 @@ class fa {
|
|
|
4556
4556
|
c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(Zs(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
|
|
4557
4557
|
}
|
|
4558
4558
|
let p = c == l.childCount;
|
|
4559
|
-
p || (h = -1), this.placed =
|
|
4559
|
+
p || (h = -1), this.placed = vt(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
4560
4560
|
for (let m = 0, g = l; m < h; m++) {
|
|
4561
4561
|
let y = g.lastChild;
|
|
4562
4562
|
this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
|
|
4563
4563
|
}
|
|
4564
|
-
this.unplaced = p ? e == 0 ? k.empty : new k(
|
|
4564
|
+
this.unplaced = p ? e == 0 ? k.empty : new k(Ot(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Ot(o.content, e, c), o.openStart, o.openEnd);
|
|
4565
4565
|
}
|
|
4566
4566
|
mustMoveInline() {
|
|
4567
4567
|
if (!this.$to.parent.isTextblock)
|
|
@@ -4593,7 +4593,7 @@ class fa {
|
|
|
4593
4593
|
return null;
|
|
4594
4594
|
for (; this.depth > t.depth; )
|
|
4595
4595
|
this.closeFrontierNode();
|
|
4596
|
-
t.fit.childCount && (this.placed =
|
|
4596
|
+
t.fit.childCount && (this.placed = vt(this.placed, t.depth, t.fit)), e = t.move;
|
|
4597
4597
|
for (let r = t.depth + 1; r <= e.depth; r++) {
|
|
4598
4598
|
let i = e.node(r), s = i.type.contentMatch.fillBefore(i.content, !0, e.index(r));
|
|
4599
4599
|
this.openFrontierNode(i.type, i.attrs, s);
|
|
@@ -4602,18 +4602,18 @@ class fa {
|
|
|
4602
4602
|
}
|
|
4603
4603
|
openFrontierNode(e, t = null, r) {
|
|
4604
4604
|
let i = this.frontier[this.depth];
|
|
4605
|
-
i.match = i.match.matchType(e), this.placed =
|
|
4605
|
+
i.match = i.match.matchType(e), this.placed = vt(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
|
|
4606
4606
|
}
|
|
4607
4607
|
closeFrontierNode() {
|
|
4608
4608
|
let t = this.frontier.pop().match.fillBefore(b.empty, !0);
|
|
4609
|
-
t.childCount && (this.placed =
|
|
4609
|
+
t.childCount && (this.placed = vt(this.placed, this.frontier.length, t));
|
|
4610
4610
|
}
|
|
4611
4611
|
}
|
|
4612
|
-
function
|
|
4613
|
-
return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(
|
|
4612
|
+
function Ot(n, e, t) {
|
|
4613
|
+
return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(Ot(n.firstChild.content, e - 1, t)));
|
|
4614
4614
|
}
|
|
4615
|
-
function
|
|
4616
|
-
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(
|
|
4615
|
+
function vt(n, e, t) {
|
|
4616
|
+
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(vt(n.lastChild.content, e - 1, t)));
|
|
4617
4617
|
}
|
|
4618
4618
|
function Xn(n, e) {
|
|
4619
4619
|
for (let t = 0; t < e; t++)
|
|
@@ -4746,7 +4746,7 @@ function eo(n, e) {
|
|
|
4746
4746
|
}
|
|
4747
4747
|
return t;
|
|
4748
4748
|
}
|
|
4749
|
-
class
|
|
4749
|
+
class yt extends Q {
|
|
4750
4750
|
/**
|
|
4751
4751
|
Construct an attribute step.
|
|
4752
4752
|
*/
|
|
@@ -4768,11 +4768,11 @@ class bt extends Q {
|
|
|
4768
4768
|
return le.empty;
|
|
4769
4769
|
}
|
|
4770
4770
|
invert(e) {
|
|
4771
|
-
return new
|
|
4771
|
+
return new yt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
4772
4772
|
}
|
|
4773
4773
|
map(e) {
|
|
4774
4774
|
let t = e.mapResult(this.pos, 1);
|
|
4775
|
-
return t.deletedAfter ? null : new
|
|
4775
|
+
return t.deletedAfter ? null : new yt(t.pos, this.attr, this.value);
|
|
4776
4776
|
}
|
|
4777
4777
|
toJSON() {
|
|
4778
4778
|
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
@@ -4780,10 +4780,10 @@ class bt extends Q {
|
|
|
4780
4780
|
static fromJSON(e, t) {
|
|
4781
4781
|
if (typeof t.pos != "number" || typeof t.attr != "string")
|
|
4782
4782
|
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
4783
|
-
return new
|
|
4783
|
+
return new yt(t.pos, t.attr, t.value);
|
|
4784
4784
|
}
|
|
4785
4785
|
}
|
|
4786
|
-
Q.jsonID("attr",
|
|
4786
|
+
Q.jsonID("attr", yt);
|
|
4787
4787
|
class zt extends Q {
|
|
4788
4788
|
/**
|
|
4789
4789
|
Construct an attribute step.
|
|
@@ -4818,15 +4818,15 @@ class zt extends Q {
|
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
4820
4820
|
Q.jsonID("docAttr", zt);
|
|
4821
|
-
let
|
|
4821
|
+
let kt = class extends Error {
|
|
4822
4822
|
};
|
|
4823
|
-
|
|
4823
|
+
kt = function n(e) {
|
|
4824
4824
|
let t = Error.call(this, e);
|
|
4825
4825
|
return t.__proto__ = n.prototype, t;
|
|
4826
4826
|
};
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4827
|
+
kt.prototype = Object.create(Error.prototype);
|
|
4828
|
+
kt.prototype.constructor = kt;
|
|
4829
|
+
kt.prototype.name = "TransformError";
|
|
4830
4830
|
class ba {
|
|
4831
4831
|
/**
|
|
4832
4832
|
Create a transform that starts with the given document.
|
|
@@ -4847,7 +4847,7 @@ class ba {
|
|
|
4847
4847
|
step(e) {
|
|
4848
4848
|
let t = this.maybeStep(e);
|
|
4849
4849
|
if (t.failed)
|
|
4850
|
-
throw new
|
|
4850
|
+
throw new kt(t.failed);
|
|
4851
4851
|
return this;
|
|
4852
4852
|
}
|
|
4853
4853
|
/**
|
|
@@ -5000,7 +5000,7 @@ class ba {
|
|
|
5000
5000
|
to set attributes on the document itself.
|
|
5001
5001
|
*/
|
|
5002
5002
|
setNodeAttribute(e, t, r) {
|
|
5003
|
-
return this.step(new
|
|
5003
|
+
return this.step(new yt(e, t, r)), this;
|
|
5004
5004
|
}
|
|
5005
5005
|
/**
|
|
5006
5006
|
Set a single attribute on the document to a new value.
|
|
@@ -5618,13 +5618,13 @@ class Sa extends ba {
|
|
|
5618
5618
|
function Oi(n, e) {
|
|
5619
5619
|
return !e || !n ? n : n.bind(e);
|
|
5620
5620
|
}
|
|
5621
|
-
class
|
|
5621
|
+
class Et {
|
|
5622
5622
|
constructor(e, t, r) {
|
|
5623
5623
|
this.name = e, this.init = Oi(t.init, r), this.apply = Oi(t.apply, r);
|
|
5624
5624
|
}
|
|
5625
5625
|
}
|
|
5626
5626
|
const Ma = [
|
|
5627
|
-
new
|
|
5627
|
+
new Et("doc", {
|
|
5628
5628
|
init(n) {
|
|
5629
5629
|
return n.doc || n.schema.topNodeType.createAndFill();
|
|
5630
5630
|
},
|
|
@@ -5632,7 +5632,7 @@ const Ma = [
|
|
|
5632
5632
|
return n.doc;
|
|
5633
5633
|
}
|
|
5634
5634
|
}),
|
|
5635
|
-
new
|
|
5635
|
+
new Et("selection", {
|
|
5636
5636
|
init(n, e) {
|
|
5637
5637
|
return n.selection || v.atStart(e.doc);
|
|
5638
5638
|
},
|
|
@@ -5640,7 +5640,7 @@ const Ma = [
|
|
|
5640
5640
|
return n.selection;
|
|
5641
5641
|
}
|
|
5642
5642
|
}),
|
|
5643
|
-
new
|
|
5643
|
+
new Et("storedMarks", {
|
|
5644
5644
|
init(n) {
|
|
5645
5645
|
return n.storedMarks || null;
|
|
5646
5646
|
},
|
|
@@ -5648,7 +5648,7 @@ const Ma = [
|
|
|
5648
5648
|
return r.selection.$cursor ? n.storedMarks : null;
|
|
5649
5649
|
}
|
|
5650
5650
|
}),
|
|
5651
|
-
new
|
|
5651
|
+
new Et("scrollToSelection", {
|
|
5652
5652
|
init() {
|
|
5653
5653
|
return 0;
|
|
5654
5654
|
},
|
|
@@ -5662,7 +5662,7 @@ class Qn {
|
|
|
5662
5662
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Ma.slice(), t && t.forEach((r) => {
|
|
5663
5663
|
if (this.pluginsByKey[r.key])
|
|
5664
5664
|
throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
|
|
5665
|
-
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new
|
|
5665
|
+
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Et(r.key, r.spec.state, r));
|
|
5666
5666
|
});
|
|
5667
5667
|
}
|
|
5668
5668
|
}
|
|
@@ -5881,7 +5881,7 @@ const J = function(n) {
|
|
|
5881
5881
|
for (var e = 0; ; e++)
|
|
5882
5882
|
if (n = n.previousSibling, !n)
|
|
5883
5883
|
return e;
|
|
5884
|
-
},
|
|
5884
|
+
}, xt = function(n) {
|
|
5885
5885
|
let e = n.assignedSlot || n.parentNode;
|
|
5886
5886
|
return e && e.nodeType == 11 ? e.host : e;
|
|
5887
5887
|
};
|
|
@@ -5992,7 +5992,7 @@ function Na(n, e, t) {
|
|
|
5992
5992
|
}
|
|
5993
5993
|
const xe = typeof navigator < "u" ? navigator : null, Ei = typeof document < "u" ? document : null, Ke = xe && xe.userAgent || "", wr = /Edge\/(\d+)/.exec(Ke), ro = /MSIE \d/.exec(Ke), Cr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ke), ie = !!(ro || Cr || wr), Ve = ro ? document.documentMode : Cr ? +Cr[1] : wr ? +wr[1] : 0, pe = !ie && /gecko\/(\d+)/i.test(Ke);
|
|
5994
5994
|
pe && +(/Firefox\/(\d+)/.exec(Ke) || [0, 0])[1];
|
|
5995
|
-
const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor),
|
|
5995
|
+
const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor), St = Z && (/Mobile\/\w+/.test(Ke) || !!xe && xe.maxTouchPoints > 2), ue = St || (xe ? /Mac/.test(xe.platform) : !1), so = xe ? /Win/.test(xe.platform) : !1, ve = /Android \d/.test(Ke), Zt = !!Ei && "webkitFontSmoothing" in Ei.documentElement.style, Aa = Zt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5996
5996
|
function Da(n) {
|
|
5997
5997
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5998
5998
|
return e ? {
|
|
@@ -6023,7 +6023,7 @@ function Ni(n, e, t) {
|
|
|
6023
6023
|
let r = n.someProp("scrollThreshold") || 0, i = n.someProp("scrollMargin") || 5, s = n.dom.ownerDocument;
|
|
6024
6024
|
for (let o = t || n.dom; o; ) {
|
|
6025
6025
|
if (o.nodeType != 1) {
|
|
6026
|
-
o =
|
|
6026
|
+
o = xt(o);
|
|
6027
6027
|
continue;
|
|
6028
6028
|
}
|
|
6029
6029
|
let l = o, a = l == s.body, c = a ? Da(s) : Ia(l), d = 0, u = 0;
|
|
@@ -6039,7 +6039,7 @@ function Ni(n, e, t) {
|
|
|
6039
6039
|
let f = a ? "fixed" : getComputedStyle(o).position;
|
|
6040
6040
|
if (/^(fixed|sticky)$/.test(f))
|
|
6041
6041
|
break;
|
|
6042
|
-
o = f == "absolute" ? o.offsetParent :
|
|
6042
|
+
o = f == "absolute" ? o.offsetParent : xt(o);
|
|
6043
6043
|
}
|
|
6044
6044
|
}
|
|
6045
6045
|
function Ra(n) {
|
|
@@ -6058,7 +6058,7 @@ function Ra(n) {
|
|
|
6058
6058
|
}
|
|
6059
6059
|
function oo(n) {
|
|
6060
6060
|
let e = [], t = n.ownerDocument;
|
|
6061
|
-
for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r =
|
|
6061
|
+
for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = xt(r))
|
|
6062
6062
|
;
|
|
6063
6063
|
return e;
|
|
6064
6064
|
}
|
|
@@ -6181,7 +6181,7 @@ function Va(n, e) {
|
|
|
6181
6181
|
return null;
|
|
6182
6182
|
}
|
|
6183
6183
|
if (Z)
|
|
6184
|
-
for (let c = o; r && c; c =
|
|
6184
|
+
for (let c = o; r && c; c = xt(c))
|
|
6185
6185
|
c.draggable && (r = void 0);
|
|
6186
6186
|
if (o = za(o, e), r) {
|
|
6187
6187
|
if (pe && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
@@ -6218,13 +6218,13 @@ function uo(n, e, t) {
|
|
|
6218
6218
|
if (c.top == a.top) {
|
|
6219
6219
|
let d = De(Te(r, i, i + 1), -1);
|
|
6220
6220
|
if (d.top != a.top)
|
|
6221
|
-
return
|
|
6221
|
+
return Ct(d, d.left < c.left);
|
|
6222
6222
|
}
|
|
6223
6223
|
}
|
|
6224
6224
|
return a;
|
|
6225
6225
|
} else {
|
|
6226
6226
|
let a = i, c = i, d = t < 0 ? 1 : -1;
|
|
6227
|
-
return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++,
|
|
6227
|
+
return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Ct(De(Te(r, a, c), d), d < 0);
|
|
6228
6228
|
}
|
|
6229
6229
|
if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
6230
6230
|
if (s == null && i && (t < 0 || i == fe(r))) {
|
|
@@ -6242,7 +6242,7 @@ function uo(n, e, t) {
|
|
|
6242
6242
|
if (s == null && i && (t < 0 || i == fe(r))) {
|
|
6243
6243
|
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Te(a, fe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
6244
6244
|
if (c)
|
|
6245
|
-
return
|
|
6245
|
+
return Ct(De(c, 1), !1);
|
|
6246
6246
|
}
|
|
6247
6247
|
if (s == null && i < fe(r)) {
|
|
6248
6248
|
let a = r.childNodes[i];
|
|
@@ -6250,11 +6250,11 @@ function uo(n, e, t) {
|
|
|
6250
6250
|
a = a.nextSibling;
|
|
6251
6251
|
let c = a ? a.nodeType == 3 ? Te(a, 0, o ? 0 : 1) : a.nodeType == 1 ? a : null : null;
|
|
6252
6252
|
if (c)
|
|
6253
|
-
return
|
|
6253
|
+
return Ct(De(c, -1), !0);
|
|
6254
6254
|
}
|
|
6255
|
-
return
|
|
6255
|
+
return Ct(De(r.nodeType == 3 ? Te(r) : r, -t), t >= 0);
|
|
6256
6256
|
}
|
|
6257
|
-
function
|
|
6257
|
+
function Ct(n, e) {
|
|
6258
6258
|
if (n.width == 0)
|
|
6259
6259
|
return n;
|
|
6260
6260
|
let t = e ? n.left : n.right;
|
|
@@ -6840,7 +6840,7 @@ class He extends Qt {
|
|
|
6840
6840
|
a.syncToMarks(c.marks, r, e, f);
|
|
6841
6841
|
let h;
|
|
6842
6842
|
a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
|
|
6843
|
-
}), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ge) && (o && this.protectLocalComposition(e, o), mo(this.contentDOM, this.children, e),
|
|
6843
|
+
}), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ge) && (o && this.protectLocalComposition(e, o), mo(this.contentDOM, this.children, e), St && Qa(this.dom));
|
|
6844
6844
|
}
|
|
6845
6845
|
localCompositionInfo(e, t) {
|
|
6846
6846
|
let { from: r, to: i } = e.state.selection;
|
|
@@ -7010,22 +7010,22 @@ function mo(n, e, t) {
|
|
|
7010
7010
|
r = Li(r), i = !0;
|
|
7011
7011
|
i && t.trackWrites == n && (t.trackWrites = null);
|
|
7012
7012
|
}
|
|
7013
|
-
const
|
|
7013
|
+
const Dt = function(n) {
|
|
7014
7014
|
n && (this.nodeName = n);
|
|
7015
7015
|
};
|
|
7016
|
-
|
|
7017
|
-
const Xe = [new
|
|
7016
|
+
Dt.prototype = /* @__PURE__ */ Object.create(null);
|
|
7017
|
+
const Xe = [new Dt()];
|
|
7018
7018
|
function Or(n, e, t) {
|
|
7019
7019
|
if (n.length == 0)
|
|
7020
7020
|
return Xe;
|
|
7021
|
-
let r = t ? Xe[0] : new
|
|
7021
|
+
let r = t ? Xe[0] : new Dt(), i = [r];
|
|
7022
7022
|
for (let s = 0; s < n.length; s++) {
|
|
7023
7023
|
let o = n[s].type.attrs;
|
|
7024
7024
|
if (o) {
|
|
7025
|
-
o.nodeName && i.push(r = new
|
|
7025
|
+
o.nodeName && i.push(r = new Dt(o.nodeName));
|
|
7026
7026
|
for (let l in o) {
|
|
7027
7027
|
let a = o[l];
|
|
7028
|
-
a != null && (t && i.length == 1 && i.push(r = new
|
|
7028
|
+
a != null && (t && i.length == 1 && i.push(r = new Dt(e.isInline ? "span" : "div")), l == "class" ? r.class = (r.class ? r.class + " " : "") + a : l == "style" ? r.style = (r.style ? r.style + ";" : "") + a : l != "nodeName" && (r[l] = a));
|
|
7029
7029
|
}
|
|
7030
7030
|
}
|
|
7031
7031
|
}
|
|
@@ -7514,7 +7514,7 @@ function Wi(n, e, t) {
|
|
|
7514
7514
|
function Sn(n) {
|
|
7515
7515
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
7516
7516
|
}
|
|
7517
|
-
function
|
|
7517
|
+
function It(n, e) {
|
|
7518
7518
|
let t = n.pmViewDesc;
|
|
7519
7519
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
7520
7520
|
}
|
|
@@ -7526,13 +7526,13 @@ function ic(n) {
|
|
|
7526
7526
|
if (!t)
|
|
7527
7527
|
return;
|
|
7528
7528
|
let i, s, o = !1;
|
|
7529
|
-
for (pe && t.nodeType == 1 && r < Sn(t) &&
|
|
7529
|
+
for (pe && t.nodeType == 1 && r < Sn(t) && It(t.childNodes[r], -1) && (o = !0); ; )
|
|
7530
7530
|
if (r > 0) {
|
|
7531
7531
|
if (t.nodeType != 1)
|
|
7532
7532
|
break;
|
|
7533
7533
|
{
|
|
7534
7534
|
let l = t.childNodes[r - 1];
|
|
7535
|
-
if (
|
|
7535
|
+
if (It(l, -1))
|
|
7536
7536
|
i = t, s = --r;
|
|
7537
7537
|
else if (l.nodeType == 3)
|
|
7538
7538
|
t = l, r = t.nodeValue.length;
|
|
@@ -7544,7 +7544,7 @@ function ic(n) {
|
|
|
7544
7544
|
break;
|
|
7545
7545
|
{
|
|
7546
7546
|
let l = t.previousSibling;
|
|
7547
|
-
for (; l &&
|
|
7547
|
+
for (; l && It(l, -1); )
|
|
7548
7548
|
i = t.parentNode, s = J(l), l = l.previousSibling;
|
|
7549
7549
|
if (l)
|
|
7550
7550
|
t = l, r = Sn(t);
|
|
@@ -7567,7 +7567,7 @@ function sc(n) {
|
|
|
7567
7567
|
if (t.nodeType != 1)
|
|
7568
7568
|
break;
|
|
7569
7569
|
let l = t.childNodes[r];
|
|
7570
|
-
if (
|
|
7570
|
+
if (It(l, 1))
|
|
7571
7571
|
s = t, o = ++r;
|
|
7572
7572
|
else
|
|
7573
7573
|
break;
|
|
@@ -7576,7 +7576,7 @@ function sc(n) {
|
|
|
7576
7576
|
break;
|
|
7577
7577
|
{
|
|
7578
7578
|
let l = t.nextSibling;
|
|
7579
|
-
for (; l &&
|
|
7579
|
+
for (; l && It(l, 1); )
|
|
7580
7580
|
s = l.parentNode, o = J(l) + 1, l = l.nextSibling;
|
|
7581
7581
|
if (l)
|
|
7582
7582
|
t = l, r = 0, i = Sn(t);
|
|
@@ -7968,7 +7968,7 @@ function Mc(n, e) {
|
|
|
7968
7968
|
te.keydown = (n, e) => {
|
|
7969
7969
|
let t = e;
|
|
7970
7970
|
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !No(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(ve && _ && t.keyCode == 13)))
|
|
7971
|
-
if (t.keyCode != 229 && n.domObserver.forceFlush(),
|
|
7971
|
+
if (t.keyCode != 229 && n.domObserver.forceFlush(), St && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
7972
7972
|
let r = Date.now();
|
|
7973
7973
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
7974
7974
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Ue(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
@@ -8008,7 +8008,7 @@ function Jr(n, e, t, r, i) {
|
|
|
8008
8008
|
return !0;
|
|
8009
8009
|
return !1;
|
|
8010
8010
|
}
|
|
8011
|
-
function
|
|
8011
|
+
function bt(n, e, t) {
|
|
8012
8012
|
if (n.focused || n.focus(), n.state.selection.eq(e))
|
|
8013
8013
|
return;
|
|
8014
8014
|
let r = n.state.tr.setSelection(e);
|
|
@@ -8018,7 +8018,7 @@ function Cc(n, e) {
|
|
|
8018
8018
|
if (e == -1)
|
|
8019
8019
|
return !1;
|
|
8020
8020
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
8021
|
-
return r && r.isAtom && S.isSelectable(r) ? (
|
|
8021
|
+
return r && r.isAtom && S.isSelectable(r) ? (bt(n, new S(t)), !0) : !1;
|
|
8022
8022
|
}
|
|
8023
8023
|
function Tc(n, e) {
|
|
8024
8024
|
if (e == -1)
|
|
@@ -8033,7 +8033,7 @@ function Tc(n, e) {
|
|
|
8033
8033
|
break;
|
|
8034
8034
|
}
|
|
8035
8035
|
}
|
|
8036
|
-
return i != null ? (
|
|
8036
|
+
return i != null ? (bt(n, S.create(n.state.doc, i)), !0) : !1;
|
|
8037
8037
|
}
|
|
8038
8038
|
function Oc(n, e, t, r, i) {
|
|
8039
8039
|
return Jr(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Tc(n, t) : Cc(n, t));
|
|
@@ -8049,14 +8049,14 @@ function Nc(n, e, t) {
|
|
|
8049
8049
|
return !1;
|
|
8050
8050
|
let r = n.state.doc;
|
|
8051
8051
|
if (e == -1)
|
|
8052
|
-
return r.inlineContent ? (
|
|
8052
|
+
return r.inlineContent ? (bt(n, M.create(r, 0, r.content.size)), !0) : !1;
|
|
8053
8053
|
let i = r.resolve(e);
|
|
8054
8054
|
for (let s = i.depth + 1; s > 0; s--) {
|
|
8055
8055
|
let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
8056
8056
|
if (o.inlineContent)
|
|
8057
|
-
|
|
8057
|
+
bt(n, M.create(r, l + 1, l + 1 + o.content.size));
|
|
8058
8058
|
else if (S.isSelectable(o))
|
|
8059
|
-
|
|
8059
|
+
bt(n, S.create(r, l));
|
|
8060
8060
|
else
|
|
8061
8061
|
continue;
|
|
8062
8062
|
return !0;
|
|
@@ -8111,7 +8111,7 @@ class Ac {
|
|
|
8111
8111
|
// (hidden) cursor is doesn't change the selection, and
|
|
8112
8112
|
// thus doesn't get a reaction from ProseMirror. This
|
|
8113
8113
|
// works around that.
|
|
8114
|
-
_ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (
|
|
8114
|
+
_ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (bt(this.view, v.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : ze(this.view, "pointer");
|
|
8115
8115
|
}
|
|
8116
8116
|
move(e) {
|
|
8117
8117
|
this.updateAllowDefault(e), ze(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -8214,7 +8214,7 @@ function Bc(n, e) {
|
|
|
8214
8214
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
8215
8215
|
}, 50);
|
|
8216
8216
|
}
|
|
8217
|
-
const Ft = ie && Ve < 15 ||
|
|
8217
|
+
const Ft = ie && Ve < 15 || St && Aa < 604;
|
|
8218
8218
|
ee.copy = te.cut = (n, e) => {
|
|
8219
8219
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
8220
8220
|
if (r.empty)
|
|
@@ -8951,9 +8951,9 @@ class Kc {
|
|
|
8951
8951
|
if (!e.focusNode)
|
|
8952
8952
|
return !0;
|
|
8953
8953
|
let t = /* @__PURE__ */ new Set(), r;
|
|
8954
|
-
for (let s = e.focusNode; s; s =
|
|
8954
|
+
for (let s = e.focusNode; s; s = xt(s))
|
|
8955
8955
|
t.add(s);
|
|
8956
|
-
for (let s = e.anchorNode; s; s =
|
|
8956
|
+
for (let s = e.anchorNode; s; s = xt(s))
|
|
8957
8957
|
if (t.has(s)) {
|
|
8958
8958
|
r = s;
|
|
8959
8959
|
break;
|
|
@@ -9158,7 +9158,7 @@ function Qc(n, e, t, r, i) {
|
|
|
9158
9158
|
let a = n.state.selection, c = Xc(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
|
|
9159
9159
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
9160
9160
|
let p = nd(u.content, c.doc.content, c.from, f, h);
|
|
9161
|
-
if (p && n.input.domChangeCount++, (
|
|
9161
|
+
if (p && n.input.domChangeCount++, (St && n.input.lastIOSEnter > Date.now() - 225 || ve) && i.some((C) => C.nodeType == 1 && !Zc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
|
|
9162
9162
|
n.input.lastIOSEnter = 0;
|
|
9163
9163
|
return;
|
|
9164
9164
|
}
|
|
@@ -9177,7 +9177,7 @@ function Qc(n, e, t, r, i) {
|
|
|
9177
9177
|
}
|
|
9178
9178
|
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof M && (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)), ie && Ve <= 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--);
|
|
9179
9179
|
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), T = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
|
|
9180
|
-
if ((
|
|
9180
|
+
if ((St && n.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
|
|
9181
9181
|
n.input.lastIOSEnter = 0;
|
|
9182
9182
|
return;
|
|
9183
9183
|
}
|
|
@@ -9826,19 +9826,19 @@ const Ho = (n, e, t) => {
|
|
|
9826
9826
|
return !1;
|
|
9827
9827
|
let i = Yr(r);
|
|
9828
9828
|
if (!i) {
|
|
9829
|
-
let o = r.blockRange(), l = o &&
|
|
9829
|
+
let o = r.blockRange(), l = o && wt(o);
|
|
9830
9830
|
return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
|
|
9831
9831
|
}
|
|
9832
9832
|
let s = i.nodeBefore;
|
|
9833
9833
|
if (Xo(n, i, e, -1))
|
|
9834
9834
|
return !0;
|
|
9835
|
-
if (r.parent.content.size == 0 && (
|
|
9835
|
+
if (r.parent.content.size == 0 && (Mt(s, "end") || S.isSelectable(s)))
|
|
9836
9836
|
for (let o = r.depth; ; o--) {
|
|
9837
9837
|
let l = Bn(n.doc, r.before(o), r.after(o), k.empty);
|
|
9838
9838
|
if (l && l.slice.size < l.to - l.from) {
|
|
9839
9839
|
if (e) {
|
|
9840
9840
|
let a = n.tr.step(l);
|
|
9841
|
-
a.setSelection(
|
|
9841
|
+
a.setSelection(Mt(s, "end") ? v.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
|
|
9842
9842
|
}
|
|
9843
9843
|
return !0;
|
|
9844
9844
|
}
|
|
@@ -9887,7 +9887,7 @@ function Wo(n, e, t) {
|
|
|
9887
9887
|
}
|
|
9888
9888
|
return !0;
|
|
9889
9889
|
}
|
|
9890
|
-
function
|
|
9890
|
+
function Mt(n, e, t = !1) {
|
|
9891
9891
|
for (let r = n; r; r = e == "start" ? r.firstChild : r.lastChild) {
|
|
9892
9892
|
if (r.isTextblock)
|
|
9893
9893
|
return !0;
|
|
@@ -9932,12 +9932,12 @@ const Ko = (n, e, t) => {
|
|
|
9932
9932
|
let s = i.nodeAfter;
|
|
9933
9933
|
if (Xo(n, i, e, 1))
|
|
9934
9934
|
return !0;
|
|
9935
|
-
if (r.parent.content.size == 0 && (
|
|
9935
|
+
if (r.parent.content.size == 0 && (Mt(s, "start") || S.isSelectable(s))) {
|
|
9936
9936
|
let o = Bn(n.doc, r.before(), r.after(), k.empty);
|
|
9937
9937
|
if (o && o.slice.size < o.to - o.from) {
|
|
9938
9938
|
if (e) {
|
|
9939
9939
|
let l = n.tr.step(o);
|
|
9940
|
-
l.setSelection(
|
|
9940
|
+
l.setSelection(Mt(s, "start") ? v.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
|
|
9941
9941
|
}
|
|
9942
9942
|
return !0;
|
|
9943
9943
|
}
|
|
@@ -9989,7 +9989,7 @@ const md = (n, e) => {
|
|
|
9989
9989
|
return !1;
|
|
9990
9990
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
9991
9991
|
}, yd = (n, e) => {
|
|
9992
|
-
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i &&
|
|
9992
|
+
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && wt(i);
|
|
9993
9993
|
return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
|
|
9994
9994
|
}, Uo = (n, e) => {
|
|
9995
9995
|
let { $head: t, $anchor: r } = n.selection;
|
|
@@ -10037,7 +10037,7 @@ const bd = (n, e) => {
|
|
|
10037
10037
|
if (Ee(n.doc, s))
|
|
10038
10038
|
return e && e(n.tr.split(s).scrollIntoView()), !0;
|
|
10039
10039
|
}
|
|
10040
|
-
let r = t.blockRange(), i = r &&
|
|
10040
|
+
let r = t.blockRange(), i = r && wt(r);
|
|
10041
10041
|
return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
|
|
10042
10042
|
};
|
|
10043
10043
|
function kd(n) {
|
|
@@ -10093,10 +10093,10 @@ function Xo(n, e, t, r) {
|
|
|
10093
10093
|
}
|
|
10094
10094
|
return !0;
|
|
10095
10095
|
}
|
|
10096
|
-
let d = s.type.spec.isolating || r > 0 && a ? null : v.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u &&
|
|
10096
|
+
let d = s.type.spec.isolating || r > 0 && a ? null : v.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && wt(u);
|
|
10097
10097
|
if (f != null && f >= e.depth)
|
|
10098
10098
|
return t && t(n.tr.lift(u, f).scrollIntoView()), !0;
|
|
10099
|
-
if (c &&
|
|
10099
|
+
if (c && Mt(s, "start", !0) && Mt(i, "end")) {
|
|
10100
10100
|
let h = i, p = [];
|
|
10101
10101
|
for (; p.push(h), !h.isTextblock; )
|
|
10102
10102
|
h = h.lastChild;
|
|
@@ -10218,7 +10218,7 @@ function Nd(n) {
|
|
|
10218
10218
|
function Ad(n, e, t, r) {
|
|
10219
10219
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
10220
10220
|
s < o && (i.step(new $(s - 1, o, s, o, new k(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new bn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
10221
|
-
const l =
|
|
10221
|
+
const l = wt(r);
|
|
10222
10222
|
if (l == null)
|
|
10223
10223
|
return !1;
|
|
10224
10224
|
i.lift(r, l);
|
|
@@ -11208,7 +11208,7 @@ const _d = G.create({
|
|
|
11208
11208
|
const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
|
|
11209
11209
|
if (!h)
|
|
11210
11210
|
return;
|
|
11211
|
-
const p =
|
|
11211
|
+
const p = wt(h);
|
|
11212
11212
|
if (l.type.isTextblock) {
|
|
11213
11213
|
const { defaultType: m } = u.parent.contentMatchAt(u.index());
|
|
11214
11214
|
e.setNodeMarkup(h.start, m);
|
|
@@ -14651,7 +14651,7 @@ Lr = function() {
|
|
|
14651
14651
|
const t = Ae.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
|
|
14652
14652
|
this.shadowRoot.innerHTML = `
|
|
14653
14653
|
<style>
|
|
14654
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.
|
|
14654
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.75/dist/css/nineEditor.css";
|
|
14655
14655
|
${r}
|
|
14656
14656
|
</style>
|
|
14657
14657
|
|
|
@@ -14757,16 +14757,15 @@ const Ms = {
|
|
|
14757
14757
|
confirm: window.confirm
|
|
14758
14758
|
}, ws = () => {
|
|
14759
14759
|
var t, r;
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
console.log(e), window.alert = e.includes("alert") ? (i) => Ae.alert(i) : Ms.alert, window.confirm = e.includes("confirm") ? async (i) => await Ae.confirm(i) : Ms.confirm, yt.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
|
|
14760
|
+
const { nativeOverride: n } = ((r = (t = Rt) == null ? void 0 : t.config) == null ? void 0 : r.ux) || {}, e = Array.isArray(n) ? n : n === !0 ? ["alert", "confirm"] : [];
|
|
14761
|
+
console.log(e), window.alert = e.includes("alert") ? (i) => Ae.alert(i) : Ms.alert, window.confirm = e.includes("confirm") ? async (i) => await Ae.confirm(i) : Ms.confirm, Rt.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
|
|
14763
14762
|
}, Bh = () => {
|
|
14764
14763
|
ws(), Ml((n) => {
|
|
14765
14764
|
(n === "ux" || n === "config") && ws();
|
|
14766
14765
|
});
|
|
14767
14766
|
};
|
|
14768
14767
|
Bh();
|
|
14769
|
-
|
|
14770
|
-
|
|
14768
|
+
Rt.alert = Ae.alert.bind(Ae);
|
|
14769
|
+
Rt.confirm = Ae.confirm.bind(Ae);
|
|
14771
14770
|
typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Ph));
|
|
14772
14771
|
//# sourceMappingURL=nine-ux.es.js.map
|