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/CodeView.d.cts
CHANGED
|
@@ -109,9 +109,11 @@ declare module '@tiptap/core' {
|
|
|
109
109
|
|
|
110
110
|
declare module '@tiptap/core' {
|
|
111
111
|
interface Commands<ReturnType> {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
emoji: {
|
|
113
|
+
setEmoji: (emoji: {
|
|
114
|
+
name: string;
|
|
115
|
+
emoji: string;
|
|
116
|
+
}) => ReturnType;
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
}
|
|
@@ -119,8 +121,9 @@ declare module '@tiptap/core' {
|
|
|
119
121
|
|
|
120
122
|
declare module '@tiptap/core' {
|
|
121
123
|
interface Commands<ReturnType> {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
drawer: {
|
|
125
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
126
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
124
127
|
};
|
|
125
128
|
}
|
|
126
129
|
}
|
|
@@ -128,11 +131,8 @@ declare module '@tiptap/core' {
|
|
|
128
131
|
|
|
129
132
|
declare module '@tiptap/core' {
|
|
130
133
|
interface Commands<ReturnType> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
name: string;
|
|
134
|
-
emoji: string;
|
|
135
|
-
}) => ReturnType;
|
|
134
|
+
excalidraw: {
|
|
135
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -191,19 +191,19 @@ declare module '@tiptap/core' {
|
|
|
191
191
|
|
|
192
192
|
declare module '@tiptap/core' {
|
|
193
193
|
interface Commands<ReturnType> {
|
|
194
|
-
|
|
194
|
+
imageGifUpload: {
|
|
195
195
|
/**
|
|
196
|
-
* Add an image
|
|
196
|
+
* Add an image gif
|
|
197
197
|
*/
|
|
198
|
-
|
|
198
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
199
199
|
/**
|
|
200
|
-
* Update an image
|
|
200
|
+
* Update an image gif
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
203
203
|
/**
|
|
204
204
|
* Set image alignment
|
|
205
205
|
*/
|
|
206
|
-
|
|
206
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -211,28 +211,19 @@ declare module '@tiptap/core' {
|
|
|
211
211
|
|
|
212
212
|
declare module '@tiptap/core' {
|
|
213
213
|
interface Commands<ReturnType> {
|
|
214
|
-
|
|
214
|
+
imageUpload: {
|
|
215
215
|
/**
|
|
216
|
-
* Add an image
|
|
216
|
+
* Add an image
|
|
217
217
|
*/
|
|
218
|
-
|
|
218
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
219
219
|
/**
|
|
220
|
-
* Update an image
|
|
220
|
+
* Update an image
|
|
221
221
|
*/
|
|
222
|
-
|
|
222
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
223
223
|
/**
|
|
224
224
|
* Set image alignment
|
|
225
225
|
*/
|
|
226
|
-
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
declare module '@tiptap/core' {
|
|
233
|
-
interface Commands<ReturnType> {
|
|
234
|
-
katex: {
|
|
235
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
226
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
236
227
|
};
|
|
237
228
|
}
|
|
238
229
|
}
|
|
@@ -254,6 +245,15 @@ declare module '@tiptap/core' {
|
|
|
254
245
|
}
|
|
255
246
|
|
|
256
247
|
|
|
248
|
+
declare module '@tiptap/core' {
|
|
249
|
+
interface Commands<ReturnType> {
|
|
250
|
+
katex: {
|
|
251
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
257
|
declare module '@tiptap/core' {
|
|
258
258
|
interface Commands<ReturnType> {
|
|
259
259
|
lineHeight: {
|
package/lib/CodeView.d.ts
CHANGED
|
@@ -109,9 +109,11 @@ declare module '@tiptap/core' {
|
|
|
109
109
|
|
|
110
110
|
declare module '@tiptap/core' {
|
|
111
111
|
interface Commands<ReturnType> {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
emoji: {
|
|
113
|
+
setEmoji: (emoji: {
|
|
114
|
+
name: string;
|
|
115
|
+
emoji: string;
|
|
116
|
+
}) => ReturnType;
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
}
|
|
@@ -119,8 +121,9 @@ declare module '@tiptap/core' {
|
|
|
119
121
|
|
|
120
122
|
declare module '@tiptap/core' {
|
|
121
123
|
interface Commands<ReturnType> {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
drawer: {
|
|
125
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
126
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
124
127
|
};
|
|
125
128
|
}
|
|
126
129
|
}
|
|
@@ -128,11 +131,8 @@ declare module '@tiptap/core' {
|
|
|
128
131
|
|
|
129
132
|
declare module '@tiptap/core' {
|
|
130
133
|
interface Commands<ReturnType> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
name: string;
|
|
134
|
-
emoji: string;
|
|
135
|
-
}) => ReturnType;
|
|
134
|
+
excalidraw: {
|
|
135
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -191,19 +191,19 @@ declare module '@tiptap/core' {
|
|
|
191
191
|
|
|
192
192
|
declare module '@tiptap/core' {
|
|
193
193
|
interface Commands<ReturnType> {
|
|
194
|
-
|
|
194
|
+
imageGifUpload: {
|
|
195
195
|
/**
|
|
196
|
-
* Add an image
|
|
196
|
+
* Add an image gif
|
|
197
197
|
*/
|
|
198
|
-
|
|
198
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
199
199
|
/**
|
|
200
|
-
* Update an image
|
|
200
|
+
* Update an image gif
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
203
203
|
/**
|
|
204
204
|
* Set image alignment
|
|
205
205
|
*/
|
|
206
|
-
|
|
206
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -211,28 +211,19 @@ declare module '@tiptap/core' {
|
|
|
211
211
|
|
|
212
212
|
declare module '@tiptap/core' {
|
|
213
213
|
interface Commands<ReturnType> {
|
|
214
|
-
|
|
214
|
+
imageUpload: {
|
|
215
215
|
/**
|
|
216
|
-
* Add an image
|
|
216
|
+
* Add an image
|
|
217
217
|
*/
|
|
218
|
-
|
|
218
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
219
219
|
/**
|
|
220
|
-
* Update an image
|
|
220
|
+
* Update an image
|
|
221
221
|
*/
|
|
222
|
-
|
|
222
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
223
223
|
/**
|
|
224
224
|
* Set image alignment
|
|
225
225
|
*/
|
|
226
|
-
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
declare module '@tiptap/core' {
|
|
233
|
-
interface Commands<ReturnType> {
|
|
234
|
-
katex: {
|
|
235
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
226
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
236
227
|
};
|
|
237
228
|
}
|
|
238
229
|
}
|
|
@@ -254,6 +245,15 @@ declare module '@tiptap/core' {
|
|
|
254
245
|
}
|
|
255
246
|
|
|
256
247
|
|
|
248
|
+
declare module '@tiptap/core' {
|
|
249
|
+
interface Commands<ReturnType> {
|
|
250
|
+
katex: {
|
|
251
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
257
|
declare module '@tiptap/core' {
|
|
258
258
|
interface Commands<ReturnType> {
|
|
259
259
|
lineHeight: {
|
package/lib/CodeView.js
CHANGED
package/lib/Color.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-DclQSrIx.cjs");const u=require("./index-ByRfqzMr.cjs"),l=require("react/jsx-runtime"),d=require("react"),i=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-DclQSrIx.cjs");const u=require("./index-ByRfqzMr.cjs"),l=require("react/jsx-runtime"),d=require("react"),i=require("./RichTextEditor-B5WYnm7K.cjs"),x=u.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function C({fill:e}){return l.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:l.jsx("g",{transform:"translate(0.000000, 0.500000)",children:l.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[l.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:e||"#DF2A3F",fillRule:"evenodd"}),l.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),l.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function h(e){const[t,c]=d.useState(void 0);function r(o){var a;(a=e.action)==null||a.call(e,o)}function n(){var o;(o=e.action)==null||o.call(e,t)}const s=d.useCallback(i.debounce(o=>{c(o)},350),[]);return l.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[l.jsx(i.ActionButton,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:n,children:l.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:l.jsx(C,{fill:t||e.initialDisplayedColor})})}),l.jsx(i.ColorPicker,{selectedColor:t,setSelectedColor:s,onChange:r,disabled:e==null?void 0:e.disabled,colors:e==null?void 0:e.colors,defaultColor:e==null?void 0:e.defaultColor,children:l.jsx(i.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !richtext-w-3",disabled:e==null?void 0:e.disabled,children:l.jsx(i.IconComponent,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}const f=x.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:c,extension:r}){return{component:h,componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{n===void 0&&t.chain().focus().unsetColor().run(),typeof n=="string"&&t.chain().focus().setColor(n).run()},isActive:()=>{const{color:n}=t.getAttributes("textStyle");return n&&t.isActive({color:n})||!1},editor:t,disabled:!1,tooltip:c("editor.color.tooltip")}}}}}});exports.Color=f;
|
package/lib/Color.d.cts
CHANGED
|
@@ -117,9 +117,11 @@ declare module '@tiptap/core' {
|
|
|
117
117
|
|
|
118
118
|
declare module '@tiptap/core' {
|
|
119
119
|
interface Commands<ReturnType> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
emoji: {
|
|
121
|
+
setEmoji: (emoji: {
|
|
122
|
+
name: string;
|
|
123
|
+
emoji: string;
|
|
124
|
+
}) => ReturnType;
|
|
123
125
|
};
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -127,8 +129,9 @@ declare module '@tiptap/core' {
|
|
|
127
129
|
|
|
128
130
|
declare module '@tiptap/core' {
|
|
129
131
|
interface Commands<ReturnType> {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
drawer: {
|
|
133
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
134
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
}
|
|
@@ -136,11 +139,8 @@ declare module '@tiptap/core' {
|
|
|
136
139
|
|
|
137
140
|
declare module '@tiptap/core' {
|
|
138
141
|
interface Commands<ReturnType> {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
name: string;
|
|
142
|
-
emoji: string;
|
|
143
|
-
}) => ReturnType;
|
|
142
|
+
excalidraw: {
|
|
143
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -199,19 +199,19 @@ declare module '@tiptap/core' {
|
|
|
199
199
|
|
|
200
200
|
declare module '@tiptap/core' {
|
|
201
201
|
interface Commands<ReturnType> {
|
|
202
|
-
|
|
202
|
+
imageGifUpload: {
|
|
203
203
|
/**
|
|
204
|
-
* Add an image
|
|
204
|
+
* Add an image gif
|
|
205
205
|
*/
|
|
206
|
-
|
|
206
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
207
207
|
/**
|
|
208
|
-
* Update an image
|
|
208
|
+
* Update an image gif
|
|
209
209
|
*/
|
|
210
|
-
|
|
210
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
211
211
|
/**
|
|
212
212
|
* Set image alignment
|
|
213
213
|
*/
|
|
214
|
-
|
|
214
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -219,28 +219,19 @@ declare module '@tiptap/core' {
|
|
|
219
219
|
|
|
220
220
|
declare module '@tiptap/core' {
|
|
221
221
|
interface Commands<ReturnType> {
|
|
222
|
-
|
|
222
|
+
imageUpload: {
|
|
223
223
|
/**
|
|
224
|
-
* Add an image
|
|
224
|
+
* Add an image
|
|
225
225
|
*/
|
|
226
|
-
|
|
226
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
227
227
|
/**
|
|
228
|
-
* Update an image
|
|
228
|
+
* Update an image
|
|
229
229
|
*/
|
|
230
|
-
|
|
230
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
231
231
|
/**
|
|
232
232
|
* Set image alignment
|
|
233
233
|
*/
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
declare module '@tiptap/core' {
|
|
241
|
-
interface Commands<ReturnType> {
|
|
242
|
-
katex: {
|
|
243
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
234
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
244
235
|
};
|
|
245
236
|
}
|
|
246
237
|
}
|
|
@@ -262,6 +253,15 @@ declare module '@tiptap/core' {
|
|
|
262
253
|
}
|
|
263
254
|
|
|
264
255
|
|
|
256
|
+
declare module '@tiptap/core' {
|
|
257
|
+
interface Commands<ReturnType> {
|
|
258
|
+
katex: {
|
|
259
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
265
265
|
declare module '@tiptap/core' {
|
|
266
266
|
interface Commands<ReturnType> {
|
|
267
267
|
lineHeight: {
|
package/lib/Color.d.ts
CHANGED
|
@@ -117,9 +117,11 @@ declare module '@tiptap/core' {
|
|
|
117
117
|
|
|
118
118
|
declare module '@tiptap/core' {
|
|
119
119
|
interface Commands<ReturnType> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
emoji: {
|
|
121
|
+
setEmoji: (emoji: {
|
|
122
|
+
name: string;
|
|
123
|
+
emoji: string;
|
|
124
|
+
}) => ReturnType;
|
|
123
125
|
};
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -127,8 +129,9 @@ declare module '@tiptap/core' {
|
|
|
127
129
|
|
|
128
130
|
declare module '@tiptap/core' {
|
|
129
131
|
interface Commands<ReturnType> {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
drawer: {
|
|
133
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
134
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
}
|
|
@@ -136,11 +139,8 @@ declare module '@tiptap/core' {
|
|
|
136
139
|
|
|
137
140
|
declare module '@tiptap/core' {
|
|
138
141
|
interface Commands<ReturnType> {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
name: string;
|
|
142
|
-
emoji: string;
|
|
143
|
-
}) => ReturnType;
|
|
142
|
+
excalidraw: {
|
|
143
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -199,19 +199,19 @@ declare module '@tiptap/core' {
|
|
|
199
199
|
|
|
200
200
|
declare module '@tiptap/core' {
|
|
201
201
|
interface Commands<ReturnType> {
|
|
202
|
-
|
|
202
|
+
imageGifUpload: {
|
|
203
203
|
/**
|
|
204
|
-
* Add an image
|
|
204
|
+
* Add an image gif
|
|
205
205
|
*/
|
|
206
|
-
|
|
206
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
207
207
|
/**
|
|
208
|
-
* Update an image
|
|
208
|
+
* Update an image gif
|
|
209
209
|
*/
|
|
210
|
-
|
|
210
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
211
211
|
/**
|
|
212
212
|
* Set image alignment
|
|
213
213
|
*/
|
|
214
|
-
|
|
214
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -219,28 +219,19 @@ declare module '@tiptap/core' {
|
|
|
219
219
|
|
|
220
220
|
declare module '@tiptap/core' {
|
|
221
221
|
interface Commands<ReturnType> {
|
|
222
|
-
|
|
222
|
+
imageUpload: {
|
|
223
223
|
/**
|
|
224
|
-
* Add an image
|
|
224
|
+
* Add an image
|
|
225
225
|
*/
|
|
226
|
-
|
|
226
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
227
227
|
/**
|
|
228
|
-
* Update an image
|
|
228
|
+
* Update an image
|
|
229
229
|
*/
|
|
230
|
-
|
|
230
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
231
231
|
/**
|
|
232
232
|
* Set image alignment
|
|
233
233
|
*/
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
declare module '@tiptap/core' {
|
|
241
|
-
interface Commands<ReturnType> {
|
|
242
|
-
katex: {
|
|
243
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
234
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
244
235
|
};
|
|
245
236
|
}
|
|
246
237
|
}
|
|
@@ -262,6 +253,15 @@ declare module '@tiptap/core' {
|
|
|
262
253
|
}
|
|
263
254
|
|
|
264
255
|
|
|
256
|
+
declare module '@tiptap/core' {
|
|
257
|
+
interface Commands<ReturnType> {
|
|
258
|
+
katex: {
|
|
259
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
265
265
|
declare module '@tiptap/core' {
|
|
266
266
|
interface Commands<ReturnType> {
|
|
267
267
|
lineHeight: {
|
package/lib/Color.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./index-C1fzuXpN.js";
|
|
|
2
2
|
import { E as u } from "./index-DI9T3iLd.js";
|
|
3
3
|
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
4
4
|
import { useState as s, useCallback as C } from "react";
|
|
5
|
-
import { t as h, A as f, C as x, B as m, k as v } from "./RichTextEditor-
|
|
5
|
+
import { t as h, A as f, C as x, B as m, k as v } from "./RichTextEditor-CfAFp9V2.js";
|
|
6
6
|
const L = u.create({
|
|
7
7
|
name: "color",
|
|
8
8
|
addOptions() {
|
package/lib/Document.d.cts
CHANGED
|
@@ -39,9 +39,11 @@ declare module '@tiptap/core' {
|
|
|
39
39
|
|
|
40
40
|
declare module '@tiptap/core' {
|
|
41
41
|
interface Commands<ReturnType> {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
emoji: {
|
|
43
|
+
setEmoji: (emoji: {
|
|
44
|
+
name: string;
|
|
45
|
+
emoji: string;
|
|
46
|
+
}) => ReturnType;
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -49,8 +51,9 @@ declare module '@tiptap/core' {
|
|
|
49
51
|
|
|
50
52
|
declare module '@tiptap/core' {
|
|
51
53
|
interface Commands<ReturnType> {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
drawer: {
|
|
55
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
56
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
59
|
}
|
|
@@ -58,11 +61,8 @@ declare module '@tiptap/core' {
|
|
|
58
61
|
|
|
59
62
|
declare module '@tiptap/core' {
|
|
60
63
|
interface Commands<ReturnType> {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
name: string;
|
|
64
|
-
emoji: string;
|
|
65
|
-
}) => ReturnType;
|
|
64
|
+
excalidraw: {
|
|
65
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -121,19 +121,19 @@ declare module '@tiptap/core' {
|
|
|
121
121
|
|
|
122
122
|
declare module '@tiptap/core' {
|
|
123
123
|
interface Commands<ReturnType> {
|
|
124
|
-
|
|
124
|
+
imageGifUpload: {
|
|
125
125
|
/**
|
|
126
|
-
* Add an image
|
|
126
|
+
* Add an image gif
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
129
129
|
/**
|
|
130
|
-
* Update an image
|
|
130
|
+
* Update an image gif
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
133
133
|
/**
|
|
134
134
|
* Set image alignment
|
|
135
135
|
*/
|
|
136
|
-
|
|
136
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -141,28 +141,19 @@ declare module '@tiptap/core' {
|
|
|
141
141
|
|
|
142
142
|
declare module '@tiptap/core' {
|
|
143
143
|
interface Commands<ReturnType> {
|
|
144
|
-
|
|
144
|
+
imageUpload: {
|
|
145
145
|
/**
|
|
146
|
-
* Add an image
|
|
146
|
+
* Add an image
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
149
149
|
/**
|
|
150
|
-
* Update an image
|
|
150
|
+
* Update an image
|
|
151
151
|
*/
|
|
152
|
-
|
|
152
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
153
153
|
/**
|
|
154
154
|
* Set image alignment
|
|
155
155
|
*/
|
|
156
|
-
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
declare module '@tiptap/core' {
|
|
163
|
-
interface Commands<ReturnType> {
|
|
164
|
-
katex: {
|
|
165
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
156
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
166
157
|
};
|
|
167
158
|
}
|
|
168
159
|
}
|
|
@@ -184,6 +175,15 @@ declare module '@tiptap/core' {
|
|
|
184
175
|
}
|
|
185
176
|
|
|
186
177
|
|
|
178
|
+
declare module '@tiptap/core' {
|
|
179
|
+
interface Commands<ReturnType> {
|
|
180
|
+
katex: {
|
|
181
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
187
|
declare module '@tiptap/core' {
|
|
188
188
|
interface Commands<ReturnType> {
|
|
189
189
|
lineHeight: {
|