reactjs-tiptap-editor 0.3.24 → 0.3.25
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/lib/{ActionMenuButton-BqO6QTnX.cjs → ActionMenuButton-B3XOtCey.cjs} +1 -1
- package/lib/{ActionMenuButton-BW1lNB_I.js → ActionMenuButton-Bh2ft7th.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +31 -31
- package/lib/Attachment.d.ts +31 -31
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +31 -31
- package/lib/Blockquote.d.ts +31 -31
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +31 -31
- package/lib/Bold.d.ts +31 -31
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +31 -31
- package/lib/BulletList.d.ts +31 -31
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +31 -31
- package/lib/Clear.d.ts +31 -31
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +31 -31
- package/lib/Code.d.ts +31 -31
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +31 -31
- package/lib/CodeBlock.d.ts +31 -31
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +31 -31
- package/lib/CodeView.d.ts +31 -31
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +31 -31
- package/lib/Color.d.ts +31 -31
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +31 -31
- package/lib/Document.d.ts +31 -31
- package/lib/{Drawer-B1rmIQfS.cjs → Drawer-CUntRzbs.cjs} +1 -1
- package/lib/{Drawer-DEqRsjHw.js → Drawer-Orz21MYs.js} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +31 -31
- package/lib/Drawer.d.ts +31 -31
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +31 -31
- package/lib/Emoji.d.ts +31 -31
- package/lib/Emoji.js +1 -1
- package/lib/{Excalidraw-Qr5vHe9J.cjs → Excalidraw-Bu8XuykT.cjs} +1 -1
- package/lib/{Excalidraw-D2y-x-OZ.js → Excalidraw-Cj-sXq5F.js} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +31 -31
- package/lib/Excalidraw.d.ts +31 -31
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +31 -31
- package/lib/ExportPdf.d.ts +31 -31
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +31 -31
- package/lib/ExportWord.d.ts +31 -31
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +31 -31
- package/lib/FontFamily.d.ts +31 -31
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +31 -31
- package/lib/FontSize.d.ts +31 -31
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +31 -31
- package/lib/FormatPainter.d.ts +31 -31
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +31 -31
- package/lib/Heading.d.ts +31 -31
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +31 -31
- package/lib/Highlight.d.ts +31 -31
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +31 -31
- package/lib/History.d.ts +31 -31
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +31 -31
- package/lib/HorizontalRule.d.ts +31 -31
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +31 -31
- package/lib/Iframe.d.ts +31 -31
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +31 -31
- package/lib/Image.d.ts +31 -31
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +31 -31
- package/lib/ImageGif.d.ts +31 -31
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +31 -31
- package/lib/ImportWord.d.ts +31 -31
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +31 -31
- package/lib/Indent.d.ts +31 -31
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +31 -31
- package/lib/Italic.d.ts +31 -31
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +31 -31
- package/lib/Katex.d.ts +31 -31
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +31 -31
- package/lib/LineHeight.d.ts +31 -31
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +31 -31
- package/lib/Link.d.ts +31 -31
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +31 -31
- package/lib/ListItem.d.ts +31 -31
- package/lib/Mention.d.cts +31 -31
- package/lib/Mention.d.ts +31 -31
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +31 -31
- package/lib/Mermaid.d.ts +31 -31
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +31 -31
- package/lib/MoreMark.d.ts +31 -31
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +31 -31
- package/lib/MultiColumn.d.ts +31 -31
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +31 -31
- package/lib/OrderedList.d.ts +31 -31
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-CSA367l8.cjs → RichTextEditor-B5WYnm7K.cjs} +1 -1
- package/lib/{RichTextEditor-CrDGx-K7.js → RichTextEditor-CfAFp9V2.js} +145 -106
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +31 -31
- package/lib/SearchAndReplace.d.ts +31 -31
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +31 -31
- package/lib/Selection.d.ts +31 -31
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +31 -31
- package/lib/SlashCommand.d.ts +31 -31
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +31 -31
- package/lib/Strike.d.ts +31 -31
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +31 -31
- package/lib/SubAndSuperScript.d.ts +31 -31
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +31 -31
- package/lib/Table.d.ts +31 -31
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +31 -31
- package/lib/TableOfContent.d.ts +31 -31
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +31 -31
- package/lib/TaskList.d.ts +31 -31
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +31 -31
- package/lib/TextAlign.d.ts +31 -31
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +31 -31
- package/lib/TextBubble.d.ts +31 -31
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +31 -31
- package/lib/TextDirection.d.ts +31 -31
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +31 -31
- package/lib/TextUnderline.d.ts +31 -31
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +31 -31
- package/lib/TrailingNode.d.ts +31 -31
- package/lib/{Twitter-D-kqw1ZB.js → Twitter-9AKqIK4p.js} +1 -1
- package/lib/{Twitter-BRF2Ehp3.cjs → Twitter-BFwUowi8.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +31 -31
- package/lib/Twitter.d.ts +31 -31
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +31 -31
- package/lib/Video.d.ts +31 -31
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +31 -31
- package/lib/bubble-extra.d.ts +31 -31
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +31 -31
- package/lib/index.d.ts +31 -31
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +31 -31
- package/lib/locale-bundle.d.ts +31 -31
- package/lib/{textarea-06Uv95yx.js → textarea-CWt0EMiJ.js} +1 -1
- package/lib/{textarea-QE8jlGEs.cjs → textarea-bND4WL8o.cjs} +1 -1
- package/package.json +1 -1
package/lib/TableOfContent.d.cts
CHANGED
|
@@ -41,9 +41,11 @@ declare module '@tiptap/core' {
|
|
|
41
41
|
|
|
42
42
|
declare module '@tiptap/core' {
|
|
43
43
|
interface Commands<ReturnType> {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
emoji: {
|
|
45
|
+
setEmoji: (emoji: {
|
|
46
|
+
name: string;
|
|
47
|
+
emoji: string;
|
|
48
|
+
}) => ReturnType;
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -51,8 +53,9 @@ declare module '@tiptap/core' {
|
|
|
51
53
|
|
|
52
54
|
declare module '@tiptap/core' {
|
|
53
55
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
drawer: {
|
|
57
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
58
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
|
|
|
60
63
|
|
|
61
64
|
declare module '@tiptap/core' {
|
|
62
65
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
name: string;
|
|
66
|
-
emoji: string;
|
|
67
|
-
}) => ReturnType;
|
|
66
|
+
excalidraw: {
|
|
67
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -123,19 +123,19 @@ declare module '@tiptap/core' {
|
|
|
123
123
|
|
|
124
124
|
declare module '@tiptap/core' {
|
|
125
125
|
interface Commands<ReturnType> {
|
|
126
|
-
|
|
126
|
+
imageGifUpload: {
|
|
127
127
|
/**
|
|
128
|
-
* Add an image
|
|
128
|
+
* Add an image gif
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
131
131
|
/**
|
|
132
|
-
* Update an image
|
|
132
|
+
* Update an image gif
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
135
135
|
/**
|
|
136
136
|
* Set image alignment
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -143,28 +143,19 @@ declare module '@tiptap/core' {
|
|
|
143
143
|
|
|
144
144
|
declare module '@tiptap/core' {
|
|
145
145
|
interface Commands<ReturnType> {
|
|
146
|
-
|
|
146
|
+
imageUpload: {
|
|
147
147
|
/**
|
|
148
|
-
* Add an image
|
|
148
|
+
* Add an image
|
|
149
149
|
*/
|
|
150
|
-
|
|
150
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
151
|
/**
|
|
152
|
-
* Update an image
|
|
152
|
+
* Update an image
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
155
155
|
/**
|
|
156
156
|
* Set image alignment
|
|
157
157
|
*/
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
katex: {
|
|
167
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
158
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
168
159
|
};
|
|
169
160
|
}
|
|
170
161
|
}
|
|
@@ -186,6 +177,15 @@ declare module '@tiptap/core' {
|
|
|
186
177
|
}
|
|
187
178
|
|
|
188
179
|
|
|
180
|
+
declare module '@tiptap/core' {
|
|
181
|
+
interface Commands<ReturnType> {
|
|
182
|
+
katex: {
|
|
183
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
189
|
declare module '@tiptap/core' {
|
|
190
190
|
interface Commands<ReturnType> {
|
|
191
191
|
lineHeight: {
|
package/lib/TableOfContent.d.ts
CHANGED
|
@@ -41,9 +41,11 @@ declare module '@tiptap/core' {
|
|
|
41
41
|
|
|
42
42
|
declare module '@tiptap/core' {
|
|
43
43
|
interface Commands<ReturnType> {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
emoji: {
|
|
45
|
+
setEmoji: (emoji: {
|
|
46
|
+
name: string;
|
|
47
|
+
emoji: string;
|
|
48
|
+
}) => ReturnType;
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -51,8 +53,9 @@ declare module '@tiptap/core' {
|
|
|
51
53
|
|
|
52
54
|
declare module '@tiptap/core' {
|
|
53
55
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
drawer: {
|
|
57
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
58
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
|
|
|
60
63
|
|
|
61
64
|
declare module '@tiptap/core' {
|
|
62
65
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
name: string;
|
|
66
|
-
emoji: string;
|
|
67
|
-
}) => ReturnType;
|
|
66
|
+
excalidraw: {
|
|
67
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -123,19 +123,19 @@ declare module '@tiptap/core' {
|
|
|
123
123
|
|
|
124
124
|
declare module '@tiptap/core' {
|
|
125
125
|
interface Commands<ReturnType> {
|
|
126
|
-
|
|
126
|
+
imageGifUpload: {
|
|
127
127
|
/**
|
|
128
|
-
* Add an image
|
|
128
|
+
* Add an image gif
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
131
131
|
/**
|
|
132
|
-
* Update an image
|
|
132
|
+
* Update an image gif
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
135
135
|
/**
|
|
136
136
|
* Set image alignment
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -143,28 +143,19 @@ declare module '@tiptap/core' {
|
|
|
143
143
|
|
|
144
144
|
declare module '@tiptap/core' {
|
|
145
145
|
interface Commands<ReturnType> {
|
|
146
|
-
|
|
146
|
+
imageUpload: {
|
|
147
147
|
/**
|
|
148
|
-
* Add an image
|
|
148
|
+
* Add an image
|
|
149
149
|
*/
|
|
150
|
-
|
|
150
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
151
|
/**
|
|
152
|
-
* Update an image
|
|
152
|
+
* Update an image
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
155
155
|
/**
|
|
156
156
|
* Set image alignment
|
|
157
157
|
*/
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
katex: {
|
|
167
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
158
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
168
159
|
};
|
|
169
160
|
}
|
|
170
161
|
}
|
|
@@ -186,6 +177,15 @@ declare module '@tiptap/core' {
|
|
|
186
177
|
}
|
|
187
178
|
|
|
188
179
|
|
|
180
|
+
declare module '@tiptap/core' {
|
|
181
|
+
interface Commands<ReturnType> {
|
|
182
|
+
katex: {
|
|
183
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
189
|
declare module '@tiptap/core' {
|
|
190
190
|
interface Commands<ReturnType> {
|
|
191
191
|
lineHeight: {
|
package/lib/TableOfContent.js
CHANGED
|
@@ -3,7 +3,7 @@ import { N as C, c as g, R as N } from "./dom-dataset-Di3tIRrR.js";
|
|
|
3
3
|
import { jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
4
4
|
import { useState as p, useCallback as m, useEffect as d } from "react";
|
|
5
5
|
import { u as O } from "./index-CsK90iVd.js";
|
|
6
|
-
import { Z as _, A as y } from "./RichTextEditor-
|
|
6
|
+
import { Z as _, A as y } from "./RichTextEditor-CfAFp9V2.js";
|
|
7
7
|
const x = "_toc_aag8a_1", A = "_visible_aag8a_7", w = "_list_aag8a_11", E = "_item_aag8a_16", f = {
|
|
8
8
|
toc: x,
|
|
9
9
|
visible: A,
|
package/lib/TaskList.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-B5WYnm7K.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=r.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",r.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:o,editor:c})=>{const a=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!c.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;c.isEditable&&typeof o=="function"&&c.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=o();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!c.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{a.setAttribute(e,n)}),a.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),a.append(d,l),Object.entries(i).forEach(([e,n])=>{a.setAttribute(e,n)}),{dom:a,contentDOM:l,update:e=>e.type!==this.type?!1:(a.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[r.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=r.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",r.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:o})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:o("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
|
package/lib/TaskList.d.cts
CHANGED
|
@@ -116,9 +116,11 @@ declare module '@tiptap/core' {
|
|
|
116
116
|
|
|
117
117
|
declare module '@tiptap/core' {
|
|
118
118
|
interface Commands<ReturnType> {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
emoji: {
|
|
120
|
+
setEmoji: (emoji: {
|
|
121
|
+
name: string;
|
|
122
|
+
emoji: string;
|
|
123
|
+
}) => ReturnType;
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -126,8 +128,9 @@ declare module '@tiptap/core' {
|
|
|
126
128
|
|
|
127
129
|
declare module '@tiptap/core' {
|
|
128
130
|
interface Commands<ReturnType> {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
drawer: {
|
|
132
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
133
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
131
134
|
};
|
|
132
135
|
}
|
|
133
136
|
}
|
|
@@ -135,11 +138,8 @@ declare module '@tiptap/core' {
|
|
|
135
138
|
|
|
136
139
|
declare module '@tiptap/core' {
|
|
137
140
|
interface Commands<ReturnType> {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
name: string;
|
|
141
|
-
emoji: string;
|
|
142
|
-
}) => ReturnType;
|
|
141
|
+
excalidraw: {
|
|
142
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -198,19 +198,19 @@ declare module '@tiptap/core' {
|
|
|
198
198
|
|
|
199
199
|
declare module '@tiptap/core' {
|
|
200
200
|
interface Commands<ReturnType> {
|
|
201
|
-
|
|
201
|
+
imageGifUpload: {
|
|
202
202
|
/**
|
|
203
|
-
* Add an image
|
|
203
|
+
* Add an image gif
|
|
204
204
|
*/
|
|
205
|
-
|
|
205
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
206
206
|
/**
|
|
207
|
-
* Update an image
|
|
207
|
+
* Update an image gif
|
|
208
208
|
*/
|
|
209
|
-
|
|
209
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
210
210
|
/**
|
|
211
211
|
* Set image alignment
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -218,28 +218,19 @@ declare module '@tiptap/core' {
|
|
|
218
218
|
|
|
219
219
|
declare module '@tiptap/core' {
|
|
220
220
|
interface Commands<ReturnType> {
|
|
221
|
-
|
|
221
|
+
imageUpload: {
|
|
222
222
|
/**
|
|
223
|
-
* Add an image
|
|
223
|
+
* Add an image
|
|
224
224
|
*/
|
|
225
|
-
|
|
225
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
226
226
|
/**
|
|
227
|
-
* Update an image
|
|
227
|
+
* Update an image
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
230
230
|
/**
|
|
231
231
|
* Set image alignment
|
|
232
232
|
*/
|
|
233
|
-
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
declare module '@tiptap/core' {
|
|
240
|
-
interface Commands<ReturnType> {
|
|
241
|
-
katex: {
|
|
242
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
233
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
243
234
|
};
|
|
244
235
|
}
|
|
245
236
|
}
|
|
@@ -261,6 +252,15 @@ declare module '@tiptap/core' {
|
|
|
261
252
|
}
|
|
262
253
|
|
|
263
254
|
|
|
255
|
+
declare module '@tiptap/core' {
|
|
256
|
+
interface Commands<ReturnType> {
|
|
257
|
+
katex: {
|
|
258
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
264
|
declare module '@tiptap/core' {
|
|
265
265
|
interface Commands<ReturnType> {
|
|
266
266
|
lineHeight: {
|
package/lib/TaskList.d.ts
CHANGED
|
@@ -116,9 +116,11 @@ declare module '@tiptap/core' {
|
|
|
116
116
|
|
|
117
117
|
declare module '@tiptap/core' {
|
|
118
118
|
interface Commands<ReturnType> {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
emoji: {
|
|
120
|
+
setEmoji: (emoji: {
|
|
121
|
+
name: string;
|
|
122
|
+
emoji: string;
|
|
123
|
+
}) => ReturnType;
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -126,8 +128,9 @@ declare module '@tiptap/core' {
|
|
|
126
128
|
|
|
127
129
|
declare module '@tiptap/core' {
|
|
128
130
|
interface Commands<ReturnType> {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
drawer: {
|
|
132
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
133
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
131
134
|
};
|
|
132
135
|
}
|
|
133
136
|
}
|
|
@@ -135,11 +138,8 @@ declare module '@tiptap/core' {
|
|
|
135
138
|
|
|
136
139
|
declare module '@tiptap/core' {
|
|
137
140
|
interface Commands<ReturnType> {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
name: string;
|
|
141
|
-
emoji: string;
|
|
142
|
-
}) => ReturnType;
|
|
141
|
+
excalidraw: {
|
|
142
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -198,19 +198,19 @@ declare module '@tiptap/core' {
|
|
|
198
198
|
|
|
199
199
|
declare module '@tiptap/core' {
|
|
200
200
|
interface Commands<ReturnType> {
|
|
201
|
-
|
|
201
|
+
imageGifUpload: {
|
|
202
202
|
/**
|
|
203
|
-
* Add an image
|
|
203
|
+
* Add an image gif
|
|
204
204
|
*/
|
|
205
|
-
|
|
205
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
206
206
|
/**
|
|
207
|
-
* Update an image
|
|
207
|
+
* Update an image gif
|
|
208
208
|
*/
|
|
209
|
-
|
|
209
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
210
210
|
/**
|
|
211
211
|
* Set image alignment
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -218,28 +218,19 @@ declare module '@tiptap/core' {
|
|
|
218
218
|
|
|
219
219
|
declare module '@tiptap/core' {
|
|
220
220
|
interface Commands<ReturnType> {
|
|
221
|
-
|
|
221
|
+
imageUpload: {
|
|
222
222
|
/**
|
|
223
|
-
* Add an image
|
|
223
|
+
* Add an image
|
|
224
224
|
*/
|
|
225
|
-
|
|
225
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
226
226
|
/**
|
|
227
|
-
* Update an image
|
|
227
|
+
* Update an image
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
230
230
|
/**
|
|
231
231
|
* Set image alignment
|
|
232
232
|
*/
|
|
233
|
-
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
declare module '@tiptap/core' {
|
|
240
|
-
interface Commands<ReturnType> {
|
|
241
|
-
katex: {
|
|
242
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
233
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
243
234
|
};
|
|
244
235
|
}
|
|
245
236
|
}
|
|
@@ -261,6 +252,15 @@ declare module '@tiptap/core' {
|
|
|
261
252
|
}
|
|
262
253
|
|
|
263
254
|
|
|
255
|
+
declare module '@tiptap/core' {
|
|
256
|
+
interface Commands<ReturnType> {
|
|
257
|
+
katex: {
|
|
258
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
264
|
declare module '@tiptap/core' {
|
|
265
265
|
interface Commands<ReturnType> {
|
|
266
266
|
lineHeight: {
|
package/lib/TaskList.js
CHANGED
package/lib/TextAlign.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-ByRfqzMr.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-ByRfqzMr.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-B5WYnm7K.cjs"),j=y.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(l=>e.updateAttributes(l,{textAlign:t})).every(l=>l):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:l})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?l.unsetTextAlign():l.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function b(t){var l;const e=T.useMemo(()=>{var o;const i=(o=t==null?void 0:t.items)==null?void 0:o.find(a=>a.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return n.jsxs(s.Popover,{modal:!0,children:[n.jsx(s.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:n.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:n.jsx(s.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),n.jsx(s.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(l=t==null?void 0:t.items)==null?void 0:l.map((i,d)=>{var o,a;return n.jsxs(s.Tooltip,{children:[n.jsx(s.TooltipTrigger,{asChild:!0,children:n.jsx(s.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":e.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:e.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&n.jsx(s.IconComponent,{name:i.icon})})}),n.jsxs(s.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[n.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&n.jsx("span",{children:(a=i.shortcutKeys)==null?void 0:a.map(r=>s.getShortcutKey(r)).join(" ")})]})]},`text-align-${d}`)})})]})}const v=j.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:l,t:i}){var x;const d=((x=l.options)==null?void 0:x.alignments)||[],o={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},a={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},r=d.map(c=>{var g,h,f;return{title:i(`editor.textalign.${c}.tooltip`),icon:a[c],shortcutKeys:o[c],isActive:()=>e.isActive({textAlign:c})||!1,action:()=>{var u,A;return(A=(u=e.commands)==null?void 0:u.setTextAlign)==null?void 0:A.call(u,c)},disabled:!((f=(h=(g=e==null?void 0:e.can)==null?void 0:g.call(e))==null?void 0:h.setTextAlign)!=null&&f.call(h,c))}}),m=r.filter(c=>c.disabled).length===r.length;return{component:b,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:m,items:r}}}}}});exports.TextAlign=v;
|
package/lib/TextAlign.d.cts
CHANGED
|
@@ -120,9 +120,11 @@ declare module '@tiptap/core' {
|
|
|
120
120
|
|
|
121
121
|
declare module '@tiptap/core' {
|
|
122
122
|
interface Commands<ReturnType> {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
emoji: {
|
|
124
|
+
setEmoji: (emoji: {
|
|
125
|
+
name: string;
|
|
126
|
+
emoji: string;
|
|
127
|
+
}) => ReturnType;
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -130,8 +132,9 @@ declare module '@tiptap/core' {
|
|
|
130
132
|
|
|
131
133
|
declare module '@tiptap/core' {
|
|
132
134
|
interface Commands<ReturnType> {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
drawer: {
|
|
136
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
137
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
135
138
|
};
|
|
136
139
|
}
|
|
137
140
|
}
|
|
@@ -139,11 +142,8 @@ declare module '@tiptap/core' {
|
|
|
139
142
|
|
|
140
143
|
declare module '@tiptap/core' {
|
|
141
144
|
interface Commands<ReturnType> {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
name: string;
|
|
145
|
-
emoji: string;
|
|
146
|
-
}) => ReturnType;
|
|
145
|
+
excalidraw: {
|
|
146
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -202,19 +202,19 @@ declare module '@tiptap/core' {
|
|
|
202
202
|
|
|
203
203
|
declare module '@tiptap/core' {
|
|
204
204
|
interface Commands<ReturnType> {
|
|
205
|
-
|
|
205
|
+
imageGifUpload: {
|
|
206
206
|
/**
|
|
207
|
-
* Add an image
|
|
207
|
+
* Add an image gif
|
|
208
208
|
*/
|
|
209
|
-
|
|
209
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
210
210
|
/**
|
|
211
|
-
* Update an image
|
|
211
|
+
* Update an image gif
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
214
214
|
/**
|
|
215
215
|
* Set image alignment
|
|
216
216
|
*/
|
|
217
|
-
|
|
217
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -222,28 +222,19 @@ declare module '@tiptap/core' {
|
|
|
222
222
|
|
|
223
223
|
declare module '@tiptap/core' {
|
|
224
224
|
interface Commands<ReturnType> {
|
|
225
|
-
|
|
225
|
+
imageUpload: {
|
|
226
226
|
/**
|
|
227
|
-
* Add an image
|
|
227
|
+
* Add an image
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
230
230
|
/**
|
|
231
|
-
* Update an image
|
|
231
|
+
* Update an image
|
|
232
232
|
*/
|
|
233
|
-
|
|
233
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
234
234
|
/**
|
|
235
235
|
* Set image alignment
|
|
236
236
|
*/
|
|
237
|
-
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
declare module '@tiptap/core' {
|
|
244
|
-
interface Commands<ReturnType> {
|
|
245
|
-
katex: {
|
|
246
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
237
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
247
238
|
};
|
|
248
239
|
}
|
|
249
240
|
}
|
|
@@ -265,6 +256,15 @@ declare module '@tiptap/core' {
|
|
|
265
256
|
}
|
|
266
257
|
|
|
267
258
|
|
|
259
|
+
declare module '@tiptap/core' {
|
|
260
|
+
interface Commands<ReturnType> {
|
|
261
|
+
katex: {
|
|
262
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
268
|
declare module '@tiptap/core' {
|
|
269
269
|
interface Commands<ReturnType> {
|
|
270
270
|
lineHeight: {
|