reactjs-tiptap-editor 0.3.21 → 0.3.22
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-BTFBZyG2.cjs → ActionMenuButton-B81uYOvt.cjs} +1 -1
- package/lib/{ActionMenuButton-DXwnYZhJ.js → ActionMenuButton-CtcDNq-L.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +41 -41
- package/lib/Attachment.d.ts +41 -41
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +41 -41
- package/lib/Blockquote.d.ts +41 -41
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +41 -41
- package/lib/Bold.d.ts +41 -41
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +41 -41
- package/lib/BulletList.d.ts +41 -41
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +41 -41
- package/lib/Clear.d.ts +41 -41
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +41 -41
- package/lib/Code.d.ts +41 -41
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +41 -41
- package/lib/CodeBlock.d.ts +41 -41
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +41 -41
- package/lib/CodeView.d.ts +41 -41
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +41 -41
- package/lib/Color.d.ts +41 -41
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +41 -41
- package/lib/Document.d.ts +41 -41
- package/lib/{Drawer-CVuwyG50.js → Drawer-BI_9XSqI.js} +1 -1
- package/lib/{Drawer-BrHHs2E9.cjs → Drawer-CHGZ5D6j.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +41 -41
- package/lib/Drawer.d.ts +41 -41
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +41 -41
- package/lib/Emoji.d.ts +41 -41
- package/lib/Emoji.js +116 -109
- package/lib/{Excalidraw-frMX4K62.js → Excalidraw-AIzEaOzF.js} +1 -1
- package/lib/{Excalidraw-Be_GDV4Q.cjs → Excalidraw-DOJiMnFl.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +41 -41
- package/lib/Excalidraw.d.ts +41 -41
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +41 -41
- package/lib/ExportPdf.d.ts +41 -41
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +41 -41
- package/lib/ExportWord.d.ts +41 -41
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +41 -41
- package/lib/FontFamily.d.ts +41 -41
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +41 -41
- package/lib/FontSize.d.ts +41 -41
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +41 -41
- package/lib/FormatPainter.d.ts +41 -41
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +41 -41
- package/lib/Heading.d.ts +41 -41
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +41 -41
- package/lib/Highlight.d.ts +41 -41
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +41 -41
- package/lib/History.d.ts +41 -41
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +41 -41
- package/lib/HorizontalRule.d.ts +41 -41
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +41 -41
- package/lib/Iframe.d.ts +41 -41
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +41 -41
- package/lib/Image.d.ts +41 -41
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +41 -41
- package/lib/ImageGif.d.ts +41 -41
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +41 -41
- package/lib/ImportWord.d.ts +41 -41
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +41 -41
- package/lib/Indent.d.ts +41 -41
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +41 -41
- package/lib/Italic.d.ts +41 -41
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +41 -41
- package/lib/Katex.d.ts +41 -41
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +41 -41
- package/lib/LineHeight.d.ts +41 -41
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +41 -41
- package/lib/Link.d.ts +41 -41
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +41 -41
- package/lib/ListItem.d.ts +41 -41
- package/lib/Mention.d.cts +41 -41
- package/lib/Mention.d.ts +41 -41
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +41 -41
- package/lib/Mermaid.d.ts +41 -41
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +41 -41
- package/lib/MoreMark.d.ts +41 -41
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +41 -41
- package/lib/MultiColumn.d.ts +41 -41
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +41 -41
- package/lib/OrderedList.d.ts +41 -41
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-DjTnd5Uu.js → RichTextEditor-CtxIf8pq.js} +5 -2
- package/lib/{RichTextEditor-CAxwVWUE.cjs → RichTextEditor-DtxJlApT.cjs} +5 -2
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +41 -41
- package/lib/SearchAndReplace.d.ts +41 -41
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +41 -41
- package/lib/Selection.d.ts +41 -41
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +41 -41
- package/lib/SlashCommand.d.ts +41 -41
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +41 -41
- package/lib/Strike.d.ts +41 -41
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +41 -41
- package/lib/SubAndSuperScript.d.ts +41 -41
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +41 -41
- package/lib/Table.d.ts +41 -41
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +41 -41
- package/lib/TableOfContent.d.ts +41 -41
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +41 -41
- package/lib/TaskList.d.ts +41 -41
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +41 -41
- package/lib/TextAlign.d.ts +41 -41
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +41 -41
- package/lib/TextBubble.d.ts +41 -41
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +41 -41
- package/lib/TextDirection.d.ts +41 -41
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +41 -41
- package/lib/TextUnderline.d.ts +41 -41
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +41 -41
- package/lib/TrailingNode.d.ts +41 -41
- package/lib/{Twitter-dRxbZOad.js → Twitter-CJIud-WM.js} +1 -1
- package/lib/{Twitter-V0OzBT_E.cjs → Twitter-DBA28WG3.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +41 -41
- package/lib/Twitter.d.ts +41 -41
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +41 -41
- package/lib/Video.d.ts +41 -41
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +41 -41
- package/lib/bubble-extra.d.ts +41 -41
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +41 -41
- package/lib/index.d.ts +41 -41
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +41 -41
- package/lib/locale-bundle.d.ts +41 -41
- package/lib/style.css +1 -1
- package/lib/{textarea-BsJTSgT-.cjs → textarea-9iN67tad.cjs} +1 -1
- package/lib/{textarea-6c8drwXJ.js → textarea-BhTw-eGz.js} +1 -1
- package/package.json +2 -2
package/lib/Selection.d.cts
CHANGED
|
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
|
|
|
39
39
|
|
|
40
40
|
declare module '@tiptap/core' {
|
|
41
41
|
interface Commands<ReturnType> {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
emoji: string;
|
|
46
|
-
}) => ReturnType;
|
|
42
|
+
drawer: {
|
|
43
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
44
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -51,9 +49,11 @@ declare module '@tiptap/core' {
|
|
|
51
49
|
|
|
52
50
|
declare module '@tiptap/core' {
|
|
53
51
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
emoji: {
|
|
53
|
+
setEmoji: (emoji: {
|
|
54
|
+
name: string;
|
|
55
|
+
emoji: string;
|
|
56
|
+
}) => ReturnType;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -104,6 +104,21 @@ declare module '@tiptap/core' {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
declare module '@tiptap/core' {
|
|
108
|
+
interface Commands<ReturnType> {
|
|
109
|
+
iframe: {
|
|
110
|
+
/**
|
|
111
|
+
* Add an iframe
|
|
112
|
+
*/
|
|
113
|
+
setIframe: (options: {
|
|
114
|
+
src: string;
|
|
115
|
+
service: string;
|
|
116
|
+
}) => ReturnType;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
107
122
|
declare module '@tiptap/core' {
|
|
108
123
|
interface Commands<ReturnType> {
|
|
109
124
|
imageUpload: {
|
|
@@ -124,21 +139,6 @@ declare module '@tiptap/core' {
|
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
|
|
127
|
-
declare module '@tiptap/core' {
|
|
128
|
-
interface Commands<ReturnType> {
|
|
129
|
-
iframe: {
|
|
130
|
-
/**
|
|
131
|
-
* Add an iframe
|
|
132
|
-
*/
|
|
133
|
-
setIframe: (options: {
|
|
134
|
-
src: string;
|
|
135
|
-
service: string;
|
|
136
|
-
}) => ReturnType;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
142
|
declare module '@tiptap/core' {
|
|
143
143
|
interface Commands<ReturnType> {
|
|
144
144
|
imageGifUpload: {
|
|
@@ -177,9 +177,8 @@ declare module '@tiptap/core' {
|
|
|
177
177
|
|
|
178
178
|
declare module '@tiptap/core' {
|
|
179
179
|
interface Commands<ReturnType> {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
unsetLineHeight: () => ReturnType;
|
|
180
|
+
katex: {
|
|
181
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
183
182
|
};
|
|
184
183
|
}
|
|
185
184
|
}
|
|
@@ -187,8 +186,9 @@ declare module '@tiptap/core' {
|
|
|
187
186
|
|
|
188
187
|
declare module '@tiptap/core' {
|
|
189
188
|
interface Commands<ReturnType> {
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
lineHeight: {
|
|
190
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
191
|
+
unsetLineHeight: () => ReturnType;
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -245,14 +245,15 @@ declare module '@tiptap/core' {
|
|
|
245
245
|
|
|
246
246
|
declare module '@tiptap/core' {
|
|
247
247
|
interface Commands<ReturnType> {
|
|
248
|
-
|
|
248
|
+
video: {
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @param options The tweet attributes
|
|
252
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
250
|
+
* Add an video
|
|
253
251
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
253
|
+
/**
|
|
254
|
+
* Update an video
|
|
255
|
+
*/
|
|
256
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
259
|
}
|
|
@@ -260,15 +261,14 @@ declare module '@tiptap/core' {
|
|
|
260
261
|
|
|
261
262
|
declare module '@tiptap/core' {
|
|
262
263
|
interface Commands<ReturnType> {
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Add an video
|
|
266
|
-
*/
|
|
267
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
+
twitter: {
|
|
268
265
|
/**
|
|
269
|
-
*
|
|
266
|
+
* Insert a tweet
|
|
267
|
+
* @param options The tweet attributes
|
|
268
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
270
269
|
*/
|
|
271
|
-
|
|
270
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
271
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
}
|
package/lib/Selection.d.ts
CHANGED
|
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
|
|
|
39
39
|
|
|
40
40
|
declare module '@tiptap/core' {
|
|
41
41
|
interface Commands<ReturnType> {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
emoji: string;
|
|
46
|
-
}) => ReturnType;
|
|
42
|
+
drawer: {
|
|
43
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
44
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -51,9 +49,11 @@ declare module '@tiptap/core' {
|
|
|
51
49
|
|
|
52
50
|
declare module '@tiptap/core' {
|
|
53
51
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
emoji: {
|
|
53
|
+
setEmoji: (emoji: {
|
|
54
|
+
name: string;
|
|
55
|
+
emoji: string;
|
|
56
|
+
}) => ReturnType;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -104,6 +104,21 @@ declare module '@tiptap/core' {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
declare module '@tiptap/core' {
|
|
108
|
+
interface Commands<ReturnType> {
|
|
109
|
+
iframe: {
|
|
110
|
+
/**
|
|
111
|
+
* Add an iframe
|
|
112
|
+
*/
|
|
113
|
+
setIframe: (options: {
|
|
114
|
+
src: string;
|
|
115
|
+
service: string;
|
|
116
|
+
}) => ReturnType;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
107
122
|
declare module '@tiptap/core' {
|
|
108
123
|
interface Commands<ReturnType> {
|
|
109
124
|
imageUpload: {
|
|
@@ -124,21 +139,6 @@ declare module '@tiptap/core' {
|
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
|
|
127
|
-
declare module '@tiptap/core' {
|
|
128
|
-
interface Commands<ReturnType> {
|
|
129
|
-
iframe: {
|
|
130
|
-
/**
|
|
131
|
-
* Add an iframe
|
|
132
|
-
*/
|
|
133
|
-
setIframe: (options: {
|
|
134
|
-
src: string;
|
|
135
|
-
service: string;
|
|
136
|
-
}) => ReturnType;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
142
|
declare module '@tiptap/core' {
|
|
143
143
|
interface Commands<ReturnType> {
|
|
144
144
|
imageGifUpload: {
|
|
@@ -177,9 +177,8 @@ declare module '@tiptap/core' {
|
|
|
177
177
|
|
|
178
178
|
declare module '@tiptap/core' {
|
|
179
179
|
interface Commands<ReturnType> {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
unsetLineHeight: () => ReturnType;
|
|
180
|
+
katex: {
|
|
181
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
183
182
|
};
|
|
184
183
|
}
|
|
185
184
|
}
|
|
@@ -187,8 +186,9 @@ declare module '@tiptap/core' {
|
|
|
187
186
|
|
|
188
187
|
declare module '@tiptap/core' {
|
|
189
188
|
interface Commands<ReturnType> {
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
lineHeight: {
|
|
190
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
191
|
+
unsetLineHeight: () => ReturnType;
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -245,14 +245,15 @@ declare module '@tiptap/core' {
|
|
|
245
245
|
|
|
246
246
|
declare module '@tiptap/core' {
|
|
247
247
|
interface Commands<ReturnType> {
|
|
248
|
-
|
|
248
|
+
video: {
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @param options The tweet attributes
|
|
252
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
250
|
+
* Add an video
|
|
253
251
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
253
|
+
/**
|
|
254
|
+
* Update an video
|
|
255
|
+
*/
|
|
256
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
259
|
}
|
|
@@ -260,15 +261,14 @@ declare module '@tiptap/core' {
|
|
|
260
261
|
|
|
261
262
|
declare module '@tiptap/core' {
|
|
262
263
|
interface Commands<ReturnType> {
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Add an video
|
|
266
|
-
*/
|
|
267
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
+
twitter: {
|
|
268
265
|
/**
|
|
269
|
-
*
|
|
266
|
+
* Insert a tweet
|
|
267
|
+
* @param options The tweet attributes
|
|
268
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
270
269
|
*/
|
|
271
|
-
|
|
270
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
271
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
}
|
package/lib/SlashCommand.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("./index-ByRfqzMr.cjs"),O=require("./dom-dataset-Byuf1YmW.cjs"),q=require("./index-BI-IcZcN.cjs"),D=require("tippy.js"),f=require("react/jsx-runtime"),x=require("react"),b=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("./index-ByRfqzMr.cjs"),O=require("./dom-dataset-Byuf1YmW.cjs"),q=require("./index-BI-IcZcN.cjs"),D=require("tippy.js"),f=require("react/jsx-runtime"),x=require("react"),b=require("./RichTextEditor-DtxJlApT.cjs"),h=require("./index-C19MB4Al.cjs");function P(i,d){var k,N;const[t,n]=x.useState(0),[e,o]=x.useState(0),r=x.useRef(null),{t:s}=h.useLocale(),u=x.useRef([]);x.useImperativeHandle(d,()=>({onKeyDown:g})),x.useEffect(()=>{if(!r.current)return;const l=e*1e3+t,c=u.current[l];c&&c.scrollIntoView({behavior:"smooth",block:"nearest"})},[t,e]);function g({event:l}){return l.key==="ArrowUp"?(C(),!0):l.key==="ArrowDown"?(R(),!0):l.key==="Enter"?(L(),!0):!1}function C(){var m;if(i.items.length===0)return!1;let l=t-1,c=e;l<0&&(c=e-1,l=((m=i.items[c])==null?void 0:m.commands.length)-1||0),c<0&&(c=i.items.length-1,l=i.items[c].commands.length-1),n(l),o(c)}function R(){if(i.items.length===0)return!1;const l=i.items[e].commands;let c=t+1,m=e;l.length-1<c&&(c=0,m=e+1),i.items.length-1<m&&(m=0),n(c),o(m)}function L(){if(i.items.length===0||e===-1||t===-1)return!1;v(e,t)}function v(l,c){const m=i.items[l].commands[c];i.command(m)}function H(l,c){v(l,c)}function I(l,c,m){u.current[l*1e3+c]=m}return f.jsx("div",{className:"richtext-mb-8 richtext-max-h-[min(80vh,24rem)] richtext-flex-wrap richtext-overflow-auto richtext-rounded-lg !richtext-border !richtext-border-neutral-200 !richtext-bg-white richtext-p-1 !richtext-text-black richtext-shadow-sm dark:!richtext-border-neutral-800 dark:!richtext-bg-black",ref:r,children:(k=i==null?void 0:i.items)!=null&&k.length?f.jsx("div",{className:"richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5",children:(N=i==null?void 0:i.items)==null?void 0:N.map((l,c)=>f.jsxs(x.Fragment,{children:[f.jsx("div",{className:"richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-select-none richtext-text-[0.65rem] richtext-font-semibold richtext-uppercase richtext-tracking-wider !richtext-text-neutral-500 first:richtext-mt-0.5",children:l.title}),l.commands.map((m,y)=>f.jsxs("button",{onClick:()=>H(c,y),ref:S=>I(c,y,S),className:b.cn("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ",{"slash-command-active":e===c&&t===y}),children:[m.iconUrl&&f.jsx("img",{alt:"",className:"richtext-size-6",src:m.iconUrl}),m.iconName&&f.jsx(b.IconComponent,{className:"!richtext-mr-1 !richtext-text-lg",name:m.iconName}),m.label]},`command-${y}`))]},`slash-${l.title}`))}):f.jsx("div",{className:"richtext-p-3",children:f.jsx("span",{className:"richtext-text-xs richtext-text-gray-800 dark:richtext-text-gray-100",children:s("editor.slash.empty")})})})}const $=x.forwardRef(P),j={setOpen:(i,d)=>{b.dispatchEvent(b.EVENTS.UPLOAD_VIDEO(i),d)}};function B(i,d){const t=[{name:"format",title:h.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:h.localeActions.t("editor.slash.insert"),commands:[]}];return i.forEach(n=>{n.name.toLowerCase()==="heading"&&n.options.levels.forEach(e=>{t[0].commands.push({name:`heading${e}`,label:h.localeActions.t(`editor.heading.h${e}.tooltip`),aliases:[`h${e}`,"bt",`bt${e}`],iconName:`Heading${e}`,action:({editor:o,range:r})=>{o.chain().focus().deleteRange(r).setHeading({level:e}).run()}})}),n.name.toLowerCase()==="bulletlist"&&t[0].commands.push({name:"bulletList",label:h.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}}),n.name.toLowerCase()==="orderedlist"&&t[0].commands.push({name:"numberedList",label:h.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}}),n.name.toLowerCase()==="tasklist"&&t[0].commands.push({name:"taskList",label:h.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleTaskList().run()}}),n.name.toLowerCase()==="blockquote"&&t[0].commands.push({name:"blockquote",label:h.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setBlockquote().run()}}),n.name.toLowerCase()==="codeblock"&&t[0].commands.push({name:"codeBlock",label:h.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setCodeBlock().run()}}),n.name.toLowerCase()===b.Image$1.name&&t[1].commands.push({name:"image",label:h.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),b.actionDialogImage.setOpen(e.id,!0)}}),n.name.toLowerCase()===b.Video.name&&t[1].commands.push({name:"video",label:h.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),j.setOpen(e.id,!0)}}),n.name.toLowerCase()==="table"&&t[1].commands.push({name:"table",label:h.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),n.name.toLowerCase()==="horizontalrule"&&t[1].commands.push({name:"horizontalRule",label:h.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHorizontalRule().run()}}),n.name.toLowerCase()==="columns"&&t[1].commands.push({name:"columns",label:h.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:e})=>{e.chain().focus().insertColumns({cols:2}).run()}}),d==null||d(n,t)}),t}const w="slashCommand";let a;const E=A.Extension.create({name:w,priority:200,onCreate(){a=D("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[q.Suggestion({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new A.PluginKey(w),allow:({state:i,range:d})=>{var g,C,R;const t=i.doc.resolve(d.from),n=t.depth===1,e=t.parent.type.name==="paragraph",o=((g=t.parent.textContent)==null?void 0:g.charAt(0))==="/",r=this.editor.isActive("column"),s=(R=t.parent.textContent)==null?void 0:R.slice(Math.max(0,(C=t.parent.textContent)==null?void 0:C.indexOf("/"))),u=!(s!=null&&s.endsWith(" "));return(n&&e&&o||r&&e&&o)&&u},command:({editor:i,range:d,props:t})=>{const{view:n}=i;t.action({editor:i,range:d}),n.focus()},items:({query:i,editor:d})=>B(d.extensionManager.extensions,this.options.renderGroupItem).map(r=>({...r,commands:r.commands.filter(s=>{const u=s.label.toLowerCase().trim(),g=i.toLowerCase().trim();if(s.aliases){const C=s.aliases.map(v=>v.toLowerCase().trim()),R=u.match(g),L=C.some(v=>v.match(g));return R||L}return u.match(g)}).filter(s=>s.shouldBeHidden?!s.shouldBeHidden(this.editor):!0)})).filter(r=>r.commands.length>0).map(r=>({...r,commands:r.commands.map(s=>({...s,isEnabled:!0}))})),render:()=>{let i,d=null;return{onStart:t=>{var o;i=new O.ReactRenderer($,{props:t,editor:t.editor});const{view:n}=t.editor,e=()=>{if(!t.clientRect)return t.editor.storage[w].rect;const r=t.clientRect();if(!r)return t.editor.storage[w].rect;let s=r.y;if(r.top+i.element.offsetHeight+40>window.innerHeight){const u=r.top+i.element.offsetHeight-window.innerHeight+40;s=r.y-u}return new DOMRect(r.x,s,r.width,r.height)};d=()=>{a==null||a[0].setProps({getReferenceClientRect:e})},(o=n.dom.parentElement)==null||o.addEventListener("scroll",d),a==null||a[0].setProps({getReferenceClientRect:e,appendTo:()=>document.body,content:i.element}),a==null||a[0].show()},onUpdate(t){var r;i.updateProps(t);const{view:n}=t.editor,e=()=>{if(!t.clientRect)return t.editor.storage[w].rect;const s=t.clientRect();return s?new DOMRect(s.x,s.y,s.width,s.height):t.editor.storage[w].rect},o=()=>{a==null||a[0].setProps({getReferenceClientRect:e})};(r=n.dom.parentElement)==null||r.addEventListener("scroll",o),t.editor.storage[w].rect=t.clientRect?e():{width:0,height:0,left:0,top:0,right:0,bottom:0},a==null||a[0].setProps({getReferenceClientRect:e})},onKeyDown(t){var n;return t.event.key==="Escape"?(a==null||a[0].hide(),!0):(a!=null&&a[0].state.isShown||a==null||a[0].show(),(n=i.ref)==null?void 0:n.onKeyDown(t))},onExit(t){var n;if(a==null||a[0].hide(),d){const{view:e}=t.editor;(n=e.dom.parentElement)==null||n.removeEventListener("scroll",d)}i.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}});exports.SlashCommand=E;exports.default=E;
|
package/lib/SlashCommand.d.cts
CHANGED
|
@@ -66,11 +66,9 @@ declare module '@tiptap/core' {
|
|
|
66
66
|
|
|
67
67
|
declare module '@tiptap/core' {
|
|
68
68
|
interface Commands<ReturnType> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
emoji: string;
|
|
73
|
-
}) => ReturnType;
|
|
69
|
+
drawer: {
|
|
70
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
74
72
|
};
|
|
75
73
|
}
|
|
76
74
|
}
|
|
@@ -78,9 +76,11 @@ declare module '@tiptap/core' {
|
|
|
78
76
|
|
|
79
77
|
declare module '@tiptap/core' {
|
|
80
78
|
interface Commands<ReturnType> {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
emoji: {
|
|
80
|
+
setEmoji: (emoji: {
|
|
81
|
+
name: string;
|
|
82
|
+
emoji: string;
|
|
83
|
+
}) => ReturnType;
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -131,6 +131,21 @@ declare module '@tiptap/core' {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
|
|
134
|
+
declare module '@tiptap/core' {
|
|
135
|
+
interface Commands<ReturnType> {
|
|
136
|
+
iframe: {
|
|
137
|
+
/**
|
|
138
|
+
* Add an iframe
|
|
139
|
+
*/
|
|
140
|
+
setIframe: (options: {
|
|
141
|
+
src: string;
|
|
142
|
+
service: string;
|
|
143
|
+
}) => ReturnType;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
134
149
|
declare module '@tiptap/core' {
|
|
135
150
|
interface Commands<ReturnType> {
|
|
136
151
|
imageUpload: {
|
|
@@ -151,21 +166,6 @@ declare module '@tiptap/core' {
|
|
|
151
166
|
}
|
|
152
167
|
|
|
153
168
|
|
|
154
|
-
declare module '@tiptap/core' {
|
|
155
|
-
interface Commands<ReturnType> {
|
|
156
|
-
iframe: {
|
|
157
|
-
/**
|
|
158
|
-
* Add an iframe
|
|
159
|
-
*/
|
|
160
|
-
setIframe: (options: {
|
|
161
|
-
src: string;
|
|
162
|
-
service: string;
|
|
163
|
-
}) => ReturnType;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
169
|
declare module '@tiptap/core' {
|
|
170
170
|
interface Commands<ReturnType> {
|
|
171
171
|
imageGifUpload: {
|
|
@@ -204,9 +204,8 @@ declare module '@tiptap/core' {
|
|
|
204
204
|
|
|
205
205
|
declare module '@tiptap/core' {
|
|
206
206
|
interface Commands<ReturnType> {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
unsetLineHeight: () => ReturnType;
|
|
207
|
+
katex: {
|
|
208
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
210
209
|
};
|
|
211
210
|
}
|
|
212
211
|
}
|
|
@@ -214,8 +213,9 @@ declare module '@tiptap/core' {
|
|
|
214
213
|
|
|
215
214
|
declare module '@tiptap/core' {
|
|
216
215
|
interface Commands<ReturnType> {
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
lineHeight: {
|
|
217
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
218
|
+
unsetLineHeight: () => ReturnType;
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -272,14 +272,15 @@ declare module '@tiptap/core' {
|
|
|
272
272
|
|
|
273
273
|
declare module '@tiptap/core' {
|
|
274
274
|
interface Commands<ReturnType> {
|
|
275
|
-
|
|
275
|
+
video: {
|
|
276
276
|
/**
|
|
277
|
-
*
|
|
278
|
-
* @param options The tweet attributes
|
|
279
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
277
|
+
* Add an video
|
|
280
278
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
280
|
+
/**
|
|
281
|
+
* Update an video
|
|
282
|
+
*/
|
|
283
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
283
284
|
};
|
|
284
285
|
}
|
|
285
286
|
}
|
|
@@ -287,15 +288,14 @@ declare module '@tiptap/core' {
|
|
|
287
288
|
|
|
288
289
|
declare module '@tiptap/core' {
|
|
289
290
|
interface Commands<ReturnType> {
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Add an video
|
|
293
|
-
*/
|
|
294
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
291
|
+
twitter: {
|
|
295
292
|
/**
|
|
296
|
-
*
|
|
293
|
+
* Insert a tweet
|
|
294
|
+
* @param options The tweet attributes
|
|
295
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
297
296
|
*/
|
|
298
|
-
|
|
297
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
298
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
}
|
package/lib/SlashCommand.d.ts
CHANGED
|
@@ -66,11 +66,9 @@ declare module '@tiptap/core' {
|
|
|
66
66
|
|
|
67
67
|
declare module '@tiptap/core' {
|
|
68
68
|
interface Commands<ReturnType> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
emoji: string;
|
|
73
|
-
}) => ReturnType;
|
|
69
|
+
drawer: {
|
|
70
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
74
72
|
};
|
|
75
73
|
}
|
|
76
74
|
}
|
|
@@ -78,9 +76,11 @@ declare module '@tiptap/core' {
|
|
|
78
76
|
|
|
79
77
|
declare module '@tiptap/core' {
|
|
80
78
|
interface Commands<ReturnType> {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
emoji: {
|
|
80
|
+
setEmoji: (emoji: {
|
|
81
|
+
name: string;
|
|
82
|
+
emoji: string;
|
|
83
|
+
}) => ReturnType;
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -131,6 +131,21 @@ declare module '@tiptap/core' {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
|
|
134
|
+
declare module '@tiptap/core' {
|
|
135
|
+
interface Commands<ReturnType> {
|
|
136
|
+
iframe: {
|
|
137
|
+
/**
|
|
138
|
+
* Add an iframe
|
|
139
|
+
*/
|
|
140
|
+
setIframe: (options: {
|
|
141
|
+
src: string;
|
|
142
|
+
service: string;
|
|
143
|
+
}) => ReturnType;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
134
149
|
declare module '@tiptap/core' {
|
|
135
150
|
interface Commands<ReturnType> {
|
|
136
151
|
imageUpload: {
|
|
@@ -151,21 +166,6 @@ declare module '@tiptap/core' {
|
|
|
151
166
|
}
|
|
152
167
|
|
|
153
168
|
|
|
154
|
-
declare module '@tiptap/core' {
|
|
155
|
-
interface Commands<ReturnType> {
|
|
156
|
-
iframe: {
|
|
157
|
-
/**
|
|
158
|
-
* Add an iframe
|
|
159
|
-
*/
|
|
160
|
-
setIframe: (options: {
|
|
161
|
-
src: string;
|
|
162
|
-
service: string;
|
|
163
|
-
}) => ReturnType;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
169
|
declare module '@tiptap/core' {
|
|
170
170
|
interface Commands<ReturnType> {
|
|
171
171
|
imageGifUpload: {
|
|
@@ -204,9 +204,8 @@ declare module '@tiptap/core' {
|
|
|
204
204
|
|
|
205
205
|
declare module '@tiptap/core' {
|
|
206
206
|
interface Commands<ReturnType> {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
unsetLineHeight: () => ReturnType;
|
|
207
|
+
katex: {
|
|
208
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
210
209
|
};
|
|
211
210
|
}
|
|
212
211
|
}
|
|
@@ -214,8 +213,9 @@ declare module '@tiptap/core' {
|
|
|
214
213
|
|
|
215
214
|
declare module '@tiptap/core' {
|
|
216
215
|
interface Commands<ReturnType> {
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
lineHeight: {
|
|
217
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
218
|
+
unsetLineHeight: () => ReturnType;
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -272,14 +272,15 @@ declare module '@tiptap/core' {
|
|
|
272
272
|
|
|
273
273
|
declare module '@tiptap/core' {
|
|
274
274
|
interface Commands<ReturnType> {
|
|
275
|
-
|
|
275
|
+
video: {
|
|
276
276
|
/**
|
|
277
|
-
*
|
|
278
|
-
* @param options The tweet attributes
|
|
279
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
277
|
+
* Add an video
|
|
280
278
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
280
|
+
/**
|
|
281
|
+
* Update an video
|
|
282
|
+
*/
|
|
283
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
283
284
|
};
|
|
284
285
|
}
|
|
285
286
|
}
|
|
@@ -287,15 +288,14 @@ declare module '@tiptap/core' {
|
|
|
287
288
|
|
|
288
289
|
declare module '@tiptap/core' {
|
|
289
290
|
interface Commands<ReturnType> {
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Add an video
|
|
293
|
-
*/
|
|
294
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
291
|
+
twitter: {
|
|
295
292
|
/**
|
|
296
|
-
*
|
|
293
|
+
* Insert a tweet
|
|
294
|
+
* @param options The tweet attributes
|
|
295
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
297
296
|
*/
|
|
298
|
-
|
|
297
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
298
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
}
|
package/lib/SlashCommand.js
CHANGED
|
@@ -4,7 +4,7 @@ import { S as P } from "./index-CbQQFj2T.js";
|
|
|
4
4
|
import B from "tippy.js";
|
|
5
5
|
import { jsx as g, jsxs as k } from "react/jsx-runtime";
|
|
6
6
|
import { forwardRef as $, useState as N, useRef as E, useImperativeHandle as z, useEffect as M, Fragment as T } from "react";
|
|
7
|
-
import { d as V, k as U, q, E as K, R as G, U as F, V as j } from "./RichTextEditor-
|
|
7
|
+
import { d as V, k as U, q, E as K, R as G, U as F, V as j } from "./RichTextEditor-CtxIf8pq.js";
|
|
8
8
|
import { u as W, m as h } from "./index-Tj3Ci7xM.js";
|
|
9
9
|
function Q(i, m) {
|
|
10
10
|
var L, v;
|
package/lib/Strike.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ByRfqzMr.cjs"),n=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ByRfqzMr.cjs"),n=require("./RichTextEditor-DtxJlApT.cjs"),i=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,o=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,a=e.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[e.markInputRule({find:i,type:this.type})]},addPasteRules(){return[e.markPasteRule({find:o,type:this.type})]}}),u=a.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:r,t:s})=>({component:n.ActionButton,componentProps:{action:()=>r.commands.toggleStrike(),isActive:()=>r.isActive("strike")||!1,disabled:!1,icon:"Strikethrough",shortcutKeys:["shift","mod","S"],tooltip:s("editor.strike.tooltip")}})}}});exports.Strike=u;
|