reactjs-tiptap-editor 0.2.22 → 0.2.24

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useRef as d, useState as o, useEffect as f } from "react";
2
- import { R as m } from "./RichTextEditor-BnruDETn.js";
3
- import { B as x } from "./tiptap-BV9BUpUC.js";
2
+ import { R as m } from "./RichTextEditor-C_dIT2FZ.js";
3
+ import { B as x } from "./tiptap-CXio79KB.js";
4
4
  function c() {
5
5
  var t;
6
6
  const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CYg22iLG.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CJ6Hb9MN.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
@@ -900,6 +900,15 @@ declare module '@tiptap/core' {
900
900
  }
901
901
 
902
902
 
903
+ declare module '@tiptap/core' {
904
+ interface Commands<ReturnType> {
905
+ setCodeBlock: {
906
+ setCodeBlock: (options?: any) => ReturnType;
907
+ };
908
+ }
909
+ }
910
+
911
+
903
912
  declare module '@tiptap/core' {
904
913
  interface Commands<ReturnType> {
905
914
  fontSize: {
@@ -918,6 +927,26 @@ declare module '@tiptap/core' {
918
927
  }
919
928
 
920
929
 
930
+ declare module '@tiptap/core' {
931
+ interface Commands<ReturnType> {
932
+ imageUpload: {
933
+ /**
934
+ * Add an image
935
+ */
936
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
937
+ /**
938
+ * Update an image
939
+ */
940
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
941
+ /**
942
+ * Set image alignment
943
+ */
944
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
945
+ };
946
+ }
947
+ }
948
+
949
+
921
950
  declare module '@tiptap/core' {
922
951
  interface Commands<ReturnType> {
923
952
  indent: {
@@ -944,26 +973,6 @@ declare module '@tiptap/core' {
944
973
  }
945
974
 
946
975
 
947
- declare module '@tiptap/core' {
948
- interface Commands<ReturnType> {
949
- imageUpload: {
950
- /**
951
- * Add an image
952
- */
953
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
954
- /**
955
- * Update an image
956
- */
957
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
958
- /**
959
- * Set image alignment
960
- */
961
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
962
- };
963
- }
964
- }
965
-
966
-
967
976
  declare module '@tiptap/core' {
968
977
  interface Commands<ReturnType> {
969
978
  tableCellBackground: {
@@ -1012,15 +1021,6 @@ declare module '@tiptap/core' {
1012
1021
  }
1013
1022
 
1014
1023
 
1015
- declare module '@tiptap/core' {
1016
- interface Commands<ReturnType> {
1017
- katex: {
1018
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1019
- };
1020
- }
1021
- }
1022
-
1023
-
1024
1024
  declare module '@tiptap/core' {
1025
1025
  interface Commands<ReturnType> {
1026
1026
  emoji: {
@@ -1050,8 +1050,9 @@ declare module '@tiptap/core' {
1050
1050
 
1051
1051
  declare module '@tiptap/core' {
1052
1052
  interface Commands<ReturnType> {
1053
- exportWord: {
1054
- exportToWord: () => ReturnType;
1053
+ tableOfContents: {
1054
+ setTableOfContents: () => ReturnType;
1055
+ removeTableOfContents: () => ReturnType;
1055
1056
  };
1056
1057
  }
1057
1058
  }
@@ -1059,8 +1060,8 @@ declare module '@tiptap/core' {
1059
1060
 
1060
1061
  declare module '@tiptap/core' {
1061
1062
  interface Commands<ReturnType> {
1062
- excalidraw: {
1063
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1063
+ katex: {
1064
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1064
1065
  };
1065
1066
  }
1066
1067
  }
@@ -1068,9 +1069,8 @@ declare module '@tiptap/core' {
1068
1069
 
1069
1070
  declare module '@tiptap/core' {
1070
1071
  interface Commands<ReturnType> {
1071
- tableOfContents: {
1072
- setTableOfContents: () => ReturnType;
1073
- removeTableOfContents: () => ReturnType;
1072
+ exportWord: {
1073
+ exportToWord: () => ReturnType;
1074
1074
  };
1075
1075
  }
1076
1076
  }
@@ -1078,8 +1078,19 @@ declare module '@tiptap/core' {
1078
1078
 
1079
1079
  declare module '@tiptap/core' {
1080
1080
  interface Commands<ReturnType> {
1081
- attachment: {
1082
- setAttachment: (attrs?: unknown) => ReturnType;
1081
+ imageGifUpload: {
1082
+ /**
1083
+ * Add an image gif
1084
+ */
1085
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1086
+ /**
1087
+ * Update an image gif
1088
+ */
1089
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1090
+ /**
1091
+ * Set image alignment
1092
+ */
1093
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1083
1094
  };
1084
1095
  }
1085
1096
  }
@@ -1097,19 +1108,8 @@ declare module '@tiptap/core' {
1097
1108
 
1098
1109
  declare module '@tiptap/core' {
1099
1110
  interface Commands<ReturnType> {
1100
- imageGifUpload: {
1101
- /**
1102
- * Add an image gif
1103
- */
1104
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1105
- /**
1106
- * Update an image gif
1107
- */
1108
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1109
- /**
1110
- * Set image alignment
1111
- */
1112
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1111
+ attachment: {
1112
+ setAttachment: (attrs?: unknown) => ReturnType;
1113
1113
  };
1114
1114
  }
1115
1115
  }
@@ -1117,14 +1117,8 @@ declare module '@tiptap/core' {
1117
1117
 
1118
1118
  declare module '@tiptap/core' {
1119
1119
  interface Commands<ReturnType> {
1120
- twitter: {
1121
- /**
1122
- * Insert a tweet
1123
- * @param options The tweet attributes
1124
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1125
- */
1126
- setTweet: (options: SetTweetOptions) => ReturnType;
1127
- updateTweet: (options: SetTweetOptions) => ReturnType;
1120
+ excalidraw: {
1121
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1128
1122
  };
1129
1123
  }
1130
1124
  }
@@ -1138,3 +1132,18 @@ declare module '@tiptap/core' {
1138
1132
  };
1139
1133
  }
1140
1134
  }
1135
+
1136
+
1137
+ declare module '@tiptap/core' {
1138
+ interface Commands<ReturnType> {
1139
+ twitter: {
1140
+ /**
1141
+ * Insert a tweet
1142
+ * @param options The tweet attributes
1143
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1144
+ */
1145
+ setTweet: (options: SetTweetOptions) => ReturnType;
1146
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1147
+ };
1148
+ }
1149
+ }
@@ -900,6 +900,15 @@ declare module '@tiptap/core' {
900
900
  }
901
901
 
902
902
 
903
+ declare module '@tiptap/core' {
904
+ interface Commands<ReturnType> {
905
+ setCodeBlock: {
906
+ setCodeBlock: (options?: any) => ReturnType;
907
+ };
908
+ }
909
+ }
910
+
911
+
903
912
  declare module '@tiptap/core' {
904
913
  interface Commands<ReturnType> {
905
914
  fontSize: {
@@ -918,6 +927,26 @@ declare module '@tiptap/core' {
918
927
  }
919
928
 
920
929
 
930
+ declare module '@tiptap/core' {
931
+ interface Commands<ReturnType> {
932
+ imageUpload: {
933
+ /**
934
+ * Add an image
935
+ */
936
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
937
+ /**
938
+ * Update an image
939
+ */
940
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
941
+ /**
942
+ * Set image alignment
943
+ */
944
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
945
+ };
946
+ }
947
+ }
948
+
949
+
921
950
  declare module '@tiptap/core' {
922
951
  interface Commands<ReturnType> {
923
952
  indent: {
@@ -944,26 +973,6 @@ declare module '@tiptap/core' {
944
973
  }
945
974
 
946
975
 
947
- declare module '@tiptap/core' {
948
- interface Commands<ReturnType> {
949
- imageUpload: {
950
- /**
951
- * Add an image
952
- */
953
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
954
- /**
955
- * Update an image
956
- */
957
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
958
- /**
959
- * Set image alignment
960
- */
961
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
962
- };
963
- }
964
- }
965
-
966
-
967
976
  declare module '@tiptap/core' {
968
977
  interface Commands<ReturnType> {
969
978
  tableCellBackground: {
@@ -1012,15 +1021,6 @@ declare module '@tiptap/core' {
1012
1021
  }
1013
1022
 
1014
1023
 
1015
- declare module '@tiptap/core' {
1016
- interface Commands<ReturnType> {
1017
- katex: {
1018
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1019
- };
1020
- }
1021
- }
1022
-
1023
-
1024
1024
  declare module '@tiptap/core' {
1025
1025
  interface Commands<ReturnType> {
1026
1026
  emoji: {
@@ -1050,8 +1050,9 @@ declare module '@tiptap/core' {
1050
1050
 
1051
1051
  declare module '@tiptap/core' {
1052
1052
  interface Commands<ReturnType> {
1053
- exportWord: {
1054
- exportToWord: () => ReturnType;
1053
+ tableOfContents: {
1054
+ setTableOfContents: () => ReturnType;
1055
+ removeTableOfContents: () => ReturnType;
1055
1056
  };
1056
1057
  }
1057
1058
  }
@@ -1059,8 +1060,8 @@ declare module '@tiptap/core' {
1059
1060
 
1060
1061
  declare module '@tiptap/core' {
1061
1062
  interface Commands<ReturnType> {
1062
- excalidraw: {
1063
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1063
+ katex: {
1064
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1064
1065
  };
1065
1066
  }
1066
1067
  }
@@ -1068,9 +1069,8 @@ declare module '@tiptap/core' {
1068
1069
 
1069
1070
  declare module '@tiptap/core' {
1070
1071
  interface Commands<ReturnType> {
1071
- tableOfContents: {
1072
- setTableOfContents: () => ReturnType;
1073
- removeTableOfContents: () => ReturnType;
1072
+ exportWord: {
1073
+ exportToWord: () => ReturnType;
1074
1074
  };
1075
1075
  }
1076
1076
  }
@@ -1078,8 +1078,19 @@ declare module '@tiptap/core' {
1078
1078
 
1079
1079
  declare module '@tiptap/core' {
1080
1080
  interface Commands<ReturnType> {
1081
- attachment: {
1082
- setAttachment: (attrs?: unknown) => ReturnType;
1081
+ imageGifUpload: {
1082
+ /**
1083
+ * Add an image gif
1084
+ */
1085
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1086
+ /**
1087
+ * Update an image gif
1088
+ */
1089
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1090
+ /**
1091
+ * Set image alignment
1092
+ */
1093
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1083
1094
  };
1084
1095
  }
1085
1096
  }
@@ -1097,19 +1108,8 @@ declare module '@tiptap/core' {
1097
1108
 
1098
1109
  declare module '@tiptap/core' {
1099
1110
  interface Commands<ReturnType> {
1100
- imageGifUpload: {
1101
- /**
1102
- * Add an image gif
1103
- */
1104
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1105
- /**
1106
- * Update an image gif
1107
- */
1108
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1109
- /**
1110
- * Set image alignment
1111
- */
1112
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1111
+ attachment: {
1112
+ setAttachment: (attrs?: unknown) => ReturnType;
1113
1113
  };
1114
1114
  }
1115
1115
  }
@@ -1117,14 +1117,8 @@ declare module '@tiptap/core' {
1117
1117
 
1118
1118
  declare module '@tiptap/core' {
1119
1119
  interface Commands<ReturnType> {
1120
- twitter: {
1121
- /**
1122
- * Insert a tweet
1123
- * @param options The tweet attributes
1124
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1125
- */
1126
- setTweet: (options: SetTweetOptions) => ReturnType;
1127
- updateTweet: (options: SetTweetOptions) => ReturnType;
1120
+ excalidraw: {
1121
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1128
1122
  };
1129
1123
  }
1130
1124
  }
@@ -1138,3 +1132,18 @@ declare module '@tiptap/core' {
1138
1132
  };
1139
1133
  }
1140
1134
  }
1135
+
1136
+
1137
+ declare module '@tiptap/core' {
1138
+ interface Commands<ReturnType> {
1139
+ twitter: {
1140
+ /**
1141
+ * Insert a tweet
1142
+ * @param options The tweet attributes
1143
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1144
+ */
1145
+ setTweet: (options: SetTweetOptions) => ReturnType;
1146
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1147
+ };
1148
+ }
1149
+ }
@@ -1,4 +1,4 @@
1
- import { a as e, b as l, l as o, e as _, c, d as h } from "./index-8id9bPv5.js";
1
+ import { a as e, b as l, l as o, e as _, c, d as h } from "./index-BlV5SJJW.js";
2
2
  export {
3
3
  e as en,
4
4
  l as hu_HU,