reactjs-tiptap-editor 0.3.24 → 0.3.26
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-C9tPWcDX.cjs} +1 -1
- package/lib/{ActionMenuButton-BW1lNB_I.js → ActionMenuButton-DpFt8DwI.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +39 -30
- package/lib/Attachment.d.ts +39 -30
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +39 -30
- package/lib/Blockquote.d.ts +39 -30
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +39 -30
- package/lib/Bold.d.ts +39 -30
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +39 -30
- package/lib/BulletList.d.ts +39 -30
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +39 -30
- package/lib/Clear.d.ts +39 -30
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +39 -30
- package/lib/Code.d.ts +39 -30
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +39 -30
- package/lib/CodeBlock.d.ts +39 -30
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +39 -30
- package/lib/CodeView.d.ts +39 -30
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +39 -30
- package/lib/Color.d.ts +39 -30
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +39 -30
- package/lib/Document.d.ts +39 -30
- package/lib/{Drawer-B1rmIQfS.cjs → Drawer-BQLKKEOB.cjs} +1 -1
- package/lib/{Drawer-DEqRsjHw.js → Drawer-BouNhUKq.js} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +39 -30
- package/lib/Drawer.d.ts +39 -30
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +39 -30
- package/lib/Emoji.d.ts +39 -30
- package/lib/Emoji.js +1 -1
- package/lib/{Excalidraw-Qr5vHe9J.cjs → Excalidraw-DYbRbH0x.cjs} +1 -1
- package/lib/{Excalidraw-D2y-x-OZ.js → Excalidraw-u2P8Olgi.js} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +39 -30
- package/lib/Excalidraw.d.ts +39 -30
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +4 -4
- package/lib/ExportPdf.d.cts +40 -30
- package/lib/ExportPdf.d.ts +40 -30
- package/lib/ExportPdf.js +34 -27
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +39 -30
- package/lib/ExportWord.d.ts +39 -30
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +39 -30
- package/lib/FontFamily.d.ts +39 -30
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +39 -30
- package/lib/FontSize.d.ts +39 -30
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +39 -30
- package/lib/FormatPainter.d.ts +39 -30
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +39 -30
- package/lib/Heading.d.ts +39 -30
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +39 -30
- package/lib/Highlight.d.ts +39 -30
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +39 -30
- package/lib/History.d.ts +39 -30
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +39 -30
- package/lib/HorizontalRule.d.ts +39 -30
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +39 -30
- package/lib/Iframe.d.ts +39 -30
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +39 -30
- package/lib/Image.d.ts +39 -30
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +39 -30
- package/lib/ImageGif.d.ts +39 -30
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +39 -30
- package/lib/ImportWord.d.ts +39 -30
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +39 -30
- package/lib/Indent.d.ts +39 -30
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +39 -30
- package/lib/Italic.d.ts +39 -30
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +39 -30
- package/lib/Katex.d.ts +39 -30
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +39 -30
- package/lib/LineHeight.d.ts +39 -30
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +39 -30
- package/lib/Link.d.ts +39 -30
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +39 -30
- package/lib/ListItem.d.ts +39 -30
- package/lib/Mention.d.cts +39 -30
- package/lib/Mention.d.ts +39 -30
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +39 -30
- package/lib/Mermaid.d.ts +39 -30
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +39 -30
- package/lib/MoreMark.d.ts +39 -30
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +39 -30
- package/lib/MultiColumn.d.ts +39 -30
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +39 -30
- package/lib/OrderedList.d.ts +39 -30
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-CSA367l8.cjs → RichTextEditor-8GrfwaB4.cjs} +1 -1
- package/lib/{RichTextEditor-CrDGx-K7.js → RichTextEditor-VkzSL04E.js} +148 -109
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +39 -30
- package/lib/SearchAndReplace.d.ts +39 -30
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +39 -30
- package/lib/Selection.d.ts +39 -30
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -30
- package/lib/SlashCommand.d.ts +39 -30
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +39 -30
- package/lib/Strike.d.ts +39 -30
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +39 -30
- package/lib/SubAndSuperScript.d.ts +39 -30
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +39 -30
- package/lib/Table.d.ts +39 -30
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +39 -30
- package/lib/TableOfContent.d.ts +39 -30
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +39 -30
- package/lib/TaskList.d.ts +39 -30
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +39 -30
- package/lib/TextAlign.d.ts +39 -30
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +39 -30
- package/lib/TextBubble.d.ts +39 -30
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +39 -30
- package/lib/TextDirection.d.ts +39 -30
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +39 -30
- package/lib/TextUnderline.d.ts +39 -30
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +39 -30
- package/lib/TrailingNode.d.ts +39 -30
- package/lib/{Twitter-D-kqw1ZB.js → Twitter-DlKz1fXJ.js} +1 -1
- package/lib/{Twitter-BRF2Ehp3.cjs → Twitter-u_6ZejIn.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +39 -30
- package/lib/Twitter.d.ts +39 -30
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +39 -30
- package/lib/Video.d.ts +39 -30
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +39 -30
- package/lib/bubble-extra.d.ts +39 -30
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +39 -30
- package/lib/index.d.ts +39 -30
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +39 -30
- package/lib/locale-bundle.d.ts +39 -30
- package/lib/{textarea-06Uv95yx.js → textarea-BA9ETXT8.js} +1 -1
- package/lib/{textarea-QE8jlGEs.cjs → textarea-ESw2TM_u.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
|
}
|
|
@@ -60,11 +62,18 @@ declare module '@tiptap/core' {
|
|
|
60
62
|
|
|
61
63
|
declare module '@tiptap/core' {
|
|
62
64
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
drawer: {
|
|
66
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
67
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
declare module '@tiptap/core' {
|
|
74
|
+
interface Commands<ReturnType> {
|
|
75
|
+
exportPdf: {
|
|
76
|
+
exportToPdf: () => ReturnType;
|
|
68
77
|
};
|
|
69
78
|
}
|
|
70
79
|
}
|
|
@@ -161,15 +170,6 @@ declare module '@tiptap/core' {
|
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
katex: {
|
|
167
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
173
|
declare module '@tiptap/core' {
|
|
174
174
|
interface Commands<ReturnType> {
|
|
175
175
|
indent: {
|
|
@@ -186,6 +186,15 @@ declare module '@tiptap/core' {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
declare module '@tiptap/core' {
|
|
190
|
+
interface Commands<ReturnType> {
|
|
191
|
+
katex: {
|
|
192
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
189
198
|
declare module '@tiptap/core' {
|
|
190
199
|
interface Commands<ReturnType> {
|
|
191
200
|
lineHeight: {
|
|
@@ -247,14 +256,15 @@ declare module '@tiptap/core' {
|
|
|
247
256
|
|
|
248
257
|
declare module '@tiptap/core' {
|
|
249
258
|
interface Commands<ReturnType> {
|
|
250
|
-
|
|
259
|
+
video: {
|
|
251
260
|
/**
|
|
252
|
-
*
|
|
253
|
-
* @param options The tweet attributes
|
|
254
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
261
|
+
* Add an video
|
|
255
262
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
+
/**
|
|
265
|
+
* Update an video
|
|
266
|
+
*/
|
|
267
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
258
268
|
};
|
|
259
269
|
}
|
|
260
270
|
}
|
|
@@ -262,15 +272,14 @@ declare module '@tiptap/core' {
|
|
|
262
272
|
|
|
263
273
|
declare module '@tiptap/core' {
|
|
264
274
|
interface Commands<ReturnType> {
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Add an video
|
|
268
|
-
*/
|
|
269
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
twitter: {
|
|
270
276
|
/**
|
|
271
|
-
*
|
|
277
|
+
* Insert a tweet
|
|
278
|
+
* @param options The tweet attributes
|
|
279
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
280
|
*/
|
|
273
|
-
|
|
281
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
282
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
274
283
|
};
|
|
275
284
|
}
|
|
276
285
|
}
|
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
|
}
|
|
@@ -60,11 +62,18 @@ declare module '@tiptap/core' {
|
|
|
60
62
|
|
|
61
63
|
declare module '@tiptap/core' {
|
|
62
64
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
drawer: {
|
|
66
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
67
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
declare module '@tiptap/core' {
|
|
74
|
+
interface Commands<ReturnType> {
|
|
75
|
+
exportPdf: {
|
|
76
|
+
exportToPdf: () => ReturnType;
|
|
68
77
|
};
|
|
69
78
|
}
|
|
70
79
|
}
|
|
@@ -161,15 +170,6 @@ declare module '@tiptap/core' {
|
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
katex: {
|
|
167
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
173
|
declare module '@tiptap/core' {
|
|
174
174
|
interface Commands<ReturnType> {
|
|
175
175
|
indent: {
|
|
@@ -186,6 +186,15 @@ declare module '@tiptap/core' {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
declare module '@tiptap/core' {
|
|
190
|
+
interface Commands<ReturnType> {
|
|
191
|
+
katex: {
|
|
192
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
189
198
|
declare module '@tiptap/core' {
|
|
190
199
|
interface Commands<ReturnType> {
|
|
191
200
|
lineHeight: {
|
|
@@ -247,14 +256,15 @@ declare module '@tiptap/core' {
|
|
|
247
256
|
|
|
248
257
|
declare module '@tiptap/core' {
|
|
249
258
|
interface Commands<ReturnType> {
|
|
250
|
-
|
|
259
|
+
video: {
|
|
251
260
|
/**
|
|
252
|
-
*
|
|
253
|
-
* @param options The tweet attributes
|
|
254
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
261
|
+
* Add an video
|
|
255
262
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
+
/**
|
|
265
|
+
* Update an video
|
|
266
|
+
*/
|
|
267
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
258
268
|
};
|
|
259
269
|
}
|
|
260
270
|
}
|
|
@@ -262,15 +272,14 @@ declare module '@tiptap/core' {
|
|
|
262
272
|
|
|
263
273
|
declare module '@tiptap/core' {
|
|
264
274
|
interface Commands<ReturnType> {
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Add an video
|
|
268
|
-
*/
|
|
269
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
twitter: {
|
|
270
276
|
/**
|
|
271
|
-
*
|
|
277
|
+
* Insert a tweet
|
|
278
|
+
* @param options The tweet attributes
|
|
279
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
280
|
*/
|
|
273
|
-
|
|
281
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
282
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
274
283
|
};
|
|
275
284
|
}
|
|
276
285
|
}
|
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-VkzSL04E.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-8GrfwaB4.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
|
}
|
|
@@ -135,11 +137,18 @@ declare module '@tiptap/core' {
|
|
|
135
137
|
|
|
136
138
|
declare module '@tiptap/core' {
|
|
137
139
|
interface Commands<ReturnType> {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
drawer: {
|
|
141
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
142
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
declare module '@tiptap/core' {
|
|
149
|
+
interface Commands<ReturnType> {
|
|
150
|
+
exportPdf: {
|
|
151
|
+
exportToPdf: () => ReturnType;
|
|
143
152
|
};
|
|
144
153
|
}
|
|
145
154
|
}
|
|
@@ -236,15 +245,6 @@ declare module '@tiptap/core' {
|
|
|
236
245
|
}
|
|
237
246
|
|
|
238
247
|
|
|
239
|
-
declare module '@tiptap/core' {
|
|
240
|
-
interface Commands<ReturnType> {
|
|
241
|
-
katex: {
|
|
242
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
248
|
declare module '@tiptap/core' {
|
|
249
249
|
interface Commands<ReturnType> {
|
|
250
250
|
indent: {
|
|
@@ -261,6 +261,15 @@ declare module '@tiptap/core' {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
|
|
264
|
+
declare module '@tiptap/core' {
|
|
265
|
+
interface Commands<ReturnType> {
|
|
266
|
+
katex: {
|
|
267
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
|
|
264
273
|
declare module '@tiptap/core' {
|
|
265
274
|
interface Commands<ReturnType> {
|
|
266
275
|
lineHeight: {
|
|
@@ -322,14 +331,15 @@ declare module '@tiptap/core' {
|
|
|
322
331
|
|
|
323
332
|
declare module '@tiptap/core' {
|
|
324
333
|
interface Commands<ReturnType> {
|
|
325
|
-
|
|
334
|
+
video: {
|
|
326
335
|
/**
|
|
327
|
-
*
|
|
328
|
-
* @param options The tweet attributes
|
|
329
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
336
|
+
* Add an video
|
|
330
337
|
*/
|
|
331
|
-
|
|
332
|
-
|
|
338
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
/**
|
|
340
|
+
* Update an video
|
|
341
|
+
*/
|
|
342
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
333
343
|
};
|
|
334
344
|
}
|
|
335
345
|
}
|
|
@@ -337,15 +347,14 @@ declare module '@tiptap/core' {
|
|
|
337
347
|
|
|
338
348
|
declare module '@tiptap/core' {
|
|
339
349
|
interface Commands<ReturnType> {
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Add an video
|
|
343
|
-
*/
|
|
344
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
350
|
+
twitter: {
|
|
345
351
|
/**
|
|
346
|
-
*
|
|
352
|
+
* Insert a tweet
|
|
353
|
+
* @param options The tweet attributes
|
|
354
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
347
355
|
*/
|
|
348
|
-
|
|
356
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
357
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
349
358
|
};
|
|
350
359
|
}
|
|
351
360
|
}
|
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
|
}
|
|
@@ -135,11 +137,18 @@ declare module '@tiptap/core' {
|
|
|
135
137
|
|
|
136
138
|
declare module '@tiptap/core' {
|
|
137
139
|
interface Commands<ReturnType> {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
drawer: {
|
|
141
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
142
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
declare module '@tiptap/core' {
|
|
149
|
+
interface Commands<ReturnType> {
|
|
150
|
+
exportPdf: {
|
|
151
|
+
exportToPdf: () => ReturnType;
|
|
143
152
|
};
|
|
144
153
|
}
|
|
145
154
|
}
|
|
@@ -236,15 +245,6 @@ declare module '@tiptap/core' {
|
|
|
236
245
|
}
|
|
237
246
|
|
|
238
247
|
|
|
239
|
-
declare module '@tiptap/core' {
|
|
240
|
-
interface Commands<ReturnType> {
|
|
241
|
-
katex: {
|
|
242
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
248
|
declare module '@tiptap/core' {
|
|
249
249
|
interface Commands<ReturnType> {
|
|
250
250
|
indent: {
|
|
@@ -261,6 +261,15 @@ declare module '@tiptap/core' {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
|
|
264
|
+
declare module '@tiptap/core' {
|
|
265
|
+
interface Commands<ReturnType> {
|
|
266
|
+
katex: {
|
|
267
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
|
|
264
273
|
declare module '@tiptap/core' {
|
|
265
274
|
interface Commands<ReturnType> {
|
|
266
275
|
lineHeight: {
|
|
@@ -322,14 +331,15 @@ declare module '@tiptap/core' {
|
|
|
322
331
|
|
|
323
332
|
declare module '@tiptap/core' {
|
|
324
333
|
interface Commands<ReturnType> {
|
|
325
|
-
|
|
334
|
+
video: {
|
|
326
335
|
/**
|
|
327
|
-
*
|
|
328
|
-
* @param options The tweet attributes
|
|
329
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
336
|
+
* Add an video
|
|
330
337
|
*/
|
|
331
|
-
|
|
332
|
-
|
|
338
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
/**
|
|
340
|
+
* Update an video
|
|
341
|
+
*/
|
|
342
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
333
343
|
};
|
|
334
344
|
}
|
|
335
345
|
}
|
|
@@ -337,15 +347,14 @@ declare module '@tiptap/core' {
|
|
|
337
347
|
|
|
338
348
|
declare module '@tiptap/core' {
|
|
339
349
|
interface Commands<ReturnType> {
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Add an video
|
|
343
|
-
*/
|
|
344
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
350
|
+
twitter: {
|
|
345
351
|
/**
|
|
346
|
-
*
|
|
352
|
+
* Insert a tweet
|
|
353
|
+
* @param options The tweet attributes
|
|
354
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
347
355
|
*/
|
|
348
|
-
|
|
356
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
357
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
349
358
|
};
|
|
350
359
|
}
|
|
351
360
|
}
|
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-8GrfwaB4.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
|
}
|
|
@@ -139,11 +141,18 @@ declare module '@tiptap/core' {
|
|
|
139
141
|
|
|
140
142
|
declare module '@tiptap/core' {
|
|
141
143
|
interface Commands<ReturnType> {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
drawer: {
|
|
145
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
146
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
declare module '@tiptap/core' {
|
|
153
|
+
interface Commands<ReturnType> {
|
|
154
|
+
exportPdf: {
|
|
155
|
+
exportToPdf: () => ReturnType;
|
|
147
156
|
};
|
|
148
157
|
}
|
|
149
158
|
}
|
|
@@ -240,15 +249,6 @@ declare module '@tiptap/core' {
|
|
|
240
249
|
}
|
|
241
250
|
|
|
242
251
|
|
|
243
|
-
declare module '@tiptap/core' {
|
|
244
|
-
interface Commands<ReturnType> {
|
|
245
|
-
katex: {
|
|
246
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
252
252
|
declare module '@tiptap/core' {
|
|
253
253
|
interface Commands<ReturnType> {
|
|
254
254
|
indent: {
|
|
@@ -265,6 +265,15 @@ declare module '@tiptap/core' {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
|
|
268
|
+
declare module '@tiptap/core' {
|
|
269
|
+
interface Commands<ReturnType> {
|
|
270
|
+
katex: {
|
|
271
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
|
|
268
277
|
declare module '@tiptap/core' {
|
|
269
278
|
interface Commands<ReturnType> {
|
|
270
279
|
lineHeight: {
|
|
@@ -326,14 +335,15 @@ declare module '@tiptap/core' {
|
|
|
326
335
|
|
|
327
336
|
declare module '@tiptap/core' {
|
|
328
337
|
interface Commands<ReturnType> {
|
|
329
|
-
|
|
338
|
+
video: {
|
|
330
339
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param options The tweet attributes
|
|
333
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
340
|
+
* Add an video
|
|
334
341
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
342
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
|
+
/**
|
|
344
|
+
* Update an video
|
|
345
|
+
*/
|
|
346
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
337
347
|
};
|
|
338
348
|
}
|
|
339
349
|
}
|
|
@@ -341,15 +351,14 @@ declare module '@tiptap/core' {
|
|
|
341
351
|
|
|
342
352
|
declare module '@tiptap/core' {
|
|
343
353
|
interface Commands<ReturnType> {
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Add an video
|
|
347
|
-
*/
|
|
348
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
354
|
+
twitter: {
|
|
349
355
|
/**
|
|
350
|
-
*
|
|
356
|
+
* Insert a tweet
|
|
357
|
+
* @param options The tweet attributes
|
|
358
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
351
359
|
*/
|
|
352
|
-
|
|
360
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
361
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
353
362
|
};
|
|
354
363
|
}
|
|
355
364
|
}
|