reactjs-tiptap-editor-pro 0.2.27 → 0.2.28

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.
@@ -737,8 +737,19 @@ declare module '@tiptap/core' {
737
737
 
738
738
  declare module '@tiptap/core' {
739
739
  interface Commands<ReturnType> {
740
- katex: {
741
- setKatex: (arg?: IKatexAttrs) => ReturnType;
740
+ imageUpload: {
741
+ /**
742
+ * Add an image
743
+ */
744
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
745
+ /**
746
+ * Update an image
747
+ */
748
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
749
+ /**
750
+ * Set image alignment
751
+ */
752
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
742
753
  };
743
754
  }
744
755
  }
@@ -746,14 +757,22 @@ declare module '@tiptap/core' {
746
757
 
747
758
  declare module '@tiptap/core' {
748
759
  interface Commands<ReturnType> {
749
- iframe: {
750
- /**
751
- * Add an iframe
752
- */
753
- setIframe: (options: {
754
- src: string;
755
- service: string;
760
+ columns: {
761
+ insertColumns: (attrs?: {
762
+ cols: number;
756
763
  }) => ReturnType;
764
+ addColBefore: () => ReturnType;
765
+ addColAfter: () => ReturnType;
766
+ deleteCol: () => ReturnType;
767
+ };
768
+ }
769
+ }
770
+
771
+
772
+ declare module '@tiptap/core' {
773
+ interface Commands<ReturnType> {
774
+ painter: {
775
+ setPainter: (marks: Mark[]) => ReturnType;
757
776
  };
758
777
  }
759
778
  }
@@ -773,8 +792,9 @@ declare module '@tiptap/core' {
773
792
 
774
793
  declare module '@tiptap/core' {
775
794
  interface Commands<ReturnType> {
776
- painter: {
777
- setPainter: (marks: Mark[]) => ReturnType;
795
+ tableCellBackground: {
796
+ setTableCellBackground: (color: string) => ReturnType;
797
+ unsetTableCellBackground: () => ReturnType;
778
798
  };
779
799
  }
780
800
  }
@@ -782,8 +802,15 @@ declare module '@tiptap/core' {
782
802
 
783
803
  declare module '@tiptap/core' {
784
804
  interface Commands<ReturnType> {
785
- exportWord: {
786
- exportToWord: () => ReturnType;
805
+ indent: {
806
+ /**
807
+ * Set the indent attribute
808
+ */
809
+ indent: () => ReturnType;
810
+ /**
811
+ * Set the outdent attribute
812
+ */
813
+ outdent: () => ReturnType;
787
814
  };
788
815
  }
789
816
  }
@@ -791,19 +818,14 @@ declare module '@tiptap/core' {
791
818
 
792
819
  declare module '@tiptap/core' {
793
820
  interface Commands<ReturnType> {
794
- imageUpload: {
795
- /**
796
- * Add an image
797
- */
798
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
799
- /**
800
- * Update an image
801
- */
802
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
821
+ iframe: {
803
822
  /**
804
- * Set image alignment
823
+ * Add an iframe
805
824
  */
806
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
825
+ setIframe: (options: {
826
+ src: string;
827
+ service: string;
828
+ }) => ReturnType;
807
829
  };
808
830
  }
809
831
  }
@@ -826,25 +848,8 @@ declare module '@tiptap/core' {
826
848
 
827
849
  declare module '@tiptap/core' {
828
850
  interface Commands<ReturnType> {
829
- tableCellBackground: {
830
- setTableCellBackground: (color: string) => ReturnType;
831
- unsetTableCellBackground: () => ReturnType;
832
- };
833
- }
834
- }
835
-
836
-
837
- declare module '@tiptap/core' {
838
- interface Commands<ReturnType> {
839
- indent: {
840
- /**
841
- * Set the indent attribute
842
- */
843
- indent: () => ReturnType;
844
- /**
845
- * Set the outdent attribute
846
- */
847
- outdent: () => ReturnType;
851
+ exportWord: {
852
+ exportToWord: () => ReturnType;
848
853
  };
849
854
  }
850
855
  }
@@ -852,13 +857,8 @@ declare module '@tiptap/core' {
852
857
 
853
858
  declare module '@tiptap/core' {
854
859
  interface Commands<ReturnType> {
855
- columns: {
856
- insertColumns: (attrs?: {
857
- cols: number;
858
- }) => ReturnType;
859
- addColBefore: () => ReturnType;
860
- addColAfter: () => ReturnType;
861
- deleteCol: () => ReturnType;
860
+ excalidraw: {
861
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
862
862
  };
863
863
  }
864
864
  }
@@ -866,8 +866,9 @@ declare module '@tiptap/core' {
866
866
 
867
867
  declare module '@tiptap/core' {
868
868
  interface Commands<ReturnType> {
869
- excalidraw: {
870
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
869
+ tableOfContents: {
870
+ setTableOfContents: () => ReturnType;
871
+ removeTableOfContents: () => ReturnType;
871
872
  };
872
873
  }
873
874
  }
@@ -875,9 +876,8 @@ declare module '@tiptap/core' {
875
876
 
876
877
  declare module '@tiptap/core' {
877
878
  interface Commands<ReturnType> {
878
- tableOfContents: {
879
- setTableOfContents: () => ReturnType;
880
- removeTableOfContents: () => ReturnType;
879
+ katex: {
880
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
881
881
  };
882
882
  }
883
883
  }
@@ -905,14 +905,9 @@ declare module '@tiptap/core' {
905
905
 
906
906
  declare module '@tiptap/core' {
907
907
  interface Commands<ReturnType> {
908
- twitter: {
909
- /**
910
- * Insert a tweet
911
- * @param options The tweet attributes
912
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
913
- */
914
- setTweet: (options: SetTweetOptions) => ReturnType;
915
- updateTweet: (options: SetTweetOptions) => ReturnType;
908
+ mermaid: {
909
+ setMermaid: (options: any, replace?: any) => ReturnType;
910
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
916
911
  };
917
912
  }
918
913
  }
@@ -920,9 +915,8 @@ declare module '@tiptap/core' {
920
915
 
921
916
  declare module '@tiptap/core' {
922
917
  interface Commands<ReturnType> {
923
- drawer: {
924
- setDrawer: (options: any, replace?: any) => ReturnType;
925
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
918
+ attachment: {
919
+ setAttachment: (attrs?: unknown) => ReturnType;
926
920
  };
927
921
  }
928
922
  }
@@ -930,9 +924,14 @@ declare module '@tiptap/core' {
930
924
 
931
925
  declare module '@tiptap/core' {
932
926
  interface Commands<ReturnType> {
933
- mermaid: {
934
- setMermaid: (options: any, replace?: any) => ReturnType;
935
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
927
+ twitter: {
928
+ /**
929
+ * Insert a tweet
930
+ * @param options The tweet attributes
931
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
932
+ */
933
+ setTweet: (options: SetTweetOptions) => ReturnType;
934
+ updateTweet: (options: SetTweetOptions) => ReturnType;
936
935
  };
937
936
  }
938
937
  }
@@ -940,8 +939,9 @@ declare module '@tiptap/core' {
940
939
 
941
940
  declare module '@tiptap/core' {
942
941
  interface Commands<ReturnType> {
943
- attachment: {
944
- setAttachment: (attrs?: unknown) => ReturnType;
942
+ drawer: {
943
+ setDrawer: (options: any, replace?: any) => ReturnType;
944
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
945
945
  };
946
946
  }
947
947
  }
@@ -737,8 +737,19 @@ declare module '@tiptap/core' {
737
737
 
738
738
  declare module '@tiptap/core' {
739
739
  interface Commands<ReturnType> {
740
- katex: {
741
- setKatex: (arg?: IKatexAttrs) => ReturnType;
740
+ imageUpload: {
741
+ /**
742
+ * Add an image
743
+ */
744
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
745
+ /**
746
+ * Update an image
747
+ */
748
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
749
+ /**
750
+ * Set image alignment
751
+ */
752
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
742
753
  };
743
754
  }
744
755
  }
@@ -746,14 +757,22 @@ declare module '@tiptap/core' {
746
757
 
747
758
  declare module '@tiptap/core' {
748
759
  interface Commands<ReturnType> {
749
- iframe: {
750
- /**
751
- * Add an iframe
752
- */
753
- setIframe: (options: {
754
- src: string;
755
- service: string;
760
+ columns: {
761
+ insertColumns: (attrs?: {
762
+ cols: number;
756
763
  }) => ReturnType;
764
+ addColBefore: () => ReturnType;
765
+ addColAfter: () => ReturnType;
766
+ deleteCol: () => ReturnType;
767
+ };
768
+ }
769
+ }
770
+
771
+
772
+ declare module '@tiptap/core' {
773
+ interface Commands<ReturnType> {
774
+ painter: {
775
+ setPainter: (marks: Mark[]) => ReturnType;
757
776
  };
758
777
  }
759
778
  }
@@ -773,8 +792,9 @@ declare module '@tiptap/core' {
773
792
 
774
793
  declare module '@tiptap/core' {
775
794
  interface Commands<ReturnType> {
776
- painter: {
777
- setPainter: (marks: Mark[]) => ReturnType;
795
+ tableCellBackground: {
796
+ setTableCellBackground: (color: string) => ReturnType;
797
+ unsetTableCellBackground: () => ReturnType;
778
798
  };
779
799
  }
780
800
  }
@@ -782,8 +802,15 @@ declare module '@tiptap/core' {
782
802
 
783
803
  declare module '@tiptap/core' {
784
804
  interface Commands<ReturnType> {
785
- exportWord: {
786
- exportToWord: () => ReturnType;
805
+ indent: {
806
+ /**
807
+ * Set the indent attribute
808
+ */
809
+ indent: () => ReturnType;
810
+ /**
811
+ * Set the outdent attribute
812
+ */
813
+ outdent: () => ReturnType;
787
814
  };
788
815
  }
789
816
  }
@@ -791,19 +818,14 @@ declare module '@tiptap/core' {
791
818
 
792
819
  declare module '@tiptap/core' {
793
820
  interface Commands<ReturnType> {
794
- imageUpload: {
795
- /**
796
- * Add an image
797
- */
798
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
799
- /**
800
- * Update an image
801
- */
802
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
821
+ iframe: {
803
822
  /**
804
- * Set image alignment
823
+ * Add an iframe
805
824
  */
806
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
825
+ setIframe: (options: {
826
+ src: string;
827
+ service: string;
828
+ }) => ReturnType;
807
829
  };
808
830
  }
809
831
  }
@@ -826,25 +848,8 @@ declare module '@tiptap/core' {
826
848
 
827
849
  declare module '@tiptap/core' {
828
850
  interface Commands<ReturnType> {
829
- tableCellBackground: {
830
- setTableCellBackground: (color: string) => ReturnType;
831
- unsetTableCellBackground: () => ReturnType;
832
- };
833
- }
834
- }
835
-
836
-
837
- declare module '@tiptap/core' {
838
- interface Commands<ReturnType> {
839
- indent: {
840
- /**
841
- * Set the indent attribute
842
- */
843
- indent: () => ReturnType;
844
- /**
845
- * Set the outdent attribute
846
- */
847
- outdent: () => ReturnType;
851
+ exportWord: {
852
+ exportToWord: () => ReturnType;
848
853
  };
849
854
  }
850
855
  }
@@ -852,13 +857,8 @@ declare module '@tiptap/core' {
852
857
 
853
858
  declare module '@tiptap/core' {
854
859
  interface Commands<ReturnType> {
855
- columns: {
856
- insertColumns: (attrs?: {
857
- cols: number;
858
- }) => ReturnType;
859
- addColBefore: () => ReturnType;
860
- addColAfter: () => ReturnType;
861
- deleteCol: () => ReturnType;
860
+ excalidraw: {
861
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
862
862
  };
863
863
  }
864
864
  }
@@ -866,8 +866,9 @@ declare module '@tiptap/core' {
866
866
 
867
867
  declare module '@tiptap/core' {
868
868
  interface Commands<ReturnType> {
869
- excalidraw: {
870
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
869
+ tableOfContents: {
870
+ setTableOfContents: () => ReturnType;
871
+ removeTableOfContents: () => ReturnType;
871
872
  };
872
873
  }
873
874
  }
@@ -875,9 +876,8 @@ declare module '@tiptap/core' {
875
876
 
876
877
  declare module '@tiptap/core' {
877
878
  interface Commands<ReturnType> {
878
- tableOfContents: {
879
- setTableOfContents: () => ReturnType;
880
- removeTableOfContents: () => ReturnType;
879
+ katex: {
880
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
881
881
  };
882
882
  }
883
883
  }
@@ -905,14 +905,9 @@ declare module '@tiptap/core' {
905
905
 
906
906
  declare module '@tiptap/core' {
907
907
  interface Commands<ReturnType> {
908
- twitter: {
909
- /**
910
- * Insert a tweet
911
- * @param options The tweet attributes
912
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
913
- */
914
- setTweet: (options: SetTweetOptions) => ReturnType;
915
- updateTweet: (options: SetTweetOptions) => ReturnType;
908
+ mermaid: {
909
+ setMermaid: (options: any, replace?: any) => ReturnType;
910
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
916
911
  };
917
912
  }
918
913
  }
@@ -920,9 +915,8 @@ declare module '@tiptap/core' {
920
915
 
921
916
  declare module '@tiptap/core' {
922
917
  interface Commands<ReturnType> {
923
- drawer: {
924
- setDrawer: (options: any, replace?: any) => ReturnType;
925
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
918
+ attachment: {
919
+ setAttachment: (attrs?: unknown) => ReturnType;
926
920
  };
927
921
  }
928
922
  }
@@ -930,9 +924,14 @@ declare module '@tiptap/core' {
930
924
 
931
925
  declare module '@tiptap/core' {
932
926
  interface Commands<ReturnType> {
933
- mermaid: {
934
- setMermaid: (options: any, replace?: any) => ReturnType;
935
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
927
+ twitter: {
928
+ /**
929
+ * Insert a tweet
930
+ * @param options The tweet attributes
931
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
932
+ */
933
+ setTweet: (options: SetTweetOptions) => ReturnType;
934
+ updateTweet: (options: SetTweetOptions) => ReturnType;
936
935
  };
937
936
  }
938
937
  }
@@ -940,8 +939,9 @@ declare module '@tiptap/core' {
940
939
 
941
940
  declare module '@tiptap/core' {
942
941
  interface Commands<ReturnType> {
943
- attachment: {
944
- setAttachment: (attrs?: unknown) => ReturnType;
942
+ drawer: {
943
+ setDrawer: (options: any, replace?: any) => ReturnType;
944
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
945
945
  };
946
946
  }
947
947
  }
@@ -4,8 +4,8 @@ import { jsxs as m, jsx as s, Fragment as pe } from "react/jsx-runtime";
4
4
  import * as J from "react";
5
5
  import Qt, { useMemo as R, useState as C, useRef as G, useCallback as F, Fragment as Ee, forwardRef as He, useImperativeHandle as ze, useEffect as z } from "react";
6
6
  import { ChevronDown as Me, Check as Xt, ChevronUp as en, Copy as tn, CopyCheck as nn, SearchIcon as an, LoaderIcon as on, LucideTableProperties as sn, LucideSheet as rn, LucideImage as ln, LucideFile as cn, LucideVideo as dn, LucideAudioLines as un } from "lucide-react";
7
- import { i as Pe, T as we, a as ye, B as V, b as ke, g as Re, A as p, D as Y, c as Q, d as X, e as mn, f as T, u as Ie, h as hn, I as M, j as ne, k as et, l as Ae, m as _n, n as je, P as ce, o as de, p as ue, q as Be, C as fn, H as gn, L as bn, r as pn, M as wn, s as yn, t as Fe, v as he, w as K, E as D, x as kn, y as vn, V as xn, z as Ue, F as ve, G as qe, S as Cn, J as Nn, K as An, N as B, O as Ln, Q as Sn, U as Tn, W as En, X as Hn, Y as tt } from "./RichTextEditor-B1Y3PPzy.js";
8
- import { a4 as Ao, a0 as Lo, _ as So, a1 as To, $ as Eo, a2 as Ho, Z as zo, a3 as Mo } from "./RichTextEditor-B1Y3PPzy.js";
7
+ import { i as Pe, T as we, a as ye, B as V, b as ke, g as Re, A as p, D as Y, c as Q, d as X, e as mn, f as T, u as Ie, h as hn, I as M, j as ne, k as et, l as Ae, m as _n, n as je, P as ce, o as de, p as ue, q as Be, C as fn, H as gn, L as bn, r as pn, M as wn, s as yn, t as Fe, v as he, w as K, E as D, x as kn, y as vn, V as xn, z as Ue, F as ve, G as qe, S as Cn, J as Nn, K as An, N as B, O as Ln, Q as Sn, U as Tn, W as En, X as Hn, Y as tt } from "./RichTextEditor-BC85Dn21.js";
8
+ import { a4 as Ao, a0 as Lo, _ as So, a1 as To, $ as Eo, a2 as Ho, Z as zo, a3 as Mo } from "./RichTextEditor-BC85Dn21.js";
9
9
  import { M as zn, D as nt, u as j, f as Mn, g as Pn, h as Ke, i as N, j as at, k as Rn } from "./index-M6H3FoBi.js";
10
10
  import { bundledThemes as it, bundledLanguages as ot, createHighlighter as In } from "shiki";
11
11
  import * as x from "@radix-ui/react-select";
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-CVJUZJ-8.cjs"),c=require("./tiptap-gBG-1T-V.cjs");function a(){var r;const e=t.useRef({editor:null}),[i,o]=t.useState(!1),[s,n]=t.useState(null);return t.useEffect(()=>{var u;(u=e.current)!=null&&u.editor&&(o(!0),n(e.current.editor))},[e,(r=e.current)==null?void 0:r.editor]),{isReady:i,editor:s,editorRef:e}}exports.default=d.RichTextEditor;exports.BubbleMenu=c.BubbleMenu;exports.useEditorState=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-Cxm0yJdr.cjs"),c=require("./tiptap-gBG-1T-V.cjs");function a(){var r;const e=t.useRef({editor:null}),[i,o]=t.useState(!1),[s,n]=t.useState(null);return t.useEffect(()=>{var u;(u=e.current)!=null&&u.editor&&(o(!0),n(e.current.editor))},[e,(r=e.current)==null?void 0:r.editor]),{isReady:i,editor:s,editorRef:e}}exports.default=d.RichTextEditor;exports.BubbleMenu=c.BubbleMenu;exports.useEditorState=a;