reactjs-tiptap-editor-pro 0.2.36 → 0.2.37

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.cts CHANGED
@@ -10,7 +10,9 @@ import { RefAttributes } from 'react';
10
10
  import { TooltipContentProps } from '@radix-ui/react-tooltip';
11
11
  import { UseEditorOptions } from '@tiptap/react';
12
12
 
13
- declare interface ActionButtonProps {
13
+ export declare const ActionButton: default_2.ForwardRefExoticComponent<Partial<ActionButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export declare interface ActionButtonProps {
14
16
  icon?: string;
15
17
  title?: string;
16
18
  tooltip?: string;
@@ -288,27 +290,19 @@ declare module '@tiptap/core' {
288
290
 
289
291
  declare module '@tiptap/core' {
290
292
  interface Commands<ReturnType> {
291
- fontSize: {
293
+ imageUpload: {
292
294
  /**
293
- * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
294
- * CSS font-size
295
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
295
+ * Add an image
296
296
  */
297
- setFontSize: (fontSize: string) => ReturnType;
297
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
298
298
  /**
299
- * Unset the font size
299
+ * Update an image
300
300
  */
301
- unsetFontSize: () => ReturnType;
302
- };
303
- }
304
- }
305
-
306
-
307
- declare module '@tiptap/core' {
308
- interface Commands<ReturnType> {
309
- lineHeight: {
310
- setLineHeight: (lineHeight: string) => ReturnType;
311
- unsetLineHeight: () => ReturnType;
301
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
302
+ /**
303
+ * Set image alignment
304
+ */
305
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
312
306
  };
313
307
  }
314
308
  }
@@ -331,29 +325,15 @@ declare module '@tiptap/core' {
331
325
 
332
326
  declare module '@tiptap/core' {
333
327
  interface Commands<ReturnType> {
334
- tableCellBackground: {
335
- setTableCellBackground: (color: string) => ReturnType;
336
- unsetTableCellBackground: () => ReturnType;
337
- };
338
- }
339
- }
340
-
341
-
342
- declare module '@tiptap/core' {
343
- interface Commands<ReturnType> {
344
- imageUpload: {
345
- /**
346
- * Add an image
347
- */
348
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
328
+ indent: {
349
329
  /**
350
- * Update an image
330
+ * Set the indent attribute
351
331
  */
352
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
332
+ indent: () => ReturnType;
353
333
  /**
354
- * Set image alignment
334
+ * Set the outdent attribute
355
335
  */
356
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
336
+ outdent: () => ReturnType;
357
337
  };
358
338
  }
359
339
  }
@@ -361,8 +341,9 @@ declare module '@tiptap/core' {
361
341
 
362
342
  declare module '@tiptap/core' {
363
343
  interface Commands<ReturnType> {
364
- katex: {
365
- setKatex: (arg?: IKatexAttrs) => ReturnType;
344
+ lineHeight: {
345
+ setLineHeight: (lineHeight: string) => ReturnType;
346
+ unsetLineHeight: () => ReturnType;
366
347
  };
367
348
  }
368
349
  }
@@ -370,13 +351,11 @@ declare module '@tiptap/core' {
370
351
 
371
352
  declare module '@tiptap/core' {
372
353
  interface Commands<ReturnType> {
373
- columns: {
374
- insertColumns: (attrs?: {
375
- cols: number;
354
+ emoji: {
355
+ setEmoji: (emoji: {
356
+ name: string;
357
+ emoji: string;
376
358
  }) => ReturnType;
377
- addColBefore: () => ReturnType;
378
- addColAfter: () => ReturnType;
379
- deleteCol: () => ReturnType;
380
359
  };
381
360
  }
382
361
  }
@@ -384,15 +363,17 @@ declare module '@tiptap/core' {
384
363
 
385
364
  declare module '@tiptap/core' {
386
365
  interface Commands<ReturnType> {
387
- indent: {
366
+ fontSize: {
388
367
  /**
389
- * Set the indent attribute
368
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
369
+ * CSS font-size
370
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
390
371
  */
391
- indent: () => ReturnType;
372
+ setFontSize: (fontSize: string) => ReturnType;
392
373
  /**
393
- * Set the outdent attribute
374
+ * Unset the font size
394
375
  */
395
- outdent: () => ReturnType;
376
+ unsetFontSize: () => ReturnType;
396
377
  };
397
378
  }
398
379
  }
@@ -400,8 +381,9 @@ declare module '@tiptap/core' {
400
381
 
401
382
  declare module '@tiptap/core' {
402
383
  interface Commands<ReturnType> {
403
- exportWord: {
404
- exportToWord: () => ReturnType;
384
+ tableCellBackground: {
385
+ setTableCellBackground: (color: string) => ReturnType;
386
+ unsetTableCellBackground: () => ReturnType;
405
387
  };
406
388
  }
407
389
  }
@@ -409,11 +391,18 @@ declare module '@tiptap/core' {
409
391
 
410
392
  declare module '@tiptap/core' {
411
393
  interface Commands<ReturnType> {
412
- emoji: {
413
- setEmoji: (emoji: {
414
- name: string;
415
- emoji: string;
416
- }) => ReturnType;
394
+ tableOfContents: {
395
+ setTableOfContents: () => ReturnType;
396
+ removeTableOfContents: () => ReturnType;
397
+ };
398
+ }
399
+ }
400
+
401
+
402
+ declare module '@tiptap/core' {
403
+ interface Commands<ReturnType> {
404
+ exportWord: {
405
+ exportToWord: () => ReturnType;
417
406
  };
418
407
  }
419
408
  }
@@ -445,19 +434,13 @@ declare module '@tiptap/core' {
445
434
 
446
435
  declare module '@tiptap/core' {
447
436
  interface Commands<ReturnType> {
448
- tableOfContents: {
449
- setTableOfContents: () => ReturnType;
450
- removeTableOfContents: () => ReturnType;
451
- };
452
- }
453
- }
454
-
455
-
456
- declare module '@tiptap/core' {
457
- interface Commands<ReturnType> {
458
- mermaid: {
459
- setMermaid: (options: any, replace?: any) => ReturnType;
460
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
437
+ columns: {
438
+ insertColumns: (attrs?: {
439
+ cols: number;
440
+ }) => ReturnType;
441
+ addColBefore: () => ReturnType;
442
+ addColAfter: () => ReturnType;
443
+ deleteCol: () => ReturnType;
461
444
  };
462
445
  }
463
446
  }
@@ -465,9 +448,8 @@ declare module '@tiptap/core' {
465
448
 
466
449
  declare module '@tiptap/core' {
467
450
  interface Commands<ReturnType> {
468
- drawer: {
469
- setDrawer: (options: any, replace?: any) => ReturnType;
470
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
451
+ katex: {
452
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
471
453
  };
472
454
  }
473
455
  }
@@ -475,14 +457,9 @@ declare module '@tiptap/core' {
475
457
 
476
458
  declare module '@tiptap/core' {
477
459
  interface Commands<ReturnType> {
478
- twitter: {
479
- /**
480
- * Insert a tweet
481
- * @param options The tweet attributes
482
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
483
- */
484
- setTweet: (options: SetTweetOptions) => ReturnType;
485
- updateTweet: (options: SetTweetOptions) => ReturnType;
460
+ mermaid: {
461
+ setMermaid: (options: any, replace?: any) => ReturnType;
462
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
486
463
  };
487
464
  }
488
465
  }
@@ -515,3 +492,28 @@ declare module '@tiptap/core' {
515
492
  };
516
493
  }
517
494
  }
495
+
496
+
497
+ declare module '@tiptap/core' {
498
+ interface Commands<ReturnType> {
499
+ twitter: {
500
+ /**
501
+ * Insert a tweet
502
+ * @param options The tweet attributes
503
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
504
+ */
505
+ setTweet: (options: SetTweetOptions) => ReturnType;
506
+ updateTweet: (options: SetTweetOptions) => ReturnType;
507
+ };
508
+ }
509
+ }
510
+
511
+
512
+ declare module '@tiptap/core' {
513
+ interface Commands<ReturnType> {
514
+ drawer: {
515
+ setDrawer: (options: any, replace?: any) => ReturnType;
516
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
517
+ };
518
+ }
519
+ }
package/lib/index.d.ts CHANGED
@@ -10,7 +10,9 @@ import { RefAttributes } from 'react';
10
10
  import { TooltipContentProps } from '@radix-ui/react-tooltip';
11
11
  import { UseEditorOptions } from '@tiptap/react';
12
12
 
13
- declare interface ActionButtonProps {
13
+ export declare const ActionButton: default_2.ForwardRefExoticComponent<Partial<ActionButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export declare interface ActionButtonProps {
14
16
  icon?: string;
15
17
  title?: string;
16
18
  tooltip?: string;
@@ -288,27 +290,19 @@ declare module '@tiptap/core' {
288
290
 
289
291
  declare module '@tiptap/core' {
290
292
  interface Commands<ReturnType> {
291
- fontSize: {
293
+ imageUpload: {
292
294
  /**
293
- * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
294
- * CSS font-size
295
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
295
+ * Add an image
296
296
  */
297
- setFontSize: (fontSize: string) => ReturnType;
297
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
298
298
  /**
299
- * Unset the font size
299
+ * Update an image
300
300
  */
301
- unsetFontSize: () => ReturnType;
302
- };
303
- }
304
- }
305
-
306
-
307
- declare module '@tiptap/core' {
308
- interface Commands<ReturnType> {
309
- lineHeight: {
310
- setLineHeight: (lineHeight: string) => ReturnType;
311
- unsetLineHeight: () => ReturnType;
301
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
302
+ /**
303
+ * Set image alignment
304
+ */
305
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
312
306
  };
313
307
  }
314
308
  }
@@ -331,29 +325,15 @@ declare module '@tiptap/core' {
331
325
 
332
326
  declare module '@tiptap/core' {
333
327
  interface Commands<ReturnType> {
334
- tableCellBackground: {
335
- setTableCellBackground: (color: string) => ReturnType;
336
- unsetTableCellBackground: () => ReturnType;
337
- };
338
- }
339
- }
340
-
341
-
342
- declare module '@tiptap/core' {
343
- interface Commands<ReturnType> {
344
- imageUpload: {
345
- /**
346
- * Add an image
347
- */
348
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
328
+ indent: {
349
329
  /**
350
- * Update an image
330
+ * Set the indent attribute
351
331
  */
352
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
332
+ indent: () => ReturnType;
353
333
  /**
354
- * Set image alignment
334
+ * Set the outdent attribute
355
335
  */
356
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
336
+ outdent: () => ReturnType;
357
337
  };
358
338
  }
359
339
  }
@@ -361,8 +341,9 @@ declare module '@tiptap/core' {
361
341
 
362
342
  declare module '@tiptap/core' {
363
343
  interface Commands<ReturnType> {
364
- katex: {
365
- setKatex: (arg?: IKatexAttrs) => ReturnType;
344
+ lineHeight: {
345
+ setLineHeight: (lineHeight: string) => ReturnType;
346
+ unsetLineHeight: () => ReturnType;
366
347
  };
367
348
  }
368
349
  }
@@ -370,13 +351,11 @@ declare module '@tiptap/core' {
370
351
 
371
352
  declare module '@tiptap/core' {
372
353
  interface Commands<ReturnType> {
373
- columns: {
374
- insertColumns: (attrs?: {
375
- cols: number;
354
+ emoji: {
355
+ setEmoji: (emoji: {
356
+ name: string;
357
+ emoji: string;
376
358
  }) => ReturnType;
377
- addColBefore: () => ReturnType;
378
- addColAfter: () => ReturnType;
379
- deleteCol: () => ReturnType;
380
359
  };
381
360
  }
382
361
  }
@@ -384,15 +363,17 @@ declare module '@tiptap/core' {
384
363
 
385
364
  declare module '@tiptap/core' {
386
365
  interface Commands<ReturnType> {
387
- indent: {
366
+ fontSize: {
388
367
  /**
389
- * Set the indent attribute
368
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
369
+ * CSS font-size
370
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
390
371
  */
391
- indent: () => ReturnType;
372
+ setFontSize: (fontSize: string) => ReturnType;
392
373
  /**
393
- * Set the outdent attribute
374
+ * Unset the font size
394
375
  */
395
- outdent: () => ReturnType;
376
+ unsetFontSize: () => ReturnType;
396
377
  };
397
378
  }
398
379
  }
@@ -400,8 +381,9 @@ declare module '@tiptap/core' {
400
381
 
401
382
  declare module '@tiptap/core' {
402
383
  interface Commands<ReturnType> {
403
- exportWord: {
404
- exportToWord: () => ReturnType;
384
+ tableCellBackground: {
385
+ setTableCellBackground: (color: string) => ReturnType;
386
+ unsetTableCellBackground: () => ReturnType;
405
387
  };
406
388
  }
407
389
  }
@@ -409,11 +391,18 @@ declare module '@tiptap/core' {
409
391
 
410
392
  declare module '@tiptap/core' {
411
393
  interface Commands<ReturnType> {
412
- emoji: {
413
- setEmoji: (emoji: {
414
- name: string;
415
- emoji: string;
416
- }) => ReturnType;
394
+ tableOfContents: {
395
+ setTableOfContents: () => ReturnType;
396
+ removeTableOfContents: () => ReturnType;
397
+ };
398
+ }
399
+ }
400
+
401
+
402
+ declare module '@tiptap/core' {
403
+ interface Commands<ReturnType> {
404
+ exportWord: {
405
+ exportToWord: () => ReturnType;
417
406
  };
418
407
  }
419
408
  }
@@ -445,19 +434,13 @@ declare module '@tiptap/core' {
445
434
 
446
435
  declare module '@tiptap/core' {
447
436
  interface Commands<ReturnType> {
448
- tableOfContents: {
449
- setTableOfContents: () => ReturnType;
450
- removeTableOfContents: () => ReturnType;
451
- };
452
- }
453
- }
454
-
455
-
456
- declare module '@tiptap/core' {
457
- interface Commands<ReturnType> {
458
- mermaid: {
459
- setMermaid: (options: any, replace?: any) => ReturnType;
460
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
437
+ columns: {
438
+ insertColumns: (attrs?: {
439
+ cols: number;
440
+ }) => ReturnType;
441
+ addColBefore: () => ReturnType;
442
+ addColAfter: () => ReturnType;
443
+ deleteCol: () => ReturnType;
461
444
  };
462
445
  }
463
446
  }
@@ -465,9 +448,8 @@ declare module '@tiptap/core' {
465
448
 
466
449
  declare module '@tiptap/core' {
467
450
  interface Commands<ReturnType> {
468
- drawer: {
469
- setDrawer: (options: any, replace?: any) => ReturnType;
470
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
451
+ katex: {
452
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
471
453
  };
472
454
  }
473
455
  }
@@ -475,14 +457,9 @@ declare module '@tiptap/core' {
475
457
 
476
458
  declare module '@tiptap/core' {
477
459
  interface Commands<ReturnType> {
478
- twitter: {
479
- /**
480
- * Insert a tweet
481
- * @param options The tweet attributes
482
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
483
- */
484
- setTweet: (options: SetTweetOptions) => ReturnType;
485
- updateTweet: (options: SetTweetOptions) => ReturnType;
460
+ mermaid: {
461
+ setMermaid: (options: any, replace?: any) => ReturnType;
462
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
486
463
  };
487
464
  }
488
465
  }
@@ -515,3 +492,28 @@ declare module '@tiptap/core' {
515
492
  };
516
493
  }
517
494
  }
495
+
496
+
497
+ declare module '@tiptap/core' {
498
+ interface Commands<ReturnType> {
499
+ twitter: {
500
+ /**
501
+ * Insert a tweet
502
+ * @param options The tweet attributes
503
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
504
+ */
505
+ setTweet: (options: SetTweetOptions) => ReturnType;
506
+ updateTweet: (options: SetTweetOptions) => ReturnType;
507
+ };
508
+ }
509
+ }
510
+
511
+
512
+ declare module '@tiptap/core' {
513
+ interface Commands<ReturnType> {
514
+ drawer: {
515
+ setDrawer: (options: any, replace?: any) => ReturnType;
516
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
517
+ };
518
+ }
519
+ }
package/lib/index.js CHANGED
@@ -3616,6 +3616,7 @@ function Ic(e, t) {
3616
3616
  }
3617
3617
  const Wc = hr(Ic);
3618
3618
  export {
3619
+ C as ActionButton,
3619
3620
  L as BubbleMenu,
3620
3621
  Wc as default,
3621
3622
  Gc as useEditorState