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.
- package/package.json +4 -1
- package/src/components/ActionButton.tsx +4 -4
- package/src/components/ActionMenuButton.tsx +3 -3
- package/src/components/BubbleMenu.tsx +9 -9
- package/src/components/CharactorCount.tsx +1 -1
- package/src/components/ColorPicker.tsx +4 -4
- package/src/components/RichTextEditor.tsx +11 -11
- package/src/components/SizeSetter/SizeSetter.tsx +2 -2
- package/src/components/Toolbar.tsx +4 -4
- package/src/components/icons/Icon.tsx +1 -1
- package/src/components/icons/icons.ts +12 -12
- package/src/components/menus/bubble.ts +4 -4
- package/src/components/menus/components/BubbleMenuDrawer.tsx +6 -6
- package/src/components/menus/components/BubbleMenuExcalidraw.tsx +9 -9
- package/src/components/menus/components/BubbleMenuIframe.tsx +9 -9
- package/src/components/menus/components/BubbleMenuKatex.tsx +7 -7
- package/src/components/menus/components/BubbleMenuLink.tsx +2 -2
- package/src/components/menus/components/BubbleMenuMedia.tsx +3 -3
- package/src/components/menus/components/BubbleMenuMermaid.tsx +6 -6
- package/src/components/menus/components/BubbleMenuText.tsx +3 -3
- package/src/components/menus/components/BubbleMenuTwitter.tsx +5 -5
- package/src/components/menus/components/ColumnsBubbleMenu.tsx +4 -4
- package/src/components/menus/components/ContentMenu.tsx +4 -4
- package/src/components/menus/components/TableBubbleMenu.tsx +5 -5
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/emoji-picker.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/toaster.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/ui/use-toast.ts +1 -1
- package/src/extension-bundle.ts +1 -1
- package/src/extensions/Attachment/Attachment.ts +6 -6
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +4 -4
- package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +4 -4
- package/src/extensions/BaseKit.ts +8 -8
- package/src/extensions/Blockquote/Blockquote.ts +2 -2
- package/src/extensions/Bold/Bold.ts +2 -2
- package/src/extensions/BulletList/BulletList.ts +2 -2
- package/src/extensions/Clear/Clear.ts +2 -2
- package/src/extensions/Code/Code.ts +2 -2
- package/src/extensions/CodeBlock/CodeBlock.ts +5 -5
- package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +2 -2
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +7 -7
- package/src/extensions/Color/Color.ts +2 -2
- package/src/extensions/Color/components/ColorActionButton.tsx +3 -3
- package/src/extensions/Drawer/Drawer.ts +3 -3
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +1 -1
- package/src/extensions/Drawer/components/DrawerActiveButton.tsx +6 -6
- package/src/extensions/Drawer/components/EditDrawerBlock.tsx +6 -6
- package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +2 -2
- package/src/extensions/Emoji/Emoji.ts +1 -1
- package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +1 -1
- package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +2 -2
- package/src/extensions/Excalidraw/Excalidraw.ts +3 -3
- package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +4 -4
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +4 -4
- package/src/extensions/ExportPdf/ExportPdf.ts +2 -2
- package/src/extensions/ExportWord/ExportWord.ts +3 -3
- package/src/extensions/FontFamily/FontFamily.ts +4 -4
- package/src/extensions/FontFamily/components/FontFamilyButton.tsx +3 -3
- package/src/extensions/FontSize/FontSize.ts +3 -3
- package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +3 -3
- package/src/extensions/FormatPainter/FormatPainter.ts +2 -2
- package/src/extensions/Heading/Heading.ts +2 -2
- package/src/extensions/Heading/components/HeadingButton.tsx +3 -3
- package/src/extensions/Highlight/Highlight.ts +1 -1
- package/src/extensions/Highlight/components/HighlightActionButton.tsx +3 -3
- package/src/extensions/History/History.ts +2 -2
- package/src/extensions/History/components/HistoryActionButton.tsx +3 -3
- package/src/extensions/HorizontalRule/HorizontalRule.ts +2 -2
- package/src/extensions/Iframe/Iframe.ts +3 -3
- package/src/extensions/Iframe/components/IframeNodeView.tsx +4 -4
- package/src/extensions/Image/Image.ts +4 -4
- package/src/extensions/Image/components/ActionImageButton.tsx +8 -8
- package/src/extensions/Image/components/ImageCropper.tsx +6 -6
- package/src/extensions/Image/components/ImageView.tsx +1 -1
- package/src/extensions/Image/store.ts +3 -3
- package/src/extensions/ImageGif/ImageGif.ts +2 -2
- package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +1 -1
- package/src/extensions/ImageGif/components/ImageGifView.tsx +1 -1
- package/src/extensions/ImportWord/ImportWord.ts +2 -2
- package/src/extensions/ImportWord/components/ImportWordButton.tsx +3 -3
- package/src/extensions/Indent/Indent.ts +3 -3
- package/src/extensions/Italic/Italic.ts +2 -2
- package/src/extensions/Katex/Katex.ts +2 -2
- package/src/extensions/Katex/components/KatexActiveButton.tsx +6 -6
- package/src/extensions/Katex/components/KatexWrapper.tsx +2 -2
- package/src/extensions/LineHeight/LineHeight.ts +4 -4
- package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +3 -3
- package/src/extensions/Link/Link.ts +2 -2
- package/src/extensions/Link/components/LinkEditBlock.tsx +2 -2
- package/src/extensions/Link/components/LinkEditPopover.tsx +3 -3
- package/src/extensions/Link/components/LinkViewBlock.tsx +2 -2
- package/src/extensions/Mention/Mention.ts +3 -3
- package/src/extensions/Mermaid/Mermaid.ts +3 -3
- package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +6 -6
- package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +6 -6
- package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +2 -2
- package/src/extensions/MoreMark/MoreMark.ts +3 -3
- package/src/extensions/MoreMark/components/ActionMoreButton.tsx +3 -3
- package/src/extensions/MultiColumn/MultiColumn.ts +1 -1
- package/src/extensions/MultiColumn/components/ColumnActionButton.ts +1 -1
- package/src/extensions/OrderedList/OrderedList.ts +2 -2
- package/src/extensions/SearchAndReplace/SearchAndReplace.ts +4 -4
- package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +5 -5
- package/src/extensions/SlashCommand/SlashCommand.ts +1 -1
- package/src/extensions/SlashCommand/components/CommandsList.tsx +3 -3
- package/src/extensions/SlashCommand/groups.ts +4 -4
- package/src/extensions/Strike/Strike.ts +2 -2
- package/src/extensions/Subscript/Subscript.ts +2 -2
- package/src/extensions/Table/Table.ts +2 -2
- package/src/extensions/Table/components/CreateTablePopover.tsx +3 -3
- package/src/extensions/Table/components/TableActionButton.tsx +3 -3
- package/src/extensions/TableOfContent/TableOfContent.ts +3 -3
- package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +2 -2
- package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +3 -3
- package/src/extensions/TaskList/TaskList.ts +2 -2
- package/src/extensions/TextAlign/TextAlign.ts +2 -2
- package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +4 -4
- package/src/extensions/TextBubble/TextBubble.ts +1 -1
- package/src/extensions/TextBubble/components/TextDropdown.tsx +2 -2
- package/src/extensions/TextDirection/TextDirection.ts +1 -1
- package/src/extensions/TextDirection/components/TextDirectionButton.tsx +4 -4
- package/src/extensions/Twitter/Twitter.ts +2 -2
- package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +3 -3
- package/src/extensions/Twitter/components/TwitterActiveButton.tsx +3 -3
- package/src/extensions/UnderLine/Underline.ts +2 -2
- package/src/extensions/Video/Video.ts +4 -4
- package/src/extensions/Video/components/ActiveVideoButton.tsx +6 -6
- package/src/extensions/Video/store.ts +3 -3
- package/src/index.ts +3 -3
- package/src/locales/index.tsx +3 -3
- package/src/store/ProviderRichText.tsx +3 -3
- package/src/store/editableEditor.ts +3 -3
- package/src/store/store.ts +1 -1
- package/src/theme/theme.ts +3 -3
- package/src/utils/_event.ts +1 -1
- package/src/utils/columns.ts +1 -1
- package/src/utils/customEvents/customEvents.ts +1 -1
- package/src/utils/dom-dataset.ts +1 -1
- package/src/utils/line-height.ts +1 -1
- package/src/utils/utils.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactjs-tiptap-editor-pro",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.31",
|
|
5
5
|
"packageManager": "pnpm@8.15.9",
|
|
6
6
|
"description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"main": "./src/index.ts",
|
|
32
32
|
"module": "./src/index.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
"./*": "./src/*"
|
|
35
|
+
},
|
|
33
36
|
"files": [
|
|
34
37
|
"src",
|
|
35
38
|
"package.json",
|
|
@@ -5,10 +5,10 @@ import React from 'react';
|
|
|
5
5
|
import { Slot } from '@radix-ui/react-slot';
|
|
6
6
|
import type { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
7
7
|
|
|
8
|
-
import { Toggle, Tooltip, TooltipContent, TooltipTrigger, IconComponent as Icon } from '
|
|
9
|
-
import { cn } from '
|
|
10
|
-
import type { ButtonViewReturnComponentProps } from '
|
|
11
|
-
import { getShortcutKeys } from '
|
|
8
|
+
import { Toggle, Tooltip, TooltipContent, TooltipTrigger, IconComponent as Icon } from 'reactjs-tiptap-editor-pro/components';
|
|
9
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
10
|
+
import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
|
|
11
|
+
import { getShortcutKeys } from 'reactjs-tiptap-editor-pro/utils/plateform';
|
|
12
12
|
|
|
13
13
|
export interface ActionButtonProps {
|
|
14
14
|
/* Icon name to display */
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
5
5
|
|
|
6
|
-
import { Button, Tooltip, TooltipContent, TooltipTrigger, icons } from '
|
|
7
|
-
import type { ButtonViewReturnComponentProps } from '
|
|
8
|
-
import { getShortcutKeys } from '
|
|
6
|
+
import { Button, Tooltip, TooltipContent, TooltipTrigger, icons } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
|
|
8
|
+
import { getShortcutKeys } from 'reactjs-tiptap-editor-pro/utils/plateform';
|
|
9
9
|
|
|
10
10
|
export interface ActionMenuButtonProps {
|
|
11
11
|
/** Icon name to display */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
|
|
3
|
-
import { BubbleMenuImage, BubbleMenuImageGif, BubbleMenuLink, BubbleMenuText, BubbleMenuVideo, ColumnsBubbleMenu, ContentMenu, TableBubbleMenu } from '
|
|
4
|
-
import { BubbleMenuDrawer } from '
|
|
5
|
-
import { BubbleMenuExcalidraw } from '
|
|
6
|
-
import { BubbleMenuIframe } from '
|
|
7
|
-
import BubbleMenuKatex from '
|
|
8
|
-
import { BubbleMenuMermaid } from '
|
|
9
|
-
import { BubbleMenuTwitter } from '
|
|
10
|
-
import { Image, ImageGif } from '
|
|
11
|
-
import type { BubbleMenuProps as BubbleMenuPropsType } from '
|
|
3
|
+
import { BubbleMenuImage, BubbleMenuImageGif, BubbleMenuLink, BubbleMenuText, BubbleMenuVideo, ColumnsBubbleMenu, ContentMenu, TableBubbleMenu } from 'reactjs-tiptap-editor-pro/components';
|
|
4
|
+
import { BubbleMenuDrawer } from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuDrawer';
|
|
5
|
+
import { BubbleMenuExcalidraw } from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuExcalidraw';
|
|
6
|
+
import { BubbleMenuIframe } from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuIframe';
|
|
7
|
+
import BubbleMenuKatex from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuKatex';
|
|
8
|
+
import { BubbleMenuMermaid } from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuMermaid';
|
|
9
|
+
import { BubbleMenuTwitter } from 'reactjs-tiptap-editor-pro/components/menus/components/BubbleMenuTwitter';
|
|
10
|
+
import { Image, ImageGif } from 'reactjs-tiptap-editor-pro/extensions';
|
|
11
|
+
import type { BubbleMenuProps as BubbleMenuPropsType } from 'reactjs-tiptap-editor-pro/types';
|
|
12
12
|
|
|
13
13
|
export interface BubbleMenuComponentProps {
|
|
14
14
|
editor: Editor
|
|
@@ -3,10 +3,10 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { Plus } from 'lucide-react';
|
|
4
4
|
import { HexColorPicker } from 'react-colorful';
|
|
5
5
|
|
|
6
|
-
import { Button, Input, Popover, PopoverContent, PopoverTrigger, Separator } from '
|
|
7
|
-
import { NoFill } from '
|
|
8
|
-
import { COLORS_LIST as DEFAULT_COLORS_LIST } from '
|
|
9
|
-
import { useLocale } from '
|
|
6
|
+
import { Button, Input, Popover, PopoverContent, PopoverTrigger, Separator } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import { NoFill } from 'reactjs-tiptap-editor-pro/components/icons/NoFill';
|
|
8
|
+
import { COLORS_LIST as DEFAULT_COLORS_LIST } from 'reactjs-tiptap-editor-pro/constants';
|
|
9
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
10
10
|
|
|
11
11
|
export interface ColorPickerProps {
|
|
12
12
|
highlight?: boolean
|
|
@@ -5,17 +5,17 @@ import type { UseEditorOptions } from '@tiptap/react';
|
|
|
5
5
|
import { EditorContent, useEditor } from '@tiptap/react';
|
|
6
6
|
import { differenceBy, throttle } from 'lodash-es';
|
|
7
7
|
|
|
8
|
-
import { BubbleMenu, Toolbar, TooltipProvider } from '
|
|
9
|
-
import CharactorCount from '
|
|
10
|
-
import { Toaster } from '
|
|
11
|
-
import { EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME } from '
|
|
12
|
-
import { RESET_CSS } from '
|
|
13
|
-
import { editableEditorActions } from '
|
|
14
|
-
import { ProviderRichText } from '
|
|
15
|
-
import { themeActions } from '
|
|
16
|
-
import type { BubbleMenuProps, ToolbarProps } from '
|
|
17
|
-
import { removeCSS, updateCSS } from '
|
|
18
|
-
import { hasExtension } from '
|
|
8
|
+
import { BubbleMenu, Toolbar, TooltipProvider } from 'reactjs-tiptap-editor-pro/components';
|
|
9
|
+
import CharactorCount from 'reactjs-tiptap-editor-pro/components/CharactorCount';
|
|
10
|
+
import { Toaster } from 'reactjs-tiptap-editor-pro/components/ui/toaster';
|
|
11
|
+
import { EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME } from 'reactjs-tiptap-editor-pro/constants';
|
|
12
|
+
import { RESET_CSS } from 'reactjs-tiptap-editor-pro/constants/resetCSS';
|
|
13
|
+
import { editableEditorActions } from 'reactjs-tiptap-editor-pro/store/editableEditor';
|
|
14
|
+
import { ProviderRichText } from 'reactjs-tiptap-editor-pro/store/ProviderRichText';
|
|
15
|
+
import { themeActions } from 'reactjs-tiptap-editor-pro/theme/theme';
|
|
16
|
+
import type { BubbleMenuProps, ToolbarProps } from 'reactjs-tiptap-editor-pro/types';
|
|
17
|
+
import { removeCSS, updateCSS } from 'reactjs-tiptap-editor-pro/utils/dynamicCSS';
|
|
18
|
+
import { hasExtension } from 'reactjs-tiptap-editor-pro/utils/utils';
|
|
19
19
|
|
|
20
20
|
import '../styles/index.scss';
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { Button, Input, Label, Popover, PopoverContent, PopoverTrigger } from '
|
|
3
|
-
import { useLocale } from '
|
|
2
|
+
import { Button, Input, Label, Popover, PopoverContent, PopoverTrigger } from 'reactjs-tiptap-editor-pro/components/ui';
|
|
3
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
4
4
|
|
|
5
5
|
interface ISize {
|
|
6
6
|
width: number | string, height: number | string
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import type { Editor } from '@tiptap/core';
|
|
3
|
-
import type { ToolbarItemProps, ToolbarProps } from '
|
|
3
|
+
import type { ToolbarItemProps, ToolbarProps } from 'reactjs-tiptap-editor-pro/types';
|
|
4
4
|
|
|
5
|
-
import { Separator } from '
|
|
6
|
-
import { useLocale } from '
|
|
7
|
-
import { isFunction } from '
|
|
5
|
+
import { Separator } from 'reactjs-tiptap-editor-pro/components';
|
|
6
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
7
|
+
import { isFunction } from 'reactjs-tiptap-editor-pro/utils/utils';
|
|
8
8
|
|
|
9
9
|
export interface ToolbarComponentProps {
|
|
10
10
|
editor: Editor
|
|
@@ -89,18 +89,18 @@ import {
|
|
|
89
89
|
SizeL,
|
|
90
90
|
SizeM,
|
|
91
91
|
SizeS,
|
|
92
|
-
} from '
|
|
93
|
-
import { ColumnAddLeft } from '
|
|
94
|
-
import { ColumnAddRight } from '
|
|
95
|
-
import { Direction } from '
|
|
96
|
-
import { Excalidraw } from '
|
|
97
|
-
import { ExportPdf } from '
|
|
98
|
-
import ExportWord from '
|
|
99
|
-
import { GifIcon } from '
|
|
100
|
-
import { LeftToRight } from '
|
|
101
|
-
import { Mermaid } from '
|
|
102
|
-
import { RightToLeft } from '
|
|
103
|
-
import { Twitter } from '
|
|
92
|
+
} from 'reactjs-tiptap-editor-pro/components/icons';
|
|
93
|
+
import { ColumnAddLeft } from 'reactjs-tiptap-editor-pro/components/icons/ColumnAddLeft';
|
|
94
|
+
import { ColumnAddRight } from 'reactjs-tiptap-editor-pro/components/icons/ColumnAddRight';
|
|
95
|
+
import { Direction } from 'reactjs-tiptap-editor-pro/components/icons/Direction';
|
|
96
|
+
import { Excalidraw } from 'reactjs-tiptap-editor-pro/components/icons/Excalidraw';
|
|
97
|
+
import { ExportPdf } from 'reactjs-tiptap-editor-pro/components/icons/ExportPdf';
|
|
98
|
+
import ExportWord from 'reactjs-tiptap-editor-pro/components/icons/ExportWord';
|
|
99
|
+
import { GifIcon } from 'reactjs-tiptap-editor-pro/components/icons/GIfIcon';
|
|
100
|
+
import { LeftToRight } from 'reactjs-tiptap-editor-pro/components/icons/LeftToRight';
|
|
101
|
+
import { Mermaid } from 'reactjs-tiptap-editor-pro/components/icons/Mermaid';
|
|
102
|
+
import { RightToLeft } from 'reactjs-tiptap-editor-pro/components/icons/RightToLeft';
|
|
103
|
+
import { Twitter } from 'reactjs-tiptap-editor-pro/components/icons/Twitter';
|
|
104
104
|
|
|
105
105
|
import ImportWord from './ImportWord';
|
|
106
106
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { deleteSelection } from '@tiptap/pm/commands';
|
|
2
2
|
import type { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
|
-
import { ActionButton } from '
|
|
5
|
-
import { BUBBLE_TEXT_LIST, IMAGE_SIZE, VIDEO_SIZE } from '
|
|
6
|
-
import { localeActions } from '
|
|
7
|
-
import type { ButtonViewParams, ButtonViewReturn, ExtensionNameKeys } from '
|
|
4
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
|
|
5
|
+
import { BUBBLE_TEXT_LIST, IMAGE_SIZE, VIDEO_SIZE } from 'reactjs-tiptap-editor-pro/constants';
|
|
6
|
+
import { localeActions } from 'reactjs-tiptap-editor-pro/locales';
|
|
7
|
+
import type { ButtonViewParams, ButtonViewReturn, ExtensionNameKeys } from 'reactjs-tiptap-editor-pro/types';
|
|
8
8
|
|
|
9
9
|
/** Represents the size types for bubble images or videos */
|
|
10
10
|
type BubbleImageOrVideoSizeType = 'size-small' | 'size-medium' | 'size-large';
|
|
@@ -3,12 +3,12 @@ import { Fragment, useMemo } from 'react';
|
|
|
3
3
|
import type { Editor } from '@tiptap/react';
|
|
4
4
|
import { BubbleMenu as BubbleMenuReact } from '@tiptap/react';
|
|
5
5
|
|
|
6
|
-
import { Separator, getBubbleDrawer } from '
|
|
7
|
-
import { Drawer } from '
|
|
8
|
-
import { EditDrawerBlock } from '
|
|
9
|
-
import { useAttributes } from '
|
|
10
|
-
import { useExtension } from '
|
|
11
|
-
import { useLocale } from '
|
|
6
|
+
import { Separator, getBubbleDrawer } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import { Drawer } from 'reactjs-tiptap-editor-pro/extensions';
|
|
8
|
+
import { EditDrawerBlock } from 'reactjs-tiptap-editor-pro/extensions/Drawer/components/EditDrawerBlock';
|
|
9
|
+
import { useAttributes } from 'reactjs-tiptap-editor-pro/hooks/useAttributes';
|
|
10
|
+
import { useExtension } from 'reactjs-tiptap-editor-pro/hooks/useExtension';
|
|
11
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
12
12
|
|
|
13
13
|
interface IPropsBubbleMenu {
|
|
14
14
|
editor: Editor
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useCallback, useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
import { BubbleMenu } from '@tiptap/react';
|
|
4
|
-
import { useAttributes } from '
|
|
5
|
-
import { ActionButton } from '
|
|
6
|
-
import { SizeSetter } from '
|
|
7
|
-
import { useLocale } from '
|
|
8
|
-
import type { IExcalidrawAttrs } from '
|
|
9
|
-
import { Excalidraw } from '
|
|
10
|
-
import { triggerOpenExcalidrawSettingModal } from '
|
|
11
|
-
import { deleteNode } from '
|
|
12
|
-
import { getEditorContainerDOMSize } from '
|
|
4
|
+
import { useAttributes } from 'reactjs-tiptap-editor-pro/hooks/useAttributes';
|
|
5
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
6
|
+
import { SizeSetter } from 'reactjs-tiptap-editor-pro/components/SizeSetter/SizeSetter';
|
|
7
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
8
|
+
import type { IExcalidrawAttrs } from 'reactjs-tiptap-editor-pro/extensions/Excalidraw';
|
|
9
|
+
import { Excalidraw } from 'reactjs-tiptap-editor-pro/extensions/Excalidraw';
|
|
10
|
+
import { triggerOpenExcalidrawSettingModal } from 'reactjs-tiptap-editor-pro/utils/_event';
|
|
11
|
+
import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
|
|
12
|
+
import { getEditorContainerDOMSize } from 'reactjs-tiptap-editor-pro/utils/editor-container-size';
|
|
13
13
|
|
|
14
14
|
export function BubbleMenuExcalidraw({ editor }: any) {
|
|
15
15
|
const { t } = useLocale();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { BubbleMenu } from '@tiptap/react';
|
|
4
|
-
import { useAttributes } from '
|
|
5
|
-
import { ActionButton } from '
|
|
6
|
-
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '
|
|
7
|
-
import { Button, Input } from '
|
|
8
|
-
import { SizeSetter } from '
|
|
9
|
-
import { useLocale } from '
|
|
10
|
-
import type { IIframeAttrs } from '
|
|
11
|
-
import { Iframe } from '
|
|
12
|
-
import { deleteNode } from '
|
|
4
|
+
import { useAttributes } from 'reactjs-tiptap-editor-pro/hooks/useAttributes';
|
|
5
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
6
|
+
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from 'reactjs-tiptap-editor-pro/components/ui/dialog';
|
|
7
|
+
import { Button, Input } from 'reactjs-tiptap-editor-pro/components/ui';
|
|
8
|
+
import { SizeSetter } from 'reactjs-tiptap-editor-pro/components/SizeSetter/SizeSetter';
|
|
9
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
10
|
+
import type { IIframeAttrs } from 'reactjs-tiptap-editor-pro/extensions/Iframe';
|
|
11
|
+
import { Iframe } from 'reactjs-tiptap-editor-pro/extensions/Iframe';
|
|
12
|
+
import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
|
|
13
13
|
|
|
14
14
|
export function BubbleMenuIframe({ editor }: any) {
|
|
15
15
|
const { t } = useLocale();
|
|
@@ -2,13 +2,13 @@ import { BubbleMenu } from '@tiptap/react';
|
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { HelpCircle, Pencil, Trash2 } from 'lucide-react';
|
|
4
4
|
import katex from 'katex';
|
|
5
|
-
import { Katex } from '
|
|
6
|
-
import { deleteNode } from '
|
|
7
|
-
import { useAttributes } from '
|
|
8
|
-
import type { IKatexAttrs } from '
|
|
9
|
-
import { Textarea } from '
|
|
10
|
-
import { ActionButton } from '
|
|
11
|
-
import { Button } from '
|
|
5
|
+
import { Katex } from 'reactjs-tiptap-editor-pro/extensions';
|
|
6
|
+
import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
|
|
7
|
+
import { useAttributes } from 'reactjs-tiptap-editor-pro/hooks/useAttributes';
|
|
8
|
+
import type { IKatexAttrs } from 'reactjs-tiptap-editor-pro/extensions/Katex';
|
|
9
|
+
import { Textarea } from 'reactjs-tiptap-editor-pro/components/ui/textarea';
|
|
10
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
11
|
+
import { Button } from 'reactjs-tiptap-editor-pro/components/ui';
|
|
12
12
|
|
|
13
13
|
function BubbleMenuKatex({ editor, ...props }: any) {
|
|
14
14
|
const attrs = useAttributes<IKatexAttrs>(editor, Katex.name, {
|
|
@@ -3,8 +3,8 @@ import { useCallback, useMemo, useState } from 'react';
|
|
|
3
3
|
import type { Editor } from '@tiptap/react';
|
|
4
4
|
import { BubbleMenu } from '@tiptap/react';
|
|
5
5
|
|
|
6
|
-
import LinkEditBlock from '
|
|
7
|
-
import LinkViewBlock from '
|
|
6
|
+
import LinkEditBlock from 'reactjs-tiptap-editor-pro/extensions/Link/components/LinkEditBlock';
|
|
7
|
+
import LinkViewBlock from 'reactjs-tiptap-editor-pro/extensions/Link/components/LinkViewBlock';
|
|
8
8
|
|
|
9
9
|
export interface BubbleMenuLinkProps {
|
|
10
10
|
editor: Editor
|
|
@@ -3,9 +3,9 @@ import { Fragment, useMemo } from 'react';
|
|
|
3
3
|
import type { Editor } from '@tiptap/react';
|
|
4
4
|
import { BubbleMenu as BubbleMenuReact } from '@tiptap/react';
|
|
5
5
|
|
|
6
|
-
import { Separator, getBubbleImage, getBubbleImageGif, getBubbleVideo } from '
|
|
7
|
-
import { Image, ImageGif, Video } from '
|
|
8
|
-
import { useLocale } from '
|
|
6
|
+
import { Separator, getBubbleImage, getBubbleImageGif, getBubbleVideo } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import { Image, ImageGif, Video } from 'reactjs-tiptap-editor-pro/extensions';
|
|
8
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
9
9
|
|
|
10
10
|
interface IPropsBubbleMenu {
|
|
11
11
|
editor: Editor
|
|
@@ -3,12 +3,12 @@ import { Fragment, useMemo } from 'react';
|
|
|
3
3
|
import type { Editor } from '@tiptap/react';
|
|
4
4
|
import { BubbleMenu as BubbleMenuReact } from '@tiptap/react';
|
|
5
5
|
|
|
6
|
-
import { Separator, getBubbleMermaid } from '
|
|
7
|
-
import { Mermaid } from '
|
|
8
|
-
import { EditMermaidBlock } from '
|
|
9
|
-
import { useAttributes } from '
|
|
10
|
-
import { useExtension } from '
|
|
11
|
-
import { useLocale } from '
|
|
6
|
+
import { Separator, getBubbleMermaid } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import { Mermaid } from 'reactjs-tiptap-editor-pro/extensions';
|
|
8
|
+
import { EditMermaidBlock } from 'reactjs-tiptap-editor-pro/extensions/Mermaid/components/EditMermaidBlock';
|
|
9
|
+
import { useAttributes } from 'reactjs-tiptap-editor-pro/hooks/useAttributes';
|
|
10
|
+
import { useExtension } from 'reactjs-tiptap-editor-pro/hooks/useExtension';
|
|
11
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
12
12
|
|
|
13
13
|
interface IPropsBubbleMenu {
|
|
14
14
|
editor: Editor
|
|
@@ -4,9 +4,9 @@ import type { Editor } from '@tiptap/core';
|
|
|
4
4
|
import { TextSelection } from '@tiptap/pm/state';
|
|
5
5
|
import { BubbleMenu } from '@tiptap/react';
|
|
6
6
|
|
|
7
|
-
import { Separator, getBubbleText } from '
|
|
8
|
-
import { useLocale } from '
|
|
9
|
-
import { type ShouldShowProps } from '
|
|
7
|
+
import { Separator, getBubbleText } from 'reactjs-tiptap-editor-pro/components';
|
|
8
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
9
|
+
import { type ShouldShowProps } from 'reactjs-tiptap-editor-pro/types';
|
|
10
10
|
|
|
11
11
|
export interface BubbleMenuTextProps {
|
|
12
12
|
editor: Editor
|
|
@@ -3,11 +3,11 @@ import { useCallback, useState } from 'react';
|
|
|
3
3
|
import type { Editor } from '@tiptap/react';
|
|
4
4
|
import { BubbleMenu } from '@tiptap/react';
|
|
5
5
|
|
|
6
|
-
import { ActionButton } from '
|
|
7
|
-
import { Twitter } from '
|
|
8
|
-
import FormEditLinkTwitter from '
|
|
9
|
-
import { useLocale } from '
|
|
10
|
-
import { deleteNode } from '
|
|
6
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
7
|
+
import { Twitter } from 'reactjs-tiptap-editor-pro/extensions';
|
|
8
|
+
import FormEditLinkTwitter from 'reactjs-tiptap-editor-pro/extensions/Twitter/components/FormEditLinkTwitter';
|
|
9
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
10
|
+
import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
|
|
11
11
|
|
|
12
12
|
export interface BubbleMenuTwitterProps {
|
|
13
13
|
editor: Editor
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
import { BubbleMenu } from '@tiptap/react';
|
|
4
|
-
import { ActionButton } from '
|
|
5
|
-
import { deleteNode } from '
|
|
6
|
-
import { MultiColumn } from '
|
|
7
|
-
import { useLocale } from '
|
|
4
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
5
|
+
import { deleteNode } from 'reactjs-tiptap-editor-pro/utils/delete-node';
|
|
6
|
+
import { MultiColumn } from 'reactjs-tiptap-editor-pro/extensions';
|
|
7
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
8
8
|
|
|
9
9
|
export function ColumnsBubbleMenu({ editor }: any) {
|
|
10
10
|
const { t } = useLocale();
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
Tooltip,
|
|
20
20
|
TooltipContent,
|
|
21
21
|
TooltipTrigger,
|
|
22
|
-
} from '
|
|
23
|
-
import { useLocale } from '
|
|
24
|
-
import { DragHandlePlugin, dragHandlePluginDefaultKey } from '
|
|
25
|
-
import { IndentProps, setNodeIndentMarkup } from '
|
|
22
|
+
} from 'reactjs-tiptap-editor-pro/components';
|
|
23
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
24
|
+
import { DragHandlePlugin, dragHandlePluginDefaultKey } from 'reactjs-tiptap-editor-pro/plugins/DragHandle';
|
|
25
|
+
import { IndentProps, setNodeIndentMarkup } from 'reactjs-tiptap-editor-pro/utils/indent';
|
|
26
26
|
|
|
27
27
|
export interface ContentMenuProps {
|
|
28
28
|
editor: Editor
|
|
@@ -7,14 +7,14 @@ import { BubbleMenu } from '@tiptap/react';
|
|
|
7
7
|
import type { GetReferenceClientRect } from 'tippy.js';
|
|
8
8
|
import { sticky } from 'tippy.js';
|
|
9
9
|
|
|
10
|
-
import { ActionButton, type ActionButtonProps, getBubbleText, ItemA, Separator } from '
|
|
11
|
-
import HighlightActionButton from '
|
|
10
|
+
import { ActionButton, type ActionButtonProps, getBubbleText, ItemA, Separator } from 'reactjs-tiptap-editor-pro/components';
|
|
11
|
+
import HighlightActionButton from 'reactjs-tiptap-editor-pro/extensions/Highlight/components/HighlightActionButton';
|
|
12
12
|
import {
|
|
13
13
|
isColumnGripSelected,
|
|
14
14
|
isRowGripSelected,
|
|
15
|
-
} from '
|
|
16
|
-
import { useLocale } from '
|
|
17
|
-
import { type ShouldShowProps } from '
|
|
15
|
+
} from 'reactjs-tiptap-editor-pro/extensions/Table/utils';
|
|
16
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
17
|
+
import { type ShouldShowProps } from 'reactjs-tiptap-editor-pro/types';
|
|
18
18
|
|
|
19
19
|
import BubbleMenuContent from './BubbleMenuContent';
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
4
|
|
|
5
|
-
import { cn } from '
|
|
5
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
5
5
|
import { Check } from 'lucide-react';
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
8
|
|
|
9
9
|
const Checkbox = React.forwardRef<
|
|
10
10
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import { X } from 'lucide-react';
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
8
|
|
|
9
9
|
const Dialog = DialogPrimitive.Root;
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
6
6
|
import { Check, ChevronRight, Circle } from 'lucide-react';
|
|
7
7
|
|
|
8
|
-
import { cn } from '
|
|
8
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
9
9
|
|
|
10
10
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
5
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
8
|
|
|
9
9
|
const labelVariants = cva(
|
|
10
10
|
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
5
|
import { Check, ChevronDown, ChevronUp } from 'lucide-react';
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
8
|
|
|
9
9
|
const Select = SelectPrimitive.Root;
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
7
7
|
|
|
8
8
|
const Separator = React.forwardRef<
|
|
9
9
|
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
7
7
|
|
|
8
8
|
const Switch = React.forwardRef<
|
|
9
9
|
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
@@ -5,7 +5,7 @@ import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
|
5
5
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
6
6
|
import { X } from 'lucide-react';
|
|
7
7
|
|
|
8
|
-
import { cn } from '
|
|
8
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
9
9
|
|
|
10
10
|
const ToastProvider = ToastPrimitives.Provider;
|
|
11
11
|
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
ToastProvider,
|
|
8
8
|
ToastTitle,
|
|
9
9
|
ToastViewport,
|
|
10
|
-
} from '
|
|
11
|
-
import { useToast } from '
|
|
10
|
+
} from 'reactjs-tiptap-editor-pro/components/ui/toast';
|
|
11
|
+
import { useToast } from 'reactjs-tiptap-editor-pro/components/ui/use-toast';
|
|
12
12
|
|
|
13
13
|
export function Toaster() {
|
|
14
14
|
const { toasts } = useToast();
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
5
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
8
|
|
|
9
9
|
const toggleVariants = cva(
|
|
10
10
|
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
|