@pie-element/shared-editor-runtime 0.1.3-next.20261006160832 → 0.1.3-next.20261019151920
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/browser/{dist-CbvLhouk.js → dist-1Ah9gEL8.js} +315 -290
- package/dist/browser/dist-1Ah9gEL8.js.map +1 -0
- package/dist/browser/{dist-Pg4oVkv2.js → dist-BVA3Sgbc.js} +66 -57
- package/dist/browser/dist-BVA3Sgbc.js.map +1 -0
- package/dist/browser/{dist-BLT2aMxu.js → dist-C2dWnbCz.js} +9 -18
- package/dist/browser/dist-C2dWnbCz.js.map +1 -0
- package/dist/browser/{dist-DwhlRAyY.js → dist-COqKtKEY.js} +27 -20
- package/dist/browser/dist-COqKtKEY.js.map +1 -0
- package/dist/browser/{dist-CJhbhuk0.js → dist-C_bRf4Tj.js} +17 -17
- package/dist/browser/dist-C_bRf4Tj.js.map +1 -0
- package/dist/browser/prosemirror-state/index.js +1 -2
- package/dist/browser/tiptap-core/index.js +1 -2
- package/dist/browser/tiptap-extension-character-count/index.js +1 -1
- package/dist/browser/tiptap-extension-character-count/index.js.map +1 -1
- package/dist/browser/tiptap-extension-image/index.js +6 -10
- package/dist/browser/tiptap-extension-image/index.js.map +1 -1
- package/dist/browser/tiptap-extension-list-item/index.js +1 -1
- package/dist/browser/tiptap-extension-list-item/index.js.map +1 -1
- package/dist/browser/tiptap-extension-placeholder/index.js +1 -1
- package/dist/browser/tiptap-extension-placeholder/index.js.map +1 -1
- package/dist/browser/tiptap-extension-subscript/index.js +1 -1
- package/dist/browser/tiptap-extension-subscript/index.js.map +1 -1
- package/dist/browser/tiptap-extension-superscript/index.js +1 -1
- package/dist/browser/tiptap-extension-superscript/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table/index.js +1 -2
- package/dist/browser/tiptap-extension-table-cell/index.js +1 -1
- package/dist/browser/tiptap-extension-table-cell/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table-header/index.js +1 -1
- package/dist/browser/tiptap-extension-table-header/index.js.map +1 -1
- package/dist/browser/tiptap-extension-table-row/index.js +1 -1
- package/dist/browser/tiptap-extension-table-row/index.js.map +1 -1
- package/dist/browser/tiptap-extension-text-align/index.js +1 -1
- package/dist/browser/tiptap-extension-text-align/index.js.map +1 -1
- package/dist/browser/tiptap-extension-text-style/index.js +1 -1
- package/dist/browser/tiptap-extension-text-style/index.js.map +1 -1
- package/dist/browser/tiptap-extensions/index.js +1 -2
- package/dist/browser/tiptap-pm-state/index.js +1 -2
- package/dist/browser/tiptap-starter-kit/index.js +6 -14
- package/dist/browser/tiptap-starter-kit/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/dist-BLT2aMxu.js.map +0 -1
- package/dist/browser/dist-CJhbhuk0.js.map +0 -1
- package/dist/browser/dist-CbvLhouk.js.map +0 -1
- package/dist/browser/dist-DwhlRAyY.js.map +0 -1
- package/dist/browser/dist-Pg4oVkv2.js.map +0 -1
|
@@ -69,21 +69,20 @@ function t(e, n, a) {
|
|
|
69
69
|
for (let o = 0;; o++) {
|
|
70
70
|
if (o == e.childCount || o == n.childCount) return e.childCount == n.childCount ? null : a;
|
|
71
71
|
let s = e.child(o), c = n.child(o);
|
|
72
|
-
if (s == c)
|
|
72
|
+
if (s == c) a += s.nodeSize;
|
|
73
|
+
else {
|
|
74
|
+
if (!s.sameMarkup(c)) return a;
|
|
75
|
+
if (s.isText && s.text != c.text) {
|
|
76
|
+
let e = s.text, t = c.text, n = 0;
|
|
77
|
+
for (; e[n] == t[n]; n++) a++;
|
|
78
|
+
return n && n < e.length && n < t.length && i(e.charCodeAt(n - 1)) && r(e.charCodeAt(n)) && a--, a;
|
|
79
|
+
}
|
|
80
|
+
if (s.content.size || c.content.size) {
|
|
81
|
+
let e = t(s.content, c.content, a + 1);
|
|
82
|
+
if (e != null) return e;
|
|
83
|
+
}
|
|
73
84
|
a += s.nodeSize;
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (!s.sameMarkup(c)) return a;
|
|
77
|
-
if (s.isText && s.text != c.text) {
|
|
78
|
-
let e = s.text, t = c.text, n = 0;
|
|
79
|
-
for (; e[n] == t[n]; n++) a++;
|
|
80
|
-
return n && n < e.length && n < t.length && i(e.charCodeAt(n - 1)) && r(e.charCodeAt(n)) && a--, a;
|
|
81
85
|
}
|
|
82
|
-
if (s.content.size || c.content.size) {
|
|
83
|
-
let e = t(s.content, c.content, a + 1);
|
|
84
|
-
if (e != null) return e;
|
|
85
|
-
}
|
|
86
|
-
a += s.nodeSize;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
function n(e, t, a, o) {
|
|
@@ -93,27 +92,26 @@ function n(e, t, a, o) {
|
|
|
93
92
|
b: o
|
|
94
93
|
};
|
|
95
94
|
let l = e.child(--s), u = t.child(--c), d = l.nodeSize;
|
|
96
|
-
if (l == u)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
if (!l.sameMarkup(u)) return {
|
|
101
|
-
a,
|
|
102
|
-
b: o
|
|
103
|
-
};
|
|
104
|
-
if (l.isText && l.text != u.text) {
|
|
105
|
-
let e = l.text, t = u.text, n = e.length, s = t.length;
|
|
106
|
-
for (; n > 0 && s > 0 && e[n - 1] == t[s - 1];) n--, s--, a--, o--;
|
|
107
|
-
return n && s && n < e.length && i(e.charCodeAt(n - 1)) && r(e.charCodeAt(n)) && (a++, o++), {
|
|
95
|
+
if (l == u) a -= d, o -= d;
|
|
96
|
+
else {
|
|
97
|
+
if (!l.sameMarkup(u)) return {
|
|
108
98
|
a,
|
|
109
99
|
b: o
|
|
110
100
|
};
|
|
101
|
+
if (l.isText && l.text != u.text) {
|
|
102
|
+
let e = l.text, t = u.text, n = e.length, s = t.length;
|
|
103
|
+
for (; n > 0 && s > 0 && e[n - 1] == t[s - 1];) n--, s--, a--, o--;
|
|
104
|
+
return n && s && n < e.length && i(e.charCodeAt(n - 1)) && r(e.charCodeAt(n)) && (a++, o++), {
|
|
105
|
+
a,
|
|
106
|
+
b: o
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (l.content.size || u.content.size) {
|
|
110
|
+
let e = n(l.content, u.content, a - 1, o - 1);
|
|
111
|
+
if (e) return e;
|
|
112
|
+
}
|
|
113
|
+
a -= d, o -= d;
|
|
111
114
|
}
|
|
112
|
-
if (l.content.size || u.content.size) {
|
|
113
|
-
let e = n(l.content, u.content, a - 1, o - 1);
|
|
114
|
-
if (e) return e;
|
|
115
|
-
}
|
|
116
|
-
a -= d, o -= d;
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
function r(e) {
|
|
@@ -392,11 +390,13 @@ function h(e, t, n, r) {
|
|
|
392
390
|
if (i == t.index(r) && r < e.depth - n.openStart) {
|
|
393
391
|
let o = h(e, t, n, r + 1);
|
|
394
392
|
return a.copy(a.content.replaceChild(i, o));
|
|
395
|
-
}
|
|
396
|
-
|
|
393
|
+
}
|
|
394
|
+
if (!n.content.size) return y(a, b(e, t, r));
|
|
395
|
+
if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
|
|
397
396
|
let r = e.parent, i = r.content;
|
|
398
397
|
return y(r, i.cut(0, e.parentOffset).append(n.content).append(i.cut(t.parentOffset)));
|
|
399
|
-
}
|
|
398
|
+
}
|
|
399
|
+
{
|
|
400
400
|
let { start: i, end: o } = ne(n, e);
|
|
401
401
|
return y(a, te(e, i, o, t, r));
|
|
402
402
|
}
|
|
@@ -993,7 +993,8 @@ function ye(e) {
|
|
|
993
993
|
if (e.eat("(")) {
|
|
994
994
|
let t = pe(e);
|
|
995
995
|
return e.eat(")") || e.err("Missing closing paren"), t;
|
|
996
|
-
}
|
|
996
|
+
}
|
|
997
|
+
if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
|
|
997
998
|
else {
|
|
998
999
|
let t = ve(e, e.next).map((t) => (e.inline == null ? e.inline = t.isInline : e.inline != t.isInline && e.err("Mixing inline and block content"), {
|
|
999
1000
|
type: "name",
|
|
@@ -1116,9 +1117,10 @@ function Ee(e, t) {
|
|
|
1116
1117
|
let n = Object.create(null);
|
|
1117
1118
|
for (let r in e) {
|
|
1118
1119
|
let i = e[r], a = t && t[r];
|
|
1119
|
-
if (a === void 0)
|
|
1120
|
-
|
|
1121
|
-
|
|
1120
|
+
if (a === void 0) {
|
|
1121
|
+
if (i.hasDefault) a = i.default;
|
|
1122
|
+
else throw RangeError("No value supplied for attribute " + r);
|
|
1123
|
+
} else i.validate && i.validate(a);
|
|
1122
1124
|
n[r] = a;
|
|
1123
1125
|
}
|
|
1124
1126
|
return n;
|
|
@@ -1537,12 +1539,13 @@ var T = class {
|
|
|
1537
1539
|
}
|
|
1538
1540
|
addElementByRule(e, t, n, r) {
|
|
1539
1541
|
let i, a;
|
|
1540
|
-
if (t.node)
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1542
|
+
if (t.node) {
|
|
1543
|
+
if (a = this.parser.schema.nodes[t.node], a.isLeaf) this.insertNode(a.create(t.attrs), n, e.nodeName == "BR") || this.leafFallback(e, n);
|
|
1544
|
+
else {
|
|
1545
|
+
let e = this.enter(a, t.attrs || null, n, t.preserveWhitespace);
|
|
1546
|
+
e && (i = !0, n = e);
|
|
1547
|
+
}
|
|
1548
|
+
} else {
|
|
1546
1549
|
let e = this.parser.schema.marks[t.mark];
|
|
1547
1550
|
n = n.concat(e.create(t.attrs));
|
|
1548
1551
|
}
|
|
@@ -1603,7 +1606,7 @@ var T = class {
|
|
|
1603
1606
|
let o = Ve(e, i, a.options);
|
|
1604
1607
|
a.options & w && a.content.length == 0 && (o |= w);
|
|
1605
1608
|
let s = l.none;
|
|
1606
|
-
return n = n.filter((t) => (a.type ? a.type.allowsMarkType(t.type) : Ke(t.type, e))
|
|
1609
|
+
return n = n.filter((t) => !(a.type ? a.type.allowsMarkType(t.type) : Ke(t.type, e)) || (s = t.addToSet(s), !1)), this.nodes.push(new T(e, t, s, r, null, o)), this.open++, n;
|
|
1607
1610
|
}
|
|
1608
1611
|
closeExtra(e = !1) {
|
|
1609
1612
|
let t = this.nodes.length - 1;
|
|
@@ -1651,7 +1654,8 @@ var T = class {
|
|
|
1651
1654
|
if (e == t.length - 1 || e == 0) continue;
|
|
1652
1655
|
for (; o >= i; o--) if (a(e - 1, o)) return !0;
|
|
1653
1656
|
return !1;
|
|
1654
|
-
}
|
|
1657
|
+
}
|
|
1658
|
+
{
|
|
1655
1659
|
let e = o > 0 || o == 0 && r ? this.nodes[o].type : n && o >= i ? n.node(o - i).type : null;
|
|
1656
1660
|
if (!e || e.name != s && !e.isInGroup(s)) return !1;
|
|
1657
1661
|
o--;
|
|
@@ -1714,12 +1718,11 @@ var qe = class e {
|
|
|
1714
1718
|
let n = 0, a = 0;
|
|
1715
1719
|
for (; n < i.length && a < e.marks.length;) {
|
|
1716
1720
|
let t = e.marks[a];
|
|
1717
|
-
if (!this.marks[t.type.name])
|
|
1718
|
-
|
|
1719
|
-
|
|
1721
|
+
if (!this.marks[t.type.name]) a++;
|
|
1722
|
+
else {
|
|
1723
|
+
if (!t.eq(i[n][0]) || t.type.spec.spanning === !1) break;
|
|
1724
|
+
n++, a++;
|
|
1720
1725
|
}
|
|
1721
|
-
if (!t.eq(i[n][0]) || t.type.spec.spanning === !1) break;
|
|
1722
|
-
n++, a++;
|
|
1723
1726
|
}
|
|
1724
1727
|
for (; n < i.length;) r = i.pop()[1];
|
|
1725
1728
|
for (; a < e.marks.length;) {
|
|
@@ -1784,9 +1787,12 @@ function Xe(e) {
|
|
|
1784
1787
|
function Ze(e) {
|
|
1785
1788
|
let t = null;
|
|
1786
1789
|
function n(e) {
|
|
1787
|
-
if (e && typeof e == "object")
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
+
if (e && typeof e == "object") {
|
|
1791
|
+
if (Array.isArray(e)) {
|
|
1792
|
+
if (typeof e[0] == "string") t ||= [], t.push(e);
|
|
1793
|
+
else for (let t = 0; t < e.length; t++) n(e[t]);
|
|
1794
|
+
} else for (let t in e) n(e[t]);
|
|
1795
|
+
}
|
|
1790
1796
|
}
|
|
1791
1797
|
return n(e), t;
|
|
1792
1798
|
}
|
|
@@ -1814,7 +1820,8 @@ function D(e, t, n, r) {
|
|
|
1814
1820
|
dom: c,
|
|
1815
1821
|
contentDOM: c
|
|
1816
1822
|
};
|
|
1817
|
-
}
|
|
1823
|
+
}
|
|
1824
|
+
if (typeof a == "string") c.appendChild(e.createTextNode(a));
|
|
1818
1825
|
else {
|
|
1819
1826
|
let { dom: t, contentDOM: i } = D(e, a, n, r);
|
|
1820
1827
|
if (c.appendChild(t), i) {
|
|
@@ -2187,10 +2194,12 @@ var R = class e extends j {
|
|
|
2187
2194
|
if (this.from + this.slice.size == t.from && !this.slice.openEnd && !t.slice.openStart) {
|
|
2188
2195
|
let n = this.slice.size + t.slice.size == 0 ? d.empty : new d(this.slice.content.append(t.slice.content), this.slice.openStart, t.slice.openEnd);
|
|
2189
2196
|
return new e(this.from, this.to + (t.to - t.from), n, this.structure);
|
|
2190
|
-
}
|
|
2197
|
+
}
|
|
2198
|
+
if (t.to == this.from && !this.slice.openStart && !t.slice.openEnd) {
|
|
2191
2199
|
let n = this.slice.size + t.slice.size == 0 ? d.empty : new d(t.slice.content.append(this.slice.content), t.slice.openStart, this.slice.openEnd);
|
|
2192
2200
|
return new e(t.from, this.to, n, this.structure);
|
|
2193
|
-
}
|
|
2201
|
+
}
|
|
2202
|
+
return null;
|
|
2194
2203
|
}
|
|
2195
2204
|
toJSON() {
|
|
2196
2205
|
let e = {
|
|
@@ -3504,4 +3513,4 @@ var pn = class {
|
|
|
3504
3513
|
//#endregion
|
|
3505
3514
|
export { qe as C, se as D, x as E, Me as O, Ie as S, l as T, jt as _, pn as a, dt as b, J as c, F as d, z as f, Ct as g, Tt as h, dn as i, d as k, an as l, qt as m, ln as n, q as o, R as p, Y as r, Jt as s, X as t, st as u, pt as v, a as w, Mt as x, Ot as y };
|
|
3506
3515
|
|
|
3507
|
-
//# sourceMappingURL=dist-
|
|
3516
|
+
//# sourceMappingURL=dist-BVA3Sgbc.js.map
|