reactjs-tiptap-editor 0.4.0 → 0.4.1

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.
Files changed (118) hide show
  1. package/lib/Attachment.d.cts +46 -46
  2. package/lib/Attachment.d.ts +46 -46
  3. package/lib/BaseKit.d.cts +46 -46
  4. package/lib/BaseKit.d.ts +46 -46
  5. package/lib/Blockquote.d.cts +46 -46
  6. package/lib/Blockquote.d.ts +46 -46
  7. package/lib/Bold.d.cts +46 -46
  8. package/lib/Bold.d.ts +46 -46
  9. package/lib/BulletList.d.cts +46 -46
  10. package/lib/BulletList.d.ts +46 -46
  11. package/lib/Clear.d.cts +46 -46
  12. package/lib/Clear.d.ts +46 -46
  13. package/lib/Code.d.cts +46 -46
  14. package/lib/Code.d.ts +46 -46
  15. package/lib/CodeBlock.d.cts +46 -46
  16. package/lib/CodeBlock.d.ts +46 -46
  17. package/lib/CodeView.d.cts +46 -46
  18. package/lib/CodeView.d.ts +46 -46
  19. package/lib/Color.d.cts +46 -46
  20. package/lib/Color.d.ts +46 -46
  21. package/lib/Document.d.cts +46 -46
  22. package/lib/Document.d.ts +46 -46
  23. package/lib/Drawer.d.cts +46 -46
  24. package/lib/Drawer.d.ts +46 -46
  25. package/lib/Emoji.cjs +1 -1
  26. package/lib/Emoji.d.cts +46 -46
  27. package/lib/Emoji.d.ts +46 -46
  28. package/lib/Emoji.js +2 -2
  29. package/lib/Excalidraw.d.cts +46 -46
  30. package/lib/Excalidraw.d.ts +46 -46
  31. package/lib/ExportPdf.d.cts +46 -46
  32. package/lib/ExportPdf.d.ts +46 -46
  33. package/lib/ExportWord.d.cts +46 -46
  34. package/lib/ExportWord.d.ts +46 -46
  35. package/lib/FontFamily.d.cts +46 -46
  36. package/lib/FontFamily.d.ts +46 -46
  37. package/lib/FontSize.d.cts +46 -46
  38. package/lib/FontSize.d.ts +46 -46
  39. package/lib/FormatPainter.d.cts +46 -46
  40. package/lib/FormatPainter.d.ts +46 -46
  41. package/lib/Heading.d.cts +46 -46
  42. package/lib/Heading.d.ts +46 -46
  43. package/lib/Highlight.d.cts +46 -46
  44. package/lib/Highlight.d.ts +46 -46
  45. package/lib/History.d.cts +46 -46
  46. package/lib/History.d.ts +46 -46
  47. package/lib/HorizontalRule.d.cts +46 -46
  48. package/lib/HorizontalRule.d.ts +46 -46
  49. package/lib/Iframe.d.cts +46 -46
  50. package/lib/Iframe.d.ts +46 -46
  51. package/lib/Image.d.cts +46 -46
  52. package/lib/Image.d.ts +46 -46
  53. package/lib/ImageGif.d.cts +46 -46
  54. package/lib/ImageGif.d.ts +46 -46
  55. package/lib/ImportWord.d.cts +46 -46
  56. package/lib/ImportWord.d.ts +46 -46
  57. package/lib/Indent.d.cts +46 -46
  58. package/lib/Indent.d.ts +46 -46
  59. package/lib/Italic.d.cts +46 -46
  60. package/lib/Italic.d.ts +46 -46
  61. package/lib/Katex.d.cts +46 -46
  62. package/lib/Katex.d.ts +46 -46
  63. package/lib/LineHeight.d.cts +46 -46
  64. package/lib/LineHeight.d.ts +46 -46
  65. package/lib/Link.d.cts +46 -46
  66. package/lib/Link.d.ts +46 -46
  67. package/lib/ListItem.d.cts +46 -46
  68. package/lib/ListItem.d.ts +46 -46
  69. package/lib/Mention.d.cts +46 -46
  70. package/lib/Mention.d.ts +46 -46
  71. package/lib/Mermaid.d.cts +46 -46
  72. package/lib/Mermaid.d.ts +46 -46
  73. package/lib/MoreMark.d.cts +46 -46
  74. package/lib/MoreMark.d.ts +46 -46
  75. package/lib/MultiColumn.d.cts +46 -46
  76. package/lib/MultiColumn.d.ts +46 -46
  77. package/lib/OrderedList.d.cts +46 -46
  78. package/lib/OrderedList.d.ts +46 -46
  79. package/lib/SearchAndReplace.d.cts +46 -46
  80. package/lib/SearchAndReplace.d.ts +46 -46
  81. package/lib/Selection.d.cts +46 -46
  82. package/lib/Selection.d.ts +46 -46
  83. package/lib/SlashCommand.cjs +1 -1
  84. package/lib/SlashCommand.d.cts +46 -46
  85. package/lib/SlashCommand.d.ts +46 -46
  86. package/lib/SlashCommand.js +2 -2
  87. package/lib/Strike.d.cts +46 -46
  88. package/lib/Strike.d.ts +46 -46
  89. package/lib/SubAndSuperScript.d.cts +46 -46
  90. package/lib/SubAndSuperScript.d.ts +46 -46
  91. package/lib/Table.d.cts +46 -46
  92. package/lib/Table.d.ts +46 -46
  93. package/lib/TableOfContent.d.cts +46 -46
  94. package/lib/TableOfContent.d.ts +46 -46
  95. package/lib/TaskList.d.cts +46 -46
  96. package/lib/TaskList.d.ts +46 -46
  97. package/lib/TextAlign.d.cts +46 -46
  98. package/lib/TextAlign.d.ts +46 -46
  99. package/lib/TextBubble.d.cts +46 -46
  100. package/lib/TextBubble.d.ts +46 -46
  101. package/lib/TextDirection.d.cts +46 -46
  102. package/lib/TextDirection.d.ts +46 -46
  103. package/lib/TextUnderline.d.cts +46 -46
  104. package/lib/TextUnderline.d.ts +46 -46
  105. package/lib/TrailingNode.d.cts +46 -46
  106. package/lib/TrailingNode.d.ts +46 -46
  107. package/lib/Twitter.d.cts +46 -46
  108. package/lib/Twitter.d.ts +46 -46
  109. package/lib/Video.d.cts +46 -46
  110. package/lib/Video.d.ts +46 -46
  111. package/lib/bubble-extra.d.cts +46 -46
  112. package/lib/bubble-extra.d.ts +46 -46
  113. package/lib/index.d.cts +46 -46
  114. package/lib/index.d.ts +46 -46
  115. package/lib/locale-bundle.d.cts +46 -46
  116. package/lib/locale-bundle.d.ts +46 -46
  117. package/lib/style.css +1 -1
  118. package/package.json +1 -1
@@ -57,8 +57,9 @@ declare module '@tiptap/core' {
57
57
 
58
58
  declare module '@tiptap/core' {
59
59
  interface Commands<ReturnType> {
60
- excalidraw: {
61
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
60
+ drawer: {
61
+ setDrawer: (options: any, replace?: any) => ReturnType;
62
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
62
63
  };
63
64
  }
64
65
  }
@@ -66,9 +67,8 @@ declare module '@tiptap/core' {
66
67
 
67
68
  declare module '@tiptap/core' {
68
69
  interface Commands<ReturnType> {
69
- drawer: {
70
- setDrawer: (options: any, replace?: any) => ReturnType;
71
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
70
+ excalidraw: {
71
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
72
72
  };
73
73
  }
74
74
  }
@@ -92,15 +92,6 @@ declare module '@tiptap/core' {
92
92
  }
93
93
 
94
94
 
95
- declare module '@tiptap/core' {
96
- interface Commands<ReturnType> {
97
- painter: {
98
- setPainter: (marks: Mark[]) => ReturnType;
99
- };
100
- }
101
- }
102
-
103
-
104
95
  declare module '@tiptap/core' {
105
96
  interface Commands<ReturnType> {
106
97
  fontSize: {
@@ -119,6 +110,15 @@ declare module '@tiptap/core' {
119
110
  }
120
111
 
121
112
 
113
+ declare module '@tiptap/core' {
114
+ interface Commands<ReturnType> {
115
+ painter: {
116
+ setPainter: (marks: Mark[]) => ReturnType;
117
+ };
118
+ }
119
+ }
120
+
121
+
122
122
  declare module '@tiptap/core' {
123
123
  interface Commands<ReturnType> {
124
124
  iframe: {
@@ -154,6 +154,22 @@ declare module '@tiptap/core' {
154
154
  }
155
155
 
156
156
 
157
+ declare module '@tiptap/core' {
158
+ interface Commands<ReturnType> {
159
+ indent: {
160
+ /**
161
+ * Set the indent attribute
162
+ */
163
+ indent: () => ReturnType;
164
+ /**
165
+ * Set the outdent attribute
166
+ */
167
+ outdent: () => ReturnType;
168
+ };
169
+ }
170
+ }
171
+
172
+
157
173
  declare module '@tiptap/core' {
158
174
  interface Commands<ReturnType> {
159
175
  imageGifUpload: {
@@ -185,15 +201,9 @@ declare module '@tiptap/core' {
185
201
 
186
202
  declare module '@tiptap/core' {
187
203
  interface Commands<ReturnType> {
188
- indent: {
189
- /**
190
- * Set the indent attribute
191
- */
192
- indent: () => ReturnType;
193
- /**
194
- * Set the outdent attribute
195
- */
196
- outdent: () => ReturnType;
204
+ lineHeight: {
205
+ setLineHeight: (lineHeight: string) => ReturnType;
206
+ unsetLineHeight: () => ReturnType;
197
207
  };
198
208
  }
199
209
  }
@@ -201,9 +211,9 @@ declare module '@tiptap/core' {
201
211
 
202
212
  declare module '@tiptap/core' {
203
213
  interface Commands<ReturnType> {
204
- lineHeight: {
205
- setLineHeight: (lineHeight: string) => ReturnType;
206
- unsetLineHeight: () => ReturnType;
214
+ mermaid: {
215
+ setMermaid: (options: any, replace?: any) => ReturnType;
216
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
207
217
  };
208
218
  }
209
219
  }
@@ -223,26 +233,6 @@ declare module '@tiptap/core' {
223
233
  }
224
234
 
225
235
 
226
- declare module '@tiptap/core' {
227
- interface Commands<ReturnType> {
228
- mermaid: {
229
- setMermaid: (options: any, replace?: any) => ReturnType;
230
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
231
- };
232
- }
233
- }
234
-
235
-
236
- declare module '@tiptap/core' {
237
- interface Commands<ReturnType> {
238
- tableOfContents: {
239
- setTableOfContents: () => ReturnType;
240
- removeTableOfContents: () => ReturnType;
241
- };
242
- }
243
- }
244
-
245
-
246
236
  declare module '@tiptap/core' {
247
237
  interface Commands<ReturnType> {
248
238
  search: {
@@ -266,6 +256,16 @@ declare module '@tiptap/core' {
266
256
  }
267
257
 
268
258
 
259
+ declare module '@tiptap/core' {
260
+ interface Commands<ReturnType> {
261
+ tableOfContents: {
262
+ setTableOfContents: () => ReturnType;
263
+ removeTableOfContents: () => ReturnType;
264
+ };
265
+ }
266
+ }
267
+
268
+
269
269
  declare module '@tiptap/core' {
270
270
  interface Commands<ReturnType> {
271
271
  twitter: {
@@ -57,8 +57,9 @@ declare module '@tiptap/core' {
57
57
 
58
58
  declare module '@tiptap/core' {
59
59
  interface Commands<ReturnType> {
60
- excalidraw: {
61
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
60
+ drawer: {
61
+ setDrawer: (options: any, replace?: any) => ReturnType;
62
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
62
63
  };
63
64
  }
64
65
  }
@@ -66,9 +67,8 @@ declare module '@tiptap/core' {
66
67
 
67
68
  declare module '@tiptap/core' {
68
69
  interface Commands<ReturnType> {
69
- drawer: {
70
- setDrawer: (options: any, replace?: any) => ReturnType;
71
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
70
+ excalidraw: {
71
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
72
72
  };
73
73
  }
74
74
  }
@@ -92,15 +92,6 @@ declare module '@tiptap/core' {
92
92
  }
93
93
 
94
94
 
95
- declare module '@tiptap/core' {
96
- interface Commands<ReturnType> {
97
- painter: {
98
- setPainter: (marks: Mark[]) => ReturnType;
99
- };
100
- }
101
- }
102
-
103
-
104
95
  declare module '@tiptap/core' {
105
96
  interface Commands<ReturnType> {
106
97
  fontSize: {
@@ -119,6 +110,15 @@ declare module '@tiptap/core' {
119
110
  }
120
111
 
121
112
 
113
+ declare module '@tiptap/core' {
114
+ interface Commands<ReturnType> {
115
+ painter: {
116
+ setPainter: (marks: Mark[]) => ReturnType;
117
+ };
118
+ }
119
+ }
120
+
121
+
122
122
  declare module '@tiptap/core' {
123
123
  interface Commands<ReturnType> {
124
124
  iframe: {
@@ -154,6 +154,22 @@ declare module '@tiptap/core' {
154
154
  }
155
155
 
156
156
 
157
+ declare module '@tiptap/core' {
158
+ interface Commands<ReturnType> {
159
+ indent: {
160
+ /**
161
+ * Set the indent attribute
162
+ */
163
+ indent: () => ReturnType;
164
+ /**
165
+ * Set the outdent attribute
166
+ */
167
+ outdent: () => ReturnType;
168
+ };
169
+ }
170
+ }
171
+
172
+
157
173
  declare module '@tiptap/core' {
158
174
  interface Commands<ReturnType> {
159
175
  imageGifUpload: {
@@ -185,15 +201,9 @@ declare module '@tiptap/core' {
185
201
 
186
202
  declare module '@tiptap/core' {
187
203
  interface Commands<ReturnType> {
188
- indent: {
189
- /**
190
- * Set the indent attribute
191
- */
192
- indent: () => ReturnType;
193
- /**
194
- * Set the outdent attribute
195
- */
196
- outdent: () => ReturnType;
204
+ lineHeight: {
205
+ setLineHeight: (lineHeight: string) => ReturnType;
206
+ unsetLineHeight: () => ReturnType;
197
207
  };
198
208
  }
199
209
  }
@@ -201,9 +211,9 @@ declare module '@tiptap/core' {
201
211
 
202
212
  declare module '@tiptap/core' {
203
213
  interface Commands<ReturnType> {
204
- lineHeight: {
205
- setLineHeight: (lineHeight: string) => ReturnType;
206
- unsetLineHeight: () => ReturnType;
214
+ mermaid: {
215
+ setMermaid: (options: any, replace?: any) => ReturnType;
216
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
207
217
  };
208
218
  }
209
219
  }
@@ -223,26 +233,6 @@ declare module '@tiptap/core' {
223
233
  }
224
234
 
225
235
 
226
- declare module '@tiptap/core' {
227
- interface Commands<ReturnType> {
228
- mermaid: {
229
- setMermaid: (options: any, replace?: any) => ReturnType;
230
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
231
- };
232
- }
233
- }
234
-
235
-
236
- declare module '@tiptap/core' {
237
- interface Commands<ReturnType> {
238
- tableOfContents: {
239
- setTableOfContents: () => ReturnType;
240
- removeTableOfContents: () => ReturnType;
241
- };
242
- }
243
- }
244
-
245
-
246
236
  declare module '@tiptap/core' {
247
237
  interface Commands<ReturnType> {
248
238
  search: {
@@ -266,6 +256,16 @@ declare module '@tiptap/core' {
266
256
  }
267
257
 
268
258
 
259
+ declare module '@tiptap/core' {
260
+ interface Commands<ReturnType> {
261
+ tableOfContents: {
262
+ setTableOfContents: () => ReturnType;
263
+ removeTableOfContents: () => ReturnType;
264
+ };
265
+ }
266
+ }
267
+
268
+
269
269
  declare module '@tiptap/core' {
270
270
  interface Commands<ReturnType> {
271
271
  twitter: {
@@ -39,8 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- excalidraw: {
43
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
45
  };
45
46
  }
46
47
  }
@@ -48,9 +49,8 @@ declare module '@tiptap/core' {
48
49
 
49
50
  declare module '@tiptap/core' {
50
51
  interface Commands<ReturnType> {
51
- drawer: {
52
- setDrawer: (options: any, replace?: any) => ReturnType;
53
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ excalidraw: {
53
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
54
54
  };
55
55
  }
56
56
  }
@@ -74,15 +74,6 @@ declare module '@tiptap/core' {
74
74
  }
75
75
 
76
76
 
77
- declare module '@tiptap/core' {
78
- interface Commands<ReturnType> {
79
- painter: {
80
- setPainter: (marks: Mark[]) => ReturnType;
81
- };
82
- }
83
- }
84
-
85
-
86
77
  declare module '@tiptap/core' {
87
78
  interface Commands<ReturnType> {
88
79
  fontSize: {
@@ -101,6 +92,15 @@ declare module '@tiptap/core' {
101
92
  }
102
93
 
103
94
 
95
+ declare module '@tiptap/core' {
96
+ interface Commands<ReturnType> {
97
+ painter: {
98
+ setPainter: (marks: Mark[]) => ReturnType;
99
+ };
100
+ }
101
+ }
102
+
103
+
104
104
  declare module '@tiptap/core' {
105
105
  interface Commands<ReturnType> {
106
106
  iframe: {
@@ -136,6 +136,22 @@ declare module '@tiptap/core' {
136
136
  }
137
137
 
138
138
 
139
+ declare module '@tiptap/core' {
140
+ interface Commands<ReturnType> {
141
+ indent: {
142
+ /**
143
+ * Set the indent attribute
144
+ */
145
+ indent: () => ReturnType;
146
+ /**
147
+ * Set the outdent attribute
148
+ */
149
+ outdent: () => ReturnType;
150
+ };
151
+ }
152
+ }
153
+
154
+
139
155
  declare module '@tiptap/core' {
140
156
  interface Commands<ReturnType> {
141
157
  imageGifUpload: {
@@ -167,15 +183,9 @@ declare module '@tiptap/core' {
167
183
 
168
184
  declare module '@tiptap/core' {
169
185
  interface Commands<ReturnType> {
170
- indent: {
171
- /**
172
- * Set the indent attribute
173
- */
174
- indent: () => ReturnType;
175
- /**
176
- * Set the outdent attribute
177
- */
178
- outdent: () => ReturnType;
186
+ lineHeight: {
187
+ setLineHeight: (lineHeight: string) => ReturnType;
188
+ unsetLineHeight: () => ReturnType;
179
189
  };
180
190
  }
181
191
  }
@@ -183,9 +193,9 @@ declare module '@tiptap/core' {
183
193
 
184
194
  declare module '@tiptap/core' {
185
195
  interface Commands<ReturnType> {
186
- lineHeight: {
187
- setLineHeight: (lineHeight: string) => ReturnType;
188
- unsetLineHeight: () => ReturnType;
196
+ mermaid: {
197
+ setMermaid: (options: any, replace?: any) => ReturnType;
198
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
189
199
  };
190
200
  }
191
201
  }
@@ -205,26 +215,6 @@ declare module '@tiptap/core' {
205
215
  }
206
216
 
207
217
 
208
- declare module '@tiptap/core' {
209
- interface Commands<ReturnType> {
210
- mermaid: {
211
- setMermaid: (options: any, replace?: any) => ReturnType;
212
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
213
- };
214
- }
215
- }
216
-
217
-
218
- declare module '@tiptap/core' {
219
- interface Commands<ReturnType> {
220
- tableOfContents: {
221
- setTableOfContents: () => ReturnType;
222
- removeTableOfContents: () => ReturnType;
223
- };
224
- }
225
- }
226
-
227
-
228
218
  declare module '@tiptap/core' {
229
219
  interface Commands<ReturnType> {
230
220
  search: {
@@ -248,6 +238,16 @@ declare module '@tiptap/core' {
248
238
  }
249
239
 
250
240
 
241
+ declare module '@tiptap/core' {
242
+ interface Commands<ReturnType> {
243
+ tableOfContents: {
244
+ setTableOfContents: () => ReturnType;
245
+ removeTableOfContents: () => ReturnType;
246
+ };
247
+ }
248
+ }
249
+
250
+
251
251
  declare module '@tiptap/core' {
252
252
  interface Commands<ReturnType> {
253
253
  twitter: {
@@ -39,8 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- excalidraw: {
43
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
45
  };
45
46
  }
46
47
  }
@@ -48,9 +49,8 @@ declare module '@tiptap/core' {
48
49
 
49
50
  declare module '@tiptap/core' {
50
51
  interface Commands<ReturnType> {
51
- drawer: {
52
- setDrawer: (options: any, replace?: any) => ReturnType;
53
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ excalidraw: {
53
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
54
54
  };
55
55
  }
56
56
  }
@@ -74,15 +74,6 @@ declare module '@tiptap/core' {
74
74
  }
75
75
 
76
76
 
77
- declare module '@tiptap/core' {
78
- interface Commands<ReturnType> {
79
- painter: {
80
- setPainter: (marks: Mark[]) => ReturnType;
81
- };
82
- }
83
- }
84
-
85
-
86
77
  declare module '@tiptap/core' {
87
78
  interface Commands<ReturnType> {
88
79
  fontSize: {
@@ -101,6 +92,15 @@ declare module '@tiptap/core' {
101
92
  }
102
93
 
103
94
 
95
+ declare module '@tiptap/core' {
96
+ interface Commands<ReturnType> {
97
+ painter: {
98
+ setPainter: (marks: Mark[]) => ReturnType;
99
+ };
100
+ }
101
+ }
102
+
103
+
104
104
  declare module '@tiptap/core' {
105
105
  interface Commands<ReturnType> {
106
106
  iframe: {
@@ -136,6 +136,22 @@ declare module '@tiptap/core' {
136
136
  }
137
137
 
138
138
 
139
+ declare module '@tiptap/core' {
140
+ interface Commands<ReturnType> {
141
+ indent: {
142
+ /**
143
+ * Set the indent attribute
144
+ */
145
+ indent: () => ReturnType;
146
+ /**
147
+ * Set the outdent attribute
148
+ */
149
+ outdent: () => ReturnType;
150
+ };
151
+ }
152
+ }
153
+
154
+
139
155
  declare module '@tiptap/core' {
140
156
  interface Commands<ReturnType> {
141
157
  imageGifUpload: {
@@ -167,15 +183,9 @@ declare module '@tiptap/core' {
167
183
 
168
184
  declare module '@tiptap/core' {
169
185
  interface Commands<ReturnType> {
170
- indent: {
171
- /**
172
- * Set the indent attribute
173
- */
174
- indent: () => ReturnType;
175
- /**
176
- * Set the outdent attribute
177
- */
178
- outdent: () => ReturnType;
186
+ lineHeight: {
187
+ setLineHeight: (lineHeight: string) => ReturnType;
188
+ unsetLineHeight: () => ReturnType;
179
189
  };
180
190
  }
181
191
  }
@@ -183,9 +193,9 @@ declare module '@tiptap/core' {
183
193
 
184
194
  declare module '@tiptap/core' {
185
195
  interface Commands<ReturnType> {
186
- lineHeight: {
187
- setLineHeight: (lineHeight: string) => ReturnType;
188
- unsetLineHeight: () => ReturnType;
196
+ mermaid: {
197
+ setMermaid: (options: any, replace?: any) => ReturnType;
198
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
189
199
  };
190
200
  }
191
201
  }
@@ -205,26 +215,6 @@ declare module '@tiptap/core' {
205
215
  }
206
216
 
207
217
 
208
- declare module '@tiptap/core' {
209
- interface Commands<ReturnType> {
210
- mermaid: {
211
- setMermaid: (options: any, replace?: any) => ReturnType;
212
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
213
- };
214
- }
215
- }
216
-
217
-
218
- declare module '@tiptap/core' {
219
- interface Commands<ReturnType> {
220
- tableOfContents: {
221
- setTableOfContents: () => ReturnType;
222
- removeTableOfContents: () => ReturnType;
223
- };
224
- }
225
- }
226
-
227
-
228
218
  declare module '@tiptap/core' {
229
219
  interface Commands<ReturnType> {
230
220
  search: {
@@ -248,6 +238,16 @@ declare module '@tiptap/core' {
248
238
  }
249
239
 
250
240
 
241
+ declare module '@tiptap/core' {
242
+ interface Commands<ReturnType> {
243
+ tableOfContents: {
244
+ setTableOfContents: () => ReturnType;
245
+ removeTableOfContents: () => ReturnType;
246
+ };
247
+ }
248
+ }
249
+
250
+
251
251
  declare module '@tiptap/core' {
252
252
  interface Commands<ReturnType> {
253
253
  twitter: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("./dom-dataset-_6-diIRQ.cjs"),N=require("./index-DF2Lp4HZ.cjs"),H=require("./index-DpCrt7xs.cjs"),u=require("react/jsx-runtime"),f=require("react"),g=require("./RichTextEditor-CxvwGvQG.cjs"),d=require("./index-6D1J-A-o.cjs");function $(t,r){var k,L;const[n,i]=f.useState(0),[e,o]=f.useState(0),l=f.useRef(null),{t:m}=d.useLocale(),x=f.useRef([]);f.useImperativeHandle(r,()=>({onKeyDown:h})),f.useEffect(()=>{if(!l.current)return;const s=e*1e3+n,a=x.current[s];a&&a.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,e]);function h({event:s}){return s.key==="ArrowUp"?(b(),!0):s.key==="ArrowDown"?(w(),!0):s.key==="Enter"?(p(),!0):!1}function b(){var c;if(t.items.length===0)return!1;let s=n-1,a=e;s<0&&(a=e-1,s=((c=t.items[a])==null?void 0:c.commands.length)-1||0),a<0&&(a=t.items.length-1,s=t.items[a].commands.length-1),i(s),o(a)}function w(){if(t.items.length===0)return!1;const s=t.items[e].commands;let a=n+1,c=e;s.length-1<a&&(a=0,c=e+1),t.items.length-1<c&&(c=0),i(a),o(c)}function p(){if(t.items.length===0||e===-1||n===-1)return!1;C(e,n)}function C(s,a){const c=t.items[s].commands[a];t.command(c),t!=null&&t.onClose&&(t==null||t.onClose())}function I(s,a){C(s,a)}function E(s,a,c){x.current[s*1e3+a]=c}return u.jsx("div",{className:"richtext-mb-8 richtext-max-h-[min(80vh,24rem)] richtext-flex-wrap richtext-overflow-auto richtext-rounded-lg !richtext-border !richtext-border-neutral-200 !richtext-bg-white richtext-p-1 !richtext-text-black richtext-shadow-sm dark:!richtext-border-neutral-800 dark:!richtext-bg-black",ref:l,children:(k=t==null?void 0:t.items)!=null&&k.length?u.jsx("div",{className:"richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5",children:(L=t==null?void 0:t.items)==null?void 0:L.map((s,a)=>u.jsxs(f.Fragment,{children:[u.jsx("div",{className:"richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-select-none richtext-text-[0.65rem] richtext-font-semibold richtext-uppercase richtext-tracking-wider !richtext-text-neutral-500 first:richtext-mt-0.5",children:s.title}),s.commands.map((c,y)=>u.jsxs("button",{onClick:()=>I(a,y),ref:S=>E(a,y,S),className:g.cn("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ",{"slash-command-active":e===a&&n===y}),children:[c.iconUrl&&u.jsx("img",{alt:"",className:"richtext-size-6",src:c.iconUrl}),c.iconName&&u.jsx(g.IconComponent,{className:"!richtext-mr-1 !richtext-text-lg",name:c.iconName}),c.label]},`command-${y}`))]},`slash-${s.title}`))}):u.jsx("div",{className:"richtext-p-3",children:u.jsx("span",{className:"richtext-text-xs richtext-text-gray-800 dark:richtext-text-gray-100",children:m("editor.slash.empty")})})})}const j=f.forwardRef($),q={setOpen:(t,r)=>{g.dispatchEvent(g.EVENTS.UPLOAD_VIDEO(t),r)}};function O(t,r){const n=[{name:"format",title:d.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:d.localeActions.t("editor.slash.insert"),commands:[]}];return t.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(e=>{n[0].commands.push({name:`heading${e}`,label:d.localeActions.t(`editor.heading.h${e}.tooltip`),aliases:[`h${e}`,"bt",`bt${e}`],iconName:`Heading${e}`,action:({editor:o,range:l})=>{o.chain().focus().deleteRange(l).setHeading({level:e}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:d.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:d.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:d.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:d.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:d.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setCodeBlock().run()}}),i.name.toLowerCase()===g.Image.name&&n[1].commands.push({name:"image",label:d.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),g.actionDialogImage.setOpen(e.id,!0)}}),i.name.toLowerCase()===g.Video.name&&n[1].commands.push({name:"video",label:d.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),q.setOpen(e.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:d.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:d.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:d.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:e})=>{e.chain().focus().insertColumns({cols:2}).run()}}),r==null||r(i,n)}),n}const R="slashCommand",A=N.Extension.create({name:R,priority:200,addProseMirrorPlugins(){return[H.Suggestion({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new N.PluginKey(R),allow:({state:t,range:r})=>{var h,b,w;const n=t.doc.resolve(r.from),i=n.depth===1,e=n.parent.type.name==="paragraph",o=((h=n.parent.textContent)==null?void 0:h.charAt(0))==="/",l=this.editor.isActive("column"),m=(w=n.parent.textContent)==null?void 0:w.slice(Math.max(0,(b=n.parent.textContent)==null?void 0:b.indexOf("/"))),x=!(m!=null&&m.endsWith(" "));return(i&&e&&o||l&&e&&o)&&x},command:({editor:t,range:r,props:n})=>{const{view:i}=t;n.action({editor:t,range:r}),i.focus()},items:({query:t,editor:r})=>O(r.extensionManager.extensions,this.options.renderGroupItem).map(l=>({...l,commands:l.commands.filter(m=>{const x=m.label.toLowerCase().trim(),h=t.toLowerCase().trim();if(m.aliases){const b=m.aliases.map(C=>C.toLowerCase().trim()),w=x.match(h),p=b.some(C=>C.match(h));return w||p}return x.match(h)}).filter(m=>m.shouldBeHidden?!m.shouldBeHidden(this.editor):!0)})).filter(l=>l.commands.length>0).map(l=>({...l,commands:l.commands.map(m=>({...m,isEnabled:!0}))})),render:()=>{let t;function r(i){if(!t||!t.element)return;const e={getBoundingClientRect(){return i}};v.computePosition(e,t.element,{placement:"bottom-start"}).then(o=>{Object.assign(t.element.style,{left:`${o.x}px`,top:`${o.y}px`,position:o.strategy==="fixed"?"fixed":"absolute"})})}const n=()=>{t&&(document.body.contains(t.element)&&document.body.removeChild(t.element),t.destroy())};return{onStart:i=>{n(),t=new v.ReactRenderer(j,{props:{...i,onClose:n},editor:i.editor}),document.body.appendChild(t.element),r(i.clientRect())},onUpdate(i){t.updateProps(i),r(i.clientRect())},onKeyDown(i){var e;return i.event.key==="Escape"?(document.body.removeChild(t.element),t.destroy(),!0):(e=t.ref)==null?void 0:e.onKeyDown(i)}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}});exports.SlashCommand=A;exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("./dom-dataset-_6-diIRQ.cjs"),N=require("./index-DF2Lp4HZ.cjs"),H=require("./index-DpCrt7xs.cjs"),u=require("react/jsx-runtime"),f=require("react"),g=require("./RichTextEditor-CxvwGvQG.cjs"),d=require("./index-6D1J-A-o.cjs");function $(t,r){var k,L;const[n,i]=f.useState(0),[e,o]=f.useState(0),l=f.useRef(null),{t:m}=d.useLocale(),x=f.useRef([]);f.useImperativeHandle(r,()=>({onKeyDown:h})),f.useEffect(()=>{if(!l.current)return;const s=e*1e3+n,a=x.current[s];a&&a.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,e]);function h({event:s}){return s.key==="ArrowUp"?(b(),!0):s.key==="ArrowDown"?(w(),!0):s.key==="Enter"?(p(),!0):!1}function b(){var c;if(t.items.length===0)return!1;let s=n-1,a=e;s<0&&(a=e-1,s=((c=t.items[a])==null?void 0:c.commands.length)-1||0),a<0&&(a=t.items.length-1,s=t.items[a].commands.length-1),i(s),o(a)}function w(){if(t.items.length===0)return!1;const s=t.items[e].commands;let a=n+1,c=e;s.length-1<a&&(a=0,c=e+1),t.items.length-1<c&&(c=0),i(a),o(c)}function p(){if(t.items.length===0||e===-1||n===-1)return!1;C(e,n)}function C(s,a){const c=t.items[s].commands[a];t.command(c),t!=null&&t.onClose&&(t==null||t.onClose())}function I(s,a){C(s,a)}function E(s,a,c){x.current[s*1e3+a]=c}return u.jsx("div",{className:"richtext-max-h-[min(80vh,24rem)] richtext-flex-wrap richtext-overflow-auto richtext-rounded-lg !richtext-border !richtext-border-neutral-200 !richtext-bg-white richtext-p-1 !richtext-text-black richtext-shadow-sm dark:!richtext-border-neutral-800 dark:!richtext-bg-black",ref:l,children:(k=t==null?void 0:t.items)!=null&&k.length?u.jsx("div",{className:"richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5",children:(L=t==null?void 0:t.items)==null?void 0:L.map((s,a)=>u.jsxs(f.Fragment,{children:[u.jsx("div",{className:"richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-select-none richtext-text-[0.65rem] richtext-font-semibold richtext-uppercase richtext-tracking-wider !richtext-text-neutral-500 first:richtext-mt-0.5",children:s.title}),s.commands.map((c,y)=>u.jsxs("button",{onClick:()=>I(a,y),ref:S=>E(a,y,S),className:g.cn("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm !richtext-outline-none !richtext-border-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ",{"slash-command-active":e===a&&n===y}),children:[c.iconUrl&&u.jsx("img",{alt:"",className:"richtext-size-6",src:c.iconUrl}),c.iconName&&u.jsx(g.IconComponent,{className:"!richtext-mr-1 !richtext-text-lg",name:c.iconName}),c.label]},`command-${y}`))]},`slash-${s.title}`))}):u.jsx("div",{className:"richtext-p-3",children:u.jsx("span",{className:"richtext-text-xs richtext-text-gray-800 dark:richtext-text-gray-100",children:m("editor.slash.empty")})})})}const j=f.forwardRef($),q={setOpen:(t,r)=>{g.dispatchEvent(g.EVENTS.UPLOAD_VIDEO(t),r)}};function O(t,r){const n=[{name:"format",title:d.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:d.localeActions.t("editor.slash.insert"),commands:[]}];return t.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(e=>{n[0].commands.push({name:`heading${e}`,label:d.localeActions.t(`editor.heading.h${e}.tooltip`),aliases:[`h${e}`,"bt",`bt${e}`],iconName:`Heading${e}`,action:({editor:o,range:l})=>{o.chain().focus().deleteRange(l).setHeading({level:e}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:d.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:d.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:d.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:d.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:d.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setCodeBlock().run()}}),i.name.toLowerCase()===g.Image.name&&n[1].commands.push({name:"image",label:d.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),g.actionDialogImage.setOpen(e.id,!0)}}),i.name.toLowerCase()===g.Video.name&&n[1].commands.push({name:"video",label:d.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).run(),q.setOpen(e.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:d.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:e=>e.isActive("columns"),action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:d.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:d.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:e})=>{e.chain().focus().insertColumns({cols:2}).run()}}),r==null||r(i,n)}),n}const R="slashCommand",A=N.Extension.create({name:R,priority:200,addProseMirrorPlugins(){return[H.Suggestion({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new N.PluginKey(R),allow:({state:t,range:r})=>{var h,b,w;const n=t.doc.resolve(r.from),i=n.depth===1,e=n.parent.type.name==="paragraph",o=((h=n.parent.textContent)==null?void 0:h.charAt(0))==="/",l=this.editor.isActive("column"),m=(w=n.parent.textContent)==null?void 0:w.slice(Math.max(0,(b=n.parent.textContent)==null?void 0:b.indexOf("/"))),x=!(m!=null&&m.endsWith(" "));return(i&&e&&o||l&&e&&o)&&x},command:({editor:t,range:r,props:n})=>{const{view:i}=t;n.action({editor:t,range:r}),i.focus()},items:({query:t,editor:r})=>O(r.extensionManager.extensions,this.options.renderGroupItem).map(l=>({...l,commands:l.commands.filter(m=>{const x=m.label.toLowerCase().trim(),h=t.toLowerCase().trim();if(m.aliases){const b=m.aliases.map(C=>C.toLowerCase().trim()),w=x.match(h),p=b.some(C=>C.match(h));return w||p}return x.match(h)}).filter(m=>m.shouldBeHidden?!m.shouldBeHidden(this.editor):!0)})).filter(l=>l.commands.length>0).map(l=>({...l,commands:l.commands.map(m=>({...m,isEnabled:!0}))})),render:()=>{let t;function r(i){if(!t||!t.element)return;const e={getBoundingClientRect(){return i}};v.computePosition(e,t.element,{placement:"bottom-start"}).then(o=>{Object.assign(t.element.style,{left:`${o.x}px`,top:`${o.y}px`,position:o.strategy==="fixed"?"fixed":"absolute"})})}const n=()=>{t&&(document.body.contains(t.element)&&document.body.removeChild(t.element),t.destroy())};return{onStart:i=>{n(),t=new v.ReactRenderer(j,{props:{...i,onClose:n},editor:i.editor}),document.body.appendChild(t.element),r(i.clientRect())},onUpdate(i){t.updateProps(i),r(i.clientRect())},onKeyDown(i){var e;return i.event.key==="Escape"?(document.body.removeChild(t.element),t.destroy(),!0):(e=t.ref)==null?void 0:e.onKeyDown(i)}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}});exports.SlashCommand=A;exports.default=A;