@select-org/select-post-builder 1.2.7 → 1.2.9

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/dist/index.d.ts CHANGED
@@ -54,7 +54,17 @@ declare type BaseProps = {
54
54
  hideGroupSelector?: boolean;
55
55
  isSubmitting?: boolean;
56
56
  clearOnSuccess?: boolean;
57
- onCreatePost: (params: CreatePostCallbackPayload) => void;
57
+ onCreatePost: (params: CreatePostCallbackPayload,
58
+ /**
59
+ * Present only when the submit fails and the host wants to refill the
60
+ * editor with what was just submitted. `restoreContent()` re-injects the
61
+ * exact submitted content into the current live editor instance (resolved
62
+ * at call time, so it still works if this editor instance was destroyed
63
+ * and recreated in the meantime).
64
+ */
65
+ meta?: {
66
+ restoreContent: () => void;
67
+ }) => void;
58
68
  onVoiceComment?: (params: {
59
69
  voiceUrl: string;
60
70
  voiceTime: number;
@@ -473,17 +483,6 @@ declare module 'axios' {
473
483
  }
474
484
 
475
485
 
476
- declare module '@tiptap/core' {
477
- interface Commands<ReturnType> {
478
- poll: {
479
- insertPoll: (attrs: {
480
- choices: PollChoiceItem[];
481
- }) => ReturnType;
482
- };
483
- }
484
- }
485
-
486
-
487
486
  declare module '@tiptap/core' {
488
487
  interface Commands<ReturnType> {
489
488
  media: {
@@ -512,6 +511,17 @@ declare module '@tiptap/core' {
512
511
  }
513
512
 
514
513
 
514
+ declare module '@tiptap/core' {
515
+ interface Commands<ReturnType> {
516
+ poll: {
517
+ insertPoll: (attrs: {
518
+ choices: PollChoiceItem[];
519
+ }) => ReturnType;
520
+ };
521
+ }
522
+ }
523
+
524
+
515
525
  declare module '@tiptap/core' {
516
526
  interface Commands<ReturnType> {
517
527
  customLink: {