@portabletext/editor 1.48.9 → 1.48.11

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 (80) hide show
  1. package/lib/_chunks-cjs/editor-provider.cjs +879 -169
  2. package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
  3. package/lib/_chunks-cjs/selector.get-focus-inline-object.cjs +2 -2
  4. package/lib/_chunks-cjs/selector.get-focus-inline-object.cjs.map +1 -1
  5. package/lib/_chunks-cjs/selector.get-text-before.cjs +2 -2
  6. package/lib/_chunks-cjs/selector.get-text-before.cjs.map +1 -1
  7. package/lib/_chunks-cjs/selector.is-selecting-entire-blocks.cjs +464 -19
  8. package/lib/_chunks-cjs/selector.is-selecting-entire-blocks.cjs.map +1 -1
  9. package/lib/_chunks-cjs/util.selection-point-to-block-offset.cjs +9 -1
  10. package/lib/_chunks-cjs/util.selection-point-to-block-offset.cjs.map +1 -1
  11. package/lib/_chunks-cjs/util.slice-blocks.cjs +2 -2
  12. package/lib/_chunks-es/editor-provider.js +773 -65
  13. package/lib/_chunks-es/editor-provider.js.map +1 -1
  14. package/lib/_chunks-es/selector.get-focus-inline-object.js +1 -1
  15. package/lib/_chunks-es/selector.get-text-before.js +1 -1
  16. package/lib/_chunks-es/selector.is-selecting-entire-blocks.js +448 -3
  17. package/lib/_chunks-es/selector.is-selecting-entire-blocks.js.map +1 -1
  18. package/lib/_chunks-es/util.selection-point-to-block-offset.js +9 -1
  19. package/lib/_chunks-es/util.selection-point-to-block-offset.js.map +1 -1
  20. package/lib/_chunks-es/util.slice-blocks.js +2 -2
  21. package/lib/behaviors/index.cjs +27 -377
  22. package/lib/behaviors/index.cjs.map +1 -1
  23. package/lib/behaviors/index.d.cts +3696 -13915
  24. package/lib/behaviors/index.d.ts +3696 -13915
  25. package/lib/behaviors/index.js +22 -377
  26. package/lib/behaviors/index.js.map +1 -1
  27. package/lib/index.cjs +17 -17
  28. package/lib/index.cjs.map +1 -1
  29. package/lib/index.d.cts +3008 -394
  30. package/lib/index.d.ts +3008 -394
  31. package/lib/index.js +4 -5
  32. package/lib/index.js.map +1 -1
  33. package/lib/plugins/index.cjs +347 -30
  34. package/lib/plugins/index.cjs.map +1 -1
  35. package/lib/plugins/index.d.cts +3008 -395
  36. package/lib/plugins/index.d.ts +3008 -395
  37. package/lib/plugins/index.js +324 -8
  38. package/lib/plugins/index.js.map +1 -1
  39. package/lib/selectors/index.cjs +29 -29
  40. package/lib/selectors/index.cjs.map +1 -1
  41. package/lib/selectors/index.d.cts +3007 -387
  42. package/lib/selectors/index.d.ts +3007 -387
  43. package/lib/selectors/index.js +2 -3
  44. package/lib/selectors/index.js.map +1 -1
  45. package/lib/utils/index.cjs +5 -5
  46. package/lib/utils/index.cjs.map +1 -1
  47. package/lib/utils/index.d.cts +3008 -389
  48. package/lib/utils/index.d.ts +3008 -389
  49. package/lib/utils/index.js +2 -3
  50. package/lib/utils/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/behaviors/behavior.emoji-picker.ts +0 -6
  53. package/src/behaviors/behavior.markdown.ts +0 -48
  54. package/src/behaviors/index.ts +0 -15
  55. package/src/editor/create-editor.ts +0 -3
  56. package/src/editor/editor-machine.ts +105 -52
  57. package/src/editor/sync-machine.ts +10 -4
  58. package/src/internal-utils/__tests__/operationToPatches.test.ts +0 -2
  59. package/src/internal-utils/__tests__/patchToOperations.test.ts +0 -2
  60. package/src/plugins/plugin.core.tsx +1 -1
  61. package/lib/_chunks-cjs/behavior.core.cjs +0 -700
  62. package/lib/_chunks-cjs/behavior.core.cjs.map +0 -1
  63. package/lib/_chunks-cjs/behavior.markdown.cjs +0 -321
  64. package/lib/_chunks-cjs/behavior.markdown.cjs.map +0 -1
  65. package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs +0 -449
  66. package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs.map +0 -1
  67. package/lib/_chunks-cjs/util.get-selection-start-point.cjs +0 -10
  68. package/lib/_chunks-cjs/util.get-selection-start-point.cjs.map +0 -1
  69. package/lib/_chunks-es/behavior.core.js +0 -703
  70. package/lib/_chunks-es/behavior.core.js.map +0 -1
  71. package/lib/_chunks-es/behavior.markdown.js +0 -325
  72. package/lib/_chunks-es/behavior.markdown.js.map +0 -1
  73. package/lib/_chunks-es/selector.is-overlapping-selection.js +0 -451
  74. package/lib/_chunks-es/selector.is-overlapping-selection.js.map +0 -1
  75. package/lib/_chunks-es/util.get-selection-start-point.js +0 -11
  76. package/lib/_chunks-es/util.get-selection-start-point.js.map +0 -1
  77. package/src/behaviors/behavior.code-editor.ts +0 -77
  78. package/src/behaviors/behavior.links.ts +0 -84
  79. package/src/internal-utils/looks-like-url.test.ts +0 -19
  80. package/src/internal-utils/looks-like-url.ts +0 -15
@@ -4,7 +4,6 @@ import type {
4
4
  BlockDecoratorDefinition,
5
5
  BlockListDefinition,
6
6
  BlockStyleDefinition,
7
- KeyedSegment,
8
7
  ObjectSchemaType,
9
8
  Path,
10
9
  PortableTextBlock,
@@ -14,12 +13,14 @@ import type {
14
13
  PortableTextSpan,
15
14
  PortableTextTextBlock,
16
15
  } from '@sanity/types'
16
+ import {KeyedSegment} from '@sanity/types'
17
17
  import type {
18
18
  FocusEvent as FocusEvent_2,
19
19
  KeyboardEvent as KeyboardEvent_2,
20
20
  } from 'react'
21
21
  import {JSX, default as React_2} from 'react'
22
- import type {Descendant, Operation, TextUnit} from 'slate'
22
+ import type {Descendant, Operation} from 'slate'
23
+ import {TextUnit} from 'slate'
23
24
  import type {DOMNode} from 'slate-dom'
24
25
  import type {ReactEditor} from 'slate-react'
25
26
  import {
@@ -44,6 +45,22 @@ import {
44
45
  } from 'xstate'
45
46
  import type {EventObject, Snapshot} from 'xstate'
46
47
  import {GuardArgs} from 'xstate/guards'
48
+ import {BlockOffset as BlockOffset_2} from '..'
49
+ import {
50
+ CustomBehaviorEvent as CustomBehaviorEvent_2,
51
+ NativeBehaviorEvent as NativeBehaviorEvent_2,
52
+ } from '../behaviors'
53
+ import {
54
+ InputBehaviorEvent as InputBehaviorEvent_2,
55
+ InsertPlacement as InsertPlacement_2,
56
+ MouseBehaviorEvent as MouseBehaviorEvent_2,
57
+ } from '../behaviors/behavior.types.event'
58
+ import {MIMEType as MIMEType_2} from '../internal-utils/mime-type'
59
+ import {
60
+ PickFromUnion as PickFromUnion_2,
61
+ StrictExtract as StrictExtract_2,
62
+ } from '../type-utils'
63
+ import {BlockWithOptionalKey as BlockWithOptionalKey_2} from '../types/block-with-optional-key'
47
64
 
48
65
  declare type AbstractBehaviorEvent =
49
66
  | {
@@ -674,6 +691,7 @@ declare const editorMachine: StateMachine<
674
691
  getLegacySchema: () => PortableTextMemberSchemaTypes
675
692
  keyGenerator: () => string
676
693
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
694
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
677
695
  schema: EditorSchema
678
696
  initialReadOnly: boolean
679
697
  maxBlocks: number | undefined
@@ -687,6 +705,7 @@ declare const editorMachine: StateMachine<
687
705
  },
688
706
  | InternalPatchEvent
689
707
  | MutationEvent
708
+ | PatchesEvent
690
709
  | {
691
710
  type: 'add behavior'
692
711
  behavior: Behavior
@@ -703,10 +722,6 @@ declare const editorMachine: StateMachine<
703
722
  type: 'update schema'
704
723
  schema: EditorSchema
705
724
  }
706
- | {
707
- type: 'update behaviors'
708
- behaviors: Array<Behavior>
709
- }
710
725
  | {
711
726
  type: 'update key generator'
712
727
  keyGenerator: () => string
@@ -719,7 +734,6 @@ declare const editorMachine: StateMachine<
719
734
  type: 'update maxBlocks'
720
735
  maxBlocks: number | undefined
721
736
  }
722
- | PatchesEvent
723
737
  | {
724
738
  type: 'blur'
725
739
  editor: PortableTextSlateEditor
@@ -735,7 +749,10 @@ declare const editorMachine: StateMachine<
735
749
  type: 'done normalizing'
736
750
  }
737
751
  | {
738
- type: 'done syncing initial value'
752
+ type: 'done syncing value'
753
+ }
754
+ | {
755
+ type: 'syncing value'
739
756
  }
740
757
  | {
741
758
  type: 'behavior event'
@@ -823,10 +840,6 @@ declare const editorMachine: StateMachine<
823
840
  type: 'remove behavior from context'
824
841
  params: NonReducibleUnknown
825
842
  }
826
- 'assign behaviors': {
827
- type: 'assign behaviors'
828
- params: NonReducibleUnknown
829
- }
830
843
  'assign schema': {
831
844
  type: 'assign schema'
832
845
  params: NonReducibleUnknown
@@ -863,6 +876,18 @@ declare const editorMachine: StateMachine<
863
876
  type: 'clear pending events'
864
877
  params: NonReducibleUnknown
865
878
  }
879
+ 'defer incoming patches': {
880
+ type: 'defer incoming patches'
881
+ params: NonReducibleUnknown
882
+ }
883
+ 'emit pending incoming patches': {
884
+ type: 'emit pending incoming patches'
885
+ params: NonReducibleUnknown
886
+ }
887
+ 'clear pending incoming patches': {
888
+ type: 'clear pending incoming patches'
889
+ params: NonReducibleUnknown
890
+ }
866
891
  'handle blur': {
867
892
  type: 'handle blur'
868
893
  params: unknown
@@ -896,14 +921,19 @@ declare const editorMachine: StateMachine<
896
921
  }
897
922
  'setup':
898
923
  | 'setting up'
899
- | 'dirty'
900
924
  | {
901
- pristine: 'normalizing' | 'idle'
925
+ 'set up': {
926
+ 'value sync': 'syncing value' | 'idle'
927
+ 'writing':
928
+ | 'dirty'
929
+ | {
930
+ pristine: 'normalizing' | 'idle'
931
+ }
932
+ }
902
933
  }
903
934
  },
904
935
  'dragging internally',
905
936
  {
906
- behaviors?: Array<Behavior>
907
937
  converters?: Array<Converter>
908
938
  getLegacySchema: () => PortableTextMemberSchemaTypes
909
939
  keyGenerator: () => string
@@ -989,7 +1019,6 @@ declare const editorMachine: StateMachine<
989
1019
  ): ActorRefFromLogic<TLogic>
990
1020
  }
991
1021
  input: {
992
- behaviors?: Array<Behavior>
993
1022
  converters?: Array<Converter>
994
1023
  getLegacySchema: () => PortableTextMemberSchemaTypes
995
1024
  keyGenerator: () => string
@@ -1006,6 +1035,7 @@ declare const editorMachine: StateMachine<
1006
1035
  getLegacySchema: () => PortableTextMemberSchemaTypes
1007
1036
  keyGenerator: () => string
1008
1037
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
1038
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1009
1039
  schema: EditorSchema
1010
1040
  initialReadOnly: boolean
1011
1041
  maxBlocks: number | undefined
@@ -1019,6 +1049,7 @@ declare const editorMachine: StateMachine<
1019
1049
  },
1020
1050
  | InternalPatchEvent
1021
1051
  | MutationEvent
1052
+ | PatchesEvent
1022
1053
  | {
1023
1054
  type: 'add behavior'
1024
1055
  behavior: Behavior
@@ -1035,10 +1066,6 @@ declare const editorMachine: StateMachine<
1035
1066
  type: 'update schema'
1036
1067
  schema: EditorSchema
1037
1068
  }
1038
- | {
1039
- type: 'update behaviors'
1040
- behaviors: Array<Behavior>
1041
- }
1042
1069
  | {
1043
1070
  type: 'update key generator'
1044
1071
  keyGenerator: () => string
@@ -1051,7 +1078,6 @@ declare const editorMachine: StateMachine<
1051
1078
  type: 'update maxBlocks'
1052
1079
  maxBlocks: number | undefined
1053
1080
  }
1054
- | PatchesEvent
1055
1081
  | {
1056
1082
  type: 'blur'
1057
1083
  editor: PortableTextSlateEditor
@@ -1067,7 +1093,10 @@ declare const editorMachine: StateMachine<
1067
1093
  type: 'done normalizing'
1068
1094
  }
1069
1095
  | {
1070
- type: 'done syncing initial value'
1096
+ type: 'done syncing value'
1097
+ }
1098
+ | {
1099
+ type: 'syncing value'
1071
1100
  }
1072
1101
  | {
1073
1102
  type: 'behavior event'
@@ -1153,6 +1182,7 @@ declare const editorMachine: StateMachine<
1153
1182
  >,
1154
1183
  | InternalPatchEvent
1155
1184
  | MutationEvent
1185
+ | PatchesEvent
1156
1186
  | {
1157
1187
  type: 'add behavior'
1158
1188
  behavior: Behavior
@@ -1169,10 +1199,6 @@ declare const editorMachine: StateMachine<
1169
1199
  type: 'update schema'
1170
1200
  schema: EditorSchema
1171
1201
  }
1172
- | {
1173
- type: 'update behaviors'
1174
- behaviors: Array<Behavior>
1175
- }
1176
1202
  | {
1177
1203
  type: 'update key generator'
1178
1204
  keyGenerator: () => string
@@ -1185,7 +1211,6 @@ declare const editorMachine: StateMachine<
1185
1211
  type: 'update maxBlocks'
1186
1212
  maxBlocks: number | undefined
1187
1213
  }
1188
- | PatchesEvent
1189
1214
  | {
1190
1215
  type: 'blur'
1191
1216
  editor: PortableTextSlateEditor
@@ -1201,7 +1226,10 @@ declare const editorMachine: StateMachine<
1201
1226
  type: 'done normalizing'
1202
1227
  }
1203
1228
  | {
1204
- type: 'done syncing initial value'
1229
+ type: 'done syncing value'
1230
+ }
1231
+ | {
1232
+ type: 'syncing value'
1205
1233
  }
1206
1234
  | {
1207
1235
  type: 'behavior event'
@@ -1281,11 +1309,2555 @@ declare const editorMachine: StateMachine<
1281
1309
  AnyEventObject
1282
1310
  >
1283
1311
  }) => {
1284
- behaviors: Set<Behavior>
1312
+ behaviors: Set<
1313
+ Behavior<
1314
+ | 'serialize'
1315
+ | 'clipboard.copy'
1316
+ | 'clipboard.cut'
1317
+ | 'drag.dragstart'
1318
+ | 'serialization.failure'
1319
+ | 'serialization.success'
1320
+ | 'deserialize'
1321
+ | 'deserialization.failure'
1322
+ | 'deserialization.success'
1323
+ | 'split'
1324
+ | 'delete'
1325
+ | 'select'
1326
+ | '*'
1327
+ | 'annotation.add'
1328
+ | 'annotation.remove'
1329
+ | 'block.set'
1330
+ | 'block.unset'
1331
+ | 'decorator.add'
1332
+ | 'decorator.remove'
1333
+ | 'delete.backward'
1334
+ | 'delete.block'
1335
+ | 'delete.forward'
1336
+ | 'history.redo'
1337
+ | 'history.undo'
1338
+ | 'insert.inline object'
1339
+ | 'insert.block'
1340
+ | 'insert.span'
1341
+ | 'insert.text'
1342
+ | 'move.backward'
1343
+ | 'move.block'
1344
+ | 'move.forward'
1345
+ | 'annotation.toggle'
1346
+ | 'decorator.toggle'
1347
+ | 'delete.text'
1348
+ | 'insert.blocks'
1349
+ | 'insert.break'
1350
+ | 'insert.soft break'
1351
+ | 'list item.add'
1352
+ | 'list item.remove'
1353
+ | 'list item.toggle'
1354
+ | 'move.block down'
1355
+ | 'move.block up'
1356
+ | 'select.previous block'
1357
+ | 'select.next block'
1358
+ | 'style.add'
1359
+ | 'style.remove'
1360
+ | 'style.toggle'
1361
+ | 'clipboard.paste'
1362
+ | 'drag.drag'
1363
+ | 'drag.dragend'
1364
+ | 'drag.dragenter'
1365
+ | 'drag.dragover'
1366
+ | 'drag.dragleave'
1367
+ | 'drag.drop'
1368
+ | 'input.*'
1369
+ | 'keyboard.keydown'
1370
+ | 'keyboard.keyup'
1371
+ | 'mouse.click'
1372
+ | 'serialize.*'
1373
+ | 'deserialize.*'
1374
+ | 'split.*'
1375
+ | 'block.*'
1376
+ | 'style.*'
1377
+ | 'delete.*'
1378
+ | 'move.*'
1379
+ | 'select.*'
1380
+ | 'history.*'
1381
+ | 'serialization.*'
1382
+ | 'deserialization.*'
1383
+ | 'annotation.*'
1384
+ | 'decorator.*'
1385
+ | 'insert.*'
1386
+ | 'list item.*'
1387
+ | 'clipboard.*'
1388
+ | 'drag.*'
1389
+ | 'keyboard.*'
1390
+ | 'mouse.*'
1391
+ | `custom.${string}`,
1392
+ true,
1393
+ | {
1394
+ type: StrictExtract_2<
1395
+ | 'serialize'
1396
+ | 'serialization.failure'
1397
+ | 'serialization.success'
1398
+ | 'deserialize'
1399
+ | 'deserialization.failure'
1400
+ | 'deserialization.success'
1401
+ | 'split'
1402
+ | 'delete'
1403
+ | 'select'
1404
+ | 'annotation.add'
1405
+ | 'annotation.remove'
1406
+ | 'block.set'
1407
+ | 'block.unset'
1408
+ | 'decorator.add'
1409
+ | 'decorator.remove'
1410
+ | 'delete.backward'
1411
+ | 'delete.block'
1412
+ | 'delete.forward'
1413
+ | 'history.redo'
1414
+ | 'history.undo'
1415
+ | 'insert.inline object'
1416
+ | 'insert.block'
1417
+ | 'insert.span'
1418
+ | 'insert.text'
1419
+ | 'move.backward'
1420
+ | 'move.block'
1421
+ | 'move.forward'
1422
+ | 'annotation.toggle'
1423
+ | 'decorator.toggle'
1424
+ | 'delete.text'
1425
+ | 'insert.blocks'
1426
+ | 'insert.break'
1427
+ | 'insert.soft break'
1428
+ | 'list item.add'
1429
+ | 'list item.remove'
1430
+ | 'list item.toggle'
1431
+ | 'move.block down'
1432
+ | 'move.block up'
1433
+ | 'select.previous block'
1434
+ | 'select.next block'
1435
+ | 'style.add'
1436
+ | 'style.remove'
1437
+ | 'style.toggle',
1438
+ 'annotation.add'
1439
+ >
1440
+ annotation: {
1441
+ name: string
1442
+ value: {
1443
+ [prop: string]: unknown
1444
+ }
1445
+ }
1446
+ }
1447
+ | {
1448
+ type: StrictExtract_2<
1449
+ | 'serialize'
1450
+ | 'serialization.failure'
1451
+ | 'serialization.success'
1452
+ | 'deserialize'
1453
+ | 'deserialization.failure'
1454
+ | 'deserialization.success'
1455
+ | 'split'
1456
+ | 'delete'
1457
+ | 'select'
1458
+ | 'annotation.add'
1459
+ | 'annotation.remove'
1460
+ | 'block.set'
1461
+ | 'block.unset'
1462
+ | 'decorator.add'
1463
+ | 'decorator.remove'
1464
+ | 'delete.backward'
1465
+ | 'delete.block'
1466
+ | 'delete.forward'
1467
+ | 'history.redo'
1468
+ | 'history.undo'
1469
+ | 'insert.inline object'
1470
+ | 'insert.block'
1471
+ | 'insert.span'
1472
+ | 'insert.text'
1473
+ | 'move.backward'
1474
+ | 'move.block'
1475
+ | 'move.forward'
1476
+ | 'annotation.toggle'
1477
+ | 'decorator.toggle'
1478
+ | 'delete.text'
1479
+ | 'insert.blocks'
1480
+ | 'insert.break'
1481
+ | 'insert.soft break'
1482
+ | 'list item.add'
1483
+ | 'list item.remove'
1484
+ | 'list item.toggle'
1485
+ | 'move.block down'
1486
+ | 'move.block up'
1487
+ | 'select.previous block'
1488
+ | 'select.next block'
1489
+ | 'style.add'
1490
+ | 'style.remove'
1491
+ | 'style.toggle',
1492
+ 'annotation.remove'
1493
+ >
1494
+ annotation: {
1495
+ name: string
1496
+ }
1497
+ }
1498
+ | {
1499
+ type: StrictExtract_2<
1500
+ | 'serialize'
1501
+ | 'serialization.failure'
1502
+ | 'serialization.success'
1503
+ | 'deserialize'
1504
+ | 'deserialization.failure'
1505
+ | 'deserialization.success'
1506
+ | 'split'
1507
+ | 'delete'
1508
+ | 'select'
1509
+ | 'annotation.add'
1510
+ | 'annotation.remove'
1511
+ | 'block.set'
1512
+ | 'block.unset'
1513
+ | 'decorator.add'
1514
+ | 'decorator.remove'
1515
+ | 'delete.backward'
1516
+ | 'delete.block'
1517
+ | 'delete.forward'
1518
+ | 'history.redo'
1519
+ | 'history.undo'
1520
+ | 'insert.inline object'
1521
+ | 'insert.block'
1522
+ | 'insert.span'
1523
+ | 'insert.text'
1524
+ | 'move.backward'
1525
+ | 'move.block'
1526
+ | 'move.forward'
1527
+ | 'annotation.toggle'
1528
+ | 'decorator.toggle'
1529
+ | 'delete.text'
1530
+ | 'insert.blocks'
1531
+ | 'insert.break'
1532
+ | 'insert.soft break'
1533
+ | 'list item.add'
1534
+ | 'list item.remove'
1535
+ | 'list item.toggle'
1536
+ | 'move.block down'
1537
+ | 'move.block up'
1538
+ | 'select.previous block'
1539
+ | 'select.next block'
1540
+ | 'style.add'
1541
+ | 'style.remove'
1542
+ | 'style.toggle',
1543
+ 'block.set'
1544
+ >
1545
+ at: [KeyedSegment]
1546
+ props: Record<string, unknown>
1547
+ }
1548
+ | {
1549
+ type: StrictExtract_2<
1550
+ | 'serialize'
1551
+ | 'serialization.failure'
1552
+ | 'serialization.success'
1553
+ | 'deserialize'
1554
+ | 'deserialization.failure'
1555
+ | 'deserialization.success'
1556
+ | 'split'
1557
+ | 'delete'
1558
+ | 'select'
1559
+ | 'annotation.add'
1560
+ | 'annotation.remove'
1561
+ | 'block.set'
1562
+ | 'block.unset'
1563
+ | 'decorator.add'
1564
+ | 'decorator.remove'
1565
+ | 'delete.backward'
1566
+ | 'delete.block'
1567
+ | 'delete.forward'
1568
+ | 'history.redo'
1569
+ | 'history.undo'
1570
+ | 'insert.inline object'
1571
+ | 'insert.block'
1572
+ | 'insert.span'
1573
+ | 'insert.text'
1574
+ | 'move.backward'
1575
+ | 'move.block'
1576
+ | 'move.forward'
1577
+ | 'annotation.toggle'
1578
+ | 'decorator.toggle'
1579
+ | 'delete.text'
1580
+ | 'insert.blocks'
1581
+ | 'insert.break'
1582
+ | 'insert.soft break'
1583
+ | 'list item.add'
1584
+ | 'list item.remove'
1585
+ | 'list item.toggle'
1586
+ | 'move.block down'
1587
+ | 'move.block up'
1588
+ | 'select.previous block'
1589
+ | 'select.next block'
1590
+ | 'style.add'
1591
+ | 'style.remove'
1592
+ | 'style.toggle',
1593
+ 'block.unset'
1594
+ >
1595
+ at: [KeyedSegment]
1596
+ props: Array<string>
1597
+ }
1598
+ | {
1599
+ type: StrictExtract_2<
1600
+ | 'serialize'
1601
+ | 'serialization.failure'
1602
+ | 'serialization.success'
1603
+ | 'deserialize'
1604
+ | 'deserialization.failure'
1605
+ | 'deserialization.success'
1606
+ | 'split'
1607
+ | 'delete'
1608
+ | 'select'
1609
+ | 'annotation.add'
1610
+ | 'annotation.remove'
1611
+ | 'block.set'
1612
+ | 'block.unset'
1613
+ | 'decorator.add'
1614
+ | 'decorator.remove'
1615
+ | 'delete.backward'
1616
+ | 'delete.block'
1617
+ | 'delete.forward'
1618
+ | 'history.redo'
1619
+ | 'history.undo'
1620
+ | 'insert.inline object'
1621
+ | 'insert.block'
1622
+ | 'insert.span'
1623
+ | 'insert.text'
1624
+ | 'move.backward'
1625
+ | 'move.block'
1626
+ | 'move.forward'
1627
+ | 'annotation.toggle'
1628
+ | 'decorator.toggle'
1629
+ | 'delete.text'
1630
+ | 'insert.blocks'
1631
+ | 'insert.break'
1632
+ | 'insert.soft break'
1633
+ | 'list item.add'
1634
+ | 'list item.remove'
1635
+ | 'list item.toggle'
1636
+ | 'move.block down'
1637
+ | 'move.block up'
1638
+ | 'select.previous block'
1639
+ | 'select.next block'
1640
+ | 'style.add'
1641
+ | 'style.remove'
1642
+ | 'style.toggle',
1643
+ 'decorator.add'
1644
+ >
1645
+ decorator: string
1646
+ at?: {
1647
+ anchor: BlockOffset_2
1648
+ focus: BlockOffset_2
1649
+ }
1650
+ }
1651
+ | {
1652
+ type: StrictExtract_2<
1653
+ | 'serialize'
1654
+ | 'serialization.failure'
1655
+ | 'serialization.success'
1656
+ | 'deserialize'
1657
+ | 'deserialization.failure'
1658
+ | 'deserialization.success'
1659
+ | 'split'
1660
+ | 'delete'
1661
+ | 'select'
1662
+ | 'annotation.add'
1663
+ | 'annotation.remove'
1664
+ | 'block.set'
1665
+ | 'block.unset'
1666
+ | 'decorator.add'
1667
+ | 'decorator.remove'
1668
+ | 'delete.backward'
1669
+ | 'delete.block'
1670
+ | 'delete.forward'
1671
+ | 'history.redo'
1672
+ | 'history.undo'
1673
+ | 'insert.inline object'
1674
+ | 'insert.block'
1675
+ | 'insert.span'
1676
+ | 'insert.text'
1677
+ | 'move.backward'
1678
+ | 'move.block'
1679
+ | 'move.forward'
1680
+ | 'annotation.toggle'
1681
+ | 'decorator.toggle'
1682
+ | 'delete.text'
1683
+ | 'insert.blocks'
1684
+ | 'insert.break'
1685
+ | 'insert.soft break'
1686
+ | 'list item.add'
1687
+ | 'list item.remove'
1688
+ | 'list item.toggle'
1689
+ | 'move.block down'
1690
+ | 'move.block up'
1691
+ | 'select.previous block'
1692
+ | 'select.next block'
1693
+ | 'style.add'
1694
+ | 'style.remove'
1695
+ | 'style.toggle',
1696
+ 'decorator.remove'
1697
+ >
1698
+ decorator: string
1699
+ }
1700
+ | {
1701
+ type: StrictExtract_2<
1702
+ | 'serialize'
1703
+ | 'serialization.failure'
1704
+ | 'serialization.success'
1705
+ | 'deserialize'
1706
+ | 'deserialization.failure'
1707
+ | 'deserialization.success'
1708
+ | 'split'
1709
+ | 'delete'
1710
+ | 'select'
1711
+ | 'annotation.add'
1712
+ | 'annotation.remove'
1713
+ | 'block.set'
1714
+ | 'block.unset'
1715
+ | 'decorator.add'
1716
+ | 'decorator.remove'
1717
+ | 'delete.backward'
1718
+ | 'delete.block'
1719
+ | 'delete.forward'
1720
+ | 'history.redo'
1721
+ | 'history.undo'
1722
+ | 'insert.inline object'
1723
+ | 'insert.block'
1724
+ | 'insert.span'
1725
+ | 'insert.text'
1726
+ | 'move.backward'
1727
+ | 'move.block'
1728
+ | 'move.forward'
1729
+ | 'annotation.toggle'
1730
+ | 'decorator.toggle'
1731
+ | 'delete.text'
1732
+ | 'insert.blocks'
1733
+ | 'insert.break'
1734
+ | 'insert.soft break'
1735
+ | 'list item.add'
1736
+ | 'list item.remove'
1737
+ | 'list item.toggle'
1738
+ | 'move.block down'
1739
+ | 'move.block up'
1740
+ | 'select.previous block'
1741
+ | 'select.next block'
1742
+ | 'style.add'
1743
+ | 'style.remove'
1744
+ | 'style.toggle',
1745
+ 'delete'
1746
+ >
1747
+ at: NonNullable<EditorSelection>
1748
+ }
1749
+ | {
1750
+ type: StrictExtract_2<
1751
+ | 'serialize'
1752
+ | 'serialization.failure'
1753
+ | 'serialization.success'
1754
+ | 'deserialize'
1755
+ | 'deserialization.failure'
1756
+ | 'deserialization.success'
1757
+ | 'split'
1758
+ | 'delete'
1759
+ | 'select'
1760
+ | 'annotation.add'
1761
+ | 'annotation.remove'
1762
+ | 'block.set'
1763
+ | 'block.unset'
1764
+ | 'decorator.add'
1765
+ | 'decorator.remove'
1766
+ | 'delete.backward'
1767
+ | 'delete.block'
1768
+ | 'delete.forward'
1769
+ | 'history.redo'
1770
+ | 'history.undo'
1771
+ | 'insert.inline object'
1772
+ | 'insert.block'
1773
+ | 'insert.span'
1774
+ | 'insert.text'
1775
+ | 'move.backward'
1776
+ | 'move.block'
1777
+ | 'move.forward'
1778
+ | 'annotation.toggle'
1779
+ | 'decorator.toggle'
1780
+ | 'delete.text'
1781
+ | 'insert.blocks'
1782
+ | 'insert.break'
1783
+ | 'insert.soft break'
1784
+ | 'list item.add'
1785
+ | 'list item.remove'
1786
+ | 'list item.toggle'
1787
+ | 'move.block down'
1788
+ | 'move.block up'
1789
+ | 'select.previous block'
1790
+ | 'select.next block'
1791
+ | 'style.add'
1792
+ | 'style.remove'
1793
+ | 'style.toggle',
1794
+ 'delete.backward'
1795
+ >
1796
+ unit: TextUnit
1797
+ }
1798
+ | {
1799
+ type: StrictExtract_2<
1800
+ | 'serialize'
1801
+ | 'serialization.failure'
1802
+ | 'serialization.success'
1803
+ | 'deserialize'
1804
+ | 'deserialization.failure'
1805
+ | 'deserialization.success'
1806
+ | 'split'
1807
+ | 'delete'
1808
+ | 'select'
1809
+ | 'annotation.add'
1810
+ | 'annotation.remove'
1811
+ | 'block.set'
1812
+ | 'block.unset'
1813
+ | 'decorator.add'
1814
+ | 'decorator.remove'
1815
+ | 'delete.backward'
1816
+ | 'delete.block'
1817
+ | 'delete.forward'
1818
+ | 'history.redo'
1819
+ | 'history.undo'
1820
+ | 'insert.inline object'
1821
+ | 'insert.block'
1822
+ | 'insert.span'
1823
+ | 'insert.text'
1824
+ | 'move.backward'
1825
+ | 'move.block'
1826
+ | 'move.forward'
1827
+ | 'annotation.toggle'
1828
+ | 'decorator.toggle'
1829
+ | 'delete.text'
1830
+ | 'insert.blocks'
1831
+ | 'insert.break'
1832
+ | 'insert.soft break'
1833
+ | 'list item.add'
1834
+ | 'list item.remove'
1835
+ | 'list item.toggle'
1836
+ | 'move.block down'
1837
+ | 'move.block up'
1838
+ | 'select.previous block'
1839
+ | 'select.next block'
1840
+ | 'style.add'
1841
+ | 'style.remove'
1842
+ | 'style.toggle',
1843
+ 'delete.block'
1844
+ >
1845
+ at: [KeyedSegment]
1846
+ }
1847
+ | {
1848
+ type: StrictExtract_2<
1849
+ | 'serialize'
1850
+ | 'serialization.failure'
1851
+ | 'serialization.success'
1852
+ | 'deserialize'
1853
+ | 'deserialization.failure'
1854
+ | 'deserialization.success'
1855
+ | 'split'
1856
+ | 'delete'
1857
+ | 'select'
1858
+ | 'annotation.add'
1859
+ | 'annotation.remove'
1860
+ | 'block.set'
1861
+ | 'block.unset'
1862
+ | 'decorator.add'
1863
+ | 'decorator.remove'
1864
+ | 'delete.backward'
1865
+ | 'delete.block'
1866
+ | 'delete.forward'
1867
+ | 'history.redo'
1868
+ | 'history.undo'
1869
+ | 'insert.inline object'
1870
+ | 'insert.block'
1871
+ | 'insert.span'
1872
+ | 'insert.text'
1873
+ | 'move.backward'
1874
+ | 'move.block'
1875
+ | 'move.forward'
1876
+ | 'annotation.toggle'
1877
+ | 'decorator.toggle'
1878
+ | 'delete.text'
1879
+ | 'insert.blocks'
1880
+ | 'insert.break'
1881
+ | 'insert.soft break'
1882
+ | 'list item.add'
1883
+ | 'list item.remove'
1884
+ | 'list item.toggle'
1885
+ | 'move.block down'
1886
+ | 'move.block up'
1887
+ | 'select.previous block'
1888
+ | 'select.next block'
1889
+ | 'style.add'
1890
+ | 'style.remove'
1891
+ | 'style.toggle',
1892
+ 'delete.forward'
1893
+ >
1894
+ unit: TextUnit
1895
+ }
1896
+ | {
1897
+ type: StrictExtract_2<
1898
+ | 'serialize'
1899
+ | 'serialization.failure'
1900
+ | 'serialization.success'
1901
+ | 'deserialize'
1902
+ | 'deserialization.failure'
1903
+ | 'deserialization.success'
1904
+ | 'split'
1905
+ | 'delete'
1906
+ | 'select'
1907
+ | 'annotation.add'
1908
+ | 'annotation.remove'
1909
+ | 'block.set'
1910
+ | 'block.unset'
1911
+ | 'decorator.add'
1912
+ | 'decorator.remove'
1913
+ | 'delete.backward'
1914
+ | 'delete.block'
1915
+ | 'delete.forward'
1916
+ | 'history.redo'
1917
+ | 'history.undo'
1918
+ | 'insert.inline object'
1919
+ | 'insert.block'
1920
+ | 'insert.span'
1921
+ | 'insert.text'
1922
+ | 'move.backward'
1923
+ | 'move.block'
1924
+ | 'move.forward'
1925
+ | 'annotation.toggle'
1926
+ | 'decorator.toggle'
1927
+ | 'delete.text'
1928
+ | 'insert.blocks'
1929
+ | 'insert.break'
1930
+ | 'insert.soft break'
1931
+ | 'list item.add'
1932
+ | 'list item.remove'
1933
+ | 'list item.toggle'
1934
+ | 'move.block down'
1935
+ | 'move.block up'
1936
+ | 'select.previous block'
1937
+ | 'select.next block'
1938
+ | 'style.add'
1939
+ | 'style.remove'
1940
+ | 'style.toggle',
1941
+ 'history.redo'
1942
+ >
1943
+ }
1944
+ | {
1945
+ type: StrictExtract_2<
1946
+ | 'serialize'
1947
+ | 'serialization.failure'
1948
+ | 'serialization.success'
1949
+ | 'deserialize'
1950
+ | 'deserialization.failure'
1951
+ | 'deserialization.success'
1952
+ | 'split'
1953
+ | 'delete'
1954
+ | 'select'
1955
+ | 'annotation.add'
1956
+ | 'annotation.remove'
1957
+ | 'block.set'
1958
+ | 'block.unset'
1959
+ | 'decorator.add'
1960
+ | 'decorator.remove'
1961
+ | 'delete.backward'
1962
+ | 'delete.block'
1963
+ | 'delete.forward'
1964
+ | 'history.redo'
1965
+ | 'history.undo'
1966
+ | 'insert.inline object'
1967
+ | 'insert.block'
1968
+ | 'insert.span'
1969
+ | 'insert.text'
1970
+ | 'move.backward'
1971
+ | 'move.block'
1972
+ | 'move.forward'
1973
+ | 'annotation.toggle'
1974
+ | 'decorator.toggle'
1975
+ | 'delete.text'
1976
+ | 'insert.blocks'
1977
+ | 'insert.break'
1978
+ | 'insert.soft break'
1979
+ | 'list item.add'
1980
+ | 'list item.remove'
1981
+ | 'list item.toggle'
1982
+ | 'move.block down'
1983
+ | 'move.block up'
1984
+ | 'select.previous block'
1985
+ | 'select.next block'
1986
+ | 'style.add'
1987
+ | 'style.remove'
1988
+ | 'style.toggle',
1989
+ 'history.undo'
1990
+ >
1991
+ }
1992
+ | {
1993
+ type: StrictExtract_2<
1994
+ | 'serialize'
1995
+ | 'serialization.failure'
1996
+ | 'serialization.success'
1997
+ | 'deserialize'
1998
+ | 'deserialization.failure'
1999
+ | 'deserialization.success'
2000
+ | 'split'
2001
+ | 'delete'
2002
+ | 'select'
2003
+ | 'annotation.add'
2004
+ | 'annotation.remove'
2005
+ | 'block.set'
2006
+ | 'block.unset'
2007
+ | 'decorator.add'
2008
+ | 'decorator.remove'
2009
+ | 'delete.backward'
2010
+ | 'delete.block'
2011
+ | 'delete.forward'
2012
+ | 'history.redo'
2013
+ | 'history.undo'
2014
+ | 'insert.inline object'
2015
+ | 'insert.block'
2016
+ | 'insert.span'
2017
+ | 'insert.text'
2018
+ | 'move.backward'
2019
+ | 'move.block'
2020
+ | 'move.forward'
2021
+ | 'annotation.toggle'
2022
+ | 'decorator.toggle'
2023
+ | 'delete.text'
2024
+ | 'insert.blocks'
2025
+ | 'insert.break'
2026
+ | 'insert.soft break'
2027
+ | 'list item.add'
2028
+ | 'list item.remove'
2029
+ | 'list item.toggle'
2030
+ | 'move.block down'
2031
+ | 'move.block up'
2032
+ | 'select.previous block'
2033
+ | 'select.next block'
2034
+ | 'style.add'
2035
+ | 'style.remove'
2036
+ | 'style.toggle',
2037
+ 'insert.inline object'
2038
+ >
2039
+ inlineObject: {
2040
+ name: string
2041
+ value?: {
2042
+ [prop: string]: unknown
2043
+ }
2044
+ }
2045
+ }
2046
+ | {
2047
+ type: StrictExtract_2<
2048
+ | 'serialize'
2049
+ | 'serialization.failure'
2050
+ | 'serialization.success'
2051
+ | 'deserialize'
2052
+ | 'deserialization.failure'
2053
+ | 'deserialization.success'
2054
+ | 'split'
2055
+ | 'delete'
2056
+ | 'select'
2057
+ | 'annotation.add'
2058
+ | 'annotation.remove'
2059
+ | 'block.set'
2060
+ | 'block.unset'
2061
+ | 'decorator.add'
2062
+ | 'decorator.remove'
2063
+ | 'delete.backward'
2064
+ | 'delete.block'
2065
+ | 'delete.forward'
2066
+ | 'history.redo'
2067
+ | 'history.undo'
2068
+ | 'insert.inline object'
2069
+ | 'insert.block'
2070
+ | 'insert.span'
2071
+ | 'insert.text'
2072
+ | 'move.backward'
2073
+ | 'move.block'
2074
+ | 'move.forward'
2075
+ | 'annotation.toggle'
2076
+ | 'decorator.toggle'
2077
+ | 'delete.text'
2078
+ | 'insert.blocks'
2079
+ | 'insert.break'
2080
+ | 'insert.soft break'
2081
+ | 'list item.add'
2082
+ | 'list item.remove'
2083
+ | 'list item.toggle'
2084
+ | 'move.block down'
2085
+ | 'move.block up'
2086
+ | 'select.previous block'
2087
+ | 'select.next block'
2088
+ | 'style.add'
2089
+ | 'style.remove'
2090
+ | 'style.toggle',
2091
+ 'insert.block'
2092
+ >
2093
+ block: BlockWithOptionalKey_2
2094
+ placement: InsertPlacement_2
2095
+ select?: 'start' | 'end' | 'none'
2096
+ }
2097
+ | {
2098
+ type: StrictExtract_2<
2099
+ | 'serialize'
2100
+ | 'serialization.failure'
2101
+ | 'serialization.success'
2102
+ | 'deserialize'
2103
+ | 'deserialization.failure'
2104
+ | 'deserialization.success'
2105
+ | 'split'
2106
+ | 'delete'
2107
+ | 'select'
2108
+ | 'annotation.add'
2109
+ | 'annotation.remove'
2110
+ | 'block.set'
2111
+ | 'block.unset'
2112
+ | 'decorator.add'
2113
+ | 'decorator.remove'
2114
+ | 'delete.backward'
2115
+ | 'delete.block'
2116
+ | 'delete.forward'
2117
+ | 'history.redo'
2118
+ | 'history.undo'
2119
+ | 'insert.inline object'
2120
+ | 'insert.block'
2121
+ | 'insert.span'
2122
+ | 'insert.text'
2123
+ | 'move.backward'
2124
+ | 'move.block'
2125
+ | 'move.forward'
2126
+ | 'annotation.toggle'
2127
+ | 'decorator.toggle'
2128
+ | 'delete.text'
2129
+ | 'insert.blocks'
2130
+ | 'insert.break'
2131
+ | 'insert.soft break'
2132
+ | 'list item.add'
2133
+ | 'list item.remove'
2134
+ | 'list item.toggle'
2135
+ | 'move.block down'
2136
+ | 'move.block up'
2137
+ | 'select.previous block'
2138
+ | 'select.next block'
2139
+ | 'style.add'
2140
+ | 'style.remove'
2141
+ | 'style.toggle',
2142
+ 'insert.span'
2143
+ >
2144
+ text: string
2145
+ annotations?: Array<{
2146
+ name: string
2147
+ value: {
2148
+ [prop: string]: unknown
2149
+ }
2150
+ }>
2151
+ decorators?: Array<string>
2152
+ }
2153
+ | {
2154
+ type: StrictExtract_2<
2155
+ | 'serialize'
2156
+ | 'serialization.failure'
2157
+ | 'serialization.success'
2158
+ | 'deserialize'
2159
+ | 'deserialization.failure'
2160
+ | 'deserialization.success'
2161
+ | 'split'
2162
+ | 'delete'
2163
+ | 'select'
2164
+ | 'annotation.add'
2165
+ | 'annotation.remove'
2166
+ | 'block.set'
2167
+ | 'block.unset'
2168
+ | 'decorator.add'
2169
+ | 'decorator.remove'
2170
+ | 'delete.backward'
2171
+ | 'delete.block'
2172
+ | 'delete.forward'
2173
+ | 'history.redo'
2174
+ | 'history.undo'
2175
+ | 'insert.inline object'
2176
+ | 'insert.block'
2177
+ | 'insert.span'
2178
+ | 'insert.text'
2179
+ | 'move.backward'
2180
+ | 'move.block'
2181
+ | 'move.forward'
2182
+ | 'annotation.toggle'
2183
+ | 'decorator.toggle'
2184
+ | 'delete.text'
2185
+ | 'insert.blocks'
2186
+ | 'insert.break'
2187
+ | 'insert.soft break'
2188
+ | 'list item.add'
2189
+ | 'list item.remove'
2190
+ | 'list item.toggle'
2191
+ | 'move.block down'
2192
+ | 'move.block up'
2193
+ | 'select.previous block'
2194
+ | 'select.next block'
2195
+ | 'style.add'
2196
+ | 'style.remove'
2197
+ | 'style.toggle',
2198
+ 'insert.text'
2199
+ >
2200
+ text: string
2201
+ }
2202
+ | {
2203
+ type: StrictExtract_2<
2204
+ | 'serialize'
2205
+ | 'serialization.failure'
2206
+ | 'serialization.success'
2207
+ | 'deserialize'
2208
+ | 'deserialization.failure'
2209
+ | 'deserialization.success'
2210
+ | 'split'
2211
+ | 'delete'
2212
+ | 'select'
2213
+ | 'annotation.add'
2214
+ | 'annotation.remove'
2215
+ | 'block.set'
2216
+ | 'block.unset'
2217
+ | 'decorator.add'
2218
+ | 'decorator.remove'
2219
+ | 'delete.backward'
2220
+ | 'delete.block'
2221
+ | 'delete.forward'
2222
+ | 'history.redo'
2223
+ | 'history.undo'
2224
+ | 'insert.inline object'
2225
+ | 'insert.block'
2226
+ | 'insert.span'
2227
+ | 'insert.text'
2228
+ | 'move.backward'
2229
+ | 'move.block'
2230
+ | 'move.forward'
2231
+ | 'annotation.toggle'
2232
+ | 'decorator.toggle'
2233
+ | 'delete.text'
2234
+ | 'insert.blocks'
2235
+ | 'insert.break'
2236
+ | 'insert.soft break'
2237
+ | 'list item.add'
2238
+ | 'list item.remove'
2239
+ | 'list item.toggle'
2240
+ | 'move.block down'
2241
+ | 'move.block up'
2242
+ | 'select.previous block'
2243
+ | 'select.next block'
2244
+ | 'style.add'
2245
+ | 'style.remove'
2246
+ | 'style.toggle',
2247
+ 'move.backward'
2248
+ >
2249
+ distance: number
2250
+ }
2251
+ | {
2252
+ type: StrictExtract_2<
2253
+ | 'serialize'
2254
+ | 'serialization.failure'
2255
+ | 'serialization.success'
2256
+ | 'deserialize'
2257
+ | 'deserialization.failure'
2258
+ | 'deserialization.success'
2259
+ | 'split'
2260
+ | 'delete'
2261
+ | 'select'
2262
+ | 'annotation.add'
2263
+ | 'annotation.remove'
2264
+ | 'block.set'
2265
+ | 'block.unset'
2266
+ | 'decorator.add'
2267
+ | 'decorator.remove'
2268
+ | 'delete.backward'
2269
+ | 'delete.block'
2270
+ | 'delete.forward'
2271
+ | 'history.redo'
2272
+ | 'history.undo'
2273
+ | 'insert.inline object'
2274
+ | 'insert.block'
2275
+ | 'insert.span'
2276
+ | 'insert.text'
2277
+ | 'move.backward'
2278
+ | 'move.block'
2279
+ | 'move.forward'
2280
+ | 'annotation.toggle'
2281
+ | 'decorator.toggle'
2282
+ | 'delete.text'
2283
+ | 'insert.blocks'
2284
+ | 'insert.break'
2285
+ | 'insert.soft break'
2286
+ | 'list item.add'
2287
+ | 'list item.remove'
2288
+ | 'list item.toggle'
2289
+ | 'move.block down'
2290
+ | 'move.block up'
2291
+ | 'select.previous block'
2292
+ | 'select.next block'
2293
+ | 'style.add'
2294
+ | 'style.remove'
2295
+ | 'style.toggle',
2296
+ 'move.block'
2297
+ >
2298
+ at: [KeyedSegment]
2299
+ to: [KeyedSegment]
2300
+ }
2301
+ | {
2302
+ type: StrictExtract_2<
2303
+ | 'serialize'
2304
+ | 'serialization.failure'
2305
+ | 'serialization.success'
2306
+ | 'deserialize'
2307
+ | 'deserialization.failure'
2308
+ | 'deserialization.success'
2309
+ | 'split'
2310
+ | 'delete'
2311
+ | 'select'
2312
+ | 'annotation.add'
2313
+ | 'annotation.remove'
2314
+ | 'block.set'
2315
+ | 'block.unset'
2316
+ | 'decorator.add'
2317
+ | 'decorator.remove'
2318
+ | 'delete.backward'
2319
+ | 'delete.block'
2320
+ | 'delete.forward'
2321
+ | 'history.redo'
2322
+ | 'history.undo'
2323
+ | 'insert.inline object'
2324
+ | 'insert.block'
2325
+ | 'insert.span'
2326
+ | 'insert.text'
2327
+ | 'move.backward'
2328
+ | 'move.block'
2329
+ | 'move.forward'
2330
+ | 'annotation.toggle'
2331
+ | 'decorator.toggle'
2332
+ | 'delete.text'
2333
+ | 'insert.blocks'
2334
+ | 'insert.break'
2335
+ | 'insert.soft break'
2336
+ | 'list item.add'
2337
+ | 'list item.remove'
2338
+ | 'list item.toggle'
2339
+ | 'move.block down'
2340
+ | 'move.block up'
2341
+ | 'select.previous block'
2342
+ | 'select.next block'
2343
+ | 'style.add'
2344
+ | 'style.remove'
2345
+ | 'style.toggle',
2346
+ 'move.forward'
2347
+ >
2348
+ distance: number
2349
+ }
2350
+ | {
2351
+ type: StrictExtract_2<
2352
+ | 'serialize'
2353
+ | 'serialization.failure'
2354
+ | 'serialization.success'
2355
+ | 'deserialize'
2356
+ | 'deserialization.failure'
2357
+ | 'deserialization.success'
2358
+ | 'split'
2359
+ | 'delete'
2360
+ | 'select'
2361
+ | 'annotation.add'
2362
+ | 'annotation.remove'
2363
+ | 'block.set'
2364
+ | 'block.unset'
2365
+ | 'decorator.add'
2366
+ | 'decorator.remove'
2367
+ | 'delete.backward'
2368
+ | 'delete.block'
2369
+ | 'delete.forward'
2370
+ | 'history.redo'
2371
+ | 'history.undo'
2372
+ | 'insert.inline object'
2373
+ | 'insert.block'
2374
+ | 'insert.span'
2375
+ | 'insert.text'
2376
+ | 'move.backward'
2377
+ | 'move.block'
2378
+ | 'move.forward'
2379
+ | 'annotation.toggle'
2380
+ | 'decorator.toggle'
2381
+ | 'delete.text'
2382
+ | 'insert.blocks'
2383
+ | 'insert.break'
2384
+ | 'insert.soft break'
2385
+ | 'list item.add'
2386
+ | 'list item.remove'
2387
+ | 'list item.toggle'
2388
+ | 'move.block down'
2389
+ | 'move.block up'
2390
+ | 'select.previous block'
2391
+ | 'select.next block'
2392
+ | 'style.add'
2393
+ | 'style.remove'
2394
+ | 'style.toggle',
2395
+ 'select'
2396
+ >
2397
+ at: EditorSelection
2398
+ }
2399
+ | {
2400
+ type: StrictExtract_2<
2401
+ | 'serialize'
2402
+ | 'serialization.failure'
2403
+ | 'serialization.success'
2404
+ | 'deserialize'
2405
+ | 'deserialization.failure'
2406
+ | 'deserialization.success'
2407
+ | 'split'
2408
+ | 'delete'
2409
+ | 'select'
2410
+ | 'annotation.add'
2411
+ | 'annotation.remove'
2412
+ | 'block.set'
2413
+ | 'block.unset'
2414
+ | 'decorator.add'
2415
+ | 'decorator.remove'
2416
+ | 'delete.backward'
2417
+ | 'delete.block'
2418
+ | 'delete.forward'
2419
+ | 'history.redo'
2420
+ | 'history.undo'
2421
+ | 'insert.inline object'
2422
+ | 'insert.block'
2423
+ | 'insert.span'
2424
+ | 'insert.text'
2425
+ | 'move.backward'
2426
+ | 'move.block'
2427
+ | 'move.forward'
2428
+ | 'annotation.toggle'
2429
+ | 'decorator.toggle'
2430
+ | 'delete.text'
2431
+ | 'insert.blocks'
2432
+ | 'insert.break'
2433
+ | 'insert.soft break'
2434
+ | 'list item.add'
2435
+ | 'list item.remove'
2436
+ | 'list item.toggle'
2437
+ | 'move.block down'
2438
+ | 'move.block up'
2439
+ | 'select.previous block'
2440
+ | 'select.next block'
2441
+ | 'style.add'
2442
+ | 'style.remove'
2443
+ | 'style.toggle',
2444
+ 'annotation.toggle'
2445
+ >
2446
+ annotation: {
2447
+ name: string
2448
+ value: {
2449
+ [prop: string]: unknown
2450
+ }
2451
+ }
2452
+ }
2453
+ | {
2454
+ type: StrictExtract_2<
2455
+ | 'serialize'
2456
+ | 'serialization.failure'
2457
+ | 'serialization.success'
2458
+ | 'deserialize'
2459
+ | 'deserialization.failure'
2460
+ | 'deserialization.success'
2461
+ | 'split'
2462
+ | 'delete'
2463
+ | 'select'
2464
+ | 'annotation.add'
2465
+ | 'annotation.remove'
2466
+ | 'block.set'
2467
+ | 'block.unset'
2468
+ | 'decorator.add'
2469
+ | 'decorator.remove'
2470
+ | 'delete.backward'
2471
+ | 'delete.block'
2472
+ | 'delete.forward'
2473
+ | 'history.redo'
2474
+ | 'history.undo'
2475
+ | 'insert.inline object'
2476
+ | 'insert.block'
2477
+ | 'insert.span'
2478
+ | 'insert.text'
2479
+ | 'move.backward'
2480
+ | 'move.block'
2481
+ | 'move.forward'
2482
+ | 'annotation.toggle'
2483
+ | 'decorator.toggle'
2484
+ | 'delete.text'
2485
+ | 'insert.blocks'
2486
+ | 'insert.break'
2487
+ | 'insert.soft break'
2488
+ | 'list item.add'
2489
+ | 'list item.remove'
2490
+ | 'list item.toggle'
2491
+ | 'move.block down'
2492
+ | 'move.block up'
2493
+ | 'select.previous block'
2494
+ | 'select.next block'
2495
+ | 'style.add'
2496
+ | 'style.remove'
2497
+ | 'style.toggle',
2498
+ 'decorator.toggle'
2499
+ >
2500
+ decorator: string
2501
+ at?: {
2502
+ anchor: BlockOffset_2
2503
+ focus: BlockOffset_2
2504
+ }
2505
+ }
2506
+ | {
2507
+ type: StrictExtract_2<
2508
+ | 'serialize'
2509
+ | 'serialization.failure'
2510
+ | 'serialization.success'
2511
+ | 'deserialize'
2512
+ | 'deserialization.failure'
2513
+ | 'deserialization.success'
2514
+ | 'split'
2515
+ | 'delete'
2516
+ | 'select'
2517
+ | 'annotation.add'
2518
+ | 'annotation.remove'
2519
+ | 'block.set'
2520
+ | 'block.unset'
2521
+ | 'decorator.add'
2522
+ | 'decorator.remove'
2523
+ | 'delete.backward'
2524
+ | 'delete.block'
2525
+ | 'delete.forward'
2526
+ | 'history.redo'
2527
+ | 'history.undo'
2528
+ | 'insert.inline object'
2529
+ | 'insert.block'
2530
+ | 'insert.span'
2531
+ | 'insert.text'
2532
+ | 'move.backward'
2533
+ | 'move.block'
2534
+ | 'move.forward'
2535
+ | 'annotation.toggle'
2536
+ | 'decorator.toggle'
2537
+ | 'delete.text'
2538
+ | 'insert.blocks'
2539
+ | 'insert.break'
2540
+ | 'insert.soft break'
2541
+ | 'list item.add'
2542
+ | 'list item.remove'
2543
+ | 'list item.toggle'
2544
+ | 'move.block down'
2545
+ | 'move.block up'
2546
+ | 'select.previous block'
2547
+ | 'select.next block'
2548
+ | 'style.add'
2549
+ | 'style.remove'
2550
+ | 'style.toggle',
2551
+ 'delete.text'
2552
+ >
2553
+ at: {
2554
+ anchor: BlockOffset_2
2555
+ focus: BlockOffset_2
2556
+ }
2557
+ }
2558
+ | {
2559
+ type: StrictExtract_2<
2560
+ | 'serialize'
2561
+ | 'serialization.failure'
2562
+ | 'serialization.success'
2563
+ | 'deserialize'
2564
+ | 'deserialization.failure'
2565
+ | 'deserialization.success'
2566
+ | 'split'
2567
+ | 'delete'
2568
+ | 'select'
2569
+ | 'annotation.add'
2570
+ | 'annotation.remove'
2571
+ | 'block.set'
2572
+ | 'block.unset'
2573
+ | 'decorator.add'
2574
+ | 'decorator.remove'
2575
+ | 'delete.backward'
2576
+ | 'delete.block'
2577
+ | 'delete.forward'
2578
+ | 'history.redo'
2579
+ | 'history.undo'
2580
+ | 'insert.inline object'
2581
+ | 'insert.block'
2582
+ | 'insert.span'
2583
+ | 'insert.text'
2584
+ | 'move.backward'
2585
+ | 'move.block'
2586
+ | 'move.forward'
2587
+ | 'annotation.toggle'
2588
+ | 'decorator.toggle'
2589
+ | 'delete.text'
2590
+ | 'insert.blocks'
2591
+ | 'insert.break'
2592
+ | 'insert.soft break'
2593
+ | 'list item.add'
2594
+ | 'list item.remove'
2595
+ | 'list item.toggle'
2596
+ | 'move.block down'
2597
+ | 'move.block up'
2598
+ | 'select.previous block'
2599
+ | 'select.next block'
2600
+ | 'style.add'
2601
+ | 'style.remove'
2602
+ | 'style.toggle',
2603
+ 'deserialize'
2604
+ >
2605
+ originEvent:
2606
+ | PickFromUnion_2<
2607
+ NativeBehaviorEvent_2,
2608
+ 'type',
2609
+ 'drag.drop' | 'clipboard.paste'
2610
+ >
2611
+ | InputBehaviorEvent_2
2612
+ }
2613
+ | {
2614
+ type: StrictExtract_2<
2615
+ | 'serialize'
2616
+ | 'serialization.failure'
2617
+ | 'serialization.success'
2618
+ | 'deserialize'
2619
+ | 'deserialization.failure'
2620
+ | 'deserialization.success'
2621
+ | 'split'
2622
+ | 'delete'
2623
+ | 'select'
2624
+ | 'annotation.add'
2625
+ | 'annotation.remove'
2626
+ | 'block.set'
2627
+ | 'block.unset'
2628
+ | 'decorator.add'
2629
+ | 'decorator.remove'
2630
+ | 'delete.backward'
2631
+ | 'delete.block'
2632
+ | 'delete.forward'
2633
+ | 'history.redo'
2634
+ | 'history.undo'
2635
+ | 'insert.inline object'
2636
+ | 'insert.block'
2637
+ | 'insert.span'
2638
+ | 'insert.text'
2639
+ | 'move.backward'
2640
+ | 'move.block'
2641
+ | 'move.forward'
2642
+ | 'annotation.toggle'
2643
+ | 'decorator.toggle'
2644
+ | 'delete.text'
2645
+ | 'insert.blocks'
2646
+ | 'insert.break'
2647
+ | 'insert.soft break'
2648
+ | 'list item.add'
2649
+ | 'list item.remove'
2650
+ | 'list item.toggle'
2651
+ | 'move.block down'
2652
+ | 'move.block up'
2653
+ | 'select.previous block'
2654
+ | 'select.next block'
2655
+ | 'style.add'
2656
+ | 'style.remove'
2657
+ | 'style.toggle',
2658
+ 'serialize'
2659
+ >
2660
+ originEvent: PickFromUnion_2<
2661
+ NativeBehaviorEvent_2,
2662
+ 'type',
2663
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2664
+ >
2665
+ }
2666
+ | {
2667
+ type: StrictExtract_2<
2668
+ | 'serialize'
2669
+ | 'serialization.failure'
2670
+ | 'serialization.success'
2671
+ | 'deserialize'
2672
+ | 'deserialization.failure'
2673
+ | 'deserialization.success'
2674
+ | 'split'
2675
+ | 'delete'
2676
+ | 'select'
2677
+ | 'annotation.add'
2678
+ | 'annotation.remove'
2679
+ | 'block.set'
2680
+ | 'block.unset'
2681
+ | 'decorator.add'
2682
+ | 'decorator.remove'
2683
+ | 'delete.backward'
2684
+ | 'delete.block'
2685
+ | 'delete.forward'
2686
+ | 'history.redo'
2687
+ | 'history.undo'
2688
+ | 'insert.inline object'
2689
+ | 'insert.block'
2690
+ | 'insert.span'
2691
+ | 'insert.text'
2692
+ | 'move.backward'
2693
+ | 'move.block'
2694
+ | 'move.forward'
2695
+ | 'annotation.toggle'
2696
+ | 'decorator.toggle'
2697
+ | 'delete.text'
2698
+ | 'insert.blocks'
2699
+ | 'insert.break'
2700
+ | 'insert.soft break'
2701
+ | 'list item.add'
2702
+ | 'list item.remove'
2703
+ | 'list item.toggle'
2704
+ | 'move.block down'
2705
+ | 'move.block up'
2706
+ | 'select.previous block'
2707
+ | 'select.next block'
2708
+ | 'style.add'
2709
+ | 'style.remove'
2710
+ | 'style.toggle',
2711
+ 'deserialization.success'
2712
+ >
2713
+ mimeType: MIMEType_2
2714
+ data: Array<PortableTextBlock>
2715
+ originEvent:
2716
+ | PickFromUnion_2<
2717
+ NativeBehaviorEvent_2,
2718
+ 'type',
2719
+ 'drag.drop' | 'clipboard.paste'
2720
+ >
2721
+ | InputBehaviorEvent_2
2722
+ }
2723
+ | {
2724
+ type: StrictExtract_2<
2725
+ | 'serialize'
2726
+ | 'serialization.failure'
2727
+ | 'serialization.success'
2728
+ | 'deserialize'
2729
+ | 'deserialization.failure'
2730
+ | 'deserialization.success'
2731
+ | 'split'
2732
+ | 'delete'
2733
+ | 'select'
2734
+ | 'annotation.add'
2735
+ | 'annotation.remove'
2736
+ | 'block.set'
2737
+ | 'block.unset'
2738
+ | 'decorator.add'
2739
+ | 'decorator.remove'
2740
+ | 'delete.backward'
2741
+ | 'delete.block'
2742
+ | 'delete.forward'
2743
+ | 'history.redo'
2744
+ | 'history.undo'
2745
+ | 'insert.inline object'
2746
+ | 'insert.block'
2747
+ | 'insert.span'
2748
+ | 'insert.text'
2749
+ | 'move.backward'
2750
+ | 'move.block'
2751
+ | 'move.forward'
2752
+ | 'annotation.toggle'
2753
+ | 'decorator.toggle'
2754
+ | 'delete.text'
2755
+ | 'insert.blocks'
2756
+ | 'insert.break'
2757
+ | 'insert.soft break'
2758
+ | 'list item.add'
2759
+ | 'list item.remove'
2760
+ | 'list item.toggle'
2761
+ | 'move.block down'
2762
+ | 'move.block up'
2763
+ | 'select.previous block'
2764
+ | 'select.next block'
2765
+ | 'style.add'
2766
+ | 'style.remove'
2767
+ | 'style.toggle',
2768
+ 'deserialization.failure'
2769
+ >
2770
+ mimeType: MIMEType_2
2771
+ reason: string
2772
+ originEvent:
2773
+ | PickFromUnion_2<
2774
+ NativeBehaviorEvent_2,
2775
+ 'type',
2776
+ 'drag.drop' | 'clipboard.paste'
2777
+ >
2778
+ | InputBehaviorEvent_2
2779
+ }
2780
+ | {
2781
+ type: StrictExtract_2<
2782
+ | 'serialize'
2783
+ | 'serialization.failure'
2784
+ | 'serialization.success'
2785
+ | 'deserialize'
2786
+ | 'deserialization.failure'
2787
+ | 'deserialization.success'
2788
+ | 'split'
2789
+ | 'delete'
2790
+ | 'select'
2791
+ | 'annotation.add'
2792
+ | 'annotation.remove'
2793
+ | 'block.set'
2794
+ | 'block.unset'
2795
+ | 'decorator.add'
2796
+ | 'decorator.remove'
2797
+ | 'delete.backward'
2798
+ | 'delete.block'
2799
+ | 'delete.forward'
2800
+ | 'history.redo'
2801
+ | 'history.undo'
2802
+ | 'insert.inline object'
2803
+ | 'insert.block'
2804
+ | 'insert.span'
2805
+ | 'insert.text'
2806
+ | 'move.backward'
2807
+ | 'move.block'
2808
+ | 'move.forward'
2809
+ | 'annotation.toggle'
2810
+ | 'decorator.toggle'
2811
+ | 'delete.text'
2812
+ | 'insert.blocks'
2813
+ | 'insert.break'
2814
+ | 'insert.soft break'
2815
+ | 'list item.add'
2816
+ | 'list item.remove'
2817
+ | 'list item.toggle'
2818
+ | 'move.block down'
2819
+ | 'move.block up'
2820
+ | 'select.previous block'
2821
+ | 'select.next block'
2822
+ | 'style.add'
2823
+ | 'style.remove'
2824
+ | 'style.toggle',
2825
+ 'serialization.success'
2826
+ >
2827
+ mimeType: MIMEType_2
2828
+ data: string
2829
+ originEvent: PickFromUnion_2<
2830
+ NativeBehaviorEvent_2,
2831
+ 'type',
2832
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2833
+ >
2834
+ }
2835
+ | {
2836
+ type: StrictExtract_2<
2837
+ | 'serialize'
2838
+ | 'serialization.failure'
2839
+ | 'serialization.success'
2840
+ | 'deserialize'
2841
+ | 'deserialization.failure'
2842
+ | 'deserialization.success'
2843
+ | 'split'
2844
+ | 'delete'
2845
+ | 'select'
2846
+ | 'annotation.add'
2847
+ | 'annotation.remove'
2848
+ | 'block.set'
2849
+ | 'block.unset'
2850
+ | 'decorator.add'
2851
+ | 'decorator.remove'
2852
+ | 'delete.backward'
2853
+ | 'delete.block'
2854
+ | 'delete.forward'
2855
+ | 'history.redo'
2856
+ | 'history.undo'
2857
+ | 'insert.inline object'
2858
+ | 'insert.block'
2859
+ | 'insert.span'
2860
+ | 'insert.text'
2861
+ | 'move.backward'
2862
+ | 'move.block'
2863
+ | 'move.forward'
2864
+ | 'annotation.toggle'
2865
+ | 'decorator.toggle'
2866
+ | 'delete.text'
2867
+ | 'insert.blocks'
2868
+ | 'insert.break'
2869
+ | 'insert.soft break'
2870
+ | 'list item.add'
2871
+ | 'list item.remove'
2872
+ | 'list item.toggle'
2873
+ | 'move.block down'
2874
+ | 'move.block up'
2875
+ | 'select.previous block'
2876
+ | 'select.next block'
2877
+ | 'style.add'
2878
+ | 'style.remove'
2879
+ | 'style.toggle',
2880
+ 'serialization.failure'
2881
+ >
2882
+ mimeType: MIMEType_2
2883
+ reason: string
2884
+ originEvent: PickFromUnion_2<
2885
+ NativeBehaviorEvent_2,
2886
+ 'type',
2887
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2888
+ >
2889
+ }
2890
+ | {
2891
+ type: StrictExtract_2<
2892
+ | 'serialize'
2893
+ | 'serialization.failure'
2894
+ | 'serialization.success'
2895
+ | 'deserialize'
2896
+ | 'deserialization.failure'
2897
+ | 'deserialization.success'
2898
+ | 'split'
2899
+ | 'delete'
2900
+ | 'select'
2901
+ | 'annotation.add'
2902
+ | 'annotation.remove'
2903
+ | 'block.set'
2904
+ | 'block.unset'
2905
+ | 'decorator.add'
2906
+ | 'decorator.remove'
2907
+ | 'delete.backward'
2908
+ | 'delete.block'
2909
+ | 'delete.forward'
2910
+ | 'history.redo'
2911
+ | 'history.undo'
2912
+ | 'insert.inline object'
2913
+ | 'insert.block'
2914
+ | 'insert.span'
2915
+ | 'insert.text'
2916
+ | 'move.backward'
2917
+ | 'move.block'
2918
+ | 'move.forward'
2919
+ | 'annotation.toggle'
2920
+ | 'decorator.toggle'
2921
+ | 'delete.text'
2922
+ | 'insert.blocks'
2923
+ | 'insert.break'
2924
+ | 'insert.soft break'
2925
+ | 'list item.add'
2926
+ | 'list item.remove'
2927
+ | 'list item.toggle'
2928
+ | 'move.block down'
2929
+ | 'move.block up'
2930
+ | 'select.previous block'
2931
+ | 'select.next block'
2932
+ | 'style.add'
2933
+ | 'style.remove'
2934
+ | 'style.toggle',
2935
+ 'insert.blocks'
2936
+ >
2937
+ blocks: Array<BlockWithOptionalKey_2>
2938
+ placement: InsertPlacement_2
2939
+ }
2940
+ | {
2941
+ type: StrictExtract_2<
2942
+ | 'serialize'
2943
+ | 'serialization.failure'
2944
+ | 'serialization.success'
2945
+ | 'deserialize'
2946
+ | 'deserialization.failure'
2947
+ | 'deserialization.success'
2948
+ | 'split'
2949
+ | 'delete'
2950
+ | 'select'
2951
+ | 'annotation.add'
2952
+ | 'annotation.remove'
2953
+ | 'block.set'
2954
+ | 'block.unset'
2955
+ | 'decorator.add'
2956
+ | 'decorator.remove'
2957
+ | 'delete.backward'
2958
+ | 'delete.block'
2959
+ | 'delete.forward'
2960
+ | 'history.redo'
2961
+ | 'history.undo'
2962
+ | 'insert.inline object'
2963
+ | 'insert.block'
2964
+ | 'insert.span'
2965
+ | 'insert.text'
2966
+ | 'move.backward'
2967
+ | 'move.block'
2968
+ | 'move.forward'
2969
+ | 'annotation.toggle'
2970
+ | 'decorator.toggle'
2971
+ | 'delete.text'
2972
+ | 'insert.blocks'
2973
+ | 'insert.break'
2974
+ | 'insert.soft break'
2975
+ | 'list item.add'
2976
+ | 'list item.remove'
2977
+ | 'list item.toggle'
2978
+ | 'move.block down'
2979
+ | 'move.block up'
2980
+ | 'select.previous block'
2981
+ | 'select.next block'
2982
+ | 'style.add'
2983
+ | 'style.remove'
2984
+ | 'style.toggle',
2985
+ 'insert.break'
2986
+ >
2987
+ }
2988
+ | {
2989
+ type: StrictExtract_2<
2990
+ | 'serialize'
2991
+ | 'serialization.failure'
2992
+ | 'serialization.success'
2993
+ | 'deserialize'
2994
+ | 'deserialization.failure'
2995
+ | 'deserialization.success'
2996
+ | 'split'
2997
+ | 'delete'
2998
+ | 'select'
2999
+ | 'annotation.add'
3000
+ | 'annotation.remove'
3001
+ | 'block.set'
3002
+ | 'block.unset'
3003
+ | 'decorator.add'
3004
+ | 'decorator.remove'
3005
+ | 'delete.backward'
3006
+ | 'delete.block'
3007
+ | 'delete.forward'
3008
+ | 'history.redo'
3009
+ | 'history.undo'
3010
+ | 'insert.inline object'
3011
+ | 'insert.block'
3012
+ | 'insert.span'
3013
+ | 'insert.text'
3014
+ | 'move.backward'
3015
+ | 'move.block'
3016
+ | 'move.forward'
3017
+ | 'annotation.toggle'
3018
+ | 'decorator.toggle'
3019
+ | 'delete.text'
3020
+ | 'insert.blocks'
3021
+ | 'insert.break'
3022
+ | 'insert.soft break'
3023
+ | 'list item.add'
3024
+ | 'list item.remove'
3025
+ | 'list item.toggle'
3026
+ | 'move.block down'
3027
+ | 'move.block up'
3028
+ | 'select.previous block'
3029
+ | 'select.next block'
3030
+ | 'style.add'
3031
+ | 'style.remove'
3032
+ | 'style.toggle',
3033
+ 'insert.soft break'
3034
+ >
3035
+ }
3036
+ | {
3037
+ type: StrictExtract_2<
3038
+ | 'serialize'
3039
+ | 'serialization.failure'
3040
+ | 'serialization.success'
3041
+ | 'deserialize'
3042
+ | 'deserialization.failure'
3043
+ | 'deserialization.success'
3044
+ | 'split'
3045
+ | 'delete'
3046
+ | 'select'
3047
+ | 'annotation.add'
3048
+ | 'annotation.remove'
3049
+ | 'block.set'
3050
+ | 'block.unset'
3051
+ | 'decorator.add'
3052
+ | 'decorator.remove'
3053
+ | 'delete.backward'
3054
+ | 'delete.block'
3055
+ | 'delete.forward'
3056
+ | 'history.redo'
3057
+ | 'history.undo'
3058
+ | 'insert.inline object'
3059
+ | 'insert.block'
3060
+ | 'insert.span'
3061
+ | 'insert.text'
3062
+ | 'move.backward'
3063
+ | 'move.block'
3064
+ | 'move.forward'
3065
+ | 'annotation.toggle'
3066
+ | 'decorator.toggle'
3067
+ | 'delete.text'
3068
+ | 'insert.blocks'
3069
+ | 'insert.break'
3070
+ | 'insert.soft break'
3071
+ | 'list item.add'
3072
+ | 'list item.remove'
3073
+ | 'list item.toggle'
3074
+ | 'move.block down'
3075
+ | 'move.block up'
3076
+ | 'select.previous block'
3077
+ | 'select.next block'
3078
+ | 'style.add'
3079
+ | 'style.remove'
3080
+ | 'style.toggle',
3081
+ 'list item.add'
3082
+ >
3083
+ listItem: string
3084
+ }
3085
+ | {
3086
+ type: StrictExtract_2<
3087
+ | 'serialize'
3088
+ | 'serialization.failure'
3089
+ | 'serialization.success'
3090
+ | 'deserialize'
3091
+ | 'deserialization.failure'
3092
+ | 'deserialization.success'
3093
+ | 'split'
3094
+ | 'delete'
3095
+ | 'select'
3096
+ | 'annotation.add'
3097
+ | 'annotation.remove'
3098
+ | 'block.set'
3099
+ | 'block.unset'
3100
+ | 'decorator.add'
3101
+ | 'decorator.remove'
3102
+ | 'delete.backward'
3103
+ | 'delete.block'
3104
+ | 'delete.forward'
3105
+ | 'history.redo'
3106
+ | 'history.undo'
3107
+ | 'insert.inline object'
3108
+ | 'insert.block'
3109
+ | 'insert.span'
3110
+ | 'insert.text'
3111
+ | 'move.backward'
3112
+ | 'move.block'
3113
+ | 'move.forward'
3114
+ | 'annotation.toggle'
3115
+ | 'decorator.toggle'
3116
+ | 'delete.text'
3117
+ | 'insert.blocks'
3118
+ | 'insert.break'
3119
+ | 'insert.soft break'
3120
+ | 'list item.add'
3121
+ | 'list item.remove'
3122
+ | 'list item.toggle'
3123
+ | 'move.block down'
3124
+ | 'move.block up'
3125
+ | 'select.previous block'
3126
+ | 'select.next block'
3127
+ | 'style.add'
3128
+ | 'style.remove'
3129
+ | 'style.toggle',
3130
+ 'list item.remove'
3131
+ >
3132
+ listItem: string
3133
+ }
3134
+ | {
3135
+ type: StrictExtract_2<
3136
+ | 'serialize'
3137
+ | 'serialization.failure'
3138
+ | 'serialization.success'
3139
+ | 'deserialize'
3140
+ | 'deserialization.failure'
3141
+ | 'deserialization.success'
3142
+ | 'split'
3143
+ | 'delete'
3144
+ | 'select'
3145
+ | 'annotation.add'
3146
+ | 'annotation.remove'
3147
+ | 'block.set'
3148
+ | 'block.unset'
3149
+ | 'decorator.add'
3150
+ | 'decorator.remove'
3151
+ | 'delete.backward'
3152
+ | 'delete.block'
3153
+ | 'delete.forward'
3154
+ | 'history.redo'
3155
+ | 'history.undo'
3156
+ | 'insert.inline object'
3157
+ | 'insert.block'
3158
+ | 'insert.span'
3159
+ | 'insert.text'
3160
+ | 'move.backward'
3161
+ | 'move.block'
3162
+ | 'move.forward'
3163
+ | 'annotation.toggle'
3164
+ | 'decorator.toggle'
3165
+ | 'delete.text'
3166
+ | 'insert.blocks'
3167
+ | 'insert.break'
3168
+ | 'insert.soft break'
3169
+ | 'list item.add'
3170
+ | 'list item.remove'
3171
+ | 'list item.toggle'
3172
+ | 'move.block down'
3173
+ | 'move.block up'
3174
+ | 'select.previous block'
3175
+ | 'select.next block'
3176
+ | 'style.add'
3177
+ | 'style.remove'
3178
+ | 'style.toggle',
3179
+ 'list item.toggle'
3180
+ >
3181
+ listItem: string
3182
+ }
3183
+ | {
3184
+ type: StrictExtract_2<
3185
+ | 'serialize'
3186
+ | 'serialization.failure'
3187
+ | 'serialization.success'
3188
+ | 'deserialize'
3189
+ | 'deserialization.failure'
3190
+ | 'deserialization.success'
3191
+ | 'split'
3192
+ | 'delete'
3193
+ | 'select'
3194
+ | 'annotation.add'
3195
+ | 'annotation.remove'
3196
+ | 'block.set'
3197
+ | 'block.unset'
3198
+ | 'decorator.add'
3199
+ | 'decorator.remove'
3200
+ | 'delete.backward'
3201
+ | 'delete.block'
3202
+ | 'delete.forward'
3203
+ | 'history.redo'
3204
+ | 'history.undo'
3205
+ | 'insert.inline object'
3206
+ | 'insert.block'
3207
+ | 'insert.span'
3208
+ | 'insert.text'
3209
+ | 'move.backward'
3210
+ | 'move.block'
3211
+ | 'move.forward'
3212
+ | 'annotation.toggle'
3213
+ | 'decorator.toggle'
3214
+ | 'delete.text'
3215
+ | 'insert.blocks'
3216
+ | 'insert.break'
3217
+ | 'insert.soft break'
3218
+ | 'list item.add'
3219
+ | 'list item.remove'
3220
+ | 'list item.toggle'
3221
+ | 'move.block down'
3222
+ | 'move.block up'
3223
+ | 'select.previous block'
3224
+ | 'select.next block'
3225
+ | 'style.add'
3226
+ | 'style.remove'
3227
+ | 'style.toggle',
3228
+ 'move.block down'
3229
+ >
3230
+ at: [KeyedSegment]
3231
+ }
3232
+ | {
3233
+ type: StrictExtract_2<
3234
+ | 'serialize'
3235
+ | 'serialization.failure'
3236
+ | 'serialization.success'
3237
+ | 'deserialize'
3238
+ | 'deserialization.failure'
3239
+ | 'deserialization.success'
3240
+ | 'split'
3241
+ | 'delete'
3242
+ | 'select'
3243
+ | 'annotation.add'
3244
+ | 'annotation.remove'
3245
+ | 'block.set'
3246
+ | 'block.unset'
3247
+ | 'decorator.add'
3248
+ | 'decorator.remove'
3249
+ | 'delete.backward'
3250
+ | 'delete.block'
3251
+ | 'delete.forward'
3252
+ | 'history.redo'
3253
+ | 'history.undo'
3254
+ | 'insert.inline object'
3255
+ | 'insert.block'
3256
+ | 'insert.span'
3257
+ | 'insert.text'
3258
+ | 'move.backward'
3259
+ | 'move.block'
3260
+ | 'move.forward'
3261
+ | 'annotation.toggle'
3262
+ | 'decorator.toggle'
3263
+ | 'delete.text'
3264
+ | 'insert.blocks'
3265
+ | 'insert.break'
3266
+ | 'insert.soft break'
3267
+ | 'list item.add'
3268
+ | 'list item.remove'
3269
+ | 'list item.toggle'
3270
+ | 'move.block down'
3271
+ | 'move.block up'
3272
+ | 'select.previous block'
3273
+ | 'select.next block'
3274
+ | 'style.add'
3275
+ | 'style.remove'
3276
+ | 'style.toggle',
3277
+ 'move.block up'
3278
+ >
3279
+ at: [KeyedSegment]
3280
+ }
3281
+ | {
3282
+ type: StrictExtract_2<
3283
+ | 'serialize'
3284
+ | 'serialization.failure'
3285
+ | 'serialization.success'
3286
+ | 'deserialize'
3287
+ | 'deserialization.failure'
3288
+ | 'deserialization.success'
3289
+ | 'split'
3290
+ | 'delete'
3291
+ | 'select'
3292
+ | 'annotation.add'
3293
+ | 'annotation.remove'
3294
+ | 'block.set'
3295
+ | 'block.unset'
3296
+ | 'decorator.add'
3297
+ | 'decorator.remove'
3298
+ | 'delete.backward'
3299
+ | 'delete.block'
3300
+ | 'delete.forward'
3301
+ | 'history.redo'
3302
+ | 'history.undo'
3303
+ | 'insert.inline object'
3304
+ | 'insert.block'
3305
+ | 'insert.span'
3306
+ | 'insert.text'
3307
+ | 'move.backward'
3308
+ | 'move.block'
3309
+ | 'move.forward'
3310
+ | 'annotation.toggle'
3311
+ | 'decorator.toggle'
3312
+ | 'delete.text'
3313
+ | 'insert.blocks'
3314
+ | 'insert.break'
3315
+ | 'insert.soft break'
3316
+ | 'list item.add'
3317
+ | 'list item.remove'
3318
+ | 'list item.toggle'
3319
+ | 'move.block down'
3320
+ | 'move.block up'
3321
+ | 'select.previous block'
3322
+ | 'select.next block'
3323
+ | 'style.add'
3324
+ | 'style.remove'
3325
+ | 'style.toggle',
3326
+ 'select.previous block'
3327
+ >
3328
+ select?: 'start' | 'end'
3329
+ }
3330
+ | {
3331
+ type: StrictExtract_2<
3332
+ | 'serialize'
3333
+ | 'serialization.failure'
3334
+ | 'serialization.success'
3335
+ | 'deserialize'
3336
+ | 'deserialization.failure'
3337
+ | 'deserialization.success'
3338
+ | 'split'
3339
+ | 'delete'
3340
+ | 'select'
3341
+ | 'annotation.add'
3342
+ | 'annotation.remove'
3343
+ | 'block.set'
3344
+ | 'block.unset'
3345
+ | 'decorator.add'
3346
+ | 'decorator.remove'
3347
+ | 'delete.backward'
3348
+ | 'delete.block'
3349
+ | 'delete.forward'
3350
+ | 'history.redo'
3351
+ | 'history.undo'
3352
+ | 'insert.inline object'
3353
+ | 'insert.block'
3354
+ | 'insert.span'
3355
+ | 'insert.text'
3356
+ | 'move.backward'
3357
+ | 'move.block'
3358
+ | 'move.forward'
3359
+ | 'annotation.toggle'
3360
+ | 'decorator.toggle'
3361
+ | 'delete.text'
3362
+ | 'insert.blocks'
3363
+ | 'insert.break'
3364
+ | 'insert.soft break'
3365
+ | 'list item.add'
3366
+ | 'list item.remove'
3367
+ | 'list item.toggle'
3368
+ | 'move.block down'
3369
+ | 'move.block up'
3370
+ | 'select.previous block'
3371
+ | 'select.next block'
3372
+ | 'style.add'
3373
+ | 'style.remove'
3374
+ | 'style.toggle',
3375
+ 'select.next block'
3376
+ >
3377
+ select?: 'start' | 'end'
3378
+ }
3379
+ | {
3380
+ type: StrictExtract_2<
3381
+ | 'serialize'
3382
+ | 'serialization.failure'
3383
+ | 'serialization.success'
3384
+ | 'deserialize'
3385
+ | 'deserialization.failure'
3386
+ | 'deserialization.success'
3387
+ | 'split'
3388
+ | 'delete'
3389
+ | 'select'
3390
+ | 'annotation.add'
3391
+ | 'annotation.remove'
3392
+ | 'block.set'
3393
+ | 'block.unset'
3394
+ | 'decorator.add'
3395
+ | 'decorator.remove'
3396
+ | 'delete.backward'
3397
+ | 'delete.block'
3398
+ | 'delete.forward'
3399
+ | 'history.redo'
3400
+ | 'history.undo'
3401
+ | 'insert.inline object'
3402
+ | 'insert.block'
3403
+ | 'insert.span'
3404
+ | 'insert.text'
3405
+ | 'move.backward'
3406
+ | 'move.block'
3407
+ | 'move.forward'
3408
+ | 'annotation.toggle'
3409
+ | 'decorator.toggle'
3410
+ | 'delete.text'
3411
+ | 'insert.blocks'
3412
+ | 'insert.break'
3413
+ | 'insert.soft break'
3414
+ | 'list item.add'
3415
+ | 'list item.remove'
3416
+ | 'list item.toggle'
3417
+ | 'move.block down'
3418
+ | 'move.block up'
3419
+ | 'select.previous block'
3420
+ | 'select.next block'
3421
+ | 'style.add'
3422
+ | 'style.remove'
3423
+ | 'style.toggle',
3424
+ 'split'
3425
+ >
3426
+ }
3427
+ | {
3428
+ type: StrictExtract_2<
3429
+ | 'serialize'
3430
+ | 'serialization.failure'
3431
+ | 'serialization.success'
3432
+ | 'deserialize'
3433
+ | 'deserialization.failure'
3434
+ | 'deserialization.success'
3435
+ | 'split'
3436
+ | 'delete'
3437
+ | 'select'
3438
+ | 'annotation.add'
3439
+ | 'annotation.remove'
3440
+ | 'block.set'
3441
+ | 'block.unset'
3442
+ | 'decorator.add'
3443
+ | 'decorator.remove'
3444
+ | 'delete.backward'
3445
+ | 'delete.block'
3446
+ | 'delete.forward'
3447
+ | 'history.redo'
3448
+ | 'history.undo'
3449
+ | 'insert.inline object'
3450
+ | 'insert.block'
3451
+ | 'insert.span'
3452
+ | 'insert.text'
3453
+ | 'move.backward'
3454
+ | 'move.block'
3455
+ | 'move.forward'
3456
+ | 'annotation.toggle'
3457
+ | 'decorator.toggle'
3458
+ | 'delete.text'
3459
+ | 'insert.blocks'
3460
+ | 'insert.break'
3461
+ | 'insert.soft break'
3462
+ | 'list item.add'
3463
+ | 'list item.remove'
3464
+ | 'list item.toggle'
3465
+ | 'move.block down'
3466
+ | 'move.block up'
3467
+ | 'select.previous block'
3468
+ | 'select.next block'
3469
+ | 'style.add'
3470
+ | 'style.remove'
3471
+ | 'style.toggle',
3472
+ 'style.add'
3473
+ >
3474
+ style: string
3475
+ }
3476
+ | {
3477
+ type: StrictExtract_2<
3478
+ | 'serialize'
3479
+ | 'serialization.failure'
3480
+ | 'serialization.success'
3481
+ | 'deserialize'
3482
+ | 'deserialization.failure'
3483
+ | 'deserialization.success'
3484
+ | 'split'
3485
+ | 'delete'
3486
+ | 'select'
3487
+ | 'annotation.add'
3488
+ | 'annotation.remove'
3489
+ | 'block.set'
3490
+ | 'block.unset'
3491
+ | 'decorator.add'
3492
+ | 'decorator.remove'
3493
+ | 'delete.backward'
3494
+ | 'delete.block'
3495
+ | 'delete.forward'
3496
+ | 'history.redo'
3497
+ | 'history.undo'
3498
+ | 'insert.inline object'
3499
+ | 'insert.block'
3500
+ | 'insert.span'
3501
+ | 'insert.text'
3502
+ | 'move.backward'
3503
+ | 'move.block'
3504
+ | 'move.forward'
3505
+ | 'annotation.toggle'
3506
+ | 'decorator.toggle'
3507
+ | 'delete.text'
3508
+ | 'insert.blocks'
3509
+ | 'insert.break'
3510
+ | 'insert.soft break'
3511
+ | 'list item.add'
3512
+ | 'list item.remove'
3513
+ | 'list item.toggle'
3514
+ | 'move.block down'
3515
+ | 'move.block up'
3516
+ | 'select.previous block'
3517
+ | 'select.next block'
3518
+ | 'style.add'
3519
+ | 'style.remove'
3520
+ | 'style.toggle',
3521
+ 'style.remove'
3522
+ >
3523
+ style: string
3524
+ }
3525
+ | {
3526
+ type: StrictExtract_2<
3527
+ | 'serialize'
3528
+ | 'serialization.failure'
3529
+ | 'serialization.success'
3530
+ | 'deserialize'
3531
+ | 'deserialization.failure'
3532
+ | 'deserialization.success'
3533
+ | 'split'
3534
+ | 'delete'
3535
+ | 'select'
3536
+ | 'annotation.add'
3537
+ | 'annotation.remove'
3538
+ | 'block.set'
3539
+ | 'block.unset'
3540
+ | 'decorator.add'
3541
+ | 'decorator.remove'
3542
+ | 'delete.backward'
3543
+ | 'delete.block'
3544
+ | 'delete.forward'
3545
+ | 'history.redo'
3546
+ | 'history.undo'
3547
+ | 'insert.inline object'
3548
+ | 'insert.block'
3549
+ | 'insert.span'
3550
+ | 'insert.text'
3551
+ | 'move.backward'
3552
+ | 'move.block'
3553
+ | 'move.forward'
3554
+ | 'annotation.toggle'
3555
+ | 'decorator.toggle'
3556
+ | 'delete.text'
3557
+ | 'insert.blocks'
3558
+ | 'insert.break'
3559
+ | 'insert.soft break'
3560
+ | 'list item.add'
3561
+ | 'list item.remove'
3562
+ | 'list item.toggle'
3563
+ | 'move.block down'
3564
+ | 'move.block up'
3565
+ | 'select.previous block'
3566
+ | 'select.next block'
3567
+ | 'style.add'
3568
+ | 'style.remove'
3569
+ | 'style.toggle',
3570
+ 'style.toggle'
3571
+ >
3572
+ style: string
3573
+ }
3574
+ | {
3575
+ type: StrictExtract_2<
3576
+ | 'clipboard.copy'
3577
+ | 'clipboard.cut'
3578
+ | 'drag.dragstart'
3579
+ | 'clipboard.paste'
3580
+ | 'drag.drag'
3581
+ | 'drag.dragend'
3582
+ | 'drag.dragenter'
3583
+ | 'drag.dragover'
3584
+ | 'drag.dragleave'
3585
+ | 'drag.drop'
3586
+ | 'input.*'
3587
+ | 'keyboard.keydown'
3588
+ | 'keyboard.keyup'
3589
+ | 'mouse.click',
3590
+ 'clipboard.copy'
3591
+ >
3592
+ originEvent: {
3593
+ dataTransfer: DataTransfer
3594
+ }
3595
+ position: Pick<EventPosition, 'selection'>
3596
+ }
3597
+ | {
3598
+ type: StrictExtract_2<
3599
+ | 'clipboard.copy'
3600
+ | 'clipboard.cut'
3601
+ | 'drag.dragstart'
3602
+ | 'clipboard.paste'
3603
+ | 'drag.drag'
3604
+ | 'drag.dragend'
3605
+ | 'drag.dragenter'
3606
+ | 'drag.dragover'
3607
+ | 'drag.dragleave'
3608
+ | 'drag.drop'
3609
+ | 'input.*'
3610
+ | 'keyboard.keydown'
3611
+ | 'keyboard.keyup'
3612
+ | 'mouse.click',
3613
+ 'clipboard.cut'
3614
+ >
3615
+ originEvent: {
3616
+ dataTransfer: DataTransfer
3617
+ }
3618
+ position: Pick<EventPosition, 'selection'>
3619
+ }
3620
+ | {
3621
+ type: StrictExtract_2<
3622
+ | 'clipboard.copy'
3623
+ | 'clipboard.cut'
3624
+ | 'drag.dragstart'
3625
+ | 'clipboard.paste'
3626
+ | 'drag.drag'
3627
+ | 'drag.dragend'
3628
+ | 'drag.dragenter'
3629
+ | 'drag.dragover'
3630
+ | 'drag.dragleave'
3631
+ | 'drag.drop'
3632
+ | 'input.*'
3633
+ | 'keyboard.keydown'
3634
+ | 'keyboard.keyup'
3635
+ | 'mouse.click',
3636
+ 'clipboard.paste'
3637
+ >
3638
+ originEvent: {
3639
+ dataTransfer: DataTransfer
3640
+ }
3641
+ position: Pick<EventPosition, 'selection'>
3642
+ }
3643
+ | {
3644
+ type: StrictExtract_2<
3645
+ | 'clipboard.copy'
3646
+ | 'clipboard.cut'
3647
+ | 'drag.dragstart'
3648
+ | 'clipboard.paste'
3649
+ | 'drag.drag'
3650
+ | 'drag.dragend'
3651
+ | 'drag.dragenter'
3652
+ | 'drag.dragover'
3653
+ | 'drag.dragleave'
3654
+ | 'drag.drop'
3655
+ | 'input.*'
3656
+ | 'keyboard.keydown'
3657
+ | 'keyboard.keyup'
3658
+ | 'mouse.click',
3659
+ 'drag.dragstart'
3660
+ >
3661
+ originEvent: {
3662
+ dataTransfer: DataTransfer
3663
+ }
3664
+ position: Pick<EventPosition, 'selection'>
3665
+ }
3666
+ | {
3667
+ type: StrictExtract_2<
3668
+ | 'clipboard.copy'
3669
+ | 'clipboard.cut'
3670
+ | 'drag.dragstart'
3671
+ | 'clipboard.paste'
3672
+ | 'drag.drag'
3673
+ | 'drag.dragend'
3674
+ | 'drag.dragenter'
3675
+ | 'drag.dragover'
3676
+ | 'drag.dragleave'
3677
+ | 'drag.drop'
3678
+ | 'input.*'
3679
+ | 'keyboard.keydown'
3680
+ | 'keyboard.keyup'
3681
+ | 'mouse.click',
3682
+ 'drag.drag'
3683
+ >
3684
+ originEvent: {
3685
+ dataTransfer: DataTransfer
3686
+ }
3687
+ }
3688
+ | {
3689
+ type: StrictExtract_2<
3690
+ | 'clipboard.copy'
3691
+ | 'clipboard.cut'
3692
+ | 'drag.dragstart'
3693
+ | 'clipboard.paste'
3694
+ | 'drag.drag'
3695
+ | 'drag.dragend'
3696
+ | 'drag.dragenter'
3697
+ | 'drag.dragover'
3698
+ | 'drag.dragleave'
3699
+ | 'drag.drop'
3700
+ | 'input.*'
3701
+ | 'keyboard.keydown'
3702
+ | 'keyboard.keyup'
3703
+ | 'mouse.click',
3704
+ 'drag.dragend'
3705
+ >
3706
+ originEvent: {
3707
+ dataTransfer: DataTransfer
3708
+ }
3709
+ }
3710
+ | {
3711
+ type: StrictExtract_2<
3712
+ | 'clipboard.copy'
3713
+ | 'clipboard.cut'
3714
+ | 'drag.dragstart'
3715
+ | 'clipboard.paste'
3716
+ | 'drag.drag'
3717
+ | 'drag.dragend'
3718
+ | 'drag.dragenter'
3719
+ | 'drag.dragover'
3720
+ | 'drag.dragleave'
3721
+ | 'drag.drop'
3722
+ | 'input.*'
3723
+ | 'keyboard.keydown'
3724
+ | 'keyboard.keyup'
3725
+ | 'mouse.click',
3726
+ 'drag.dragenter'
3727
+ >
3728
+ originEvent: {
3729
+ dataTransfer: DataTransfer
3730
+ }
3731
+ position: EventPosition
3732
+ }
3733
+ | {
3734
+ type: StrictExtract_2<
3735
+ | 'clipboard.copy'
3736
+ | 'clipboard.cut'
3737
+ | 'drag.dragstart'
3738
+ | 'clipboard.paste'
3739
+ | 'drag.drag'
3740
+ | 'drag.dragend'
3741
+ | 'drag.dragenter'
3742
+ | 'drag.dragover'
3743
+ | 'drag.dragleave'
3744
+ | 'drag.drop'
3745
+ | 'input.*'
3746
+ | 'keyboard.keydown'
3747
+ | 'keyboard.keyup'
3748
+ | 'mouse.click',
3749
+ 'drag.dragover'
3750
+ >
3751
+ originEvent: {
3752
+ dataTransfer: DataTransfer
3753
+ }
3754
+ position: EventPosition
3755
+ }
3756
+ | {
3757
+ type: StrictExtract_2<
3758
+ | 'clipboard.copy'
3759
+ | 'clipboard.cut'
3760
+ | 'drag.dragstart'
3761
+ | 'clipboard.paste'
3762
+ | 'drag.drag'
3763
+ | 'drag.dragend'
3764
+ | 'drag.dragenter'
3765
+ | 'drag.dragover'
3766
+ | 'drag.dragleave'
3767
+ | 'drag.drop'
3768
+ | 'input.*'
3769
+ | 'keyboard.keydown'
3770
+ | 'keyboard.keyup'
3771
+ | 'mouse.click',
3772
+ 'drag.drop'
3773
+ >
3774
+ originEvent: {
3775
+ dataTransfer: DataTransfer
3776
+ }
3777
+ position: EventPosition
3778
+ }
3779
+ | {
3780
+ type: StrictExtract_2<
3781
+ | 'clipboard.copy'
3782
+ | 'clipboard.cut'
3783
+ | 'drag.dragstart'
3784
+ | 'clipboard.paste'
3785
+ | 'drag.drag'
3786
+ | 'drag.dragend'
3787
+ | 'drag.dragenter'
3788
+ | 'drag.dragover'
3789
+ | 'drag.dragleave'
3790
+ | 'drag.drop'
3791
+ | 'input.*'
3792
+ | 'keyboard.keydown'
3793
+ | 'keyboard.keyup'
3794
+ | 'mouse.click',
3795
+ 'drag.dragleave'
3796
+ >
3797
+ originEvent: {
3798
+ dataTransfer: DataTransfer
3799
+ }
3800
+ }
3801
+ | InputBehaviorEvent_2
3802
+ | {
3803
+ type: StrictExtract_2<
3804
+ | 'clipboard.copy'
3805
+ | 'clipboard.cut'
3806
+ | 'drag.dragstart'
3807
+ | 'clipboard.paste'
3808
+ | 'drag.drag'
3809
+ | 'drag.dragend'
3810
+ | 'drag.dragenter'
3811
+ | 'drag.dragover'
3812
+ | 'drag.dragleave'
3813
+ | 'drag.drop'
3814
+ | 'input.*'
3815
+ | 'keyboard.keydown'
3816
+ | 'keyboard.keyup'
3817
+ | 'mouse.click',
3818
+ 'keyboard.keydown'
3819
+ >
3820
+ originEvent: Pick<
3821
+ KeyboardEvent,
3822
+ 'key' | 'code' | 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'
3823
+ >
3824
+ }
3825
+ | {
3826
+ type: StrictExtract_2<
3827
+ | 'clipboard.copy'
3828
+ | 'clipboard.cut'
3829
+ | 'drag.dragstart'
3830
+ | 'clipboard.paste'
3831
+ | 'drag.drag'
3832
+ | 'drag.dragend'
3833
+ | 'drag.dragenter'
3834
+ | 'drag.dragover'
3835
+ | 'drag.dragleave'
3836
+ | 'drag.drop'
3837
+ | 'input.*'
3838
+ | 'keyboard.keydown'
3839
+ | 'keyboard.keyup'
3840
+ | 'mouse.click',
3841
+ 'keyboard.keyup'
3842
+ >
3843
+ originEvent: Pick<
3844
+ KeyboardEvent,
3845
+ 'key' | 'code' | 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'
3846
+ >
3847
+ }
3848
+ | MouseBehaviorEvent_2
3849
+ | CustomBehaviorEvent_2<
3850
+ Record<string, unknown>,
3851
+ string,
3852
+ `custom.${string}`
3853
+ >
3854
+ >
3855
+ >
1285
3856
  converters: Set<Converter>
1286
3857
  getLegacySchema: () => PortableTextMemberSchemaTypes
1287
3858
  keyGenerator: () => string
1288
3859
  pendingEvents: never[]
3860
+ pendingIncomingPatchesEvents: never[]
1289
3861
  schema: EditorSchema
1290
3862
  selection: null
1291
3863
  initialReadOnly: boolean
@@ -1301,6 +3873,7 @@ declare const editorMachine: StateMachine<
1301
3873
  getLegacySchema: () => PortableTextMemberSchemaTypes
1302
3874
  keyGenerator: () => string
1303
3875
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
3876
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1304
3877
  schema: EditorSchema
1305
3878
  initialReadOnly: boolean
1306
3879
  maxBlocks: number | undefined
@@ -1318,6 +3891,7 @@ declare const editorMachine: StateMachine<
1318
3891
  },
1319
3892
  | InternalPatchEvent
1320
3893
  | MutationEvent
3894
+ | PatchesEvent
1321
3895
  | {
1322
3896
  type: 'add behavior'
1323
3897
  behavior: Behavior
@@ -1334,10 +3908,6 @@ declare const editorMachine: StateMachine<
1334
3908
  type: 'update schema'
1335
3909
  schema: EditorSchema
1336
3910
  }
1337
- | {
1338
- type: 'update behaviors'
1339
- behaviors: Array<Behavior>
1340
- }
1341
3911
  | {
1342
3912
  type: 'update key generator'
1343
3913
  keyGenerator: () => string
@@ -1350,7 +3920,6 @@ declare const editorMachine: StateMachine<
1350
3920
  type: 'update maxBlocks'
1351
3921
  maxBlocks: number | undefined
1352
3922
  }
1353
- | PatchesEvent
1354
3923
  | {
1355
3924
  type: 'blur'
1356
3925
  editor: PortableTextSlateEditor
@@ -1366,7 +3935,10 @@ declare const editorMachine: StateMachine<
1366
3935
  type: 'done normalizing'
1367
3936
  }
1368
3937
  | {
1369
- type: 'done syncing initial value'
3938
+ type: 'done syncing value'
3939
+ }
3940
+ | {
3941
+ type: 'syncing value'
1370
3942
  }
1371
3943
  | {
1372
3944
  type: 'behavior event'
@@ -1505,6 +4077,7 @@ declare const editorMachine: StateMachine<
1505
4077
  getLegacySchema: () => PortableTextMemberSchemaTypes
1506
4078
  keyGenerator: () => string
1507
4079
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4080
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1508
4081
  schema: EditorSchema
1509
4082
  initialReadOnly: boolean
1510
4083
  maxBlocks: number | undefined
@@ -1521,6 +4094,7 @@ declare const editorMachine: StateMachine<
1521
4094
  },
1522
4095
  | InternalPatchEvent
1523
4096
  | MutationEvent
4097
+ | PatchesEvent
1524
4098
  | {
1525
4099
  type: 'add behavior'
1526
4100
  behavior: Behavior
@@ -1537,10 +4111,6 @@ declare const editorMachine: StateMachine<
1537
4111
  type: 'update schema'
1538
4112
  schema: EditorSchema
1539
4113
  }
1540
- | {
1541
- type: 'update behaviors'
1542
- behaviors: Array<Behavior>
1543
- }
1544
4114
  | {
1545
4115
  type: 'update key generator'
1546
4116
  keyGenerator: () => string
@@ -1553,7 +4123,6 @@ declare const editorMachine: StateMachine<
1553
4123
  type: 'update maxBlocks'
1554
4124
  maxBlocks: number | undefined
1555
4125
  }
1556
- | PatchesEvent
1557
4126
  | {
1558
4127
  type: 'blur'
1559
4128
  editor: PortableTextSlateEditor
@@ -1569,7 +4138,10 @@ declare const editorMachine: StateMachine<
1569
4138
  type: 'done normalizing'
1570
4139
  }
1571
4140
  | {
1572
- type: 'done syncing initial value'
4141
+ type: 'done syncing value'
4142
+ }
4143
+ | {
4144
+ type: 'syncing value'
1573
4145
  }
1574
4146
  | {
1575
4147
  type: 'behavior event'
@@ -1708,6 +4280,7 @@ declare const editorMachine: StateMachine<
1708
4280
  getLegacySchema: () => PortableTextMemberSchemaTypes
1709
4281
  keyGenerator: () => string
1710
4282
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4283
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1711
4284
  schema: EditorSchema
1712
4285
  initialReadOnly: boolean
1713
4286
  maxBlocks: number | undefined
@@ -1727,6 +4300,7 @@ declare const editorMachine: StateMachine<
1727
4300
  },
1728
4301
  | InternalPatchEvent
1729
4302
  | MutationEvent
4303
+ | PatchesEvent
1730
4304
  | {
1731
4305
  type: 'add behavior'
1732
4306
  behavior: Behavior
@@ -1743,10 +4317,6 @@ declare const editorMachine: StateMachine<
1743
4317
  type: 'update schema'
1744
4318
  schema: EditorSchema
1745
4319
  }
1746
- | {
1747
- type: 'update behaviors'
1748
- behaviors: Array<Behavior>
1749
- }
1750
4320
  | {
1751
4321
  type: 'update key generator'
1752
4322
  keyGenerator: () => string
@@ -1759,7 +4329,6 @@ declare const editorMachine: StateMachine<
1759
4329
  type: 'update maxBlocks'
1760
4330
  maxBlocks: number | undefined
1761
4331
  }
1762
- | PatchesEvent
1763
4332
  | {
1764
4333
  type: 'blur'
1765
4334
  editor: PortableTextSlateEditor
@@ -1775,7 +4344,10 @@ declare const editorMachine: StateMachine<
1775
4344
  type: 'done normalizing'
1776
4345
  }
1777
4346
  | {
1778
- type: 'done syncing initial value'
4347
+ type: 'done syncing value'
4348
+ }
4349
+ | {
4350
+ type: 'syncing value'
1779
4351
  }
1780
4352
  | {
1781
4353
  type: 'behavior event'
@@ -1914,6 +4486,7 @@ declare const editorMachine: StateMachine<
1914
4486
  getLegacySchema: () => PortableTextMemberSchemaTypes
1915
4487
  keyGenerator: () => string
1916
4488
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4489
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1917
4490
  schema: EditorSchema
1918
4491
  initialReadOnly: boolean
1919
4492
  maxBlocks: number | undefined
@@ -1932,6 +4505,7 @@ declare const editorMachine: StateMachine<
1932
4505
  },
1933
4506
  | InternalPatchEvent
1934
4507
  | MutationEvent
4508
+ | PatchesEvent
1935
4509
  | {
1936
4510
  type: 'add behavior'
1937
4511
  behavior: Behavior
@@ -1948,10 +4522,6 @@ declare const editorMachine: StateMachine<
1948
4522
  type: 'update schema'
1949
4523
  schema: EditorSchema
1950
4524
  }
1951
- | {
1952
- type: 'update behaviors'
1953
- behaviors: Array<Behavior>
1954
- }
1955
4525
  | {
1956
4526
  type: 'update key generator'
1957
4527
  keyGenerator: () => string
@@ -1964,7 +4534,6 @@ declare const editorMachine: StateMachine<
1964
4534
  type: 'update maxBlocks'
1965
4535
  maxBlocks: number | undefined
1966
4536
  }
1967
- | PatchesEvent
1968
4537
  | {
1969
4538
  type: 'blur'
1970
4539
  editor: PortableTextSlateEditor
@@ -1980,7 +4549,10 @@ declare const editorMachine: StateMachine<
1980
4549
  type: 'done normalizing'
1981
4550
  }
1982
4551
  | {
1983
- type: 'done syncing initial value'
4552
+ type: 'done syncing value'
4553
+ }
4554
+ | {
4555
+ type: 'syncing value'
1984
4556
  }
1985
4557
  | {
1986
4558
  type: 'behavior event'
@@ -2119,6 +4691,7 @@ declare const editorMachine: StateMachine<
2119
4691
  getLegacySchema: () => PortableTextMemberSchemaTypes
2120
4692
  keyGenerator: () => string
2121
4693
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4694
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2122
4695
  schema: EditorSchema
2123
4696
  initialReadOnly: boolean
2124
4697
  maxBlocks: number | undefined
@@ -2136,6 +4709,7 @@ declare const editorMachine: StateMachine<
2136
4709
  },
2137
4710
  | InternalPatchEvent
2138
4711
  | MutationEvent
4712
+ | PatchesEvent
2139
4713
  | {
2140
4714
  type: 'add behavior'
2141
4715
  behavior: Behavior
@@ -2152,10 +4726,6 @@ declare const editorMachine: StateMachine<
2152
4726
  type: 'update schema'
2153
4727
  schema: EditorSchema
2154
4728
  }
2155
- | {
2156
- type: 'update behaviors'
2157
- behaviors: Array<Behavior>
2158
- }
2159
4729
  | {
2160
4730
  type: 'update key generator'
2161
4731
  keyGenerator: () => string
@@ -2168,7 +4738,6 @@ declare const editorMachine: StateMachine<
2168
4738
  type: 'update maxBlocks'
2169
4739
  maxBlocks: number | undefined
2170
4740
  }
2171
- | PatchesEvent
2172
4741
  | {
2173
4742
  type: 'blur'
2174
4743
  editor: PortableTextSlateEditor
@@ -2184,7 +4753,10 @@ declare const editorMachine: StateMachine<
2184
4753
  type: 'done normalizing'
2185
4754
  }
2186
4755
  | {
2187
- type: 'done syncing initial value'
4756
+ type: 'done syncing value'
4757
+ }
4758
+ | {
4759
+ type: 'syncing value'
2188
4760
  }
2189
4761
  | {
2190
4762
  type: 'behavior event'
@@ -2324,6 +4896,7 @@ declare const editorMachine: StateMachine<
2324
4896
  getLegacySchema: () => PortableTextMemberSchemaTypes
2325
4897
  keyGenerator: () => string
2326
4898
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4899
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2327
4900
  schema: EditorSchema
2328
4901
  initialReadOnly: boolean
2329
4902
  maxBlocks: number | undefined
@@ -2341,6 +4914,7 @@ declare const editorMachine: StateMachine<
2341
4914
  },
2342
4915
  | InternalPatchEvent
2343
4916
  | MutationEvent
4917
+ | PatchesEvent
2344
4918
  | {
2345
4919
  type: 'add behavior'
2346
4920
  behavior: Behavior
@@ -2357,10 +4931,6 @@ declare const editorMachine: StateMachine<
2357
4931
  type: 'update schema'
2358
4932
  schema: EditorSchema
2359
4933
  }
2360
- | {
2361
- type: 'update behaviors'
2362
- behaviors: Array<Behavior>
2363
- }
2364
4934
  | {
2365
4935
  type: 'update key generator'
2366
4936
  keyGenerator: () => string
@@ -2373,7 +4943,6 @@ declare const editorMachine: StateMachine<
2373
4943
  type: 'update maxBlocks'
2374
4944
  maxBlocks: number | undefined
2375
4945
  }
2376
- | PatchesEvent
2377
4946
  | {
2378
4947
  type: 'blur'
2379
4948
  editor: PortableTextSlateEditor
@@ -2389,7 +4958,10 @@ declare const editorMachine: StateMachine<
2389
4958
  type: 'done normalizing'
2390
4959
  }
2391
4960
  | {
2392
- type: 'done syncing initial value'
4961
+ type: 'done syncing value'
4962
+ }
4963
+ | {
4964
+ type: 'syncing value'
2393
4965
  }
2394
4966
  | {
2395
4967
  type: 'behavior event'
@@ -2480,6 +5052,7 @@ declare const editorMachine: StateMachine<
2480
5052
  getLegacySchema: () => PortableTextMemberSchemaTypes
2481
5053
  keyGenerator: () => string
2482
5054
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5055
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2483
5056
  schema: EditorSchema
2484
5057
  initialReadOnly: boolean
2485
5058
  maxBlocks: number | undefined
@@ -2497,6 +5070,7 @@ declare const editorMachine: StateMachine<
2497
5070
  },
2498
5071
  | InternalPatchEvent
2499
5072
  | MutationEvent
5073
+ | PatchesEvent
2500
5074
  | {
2501
5075
  type: 'add behavior'
2502
5076
  behavior: Behavior
@@ -2513,10 +5087,6 @@ declare const editorMachine: StateMachine<
2513
5087
  type: 'update schema'
2514
5088
  schema: EditorSchema
2515
5089
  }
2516
- | {
2517
- type: 'update behaviors'
2518
- behaviors: Array<Behavior>
2519
- }
2520
5090
  | {
2521
5091
  type: 'update key generator'
2522
5092
  keyGenerator: () => string
@@ -2529,7 +5099,6 @@ declare const editorMachine: StateMachine<
2529
5099
  type: 'update maxBlocks'
2530
5100
  maxBlocks: number | undefined
2531
5101
  }
2532
- | PatchesEvent
2533
5102
  | {
2534
5103
  type: 'blur'
2535
5104
  editor: PortableTextSlateEditor
@@ -2545,7 +5114,10 @@ declare const editorMachine: StateMachine<
2545
5114
  type: 'done normalizing'
2546
5115
  }
2547
5116
  | {
2548
- type: 'done syncing initial value'
5117
+ type: 'done syncing value'
5118
+ }
5119
+ | {
5120
+ type: 'syncing value'
2549
5121
  }
2550
5122
  | {
2551
5123
  type: 'behavior event'
@@ -2685,6 +5257,7 @@ declare const editorMachine: StateMachine<
2685
5257
  getLegacySchema: () => PortableTextMemberSchemaTypes
2686
5258
  keyGenerator: () => string
2687
5259
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5260
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2688
5261
  schema: EditorSchema
2689
5262
  initialReadOnly: boolean
2690
5263
  maxBlocks: number | undefined
@@ -2702,6 +5275,7 @@ declare const editorMachine: StateMachine<
2702
5275
  },
2703
5276
  | InternalPatchEvent
2704
5277
  | MutationEvent
5278
+ | PatchesEvent
2705
5279
  | {
2706
5280
  type: 'add behavior'
2707
5281
  behavior: Behavior
@@ -2718,10 +5292,6 @@ declare const editorMachine: StateMachine<
2718
5292
  type: 'update schema'
2719
5293
  schema: EditorSchema
2720
5294
  }
2721
- | {
2722
- type: 'update behaviors'
2723
- behaviors: Array<Behavior>
2724
- }
2725
5295
  | {
2726
5296
  type: 'update key generator'
2727
5297
  keyGenerator: () => string
@@ -2734,7 +5304,6 @@ declare const editorMachine: StateMachine<
2734
5304
  type: 'update maxBlocks'
2735
5305
  maxBlocks: number | undefined
2736
5306
  }
2737
- | PatchesEvent
2738
5307
  | {
2739
5308
  type: 'blur'
2740
5309
  editor: PortableTextSlateEditor
@@ -2750,7 +5319,10 @@ declare const editorMachine: StateMachine<
2750
5319
  type: 'done normalizing'
2751
5320
  }
2752
5321
  | {
2753
- type: 'done syncing initial value'
5322
+ type: 'done syncing value'
5323
+ }
5324
+ | {
5325
+ type: 'syncing value'
2754
5326
  }
2755
5327
  | {
2756
5328
  type: 'behavior event'
@@ -2889,6 +5461,7 @@ declare const editorMachine: StateMachine<
2889
5461
  getLegacySchema: () => PortableTextMemberSchemaTypes
2890
5462
  keyGenerator: () => string
2891
5463
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5464
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2892
5465
  schema: EditorSchema
2893
5466
  initialReadOnly: boolean
2894
5467
  maxBlocks: number | undefined
@@ -2905,6 +5478,7 @@ declare const editorMachine: StateMachine<
2905
5478
  },
2906
5479
  | InternalPatchEvent
2907
5480
  | MutationEvent
5481
+ | PatchesEvent
2908
5482
  | {
2909
5483
  type: 'add behavior'
2910
5484
  behavior: Behavior
@@ -2921,10 +5495,6 @@ declare const editorMachine: StateMachine<
2921
5495
  type: 'update schema'
2922
5496
  schema: EditorSchema
2923
5497
  }
2924
- | {
2925
- type: 'update behaviors'
2926
- behaviors: Array<Behavior>
2927
- }
2928
5498
  | {
2929
5499
  type: 'update key generator'
2930
5500
  keyGenerator: () => string
@@ -2937,7 +5507,6 @@ declare const editorMachine: StateMachine<
2937
5507
  type: 'update maxBlocks'
2938
5508
  maxBlocks: number | undefined
2939
5509
  }
2940
- | PatchesEvent
2941
5510
  | {
2942
5511
  type: 'blur'
2943
5512
  editor: PortableTextSlateEditor
@@ -2953,7 +5522,10 @@ declare const editorMachine: StateMachine<
2953
5522
  type: 'done normalizing'
2954
5523
  }
2955
5524
  | {
2956
- type: 'done syncing initial value'
5525
+ type: 'done syncing value'
5526
+ }
5527
+ | {
5528
+ type: 'syncing value'
2957
5529
  }
2958
5530
  | {
2959
5531
  type: 'behavior event'
@@ -3092,6 +5664,7 @@ declare const editorMachine: StateMachine<
3092
5664
  getLegacySchema: () => PortableTextMemberSchemaTypes
3093
5665
  keyGenerator: () => string
3094
5666
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5667
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3095
5668
  schema: EditorSchema
3096
5669
  initialReadOnly: boolean
3097
5670
  maxBlocks: number | undefined
@@ -3109,6 +5682,7 @@ declare const editorMachine: StateMachine<
3109
5682
  },
3110
5683
  | InternalPatchEvent
3111
5684
  | MutationEvent
5685
+ | PatchesEvent
3112
5686
  | {
3113
5687
  type: 'add behavior'
3114
5688
  behavior: Behavior
@@ -3125,10 +5699,6 @@ declare const editorMachine: StateMachine<
3125
5699
  type: 'update schema'
3126
5700
  schema: EditorSchema
3127
5701
  }
3128
- | {
3129
- type: 'update behaviors'
3130
- behaviors: Array<Behavior>
3131
- }
3132
5702
  | {
3133
5703
  type: 'update key generator'
3134
5704
  keyGenerator: () => string
@@ -3141,7 +5711,6 @@ declare const editorMachine: StateMachine<
3141
5711
  type: 'update maxBlocks'
3142
5712
  maxBlocks: number | undefined
3143
5713
  }
3144
- | PatchesEvent
3145
5714
  | {
3146
5715
  type: 'blur'
3147
5716
  editor: PortableTextSlateEditor
@@ -3157,7 +5726,10 @@ declare const editorMachine: StateMachine<
3157
5726
  type: 'done normalizing'
3158
5727
  }
3159
5728
  | {
3160
- type: 'done syncing initial value'
5729
+ type: 'done syncing value'
5730
+ }
5731
+ | {
5732
+ type: 'syncing value'
3161
5733
  }
3162
5734
  | {
3163
5735
  type: 'behavior event'
@@ -3294,210 +5866,6 @@ declare const editorMachine: StateMachine<
3294
5866
  readonly 'remove behavior': {
3295
5867
  readonly actions: 'remove behavior from context'
3296
5868
  }
3297
- readonly 'patches': {
3298
- readonly actions: ActionFunction<
3299
- {
3300
- behaviors: Set<Behavior>
3301
- converters: Set<Converter>
3302
- getLegacySchema: () => PortableTextMemberSchemaTypes
3303
- keyGenerator: () => string
3304
- pendingEvents: Array<InternalPatchEvent | MutationEvent>
3305
- schema: EditorSchema
3306
- initialReadOnly: boolean
3307
- maxBlocks: number | undefined
3308
- selection: EditorSelection
3309
- incomingValue: Array<PortableTextBlock> | undefined
3310
- internalDrag?: {
3311
- ghost?: HTMLElement
3312
- origin: Pick<EventPosition, 'selection'>
3313
- }
3314
- slateEditor?: PortableTextSlateEditor
3315
- },
3316
- PatchesEvent,
3317
- | InternalPatchEvent
3318
- | MutationEvent
3319
- | {
3320
- type: 'add behavior'
3321
- behavior: Behavior
3322
- }
3323
- | {
3324
- type: 'remove behavior'
3325
- behavior: Behavior
3326
- }
3327
- | {
3328
- type: 'update readOnly'
3329
- readOnly: boolean
3330
- }
3331
- | {
3332
- type: 'update schema'
3333
- schema: EditorSchema
3334
- }
3335
- | {
3336
- type: 'update behaviors'
3337
- behaviors: Array<Behavior>
3338
- }
3339
- | {
3340
- type: 'update key generator'
3341
- keyGenerator: () => string
3342
- }
3343
- | {
3344
- type: 'update value'
3345
- value: Array<PortableTextBlock> | undefined
3346
- }
3347
- | {
3348
- type: 'update maxBlocks'
3349
- maxBlocks: number | undefined
3350
- }
3351
- | PatchesEvent
3352
- | {
3353
- type: 'blur'
3354
- editor: PortableTextSlateEditor
3355
- }
3356
- | {
3357
- type: 'focus'
3358
- editor: PortableTextSlateEditor
3359
- }
3360
- | {
3361
- type: 'normalizing'
3362
- }
3363
- | {
3364
- type: 'done normalizing'
3365
- }
3366
- | {
3367
- type: 'done syncing initial value'
3368
- }
3369
- | {
3370
- type: 'behavior event'
3371
- behaviorEvent: BehaviorEvent
3372
- editor: PortableTextSlateEditor
3373
- nativeEvent?: {
3374
- preventDefault: () => void
3375
- }
3376
- }
3377
- | {
3378
- type: 'notify.patch'
3379
- patch: Patch
3380
- }
3381
- | {
3382
- type: 'notify.mutation'
3383
- patches: Array<Patch>
3384
- snapshot: Array<PortableTextBlock> | undefined
3385
- value: Array<PortableTextBlock> | undefined
3386
- }
3387
- | {
3388
- type: 'notify.blurred'
3389
- event: FocusEvent_2<HTMLDivElement, Element>
3390
- }
3391
- | {
3392
- type: 'notify.done loading'
3393
- }
3394
- | {
3395
- type: 'notify.editable'
3396
- }
3397
- | {
3398
- type: 'notify.error'
3399
- name: string
3400
- description: string
3401
- data: unknown
3402
- }
3403
- | {
3404
- type: 'notify.focused'
3405
- event: FocusEvent_2<HTMLDivElement, Element>
3406
- }
3407
- | {
3408
- type: 'notify.invalid value'
3409
- resolution: InvalidValueResolution | null
3410
- value: Array<PortableTextBlock> | undefined
3411
- }
3412
- | {
3413
- type: 'notify.loading'
3414
- }
3415
- | {
3416
- type: 'notify.read only'
3417
- }
3418
- | {
3419
- type: 'notify.ready'
3420
- }
3421
- | {
3422
- type: 'notify.selection'
3423
- selection: EditorSelection
3424
- }
3425
- | {
3426
- type: 'notify.value changed'
3427
- value: Array<PortableTextBlock> | undefined
3428
- }
3429
- | {
3430
- type: 'notify.unset'
3431
- previousValue: Array<PortableTextBlock>
3432
- }
3433
- | {
3434
- type: 'dragstart'
3435
- origin: Pick<EventPosition, 'selection'>
3436
- ghost?: HTMLElement
3437
- }
3438
- | {
3439
- type: 'dragend'
3440
- }
3441
- | {
3442
- type: 'drop'
3443
- },
3444
- undefined,
3445
- never,
3446
- never,
3447
- never,
3448
- never,
3449
- | PatchEvent
3450
- | InternalPatchEvent
3451
- | MutationEvent
3452
- | PatchesEvent
3453
- | {
3454
- type: 'blurred'
3455
- event: FocusEvent_2<HTMLDivElement, Element>
3456
- }
3457
- | {
3458
- type: 'done loading'
3459
- }
3460
- | {
3461
- type: 'editable'
3462
- }
3463
- | {
3464
- type: 'error'
3465
- name: string
3466
- description: string
3467
- data: unknown
3468
- }
3469
- | {
3470
- type: 'focused'
3471
- event: FocusEvent_2<HTMLDivElement, Element>
3472
- }
3473
- | {
3474
- type: 'invalid value'
3475
- resolution: InvalidValueResolution | null
3476
- value: Array<PortableTextBlock> | undefined
3477
- }
3478
- | {
3479
- type: 'loading'
3480
- }
3481
- | {
3482
- type: 'read only'
3483
- }
3484
- | {
3485
- type: 'ready'
3486
- }
3487
- | {
3488
- type: 'selection'
3489
- selection: EditorSelection
3490
- }
3491
- | {
3492
- type: 'value changed'
3493
- value: Array<PortableTextBlock> | undefined
3494
- }
3495
- | UnsetEvent
3496
- >
3497
- }
3498
- readonly 'update behaviors': {
3499
- readonly actions: 'assign behaviors'
3500
- }
3501
5869
  readonly 'update key generator': {
3502
5870
  readonly actions: ActionFunction<
3503
5871
  {
@@ -3506,6 +5874,7 @@ declare const editorMachine: StateMachine<
3506
5874
  getLegacySchema: () => PortableTextMemberSchemaTypes
3507
5875
  keyGenerator: () => string
3508
5876
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5877
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3509
5878
  schema: EditorSchema
3510
5879
  initialReadOnly: boolean
3511
5880
  maxBlocks: number | undefined
@@ -3523,6 +5892,7 @@ declare const editorMachine: StateMachine<
3523
5892
  },
3524
5893
  | InternalPatchEvent
3525
5894
  | MutationEvent
5895
+ | PatchesEvent
3526
5896
  | {
3527
5897
  type: 'add behavior'
3528
5898
  behavior: Behavior
@@ -3539,10 +5909,6 @@ declare const editorMachine: StateMachine<
3539
5909
  type: 'update schema'
3540
5910
  schema: EditorSchema
3541
5911
  }
3542
- | {
3543
- type: 'update behaviors'
3544
- behaviors: Array<Behavior>
3545
- }
3546
5912
  | {
3547
5913
  type: 'update key generator'
3548
5914
  keyGenerator: () => string
@@ -3555,7 +5921,6 @@ declare const editorMachine: StateMachine<
3555
5921
  type: 'update maxBlocks'
3556
5922
  maxBlocks: number | undefined
3557
5923
  }
3558
- | PatchesEvent
3559
5924
  | {
3560
5925
  type: 'blur'
3561
5926
  editor: PortableTextSlateEditor
@@ -3571,7 +5936,10 @@ declare const editorMachine: StateMachine<
3571
5936
  type: 'done normalizing'
3572
5937
  }
3573
5938
  | {
3574
- type: 'done syncing initial value'
5939
+ type: 'done syncing value'
5940
+ }
5941
+ | {
5942
+ type: 'syncing value'
3575
5943
  }
3576
5944
  | {
3577
5945
  type: 'behavior event'
@@ -3667,6 +6035,7 @@ declare const editorMachine: StateMachine<
3667
6035
  getLegacySchema: () => PortableTextMemberSchemaTypes
3668
6036
  keyGenerator: () => string
3669
6037
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6038
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3670
6039
  schema: EditorSchema
3671
6040
  initialReadOnly: boolean
3672
6041
  maxBlocks: number | undefined
@@ -3684,6 +6053,7 @@ declare const editorMachine: StateMachine<
3684
6053
  },
3685
6054
  | InternalPatchEvent
3686
6055
  | MutationEvent
6056
+ | PatchesEvent
3687
6057
  | {
3688
6058
  type: 'add behavior'
3689
6059
  behavior: Behavior
@@ -3700,10 +6070,6 @@ declare const editorMachine: StateMachine<
3700
6070
  type: 'update schema'
3701
6071
  schema: EditorSchema
3702
6072
  }
3703
- | {
3704
- type: 'update behaviors'
3705
- behaviors: Array<Behavior>
3706
- }
3707
6073
  | {
3708
6074
  type: 'update key generator'
3709
6075
  keyGenerator: () => string
@@ -3716,7 +6082,6 @@ declare const editorMachine: StateMachine<
3716
6082
  type: 'update maxBlocks'
3717
6083
  maxBlocks: number | undefined
3718
6084
  }
3719
- | PatchesEvent
3720
6085
  | {
3721
6086
  type: 'blur'
3722
6087
  editor: PortableTextSlateEditor
@@ -3732,7 +6097,10 @@ declare const editorMachine: StateMachine<
3732
6097
  type: 'done normalizing'
3733
6098
  }
3734
6099
  | {
3735
- type: 'done syncing initial value'
6100
+ type: 'done syncing value'
6101
+ }
6102
+ | {
6103
+ type: 'syncing value'
3736
6104
  }
3737
6105
  | {
3738
6106
  type: 'behavior event'
@@ -3825,6 +6193,7 @@ declare const editorMachine: StateMachine<
3825
6193
  getLegacySchema: () => PortableTextMemberSchemaTypes
3826
6194
  keyGenerator: () => string
3827
6195
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6196
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3828
6197
  schema: EditorSchema
3829
6198
  initialReadOnly: boolean
3830
6199
  maxBlocks: number | undefined
@@ -3842,6 +6211,7 @@ declare const editorMachine: StateMachine<
3842
6211
  },
3843
6212
  | InternalPatchEvent
3844
6213
  | MutationEvent
6214
+ | PatchesEvent
3845
6215
  | {
3846
6216
  type: 'add behavior'
3847
6217
  behavior: Behavior
@@ -3858,10 +6228,6 @@ declare const editorMachine: StateMachine<
3858
6228
  type: 'update schema'
3859
6229
  schema: EditorSchema
3860
6230
  }
3861
- | {
3862
- type: 'update behaviors'
3863
- behaviors: Array<Behavior>
3864
- }
3865
6231
  | {
3866
6232
  type: 'update key generator'
3867
6233
  keyGenerator: () => string
@@ -3874,7 +6240,6 @@ declare const editorMachine: StateMachine<
3874
6240
  type: 'update maxBlocks'
3875
6241
  maxBlocks: number | undefined
3876
6242
  }
3877
- | PatchesEvent
3878
6243
  | {
3879
6244
  type: 'blur'
3880
6245
  editor: PortableTextSlateEditor
@@ -3890,7 +6255,10 @@ declare const editorMachine: StateMachine<
3890
6255
  type: 'done normalizing'
3891
6256
  }
3892
6257
  | {
3893
- type: 'done syncing initial value'
6258
+ type: 'done syncing value'
6259
+ }
6260
+ | {
6261
+ type: 'syncing value'
3894
6262
  }
3895
6263
  | {
3896
6264
  type: 'behavior event'
@@ -3995,6 +6363,7 @@ declare const editorMachine: StateMachine<
3995
6363
  getLegacySchema: () => PortableTextMemberSchemaTypes
3996
6364
  keyGenerator: () => string
3997
6365
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6366
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3998
6367
  schema: EditorSchema
3999
6368
  initialReadOnly: boolean
4000
6369
  maxBlocks: number | undefined
@@ -4020,7 +6389,7 @@ declare const editorMachine: StateMachine<
4020
6389
  readonly states: {
4021
6390
  readonly 'determine initial edit mode': {
4022
6391
  readonly on: {
4023
- readonly 'done syncing initial value': readonly [
6392
+ readonly 'done syncing value': readonly [
4024
6393
  {
4025
6394
  readonly target: '#editor.edit mode.read only.read only'
4026
6395
  readonly guard: ({
@@ -4034,6 +6403,7 @@ declare const editorMachine: StateMachine<
4034
6403
  pendingEvents: Array<
4035
6404
  InternalPatchEvent | MutationEvent
4036
6405
  >
6406
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4037
6407
  schema: EditorSchema
4038
6408
  initialReadOnly: boolean
4039
6409
  maxBlocks: number | undefined
@@ -4046,7 +6416,7 @@ declare const editorMachine: StateMachine<
4046
6416
  slateEditor?: PortableTextSlateEditor
4047
6417
  },
4048
6418
  {
4049
- type: 'done syncing initial value'
6419
+ type: 'done syncing value'
4050
6420
  }
4051
6421
  >) => boolean
4052
6422
  },
@@ -4068,6 +6438,7 @@ declare const editorMachine: StateMachine<
4068
6438
  getLegacySchema: () => PortableTextMemberSchemaTypes
4069
6439
  keyGenerator: () => string
4070
6440
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6441
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4071
6442
  schema: EditorSchema
4072
6443
  initialReadOnly: boolean
4073
6444
  maxBlocks: number | undefined
@@ -4103,6 +6474,7 @@ declare const editorMachine: StateMachine<
4103
6474
  getLegacySchema: () => PortableTextMemberSchemaTypes
4104
6475
  keyGenerator: () => string
4105
6476
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6477
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4106
6478
  schema: EditorSchema
4107
6479
  initialReadOnly: boolean
4108
6480
  maxBlocks: number | undefined
@@ -4138,6 +6510,7 @@ declare const editorMachine: StateMachine<
4138
6510
  getLegacySchema: () => PortableTextMemberSchemaTypes
4139
6511
  keyGenerator: () => string
4140
6512
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6513
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4141
6514
  schema: EditorSchema
4142
6515
  initialReadOnly: boolean
4143
6516
  maxBlocks: number | undefined
@@ -4155,6 +6528,7 @@ declare const editorMachine: StateMachine<
4155
6528
  },
4156
6529
  | InternalPatchEvent
4157
6530
  | MutationEvent
6531
+ | PatchesEvent
4158
6532
  | {
4159
6533
  type: 'add behavior'
4160
6534
  behavior: Behavior
@@ -4171,10 +6545,6 @@ declare const editorMachine: StateMachine<
4171
6545
  type: 'update schema'
4172
6546
  schema: EditorSchema
4173
6547
  }
4174
- | {
4175
- type: 'update behaviors'
4176
- behaviors: Array<Behavior>
4177
- }
4178
6548
  | {
4179
6549
  type: 'update key generator'
4180
6550
  keyGenerator: () => string
@@ -4187,7 +6557,6 @@ declare const editorMachine: StateMachine<
4187
6557
  type: 'update maxBlocks'
4188
6558
  maxBlocks: number | undefined
4189
6559
  }
4190
- | PatchesEvent
4191
6560
  | {
4192
6561
  type: 'blur'
4193
6562
  editor: PortableTextSlateEditor
@@ -4203,7 +6572,10 @@ declare const editorMachine: StateMachine<
4203
6572
  type: 'done normalizing'
4204
6573
  }
4205
6574
  | {
4206
- type: 'done syncing initial value'
6575
+ type: 'done syncing value'
6576
+ }
6577
+ | {
6578
+ type: 'syncing value'
4207
6579
  }
4208
6580
  | {
4209
6581
  type: 'behavior event'
@@ -4305,6 +6677,7 @@ declare const editorMachine: StateMachine<
4305
6677
  pendingEvents: Array<
4306
6678
  InternalPatchEvent | MutationEvent
4307
6679
  >
6680
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4308
6681
  schema: EditorSchema
4309
6682
  initialReadOnly: boolean
4310
6683
  maxBlocks: number | undefined
@@ -4323,6 +6696,7 @@ declare const editorMachine: StateMachine<
4323
6696
  },
4324
6697
  | InternalPatchEvent
4325
6698
  | MutationEvent
6699
+ | PatchesEvent
4326
6700
  | {
4327
6701
  type: 'add behavior'
4328
6702
  behavior: Behavior
@@ -4339,10 +6713,6 @@ declare const editorMachine: StateMachine<
4339
6713
  type: 'update schema'
4340
6714
  schema: EditorSchema
4341
6715
  }
4342
- | {
4343
- type: 'update behaviors'
4344
- behaviors: Array<Behavior>
4345
- }
4346
6716
  | {
4347
6717
  type: 'update key generator'
4348
6718
  keyGenerator: () => string
@@ -4355,7 +6725,6 @@ declare const editorMachine: StateMachine<
4355
6725
  type: 'update maxBlocks'
4356
6726
  maxBlocks: number | undefined
4357
6727
  }
4358
- | PatchesEvent
4359
6728
  | {
4360
6729
  type: 'blur'
4361
6730
  editor: PortableTextSlateEditor
@@ -4371,7 +6740,10 @@ declare const editorMachine: StateMachine<
4371
6740
  type: 'done normalizing'
4372
6741
  }
4373
6742
  | {
4374
- type: 'done syncing initial value'
6743
+ type: 'done syncing value'
6744
+ }
6745
+ | {
6746
+ type: 'syncing value'
4375
6747
  }
4376
6748
  | {
4377
6749
  type: 'behavior event'
@@ -4495,6 +6867,7 @@ declare const editorMachine: StateMachine<
4495
6867
  getLegacySchema: () => PortableTextMemberSchemaTypes
4496
6868
  keyGenerator: () => string
4497
6869
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6870
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4498
6871
  schema: EditorSchema
4499
6872
  initialReadOnly: boolean
4500
6873
  maxBlocks: number | undefined
@@ -4508,6 +6881,7 @@ declare const editorMachine: StateMachine<
4508
6881
  },
4509
6882
  | InternalPatchEvent
4510
6883
  | MutationEvent
6884
+ | PatchesEvent
4511
6885
  | {
4512
6886
  type: 'add behavior'
4513
6887
  behavior: Behavior
@@ -4524,10 +6898,6 @@ declare const editorMachine: StateMachine<
4524
6898
  type: 'update schema'
4525
6899
  schema: EditorSchema
4526
6900
  }
4527
- | {
4528
- type: 'update behaviors'
4529
- behaviors: Array<Behavior>
4530
- }
4531
6901
  | {
4532
6902
  type: 'update key generator'
4533
6903
  keyGenerator: () => string
@@ -4540,7 +6910,6 @@ declare const editorMachine: StateMachine<
4540
6910
  type: 'update maxBlocks'
4541
6911
  maxBlocks: number | undefined
4542
6912
  }
4543
- | PatchesEvent
4544
6913
  | {
4545
6914
  type: 'blur'
4546
6915
  editor: PortableTextSlateEditor
@@ -4556,7 +6925,10 @@ declare const editorMachine: StateMachine<
4556
6925
  type: 'done normalizing'
4557
6926
  }
4558
6927
  | {
4559
- type: 'done syncing initial value'
6928
+ type: 'done syncing value'
6929
+ }
6930
+ | {
6931
+ type: 'syncing value'
4560
6932
  }
4561
6933
  | {
4562
6934
  type: 'behavior event'
@@ -4635,6 +7007,7 @@ declare const editorMachine: StateMachine<
4635
7007
  },
4636
7008
  | InternalPatchEvent
4637
7009
  | MutationEvent
7010
+ | PatchesEvent
4638
7011
  | {
4639
7012
  type: 'add behavior'
4640
7013
  behavior: Behavior
@@ -4651,10 +7024,6 @@ declare const editorMachine: StateMachine<
4651
7024
  type: 'update schema'
4652
7025
  schema: EditorSchema
4653
7026
  }
4654
- | {
4655
- type: 'update behaviors'
4656
- behaviors: Array<Behavior>
4657
- }
4658
7027
  | {
4659
7028
  type: 'update key generator'
4660
7029
  keyGenerator: () => string
@@ -4667,7 +7036,6 @@ declare const editorMachine: StateMachine<
4667
7036
  type: 'update maxBlocks'
4668
7037
  maxBlocks: number | undefined
4669
7038
  }
4670
- | PatchesEvent
4671
7039
  | {
4672
7040
  type: 'blur'
4673
7041
  editor: PortableTextSlateEditor
@@ -4683,7 +7051,10 @@ declare const editorMachine: StateMachine<
4683
7051
  type: 'done normalizing'
4684
7052
  }
4685
7053
  | {
4686
- type: 'done syncing initial value'
7054
+ type: 'done syncing value'
7055
+ }
7056
+ | {
7057
+ type: 'syncing value'
4687
7058
  }
4688
7059
  | {
4689
7060
  type: 'behavior event'
@@ -4768,6 +7139,7 @@ declare const editorMachine: StateMachine<
4768
7139
  getLegacySchema: () => PortableTextMemberSchemaTypes
4769
7140
  keyGenerator: () => string
4770
7141
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
7142
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4771
7143
  schema: EditorSchema
4772
7144
  initialReadOnly: boolean
4773
7145
  maxBlocks: number | undefined
@@ -4781,6 +7153,7 @@ declare const editorMachine: StateMachine<
4781
7153
  },
4782
7154
  | InternalPatchEvent
4783
7155
  | MutationEvent
7156
+ | PatchesEvent
4784
7157
  | {
4785
7158
  type: 'add behavior'
4786
7159
  behavior: Behavior
@@ -4797,10 +7170,6 @@ declare const editorMachine: StateMachine<
4797
7170
  type: 'update schema'
4798
7171
  schema: EditorSchema
4799
7172
  }
4800
- | {
4801
- type: 'update behaviors'
4802
- behaviors: Array<Behavior>
4803
- }
4804
7173
  | {
4805
7174
  type: 'update key generator'
4806
7175
  keyGenerator: () => string
@@ -4813,7 +7182,6 @@ declare const editorMachine: StateMachine<
4813
7182
  type: 'update maxBlocks'
4814
7183
  maxBlocks: number | undefined
4815
7184
  }
4816
- | PatchesEvent
4817
7185
  | {
4818
7186
  type: 'blur'
4819
7187
  editor: PortableTextSlateEditor
@@ -4829,7 +7197,10 @@ declare const editorMachine: StateMachine<
4829
7197
  type: 'done normalizing'
4830
7198
  }
4831
7199
  | {
4832
- type: 'done syncing initial value'
7200
+ type: 'done syncing value'
7201
+ }
7202
+ | {
7203
+ type: 'syncing value'
4833
7204
  }
4834
7205
  | {
4835
7206
  type: 'behavior event'
@@ -4908,6 +7279,7 @@ declare const editorMachine: StateMachine<
4908
7279
  },
4909
7280
  | InternalPatchEvent
4910
7281
  | MutationEvent
7282
+ | PatchesEvent
4911
7283
  | {
4912
7284
  type: 'add behavior'
4913
7285
  behavior: Behavior
@@ -4924,10 +7296,6 @@ declare const editorMachine: StateMachine<
4924
7296
  type: 'update schema'
4925
7297
  schema: EditorSchema
4926
7298
  }
4927
- | {
4928
- type: 'update behaviors'
4929
- behaviors: Array<Behavior>
4930
- }
4931
7299
  | {
4932
7300
  type: 'update key generator'
4933
7301
  keyGenerator: () => string
@@ -4940,7 +7308,6 @@ declare const editorMachine: StateMachine<
4940
7308
  type: 'update maxBlocks'
4941
7309
  maxBlocks: number | undefined
4942
7310
  }
4943
- | PatchesEvent
4944
7311
  | {
4945
7312
  type: 'blur'
4946
7313
  editor: PortableTextSlateEditor
@@ -4956,7 +7323,10 @@ declare const editorMachine: StateMachine<
4956
7323
  type: 'done normalizing'
4957
7324
  }
4958
7325
  | {
4959
- type: 'done syncing initial value'
7326
+ type: 'done syncing value'
7327
+ }
7328
+ | {
7329
+ type: 'syncing value'
4960
7330
  }
4961
7331
  | {
4962
7332
  type: 'behavior event'
@@ -5059,7 +7429,11 @@ declare const editorMachine: StateMachine<
5059
7429
  readonly initial: 'setting up'
5060
7430
  readonly states: {
5061
7431
  readonly 'setting up': {
5062
- readonly exit: readonly ['emit ready']
7432
+ readonly exit: readonly [
7433
+ 'emit ready',
7434
+ 'emit pending incoming patches',
7435
+ 'clear pending incoming patches',
7436
+ ]
5063
7437
  readonly on: {
5064
7438
  readonly 'internal.patch': {
5065
7439
  readonly actions: 'defer event'
@@ -5067,58 +7441,304 @@ declare const editorMachine: StateMachine<
5067
7441
  readonly 'mutation': {
5068
7442
  readonly actions: 'defer event'
5069
7443
  }
5070
- readonly 'done syncing initial value': {
5071
- readonly target: 'pristine'
7444
+ readonly 'done syncing value': {
7445
+ readonly target: 'set up'
7446
+ }
7447
+ readonly 'patches': {
7448
+ readonly actions: readonly ['defer incoming patches']
5072
7449
  }
5073
7450
  }
5074
7451
  }
5075
- readonly 'pristine': {
5076
- readonly initial: 'idle'
7452
+ readonly 'set up': {
7453
+ readonly type: 'parallel'
5077
7454
  readonly states: {
5078
- readonly idle: {
5079
- readonly on: {
5080
- readonly 'normalizing': {
5081
- readonly target: 'normalizing'
5082
- }
5083
- readonly 'internal.patch': {
5084
- readonly actions: 'defer event'
5085
- readonly target: '#editor.setup.dirty'
7455
+ readonly 'value sync': {
7456
+ readonly initial: 'idle'
7457
+ readonly states: {
7458
+ readonly 'idle': {
7459
+ readonly on: {
7460
+ readonly 'patches': {
7461
+ readonly actions: readonly [
7462
+ ActionFunction<
7463
+ {
7464
+ behaviors: Set<Behavior>
7465
+ converters: Set<Converter>
7466
+ getLegacySchema: () => PortableTextMemberSchemaTypes
7467
+ keyGenerator: () => string
7468
+ pendingEvents: Array<
7469
+ InternalPatchEvent | MutationEvent
7470
+ >
7471
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
7472
+ schema: EditorSchema
7473
+ initialReadOnly: boolean
7474
+ maxBlocks: number | undefined
7475
+ selection: EditorSelection
7476
+ incomingValue:
7477
+ | Array<PortableTextBlock>
7478
+ | undefined
7479
+ internalDrag?: {
7480
+ ghost?: HTMLElement
7481
+ origin: Pick<EventPosition, 'selection'>
7482
+ }
7483
+ slateEditor?: PortableTextSlateEditor
7484
+ },
7485
+ PatchesEvent,
7486
+ | InternalPatchEvent
7487
+ | MutationEvent
7488
+ | PatchesEvent
7489
+ | {
7490
+ type: 'add behavior'
7491
+ behavior: Behavior
7492
+ }
7493
+ | {
7494
+ type: 'remove behavior'
7495
+ behavior: Behavior
7496
+ }
7497
+ | {
7498
+ type: 'update readOnly'
7499
+ readOnly: boolean
7500
+ }
7501
+ | {
7502
+ type: 'update schema'
7503
+ schema: EditorSchema
7504
+ }
7505
+ | {
7506
+ type: 'update key generator'
7507
+ keyGenerator: () => string
7508
+ }
7509
+ | {
7510
+ type: 'update value'
7511
+ value: Array<PortableTextBlock> | undefined
7512
+ }
7513
+ | {
7514
+ type: 'update maxBlocks'
7515
+ maxBlocks: number | undefined
7516
+ }
7517
+ | {
7518
+ type: 'blur'
7519
+ editor: PortableTextSlateEditor
7520
+ }
7521
+ | {
7522
+ type: 'focus'
7523
+ editor: PortableTextSlateEditor
7524
+ }
7525
+ | {
7526
+ type: 'normalizing'
7527
+ }
7528
+ | {
7529
+ type: 'done normalizing'
7530
+ }
7531
+ | {
7532
+ type: 'done syncing value'
7533
+ }
7534
+ | {
7535
+ type: 'syncing value'
7536
+ }
7537
+ | {
7538
+ type: 'behavior event'
7539
+ behaviorEvent: BehaviorEvent
7540
+ editor: PortableTextSlateEditor
7541
+ nativeEvent?: {
7542
+ preventDefault: () => void
7543
+ }
7544
+ }
7545
+ | {
7546
+ type: 'notify.patch'
7547
+ patch: Patch
7548
+ }
7549
+ | {
7550
+ type: 'notify.mutation'
7551
+ patches: Array<Patch>
7552
+ snapshot: Array<PortableTextBlock> | undefined
7553
+ value: Array<PortableTextBlock> | undefined
7554
+ }
7555
+ | {
7556
+ type: 'notify.blurred'
7557
+ event: FocusEvent_2<HTMLDivElement, Element>
7558
+ }
7559
+ | {
7560
+ type: 'notify.done loading'
7561
+ }
7562
+ | {
7563
+ type: 'notify.editable'
7564
+ }
7565
+ | {
7566
+ type: 'notify.error'
7567
+ name: string
7568
+ description: string
7569
+ data: unknown
7570
+ }
7571
+ | {
7572
+ type: 'notify.focused'
7573
+ event: FocusEvent_2<HTMLDivElement, Element>
7574
+ }
7575
+ | {
7576
+ type: 'notify.invalid value'
7577
+ resolution: InvalidValueResolution | null
7578
+ value: Array<PortableTextBlock> | undefined
7579
+ }
7580
+ | {
7581
+ type: 'notify.loading'
7582
+ }
7583
+ | {
7584
+ type: 'notify.read only'
7585
+ }
7586
+ | {
7587
+ type: 'notify.ready'
7588
+ }
7589
+ | {
7590
+ type: 'notify.selection'
7591
+ selection: EditorSelection
7592
+ }
7593
+ | {
7594
+ type: 'notify.value changed'
7595
+ value: Array<PortableTextBlock> | undefined
7596
+ }
7597
+ | {
7598
+ type: 'notify.unset'
7599
+ previousValue: Array<PortableTextBlock>
7600
+ }
7601
+ | {
7602
+ type: 'dragstart'
7603
+ origin: Pick<EventPosition, 'selection'>
7604
+ ghost?: HTMLElement
7605
+ }
7606
+ | {
7607
+ type: 'dragend'
7608
+ }
7609
+ | {
7610
+ type: 'drop'
7611
+ },
7612
+ undefined,
7613
+ never,
7614
+ never,
7615
+ never,
7616
+ never,
7617
+ | PatchEvent
7618
+ | InternalPatchEvent
7619
+ | MutationEvent
7620
+ | PatchesEvent
7621
+ | {
7622
+ type: 'blurred'
7623
+ event: FocusEvent_2<HTMLDivElement, Element>
7624
+ }
7625
+ | {
7626
+ type: 'done loading'
7627
+ }
7628
+ | {
7629
+ type: 'editable'
7630
+ }
7631
+ | {
7632
+ type: 'error'
7633
+ name: string
7634
+ description: string
7635
+ data: unknown
7636
+ }
7637
+ | {
7638
+ type: 'focused'
7639
+ event: FocusEvent_2<HTMLDivElement, Element>
7640
+ }
7641
+ | {
7642
+ type: 'invalid value'
7643
+ resolution: InvalidValueResolution | null
7644
+ value: Array<PortableTextBlock> | undefined
7645
+ }
7646
+ | {
7647
+ type: 'loading'
7648
+ }
7649
+ | {
7650
+ type: 'read only'
7651
+ }
7652
+ | {
7653
+ type: 'ready'
7654
+ }
7655
+ | {
7656
+ type: 'selection'
7657
+ selection: EditorSelection
7658
+ }
7659
+ | {
7660
+ type: 'value changed'
7661
+ value: Array<PortableTextBlock> | undefined
7662
+ }
7663
+ | UnsetEvent
7664
+ >,
7665
+ ]
7666
+ }
7667
+ readonly 'syncing value': {
7668
+ readonly target: 'syncing value'
7669
+ }
7670
+ }
5086
7671
  }
5087
- readonly 'mutation': {
5088
- readonly actions: 'defer event'
5089
- readonly target: '#editor.setup.dirty'
7672
+ readonly 'syncing value': {
7673
+ readonly exit: readonly [
7674
+ 'emit pending incoming patches',
7675
+ 'clear pending incoming patches',
7676
+ ]
7677
+ readonly on: {
7678
+ readonly 'patches': {
7679
+ readonly actions: readonly ['defer incoming patches']
7680
+ }
7681
+ readonly 'done syncing value': {
7682
+ readonly target: 'idle'
7683
+ }
7684
+ }
5090
7685
  }
5091
7686
  }
5092
7687
  }
5093
- readonly normalizing: {
5094
- readonly on: {
5095
- readonly 'done normalizing': {
5096
- readonly target: 'idle'
5097
- }
5098
- readonly 'internal.patch': {
5099
- readonly actions: 'defer event'
7688
+ readonly 'writing': {
7689
+ readonly initial: 'pristine'
7690
+ readonly states: {
7691
+ readonly pristine: {
7692
+ readonly initial: 'idle'
7693
+ readonly states: {
7694
+ readonly idle: {
7695
+ readonly on: {
7696
+ readonly 'normalizing': {
7697
+ readonly target: 'normalizing'
7698
+ }
7699
+ readonly 'internal.patch': {
7700
+ readonly actions: 'defer event'
7701
+ readonly target: '#editor.setup.set up.writing.dirty'
7702
+ }
7703
+ readonly 'mutation': {
7704
+ readonly actions: 'defer event'
7705
+ readonly target: '#editor.setup.set up.writing.dirty'
7706
+ }
7707
+ }
7708
+ }
7709
+ readonly normalizing: {
7710
+ readonly on: {
7711
+ readonly 'done normalizing': {
7712
+ readonly target: 'idle'
7713
+ }
7714
+ readonly 'internal.patch': {
7715
+ readonly actions: 'defer event'
7716
+ }
7717
+ readonly 'mutation': {
7718
+ readonly actions: 'defer event'
7719
+ }
7720
+ }
7721
+ }
7722
+ }
5100
7723
  }
5101
- readonly 'mutation': {
5102
- readonly actions: 'defer event'
7724
+ readonly dirty: {
7725
+ readonly entry: readonly [
7726
+ 'emit pending events',
7727
+ 'clear pending events',
7728
+ ]
7729
+ readonly on: {
7730
+ readonly 'internal.patch': {
7731
+ readonly actions: 'emit patch event'
7732
+ }
7733
+ readonly 'mutation': {
7734
+ readonly actions: 'emit mutation event'
7735
+ }
7736
+ }
5103
7737
  }
5104
7738
  }
5105
7739
  }
5106
7740
  }
5107
7741
  }
5108
- readonly 'dirty': {
5109
- readonly entry: readonly [
5110
- 'emit pending events',
5111
- 'clear pending events',
5112
- ]
5113
- readonly on: {
5114
- readonly 'internal.patch': {
5115
- readonly actions: 'emit patch event'
5116
- }
5117
- readonly 'mutation': {
5118
- readonly actions: 'emit mutation event'
5119
- }
5120
- }
5121
- }
5122
7742
  }
5123
7743
  }
5124
7744
  }
@@ -5339,10 +7959,6 @@ declare type ExternalEditorEvent =
5339
7959
  type: 'update schema'
5340
7960
  schema: EditorSchema
5341
7961
  }
5342
- | {
5343
- type: 'update behaviors'
5344
- behaviors: Array<Behavior>
5345
- }
5346
7962
  | {
5347
7963
  type: 'update key generator'
5348
7964
  keyGenerator: () => string
@@ -5436,9 +8052,6 @@ declare type KeyboardBehaviorEvent =
5436
8052
  >
5437
8053
  }
5438
8054
 
5439
- /**
5440
- * @beta
5441
- */
5442
8055
  declare type MarkdownBehaviorsConfig = {
5443
8056
  horizontalRuleObject?: (context: {schema: EditorSchema}) =>
5444
8057
  | {