reactjs-tiptap-editor-pro 0.2.30 → 0.2.31

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 (154) hide show
  1. package/package.json +4 -1
  2. package/src/components/ActionButton.tsx +4 -4
  3. package/src/components/ActionMenuButton.tsx +3 -3
  4. package/src/components/BubbleMenu.tsx +9 -9
  5. package/src/components/CharactorCount.tsx +1 -1
  6. package/src/components/ColorPicker.tsx +4 -4
  7. package/src/components/RichTextEditor.tsx +11 -11
  8. package/src/components/SizeSetter/SizeSetter.tsx +2 -2
  9. package/src/components/Toolbar.tsx +4 -4
  10. package/src/components/icons/Icon.tsx +1 -1
  11. package/src/components/icons/icons.ts +12 -12
  12. package/src/components/menus/bubble.ts +4 -4
  13. package/src/components/menus/components/BubbleMenuDrawer.tsx +6 -6
  14. package/src/components/menus/components/BubbleMenuExcalidraw.tsx +9 -9
  15. package/src/components/menus/components/BubbleMenuIframe.tsx +9 -9
  16. package/src/components/menus/components/BubbleMenuKatex.tsx +7 -7
  17. package/src/components/menus/components/BubbleMenuLink.tsx +2 -2
  18. package/src/components/menus/components/BubbleMenuMedia.tsx +3 -3
  19. package/src/components/menus/components/BubbleMenuMermaid.tsx +6 -6
  20. package/src/components/menus/components/BubbleMenuText.tsx +3 -3
  21. package/src/components/menus/components/BubbleMenuTwitter.tsx +5 -5
  22. package/src/components/menus/components/ColumnsBubbleMenu.tsx +4 -4
  23. package/src/components/menus/components/ContentMenu.tsx +4 -4
  24. package/src/components/menus/components/TableBubbleMenu.tsx +5 -5
  25. package/src/components/ui/button.tsx +1 -1
  26. package/src/components/ui/checkbox.tsx +1 -1
  27. package/src/components/ui/dialog.tsx +1 -1
  28. package/src/components/ui/dropdown-menu.tsx +1 -1
  29. package/src/components/ui/emoji-picker.tsx +1 -1
  30. package/src/components/ui/input.tsx +1 -1
  31. package/src/components/ui/label.tsx +1 -1
  32. package/src/components/ui/popover.tsx +1 -1
  33. package/src/components/ui/select.tsx +1 -1
  34. package/src/components/ui/separator.tsx +1 -1
  35. package/src/components/ui/switch.tsx +1 -1
  36. package/src/components/ui/tabs.tsx +1 -1
  37. package/src/components/ui/textarea.tsx +1 -1
  38. package/src/components/ui/toast.tsx +1 -1
  39. package/src/components/ui/toaster.tsx +2 -2
  40. package/src/components/ui/toggle.tsx +1 -1
  41. package/src/components/ui/tooltip.tsx +1 -1
  42. package/src/components/ui/use-toast.ts +1 -1
  43. package/src/extension-bundle.ts +1 -1
  44. package/src/extensions/Attachment/Attachment.ts +6 -6
  45. package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +4 -4
  46. package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +4 -4
  47. package/src/extensions/BaseKit.ts +8 -8
  48. package/src/extensions/Blockquote/Blockquote.ts +2 -2
  49. package/src/extensions/Bold/Bold.ts +2 -2
  50. package/src/extensions/BulletList/BulletList.ts +2 -2
  51. package/src/extensions/Clear/Clear.ts +2 -2
  52. package/src/extensions/Code/Code.ts +2 -2
  53. package/src/extensions/CodeBlock/CodeBlock.ts +5 -5
  54. package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +2 -2
  55. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +7 -7
  56. package/src/extensions/Color/Color.ts +2 -2
  57. package/src/extensions/Color/components/ColorActionButton.tsx +3 -3
  58. package/src/extensions/Drawer/Drawer.ts +3 -3
  59. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +1 -1
  60. package/src/extensions/Drawer/components/DrawerActiveButton.tsx +6 -6
  61. package/src/extensions/Drawer/components/EditDrawerBlock.tsx +6 -6
  62. package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +2 -2
  63. package/src/extensions/Emoji/Emoji.ts +1 -1
  64. package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +1 -1
  65. package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +2 -2
  66. package/src/extensions/Excalidraw/Excalidraw.ts +3 -3
  67. package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +4 -4
  68. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +4 -4
  69. package/src/extensions/ExportPdf/ExportPdf.ts +2 -2
  70. package/src/extensions/ExportWord/ExportWord.ts +3 -3
  71. package/src/extensions/FontFamily/FontFamily.ts +4 -4
  72. package/src/extensions/FontFamily/components/FontFamilyButton.tsx +3 -3
  73. package/src/extensions/FontSize/FontSize.ts +3 -3
  74. package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +3 -3
  75. package/src/extensions/FormatPainter/FormatPainter.ts +2 -2
  76. package/src/extensions/Heading/Heading.ts +2 -2
  77. package/src/extensions/Heading/components/HeadingButton.tsx +3 -3
  78. package/src/extensions/Highlight/Highlight.ts +1 -1
  79. package/src/extensions/Highlight/components/HighlightActionButton.tsx +3 -3
  80. package/src/extensions/History/History.ts +2 -2
  81. package/src/extensions/History/components/HistoryActionButton.tsx +3 -3
  82. package/src/extensions/HorizontalRule/HorizontalRule.ts +2 -2
  83. package/src/extensions/Iframe/Iframe.ts +3 -3
  84. package/src/extensions/Iframe/components/IframeNodeView.tsx +4 -4
  85. package/src/extensions/Image/Image.ts +4 -4
  86. package/src/extensions/Image/components/ActionImageButton.tsx +8 -8
  87. package/src/extensions/Image/components/ImageCropper.tsx +6 -6
  88. package/src/extensions/Image/components/ImageView.tsx +1 -1
  89. package/src/extensions/Image/store.ts +3 -3
  90. package/src/extensions/ImageGif/ImageGif.ts +2 -2
  91. package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +1 -1
  92. package/src/extensions/ImageGif/components/ImageGifView.tsx +1 -1
  93. package/src/extensions/ImportWord/ImportWord.ts +2 -2
  94. package/src/extensions/ImportWord/components/ImportWordButton.tsx +3 -3
  95. package/src/extensions/Indent/Indent.ts +3 -3
  96. package/src/extensions/Italic/Italic.ts +2 -2
  97. package/src/extensions/Katex/Katex.ts +2 -2
  98. package/src/extensions/Katex/components/KatexActiveButton.tsx +6 -6
  99. package/src/extensions/Katex/components/KatexWrapper.tsx +2 -2
  100. package/src/extensions/LineHeight/LineHeight.ts +4 -4
  101. package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +3 -3
  102. package/src/extensions/Link/Link.ts +2 -2
  103. package/src/extensions/Link/components/LinkEditBlock.tsx +2 -2
  104. package/src/extensions/Link/components/LinkEditPopover.tsx +3 -3
  105. package/src/extensions/Link/components/LinkViewBlock.tsx +2 -2
  106. package/src/extensions/Mention/Mention.ts +3 -3
  107. package/src/extensions/Mermaid/Mermaid.ts +3 -3
  108. package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +6 -6
  109. package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +6 -6
  110. package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +2 -2
  111. package/src/extensions/MoreMark/MoreMark.ts +3 -3
  112. package/src/extensions/MoreMark/components/ActionMoreButton.tsx +3 -3
  113. package/src/extensions/MultiColumn/MultiColumn.ts +1 -1
  114. package/src/extensions/MultiColumn/components/ColumnActionButton.ts +1 -1
  115. package/src/extensions/OrderedList/OrderedList.ts +2 -2
  116. package/src/extensions/SearchAndReplace/SearchAndReplace.ts +4 -4
  117. package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +5 -5
  118. package/src/extensions/SlashCommand/SlashCommand.ts +1 -1
  119. package/src/extensions/SlashCommand/components/CommandsList.tsx +3 -3
  120. package/src/extensions/SlashCommand/groups.ts +4 -4
  121. package/src/extensions/Strike/Strike.ts +2 -2
  122. package/src/extensions/Subscript/Subscript.ts +2 -2
  123. package/src/extensions/Table/Table.ts +2 -2
  124. package/src/extensions/Table/components/CreateTablePopover.tsx +3 -3
  125. package/src/extensions/Table/components/TableActionButton.tsx +3 -3
  126. package/src/extensions/TableOfContent/TableOfContent.ts +3 -3
  127. package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +2 -2
  128. package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +3 -3
  129. package/src/extensions/TaskList/TaskList.ts +2 -2
  130. package/src/extensions/TextAlign/TextAlign.ts +2 -2
  131. package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +4 -4
  132. package/src/extensions/TextBubble/TextBubble.ts +1 -1
  133. package/src/extensions/TextBubble/components/TextDropdown.tsx +2 -2
  134. package/src/extensions/TextDirection/TextDirection.ts +1 -1
  135. package/src/extensions/TextDirection/components/TextDirectionButton.tsx +4 -4
  136. package/src/extensions/Twitter/Twitter.ts +2 -2
  137. package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +3 -3
  138. package/src/extensions/Twitter/components/TwitterActiveButton.tsx +3 -3
  139. package/src/extensions/UnderLine/Underline.ts +2 -2
  140. package/src/extensions/Video/Video.ts +4 -4
  141. package/src/extensions/Video/components/ActiveVideoButton.tsx +6 -6
  142. package/src/extensions/Video/store.ts +3 -3
  143. package/src/index.ts +3 -3
  144. package/src/locales/index.tsx +3 -3
  145. package/src/store/ProviderRichText.tsx +3 -3
  146. package/src/store/editableEditor.ts +3 -3
  147. package/src/store/store.ts +1 -1
  148. package/src/theme/theme.ts +3 -3
  149. package/src/utils/_event.ts +1 -1
  150. package/src/utils/columns.ts +1 -1
  151. package/src/utils/customEvents/customEvents.ts +1 -1
  152. package/src/utils/dom-dataset.ts +1 -1
  153. package/src/utils/line-height.ts +1 -1
  154. package/src/utils/utils.ts +1 -1
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
- import { cn } from '@/lib/utils';
6
+ import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
7
7
 
8
8
  const TooltipProvider = TooltipPrimitive.Provider;
9
9
 
@@ -7,7 +7,7 @@ import * as React from 'react';
7
7
  import type {
8
8
  ToastActionElement,
9
9
  ToastProps,
10
- } from '@/components/ui/toast';
10
+ } from 'reactjs-tiptap-editor-pro/components/ui/toast';
11
11
 
12
12
  const TOAST_LIMIT = 1;
13
13
  const TOAST_REMOVE_DELAY = 1000000;
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable import/first */
2
- export * from '@/extensions';
2
+ export * from 'reactjs-tiptap-editor-pro/extensions';
@@ -2,12 +2,12 @@
2
2
  import { Node, mergeAttributes } from '@tiptap/core';
3
3
  import { ReactNodeViewRenderer } from '@tiptap/react';
4
4
 
5
- import { ActionButton } from '@/components';
6
- import { getFileTypeIcon } from '@/extensions/Attachment/components/NodeViewAttachment/FileIcon';
7
- import { NodeViewAttachment } from '@/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment';
8
- import type { GeneralOptions } from '@/types';
9
- import { getDatasetAttribute } from '@/utils/dom-dataset';
10
- import { normalizeFileSize } from '@/utils/file';
5
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
6
+ import { getFileTypeIcon } from 'reactjs-tiptap-editor-pro/extensions/Attachment/components/NodeViewAttachment/FileIcon';
7
+ import { NodeViewAttachment } from 'reactjs-tiptap-editor-pro/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment';
8
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
9
+ import { getDatasetAttribute } from 'reactjs-tiptap-editor-pro/utils/dom-dataset';
10
+ import { normalizeFileSize } from 'reactjs-tiptap-editor-pro/utils/file';
11
11
 
12
12
  declare module '@tiptap/core' {
13
13
  interface Commands<ReturnType> {
@@ -1,10 +1,10 @@
1
1
  import { LucideAudioLines, LucideFile, LucideImage, LucideSheet, LucideTableProperties, LucideVideo } from 'lucide-react';
2
2
  // import ReactDOMServer from 'react-dom/server';
3
3
 
4
- import { ExportPdf } from '@/components/icons/ExportPdf';
5
- import ExportWord from '@/components/icons/ExportWord';
6
- import { FileIconString } from '@/extensions/Attachment/components/NodeViewAttachment/FileIconString';
7
- import { normalizeFileType } from '@/utils/file';
4
+ import { ExportPdf } from 'reactjs-tiptap-editor-pro/components/icons/ExportPdf';
5
+ import ExportWord from 'reactjs-tiptap-editor-pro/components/icons/ExportWord';
6
+ import { FileIconString } from 'reactjs-tiptap-editor-pro/extensions/Attachment/components/NodeViewAttachment/FileIconString';
7
+ import { normalizeFileType } from 'reactjs-tiptap-editor-pro/utils/file';
8
8
 
9
9
  function iconToProseMirror(typeIcon: any) {
10
10
  // Render SVG as a static string
@@ -7,10 +7,10 @@ import { useCallback, useEffect, useRef, useState } from 'react';
7
7
  import { NodeViewWrapper } from '@tiptap/react';
8
8
  import clsx from 'clsx';
9
9
 
10
- import { ActionButton } from '@/components';
11
- import { useLocale } from '@/locales';
12
- import { useEditableEditor } from '@/store/editableEditor';
13
- import { extractFileExtension, extractFilename, normalizeFileSize } from '@/utils/file';
10
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
11
+ import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
12
+ import { useEditableEditor } from 'reactjs-tiptap-editor-pro/store/editableEditor';
13
+ import { extractFileExtension, extractFilename, normalizeFileSize } from 'reactjs-tiptap-editor-pro/utils/file';
14
14
 
15
15
  import { getFileTypeIcon } from './FileIcon';
16
16
  import styles from './index.module.scss';
@@ -20,14 +20,14 @@ import { Text } from '@tiptap/extension-text';
20
20
  import type { TextStyleOptions } from '@tiptap/extension-text-style';
21
21
  import { TextStyle } from '@tiptap/extension-text-style';
22
22
 
23
- import { Document } from '@/extensions/Document';
24
- import { Column, MultiColumn } from '@/extensions/MultiColumn';
25
- import { Selection } from '@/extensions/Selection';
26
- import type { TextBubbleOptions } from '@/extensions/TextBubble';
27
- import { TextBubble } from '@/extensions/TextBubble';
28
- import type { TrailingNodeOptions } from '@/extensions/TrailingNode';
29
- import { TrailingNode } from '@/extensions/TrailingNode';
30
- import { localeActions } from '@/locales';
23
+ import { Document } from 'reactjs-tiptap-editor-pro/extensions/Document';
24
+ import { Column, MultiColumn } from 'reactjs-tiptap-editor-pro/extensions/MultiColumn';
25
+ import { Selection } from 'reactjs-tiptap-editor-pro/extensions/Selection';
26
+ import type { TextBubbleOptions } from 'reactjs-tiptap-editor-pro/extensions/TextBubble';
27
+ import { TextBubble } from 'reactjs-tiptap-editor-pro/extensions/TextBubble';
28
+ import type { TrailingNodeOptions } from 'reactjs-tiptap-editor-pro/extensions/TrailingNode';
29
+ import { TrailingNode } from 'reactjs-tiptap-editor-pro/extensions/TrailingNode';
30
+ import { localeActions } from 'reactjs-tiptap-editor-pro/locales';
31
31
 
32
32
  /**
33
33
  * Represents the interface for options in the base toolkit.
@@ -1,8 +1,8 @@
1
1
  import type { BlockquoteOptions as TiptapBlockquoteOptions } from '@tiptap/extension-blockquote';
2
2
  import { Blockquote as TiptapBlockquote } from '@tiptap/extension-blockquote';
3
3
 
4
- import { ActionButton } from '@/components';
5
- import type { GeneralOptions } from '@/types';
4
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface BlockquoteOptions
8
8
  extends TiptapBlockquoteOptions,
@@ -1,8 +1,8 @@
1
1
  import type { BoldOptions as TiptapImageOptions } from '@tiptap/extension-bold';
2
2
  import { Bold as TiptapBold } from '@tiptap/extension-bold';
3
3
 
4
- import { ActionButton } from '@/components';
5
- import type { GeneralOptions } from '@/types';
4
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface BoldOptions extends TiptapImageOptions, GeneralOptions<BoldOptions> {}
8
8
 
@@ -1,8 +1,8 @@
1
1
  import type { BulletListOptions as TiptapBulletListOptions } from '@tiptap/extension-bullet-list';
2
2
  import { BulletList as TiptapBulletList } from '@tiptap/extension-bullet-list';
3
3
 
4
- import { ActionButton } from '@/components';
5
- import type { GeneralOptions } from '@/types';
4
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface BulletListOptions
8
8
  extends TiptapBulletListOptions,
@@ -1,7 +1,7 @@
1
1
  import { Node } from '@tiptap/core';
2
2
 
3
- import { ActionButton } from '@/components';
4
- import type { GeneralOptions } from '@/types';
3
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
4
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
5
5
 
6
6
  export interface ClearOptions extends GeneralOptions<ClearOptions> {}
7
7
 
@@ -1,8 +1,8 @@
1
1
  import type { CodeOptions as TiptapCodeOptions } from '@tiptap/extension-code';
2
2
  import { Code as TiptapCode } from '@tiptap/extension-code';
3
3
 
4
- import { ActionButton } from '@/components';
5
- import type { GeneralOptions } from '@/types';
4
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface CodeOptions extends TiptapCodeOptions, GeneralOptions<CodeOptions> {}
8
8
 
@@ -2,11 +2,11 @@ import type { BundledLanguage, BundledTheme } from 'shiki';
2
2
  import type { CodeBlockOptions as CodeBlockExtOptions } from '@tiptap/extension-code-block';
3
3
  import CodeBlockExt from '@tiptap/extension-code-block';
4
4
  import { ReactNodeViewRenderer } from '@tiptap/react';
5
- import type { GeneralOptions } from '@/types';
6
- import { ShikiPlugin } from '@/extensions/CodeBlock/shiki-plugin';
7
- import CodeBlockActiveButton from '@/extensions/CodeBlock/components/CodeBlockActiveButton';
8
- import { DEFAULT_LANGUAGE_CODE_BLOCK } from '@/constants';
9
- import { NodeViewCodeBlock } from '@/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
+ import { ShikiPlugin } from 'reactjs-tiptap-editor-pro/extensions/CodeBlock/shiki-plugin';
7
+ import CodeBlockActiveButton from 'reactjs-tiptap-editor-pro/extensions/CodeBlock/components/CodeBlockActiveButton';
8
+ import { DEFAULT_LANGUAGE_CODE_BLOCK } from 'reactjs-tiptap-editor-pro/constants';
9
+ import { NodeViewCodeBlock } from 'reactjs-tiptap-editor-pro/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock';
10
10
 
11
11
  export interface CodeBlockOptions
12
12
  extends GeneralOptions<CodeBlockExtOptions> {
@@ -7,8 +7,8 @@ import {
7
7
  DropdownMenuContent,
8
8
  DropdownMenuItem,
9
9
  DropdownMenuTrigger,
10
- } from '@/components';
11
- import { MAP_LANGUAGE_CODE_LABELS } from '@/constants';
10
+ } from 'reactjs-tiptap-editor-pro/components';
11
+ import { MAP_LANGUAGE_CODE_LABELS } from 'reactjs-tiptap-editor-pro/constants';
12
12
 
13
13
  interface Props {
14
14
  editor: any
@@ -4,13 +4,13 @@ import { NodeViewContent, NodeViewWrapper } from '@tiptap/react';
4
4
  import clsx from 'clsx';
5
5
  import { Copy, CopyCheck } from 'lucide-react';
6
6
 
7
- import { IconComponent } from '@/components';
8
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
9
- import { DEFAULT_LANGUAGE_CODE_BLOCK } from '@/constants';
10
- import { CodeBlock } from '@/extensions';
11
- import useCopy from '@/hooks/useCopy';
12
- import { useEditableEditor } from '@/store/editableEditor';
13
- import { deleteNode } from '@/utils/delete-node';
7
+ import { IconComponent } from 'reactjs-tiptap-editor-pro/components';
8
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'reactjs-tiptap-editor-pro/components/ui/select';
9
+ import { DEFAULT_LANGUAGE_CODE_BLOCK } from 'reactjs-tiptap-editor-pro/constants';
10
+ import { CodeBlock } from 'reactjs-tiptap-editor-pro/extensions';
11
+ import useCopy from 'reactjs-tiptap-editor-pro/hooks/useCopy';
12
+ import { useEditableEditor } from 'reactjs-tiptap-editor-pro/store/editableEditor';
13
+ import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
14
14
 
15
15
  import styles from './index.module.scss';
16
16
 
@@ -1,8 +1,8 @@
1
1
  import TiptapColor from '@tiptap/extension-color';
2
2
  import type { ColorOptions as TiptapColorOptions } from '@tiptap/extension-color';
3
3
 
4
- import ColorActionButton from '@/extensions/Color/components/ColorActionButton';
5
- import type { GeneralOptions } from '@/types';
4
+ import ColorActionButton from 'reactjs-tiptap-editor-pro/extensions/Color/components/ColorActionButton';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface ColorOptions extends TiptapColorOptions, GeneralOptions<ColorOptions> {
8
8
  /**
@@ -3,9 +3,9 @@ import { useCallback, useState } from 'react';
3
3
  import type { Editor } from '@tiptap/react';
4
4
  import { debounce } from 'lodash-es';
5
5
 
6
- import { ActionButton, Button, ColorPicker } from '@/components';
7
- import { IconComponent } from '@/components/icons';
8
- import type { ButtonViewReturnComponentProps } from '@/types';
6
+ import { ActionButton, Button, ColorPicker } from 'reactjs-tiptap-editor-pro/components';
7
+ import { IconComponent } from 'reactjs-tiptap-editor-pro/components/icons';
8
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
9
9
 
10
10
  interface ColorActionButtonProps {
11
11
  editor: Editor
@@ -4,9 +4,9 @@ import { mergeAttributes } from '@tiptap/core';
4
4
  import TiptapImage from '@tiptap/extension-image';
5
5
  import { ReactNodeViewRenderer } from '@tiptap/react';
6
6
 
7
- import { DrawerActiveButton } from '@/extensions/Drawer/components/DrawerActiveButton';
8
- import { NodeViewDrawer } from '@/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer';
9
- import type { GeneralOptions } from '@/types';
7
+ import { DrawerActiveButton } from 'reactjs-tiptap-editor-pro/extensions/Drawer/components/DrawerActiveButton';
8
+ import { NodeViewDrawer } from 'reactjs-tiptap-editor-pro/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer';
9
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
10
10
 
11
11
  declare module '@tiptap/core' {
12
12
  interface Commands<ReturnType> {
@@ -4,7 +4,7 @@ import {
4
4
  Color4
5
5
  } from 'easydrawer';
6
6
 
7
- import { cn } from '@/lib/utils';
7
+ import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
8
8
 
9
9
  import styles from './ControlDrawer.module.scss';
10
10
  import { MingcuteDiamondSquareLine, HugeiconsCursorRectangleSelection01, IcSharpArrowRightAlt, MaterialSymbolsCircleOutline, MaterialSymbolsEdit, MaterialSymbolsHexagonOutline, MaterialSymbolsRectangleOutline, MdiFormatLetterCase, MdiSquareOutline, OuiEraser, PhHighlighter, TablerTriangle, PhLineSegmentFill, IcSharpFavorite, MaterialSymbolsKidStar, MaterialSymbolsCloud, AkarIconsParallelogram, SolarUndoLeftRoundBold, SolarUndoRightRoundBold, MaterialSymbolsDelete } from './icon';
@@ -9,12 +9,12 @@ import {
9
9
  // @ts-ignore
10
10
  import svg64 from 'svg64';
11
11
 
12
- import { ActionButton } from '@/components/ActionButton';
13
- import { Button } from '@/components/ui';
14
- import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
15
- import ControlDrawer from '@/extensions/Drawer/components/ControlDrawer/ControlDrawer';
16
- import { dataURLtoFile } from '@/utils/file';
17
- import { shortId } from '@/utils/shortId';
12
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
13
+ import { Button } from 'reactjs-tiptap-editor-pro/components/ui';
14
+ import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from 'reactjs-tiptap-editor-pro/components/ui/dialog';
15
+ import ControlDrawer from 'reactjs-tiptap-editor-pro/extensions/Drawer/components/ControlDrawer/ControlDrawer';
16
+ import { dataURLtoFile } from 'reactjs-tiptap-editor-pro/utils/file';
17
+ import { shortId } from 'reactjs-tiptap-editor-pro/utils/shortId';
18
18
 
19
19
  interface IProps {
20
20
  editor: Editor, upload?: any
@@ -8,12 +8,12 @@ import {
8
8
  // @ts-ignore
9
9
  import svg64 from 'svg64';
10
10
 
11
- import { ActionButton } from '@/components/ActionButton';
12
- import { Button } from '@/components/ui';
13
- import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
14
- import ControlDrawer from '@/extensions/Drawer/components/ControlDrawer/ControlDrawer';
15
- import { dataURLtoFile } from '@/utils/file';
16
- import { shortId } from '@/utils/shortId';
11
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
12
+ import { Button } from 'reactjs-tiptap-editor-pro/components/ui';
13
+ import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from 'reactjs-tiptap-editor-pro/components/ui/dialog';
14
+ import ControlDrawer from 'reactjs-tiptap-editor-pro/extensions/Drawer/components/ControlDrawer/ControlDrawer';
15
+ import { dataURLtoFile } from 'reactjs-tiptap-editor-pro/utils/file';
16
+ import { shortId } from 'reactjs-tiptap-editor-pro/utils/shortId';
17
17
 
18
18
  let clear = false;
19
19
 
@@ -6,8 +6,8 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
6
6
  import { NodeViewWrapper, isNumber } from '@tiptap/react';
7
7
  import { throttle } from 'lodash-es';
8
8
 
9
- import { IMAGE_MAX_SIZE, IMAGE_MIN_SIZE, IMAGE_THROTTLE_WAIT_TIME } from '@/constants';
10
- import { clamp } from '@/utils/utils';
9
+ import { IMAGE_MAX_SIZE, IMAGE_MIN_SIZE, IMAGE_THROTTLE_WAIT_TIME } from 'reactjs-tiptap-editor-pro/constants';
10
+ import { clamp } from 'reactjs-tiptap-editor-pro/utils/utils';
11
11
 
12
12
  interface Size {
13
13
  width: number
@@ -4,7 +4,7 @@ import { ReactRenderer } from '@tiptap/react';
4
4
  import Suggestion from '@tiptap/suggestion';
5
5
  import tippy from 'tippy.js';
6
6
 
7
- import EmojiPicker from '@/extensions/Emoji/components/EmojiPicker/EmojiPicker';
7
+ import EmojiPicker from 'reactjs-tiptap-editor-pro/extensions/Emoji/components/EmojiPicker/EmojiPicker';
8
8
 
9
9
  import { EmojiList } from './components/EmojiList/EmojiList';
10
10
  import { emojiSearch, emojisToName } from './components/EmojiList/emojis';
@@ -5,7 +5,7 @@ import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } f
5
5
  import clsx from 'clsx';
6
6
  import scrollIntoView from 'scroll-into-view-if-needed';
7
7
 
8
- import { useLocale } from '@/locales';
8
+ import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
9
9
 
10
10
  interface IProps {
11
11
  items: Array<{ name: string, emoji: string, fallbackImage?: string }>
@@ -1,8 +1,8 @@
1
1
  import type React from 'react';
2
2
  import { useCallback } from 'react';
3
3
 
4
- import { ActionButton, Popover, PopoverContent, PopoverTrigger } from '@/components';
5
- import { EmojiPicker, EmojiPickerContent, EmojiPickerFooter, EmojiPickerSearch } from '@/components/ui/emoji-picker';
4
+ import { ActionButton, Popover, PopoverContent, PopoverTrigger } from 'reactjs-tiptap-editor-pro/components';
5
+ import { EmojiPicker, EmojiPickerContent, EmojiPickerFooter, EmojiPickerSearch } from 'reactjs-tiptap-editor-pro/components/ui/emoji-picker';
6
6
 
7
7
  interface IProps {
8
8
  showClear?: boolean
@@ -2,9 +2,9 @@
2
2
  import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';
3
3
  import { ReactNodeViewRenderer } from '@tiptap/react';
4
4
 
5
- import { ExcalidrawActiveButton } from '@/extensions/Excalidraw/components/ExcalidrawActiveButton';
6
- import NodeViewExcalidraw from '@/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw';
7
- import { getDatasetAttribute, nodeAttrsToDataset } from '@/utils/dom-dataset';
5
+ import { ExcalidrawActiveButton } from 'reactjs-tiptap-editor-pro/extensions/Excalidraw/components/ExcalidrawActiveButton';
6
+ import NodeViewExcalidraw from 'reactjs-tiptap-editor-pro/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw';
7
+ import { getDatasetAttribute, nodeAttrsToDataset } from 'reactjs-tiptap-editor-pro/utils/dom-dataset';
8
8
 
9
9
  const DEFAULT_MIND_DATA = { elements: [] };
10
10
 
@@ -5,10 +5,10 @@ import { useCallback, useEffect, useState } from 'react';
5
5
 
6
6
  import type { Editor } from '@tiptap/core';
7
7
 
8
- import { ActionButton } from '@/components/ActionButton';
9
- import { Button } from '@/components/ui';
10
- import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
11
- import { OPEN_EXCALIDRAW_SETTING_MODAL, cancelSubject, subject } from '@/utils/_event';
8
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
9
+ import { Button } from 'reactjs-tiptap-editor-pro/components/ui';
10
+ import { Dialog, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from 'reactjs-tiptap-editor-pro/components/ui/dialog';
11
+ import { OPEN_EXCALIDRAW_SETTING_MODAL, cancelSubject, subject } from 'reactjs-tiptap-editor-pro/utils/_event';
12
12
 
13
13
  interface IProps {
14
14
  editor: Editor
@@ -6,10 +6,10 @@ import deepEqual from 'deep-equal';
6
6
  import { Resizable } from 're-resizable';
7
7
  import VisibilitySensor from 'react-visibility-sensor';
8
8
 
9
- // import { clamp, getEditorContainerDOMSize } from '@/utils'
10
- import { ActionButton } from '@/components/ActionButton';
11
- import { Excalidraw } from '@/extensions/Excalidraw/Excalidraw';
12
- import { clamp } from '@/utils/utils';
9
+ // import { clamp, getEditorContainerDOMSize } from 'reactjs-tiptap-editor-pro/utils'
10
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
11
+ import { Excalidraw } from 'reactjs-tiptap-editor-pro/extensions/Excalidraw/Excalidraw';
12
+ import { clamp } from 'reactjs-tiptap-editor-pro/utils/utils';
13
13
 
14
14
  import styles from './index.module.scss';
15
15
 
@@ -1,7 +1,7 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
 
3
- import { ActionButton } from '@/components';
4
- import { printEditorContent } from '@/utils/pdf';
3
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
4
+ import { printEditorContent } from 'reactjs-tiptap-editor-pro/utils/pdf';
5
5
 
6
6
  export const ExportPdf = Extension.create<any>({
7
7
  name: 'exportPdf',
@@ -3,9 +3,9 @@ import { Extension } from '@tiptap/core';
3
3
  import { Packer, WidthType } from 'docx';
4
4
  import { DocxSerializer, defaultMarks, defaultNodes } from 'prosemirror-docx';
5
5
 
6
- import { ActionButton } from '@/components';
7
- import type { GeneralOptions } from '@/types';
8
- import { downloadFromBlob } from '@/utils/download';
6
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
7
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
8
+ import { downloadFromBlob } from 'reactjs-tiptap-editor-pro/utils/download';
9
9
 
10
10
  declare module '@tiptap/core' {
11
11
  interface Commands<ReturnType> {
@@ -3,10 +3,10 @@ import type { FontFamilyOptions as TiptapFontFamilyOptions } from '@tiptap/exten
3
3
  import FontFamilyTiptap from '@tiptap/extension-font-family';
4
4
 
5
5
  import type { BaseKitOptions } from '../BaseKit';
6
- import { ensureNameValueOptions } from '@/utils/utils';
7
- import { DEFAULT_FONT_FAMILY_LIST } from '@/constants';
8
- import FontFamilyButton from '@/extensions/FontFamily/components/FontFamilyButton';
9
- import type { GeneralOptions, NameValueOption } from '@/types';
6
+ import { ensureNameValueOptions } from 'reactjs-tiptap-editor-pro/utils/utils';
7
+ import { DEFAULT_FONT_FAMILY_LIST } from 'reactjs-tiptap-editor-pro/constants';
8
+ import FontFamilyButton from 'reactjs-tiptap-editor-pro/extensions/FontFamily/components/FontFamilyButton';
9
+ import type { GeneralOptions, NameValueOption } from 'reactjs-tiptap-editor-pro/types';
10
10
 
11
11
  export interface FontFamilyOptions extends TiptapFontFamilyOptions, GeneralOptions<FontFamilyOptions> {
12
12
  /**
@@ -7,9 +7,9 @@ import {
7
7
  DropdownMenuContent,
8
8
  DropdownMenuSeparator,
9
9
  DropdownMenuTrigger,
10
- } from '@/components';
11
- import { useLocale } from '@/locales';
12
- import type { ButtonViewReturnComponentProps } from '@/types';
10
+ } from 'reactjs-tiptap-editor-pro/components';
11
+ import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
12
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
13
13
 
14
14
  export interface Item {
15
15
  title: string
@@ -1,9 +1,9 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
 
3
3
  import FontSizeMenuButton from './components/FontSizeMenuButton';
4
- import { ensureNameValueOptions } from '@/utils/utils';
5
- import { DEFAULT_FONT_SIZE_LIST, DEFAULT_FONT_SIZE_VALUE } from '@/constants';
6
- import type { GeneralOptions, NameValueOption } from '@/types';
4
+ import { ensureNameValueOptions } from 'reactjs-tiptap-editor-pro/utils/utils';
5
+ import { DEFAULT_FONT_SIZE_LIST, DEFAULT_FONT_SIZE_VALUE } from 'reactjs-tiptap-editor-pro/constants';
6
+ import type { GeneralOptions, NameValueOption } from 'reactjs-tiptap-editor-pro/types';
7
7
 
8
8
  /**
9
9
  * Represents the interface for font size options, extending GeneralOptions.
@@ -6,9 +6,9 @@ import {
6
6
  DropdownMenuCheckboxItem,
7
7
  DropdownMenuContent,
8
8
  DropdownMenuTrigger,
9
- } from '@/components';
10
- import { useLocale } from '@/locales';
11
- import type { ButtonViewReturnComponentProps } from '@/types';
9
+ } from 'reactjs-tiptap-editor-pro/components';
10
+ import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
11
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
12
12
 
13
13
  export interface Item {
14
14
  title: string
@@ -4,8 +4,8 @@ import { Extension } from '@tiptap/core';
4
4
  import type { Mark } from '@tiptap/pm/model';
5
5
  import { Plugin, PluginKey } from '@tiptap/pm/state';
6
6
 
7
- import { ActionButton } from '@/components';
8
- import type { GeneralOptions } from '@/types';
7
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
8
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
9
9
 
10
10
  /**
11
11
  * Represents the interface for font size options, extending GeneralOptions.
@@ -3,8 +3,8 @@ import type { HeadingOptions as TiptapHeadingOptions } from '@tiptap/extension-h
3
3
  import { Heading as TiptapHeading } from '@tiptap/extension-heading';
4
4
 
5
5
  import type { BaseKitOptions } from '../BaseKit';
6
- import HeadingButton from '@/extensions/Heading/components/HeadingButton';
7
- import type { GeneralOptions } from '@/types';
6
+ import HeadingButton from 'reactjs-tiptap-editor-pro/extensions/Heading/components/HeadingButton';
7
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
8
8
 
9
9
  export interface HeadingOptions extends TiptapHeadingOptions, GeneralOptions<HeadingOptions> {}
10
10
 
@@ -8,9 +8,9 @@ import {
8
8
  DropdownMenuSeparator,
9
9
  DropdownMenuShortcut,
10
10
  DropdownMenuTrigger,
11
- } from '@/components';
12
- import type { ButtonViewReturnComponentProps } from '@/types';
13
- import { getShortcutKey } from '@/utils/plateform';
11
+ } from 'reactjs-tiptap-editor-pro/components';
12
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
13
+ import { getShortcutKey } from 'reactjs-tiptap-editor-pro/utils/plateform';
14
14
 
15
15
  export interface Item {
16
16
  title: string
@@ -2,7 +2,7 @@ import type { HighlightOptions as TiptapHighlightOptions } from '@tiptap/extensi
2
2
  import { Highlight as TiptapHighlight } from '@tiptap/extension-highlight';
3
3
 
4
4
  import HighlightActionButton from './components/HighlightActionButton';
5
- import type { GeneralOptions } from '@/types';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface HighlightOptions
8
8
  extends TiptapHighlightOptions,
@@ -3,9 +3,9 @@ import React, { useCallback, useState } from 'react';
3
3
  import type { TooltipContentProps } from '@radix-ui/react-tooltip';
4
4
  import { debounce } from 'lodash-es';
5
5
 
6
- import { ActionButton, Button, ColorPicker } from '@/components';
7
- import { IconComponent } from '@/components/icons';
8
- import type { ButtonViewReturnComponentProps } from '@/types';
6
+ import { ActionButton, Button, ColorPicker } from 'reactjs-tiptap-editor-pro/components';
7
+ import { IconComponent } from 'reactjs-tiptap-editor-pro/components/icons';
8
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
9
9
 
10
10
  interface IPropsHighlightActionButton {
11
11
  editor: any
@@ -1,8 +1,8 @@
1
1
  import type { HistoryOptions as TiptapHistoryOptions } from '@tiptap/extension-history';
2
2
  import { History as TiptapHistory } from '@tiptap/extension-history';
3
3
 
4
- import HistoryActionButton from '@/extensions/History/components/HistoryActionButton';
5
- import type { GeneralOptions } from '@/types';
4
+ import HistoryActionButton from 'reactjs-tiptap-editor-pro/extensions/History/components/HistoryActionButton';
5
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
6
6
 
7
7
  export interface HistoryOptions extends TiptapHistoryOptions, GeneralOptions<HistoryOptions> {}
8
8
 
@@ -2,9 +2,9 @@ import React from 'react';
2
2
 
3
3
  import type { TooltipContentProps } from '@radix-ui/react-tooltip';
4
4
 
5
- import { Toggle, Tooltip, TooltipContent, TooltipTrigger, icons } from '@/components';
6
- import type { ButtonViewReturnComponentProps } from '@/types';
7
- import { getShortcutKeys } from '@/utils/plateform';
5
+ import { Toggle, Tooltip, TooltipContent, TooltipTrigger, icons } from 'reactjs-tiptap-editor-pro/components';
6
+ import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
7
+ import { getShortcutKeys } from 'reactjs-tiptap-editor-pro/utils/plateform';
8
8
 
9
9
  interface IPropsHistoryActionButton {
10
10
  icon?: string
@@ -2,8 +2,8 @@ import { mergeAttributes } from '@tiptap/core';
2
2
  import type { HorizontalRuleOptions as TiptapHorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
3
3
  import { HorizontalRule as TiptapHorizontalRule } from '@tiptap/extension-horizontal-rule';
4
4
 
5
- import { ActionButton } from '@/components';
6
- import type { GeneralOptions } from '@/types';
5
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
6
+ import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
7
7
 
8
8
  export interface HorizontalRuleOptions
9
9
  extends TiptapHorizontalRuleOptions,
@@ -2,9 +2,9 @@
2
2
  import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';
3
3
  import { ReactNodeViewRenderer } from '@tiptap/react';
4
4
 
5
- import { ActionButton } from '@/components';
6
- import IframeNodeView from '@/extensions/Iframe/components/IframeNodeView';
7
- import { getDatasetAttribute } from '@/utils/dom-dataset';
5
+ import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
6
+ import IframeNodeView from 'reactjs-tiptap-editor-pro/extensions/Iframe/components/IframeNodeView';
7
+ import { getDatasetAttribute } from 'reactjs-tiptap-editor-pro/utils/dom-dataset';
8
8
 
9
9
  export interface IIframeAttrs {
10
10
  width?: number | string