reactjs-tiptap-editor 0.3.31 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
- package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +39 -43
- package/lib/Attachment.d.ts +39 -43
- package/lib/Attachment.js +7 -6
- package/lib/BaseKit.cjs +3 -0
- package/lib/BaseKit.d.cts +481 -0
- package/lib/BaseKit.d.ts +481 -0
- package/lib/BaseKit.js +132 -0
- package/lib/Blockquote.cjs +5 -1
- package/lib/Blockquote.d.cts +39 -43
- package/lib/Blockquote.d.ts +39 -43
- package/lib/Blockquote.js +33 -17
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +39 -43
- package/lib/Bold.d.ts +39 -43
- package/lib/Bold.js +23 -16
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +40 -44
- package/lib/BulletList.d.ts +40 -44
- package/lib/BulletList.js +11 -57
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +39 -43
- package/lib/Clear.d.ts +39 -43
- package/lib/Clear.js +4 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +39 -43
- package/lib/Code.d.ts +39 -43
- package/lib/Code.js +29 -25
- package/lib/CodeBlock.cjs +2 -2
- package/lib/CodeBlock.d.cts +39 -43
- package/lib/CodeBlock.d.ts +39 -43
- package/lib/CodeBlock.js +3 -3
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +39 -43
- package/lib/CodeView.d.ts +39 -43
- package/lib/CodeView.js +3 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +40 -44
- package/lib/Color.d.ts +40 -44
- package/lib/Color.js +42 -74
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +39 -43
- package/lib/Document.d.ts +39 -43
- package/lib/Document.js +4 -8
- package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
- package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +39 -43
- package/lib/Drawer.d.ts +39 -43
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +42 -44
- package/lib/Emoji.d.ts +42 -44
- package/lib/Emoji.js +19793 -182
- package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
- package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +39 -43
- package/lib/Excalidraw.d.ts +39 -43
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +39 -43
- package/lib/ExportPdf.d.ts +39 -43
- package/lib/ExportPdf.js +4 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +39 -43
- package/lib/ExportWord.d.ts +39 -43
- package/lib/ExportWord.js +22 -51
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +40 -44
- package/lib/FontFamily.d.ts +40 -44
- package/lib/FontFamily.js +44 -73
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +39 -43
- package/lib/FontSize.d.ts +39 -43
- package/lib/FontSize.js +7 -5
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +39 -43
- package/lib/FormatPainter.d.ts +39 -43
- package/lib/FormatPainter.js +4 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +39 -43
- package/lib/Heading.d.ts +39 -43
- package/lib/Heading.js +71 -60
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +39 -43
- package/lib/Highlight.d.ts +39 -43
- package/lib/Highlight.js +5 -4
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +41 -45
- package/lib/History.d.ts +41 -45
- package/lib/History.js +39 -403
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +39 -43
- package/lib/HorizontalRule.d.ts +39 -43
- package/lib/HorizontalRule.js +16 -65
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +39 -43
- package/lib/Iframe.d.ts +39 -43
- package/lib/Iframe.js +4 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +39 -43
- package/lib/Image.d.ts +39 -43
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +39 -43
- package/lib/ImageGif.d.ts +39 -43
- package/lib/ImageGif.js +5 -5
- package/lib/ImportWord.cjs +72 -72
- package/lib/ImportWord.d.cts +39 -43
- package/lib/ImportWord.d.ts +39 -43
- package/lib/ImportWord.js +5652 -5615
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +39 -43
- package/lib/Indent.d.ts +39 -43
- package/lib/Indent.js +4 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +39 -43
- package/lib/Italic.d.ts +39 -43
- package/lib/Italic.js +20 -14
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +39 -43
- package/lib/Katex.d.ts +39 -43
- package/lib/Katex.js +12 -12
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +39 -43
- package/lib/LineHeight.d.ts +39 -43
- package/lib/LineHeight.js +5 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +39 -43
- package/lib/Link.d.ts +39 -43
- package/lib/Link.js +4 -4
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +44 -44
- package/lib/ListItem.d.ts +44 -44
- package/lib/ListItem.js +4 -30
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +39 -43
- package/lib/Mention.d.ts +39 -43
- package/lib/Mention.js +161 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +39 -43
- package/lib/Mermaid.d.ts +39 -43
- package/lib/Mermaid.js +50 -48
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +39 -43
- package/lib/MoreMark.d.ts +39 -43
- package/lib/MoreMark.js +5 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +39 -43
- package/lib/MultiColumn.d.ts +39 -43
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +40 -44
- package/lib/OrderedList.d.ts +40 -44
- package/lib/OrderedList.js +11 -75
- package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
- package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +52 -126
- package/lib/SearchAndReplace.d.ts +52 -126
- package/lib/SearchAndReplace.js +204 -192
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +39 -43
- package/lib/Selection.d.ts +39 -43
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -43
- package/lib/SlashCommand.d.ts +39 -43
- package/lib/SlashCommand.js +177 -222
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +39 -43
- package/lib/Strike.d.ts +39 -43
- package/lib/Strike.js +20 -14
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +39 -43
- package/lib/SubAndSuperScript.d.ts +39 -43
- package/lib/SubAndSuperScript.js +5 -3
- package/lib/Table.cjs +8 -10
- package/lib/Table.d.cts +42 -46
- package/lib/Table.d.ts +42 -46
- package/lib/Table.js +382 -2022
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +39 -43
- package/lib/TableOfContent.d.ts +39 -43
- package/lib/TableOfContent.js +5 -5
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +41 -45
- package/lib/TaskList.d.ts +41 -45
- package/lib/TaskList.js +12 -154
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +39 -43
- package/lib/TextAlign.d.ts +39 -43
- package/lib/TextAlign.js +11 -9
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +39 -43
- package/lib/TextBubble.d.ts +39 -43
- package/lib/TextBubble.js +5 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +39 -43
- package/lib/TextDirection.d.ts +39 -43
- package/lib/TextDirection.js +2 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +39 -43
- package/lib/TextUnderline.d.ts +39 -43
- package/lib/TextUnderline.js +40 -12
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +39 -43
- package/lib/TrailingNode.d.ts +39 -43
- package/lib/TrailingNode.js +1 -1
- package/lib/Twitter-BFULyqdR.js +1628 -0
- package/lib/Twitter-Cutpkh3h.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +39 -43
- package/lib/Twitter.d.ts +39 -43
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +39 -43
- package/lib/Video.d.ts +39 -43
- package/lib/Video.js +3 -3
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +39 -43
- package/lib/bubble-extra.d.ts +39 -43
- package/lib/bubble-extra.js +200 -192
- package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
- package/lib/dom-dataset-lYeH6gfI.js +2361 -0
- package/lib/index-5iBZLua9.cjs +12 -0
- package/lib/index-6D1J-A-o.cjs +1 -0
- package/lib/index-B96Cclrj.cjs +3 -0
- package/lib/index-BBz7Nmv9.js +55 -0
- package/lib/index-BeCTd5v2.cjs +1 -0
- package/lib/index-ByurDDMv.js +237 -0
- package/lib/index-CUogRI7j.cjs +1 -0
- package/lib/index-Ch6dBBad.js +709 -0
- package/lib/index-DF2Lp4HZ.cjs +100 -0
- package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
- package/lib/index-Dbvi-Bvh.cjs +1 -0
- package/lib/index-DpCrt7xs.cjs +1 -0
- package/lib/index-DsAX1Vq8.cjs +1 -0
- package/lib/index-Dy4DlW9o.js +12 -0
- package/lib/index-J3jHHZ4d.js +200 -0
- package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
- package/lib/index-VvXaaKe3.js +898 -0
- package/lib/index-kbO3iWqL.js +13432 -0
- package/lib/index.cjs +1 -2
- package/lib/index.d.cts +40 -243
- package/lib/index.d.ts +40 -243
- package/lib/index.js +2 -588
- package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
- package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +39 -43
- package/lib/locale-bundle.d.ts +39 -43
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
- package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
- package/package.json +76 -70
- package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
- package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
- package/lib/Twitter-99ivY5qv.js +0 -1744
- package/lib/Twitter-BvfvUtNT.cjs +0 -17
- package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
- package/lib/dom-dataset-Di3tIRrR.js +0 -1031
- package/lib/index-BI-IcZcN.cjs +0 -1
- package/lib/index-ByRfqzMr.cjs +0 -89
- package/lib/index-C1fzuXpN.js +0 -46
- package/lib/index-CbQQFj2T.js +0 -133
- package/lib/index-DI9T3iLd.js +0 -12354
- package/lib/index-D_A0TBRA.cjs +0 -1
- package/lib/index-DclQSrIx.cjs +0 -1
- package/lib/index-Z4b9rzn-.cjs +0 -1
package/lib/History.js
CHANGED
|
@@ -1,428 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { T as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
f.prototype.append = function(e) {
|
|
7
|
-
return e.length ? (e = f.from(e), !this.length && e || e.length < E && this.leafAppend(e) || this.length < E && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
8
|
-
};
|
|
9
|
-
f.prototype.prepend = function(e) {
|
|
10
|
-
return e.length ? f.from(e).append(this) : this;
|
|
11
|
-
};
|
|
12
|
-
f.prototype.appendInner = function(e) {
|
|
13
|
-
return new R(this, e);
|
|
14
|
-
};
|
|
15
|
-
f.prototype.slice = function(e, t) {
|
|
16
|
-
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? f.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
17
|
-
};
|
|
18
|
-
f.prototype.get = function(e) {
|
|
19
|
-
if (!(e < 0 || e >= this.length))
|
|
20
|
-
return this.getInner(e);
|
|
21
|
-
};
|
|
22
|
-
f.prototype.forEach = function(e, t, n) {
|
|
23
|
-
t === void 0 && (t = 0), n === void 0 && (n = this.length), t <= n ? this.forEachInner(e, t, n, 0) : this.forEachInvertedInner(e, t, n, 0);
|
|
24
|
-
};
|
|
25
|
-
f.prototype.map = function(e, t, n) {
|
|
26
|
-
t === void 0 && (t = 0), n === void 0 && (n = this.length);
|
|
27
|
-
var i = [];
|
|
28
|
-
return this.forEach(function(s, o) {
|
|
29
|
-
return i.push(e(s, o));
|
|
30
|
-
}, t, n), i;
|
|
31
|
-
};
|
|
32
|
-
f.from = function(e) {
|
|
33
|
-
return e instanceof f ? e : e && e.length ? new H(e) : f.empty;
|
|
34
|
-
};
|
|
35
|
-
var H = /* @__PURE__ */ function(r) {
|
|
36
|
-
function e(n) {
|
|
37
|
-
r.call(this), this.values = n;
|
|
38
|
-
}
|
|
39
|
-
r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e;
|
|
40
|
-
var t = { length: { configurable: !0 }, depth: { configurable: !0 } };
|
|
41
|
-
return e.prototype.flatten = function() {
|
|
42
|
-
return this.values;
|
|
43
|
-
}, e.prototype.sliceInner = function(i, s) {
|
|
44
|
-
return i == 0 && s == this.length ? this : new e(this.values.slice(i, s));
|
|
45
|
-
}, e.prototype.getInner = function(i) {
|
|
46
|
-
return this.values[i];
|
|
47
|
-
}, e.prototype.forEachInner = function(i, s, o, l) {
|
|
48
|
-
for (var p = s; p < o; p++)
|
|
49
|
-
if (i(this.values[p], l + p) === !1)
|
|
50
|
-
return !1;
|
|
51
|
-
}, e.prototype.forEachInvertedInner = function(i, s, o, l) {
|
|
52
|
-
for (var p = s - 1; p >= o; p--)
|
|
53
|
-
if (i(this.values[p], l + p) === !1)
|
|
54
|
-
return !1;
|
|
55
|
-
}, e.prototype.leafAppend = function(i) {
|
|
56
|
-
if (this.length + i.length <= E)
|
|
57
|
-
return new e(this.values.concat(i.flatten()));
|
|
58
|
-
}, e.prototype.leafPrepend = function(i) {
|
|
59
|
-
if (this.length + i.length <= E)
|
|
60
|
-
return new e(i.flatten().concat(this.values));
|
|
61
|
-
}, t.length.get = function() {
|
|
62
|
-
return this.values.length;
|
|
63
|
-
}, t.depth.get = function() {
|
|
64
|
-
return 0;
|
|
65
|
-
}, Object.defineProperties(e.prototype, t), e;
|
|
66
|
-
}(f);
|
|
67
|
-
f.empty = new H([]);
|
|
68
|
-
var R = /* @__PURE__ */ function(r) {
|
|
69
|
-
function e(t, n) {
|
|
70
|
-
r.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
|
|
71
|
-
}
|
|
72
|
-
return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.flatten = function() {
|
|
73
|
-
return this.left.flatten().concat(this.right.flatten());
|
|
74
|
-
}, e.prototype.getInner = function(n) {
|
|
75
|
-
return n < this.left.length ? this.left.get(n) : this.right.get(n - this.left.length);
|
|
76
|
-
}, e.prototype.forEachInner = function(n, i, s, o) {
|
|
77
|
-
var l = this.left.length;
|
|
78
|
-
if (i < l && this.left.forEachInner(n, i, Math.min(s, l), o) === !1 || s > l && this.right.forEachInner(n, Math.max(i - l, 0), Math.min(this.length, s) - l, o + l) === !1)
|
|
79
|
-
return !1;
|
|
80
|
-
}, e.prototype.forEachInvertedInner = function(n, i, s, o) {
|
|
81
|
-
var l = this.left.length;
|
|
82
|
-
if (i > l && this.right.forEachInvertedInner(n, i - l, Math.max(s, l) - l, o + l) === !1 || s < l && this.left.forEachInvertedInner(n, Math.min(i, l), s, o) === !1)
|
|
83
|
-
return !1;
|
|
84
|
-
}, e.prototype.sliceInner = function(n, i) {
|
|
85
|
-
if (n == 0 && i == this.length)
|
|
86
|
-
return this;
|
|
87
|
-
var s = this.left.length;
|
|
88
|
-
return i <= s ? this.left.slice(n, i) : n >= s ? this.right.slice(n - s, i - s) : this.left.slice(n, s).append(this.right.slice(0, i - s));
|
|
89
|
-
}, e.prototype.leafAppend = function(n) {
|
|
90
|
-
var i = this.right.leafAppend(n);
|
|
91
|
-
if (i)
|
|
92
|
-
return new e(this.left, i);
|
|
93
|
-
}, e.prototype.leafPrepend = function(n) {
|
|
94
|
-
var i = this.left.leafPrepend(n);
|
|
95
|
-
if (i)
|
|
96
|
-
return new e(i, this.right);
|
|
97
|
-
}, e.prototype.appendInner = function(n) {
|
|
98
|
-
return this.left.depth >= Math.max(this.right.depth, n.depth) + 1 ? new e(this.left, new e(this.right, n)) : new e(this, n);
|
|
99
|
-
}, e;
|
|
100
|
-
}(f);
|
|
101
|
-
const V = 500;
|
|
102
|
-
class m {
|
|
103
|
-
constructor(e, t) {
|
|
104
|
-
this.items = e, this.eventCount = t;
|
|
105
|
-
}
|
|
106
|
-
// Pop the latest event off the branch's history and apply it
|
|
107
|
-
// to a document transform.
|
|
108
|
-
popEvent(e, t) {
|
|
109
|
-
if (this.eventCount == 0)
|
|
110
|
-
return null;
|
|
111
|
-
let n = this.items.length;
|
|
112
|
-
for (; ; n--)
|
|
113
|
-
if (this.items.get(n - 1).selection) {
|
|
114
|
-
--n;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
let i, s;
|
|
118
|
-
t && (i = this.remapping(n, this.items.length), s = i.maps.length);
|
|
119
|
-
let o = e.tr, l, p, a = [], c = [];
|
|
120
|
-
return this.items.forEach((h, u) => {
|
|
121
|
-
if (!h.step) {
|
|
122
|
-
i || (i = this.remapping(n, u + 1), s = i.maps.length), s--, c.push(h);
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (i) {
|
|
126
|
-
c.push(new g(h.map));
|
|
127
|
-
let d = h.step.map(i.slice(s)), w;
|
|
128
|
-
d && o.maybeStep(d).doc && (w = o.mapping.maps[o.mapping.maps.length - 1], a.push(new g(w, void 0, void 0, a.length + c.length))), s--, w && i.appendMap(w, s);
|
|
129
|
-
} else
|
|
130
|
-
o.maybeStep(h.step);
|
|
131
|
-
if (h.selection)
|
|
132
|
-
return l = i ? h.selection.map(i.slice(s)) : h.selection, p = new m(this.items.slice(0, n).append(c.reverse().concat(a)), this.eventCount - 1), !1;
|
|
133
|
-
}, this.items.length, 0), { remaining: p, transform: o, selection: l };
|
|
134
|
-
}
|
|
135
|
-
// Create a new branch with the given transform added.
|
|
136
|
-
addTransform(e, t, n, i) {
|
|
137
|
-
let s = [], o = this.eventCount, l = this.items, p = !i && l.length ? l.get(l.length - 1) : null;
|
|
138
|
-
for (let c = 0; c < e.steps.length; c++) {
|
|
139
|
-
let h = e.steps[c].invert(e.docs[c]), u = new g(e.mapping.maps[c], h, t), d;
|
|
140
|
-
(d = p && p.merge(u)) && (u = d, c ? s.pop() : l = l.slice(0, l.length - 1)), s.push(u), t && (o++, t = void 0), i || (p = u);
|
|
141
|
-
}
|
|
142
|
-
let a = o - n.depth;
|
|
143
|
-
return a > B && (l = W(l, a), o -= a), new m(l.append(s), o);
|
|
144
|
-
}
|
|
145
|
-
remapping(e, t) {
|
|
146
|
-
let n = new G();
|
|
147
|
-
return this.items.forEach((i, s) => {
|
|
148
|
-
let o = i.mirrorOffset != null && s - i.mirrorOffset >= e ? n.maps.length - i.mirrorOffset : void 0;
|
|
149
|
-
n.appendMap(i.map, o);
|
|
150
|
-
}, e, t), n;
|
|
151
|
-
}
|
|
152
|
-
addMaps(e) {
|
|
153
|
-
return this.eventCount == 0 ? this : new m(this.items.append(e.map((t) => new g(t))), this.eventCount);
|
|
154
|
-
}
|
|
155
|
-
// When the collab module receives remote changes, the history has
|
|
156
|
-
// to know about those, so that it can adjust the steps that were
|
|
157
|
-
// rebased on top of the remote changes, and include the position
|
|
158
|
-
// maps for the remote changes in its array of items.
|
|
159
|
-
rebased(e, t) {
|
|
160
|
-
if (!this.eventCount)
|
|
161
|
-
return this;
|
|
162
|
-
let n = [], i = Math.max(0, this.items.length - t), s = e.mapping, o = e.steps.length, l = this.eventCount;
|
|
163
|
-
this.items.forEach((u) => {
|
|
164
|
-
u.selection && l--;
|
|
165
|
-
}, i);
|
|
166
|
-
let p = t;
|
|
167
|
-
this.items.forEach((u) => {
|
|
168
|
-
let d = s.getMirror(--p);
|
|
169
|
-
if (d == null)
|
|
170
|
-
return;
|
|
171
|
-
o = Math.min(o, d);
|
|
172
|
-
let w = s.maps[d];
|
|
173
|
-
if (u.step) {
|
|
174
|
-
let k = e.steps[d].invert(e.docs[d]), P = u.selection && u.selection.map(s.slice(p + 1, d));
|
|
175
|
-
P && l++, n.push(new g(w, k, P));
|
|
176
|
-
} else
|
|
177
|
-
n.push(new g(w));
|
|
178
|
-
}, i);
|
|
179
|
-
let a = [];
|
|
180
|
-
for (let u = t; u < o; u++)
|
|
181
|
-
a.push(new g(s.maps[u]));
|
|
182
|
-
let c = this.items.slice(0, i).append(a).append(n), h = new m(c, l);
|
|
183
|
-
return h.emptyItemCount() > V && (h = h.compress(this.items.length - n.length)), h;
|
|
184
|
-
}
|
|
185
|
-
emptyItemCount() {
|
|
186
|
-
let e = 0;
|
|
187
|
-
return this.items.forEach((t) => {
|
|
188
|
-
t.step || e++;
|
|
189
|
-
}), e;
|
|
190
|
-
}
|
|
191
|
-
// Compressing a branch means rewriting it to push the air (map-only
|
|
192
|
-
// items) out. During collaboration, these naturally accumulate
|
|
193
|
-
// because each remote change adds one. The `upto` argument is used
|
|
194
|
-
// to ensure that only the items below a given level are compressed,
|
|
195
|
-
// because `rebased` relies on a clean, untouched set of items in
|
|
196
|
-
// order to associate old items with rebased steps.
|
|
197
|
-
compress(e = this.items.length) {
|
|
198
|
-
let t = this.remapping(0, e), n = t.maps.length, i = [], s = 0;
|
|
199
|
-
return this.items.forEach((o, l) => {
|
|
200
|
-
if (l >= e)
|
|
201
|
-
i.push(o), o.selection && s++;
|
|
202
|
-
else if (o.step) {
|
|
203
|
-
let p = o.step.map(t.slice(n)), a = p && p.getMap();
|
|
204
|
-
if (n--, a && t.appendMap(a, n), p) {
|
|
205
|
-
let c = o.selection && o.selection.map(t.slice(n));
|
|
206
|
-
c && s++;
|
|
207
|
-
let h = new g(a.invert(), p, c), u, d = i.length - 1;
|
|
208
|
-
(u = i.length && i[d].merge(h)) ? i[d] = u : i.push(h);
|
|
209
|
-
}
|
|
210
|
-
} else o.map && n--;
|
|
211
|
-
}, this.items.length, 0), new m(f.from(i.reverse()), s);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
m.empty = new m(f.empty, 0);
|
|
215
|
-
function W(r, e) {
|
|
216
|
-
let t;
|
|
217
|
-
return r.forEach((n, i) => {
|
|
218
|
-
if (n.selection && e-- == 0)
|
|
219
|
-
return t = i, !1;
|
|
220
|
-
}), r.slice(t);
|
|
221
|
-
}
|
|
222
|
-
class g {
|
|
223
|
-
constructor(e, t, n, i) {
|
|
224
|
-
this.map = e, this.step = t, this.selection = n, this.mirrorOffset = i;
|
|
225
|
-
}
|
|
226
|
-
merge(e) {
|
|
227
|
-
if (this.step && e.step && !e.selection) {
|
|
228
|
-
let t = e.step.merge(this.step);
|
|
229
|
-
if (t)
|
|
230
|
-
return new g(t.getMap().invert(), t, this.selection);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
class v {
|
|
235
|
-
constructor(e, t, n, i, s) {
|
|
236
|
-
this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = i, this.prevComposition = s;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
const B = 20;
|
|
240
|
-
function J(r, e, t, n) {
|
|
241
|
-
let i = t.getMeta(y), s;
|
|
242
|
-
if (i)
|
|
243
|
-
return i.historyState;
|
|
244
|
-
t.getMeta(Y) && (r = new v(r.done, r.undone, null, 0, -1));
|
|
245
|
-
let o = t.getMeta("appendedTransaction");
|
|
246
|
-
if (t.steps.length == 0)
|
|
247
|
-
return r;
|
|
248
|
-
if (o && o.getMeta(y))
|
|
249
|
-
return o.getMeta(y).redo ? new v(r.done.addTransform(t, void 0, n, M(e)), r.undone, b(t.mapping.maps), r.prevTime, r.prevComposition) : new v(r.done, r.undone.addTransform(t, void 0, n, M(e)), null, r.prevTime, r.prevComposition);
|
|
250
|
-
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
251
|
-
let l = t.getMeta("composition"), p = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Q(t, r.prevRanges)), a = o ? C(r.prevRanges, t.mapping) : b(t.mapping.maps);
|
|
252
|
-
return new v(r.done.addTransform(t, p ? e.selection.getBookmark() : void 0, n, M(e)), m.empty, a, t.time, l ?? r.prevComposition);
|
|
253
|
-
} else return (s = t.getMeta("rebased")) ? new v(r.done.rebased(t, s), r.undone.rebased(t, s), C(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new v(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), C(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
|
|
254
|
-
}
|
|
255
|
-
function Q(r, e) {
|
|
256
|
-
if (!e)
|
|
257
|
-
return !1;
|
|
258
|
-
if (!r.docChanged)
|
|
259
|
-
return !0;
|
|
260
|
-
let t = !1;
|
|
261
|
-
return r.mapping.maps[0].forEach((n, i) => {
|
|
262
|
-
for (let s = 0; s < e.length; s += 2)
|
|
263
|
-
n <= e[s + 1] && i >= e[s] && (t = !0);
|
|
264
|
-
}), t;
|
|
265
|
-
}
|
|
266
|
-
function b(r) {
|
|
267
|
-
let e = [];
|
|
268
|
-
for (let t = r.length - 1; t >= 0 && e.length == 0; t--)
|
|
269
|
-
r[t].forEach((n, i, s, o) => e.push(s, o));
|
|
270
|
-
return e;
|
|
271
|
-
}
|
|
272
|
-
function C(r, e) {
|
|
273
|
-
if (!r)
|
|
274
|
-
return null;
|
|
275
|
-
let t = [];
|
|
276
|
-
for (let n = 0; n < r.length; n += 2) {
|
|
277
|
-
let i = e.map(r[n], 1), s = e.map(r[n + 1], -1);
|
|
278
|
-
i <= s && t.push(i, s);
|
|
279
|
-
}
|
|
280
|
-
return t;
|
|
281
|
-
}
|
|
282
|
-
function X(r, e, t) {
|
|
283
|
-
let n = M(e), i = y.get(e).spec.config, s = (t ? r.undone : r.done).popEvent(e, n);
|
|
284
|
-
if (!s)
|
|
285
|
-
return null;
|
|
286
|
-
let o = s.selection.resolve(s.transform.doc), l = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), p = new v(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
|
|
287
|
-
return s.transform.setSelection(o).setMeta(y, { redo: t, historyState: p });
|
|
288
|
-
}
|
|
289
|
-
let T = !1, O = null;
|
|
290
|
-
function M(r) {
|
|
291
|
-
let e = r.plugins;
|
|
292
|
-
if (O != e) {
|
|
293
|
-
T = !1, O = e;
|
|
294
|
-
for (let t = 0; t < e.length; t++)
|
|
295
|
-
if (e[t].spec.historyPreserveItems) {
|
|
296
|
-
T = !0;
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return T;
|
|
301
|
-
}
|
|
302
|
-
const y = new A("history"), Y = new A("closeHistory");
|
|
303
|
-
function q(r = {}) {
|
|
304
|
-
return r = {
|
|
305
|
-
depth: r.depth || 100,
|
|
306
|
-
newGroupDelay: r.newGroupDelay || 500
|
|
307
|
-
}, new j({
|
|
308
|
-
key: y,
|
|
309
|
-
state: {
|
|
310
|
-
init() {
|
|
311
|
-
return new v(m.empty, m.empty, null, 0, -1);
|
|
312
|
-
},
|
|
313
|
-
apply(e, t, n) {
|
|
314
|
-
return J(t, n, e, r);
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
config: r,
|
|
318
|
-
props: {
|
|
319
|
-
handleDOMEvents: {
|
|
320
|
-
beforeinput(e, t) {
|
|
321
|
-
let n = t.inputType, i = n == "historyUndo" ? D : n == "historyRedo" ? _ : null;
|
|
322
|
-
return i ? (t.preventDefault(), i(e.state, e.dispatch)) : !1;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
function K(r, e) {
|
|
329
|
-
return (t, n) => {
|
|
330
|
-
let i = y.getState(t);
|
|
331
|
-
if (!i || (r ? i.undone : i.done).eventCount == 0)
|
|
332
|
-
return !1;
|
|
333
|
-
if (n) {
|
|
334
|
-
let s = X(i, t, r);
|
|
335
|
-
s && n(e ? s.scrollIntoView() : s);
|
|
336
|
-
}
|
|
337
|
-
return !0;
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
const D = K(!1, !0), _ = K(!0, !0), ee = L.create({
|
|
341
|
-
name: "history",
|
|
342
|
-
addOptions() {
|
|
343
|
-
return {
|
|
344
|
-
depth: 100,
|
|
345
|
-
newGroupDelay: 500
|
|
346
|
-
};
|
|
347
|
-
},
|
|
348
|
-
addCommands() {
|
|
349
|
-
return {
|
|
350
|
-
undo: () => ({ state: r, dispatch: e }) => D(r, e),
|
|
351
|
-
redo: () => ({ state: r, dispatch: e }) => _(r, e)
|
|
352
|
-
};
|
|
353
|
-
},
|
|
354
|
-
addProseMirrorPlugins() {
|
|
355
|
-
return [
|
|
356
|
-
q(this.options)
|
|
357
|
-
];
|
|
358
|
-
},
|
|
359
|
-
addKeyboardShortcuts() {
|
|
360
|
-
return {
|
|
361
|
-
"Mod-z": () => this.editor.commands.undo(),
|
|
362
|
-
"Shift-Mod-z": () => this.editor.commands.redo(),
|
|
363
|
-
"Mod-y": () => this.editor.commands.redo(),
|
|
364
|
-
// Russian keyboard layouts
|
|
365
|
-
"Mod-я": () => this.editor.commands.undo(),
|
|
366
|
-
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
function te(r) {
|
|
371
|
-
var a;
|
|
1
|
+
import { U as u } from "./index-VvXaaKe3.js";
|
|
2
|
+
import { jsxs as d, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
3
|
+
import { T as m, a as f, n as y, i as g, b as v, g as K } from "./RichTextEditor-DGcKEUGr.js";
|
|
4
|
+
function T(t) {
|
|
5
|
+
var l;
|
|
372
6
|
const {
|
|
373
|
-
icon:
|
|
7
|
+
icon: n = void 0,
|
|
374
8
|
// title = undefined,
|
|
375
|
-
tooltip:
|
|
9
|
+
tooltip: i = void 0,
|
|
376
10
|
// disabled = false,
|
|
377
|
-
customClass:
|
|
11
|
+
customClass: s = "",
|
|
378
12
|
// color = undefined,
|
|
379
13
|
// loading = false,
|
|
380
14
|
// shortcutKeys = undefined,
|
|
381
|
-
tooltipOptions:
|
|
382
|
-
action:
|
|
383
|
-
isActive:
|
|
384
|
-
children:
|
|
385
|
-
} =
|
|
386
|
-
return /* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
|
|
15
|
+
tooltipOptions: o = {},
|
|
16
|
+
action: r = void 0,
|
|
17
|
+
isActive: c = void 0,
|
|
18
|
+
children: a
|
|
19
|
+
} = t, h = g[n];
|
|
20
|
+
return /* @__PURE__ */ d(m, { children: [
|
|
21
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ d(
|
|
22
|
+
y,
|
|
389
23
|
{
|
|
390
24
|
size: "sm",
|
|
391
|
-
className: `richtext-w-[32px] richtext-h-[32px] ${
|
|
392
|
-
disabled:
|
|
393
|
-
onClick:
|
|
25
|
+
className: `richtext-w-[32px] richtext-h-[32px] ${s}`,
|
|
26
|
+
disabled: c == null ? void 0 : c(),
|
|
27
|
+
onClick: r,
|
|
394
28
|
children: [
|
|
395
|
-
|
|
396
|
-
|
|
29
|
+
h && /* @__PURE__ */ e(h, { className: "richtext-w-4 richtext-h-4" }),
|
|
30
|
+
a && /* @__PURE__ */ e(x, { children: a })
|
|
397
31
|
]
|
|
398
32
|
}
|
|
399
33
|
) }),
|
|
400
|
-
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
!!((
|
|
34
|
+
i && /* @__PURE__ */ e(v, { ...o, children: /* @__PURE__ */ d("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
|
|
35
|
+
/* @__PURE__ */ e("div", { children: i }),
|
|
36
|
+
!!((l = t == null ? void 0 : t.shortcutKeys) != null && l.length) && /* @__PURE__ */ e("span", { children: K(t == null ? void 0 : t.shortcutKeys) })
|
|
403
37
|
] }) })
|
|
404
38
|
] });
|
|
405
39
|
}
|
|
406
|
-
const
|
|
40
|
+
const p = ["undo", "redo"], N = /* @__PURE__ */ u.extend({
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
|
+
//@ts-expect-error
|
|
407
43
|
addOptions() {
|
|
408
|
-
var
|
|
44
|
+
var t;
|
|
409
45
|
return {
|
|
410
|
-
...(
|
|
46
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
411
47
|
depth: 100,
|
|
412
48
|
newGroupDelay: 500,
|
|
413
|
-
button: ({ editor:
|
|
414
|
-
var
|
|
49
|
+
button: ({ editor: n, t: i, extension: s }) => p.map((o) => {
|
|
50
|
+
var r, c;
|
|
415
51
|
return {
|
|
416
|
-
component:
|
|
52
|
+
component: T,
|
|
417
53
|
componentProps: {
|
|
418
54
|
action: () => {
|
|
419
|
-
|
|
55
|
+
o === "undo" && n.chain().focus().undo().run(), o === "redo" && n.chain().focus().redo().run();
|
|
420
56
|
},
|
|
421
|
-
shortcutKeys:
|
|
422
|
-
disabled:
|
|
423
|
-
isActive: () =>
|
|
424
|
-
icon:
|
|
425
|
-
tooltip:
|
|
57
|
+
shortcutKeys: o === "undo" ? ((r = s.options.shortcutKeys) == null ? void 0 : r[0]) ?? ["mod", "Z"] : ((c = s.options.shortcutKeys) == null ? void 0 : c[1]) ?? ["shift", "mod", "Z"],
|
|
58
|
+
disabled: o === "undo" ? !n.can().undo() : !n.can().redo(),
|
|
59
|
+
isActive: () => o === "undo" ? !n.can().undo() : !n.can().redo(),
|
|
60
|
+
icon: o === "undo" ? "Undo2" : "Redo2",
|
|
61
|
+
tooltip: i(`editor.${o}.tooltip`)
|
|
426
62
|
}
|
|
427
63
|
};
|
|
428
64
|
})
|
|
@@ -430,5 +66,5 @@ const ne = ["undo", "redo"], oe = /* @__PURE__ */ ee.extend({
|
|
|
430
66
|
}
|
|
431
67
|
});
|
|
432
68
|
export {
|
|
433
|
-
|
|
69
|
+
N as History
|
|
434
70
|
};
|
package/lib/HorizontalRule.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-DF2Lp4HZ.cjs"),i=require("./index-Dbvi-Bvh.cjs"),s=require("./RichTextEditor-CxvwGvQG.cjs"),u=i.HorizontalRule.extend({renderHTML(){return["div",r.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:o,t:e,extension:n})=>({component:s.ActionButton,componentProps:{action:()=>o.commands.setHorizontalRule(),disabled:!o.can().setHorizontalRule(),icon:"Minus",shortcutKeys:n.options.shortcutKeys??["mod","alt","S"],tooltip:e("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});exports.HorizontalRule=u;
|
package/lib/HorizontalRule.d.cts
CHANGED
|
@@ -112,9 +112,8 @@ declare module '@tiptap/core' {
|
|
|
112
112
|
|
|
113
113
|
declare module '@tiptap/core' {
|
|
114
114
|
interface Commands<ReturnType> {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
115
|
+
excalidraw: {
|
|
116
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
118
117
|
};
|
|
119
118
|
}
|
|
120
119
|
}
|
|
@@ -122,11 +121,9 @@ declare module '@tiptap/core' {
|
|
|
122
121
|
|
|
123
122
|
declare module '@tiptap/core' {
|
|
124
123
|
interface Commands<ReturnType> {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
emoji: string;
|
|
129
|
-
}) => ReturnType;
|
|
124
|
+
drawer: {
|
|
125
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
126
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
130
127
|
};
|
|
131
128
|
}
|
|
132
129
|
}
|
|
@@ -134,8 +131,8 @@ declare module '@tiptap/core' {
|
|
|
134
131
|
|
|
135
132
|
declare module '@tiptap/core' {
|
|
136
133
|
interface Commands<ReturnType> {
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
exportPdf: {
|
|
135
|
+
exportToPdf: () => ReturnType;
|
|
139
136
|
};
|
|
140
137
|
}
|
|
141
138
|
}
|
|
@@ -143,8 +140,8 @@ declare module '@tiptap/core' {
|
|
|
143
140
|
|
|
144
141
|
declare module '@tiptap/core' {
|
|
145
142
|
interface Commands<ReturnType> {
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
exportWord: {
|
|
144
|
+
exportToWord: () => ReturnType;
|
|
148
145
|
};
|
|
149
146
|
}
|
|
150
147
|
}
|
|
@@ -152,8 +149,8 @@ declare module '@tiptap/core' {
|
|
|
152
149
|
|
|
153
150
|
declare module '@tiptap/core' {
|
|
154
151
|
interface Commands<ReturnType> {
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
painter: {
|
|
153
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
157
154
|
};
|
|
158
155
|
}
|
|
159
156
|
}
|
|
@@ -177,15 +174,6 @@ declare module '@tiptap/core' {
|
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
|
|
180
|
-
declare module '@tiptap/core' {
|
|
181
|
-
interface Commands<ReturnType> {
|
|
182
|
-
painter: {
|
|
183
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
177
|
declare module '@tiptap/core' {
|
|
190
178
|
interface Commands<ReturnType> {
|
|
191
179
|
iframe: {
|
|
@@ -241,6 +229,15 @@ declare module '@tiptap/core' {
|
|
|
241
229
|
}
|
|
242
230
|
|
|
243
231
|
|
|
232
|
+
declare module '@tiptap/core' {
|
|
233
|
+
interface Commands<ReturnType> {
|
|
234
|
+
katex: {
|
|
235
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
244
241
|
declare module '@tiptap/core' {
|
|
245
242
|
interface Commands<ReturnType> {
|
|
246
243
|
indent: {
|
|
@@ -259,8 +256,9 @@ declare module '@tiptap/core' {
|
|
|
259
256
|
|
|
260
257
|
declare module '@tiptap/core' {
|
|
261
258
|
interface Commands<ReturnType> {
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
lineHeight: {
|
|
260
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
261
|
+
unsetLineHeight: () => ReturnType;
|
|
264
262
|
};
|
|
265
263
|
}
|
|
266
264
|
}
|
|
@@ -268,9 +266,13 @@ declare module '@tiptap/core' {
|
|
|
268
266
|
|
|
269
267
|
declare module '@tiptap/core' {
|
|
270
268
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
269
|
+
columns: {
|
|
270
|
+
insertColumns: (attrs?: {
|
|
271
|
+
cols: number;
|
|
272
|
+
}) => ReturnType;
|
|
273
|
+
addColBefore: () => ReturnType;
|
|
274
|
+
addColAfter: () => ReturnType;
|
|
275
|
+
deleteCol: () => ReturnType;
|
|
274
276
|
};
|
|
275
277
|
}
|
|
276
278
|
}
|
|
@@ -288,13 +290,9 @@ declare module '@tiptap/core' {
|
|
|
288
290
|
|
|
289
291
|
declare module '@tiptap/core' {
|
|
290
292
|
interface Commands<ReturnType> {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}) => ReturnType;
|
|
295
|
-
addColBefore: () => ReturnType;
|
|
296
|
-
addColAfter: () => ReturnType;
|
|
297
|
-
deleteCol: () => ReturnType;
|
|
293
|
+
tableOfContents: {
|
|
294
|
+
setTableOfContents: () => ReturnType;
|
|
295
|
+
removeTableOfContents: () => ReturnType;
|
|
298
296
|
};
|
|
299
297
|
}
|
|
300
298
|
}
|
|
@@ -305,22 +303,20 @@ declare module '@tiptap/core' {
|
|
|
305
303
|
search: {
|
|
306
304
|
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
307
305
|
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
306
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
307
|
+
resetIndex: () => ReturnType;
|
|
308
|
+
nextSearchResult: () => ReturnType;
|
|
309
|
+
previousSearchResult: () => ReturnType;
|
|
308
310
|
replace: () => ReturnType;
|
|
309
311
|
replaceAll: () => ReturnType;
|
|
310
|
-
goToPrevSearchResult: () => void;
|
|
311
|
-
goToNextSearchResult: () => void;
|
|
312
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
313
312
|
};
|
|
314
313
|
}
|
|
315
314
|
}
|
|
316
315
|
|
|
317
316
|
|
|
318
317
|
declare module '@tiptap/core' {
|
|
319
|
-
interface
|
|
320
|
-
|
|
321
|
-
setTableOfContents: () => ReturnType;
|
|
322
|
-
removeTableOfContents: () => ReturnType;
|
|
323
|
-
};
|
|
318
|
+
interface Storage {
|
|
319
|
+
searchAndReplace: SearchAndReplaceStorage;
|
|
324
320
|
}
|
|
325
321
|
}
|
|
326
322
|
|