reactjs-tiptap-editor 0.0.27 → 0.0.30

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/index.d.cts CHANGED
@@ -5,13 +5,10 @@ import { BulletListOptions as BulletListOptions_2 } from '@tiptap/extension-bull
5
5
  import { BundledLanguage } from 'shiki';
6
6
  import { BundledTheme } from 'shiki';
7
7
  import { CharacterCountOptions } from '@tiptap/extension-character-count';
8
- import { ClassProp } from 'class-variance-authority/types';
9
8
  import { CodeBlockOptions as CodeBlockOptions_2 } from '@tiptap/extension-code-block';
10
9
  import { CodeOptions as CodeOptions_2 } from '@tiptap/extension-code';
11
10
  import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-color';
12
- import { default as default_2 } from 'react';
13
11
  import { DropcursorOptions } from '@tiptap/extension-dropcursor';
14
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
15
12
  import { Editor } from '@tiptap/react';
16
13
  import { Editor as Editor_2 } from '@tiptap/core';
17
14
  import { Extension } from '@tiptap/core';
@@ -25,9 +22,6 @@ import { HistoryOptions as HistoryOptions_2 } from '@tiptap/extension-history';
25
22
  import { HorizontalRuleOptions as HorizontalRuleOptions_2 } from '@tiptap/extension-horizontal-rule';
26
23
  import { ImageOptions } from '@tiptap/extension-image';
27
24
  import { ItalicOptions as ItalicOptions_2 } from '@tiptap/extension-italic';
28
- import { JSX as JSX_2 } from 'react/jsx-runtime';
29
- import { JSXElementConstructor } from 'react';
30
- import * as LabelPrimitive from '@radix-ui/react-label';
31
25
  import { LinkOptions as LinkOptions_2 } from '@tiptap/extension-link';
32
26
  import { ListItemOptions } from '@tiptap/extension-list-item';
33
27
  import { Mark } from '@tiptap/core';
@@ -36,102 +30,22 @@ import { Node as Node_3 } from '@tiptap/react';
36
30
  import { OrderedListOptions as OrderedListOptions_2 } from '@tiptap/extension-ordered-list';
37
31
  import { ParagraphOptions } from '@tiptap/extension-paragraph';
38
32
  import { PlaceholderOptions } from '@tiptap/extension-placeholder';
39
- import * as PopoverPrimitive from '@radix-ui/react-popover';
40
- import * as React_2 from 'react';
41
- import { ReactElement } from 'react';
42
- import { ReactNode } from 'react';
43
33
  import { RefAttributes } from 'react';
44
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
45
34
  import { StrikeOptions as StrikeOptions_2 } from '@tiptap/extension-strike';
46
35
  import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
47
36
  import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
48
- import { SVGProps } from 'react';
49
- import * as SwitchPrimitives from '@radix-ui/react-switch';
50
37
  import { TableCellOptions } from '@tiptap/extension-table-cell';
51
38
  import { TableHeaderOptions } from '@tiptap/extension-table-header';
52
39
  import { TableRowOptions } from '@tiptap/extension-table-row';
53
- import * as TabsPrimitive from '@radix-ui/react-tabs';
54
40
  import { TaskItemOptions } from '@tiptap/extension-task-item';
55
41
  import { TaskListOptions as TaskListOptions_2 } from '@tiptap/extension-task-list';
56
42
  import { TextAlignOptions as TextAlignOptions_2 } from '@tiptap/extension-text-align';
57
43
  import { TextStyleOptions } from '@tiptap/extension-text-style';
58
- import * as ToastPrimitives from '@radix-ui/react-toast';
59
- import * as TogglePrimitive from '@radix-ui/react-toggle';
60
- import { TooltipContentProps } from '@radix-ui/react-tooltip';
61
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
62
44
  import { UnderlineOptions as UnderlineOptions_2 } from '@tiptap/extension-underline';
63
45
  import { UseEditorOptions } from '@tiptap/react';
64
- import { VariantProps } from 'class-variance-authority';
65
-
66
- declare type Action = {
67
- type: ActionType['ADD_TOAST'];
68
- toast: ToasterToast;
69
- } | {
70
- type: ActionType['UPDATE_TOAST'];
71
- toast: Partial<ToasterToast>;
72
- } | {
73
- type: ActionType['DISMISS_TOAST'];
74
- toastId?: ToasterToast['id'];
75
- } | {
76
- type: ActionType['REMOVE_TOAST'];
77
- toastId?: ToasterToast['id'];
78
- };
79
-
80
- export declare const ActionButton: default_2.ForwardRefExoticComponent<Partial<ActionButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
81
-
82
- export declare interface ActionButtonProps {
83
- icon?: string;
84
- title?: string;
85
- tooltip?: string;
86
- disabled?: boolean;
87
- shortcutKeys?: string[];
88
- customClass?: string;
89
- loading?: boolean;
90
- tooltipOptions?: TooltipContentProps;
91
- color?: string;
92
- action?: ButtonViewReturnComponentProps['action'];
93
- isActive?: ButtonViewReturnComponentProps['isActive'];
94
- children?: default_2.ReactNode;
95
- asChild?: boolean;
96
- upload?: boolean;
97
- }
98
-
99
- export declare const ActionMenuButton: default_2.ForwardRefExoticComponent<ActionMenuButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
100
-
101
- export declare interface ActionMenuButtonProps {
102
- /** Icon name to display */
103
- icon?: any;
104
- /** Button title text */
105
- title?: string;
106
- /** Tooltip text */
107
- tooltip?: string;
108
- /** Whether the button is disabled */
109
- disabled?: boolean;
110
- /** Keyboard shortcut keys */
111
- shortcutKeys?: string[];
112
- /** Button color */
113
- color?: string;
114
- /** Click action handler */
115
- action?: ButtonViewReturnComponentProps['action'];
116
- /** Active state checker */
117
- isActive?: ButtonViewReturnComponentProps['isActive'];
118
- /** Whether to render as child */
119
- asChild?: boolean;
120
- }
121
-
122
- declare type ActionType = typeof actionTypes;
123
-
124
- declare const actionTypes: {
125
- readonly ADD_TOAST: "ADD_TOAST";
126
- readonly UPDATE_TOAST: "UPDATE_TOAST";
127
- readonly DISMISS_TOAST: "DISMISS_TOAST";
128
- readonly REMOVE_TOAST: "REMOVE_TOAST";
129
- };
130
46
 
131
47
  declare type Alignments = 'left' | 'center' | 'right' | 'justify';
132
48
 
133
- export declare function AspectRatio(props: SVGProps<SVGSVGElement>): JSX_2.Element;
134
-
135
49
  export declare const BaseKit: Extension<BaseKitOptions, any>;
136
50
 
137
51
  /**
@@ -241,8 +155,6 @@ export declare interface BaseKitOptions {
241
155
 
242
156
  export declare const Blockquote: Node_2<BlockquoteOptions, any>;
243
157
 
244
- export declare function BlockquoteLeft(props: SVGProps<SVGSVGElement>): JSX_2.Element;
245
-
246
158
  export declare interface BlockquoteOptions extends BlockquoteOptions_2, GeneralOptions<BlockquoteOptions> {
247
159
  }
248
160
 
@@ -251,51 +163,6 @@ export declare const Bold: Mark<BoldOptions, any>;
251
163
  export declare interface BoldOptions extends BoldOptions_2, GeneralOptions<BoldOptions> {
252
164
  }
253
165
 
254
- /** display in bubble text menu */
255
- export declare const BUBBLE_TEXT_LIST: string[];
256
-
257
- /** Represents the overall types for bubbles */
258
- declare type BubbleAllType = BubbleImageType | BubbleVideoType | ExtensionNameKeys | 'divider' | (string & {});
259
-
260
- /** Represents the size types for bubble images or videos */
261
- declare type BubbleImageOrVideoSizeType = 'size-small' | 'size-medium' | 'size-large';
262
-
263
- /** Represents the various types for bubble images */
264
- declare type BubbleImageType = `image-${BubbleImageOrVideoSizeType}` | `video-${BubbleImageOrVideoSizeType}` | 'image' | 'image-aspect-ratio' | 'remove';
265
-
266
- /**
267
- * Bubble Menu Component
268
- *
269
- * @param editor Editor instance
270
- * @param disabled Whether the menu is disabled
271
- * @param bubbleMenu Bubble menu configuration
272
- * @returns Bubble menu component
273
- */
274
- export declare function BubbleMenu({ editor, disabled, bubbleMenu }: BubbleMenuComponentProps): string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | (JSX_2.Element | null)[] | null | undefined;
275
-
276
- export declare interface BubbleMenuComponentProps {
277
- editor: Editor_2;
278
- disabled?: boolean;
279
- bubbleMenu?: BubbleMenuProps;
280
- }
281
-
282
- export declare function BubbleMenuImage(props: IPropsBubbleMenu): JSX_2.Element;
283
-
284
- /**
285
- * Represents the structure of a bubble menu item.
286
- */
287
- export declare interface BubbleMenuItem extends ButtonViewReturn {
288
- /** The type of the bubble item */
289
- type: BubbleAllType;
290
- }
291
-
292
- export declare function BubbleMenuLink({ editor, disabled }: BubbleMenuLinkProps): JSX_2.Element;
293
-
294
- export declare interface BubbleMenuLinkProps {
295
- editor: Editor;
296
- disabled?: boolean;
297
- }
298
-
299
166
  /**
300
167
  * Represents the BubbleMenuProps.
301
168
  */
@@ -368,63 +235,11 @@ declare interface BubbleMenuRenderProps {
368
235
  bubbleMenu: BubbleMenuProps;
369
236
  }
370
237
 
371
- export declare function BubbleMenuText(props: BubbleMenuTextProps): JSX_2.Element;
372
-
373
- export declare interface BubbleMenuTextProps {
374
- editor: Editor_2;
375
- disabled?: boolean;
376
- }
377
-
378
- export declare function BubbleMenuVideo(props: IPropsBubbleMenu): JSX_2.Element;
379
-
380
- /**
381
- * Represents the options for configuring bubbles.
382
- * @interface BubbleOptions
383
- * @template T
384
- */
385
- export declare interface BubbleOptions<T> {
386
- /** The menu of bubble types for each node type. */
387
- list: NodeTypeMenu;
388
- /** The default list of bubble types. */
389
- defaultBubbleList: any;
390
- /** The function to generate a bubble menu. */
391
- button: BubbleView<T>;
392
- }
393
-
394
- /** Represents the menu of bubble types for each node type */
395
- export declare type BubbleTypeMenu = Partial<Record<NodeTypeKey, BubbleMenuItem[]>>;
396
-
397
- /** Represents the types for bubble videos */
398
- declare type BubbleVideoType = 'video' | 'remove';
399
-
400
- /**
401
- * Represents a function to generate a bubble menu
402
- */
403
- declare interface BubbleView<T = any> {
404
- /**
405
- * Generates a bubble menu based on the provided options.
406
- * @param {ButtonViewParams<T>} options - The options for generating the bubble menu.
407
- * @returns {BubbleTypeMenu} The generated bubble menu.
408
- */
409
- (options: ButtonViewParams<T>): BubbleTypeMenu;
410
- }
411
-
412
238
  export declare const BulletList: Node_2<BulletListOptions, any>;
413
239
 
414
240
  export declare interface BulletListOptions extends BulletListOptions_2, GeneralOptions<BulletListOptions> {
415
241
  }
416
242
 
417
- export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
418
-
419
- export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
420
- asChild?: boolean;
421
- }
422
-
423
- export declare const buttonVariants: (props?: ({
424
- variant?: "default" | "link" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
425
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
426
- } & ClassProp) | undefined) => string;
427
-
428
243
  /**
429
244
  * Represents the ButtonView function.
430
245
  */
@@ -510,116 +325,15 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
510
325
  defaultColor?: string;
511
326
  }
512
327
 
513
- export declare function ColorPicker(props: ColorPickerProps): JSX_2.Element;
514
-
515
- export declare interface ColorPickerProps {
516
- highlight?: boolean;
517
- disabled?: boolean;
518
- colors?: string[];
519
- defaultColor?: string;
520
- children: default_2.ReactNode;
521
- onChange?: (color: string | undefined) => void;
522
- setSelectedColor?: (color: string | undefined) => void;
523
- selectedColor?: string;
524
- }
525
-
526
- /** Default color list for text color and text highlight */
527
- 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"];
528
-
529
328
  export declare const Column: Node_2<any, any>;
530
329
 
531
330
  export declare const ColumnActionButton: Extension<any, any>;
532
331
 
533
- export declare function ColumnsBubbleMenu({ editor }: any): JSX_2.Element;
534
-
535
- export declare function ContentMenu(props: ContentMenuProps): JSX_2.Element;
536
-
537
- export declare interface ContentMenuProps {
538
- editor: Editor_2;
539
- disabled?: boolean;
540
- className?: string;
541
- pluginKey?: string;
542
- }
543
-
544
332
  declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
545
333
  editor: Editor_2 | null;
546
334
  }>>;
547
335
  export default _default;
548
336
 
549
- export declare const DEFAULT_COLOR = "#262626";
550
-
551
- /** Default font family list */
552
- export declare const DEFAULT_FONT_FAMILY_LIST: string[];
553
-
554
- /** Default font size list */
555
- export declare const DEFAULT_FONT_SIZE_LIST: readonly ["10px", "11px", "12px", "14px", "16px", "18px", "20px", "22px", "24px", "26px", "28px", "36px", "48px", "72px"];
556
-
557
- /** Default font size value */
558
- export declare const DEFAULT_FONT_SIZE_VALUE = "default";
559
-
560
- /** Default lang */
561
- export declare const DEFAULT_LANG_VALUE: "en";
562
-
563
- export declare const DEFAULT_LANGUAGE_CODE_BLOCK: string[];
564
-
565
- export declare const DEFAULT_LINE_HEIGHT = "1";
566
-
567
- /** Line Height List */
568
- export declare const DEFAULT_LINE_HEIGHT_LIST: string[];
569
-
570
- export declare function DeleteColumn(): JSX_2.Element;
571
-
572
- export declare function DeleteRow(): JSX_2.Element;
573
-
574
- export declare const DropdownMenu: React_2.FC<DropdownMenuPrimitive.DropdownMenuProps>;
575
-
576
- export declare const DropdownMenuCheckboxItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
577
-
578
- export declare const DropdownMenuContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
579
-
580
- export declare const DropdownMenuGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React_2.RefAttributes<HTMLDivElement>>;
581
-
582
- export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
583
- inset?: boolean;
584
- } & React_2.RefAttributes<HTMLDivElement>>;
585
-
586
- export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
587
- inset?: boolean;
588
- } & React_2.RefAttributes<HTMLDivElement>>;
589
-
590
- export declare const DropdownMenuPortal: React_2.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
591
-
592
- export declare const DropdownMenuRadioGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
593
-
594
- export declare const DropdownMenuRadioItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
595
-
596
- export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
597
-
598
- export declare function DropdownMenuShortcut({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
599
-
600
- export declare namespace DropdownMenuShortcut {
601
- var displayName: string;
602
- }
603
-
604
- export declare const DropdownMenuSub: React_2.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
605
-
606
- export declare const DropdownMenuSubContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
607
-
608
- export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
609
- inset?: boolean;
610
- } & React_2.RefAttributes<HTMLDivElement>>;
611
-
612
- export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
613
-
614
- /** Throttle time for editor input (milliseconds) */
615
- export declare const EDITOR_UPDATE_THROTTLE_WAIT_TIME: 200;
616
-
617
- /**
618
- * watch throttling time must be less than the update time
619
- * otherwise the cursor position will reach the end
620
- */
621
- export declare const EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME: number;
622
-
623
337
  export declare const Emoji: Node_2<any, any>;
624
338
 
625
339
  export declare const en: {
@@ -778,13 +492,6 @@ export declare const ExportWord: Extension<ExportWordOptions, any>;
778
492
  declare interface ExportWordOptions extends GeneralOptions<ExportWordOptions> {
779
493
  }
780
494
 
781
- /**
782
- * Represents the keys for different extensions.
783
- */
784
- declare type ExtensionNameKeys = 'bold' | 'italic' | 'underline' | 'strike' | 'color' | 'highlight' | 'heading' | 'textAlign' | 'bulletList' | 'orderedList' | 'taskList' | 'indent' | 'link' | 'image' | 'video' | 'table' | 'blockquote' | 'horizontalRule' | 'code' | 'codeBlock' | 'clear' | 'history';
785
-
786
- export declare function FileWordOutline(props: SVGProps<SVGSVGElement>): JSX_2.Element;
787
-
788
495
  export declare const FontFamily: Extension<FontFamilyOptions, any>;
789
496
 
790
497
  declare interface FontFamilyOptions extends FontFamilyOptions_2, GeneralOptions<FontFamilyOptions> {
@@ -809,8 +516,6 @@ export declare interface FontSizeOptions extends GeneralOptions<FontSizeOptions>
809
516
  fontSizes: (string | NameValueOption)[];
810
517
  }
811
518
 
812
- export declare function FormatLineHeight(props: SVGProps<SVGSVGElement>): JSX_2.Element;
813
-
814
519
  /**
815
520
  * 格式刷
816
521
  */
@@ -836,15 +541,6 @@ declare interface GeneralOptions<T> {
836
541
  toolbar?: boolean;
837
542
  }
838
543
 
839
- export declare function getBubbleImage(editor: Editor): BubbleMenuItem[];
840
-
841
- /**
842
- * Bubble menu text list
843
- */
844
- export declare function getBubbleText(editor: Editor, t: any): BubbleMenuItem[];
845
-
846
- export declare function getBubbleVideo(editor: Editor): BubbleMenuItem[];
847
-
848
544
  export declare const Heading: Node_2<HeadingOptions, any>;
849
545
 
850
546
  export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
@@ -867,16 +563,6 @@ export declare const HorizontalRule: Node_2<HorizontalRuleOptions, any>;
867
563
  export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions<HorizontalRuleOptions> {
868
564
  }
869
565
 
870
- export declare function IconComponent(props: IconComponentProps): JSX_2.Element | null;
871
-
872
- export declare interface IconComponentProps {
873
- name: string;
874
- className?: string;
875
- onClick?: default_2.MouseEventHandler<SVGElement>;
876
- }
877
-
878
- export declare const icons: any;
879
-
880
566
  export declare const Iframe: Node_2<IframeOptions, any>;
881
567
 
882
568
  declare interface IframeOptions extends GeneralOptions<IframeOptions> {
@@ -893,22 +579,6 @@ declare interface IKatexOptions {
893
579
  declare const Image_2: Node_2<ImageOptions, any>;
894
580
  export { Image_2 as Image }
895
581
 
896
- /** Maximum size for image adjustments */
897
- export declare const IMAGE_MAX_SIZE: 100000;
898
-
899
- /** Minimum size for image adjustments */
900
- export declare const IMAGE_MIN_SIZE: 20;
901
-
902
- /** Options for setting image size in the bubble menu */
903
- export declare enum IMAGE_SIZE {
904
- 'size-small' = 200,
905
- 'size-medium' = 500,
906
- 'size-large' = "100%"
907
- }
908
-
909
- /** Throttle time during adjustments for images (milliseconds) */
910
- export declare const IMAGE_THROTTLE_WAIT_TIME: 16;
911
-
912
582
  export declare const ImageUpload: Node_3<ImageUploadOptions, any>;
913
583
 
914
584
  export declare interface ImageUploadOptions {
@@ -936,16 +606,6 @@ export declare interface IndentOptions extends GeneralOptions<IndentOptions> {
936
606
  maxIndent: number;
937
607
  }
938
608
 
939
- export declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
940
-
941
- export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
942
- }
943
-
944
- declare interface IPropsBubbleMenu {
945
- editor: Editor;
946
- disabled?: boolean;
947
- }
948
-
949
609
  export declare const Italic: Mark<ItalicOptions, any>;
950
610
 
951
611
  export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<ItalicOptions> {
@@ -953,12 +613,8 @@ export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<I
953
613
 
954
614
  export declare const Katex: Node_2<IKatexOptions, any>;
955
615
 
956
- export declare const Label: React_2.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React_2.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ClassProp | undefined) => string> & React_2.RefAttributes<HTMLLabelElement>>;
957
-
958
616
  declare type LanguageType = 'en' | 'vi' | 'zh_CN' | string;
959
617
 
960
- export declare const LINE_HEIGHT_100 = 1.7;
961
-
962
618
  export declare const LineHeight: Extension<LineHeightOptions, any>;
963
619
 
964
620
  export declare interface LineHeightOptions extends GeneralOptions<LineHeightOptions> {
@@ -991,10 +647,6 @@ declare class Locale {
991
647
 
992
648
  export declare const locale: Locale;
993
649
 
994
- export declare const MAP_LANGUAGE_CODE_LABELS: any;
995
-
996
- export declare function MenuDown(props: SVGProps<SVGSVGElement>): JSX_2.Element;
997
-
998
650
  declare type MessageKeysType = keyof typeof en;
999
651
 
1000
652
  export declare const MoreMark: Extension<MoreMarkOptions, any>;
@@ -1021,15 +673,6 @@ declare interface NameValueOption<T = string> {
1021
673
  value: T;
1022
674
  }
1023
675
 
1024
- /** display in menus */
1025
- export declare const NODE_TYPE_MENU: any;
1026
-
1027
- /** Represents the key types for node types */
1028
- export declare type NodeTypeKey = 'image' | 'text' | 'video';
1029
-
1030
- /** Represents the menu of overall bubble types for each node type */
1031
- export declare type NodeTypeMenu = Partial<Record<NodeTypeKey, BubbleAllType[]>>;
1032
-
1033
676
  declare interface Options {
1034
677
  onHasOneBeforeInsert?: () => void;
1035
678
  }
@@ -1039,14 +682,6 @@ export declare const OrderedList: Node_2<OrderedListOptions, any>;
1039
682
  export declare interface OrderedListOptions extends OrderedListOptions_2, GeneralOptions<OrderedListOptions> {
1040
683
  }
1041
684
 
1042
- export declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
1043
-
1044
- export declare const PopoverContent: React_2.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1045
-
1046
- export declare const PopoverTrigger: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
1047
-
1048
- export declare function reducer(state: State, action: Action): State;
1049
-
1050
685
  declare interface Result {
1051
686
  from: number;
1052
687
  to: number;
@@ -1055,7 +690,7 @@ declare interface Result {
1055
690
  /**
1056
691
  * Interface for RichTextEditor component props
1057
692
  */
1058
- export declare interface RichTextEditorProps {
693
+ declare interface RichTextEditorProps {
1059
694
  /** Content of the editor */
1060
695
  content: string;
1061
696
  /** Extensions for the editor */
@@ -1117,8 +752,6 @@ declare interface SearchStorage {
1117
752
  currentIndex: number;
1118
753
  }
1119
754
 
1120
- export declare const Separator: React_2.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1121
-
1122
755
  export declare interface SetImageAttrsOptions {
1123
756
  src?: string;
1124
757
  /** The alternative text for the image. */
@@ -1129,18 +762,8 @@ export declare interface SetImageAttrsOptions {
1129
762
  width?: number | string | null;
1130
763
  }
1131
764
 
1132
- export declare function SizeL(props: SVGProps<SVGSVGElement>): JSX_2.Element;
1133
-
1134
- export declare function SizeM(props: SVGProps<SVGSVGElement>): JSX_2.Element;
1135
-
1136
- export declare function SizeS(props: SVGProps<SVGSVGElement>): JSX_2.Element;
1137
-
1138
765
  export declare const SlashCommand: Extension<any, any>;
1139
766
 
1140
- declare interface State {
1141
- toasts: ToasterToast[];
1142
- }
1143
-
1144
767
  export declare const Strike: Mark<StrikeOptions, any>;
1145
768
 
1146
769
  export declare interface StrikeOptions extends StrikeOptions_2, GeneralOptions<StrikeOptions> {
@@ -1166,25 +789,8 @@ export declare interface SubAndSuperScriptOptions extends GeneralOptions<SubAndS
1166
789
  superscript: Partial<SuperscriptExtensionOptions> | false;
1167
790
  }
1168
791
 
1169
- export declare const Switch: React_2.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
1170
-
1171
792
  export declare const Table: Node_2<TableOptions, any>;
1172
793
 
1173
- /** Minimum number of rows and columns for grids when creating a table */
1174
- export declare const TABLE_DEFAULT_SELECTED_GRID_SIZE: 2;
1175
-
1176
- /** Default number of rows and columns for grids when creating a table */
1177
- export declare const TABLE_INIT_GRID_SIZE: 10;
1178
-
1179
- /** Maximum number of rows and columns for grids when creating a table */
1180
- export declare const TABLE_MAX_GRID_SIZE: 10;
1181
-
1182
- export declare function TableBubbleMenu({ editor }: TableBubbleMenuProps): JSX_2.Element;
1183
-
1184
- export declare interface TableBubbleMenuProps {
1185
- editor: Editor_2;
1186
- }
1187
-
1188
794
  declare interface TableCellBackgroundOptions {
1189
795
  HTMLAttributes: Record<string, any>;
1190
796
  types?: any;
@@ -1209,14 +815,6 @@ export declare interface TableOptions extends GeneralOptions<TableOptions> {
1209
815
  tableCellBackground: Partial<TableCellBackgroundOptions>;
1210
816
  }
1211
817
 
1212
- export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
1213
-
1214
- export declare const TabsContent: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1215
-
1216
- export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1217
-
1218
- export declare const TabsTrigger: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
1219
-
1220
818
  export declare const TaskList: Node_2<TaskListOptions, any>;
1221
819
 
1222
820
  /**
@@ -1244,66 +842,6 @@ export declare interface TextAlignOptions extends TextAlignOptions_2, GeneralOpt
1244
842
  declare interface TextBubbleOptions extends GeneralOptions<TextBubbleOptions> {
1245
843
  }
1246
844
 
1247
- export declare const Toast: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React_2.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
1248
- variant?: "default" | "destructive" | null | undefined;
1249
- } & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLLIElement>>;
1250
-
1251
- export declare function toast({ ...props }: Toast_2): {
1252
- id: string;
1253
- dismiss: () => void;
1254
- update: (props: ToasterToast) => void;
1255
- };
1256
-
1257
- declare type Toast_2 = Omit<ToasterToast, 'id'>;
1258
-
1259
- export declare const ToastAction: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
1260
-
1261
- export declare type ToastActionElement = React_2.ReactElement<typeof ToastAction>;
1262
-
1263
- export declare const ToastClose: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
1264
-
1265
- export declare const ToastDescription: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1266
-
1267
- declare type ToasterToast = ToastProps & {
1268
- id: string;
1269
- title?: React_2.ReactNode;
1270
- description?: React_2.ReactNode;
1271
- action?: ToastActionElement;
1272
- };
1273
-
1274
- export declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
1275
-
1276
- export declare const ToastProvider: React_2.FC<ToastPrimitives.ToastProviderProps>;
1277
-
1278
- export declare const ToastTitle: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1279
-
1280
- export declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> & React_2.RefAttributes<HTMLOListElement>>;
1281
-
1282
- export declare const Toggle: React_2.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
1283
- variant?: "default" | "outline" | null | undefined;
1284
- size?: "default" | "sm" | "lg" | null | undefined;
1285
- } & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
1286
-
1287
- export declare const toggleVariants: (props?: ({
1288
- variant?: "default" | "outline" | null | undefined;
1289
- size?: "default" | "sm" | "lg" | null | undefined;
1290
- } & ClassProp) | undefined) => string;
1291
-
1292
- export declare function Toolbar({ editor, disabled }: ToolbarProps): JSX_2.Element;
1293
-
1294
- export declare interface ToolbarProps {
1295
- editor: Editor_2;
1296
- disabled?: boolean;
1297
- }
1298
-
1299
- export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
1300
-
1301
- export declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1302
-
1303
- export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProviderProps>;
1304
-
1305
- export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
1306
-
1307
845
  /**
1308
846
  * Extension based on:
1309
847
  * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
@@ -1319,12 +857,6 @@ export declare const Underline: Mark<UnderlineOptions, any>;
1319
857
  export declare interface UnderlineOptions extends UnderlineOptions_2, GeneralOptions<UnderlineOptions> {
1320
858
  }
1321
859
 
1322
- export declare function useToast(): {
1323
- toast: typeof toast;
1324
- dismiss: (toastId?: string) => void;
1325
- toasts: ToasterToast[];
1326
- };
1327
-
1328
860
  export declare const vi: {
1329
861
  'editor.remove': string;
1330
862
  'editor.copy': string;
@@ -1476,13 +1008,6 @@ export declare const vi: {
1476
1008
 
1477
1009
  export declare const Video: Node_2<VideoOptions, any>;
1478
1010
 
1479
- /** Options for setting video size in the bubble menu */
1480
- export declare enum VIDEO_SIZE {
1481
- 'size-small' = 480,
1482
- 'size-medium' = 640,
1483
- 'size-large' = "100%"
1484
- }
1485
-
1486
1011
  /**
1487
1012
  * Represents the interface for video options, extending GeneralOptions.
1488
1013
  */
@@ -1686,11 +1211,6 @@ declare module '@tiptap/core' {
1686
1211
  }
1687
1212
 
1688
1213
 
1689
- declare namespace DropdownMenuShortcut {
1690
- var displayName: string;
1691
- }
1692
-
1693
-
1694
1214
  declare module '@tiptap/core' {
1695
1215
  interface Commands<ReturnType> {
1696
1216
  fontSize: {
@@ -1727,9 +1247,8 @@ declare module '@tiptap/core' {
1727
1247
 
1728
1248
  declare module '@tiptap/core' {
1729
1249
  interface Commands<ReturnType> {
1730
- lineHeight: {
1731
- setLineHeight: (lineHeight: string) => ReturnType;
1732
- unsetLineHeight: () => ReturnType;
1250
+ imageUpload: {
1251
+ setImageUpload: () => ReturnType;
1733
1252
  };
1734
1253
  }
1735
1254
  }
@@ -1737,15 +1256,8 @@ declare module '@tiptap/core' {
1737
1256
 
1738
1257
  declare module '@tiptap/core' {
1739
1258
  interface Commands<ReturnType> {
1740
- imageResize: {
1741
- /**
1742
- * Add an image
1743
- */
1744
- setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1745
- /**
1746
- * Update an image
1747
- */
1748
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1259
+ videoUpload: {
1260
+ setVideoUpload: () => ReturnType;
1749
1261
  };
1750
1262
  }
1751
1263
  }
@@ -1753,8 +1265,9 @@ declare module '@tiptap/core' {
1753
1265
 
1754
1266
  declare module '@tiptap/core' {
1755
1267
  interface Commands<ReturnType> {
1756
- videoUpload: {
1757
- setVideoUpload: () => ReturnType;
1268
+ lineHeight: {
1269
+ setLineHeight: (lineHeight: string) => ReturnType;
1270
+ unsetLineHeight: () => ReturnType;
1758
1271
  };
1759
1272
  }
1760
1273
  }
@@ -1762,9 +1275,15 @@ declare module '@tiptap/core' {
1762
1275
 
1763
1276
  declare module '@tiptap/core' {
1764
1277
  interface Commands<ReturnType> {
1765
- tableCellBackground: {
1766
- setTableCellBackground: (color: string) => ReturnType;
1767
- unsetTableCellBackground: () => ReturnType;
1278
+ imageResize: {
1279
+ /**
1280
+ * Add an image
1281
+ */
1282
+ setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1283
+ /**
1284
+ * Update an image
1285
+ */
1286
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1768
1287
  };
1769
1288
  }
1770
1289
  }
@@ -1772,8 +1291,14 @@ declare module '@tiptap/core' {
1772
1291
 
1773
1292
  declare module '@tiptap/core' {
1774
1293
  interface Commands<ReturnType> {
1775
- imageUpload: {
1776
- setImageUpload: () => ReturnType;
1294
+ iframe: {
1295
+ /**
1296
+ * Add an iframe
1297
+ */
1298
+ setIframe: (options: {
1299
+ src: string;
1300
+ service: string;
1301
+ }) => ReturnType;
1777
1302
  };
1778
1303
  }
1779
1304
  }
@@ -1804,26 +1329,9 @@ declare module '@tiptap/core' {
1804
1329
 
1805
1330
  declare module '@tiptap/core' {
1806
1331
  interface Commands<ReturnType> {
1807
- iframe: {
1808
- /**
1809
- * Add an iframe
1810
- */
1811
- setIframe: (options: {
1812
- src: string;
1813
- service: string;
1814
- }) => ReturnType;
1815
- };
1816
- }
1817
- }
1818
-
1819
-
1820
- declare module '@tiptap/core' {
1821
- interface Commands<ReturnType> {
1822
- emoji: {
1823
- setEmoji: (emoji: {
1824
- name: string;
1825
- emoji: string;
1826
- }) => ReturnType;
1332
+ tableCellBackground: {
1333
+ setTableCellBackground: (color: string) => ReturnType;
1334
+ unsetTableCellBackground: () => ReturnType;
1827
1335
  };
1828
1336
  }
1829
1337
  }
@@ -1845,9 +1353,11 @@ declare module '@tiptap/core' {
1845
1353
 
1846
1354
  declare module '@tiptap/core' {
1847
1355
  interface Commands<ReturnType> {
1848
- tableOfContents: {
1849
- setTableOfContents: () => ReturnType;
1850
- removeTableOfContents: () => ReturnType;
1356
+ emoji: {
1357
+ setEmoji: (emoji: {
1358
+ name: string;
1359
+ emoji: string;
1360
+ }) => ReturnType;
1851
1361
  };
1852
1362
  }
1853
1363
  }
@@ -1869,3 +1379,18 @@ declare module '@tiptap/core' {
1869
1379
  };
1870
1380
  }
1871
1381
  }
1382
+
1383
+
1384
+ declare module '@tiptap/core' {
1385
+ interface Commands<ReturnType> {
1386
+ tableOfContents: {
1387
+ setTableOfContents: () => ReturnType;
1388
+ removeTableOfContents: () => ReturnType;
1389
+ };
1390
+ }
1391
+ }
1392
+
1393
+
1394
+ declare namespace DropdownMenuShortcut {
1395
+ var displayName: string;
1396
+ }