reactjs-tiptap-editor-pro 0.2.38 → 0.2.40

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.
@@ -739,20 +739,6 @@ declare module '@tiptap/core' {
739
739
  }
740
740
 
741
741
 
742
- declare module '@tiptap/core' {
743
- interface Commands<ReturnType> {
744
- columns: {
745
- insertColumns: (attrs?: {
746
- cols: number;
747
- }) => ReturnType;
748
- addColBefore: () => ReturnType;
749
- addColAfter: () => ReturnType;
750
- deleteCol: () => ReturnType;
751
- };
752
- }
753
- }
754
-
755
-
756
742
  declare module '@tiptap/core' {
757
743
  interface Commands<ReturnType> {
758
744
  lineHeight: {
@@ -765,8 +751,9 @@ declare module '@tiptap/core' {
765
751
 
766
752
  declare module '@tiptap/core' {
767
753
  interface Commands<ReturnType> {
768
- painter: {
769
- setPainter: (marks: Mark[]) => ReturnType;
754
+ tableCellBackground: {
755
+ setTableCellBackground: (color: string) => ReturnType;
756
+ unsetTableCellBackground: () => ReturnType;
770
757
  };
771
758
  }
772
759
  }
@@ -787,6 +774,15 @@ declare module '@tiptap/core' {
787
774
  }
788
775
 
789
776
 
777
+ declare module '@tiptap/core' {
778
+ interface Commands<ReturnType> {
779
+ painter: {
780
+ setPainter: (marks: Mark[]) => ReturnType;
781
+ };
782
+ }
783
+ }
784
+
785
+
790
786
  declare module '@tiptap/core' {
791
787
  interface Commands<ReturnType> {
792
788
  imageUpload: {
@@ -807,6 +803,18 @@ declare module '@tiptap/core' {
807
803
  }
808
804
 
809
805
 
806
+ declare module '@tiptap/core' {
807
+ interface Commands<ReturnType> {
808
+ emoji: {
809
+ setEmoji: (emoji: {
810
+ name: string;
811
+ emoji: string;
812
+ }) => ReturnType;
813
+ };
814
+ }
815
+ }
816
+
817
+
810
818
  declare module '@tiptap/core' {
811
819
  interface Commands<ReturnType> {
812
820
  iframe: {
@@ -824,11 +832,9 @@ declare module '@tiptap/core' {
824
832
 
825
833
  declare module '@tiptap/core' {
826
834
  interface Commands<ReturnType> {
827
- emoji: {
828
- setEmoji: (emoji: {
829
- name: string;
830
- emoji: string;
831
- }) => ReturnType;
835
+ tableOfContents: {
836
+ setTableOfContents: () => ReturnType;
837
+ removeTableOfContents: () => ReturnType;
832
838
  };
833
839
  }
834
840
  }
@@ -836,9 +842,13 @@ declare module '@tiptap/core' {
836
842
 
837
843
  declare module '@tiptap/core' {
838
844
  interface Commands<ReturnType> {
839
- tableCellBackground: {
840
- setTableCellBackground: (color: string) => ReturnType;
841
- unsetTableCellBackground: () => ReturnType;
845
+ columns: {
846
+ insertColumns: (attrs?: {
847
+ cols: number;
848
+ }) => ReturnType;
849
+ addColBefore: () => ReturnType;
850
+ addColAfter: () => ReturnType;
851
+ deleteCol: () => ReturnType;
842
852
  };
843
853
  }
844
854
  }
@@ -853,16 +863,6 @@ declare module '@tiptap/core' {
853
863
  }
854
864
 
855
865
 
856
- declare module '@tiptap/core' {
857
- interface Commands<ReturnType> {
858
- tableOfContents: {
859
- setTableOfContents: () => ReturnType;
860
- removeTableOfContents: () => ReturnType;
861
- };
862
- }
863
- }
864
-
865
-
866
866
  declare module '@tiptap/core' {
867
867
  interface Commands<ReturnType> {
868
868
  exportWord: {
@@ -874,8 +874,19 @@ declare module '@tiptap/core' {
874
874
 
875
875
  declare module '@tiptap/core' {
876
876
  interface Commands<ReturnType> {
877
- attachment: {
878
- setAttachment: (attrs?: unknown) => ReturnType;
877
+ imageGifUpload: {
878
+ /**
879
+ * Add an image gif
880
+ */
881
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
882
+ /**
883
+ * Update an image gif
884
+ */
885
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
886
+ /**
887
+ * Set image alignment
888
+ */
889
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
879
890
  };
880
891
  }
881
892
  }
@@ -908,9 +919,8 @@ declare module '@tiptap/core' {
908
919
 
909
920
  declare module '@tiptap/core' {
910
921
  interface Commands<ReturnType> {
911
- drawer: {
912
- setDrawer: (options: any, replace?: any) => ReturnType;
913
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
922
+ attachment: {
923
+ setAttachment: (attrs?: unknown) => ReturnType;
914
924
  };
915
925
  }
916
926
  }
@@ -918,19 +928,9 @@ declare module '@tiptap/core' {
918
928
 
919
929
  declare module '@tiptap/core' {
920
930
  interface Commands<ReturnType> {
921
- imageGifUpload: {
922
- /**
923
- * Add an image gif
924
- */
925
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
926
- /**
927
- * Update an image gif
928
- */
929
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
930
- /**
931
- * Set image alignment
932
- */
933
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
931
+ drawer: {
932
+ setDrawer: (options: any, replace?: any) => ReturnType;
933
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
934
934
  };
935
935
  }
936
936
  }
@@ -739,20 +739,6 @@ declare module '@tiptap/core' {
739
739
  }
740
740
 
741
741
 
742
- declare module '@tiptap/core' {
743
- interface Commands<ReturnType> {
744
- columns: {
745
- insertColumns: (attrs?: {
746
- cols: number;
747
- }) => ReturnType;
748
- addColBefore: () => ReturnType;
749
- addColAfter: () => ReturnType;
750
- deleteCol: () => ReturnType;
751
- };
752
- }
753
- }
754
-
755
-
756
742
  declare module '@tiptap/core' {
757
743
  interface Commands<ReturnType> {
758
744
  lineHeight: {
@@ -765,8 +751,9 @@ declare module '@tiptap/core' {
765
751
 
766
752
  declare module '@tiptap/core' {
767
753
  interface Commands<ReturnType> {
768
- painter: {
769
- setPainter: (marks: Mark[]) => ReturnType;
754
+ tableCellBackground: {
755
+ setTableCellBackground: (color: string) => ReturnType;
756
+ unsetTableCellBackground: () => ReturnType;
770
757
  };
771
758
  }
772
759
  }
@@ -787,6 +774,15 @@ declare module '@tiptap/core' {
787
774
  }
788
775
 
789
776
 
777
+ declare module '@tiptap/core' {
778
+ interface Commands<ReturnType> {
779
+ painter: {
780
+ setPainter: (marks: Mark[]) => ReturnType;
781
+ };
782
+ }
783
+ }
784
+
785
+
790
786
  declare module '@tiptap/core' {
791
787
  interface Commands<ReturnType> {
792
788
  imageUpload: {
@@ -807,6 +803,18 @@ declare module '@tiptap/core' {
807
803
  }
808
804
 
809
805
 
806
+ declare module '@tiptap/core' {
807
+ interface Commands<ReturnType> {
808
+ emoji: {
809
+ setEmoji: (emoji: {
810
+ name: string;
811
+ emoji: string;
812
+ }) => ReturnType;
813
+ };
814
+ }
815
+ }
816
+
817
+
810
818
  declare module '@tiptap/core' {
811
819
  interface Commands<ReturnType> {
812
820
  iframe: {
@@ -824,11 +832,9 @@ declare module '@tiptap/core' {
824
832
 
825
833
  declare module '@tiptap/core' {
826
834
  interface Commands<ReturnType> {
827
- emoji: {
828
- setEmoji: (emoji: {
829
- name: string;
830
- emoji: string;
831
- }) => ReturnType;
835
+ tableOfContents: {
836
+ setTableOfContents: () => ReturnType;
837
+ removeTableOfContents: () => ReturnType;
832
838
  };
833
839
  }
834
840
  }
@@ -836,9 +842,13 @@ declare module '@tiptap/core' {
836
842
 
837
843
  declare module '@tiptap/core' {
838
844
  interface Commands<ReturnType> {
839
- tableCellBackground: {
840
- setTableCellBackground: (color: string) => ReturnType;
841
- unsetTableCellBackground: () => ReturnType;
845
+ columns: {
846
+ insertColumns: (attrs?: {
847
+ cols: number;
848
+ }) => ReturnType;
849
+ addColBefore: () => ReturnType;
850
+ addColAfter: () => ReturnType;
851
+ deleteCol: () => ReturnType;
842
852
  };
843
853
  }
844
854
  }
@@ -853,16 +863,6 @@ declare module '@tiptap/core' {
853
863
  }
854
864
 
855
865
 
856
- declare module '@tiptap/core' {
857
- interface Commands<ReturnType> {
858
- tableOfContents: {
859
- setTableOfContents: () => ReturnType;
860
- removeTableOfContents: () => ReturnType;
861
- };
862
- }
863
- }
864
-
865
-
866
866
  declare module '@tiptap/core' {
867
867
  interface Commands<ReturnType> {
868
868
  exportWord: {
@@ -874,8 +874,19 @@ declare module '@tiptap/core' {
874
874
 
875
875
  declare module '@tiptap/core' {
876
876
  interface Commands<ReturnType> {
877
- attachment: {
878
- setAttachment: (attrs?: unknown) => ReturnType;
877
+ imageGifUpload: {
878
+ /**
879
+ * Add an image gif
880
+ */
881
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
882
+ /**
883
+ * Update an image gif
884
+ */
885
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
886
+ /**
887
+ * Set image alignment
888
+ */
889
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
879
890
  };
880
891
  }
881
892
  }
@@ -908,9 +919,8 @@ declare module '@tiptap/core' {
908
919
 
909
920
  declare module '@tiptap/core' {
910
921
  interface Commands<ReturnType> {
911
- drawer: {
912
- setDrawer: (options: any, replace?: any) => ReturnType;
913
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
922
+ attachment: {
923
+ setAttachment: (attrs?: unknown) => ReturnType;
914
924
  };
915
925
  }
916
926
  }
@@ -918,19 +928,9 @@ declare module '@tiptap/core' {
918
928
 
919
929
  declare module '@tiptap/core' {
920
930
  interface Commands<ReturnType> {
921
- imageGifUpload: {
922
- /**
923
- * Add an image gif
924
- */
925
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
926
- /**
927
- * Update an image gif
928
- */
929
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
930
- /**
931
- * Set image alignment
932
- */
933
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
931
+ drawer: {
932
+ setDrawer: (options: any, replace?: any) => ReturnType;
933
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
934
934
  };
935
935
  }
936
936
  }
@@ -1,5 +1,5 @@
1
- import { Y as aa, Z as oa, B as _n, av as Xo, _ as sa, aw as $o, ax as Ct, ay as tn, az as An, aA as Fe, A as Ce, aB as $e, U as Ze, R as Ve, a9 as Jt, aC as Bo, Q as xi, aD as fi, aE as Et, aF as Pt, X as kn, $ as Fn, a0 as Sn, a1 as Hh, d as nt, aG as Vo, x as jh, aH as gi, aI as yt, W as st, aJ as Xh, aK as Ko, aL as Ne, aM as Zn, a2 as Fd, aN as Lo, aO as $h, aP as Go, P as Fi, q as Si, v as Bi, aQ as Zo, V as Vh, aR as Kh, aa as Gh, aS as jn, aT as Zh, aU as Yh, aV as Qh, aW as Jh, aX as ef, ae as tf, aY as nf, aZ as rf, a_ as af, a$ as Yo, b0 as of, b1 as sf, b2 as cf, b3 as uc, b4 as Sd, b5 as uf, b6 as df, b7 as lf, b8 as hf, ag as ff, b9 as gf, ba as dc, a7 as Oi, bb as pf, bc as mf, bd as xn, an as Mt, E as bf, be as yf, af as Df, bf as Qo, am as lc, L as Na, I as hc, bg as vf, bh as xf, bi as _f, bj as Qt, bk as wf, ah as Tf, as as Uf, bl as Ot, bm as Ef, bn as Af, bo as Cf, bp as kf, bq as Ff, br as Bd } from "./ColorPicker-BGCCdXrc.js";
2
- import { n as wy, w as Ty, G as Uy, K as Ey, M as Ay, bs as Cy, z as ky } from "./ColorPicker-BGCCdXrc.js";
1
+ import { Y as aa, Z as oa, B as _n, av as Xo, _ as sa, aw as $o, ax as Ct, ay as tn, az as An, aA as Fe, A as Ce, aB as $e, U as Ze, R as Ve, a9 as Jt, aC as Bo, Q as xi, aD as fi, aE as Et, aF as Pt, X as kn, $ as Fn, a0 as Sn, a1 as Hh, d as nt, aG as Vo, x as jh, aH as gi, aI as yt, W as st, aJ as Xh, aK as Ko, aL as Ne, aM as Zn, a2 as Fd, aN as Lo, aO as $h, aP as Go, P as Fi, q as Si, v as Bi, aQ as Zo, V as Vh, aR as Kh, aa as Gh, aS as jn, aT as Zh, aU as Yh, aV as Qh, aW as Jh, aX as ef, ae as tf, aY as nf, aZ as rf, a_ as af, a$ as Yo, b0 as of, b1 as sf, b2 as cf, b3 as uc, b4 as Sd, b5 as uf, b6 as df, b7 as lf, b8 as hf, ag as ff, b9 as gf, ba as dc, a7 as Oi, bb as pf, bc as mf, bd as xn, an as Mt, E as bf, be as yf, af as Df, bf as Qo, am as lc, L as Na, I as hc, bg as vf, bh as xf, bi as _f, bj as Qt, bk as wf, ah as Tf, as as Uf, bl as Ot, bm as Ef, bn as Af, bo as Cf, bp as kf, bq as Ff, br as Bd } from "./ColorPicker-DXWTenTy.js";
2
+ import { n as wy, w as Ty, G as Uy, K as Ey, M as Ay, bs as Cy, z as ky } from "./ColorPicker-DXWTenTy.js";
3
3
  import { bundledThemes as Ld, bundledLanguages as Nd, createHighlighter as Sf } from "shiki";
4
4
  import { jsxs as be, jsx as G, Fragment as ca } from "react/jsx-runtime";
5
5
  import * as Bn from "react";
@@ -5188,14 +5188,15 @@ const hy = Ne.create({
5188
5188
  editor: this.editor,
5189
5189
  char: "/",
5190
5190
  allowSpaces: !0,
5191
- startOfLine: !0,
5191
+ startOfLine: !1,
5192
+ allowedPrefixes: null,
5192
5193
  pluginKey: new Ve(mn),
5193
5194
  allow: ({ state: e, range: t }) => {
5194
- var u, d, f;
5195
- const n = e.doc.resolve(t.from), i = n.depth === 1, r = n.parent.type.name === "paragraph", a = ((u = n.parent.textContent) == null ? void 0 : u.charAt(0)) === "/", o = this.editor.isActive("column"), s = (f = n.parent.textContent) == null ? void 0 : f.slice(
5196
- Math.max(0, (d = n.parent.textContent) == null ? void 0 : d.indexOf("/"))
5197
- ), c = !(s != null && s.endsWith(" "));
5198
- return (i && r && a || o && r && a) && c;
5195
+ var a, o;
5196
+ const n = e.doc.resolve(t.from);
5197
+ return ((o = n.parent.textContent) == null ? void 0 : o.slice(
5198
+ Math.max(0, (a = n.parent.textContent) == null ? void 0 : a.indexOf("/"))
5199
+ )).endsWith("/");
5199
5200
  },
5200
5201
  command: ({ editor: e, range: t, props: n }) => {
5201
5202
  const { view: i } = e;