reactjs-tiptap-editor 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionMenuButton-BKOg7hkq.js +38 -0
- package/lib/ActionMenuButton-DLQyd_gx.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +32 -44
- package/lib/Attachment.d.ts +32 -44
- package/lib/Attachment.js +129 -99
- package/lib/Blockquote.cjs +3 -3
- package/lib/Blockquote.d.cts +32 -44
- package/lib/Blockquote.d.ts +32 -44
- package/lib/Blockquote.js +50 -22
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +32 -44
- package/lib/Bold.d.ts +32 -44
- package/lib/Bold.js +48 -20
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +32 -44
- package/lib/BulletList.d.ts +32 -44
- package/lib/BulletList.js +38 -9
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +32 -44
- package/lib/Clear.d.ts +32 -44
- package/lib/Clear.js +32 -6
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +32 -44
- package/lib/Code.d.ts +32 -44
- package/lib/Code.js +53 -25
- package/lib/CodeBlock.cjs +35 -35
- package/lib/CodeBlock.d.cts +32 -44
- package/lib/CodeBlock.d.ts +32 -44
- package/lib/CodeBlock.js +605 -590
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +33 -45
- package/lib/CodeView.d.ts +33 -45
- package/lib/CodeView.js +49 -21
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +36 -44
- package/lib/Color.d.ts +36 -44
- package/lib/Color.js +123 -79
- package/lib/Column.cjs +1 -0
- package/lib/{Document.d.cts → Column.d.cts} +38 -47
- package/lib/{Document.d.ts → Column.d.ts} +38 -47
- package/lib/Column.js +217 -0
- package/lib/{Drawer-CaAfmqNo.js → Drawer-DZ5jvmrX.js} +404 -394
- package/lib/Drawer-SRhwOc6T.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +32 -44
- package/lib/Drawer.d.ts +32 -44
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +32 -49
- package/lib/Emoji.d.ts +32 -49
- package/lib/Emoji.js +377 -392
- package/lib/Excalidraw-DwBRXEtC.js +345 -0
- package/lib/Excalidraw-ZN3DQvDC.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +32 -44
- package/lib/Excalidraw.d.ts +32 -44
- package/lib/Excalidraw.js +6 -4
- package/lib/ExportPdf.cjs +5 -5
- package/lib/ExportPdf.d.cts +32 -44
- package/lib/ExportPdf.d.ts +32 -44
- package/lib/ExportPdf.js +60 -32
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +33 -45
- package/lib/ExportWord.d.ts +33 -45
- package/lib/ExportWord.js +84 -21
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +46 -47
- package/lib/FontFamily.d.ts +46 -47
- package/lib/FontFamily.js +72 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +43 -47
- package/lib/FontSize.d.ts +43 -47
- package/lib/FontSize.js +72 -64
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +46 -44
- package/lib/Heading.d.ts +46 -44
- package/lib/Heading.js +91 -73
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +36 -44
- package/lib/Highlight.d.ts +36 -44
- package/lib/Highlight.js +152 -21
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +34 -44
- package/lib/History.d.ts +34 -44
- package/lib/History.js +976 -53
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +32 -44
- package/lib/HorizontalRule.d.ts +32 -44
- package/lib/HorizontalRule.js +97 -17
- package/lib/Icon-DUpv2cI6.cjs +1 -0
- package/lib/Icon-jKs8Hr6p.js +11 -0
- package/lib/Iframe-CmXkEqOd.js +431 -0
- package/lib/Iframe-Cvca2G7X.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +31 -50
- package/lib/Iframe.d.ts +31 -50
- package/lib/Iframe.js +6 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +32 -45
- package/lib/Image.d.ts +32 -45
- package/lib/Image.js +848 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +33 -47
- package/lib/ImageGif.d.ts +33 -47
- package/lib/ImageGif.js +424 -5
- package/lib/ImportWord.cjs +48 -48
- package/lib/ImportWord.d.cts +33 -45
- package/lib/ImportWord.d.ts +33 -45
- package/lib/ImportWord.js +2596 -2588
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +32 -44
- package/lib/Indent.d.ts +32 -44
- package/lib/Indent.js +97 -27
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +32 -44
- package/lib/Italic.d.ts +32 -44
- package/lib/Italic.js +47 -19
- package/lib/Katex-DsYXsjSS.js +2740 -0
- package/lib/Katex-XfrNne6U.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +32 -44
- package/lib/Katex.d.ts +32 -44
- package/lib/Katex.js +5 -196
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +34 -50
- package/lib/LineHeight.d.ts +34 -50
- package/lib/LineHeight.js +71 -112
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +33 -47
- package/lib/Link.d.ts +33 -47
- package/lib/Link.js +3 -3
- package/lib/LinkEditBlock-BZenZq-Z.cjs +5 -0
- package/lib/LinkEditBlock-CB8yIffE.js +1241 -0
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +29 -44
- package/lib/Mention.d.ts +29 -44
- package/lib/Mention.js +112 -124
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +32 -44
- package/lib/Mermaid.d.ts +32 -44
- package/lib/Mermaid.js +177 -165
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +47 -46
- package/lib/MoreMark.d.ts +47 -46
- package/lib/MoreMark.js +125 -55
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +32 -44
- package/lib/OrderedList.d.ts +32 -44
- package/lib/OrderedList.js +37 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +32 -47
- package/lib/SearchAndReplace.d.ts +32 -47
- package/lib/SearchAndReplace.js +221 -197
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +44 -51
- package/lib/SlashCommand.d.ts +44 -51
- package/lib/SlashCommand.js +235 -249
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +32 -44
- package/lib/Strike.d.ts +32 -44
- package/lib/Strike.js +39 -11
- package/lib/Table-B1j1Ebmh.cjs +9 -0
- package/lib/Table-Db8TcQX8.js +1984 -0
- package/lib/Table.cjs +1 -9
- package/lib/Table.d.cts +33 -47
- package/lib/Table.d.ts +33 -47
- package/lib/Table.js +3 -558
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +32 -44
- package/lib/TaskList.d.ts +32 -44
- package/lib/TaskList.js +38 -10
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +45 -44
- package/lib/TextAlign.d.ts +45 -44
- package/lib/TextAlign.js +108 -101
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +61 -44
- package/lib/TextDirection.d.ts +61 -44
- package/lib/TextDirection.js +105 -112
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +32 -44
- package/lib/TextUnderline.d.ts +32 -44
- package/lib/TextUnderline.js +46 -18
- package/lib/{Twitter-BFULyqdR.js → Twitter-CXmmjz9R.js} +536 -498
- package/lib/Twitter-CtVTIWJW.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +32 -44
- package/lib/Twitter.d.ts +32 -44
- package/lib/Twitter.js +5 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +32 -44
- package/lib/Video.d.ts +32 -44
- package/lib/Video.js +261 -4
- package/lib/_commonjsHelpers-BItOPCY9.js +28 -0
- package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
- package/lib/bubble.cjs +2 -0
- package/lib/{bubble-extra.d.cts → bubble.d.cts} +58 -59
- package/lib/{bubble-extra.d.ts → bubble.d.ts} +58 -59
- package/lib/bubble.js +1925 -0
- package/lib/button-B12K7BJ4.cjs +1 -0
- package/lib/button-DXMsXUEn.js +43 -0
- package/lib/clsx-C11secjj.cjs +1 -0
- package/lib/clsx-OuTLNxxd.js +16 -0
- package/lib/delete-node-CosiBes5.cjs +1 -0
- package/lib/delete-node-IyVmiRbI.js +22 -0
- package/lib/dialog-CaCS-W5S.cjs +1 -0
- package/lib/dialog-PtQivpHS.js +100 -0
- package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
- package/lib/dom-dataset-CIEeltF6.js +47 -0
- package/lib/dropdown-menu-BPp2Z_U-.js +136 -0
- package/lib/dropdown-menu-CdSm4emp.cjs +1 -0
- package/lib/file-BLas99n7.js +43 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/floating-ui.dom-U1vPFQ5f.js +1151 -0
- package/lib/floating-ui.dom-VCrc58uF.cjs +1 -0
- package/lib/icons-Cllpys39.js +362 -0
- package/lib/icons-CqHjeW5T.cjs +1 -0
- package/lib/index-BH4bc3jN.cjs +33 -0
- package/lib/index-BPfVXs5_.js +2380 -0
- package/lib/index-Bnmd0WvY.js +1631 -0
- package/lib/{index-Ch6dBBad.js → index-CBce_TWY.js} +40 -42
- package/lib/{index-5iBZLua9.cjs → index-D-5U8dY8.cjs} +8 -8
- package/lib/{index-ByurDDMv.js → index-D2TUfKkC.js} +2 -2
- package/lib/index-DV5kbgRU.cjs +1 -0
- package/lib/{index-LmrOdnen.js → index-DYkucCoF.js} +396 -495
- package/lib/index-Dfmm6FTT.cjs +1 -0
- package/lib/index-DnWWK9F_.js +6374 -0
- package/lib/index-DzcKxutn.js +632 -0
- package/lib/index-DzvuNTxo.cjs +4 -0
- package/lib/{index-BeCTd5v2.cjs → index-N--9MohJ.cjs} +1 -1
- package/lib/index-RfTlOzIr.cjs +22 -0
- package/lib/index.cjs +132 -1
- package/lib/index.d.cts +34 -285
- package/lib/index.d.ts +34 -285
- package/lib/index.js +243 -2
- package/lib/input-_ECRfn3Y.cjs +1 -0
- package/lib/input-wJ9PDEzZ.js +21 -0
- package/lib/isNumber-ClPupm7P.cjs +1 -0
- package/lib/isNumber-fpLGS0AZ.js +15 -0
- package/lib/label-BkgAe7IY.cjs +1 -0
- package/lib/label-CGdLYWv7.js +19 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +5410 -62
- package/lib/locale-bundle.d.ts +5410 -62
- package/lib/locale-bundle.js +9 -7
- package/lib/popover-BgmUNMHj.cjs +1 -0
- package/lib/popover-CAuEW0Mr.js +23 -0
- package/lib/separator-CuBW_w98.js +328 -0
- package/lib/separator-DRIrVZ2N.cjs +1 -0
- package/lib/store-DX599H5W.js +10 -0
- package/lib/store-WStcMOiW.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/switch-CnLJ7Y-b.cjs +1 -0
- package/lib/switch-Coix_FA1.js +27 -0
- package/lib/tabs-B5mVSN1I.js +46 -0
- package/lib/tabs-BoLCMcCI.cjs +1 -0
- package/lib/textarea-B-6zTKQz.cjs +1 -0
- package/lib/{textarea-aPtytkDx.js → textarea-DUUM1jZd.js} +1 -1
- package/lib/theme-B7aAsK_T.js +15 -0
- package/lib/theme-D8_cxGqB.cjs +1 -0
- package/lib/throttle-CdwDrFpn.js +249 -0
- package/lib/throttle-qX7Yjtsg.cjs +1 -0
- package/lib/toggle-Cdp4IT2U.js +85 -0
- package/lib/toggle-D41PzQLJ.cjs +1 -0
- package/lib/tooltip-BuEiE96N.cjs +1 -0
- package/lib/tooltip-CopwsU8q.js +23 -0
- package/lib/updatePosition-8Sdem5jb.cjs +1 -0
- package/lib/updatePosition-BPmcE0YD.js +215 -0
- package/lib/use-toast-Bz3QCOtE.cjs +1 -0
- package/lib/use-toast-Crf7-q5H.js +98 -0
- package/lib/useButtonProps-BsEd4zYM.js +141 -0
- package/lib/useButtonProps-C6Vpn190.cjs +1 -0
- package/package.json +22 -105
- package/lib/ActionMenuButton-CYdM1xx5.cjs +0 -1
- package/lib/ActionMenuButton-DKRF6oa0.js +0 -33
- package/lib/BaseKit.cjs +0 -3
- package/lib/BaseKit.d.cts +0 -481
- package/lib/BaseKit.d.ts +0 -481
- package/lib/BaseKit.js +0 -132
- package/lib/Document.cjs +0 -1
- package/lib/Document.js +0 -9
- package/lib/Drawer-CdvCMSzN.cjs +0 -1
- package/lib/Excalidraw-BbMQhNvs.cjs +0 -1
- package/lib/Excalidraw-CVWz2Vyn.js +0 -290
- package/lib/FormatPainter.cjs +0 -1
- package/lib/FormatPainter.d.cts +0 -372
- package/lib/FormatPainter.d.ts +0 -372
- package/lib/FormatPainter.js +0 -76
- package/lib/ListItem.cjs +0 -1
- package/lib/ListItem.d.cts +0 -290
- package/lib/ListItem.d.ts +0 -290
- package/lib/ListItem.js +0 -7
- package/lib/MultiColumn.cjs +0 -1
- package/lib/MultiColumn.d.cts +0 -294
- package/lib/MultiColumn.d.ts +0 -294
- package/lib/MultiColumn.js +0 -8
- package/lib/RichTextEditor-CxvwGvQG.cjs +0 -142
- package/lib/RichTextEditor-DGcKEUGr.js +0 -22166
- package/lib/Selection.cjs +0 -1
- package/lib/Selection.d.cts +0 -289
- package/lib/Selection.d.ts +0 -289
- package/lib/Selection.js +0 -25
- package/lib/SubAndSuperScript.cjs +0 -1
- package/lib/SubAndSuperScript.d.cts +0 -377
- package/lib/SubAndSuperScript.d.ts +0 -377
- package/lib/SubAndSuperScript.js +0 -43
- package/lib/TableOfContent.cjs +0 -1
- package/lib/TableOfContent.d.cts +0 -291
- package/lib/TableOfContent.d.ts +0 -291
- package/lib/TableOfContent.js +0 -185
- package/lib/TextBubble.cjs +0 -1
- package/lib/TextBubble.d.cts +0 -362
- package/lib/TextBubble.d.ts +0 -362
- package/lib/TextBubble.js +0 -133
- package/lib/TrailingNode.cjs +0 -1
- package/lib/TrailingNode.d.cts +0 -297
- package/lib/TrailingNode.d.ts +0 -297
- package/lib/TrailingNode.js +0 -41
- package/lib/Twitter-Cutpkh3h.cjs +0 -1
- package/lib/bubble-extra.cjs +0 -2
- package/lib/bubble-extra.js +0 -631
- package/lib/dom-dataset-_6-diIRQ.cjs +0 -33
- package/lib/dom-dataset-lYeH6gfI.js +0 -2361
- package/lib/index-6D1J-A-o.cjs +0 -1
- package/lib/index-B96Cclrj.cjs +0 -3
- package/lib/index-BBz7Nmv9.js +0 -55
- package/lib/index-CUogRI7j.cjs +0 -1
- package/lib/index-DF2Lp4HZ.cjs +0 -100
- package/lib/index-D_L6n8O8.js +0 -76
- package/lib/index-Dbvi-Bvh.cjs +0 -1
- package/lib/index-DpCrt7xs.cjs +0 -1
- package/lib/index-DsAX1Vq8.cjs +0 -1
- package/lib/index-Dy4DlW9o.js +0 -12
- package/lib/index-J3jHHZ4d.js +0 -200
- package/lib/index-VvXaaKe3.js +0 -898
- package/lib/index-kbO3iWqL.js +0 -13432
- package/lib/textarea-DFo_aXnj.cjs +0 -1
package/lib/Iframe.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
1
2
|
import { Node as Node_2 } from '@tiptap/core';
|
|
2
3
|
|
|
3
4
|
export declare const Iframe: Node_2<any, any>;
|
|
4
5
|
|
|
5
|
-
export declare
|
|
6
|
-
width?: number | string;
|
|
7
|
-
height?: number;
|
|
8
|
-
src?: string;
|
|
9
|
-
defaultShowPicker?: boolean;
|
|
10
|
-
}
|
|
6
|
+
export declare function RichTextIframe(): JSX.Element;
|
|
11
7
|
|
|
12
8
|
export { }
|
|
13
9
|
|
|
@@ -42,11 +38,22 @@ declare module '@tiptap/core' {
|
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
|
|
41
|
+
declare module '@tiptap/core' {
|
|
42
|
+
interface Storage {
|
|
43
|
+
color: ColorStorage;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
45
48
|
declare module '@tiptap/core' {
|
|
46
49
|
interface Commands<ReturnType> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
columns: {
|
|
51
|
+
insertColumns: (attrs?: {
|
|
52
|
+
cols: number;
|
|
53
|
+
}) => ReturnType;
|
|
54
|
+
addColBefore: () => ReturnType;
|
|
55
|
+
addColAfter: () => ReturnType;
|
|
56
|
+
deleteCol: () => ReturnType;
|
|
50
57
|
};
|
|
51
58
|
}
|
|
52
59
|
}
|
|
@@ -54,8 +61,9 @@ declare module '@tiptap/core' {
|
|
|
54
61
|
|
|
55
62
|
declare module '@tiptap/core' {
|
|
56
63
|
interface Commands<ReturnType> {
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
drawer: {
|
|
65
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
66
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
59
67
|
};
|
|
60
68
|
}
|
|
61
69
|
}
|
|
@@ -73,7 +81,16 @@ declare module '@tiptap/core' {
|
|
|
73
81
|
declare module '@tiptap/core' {
|
|
74
82
|
interface Commands<ReturnType> {
|
|
75
83
|
exportWord: {
|
|
76
|
-
exportToWord: () => ReturnType;
|
|
84
|
+
exportToWord: (docState: any) => ReturnType;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
declare module '@tiptap/core' {
|
|
91
|
+
interface Commands<ReturnType> {
|
|
92
|
+
excalidraw: {
|
|
93
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
77
94
|
};
|
|
78
95
|
}
|
|
79
96
|
}
|
|
@@ -98,10 +115,8 @@ declare module '@tiptap/core' {
|
|
|
98
115
|
|
|
99
116
|
|
|
100
117
|
declare module '@tiptap/core' {
|
|
101
|
-
interface
|
|
102
|
-
|
|
103
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
104
|
-
};
|
|
118
|
+
interface Storage {
|
|
119
|
+
highlight: HighlightStorage;
|
|
105
120
|
}
|
|
106
121
|
}
|
|
107
122
|
|
|
@@ -186,16 +201,6 @@ declare module '@tiptap/core' {
|
|
|
186
201
|
}
|
|
187
202
|
|
|
188
203
|
|
|
189
|
-
declare module '@tiptap/core' {
|
|
190
|
-
interface Commands<ReturnType> {
|
|
191
|
-
lineHeight: {
|
|
192
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
193
|
-
unsetLineHeight: () => ReturnType;
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
204
|
declare module '@tiptap/core' {
|
|
200
205
|
interface Commands<ReturnType> {
|
|
201
206
|
mermaid: {
|
|
@@ -206,20 +211,6 @@ declare module '@tiptap/core' {
|
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
|
|
209
|
-
declare module '@tiptap/core' {
|
|
210
|
-
interface Commands<ReturnType> {
|
|
211
|
-
columns: {
|
|
212
|
-
insertColumns: (attrs?: {
|
|
213
|
-
cols: number;
|
|
214
|
-
}) => ReturnType;
|
|
215
|
-
addColBefore: () => ReturnType;
|
|
216
|
-
addColAfter: () => ReturnType;
|
|
217
|
-
deleteCol: () => ReturnType;
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
214
|
declare module '@tiptap/core' {
|
|
224
215
|
interface Commands<ReturnType> {
|
|
225
216
|
search: {
|
|
@@ -243,16 +234,6 @@ declare module '@tiptap/core' {
|
|
|
243
234
|
}
|
|
244
235
|
|
|
245
236
|
|
|
246
|
-
declare module '@tiptap/core' {
|
|
247
|
-
interface Commands<ReturnType> {
|
|
248
|
-
tableOfContents: {
|
|
249
|
-
setTableOfContents: () => ReturnType;
|
|
250
|
-
removeTableOfContents: () => ReturnType;
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
237
|
declare module '@tiptap/core' {
|
|
257
238
|
interface Commands<ReturnType> {
|
|
258
239
|
twitter: {
|
package/lib/Iframe.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
1
|
+
import "./index-DnWWK9F_.js";
|
|
2
|
+
import "./index-DzcKxutn.js";
|
|
3
|
+
import { I as e, R as i } from "./Iframe-CmXkEqOd.js";
|
|
4
|
+
import "./dom-dataset-CIEeltF6.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
e as Iframe,
|
|
7
|
+
i as RichTextIframe
|
|
6
8
|
};
|
package/lib/Image.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./index-DF2Lp4HZ.cjs");const e=require("./RichTextEditor-CxvwGvQG.cjs");require("./dom-dataset-_6-diIRQ.cjs");exports.Image=e.Image;exports.default=e.Image;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("./index-RfTlOzIr.cjs"),G=require("./throttle-qX7Yjtsg.cjs"),ee=require("./index-BH4bc3jN.cjs"),i=require("react/jsx-runtime"),o=require("react"),k=require("./index-Dfmm6FTT.cjs"),Y=require("./isNumber-ClPupm7P.cjs"),le=require("./toggle-D41PzQLJ.cjs"),W=require("./index-DV5kbgRU.cjs"),B=require("./Icon-DUpv2cI6.cjs"),R=require("./dialog-CaCS-W5S.cjs"),oe=require("react-image-crop"),U=require("./button-B12K7BJ4.cjs"),J=require("./file-i7e4nQY2.cjs"),H=require("./useButtonProps-C6Vpn190.cjs"),te=require("./use-toast-Bz3QCOtE.cjs"),ce=require("./store-WStcMOiW.cjs"),F=require("./tabs-BoLCMcCI.cjs"),ue=require("@radix-ui/react-checkbox"),de=require("lucide-react"),K=require("./label-BkgAe7IY.cjs"),Q=require("./input-_ECRfn3Y.cjs");function ie(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const he=ie(o),V=ie(ue),ne=he.forwardRef(({className:e,...t},r)=>i.jsx(V.Root,{ref:r,className:W.cn("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",e),...t,children:i.jsx(V.Indicator,{className:W.cn("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),children:i.jsx(de.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));ne.displayName=V.Root.displayName;const P={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function ge(e){var q,d,M;const[t,r]=o.useState({width:k.IMAGE_MAX_SIZE,height:k.IMAGE_MAX_SIZE}),[c,f]=o.useState({width:0,height:0}),[h]=o.useState([P.TOP_LEFT,P.TOP_RIGHT,P.BOTTOM_LEFT,P.BOTTOM_RIGHT]),[x,j]=o.useState(!1),[g,b]=o.useState({x:0,y:0,w:0,h:0,dir:""}),{align:A,inline:v}=(q=e==null?void 0:e.node)==null?void 0:q.attrs,N=v&&(A==="left"||A==="right"),E=o.useMemo(()=>{var Z;const{src:a,alt:y,width:n,height:s,flipX:m,flipY:l}=(Z=e==null?void 0:e.node)==null?void 0:Z.attrs,I=Y.isNumber(n)?`${n}px`:n,w=Y.isNumber(s)?`${s}px`:s,X=[];m&&X.push("rotateX(180deg)"),l&&X.push("rotateY(180deg)");const ae=X.join(" ");return{src:a||void 0,alt:y||void 0,style:{width:I||void 0,height:w||void 0,transform:ae||"none",...N?{float:A}:{}}}},[(d=e==null?void 0:e.node)==null?void 0:d.attrs]),z=o.useMemo(()=>{const{style:{width:a}}=E;return{width:a==="100%"?a:void 0}},[E]);function _(a){f({width:a.target.width,height:a.target.height})}function C(){const{editor:a,getPos:y}=e;a.commands.setNodeSelection(y())}const S=o.useCallback(G.throttle(()=>{const{editor:a}=e,{width:y}=getComputedStyle(a.view.dom);r(n=>({...n,width:Number.parseInt(y,10)}))},k.IMAGE_THROTTLE_WAIT_TIME),[e==null?void 0:e.editor]);function L(a,y){a.preventDefault(),a.stopPropagation();const n=c.width,s=c.height,m=n/s;let l=Number(e.node.attrs.width),I=Number(e.node.attrs.height);const w=t.width;l&&!I?(l=l>w?w:l,I=Math.round(l/m)):I&&!l?(l=Math.round(I*m),l=l>w?w:l):!l&&!I?(l=n>w?w:n,I=Math.round(l/m)):l=l>w?w:l,j(!0),b({x:a.clientX,y:a.clientY,w:l,h:I,dir:y})}const T=o.useCallback(G.throttle(a=>{if(a.preventDefault(),a.stopPropagation(),!x)return;const{x:y,w:n,dir:s}=g,m=(a.clientX-y)*(/l/.test(s)?-1:1),l=Y.clamp(n+m,k.IMAGE_MIN_SIZE,t.width);e.updateAttributes({width:l,height:null})},k.IMAGE_THROTTLE_WAIT_TIME),[x,g,t,e.updateAttributes]),p=o.useCallback(a=>{a.preventDefault(),a.stopPropagation(),x&&(b({x:0,y:0,w:0,h:0,dir:""}),j(!1),C())},[x,C]),u=o.useCallback(()=>{document==null||document.addEventListener("mousemove",T,!0),document==null||document.addEventListener("mouseup",p,!0)},[T,p]),O=o.useCallback(()=>{document==null||document.removeEventListener("mousemove",T,!0),document==null||document.removeEventListener("mouseup",p,!0)},[T,p]);o.useEffect(()=>(x?u():O(),()=>{O()}),[x,u,O]);const D=o.useMemo(()=>new ResizeObserver(()=>S()),[S]);return o.useEffect(()=>(D.observe(e.editor.view.dom),()=>{D.disconnect()}),[e.editor.view.dom,D]),i.jsx(ee.NodeViewWrapper,{as:v?"span":"div",className:"image-view",style:{float:N?A:void 0,margin:N?A==="left"?"1em 1em 1em 0":"1em 0 1em 1em":void 0,display:v?"inline":"block",textAlign:N?void 0:A,width:((M=E.style)==null?void 0:M.width)??"auto",...N?{}:z},children:i.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:z,className:`image-view__body ${e!=null&&e.selected?"image-view__body--focused":""} ${x?"image-view__body--resizing":""}`,children:[i.jsx("img",{alt:E.alt,className:"image-view__body__image block",height:"auto",onClick:C,onLoad:_,src:E.src,style:E.style}),(e==null?void 0:e.editor.view.editable)&&((e==null?void 0:e.selected)||x)&&i.jsx("div",{className:"image-resizer",children:h==null?void 0:h.map(a=>i.jsx("span",{className:`image-resizer__handler image-resizer__handler--${a}`,onMouseDown:y=>L(y,a)},`image-dir-${a}`))})]})})}function me(e,t){const r=e.type,c=e.name.toLowerCase(),f=c.split(".").pop();if(!f)return!1;const x=r||{heif:"image/heif",heic:"image/heic",dng:"image/x-adobe-dng",cr2:"image/x-canon-cr2",nef:"image/x-nikon-nef",arw:"image/x-sony-arw",raf:"image/x-fuji-raf",orf:"image/x-olympus-orf"}[f];return t.some(j=>{if(j.startsWith("."))return c.endsWith(j);if(j.endsWith("/*")){const g=j.split("/")[0];return x==null?void 0:x.startsWith(g+"/")}return x===j})}function re(e,t){const{acceptMimes:r,maxSize:c,t:f,toast:h}=t,x=[];return(Array.isArray(e)?e:Object.values(e)).forEach(g=>{if(!me(g,r)){t.onError?t.onError({type:"type",message:f("editor.upload.fileTypeNotSupported",{fileName:g.name}),file:g}):h({variant:"default",title:f("editor.upload.fileTypeNotSupported",{fileName:g.name})});return}if(g.size>c){const b=(c/1024/1024).toFixed(2);t.onError?t.onError({type:"size",message:f("editor.upload.fileSizeTooBig",{fileName:g.name,size:b}),file:g}):h({variant:"default",title:f("editor.upload.fileSizeTooBig",{fileName:g.name,size:b})});return}x.push(g)}),x}function fe({editor:e,imageInline:t,onClose:r,disabled:c,alt:f}){var a,y;const{t:h}=k.useLocale(),{toast:x}=te.useToast(),[j,g]=o.useState(!1),[b,A]=o.useState(!1),v=o.useRef(null),[N,E]=o.useState(),[z,_]=o.useState(""),C=o.useRef(null),[S,L]=o.useState({src:"",file:null}),T=H.useExtension($.name),p=o.useMemo(()=>(T==null?void 0:T.options)??{},[T]);function u(n){if(v.current&&n.width&&n.height){const s=O(v.current,n);_(s)}}function O(n,s){const m=document.createElement("canvas"),l=n.naturalWidth/n.width,I=n.naturalHeight/n.height;m.width=s.width*l,m.height=s.height*I;const w=m.getContext("2d");return w&&(w.imageSmoothingEnabled=!1,w.drawImage(n,s.x*l,s.y*I,s.width*l,s.height*I,0,0,s.width*l,s.height*I)),m.toDataURL("image/png",1)}const D=o.useCallback(async()=>{var n;if(!b){A(!0);try{const s=J.dataURLtoFile(z,((n=S==null?void 0:S.file)==null?void 0:n.name)||"image.png");let m="";p.upload?m=await p.upload(s):m=URL.createObjectURL(s),e.chain().focus().setImageInline({src:m,inline:t,alt:f}).run(),g(!1),L({src:"",file:null}),M(),r()}catch(s){console.log("Error cropping image",s)}finally{A(!1)}}},[z,e,t,b,r,(a=S==null?void 0:S.file)==null?void 0:a.name,p]);function q(n){var s;n.preventDefault(),(s=C.current)==null||s.click()}const d=async n=>{var w;const s=(w=n==null?void 0:n.target)==null?void 0:w.files;if(!e||e.isDestroyed||s.length===0){n.target.value="";return}const m=re(s,{acceptMimes:p==null?void 0:p.acceptMimes,maxSize:p==null?void 0:p.maxSize,t:h,toast:x,onError:p.onError});if(m.length<=0){n.target.value="";return}const l=m[0],I=await J.readImageAsBase64(l);g(!0),L({src:I.src,file:l})},M=()=>{C.current&&(C.current.value="")};return i.jsxs(i.Fragment,{children:[i.jsx(U.Button,{className:"richtext-mt-1 richtext-w-full",disabled:c,onClick:q,size:"sm",children:h("editor.image.dialog.tab.uploadCrop")}),i.jsxs(R.Dialog,{open:j,onOpenChange:n=>{g(n),n||(L({src:"",file:null}),M())},children:[i.jsx(R.DialogTrigger,{}),i.jsxs(R.DialogContent,{children:[i.jsx(R.DialogTitle,{children:h("editor.image.dialog.tab.uploadCrop")}),i.jsx("div",{children:S.src&&i.jsx(oe,{className:"richtext-w-full",crop:N,onChange:n=>E(n),onComplete:n=>u(n),children:i.jsx("img",{alt:"Crop me",ref:v,src:S.src})})}),i.jsxs(R.DialogFooter,{children:[i.jsxs(U.Button,{disabled:b,onClick:()=>{g(!1),L({src:"",file:null}),M()},children:[h("editor.imageUpload.cancel"),i.jsx(B.IconComponent,{className:"richtext-ml-1",name:"Trash2"})]}),i.jsx(U.Button,{className:"richtext-w-fit",disabled:b||!N,onClick:D,children:b?i.jsxs(i.Fragment,{children:[h("editor.imageUpload.uploading"),i.jsx(B.IconComponent,{className:"richtext-ml-1 richtext-animate-spin",name:"Loader"})]}):i.jsxs(i.Fragment,{children:[h("editor.imageUpload.crop"),i.jsx(B.IconComponent,{className:"richtext-ml-1",name:"Crop"})]})})]})]})]}),i.jsx("input",{accept:((y=p==null?void 0:p.acceptMimes)==null?void 0:y.join(","))||"image/*",multiple:!1,onChange:d,ref:C,style:{display:"none"},type:"file"})]})}function xe(){const{t:e}=k.useLocale(),{toast:t}=te.useToast(),r=W.useEditorInstance(),c=H.useButtonProps($.name),{icon:f,tooltip:h}=(c==null?void 0:c.componentProps)??{},{editorDisabled:x}=H.useToggleActive(),[j,g]=o.useState(!1),[b,A]=o.useState(!1),v=H.useExtension($.name),N=d=>{g(d.detail)},[E,z]=o.useState(""),[_,C]=o.useState(""),S=o.useRef(null),L=(v==null?void 0:v.options.defaultInline)||!1,[T,p]=o.useState(L),u=o.useMemo(()=>v==null?void 0:v.options,[v]);o.useEffect(()=>{const d=k.listenEvent(k.EVENTS.UPLOAD_IMAGE(r.id),N);return()=>{d()}},[]);async function O(d){var y;const M=(y=d==null?void 0:d.target)==null?void 0:y.files;if(!r||r.isDestroyed||M.length===0||b){d.target.value="";return}const a=re(M,{acceptMimes:u==null?void 0:u.acceptMimes,maxSize:u==null?void 0:u.maxSize,t:e,toast:t,onError:u.onError});if(a.length<=0){d.target.value="";return}A(!0);try{if(u!=null&&u.multiple){const n=a.map(async m=>{let l="";return u.upload?l=await u.upload(m):l=URL.createObjectURL(m),l});(await Promise.all(n)).forEach(m=>{r.chain().focus().setImageInline({src:m,inline:T,alt:_}).run()})}else{const n=a[0];let s="";u.upload?s=await u.upload(n):s=URL.createObjectURL(n),r.chain().focus().setImageInline({src:s,inline:T,alt:_}).run()}g(!1),C(""),p(L)}catch(n){console.error("Error uploading image",n),u.onError?u.onError({type:"upload",message:e("editor.upload.error")}):t({variant:"destructive",title:e("editor.upload.error")})}finally{A(!1),d.target.value=""}}function D(d){d.preventDefault(),d.stopPropagation(),r.chain().focus().setImageInline({src:E,inline:T,alt:_}).run(),g(!1),p(L),z(""),C("")}function q(d){var M;d.preventDefault(),(M=S.current)==null||M.click()}return c?i.jsxs(R.Dialog,{onOpenChange:g,open:j,children:[i.jsx(R.DialogTrigger,{asChild:!0,children:i.jsx(le.ActionButton,{disabled:x,icon:f,tooltip:h,action:()=>{x||g(!0)}})}),i.jsxs(R.DialogContent,{children:[i.jsx(R.DialogTitle,{children:e("editor.image.dialog.title")}),i.jsxs(F.Tabs,{activationMode:"manual",defaultValue:u.resourceImage==="both"||u.resourceImage==="upload"?"upload":"link",children:[u.resourceImage==="both"&&i.jsxs(F.TabsList,{className:"richtext-grid richtext-w-full richtext-grid-cols-2",children:[i.jsx(F.TabsTrigger,{value:"upload",children:e("editor.image.dialog.tab.upload")}),i.jsx(F.TabsTrigger,{value:"link",children:e("editor.image.dialog.tab.url")})]}),i.jsxs("div",{className:"richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]",children:[i.jsx(ne,{checked:T,onCheckedChange:d=>{p(d)}}),i.jsx(K.Label,{children:e("editor.link.dialog.inline")})]}),u.enableAlt&&i.jsxs("div",{className:"richtext-my-[10px] ",children:[i.jsx(K.Label,{className:"mb-[6px]",children:e("editor.imageUpload.alt")}),i.jsx(Q.Input,{onChange:d=>C(d.target.value),required:!0,type:"text",value:_})]}),i.jsxs(F.TabsContent,{value:"upload",children:[i.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-[10px]",children:[i.jsx(U.Button,{className:"richtext-mt-1 richtext-w-full",disabled:b,onClick:q,size:"sm",children:b?i.jsxs(i.Fragment,{children:[e("editor.imageUpload.uploading"),i.jsx(B.IconComponent,{className:"richtext-ml-1 richtext-animate-spin",name:"Loader"})]}):e("editor.image.dialog.tab.upload")}),i.jsx(fe,{alt:_,disabled:b,editor:r,imageInline:T,onClose:()=>{ce.actionDialogImage.setOpen(r.id,!1),C("")}})]}),i.jsx("input",{accept:u.acceptMimes.join(",")||"image/*",multiple:u.multiple,onChange:O,ref:S,style:{display:"none"},type:"file"})]}),i.jsx(F.TabsContent,{value:"link",children:i.jsx("form",{onSubmit:D,children:i.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2",children:[i.jsx(Q.Input,{autoFocus:!0,onChange:d=>z(d.target.value),placeholder:e("editor.image.dialog.placeholder"),required:!0,type:"url",value:E}),i.jsx(U.Button,{type:"submit",children:e("editor.image.dialog.button.apply")})]})})})]})]})]}):i.jsx(i.Fragment,{})}const pe={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5,multiple:!0,resourceImage:"both",defaultInline:!1,enableAlt:!0},$=G.index_default.extend({group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){var e;return{...pe,...(e=this.parent)==null?void 0:e.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:t,extension:r,t:c})=>{var f,h;return{componentProps:{action:()=>!0,upload:r.options.upload,disabled:!((h=(f=t.can()).setImage)!=null&&h.call(f,{})),icon:"ImageUp",tooltip:c("editor.image.tooltip")}}}}},addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),flipX:{default:!1},flipY:{default:!1},width:{default:null,parseHTML:t=>{const r=t.style.width||t.getAttribute("width")||null;return r?Number.parseInt(r,10):null},renderHTML:t=>({width:t.width})},align:{default:"center",parseHTML:t=>t.getAttribute("align"),renderHTML:t=>({align:t.align})},inline:{default:!1,parseHTML:t=>!!t.getAttribute("inline"),renderHTML:t=>({inline:t.inline})},alt:{default:"",parseHTML:t=>t.getAttribute("alt"),renderHTML:t=>({alt:t.alt})}}},addNodeView(){return ee.ReactNodeViewRenderer(ge)},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setImageInline:t=>({commands:r})=>r.insertContent({type:this.name,attrs:{...t,inline:t.inline??this.options.defaultInline}}),updateImage:t=>({commands:r})=>r.updateAttributes(this.name,t),setAlignImage:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:e}){const{flipX:t,flipY:r,align:c,inline:f}=e,h=f&&(c==="left"||c==="right"),x=t||r?`transform: rotateX(${t?"180":"0"}deg) rotateY(${r?"180":"0"}deg);`:"",j=h?"":`text-align: ${c};`,A=`${h?`float: ${c};`:""}${h?c==="left"?"margin: 1em 1em 1em 0;":"margin: 1em 0 1em 1em;":""}${x}`;return[f?"span":"div",{style:j,class:"image"},["img",se.mergeAttributes({height:"auto",style:A},this.options.HTMLAttributes,e)]]},parseHTML(){return[{tag:"span.image img",getAttrs:e=>{var h;const t=e==null?void 0:e.parentElement,r=e==null?void 0:e.getAttribute("width"),c=(e==null?void 0:e.getAttribute("flipx"))||!1,f=(e==null?void 0:e.getAttribute("flipy"))||!1;return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),caption:e==null?void 0:e.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(e==null?void 0:e.getAttribute("align"))||((h=t==null?void 0:t.style)==null?void 0:h.textAlign)||null,inline:(e==null?void 0:e.getAttribute("inline"))||!1,flipX:c==="true",flipY:f==="true"}}},{tag:"div[class=image]",getAttrs:e=>{const t=e.querySelector("img"),r=t==null?void 0:t.getAttribute("width"),c=(t==null?void 0:t.getAttribute("flipx"))||!1,f=(t==null?void 0:t.getAttribute("flipy"))||!1;return{src:t==null?void 0:t.getAttribute("src"),alt:t==null?void 0:t.getAttribute("alt"),caption:t==null?void 0:t.getAttribute("caption"),width:r?Number.parseInt(r,10):null,align:(t==null?void 0:t.getAttribute("align"))||e.style.textAlign||null,inline:(t==null?void 0:t.getAttribute("inline"))||!1,flipX:c==="true",flipY:f==="true"}}},{tag:'img[src]:not([src^="data:"])'}]}});exports.Image=$;exports.RichTextImage=xe;
|
package/lib/Image.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
import { Node as Node_2 } from '@tiptap/core';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -92,7 +93,8 @@ export declare interface IImageOptions extends GeneralOptions<IImageOptions> {
|
|
|
92
93
|
|
|
93
94
|
declare const Image_2: Node_2<IImageOptions, any>;
|
|
94
95
|
export { Image_2 as Image }
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
export declare function RichTextImage(): JSX.Element;
|
|
96
98
|
|
|
97
99
|
export declare interface SetImageAttrsOptions {
|
|
98
100
|
src?: string;
|
|
@@ -145,11 +147,22 @@ declare module '@tiptap/core' {
|
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
|
|
150
|
+
declare module '@tiptap/core' {
|
|
151
|
+
interface Storage {
|
|
152
|
+
color: ColorStorage;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
148
157
|
declare module '@tiptap/core' {
|
|
149
158
|
interface Commands<ReturnType> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
columns: {
|
|
160
|
+
insertColumns: (attrs?: {
|
|
161
|
+
cols: number;
|
|
162
|
+
}) => ReturnType;
|
|
163
|
+
addColBefore: () => ReturnType;
|
|
164
|
+
addColAfter: () => ReturnType;
|
|
165
|
+
deleteCol: () => ReturnType;
|
|
153
166
|
};
|
|
154
167
|
}
|
|
155
168
|
}
|
|
@@ -157,8 +170,9 @@ declare module '@tiptap/core' {
|
|
|
157
170
|
|
|
158
171
|
declare module '@tiptap/core' {
|
|
159
172
|
interface Commands<ReturnType> {
|
|
160
|
-
|
|
161
|
-
|
|
173
|
+
drawer: {
|
|
174
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
175
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
162
176
|
};
|
|
163
177
|
}
|
|
164
178
|
}
|
|
@@ -176,7 +190,16 @@ declare module '@tiptap/core' {
|
|
|
176
190
|
declare module '@tiptap/core' {
|
|
177
191
|
interface Commands<ReturnType> {
|
|
178
192
|
exportWord: {
|
|
179
|
-
exportToWord: () => ReturnType;
|
|
193
|
+
exportToWord: (docState: any) => ReturnType;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
declare module '@tiptap/core' {
|
|
200
|
+
interface Commands<ReturnType> {
|
|
201
|
+
excalidraw: {
|
|
202
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
180
203
|
};
|
|
181
204
|
}
|
|
182
205
|
}
|
|
@@ -201,10 +224,8 @@ declare module '@tiptap/core' {
|
|
|
201
224
|
|
|
202
225
|
|
|
203
226
|
declare module '@tiptap/core' {
|
|
204
|
-
interface
|
|
205
|
-
|
|
206
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
207
|
-
};
|
|
227
|
+
interface Storage {
|
|
228
|
+
highlight: HighlightStorage;
|
|
208
229
|
}
|
|
209
230
|
}
|
|
210
231
|
|
|
@@ -289,16 +310,6 @@ declare module '@tiptap/core' {
|
|
|
289
310
|
}
|
|
290
311
|
|
|
291
312
|
|
|
292
|
-
declare module '@tiptap/core' {
|
|
293
|
-
interface Commands<ReturnType> {
|
|
294
|
-
lineHeight: {
|
|
295
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
296
|
-
unsetLineHeight: () => ReturnType;
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
313
|
declare module '@tiptap/core' {
|
|
303
314
|
interface Commands<ReturnType> {
|
|
304
315
|
mermaid: {
|
|
@@ -309,20 +320,6 @@ declare module '@tiptap/core' {
|
|
|
309
320
|
}
|
|
310
321
|
|
|
311
322
|
|
|
312
|
-
declare module '@tiptap/core' {
|
|
313
|
-
interface Commands<ReturnType> {
|
|
314
|
-
columns: {
|
|
315
|
-
insertColumns: (attrs?: {
|
|
316
|
-
cols: number;
|
|
317
|
-
}) => ReturnType;
|
|
318
|
-
addColBefore: () => ReturnType;
|
|
319
|
-
addColAfter: () => ReturnType;
|
|
320
|
-
deleteCol: () => ReturnType;
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
323
|
declare module '@tiptap/core' {
|
|
327
324
|
interface Commands<ReturnType> {
|
|
328
325
|
search: {
|
|
@@ -346,16 +343,6 @@ declare module '@tiptap/core' {
|
|
|
346
343
|
}
|
|
347
344
|
|
|
348
345
|
|
|
349
|
-
declare module '@tiptap/core' {
|
|
350
|
-
interface Commands<ReturnType> {
|
|
351
|
-
tableOfContents: {
|
|
352
|
-
setTableOfContents: () => ReturnType;
|
|
353
|
-
removeTableOfContents: () => ReturnType;
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
346
|
declare module '@tiptap/core' {
|
|
360
347
|
interface Commands<ReturnType> {
|
|
361
348
|
twitter: {
|
package/lib/Image.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
import { Node as Node_2 } from '@tiptap/core';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -92,7 +93,8 @@ export declare interface IImageOptions extends GeneralOptions<IImageOptions> {
|
|
|
92
93
|
|
|
93
94
|
declare const Image_2: Node_2<IImageOptions, any>;
|
|
94
95
|
export { Image_2 as Image }
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
export declare function RichTextImage(): JSX.Element;
|
|
96
98
|
|
|
97
99
|
export declare interface SetImageAttrsOptions {
|
|
98
100
|
src?: string;
|
|
@@ -145,11 +147,22 @@ declare module '@tiptap/core' {
|
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
|
|
150
|
+
declare module '@tiptap/core' {
|
|
151
|
+
interface Storage {
|
|
152
|
+
color: ColorStorage;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
148
157
|
declare module '@tiptap/core' {
|
|
149
158
|
interface Commands<ReturnType> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
columns: {
|
|
160
|
+
insertColumns: (attrs?: {
|
|
161
|
+
cols: number;
|
|
162
|
+
}) => ReturnType;
|
|
163
|
+
addColBefore: () => ReturnType;
|
|
164
|
+
addColAfter: () => ReturnType;
|
|
165
|
+
deleteCol: () => ReturnType;
|
|
153
166
|
};
|
|
154
167
|
}
|
|
155
168
|
}
|
|
@@ -157,8 +170,9 @@ declare module '@tiptap/core' {
|
|
|
157
170
|
|
|
158
171
|
declare module '@tiptap/core' {
|
|
159
172
|
interface Commands<ReturnType> {
|
|
160
|
-
|
|
161
|
-
|
|
173
|
+
drawer: {
|
|
174
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
175
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
162
176
|
};
|
|
163
177
|
}
|
|
164
178
|
}
|
|
@@ -176,7 +190,16 @@ declare module '@tiptap/core' {
|
|
|
176
190
|
declare module '@tiptap/core' {
|
|
177
191
|
interface Commands<ReturnType> {
|
|
178
192
|
exportWord: {
|
|
179
|
-
exportToWord: () => ReturnType;
|
|
193
|
+
exportToWord: (docState: any) => ReturnType;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
declare module '@tiptap/core' {
|
|
200
|
+
interface Commands<ReturnType> {
|
|
201
|
+
excalidraw: {
|
|
202
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
180
203
|
};
|
|
181
204
|
}
|
|
182
205
|
}
|
|
@@ -201,10 +224,8 @@ declare module '@tiptap/core' {
|
|
|
201
224
|
|
|
202
225
|
|
|
203
226
|
declare module '@tiptap/core' {
|
|
204
|
-
interface
|
|
205
|
-
|
|
206
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
207
|
-
};
|
|
227
|
+
interface Storage {
|
|
228
|
+
highlight: HighlightStorage;
|
|
208
229
|
}
|
|
209
230
|
}
|
|
210
231
|
|
|
@@ -289,16 +310,6 @@ declare module '@tiptap/core' {
|
|
|
289
310
|
}
|
|
290
311
|
|
|
291
312
|
|
|
292
|
-
declare module '@tiptap/core' {
|
|
293
|
-
interface Commands<ReturnType> {
|
|
294
|
-
lineHeight: {
|
|
295
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
296
|
-
unsetLineHeight: () => ReturnType;
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
313
|
declare module '@tiptap/core' {
|
|
303
314
|
interface Commands<ReturnType> {
|
|
304
315
|
mermaid: {
|
|
@@ -309,20 +320,6 @@ declare module '@tiptap/core' {
|
|
|
309
320
|
}
|
|
310
321
|
|
|
311
322
|
|
|
312
|
-
declare module '@tiptap/core' {
|
|
313
|
-
interface Commands<ReturnType> {
|
|
314
|
-
columns: {
|
|
315
|
-
insertColumns: (attrs?: {
|
|
316
|
-
cols: number;
|
|
317
|
-
}) => ReturnType;
|
|
318
|
-
addColBefore: () => ReturnType;
|
|
319
|
-
addColAfter: () => ReturnType;
|
|
320
|
-
deleteCol: () => ReturnType;
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
323
|
declare module '@tiptap/core' {
|
|
327
324
|
interface Commands<ReturnType> {
|
|
328
325
|
search: {
|
|
@@ -346,16 +343,6 @@ declare module '@tiptap/core' {
|
|
|
346
343
|
}
|
|
347
344
|
|
|
348
345
|
|
|
349
|
-
declare module '@tiptap/core' {
|
|
350
|
-
interface Commands<ReturnType> {
|
|
351
|
-
tableOfContents: {
|
|
352
|
-
setTableOfContents: () => ReturnType;
|
|
353
|
-
removeTableOfContents: () => ReturnType;
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
346
|
declare module '@tiptap/core' {
|
|
360
347
|
interface Commands<ReturnType> {
|
|
361
348
|
twitter: {
|