reactjs-tiptap-editor-pro 0.2.31 → 0.2.32

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.
Files changed (333) hide show
  1. package/lib/RichTextEditor-BwbqJLnA.cjs +141 -0
  2. package/lib/RichTextEditor-iGJ6-rbq.js +8833 -0
  3. package/lib/extension-bundle.cjs +33 -0
  4. package/lib/extension-bundle.d.cts +947 -0
  5. package/lib/extension-bundle.d.ts +947 -0
  6. package/lib/extension-bundle.js +5755 -0
  7. package/lib/index-DV-nXpU1.cjs +1 -0
  8. package/lib/index-M6H3FoBi.js +1147 -0
  9. package/lib/index.cjs +1 -0
  10. package/lib/index.d.cts +513 -0
  11. package/lib/index.d.ts +513 -0
  12. package/lib/index.js +16 -0
  13. package/lib/locale-bundle.cjs +1 -0
  14. package/lib/locale-bundle.d.cts +1140 -0
  15. package/lib/locale-bundle.d.ts +1140 -0
  16. package/lib/locale-bundle.js +9 -0
  17. package/lib/style.css +1 -0
  18. package/lib/tiptap-DkWHMWDt.js +6061 -0
  19. package/lib/tiptap-gBG-1T-V.cjs +116 -0
  20. package/lib/vendor-BJ0Yf78E.cjs +8114 -0
  21. package/lib/vendor-Cpa6z-M0.js +67575 -0
  22. package/package.json +58 -5
  23. package/src/components/ActionButton.tsx +0 -103
  24. package/src/components/ActionMenuButton.tsx +0 -76
  25. package/src/components/BubbleMenu.tsx +0 -93
  26. package/src/components/CharactorCount.tsx +0 -50
  27. package/src/components/ColorPicker.tsx +0 -272
  28. package/src/components/RichTextEditor.tsx +0 -212
  29. package/src/components/SizeSetter/SizeSetter.tsx +0 -102
  30. package/src/components/Toolbar.tsx +0 -108
  31. package/src/components/icons/Activity.tsx +0 -19
  32. package/src/components/icons/Animas.tsx +0 -24
  33. package/src/components/icons/AspectRatio.tsx +0 -13
  34. package/src/components/icons/Blockquote.tsx +0 -17
  35. package/src/components/icons/ColumnAddLeft.tsx +0 -7
  36. package/src/components/icons/ColumnAddRight.tsx +0 -7
  37. package/src/components/icons/DeleteColumn.tsx +0 -26
  38. package/src/components/icons/DeleteRow.tsx +0 -26
  39. package/src/components/icons/Direction.tsx +0 -7
  40. package/src/components/icons/Excalidraw.tsx +0 -7
  41. package/src/components/icons/ExportPdf.tsx +0 -8
  42. package/src/components/icons/ExportWord.tsx +0 -24
  43. package/src/components/icons/FileWordOutline.tsx +0 -13
  44. package/src/components/icons/Flag.tsx +0 -19
  45. package/src/components/icons/Food.tsx +0 -20
  46. package/src/components/icons/GIfIcon.tsx +0 -10
  47. package/src/components/icons/Icon.tsx +0 -30
  48. package/src/components/icons/ImportWord.tsx +0 -23
  49. package/src/components/icons/LeftToRight.tsx +0 -7
  50. package/src/components/icons/LineHeight.tsx +0 -13
  51. package/src/components/icons/MenuDown.tsx +0 -24
  52. package/src/components/icons/Mermaid.tsx +0 -13
  53. package/src/components/icons/NoFill.tsx +0 -7
  54. package/src/components/icons/Object.tsx +0 -24
  55. package/src/components/icons/RightToLeft.tsx +0 -7
  56. package/src/components/icons/SizeL.tsx +0 -9
  57. package/src/components/icons/SizeM.tsx +0 -13
  58. package/src/components/icons/SizeS.tsx +0 -13
  59. package/src/components/icons/Symbol.tsx +0 -19
  60. package/src/components/icons/Travel.tsx +0 -24
  61. package/src/components/icons/Twitter.tsx +0 -7
  62. package/src/components/icons/icons.ts +0 -212
  63. package/src/components/icons/index.ts +0 -12
  64. package/src/components/index.ts +0 -9
  65. package/src/components/menus/bubble.ts +0 -395
  66. package/src/components/menus/components/BubbleMenuContent.tsx +0 -15
  67. package/src/components/menus/components/BubbleMenuDrawer.tsx +0 -128
  68. package/src/components/menus/components/BubbleMenuExcalidraw.tsx +0 -91
  69. package/src/components/menus/components/BubbleMenuIframe.tsx +0 -143
  70. package/src/components/menus/components/BubbleMenuKatex.tsx +0 -136
  71. package/src/components/menus/components/BubbleMenuLink.tsx +0 -99
  72. package/src/components/menus/components/BubbleMenuMedia.tsx +0 -235
  73. package/src/components/menus/components/BubbleMenuMermaid.tsx +0 -128
  74. package/src/components/menus/components/BubbleMenuText.tsx +0 -102
  75. package/src/components/menus/components/BubbleMenuTwitter.tsx +0 -91
  76. package/src/components/menus/components/ColumnsBubbleMenu.tsx +0 -59
  77. package/src/components/menus/components/ContentMenu.tsx +0 -396
  78. package/src/components/menus/components/TableBubbleMenu.tsx +0 -362
  79. package/src/components/menus/index.ts +0 -7
  80. package/src/components/ui/button.tsx +0 -56
  81. package/src/components/ui/checkbox.tsx +0 -30
  82. package/src/components/ui/dialog.tsx +0 -128
  83. package/src/components/ui/dropdown-menu.tsx +0 -203
  84. package/src/components/ui/emoji-picker.tsx +0 -166
  85. package/src/components/ui/index.ts +0 -14
  86. package/src/components/ui/input.tsx +0 -25
  87. package/src/components/ui/label.tsx +0 -26
  88. package/src/components/ui/popover.tsx +0 -31
  89. package/src/components/ui/select.tsx +0 -162
  90. package/src/components/ui/separator.tsx +0 -31
  91. package/src/components/ui/switch.tsx +0 -29
  92. package/src/components/ui/tabs.tsx +0 -55
  93. package/src/components/ui/textarea.tsx +0 -24
  94. package/src/components/ui/toast.tsx +0 -129
  95. package/src/components/ui/toaster.tsx +0 -44
  96. package/src/components/ui/toggle.tsx +0 -45
  97. package/src/components/ui/tooltip.tsx +0 -30
  98. package/src/components/ui/use-toast.ts +0 -197
  99. package/src/constants/index.ts +0 -223
  100. package/src/constants/resetCSS.ts +0 -139
  101. package/src/extension-bundle.ts +0 -2
  102. package/src/extensions/Attachment/Attachment.ts +0 -144
  103. package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +0 -69
  104. package/src/extensions/Attachment/components/NodeViewAttachment/FileIconString.ts +0 -28
  105. package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +0 -155
  106. package/src/extensions/Attachment/components/NodeViewAttachment/index.module.scss +0 -23
  107. package/src/extensions/Attachment/index.ts +0 -1
  108. package/src/extensions/BaseKit.ts +0 -253
  109. package/src/extensions/Blockquote/Blockquote.ts +0 -31
  110. package/src/extensions/Blockquote/index.ts +0 -1
  111. package/src/extensions/Bold/Bold.ts +0 -26
  112. package/src/extensions/Bold/index.ts +0 -1
  113. package/src/extensions/BulletList/BulletList.ts +0 -28
  114. package/src/extensions/BulletList/index.ts +0 -1
  115. package/src/extensions/Clear/Clear.ts +0 -24
  116. package/src/extensions/Clear/index.ts +0 -1
  117. package/src/extensions/Code/Code.ts +0 -26
  118. package/src/extensions/Code/index.ts +0 -1
  119. package/src/extensions/CodeBlock/CodeBlock.ts +0 -54
  120. package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +0 -66
  121. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +0 -89
  122. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/index.module.scss +0 -81
  123. package/src/extensions/CodeBlock/highlighter.ts +0 -132
  124. package/src/extensions/CodeBlock/index.ts +0 -1
  125. package/src/extensions/CodeBlock/shiki-plugin.ts +0 -213
  126. package/src/extensions/Color/Color.ts +0 -52
  127. package/src/extensions/Color/components/ColorActionButton.tsx +0 -104
  128. package/src/extensions/Color/index.ts +0 -1
  129. package/src/extensions/Document/Document.ts +0 -8
  130. package/src/extensions/Document/index.ts +0 -1
  131. package/src/extensions/Drawer/Drawer.ts +0 -177
  132. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.module.scss +0 -85
  133. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +0 -598
  134. package/src/extensions/Drawer/components/ControlDrawer/icon.tsx +0 -500
  135. package/src/extensions/Drawer/components/DrawerActiveButton.tsx +0 -239
  136. package/src/extensions/Drawer/components/EditDrawerBlock.tsx +0 -238
  137. package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +0 -260
  138. package/src/extensions/Drawer/index.ts +0 -1
  139. package/src/extensions/Emoji/Emoji.ts +0 -146
  140. package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +0 -103
  141. package/src/extensions/Emoji/components/EmojiList/emojis.ts +0 -1858
  142. package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +0 -61
  143. package/src/extensions/Emoji/index.ts +0 -1
  144. package/src/extensions/Excalidraw/Excalidraw.ts +0 -123
  145. package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +0 -138
  146. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +0 -178
  147. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/index.module.scss +0 -43
  148. package/src/extensions/Excalidraw/index.ts +0 -1
  149. package/src/extensions/ExportPdf/ExportPdf.ts +0 -25
  150. package/src/extensions/ExportPdf/index.ts +0 -1
  151. package/src/extensions/ExportWord/ExportWord.ts +0 -87
  152. package/src/extensions/ExportWord/index.ts +0 -1
  153. package/src/extensions/FontFamily/FontFamily.ts +0 -64
  154. package/src/extensions/FontFamily/components/FontFamilyButton.tsx +0 -97
  155. package/src/extensions/FontFamily/index.ts +0 -1
  156. package/src/extensions/FontSize/FontSize.ts +0 -119
  157. package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +0 -84
  158. package/src/extensions/FontSize/index.ts +0 -1
  159. package/src/extensions/FormatPainter/FormatPainter.ts +0 -121
  160. package/src/extensions/FormatPainter/index.ts +0 -1
  161. package/src/extensions/Heading/Heading.ts +0 -57
  162. package/src/extensions/Heading/components/HeadingButton.tsx +0 -96
  163. package/src/extensions/Heading/index.ts +0 -1
  164. package/src/extensions/Highlight/Highlight.ts +0 -36
  165. package/src/extensions/Highlight/components/HighlightActionButton.tsx +0 -108
  166. package/src/extensions/Highlight/index.ts +0 -1
  167. package/src/extensions/History/History.ts +0 -39
  168. package/src/extensions/History/components/HistoryActionButton.tsx +0 -74
  169. package/src/extensions/History/index.ts +0 -1
  170. package/src/extensions/HorizontalRule/HorizontalRule.ts +0 -42
  171. package/src/extensions/HorizontalRule/index.ts +0 -1
  172. package/src/extensions/Iframe/Iframe.ts +0 -140
  173. package/src/extensions/Iframe/components/IframeNodeView.tsx +0 -92
  174. package/src/extensions/Iframe/components/index.module.scss +0 -40
  175. package/src/extensions/Iframe/embed.ts +0 -487
  176. package/src/extensions/Iframe/index.ts +0 -1
  177. package/src/extensions/Image/Image.ts +0 -303
  178. package/src/extensions/Image/components/ActionImageButton.tsx +0 -186
  179. package/src/extensions/Image/components/ImageCropper.tsx +0 -198
  180. package/src/extensions/Image/components/ImageView.tsx +0 -271
  181. package/src/extensions/Image/index.ts +0 -1
  182. package/src/extensions/Image/store.ts +0 -15
  183. package/src/extensions/ImageGif/ImageGif.ts +0 -176
  184. package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +0 -138
  185. package/src/extensions/ImageGif/components/ImageGifView.tsx +0 -260
  186. package/src/extensions/ImageGif/index.ts +0 -1
  187. package/src/extensions/ImportWord/ImportWord.ts +0 -52
  188. package/src/extensions/ImportWord/components/ImportWordButton.tsx +0 -151
  189. package/src/extensions/ImportWord/index.ts +0 -1
  190. package/src/extensions/Indent/Indent.ts +0 -110
  191. package/src/extensions/Indent/index.ts +0 -1
  192. package/src/extensions/Italic/Italic.ts +0 -29
  193. package/src/extensions/Italic/index.ts +0 -1
  194. package/src/extensions/Katex/Katex.ts +0 -109
  195. package/src/extensions/Katex/components/KatexActiveButton.tsx +0 -117
  196. package/src/extensions/Katex/components/KatexWrapper.tsx +0 -53
  197. package/src/extensions/Katex/index.ts +0 -1
  198. package/src/extensions/LineHeight/LineHeight.ts +0 -76
  199. package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +0 -93
  200. package/src/extensions/LineHeight/index.ts +0 -1
  201. package/src/extensions/Link/Link.ts +0 -92
  202. package/src/extensions/Link/components/LinkEditBlock.tsx +0 -110
  203. package/src/extensions/Link/components/LinkEditPopover.tsx +0 -46
  204. package/src/extensions/Link/components/LinkViewBlock.tsx +0 -54
  205. package/src/extensions/Link/index.ts +0 -1
  206. package/src/extensions/ListItem/ListItem.ts +0 -1
  207. package/src/extensions/ListItem/index.ts +0 -1
  208. package/src/extensions/Mention/Mention.ts +0 -100
  209. package/src/extensions/Mention/components/NodeViewMentionList/NodeViewMentionList.tsx +0 -94
  210. package/src/extensions/Mention/components/NodeViewMentionList/index.module.scss +0 -38
  211. package/src/extensions/Mention/index.ts +0 -1
  212. package/src/extensions/Mermaid/Mermaid.ts +0 -177
  213. package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +0 -155
  214. package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +0 -151
  215. package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +0 -260
  216. package/src/extensions/Mermaid/index.ts +0 -1
  217. package/src/extensions/MoreMark/MoreMark.ts +0 -102
  218. package/src/extensions/MoreMark/components/ActionMoreButton.tsx +0 -97
  219. package/src/extensions/MoreMark/index.ts +0 -1
  220. package/src/extensions/MultiColumn/Column.ts +0 -36
  221. package/src/extensions/MultiColumn/MultiColumn.ts +0 -111
  222. package/src/extensions/MultiColumn/components/ColumnActionButton.ts +0 -22
  223. package/src/extensions/MultiColumn/index.ts +0 -3
  224. package/src/extensions/OrderedList/OrderedList.ts +0 -28
  225. package/src/extensions/OrderedList/index.ts +0 -1
  226. package/src/extensions/SearchAndReplace/SearchAndReplace.ts +0 -395
  227. package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +0 -190
  228. package/src/extensions/SearchAndReplace/index.ts +0 -1
  229. package/src/extensions/Selection/Selection.ts +0 -32
  230. package/src/extensions/Selection/index.ts +0 -1
  231. package/src/extensions/SlashCommand/SlashCommand.ts +0 -255
  232. package/src/extensions/SlashCommand/components/CommandsList.tsx +0 -180
  233. package/src/extensions/SlashCommand/groups.ts +0 -183
  234. package/src/extensions/SlashCommand/index.ts +0 -1
  235. package/src/extensions/SlashCommand/types.ts +0 -24
  236. package/src/extensions/Strike/Strike.ts +0 -26
  237. package/src/extensions/Strike/index.ts +0 -1
  238. package/src/extensions/Subscript/Subscript.ts +0 -88
  239. package/src/extensions/Subscript/index.ts +0 -1
  240. package/src/extensions/Table/Cell.ts +0 -131
  241. package/src/extensions/Table/Header.ts +0 -93
  242. package/src/extensions/Table/Row.ts +0 -8
  243. package/src/extensions/Table/Table.ts +0 -60
  244. package/src/extensions/Table/cell-background.ts +0 -112
  245. package/src/extensions/Table/components/CreateTablePopover.tsx +0 -132
  246. package/src/extensions/Table/components/TableActionButton.tsx +0 -42
  247. package/src/extensions/Table/index.ts +0 -6
  248. package/src/extensions/Table/utils.ts +0 -352
  249. package/src/extensions/TableOfContent/TableOfContent.ts +0 -124
  250. package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +0 -116
  251. package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +0 -27
  252. package/src/extensions/TableOfContent/components/index.module.scss +0 -40
  253. package/src/extensions/TableOfContent/index.ts +0 -1
  254. package/src/extensions/TaskList/TaskList.ts +0 -46
  255. package/src/extensions/TaskList/index.ts +0 -1
  256. package/src/extensions/TextAlign/TextAlign.ts +0 -68
  257. package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +0 -103
  258. package/src/extensions/TextAlign/index.ts +0 -1
  259. package/src/extensions/TextBubble/TextBubble.ts +0 -22
  260. package/src/extensions/TextBubble/components/TextDropdown.tsx +0 -146
  261. package/src/extensions/TextBubble/index.ts +0 -1
  262. package/src/extensions/TextDirection/TextDirection.ts +0 -97
  263. package/src/extensions/TextDirection/components/TextDirectionButton.tsx +0 -103
  264. package/src/extensions/TextDirection/index.ts +0 -1
  265. package/src/extensions/TrailingNode/TrailingNode.ts +0 -71
  266. package/src/extensions/TrailingNode/index.ts +0 -1
  267. package/src/extensions/Twitter/Twitter.ts +0 -161
  268. package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +0 -68
  269. package/src/extensions/Twitter/components/NodeViewTweet.tsx +0 -30
  270. package/src/extensions/Twitter/components/TwitterActiveButton.tsx +0 -41
  271. package/src/extensions/Twitter/index.ts +0 -1
  272. package/src/extensions/UnderLine/Underline.ts +0 -30
  273. package/src/extensions/UnderLine/index.ts +0 -1
  274. package/src/extensions/Video/Video.ts +0 -204
  275. package/src/extensions/Video/components/ActiveVideoButton.tsx +0 -191
  276. package/src/extensions/Video/index.ts +0 -1
  277. package/src/extensions/Video/store.ts +0 -15
  278. package/src/extensions/index.ts +0 -122
  279. package/src/hooks/useActive.tsx +0 -24
  280. package/src/hooks/useAttributes.tsx +0 -45
  281. package/src/hooks/useCopy.tsx +0 -20
  282. package/src/hooks/useEditorState.tsx +0 -23
  283. package/src/hooks/useExtension.tsx +0 -29
  284. package/src/index.ts +0 -8
  285. package/src/lib/utils.ts +0 -7
  286. package/src/locale-bundle.ts +0 -3
  287. package/src/locales/en.ts +0 -173
  288. package/src/locales/hu.ts +0 -173
  289. package/src/locales/index.tsx +0 -163
  290. package/src/locales/pt-br.ts +0 -173
  291. package/src/locales/vi.ts +0 -173
  292. package/src/locales/zh-cn.ts +0 -173
  293. package/src/plugins/DragHandle/index.ts +0 -375
  294. package/src/plugins/DragHandle/range.ts +0 -114
  295. package/src/plugins/DragHandle/utils.ts +0 -80
  296. package/src/plugins/image-upload.ts +0 -160
  297. package/src/store/ProviderRichText.tsx +0 -53
  298. package/src/store/editableEditor.ts +0 -15
  299. package/src/store/fast-context.tsx +0 -70
  300. package/src/store/store.ts +0 -35
  301. package/src/styles/ProseMirror.scss +0 -176
  302. package/src/styles/columns.scss +0 -23
  303. package/src/styles/editor.scss +0 -411
  304. package/src/styles/global.scss +0 -87
  305. package/src/styles/index.scss +0 -5
  306. package/src/styles/mention.scss +0 -6
  307. package/src/theme/theme.ts +0 -15
  308. package/src/types.ts +0 -271
  309. package/src/utils/_event.ts +0 -55
  310. package/src/utils/color.ts +0 -67
  311. package/src/utils/columns.ts +0 -142
  312. package/src/utils/customEvents/customEvents.ts +0 -18
  313. package/src/utils/customEvents/events.constant.ts +0 -11
  314. package/src/utils/delete-node.ts +0 -46
  315. package/src/utils/dom-dataset.ts +0 -121
  316. package/src/utils/download.ts +0 -17
  317. package/src/utils/dynamicCSS.ts +0 -192
  318. package/src/utils/editor-container-size.ts +0 -28
  319. package/src/utils/file.ts +0 -112
  320. package/src/utils/getRenderContainer.ts +0 -41
  321. package/src/utils/indent.ts +0 -99
  322. package/src/utils/is-mobile.ts +0 -57
  323. package/src/utils/json.ts +0 -18
  324. package/src/utils/line-height.ts +0 -109
  325. package/src/utils/lru-cache.ts +0 -145
  326. package/src/utils/mitt.ts +0 -114
  327. package/src/utils/node.ts +0 -92
  328. package/src/utils/pdf.ts +0 -72
  329. package/src/utils/plateform.ts +0 -49
  330. package/src/utils/shortId.ts +0 -5
  331. package/src/utils/storage.ts +0 -18
  332. package/src/utils/utils.ts +0 -71
  333. package/src/vite-env.d.ts +0 -3
package/lib/index.d.ts ADDED
@@ -0,0 +1,513 @@
1
+ import { AnyExtension } from '@tiptap/core';
2
+ import { BubbleMenu } from '@tiptap/react';
3
+ import { default as default_2 } from 'react';
4
+ import { Editor } from '@tiptap/react';
5
+ import { Editor as Editor_2 } from '@tiptap/core';
6
+ import { ForwardRefExoticComponent } from 'react';
7
+ import { RefAttributes } from 'react';
8
+ import { TooltipContentProps } from '@radix-ui/react-tooltip';
9
+ import { UseEditorOptions } from '@tiptap/react';
10
+
11
+ declare interface ActionButtonProps {
12
+ icon?: string;
13
+ title?: string;
14
+ tooltip?: string;
15
+ disabled?: boolean;
16
+ shortcutKeys?: string[];
17
+ customClass?: string;
18
+ loading?: boolean;
19
+ tooltipOptions?: TooltipContentProps;
20
+ color?: string;
21
+ action?: ButtonViewReturnComponentProps['action'];
22
+ isActive?: ButtonViewReturnComponentProps['isActive'];
23
+ children?: default_2.ReactNode;
24
+ asChild?: boolean;
25
+ upload?: boolean;
26
+ }
27
+
28
+ export { BubbleMenu }
29
+
30
+ declare interface BubbleMenuConfig {
31
+ /**
32
+ * @description Column menu hidden
33
+ * @default false
34
+ */
35
+ hidden?: boolean;
36
+ /**
37
+ * custom menu actions
38
+ */
39
+ actions?: ActionButtonProps[];
40
+ items?: string[];
41
+ }
42
+
43
+ /**
44
+ * Represents the BubbleMenuProps.
45
+ */
46
+ declare interface BubbleMenuProps {
47
+ columnConfig?: {
48
+ /**
49
+ * @description Column menu hidden
50
+ * @default false
51
+ */
52
+ hidden?: boolean;
53
+ };
54
+ tableConfig?: BubbleMenuConfig;
55
+ floatingMenuConfig?: {
56
+ /**
57
+ * @description Floating menu hidden
58
+ * @default false
59
+ */
60
+ hidden?: boolean;
61
+ };
62
+ linkConfig?: {
63
+ /**
64
+ * @description Link menu hidden
65
+ * @default false
66
+ */
67
+ hidden?: boolean;
68
+ };
69
+ textConfig?: {
70
+ /**
71
+ * @description Text menu hidden
72
+ * @default false
73
+ */
74
+ hidden?: boolean;
75
+ items?: string[];
76
+ };
77
+ imageConfig?: {
78
+ /**
79
+ * @description Image menu hidden
80
+ * @default false
81
+ */
82
+ hidden?: boolean;
83
+ };
84
+ imageGifConfig?: {
85
+ /**
86
+ * @description Image menu hidden
87
+ * @default false
88
+ */
89
+ hidden?: boolean;
90
+ };
91
+ videoConfig?: {
92
+ /**
93
+ * @description Video menu hidden
94
+ * @default false
95
+ */
96
+ hidden?: boolean;
97
+ };
98
+ katexConfig?: {
99
+ /**
100
+ * @description katex menu hidden
101
+ * @default false
102
+ */
103
+ hidden?: boolean;
104
+ };
105
+ excalidrawConfig?: {
106
+ /**
107
+ * @description excalidraw menu hidden
108
+ * @default false
109
+ */
110
+ hidden?: boolean;
111
+ };
112
+ iframeConfig?: {
113
+ /**
114
+ * @description iframe menu hidden
115
+ * @default false
116
+ */
117
+ hidden?: boolean;
118
+ };
119
+ mermaidConfig?: {
120
+ /**
121
+ * @description mermaid menu hidden
122
+ * @default false
123
+ */
124
+ hidden?: boolean;
125
+ };
126
+ twitterConfig?: {
127
+ /**
128
+ * @description twitter menu hidden
129
+ * @default false
130
+ */
131
+ hidden?: boolean;
132
+ };
133
+ drawerConfig?: {
134
+ /**
135
+ * @description twitter menu hidden
136
+ * @default false
137
+ */
138
+ hidden?: boolean;
139
+ };
140
+ render?: (props: BubbleMenuRenderProps, dom: React.ReactNode) => React.ReactNode;
141
+ }
142
+
143
+ /**
144
+ * Represents the BubbleMenuRenderProps.
145
+ */
146
+ declare interface BubbleMenuRenderProps {
147
+ editor: Editor;
148
+ disabled: boolean;
149
+ bubbleMenu: BubbleMenuProps;
150
+ }
151
+
152
+ /**
153
+ * Represents the props for the ButtonView component.
154
+ */
155
+ declare interface ButtonViewReturnComponentProps {
156
+ /** Method triggered when action is performed */
157
+ action?: (value?: any) => void;
158
+ /** Whether it is in the active state */
159
+ isActive?: () => boolean;
160
+ /** Button icon */
161
+ icon?: any;
162
+ /** Text displayed on hover */
163
+ tooltip?: string;
164
+ [x: string]: any;
165
+ }
166
+
167
+ declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
168
+ editor: Editor_2 | null;
169
+ }>>;
170
+ export default _default;
171
+
172
+ export { Editor }
173
+
174
+ /**
175
+ * Interface for RichTextEditor component props
176
+ */
177
+ declare interface RichTextEditorProps {
178
+ /** Content of the editor */
179
+ content: string;
180
+ /** Extensions for the editor */
181
+ extensions: AnyExtension[];
182
+ /** Output format */
183
+ output: 'html' | 'json' | 'text';
184
+ /** Model value */
185
+ modelValue?: string | object;
186
+ /** Dark mode flag */
187
+ dark?: boolean;
188
+ /** Dense mode flag */
189
+ dense?: boolean;
190
+ /** Disabled flag */
191
+ disabled?: boolean;
192
+ /** Label for the editor */
193
+ label?: string;
194
+ /** Hide toolbar flag */
195
+ hideToolbar?: boolean;
196
+ /** Disable bubble menu flag */
197
+ disableBubble?: boolean;
198
+ /** Hide bubble menu flag */
199
+ hideBubble?: boolean;
200
+ /** Remove default wrapper flag */
201
+ removeDefaultWrapper?: boolean;
202
+ /** Maximum width */
203
+ maxWidth?: string | number;
204
+ /** Minimum height */
205
+ minHeight?: string | number;
206
+ /** Maximum height */
207
+ maxHeight?: string | number;
208
+ /** Content class */
209
+ contentClass?: string | string[] | Record<string, any>;
210
+ /** Content change callback */
211
+ onChangeContent?: (val: any) => void;
212
+ /** Bubble menu props */
213
+ bubbleMenu?: BubbleMenuProps;
214
+ /** Toolbar props */
215
+ toolbar?: ToolbarProps;
216
+ /** Use editor options */
217
+ useEditorOptions?: UseEditorOptions;
218
+ /** Use editor options */
219
+ resetCSS?: boolean;
220
+ }
221
+
222
+ /**
223
+ * Represents the ToolbarItemProps.
224
+ */
225
+ declare interface ToolbarItemProps {
226
+ button: {
227
+ component: React.ComponentType<any>;
228
+ componentProps: Record<string, any>;
229
+ };
230
+ divider: boolean;
231
+ spacer: boolean;
232
+ type: string;
233
+ name: string;
234
+ }
235
+
236
+ declare interface ToolbarProps {
237
+ render?: (props: ToolbarRenderProps, toolbarItems: ToolbarItemProps[], dom: any[], containerDom: (innerContent: React.ReactNode) => React.ReactNode) => React.ReactNode;
238
+ }
239
+
240
+ declare interface ToolbarRenderProps {
241
+ editor: Editor;
242
+ disabled: boolean;
243
+ }
244
+
245
+ export { UseEditorOptions }
246
+
247
+ export declare function useEditorState(): UseEditorStateReturn;
248
+
249
+ export declare interface UseEditorStateReturn {
250
+ isReady: boolean;
251
+ editor: Editor_2 | null;
252
+ editorRef: React.MutableRefObject<{
253
+ editor: Editor_2 | null;
254
+ }>;
255
+ }
256
+
257
+ export { }
258
+
259
+
260
+ declare module '@tiptap/core' {
261
+ interface Commands<ReturnType> {
262
+ video: {
263
+ /**
264
+ * Add an video
265
+ */
266
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
267
+ /**
268
+ * Update an video
269
+ */
270
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
271
+ };
272
+ }
273
+ }
274
+
275
+
276
+ declare module '@tiptap/core' {
277
+ interface Commands<ReturnType> {
278
+ fontSize: {
279
+ /**
280
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
281
+ * CSS font-size
282
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
283
+ */
284
+ setFontSize: (fontSize: string) => ReturnType;
285
+ /**
286
+ * Unset the font size
287
+ */
288
+ unsetFontSize: () => ReturnType;
289
+ };
290
+ }
291
+ }
292
+
293
+
294
+ declare module '@tiptap/core' {
295
+ interface Commands<ReturnType> {
296
+ indent: {
297
+ /**
298
+ * Set the indent attribute
299
+ */
300
+ indent: () => ReturnType;
301
+ /**
302
+ * Set the outdent attribute
303
+ */
304
+ outdent: () => ReturnType;
305
+ };
306
+ }
307
+ }
308
+
309
+
310
+ declare module '@tiptap/core' {
311
+ interface Commands<ReturnType> {
312
+ tableCellBackground: {
313
+ setTableCellBackground: (color: string) => ReturnType;
314
+ unsetTableCellBackground: () => ReturnType;
315
+ };
316
+ }
317
+ }
318
+
319
+
320
+ declare module '@tiptap/core' {
321
+ interface Commands<ReturnType> {
322
+ emoji: {
323
+ setEmoji: (emoji: {
324
+ name: string;
325
+ emoji: string;
326
+ }) => ReturnType;
327
+ };
328
+ }
329
+ }
330
+
331
+
332
+ declare module '@tiptap/core' {
333
+ interface Commands<ReturnType> {
334
+ painter: {
335
+ setPainter: (marks: Mark[]) => ReturnType;
336
+ };
337
+ }
338
+ }
339
+
340
+
341
+ declare module '@tiptap/core' {
342
+ interface Commands<ReturnType> {
343
+ imageUpload: {
344
+ /**
345
+ * Add an image
346
+ */
347
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
348
+ /**
349
+ * Update an image
350
+ */
351
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
352
+ /**
353
+ * Set image alignment
354
+ */
355
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
356
+ };
357
+ }
358
+ }
359
+
360
+
361
+ declare module '@tiptap/core' {
362
+ interface Commands<ReturnType> {
363
+ katex: {
364
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
365
+ };
366
+ }
367
+ }
368
+
369
+
370
+ declare module '@tiptap/core' {
371
+ interface Commands<ReturnType> {
372
+ search: {
373
+ setSearchTerm: (searchTerm: string) => ReturnType;
374
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
375
+ replace: () => ReturnType;
376
+ replaceAll: () => ReturnType;
377
+ goToPrevSearchResult: () => void;
378
+ goToNextSearchResult: () => void;
379
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
380
+ };
381
+ }
382
+ }
383
+
384
+
385
+ declare module '@tiptap/core' {
386
+ interface Commands<ReturnType> {
387
+ iframe: {
388
+ /**
389
+ * Add an iframe
390
+ */
391
+ setIframe: (options: {
392
+ src: string;
393
+ service: string;
394
+ }) => ReturnType;
395
+ };
396
+ }
397
+ }
398
+
399
+
400
+ declare module '@tiptap/core' {
401
+ interface Commands<ReturnType> {
402
+ columns: {
403
+ insertColumns: (attrs?: {
404
+ cols: number;
405
+ }) => ReturnType;
406
+ addColBefore: () => ReturnType;
407
+ addColAfter: () => ReturnType;
408
+ deleteCol: () => ReturnType;
409
+ };
410
+ }
411
+ }
412
+
413
+
414
+ declare module '@tiptap/core' {
415
+ interface Commands<ReturnType> {
416
+ lineHeight: {
417
+ setLineHeight: (lineHeight: string) => ReturnType;
418
+ unsetLineHeight: () => ReturnType;
419
+ };
420
+ }
421
+ }
422
+
423
+
424
+ declare module '@tiptap/core' {
425
+ interface Commands<ReturnType> {
426
+ exportWord: {
427
+ exportToWord: () => ReturnType;
428
+ };
429
+ }
430
+ }
431
+
432
+
433
+ declare module '@tiptap/core' {
434
+ interface Commands<ReturnType> {
435
+ excalidraw: {
436
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
437
+ };
438
+ }
439
+ }
440
+
441
+
442
+ declare module '@tiptap/core' {
443
+ interface Commands<ReturnType> {
444
+ tableOfContents: {
445
+ setTableOfContents: () => ReturnType;
446
+ removeTableOfContents: () => ReturnType;
447
+ };
448
+ }
449
+ }
450
+
451
+
452
+ declare module '@tiptap/core' {
453
+ interface Commands<ReturnType> {
454
+ imageGifUpload: {
455
+ /**
456
+ * Add an image gif
457
+ */
458
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
459
+ /**
460
+ * Update an image gif
461
+ */
462
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
463
+ /**
464
+ * Set image alignment
465
+ */
466
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
467
+ };
468
+ }
469
+ }
470
+
471
+
472
+ declare module '@tiptap/core' {
473
+ interface Commands<ReturnType> {
474
+ attachment: {
475
+ setAttachment: (attrs?: unknown) => ReturnType;
476
+ };
477
+ }
478
+ }
479
+
480
+
481
+ declare module '@tiptap/core' {
482
+ interface Commands<ReturnType> {
483
+ mermaid: {
484
+ setMermaid: (options: any, replace?: any) => ReturnType;
485
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
486
+ };
487
+ }
488
+ }
489
+
490
+
491
+ declare module '@tiptap/core' {
492
+ interface Commands<ReturnType> {
493
+ drawer: {
494
+ setDrawer: (options: any, replace?: any) => ReturnType;
495
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
496
+ };
497
+ }
498
+ }
499
+
500
+
501
+ declare module '@tiptap/core' {
502
+ interface Commands<ReturnType> {
503
+ twitter: {
504
+ /**
505
+ * Insert a tweet
506
+ * @param options The tweet attributes
507
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
508
+ */
509
+ setTweet: (options: SetTweetOptions) => ReturnType;
510
+ updateTweet: (options: SetTweetOptions) => ReturnType;
511
+ };
512
+ }
513
+ }
package/lib/index.js ADDED
@@ -0,0 +1,16 @@
1
+ import { useRef as d, useState as o, useEffect as f } from "react";
2
+ import { R as m } from "./RichTextEditor-iGJ6-rbq.js";
3
+ import { B as x } from "./tiptap-DkWHMWDt.js";
4
+ function c() {
5
+ var t;
6
+ const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
7
+ return f(() => {
8
+ var r;
9
+ (r = e.current) != null && r.editor && (s(!0), n(e.current.editor));
10
+ }, [e, (t = e.current) == null ? void 0 : t.editor]), { isReady: u, editor: i, editorRef: e };
11
+ }
12
+ export {
13
+ x as BubbleMenu,
14
+ m as default,
15
+ c as useEditorState
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DV-nXpU1.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;