reactjs-tiptap-editor 0.2.25 → 0.2.27

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.ts CHANGED
@@ -324,6 +324,16 @@ declare module '@tiptap/core' {
324
324
  }
325
325
 
326
326
 
327
+ declare module '@tiptap/core' {
328
+ interface Commands<ReturnType> {
329
+ tableCellBackground: {
330
+ setTableCellBackground: (color: string) => ReturnType;
331
+ unsetTableCellBackground: () => ReturnType;
332
+ };
333
+ }
334
+ }
335
+
336
+
327
337
  declare module '@tiptap/core' {
328
338
  interface Commands<ReturnType> {
329
339
  imageUpload: {
@@ -346,9 +356,13 @@ declare module '@tiptap/core' {
346
356
 
347
357
  declare module '@tiptap/core' {
348
358
  interface Commands<ReturnType> {
349
- tableCellBackground: {
350
- setTableCellBackground: (color: string) => ReturnType;
351
- unsetTableCellBackground: () => ReturnType;
359
+ columns: {
360
+ insertColumns: (attrs?: {
361
+ cols: number;
362
+ }) => ReturnType;
363
+ addColBefore: () => ReturnType;
364
+ addColAfter: () => ReturnType;
365
+ deleteCol: () => ReturnType;
352
366
  };
353
367
  }
354
368
  }
@@ -365,13 +379,8 @@ declare module '@tiptap/core' {
365
379
 
366
380
  declare module '@tiptap/core' {
367
381
  interface Commands<ReturnType> {
368
- columns: {
369
- insertColumns: (attrs?: {
370
- cols: number;
371
- }) => ReturnType;
372
- addColBefore: () => ReturnType;
373
- addColAfter: () => ReturnType;
374
- deleteCol: () => ReturnType;
382
+ katex: {
383
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
375
384
  };
376
385
  }
377
386
  }
@@ -379,13 +388,10 @@ declare module '@tiptap/core' {
379
388
 
380
389
  declare module '@tiptap/core' {
381
390
  interface Commands<ReturnType> {
382
- iframe: {
383
- /**
384
- * Add an iframe
385
- */
386
- setIframe: (options: {
387
- src: string;
388
- service: string;
391
+ emoji: {
392
+ setEmoji: (emoji: {
393
+ name: string;
394
+ emoji: string;
389
395
  }) => ReturnType;
390
396
  };
391
397
  }
@@ -409,25 +415,19 @@ declare module '@tiptap/core' {
409
415
 
410
416
  declare module '@tiptap/core' {
411
417
  interface Commands<ReturnType> {
412
- emoji: {
413
- setEmoji: (emoji: {
414
- name: string;
415
- emoji: string;
418
+ iframe: {
419
+ /**
420
+ * Add an iframe
421
+ */
422
+ setIframe: (options: {
423
+ src: string;
424
+ service: string;
416
425
  }) => ReturnType;
417
426
  };
418
427
  }
419
428
  }
420
429
 
421
430
 
422
- declare module '@tiptap/core' {
423
- interface Commands<ReturnType> {
424
- katex: {
425
- setKatex: (arg?: IKatexAttrs) => ReturnType;
426
- };
427
- }
428
- }
429
-
430
-
431
431
  declare module '@tiptap/core' {
432
432
  interface Commands<ReturnType> {
433
433
  tableOfContents: {
@@ -456,6 +456,30 @@ declare module '@tiptap/core' {
456
456
  }
457
457
 
458
458
 
459
+ declare module '@tiptap/core' {
460
+ interface Commands<ReturnType> {
461
+ attachment: {
462
+ setAttachment: (attrs?: unknown) => ReturnType;
463
+ };
464
+ }
465
+ }
466
+
467
+
468
+ declare module '@tiptap/core' {
469
+ interface Commands<ReturnType> {
470
+ twitter: {
471
+ /**
472
+ * Insert a tweet
473
+ * @param options The tweet attributes
474
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
475
+ */
476
+ setTweet: (options: SetTweetOptions) => ReturnType;
477
+ updateTweet: (options: SetTweetOptions) => ReturnType;
478
+ };
479
+ }
480
+ }
481
+
482
+
459
483
  declare module '@tiptap/core' {
460
484
  interface Commands<ReturnType> {
461
485
  imageGifUpload: {
@@ -478,8 +502,9 @@ declare module '@tiptap/core' {
478
502
 
479
503
  declare module '@tiptap/core' {
480
504
  interface Commands<ReturnType> {
481
- attachment: {
482
- setAttachment: (attrs?: unknown) => ReturnType;
505
+ drawer: {
506
+ setDrawer: (options: any, replace?: any) => ReturnType;
507
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
483
508
  };
484
509
  }
485
510
  }
@@ -493,28 +518,3 @@ declare module '@tiptap/core' {
493
518
  };
494
519
  }
495
520
  }
496
-
497
-
498
- declare module '@tiptap/core' {
499
- interface Commands<ReturnType> {
500
- twitter: {
501
- /**
502
- * Insert a tweet
503
- * @param options The tweet attributes
504
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
505
- */
506
- setTweet: (options: SetTweetOptions) => ReturnType;
507
- updateTweet: (options: SetTweetOptions) => ReturnType;
508
- };
509
- }
510
- }
511
-
512
-
513
- declare module '@tiptap/core' {
514
- interface Commands<ReturnType> {
515
- drawer: {
516
- setDrawer: (options: any, replace?: any) => ReturnType;
517
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
518
- };
519
- }
520
- }
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-C_dIT2FZ.js";
3
- import { B as x } from "./tiptap-CXio79KB.js";
2
+ import { R as m } from "./RichTextEditor-DH6J2is9.js";
3
+ import { B as x } from "./tiptap-DOP8lVCQ.js";
4
4
  function c() {
5
5
  var t;
6
6
  const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
@@ -953,6 +953,16 @@ declare module '@tiptap/core' {
953
953
  }
954
954
 
955
955
 
956
+ declare module '@tiptap/core' {
957
+ interface Commands<ReturnType> {
958
+ tableCellBackground: {
959
+ setTableCellBackground: (color: string) => ReturnType;
960
+ unsetTableCellBackground: () => ReturnType;
961
+ };
962
+ }
963
+ }
964
+
965
+
956
966
  declare module '@tiptap/core' {
957
967
  interface Commands<ReturnType> {
958
968
  imageUpload: {
@@ -975,9 +985,13 @@ declare module '@tiptap/core' {
975
985
 
976
986
  declare module '@tiptap/core' {
977
987
  interface Commands<ReturnType> {
978
- tableCellBackground: {
979
- setTableCellBackground: (color: string) => ReturnType;
980
- unsetTableCellBackground: () => ReturnType;
988
+ columns: {
989
+ insertColumns: (attrs?: {
990
+ cols: number;
991
+ }) => ReturnType;
992
+ addColBefore: () => ReturnType;
993
+ addColAfter: () => ReturnType;
994
+ deleteCol: () => ReturnType;
981
995
  };
982
996
  }
983
997
  }
@@ -994,13 +1008,8 @@ declare module '@tiptap/core' {
994
1008
 
995
1009
  declare module '@tiptap/core' {
996
1010
  interface Commands<ReturnType> {
997
- columns: {
998
- insertColumns: (attrs?: {
999
- cols: number;
1000
- }) => ReturnType;
1001
- addColBefore: () => ReturnType;
1002
- addColAfter: () => ReturnType;
1003
- deleteCol: () => ReturnType;
1011
+ katex: {
1012
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1004
1013
  };
1005
1014
  }
1006
1015
  }
@@ -1008,13 +1017,10 @@ declare module '@tiptap/core' {
1008
1017
 
1009
1018
  declare module '@tiptap/core' {
1010
1019
  interface Commands<ReturnType> {
1011
- iframe: {
1012
- /**
1013
- * Add an iframe
1014
- */
1015
- setIframe: (options: {
1016
- src: string;
1017
- service: string;
1020
+ emoji: {
1021
+ setEmoji: (emoji: {
1022
+ name: string;
1023
+ emoji: string;
1018
1024
  }) => ReturnType;
1019
1025
  };
1020
1026
  }
@@ -1038,25 +1044,19 @@ declare module '@tiptap/core' {
1038
1044
 
1039
1045
  declare module '@tiptap/core' {
1040
1046
  interface Commands<ReturnType> {
1041
- emoji: {
1042
- setEmoji: (emoji: {
1043
- name: string;
1044
- emoji: string;
1047
+ iframe: {
1048
+ /**
1049
+ * Add an iframe
1050
+ */
1051
+ setIframe: (options: {
1052
+ src: string;
1053
+ service: string;
1045
1054
  }) => ReturnType;
1046
1055
  };
1047
1056
  }
1048
1057
  }
1049
1058
 
1050
1059
 
1051
- declare module '@tiptap/core' {
1052
- interface Commands<ReturnType> {
1053
- katex: {
1054
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1055
- };
1056
- }
1057
- }
1058
-
1059
-
1060
1060
  declare module '@tiptap/core' {
1061
1061
  interface Commands<ReturnType> {
1062
1062
  tableOfContents: {
@@ -1085,6 +1085,30 @@ declare module '@tiptap/core' {
1085
1085
  }
1086
1086
 
1087
1087
 
1088
+ declare module '@tiptap/core' {
1089
+ interface Commands<ReturnType> {
1090
+ attachment: {
1091
+ setAttachment: (attrs?: unknown) => ReturnType;
1092
+ };
1093
+ }
1094
+ }
1095
+
1096
+
1097
+ declare module '@tiptap/core' {
1098
+ interface Commands<ReturnType> {
1099
+ twitter: {
1100
+ /**
1101
+ * Insert a tweet
1102
+ * @param options The tweet attributes
1103
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1104
+ */
1105
+ setTweet: (options: SetTweetOptions) => ReturnType;
1106
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1107
+ };
1108
+ }
1109
+ }
1110
+
1111
+
1088
1112
  declare module '@tiptap/core' {
1089
1113
  interface Commands<ReturnType> {
1090
1114
  imageGifUpload: {
@@ -1107,8 +1131,9 @@ declare module '@tiptap/core' {
1107
1131
 
1108
1132
  declare module '@tiptap/core' {
1109
1133
  interface Commands<ReturnType> {
1110
- attachment: {
1111
- setAttachment: (attrs?: unknown) => ReturnType;
1134
+ drawer: {
1135
+ setDrawer: (options: any, replace?: any) => ReturnType;
1136
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1112
1137
  };
1113
1138
  }
1114
1139
  }
@@ -1122,28 +1147,3 @@ declare module '@tiptap/core' {
1122
1147
  };
1123
1148
  }
1124
1149
  }
1125
-
1126
-
1127
- declare module '@tiptap/core' {
1128
- interface Commands<ReturnType> {
1129
- twitter: {
1130
- /**
1131
- * Insert a tweet
1132
- * @param options The tweet attributes
1133
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1134
- */
1135
- setTweet: (options: SetTweetOptions) => ReturnType;
1136
- updateTweet: (options: SetTweetOptions) => ReturnType;
1137
- };
1138
- }
1139
- }
1140
-
1141
-
1142
- declare module '@tiptap/core' {
1143
- interface Commands<ReturnType> {
1144
- drawer: {
1145
- setDrawer: (options: any, replace?: any) => ReturnType;
1146
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1147
- };
1148
- }
1149
- }
@@ -953,6 +953,16 @@ declare module '@tiptap/core' {
953
953
  }
954
954
 
955
955
 
956
+ declare module '@tiptap/core' {
957
+ interface Commands<ReturnType> {
958
+ tableCellBackground: {
959
+ setTableCellBackground: (color: string) => ReturnType;
960
+ unsetTableCellBackground: () => ReturnType;
961
+ };
962
+ }
963
+ }
964
+
965
+
956
966
  declare module '@tiptap/core' {
957
967
  interface Commands<ReturnType> {
958
968
  imageUpload: {
@@ -975,9 +985,13 @@ declare module '@tiptap/core' {
975
985
 
976
986
  declare module '@tiptap/core' {
977
987
  interface Commands<ReturnType> {
978
- tableCellBackground: {
979
- setTableCellBackground: (color: string) => ReturnType;
980
- unsetTableCellBackground: () => ReturnType;
988
+ columns: {
989
+ insertColumns: (attrs?: {
990
+ cols: number;
991
+ }) => ReturnType;
992
+ addColBefore: () => ReturnType;
993
+ addColAfter: () => ReturnType;
994
+ deleteCol: () => ReturnType;
981
995
  };
982
996
  }
983
997
  }
@@ -994,13 +1008,8 @@ declare module '@tiptap/core' {
994
1008
 
995
1009
  declare module '@tiptap/core' {
996
1010
  interface Commands<ReturnType> {
997
- columns: {
998
- insertColumns: (attrs?: {
999
- cols: number;
1000
- }) => ReturnType;
1001
- addColBefore: () => ReturnType;
1002
- addColAfter: () => ReturnType;
1003
- deleteCol: () => ReturnType;
1011
+ katex: {
1012
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1004
1013
  };
1005
1014
  }
1006
1015
  }
@@ -1008,13 +1017,10 @@ declare module '@tiptap/core' {
1008
1017
 
1009
1018
  declare module '@tiptap/core' {
1010
1019
  interface Commands<ReturnType> {
1011
- iframe: {
1012
- /**
1013
- * Add an iframe
1014
- */
1015
- setIframe: (options: {
1016
- src: string;
1017
- service: string;
1020
+ emoji: {
1021
+ setEmoji: (emoji: {
1022
+ name: string;
1023
+ emoji: string;
1018
1024
  }) => ReturnType;
1019
1025
  };
1020
1026
  }
@@ -1038,25 +1044,19 @@ declare module '@tiptap/core' {
1038
1044
 
1039
1045
  declare module '@tiptap/core' {
1040
1046
  interface Commands<ReturnType> {
1041
- emoji: {
1042
- setEmoji: (emoji: {
1043
- name: string;
1044
- emoji: string;
1047
+ iframe: {
1048
+ /**
1049
+ * Add an iframe
1050
+ */
1051
+ setIframe: (options: {
1052
+ src: string;
1053
+ service: string;
1045
1054
  }) => ReturnType;
1046
1055
  };
1047
1056
  }
1048
1057
  }
1049
1058
 
1050
1059
 
1051
- declare module '@tiptap/core' {
1052
- interface Commands<ReturnType> {
1053
- katex: {
1054
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1055
- };
1056
- }
1057
- }
1058
-
1059
-
1060
1060
  declare module '@tiptap/core' {
1061
1061
  interface Commands<ReturnType> {
1062
1062
  tableOfContents: {
@@ -1085,6 +1085,30 @@ declare module '@tiptap/core' {
1085
1085
  }
1086
1086
 
1087
1087
 
1088
+ declare module '@tiptap/core' {
1089
+ interface Commands<ReturnType> {
1090
+ attachment: {
1091
+ setAttachment: (attrs?: unknown) => ReturnType;
1092
+ };
1093
+ }
1094
+ }
1095
+
1096
+
1097
+ declare module '@tiptap/core' {
1098
+ interface Commands<ReturnType> {
1099
+ twitter: {
1100
+ /**
1101
+ * Insert a tweet
1102
+ * @param options The tweet attributes
1103
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1104
+ */
1105
+ setTweet: (options: SetTweetOptions) => ReturnType;
1106
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1107
+ };
1108
+ }
1109
+ }
1110
+
1111
+
1088
1112
  declare module '@tiptap/core' {
1089
1113
  interface Commands<ReturnType> {
1090
1114
  imageGifUpload: {
@@ -1107,8 +1131,9 @@ declare module '@tiptap/core' {
1107
1131
 
1108
1132
  declare module '@tiptap/core' {
1109
1133
  interface Commands<ReturnType> {
1110
- attachment: {
1111
- setAttachment: (attrs?: unknown) => ReturnType;
1134
+ drawer: {
1135
+ setDrawer: (options: any, replace?: any) => ReturnType;
1136
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1112
1137
  };
1113
1138
  }
1114
1139
  }
@@ -1122,28 +1147,3 @@ declare module '@tiptap/core' {
1122
1147
  };
1123
1148
  }
1124
1149
  }
1125
-
1126
-
1127
- declare module '@tiptap/core' {
1128
- interface Commands<ReturnType> {
1129
- twitter: {
1130
- /**
1131
- * Insert a tweet
1132
- * @param options The tweet attributes
1133
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1134
- */
1135
- setTweet: (options: SetTweetOptions) => ReturnType;
1136
- updateTweet: (options: SetTweetOptions) => ReturnType;
1137
- };
1138
- }
1139
- }
1140
-
1141
-
1142
- declare module '@tiptap/core' {
1143
- interface Commands<ReturnType> {
1144
- drawer: {
1145
- setDrawer: (options: any, replace?: any) => ReturnType;
1146
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => 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-BlV5SJJW.js";
1
+ import { a as e, b as l, l as o, e as _, c, d as h } from "./index-CO-iymkb.js";
2
2
  export {
3
3
  e as en,
4
4
  l as hu_HU,
@@ -1,5 +1,5 @@
1
1
  import Je from "tippy.js";
2
- import { E as Ye, a as Xe, P as H, b as I, S as Z, k as Qe, T as D, D as Ze, c as we, F as V, N as tn, d as xt, w as en, e as nn, f as rn, g as dt, h as tt, s as sn, i as Zt, j as on, l as an, m as ln, n as cn, o as dn, A as un, p as pn, q as hn, r as fn, t as mn, u as gn, v as yn, x as vn, y as Ee, z as bn, B as Mn, C as Sn, G as kn, H as wn, I as En, J as Tn, K as Ft, R as Cn, L as xn, M as An, O as On, Q as te, U as Ln, V as Te, W as _n, X as Pn, Y as Rn, Z as Hn, _ as $n, $ as pt, a0 as zt, a1 as In, a2 as Dn, a3 as Nn, a4 as Ce, a5 as Bn, a6 as ee, a7 as jn, a8 as ne, a9 as re, aa as Fn, ab as se, ac as zn, ad as Vn, ae as Wn, af as Kn, ag as Un, ah as qn, ai as Gn } from "./vendor-VlEklMUJ.js";
2
+ import { E as Ye, a as Xe, P as H, b as I, S as Z, k as Qe, T as D, D as Ze, c as we, F as V, N as tn, d as xt, w as en, e as nn, f as rn, g as dt, h as tt, s as sn, i as Zt, j as on, l as an, m as ln, n as cn, o as dn, A as un, p as pn, q as hn, r as fn, t as mn, u as gn, v as yn, x as vn, y as Ee, z as bn, B as Mn, C as Sn, G as kn, H as wn, I as En, J as Tn, K as Ft, R as Cn, L as xn, M as An, O as On, Q as te, U as Ln, V as Te, W as _n, X as Pn, Y as Rn, Z as Hn, _ as $n, $ as pt, a0 as zt, a1 as In, a2 as Dn, a3 as Nn, a4 as Ce, a5 as Bn, a6 as ee, a7 as jn, a8 as ne, a9 as re, aa as Fn, ab as se, ac as zn, ad as Vn, ae as Wn, af as Kn, ag as Un, ah as qn, ai as Gn } from "./vendor-BbgkyoD-.js";
3
3
  import L, { useRef as Jn, useState as Vt, useDebugValue as xe, useEffect as Wt, forwardRef as Yn, useLayoutEffect as Xn, useContext as Ae, createContext as Oe } from "react";
4
4
  import Qn, { flushSync as Zn } from "react-dom";
5
5
  function gt(e) {