reactjs-tiptap-editor 0.0.1 → 0.0.2

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 (169) hide show
  1. package/lib/components/ActionButton.d.ts +20 -0
  2. package/lib/components/ActionMenuButton.d.ts +14 -0
  3. package/lib/components/ColorPicker.d.ts +12 -0
  4. package/lib/components/RcTiptapEditor.d.ts +26 -0
  5. package/lib/components/Toolbar.d.ts +2 -0
  6. package/lib/components/icons/AspectRatio.d.ts +3 -0
  7. package/lib/components/icons/Blockquote.d.ts +1 -0
  8. package/lib/components/icons/FileWordOutline.d.ts +3 -0
  9. package/lib/components/icons/Icon.d.ts +7 -0
  10. package/lib/components/icons/LineHeight.d.ts +3 -0
  11. package/lib/components/icons/MenuDown.d.ts +3 -0
  12. package/lib/components/icons/SizeL.d.ts +3 -0
  13. package/lib/components/icons/SizeM.d.ts +3 -0
  14. package/lib/components/icons/SizeS.d.ts +3 -0
  15. package/lib/components/icons/icons.d.ts +2 -0
  16. package/lib/components/menus/bubble.d.ts +56 -0
  17. package/lib/components/menus/components/BubbleMenuLink.d.ts +2 -0
  18. package/lib/components/menus/components/BubbleMenuMedia.d.ts +9 -0
  19. package/lib/components/menus/components/BubbleMenuText.d.ts +8 -0
  20. package/lib/components/menus/components/ContentMenu.d.ts +2 -0
  21. package/lib/components/ui/button.d.ts +11 -0
  22. package/lib/components/ui/dropdown-menu.d.ts +27 -0
  23. package/lib/components/ui/input.d.ts +5 -0
  24. package/lib/components/ui/label.d.ts +5 -0
  25. package/lib/components/ui/popover.d.ts +6 -0
  26. package/lib/components/ui/separator.d.ts +4 -0
  27. package/lib/components/ui/switch.d.ts +4 -0
  28. package/lib/components/ui/tabs.d.ts +7 -0
  29. package/lib/components/ui/toast.d.ts +15 -0
  30. package/lib/components/ui/toaster.d.ts +1 -0
  31. package/lib/components/ui/toggle.d.ts +12 -0
  32. package/lib/components/ui/tooltip.d.ts +7 -0
  33. package/lib/components/ui/use-toast.d.ts +44 -0
  34. package/lib/constants/index.d.ts +44 -0
  35. package/lib/extensions/BaseKit.d.ts +111 -0
  36. package/lib/extensions/Blockquote/Blockquote.d.ts +6 -0
  37. package/lib/extensions/Blockquote/index.d.ts +1 -0
  38. package/lib/extensions/Bold/Bold.d.ts +6 -0
  39. package/lib/extensions/Bold/index.d.ts +1 -0
  40. package/lib/extensions/BulletList/BulletList.d.ts +6 -0
  41. package/lib/extensions/BulletList/index.d.ts +1 -0
  42. package/lib/extensions/Clear/Clear.d.ts +6 -0
  43. package/lib/extensions/Clear/index.d.ts +1 -0
  44. package/lib/extensions/Code/Code.d.ts +6 -0
  45. package/lib/extensions/Code/index.d.ts +1 -0
  46. package/lib/extensions/CodeBlock/CodeBlock.d.ts +6 -0
  47. package/lib/extensions/CodeBlock/index.d.ts +1 -0
  48. package/lib/extensions/Color/Color.d.ts +6 -0
  49. package/lib/extensions/Color/components/ColorActionButton.d.ts +13 -0
  50. package/lib/extensions/Color/index.d.ts +1 -0
  51. package/lib/extensions/Document/Document.d.ts +2 -0
  52. package/lib/extensions/Document/index.d.ts +1 -0
  53. package/lib/extensions/FontFamily/FontFamily.d.ts +3 -0
  54. package/lib/extensions/FontFamily/components/FontFamilyButton.d.ts +26 -0
  55. package/lib/extensions/FontFamily/index.d.ts +1 -0
  56. package/lib/extensions/FontSize/FontSize.d.ts +32 -0
  57. package/lib/extensions/FontSize/components/FontSizeMenuButton.d.ts +23 -0
  58. package/lib/extensions/FontSize/index.d.ts +1 -0
  59. package/lib/extensions/FormatPainter/FormatPainter.d.ts +24 -0
  60. package/lib/extensions/FormatPainter/index.d.ts +1 -0
  61. package/lib/extensions/Heading/Heading.d.ts +6 -0
  62. package/lib/extensions/Heading/components/HeadingButton.d.ts +26 -0
  63. package/lib/extensions/Heading/index.d.ts +1 -0
  64. package/lib/extensions/Highlight/Highlight.d.ts +6 -0
  65. package/lib/extensions/Highlight/components/HighlightActionButton.d.ts +14 -0
  66. package/lib/extensions/Highlight/index.d.ts +1 -0
  67. package/lib/extensions/History/History.d.ts +6 -0
  68. package/lib/extensions/History/components/HistoryActionButton.d.ts +20 -0
  69. package/lib/extensions/History/index.d.ts +1 -0
  70. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
  71. package/lib/extensions/HorizontalRule/index.d.ts +1 -0
  72. package/lib/extensions/Iframe/Iframe.d.ts +23 -0
  73. package/lib/extensions/Iframe/components/IframeNodeView.d.ts +2 -0
  74. package/lib/extensions/Iframe/embed.d.ts +23 -0
  75. package/lib/extensions/Iframe/index.d.ts +1 -0
  76. package/lib/extensions/Image/Image.d.ts +25 -0
  77. package/lib/extensions/Image/components/ImageView.d.ts +2 -0
  78. package/lib/extensions/Image/index.d.ts +1 -0
  79. package/lib/extensions/ImageUpload/ImageUpload.d.ts +16 -0
  80. package/lib/extensions/ImageUpload/components/ImageUploader.d.ts +2 -0
  81. package/lib/extensions/ImageUpload/index.d.ts +1 -0
  82. package/lib/extensions/Indent/Indent.d.ts +23 -0
  83. package/lib/extensions/Indent/index.d.ts +1 -0
  84. package/lib/extensions/Italic/Italic.d.ts +6 -0
  85. package/lib/extensions/Italic/index.d.ts +1 -0
  86. package/lib/extensions/LineHeight/LineHeight.d.ts +17 -0
  87. package/lib/extensions/LineHeight/components/LineHeightDropdown.d.ts +12 -0
  88. package/lib/extensions/LineHeight/index.d.ts +1 -0
  89. package/lib/extensions/Link/Link.d.ts +6 -0
  90. package/lib/extensions/Link/components/LinkEditBlock.d.ts +6 -0
  91. package/lib/extensions/Link/components/LinkEditPopover.d.ts +14 -0
  92. package/lib/extensions/Link/components/LinkViewBlock.d.ts +8 -0
  93. package/lib/extensions/Link/index.d.ts +1 -0
  94. package/lib/extensions/ListItem/ListItem.d.ts +1 -0
  95. package/lib/extensions/ListItem/index.d.ts +1 -0
  96. package/lib/extensions/MoreMark/MoreMark.d.ts +20 -0
  97. package/lib/extensions/MoreMark/components/ActionMoreButton.d.ts +25 -0
  98. package/lib/extensions/MoreMark/index.d.ts +1 -0
  99. package/lib/extensions/MultiColumn/Column.d.ts +4 -0
  100. package/lib/extensions/MultiColumn/ColumnToolbar.d.ts +3 -0
  101. package/lib/extensions/MultiColumn/Columns.d.ts +22 -0
  102. package/lib/extensions/MultiColumn/index.d.ts +3 -0
  103. package/lib/extensions/MultiColumn/menus/ColumnsMenu.d.ts +6 -0
  104. package/lib/extensions/MultiColumn/menus/index.d.ts +1 -0
  105. package/lib/extensions/OrderedList/OrderedList.d.ts +6 -0
  106. package/lib/extensions/OrderedList/index.d.ts +1 -0
  107. package/lib/extensions/Selection/Selection.d.ts +4 -0
  108. package/lib/extensions/Selection/index.d.ts +1 -0
  109. package/lib/extensions/SlashCommand/SlashCommand.d.ts +4 -0
  110. package/lib/extensions/SlashCommand/components/CommandsList.d.ts +4 -0
  111. package/lib/extensions/SlashCommand/groups.d.ts +3 -0
  112. package/lib/extensions/SlashCommand/index.d.ts +1 -0
  113. package/lib/extensions/SlashCommand/types.d.ts +25 -0
  114. package/lib/extensions/Strike/Strike.d.ts +6 -0
  115. package/lib/extensions/Strike/index.d.ts +1 -0
  116. package/lib/extensions/Subscript/Subscript.d.ts +23 -0
  117. package/lib/extensions/Subscript/index.d.ts +1 -0
  118. package/lib/extensions/Table/cell-background.d.ts +19 -0
  119. package/lib/extensions/Table/cell.d.ts +6 -0
  120. package/lib/extensions/Table/components/CreateTablePopover.d.ts +14 -0
  121. package/lib/extensions/Table/components/TableActionButton.d.ts +13 -0
  122. package/lib/extensions/Table/header.d.ts +5 -0
  123. package/lib/extensions/Table/index.d.ts +6 -0
  124. package/lib/extensions/Table/menus/TableBubbleMenu.d.ts +5 -0
  125. package/lib/extensions/Table/menus/TableCell/TableCellMenu.d.ts +21 -0
  126. package/lib/extensions/Table/menus/TableColumn/TableColumnMenu.d.ts +20 -0
  127. package/lib/extensions/Table/menus/TableRow/TableRowMenu.d.ts +20 -0
  128. package/lib/extensions/Table/row.d.ts +2 -0
  129. package/lib/extensions/Table/table.d.ts +24 -0
  130. package/lib/extensions/Table/utils.d.ts +67 -0
  131. package/lib/extensions/TaskList/TaskList.d.ts +12 -0
  132. package/lib/extensions/TaskList/index.d.ts +1 -0
  133. package/lib/extensions/TextAlign/TextAlign.d.ts +18 -0
  134. package/lib/extensions/TextAlign/components/TextAlignMenuButton.d.ts +27 -0
  135. package/lib/extensions/TextAlign/index.d.ts +1 -0
  136. package/lib/extensions/TextBubble/TextBubble.d.ts +7 -0
  137. package/lib/extensions/TextBubble/components/TextDropdown.d.ts +10 -0
  138. package/lib/extensions/TextBubble/index.d.ts +1 -0
  139. package/lib/extensions/TrailingNode/TrailingNode.d.ts +12 -0
  140. package/lib/extensions/TrailingNode/index.d.ts +1 -0
  141. package/lib/extensions/UnderLine/Underline.d.ts +6 -0
  142. package/lib/extensions/UnderLine/index.d.ts +1 -0
  143. package/lib/extensions/Video/Video.d.ts +55 -0
  144. package/lib/extensions/Video/index.d.ts +1 -0
  145. package/lib/extensions/VideoUpload/VideoUpload.d.ts +14 -0
  146. package/lib/extensions/VideoUpload/components/VideoUploaderView.d.ts +2 -0
  147. package/lib/extensions/VideoUpload/index.d.ts +1 -0
  148. package/lib/extensions/index.d.ts +64 -0
  149. package/lib/index.d.ts +4 -0
  150. package/lib/lib/utils.d.ts +3 -0
  151. package/lib/locales/en.d.ts +2 -0
  152. package/lib/locales/index.d.ts +33 -0
  153. package/lib/locales/vi.d.ts +2 -0
  154. package/lib/plugins/image-upload.d.ts +12 -0
  155. package/lib/reactjs-tiptap-editor.js +1 -0
  156. package/lib/reactjs-tiptap-editor.mjs +5704 -0
  157. package/lib/style.css +1 -0
  158. package/lib/theme/theme.d.ts +4 -0
  159. package/lib/types.d.ts +80 -0
  160. package/lib/utils/getRenderContainer.d.ts +4 -0
  161. package/lib/utils/indent.d.ts +15 -0
  162. package/lib/utils/is-mobile.d.ts +19 -0
  163. package/lib/utils/line-height.d.ts +7 -0
  164. package/lib/utils/mitt.d.ts +24 -0
  165. package/lib/utils/plateform.d.ts +11 -0
  166. package/lib/utils/utils.d.ts +17 -0
  167. package/lib/vendor-D85xV5eE.js +518 -0
  168. package/lib/vendor-IlByxugU.mjs +34816 -0
  169. package/package.json +2 -1
@@ -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 IPropsActionButton {
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 ActionButton: (props?: Partial<IPropsActionButton>) => import("react/jsx-runtime").JSX.Element;
20
+ export default ActionButton;
@@ -0,0 +1,14 @@
1
+ import { ButtonViewReturnComponentProps } from '../types';
2
+
3
+ interface IPropsActionMenuButton {
4
+ icon?: any;
5
+ title?: string;
6
+ tooltip?: string;
7
+ disabled?: boolean;
8
+ shortcutKeys?: string[];
9
+ color?: string;
10
+ action?: ButtonViewReturnComponentProps['action'];
11
+ isActive?: ButtonViewReturnComponentProps['isActive'];
12
+ }
13
+ declare const ActionMenuButton: (props: IPropsActionMenuButton) => import("react/jsx-runtime").JSX.Element;
14
+ export default ActionMenuButton;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface IPropsColorPicker {
4
+ highlight?: boolean;
5
+ disabled?: boolean;
6
+ children: React.ReactNode;
7
+ onChange?: (color: any) => void;
8
+ setSelectedColor?: (color: any) => void;
9
+ selectedColor?: string;
10
+ }
11
+ declare const ColorPicker: (props: IPropsColorPicker) => import("react/jsx-runtime").JSX.Element;
12
+ export default ColorPicker;
@@ -0,0 +1,26 @@
1
+ import { AnyExtension } from '@tiptap/core';
2
+ import { UseEditorOptions } from '@tiptap/react';
3
+
4
+ interface IPropsRcTiptapEditor {
5
+ content: string;
6
+ extensions: AnyExtension[];
7
+ output: 'html' | 'json' | 'text';
8
+ modelValue?: string | object;
9
+ dark?: boolean;
10
+ dense?: boolean;
11
+ disabled?: boolean;
12
+ label?: string;
13
+ hideToolbar?: boolean;
14
+ disableBubble?: boolean;
15
+ hideBubble?: boolean;
16
+ removeDefaultWrapper?: boolean;
17
+ maxWidth?: string | number;
18
+ minHeight?: string | number;
19
+ maxHeight?: string | number;
20
+ editorClass?: string | string[] | Record<string, any>;
21
+ contentClass?: string | string[] | Record<string, any>;
22
+ onChangeContent?: (val: any) => void;
23
+ useEditorOptions?: UseEditorOptions;
24
+ }
25
+ declare const _default: import('react').ForwardRefExoticComponent<IPropsRcTiptapEditor & import('react').RefAttributes<unknown>>;
26
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const Toolbar: ({ editor, disabled }: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default Toolbar;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function AspectRatio(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function BlockquoteLeft(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function FileWordOutline(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ interface IPropsIcon {
2
+ name: string;
3
+ className?: string;
4
+ onClick?: (e?: any) => void;
5
+ }
6
+ declare const Icon: (props: IPropsIcon) => import("react/jsx-runtime").JSX.Element;
7
+ export default Icon;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function FormatLineHeight(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function MenuDown(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function SizeL(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function SizeM(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from 'react';
2
+
3
+ export declare function SizeS(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const icons: any;
2
+ export default icons;
@@ -0,0 +1,56 @@
1
+ import { Editor } from '@tiptap/react';
2
+ import { ButtonViewParams, ButtonViewReturn, ExtensionNameKeys } from '../../types';
3
+
4
+ /** Represents the size types for bubble images or videos */
5
+ type BubbleImageOrVideoSizeType = 'size-small' | 'size-medium' | 'size-large';
6
+ /** Represents the various types for bubble images */
7
+ type BubbleImageType = `image-${BubbleImageOrVideoSizeType}` | `video-${BubbleImageOrVideoSizeType}` | 'image' | 'image-aspect-ratio' | 'remove';
8
+ /** Represents the types for bubble videos */
9
+ type BubbleVideoType = 'video' | 'remove';
10
+ /** Represents the overall types for bubbles */
11
+ type BubbleAllType = BubbleImageType | BubbleVideoType | ExtensionNameKeys | 'divider' | (string & {});
12
+ /** Represents the key types for node types */
13
+ export type NodeTypeKey = 'image' | 'text' | 'video';
14
+ /** Represents the menu of bubble types for each node type */
15
+ export type BubbleTypeMenu = Partial<Record<NodeTypeKey, BubbleMenuItem[]>>;
16
+ /** Represents the menu of overall bubble types for each node type */
17
+ export type NodeTypeMenu = Partial<Record<NodeTypeKey, BubbleAllType[]>>;
18
+ /**
19
+ * Represents the structure of a bubble menu item.
20
+ */
21
+ export interface BubbleMenuItem extends ButtonViewReturn {
22
+ /** The type of the bubble item */
23
+ type: BubbleAllType;
24
+ }
25
+ /**
26
+ * Represents a function to generate a bubble menu
27
+ */
28
+ interface BubbleView<T = any> {
29
+ /**
30
+ * Generates a bubble menu based on the provided options.
31
+ * @param {ButtonViewParams<T>} options - The options for generating the bubble menu.
32
+ * @returns {BubbleTypeMenu} The generated bubble menu.
33
+ */
34
+ (options: ButtonViewParams<T>): BubbleTypeMenu;
35
+ }
36
+ /**
37
+ * Represents the options for configuring bubbles.
38
+ * @interface BubbleOptions
39
+ * @template T
40
+ */
41
+ export interface BubbleOptions<T> {
42
+ /** The menu of bubble types for each node type. */
43
+ list: NodeTypeMenu;
44
+ /** The default list of bubble types. */
45
+ defaultBubbleList: any;
46
+ /** The function to generate a bubble menu. */
47
+ button: BubbleView<T>;
48
+ }
49
+ export declare const getBubbleImage: (editor: Editor) => BubbleMenuItem[];
50
+ export declare const getBubbleVideo: (editor: Editor) => BubbleMenuItem[];
51
+ export declare const getBubbleText: (editor: Editor, t: any) => (ButtonViewReturn | ButtonViewReturn[] | {
52
+ type: string;
53
+ component: undefined;
54
+ componentProps: {};
55
+ })[];
56
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const BubbleMenuLink: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default BubbleMenuLink;
@@ -0,0 +1,9 @@
1
+ import { Editor } from '@tiptap/react';
2
+
3
+ interface IPropsBubbleMenu {
4
+ editor: Editor;
5
+ disabled?: boolean;
6
+ }
7
+ declare const BubbleMenuImage: (props: IPropsBubbleMenu) => import("react/jsx-runtime").JSX.Element;
8
+ declare const BubbleMenuVideo: (props: IPropsBubbleMenu) => import("react/jsx-runtime").JSX.Element;
9
+ export { BubbleMenuImage, BubbleMenuVideo };
@@ -0,0 +1,8 @@
1
+ import { Editor } from '@tiptap/core';
2
+
3
+ interface IPropsBubbleMenuText {
4
+ editor: Editor;
5
+ disabled?: boolean;
6
+ }
7
+ declare const BubbleMenuText: (props: IPropsBubbleMenuText) => import("react/jsx-runtime").JSX.Element;
8
+ export default BubbleMenuText;
@@ -0,0 +1,2 @@
1
+ declare const ContentMenu: (props: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default ContentMenu;
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean | undefined;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean | undefined;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean | undefined;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
@@ -0,0 +1,5 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ import * as LabelPrimitive from "@radix-ui/react-label";
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ import * as ToastPrimitives from "@radix-ui/react-toast";
4
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
+ export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1 @@
1
+ export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
4
+ declare const toggleVariants: (props?: ({
5
+ variant?: "default" | "outline" | null | undefined;
6
+ size?: "default" | "sm" | "lg" | null | undefined;
7
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
8
+ declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
9
+ variant?: "default" | "outline" | null | undefined;
10
+ size?: "default" | "sm" | "lg" | null | undefined;
11
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
12
+ export { Toggle, toggleVariants };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
5
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,44 @@
1
+ import { ToastActionElement, ToastProps } from './toast';
2
+ import * as React from "react";
3
+ type ToasterToast = ToastProps & {
4
+ id: string;
5
+ title?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ action?: ToastActionElement;
8
+ };
9
+ declare const actionTypes: {
10
+ readonly ADD_TOAST: "ADD_TOAST";
11
+ readonly UPDATE_TOAST: "UPDATE_TOAST";
12
+ readonly DISMISS_TOAST: "DISMISS_TOAST";
13
+ readonly REMOVE_TOAST: "REMOVE_TOAST";
14
+ };
15
+ type ActionType = typeof actionTypes;
16
+ type Action = {
17
+ type: ActionType["ADD_TOAST"];
18
+ toast: ToasterToast;
19
+ } | {
20
+ type: ActionType["UPDATE_TOAST"];
21
+ toast: Partial<ToasterToast>;
22
+ } | {
23
+ type: ActionType["DISMISS_TOAST"];
24
+ toastId?: ToasterToast["id"];
25
+ } | {
26
+ type: ActionType["REMOVE_TOAST"];
27
+ toastId?: ToasterToast["id"];
28
+ };
29
+ interface State {
30
+ toasts: ToasterToast[];
31
+ }
32
+ export declare const reducer: (state: State, action: Action) => State;
33
+ type Toast = Omit<ToasterToast, "id">;
34
+ declare function toast({ ...props }: Toast): {
35
+ id: string;
36
+ dismiss: () => void;
37
+ update: (props: ToasterToast) => void;
38
+ };
39
+ declare function useToast(): {
40
+ toast: typeof toast;
41
+ dismiss: (toastId?: string) => void;
42
+ toasts: ToasterToast[];
43
+ };
44
+ export { useToast, toast };
@@ -0,0 +1,44 @@
1
+ /** Default lang */
2
+ export declare const DEFAULT_LANG_VALUE: "en";
3
+ /** Throttle time for editor input (milliseconds) */
4
+ export declare const EDITOR_UPDATE_THROTTLE_WAIT_TIME: 200;
5
+ /**
6
+ * watch throttling time must be less than the update time
7
+ * otherwise the cursor position will reach the end
8
+ */
9
+ export declare const EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME: number;
10
+ /** Minimum size for image adjustments */
11
+ export declare const IMAGE_MIN_SIZE: 20;
12
+ /** Maximum size for image adjustments */
13
+ export declare const IMAGE_MAX_SIZE: 100000;
14
+ /** Throttle time during adjustments for images (milliseconds) */
15
+ export declare const IMAGE_THROTTLE_WAIT_TIME: 16;
16
+ /** Default number of rows and columns for grids when creating a table */
17
+ export declare const TABLE_INIT_GRID_SIZE: 10;
18
+ /** Maximum number of rows and columns for grids when creating a table */
19
+ export declare const TABLE_MAX_GRID_SIZE: 10;
20
+ /** Minimum number of rows and columns for grids when creating a table */
21
+ export declare const TABLE_DEFAULT_SELECTED_GRID_SIZE: 2;
22
+ export declare const DEFAULT_COLOR = "#262626";
23
+ /** Default color list for text color and text highlight */
24
+ export declare const COLORS_LIST: readonly ["#000000", "#262626", "#595959", "#8C8C8C", "#BFBFBF", "#D9D9D9", "#E9E9E9", "#F5F5F5", "#FAFAFA", "#FFFFFF", "#F5222D", "#FA541C", "#FA8C16", "#FADB14", "#52C41A", "#13C2C2", "#1890FF", "#2F54EB", "#722ED1", "#EB2F96", "#FFE8E6", "#FFECE0", "#FFEFD1", "#FCFCCA", "#E4F7D2", "#D3F5F0", "#D4EEFC", "#DEE8FC", "#EFE1FA", "#FAE1EB", "#FFA39E", "#FFBB96", "#FFD591", "#FFFB8F", "#B7EB8F", "#87E8DE", "#91D5FF", "#ADC6FF", "#D3ADF7", "#FFADD2", "#FF4D4F", "#FF7A45", "#FFA940", "#FFEC3D", "#73D13D", "#36CFC9", "#40A9FF", "#597EF7", "#9254DE", "#F759AB", "#CF1322", "#D4380D", "#D46B08", "#D4B106", "#389E0D", "#08979C", "#096DD9", "#1D39C4", "#531DAB", "#C41D7F", "#820014", "#871400", "#873800", "#614700", "#135200", "#00474F", "#003A8C", "#061178", "#22075E", "#780650"];
25
+ /** Default font size list */
26
+ export declare const DEFAULT_FONT_SIZE_LIST: readonly ["10px", "11px", "12px", "14px", "16px", "18px", "20px", "22px", "24px", "26px", "28px", "36px", "48px", "72px"];
27
+ /** Default font size value */
28
+ export declare const DEFAULT_FONT_SIZE_VALUE: "defaut";
29
+ /** Options for setting image size in the bubble menu */
30
+ export declare enum IMAGE_SIZE {
31
+ 'size-small' = 200,
32
+ 'size-medium' = 500,
33
+ 'size-large' = "100%"
34
+ }
35
+ /** Options for setting video size in the bubble menu */
36
+ export declare enum VIDEO_SIZE {
37
+ 'size-small' = 480,
38
+ 'size-medium' = 640,
39
+ 'size-large' = "100%"
40
+ }
41
+ export declare const LINE_HEIGHT_100 = 1.7;
42
+ export declare const DEFAULT_LINE_HEIGHT = "1";
43
+ /** display in menus */
44
+ export declare const NODE_TYPE_MENU: any;
@@ -0,0 +1,111 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { CharacterCountOptions } from '@tiptap/extension-character-count';
3
+ import { DropcursorOptions } from '@tiptap/extension-dropcursor';
4
+ import { FocusOptions } from '@tiptap/extension-focus';
5
+ import { HardBreakOptions } from '@tiptap/extension-hard-break';
6
+ import { ListItemOptions } from '@tiptap/extension-list-item';
7
+ import { ParagraphOptions } from '@tiptap/extension-paragraph';
8
+ import { PlaceholderOptions } from '@tiptap/extension-placeholder';
9
+ import { TextStyleOptions } from '@tiptap/extension-text-style';
10
+ import { TextBubbleOptions } from './TextBubble';
11
+ import { TrailingNodeOptions } from './TrailingNode';
12
+
13
+ /**
14
+ * Represents the interface for options in the base toolkit.
15
+ */
16
+ export interface BaseKitOptions {
17
+ /**
18
+ * Whether to enable the document option
19
+ *
20
+ * @default false
21
+ */
22
+ multiColumn?: boolean;
23
+ /**
24
+ * Whether to enable the text option
25
+ *
26
+ * @default true
27
+ */
28
+ text: false;
29
+ /**
30
+ * Whether to enable the Gapcursor
31
+ *
32
+ * @default true
33
+ */
34
+ gapcursor: false;
35
+ /**
36
+ * Dropcursor options or false, indicating whether to enable the drop cursor
37
+ *
38
+ * @default true
39
+ */
40
+ dropcursor: Partial<DropcursorOptions> | false;
41
+ /**
42
+ * character count options or false, indicating whether to enable character count
43
+ *
44
+ * @default true
45
+ */
46
+ characterCount: Partial<CharacterCountOptions> | false;
47
+ /**
48
+ * HardBreak options or false, indicating whether to enable hard breaks
49
+ *
50
+ * @default true
51
+ */
52
+ hardBreak: Partial<HardBreakOptions> | false;
53
+ /**
54
+ * Placeholder options or false, indicating whether to enable placeholders
55
+ *
56
+ * @default true
57
+ */
58
+ placeholder: Partial<PlaceholderOptions> | false;
59
+ /**
60
+ * Paragraph options or false, indicating whether to enable paragraph functionality
61
+ *
62
+ * @default true
63
+ */
64
+ paragraph: Partial<ParagraphOptions> | false;
65
+ /**
66
+ * Focus options or false, indicating whether to enable focus functionality
67
+ *
68
+ * @default true
69
+ */
70
+ focus: Partial<FocusOptions> | false;
71
+ /**
72
+ * ListItem options or false, indicating whether to enable list item functionality
73
+ *
74
+ * @default true
75
+ */
76
+ listItem: Partial<ListItemOptions> | false;
77
+ /**
78
+ * Text Style options or false, indicating whether to enable text style functionality
79
+ *
80
+ * @default true
81
+ */
82
+ textStyle: Partial<TextStyleOptions> | false;
83
+ /**
84
+ * Bubble options, taking `BubbleOptions<BaseKitOptions>` as parameters, indicating whether to enable the bubble functionality
85
+ */
86
+ bubble: any;
87
+ /**
88
+ * Iframe options or false, indicating whether to enable the iframe
89
+ *
90
+ * @default true
91
+ */
92
+ /**
93
+ * Trailing node options or false, indicating whether to enable the trailing node
94
+ *
95
+ * @default true
96
+ */
97
+ trailingNode: Partial<TrailingNodeOptions> | false;
98
+ /**
99
+ * textBubble options or false, indicating whether to enable the textBubble
100
+ *
101
+ * @default true
102
+ */
103
+ textBubble: Partial<TextBubbleOptions> | false;
104
+ /**
105
+ * selection options or false, indicating whether to enable the selection
106
+ *
107
+ * @default true
108
+ */
109
+ selection: any | false;
110
+ }
111
+ export declare const BaseKit: Extension<BaseKitOptions, any>;
@@ -0,0 +1,6 @@
1
+ import { BlockquoteOptions as TiptapBlockquoteOptions } from '@tiptap/extension-blockquote';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface BlockquoteOptions extends TiptapBlockquoteOptions, GeneralOptions<BlockquoteOptions> {
5
+ }
6
+ export declare const Blockquote: import('@tiptap/core').Node<BlockquoteOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './Blockquote';
@@ -0,0 +1,6 @@
1
+ import { BoldOptions as TiptapImageOptions } from '@tiptap/extension-bold';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface BoldOptions extends TiptapImageOptions, GeneralOptions<BoldOptions> {
5
+ }
6
+ export declare const Bold: import('@tiptap/core').Mark<BoldOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './Bold';
@@ -0,0 +1,6 @@
1
+ import { BulletListOptions as TiptapBulletListOptions } from '@tiptap/extension-bullet-list';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface BulletListOptions extends TiptapBulletListOptions, GeneralOptions<BulletListOptions> {
5
+ }
6
+ export declare const BulletList: import('@tiptap/core').Node<BulletListOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './BulletList';
@@ -0,0 +1,6 @@
1
+ import { Node } from '@tiptap/core';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface ClearOptions extends GeneralOptions<ClearOptions> {
5
+ }
6
+ export declare const Clear: Node<ClearOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './Clear';
@@ -0,0 +1,6 @@
1
+ import { CodeOptions as TiptapCodeOptions } from '@tiptap/extension-code';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface CodeOptions extends TiptapCodeOptions, GeneralOptions<CodeOptions> {
5
+ }
6
+ export declare const Code: import('@tiptap/core').Mark<CodeOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './Code';
@@ -0,0 +1,6 @@
1
+ import { CodeBlockLowlightOptions as TiptapCodeBlockOptions } from '@tiptap/extension-code-block-lowlight';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface CodeBlockOptions extends TiptapCodeBlockOptions, GeneralOptions<CodeBlockOptions> {
5
+ }
6
+ export declare const CodeBlock: import('@tiptap/core').Node<CodeBlockOptions, any>;
@@ -0,0 +1 @@
1
+ export * from './CodeBlock';
@@ -0,0 +1,6 @@
1
+ import { ColorOptions as TiptapColorOptions } from '@tiptap/extension-color';
2
+ import { GeneralOptions } from '../../types';
3
+
4
+ export interface ColorOptions extends TiptapColorOptions, GeneralOptions<ColorOptions> {
5
+ }
6
+ export declare const Color: import('@tiptap/core').Extension<ColorOptions, any>;