reactjs-tiptap-editor 0.2.6 → 0.2.8
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/RichTextEditor-C8DLflat.js +6990 -0
- package/lib/RichTextEditor-YN9WGs-6.cjs +138 -0
- package/lib/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +63 -63
- package/lib/extension-bundle.d.ts +63 -63
- package/lib/extension-bundle.js +2 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +63 -63
- package/lib/index.d.ts +63 -63
- package/lib/index.js +1 -1
- package/lib/locale-bundle.d.cts +63 -63
- package/lib/locale-bundle.d.ts +63 -63
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/RichTextEditor-B0-C2gAI.cjs +0 -138
- package/lib/RichTextEditor-DJXV8lHe.js +0 -6100
|
@@ -717,16 +717,6 @@ declare module '@tiptap/core' {
|
|
|
717
717
|
}
|
|
718
718
|
|
|
719
719
|
|
|
720
|
-
declare module '@tiptap/core' {
|
|
721
|
-
interface Commands<ReturnType> {
|
|
722
|
-
lineHeight: {
|
|
723
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
724
|
-
unsetLineHeight: () => ReturnType;
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
|
|
730
720
|
declare module '@tiptap/core' {
|
|
731
721
|
interface Commands<ReturnType> {
|
|
732
722
|
indent: {
|
|
@@ -745,8 +735,9 @@ declare module '@tiptap/core' {
|
|
|
745
735
|
|
|
746
736
|
declare module '@tiptap/core' {
|
|
747
737
|
interface Commands<ReturnType> {
|
|
748
|
-
|
|
749
|
-
|
|
738
|
+
tableCellBackground: {
|
|
739
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
740
|
+
unsetTableCellBackground: () => ReturnType;
|
|
750
741
|
};
|
|
751
742
|
}
|
|
752
743
|
}
|
|
@@ -754,11 +745,9 @@ declare module '@tiptap/core' {
|
|
|
754
745
|
|
|
755
746
|
declare module '@tiptap/core' {
|
|
756
747
|
interface Commands<ReturnType> {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
emoji: string;
|
|
761
|
-
}) => ReturnType;
|
|
748
|
+
lineHeight: {
|
|
749
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
750
|
+
unsetLineHeight: () => ReturnType;
|
|
762
751
|
};
|
|
763
752
|
}
|
|
764
753
|
}
|
|
@@ -766,14 +755,8 @@ declare module '@tiptap/core' {
|
|
|
766
755
|
|
|
767
756
|
declare module '@tiptap/core' {
|
|
768
757
|
interface Commands<ReturnType> {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
772
|
-
replace: () => ReturnType;
|
|
773
|
-
replaceAll: () => ReturnType;
|
|
774
|
-
goToPrevSearchResult: () => void;
|
|
775
|
-
goToNextSearchResult: () => void;
|
|
776
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
758
|
+
painter: {
|
|
759
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
777
760
|
};
|
|
778
761
|
}
|
|
779
762
|
}
|
|
@@ -781,8 +764,13 @@ declare module '@tiptap/core' {
|
|
|
781
764
|
|
|
782
765
|
declare module '@tiptap/core' {
|
|
783
766
|
interface Commands<ReturnType> {
|
|
784
|
-
|
|
785
|
-
|
|
767
|
+
columns: {
|
|
768
|
+
insertColumns: (attrs?: {
|
|
769
|
+
cols: number;
|
|
770
|
+
}) => ReturnType;
|
|
771
|
+
addColBefore: () => ReturnType;
|
|
772
|
+
addColAfter: () => ReturnType;
|
|
773
|
+
deleteCol: () => ReturnType;
|
|
786
774
|
};
|
|
787
775
|
}
|
|
788
776
|
}
|
|
@@ -805,9 +793,14 @@ declare module '@tiptap/core' {
|
|
|
805
793
|
|
|
806
794
|
declare module '@tiptap/core' {
|
|
807
795
|
interface Commands<ReturnType> {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
796
|
+
search: {
|
|
797
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
798
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
799
|
+
replace: () => ReturnType;
|
|
800
|
+
replaceAll: () => ReturnType;
|
|
801
|
+
goToPrevSearchResult: () => void;
|
|
802
|
+
goToNextSearchResult: () => void;
|
|
803
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
811
804
|
};
|
|
812
805
|
}
|
|
813
806
|
}
|
|
@@ -815,13 +808,11 @@ declare module '@tiptap/core' {
|
|
|
815
808
|
|
|
816
809
|
declare module '@tiptap/core' {
|
|
817
810
|
interface Commands<ReturnType> {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
811
|
+
emoji: {
|
|
812
|
+
setEmoji: (emoji: {
|
|
813
|
+
name: string;
|
|
814
|
+
emoji: string;
|
|
821
815
|
}) => ReturnType;
|
|
822
|
-
addColBefore: () => ReturnType;
|
|
823
|
-
addColAfter: () => ReturnType;
|
|
824
|
-
deleteCol: () => ReturnType;
|
|
825
816
|
};
|
|
826
817
|
}
|
|
827
818
|
}
|
|
@@ -829,8 +820,8 @@ declare module '@tiptap/core' {
|
|
|
829
820
|
|
|
830
821
|
declare module '@tiptap/core' {
|
|
831
822
|
interface Commands<ReturnType> {
|
|
832
|
-
|
|
833
|
-
|
|
823
|
+
katex: {
|
|
824
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
834
825
|
};
|
|
835
826
|
}
|
|
836
827
|
}
|
|
@@ -857,9 +848,8 @@ declare module '@tiptap/core' {
|
|
|
857
848
|
|
|
858
849
|
declare module '@tiptap/core' {
|
|
859
850
|
interface Commands<ReturnType> {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
851
|
+
exportWord: {
|
|
852
|
+
exportToWord: () => ReturnType;
|
|
863
853
|
};
|
|
864
854
|
}
|
|
865
855
|
}
|
|
@@ -867,14 +857,28 @@ declare module '@tiptap/core' {
|
|
|
867
857
|
|
|
868
858
|
declare module '@tiptap/core' {
|
|
869
859
|
interface Commands<ReturnType> {
|
|
870
|
-
|
|
860
|
+
attachment: {
|
|
861
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
declare module '@tiptap/core' {
|
|
868
|
+
interface Commands<ReturnType> {
|
|
869
|
+
imageGifUpload: {
|
|
871
870
|
/**
|
|
872
|
-
*
|
|
873
|
-
* @param options The tweet attributes
|
|
874
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
871
|
+
* Add an image gif
|
|
875
872
|
*/
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
874
|
+
/**
|
|
875
|
+
* Update an image gif
|
|
876
|
+
*/
|
|
877
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
878
|
+
/**
|
|
879
|
+
* Set image alignment
|
|
880
|
+
*/
|
|
881
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
878
882
|
};
|
|
879
883
|
}
|
|
880
884
|
}
|
|
@@ -882,9 +886,9 @@ declare module '@tiptap/core' {
|
|
|
882
886
|
|
|
883
887
|
declare module '@tiptap/core' {
|
|
884
888
|
interface Commands<ReturnType> {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
889
|
+
mermaid: {
|
|
890
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
891
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
888
892
|
};
|
|
889
893
|
}
|
|
890
894
|
}
|
|
@@ -892,8 +896,9 @@ declare module '@tiptap/core' {
|
|
|
892
896
|
|
|
893
897
|
declare module '@tiptap/core' {
|
|
894
898
|
interface Commands<ReturnType> {
|
|
895
|
-
|
|
896
|
-
|
|
899
|
+
drawer: {
|
|
900
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
901
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
897
902
|
};
|
|
898
903
|
}
|
|
899
904
|
}
|
|
@@ -901,19 +906,14 @@ declare module '@tiptap/core' {
|
|
|
901
906
|
|
|
902
907
|
declare module '@tiptap/core' {
|
|
903
908
|
interface Commands<ReturnType> {
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Add an image gif
|
|
907
|
-
*/
|
|
908
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
-
/**
|
|
910
|
-
* Update an image gif
|
|
911
|
-
*/
|
|
912
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
+
twitter: {
|
|
913
910
|
/**
|
|
914
|
-
*
|
|
911
|
+
* Insert a tweet
|
|
912
|
+
* @param options The tweet attributes
|
|
913
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
915
914
|
*/
|
|
916
|
-
|
|
915
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
916
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
919
|
}
|
|
@@ -717,16 +717,6 @@ declare module '@tiptap/core' {
|
|
|
717
717
|
}
|
|
718
718
|
|
|
719
719
|
|
|
720
|
-
declare module '@tiptap/core' {
|
|
721
|
-
interface Commands<ReturnType> {
|
|
722
|
-
lineHeight: {
|
|
723
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
724
|
-
unsetLineHeight: () => ReturnType;
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
|
|
730
720
|
declare module '@tiptap/core' {
|
|
731
721
|
interface Commands<ReturnType> {
|
|
732
722
|
indent: {
|
|
@@ -745,8 +735,9 @@ declare module '@tiptap/core' {
|
|
|
745
735
|
|
|
746
736
|
declare module '@tiptap/core' {
|
|
747
737
|
interface Commands<ReturnType> {
|
|
748
|
-
|
|
749
|
-
|
|
738
|
+
tableCellBackground: {
|
|
739
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
740
|
+
unsetTableCellBackground: () => ReturnType;
|
|
750
741
|
};
|
|
751
742
|
}
|
|
752
743
|
}
|
|
@@ -754,11 +745,9 @@ declare module '@tiptap/core' {
|
|
|
754
745
|
|
|
755
746
|
declare module '@tiptap/core' {
|
|
756
747
|
interface Commands<ReturnType> {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
emoji: string;
|
|
761
|
-
}) => ReturnType;
|
|
748
|
+
lineHeight: {
|
|
749
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
750
|
+
unsetLineHeight: () => ReturnType;
|
|
762
751
|
};
|
|
763
752
|
}
|
|
764
753
|
}
|
|
@@ -766,14 +755,8 @@ declare module '@tiptap/core' {
|
|
|
766
755
|
|
|
767
756
|
declare module '@tiptap/core' {
|
|
768
757
|
interface Commands<ReturnType> {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
772
|
-
replace: () => ReturnType;
|
|
773
|
-
replaceAll: () => ReturnType;
|
|
774
|
-
goToPrevSearchResult: () => void;
|
|
775
|
-
goToNextSearchResult: () => void;
|
|
776
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
758
|
+
painter: {
|
|
759
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
777
760
|
};
|
|
778
761
|
}
|
|
779
762
|
}
|
|
@@ -781,8 +764,13 @@ declare module '@tiptap/core' {
|
|
|
781
764
|
|
|
782
765
|
declare module '@tiptap/core' {
|
|
783
766
|
interface Commands<ReturnType> {
|
|
784
|
-
|
|
785
|
-
|
|
767
|
+
columns: {
|
|
768
|
+
insertColumns: (attrs?: {
|
|
769
|
+
cols: number;
|
|
770
|
+
}) => ReturnType;
|
|
771
|
+
addColBefore: () => ReturnType;
|
|
772
|
+
addColAfter: () => ReturnType;
|
|
773
|
+
deleteCol: () => ReturnType;
|
|
786
774
|
};
|
|
787
775
|
}
|
|
788
776
|
}
|
|
@@ -805,9 +793,14 @@ declare module '@tiptap/core' {
|
|
|
805
793
|
|
|
806
794
|
declare module '@tiptap/core' {
|
|
807
795
|
interface Commands<ReturnType> {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
796
|
+
search: {
|
|
797
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
798
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
799
|
+
replace: () => ReturnType;
|
|
800
|
+
replaceAll: () => ReturnType;
|
|
801
|
+
goToPrevSearchResult: () => void;
|
|
802
|
+
goToNextSearchResult: () => void;
|
|
803
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
811
804
|
};
|
|
812
805
|
}
|
|
813
806
|
}
|
|
@@ -815,13 +808,11 @@ declare module '@tiptap/core' {
|
|
|
815
808
|
|
|
816
809
|
declare module '@tiptap/core' {
|
|
817
810
|
interface Commands<ReturnType> {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
811
|
+
emoji: {
|
|
812
|
+
setEmoji: (emoji: {
|
|
813
|
+
name: string;
|
|
814
|
+
emoji: string;
|
|
821
815
|
}) => ReturnType;
|
|
822
|
-
addColBefore: () => ReturnType;
|
|
823
|
-
addColAfter: () => ReturnType;
|
|
824
|
-
deleteCol: () => ReturnType;
|
|
825
816
|
};
|
|
826
817
|
}
|
|
827
818
|
}
|
|
@@ -829,8 +820,8 @@ declare module '@tiptap/core' {
|
|
|
829
820
|
|
|
830
821
|
declare module '@tiptap/core' {
|
|
831
822
|
interface Commands<ReturnType> {
|
|
832
|
-
|
|
833
|
-
|
|
823
|
+
katex: {
|
|
824
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
834
825
|
};
|
|
835
826
|
}
|
|
836
827
|
}
|
|
@@ -857,9 +848,8 @@ declare module '@tiptap/core' {
|
|
|
857
848
|
|
|
858
849
|
declare module '@tiptap/core' {
|
|
859
850
|
interface Commands<ReturnType> {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
851
|
+
exportWord: {
|
|
852
|
+
exportToWord: () => ReturnType;
|
|
863
853
|
};
|
|
864
854
|
}
|
|
865
855
|
}
|
|
@@ -867,14 +857,28 @@ declare module '@tiptap/core' {
|
|
|
867
857
|
|
|
868
858
|
declare module '@tiptap/core' {
|
|
869
859
|
interface Commands<ReturnType> {
|
|
870
|
-
|
|
860
|
+
attachment: {
|
|
861
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
declare module '@tiptap/core' {
|
|
868
|
+
interface Commands<ReturnType> {
|
|
869
|
+
imageGifUpload: {
|
|
871
870
|
/**
|
|
872
|
-
*
|
|
873
|
-
* @param options The tweet attributes
|
|
874
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
871
|
+
* Add an image gif
|
|
875
872
|
*/
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
874
|
+
/**
|
|
875
|
+
* Update an image gif
|
|
876
|
+
*/
|
|
877
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
878
|
+
/**
|
|
879
|
+
* Set image alignment
|
|
880
|
+
*/
|
|
881
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
878
882
|
};
|
|
879
883
|
}
|
|
880
884
|
}
|
|
@@ -882,9 +886,9 @@ declare module '@tiptap/core' {
|
|
|
882
886
|
|
|
883
887
|
declare module '@tiptap/core' {
|
|
884
888
|
interface Commands<ReturnType> {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
889
|
+
mermaid: {
|
|
890
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
891
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
888
892
|
};
|
|
889
893
|
}
|
|
890
894
|
}
|
|
@@ -892,8 +896,9 @@ declare module '@tiptap/core' {
|
|
|
892
896
|
|
|
893
897
|
declare module '@tiptap/core' {
|
|
894
898
|
interface Commands<ReturnType> {
|
|
895
|
-
|
|
896
|
-
|
|
899
|
+
drawer: {
|
|
900
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
901
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
897
902
|
};
|
|
898
903
|
}
|
|
899
904
|
}
|
|
@@ -901,19 +906,14 @@ declare module '@tiptap/core' {
|
|
|
901
906
|
|
|
902
907
|
declare module '@tiptap/core' {
|
|
903
908
|
interface Commands<ReturnType> {
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Add an image gif
|
|
907
|
-
*/
|
|
908
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
-
/**
|
|
910
|
-
* Update an image gif
|
|
911
|
-
*/
|
|
912
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
+
twitter: {
|
|
913
910
|
/**
|
|
914
|
-
*
|
|
911
|
+
* Insert a tweet
|
|
912
|
+
* @param options The tweet attributes
|
|
913
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
915
914
|
*/
|
|
916
|
-
|
|
915
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
916
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
919
|
}
|
package/lib/extension-bundle.js
CHANGED
|
@@ -4,8 +4,8 @@ import { jsxs as m, jsx as o, Fragment as oe } from "react/jsx-runtime";
|
|
|
4
4
|
import * as V from "react";
|
|
5
5
|
import Pe, { useMemo as R, useState as k, useRef as X, useCallback as j, Fragment as Je, forwardRef as Qe, useImperativeHandle as et, useEffect as P } from "react";
|
|
6
6
|
import { ChevronDown as tt, Check as Rt, ChevronUp as Kn, Copy as Wn, CopyCheck as Gn, SearchIcon as Xn, LoaderIcon as Yn, LucideTableProperties as Zn, LucideSheet as Jn, LucideImage as Qn, LucideFile as ei, LucideVideo as ti, LucideAudioLines as ni } from "lucide-react";
|
|
7
|
-
import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ii, f as E, u as at, h as ai, I as D, j as be, k as Pt, l as We, m as oi, n as ot, P as xe, o as pe, p as we, q as rt, C as ri, H as si, L as ci, r as li, M as di, s as ui, t as xt, v as Se, w as st, x as ct, y as lt, z as dt, E as hi, F as mi, G as fi, J as De, K as Oe, N as gi, S as _i, O as bi, Q as xi, U as Y, V as pi, W as wi, X as yi, Y as vi, Z as ki, _ as Dt } from "./RichTextEditor-
|
|
8
|
-
import { a5 as Wr, a1 as Gr, $ as Xr, a2 as Yr, a0 as Zr, a3 as Jr, a4 as Qr } from "./RichTextEditor-
|
|
7
|
+
import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ii, f as E, u as at, h as ai, I as D, j as be, k as Pt, l as We, m as oi, n as ot, P as xe, o as pe, p as we, q as rt, C as ri, H as si, L as ci, r as li, M as di, s as ui, t as xt, v as Se, w as st, x as ct, y as lt, z as dt, E as hi, F as mi, G as fi, J as De, K as Oe, N as gi, S as _i, O as bi, Q as xi, U as Y, V as pi, W as wi, X as yi, Y as vi, Z as ki, _ as Dt } from "./RichTextEditor-C8DLflat.js";
|
|
8
|
+
import { a5 as Wr, a1 as Gr, $ as Xr, a2 as Yr, a0 as Zr, a3 as Jr, a4 as Qr } from "./RichTextEditor-C8DLflat.js";
|
|
9
9
|
import { M as Ci, D as Ot, u as B, f as Ni, g as Ti, h as pt, i as z, j as jt, k as Ai, I as wt, m as Li, n as yt, V as Si, T as Me, o as Ie, p as Ee } from "./index-BngAFVnd.js";
|
|
10
10
|
import * as le from "@radix-ui/react-tabs";
|
|
11
11
|
import { bundledThemes as Bt, bundledLanguages as $t, createHighlighter as Mi } from "shiki";
|
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-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-YN9WGs-6.cjs"),c=require("./tiptap-tmVDGH_r.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;
|
package/lib/index.d.cts
CHANGED
|
@@ -269,16 +269,6 @@ declare module '@tiptap/core' {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
|
|
272
|
-
declare module '@tiptap/core' {
|
|
273
|
-
interface Commands<ReturnType> {
|
|
274
|
-
lineHeight: {
|
|
275
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
276
|
-
unsetLineHeight: () => ReturnType;
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
272
|
declare module '@tiptap/core' {
|
|
283
273
|
interface Commands<ReturnType> {
|
|
284
274
|
indent: {
|
|
@@ -297,8 +287,9 @@ declare module '@tiptap/core' {
|
|
|
297
287
|
|
|
298
288
|
declare module '@tiptap/core' {
|
|
299
289
|
interface Commands<ReturnType> {
|
|
300
|
-
|
|
301
|
-
|
|
290
|
+
tableCellBackground: {
|
|
291
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
292
|
+
unsetTableCellBackground: () => ReturnType;
|
|
302
293
|
};
|
|
303
294
|
}
|
|
304
295
|
}
|
|
@@ -306,11 +297,9 @@ declare module '@tiptap/core' {
|
|
|
306
297
|
|
|
307
298
|
declare module '@tiptap/core' {
|
|
308
299
|
interface Commands<ReturnType> {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
emoji: string;
|
|
313
|
-
}) => ReturnType;
|
|
300
|
+
lineHeight: {
|
|
301
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
302
|
+
unsetLineHeight: () => ReturnType;
|
|
314
303
|
};
|
|
315
304
|
}
|
|
316
305
|
}
|
|
@@ -318,14 +307,8 @@ declare module '@tiptap/core' {
|
|
|
318
307
|
|
|
319
308
|
declare module '@tiptap/core' {
|
|
320
309
|
interface Commands<ReturnType> {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
324
|
-
replace: () => ReturnType;
|
|
325
|
-
replaceAll: () => ReturnType;
|
|
326
|
-
goToPrevSearchResult: () => void;
|
|
327
|
-
goToNextSearchResult: () => void;
|
|
328
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
310
|
+
painter: {
|
|
311
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
329
312
|
};
|
|
330
313
|
}
|
|
331
314
|
}
|
|
@@ -333,8 +316,13 @@ declare module '@tiptap/core' {
|
|
|
333
316
|
|
|
334
317
|
declare module '@tiptap/core' {
|
|
335
318
|
interface Commands<ReturnType> {
|
|
336
|
-
|
|
337
|
-
|
|
319
|
+
columns: {
|
|
320
|
+
insertColumns: (attrs?: {
|
|
321
|
+
cols: number;
|
|
322
|
+
}) => ReturnType;
|
|
323
|
+
addColBefore: () => ReturnType;
|
|
324
|
+
addColAfter: () => ReturnType;
|
|
325
|
+
deleteCol: () => ReturnType;
|
|
338
326
|
};
|
|
339
327
|
}
|
|
340
328
|
}
|
|
@@ -357,9 +345,14 @@ declare module '@tiptap/core' {
|
|
|
357
345
|
|
|
358
346
|
declare module '@tiptap/core' {
|
|
359
347
|
interface Commands<ReturnType> {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
348
|
+
search: {
|
|
349
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
350
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
351
|
+
replace: () => ReturnType;
|
|
352
|
+
replaceAll: () => ReturnType;
|
|
353
|
+
goToPrevSearchResult: () => void;
|
|
354
|
+
goToNextSearchResult: () => void;
|
|
355
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
363
356
|
};
|
|
364
357
|
}
|
|
365
358
|
}
|
|
@@ -367,13 +360,11 @@ declare module '@tiptap/core' {
|
|
|
367
360
|
|
|
368
361
|
declare module '@tiptap/core' {
|
|
369
362
|
interface Commands<ReturnType> {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
363
|
+
emoji: {
|
|
364
|
+
setEmoji: (emoji: {
|
|
365
|
+
name: string;
|
|
366
|
+
emoji: string;
|
|
373
367
|
}) => ReturnType;
|
|
374
|
-
addColBefore: () => ReturnType;
|
|
375
|
-
addColAfter: () => ReturnType;
|
|
376
|
-
deleteCol: () => ReturnType;
|
|
377
368
|
};
|
|
378
369
|
}
|
|
379
370
|
}
|
|
@@ -381,8 +372,8 @@ declare module '@tiptap/core' {
|
|
|
381
372
|
|
|
382
373
|
declare module '@tiptap/core' {
|
|
383
374
|
interface Commands<ReturnType> {
|
|
384
|
-
|
|
385
|
-
|
|
375
|
+
katex: {
|
|
376
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
386
377
|
};
|
|
387
378
|
}
|
|
388
379
|
}
|
|
@@ -409,9 +400,8 @@ declare module '@tiptap/core' {
|
|
|
409
400
|
|
|
410
401
|
declare module '@tiptap/core' {
|
|
411
402
|
interface Commands<ReturnType> {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
403
|
+
exportWord: {
|
|
404
|
+
exportToWord: () => ReturnType;
|
|
415
405
|
};
|
|
416
406
|
}
|
|
417
407
|
}
|
|
@@ -419,14 +409,28 @@ declare module '@tiptap/core' {
|
|
|
419
409
|
|
|
420
410
|
declare module '@tiptap/core' {
|
|
421
411
|
interface Commands<ReturnType> {
|
|
422
|
-
|
|
412
|
+
attachment: {
|
|
413
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
declare module '@tiptap/core' {
|
|
420
|
+
interface Commands<ReturnType> {
|
|
421
|
+
imageGifUpload: {
|
|
423
422
|
/**
|
|
424
|
-
*
|
|
425
|
-
* @param options The tweet attributes
|
|
426
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
423
|
+
* Add an image gif
|
|
427
424
|
*/
|
|
428
|
-
|
|
429
|
-
|
|
425
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
426
|
+
/**
|
|
427
|
+
* Update an image gif
|
|
428
|
+
*/
|
|
429
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
430
|
+
/**
|
|
431
|
+
* Set image alignment
|
|
432
|
+
*/
|
|
433
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
430
434
|
};
|
|
431
435
|
}
|
|
432
436
|
}
|
|
@@ -434,9 +438,9 @@ declare module '@tiptap/core' {
|
|
|
434
438
|
|
|
435
439
|
declare module '@tiptap/core' {
|
|
436
440
|
interface Commands<ReturnType> {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
441
|
+
mermaid: {
|
|
442
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
443
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
440
444
|
};
|
|
441
445
|
}
|
|
442
446
|
}
|
|
@@ -444,8 +448,9 @@ declare module '@tiptap/core' {
|
|
|
444
448
|
|
|
445
449
|
declare module '@tiptap/core' {
|
|
446
450
|
interface Commands<ReturnType> {
|
|
447
|
-
|
|
448
|
-
|
|
451
|
+
drawer: {
|
|
452
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
453
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
449
454
|
};
|
|
450
455
|
}
|
|
451
456
|
}
|
|
@@ -453,19 +458,14 @@ declare module '@tiptap/core' {
|
|
|
453
458
|
|
|
454
459
|
declare module '@tiptap/core' {
|
|
455
460
|
interface Commands<ReturnType> {
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Add an image gif
|
|
459
|
-
*/
|
|
460
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
461
|
-
/**
|
|
462
|
-
* Update an image gif
|
|
463
|
-
*/
|
|
464
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
461
|
+
twitter: {
|
|
465
462
|
/**
|
|
466
|
-
*
|
|
463
|
+
* Insert a tweet
|
|
464
|
+
* @param options The tweet attributes
|
|
465
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
467
466
|
*/
|
|
468
|
-
|
|
467
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
468
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
}
|