reactjs-tiptap-editor 0.4.2 → 1.0.1
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 +27 -39
- package/lib/Attachment.d.ts +27 -39
- package/lib/Attachment.js +129 -99
- package/lib/Blockquote.cjs +3 -3
- package/lib/Blockquote.d.cts +27 -39
- package/lib/Blockquote.d.ts +27 -39
- package/lib/Blockquote.js +50 -22
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +27 -39
- package/lib/Bold.d.ts +27 -39
- package/lib/Bold.js +48 -20
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +27 -39
- package/lib/BulletList.d.ts +27 -39
- package/lib/BulletList.js +38 -9
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +27 -39
- package/lib/Clear.d.ts +27 -39
- package/lib/Clear.js +32 -6
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +27 -39
- package/lib/Code.d.ts +27 -39
- package/lib/Code.js +53 -25
- package/lib/CodeBlock.cjs +35 -35
- package/lib/CodeBlock.d.cts +27 -39
- package/lib/CodeBlock.d.ts +27 -39
- package/lib/CodeBlock.js +605 -590
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +28 -40
- package/lib/CodeView.d.ts +28 -40
- package/lib/CodeView.js +49 -21
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +31 -39
- package/lib/Color.d.ts +31 -39
- package/lib/Color.js +123 -79
- package/lib/Column.cjs +1 -0
- package/lib/{Document.d.cts → Column.d.cts} +33 -42
- package/lib/{Document.d.ts → Column.d.ts} +33 -42
- 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 +27 -39
- package/lib/Drawer.d.ts +27 -39
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +27 -44
- package/lib/Emoji.d.ts +27 -44
- 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 +27 -39
- package/lib/Excalidraw.d.ts +27 -39
- package/lib/Excalidraw.js +6 -4
- package/lib/ExportPdf.cjs +5 -5
- package/lib/ExportPdf.d.cts +27 -39
- package/lib/ExportPdf.d.ts +27 -39
- package/lib/ExportPdf.js +60 -32
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +28 -40
- package/lib/ExportWord.d.ts +28 -40
- package/lib/ExportWord.js +84 -21
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +41 -42
- package/lib/FontFamily.d.ts +41 -42
- package/lib/FontFamily.js +72 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +38 -42
- package/lib/FontSize.d.ts +38 -42
- package/lib/FontSize.js +72 -64
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +41 -39
- package/lib/Heading.d.ts +41 -39
- package/lib/Heading.js +91 -73
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +31 -39
- package/lib/Highlight.d.ts +31 -39
- package/lib/Highlight.js +150 -19
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +29 -39
- package/lib/History.d.ts +29 -39
- package/lib/History.js +976 -53
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +27 -39
- package/lib/HorizontalRule.d.ts +27 -39
- 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 +26 -45
- package/lib/Iframe.d.ts +26 -45
- package/lib/Iframe.js +6 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +27 -40
- package/lib/Image.d.ts +27 -40
- package/lib/Image.js +848 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +28 -42
- package/lib/ImageGif.d.ts +28 -42
- package/lib/ImageGif.js +424 -5
- package/lib/ImportWord.cjs +48 -48
- package/lib/ImportWord.d.cts +28 -40
- package/lib/ImportWord.d.ts +28 -40
- package/lib/ImportWord.js +2759 -2751
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +27 -39
- package/lib/Indent.d.ts +27 -39
- package/lib/Indent.js +97 -27
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +27 -39
- package/lib/Italic.d.ts +27 -39
- 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 +27 -39
- package/lib/Katex.d.ts +27 -39
- package/lib/Katex.js +5 -196
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +29 -45
- package/lib/LineHeight.d.ts +29 -45
- package/lib/LineHeight.js +71 -112
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +28 -42
- package/lib/Link.d.ts +28 -42
- 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 +24 -39
- package/lib/Mention.d.ts +24 -39
- package/lib/Mention.js +112 -124
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +27 -39
- package/lib/Mermaid.d.ts +27 -39
- package/lib/Mermaid.js +177 -165
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +42 -41
- package/lib/MoreMark.d.ts +42 -41
- package/lib/MoreMark.js +125 -55
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +27 -39
- package/lib/OrderedList.d.ts +27 -39
- package/lib/OrderedList.js +37 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +27 -42
- package/lib/SearchAndReplace.d.ts +27 -42
- package/lib/SearchAndReplace.js +221 -197
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -46
- package/lib/SlashCommand.d.ts +39 -46
- package/lib/SlashCommand.js +235 -249
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +27 -39
- package/lib/Strike.d.ts +27 -39
- 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 +28 -42
- package/lib/Table.d.ts +28 -42
- package/lib/Table.js +3 -558
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +27 -39
- package/lib/TaskList.d.ts +27 -39
- package/lib/TaskList.js +38 -10
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +40 -39
- package/lib/TextAlign.d.ts +40 -39
- package/lib/TextAlign.js +108 -101
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +56 -39
- package/lib/TextDirection.d.ts +56 -39
- package/lib/TextDirection.js +105 -112
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +27 -39
- package/lib/TextUnderline.d.ts +27 -39
- 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 +27 -39
- package/lib/Twitter.d.ts +27 -39
- package/lib/Twitter.js +5 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +27 -39
- package/lib/Video.d.ts +27 -39
- 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} +53 -54
- package/lib/{bubble-extra.d.ts → bubble.d.ts} +53 -54
- 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 +29 -280
- package/lib/index.d.ts +29 -280
- 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 +5405 -57
- package/lib/locale-bundle.d.ts +5405 -57
- 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/Heading.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
1
2
|
import { Editor } from '@tiptap/react';
|
|
2
3
|
import { Extension } from '@tiptap/core';
|
|
3
4
|
import { HeadingOptions as HeadingOptions_2 } from '@tiptap/extension-heading';
|
|
5
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
6
|
import { Node as Node_2 } from '@tiptap/core';
|
|
5
7
|
|
|
6
8
|
/**
|
|
@@ -77,6 +79,21 @@ export declare const Heading: Node_2<HeadingOptions, any>;
|
|
|
77
79
|
export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
|
|
78
80
|
}
|
|
79
81
|
|
|
82
|
+
export declare interface Item {
|
|
83
|
+
title: string;
|
|
84
|
+
icon?: any;
|
|
85
|
+
level?: number;
|
|
86
|
+
isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
|
|
87
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
88
|
+
style?: default_2.CSSProperties;
|
|
89
|
+
shortcutKeys?: string[];
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
divider?: boolean;
|
|
92
|
+
default?: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare function RichTextHeading(): JSX.Element;
|
|
96
|
+
|
|
80
97
|
export { }
|
|
81
98
|
|
|
82
99
|
|
|
@@ -110,6 +127,27 @@ declare module '@tiptap/core' {
|
|
|
110
127
|
}
|
|
111
128
|
|
|
112
129
|
|
|
130
|
+
declare module '@tiptap/core' {
|
|
131
|
+
interface Storage {
|
|
132
|
+
color: ColorStorage;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
declare module '@tiptap/core' {
|
|
138
|
+
interface Commands<ReturnType> {
|
|
139
|
+
columns: {
|
|
140
|
+
insertColumns: (attrs?: {
|
|
141
|
+
cols: number;
|
|
142
|
+
}) => ReturnType;
|
|
143
|
+
addColBefore: () => ReturnType;
|
|
144
|
+
addColAfter: () => ReturnType;
|
|
145
|
+
deleteCol: () => ReturnType;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
113
151
|
declare module '@tiptap/core' {
|
|
114
152
|
interface Commands<ReturnType> {
|
|
115
153
|
drawer: {
|
|
@@ -141,7 +179,7 @@ declare module '@tiptap/core' {
|
|
|
141
179
|
declare module '@tiptap/core' {
|
|
142
180
|
interface Commands<ReturnType> {
|
|
143
181
|
exportWord: {
|
|
144
|
-
exportToWord: () => ReturnType;
|
|
182
|
+
exportToWord: (docState: any) => ReturnType;
|
|
145
183
|
};
|
|
146
184
|
}
|
|
147
185
|
}
|
|
@@ -166,10 +204,8 @@ declare module '@tiptap/core' {
|
|
|
166
204
|
|
|
167
205
|
|
|
168
206
|
declare module '@tiptap/core' {
|
|
169
|
-
interface
|
|
170
|
-
|
|
171
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
172
|
-
};
|
|
207
|
+
interface Storage {
|
|
208
|
+
highlight: HighlightStorage;
|
|
173
209
|
}
|
|
174
210
|
}
|
|
175
211
|
|
|
@@ -254,16 +290,6 @@ declare module '@tiptap/core' {
|
|
|
254
290
|
}
|
|
255
291
|
|
|
256
292
|
|
|
257
|
-
declare module '@tiptap/core' {
|
|
258
|
-
interface Commands<ReturnType> {
|
|
259
|
-
lineHeight: {
|
|
260
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
261
|
-
unsetLineHeight: () => ReturnType;
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
293
|
declare module '@tiptap/core' {
|
|
268
294
|
interface Commands<ReturnType> {
|
|
269
295
|
mermaid: {
|
|
@@ -274,20 +300,6 @@ declare module '@tiptap/core' {
|
|
|
274
300
|
}
|
|
275
301
|
|
|
276
302
|
|
|
277
|
-
declare module '@tiptap/core' {
|
|
278
|
-
interface Commands<ReturnType> {
|
|
279
|
-
columns: {
|
|
280
|
-
insertColumns: (attrs?: {
|
|
281
|
-
cols: number;
|
|
282
|
-
}) => ReturnType;
|
|
283
|
-
addColBefore: () => ReturnType;
|
|
284
|
-
addColAfter: () => ReturnType;
|
|
285
|
-
deleteCol: () => ReturnType;
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
303
|
declare module '@tiptap/core' {
|
|
292
304
|
interface Commands<ReturnType> {
|
|
293
305
|
search: {
|
|
@@ -311,16 +323,6 @@ declare module '@tiptap/core' {
|
|
|
311
323
|
}
|
|
312
324
|
|
|
313
325
|
|
|
314
|
-
declare module '@tiptap/core' {
|
|
315
|
-
interface Commands<ReturnType> {
|
|
316
|
-
tableOfContents: {
|
|
317
|
-
setTableOfContents: () => ReturnType;
|
|
318
|
-
removeTableOfContents: () => ReturnType;
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
326
|
declare module '@tiptap/core' {
|
|
325
327
|
interface Commands<ReturnType> {
|
|
326
328
|
twitter: {
|
package/lib/Heading.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { N as f, t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { N as f, t as m, m as A } from "./index-DnWWK9F_.js";
|
|
2
|
+
import { u as M, H } from "./index-DYkucCoF.js";
|
|
3
|
+
import { jsx as d, Fragment as b, jsxs as g } from "react/jsx-runtime";
|
|
4
|
+
import { useMemo as $, Fragment as w } from "react";
|
|
5
|
+
import { A as x } from "./ActionMenuButton-BKOg7hkq.js";
|
|
6
|
+
import { c as D } from "./index-BPfVXs5_.js";
|
|
7
|
+
import { u as y, b as N, h as k } from "./useButtonProps-BsEd4zYM.js";
|
|
8
|
+
import { D as L, a as C, b as T, c as I, e as K, d as P } from "./dropdown-menu-BPp2Z_U-.js";
|
|
9
|
+
var R = f.create({
|
|
7
10
|
name: "heading",
|
|
8
11
|
addOptions() {
|
|
9
12
|
return {
|
|
@@ -29,13 +32,13 @@ var D = f.create({
|
|
|
29
32
|
}));
|
|
30
33
|
},
|
|
31
34
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
32
|
-
return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`,
|
|
35
|
+
return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, A(this.options.HTMLAttributes, t), 0];
|
|
33
36
|
},
|
|
34
37
|
parseMarkdown: (e, t) => t.createNode("heading", { level: e.depth || 1 }, t.parseInline(e.tokens || [])),
|
|
35
38
|
renderMarkdown: (e, t) => {
|
|
36
39
|
var a;
|
|
37
|
-
const
|
|
38
|
-
return e.content ? `${
|
|
40
|
+
const s = (a = e.attrs) != null && a.level ? parseInt(e.attrs.level, 10) : 1, i = "#".repeat(s);
|
|
41
|
+
return e.content ? `${i} ${t.renderChildren(e.content)}` : "";
|
|
39
42
|
},
|
|
40
43
|
addCommands() {
|
|
41
44
|
return {
|
|
@@ -53,7 +56,7 @@ var D = f.create({
|
|
|
53
56
|
);
|
|
54
57
|
},
|
|
55
58
|
addInputRules() {
|
|
56
|
-
return this.options.levels.map((e) =>
|
|
59
|
+
return this.options.levels.map((e) => m({
|
|
57
60
|
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
58
61
|
type: this.type,
|
|
59
62
|
getAttributes: {
|
|
@@ -62,95 +65,109 @@ var D = f.create({
|
|
|
62
65
|
}));
|
|
63
66
|
}
|
|
64
67
|
});
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
title: e.tooltip,
|
|
74
|
-
level: 0,
|
|
75
|
-
isActive: () => !1
|
|
76
|
-
};
|
|
77
|
-
}, [e]);
|
|
78
|
-
return /* @__PURE__ */ c(x, { children: [
|
|
68
|
+
function z() {
|
|
69
|
+
const { t: e } = M(), t = y(S.name), {
|
|
70
|
+
icon: a = void 0,
|
|
71
|
+
tooltip: s = void 0,
|
|
72
|
+
isActive: i = void 0,
|
|
73
|
+
items: o = []
|
|
74
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { disabled: h, dataState: l } = N(i), r = $(() => (l == null ? void 0 : l.title) || e("editor.paragraph.tooltip"), [l]);
|
|
75
|
+
return t ? /* @__PURE__ */ g(L, { children: [
|
|
79
76
|
/* @__PURE__ */ d(
|
|
80
|
-
|
|
77
|
+
C,
|
|
81
78
|
{
|
|
82
79
|
asChild: !0,
|
|
83
|
-
disabled:
|
|
80
|
+
disabled: h,
|
|
84
81
|
children: /* @__PURE__ */ d(
|
|
85
|
-
|
|
82
|
+
x,
|
|
86
83
|
{
|
|
87
|
-
disabled:
|
|
88
|
-
icon:
|
|
89
|
-
title:
|
|
90
|
-
tooltip:
|
|
91
|
-
tooltipOptions: e == null ? void 0 : e.tooltipOptions
|
|
84
|
+
disabled: h,
|
|
85
|
+
icon: a,
|
|
86
|
+
title: r,
|
|
87
|
+
tooltip: s
|
|
92
88
|
}
|
|
93
89
|
)
|
|
94
90
|
}
|
|
95
91
|
),
|
|
96
|
-
/* @__PURE__ */ d(
|
|
97
|
-
var
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
92
|
+
/* @__PURE__ */ d(T, { className: "richtext-w-full", children: o == null ? void 0 : o.map((n, c) => {
|
|
93
|
+
var u, p;
|
|
94
|
+
return /* @__PURE__ */ g(w, { children: [
|
|
95
|
+
/* @__PURE__ */ g(
|
|
96
|
+
I,
|
|
101
97
|
{
|
|
102
|
-
checked:
|
|
98
|
+
checked: r === n.title,
|
|
103
99
|
onClick: n.action,
|
|
104
100
|
children: [
|
|
105
|
-
/* @__PURE__ */ d(
|
|
106
|
-
|
|
101
|
+
/* @__PURE__ */ d(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: D("richtext-ml-1 richtext-h-full", {
|
|
105
|
+
"": n.level === "Paragraph",
|
|
106
|
+
"heading-1": n.level === 1,
|
|
107
|
+
"heading-2": n.level === 2,
|
|
108
|
+
"heading-3": n.level === 3,
|
|
109
|
+
"heading-4": n.level === 4,
|
|
110
|
+
"heading-5": n.level === 5,
|
|
111
|
+
"heading-6": n.level === 6
|
|
112
|
+
}),
|
|
113
|
+
children: n.title
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
!!((u = n == null ? void 0 : n.shortcutKeys) != null && u.length) && /* @__PURE__ */ d(K, { className: "richtext-pl-4", children: (p = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : p.map((v) => k(v)).join(" ") })
|
|
107
117
|
]
|
|
108
118
|
}
|
|
109
119
|
),
|
|
110
|
-
n.level ===
|
|
111
|
-
] }, `heading-k-${
|
|
120
|
+
n.level === "Paragraph" && /* @__PURE__ */ d(P, {})
|
|
121
|
+
] }, `heading-k-${c}`);
|
|
112
122
|
}) })
|
|
113
|
-
] });
|
|
123
|
+
] }) : /* @__PURE__ */ d(b, {});
|
|
114
124
|
}
|
|
115
|
-
const
|
|
125
|
+
const S = /* @__PURE__ */ R.extend({
|
|
116
126
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
117
127
|
//@ts-expect-error
|
|
118
128
|
addOptions() {
|
|
119
129
|
var e;
|
|
120
130
|
return {
|
|
121
131
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
122
|
-
levels:
|
|
123
|
-
button({ editor: t, extension: a, t:
|
|
124
|
-
var
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var g;
|
|
132
|
+
levels: H,
|
|
133
|
+
button({ editor: t, extension: a, t: s }) {
|
|
134
|
+
var l;
|
|
135
|
+
const i = ((l = a.options) == null ? void 0 : l.levels) || [], o = i.map((r) => {
|
|
136
|
+
var c;
|
|
137
|
+
const n = r === "Paragraph";
|
|
129
138
|
return {
|
|
130
|
-
action: () =>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
action: () => {
|
|
140
|
+
if (n) {
|
|
141
|
+
const u = i.find((p) => t.isActive("heading", { level: p }));
|
|
142
|
+
u && u !== "Paragraph" && t.commands.toggleHeading({ level: u });
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
t.commands.toggleHeading({ level: r });
|
|
146
|
+
},
|
|
147
|
+
isActive: () => n ? !1 : t.isActive("heading", { level: r }) || !1,
|
|
148
|
+
disabled: !t.can().toggleHeading({ level: r }),
|
|
149
|
+
title: s(n ? "editor.paragraph.tooltip" : `editor.heading.h${r}.tooltip`),
|
|
150
|
+
level: r,
|
|
151
|
+
shortcutKeys: ((c = a.options.shortcutKeys) == null ? void 0 : c[r]) ?? ["alt", "mod", `${r}`],
|
|
152
|
+
default: n
|
|
136
153
|
};
|
|
137
|
-
});
|
|
138
|
-
l && l.options.paragraph !== !1 && r.unshift({
|
|
139
|
-
action: () => t.commands.setParagraph(),
|
|
140
|
-
isActive: () => t.isActive("paragraph") || !1,
|
|
141
|
-
disabled: !t.can().setParagraph(),
|
|
142
|
-
level: 0,
|
|
143
|
-
title: n("editor.paragraph.tooltip"),
|
|
144
|
-
shortcutKeys: ((u = a.options.shortcutKeys) == null ? void 0 : u[0]) ?? ["alt", "mod", "0"]
|
|
145
|
-
});
|
|
146
|
-
const m = r.filter((i) => i.disabled).length === r.length;
|
|
154
|
+
}), h = o.filter((r) => r.disabled).length === o.length;
|
|
147
155
|
return {
|
|
148
|
-
component:
|
|
156
|
+
// component: HeadingButton,
|
|
149
157
|
componentProps: {
|
|
150
|
-
tooltip:
|
|
151
|
-
disabled:
|
|
152
|
-
items:
|
|
153
|
-
|
|
158
|
+
tooltip: s("editor.heading.tooltip"),
|
|
159
|
+
disabled: h,
|
|
160
|
+
items: o,
|
|
161
|
+
icon: "MenuDown",
|
|
162
|
+
isActive: () => {
|
|
163
|
+
const r = o == null ? void 0 : o.find((c) => c.isActive());
|
|
164
|
+
return r && !r.default ? r : {
|
|
165
|
+
title: s("editor.paragraph.tooltip"),
|
|
166
|
+
level: 0,
|
|
167
|
+
isActive: () => !1
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
levels: i
|
|
154
171
|
}
|
|
155
172
|
};
|
|
156
173
|
}
|
|
@@ -158,5 +175,6 @@ const O = /* @__PURE__ */ D.extend({
|
|
|
158
175
|
}
|
|
159
176
|
});
|
|
160
177
|
export {
|
|
161
|
-
|
|
178
|
+
S as Heading,
|
|
179
|
+
z as RichTextHeading
|
|
162
180
|
};
|
package/lib/Highlight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-RfTlOzIr.cjs"),e=require("react/jsx-runtime"),x=require("react"),C=require("./toggle-D41PzQLJ.cjs"),m=require("./separator-DRIrVZ2N.cjs");require("./index-DV5kbgRU.cjs");const L=require("./Icon-DUpv2cI6.cjs"),a=require("./useButtonProps-C6Vpn190.cjs"),H=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,M=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,v=l.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",l.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:r})=>r.setMark(this.name,t),toggleHighlight:t=>({commands:r})=>r.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[l.markInputRule({find:H,type:this.type})]},addPasteRules(){return[l.markPasteRule({find:M,type:this.type})]}});function j({fill:t}){return e.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 256 256",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:e.jsxs("g",{id:"icon/背景颜色",children:[e.jsx("g",{fill:"currentColor",children:e.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",children:[e.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),e.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),e.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),e.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:typeof t=="string"?t:"none",id:"矩形"})]})})})}function y(){const t=a.useButtonProps(d.name),{tooltip:r=void 0,isActive:s=void 0,defaultColor:i=void 0,colors:o,action:n,shortcutKeys:g}=(t==null?void 0:t.componentProps)??{},{editorDisabled:h}=a.useActive(s),[u,f]=x.useState(i);function p(c){h||n&&(n==null||n(c),f(c))}return t?e.jsx(m.ColorPicker,{colors:o,disabled:h,highlight:!0,onChange:p,value:u,children:e.jsx(C.ActionButton,{disabled:h,tooltip:r,shortcutKeys:g,children:e.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[e.jsx(j,{fill:u}),e.jsx(L.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):e.jsx(e.Fragment,{})}const d=v.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:r,t:s,extension:i})=>({componentProps:{action:o=>{if(typeof o=="string"){r.storage.highlight.currentColor=o,r.chain().focus().setHighlight({color:o}).run();return}r.chain().focus().unsetHighlight().run()},isActive:()=>r.isActive("highlight")||!1,disabled:!1,shortcutKeys:i.options.shortcutKeys??["⇧","mod","H"],tooltip:s("editor.highlight.tooltip"),defaultColor:i.options.defaultColor}})}},addKeyboardShortcuts(){var t;return{...(t=this.parent)==null?void 0:t.call(this),"Mod-Shift-h":()=>{const r=this.storage.currentColor||this.options.defaultColor;if(!r){const{color:i}=this.editor.getAttributes("highlight");return i?this.editor.chain().focus().unsetHighlight().run():!1}return this.editor.isActive("highlight",{color:r})?this.editor.chain().focus().unsetHighlight().run():this.editor.chain().focus().setHighlight({color:r}).run()}}}});exports.Highlight=d;exports.RichTextHighlight=y;
|
package/lib/Highlight.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
3
|
import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
import { Mark } from '@tiptap/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -82,6 +83,12 @@ export declare interface HighlightOptions extends HighlightOptions_2, GeneralOpt
|
|
|
82
83
|
defaultColor?: string;
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
export declare interface HighlightStorage {
|
|
87
|
+
currentColor?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare function RichTextHighlight(): JSX.Element;
|
|
91
|
+
|
|
85
92
|
export { }
|
|
86
93
|
|
|
87
94
|
|
|
@@ -115,6 +122,27 @@ declare module '@tiptap/core' {
|
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
|
|
125
|
+
declare module '@tiptap/core' {
|
|
126
|
+
interface Storage {
|
|
127
|
+
color: ColorStorage;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
declare module '@tiptap/core' {
|
|
133
|
+
interface Commands<ReturnType> {
|
|
134
|
+
columns: {
|
|
135
|
+
insertColumns: (attrs?: {
|
|
136
|
+
cols: number;
|
|
137
|
+
}) => ReturnType;
|
|
138
|
+
addColBefore: () => ReturnType;
|
|
139
|
+
addColAfter: () => ReturnType;
|
|
140
|
+
deleteCol: () => ReturnType;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
118
146
|
declare module '@tiptap/core' {
|
|
119
147
|
interface Commands<ReturnType> {
|
|
120
148
|
drawer: {
|
|
@@ -146,7 +174,7 @@ declare module '@tiptap/core' {
|
|
|
146
174
|
declare module '@tiptap/core' {
|
|
147
175
|
interface Commands<ReturnType> {
|
|
148
176
|
exportWord: {
|
|
149
|
-
exportToWord: () => ReturnType;
|
|
177
|
+
exportToWord: (docState: any) => ReturnType;
|
|
150
178
|
};
|
|
151
179
|
}
|
|
152
180
|
}
|
|
@@ -171,10 +199,8 @@ declare module '@tiptap/core' {
|
|
|
171
199
|
|
|
172
200
|
|
|
173
201
|
declare module '@tiptap/core' {
|
|
174
|
-
interface
|
|
175
|
-
|
|
176
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
177
|
-
};
|
|
202
|
+
interface Storage {
|
|
203
|
+
highlight: HighlightStorage;
|
|
178
204
|
}
|
|
179
205
|
}
|
|
180
206
|
|
|
@@ -259,16 +285,6 @@ declare module '@tiptap/core' {
|
|
|
259
285
|
}
|
|
260
286
|
|
|
261
287
|
|
|
262
|
-
declare module '@tiptap/core' {
|
|
263
|
-
interface Commands<ReturnType> {
|
|
264
|
-
lineHeight: {
|
|
265
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
266
|
-
unsetLineHeight: () => ReturnType;
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
288
|
declare module '@tiptap/core' {
|
|
273
289
|
interface Commands<ReturnType> {
|
|
274
290
|
mermaid: {
|
|
@@ -279,20 +295,6 @@ declare module '@tiptap/core' {
|
|
|
279
295
|
}
|
|
280
296
|
|
|
281
297
|
|
|
282
|
-
declare module '@tiptap/core' {
|
|
283
|
-
interface Commands<ReturnType> {
|
|
284
|
-
columns: {
|
|
285
|
-
insertColumns: (attrs?: {
|
|
286
|
-
cols: number;
|
|
287
|
-
}) => ReturnType;
|
|
288
|
-
addColBefore: () => ReturnType;
|
|
289
|
-
addColAfter: () => ReturnType;
|
|
290
|
-
deleteCol: () => ReturnType;
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
298
|
declare module '@tiptap/core' {
|
|
297
299
|
interface Commands<ReturnType> {
|
|
298
300
|
search: {
|
|
@@ -316,16 +318,6 @@ declare module '@tiptap/core' {
|
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
|
|
319
|
-
declare module '@tiptap/core' {
|
|
320
|
-
interface Commands<ReturnType> {
|
|
321
|
-
tableOfContents: {
|
|
322
|
-
setTableOfContents: () => ReturnType;
|
|
323
|
-
removeTableOfContents: () => ReturnType;
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
321
|
declare module '@tiptap/core' {
|
|
330
322
|
interface Commands<ReturnType> {
|
|
331
323
|
twitter: {
|
package/lib/Highlight.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
3
|
import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
import { Mark } from '@tiptap/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -82,6 +83,12 @@ export declare interface HighlightOptions extends HighlightOptions_2, GeneralOpt
|
|
|
82
83
|
defaultColor?: string;
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
export declare interface HighlightStorage {
|
|
87
|
+
currentColor?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare function RichTextHighlight(): JSX.Element;
|
|
91
|
+
|
|
85
92
|
export { }
|
|
86
93
|
|
|
87
94
|
|
|
@@ -115,6 +122,27 @@ declare module '@tiptap/core' {
|
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
|
|
125
|
+
declare module '@tiptap/core' {
|
|
126
|
+
interface Storage {
|
|
127
|
+
color: ColorStorage;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
declare module '@tiptap/core' {
|
|
133
|
+
interface Commands<ReturnType> {
|
|
134
|
+
columns: {
|
|
135
|
+
insertColumns: (attrs?: {
|
|
136
|
+
cols: number;
|
|
137
|
+
}) => ReturnType;
|
|
138
|
+
addColBefore: () => ReturnType;
|
|
139
|
+
addColAfter: () => ReturnType;
|
|
140
|
+
deleteCol: () => ReturnType;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
118
146
|
declare module '@tiptap/core' {
|
|
119
147
|
interface Commands<ReturnType> {
|
|
120
148
|
drawer: {
|
|
@@ -146,7 +174,7 @@ declare module '@tiptap/core' {
|
|
|
146
174
|
declare module '@tiptap/core' {
|
|
147
175
|
interface Commands<ReturnType> {
|
|
148
176
|
exportWord: {
|
|
149
|
-
exportToWord: () => ReturnType;
|
|
177
|
+
exportToWord: (docState: any) => ReturnType;
|
|
150
178
|
};
|
|
151
179
|
}
|
|
152
180
|
}
|
|
@@ -171,10 +199,8 @@ declare module '@tiptap/core' {
|
|
|
171
199
|
|
|
172
200
|
|
|
173
201
|
declare module '@tiptap/core' {
|
|
174
|
-
interface
|
|
175
|
-
|
|
176
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
177
|
-
};
|
|
202
|
+
interface Storage {
|
|
203
|
+
highlight: HighlightStorage;
|
|
178
204
|
}
|
|
179
205
|
}
|
|
180
206
|
|
|
@@ -259,16 +285,6 @@ declare module '@tiptap/core' {
|
|
|
259
285
|
}
|
|
260
286
|
|
|
261
287
|
|
|
262
|
-
declare module '@tiptap/core' {
|
|
263
|
-
interface Commands<ReturnType> {
|
|
264
|
-
lineHeight: {
|
|
265
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
266
|
-
unsetLineHeight: () => ReturnType;
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
288
|
declare module '@tiptap/core' {
|
|
273
289
|
interface Commands<ReturnType> {
|
|
274
290
|
mermaid: {
|
|
@@ -279,20 +295,6 @@ declare module '@tiptap/core' {
|
|
|
279
295
|
}
|
|
280
296
|
|
|
281
297
|
|
|
282
|
-
declare module '@tiptap/core' {
|
|
283
|
-
interface Commands<ReturnType> {
|
|
284
|
-
columns: {
|
|
285
|
-
insertColumns: (attrs?: {
|
|
286
|
-
cols: number;
|
|
287
|
-
}) => ReturnType;
|
|
288
|
-
addColBefore: () => ReturnType;
|
|
289
|
-
addColAfter: () => ReturnType;
|
|
290
|
-
deleteCol: () => ReturnType;
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
298
|
declare module '@tiptap/core' {
|
|
297
299
|
interface Commands<ReturnType> {
|
|
298
300
|
search: {
|
|
@@ -316,16 +318,6 @@ declare module '@tiptap/core' {
|
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
|
|
319
|
-
declare module '@tiptap/core' {
|
|
320
|
-
interface Commands<ReturnType> {
|
|
321
|
-
tableOfContents: {
|
|
322
|
-
setTableOfContents: () => ReturnType;
|
|
323
|
-
removeTableOfContents: () => ReturnType;
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
321
|
declare module '@tiptap/core' {
|
|
330
322
|
interface Commands<ReturnType> {
|
|
331
323
|
twitter: {
|