reactjs-tiptap-editor 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ActionButton.d.ts +20 -0
- package/lib/components/ActionMenuButton.d.ts +14 -0
- package/lib/components/ColorPicker.d.ts +12 -0
- package/lib/components/RcTiptapEditor.d.ts +26 -0
- package/lib/components/Toolbar.d.ts +2 -0
- package/lib/components/icons/AspectRatio.d.ts +3 -0
- package/lib/components/icons/Blockquote.d.ts +1 -0
- package/lib/components/icons/FileWordOutline.d.ts +3 -0
- package/lib/components/icons/Icon.d.ts +7 -0
- package/lib/components/icons/LineHeight.d.ts +3 -0
- package/lib/components/icons/MenuDown.d.ts +3 -0
- package/lib/components/icons/SizeL.d.ts +3 -0
- package/lib/components/icons/SizeM.d.ts +3 -0
- package/lib/components/icons/SizeS.d.ts +3 -0
- package/lib/components/icons/icons.d.ts +2 -0
- package/lib/components/menus/bubble.d.ts +56 -0
- package/lib/components/menus/components/BubbleMenuLink.d.ts +2 -0
- package/lib/components/menus/components/BubbleMenuMedia.d.ts +9 -0
- package/lib/components/menus/components/BubbleMenuText.d.ts +8 -0
- package/lib/components/menus/components/ContentMenu.d.ts +2 -0
- package/lib/components/ui/button.d.ts +11 -0
- package/lib/components/ui/dropdown-menu.d.ts +27 -0
- package/lib/components/ui/input.d.ts +5 -0
- package/lib/components/ui/label.d.ts +5 -0
- package/lib/components/ui/popover.d.ts +6 -0
- package/lib/components/ui/separator.d.ts +4 -0
- package/lib/components/ui/switch.d.ts +4 -0
- package/lib/components/ui/tabs.d.ts +7 -0
- package/lib/components/ui/toast.d.ts +15 -0
- package/lib/components/ui/toaster.d.ts +1 -0
- package/lib/components/ui/toggle.d.ts +12 -0
- package/lib/components/ui/tooltip.d.ts +7 -0
- package/lib/components/ui/use-toast.d.ts +44 -0
- package/lib/constants/index.d.ts +44 -0
- package/lib/extensions/BaseKit.d.ts +111 -0
- package/lib/extensions/Blockquote/Blockquote.d.ts +6 -0
- package/lib/extensions/Blockquote/index.d.ts +1 -0
- package/lib/extensions/Bold/Bold.d.ts +6 -0
- package/lib/extensions/Bold/index.d.ts +1 -0
- package/lib/extensions/BulletList/BulletList.d.ts +6 -0
- package/lib/extensions/BulletList/index.d.ts +1 -0
- package/lib/extensions/Clear/Clear.d.ts +6 -0
- package/lib/extensions/Clear/index.d.ts +1 -0
- package/lib/extensions/Code/Code.d.ts +6 -0
- package/lib/extensions/Code/index.d.ts +1 -0
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +6 -0
- package/lib/extensions/CodeBlock/index.d.ts +1 -0
- package/lib/extensions/Color/Color.d.ts +6 -0
- package/lib/extensions/Color/components/ColorActionButton.d.ts +13 -0
- package/lib/extensions/Color/index.d.ts +1 -0
- package/lib/extensions/Document/Document.d.ts +2 -0
- package/lib/extensions/Document/index.d.ts +1 -0
- package/lib/extensions/FontFamily/FontFamily.d.ts +3 -0
- package/lib/extensions/FontFamily/components/FontFamilyButton.d.ts +26 -0
- package/lib/extensions/FontFamily/index.d.ts +1 -0
- package/lib/extensions/FontSize/FontSize.d.ts +32 -0
- package/lib/extensions/FontSize/components/FontSizeMenuButton.d.ts +23 -0
- package/lib/extensions/FontSize/index.d.ts +1 -0
- package/lib/extensions/FormatPainter/FormatPainter.d.ts +24 -0
- package/lib/extensions/FormatPainter/index.d.ts +1 -0
- package/lib/extensions/Heading/Heading.d.ts +6 -0
- package/lib/extensions/Heading/components/HeadingButton.d.ts +26 -0
- package/lib/extensions/Heading/index.d.ts +1 -0
- package/lib/extensions/Highlight/Highlight.d.ts +6 -0
- package/lib/extensions/Highlight/components/HighlightActionButton.d.ts +14 -0
- package/lib/extensions/Highlight/index.d.ts +1 -0
- package/lib/extensions/History/History.d.ts +6 -0
- package/lib/extensions/History/components/HistoryActionButton.d.ts +20 -0
- package/lib/extensions/History/index.d.ts +1 -0
- package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
- package/lib/extensions/HorizontalRule/index.d.ts +1 -0
- package/lib/extensions/Iframe/Iframe.d.ts +23 -0
- package/lib/extensions/Iframe/components/IframeNodeView.d.ts +2 -0
- package/lib/extensions/Iframe/embed.d.ts +23 -0
- package/lib/extensions/Iframe/index.d.ts +1 -0
- package/lib/extensions/Image/Image.d.ts +25 -0
- package/lib/extensions/Image/components/ImageView.d.ts +2 -0
- package/lib/extensions/Image/index.d.ts +1 -0
- package/lib/extensions/ImageUpload/ImageUpload.d.ts +16 -0
- package/lib/extensions/ImageUpload/components/ImageUploader.d.ts +2 -0
- package/lib/extensions/ImageUpload/index.d.ts +1 -0
- package/lib/extensions/Indent/Indent.d.ts +23 -0
- package/lib/extensions/Indent/index.d.ts +1 -0
- package/lib/extensions/Italic/Italic.d.ts +6 -0
- package/lib/extensions/Italic/index.d.ts +1 -0
- package/lib/extensions/LineHeight/LineHeight.d.ts +17 -0
- package/lib/extensions/LineHeight/components/LineHeightDropdown.d.ts +12 -0
- package/lib/extensions/LineHeight/index.d.ts +1 -0
- package/lib/extensions/Link/Link.d.ts +6 -0
- package/lib/extensions/Link/components/LinkEditBlock.d.ts +6 -0
- package/lib/extensions/Link/components/LinkEditPopover.d.ts +14 -0
- package/lib/extensions/Link/components/LinkViewBlock.d.ts +8 -0
- package/lib/extensions/Link/index.d.ts +1 -0
- package/lib/extensions/ListItem/ListItem.d.ts +1 -0
- package/lib/extensions/ListItem/index.d.ts +1 -0
- package/lib/extensions/MoreMark/MoreMark.d.ts +20 -0
- package/lib/extensions/MoreMark/components/ActionMoreButton.d.ts +25 -0
- package/lib/extensions/MoreMark/index.d.ts +1 -0
- package/lib/extensions/MultiColumn/Column.d.ts +4 -0
- package/lib/extensions/MultiColumn/ColumnToolbar.d.ts +3 -0
- package/lib/extensions/MultiColumn/Columns.d.ts +22 -0
- package/lib/extensions/MultiColumn/index.d.ts +3 -0
- package/lib/extensions/MultiColumn/menus/ColumnsMenu.d.ts +6 -0
- package/lib/extensions/MultiColumn/menus/index.d.ts +1 -0
- package/lib/extensions/OrderedList/OrderedList.d.ts +6 -0
- package/lib/extensions/OrderedList/index.d.ts +1 -0
- package/lib/extensions/Selection/Selection.d.ts +4 -0
- package/lib/extensions/Selection/index.d.ts +1 -0
- package/lib/extensions/SlashCommand/SlashCommand.d.ts +4 -0
- package/lib/extensions/SlashCommand/components/CommandsList.d.ts +4 -0
- package/lib/extensions/SlashCommand/groups.d.ts +3 -0
- package/lib/extensions/SlashCommand/index.d.ts +1 -0
- package/lib/extensions/SlashCommand/types.d.ts +25 -0
- package/lib/extensions/Strike/Strike.d.ts +6 -0
- package/lib/extensions/Strike/index.d.ts +1 -0
- package/lib/extensions/Subscript/Subscript.d.ts +23 -0
- package/lib/extensions/Subscript/index.d.ts +1 -0
- package/lib/extensions/Table/cell-background.d.ts +19 -0
- package/lib/extensions/Table/cell.d.ts +6 -0
- package/lib/extensions/Table/components/CreateTablePopover.d.ts +14 -0
- package/lib/extensions/Table/components/TableActionButton.d.ts +13 -0
- package/lib/extensions/Table/header.d.ts +5 -0
- package/lib/extensions/Table/index.d.ts +6 -0
- package/lib/extensions/Table/menus/TableBubbleMenu.d.ts +5 -0
- package/lib/extensions/Table/menus/TableCell/TableCellMenu.d.ts +21 -0
- package/lib/extensions/Table/menus/TableColumn/TableColumnMenu.d.ts +20 -0
- package/lib/extensions/Table/menus/TableRow/TableRowMenu.d.ts +20 -0
- package/lib/extensions/Table/row.d.ts +2 -0
- package/lib/extensions/Table/table.d.ts +24 -0
- package/lib/extensions/Table/utils.d.ts +67 -0
- package/lib/extensions/TaskList/TaskList.d.ts +12 -0
- package/lib/extensions/TaskList/index.d.ts +1 -0
- package/lib/extensions/TextAlign/TextAlign.d.ts +18 -0
- package/lib/extensions/TextAlign/components/TextAlignMenuButton.d.ts +27 -0
- package/lib/extensions/TextAlign/index.d.ts +1 -0
- package/lib/extensions/TextBubble/TextBubble.d.ts +7 -0
- package/lib/extensions/TextBubble/components/TextDropdown.d.ts +10 -0
- package/lib/extensions/TextBubble/index.d.ts +1 -0
- package/lib/extensions/TrailingNode/TrailingNode.d.ts +12 -0
- package/lib/extensions/TrailingNode/index.d.ts +1 -0
- package/lib/extensions/UnderLine/Underline.d.ts +6 -0
- package/lib/extensions/UnderLine/index.d.ts +1 -0
- package/lib/extensions/Video/Video.d.ts +55 -0
- package/lib/extensions/Video/index.d.ts +1 -0
- package/lib/extensions/VideoUpload/VideoUpload.d.ts +14 -0
- package/lib/extensions/VideoUpload/components/VideoUploaderView.d.ts +2 -0
- package/lib/extensions/VideoUpload/index.d.ts +1 -0
- package/lib/extensions/index.d.ts +64 -0
- package/lib/index.d.ts +4 -0
- package/lib/lib/utils.d.ts +3 -0
- package/lib/locales/en.d.ts +2 -0
- package/lib/locales/index.d.ts +33 -0
- package/lib/locales/vi.d.ts +2 -0
- package/lib/plugins/image-upload.d.ts +12 -0
- package/lib/reactjs-tiptap-editor.js +1 -0
- package/lib/reactjs-tiptap-editor.mjs +5704 -0
- package/lib/style.css +1 -0
- package/lib/theme/theme.d.ts +4 -0
- package/lib/types.d.ts +80 -0
- package/lib/utils/getRenderContainer.d.ts +4 -0
- package/lib/utils/indent.d.ts +15 -0
- package/lib/utils/is-mobile.d.ts +19 -0
- package/lib/utils/line-height.d.ts +7 -0
- package/lib/utils/mitt.d.ts +24 -0
- package/lib/utils/plateform.d.ts +11 -0
- package/lib/utils/utils.d.ts +17 -0
- package/lib/vendor-D85xV5eE.js +518 -0
- package/lib/vendor-IlByxugU.mjs +34816 -0
- package/package.json +9 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
interface IProps {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
icon?: any;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
10
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
11
|
+
}
|
|
12
|
+
declare const ColorActionButton: (props: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default ColorActionButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Color';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Document';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
font?: string;
|
|
8
|
+
isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
|
|
9
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
shortcutKeys?: string[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
divider?: boolean;
|
|
14
|
+
default?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
editor: any;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
color?: string;
|
|
20
|
+
shortcutKeys?: string[];
|
|
21
|
+
maxHeight?: string | number;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
items?: Item[];
|
|
24
|
+
}
|
|
25
|
+
declare const FontFamilyButton: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default FontFamilyButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FontFamily';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents the interface for font size options, extending GeneralOptions.
|
|
6
|
+
*/
|
|
7
|
+
export interface FontSizeOptions extends GeneralOptions<FontSizeOptions> {
|
|
8
|
+
types: string[];
|
|
9
|
+
/**
|
|
10
|
+
* List of available font size values
|
|
11
|
+
*
|
|
12
|
+
* @default DEFAULT_FONT_SIZE_LIST
|
|
13
|
+
*/
|
|
14
|
+
fontSizes: string[];
|
|
15
|
+
}
|
|
16
|
+
declare module '@tiptap/core' {
|
|
17
|
+
interface Commands<ReturnType> {
|
|
18
|
+
fontSize: {
|
|
19
|
+
/**
|
|
20
|
+
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
21
|
+
* CSS font-size
|
|
22
|
+
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
23
|
+
*/
|
|
24
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
25
|
+
/**
|
|
26
|
+
* Unset the font size
|
|
27
|
+
*/
|
|
28
|
+
unsetFontSize: () => ReturnType;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export declare const FontSize: Extension<FontSizeOptions, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
title: string;
|
|
6
|
+
isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
|
|
7
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
divider?: boolean;
|
|
11
|
+
default?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface IPropsFontSizeMenuButton {
|
|
14
|
+
editor: any;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
color?: string;
|
|
17
|
+
shortcutKeys?: string[];
|
|
18
|
+
maxHeight?: string | number;
|
|
19
|
+
tooltip?: string;
|
|
20
|
+
items?: Item[];
|
|
21
|
+
}
|
|
22
|
+
declare const FontSizeMenuButton: (props: IPropsFontSizeMenuButton) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default FontSizeMenuButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FontSize';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { Mark } from '@tiptap/pm/model';
|
|
3
|
+
import { GeneralOptions } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents the interface for font size options, extending GeneralOptions.
|
|
7
|
+
*/
|
|
8
|
+
export interface FormatPainterOptions extends GeneralOptions<FormatPainterOptions> {
|
|
9
|
+
}
|
|
10
|
+
declare module '@tiptap/core' {
|
|
11
|
+
interface Commands<ReturnType> {
|
|
12
|
+
painter: {
|
|
13
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export type PainterAction = {
|
|
18
|
+
type: 'start' | 'end';
|
|
19
|
+
marks: Mark[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 格式刷
|
|
23
|
+
*/
|
|
24
|
+
export declare const FormatPainter: Extension<FormatPainterOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormatPainter';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HeadingOptions as TiptapHeadingOptions } from '@tiptap/extension-heading';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface HeadingOptions extends TiptapHeadingOptions, GeneralOptions<HeadingOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Heading: import('@tiptap/core').Node<HeadingOptions, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
level?: number;
|
|
8
|
+
isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
|
|
9
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
shortcutKeys?: string[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
divider?: boolean;
|
|
14
|
+
default?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
editor: any;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
color?: string;
|
|
20
|
+
shortcutKeys?: string[];
|
|
21
|
+
maxHeight?: string | number;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
items?: Item[];
|
|
24
|
+
}
|
|
25
|
+
declare const HeadingButton: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default HeadingButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Heading';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HighlightOptions as TiptapHighlightOptions } from '@tiptap/extension-highlight';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface HighlightOptions extends TiptapHighlightOptions, GeneralOptions<HighlightOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Highlight: import('@tiptap/core').Mark<HighlightOptions, any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
interface IPropsHighlightActionButton {
|
|
5
|
+
editor: any;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
9
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
10
|
+
tooltipOptions?: TooltipContentProps;
|
|
11
|
+
shortcutKeys?: string[];
|
|
12
|
+
}
|
|
13
|
+
declare const HighlightActionButton: (props: IPropsHighlightActionButton) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default HighlightActionButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Highlight';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HistoryOptions as TiptapHistoryOptions } from '@tiptap/extension-history';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface HistoryOptions extends TiptapHistoryOptions, GeneralOptions<HistoryOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const History: import('@tiptap/core').Extension<HistoryOptions, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
3
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
4
|
+
|
|
5
|
+
interface IPropsHistoryActionButton {
|
|
6
|
+
icon?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
shortcutKeys?: string[];
|
|
11
|
+
customClass?: string;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
tooltipOptions?: TooltipContentProps;
|
|
14
|
+
color?: string;
|
|
15
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
16
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const HistoryActionButton: (props?: Partial<IPropsHistoryActionButton>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default HistoryActionButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './History';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HorizontalRuleOptions as TiptapHorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface HorizontalRuleOptions extends TiptapHorizontalRuleOptions, GeneralOptions<HorizontalRuleOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const HorizontalRule: import('@tiptap/core').Node<HorizontalRuleOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HorizontalRule';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface IframeOptions extends GeneralOptions<IframeOptions> {
|
|
5
|
+
allowFullscreen: boolean;
|
|
6
|
+
HTMLAttributes: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare module '@tiptap/core' {
|
|
11
|
+
interface Commands<ReturnType> {
|
|
12
|
+
iframe: {
|
|
13
|
+
/**
|
|
14
|
+
* Add an iframe
|
|
15
|
+
*/
|
|
16
|
+
setIframe: (options: {
|
|
17
|
+
src: string;
|
|
18
|
+
service: string;
|
|
19
|
+
}) => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const Iframe: Node<IframeOptions, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface ServiceType {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
icon: any;
|
|
5
|
+
}
|
|
6
|
+
export declare const VideoServices: ServiceType[];
|
|
7
|
+
export declare const MapServices: ServiceType[];
|
|
8
|
+
export declare const DesignServices: ServiceType[];
|
|
9
|
+
export declare const DevelopServices: ServiceType[];
|
|
10
|
+
export declare const DataServices: ServiceType[];
|
|
11
|
+
export declare const OtherServices: never[];
|
|
12
|
+
export declare const AllEmbedServices: ServiceType[];
|
|
13
|
+
export declare const getEmbedService: (value: any) => {};
|
|
14
|
+
/**
|
|
15
|
+
* Embed service link
|
|
16
|
+
* @id source id
|
|
17
|
+
* @exmplae example link
|
|
18
|
+
* @src source src, used in iframe
|
|
19
|
+
*/
|
|
20
|
+
export declare const EmbedServiceLink: any;
|
|
21
|
+
export declare function getExampleUrl(service: string): string;
|
|
22
|
+
export declare const getServiceSrc: (originalLink: any) => any;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Iframe';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SetImageAttrsOptions {
|
|
2
|
+
src?: string;
|
|
3
|
+
/** The alternative text for the image. */
|
|
4
|
+
alt?: string;
|
|
5
|
+
/** The title of the image. */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** The width of the image. */
|
|
8
|
+
width?: number | string | null;
|
|
9
|
+
}
|
|
10
|
+
declare module '@tiptap/core' {
|
|
11
|
+
interface Commands<ReturnType> {
|
|
12
|
+
imageResize: {
|
|
13
|
+
/**
|
|
14
|
+
* Add an image
|
|
15
|
+
*/
|
|
16
|
+
setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
17
|
+
/**
|
|
18
|
+
* Update an image
|
|
19
|
+
*/
|
|
20
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare const Image: import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any>;
|
|
25
|
+
export default Image;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Image';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Node } from '@tiptap/react';
|
|
2
|
+
|
|
3
|
+
export interface ImageUploadOptions {
|
|
4
|
+
upload: (file: File) => Promise<string>;
|
|
5
|
+
acceptMimes: string[];
|
|
6
|
+
maxSize: number;
|
|
7
|
+
}
|
|
8
|
+
declare module '@tiptap/core' {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
imageUpload: {
|
|
11
|
+
setImageUpload: () => ReturnType;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const ImageUpload: Node<ImageUploadOptions, any>;
|
|
16
|
+
export default ImageUpload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageUpload';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface IndentOptions extends GeneralOptions<IndentOptions> {
|
|
5
|
+
types: string[];
|
|
6
|
+
minIndent: number;
|
|
7
|
+
maxIndent: number;
|
|
8
|
+
}
|
|
9
|
+
declare module '@tiptap/core' {
|
|
10
|
+
interface Commands<ReturnType> {
|
|
11
|
+
indent: {
|
|
12
|
+
/**
|
|
13
|
+
* Set the indent attribute
|
|
14
|
+
*/
|
|
15
|
+
indent: () => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Set the outdent attribute
|
|
18
|
+
*/
|
|
19
|
+
outdent: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const Indent: Extension<IndentOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Indent';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ItalicOptions as TiptapItalicOptions } from '@tiptap/extension-italic';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface ItalicOptions extends TiptapItalicOptions, GeneralOptions<ItalicOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Italic: import('@tiptap/core').Mark<ItalicOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Italic';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface LineHeightOptions extends GeneralOptions<LineHeightOptions> {
|
|
5
|
+
types: string[];
|
|
6
|
+
lineHeights: string[];
|
|
7
|
+
defaultHeight: string;
|
|
8
|
+
}
|
|
9
|
+
declare module '@tiptap/core' {
|
|
10
|
+
interface Commands<ReturnType> {
|
|
11
|
+
lineHeight: {
|
|
12
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
13
|
+
unsetLineHeight: () => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
2
|
+
|
|
3
|
+
interface IPropsLineHeightDropdown {
|
|
4
|
+
editor: any;
|
|
5
|
+
icon?: any;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
9
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
10
|
+
}
|
|
11
|
+
declare const LineHeightDropdown: (props: IPropsLineHeightDropdown) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default LineHeightDropdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LineHeight';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LinkOptions as TiptapLinkOptions } from '@tiptap/extension-link';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface LinkOptions extends TiptapLinkOptions, GeneralOptions<LinkOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Link: import('@tiptap/core').Mark<LinkOptions, any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
2
|
+
|
|
3
|
+
interface IPropsLinkEditPopover {
|
|
4
|
+
editor: any;
|
|
5
|
+
icon?: any;
|
|
6
|
+
title?: string;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
shortcutKeys?: string[];
|
|
10
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
11
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
12
|
+
}
|
|
13
|
+
declare const LinkEditPopover: (props: IPropsLinkEditPopover) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default LinkEditPopover;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Link';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@tiptap/extension-list-item';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListItem';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { SubscriptExtensionOptions as TiptapSubscriptOptions } from '@tiptap/extension-subscript';
|
|
3
|
+
import { SuperscriptExtensionOptions as TiptapSuperscriptOptions } from '@tiptap/extension-superscript';
|
|
4
|
+
import { GeneralOptions } from '../../types';
|
|
5
|
+
|
|
6
|
+
export interface MoreMarkOptions extends GeneralOptions<MoreMarkOptions> {
|
|
7
|
+
/**
|
|
8
|
+
* // 下标
|
|
9
|
+
*
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
subscript: Partial<TiptapSubscriptOptions> | false;
|
|
13
|
+
/**
|
|
14
|
+
* // 上标
|
|
15
|
+
*
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
superscript: Partial<TiptapSuperscriptOptions> | false;
|
|
19
|
+
}
|
|
20
|
+
export declare const MoreMark: Extension<MoreMarkOptions, any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: any;
|
|
7
|
+
isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
|
|
8
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
shortcutKeys?: string[];
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
divider?: boolean;
|
|
13
|
+
default?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface IPropsActionMoreButton {
|
|
16
|
+
editor: any;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
color?: string;
|
|
19
|
+
maxHeight?: string | number;
|
|
20
|
+
icon?: any;
|
|
21
|
+
tooltip?: string;
|
|
22
|
+
items?: Item[];
|
|
23
|
+
}
|
|
24
|
+
declare const ActionMoreButton: (props: IPropsActionMoreButton) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default ActionMoreButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MoreMark';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export declare enum ColumnLayout {
|
|
5
|
+
SidebarLeft = "sidebar-left",
|
|
6
|
+
SidebarRight = "sidebar-right",
|
|
7
|
+
TwoColumn = "two-column"
|
|
8
|
+
}
|
|
9
|
+
declare module '@tiptap/core' {
|
|
10
|
+
interface Commands<ReturnType> {
|
|
11
|
+
columns: {
|
|
12
|
+
setColumns: () => ReturnType;
|
|
13
|
+
setLayout: (layout: ColumnLayout) => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export interface ColumnsOptions extends GeneralOptions<ColumnsOptions> {
|
|
18
|
+
columnOptions: any;
|
|
19
|
+
layout: ColumnLayout;
|
|
20
|
+
}
|
|
21
|
+
export declare const Columns: Node<ColumnsOptions, any>;
|
|
22
|
+
export default Columns;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ColumnsMenu';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OrderedListOptions as TiptapOrderedListOptions } from '@tiptap/extension-ordered-list';
|
|
2
|
+
import { GeneralOptions } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface OrderedListOptions extends TiptapOrderedListOptions, GeneralOptions<OrderedListOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const OrderedList: import('@tiptap/core').Node<OrderedListOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OrderedList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Selection';
|