@portabletext/editor 1.1.1 → 1.1.2

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 (51) hide show
  1. package/README.md +3 -0
  2. package/lib/index.d.mts +1667 -0
  3. package/lib/index.d.ts +1667 -0
  4. package/lib/index.esm.js +305 -153
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +305 -154
  7. package/lib/index.js.map +1 -1
  8. package/lib/index.mjs +305 -153
  9. package/lib/index.mjs.map +1 -1
  10. package/package.json +23 -22
  11. package/src/editor/Editable.tsx +30 -31
  12. package/src/editor/PortableTextEditor.tsx +23 -6
  13. package/src/editor/__tests__/PortableTextEditor.test.tsx +9 -9
  14. package/src/editor/__tests__/PortableTextEditorTester.tsx +2 -5
  15. package/src/editor/__tests__/RangeDecorations.test.tsx +2 -2
  16. package/src/editor/__tests__/handleClick.test.tsx +27 -7
  17. package/src/editor/__tests__/insert-block.test.tsx +4 -4
  18. package/src/editor/__tests__/pteWarningsSelfSolving.test.tsx +7 -7
  19. package/src/editor/__tests__/self-solving.test.tsx +176 -0
  20. package/src/editor/components/Leaf.tsx +28 -23
  21. package/src/editor/components/Synchronizer.tsx +60 -32
  22. package/src/editor/editor-machine.ts +195 -0
  23. package/src/editor/hooks/usePortableTextEditorSelection.tsx +11 -13
  24. package/src/editor/hooks/useSyncValue.test.tsx +9 -9
  25. package/src/editor/hooks/useSyncValue.ts +14 -13
  26. package/src/editor/plugins/__tests__/createWithInsertData.test.tsx +1 -1
  27. package/src/editor/plugins/__tests__/withEditableAPIDelete.test.tsx +28 -28
  28. package/src/editor/plugins/__tests__/withEditableAPIGetFragment.test.tsx +17 -17
  29. package/src/editor/plugins/__tests__/withEditableAPIInsert.test.tsx +8 -8
  30. package/src/editor/plugins/__tests__/withEditableAPISelectionsOverlapping.test.tsx +5 -5
  31. package/src/editor/plugins/__tests__/withPortableTextLists.test.tsx +2 -2
  32. package/src/editor/plugins/__tests__/withPortableTextMarkModel.test.tsx +46 -46
  33. package/src/editor/plugins/__tests__/withPortableTextSelections.test.tsx +22 -11
  34. package/src/editor/plugins/__tests__/withUndoRedo.test.tsx +9 -9
  35. package/src/editor/plugins/createWithInsertData.ts +4 -8
  36. package/src/editor/plugins/createWithObjectKeys.ts +7 -0
  37. package/src/editor/plugins/createWithPatches.ts +5 -6
  38. package/src/editor/plugins/createWithPortableTextBlockStyle.ts +10 -2
  39. package/src/editor/plugins/createWithPortableTextMarkModel.ts +20 -4
  40. package/src/editor/plugins/createWithPortableTextSelections.ts +4 -5
  41. package/src/editor/plugins/createWithSchemaTypes.ts +9 -0
  42. package/src/editor/plugins/index.ts +18 -8
  43. package/src/index.ts +9 -3
  44. package/src/utils/__tests__/dmpToOperations.test.ts +1 -1
  45. package/src/utils/__tests__/operationToPatches.test.ts +61 -61
  46. package/src/utils/__tests__/patchToOperations.test.ts +39 -39
  47. package/src/utils/__tests__/ranges.test.ts +1 -1
  48. package/src/utils/__tests__/valueNormalization.test.tsx +14 -2
  49. package/src/utils/__tests__/values.test.ts +17 -17
  50. package/src/utils/validateValue.ts +0 -22
  51. package/src/editor/__tests__/utils.ts +0 -44
package/lib/index.d.mts CHANGED
@@ -38,6 +38,17 @@ import type {Observable, Subject} from 'rxjs'
38
38
  import type {Descendant, Node as Node_2, Operation} from 'slate'
39
39
  import type {ReactEditor} from 'slate-react'
40
40
  import type {DOMNode} from 'slate-react/dist/utils/dom'
41
+ import {
42
+ ActionFunction,
43
+ ActorRefFrom,
44
+ ActorRefFromLogic,
45
+ CallbackActorLogic,
46
+ EventObject,
47
+ MetaObject,
48
+ NonReducibleUnknown,
49
+ StateMachine,
50
+ Values,
51
+ } from 'xstate'
41
52
 
42
53
  /** @beta */
43
54
  export declare interface BlockAnnotationRenderProps {
@@ -220,6 +231,11 @@ export declare interface EditableAPIDeleteOptions {
220
231
  mode?: 'blocks' | 'children' | 'selected'
221
232
  }
222
233
 
234
+ /**
235
+ * @internal
236
+ */
237
+ export declare type EditorActor = ActorRefFrom<typeof editorMachine>
238
+
223
239
  /**
224
240
  * When the editor changes, it will emit a change item describing the change
225
241
  * @beta */
@@ -244,6 +260,1634 @@ export declare type EditorChange =
244
260
  */
245
261
  export declare type EditorChanges = Subject<EditorChange>
246
262
 
263
+ /**
264
+ * @internal
265
+ */
266
+ export declare const editorMachine: StateMachine<
267
+ {
268
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
269
+ },
270
+ | PatchEvent
271
+ | MutationEvent_2
272
+ | {
273
+ type: 'normalizing'
274
+ }
275
+ | {
276
+ type: 'done normalizing'
277
+ }
278
+ | {
279
+ type: 'ready'
280
+ }
281
+ | {
282
+ type: 'unset'
283
+ previousValue: Array<PortableTextBlock>
284
+ }
285
+ | {
286
+ type: 'value changed'
287
+ value: Array<PortableTextBlock> | undefined
288
+ }
289
+ | {
290
+ type: 'invalid value'
291
+ resolution: InvalidValueResolution | null
292
+ value: Array<PortableTextBlock> | undefined
293
+ }
294
+ | {
295
+ type: 'error'
296
+ name: string
297
+ description: string
298
+ data: unknown
299
+ }
300
+ | {
301
+ type: 'selection'
302
+ selection: EditorSelection
303
+ }
304
+ | {
305
+ type: 'blur'
306
+ event: FocusEvent_2<HTMLDivElement, Element>
307
+ }
308
+ | {
309
+ type: 'focus'
310
+ event: FocusEvent_2<HTMLDivElement, Element>
311
+ }
312
+ | {
313
+ type: 'online'
314
+ }
315
+ | {
316
+ type: 'offline'
317
+ }
318
+ | {
319
+ type: 'loading'
320
+ }
321
+ | {
322
+ type: 'done loading'
323
+ },
324
+ {
325
+ [x: string]:
326
+ | ActorRefFromLogic<
327
+ CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
328
+ >
329
+ | undefined
330
+ },
331
+ {
332
+ src: 'networkLogic'
333
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
334
+ id: string | undefined
335
+ },
336
+ Values<{
337
+ 'emit patch event': {
338
+ type: 'emit patch event'
339
+ params: NonReducibleUnknown
340
+ }
341
+ 'emit mutation event': {
342
+ type: 'emit mutation event'
343
+ params: NonReducibleUnknown
344
+ }
345
+ 'defer event': {
346
+ type: 'defer event'
347
+ params: NonReducibleUnknown
348
+ }
349
+ 'emit pending events': {
350
+ type: 'emit pending events'
351
+ params: NonReducibleUnknown
352
+ }
353
+ 'clear pending events': {
354
+ type: 'clear pending events'
355
+ params: NonReducibleUnknown
356
+ }
357
+ }>,
358
+ never,
359
+ never,
360
+ | 'dirty'
361
+ | {
362
+ pristine: 'normalizing' | 'idle'
363
+ },
364
+ string,
365
+ NonReducibleUnknown,
366
+ NonReducibleUnknown,
367
+ | PatchEvent
368
+ | MutationEvent_2
369
+ | {
370
+ type: 'ready'
371
+ }
372
+ | {
373
+ type: 'unset'
374
+ previousValue: Array<PortableTextBlock>
375
+ }
376
+ | {
377
+ type: 'value changed'
378
+ value: Array<PortableTextBlock> | undefined
379
+ }
380
+ | {
381
+ type: 'invalid value'
382
+ resolution: InvalidValueResolution | null
383
+ value: Array<PortableTextBlock> | undefined
384
+ }
385
+ | {
386
+ type: 'error'
387
+ name: string
388
+ description: string
389
+ data: unknown
390
+ }
391
+ | {
392
+ type: 'selection'
393
+ selection: EditorSelection
394
+ }
395
+ | {
396
+ type: 'blur'
397
+ event: FocusEvent_2<HTMLDivElement, Element>
398
+ }
399
+ | {
400
+ type: 'focus'
401
+ event: FocusEvent_2<HTMLDivElement, Element>
402
+ }
403
+ | {
404
+ type: 'online'
405
+ }
406
+ | {
407
+ type: 'offline'
408
+ }
409
+ | {
410
+ type: 'loading'
411
+ }
412
+ | {
413
+ type: 'done loading'
414
+ },
415
+ MetaObject,
416
+ {
417
+ readonly id: 'editor'
418
+ readonly context: {
419
+ readonly pendingEvents: []
420
+ }
421
+ readonly invoke: {
422
+ readonly id: 'networkLogic'
423
+ readonly src: 'networkLogic'
424
+ }
425
+ readonly on: {
426
+ readonly 'ready': {
427
+ readonly actions: ActionFunction<
428
+ {
429
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
430
+ },
431
+ {
432
+ type: 'ready'
433
+ },
434
+ | PatchEvent
435
+ | MutationEvent_2
436
+ | {
437
+ type: 'normalizing'
438
+ }
439
+ | {
440
+ type: 'done normalizing'
441
+ }
442
+ | {
443
+ type: 'ready'
444
+ }
445
+ | {
446
+ type: 'unset'
447
+ previousValue: Array<PortableTextBlock>
448
+ }
449
+ | {
450
+ type: 'value changed'
451
+ value: Array<PortableTextBlock> | undefined
452
+ }
453
+ | {
454
+ type: 'invalid value'
455
+ resolution: InvalidValueResolution | null
456
+ value: Array<PortableTextBlock> | undefined
457
+ }
458
+ | {
459
+ type: 'error'
460
+ name: string
461
+ description: string
462
+ data: unknown
463
+ }
464
+ | {
465
+ type: 'selection'
466
+ selection: EditorSelection
467
+ }
468
+ | {
469
+ type: 'blur'
470
+ event: FocusEvent_2<HTMLDivElement, Element>
471
+ }
472
+ | {
473
+ type: 'focus'
474
+ event: FocusEvent_2<HTMLDivElement, Element>
475
+ }
476
+ | {
477
+ type: 'online'
478
+ }
479
+ | {
480
+ type: 'offline'
481
+ }
482
+ | {
483
+ type: 'loading'
484
+ }
485
+ | {
486
+ type: 'done loading'
487
+ },
488
+ undefined,
489
+ never,
490
+ never,
491
+ never,
492
+ never,
493
+ | PatchEvent
494
+ | MutationEvent_2
495
+ | {
496
+ type: 'ready'
497
+ }
498
+ | {
499
+ type: 'unset'
500
+ previousValue: Array<PortableTextBlock>
501
+ }
502
+ | {
503
+ type: 'value changed'
504
+ value: Array<PortableTextBlock> | undefined
505
+ }
506
+ | {
507
+ type: 'invalid value'
508
+ resolution: InvalidValueResolution | null
509
+ value: Array<PortableTextBlock> | undefined
510
+ }
511
+ | {
512
+ type: 'error'
513
+ name: string
514
+ description: string
515
+ data: unknown
516
+ }
517
+ | {
518
+ type: 'selection'
519
+ selection: EditorSelection
520
+ }
521
+ | {
522
+ type: 'blur'
523
+ event: FocusEvent_2<HTMLDivElement, Element>
524
+ }
525
+ | {
526
+ type: 'focus'
527
+ event: FocusEvent_2<HTMLDivElement, Element>
528
+ }
529
+ | {
530
+ type: 'online'
531
+ }
532
+ | {
533
+ type: 'offline'
534
+ }
535
+ | {
536
+ type: 'loading'
537
+ }
538
+ | {
539
+ type: 'done loading'
540
+ }
541
+ >
542
+ }
543
+ readonly 'unset': {
544
+ readonly actions: ActionFunction<
545
+ {
546
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
547
+ },
548
+ {
549
+ type: 'unset'
550
+ previousValue: Array<PortableTextBlock>
551
+ },
552
+ | PatchEvent
553
+ | MutationEvent_2
554
+ | {
555
+ type: 'normalizing'
556
+ }
557
+ | {
558
+ type: 'done normalizing'
559
+ }
560
+ | {
561
+ type: 'ready'
562
+ }
563
+ | {
564
+ type: 'unset'
565
+ previousValue: Array<PortableTextBlock>
566
+ }
567
+ | {
568
+ type: 'value changed'
569
+ value: Array<PortableTextBlock> | undefined
570
+ }
571
+ | {
572
+ type: 'invalid value'
573
+ resolution: InvalidValueResolution | null
574
+ value: Array<PortableTextBlock> | undefined
575
+ }
576
+ | {
577
+ type: 'error'
578
+ name: string
579
+ description: string
580
+ data: unknown
581
+ }
582
+ | {
583
+ type: 'selection'
584
+ selection: EditorSelection
585
+ }
586
+ | {
587
+ type: 'blur'
588
+ event: FocusEvent_2<HTMLDivElement, Element>
589
+ }
590
+ | {
591
+ type: 'focus'
592
+ event: FocusEvent_2<HTMLDivElement, Element>
593
+ }
594
+ | {
595
+ type: 'online'
596
+ }
597
+ | {
598
+ type: 'offline'
599
+ }
600
+ | {
601
+ type: 'loading'
602
+ }
603
+ | {
604
+ type: 'done loading'
605
+ },
606
+ undefined,
607
+ never,
608
+ never,
609
+ never,
610
+ never,
611
+ | PatchEvent
612
+ | MutationEvent_2
613
+ | {
614
+ type: 'ready'
615
+ }
616
+ | {
617
+ type: 'unset'
618
+ previousValue: Array<PortableTextBlock>
619
+ }
620
+ | {
621
+ type: 'value changed'
622
+ value: Array<PortableTextBlock> | undefined
623
+ }
624
+ | {
625
+ type: 'invalid value'
626
+ resolution: InvalidValueResolution | null
627
+ value: Array<PortableTextBlock> | undefined
628
+ }
629
+ | {
630
+ type: 'error'
631
+ name: string
632
+ description: string
633
+ data: unknown
634
+ }
635
+ | {
636
+ type: 'selection'
637
+ selection: EditorSelection
638
+ }
639
+ | {
640
+ type: 'blur'
641
+ event: FocusEvent_2<HTMLDivElement, Element>
642
+ }
643
+ | {
644
+ type: 'focus'
645
+ event: FocusEvent_2<HTMLDivElement, Element>
646
+ }
647
+ | {
648
+ type: 'online'
649
+ }
650
+ | {
651
+ type: 'offline'
652
+ }
653
+ | {
654
+ type: 'loading'
655
+ }
656
+ | {
657
+ type: 'done loading'
658
+ }
659
+ >
660
+ }
661
+ readonly 'value changed': {
662
+ readonly actions: ActionFunction<
663
+ {
664
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
665
+ },
666
+ {
667
+ type: 'value changed'
668
+ value: Array<PortableTextBlock> | undefined
669
+ },
670
+ | PatchEvent
671
+ | MutationEvent_2
672
+ | {
673
+ type: 'normalizing'
674
+ }
675
+ | {
676
+ type: 'done normalizing'
677
+ }
678
+ | {
679
+ type: 'ready'
680
+ }
681
+ | {
682
+ type: 'unset'
683
+ previousValue: Array<PortableTextBlock>
684
+ }
685
+ | {
686
+ type: 'value changed'
687
+ value: Array<PortableTextBlock> | undefined
688
+ }
689
+ | {
690
+ type: 'invalid value'
691
+ resolution: InvalidValueResolution | null
692
+ value: Array<PortableTextBlock> | undefined
693
+ }
694
+ | {
695
+ type: 'error'
696
+ name: string
697
+ description: string
698
+ data: unknown
699
+ }
700
+ | {
701
+ type: 'selection'
702
+ selection: EditorSelection
703
+ }
704
+ | {
705
+ type: 'blur'
706
+ event: FocusEvent_2<HTMLDivElement, Element>
707
+ }
708
+ | {
709
+ type: 'focus'
710
+ event: FocusEvent_2<HTMLDivElement, Element>
711
+ }
712
+ | {
713
+ type: 'online'
714
+ }
715
+ | {
716
+ type: 'offline'
717
+ }
718
+ | {
719
+ type: 'loading'
720
+ }
721
+ | {
722
+ type: 'done loading'
723
+ },
724
+ undefined,
725
+ never,
726
+ never,
727
+ never,
728
+ never,
729
+ | PatchEvent
730
+ | MutationEvent_2
731
+ | {
732
+ type: 'ready'
733
+ }
734
+ | {
735
+ type: 'unset'
736
+ previousValue: Array<PortableTextBlock>
737
+ }
738
+ | {
739
+ type: 'value changed'
740
+ value: Array<PortableTextBlock> | undefined
741
+ }
742
+ | {
743
+ type: 'invalid value'
744
+ resolution: InvalidValueResolution | null
745
+ value: Array<PortableTextBlock> | undefined
746
+ }
747
+ | {
748
+ type: 'error'
749
+ name: string
750
+ description: string
751
+ data: unknown
752
+ }
753
+ | {
754
+ type: 'selection'
755
+ selection: EditorSelection
756
+ }
757
+ | {
758
+ type: 'blur'
759
+ event: FocusEvent_2<HTMLDivElement, Element>
760
+ }
761
+ | {
762
+ type: 'focus'
763
+ event: FocusEvent_2<HTMLDivElement, Element>
764
+ }
765
+ | {
766
+ type: 'online'
767
+ }
768
+ | {
769
+ type: 'offline'
770
+ }
771
+ | {
772
+ type: 'loading'
773
+ }
774
+ | {
775
+ type: 'done loading'
776
+ }
777
+ >
778
+ }
779
+ readonly 'invalid value': {
780
+ readonly actions: ActionFunction<
781
+ {
782
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
783
+ },
784
+ {
785
+ type: 'invalid value'
786
+ resolution: InvalidValueResolution | null
787
+ value: Array<PortableTextBlock> | undefined
788
+ },
789
+ | PatchEvent
790
+ | MutationEvent_2
791
+ | {
792
+ type: 'normalizing'
793
+ }
794
+ | {
795
+ type: 'done normalizing'
796
+ }
797
+ | {
798
+ type: 'ready'
799
+ }
800
+ | {
801
+ type: 'unset'
802
+ previousValue: Array<PortableTextBlock>
803
+ }
804
+ | {
805
+ type: 'value changed'
806
+ value: Array<PortableTextBlock> | undefined
807
+ }
808
+ | {
809
+ type: 'invalid value'
810
+ resolution: InvalidValueResolution | null
811
+ value: Array<PortableTextBlock> | undefined
812
+ }
813
+ | {
814
+ type: 'error'
815
+ name: string
816
+ description: string
817
+ data: unknown
818
+ }
819
+ | {
820
+ type: 'selection'
821
+ selection: EditorSelection
822
+ }
823
+ | {
824
+ type: 'blur'
825
+ event: FocusEvent_2<HTMLDivElement, Element>
826
+ }
827
+ | {
828
+ type: 'focus'
829
+ event: FocusEvent_2<HTMLDivElement, Element>
830
+ }
831
+ | {
832
+ type: 'online'
833
+ }
834
+ | {
835
+ type: 'offline'
836
+ }
837
+ | {
838
+ type: 'loading'
839
+ }
840
+ | {
841
+ type: 'done loading'
842
+ },
843
+ undefined,
844
+ never,
845
+ never,
846
+ never,
847
+ never,
848
+ | PatchEvent
849
+ | MutationEvent_2
850
+ | {
851
+ type: 'ready'
852
+ }
853
+ | {
854
+ type: 'unset'
855
+ previousValue: Array<PortableTextBlock>
856
+ }
857
+ | {
858
+ type: 'value changed'
859
+ value: Array<PortableTextBlock> | undefined
860
+ }
861
+ | {
862
+ type: 'invalid value'
863
+ resolution: InvalidValueResolution | null
864
+ value: Array<PortableTextBlock> | undefined
865
+ }
866
+ | {
867
+ type: 'error'
868
+ name: string
869
+ description: string
870
+ data: unknown
871
+ }
872
+ | {
873
+ type: 'selection'
874
+ selection: EditorSelection
875
+ }
876
+ | {
877
+ type: 'blur'
878
+ event: FocusEvent_2<HTMLDivElement, Element>
879
+ }
880
+ | {
881
+ type: 'focus'
882
+ event: FocusEvent_2<HTMLDivElement, Element>
883
+ }
884
+ | {
885
+ type: 'online'
886
+ }
887
+ | {
888
+ type: 'offline'
889
+ }
890
+ | {
891
+ type: 'loading'
892
+ }
893
+ | {
894
+ type: 'done loading'
895
+ }
896
+ >
897
+ }
898
+ readonly 'error': {
899
+ readonly actions: ActionFunction<
900
+ {
901
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
902
+ },
903
+ {
904
+ type: 'error'
905
+ name: string
906
+ description: string
907
+ data: unknown
908
+ },
909
+ | PatchEvent
910
+ | MutationEvent_2
911
+ | {
912
+ type: 'normalizing'
913
+ }
914
+ | {
915
+ type: 'done normalizing'
916
+ }
917
+ | {
918
+ type: 'ready'
919
+ }
920
+ | {
921
+ type: 'unset'
922
+ previousValue: Array<PortableTextBlock>
923
+ }
924
+ | {
925
+ type: 'value changed'
926
+ value: Array<PortableTextBlock> | undefined
927
+ }
928
+ | {
929
+ type: 'invalid value'
930
+ resolution: InvalidValueResolution | null
931
+ value: Array<PortableTextBlock> | undefined
932
+ }
933
+ | {
934
+ type: 'error'
935
+ name: string
936
+ description: string
937
+ data: unknown
938
+ }
939
+ | {
940
+ type: 'selection'
941
+ selection: EditorSelection
942
+ }
943
+ | {
944
+ type: 'blur'
945
+ event: FocusEvent_2<HTMLDivElement, Element>
946
+ }
947
+ | {
948
+ type: 'focus'
949
+ event: FocusEvent_2<HTMLDivElement, Element>
950
+ }
951
+ | {
952
+ type: 'online'
953
+ }
954
+ | {
955
+ type: 'offline'
956
+ }
957
+ | {
958
+ type: 'loading'
959
+ }
960
+ | {
961
+ type: 'done loading'
962
+ },
963
+ undefined,
964
+ never,
965
+ never,
966
+ never,
967
+ never,
968
+ | PatchEvent
969
+ | MutationEvent_2
970
+ | {
971
+ type: 'ready'
972
+ }
973
+ | {
974
+ type: 'unset'
975
+ previousValue: Array<PortableTextBlock>
976
+ }
977
+ | {
978
+ type: 'value changed'
979
+ value: Array<PortableTextBlock> | undefined
980
+ }
981
+ | {
982
+ type: 'invalid value'
983
+ resolution: InvalidValueResolution | null
984
+ value: Array<PortableTextBlock> | undefined
985
+ }
986
+ | {
987
+ type: 'error'
988
+ name: string
989
+ description: string
990
+ data: unknown
991
+ }
992
+ | {
993
+ type: 'selection'
994
+ selection: EditorSelection
995
+ }
996
+ | {
997
+ type: 'blur'
998
+ event: FocusEvent_2<HTMLDivElement, Element>
999
+ }
1000
+ | {
1001
+ type: 'focus'
1002
+ event: FocusEvent_2<HTMLDivElement, Element>
1003
+ }
1004
+ | {
1005
+ type: 'online'
1006
+ }
1007
+ | {
1008
+ type: 'offline'
1009
+ }
1010
+ | {
1011
+ type: 'loading'
1012
+ }
1013
+ | {
1014
+ type: 'done loading'
1015
+ }
1016
+ >
1017
+ }
1018
+ readonly 'selection': {
1019
+ readonly actions: ActionFunction<
1020
+ {
1021
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1022
+ },
1023
+ {
1024
+ type: 'selection'
1025
+ selection: EditorSelection
1026
+ },
1027
+ | PatchEvent
1028
+ | MutationEvent_2
1029
+ | {
1030
+ type: 'normalizing'
1031
+ }
1032
+ | {
1033
+ type: 'done normalizing'
1034
+ }
1035
+ | {
1036
+ type: 'ready'
1037
+ }
1038
+ | {
1039
+ type: 'unset'
1040
+ previousValue: Array<PortableTextBlock>
1041
+ }
1042
+ | {
1043
+ type: 'value changed'
1044
+ value: Array<PortableTextBlock> | undefined
1045
+ }
1046
+ | {
1047
+ type: 'invalid value'
1048
+ resolution: InvalidValueResolution | null
1049
+ value: Array<PortableTextBlock> | undefined
1050
+ }
1051
+ | {
1052
+ type: 'error'
1053
+ name: string
1054
+ description: string
1055
+ data: unknown
1056
+ }
1057
+ | {
1058
+ type: 'selection'
1059
+ selection: EditorSelection
1060
+ }
1061
+ | {
1062
+ type: 'blur'
1063
+ event: FocusEvent_2<HTMLDivElement, Element>
1064
+ }
1065
+ | {
1066
+ type: 'focus'
1067
+ event: FocusEvent_2<HTMLDivElement, Element>
1068
+ }
1069
+ | {
1070
+ type: 'online'
1071
+ }
1072
+ | {
1073
+ type: 'offline'
1074
+ }
1075
+ | {
1076
+ type: 'loading'
1077
+ }
1078
+ | {
1079
+ type: 'done loading'
1080
+ },
1081
+ undefined,
1082
+ never,
1083
+ never,
1084
+ never,
1085
+ never,
1086
+ | PatchEvent
1087
+ | MutationEvent_2
1088
+ | {
1089
+ type: 'ready'
1090
+ }
1091
+ | {
1092
+ type: 'unset'
1093
+ previousValue: Array<PortableTextBlock>
1094
+ }
1095
+ | {
1096
+ type: 'value changed'
1097
+ value: Array<PortableTextBlock> | undefined
1098
+ }
1099
+ | {
1100
+ type: 'invalid value'
1101
+ resolution: InvalidValueResolution | null
1102
+ value: Array<PortableTextBlock> | undefined
1103
+ }
1104
+ | {
1105
+ type: 'error'
1106
+ name: string
1107
+ description: string
1108
+ data: unknown
1109
+ }
1110
+ | {
1111
+ type: 'selection'
1112
+ selection: EditorSelection
1113
+ }
1114
+ | {
1115
+ type: 'blur'
1116
+ event: FocusEvent_2<HTMLDivElement, Element>
1117
+ }
1118
+ | {
1119
+ type: 'focus'
1120
+ event: FocusEvent_2<HTMLDivElement, Element>
1121
+ }
1122
+ | {
1123
+ type: 'online'
1124
+ }
1125
+ | {
1126
+ type: 'offline'
1127
+ }
1128
+ | {
1129
+ type: 'loading'
1130
+ }
1131
+ | {
1132
+ type: 'done loading'
1133
+ }
1134
+ >
1135
+ }
1136
+ readonly 'blur': {
1137
+ readonly actions: ActionFunction<
1138
+ {
1139
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1140
+ },
1141
+ {
1142
+ type: 'blur'
1143
+ event: FocusEvent_2<HTMLDivElement, Element>
1144
+ },
1145
+ | PatchEvent
1146
+ | MutationEvent_2
1147
+ | {
1148
+ type: 'normalizing'
1149
+ }
1150
+ | {
1151
+ type: 'done normalizing'
1152
+ }
1153
+ | {
1154
+ type: 'ready'
1155
+ }
1156
+ | {
1157
+ type: 'unset'
1158
+ previousValue: Array<PortableTextBlock>
1159
+ }
1160
+ | {
1161
+ type: 'value changed'
1162
+ value: Array<PortableTextBlock> | undefined
1163
+ }
1164
+ | {
1165
+ type: 'invalid value'
1166
+ resolution: InvalidValueResolution | null
1167
+ value: Array<PortableTextBlock> | undefined
1168
+ }
1169
+ | {
1170
+ type: 'error'
1171
+ name: string
1172
+ description: string
1173
+ data: unknown
1174
+ }
1175
+ | {
1176
+ type: 'selection'
1177
+ selection: EditorSelection
1178
+ }
1179
+ | {
1180
+ type: 'blur'
1181
+ event: FocusEvent_2<HTMLDivElement, Element>
1182
+ }
1183
+ | {
1184
+ type: 'focus'
1185
+ event: FocusEvent_2<HTMLDivElement, Element>
1186
+ }
1187
+ | {
1188
+ type: 'online'
1189
+ }
1190
+ | {
1191
+ type: 'offline'
1192
+ }
1193
+ | {
1194
+ type: 'loading'
1195
+ }
1196
+ | {
1197
+ type: 'done loading'
1198
+ },
1199
+ undefined,
1200
+ never,
1201
+ never,
1202
+ never,
1203
+ never,
1204
+ | PatchEvent
1205
+ | MutationEvent_2
1206
+ | {
1207
+ type: 'ready'
1208
+ }
1209
+ | {
1210
+ type: 'unset'
1211
+ previousValue: Array<PortableTextBlock>
1212
+ }
1213
+ | {
1214
+ type: 'value changed'
1215
+ value: Array<PortableTextBlock> | undefined
1216
+ }
1217
+ | {
1218
+ type: 'invalid value'
1219
+ resolution: InvalidValueResolution | null
1220
+ value: Array<PortableTextBlock> | undefined
1221
+ }
1222
+ | {
1223
+ type: 'error'
1224
+ name: string
1225
+ description: string
1226
+ data: unknown
1227
+ }
1228
+ | {
1229
+ type: 'selection'
1230
+ selection: EditorSelection
1231
+ }
1232
+ | {
1233
+ type: 'blur'
1234
+ event: FocusEvent_2<HTMLDivElement, Element>
1235
+ }
1236
+ | {
1237
+ type: 'focus'
1238
+ event: FocusEvent_2<HTMLDivElement, Element>
1239
+ }
1240
+ | {
1241
+ type: 'online'
1242
+ }
1243
+ | {
1244
+ type: 'offline'
1245
+ }
1246
+ | {
1247
+ type: 'loading'
1248
+ }
1249
+ | {
1250
+ type: 'done loading'
1251
+ }
1252
+ >
1253
+ }
1254
+ readonly 'focus': {
1255
+ readonly actions: ActionFunction<
1256
+ {
1257
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1258
+ },
1259
+ {
1260
+ type: 'focus'
1261
+ event: FocusEvent_2<HTMLDivElement, Element>
1262
+ },
1263
+ | PatchEvent
1264
+ | MutationEvent_2
1265
+ | {
1266
+ type: 'normalizing'
1267
+ }
1268
+ | {
1269
+ type: 'done normalizing'
1270
+ }
1271
+ | {
1272
+ type: 'ready'
1273
+ }
1274
+ | {
1275
+ type: 'unset'
1276
+ previousValue: Array<PortableTextBlock>
1277
+ }
1278
+ | {
1279
+ type: 'value changed'
1280
+ value: Array<PortableTextBlock> | undefined
1281
+ }
1282
+ | {
1283
+ type: 'invalid value'
1284
+ resolution: InvalidValueResolution | null
1285
+ value: Array<PortableTextBlock> | undefined
1286
+ }
1287
+ | {
1288
+ type: 'error'
1289
+ name: string
1290
+ description: string
1291
+ data: unknown
1292
+ }
1293
+ | {
1294
+ type: 'selection'
1295
+ selection: EditorSelection
1296
+ }
1297
+ | {
1298
+ type: 'blur'
1299
+ event: FocusEvent_2<HTMLDivElement, Element>
1300
+ }
1301
+ | {
1302
+ type: 'focus'
1303
+ event: FocusEvent_2<HTMLDivElement, Element>
1304
+ }
1305
+ | {
1306
+ type: 'online'
1307
+ }
1308
+ | {
1309
+ type: 'offline'
1310
+ }
1311
+ | {
1312
+ type: 'loading'
1313
+ }
1314
+ | {
1315
+ type: 'done loading'
1316
+ },
1317
+ undefined,
1318
+ never,
1319
+ never,
1320
+ never,
1321
+ never,
1322
+ | PatchEvent
1323
+ | MutationEvent_2
1324
+ | {
1325
+ type: 'ready'
1326
+ }
1327
+ | {
1328
+ type: 'unset'
1329
+ previousValue: Array<PortableTextBlock>
1330
+ }
1331
+ | {
1332
+ type: 'value changed'
1333
+ value: Array<PortableTextBlock> | undefined
1334
+ }
1335
+ | {
1336
+ type: 'invalid value'
1337
+ resolution: InvalidValueResolution | null
1338
+ value: Array<PortableTextBlock> | undefined
1339
+ }
1340
+ | {
1341
+ type: 'error'
1342
+ name: string
1343
+ description: string
1344
+ data: unknown
1345
+ }
1346
+ | {
1347
+ type: 'selection'
1348
+ selection: EditorSelection
1349
+ }
1350
+ | {
1351
+ type: 'blur'
1352
+ event: FocusEvent_2<HTMLDivElement, Element>
1353
+ }
1354
+ | {
1355
+ type: 'focus'
1356
+ event: FocusEvent_2<HTMLDivElement, Element>
1357
+ }
1358
+ | {
1359
+ type: 'online'
1360
+ }
1361
+ | {
1362
+ type: 'offline'
1363
+ }
1364
+ | {
1365
+ type: 'loading'
1366
+ }
1367
+ | {
1368
+ type: 'done loading'
1369
+ }
1370
+ >
1371
+ }
1372
+ readonly 'online': {
1373
+ readonly actions: ActionFunction<
1374
+ {
1375
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1376
+ },
1377
+ {
1378
+ type: 'online'
1379
+ },
1380
+ | PatchEvent
1381
+ | MutationEvent_2
1382
+ | {
1383
+ type: 'normalizing'
1384
+ }
1385
+ | {
1386
+ type: 'done normalizing'
1387
+ }
1388
+ | {
1389
+ type: 'ready'
1390
+ }
1391
+ | {
1392
+ type: 'unset'
1393
+ previousValue: Array<PortableTextBlock>
1394
+ }
1395
+ | {
1396
+ type: 'value changed'
1397
+ value: Array<PortableTextBlock> | undefined
1398
+ }
1399
+ | {
1400
+ type: 'invalid value'
1401
+ resolution: InvalidValueResolution | null
1402
+ value: Array<PortableTextBlock> | undefined
1403
+ }
1404
+ | {
1405
+ type: 'error'
1406
+ name: string
1407
+ description: string
1408
+ data: unknown
1409
+ }
1410
+ | {
1411
+ type: 'selection'
1412
+ selection: EditorSelection
1413
+ }
1414
+ | {
1415
+ type: 'blur'
1416
+ event: FocusEvent_2<HTMLDivElement, Element>
1417
+ }
1418
+ | {
1419
+ type: 'focus'
1420
+ event: FocusEvent_2<HTMLDivElement, Element>
1421
+ }
1422
+ | {
1423
+ type: 'online'
1424
+ }
1425
+ | {
1426
+ type: 'offline'
1427
+ }
1428
+ | {
1429
+ type: 'loading'
1430
+ }
1431
+ | {
1432
+ type: 'done loading'
1433
+ },
1434
+ undefined,
1435
+ never,
1436
+ never,
1437
+ never,
1438
+ never,
1439
+ | PatchEvent
1440
+ | MutationEvent_2
1441
+ | {
1442
+ type: 'ready'
1443
+ }
1444
+ | {
1445
+ type: 'unset'
1446
+ previousValue: Array<PortableTextBlock>
1447
+ }
1448
+ | {
1449
+ type: 'value changed'
1450
+ value: Array<PortableTextBlock> | undefined
1451
+ }
1452
+ | {
1453
+ type: 'invalid value'
1454
+ resolution: InvalidValueResolution | null
1455
+ value: Array<PortableTextBlock> | undefined
1456
+ }
1457
+ | {
1458
+ type: 'error'
1459
+ name: string
1460
+ description: string
1461
+ data: unknown
1462
+ }
1463
+ | {
1464
+ type: 'selection'
1465
+ selection: EditorSelection
1466
+ }
1467
+ | {
1468
+ type: 'blur'
1469
+ event: FocusEvent_2<HTMLDivElement, Element>
1470
+ }
1471
+ | {
1472
+ type: 'focus'
1473
+ event: FocusEvent_2<HTMLDivElement, Element>
1474
+ }
1475
+ | {
1476
+ type: 'online'
1477
+ }
1478
+ | {
1479
+ type: 'offline'
1480
+ }
1481
+ | {
1482
+ type: 'loading'
1483
+ }
1484
+ | {
1485
+ type: 'done loading'
1486
+ }
1487
+ >
1488
+ }
1489
+ readonly 'offline': {
1490
+ readonly actions: ActionFunction<
1491
+ {
1492
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1493
+ },
1494
+ {
1495
+ type: 'offline'
1496
+ },
1497
+ | PatchEvent
1498
+ | MutationEvent_2
1499
+ | {
1500
+ type: 'normalizing'
1501
+ }
1502
+ | {
1503
+ type: 'done normalizing'
1504
+ }
1505
+ | {
1506
+ type: 'ready'
1507
+ }
1508
+ | {
1509
+ type: 'unset'
1510
+ previousValue: Array<PortableTextBlock>
1511
+ }
1512
+ | {
1513
+ type: 'value changed'
1514
+ value: Array<PortableTextBlock> | undefined
1515
+ }
1516
+ | {
1517
+ type: 'invalid value'
1518
+ resolution: InvalidValueResolution | null
1519
+ value: Array<PortableTextBlock> | undefined
1520
+ }
1521
+ | {
1522
+ type: 'error'
1523
+ name: string
1524
+ description: string
1525
+ data: unknown
1526
+ }
1527
+ | {
1528
+ type: 'selection'
1529
+ selection: EditorSelection
1530
+ }
1531
+ | {
1532
+ type: 'blur'
1533
+ event: FocusEvent_2<HTMLDivElement, Element>
1534
+ }
1535
+ | {
1536
+ type: 'focus'
1537
+ event: FocusEvent_2<HTMLDivElement, Element>
1538
+ }
1539
+ | {
1540
+ type: 'online'
1541
+ }
1542
+ | {
1543
+ type: 'offline'
1544
+ }
1545
+ | {
1546
+ type: 'loading'
1547
+ }
1548
+ | {
1549
+ type: 'done loading'
1550
+ },
1551
+ undefined,
1552
+ never,
1553
+ never,
1554
+ never,
1555
+ never,
1556
+ | PatchEvent
1557
+ | MutationEvent_2
1558
+ | {
1559
+ type: 'ready'
1560
+ }
1561
+ | {
1562
+ type: 'unset'
1563
+ previousValue: Array<PortableTextBlock>
1564
+ }
1565
+ | {
1566
+ type: 'value changed'
1567
+ value: Array<PortableTextBlock> | undefined
1568
+ }
1569
+ | {
1570
+ type: 'invalid value'
1571
+ resolution: InvalidValueResolution | null
1572
+ value: Array<PortableTextBlock> | undefined
1573
+ }
1574
+ | {
1575
+ type: 'error'
1576
+ name: string
1577
+ description: string
1578
+ data: unknown
1579
+ }
1580
+ | {
1581
+ type: 'selection'
1582
+ selection: EditorSelection
1583
+ }
1584
+ | {
1585
+ type: 'blur'
1586
+ event: FocusEvent_2<HTMLDivElement, Element>
1587
+ }
1588
+ | {
1589
+ type: 'focus'
1590
+ event: FocusEvent_2<HTMLDivElement, Element>
1591
+ }
1592
+ | {
1593
+ type: 'online'
1594
+ }
1595
+ | {
1596
+ type: 'offline'
1597
+ }
1598
+ | {
1599
+ type: 'loading'
1600
+ }
1601
+ | {
1602
+ type: 'done loading'
1603
+ }
1604
+ >
1605
+ }
1606
+ readonly 'loading': {
1607
+ readonly actions: ActionFunction<
1608
+ {
1609
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1610
+ },
1611
+ {
1612
+ type: 'loading'
1613
+ },
1614
+ | PatchEvent
1615
+ | MutationEvent_2
1616
+ | {
1617
+ type: 'normalizing'
1618
+ }
1619
+ | {
1620
+ type: 'done normalizing'
1621
+ }
1622
+ | {
1623
+ type: 'ready'
1624
+ }
1625
+ | {
1626
+ type: 'unset'
1627
+ previousValue: Array<PortableTextBlock>
1628
+ }
1629
+ | {
1630
+ type: 'value changed'
1631
+ value: Array<PortableTextBlock> | undefined
1632
+ }
1633
+ | {
1634
+ type: 'invalid value'
1635
+ resolution: InvalidValueResolution | null
1636
+ value: Array<PortableTextBlock> | undefined
1637
+ }
1638
+ | {
1639
+ type: 'error'
1640
+ name: string
1641
+ description: string
1642
+ data: unknown
1643
+ }
1644
+ | {
1645
+ type: 'selection'
1646
+ selection: EditorSelection
1647
+ }
1648
+ | {
1649
+ type: 'blur'
1650
+ event: FocusEvent_2<HTMLDivElement, Element>
1651
+ }
1652
+ | {
1653
+ type: 'focus'
1654
+ event: FocusEvent_2<HTMLDivElement, Element>
1655
+ }
1656
+ | {
1657
+ type: 'online'
1658
+ }
1659
+ | {
1660
+ type: 'offline'
1661
+ }
1662
+ | {
1663
+ type: 'loading'
1664
+ }
1665
+ | {
1666
+ type: 'done loading'
1667
+ },
1668
+ undefined,
1669
+ never,
1670
+ never,
1671
+ never,
1672
+ never,
1673
+ | PatchEvent
1674
+ | MutationEvent_2
1675
+ | {
1676
+ type: 'ready'
1677
+ }
1678
+ | {
1679
+ type: 'unset'
1680
+ previousValue: Array<PortableTextBlock>
1681
+ }
1682
+ | {
1683
+ type: 'value changed'
1684
+ value: Array<PortableTextBlock> | undefined
1685
+ }
1686
+ | {
1687
+ type: 'invalid value'
1688
+ resolution: InvalidValueResolution | null
1689
+ value: Array<PortableTextBlock> | undefined
1690
+ }
1691
+ | {
1692
+ type: 'error'
1693
+ name: string
1694
+ description: string
1695
+ data: unknown
1696
+ }
1697
+ | {
1698
+ type: 'selection'
1699
+ selection: EditorSelection
1700
+ }
1701
+ | {
1702
+ type: 'blur'
1703
+ event: FocusEvent_2<HTMLDivElement, Element>
1704
+ }
1705
+ | {
1706
+ type: 'focus'
1707
+ event: FocusEvent_2<HTMLDivElement, Element>
1708
+ }
1709
+ | {
1710
+ type: 'online'
1711
+ }
1712
+ | {
1713
+ type: 'offline'
1714
+ }
1715
+ | {
1716
+ type: 'loading'
1717
+ }
1718
+ | {
1719
+ type: 'done loading'
1720
+ }
1721
+ >
1722
+ }
1723
+ readonly 'done loading': {
1724
+ readonly actions: ActionFunction<
1725
+ {
1726
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
1727
+ },
1728
+ {
1729
+ type: 'done loading'
1730
+ },
1731
+ | PatchEvent
1732
+ | MutationEvent_2
1733
+ | {
1734
+ type: 'normalizing'
1735
+ }
1736
+ | {
1737
+ type: 'done normalizing'
1738
+ }
1739
+ | {
1740
+ type: 'ready'
1741
+ }
1742
+ | {
1743
+ type: 'unset'
1744
+ previousValue: Array<PortableTextBlock>
1745
+ }
1746
+ | {
1747
+ type: 'value changed'
1748
+ value: Array<PortableTextBlock> | undefined
1749
+ }
1750
+ | {
1751
+ type: 'invalid value'
1752
+ resolution: InvalidValueResolution | null
1753
+ value: Array<PortableTextBlock> | undefined
1754
+ }
1755
+ | {
1756
+ type: 'error'
1757
+ name: string
1758
+ description: string
1759
+ data: unknown
1760
+ }
1761
+ | {
1762
+ type: 'selection'
1763
+ selection: EditorSelection
1764
+ }
1765
+ | {
1766
+ type: 'blur'
1767
+ event: FocusEvent_2<HTMLDivElement, Element>
1768
+ }
1769
+ | {
1770
+ type: 'focus'
1771
+ event: FocusEvent_2<HTMLDivElement, Element>
1772
+ }
1773
+ | {
1774
+ type: 'online'
1775
+ }
1776
+ | {
1777
+ type: 'offline'
1778
+ }
1779
+ | {
1780
+ type: 'loading'
1781
+ }
1782
+ | {
1783
+ type: 'done loading'
1784
+ },
1785
+ undefined,
1786
+ never,
1787
+ never,
1788
+ never,
1789
+ never,
1790
+ | PatchEvent
1791
+ | MutationEvent_2
1792
+ | {
1793
+ type: 'ready'
1794
+ }
1795
+ | {
1796
+ type: 'unset'
1797
+ previousValue: Array<PortableTextBlock>
1798
+ }
1799
+ | {
1800
+ type: 'value changed'
1801
+ value: Array<PortableTextBlock> | undefined
1802
+ }
1803
+ | {
1804
+ type: 'invalid value'
1805
+ resolution: InvalidValueResolution | null
1806
+ value: Array<PortableTextBlock> | undefined
1807
+ }
1808
+ | {
1809
+ type: 'error'
1810
+ name: string
1811
+ description: string
1812
+ data: unknown
1813
+ }
1814
+ | {
1815
+ type: 'selection'
1816
+ selection: EditorSelection
1817
+ }
1818
+ | {
1819
+ type: 'blur'
1820
+ event: FocusEvent_2<HTMLDivElement, Element>
1821
+ }
1822
+ | {
1823
+ type: 'focus'
1824
+ event: FocusEvent_2<HTMLDivElement, Element>
1825
+ }
1826
+ | {
1827
+ type: 'online'
1828
+ }
1829
+ | {
1830
+ type: 'offline'
1831
+ }
1832
+ | {
1833
+ type: 'loading'
1834
+ }
1835
+ | {
1836
+ type: 'done loading'
1837
+ }
1838
+ >
1839
+ }
1840
+ }
1841
+ readonly initial: 'pristine'
1842
+ readonly states: {
1843
+ readonly pristine: {
1844
+ readonly initial: 'idle'
1845
+ readonly states: {
1846
+ readonly idle: {
1847
+ readonly on: {
1848
+ readonly normalizing: {
1849
+ readonly target: 'normalizing'
1850
+ }
1851
+ readonly patch: {
1852
+ readonly actions: 'defer event'
1853
+ readonly target: '#editor.dirty'
1854
+ }
1855
+ readonly mutation: {
1856
+ readonly actions: 'defer event'
1857
+ readonly target: '#editor.dirty'
1858
+ }
1859
+ }
1860
+ }
1861
+ readonly normalizing: {
1862
+ readonly on: {
1863
+ readonly 'done normalizing': {
1864
+ readonly target: 'idle'
1865
+ }
1866
+ readonly 'patch': {
1867
+ readonly actions: 'defer event'
1868
+ }
1869
+ readonly 'mutation': {
1870
+ readonly actions: 'defer event'
1871
+ }
1872
+ }
1873
+ }
1874
+ }
1875
+ }
1876
+ readonly dirty: {
1877
+ readonly entry: readonly ['emit pending events', 'clear pending events']
1878
+ readonly on: {
1879
+ readonly patch: {
1880
+ readonly actions: 'emit patch event'
1881
+ }
1882
+ readonly mutation: {
1883
+ readonly actions: 'emit mutation event'
1884
+ }
1885
+ }
1886
+ }
1887
+ }
1888
+ }
1889
+ >
1890
+
247
1891
  /** @internal */
248
1892
  export declare type EditorNode = Node_2 & {
249
1893
  _key: string
@@ -361,6 +2005,16 @@ export declare type MutationChange = {
361
2005
  snapshot: PortableTextBlock[] | undefined
362
2006
  }
363
2007
 
2008
+ /**
2009
+ * @internal
2010
+ */
2011
+ declare type MutationEvent_2 = {
2012
+ type: 'mutation'
2013
+ patches: Array<Patch>
2014
+ snapshot: Array<PortableTextBlock> | undefined
2015
+ }
2016
+ export {MutationEvent_2 as MutationEvent}
2017
+
364
2018
  /** @beta */
365
2019
  export declare type OnBeforeInputFn = (event: InputEvent) => void
366
2020
 
@@ -410,6 +2064,14 @@ export declare type PatchChange = {
410
2064
  patch: Patch
411
2065
  }
412
2066
 
2067
+ /**
2068
+ * @internal
2069
+ */
2070
+ export declare type PatchEvent = {
2071
+ type: 'patch'
2072
+ patch: Patch
2073
+ }
2074
+
413
2075
  /** @beta */
414
2076
  export declare type PatchObservable = Observable<{
415
2077
  patches: Patch[]
@@ -477,6 +2139,11 @@ export declare type PortableTextEditableProps = Omit<
477
2139
  * @public
478
2140
  */
479
2141
  export declare class PortableTextEditor extends Component<PortableTextEditorProps> {
2142
+ /**
2143
+ * @internal
2144
+ * Don't use this API directly. It's subject to change.
2145
+ */
2146
+ editorActor: EditorActor
480
2147
  /**
481
2148
  * An observable of all the editor changes.
482
2149
  */