@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,
@@ -12,12 +11,13 @@ import type {
12
11
  PortableTextListBlock,
13
12
  PortableTextTextBlock,
14
13
  } from '@sanity/types'
15
- import {PortableTextObject, PortableTextSpan} from '@sanity/types'
14
+ import {KeyedSegment, PortableTextObject, PortableTextSpan} from '@sanity/types'
16
15
  import type {
17
16
  FocusEvent as FocusEvent_2,
18
17
  KeyboardEvent as KeyboardEvent_2,
19
18
  } from 'react'
20
- import type {Descendant, Operation, TextUnit} from 'slate'
19
+ import type {Descendant, Operation} from 'slate'
20
+ import {TextUnit} from 'slate'
21
21
  import type {DOMNode} from 'slate-dom'
22
22
  import type {ReactEditor} from 'slate-react'
23
23
  import {
@@ -41,6 +41,22 @@ import {
41
41
  Values,
42
42
  } from 'xstate'
43
43
  import {GuardArgs} from 'xstate/guards'
44
+ import {BlockOffset as BlockOffset_2} from '..'
45
+ import {
46
+ CustomBehaviorEvent as CustomBehaviorEvent_2,
47
+ NativeBehaviorEvent as NativeBehaviorEvent_2,
48
+ } from '../behaviors'
49
+ import {
50
+ InputBehaviorEvent as InputBehaviorEvent_2,
51
+ InsertPlacement as InsertPlacement_2,
52
+ MouseBehaviorEvent as MouseBehaviorEvent_2,
53
+ } from '../behaviors/behavior.types.event'
54
+ import {MIMEType as MIMEType_2} from '../internal-utils/mime-type'
55
+ import {
56
+ PickFromUnion as PickFromUnion_2,
57
+ StrictExtract as StrictExtract_2,
58
+ } from '../type-utils'
59
+ import {BlockWithOptionalKey as BlockWithOptionalKey_2} from '../types/block-with-optional-key'
44
60
 
45
61
  declare type AbstractBehaviorEvent =
46
62
  | {
@@ -649,6 +665,7 @@ declare const editorMachine: StateMachine<
649
665
  getLegacySchema: () => PortableTextMemberSchemaTypes
650
666
  keyGenerator: () => string
651
667
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
668
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
652
669
  schema: EditorSchema
653
670
  initialReadOnly: boolean
654
671
  maxBlocks: number | undefined
@@ -662,6 +679,7 @@ declare const editorMachine: StateMachine<
662
679
  },
663
680
  | InternalPatchEvent
664
681
  | MutationEvent
682
+ | PatchesEvent
665
683
  | {
666
684
  type: 'add behavior'
667
685
  behavior: Behavior
@@ -678,10 +696,6 @@ declare const editorMachine: StateMachine<
678
696
  type: 'update schema'
679
697
  schema: EditorSchema
680
698
  }
681
- | {
682
- type: 'update behaviors'
683
- behaviors: Array<Behavior>
684
- }
685
699
  | {
686
700
  type: 'update key generator'
687
701
  keyGenerator: () => string
@@ -694,7 +708,6 @@ declare const editorMachine: StateMachine<
694
708
  type: 'update maxBlocks'
695
709
  maxBlocks: number | undefined
696
710
  }
697
- | PatchesEvent
698
711
  | {
699
712
  type: 'blur'
700
713
  editor: PortableTextSlateEditor
@@ -710,7 +723,10 @@ declare const editorMachine: StateMachine<
710
723
  type: 'done normalizing'
711
724
  }
712
725
  | {
713
- type: 'done syncing initial value'
726
+ type: 'done syncing value'
727
+ }
728
+ | {
729
+ type: 'syncing value'
714
730
  }
715
731
  | {
716
732
  type: 'behavior event'
@@ -798,10 +814,6 @@ declare const editorMachine: StateMachine<
798
814
  type: 'remove behavior from context'
799
815
  params: NonReducibleUnknown
800
816
  }
801
- 'assign behaviors': {
802
- type: 'assign behaviors'
803
- params: NonReducibleUnknown
804
- }
805
817
  'assign schema': {
806
818
  type: 'assign schema'
807
819
  params: NonReducibleUnknown
@@ -838,6 +850,18 @@ declare const editorMachine: StateMachine<
838
850
  type: 'clear pending events'
839
851
  params: NonReducibleUnknown
840
852
  }
853
+ 'defer incoming patches': {
854
+ type: 'defer incoming patches'
855
+ params: NonReducibleUnknown
856
+ }
857
+ 'emit pending incoming patches': {
858
+ type: 'emit pending incoming patches'
859
+ params: NonReducibleUnknown
860
+ }
861
+ 'clear pending incoming patches': {
862
+ type: 'clear pending incoming patches'
863
+ params: NonReducibleUnknown
864
+ }
841
865
  'handle blur': {
842
866
  type: 'handle blur'
843
867
  params: unknown
@@ -871,14 +895,19 @@ declare const editorMachine: StateMachine<
871
895
  }
872
896
  'setup':
873
897
  | 'setting up'
874
- | 'dirty'
875
898
  | {
876
- pristine: 'normalizing' | 'idle'
899
+ 'set up': {
900
+ 'value sync': 'syncing value' | 'idle'
901
+ 'writing':
902
+ | 'dirty'
903
+ | {
904
+ pristine: 'normalizing' | 'idle'
905
+ }
906
+ }
877
907
  }
878
908
  },
879
909
  'dragging internally',
880
910
  {
881
- behaviors?: Array<Behavior>
882
911
  converters?: Array<Converter>
883
912
  getLegacySchema: () => PortableTextMemberSchemaTypes
884
913
  keyGenerator: () => string
@@ -964,7 +993,6 @@ declare const editorMachine: StateMachine<
964
993
  ): ActorRefFromLogic<TLogic>
965
994
  }
966
995
  input: {
967
- behaviors?: Array<Behavior>
968
996
  converters?: Array<Converter>
969
997
  getLegacySchema: () => PortableTextMemberSchemaTypes
970
998
  keyGenerator: () => string
@@ -981,6 +1009,7 @@ declare const editorMachine: StateMachine<
981
1009
  getLegacySchema: () => PortableTextMemberSchemaTypes
982
1010
  keyGenerator: () => string
983
1011
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
1012
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
984
1013
  schema: EditorSchema
985
1014
  initialReadOnly: boolean
986
1015
  maxBlocks: number | undefined
@@ -994,6 +1023,7 @@ declare const editorMachine: StateMachine<
994
1023
  },
995
1024
  | InternalPatchEvent
996
1025
  | MutationEvent
1026
+ | PatchesEvent
997
1027
  | {
998
1028
  type: 'add behavior'
999
1029
  behavior: Behavior
@@ -1010,10 +1040,6 @@ declare const editorMachine: StateMachine<
1010
1040
  type: 'update schema'
1011
1041
  schema: EditorSchema
1012
1042
  }
1013
- | {
1014
- type: 'update behaviors'
1015
- behaviors: Array<Behavior>
1016
- }
1017
1043
  | {
1018
1044
  type: 'update key generator'
1019
1045
  keyGenerator: () => string
@@ -1026,7 +1052,6 @@ declare const editorMachine: StateMachine<
1026
1052
  type: 'update maxBlocks'
1027
1053
  maxBlocks: number | undefined
1028
1054
  }
1029
- | PatchesEvent
1030
1055
  | {
1031
1056
  type: 'blur'
1032
1057
  editor: PortableTextSlateEditor
@@ -1042,7 +1067,10 @@ declare const editorMachine: StateMachine<
1042
1067
  type: 'done normalizing'
1043
1068
  }
1044
1069
  | {
1045
- type: 'done syncing initial value'
1070
+ type: 'done syncing value'
1071
+ }
1072
+ | {
1073
+ type: 'syncing value'
1046
1074
  }
1047
1075
  | {
1048
1076
  type: 'behavior event'
@@ -1128,6 +1156,7 @@ declare const editorMachine: StateMachine<
1128
1156
  >,
1129
1157
  | InternalPatchEvent
1130
1158
  | MutationEvent
1159
+ | PatchesEvent
1131
1160
  | {
1132
1161
  type: 'add behavior'
1133
1162
  behavior: Behavior
@@ -1144,10 +1173,6 @@ declare const editorMachine: StateMachine<
1144
1173
  type: 'update schema'
1145
1174
  schema: EditorSchema
1146
1175
  }
1147
- | {
1148
- type: 'update behaviors'
1149
- behaviors: Array<Behavior>
1150
- }
1151
1176
  | {
1152
1177
  type: 'update key generator'
1153
1178
  keyGenerator: () => string
@@ -1160,7 +1185,6 @@ declare const editorMachine: StateMachine<
1160
1185
  type: 'update maxBlocks'
1161
1186
  maxBlocks: number | undefined
1162
1187
  }
1163
- | PatchesEvent
1164
1188
  | {
1165
1189
  type: 'blur'
1166
1190
  editor: PortableTextSlateEditor
@@ -1176,7 +1200,10 @@ declare const editorMachine: StateMachine<
1176
1200
  type: 'done normalizing'
1177
1201
  }
1178
1202
  | {
1179
- type: 'done syncing initial value'
1203
+ type: 'done syncing value'
1204
+ }
1205
+ | {
1206
+ type: 'syncing value'
1180
1207
  }
1181
1208
  | {
1182
1209
  type: 'behavior event'
@@ -1256,11 +1283,2555 @@ declare const editorMachine: StateMachine<
1256
1283
  AnyEventObject
1257
1284
  >
1258
1285
  }) => {
1259
- behaviors: Set<Behavior>
1286
+ behaviors: Set<
1287
+ Behavior<
1288
+ | 'serialize'
1289
+ | 'clipboard.copy'
1290
+ | 'clipboard.cut'
1291
+ | 'drag.dragstart'
1292
+ | 'serialization.failure'
1293
+ | 'serialization.success'
1294
+ | 'deserialize'
1295
+ | 'deserialization.failure'
1296
+ | 'deserialization.success'
1297
+ | 'split'
1298
+ | 'delete'
1299
+ | 'select'
1300
+ | '*'
1301
+ | 'annotation.add'
1302
+ | 'annotation.remove'
1303
+ | 'block.set'
1304
+ | 'block.unset'
1305
+ | 'decorator.add'
1306
+ | 'decorator.remove'
1307
+ | 'delete.backward'
1308
+ | 'delete.block'
1309
+ | 'delete.forward'
1310
+ | 'history.redo'
1311
+ | 'history.undo'
1312
+ | 'insert.inline object'
1313
+ | 'insert.block'
1314
+ | 'insert.span'
1315
+ | 'insert.text'
1316
+ | 'move.backward'
1317
+ | 'move.block'
1318
+ | 'move.forward'
1319
+ | 'annotation.toggle'
1320
+ | 'decorator.toggle'
1321
+ | 'delete.text'
1322
+ | 'insert.blocks'
1323
+ | 'insert.break'
1324
+ | 'insert.soft break'
1325
+ | 'list item.add'
1326
+ | 'list item.remove'
1327
+ | 'list item.toggle'
1328
+ | 'move.block down'
1329
+ | 'move.block up'
1330
+ | 'select.previous block'
1331
+ | 'select.next block'
1332
+ | 'style.add'
1333
+ | 'style.remove'
1334
+ | 'style.toggle'
1335
+ | 'clipboard.paste'
1336
+ | 'drag.drag'
1337
+ | 'drag.dragend'
1338
+ | 'drag.dragenter'
1339
+ | 'drag.dragover'
1340
+ | 'drag.dragleave'
1341
+ | 'drag.drop'
1342
+ | 'input.*'
1343
+ | 'keyboard.keydown'
1344
+ | 'keyboard.keyup'
1345
+ | 'mouse.click'
1346
+ | 'serialize.*'
1347
+ | 'deserialize.*'
1348
+ | 'split.*'
1349
+ | 'block.*'
1350
+ | 'style.*'
1351
+ | 'delete.*'
1352
+ | 'move.*'
1353
+ | 'select.*'
1354
+ | 'history.*'
1355
+ | 'serialization.*'
1356
+ | 'deserialization.*'
1357
+ | 'annotation.*'
1358
+ | 'decorator.*'
1359
+ | 'insert.*'
1360
+ | 'list item.*'
1361
+ | 'clipboard.*'
1362
+ | 'drag.*'
1363
+ | 'keyboard.*'
1364
+ | 'mouse.*'
1365
+ | `custom.${string}`,
1366
+ true,
1367
+ | {
1368
+ type: StrictExtract_2<
1369
+ | 'serialize'
1370
+ | 'serialization.failure'
1371
+ | 'serialization.success'
1372
+ | 'deserialize'
1373
+ | 'deserialization.failure'
1374
+ | 'deserialization.success'
1375
+ | 'split'
1376
+ | 'delete'
1377
+ | 'select'
1378
+ | 'annotation.add'
1379
+ | 'annotation.remove'
1380
+ | 'block.set'
1381
+ | 'block.unset'
1382
+ | 'decorator.add'
1383
+ | 'decorator.remove'
1384
+ | 'delete.backward'
1385
+ | 'delete.block'
1386
+ | 'delete.forward'
1387
+ | 'history.redo'
1388
+ | 'history.undo'
1389
+ | 'insert.inline object'
1390
+ | 'insert.block'
1391
+ | 'insert.span'
1392
+ | 'insert.text'
1393
+ | 'move.backward'
1394
+ | 'move.block'
1395
+ | 'move.forward'
1396
+ | 'annotation.toggle'
1397
+ | 'decorator.toggle'
1398
+ | 'delete.text'
1399
+ | 'insert.blocks'
1400
+ | 'insert.break'
1401
+ | 'insert.soft break'
1402
+ | 'list item.add'
1403
+ | 'list item.remove'
1404
+ | 'list item.toggle'
1405
+ | 'move.block down'
1406
+ | 'move.block up'
1407
+ | 'select.previous block'
1408
+ | 'select.next block'
1409
+ | 'style.add'
1410
+ | 'style.remove'
1411
+ | 'style.toggle',
1412
+ 'annotation.add'
1413
+ >
1414
+ annotation: {
1415
+ name: string
1416
+ value: {
1417
+ [prop: string]: unknown
1418
+ }
1419
+ }
1420
+ }
1421
+ | {
1422
+ type: StrictExtract_2<
1423
+ | 'serialize'
1424
+ | 'serialization.failure'
1425
+ | 'serialization.success'
1426
+ | 'deserialize'
1427
+ | 'deserialization.failure'
1428
+ | 'deserialization.success'
1429
+ | 'split'
1430
+ | 'delete'
1431
+ | 'select'
1432
+ | 'annotation.add'
1433
+ | 'annotation.remove'
1434
+ | 'block.set'
1435
+ | 'block.unset'
1436
+ | 'decorator.add'
1437
+ | 'decorator.remove'
1438
+ | 'delete.backward'
1439
+ | 'delete.block'
1440
+ | 'delete.forward'
1441
+ | 'history.redo'
1442
+ | 'history.undo'
1443
+ | 'insert.inline object'
1444
+ | 'insert.block'
1445
+ | 'insert.span'
1446
+ | 'insert.text'
1447
+ | 'move.backward'
1448
+ | 'move.block'
1449
+ | 'move.forward'
1450
+ | 'annotation.toggle'
1451
+ | 'decorator.toggle'
1452
+ | 'delete.text'
1453
+ | 'insert.blocks'
1454
+ | 'insert.break'
1455
+ | 'insert.soft break'
1456
+ | 'list item.add'
1457
+ | 'list item.remove'
1458
+ | 'list item.toggle'
1459
+ | 'move.block down'
1460
+ | 'move.block up'
1461
+ | 'select.previous block'
1462
+ | 'select.next block'
1463
+ | 'style.add'
1464
+ | 'style.remove'
1465
+ | 'style.toggle',
1466
+ 'annotation.remove'
1467
+ >
1468
+ annotation: {
1469
+ name: string
1470
+ }
1471
+ }
1472
+ | {
1473
+ type: StrictExtract_2<
1474
+ | 'serialize'
1475
+ | 'serialization.failure'
1476
+ | 'serialization.success'
1477
+ | 'deserialize'
1478
+ | 'deserialization.failure'
1479
+ | 'deserialization.success'
1480
+ | 'split'
1481
+ | 'delete'
1482
+ | 'select'
1483
+ | 'annotation.add'
1484
+ | 'annotation.remove'
1485
+ | 'block.set'
1486
+ | 'block.unset'
1487
+ | 'decorator.add'
1488
+ | 'decorator.remove'
1489
+ | 'delete.backward'
1490
+ | 'delete.block'
1491
+ | 'delete.forward'
1492
+ | 'history.redo'
1493
+ | 'history.undo'
1494
+ | 'insert.inline object'
1495
+ | 'insert.block'
1496
+ | 'insert.span'
1497
+ | 'insert.text'
1498
+ | 'move.backward'
1499
+ | 'move.block'
1500
+ | 'move.forward'
1501
+ | 'annotation.toggle'
1502
+ | 'decorator.toggle'
1503
+ | 'delete.text'
1504
+ | 'insert.blocks'
1505
+ | 'insert.break'
1506
+ | 'insert.soft break'
1507
+ | 'list item.add'
1508
+ | 'list item.remove'
1509
+ | 'list item.toggle'
1510
+ | 'move.block down'
1511
+ | 'move.block up'
1512
+ | 'select.previous block'
1513
+ | 'select.next block'
1514
+ | 'style.add'
1515
+ | 'style.remove'
1516
+ | 'style.toggle',
1517
+ 'block.set'
1518
+ >
1519
+ at: [KeyedSegment]
1520
+ props: Record<string, unknown>
1521
+ }
1522
+ | {
1523
+ type: StrictExtract_2<
1524
+ | 'serialize'
1525
+ | 'serialization.failure'
1526
+ | 'serialization.success'
1527
+ | 'deserialize'
1528
+ | 'deserialization.failure'
1529
+ | 'deserialization.success'
1530
+ | 'split'
1531
+ | 'delete'
1532
+ | 'select'
1533
+ | 'annotation.add'
1534
+ | 'annotation.remove'
1535
+ | 'block.set'
1536
+ | 'block.unset'
1537
+ | 'decorator.add'
1538
+ | 'decorator.remove'
1539
+ | 'delete.backward'
1540
+ | 'delete.block'
1541
+ | 'delete.forward'
1542
+ | 'history.redo'
1543
+ | 'history.undo'
1544
+ | 'insert.inline object'
1545
+ | 'insert.block'
1546
+ | 'insert.span'
1547
+ | 'insert.text'
1548
+ | 'move.backward'
1549
+ | 'move.block'
1550
+ | 'move.forward'
1551
+ | 'annotation.toggle'
1552
+ | 'decorator.toggle'
1553
+ | 'delete.text'
1554
+ | 'insert.blocks'
1555
+ | 'insert.break'
1556
+ | 'insert.soft break'
1557
+ | 'list item.add'
1558
+ | 'list item.remove'
1559
+ | 'list item.toggle'
1560
+ | 'move.block down'
1561
+ | 'move.block up'
1562
+ | 'select.previous block'
1563
+ | 'select.next block'
1564
+ | 'style.add'
1565
+ | 'style.remove'
1566
+ | 'style.toggle',
1567
+ 'block.unset'
1568
+ >
1569
+ at: [KeyedSegment]
1570
+ props: Array<string>
1571
+ }
1572
+ | {
1573
+ type: StrictExtract_2<
1574
+ | 'serialize'
1575
+ | 'serialization.failure'
1576
+ | 'serialization.success'
1577
+ | 'deserialize'
1578
+ | 'deserialization.failure'
1579
+ | 'deserialization.success'
1580
+ | 'split'
1581
+ | 'delete'
1582
+ | 'select'
1583
+ | 'annotation.add'
1584
+ | 'annotation.remove'
1585
+ | 'block.set'
1586
+ | 'block.unset'
1587
+ | 'decorator.add'
1588
+ | 'decorator.remove'
1589
+ | 'delete.backward'
1590
+ | 'delete.block'
1591
+ | 'delete.forward'
1592
+ | 'history.redo'
1593
+ | 'history.undo'
1594
+ | 'insert.inline object'
1595
+ | 'insert.block'
1596
+ | 'insert.span'
1597
+ | 'insert.text'
1598
+ | 'move.backward'
1599
+ | 'move.block'
1600
+ | 'move.forward'
1601
+ | 'annotation.toggle'
1602
+ | 'decorator.toggle'
1603
+ | 'delete.text'
1604
+ | 'insert.blocks'
1605
+ | 'insert.break'
1606
+ | 'insert.soft break'
1607
+ | 'list item.add'
1608
+ | 'list item.remove'
1609
+ | 'list item.toggle'
1610
+ | 'move.block down'
1611
+ | 'move.block up'
1612
+ | 'select.previous block'
1613
+ | 'select.next block'
1614
+ | 'style.add'
1615
+ | 'style.remove'
1616
+ | 'style.toggle',
1617
+ 'decorator.add'
1618
+ >
1619
+ decorator: string
1620
+ at?: {
1621
+ anchor: BlockOffset_2
1622
+ focus: BlockOffset_2
1623
+ }
1624
+ }
1625
+ | {
1626
+ type: StrictExtract_2<
1627
+ | 'serialize'
1628
+ | 'serialization.failure'
1629
+ | 'serialization.success'
1630
+ | 'deserialize'
1631
+ | 'deserialization.failure'
1632
+ | 'deserialization.success'
1633
+ | 'split'
1634
+ | 'delete'
1635
+ | 'select'
1636
+ | 'annotation.add'
1637
+ | 'annotation.remove'
1638
+ | 'block.set'
1639
+ | 'block.unset'
1640
+ | 'decorator.add'
1641
+ | 'decorator.remove'
1642
+ | 'delete.backward'
1643
+ | 'delete.block'
1644
+ | 'delete.forward'
1645
+ | 'history.redo'
1646
+ | 'history.undo'
1647
+ | 'insert.inline object'
1648
+ | 'insert.block'
1649
+ | 'insert.span'
1650
+ | 'insert.text'
1651
+ | 'move.backward'
1652
+ | 'move.block'
1653
+ | 'move.forward'
1654
+ | 'annotation.toggle'
1655
+ | 'decorator.toggle'
1656
+ | 'delete.text'
1657
+ | 'insert.blocks'
1658
+ | 'insert.break'
1659
+ | 'insert.soft break'
1660
+ | 'list item.add'
1661
+ | 'list item.remove'
1662
+ | 'list item.toggle'
1663
+ | 'move.block down'
1664
+ | 'move.block up'
1665
+ | 'select.previous block'
1666
+ | 'select.next block'
1667
+ | 'style.add'
1668
+ | 'style.remove'
1669
+ | 'style.toggle',
1670
+ 'decorator.remove'
1671
+ >
1672
+ decorator: string
1673
+ }
1674
+ | {
1675
+ type: StrictExtract_2<
1676
+ | 'serialize'
1677
+ | 'serialization.failure'
1678
+ | 'serialization.success'
1679
+ | 'deserialize'
1680
+ | 'deserialization.failure'
1681
+ | 'deserialization.success'
1682
+ | 'split'
1683
+ | 'delete'
1684
+ | 'select'
1685
+ | 'annotation.add'
1686
+ | 'annotation.remove'
1687
+ | 'block.set'
1688
+ | 'block.unset'
1689
+ | 'decorator.add'
1690
+ | 'decorator.remove'
1691
+ | 'delete.backward'
1692
+ | 'delete.block'
1693
+ | 'delete.forward'
1694
+ | 'history.redo'
1695
+ | 'history.undo'
1696
+ | 'insert.inline object'
1697
+ | 'insert.block'
1698
+ | 'insert.span'
1699
+ | 'insert.text'
1700
+ | 'move.backward'
1701
+ | 'move.block'
1702
+ | 'move.forward'
1703
+ | 'annotation.toggle'
1704
+ | 'decorator.toggle'
1705
+ | 'delete.text'
1706
+ | 'insert.blocks'
1707
+ | 'insert.break'
1708
+ | 'insert.soft break'
1709
+ | 'list item.add'
1710
+ | 'list item.remove'
1711
+ | 'list item.toggle'
1712
+ | 'move.block down'
1713
+ | 'move.block up'
1714
+ | 'select.previous block'
1715
+ | 'select.next block'
1716
+ | 'style.add'
1717
+ | 'style.remove'
1718
+ | 'style.toggle',
1719
+ 'delete'
1720
+ >
1721
+ at: NonNullable<EditorSelection>
1722
+ }
1723
+ | {
1724
+ type: StrictExtract_2<
1725
+ | 'serialize'
1726
+ | 'serialization.failure'
1727
+ | 'serialization.success'
1728
+ | 'deserialize'
1729
+ | 'deserialization.failure'
1730
+ | 'deserialization.success'
1731
+ | 'split'
1732
+ | 'delete'
1733
+ | 'select'
1734
+ | 'annotation.add'
1735
+ | 'annotation.remove'
1736
+ | 'block.set'
1737
+ | 'block.unset'
1738
+ | 'decorator.add'
1739
+ | 'decorator.remove'
1740
+ | 'delete.backward'
1741
+ | 'delete.block'
1742
+ | 'delete.forward'
1743
+ | 'history.redo'
1744
+ | 'history.undo'
1745
+ | 'insert.inline object'
1746
+ | 'insert.block'
1747
+ | 'insert.span'
1748
+ | 'insert.text'
1749
+ | 'move.backward'
1750
+ | 'move.block'
1751
+ | 'move.forward'
1752
+ | 'annotation.toggle'
1753
+ | 'decorator.toggle'
1754
+ | 'delete.text'
1755
+ | 'insert.blocks'
1756
+ | 'insert.break'
1757
+ | 'insert.soft break'
1758
+ | 'list item.add'
1759
+ | 'list item.remove'
1760
+ | 'list item.toggle'
1761
+ | 'move.block down'
1762
+ | 'move.block up'
1763
+ | 'select.previous block'
1764
+ | 'select.next block'
1765
+ | 'style.add'
1766
+ | 'style.remove'
1767
+ | 'style.toggle',
1768
+ 'delete.backward'
1769
+ >
1770
+ unit: TextUnit
1771
+ }
1772
+ | {
1773
+ type: StrictExtract_2<
1774
+ | 'serialize'
1775
+ | 'serialization.failure'
1776
+ | 'serialization.success'
1777
+ | 'deserialize'
1778
+ | 'deserialization.failure'
1779
+ | 'deserialization.success'
1780
+ | 'split'
1781
+ | 'delete'
1782
+ | 'select'
1783
+ | 'annotation.add'
1784
+ | 'annotation.remove'
1785
+ | 'block.set'
1786
+ | 'block.unset'
1787
+ | 'decorator.add'
1788
+ | 'decorator.remove'
1789
+ | 'delete.backward'
1790
+ | 'delete.block'
1791
+ | 'delete.forward'
1792
+ | 'history.redo'
1793
+ | 'history.undo'
1794
+ | 'insert.inline object'
1795
+ | 'insert.block'
1796
+ | 'insert.span'
1797
+ | 'insert.text'
1798
+ | 'move.backward'
1799
+ | 'move.block'
1800
+ | 'move.forward'
1801
+ | 'annotation.toggle'
1802
+ | 'decorator.toggle'
1803
+ | 'delete.text'
1804
+ | 'insert.blocks'
1805
+ | 'insert.break'
1806
+ | 'insert.soft break'
1807
+ | 'list item.add'
1808
+ | 'list item.remove'
1809
+ | 'list item.toggle'
1810
+ | 'move.block down'
1811
+ | 'move.block up'
1812
+ | 'select.previous block'
1813
+ | 'select.next block'
1814
+ | 'style.add'
1815
+ | 'style.remove'
1816
+ | 'style.toggle',
1817
+ 'delete.block'
1818
+ >
1819
+ at: [KeyedSegment]
1820
+ }
1821
+ | {
1822
+ type: StrictExtract_2<
1823
+ | 'serialize'
1824
+ | 'serialization.failure'
1825
+ | 'serialization.success'
1826
+ | 'deserialize'
1827
+ | 'deserialization.failure'
1828
+ | 'deserialization.success'
1829
+ | 'split'
1830
+ | 'delete'
1831
+ | 'select'
1832
+ | 'annotation.add'
1833
+ | 'annotation.remove'
1834
+ | 'block.set'
1835
+ | 'block.unset'
1836
+ | 'decorator.add'
1837
+ | 'decorator.remove'
1838
+ | 'delete.backward'
1839
+ | 'delete.block'
1840
+ | 'delete.forward'
1841
+ | 'history.redo'
1842
+ | 'history.undo'
1843
+ | 'insert.inline object'
1844
+ | 'insert.block'
1845
+ | 'insert.span'
1846
+ | 'insert.text'
1847
+ | 'move.backward'
1848
+ | 'move.block'
1849
+ | 'move.forward'
1850
+ | 'annotation.toggle'
1851
+ | 'decorator.toggle'
1852
+ | 'delete.text'
1853
+ | 'insert.blocks'
1854
+ | 'insert.break'
1855
+ | 'insert.soft break'
1856
+ | 'list item.add'
1857
+ | 'list item.remove'
1858
+ | 'list item.toggle'
1859
+ | 'move.block down'
1860
+ | 'move.block up'
1861
+ | 'select.previous block'
1862
+ | 'select.next block'
1863
+ | 'style.add'
1864
+ | 'style.remove'
1865
+ | 'style.toggle',
1866
+ 'delete.forward'
1867
+ >
1868
+ unit: TextUnit
1869
+ }
1870
+ | {
1871
+ type: StrictExtract_2<
1872
+ | 'serialize'
1873
+ | 'serialization.failure'
1874
+ | 'serialization.success'
1875
+ | 'deserialize'
1876
+ | 'deserialization.failure'
1877
+ | 'deserialization.success'
1878
+ | 'split'
1879
+ | 'delete'
1880
+ | 'select'
1881
+ | 'annotation.add'
1882
+ | 'annotation.remove'
1883
+ | 'block.set'
1884
+ | 'block.unset'
1885
+ | 'decorator.add'
1886
+ | 'decorator.remove'
1887
+ | 'delete.backward'
1888
+ | 'delete.block'
1889
+ | 'delete.forward'
1890
+ | 'history.redo'
1891
+ | 'history.undo'
1892
+ | 'insert.inline object'
1893
+ | 'insert.block'
1894
+ | 'insert.span'
1895
+ | 'insert.text'
1896
+ | 'move.backward'
1897
+ | 'move.block'
1898
+ | 'move.forward'
1899
+ | 'annotation.toggle'
1900
+ | 'decorator.toggle'
1901
+ | 'delete.text'
1902
+ | 'insert.blocks'
1903
+ | 'insert.break'
1904
+ | 'insert.soft break'
1905
+ | 'list item.add'
1906
+ | 'list item.remove'
1907
+ | 'list item.toggle'
1908
+ | 'move.block down'
1909
+ | 'move.block up'
1910
+ | 'select.previous block'
1911
+ | 'select.next block'
1912
+ | 'style.add'
1913
+ | 'style.remove'
1914
+ | 'style.toggle',
1915
+ 'history.redo'
1916
+ >
1917
+ }
1918
+ | {
1919
+ type: StrictExtract_2<
1920
+ | 'serialize'
1921
+ | 'serialization.failure'
1922
+ | 'serialization.success'
1923
+ | 'deserialize'
1924
+ | 'deserialization.failure'
1925
+ | 'deserialization.success'
1926
+ | 'split'
1927
+ | 'delete'
1928
+ | 'select'
1929
+ | 'annotation.add'
1930
+ | 'annotation.remove'
1931
+ | 'block.set'
1932
+ | 'block.unset'
1933
+ | 'decorator.add'
1934
+ | 'decorator.remove'
1935
+ | 'delete.backward'
1936
+ | 'delete.block'
1937
+ | 'delete.forward'
1938
+ | 'history.redo'
1939
+ | 'history.undo'
1940
+ | 'insert.inline object'
1941
+ | 'insert.block'
1942
+ | 'insert.span'
1943
+ | 'insert.text'
1944
+ | 'move.backward'
1945
+ | 'move.block'
1946
+ | 'move.forward'
1947
+ | 'annotation.toggle'
1948
+ | 'decorator.toggle'
1949
+ | 'delete.text'
1950
+ | 'insert.blocks'
1951
+ | 'insert.break'
1952
+ | 'insert.soft break'
1953
+ | 'list item.add'
1954
+ | 'list item.remove'
1955
+ | 'list item.toggle'
1956
+ | 'move.block down'
1957
+ | 'move.block up'
1958
+ | 'select.previous block'
1959
+ | 'select.next block'
1960
+ | 'style.add'
1961
+ | 'style.remove'
1962
+ | 'style.toggle',
1963
+ 'history.undo'
1964
+ >
1965
+ }
1966
+ | {
1967
+ type: StrictExtract_2<
1968
+ | 'serialize'
1969
+ | 'serialization.failure'
1970
+ | 'serialization.success'
1971
+ | 'deserialize'
1972
+ | 'deserialization.failure'
1973
+ | 'deserialization.success'
1974
+ | 'split'
1975
+ | 'delete'
1976
+ | 'select'
1977
+ | 'annotation.add'
1978
+ | 'annotation.remove'
1979
+ | 'block.set'
1980
+ | 'block.unset'
1981
+ | 'decorator.add'
1982
+ | 'decorator.remove'
1983
+ | 'delete.backward'
1984
+ | 'delete.block'
1985
+ | 'delete.forward'
1986
+ | 'history.redo'
1987
+ | 'history.undo'
1988
+ | 'insert.inline object'
1989
+ | 'insert.block'
1990
+ | 'insert.span'
1991
+ | 'insert.text'
1992
+ | 'move.backward'
1993
+ | 'move.block'
1994
+ | 'move.forward'
1995
+ | 'annotation.toggle'
1996
+ | 'decorator.toggle'
1997
+ | 'delete.text'
1998
+ | 'insert.blocks'
1999
+ | 'insert.break'
2000
+ | 'insert.soft break'
2001
+ | 'list item.add'
2002
+ | 'list item.remove'
2003
+ | 'list item.toggle'
2004
+ | 'move.block down'
2005
+ | 'move.block up'
2006
+ | 'select.previous block'
2007
+ | 'select.next block'
2008
+ | 'style.add'
2009
+ | 'style.remove'
2010
+ | 'style.toggle',
2011
+ 'insert.inline object'
2012
+ >
2013
+ inlineObject: {
2014
+ name: string
2015
+ value?: {
2016
+ [prop: string]: unknown
2017
+ }
2018
+ }
2019
+ }
2020
+ | {
2021
+ type: StrictExtract_2<
2022
+ | 'serialize'
2023
+ | 'serialization.failure'
2024
+ | 'serialization.success'
2025
+ | 'deserialize'
2026
+ | 'deserialization.failure'
2027
+ | 'deserialization.success'
2028
+ | 'split'
2029
+ | 'delete'
2030
+ | 'select'
2031
+ | 'annotation.add'
2032
+ | 'annotation.remove'
2033
+ | 'block.set'
2034
+ | 'block.unset'
2035
+ | 'decorator.add'
2036
+ | 'decorator.remove'
2037
+ | 'delete.backward'
2038
+ | 'delete.block'
2039
+ | 'delete.forward'
2040
+ | 'history.redo'
2041
+ | 'history.undo'
2042
+ | 'insert.inline object'
2043
+ | 'insert.block'
2044
+ | 'insert.span'
2045
+ | 'insert.text'
2046
+ | 'move.backward'
2047
+ | 'move.block'
2048
+ | 'move.forward'
2049
+ | 'annotation.toggle'
2050
+ | 'decorator.toggle'
2051
+ | 'delete.text'
2052
+ | 'insert.blocks'
2053
+ | 'insert.break'
2054
+ | 'insert.soft break'
2055
+ | 'list item.add'
2056
+ | 'list item.remove'
2057
+ | 'list item.toggle'
2058
+ | 'move.block down'
2059
+ | 'move.block up'
2060
+ | 'select.previous block'
2061
+ | 'select.next block'
2062
+ | 'style.add'
2063
+ | 'style.remove'
2064
+ | 'style.toggle',
2065
+ 'insert.block'
2066
+ >
2067
+ block: BlockWithOptionalKey_2
2068
+ placement: InsertPlacement_2
2069
+ select?: 'start' | 'end' | 'none'
2070
+ }
2071
+ | {
2072
+ type: StrictExtract_2<
2073
+ | 'serialize'
2074
+ | 'serialization.failure'
2075
+ | 'serialization.success'
2076
+ | 'deserialize'
2077
+ | 'deserialization.failure'
2078
+ | 'deserialization.success'
2079
+ | 'split'
2080
+ | 'delete'
2081
+ | 'select'
2082
+ | 'annotation.add'
2083
+ | 'annotation.remove'
2084
+ | 'block.set'
2085
+ | 'block.unset'
2086
+ | 'decorator.add'
2087
+ | 'decorator.remove'
2088
+ | 'delete.backward'
2089
+ | 'delete.block'
2090
+ | 'delete.forward'
2091
+ | 'history.redo'
2092
+ | 'history.undo'
2093
+ | 'insert.inline object'
2094
+ | 'insert.block'
2095
+ | 'insert.span'
2096
+ | 'insert.text'
2097
+ | 'move.backward'
2098
+ | 'move.block'
2099
+ | 'move.forward'
2100
+ | 'annotation.toggle'
2101
+ | 'decorator.toggle'
2102
+ | 'delete.text'
2103
+ | 'insert.blocks'
2104
+ | 'insert.break'
2105
+ | 'insert.soft break'
2106
+ | 'list item.add'
2107
+ | 'list item.remove'
2108
+ | 'list item.toggle'
2109
+ | 'move.block down'
2110
+ | 'move.block up'
2111
+ | 'select.previous block'
2112
+ | 'select.next block'
2113
+ | 'style.add'
2114
+ | 'style.remove'
2115
+ | 'style.toggle',
2116
+ 'insert.span'
2117
+ >
2118
+ text: string
2119
+ annotations?: Array<{
2120
+ name: string
2121
+ value: {
2122
+ [prop: string]: unknown
2123
+ }
2124
+ }>
2125
+ decorators?: Array<string>
2126
+ }
2127
+ | {
2128
+ type: StrictExtract_2<
2129
+ | 'serialize'
2130
+ | 'serialization.failure'
2131
+ | 'serialization.success'
2132
+ | 'deserialize'
2133
+ | 'deserialization.failure'
2134
+ | 'deserialization.success'
2135
+ | 'split'
2136
+ | 'delete'
2137
+ | 'select'
2138
+ | 'annotation.add'
2139
+ | 'annotation.remove'
2140
+ | 'block.set'
2141
+ | 'block.unset'
2142
+ | 'decorator.add'
2143
+ | 'decorator.remove'
2144
+ | 'delete.backward'
2145
+ | 'delete.block'
2146
+ | 'delete.forward'
2147
+ | 'history.redo'
2148
+ | 'history.undo'
2149
+ | 'insert.inline object'
2150
+ | 'insert.block'
2151
+ | 'insert.span'
2152
+ | 'insert.text'
2153
+ | 'move.backward'
2154
+ | 'move.block'
2155
+ | 'move.forward'
2156
+ | 'annotation.toggle'
2157
+ | 'decorator.toggle'
2158
+ | 'delete.text'
2159
+ | 'insert.blocks'
2160
+ | 'insert.break'
2161
+ | 'insert.soft break'
2162
+ | 'list item.add'
2163
+ | 'list item.remove'
2164
+ | 'list item.toggle'
2165
+ | 'move.block down'
2166
+ | 'move.block up'
2167
+ | 'select.previous block'
2168
+ | 'select.next block'
2169
+ | 'style.add'
2170
+ | 'style.remove'
2171
+ | 'style.toggle',
2172
+ 'insert.text'
2173
+ >
2174
+ text: string
2175
+ }
2176
+ | {
2177
+ type: StrictExtract_2<
2178
+ | 'serialize'
2179
+ | 'serialization.failure'
2180
+ | 'serialization.success'
2181
+ | 'deserialize'
2182
+ | 'deserialization.failure'
2183
+ | 'deserialization.success'
2184
+ | 'split'
2185
+ | 'delete'
2186
+ | 'select'
2187
+ | 'annotation.add'
2188
+ | 'annotation.remove'
2189
+ | 'block.set'
2190
+ | 'block.unset'
2191
+ | 'decorator.add'
2192
+ | 'decorator.remove'
2193
+ | 'delete.backward'
2194
+ | 'delete.block'
2195
+ | 'delete.forward'
2196
+ | 'history.redo'
2197
+ | 'history.undo'
2198
+ | 'insert.inline object'
2199
+ | 'insert.block'
2200
+ | 'insert.span'
2201
+ | 'insert.text'
2202
+ | 'move.backward'
2203
+ | 'move.block'
2204
+ | 'move.forward'
2205
+ | 'annotation.toggle'
2206
+ | 'decorator.toggle'
2207
+ | 'delete.text'
2208
+ | 'insert.blocks'
2209
+ | 'insert.break'
2210
+ | 'insert.soft break'
2211
+ | 'list item.add'
2212
+ | 'list item.remove'
2213
+ | 'list item.toggle'
2214
+ | 'move.block down'
2215
+ | 'move.block up'
2216
+ | 'select.previous block'
2217
+ | 'select.next block'
2218
+ | 'style.add'
2219
+ | 'style.remove'
2220
+ | 'style.toggle',
2221
+ 'move.backward'
2222
+ >
2223
+ distance: number
2224
+ }
2225
+ | {
2226
+ type: StrictExtract_2<
2227
+ | 'serialize'
2228
+ | 'serialization.failure'
2229
+ | 'serialization.success'
2230
+ | 'deserialize'
2231
+ | 'deserialization.failure'
2232
+ | 'deserialization.success'
2233
+ | 'split'
2234
+ | 'delete'
2235
+ | 'select'
2236
+ | 'annotation.add'
2237
+ | 'annotation.remove'
2238
+ | 'block.set'
2239
+ | 'block.unset'
2240
+ | 'decorator.add'
2241
+ | 'decorator.remove'
2242
+ | 'delete.backward'
2243
+ | 'delete.block'
2244
+ | 'delete.forward'
2245
+ | 'history.redo'
2246
+ | 'history.undo'
2247
+ | 'insert.inline object'
2248
+ | 'insert.block'
2249
+ | 'insert.span'
2250
+ | 'insert.text'
2251
+ | 'move.backward'
2252
+ | 'move.block'
2253
+ | 'move.forward'
2254
+ | 'annotation.toggle'
2255
+ | 'decorator.toggle'
2256
+ | 'delete.text'
2257
+ | 'insert.blocks'
2258
+ | 'insert.break'
2259
+ | 'insert.soft break'
2260
+ | 'list item.add'
2261
+ | 'list item.remove'
2262
+ | 'list item.toggle'
2263
+ | 'move.block down'
2264
+ | 'move.block up'
2265
+ | 'select.previous block'
2266
+ | 'select.next block'
2267
+ | 'style.add'
2268
+ | 'style.remove'
2269
+ | 'style.toggle',
2270
+ 'move.block'
2271
+ >
2272
+ at: [KeyedSegment]
2273
+ to: [KeyedSegment]
2274
+ }
2275
+ | {
2276
+ type: StrictExtract_2<
2277
+ | 'serialize'
2278
+ | 'serialization.failure'
2279
+ | 'serialization.success'
2280
+ | 'deserialize'
2281
+ | 'deserialization.failure'
2282
+ | 'deserialization.success'
2283
+ | 'split'
2284
+ | 'delete'
2285
+ | 'select'
2286
+ | 'annotation.add'
2287
+ | 'annotation.remove'
2288
+ | 'block.set'
2289
+ | 'block.unset'
2290
+ | 'decorator.add'
2291
+ | 'decorator.remove'
2292
+ | 'delete.backward'
2293
+ | 'delete.block'
2294
+ | 'delete.forward'
2295
+ | 'history.redo'
2296
+ | 'history.undo'
2297
+ | 'insert.inline object'
2298
+ | 'insert.block'
2299
+ | 'insert.span'
2300
+ | 'insert.text'
2301
+ | 'move.backward'
2302
+ | 'move.block'
2303
+ | 'move.forward'
2304
+ | 'annotation.toggle'
2305
+ | 'decorator.toggle'
2306
+ | 'delete.text'
2307
+ | 'insert.blocks'
2308
+ | 'insert.break'
2309
+ | 'insert.soft break'
2310
+ | 'list item.add'
2311
+ | 'list item.remove'
2312
+ | 'list item.toggle'
2313
+ | 'move.block down'
2314
+ | 'move.block up'
2315
+ | 'select.previous block'
2316
+ | 'select.next block'
2317
+ | 'style.add'
2318
+ | 'style.remove'
2319
+ | 'style.toggle',
2320
+ 'move.forward'
2321
+ >
2322
+ distance: number
2323
+ }
2324
+ | {
2325
+ type: StrictExtract_2<
2326
+ | 'serialize'
2327
+ | 'serialization.failure'
2328
+ | 'serialization.success'
2329
+ | 'deserialize'
2330
+ | 'deserialization.failure'
2331
+ | 'deserialization.success'
2332
+ | 'split'
2333
+ | 'delete'
2334
+ | 'select'
2335
+ | 'annotation.add'
2336
+ | 'annotation.remove'
2337
+ | 'block.set'
2338
+ | 'block.unset'
2339
+ | 'decorator.add'
2340
+ | 'decorator.remove'
2341
+ | 'delete.backward'
2342
+ | 'delete.block'
2343
+ | 'delete.forward'
2344
+ | 'history.redo'
2345
+ | 'history.undo'
2346
+ | 'insert.inline object'
2347
+ | 'insert.block'
2348
+ | 'insert.span'
2349
+ | 'insert.text'
2350
+ | 'move.backward'
2351
+ | 'move.block'
2352
+ | 'move.forward'
2353
+ | 'annotation.toggle'
2354
+ | 'decorator.toggle'
2355
+ | 'delete.text'
2356
+ | 'insert.blocks'
2357
+ | 'insert.break'
2358
+ | 'insert.soft break'
2359
+ | 'list item.add'
2360
+ | 'list item.remove'
2361
+ | 'list item.toggle'
2362
+ | 'move.block down'
2363
+ | 'move.block up'
2364
+ | 'select.previous block'
2365
+ | 'select.next block'
2366
+ | 'style.add'
2367
+ | 'style.remove'
2368
+ | 'style.toggle',
2369
+ 'select'
2370
+ >
2371
+ at: EditorSelection
2372
+ }
2373
+ | {
2374
+ type: StrictExtract_2<
2375
+ | 'serialize'
2376
+ | 'serialization.failure'
2377
+ | 'serialization.success'
2378
+ | 'deserialize'
2379
+ | 'deserialization.failure'
2380
+ | 'deserialization.success'
2381
+ | 'split'
2382
+ | 'delete'
2383
+ | 'select'
2384
+ | 'annotation.add'
2385
+ | 'annotation.remove'
2386
+ | 'block.set'
2387
+ | 'block.unset'
2388
+ | 'decorator.add'
2389
+ | 'decorator.remove'
2390
+ | 'delete.backward'
2391
+ | 'delete.block'
2392
+ | 'delete.forward'
2393
+ | 'history.redo'
2394
+ | 'history.undo'
2395
+ | 'insert.inline object'
2396
+ | 'insert.block'
2397
+ | 'insert.span'
2398
+ | 'insert.text'
2399
+ | 'move.backward'
2400
+ | 'move.block'
2401
+ | 'move.forward'
2402
+ | 'annotation.toggle'
2403
+ | 'decorator.toggle'
2404
+ | 'delete.text'
2405
+ | 'insert.blocks'
2406
+ | 'insert.break'
2407
+ | 'insert.soft break'
2408
+ | 'list item.add'
2409
+ | 'list item.remove'
2410
+ | 'list item.toggle'
2411
+ | 'move.block down'
2412
+ | 'move.block up'
2413
+ | 'select.previous block'
2414
+ | 'select.next block'
2415
+ | 'style.add'
2416
+ | 'style.remove'
2417
+ | 'style.toggle',
2418
+ 'annotation.toggle'
2419
+ >
2420
+ annotation: {
2421
+ name: string
2422
+ value: {
2423
+ [prop: string]: unknown
2424
+ }
2425
+ }
2426
+ }
2427
+ | {
2428
+ type: StrictExtract_2<
2429
+ | 'serialize'
2430
+ | 'serialization.failure'
2431
+ | 'serialization.success'
2432
+ | 'deserialize'
2433
+ | 'deserialization.failure'
2434
+ | 'deserialization.success'
2435
+ | 'split'
2436
+ | 'delete'
2437
+ | 'select'
2438
+ | 'annotation.add'
2439
+ | 'annotation.remove'
2440
+ | 'block.set'
2441
+ | 'block.unset'
2442
+ | 'decorator.add'
2443
+ | 'decorator.remove'
2444
+ | 'delete.backward'
2445
+ | 'delete.block'
2446
+ | 'delete.forward'
2447
+ | 'history.redo'
2448
+ | 'history.undo'
2449
+ | 'insert.inline object'
2450
+ | 'insert.block'
2451
+ | 'insert.span'
2452
+ | 'insert.text'
2453
+ | 'move.backward'
2454
+ | 'move.block'
2455
+ | 'move.forward'
2456
+ | 'annotation.toggle'
2457
+ | 'decorator.toggle'
2458
+ | 'delete.text'
2459
+ | 'insert.blocks'
2460
+ | 'insert.break'
2461
+ | 'insert.soft break'
2462
+ | 'list item.add'
2463
+ | 'list item.remove'
2464
+ | 'list item.toggle'
2465
+ | 'move.block down'
2466
+ | 'move.block up'
2467
+ | 'select.previous block'
2468
+ | 'select.next block'
2469
+ | 'style.add'
2470
+ | 'style.remove'
2471
+ | 'style.toggle',
2472
+ 'decorator.toggle'
2473
+ >
2474
+ decorator: string
2475
+ at?: {
2476
+ anchor: BlockOffset_2
2477
+ focus: BlockOffset_2
2478
+ }
2479
+ }
2480
+ | {
2481
+ type: StrictExtract_2<
2482
+ | 'serialize'
2483
+ | 'serialization.failure'
2484
+ | 'serialization.success'
2485
+ | 'deserialize'
2486
+ | 'deserialization.failure'
2487
+ | 'deserialization.success'
2488
+ | 'split'
2489
+ | 'delete'
2490
+ | 'select'
2491
+ | 'annotation.add'
2492
+ | 'annotation.remove'
2493
+ | 'block.set'
2494
+ | 'block.unset'
2495
+ | 'decorator.add'
2496
+ | 'decorator.remove'
2497
+ | 'delete.backward'
2498
+ | 'delete.block'
2499
+ | 'delete.forward'
2500
+ | 'history.redo'
2501
+ | 'history.undo'
2502
+ | 'insert.inline object'
2503
+ | 'insert.block'
2504
+ | 'insert.span'
2505
+ | 'insert.text'
2506
+ | 'move.backward'
2507
+ | 'move.block'
2508
+ | 'move.forward'
2509
+ | 'annotation.toggle'
2510
+ | 'decorator.toggle'
2511
+ | 'delete.text'
2512
+ | 'insert.blocks'
2513
+ | 'insert.break'
2514
+ | 'insert.soft break'
2515
+ | 'list item.add'
2516
+ | 'list item.remove'
2517
+ | 'list item.toggle'
2518
+ | 'move.block down'
2519
+ | 'move.block up'
2520
+ | 'select.previous block'
2521
+ | 'select.next block'
2522
+ | 'style.add'
2523
+ | 'style.remove'
2524
+ | 'style.toggle',
2525
+ 'delete.text'
2526
+ >
2527
+ at: {
2528
+ anchor: BlockOffset_2
2529
+ focus: BlockOffset_2
2530
+ }
2531
+ }
2532
+ | {
2533
+ type: StrictExtract_2<
2534
+ | 'serialize'
2535
+ | 'serialization.failure'
2536
+ | 'serialization.success'
2537
+ | 'deserialize'
2538
+ | 'deserialization.failure'
2539
+ | 'deserialization.success'
2540
+ | 'split'
2541
+ | 'delete'
2542
+ | 'select'
2543
+ | 'annotation.add'
2544
+ | 'annotation.remove'
2545
+ | 'block.set'
2546
+ | 'block.unset'
2547
+ | 'decorator.add'
2548
+ | 'decorator.remove'
2549
+ | 'delete.backward'
2550
+ | 'delete.block'
2551
+ | 'delete.forward'
2552
+ | 'history.redo'
2553
+ | 'history.undo'
2554
+ | 'insert.inline object'
2555
+ | 'insert.block'
2556
+ | 'insert.span'
2557
+ | 'insert.text'
2558
+ | 'move.backward'
2559
+ | 'move.block'
2560
+ | 'move.forward'
2561
+ | 'annotation.toggle'
2562
+ | 'decorator.toggle'
2563
+ | 'delete.text'
2564
+ | 'insert.blocks'
2565
+ | 'insert.break'
2566
+ | 'insert.soft break'
2567
+ | 'list item.add'
2568
+ | 'list item.remove'
2569
+ | 'list item.toggle'
2570
+ | 'move.block down'
2571
+ | 'move.block up'
2572
+ | 'select.previous block'
2573
+ | 'select.next block'
2574
+ | 'style.add'
2575
+ | 'style.remove'
2576
+ | 'style.toggle',
2577
+ 'deserialize'
2578
+ >
2579
+ originEvent:
2580
+ | PickFromUnion_2<
2581
+ NativeBehaviorEvent_2,
2582
+ 'type',
2583
+ 'drag.drop' | 'clipboard.paste'
2584
+ >
2585
+ | InputBehaviorEvent_2
2586
+ }
2587
+ | {
2588
+ type: StrictExtract_2<
2589
+ | 'serialize'
2590
+ | 'serialization.failure'
2591
+ | 'serialization.success'
2592
+ | 'deserialize'
2593
+ | 'deserialization.failure'
2594
+ | 'deserialization.success'
2595
+ | 'split'
2596
+ | 'delete'
2597
+ | 'select'
2598
+ | 'annotation.add'
2599
+ | 'annotation.remove'
2600
+ | 'block.set'
2601
+ | 'block.unset'
2602
+ | 'decorator.add'
2603
+ | 'decorator.remove'
2604
+ | 'delete.backward'
2605
+ | 'delete.block'
2606
+ | 'delete.forward'
2607
+ | 'history.redo'
2608
+ | 'history.undo'
2609
+ | 'insert.inline object'
2610
+ | 'insert.block'
2611
+ | 'insert.span'
2612
+ | 'insert.text'
2613
+ | 'move.backward'
2614
+ | 'move.block'
2615
+ | 'move.forward'
2616
+ | 'annotation.toggle'
2617
+ | 'decorator.toggle'
2618
+ | 'delete.text'
2619
+ | 'insert.blocks'
2620
+ | 'insert.break'
2621
+ | 'insert.soft break'
2622
+ | 'list item.add'
2623
+ | 'list item.remove'
2624
+ | 'list item.toggle'
2625
+ | 'move.block down'
2626
+ | 'move.block up'
2627
+ | 'select.previous block'
2628
+ | 'select.next block'
2629
+ | 'style.add'
2630
+ | 'style.remove'
2631
+ | 'style.toggle',
2632
+ 'serialize'
2633
+ >
2634
+ originEvent: PickFromUnion_2<
2635
+ NativeBehaviorEvent_2,
2636
+ 'type',
2637
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2638
+ >
2639
+ }
2640
+ | {
2641
+ type: StrictExtract_2<
2642
+ | 'serialize'
2643
+ | 'serialization.failure'
2644
+ | 'serialization.success'
2645
+ | 'deserialize'
2646
+ | 'deserialization.failure'
2647
+ | 'deserialization.success'
2648
+ | 'split'
2649
+ | 'delete'
2650
+ | 'select'
2651
+ | 'annotation.add'
2652
+ | 'annotation.remove'
2653
+ | 'block.set'
2654
+ | 'block.unset'
2655
+ | 'decorator.add'
2656
+ | 'decorator.remove'
2657
+ | 'delete.backward'
2658
+ | 'delete.block'
2659
+ | 'delete.forward'
2660
+ | 'history.redo'
2661
+ | 'history.undo'
2662
+ | 'insert.inline object'
2663
+ | 'insert.block'
2664
+ | 'insert.span'
2665
+ | 'insert.text'
2666
+ | 'move.backward'
2667
+ | 'move.block'
2668
+ | 'move.forward'
2669
+ | 'annotation.toggle'
2670
+ | 'decorator.toggle'
2671
+ | 'delete.text'
2672
+ | 'insert.blocks'
2673
+ | 'insert.break'
2674
+ | 'insert.soft break'
2675
+ | 'list item.add'
2676
+ | 'list item.remove'
2677
+ | 'list item.toggle'
2678
+ | 'move.block down'
2679
+ | 'move.block up'
2680
+ | 'select.previous block'
2681
+ | 'select.next block'
2682
+ | 'style.add'
2683
+ | 'style.remove'
2684
+ | 'style.toggle',
2685
+ 'deserialization.success'
2686
+ >
2687
+ mimeType: MIMEType_2
2688
+ data: Array<PortableTextBlock>
2689
+ originEvent:
2690
+ | PickFromUnion_2<
2691
+ NativeBehaviorEvent_2,
2692
+ 'type',
2693
+ 'drag.drop' | 'clipboard.paste'
2694
+ >
2695
+ | InputBehaviorEvent_2
2696
+ }
2697
+ | {
2698
+ type: StrictExtract_2<
2699
+ | 'serialize'
2700
+ | 'serialization.failure'
2701
+ | 'serialization.success'
2702
+ | 'deserialize'
2703
+ | 'deserialization.failure'
2704
+ | 'deserialization.success'
2705
+ | 'split'
2706
+ | 'delete'
2707
+ | 'select'
2708
+ | 'annotation.add'
2709
+ | 'annotation.remove'
2710
+ | 'block.set'
2711
+ | 'block.unset'
2712
+ | 'decorator.add'
2713
+ | 'decorator.remove'
2714
+ | 'delete.backward'
2715
+ | 'delete.block'
2716
+ | 'delete.forward'
2717
+ | 'history.redo'
2718
+ | 'history.undo'
2719
+ | 'insert.inline object'
2720
+ | 'insert.block'
2721
+ | 'insert.span'
2722
+ | 'insert.text'
2723
+ | 'move.backward'
2724
+ | 'move.block'
2725
+ | 'move.forward'
2726
+ | 'annotation.toggle'
2727
+ | 'decorator.toggle'
2728
+ | 'delete.text'
2729
+ | 'insert.blocks'
2730
+ | 'insert.break'
2731
+ | 'insert.soft break'
2732
+ | 'list item.add'
2733
+ | 'list item.remove'
2734
+ | 'list item.toggle'
2735
+ | 'move.block down'
2736
+ | 'move.block up'
2737
+ | 'select.previous block'
2738
+ | 'select.next block'
2739
+ | 'style.add'
2740
+ | 'style.remove'
2741
+ | 'style.toggle',
2742
+ 'deserialization.failure'
2743
+ >
2744
+ mimeType: MIMEType_2
2745
+ reason: string
2746
+ originEvent:
2747
+ | PickFromUnion_2<
2748
+ NativeBehaviorEvent_2,
2749
+ 'type',
2750
+ 'drag.drop' | 'clipboard.paste'
2751
+ >
2752
+ | InputBehaviorEvent_2
2753
+ }
2754
+ | {
2755
+ type: StrictExtract_2<
2756
+ | 'serialize'
2757
+ | 'serialization.failure'
2758
+ | 'serialization.success'
2759
+ | 'deserialize'
2760
+ | 'deserialization.failure'
2761
+ | 'deserialization.success'
2762
+ | 'split'
2763
+ | 'delete'
2764
+ | 'select'
2765
+ | 'annotation.add'
2766
+ | 'annotation.remove'
2767
+ | 'block.set'
2768
+ | 'block.unset'
2769
+ | 'decorator.add'
2770
+ | 'decorator.remove'
2771
+ | 'delete.backward'
2772
+ | 'delete.block'
2773
+ | 'delete.forward'
2774
+ | 'history.redo'
2775
+ | 'history.undo'
2776
+ | 'insert.inline object'
2777
+ | 'insert.block'
2778
+ | 'insert.span'
2779
+ | 'insert.text'
2780
+ | 'move.backward'
2781
+ | 'move.block'
2782
+ | 'move.forward'
2783
+ | 'annotation.toggle'
2784
+ | 'decorator.toggle'
2785
+ | 'delete.text'
2786
+ | 'insert.blocks'
2787
+ | 'insert.break'
2788
+ | 'insert.soft break'
2789
+ | 'list item.add'
2790
+ | 'list item.remove'
2791
+ | 'list item.toggle'
2792
+ | 'move.block down'
2793
+ | 'move.block up'
2794
+ | 'select.previous block'
2795
+ | 'select.next block'
2796
+ | 'style.add'
2797
+ | 'style.remove'
2798
+ | 'style.toggle',
2799
+ 'serialization.success'
2800
+ >
2801
+ mimeType: MIMEType_2
2802
+ data: string
2803
+ originEvent: PickFromUnion_2<
2804
+ NativeBehaviorEvent_2,
2805
+ 'type',
2806
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2807
+ >
2808
+ }
2809
+ | {
2810
+ type: StrictExtract_2<
2811
+ | 'serialize'
2812
+ | 'serialization.failure'
2813
+ | 'serialization.success'
2814
+ | 'deserialize'
2815
+ | 'deserialization.failure'
2816
+ | 'deserialization.success'
2817
+ | 'split'
2818
+ | 'delete'
2819
+ | 'select'
2820
+ | 'annotation.add'
2821
+ | 'annotation.remove'
2822
+ | 'block.set'
2823
+ | 'block.unset'
2824
+ | 'decorator.add'
2825
+ | 'decorator.remove'
2826
+ | 'delete.backward'
2827
+ | 'delete.block'
2828
+ | 'delete.forward'
2829
+ | 'history.redo'
2830
+ | 'history.undo'
2831
+ | 'insert.inline object'
2832
+ | 'insert.block'
2833
+ | 'insert.span'
2834
+ | 'insert.text'
2835
+ | 'move.backward'
2836
+ | 'move.block'
2837
+ | 'move.forward'
2838
+ | 'annotation.toggle'
2839
+ | 'decorator.toggle'
2840
+ | 'delete.text'
2841
+ | 'insert.blocks'
2842
+ | 'insert.break'
2843
+ | 'insert.soft break'
2844
+ | 'list item.add'
2845
+ | 'list item.remove'
2846
+ | 'list item.toggle'
2847
+ | 'move.block down'
2848
+ | 'move.block up'
2849
+ | 'select.previous block'
2850
+ | 'select.next block'
2851
+ | 'style.add'
2852
+ | 'style.remove'
2853
+ | 'style.toggle',
2854
+ 'serialization.failure'
2855
+ >
2856
+ mimeType: MIMEType_2
2857
+ reason: string
2858
+ originEvent: PickFromUnion_2<
2859
+ NativeBehaviorEvent_2,
2860
+ 'type',
2861
+ 'clipboard.copy' | 'clipboard.cut' | 'drag.dragstart'
2862
+ >
2863
+ }
2864
+ | {
2865
+ type: StrictExtract_2<
2866
+ | 'serialize'
2867
+ | 'serialization.failure'
2868
+ | 'serialization.success'
2869
+ | 'deserialize'
2870
+ | 'deserialization.failure'
2871
+ | 'deserialization.success'
2872
+ | 'split'
2873
+ | 'delete'
2874
+ | 'select'
2875
+ | 'annotation.add'
2876
+ | 'annotation.remove'
2877
+ | 'block.set'
2878
+ | 'block.unset'
2879
+ | 'decorator.add'
2880
+ | 'decorator.remove'
2881
+ | 'delete.backward'
2882
+ | 'delete.block'
2883
+ | 'delete.forward'
2884
+ | 'history.redo'
2885
+ | 'history.undo'
2886
+ | 'insert.inline object'
2887
+ | 'insert.block'
2888
+ | 'insert.span'
2889
+ | 'insert.text'
2890
+ | 'move.backward'
2891
+ | 'move.block'
2892
+ | 'move.forward'
2893
+ | 'annotation.toggle'
2894
+ | 'decorator.toggle'
2895
+ | 'delete.text'
2896
+ | 'insert.blocks'
2897
+ | 'insert.break'
2898
+ | 'insert.soft break'
2899
+ | 'list item.add'
2900
+ | 'list item.remove'
2901
+ | 'list item.toggle'
2902
+ | 'move.block down'
2903
+ | 'move.block up'
2904
+ | 'select.previous block'
2905
+ | 'select.next block'
2906
+ | 'style.add'
2907
+ | 'style.remove'
2908
+ | 'style.toggle',
2909
+ 'insert.blocks'
2910
+ >
2911
+ blocks: Array<BlockWithOptionalKey_2>
2912
+ placement: InsertPlacement_2
2913
+ }
2914
+ | {
2915
+ type: StrictExtract_2<
2916
+ | 'serialize'
2917
+ | 'serialization.failure'
2918
+ | 'serialization.success'
2919
+ | 'deserialize'
2920
+ | 'deserialization.failure'
2921
+ | 'deserialization.success'
2922
+ | 'split'
2923
+ | 'delete'
2924
+ | 'select'
2925
+ | 'annotation.add'
2926
+ | 'annotation.remove'
2927
+ | 'block.set'
2928
+ | 'block.unset'
2929
+ | 'decorator.add'
2930
+ | 'decorator.remove'
2931
+ | 'delete.backward'
2932
+ | 'delete.block'
2933
+ | 'delete.forward'
2934
+ | 'history.redo'
2935
+ | 'history.undo'
2936
+ | 'insert.inline object'
2937
+ | 'insert.block'
2938
+ | 'insert.span'
2939
+ | 'insert.text'
2940
+ | 'move.backward'
2941
+ | 'move.block'
2942
+ | 'move.forward'
2943
+ | 'annotation.toggle'
2944
+ | 'decorator.toggle'
2945
+ | 'delete.text'
2946
+ | 'insert.blocks'
2947
+ | 'insert.break'
2948
+ | 'insert.soft break'
2949
+ | 'list item.add'
2950
+ | 'list item.remove'
2951
+ | 'list item.toggle'
2952
+ | 'move.block down'
2953
+ | 'move.block up'
2954
+ | 'select.previous block'
2955
+ | 'select.next block'
2956
+ | 'style.add'
2957
+ | 'style.remove'
2958
+ | 'style.toggle',
2959
+ 'insert.break'
2960
+ >
2961
+ }
2962
+ | {
2963
+ type: StrictExtract_2<
2964
+ | 'serialize'
2965
+ | 'serialization.failure'
2966
+ | 'serialization.success'
2967
+ | 'deserialize'
2968
+ | 'deserialization.failure'
2969
+ | 'deserialization.success'
2970
+ | 'split'
2971
+ | 'delete'
2972
+ | 'select'
2973
+ | 'annotation.add'
2974
+ | 'annotation.remove'
2975
+ | 'block.set'
2976
+ | 'block.unset'
2977
+ | 'decorator.add'
2978
+ | 'decorator.remove'
2979
+ | 'delete.backward'
2980
+ | 'delete.block'
2981
+ | 'delete.forward'
2982
+ | 'history.redo'
2983
+ | 'history.undo'
2984
+ | 'insert.inline object'
2985
+ | 'insert.block'
2986
+ | 'insert.span'
2987
+ | 'insert.text'
2988
+ | 'move.backward'
2989
+ | 'move.block'
2990
+ | 'move.forward'
2991
+ | 'annotation.toggle'
2992
+ | 'decorator.toggle'
2993
+ | 'delete.text'
2994
+ | 'insert.blocks'
2995
+ | 'insert.break'
2996
+ | 'insert.soft break'
2997
+ | 'list item.add'
2998
+ | 'list item.remove'
2999
+ | 'list item.toggle'
3000
+ | 'move.block down'
3001
+ | 'move.block up'
3002
+ | 'select.previous block'
3003
+ | 'select.next block'
3004
+ | 'style.add'
3005
+ | 'style.remove'
3006
+ | 'style.toggle',
3007
+ 'insert.soft break'
3008
+ >
3009
+ }
3010
+ | {
3011
+ type: StrictExtract_2<
3012
+ | 'serialize'
3013
+ | 'serialization.failure'
3014
+ | 'serialization.success'
3015
+ | 'deserialize'
3016
+ | 'deserialization.failure'
3017
+ | 'deserialization.success'
3018
+ | 'split'
3019
+ | 'delete'
3020
+ | 'select'
3021
+ | 'annotation.add'
3022
+ | 'annotation.remove'
3023
+ | 'block.set'
3024
+ | 'block.unset'
3025
+ | 'decorator.add'
3026
+ | 'decorator.remove'
3027
+ | 'delete.backward'
3028
+ | 'delete.block'
3029
+ | 'delete.forward'
3030
+ | 'history.redo'
3031
+ | 'history.undo'
3032
+ | 'insert.inline object'
3033
+ | 'insert.block'
3034
+ | 'insert.span'
3035
+ | 'insert.text'
3036
+ | 'move.backward'
3037
+ | 'move.block'
3038
+ | 'move.forward'
3039
+ | 'annotation.toggle'
3040
+ | 'decorator.toggle'
3041
+ | 'delete.text'
3042
+ | 'insert.blocks'
3043
+ | 'insert.break'
3044
+ | 'insert.soft break'
3045
+ | 'list item.add'
3046
+ | 'list item.remove'
3047
+ | 'list item.toggle'
3048
+ | 'move.block down'
3049
+ | 'move.block up'
3050
+ | 'select.previous block'
3051
+ | 'select.next block'
3052
+ | 'style.add'
3053
+ | 'style.remove'
3054
+ | 'style.toggle',
3055
+ 'list item.add'
3056
+ >
3057
+ listItem: string
3058
+ }
3059
+ | {
3060
+ type: StrictExtract_2<
3061
+ | 'serialize'
3062
+ | 'serialization.failure'
3063
+ | 'serialization.success'
3064
+ | 'deserialize'
3065
+ | 'deserialization.failure'
3066
+ | 'deserialization.success'
3067
+ | 'split'
3068
+ | 'delete'
3069
+ | 'select'
3070
+ | 'annotation.add'
3071
+ | 'annotation.remove'
3072
+ | 'block.set'
3073
+ | 'block.unset'
3074
+ | 'decorator.add'
3075
+ | 'decorator.remove'
3076
+ | 'delete.backward'
3077
+ | 'delete.block'
3078
+ | 'delete.forward'
3079
+ | 'history.redo'
3080
+ | 'history.undo'
3081
+ | 'insert.inline object'
3082
+ | 'insert.block'
3083
+ | 'insert.span'
3084
+ | 'insert.text'
3085
+ | 'move.backward'
3086
+ | 'move.block'
3087
+ | 'move.forward'
3088
+ | 'annotation.toggle'
3089
+ | 'decorator.toggle'
3090
+ | 'delete.text'
3091
+ | 'insert.blocks'
3092
+ | 'insert.break'
3093
+ | 'insert.soft break'
3094
+ | 'list item.add'
3095
+ | 'list item.remove'
3096
+ | 'list item.toggle'
3097
+ | 'move.block down'
3098
+ | 'move.block up'
3099
+ | 'select.previous block'
3100
+ | 'select.next block'
3101
+ | 'style.add'
3102
+ | 'style.remove'
3103
+ | 'style.toggle',
3104
+ 'list item.remove'
3105
+ >
3106
+ listItem: string
3107
+ }
3108
+ | {
3109
+ type: StrictExtract_2<
3110
+ | 'serialize'
3111
+ | 'serialization.failure'
3112
+ | 'serialization.success'
3113
+ | 'deserialize'
3114
+ | 'deserialization.failure'
3115
+ | 'deserialization.success'
3116
+ | 'split'
3117
+ | 'delete'
3118
+ | 'select'
3119
+ | 'annotation.add'
3120
+ | 'annotation.remove'
3121
+ | 'block.set'
3122
+ | 'block.unset'
3123
+ | 'decorator.add'
3124
+ | 'decorator.remove'
3125
+ | 'delete.backward'
3126
+ | 'delete.block'
3127
+ | 'delete.forward'
3128
+ | 'history.redo'
3129
+ | 'history.undo'
3130
+ | 'insert.inline object'
3131
+ | 'insert.block'
3132
+ | 'insert.span'
3133
+ | 'insert.text'
3134
+ | 'move.backward'
3135
+ | 'move.block'
3136
+ | 'move.forward'
3137
+ | 'annotation.toggle'
3138
+ | 'decorator.toggle'
3139
+ | 'delete.text'
3140
+ | 'insert.blocks'
3141
+ | 'insert.break'
3142
+ | 'insert.soft break'
3143
+ | 'list item.add'
3144
+ | 'list item.remove'
3145
+ | 'list item.toggle'
3146
+ | 'move.block down'
3147
+ | 'move.block up'
3148
+ | 'select.previous block'
3149
+ | 'select.next block'
3150
+ | 'style.add'
3151
+ | 'style.remove'
3152
+ | 'style.toggle',
3153
+ 'list item.toggle'
3154
+ >
3155
+ listItem: string
3156
+ }
3157
+ | {
3158
+ type: StrictExtract_2<
3159
+ | 'serialize'
3160
+ | 'serialization.failure'
3161
+ | 'serialization.success'
3162
+ | 'deserialize'
3163
+ | 'deserialization.failure'
3164
+ | 'deserialization.success'
3165
+ | 'split'
3166
+ | 'delete'
3167
+ | 'select'
3168
+ | 'annotation.add'
3169
+ | 'annotation.remove'
3170
+ | 'block.set'
3171
+ | 'block.unset'
3172
+ | 'decorator.add'
3173
+ | 'decorator.remove'
3174
+ | 'delete.backward'
3175
+ | 'delete.block'
3176
+ | 'delete.forward'
3177
+ | 'history.redo'
3178
+ | 'history.undo'
3179
+ | 'insert.inline object'
3180
+ | 'insert.block'
3181
+ | 'insert.span'
3182
+ | 'insert.text'
3183
+ | 'move.backward'
3184
+ | 'move.block'
3185
+ | 'move.forward'
3186
+ | 'annotation.toggle'
3187
+ | 'decorator.toggle'
3188
+ | 'delete.text'
3189
+ | 'insert.blocks'
3190
+ | 'insert.break'
3191
+ | 'insert.soft break'
3192
+ | 'list item.add'
3193
+ | 'list item.remove'
3194
+ | 'list item.toggle'
3195
+ | 'move.block down'
3196
+ | 'move.block up'
3197
+ | 'select.previous block'
3198
+ | 'select.next block'
3199
+ | 'style.add'
3200
+ | 'style.remove'
3201
+ | 'style.toggle',
3202
+ 'move.block down'
3203
+ >
3204
+ at: [KeyedSegment]
3205
+ }
3206
+ | {
3207
+ type: StrictExtract_2<
3208
+ | 'serialize'
3209
+ | 'serialization.failure'
3210
+ | 'serialization.success'
3211
+ | 'deserialize'
3212
+ | 'deserialization.failure'
3213
+ | 'deserialization.success'
3214
+ | 'split'
3215
+ | 'delete'
3216
+ | 'select'
3217
+ | 'annotation.add'
3218
+ | 'annotation.remove'
3219
+ | 'block.set'
3220
+ | 'block.unset'
3221
+ | 'decorator.add'
3222
+ | 'decorator.remove'
3223
+ | 'delete.backward'
3224
+ | 'delete.block'
3225
+ | 'delete.forward'
3226
+ | 'history.redo'
3227
+ | 'history.undo'
3228
+ | 'insert.inline object'
3229
+ | 'insert.block'
3230
+ | 'insert.span'
3231
+ | 'insert.text'
3232
+ | 'move.backward'
3233
+ | 'move.block'
3234
+ | 'move.forward'
3235
+ | 'annotation.toggle'
3236
+ | 'decorator.toggle'
3237
+ | 'delete.text'
3238
+ | 'insert.blocks'
3239
+ | 'insert.break'
3240
+ | 'insert.soft break'
3241
+ | 'list item.add'
3242
+ | 'list item.remove'
3243
+ | 'list item.toggle'
3244
+ | 'move.block down'
3245
+ | 'move.block up'
3246
+ | 'select.previous block'
3247
+ | 'select.next block'
3248
+ | 'style.add'
3249
+ | 'style.remove'
3250
+ | 'style.toggle',
3251
+ 'move.block up'
3252
+ >
3253
+ at: [KeyedSegment]
3254
+ }
3255
+ | {
3256
+ type: StrictExtract_2<
3257
+ | 'serialize'
3258
+ | 'serialization.failure'
3259
+ | 'serialization.success'
3260
+ | 'deserialize'
3261
+ | 'deserialization.failure'
3262
+ | 'deserialization.success'
3263
+ | 'split'
3264
+ | 'delete'
3265
+ | 'select'
3266
+ | 'annotation.add'
3267
+ | 'annotation.remove'
3268
+ | 'block.set'
3269
+ | 'block.unset'
3270
+ | 'decorator.add'
3271
+ | 'decorator.remove'
3272
+ | 'delete.backward'
3273
+ | 'delete.block'
3274
+ | 'delete.forward'
3275
+ | 'history.redo'
3276
+ | 'history.undo'
3277
+ | 'insert.inline object'
3278
+ | 'insert.block'
3279
+ | 'insert.span'
3280
+ | 'insert.text'
3281
+ | 'move.backward'
3282
+ | 'move.block'
3283
+ | 'move.forward'
3284
+ | 'annotation.toggle'
3285
+ | 'decorator.toggle'
3286
+ | 'delete.text'
3287
+ | 'insert.blocks'
3288
+ | 'insert.break'
3289
+ | 'insert.soft break'
3290
+ | 'list item.add'
3291
+ | 'list item.remove'
3292
+ | 'list item.toggle'
3293
+ | 'move.block down'
3294
+ | 'move.block up'
3295
+ | 'select.previous block'
3296
+ | 'select.next block'
3297
+ | 'style.add'
3298
+ | 'style.remove'
3299
+ | 'style.toggle',
3300
+ 'select.previous block'
3301
+ >
3302
+ select?: 'start' | 'end'
3303
+ }
3304
+ | {
3305
+ type: StrictExtract_2<
3306
+ | 'serialize'
3307
+ | 'serialization.failure'
3308
+ | 'serialization.success'
3309
+ | 'deserialize'
3310
+ | 'deserialization.failure'
3311
+ | 'deserialization.success'
3312
+ | 'split'
3313
+ | 'delete'
3314
+ | 'select'
3315
+ | 'annotation.add'
3316
+ | 'annotation.remove'
3317
+ | 'block.set'
3318
+ | 'block.unset'
3319
+ | 'decorator.add'
3320
+ | 'decorator.remove'
3321
+ | 'delete.backward'
3322
+ | 'delete.block'
3323
+ | 'delete.forward'
3324
+ | 'history.redo'
3325
+ | 'history.undo'
3326
+ | 'insert.inline object'
3327
+ | 'insert.block'
3328
+ | 'insert.span'
3329
+ | 'insert.text'
3330
+ | 'move.backward'
3331
+ | 'move.block'
3332
+ | 'move.forward'
3333
+ | 'annotation.toggle'
3334
+ | 'decorator.toggle'
3335
+ | 'delete.text'
3336
+ | 'insert.blocks'
3337
+ | 'insert.break'
3338
+ | 'insert.soft break'
3339
+ | 'list item.add'
3340
+ | 'list item.remove'
3341
+ | 'list item.toggle'
3342
+ | 'move.block down'
3343
+ | 'move.block up'
3344
+ | 'select.previous block'
3345
+ | 'select.next block'
3346
+ | 'style.add'
3347
+ | 'style.remove'
3348
+ | 'style.toggle',
3349
+ 'select.next block'
3350
+ >
3351
+ select?: 'start' | 'end'
3352
+ }
3353
+ | {
3354
+ type: StrictExtract_2<
3355
+ | 'serialize'
3356
+ | 'serialization.failure'
3357
+ | 'serialization.success'
3358
+ | 'deserialize'
3359
+ | 'deserialization.failure'
3360
+ | 'deserialization.success'
3361
+ | 'split'
3362
+ | 'delete'
3363
+ | 'select'
3364
+ | 'annotation.add'
3365
+ | 'annotation.remove'
3366
+ | 'block.set'
3367
+ | 'block.unset'
3368
+ | 'decorator.add'
3369
+ | 'decorator.remove'
3370
+ | 'delete.backward'
3371
+ | 'delete.block'
3372
+ | 'delete.forward'
3373
+ | 'history.redo'
3374
+ | 'history.undo'
3375
+ | 'insert.inline object'
3376
+ | 'insert.block'
3377
+ | 'insert.span'
3378
+ | 'insert.text'
3379
+ | 'move.backward'
3380
+ | 'move.block'
3381
+ | 'move.forward'
3382
+ | 'annotation.toggle'
3383
+ | 'decorator.toggle'
3384
+ | 'delete.text'
3385
+ | 'insert.blocks'
3386
+ | 'insert.break'
3387
+ | 'insert.soft break'
3388
+ | 'list item.add'
3389
+ | 'list item.remove'
3390
+ | 'list item.toggle'
3391
+ | 'move.block down'
3392
+ | 'move.block up'
3393
+ | 'select.previous block'
3394
+ | 'select.next block'
3395
+ | 'style.add'
3396
+ | 'style.remove'
3397
+ | 'style.toggle',
3398
+ 'split'
3399
+ >
3400
+ }
3401
+ | {
3402
+ type: StrictExtract_2<
3403
+ | 'serialize'
3404
+ | 'serialization.failure'
3405
+ | 'serialization.success'
3406
+ | 'deserialize'
3407
+ | 'deserialization.failure'
3408
+ | 'deserialization.success'
3409
+ | 'split'
3410
+ | 'delete'
3411
+ | 'select'
3412
+ | 'annotation.add'
3413
+ | 'annotation.remove'
3414
+ | 'block.set'
3415
+ | 'block.unset'
3416
+ | 'decorator.add'
3417
+ | 'decorator.remove'
3418
+ | 'delete.backward'
3419
+ | 'delete.block'
3420
+ | 'delete.forward'
3421
+ | 'history.redo'
3422
+ | 'history.undo'
3423
+ | 'insert.inline object'
3424
+ | 'insert.block'
3425
+ | 'insert.span'
3426
+ | 'insert.text'
3427
+ | 'move.backward'
3428
+ | 'move.block'
3429
+ | 'move.forward'
3430
+ | 'annotation.toggle'
3431
+ | 'decorator.toggle'
3432
+ | 'delete.text'
3433
+ | 'insert.blocks'
3434
+ | 'insert.break'
3435
+ | 'insert.soft break'
3436
+ | 'list item.add'
3437
+ | 'list item.remove'
3438
+ | 'list item.toggle'
3439
+ | 'move.block down'
3440
+ | 'move.block up'
3441
+ | 'select.previous block'
3442
+ | 'select.next block'
3443
+ | 'style.add'
3444
+ | 'style.remove'
3445
+ | 'style.toggle',
3446
+ 'style.add'
3447
+ >
3448
+ style: string
3449
+ }
3450
+ | {
3451
+ type: StrictExtract_2<
3452
+ | 'serialize'
3453
+ | 'serialization.failure'
3454
+ | 'serialization.success'
3455
+ | 'deserialize'
3456
+ | 'deserialization.failure'
3457
+ | 'deserialization.success'
3458
+ | 'split'
3459
+ | 'delete'
3460
+ | 'select'
3461
+ | 'annotation.add'
3462
+ | 'annotation.remove'
3463
+ | 'block.set'
3464
+ | 'block.unset'
3465
+ | 'decorator.add'
3466
+ | 'decorator.remove'
3467
+ | 'delete.backward'
3468
+ | 'delete.block'
3469
+ | 'delete.forward'
3470
+ | 'history.redo'
3471
+ | 'history.undo'
3472
+ | 'insert.inline object'
3473
+ | 'insert.block'
3474
+ | 'insert.span'
3475
+ | 'insert.text'
3476
+ | 'move.backward'
3477
+ | 'move.block'
3478
+ | 'move.forward'
3479
+ | 'annotation.toggle'
3480
+ | 'decorator.toggle'
3481
+ | 'delete.text'
3482
+ | 'insert.blocks'
3483
+ | 'insert.break'
3484
+ | 'insert.soft break'
3485
+ | 'list item.add'
3486
+ | 'list item.remove'
3487
+ | 'list item.toggle'
3488
+ | 'move.block down'
3489
+ | 'move.block up'
3490
+ | 'select.previous block'
3491
+ | 'select.next block'
3492
+ | 'style.add'
3493
+ | 'style.remove'
3494
+ | 'style.toggle',
3495
+ 'style.remove'
3496
+ >
3497
+ style: string
3498
+ }
3499
+ | {
3500
+ type: StrictExtract_2<
3501
+ | 'serialize'
3502
+ | 'serialization.failure'
3503
+ | 'serialization.success'
3504
+ | 'deserialize'
3505
+ | 'deserialization.failure'
3506
+ | 'deserialization.success'
3507
+ | 'split'
3508
+ | 'delete'
3509
+ | 'select'
3510
+ | 'annotation.add'
3511
+ | 'annotation.remove'
3512
+ | 'block.set'
3513
+ | 'block.unset'
3514
+ | 'decorator.add'
3515
+ | 'decorator.remove'
3516
+ | 'delete.backward'
3517
+ | 'delete.block'
3518
+ | 'delete.forward'
3519
+ | 'history.redo'
3520
+ | 'history.undo'
3521
+ | 'insert.inline object'
3522
+ | 'insert.block'
3523
+ | 'insert.span'
3524
+ | 'insert.text'
3525
+ | 'move.backward'
3526
+ | 'move.block'
3527
+ | 'move.forward'
3528
+ | 'annotation.toggle'
3529
+ | 'decorator.toggle'
3530
+ | 'delete.text'
3531
+ | 'insert.blocks'
3532
+ | 'insert.break'
3533
+ | 'insert.soft break'
3534
+ | 'list item.add'
3535
+ | 'list item.remove'
3536
+ | 'list item.toggle'
3537
+ | 'move.block down'
3538
+ | 'move.block up'
3539
+ | 'select.previous block'
3540
+ | 'select.next block'
3541
+ | 'style.add'
3542
+ | 'style.remove'
3543
+ | 'style.toggle',
3544
+ 'style.toggle'
3545
+ >
3546
+ style: string
3547
+ }
3548
+ | {
3549
+ type: StrictExtract_2<
3550
+ | 'clipboard.copy'
3551
+ | 'clipboard.cut'
3552
+ | 'drag.dragstart'
3553
+ | 'clipboard.paste'
3554
+ | 'drag.drag'
3555
+ | 'drag.dragend'
3556
+ | 'drag.dragenter'
3557
+ | 'drag.dragover'
3558
+ | 'drag.dragleave'
3559
+ | 'drag.drop'
3560
+ | 'input.*'
3561
+ | 'keyboard.keydown'
3562
+ | 'keyboard.keyup'
3563
+ | 'mouse.click',
3564
+ 'clipboard.copy'
3565
+ >
3566
+ originEvent: {
3567
+ dataTransfer: DataTransfer
3568
+ }
3569
+ position: Pick<EventPosition, 'selection'>
3570
+ }
3571
+ | {
3572
+ type: StrictExtract_2<
3573
+ | 'clipboard.copy'
3574
+ | 'clipboard.cut'
3575
+ | 'drag.dragstart'
3576
+ | 'clipboard.paste'
3577
+ | 'drag.drag'
3578
+ | 'drag.dragend'
3579
+ | 'drag.dragenter'
3580
+ | 'drag.dragover'
3581
+ | 'drag.dragleave'
3582
+ | 'drag.drop'
3583
+ | 'input.*'
3584
+ | 'keyboard.keydown'
3585
+ | 'keyboard.keyup'
3586
+ | 'mouse.click',
3587
+ 'clipboard.cut'
3588
+ >
3589
+ originEvent: {
3590
+ dataTransfer: DataTransfer
3591
+ }
3592
+ position: Pick<EventPosition, 'selection'>
3593
+ }
3594
+ | {
3595
+ type: StrictExtract_2<
3596
+ | 'clipboard.copy'
3597
+ | 'clipboard.cut'
3598
+ | 'drag.dragstart'
3599
+ | 'clipboard.paste'
3600
+ | 'drag.drag'
3601
+ | 'drag.dragend'
3602
+ | 'drag.dragenter'
3603
+ | 'drag.dragover'
3604
+ | 'drag.dragleave'
3605
+ | 'drag.drop'
3606
+ | 'input.*'
3607
+ | 'keyboard.keydown'
3608
+ | 'keyboard.keyup'
3609
+ | 'mouse.click',
3610
+ 'clipboard.paste'
3611
+ >
3612
+ originEvent: {
3613
+ dataTransfer: DataTransfer
3614
+ }
3615
+ position: Pick<EventPosition, 'selection'>
3616
+ }
3617
+ | {
3618
+ type: StrictExtract_2<
3619
+ | 'clipboard.copy'
3620
+ | 'clipboard.cut'
3621
+ | 'drag.dragstart'
3622
+ | 'clipboard.paste'
3623
+ | 'drag.drag'
3624
+ | 'drag.dragend'
3625
+ | 'drag.dragenter'
3626
+ | 'drag.dragover'
3627
+ | 'drag.dragleave'
3628
+ | 'drag.drop'
3629
+ | 'input.*'
3630
+ | 'keyboard.keydown'
3631
+ | 'keyboard.keyup'
3632
+ | 'mouse.click',
3633
+ 'drag.dragstart'
3634
+ >
3635
+ originEvent: {
3636
+ dataTransfer: DataTransfer
3637
+ }
3638
+ position: Pick<EventPosition, 'selection'>
3639
+ }
3640
+ | {
3641
+ type: StrictExtract_2<
3642
+ | 'clipboard.copy'
3643
+ | 'clipboard.cut'
3644
+ | 'drag.dragstart'
3645
+ | 'clipboard.paste'
3646
+ | 'drag.drag'
3647
+ | 'drag.dragend'
3648
+ | 'drag.dragenter'
3649
+ | 'drag.dragover'
3650
+ | 'drag.dragleave'
3651
+ | 'drag.drop'
3652
+ | 'input.*'
3653
+ | 'keyboard.keydown'
3654
+ | 'keyboard.keyup'
3655
+ | 'mouse.click',
3656
+ 'drag.drag'
3657
+ >
3658
+ originEvent: {
3659
+ dataTransfer: DataTransfer
3660
+ }
3661
+ }
3662
+ | {
3663
+ type: StrictExtract_2<
3664
+ | 'clipboard.copy'
3665
+ | 'clipboard.cut'
3666
+ | 'drag.dragstart'
3667
+ | 'clipboard.paste'
3668
+ | 'drag.drag'
3669
+ | 'drag.dragend'
3670
+ | 'drag.dragenter'
3671
+ | 'drag.dragover'
3672
+ | 'drag.dragleave'
3673
+ | 'drag.drop'
3674
+ | 'input.*'
3675
+ | 'keyboard.keydown'
3676
+ | 'keyboard.keyup'
3677
+ | 'mouse.click',
3678
+ 'drag.dragend'
3679
+ >
3680
+ originEvent: {
3681
+ dataTransfer: DataTransfer
3682
+ }
3683
+ }
3684
+ | {
3685
+ type: StrictExtract_2<
3686
+ | 'clipboard.copy'
3687
+ | 'clipboard.cut'
3688
+ | 'drag.dragstart'
3689
+ | 'clipboard.paste'
3690
+ | 'drag.drag'
3691
+ | 'drag.dragend'
3692
+ | 'drag.dragenter'
3693
+ | 'drag.dragover'
3694
+ | 'drag.dragleave'
3695
+ | 'drag.drop'
3696
+ | 'input.*'
3697
+ | 'keyboard.keydown'
3698
+ | 'keyboard.keyup'
3699
+ | 'mouse.click',
3700
+ 'drag.dragenter'
3701
+ >
3702
+ originEvent: {
3703
+ dataTransfer: DataTransfer
3704
+ }
3705
+ position: EventPosition
3706
+ }
3707
+ | {
3708
+ type: StrictExtract_2<
3709
+ | 'clipboard.copy'
3710
+ | 'clipboard.cut'
3711
+ | 'drag.dragstart'
3712
+ | 'clipboard.paste'
3713
+ | 'drag.drag'
3714
+ | 'drag.dragend'
3715
+ | 'drag.dragenter'
3716
+ | 'drag.dragover'
3717
+ | 'drag.dragleave'
3718
+ | 'drag.drop'
3719
+ | 'input.*'
3720
+ | 'keyboard.keydown'
3721
+ | 'keyboard.keyup'
3722
+ | 'mouse.click',
3723
+ 'drag.dragover'
3724
+ >
3725
+ originEvent: {
3726
+ dataTransfer: DataTransfer
3727
+ }
3728
+ position: EventPosition
3729
+ }
3730
+ | {
3731
+ type: StrictExtract_2<
3732
+ | 'clipboard.copy'
3733
+ | 'clipboard.cut'
3734
+ | 'drag.dragstart'
3735
+ | 'clipboard.paste'
3736
+ | 'drag.drag'
3737
+ | 'drag.dragend'
3738
+ | 'drag.dragenter'
3739
+ | 'drag.dragover'
3740
+ | 'drag.dragleave'
3741
+ | 'drag.drop'
3742
+ | 'input.*'
3743
+ | 'keyboard.keydown'
3744
+ | 'keyboard.keyup'
3745
+ | 'mouse.click',
3746
+ 'drag.drop'
3747
+ >
3748
+ originEvent: {
3749
+ dataTransfer: DataTransfer
3750
+ }
3751
+ position: EventPosition
3752
+ }
3753
+ | {
3754
+ type: StrictExtract_2<
3755
+ | 'clipboard.copy'
3756
+ | 'clipboard.cut'
3757
+ | 'drag.dragstart'
3758
+ | 'clipboard.paste'
3759
+ | 'drag.drag'
3760
+ | 'drag.dragend'
3761
+ | 'drag.dragenter'
3762
+ | 'drag.dragover'
3763
+ | 'drag.dragleave'
3764
+ | 'drag.drop'
3765
+ | 'input.*'
3766
+ | 'keyboard.keydown'
3767
+ | 'keyboard.keyup'
3768
+ | 'mouse.click',
3769
+ 'drag.dragleave'
3770
+ >
3771
+ originEvent: {
3772
+ dataTransfer: DataTransfer
3773
+ }
3774
+ }
3775
+ | InputBehaviorEvent_2
3776
+ | {
3777
+ type: StrictExtract_2<
3778
+ | 'clipboard.copy'
3779
+ | 'clipboard.cut'
3780
+ | 'drag.dragstart'
3781
+ | 'clipboard.paste'
3782
+ | 'drag.drag'
3783
+ | 'drag.dragend'
3784
+ | 'drag.dragenter'
3785
+ | 'drag.dragover'
3786
+ | 'drag.dragleave'
3787
+ | 'drag.drop'
3788
+ | 'input.*'
3789
+ | 'keyboard.keydown'
3790
+ | 'keyboard.keyup'
3791
+ | 'mouse.click',
3792
+ 'keyboard.keydown'
3793
+ >
3794
+ originEvent: Pick<
3795
+ KeyboardEvent,
3796
+ 'key' | 'code' | 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'
3797
+ >
3798
+ }
3799
+ | {
3800
+ type: StrictExtract_2<
3801
+ | 'clipboard.copy'
3802
+ | 'clipboard.cut'
3803
+ | 'drag.dragstart'
3804
+ | 'clipboard.paste'
3805
+ | 'drag.drag'
3806
+ | 'drag.dragend'
3807
+ | 'drag.dragenter'
3808
+ | 'drag.dragover'
3809
+ | 'drag.dragleave'
3810
+ | 'drag.drop'
3811
+ | 'input.*'
3812
+ | 'keyboard.keydown'
3813
+ | 'keyboard.keyup'
3814
+ | 'mouse.click',
3815
+ 'keyboard.keyup'
3816
+ >
3817
+ originEvent: Pick<
3818
+ KeyboardEvent,
3819
+ 'key' | 'code' | 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'
3820
+ >
3821
+ }
3822
+ | MouseBehaviorEvent_2
3823
+ | CustomBehaviorEvent_2<
3824
+ Record<string, unknown>,
3825
+ string,
3826
+ `custom.${string}`
3827
+ >
3828
+ >
3829
+ >
1260
3830
  converters: Set<Converter>
1261
3831
  getLegacySchema: () => PortableTextMemberSchemaTypes
1262
3832
  keyGenerator: () => string
1263
3833
  pendingEvents: never[]
3834
+ pendingIncomingPatchesEvents: never[]
1264
3835
  schema: EditorSchema
1265
3836
  selection: null
1266
3837
  initialReadOnly: boolean
@@ -1276,6 +3847,7 @@ declare const editorMachine: StateMachine<
1276
3847
  getLegacySchema: () => PortableTextMemberSchemaTypes
1277
3848
  keyGenerator: () => string
1278
3849
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
3850
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1279
3851
  schema: EditorSchema
1280
3852
  initialReadOnly: boolean
1281
3853
  maxBlocks: number | undefined
@@ -1293,6 +3865,7 @@ declare const editorMachine: StateMachine<
1293
3865
  },
1294
3866
  | InternalPatchEvent
1295
3867
  | MutationEvent
3868
+ | PatchesEvent
1296
3869
  | {
1297
3870
  type: 'add behavior'
1298
3871
  behavior: Behavior
@@ -1309,10 +3882,6 @@ declare const editorMachine: StateMachine<
1309
3882
  type: 'update schema'
1310
3883
  schema: EditorSchema
1311
3884
  }
1312
- | {
1313
- type: 'update behaviors'
1314
- behaviors: Array<Behavior>
1315
- }
1316
3885
  | {
1317
3886
  type: 'update key generator'
1318
3887
  keyGenerator: () => string
@@ -1325,7 +3894,6 @@ declare const editorMachine: StateMachine<
1325
3894
  type: 'update maxBlocks'
1326
3895
  maxBlocks: number | undefined
1327
3896
  }
1328
- | PatchesEvent
1329
3897
  | {
1330
3898
  type: 'blur'
1331
3899
  editor: PortableTextSlateEditor
@@ -1341,7 +3909,10 @@ declare const editorMachine: StateMachine<
1341
3909
  type: 'done normalizing'
1342
3910
  }
1343
3911
  | {
1344
- type: 'done syncing initial value'
3912
+ type: 'done syncing value'
3913
+ }
3914
+ | {
3915
+ type: 'syncing value'
1345
3916
  }
1346
3917
  | {
1347
3918
  type: 'behavior event'
@@ -1480,6 +4051,7 @@ declare const editorMachine: StateMachine<
1480
4051
  getLegacySchema: () => PortableTextMemberSchemaTypes
1481
4052
  keyGenerator: () => string
1482
4053
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4054
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1483
4055
  schema: EditorSchema
1484
4056
  initialReadOnly: boolean
1485
4057
  maxBlocks: number | undefined
@@ -1496,6 +4068,7 @@ declare const editorMachine: StateMachine<
1496
4068
  },
1497
4069
  | InternalPatchEvent
1498
4070
  | MutationEvent
4071
+ | PatchesEvent
1499
4072
  | {
1500
4073
  type: 'add behavior'
1501
4074
  behavior: Behavior
@@ -1512,10 +4085,6 @@ declare const editorMachine: StateMachine<
1512
4085
  type: 'update schema'
1513
4086
  schema: EditorSchema
1514
4087
  }
1515
- | {
1516
- type: 'update behaviors'
1517
- behaviors: Array<Behavior>
1518
- }
1519
4088
  | {
1520
4089
  type: 'update key generator'
1521
4090
  keyGenerator: () => string
@@ -1528,7 +4097,6 @@ declare const editorMachine: StateMachine<
1528
4097
  type: 'update maxBlocks'
1529
4098
  maxBlocks: number | undefined
1530
4099
  }
1531
- | PatchesEvent
1532
4100
  | {
1533
4101
  type: 'blur'
1534
4102
  editor: PortableTextSlateEditor
@@ -1544,7 +4112,10 @@ declare const editorMachine: StateMachine<
1544
4112
  type: 'done normalizing'
1545
4113
  }
1546
4114
  | {
1547
- type: 'done syncing initial value'
4115
+ type: 'done syncing value'
4116
+ }
4117
+ | {
4118
+ type: 'syncing value'
1548
4119
  }
1549
4120
  | {
1550
4121
  type: 'behavior event'
@@ -1683,6 +4254,7 @@ declare const editorMachine: StateMachine<
1683
4254
  getLegacySchema: () => PortableTextMemberSchemaTypes
1684
4255
  keyGenerator: () => string
1685
4256
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4257
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1686
4258
  schema: EditorSchema
1687
4259
  initialReadOnly: boolean
1688
4260
  maxBlocks: number | undefined
@@ -1702,6 +4274,7 @@ declare const editorMachine: StateMachine<
1702
4274
  },
1703
4275
  | InternalPatchEvent
1704
4276
  | MutationEvent
4277
+ | PatchesEvent
1705
4278
  | {
1706
4279
  type: 'add behavior'
1707
4280
  behavior: Behavior
@@ -1718,10 +4291,6 @@ declare const editorMachine: StateMachine<
1718
4291
  type: 'update schema'
1719
4292
  schema: EditorSchema
1720
4293
  }
1721
- | {
1722
- type: 'update behaviors'
1723
- behaviors: Array<Behavior>
1724
- }
1725
4294
  | {
1726
4295
  type: 'update key generator'
1727
4296
  keyGenerator: () => string
@@ -1734,7 +4303,6 @@ declare const editorMachine: StateMachine<
1734
4303
  type: 'update maxBlocks'
1735
4304
  maxBlocks: number | undefined
1736
4305
  }
1737
- | PatchesEvent
1738
4306
  | {
1739
4307
  type: 'blur'
1740
4308
  editor: PortableTextSlateEditor
@@ -1750,7 +4318,10 @@ declare const editorMachine: StateMachine<
1750
4318
  type: 'done normalizing'
1751
4319
  }
1752
4320
  | {
1753
- type: 'done syncing initial value'
4321
+ type: 'done syncing value'
4322
+ }
4323
+ | {
4324
+ type: 'syncing value'
1754
4325
  }
1755
4326
  | {
1756
4327
  type: 'behavior event'
@@ -1889,6 +4460,7 @@ declare const editorMachine: StateMachine<
1889
4460
  getLegacySchema: () => PortableTextMemberSchemaTypes
1890
4461
  keyGenerator: () => string
1891
4462
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4463
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
1892
4464
  schema: EditorSchema
1893
4465
  initialReadOnly: boolean
1894
4466
  maxBlocks: number | undefined
@@ -1907,6 +4479,7 @@ declare const editorMachine: StateMachine<
1907
4479
  },
1908
4480
  | InternalPatchEvent
1909
4481
  | MutationEvent
4482
+ | PatchesEvent
1910
4483
  | {
1911
4484
  type: 'add behavior'
1912
4485
  behavior: Behavior
@@ -1923,10 +4496,6 @@ declare const editorMachine: StateMachine<
1923
4496
  type: 'update schema'
1924
4497
  schema: EditorSchema
1925
4498
  }
1926
- | {
1927
- type: 'update behaviors'
1928
- behaviors: Array<Behavior>
1929
- }
1930
4499
  | {
1931
4500
  type: 'update key generator'
1932
4501
  keyGenerator: () => string
@@ -1939,7 +4508,6 @@ declare const editorMachine: StateMachine<
1939
4508
  type: 'update maxBlocks'
1940
4509
  maxBlocks: number | undefined
1941
4510
  }
1942
- | PatchesEvent
1943
4511
  | {
1944
4512
  type: 'blur'
1945
4513
  editor: PortableTextSlateEditor
@@ -1955,7 +4523,10 @@ declare const editorMachine: StateMachine<
1955
4523
  type: 'done normalizing'
1956
4524
  }
1957
4525
  | {
1958
- type: 'done syncing initial value'
4526
+ type: 'done syncing value'
4527
+ }
4528
+ | {
4529
+ type: 'syncing value'
1959
4530
  }
1960
4531
  | {
1961
4532
  type: 'behavior event'
@@ -2094,6 +4665,7 @@ declare const editorMachine: StateMachine<
2094
4665
  getLegacySchema: () => PortableTextMemberSchemaTypes
2095
4666
  keyGenerator: () => string
2096
4667
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4668
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2097
4669
  schema: EditorSchema
2098
4670
  initialReadOnly: boolean
2099
4671
  maxBlocks: number | undefined
@@ -2111,6 +4683,7 @@ declare const editorMachine: StateMachine<
2111
4683
  },
2112
4684
  | InternalPatchEvent
2113
4685
  | MutationEvent
4686
+ | PatchesEvent
2114
4687
  | {
2115
4688
  type: 'add behavior'
2116
4689
  behavior: Behavior
@@ -2127,10 +4700,6 @@ declare const editorMachine: StateMachine<
2127
4700
  type: 'update schema'
2128
4701
  schema: EditorSchema
2129
4702
  }
2130
- | {
2131
- type: 'update behaviors'
2132
- behaviors: Array<Behavior>
2133
- }
2134
4703
  | {
2135
4704
  type: 'update key generator'
2136
4705
  keyGenerator: () => string
@@ -2143,7 +4712,6 @@ declare const editorMachine: StateMachine<
2143
4712
  type: 'update maxBlocks'
2144
4713
  maxBlocks: number | undefined
2145
4714
  }
2146
- | PatchesEvent
2147
4715
  | {
2148
4716
  type: 'blur'
2149
4717
  editor: PortableTextSlateEditor
@@ -2159,7 +4727,10 @@ declare const editorMachine: StateMachine<
2159
4727
  type: 'done normalizing'
2160
4728
  }
2161
4729
  | {
2162
- type: 'done syncing initial value'
4730
+ type: 'done syncing value'
4731
+ }
4732
+ | {
4733
+ type: 'syncing value'
2163
4734
  }
2164
4735
  | {
2165
4736
  type: 'behavior event'
@@ -2299,6 +4870,7 @@ declare const editorMachine: StateMachine<
2299
4870
  getLegacySchema: () => PortableTextMemberSchemaTypes
2300
4871
  keyGenerator: () => string
2301
4872
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
4873
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2302
4874
  schema: EditorSchema
2303
4875
  initialReadOnly: boolean
2304
4876
  maxBlocks: number | undefined
@@ -2316,6 +4888,7 @@ declare const editorMachine: StateMachine<
2316
4888
  },
2317
4889
  | InternalPatchEvent
2318
4890
  | MutationEvent
4891
+ | PatchesEvent
2319
4892
  | {
2320
4893
  type: 'add behavior'
2321
4894
  behavior: Behavior
@@ -2332,10 +4905,6 @@ declare const editorMachine: StateMachine<
2332
4905
  type: 'update schema'
2333
4906
  schema: EditorSchema
2334
4907
  }
2335
- | {
2336
- type: 'update behaviors'
2337
- behaviors: Array<Behavior>
2338
- }
2339
4908
  | {
2340
4909
  type: 'update key generator'
2341
4910
  keyGenerator: () => string
@@ -2348,7 +4917,6 @@ declare const editorMachine: StateMachine<
2348
4917
  type: 'update maxBlocks'
2349
4918
  maxBlocks: number | undefined
2350
4919
  }
2351
- | PatchesEvent
2352
4920
  | {
2353
4921
  type: 'blur'
2354
4922
  editor: PortableTextSlateEditor
@@ -2364,7 +4932,10 @@ declare const editorMachine: StateMachine<
2364
4932
  type: 'done normalizing'
2365
4933
  }
2366
4934
  | {
2367
- type: 'done syncing initial value'
4935
+ type: 'done syncing value'
4936
+ }
4937
+ | {
4938
+ type: 'syncing value'
2368
4939
  }
2369
4940
  | {
2370
4941
  type: 'behavior event'
@@ -2455,6 +5026,7 @@ declare const editorMachine: StateMachine<
2455
5026
  getLegacySchema: () => PortableTextMemberSchemaTypes
2456
5027
  keyGenerator: () => string
2457
5028
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5029
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2458
5030
  schema: EditorSchema
2459
5031
  initialReadOnly: boolean
2460
5032
  maxBlocks: number | undefined
@@ -2472,6 +5044,7 @@ declare const editorMachine: StateMachine<
2472
5044
  },
2473
5045
  | InternalPatchEvent
2474
5046
  | MutationEvent
5047
+ | PatchesEvent
2475
5048
  | {
2476
5049
  type: 'add behavior'
2477
5050
  behavior: Behavior
@@ -2488,10 +5061,6 @@ declare const editorMachine: StateMachine<
2488
5061
  type: 'update schema'
2489
5062
  schema: EditorSchema
2490
5063
  }
2491
- | {
2492
- type: 'update behaviors'
2493
- behaviors: Array<Behavior>
2494
- }
2495
5064
  | {
2496
5065
  type: 'update key generator'
2497
5066
  keyGenerator: () => string
@@ -2504,7 +5073,6 @@ declare const editorMachine: StateMachine<
2504
5073
  type: 'update maxBlocks'
2505
5074
  maxBlocks: number | undefined
2506
5075
  }
2507
- | PatchesEvent
2508
5076
  | {
2509
5077
  type: 'blur'
2510
5078
  editor: PortableTextSlateEditor
@@ -2520,7 +5088,10 @@ declare const editorMachine: StateMachine<
2520
5088
  type: 'done normalizing'
2521
5089
  }
2522
5090
  | {
2523
- type: 'done syncing initial value'
5091
+ type: 'done syncing value'
5092
+ }
5093
+ | {
5094
+ type: 'syncing value'
2524
5095
  }
2525
5096
  | {
2526
5097
  type: 'behavior event'
@@ -2660,6 +5231,7 @@ declare const editorMachine: StateMachine<
2660
5231
  getLegacySchema: () => PortableTextMemberSchemaTypes
2661
5232
  keyGenerator: () => string
2662
5233
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5234
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2663
5235
  schema: EditorSchema
2664
5236
  initialReadOnly: boolean
2665
5237
  maxBlocks: number | undefined
@@ -2677,6 +5249,7 @@ declare const editorMachine: StateMachine<
2677
5249
  },
2678
5250
  | InternalPatchEvent
2679
5251
  | MutationEvent
5252
+ | PatchesEvent
2680
5253
  | {
2681
5254
  type: 'add behavior'
2682
5255
  behavior: Behavior
@@ -2693,10 +5266,6 @@ declare const editorMachine: StateMachine<
2693
5266
  type: 'update schema'
2694
5267
  schema: EditorSchema
2695
5268
  }
2696
- | {
2697
- type: 'update behaviors'
2698
- behaviors: Array<Behavior>
2699
- }
2700
5269
  | {
2701
5270
  type: 'update key generator'
2702
5271
  keyGenerator: () => string
@@ -2709,7 +5278,6 @@ declare const editorMachine: StateMachine<
2709
5278
  type: 'update maxBlocks'
2710
5279
  maxBlocks: number | undefined
2711
5280
  }
2712
- | PatchesEvent
2713
5281
  | {
2714
5282
  type: 'blur'
2715
5283
  editor: PortableTextSlateEditor
@@ -2725,7 +5293,10 @@ declare const editorMachine: StateMachine<
2725
5293
  type: 'done normalizing'
2726
5294
  }
2727
5295
  | {
2728
- type: 'done syncing initial value'
5296
+ type: 'done syncing value'
5297
+ }
5298
+ | {
5299
+ type: 'syncing value'
2729
5300
  }
2730
5301
  | {
2731
5302
  type: 'behavior event'
@@ -2864,6 +5435,7 @@ declare const editorMachine: StateMachine<
2864
5435
  getLegacySchema: () => PortableTextMemberSchemaTypes
2865
5436
  keyGenerator: () => string
2866
5437
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5438
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
2867
5439
  schema: EditorSchema
2868
5440
  initialReadOnly: boolean
2869
5441
  maxBlocks: number | undefined
@@ -2880,6 +5452,7 @@ declare const editorMachine: StateMachine<
2880
5452
  },
2881
5453
  | InternalPatchEvent
2882
5454
  | MutationEvent
5455
+ | PatchesEvent
2883
5456
  | {
2884
5457
  type: 'add behavior'
2885
5458
  behavior: Behavior
@@ -2896,10 +5469,6 @@ declare const editorMachine: StateMachine<
2896
5469
  type: 'update schema'
2897
5470
  schema: EditorSchema
2898
5471
  }
2899
- | {
2900
- type: 'update behaviors'
2901
- behaviors: Array<Behavior>
2902
- }
2903
5472
  | {
2904
5473
  type: 'update key generator'
2905
5474
  keyGenerator: () => string
@@ -2912,7 +5481,6 @@ declare const editorMachine: StateMachine<
2912
5481
  type: 'update maxBlocks'
2913
5482
  maxBlocks: number | undefined
2914
5483
  }
2915
- | PatchesEvent
2916
5484
  | {
2917
5485
  type: 'blur'
2918
5486
  editor: PortableTextSlateEditor
@@ -2928,7 +5496,10 @@ declare const editorMachine: StateMachine<
2928
5496
  type: 'done normalizing'
2929
5497
  }
2930
5498
  | {
2931
- type: 'done syncing initial value'
5499
+ type: 'done syncing value'
5500
+ }
5501
+ | {
5502
+ type: 'syncing value'
2932
5503
  }
2933
5504
  | {
2934
5505
  type: 'behavior event'
@@ -3067,6 +5638,7 @@ declare const editorMachine: StateMachine<
3067
5638
  getLegacySchema: () => PortableTextMemberSchemaTypes
3068
5639
  keyGenerator: () => string
3069
5640
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5641
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3070
5642
  schema: EditorSchema
3071
5643
  initialReadOnly: boolean
3072
5644
  maxBlocks: number | undefined
@@ -3084,6 +5656,7 @@ declare const editorMachine: StateMachine<
3084
5656
  },
3085
5657
  | InternalPatchEvent
3086
5658
  | MutationEvent
5659
+ | PatchesEvent
3087
5660
  | {
3088
5661
  type: 'add behavior'
3089
5662
  behavior: Behavior
@@ -3100,10 +5673,6 @@ declare const editorMachine: StateMachine<
3100
5673
  type: 'update schema'
3101
5674
  schema: EditorSchema
3102
5675
  }
3103
- | {
3104
- type: 'update behaviors'
3105
- behaviors: Array<Behavior>
3106
- }
3107
5676
  | {
3108
5677
  type: 'update key generator'
3109
5678
  keyGenerator: () => string
@@ -3116,7 +5685,6 @@ declare const editorMachine: StateMachine<
3116
5685
  type: 'update maxBlocks'
3117
5686
  maxBlocks: number | undefined
3118
5687
  }
3119
- | PatchesEvent
3120
5688
  | {
3121
5689
  type: 'blur'
3122
5690
  editor: PortableTextSlateEditor
@@ -3132,7 +5700,10 @@ declare const editorMachine: StateMachine<
3132
5700
  type: 'done normalizing'
3133
5701
  }
3134
5702
  | {
3135
- type: 'done syncing initial value'
5703
+ type: 'done syncing value'
5704
+ }
5705
+ | {
5706
+ type: 'syncing value'
3136
5707
  }
3137
5708
  | {
3138
5709
  type: 'behavior event'
@@ -3269,210 +5840,6 @@ declare const editorMachine: StateMachine<
3269
5840
  readonly 'remove behavior': {
3270
5841
  readonly actions: 'remove behavior from context'
3271
5842
  }
3272
- readonly 'patches': {
3273
- readonly actions: ActionFunction<
3274
- {
3275
- behaviors: Set<Behavior>
3276
- converters: Set<Converter>
3277
- getLegacySchema: () => PortableTextMemberSchemaTypes
3278
- keyGenerator: () => string
3279
- pendingEvents: Array<InternalPatchEvent | MutationEvent>
3280
- schema: EditorSchema
3281
- initialReadOnly: boolean
3282
- maxBlocks: number | undefined
3283
- selection: EditorSelection
3284
- incomingValue: Array<PortableTextBlock> | undefined
3285
- internalDrag?: {
3286
- ghost?: HTMLElement
3287
- origin: Pick<EventPosition, 'selection'>
3288
- }
3289
- slateEditor?: PortableTextSlateEditor
3290
- },
3291
- PatchesEvent,
3292
- | InternalPatchEvent
3293
- | MutationEvent
3294
- | {
3295
- type: 'add behavior'
3296
- behavior: Behavior
3297
- }
3298
- | {
3299
- type: 'remove behavior'
3300
- behavior: Behavior
3301
- }
3302
- | {
3303
- type: 'update readOnly'
3304
- readOnly: boolean
3305
- }
3306
- | {
3307
- type: 'update schema'
3308
- schema: EditorSchema
3309
- }
3310
- | {
3311
- type: 'update behaviors'
3312
- behaviors: Array<Behavior>
3313
- }
3314
- | {
3315
- type: 'update key generator'
3316
- keyGenerator: () => string
3317
- }
3318
- | {
3319
- type: 'update value'
3320
- value: Array<PortableTextBlock> | undefined
3321
- }
3322
- | {
3323
- type: 'update maxBlocks'
3324
- maxBlocks: number | undefined
3325
- }
3326
- | PatchesEvent
3327
- | {
3328
- type: 'blur'
3329
- editor: PortableTextSlateEditor
3330
- }
3331
- | {
3332
- type: 'focus'
3333
- editor: PortableTextSlateEditor
3334
- }
3335
- | {
3336
- type: 'normalizing'
3337
- }
3338
- | {
3339
- type: 'done normalizing'
3340
- }
3341
- | {
3342
- type: 'done syncing initial value'
3343
- }
3344
- | {
3345
- type: 'behavior event'
3346
- behaviorEvent: BehaviorEvent
3347
- editor: PortableTextSlateEditor
3348
- nativeEvent?: {
3349
- preventDefault: () => void
3350
- }
3351
- }
3352
- | {
3353
- type: 'notify.patch'
3354
- patch: Patch
3355
- }
3356
- | {
3357
- type: 'notify.mutation'
3358
- patches: Array<Patch>
3359
- snapshot: Array<PortableTextBlock> | undefined
3360
- value: Array<PortableTextBlock> | undefined
3361
- }
3362
- | {
3363
- type: 'notify.blurred'
3364
- event: FocusEvent_2<HTMLDivElement, Element>
3365
- }
3366
- | {
3367
- type: 'notify.done loading'
3368
- }
3369
- | {
3370
- type: 'notify.editable'
3371
- }
3372
- | {
3373
- type: 'notify.error'
3374
- name: string
3375
- description: string
3376
- data: unknown
3377
- }
3378
- | {
3379
- type: 'notify.focused'
3380
- event: FocusEvent_2<HTMLDivElement, Element>
3381
- }
3382
- | {
3383
- type: 'notify.invalid value'
3384
- resolution: InvalidValueResolution | null
3385
- value: Array<PortableTextBlock> | undefined
3386
- }
3387
- | {
3388
- type: 'notify.loading'
3389
- }
3390
- | {
3391
- type: 'notify.read only'
3392
- }
3393
- | {
3394
- type: 'notify.ready'
3395
- }
3396
- | {
3397
- type: 'notify.selection'
3398
- selection: EditorSelection
3399
- }
3400
- | {
3401
- type: 'notify.value changed'
3402
- value: Array<PortableTextBlock> | undefined
3403
- }
3404
- | {
3405
- type: 'notify.unset'
3406
- previousValue: Array<PortableTextBlock>
3407
- }
3408
- | {
3409
- type: 'dragstart'
3410
- origin: Pick<EventPosition, 'selection'>
3411
- ghost?: HTMLElement
3412
- }
3413
- | {
3414
- type: 'dragend'
3415
- }
3416
- | {
3417
- type: 'drop'
3418
- },
3419
- undefined,
3420
- never,
3421
- never,
3422
- never,
3423
- never,
3424
- | PatchEvent
3425
- | InternalPatchEvent
3426
- | MutationEvent
3427
- | PatchesEvent
3428
- | {
3429
- type: 'blurred'
3430
- event: FocusEvent_2<HTMLDivElement, Element>
3431
- }
3432
- | {
3433
- type: 'done loading'
3434
- }
3435
- | {
3436
- type: 'editable'
3437
- }
3438
- | {
3439
- type: 'error'
3440
- name: string
3441
- description: string
3442
- data: unknown
3443
- }
3444
- | {
3445
- type: 'focused'
3446
- event: FocusEvent_2<HTMLDivElement, Element>
3447
- }
3448
- | {
3449
- type: 'invalid value'
3450
- resolution: InvalidValueResolution | null
3451
- value: Array<PortableTextBlock> | undefined
3452
- }
3453
- | {
3454
- type: 'loading'
3455
- }
3456
- | {
3457
- type: 'read only'
3458
- }
3459
- | {
3460
- type: 'ready'
3461
- }
3462
- | {
3463
- type: 'selection'
3464
- selection: EditorSelection
3465
- }
3466
- | {
3467
- type: 'value changed'
3468
- value: Array<PortableTextBlock> | undefined
3469
- }
3470
- | UnsetEvent
3471
- >
3472
- }
3473
- readonly 'update behaviors': {
3474
- readonly actions: 'assign behaviors'
3475
- }
3476
5843
  readonly 'update key generator': {
3477
5844
  readonly actions: ActionFunction<
3478
5845
  {
@@ -3481,6 +5848,7 @@ declare const editorMachine: StateMachine<
3481
5848
  getLegacySchema: () => PortableTextMemberSchemaTypes
3482
5849
  keyGenerator: () => string
3483
5850
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
5851
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3484
5852
  schema: EditorSchema
3485
5853
  initialReadOnly: boolean
3486
5854
  maxBlocks: number | undefined
@@ -3498,6 +5866,7 @@ declare const editorMachine: StateMachine<
3498
5866
  },
3499
5867
  | InternalPatchEvent
3500
5868
  | MutationEvent
5869
+ | PatchesEvent
3501
5870
  | {
3502
5871
  type: 'add behavior'
3503
5872
  behavior: Behavior
@@ -3514,10 +5883,6 @@ declare const editorMachine: StateMachine<
3514
5883
  type: 'update schema'
3515
5884
  schema: EditorSchema
3516
5885
  }
3517
- | {
3518
- type: 'update behaviors'
3519
- behaviors: Array<Behavior>
3520
- }
3521
5886
  | {
3522
5887
  type: 'update key generator'
3523
5888
  keyGenerator: () => string
@@ -3530,7 +5895,6 @@ declare const editorMachine: StateMachine<
3530
5895
  type: 'update maxBlocks'
3531
5896
  maxBlocks: number | undefined
3532
5897
  }
3533
- | PatchesEvent
3534
5898
  | {
3535
5899
  type: 'blur'
3536
5900
  editor: PortableTextSlateEditor
@@ -3546,7 +5910,10 @@ declare const editorMachine: StateMachine<
3546
5910
  type: 'done normalizing'
3547
5911
  }
3548
5912
  | {
3549
- type: 'done syncing initial value'
5913
+ type: 'done syncing value'
5914
+ }
5915
+ | {
5916
+ type: 'syncing value'
3550
5917
  }
3551
5918
  | {
3552
5919
  type: 'behavior event'
@@ -3642,6 +6009,7 @@ declare const editorMachine: StateMachine<
3642
6009
  getLegacySchema: () => PortableTextMemberSchemaTypes
3643
6010
  keyGenerator: () => string
3644
6011
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6012
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3645
6013
  schema: EditorSchema
3646
6014
  initialReadOnly: boolean
3647
6015
  maxBlocks: number | undefined
@@ -3659,6 +6027,7 @@ declare const editorMachine: StateMachine<
3659
6027
  },
3660
6028
  | InternalPatchEvent
3661
6029
  | MutationEvent
6030
+ | PatchesEvent
3662
6031
  | {
3663
6032
  type: 'add behavior'
3664
6033
  behavior: Behavior
@@ -3675,10 +6044,6 @@ declare const editorMachine: StateMachine<
3675
6044
  type: 'update schema'
3676
6045
  schema: EditorSchema
3677
6046
  }
3678
- | {
3679
- type: 'update behaviors'
3680
- behaviors: Array<Behavior>
3681
- }
3682
6047
  | {
3683
6048
  type: 'update key generator'
3684
6049
  keyGenerator: () => string
@@ -3691,7 +6056,6 @@ declare const editorMachine: StateMachine<
3691
6056
  type: 'update maxBlocks'
3692
6057
  maxBlocks: number | undefined
3693
6058
  }
3694
- | PatchesEvent
3695
6059
  | {
3696
6060
  type: 'blur'
3697
6061
  editor: PortableTextSlateEditor
@@ -3707,7 +6071,10 @@ declare const editorMachine: StateMachine<
3707
6071
  type: 'done normalizing'
3708
6072
  }
3709
6073
  | {
3710
- type: 'done syncing initial value'
6074
+ type: 'done syncing value'
6075
+ }
6076
+ | {
6077
+ type: 'syncing value'
3711
6078
  }
3712
6079
  | {
3713
6080
  type: 'behavior event'
@@ -3800,6 +6167,7 @@ declare const editorMachine: StateMachine<
3800
6167
  getLegacySchema: () => PortableTextMemberSchemaTypes
3801
6168
  keyGenerator: () => string
3802
6169
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6170
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3803
6171
  schema: EditorSchema
3804
6172
  initialReadOnly: boolean
3805
6173
  maxBlocks: number | undefined
@@ -3817,6 +6185,7 @@ declare const editorMachine: StateMachine<
3817
6185
  },
3818
6186
  | InternalPatchEvent
3819
6187
  | MutationEvent
6188
+ | PatchesEvent
3820
6189
  | {
3821
6190
  type: 'add behavior'
3822
6191
  behavior: Behavior
@@ -3833,10 +6202,6 @@ declare const editorMachine: StateMachine<
3833
6202
  type: 'update schema'
3834
6203
  schema: EditorSchema
3835
6204
  }
3836
- | {
3837
- type: 'update behaviors'
3838
- behaviors: Array<Behavior>
3839
- }
3840
6205
  | {
3841
6206
  type: 'update key generator'
3842
6207
  keyGenerator: () => string
@@ -3849,7 +6214,6 @@ declare const editorMachine: StateMachine<
3849
6214
  type: 'update maxBlocks'
3850
6215
  maxBlocks: number | undefined
3851
6216
  }
3852
- | PatchesEvent
3853
6217
  | {
3854
6218
  type: 'blur'
3855
6219
  editor: PortableTextSlateEditor
@@ -3865,7 +6229,10 @@ declare const editorMachine: StateMachine<
3865
6229
  type: 'done normalizing'
3866
6230
  }
3867
6231
  | {
3868
- type: 'done syncing initial value'
6232
+ type: 'done syncing value'
6233
+ }
6234
+ | {
6235
+ type: 'syncing value'
3869
6236
  }
3870
6237
  | {
3871
6238
  type: 'behavior event'
@@ -3970,6 +6337,7 @@ declare const editorMachine: StateMachine<
3970
6337
  getLegacySchema: () => PortableTextMemberSchemaTypes
3971
6338
  keyGenerator: () => string
3972
6339
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6340
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
3973
6341
  schema: EditorSchema
3974
6342
  initialReadOnly: boolean
3975
6343
  maxBlocks: number | undefined
@@ -3995,7 +6363,7 @@ declare const editorMachine: StateMachine<
3995
6363
  readonly states: {
3996
6364
  readonly 'determine initial edit mode': {
3997
6365
  readonly on: {
3998
- readonly 'done syncing initial value': readonly [
6366
+ readonly 'done syncing value': readonly [
3999
6367
  {
4000
6368
  readonly target: '#editor.edit mode.read only.read only'
4001
6369
  readonly guard: ({
@@ -4009,6 +6377,7 @@ declare const editorMachine: StateMachine<
4009
6377
  pendingEvents: Array<
4010
6378
  InternalPatchEvent | MutationEvent
4011
6379
  >
6380
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4012
6381
  schema: EditorSchema
4013
6382
  initialReadOnly: boolean
4014
6383
  maxBlocks: number | undefined
@@ -4021,7 +6390,7 @@ declare const editorMachine: StateMachine<
4021
6390
  slateEditor?: PortableTextSlateEditor
4022
6391
  },
4023
6392
  {
4024
- type: 'done syncing initial value'
6393
+ type: 'done syncing value'
4025
6394
  }
4026
6395
  >) => boolean
4027
6396
  },
@@ -4043,6 +6412,7 @@ declare const editorMachine: StateMachine<
4043
6412
  getLegacySchema: () => PortableTextMemberSchemaTypes
4044
6413
  keyGenerator: () => string
4045
6414
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6415
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4046
6416
  schema: EditorSchema
4047
6417
  initialReadOnly: boolean
4048
6418
  maxBlocks: number | undefined
@@ -4078,6 +6448,7 @@ declare const editorMachine: StateMachine<
4078
6448
  getLegacySchema: () => PortableTextMemberSchemaTypes
4079
6449
  keyGenerator: () => string
4080
6450
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6451
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4081
6452
  schema: EditorSchema
4082
6453
  initialReadOnly: boolean
4083
6454
  maxBlocks: number | undefined
@@ -4113,6 +6484,7 @@ declare const editorMachine: StateMachine<
4113
6484
  getLegacySchema: () => PortableTextMemberSchemaTypes
4114
6485
  keyGenerator: () => string
4115
6486
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6487
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4116
6488
  schema: EditorSchema
4117
6489
  initialReadOnly: boolean
4118
6490
  maxBlocks: number | undefined
@@ -4130,6 +6502,7 @@ declare const editorMachine: StateMachine<
4130
6502
  },
4131
6503
  | InternalPatchEvent
4132
6504
  | MutationEvent
6505
+ | PatchesEvent
4133
6506
  | {
4134
6507
  type: 'add behavior'
4135
6508
  behavior: Behavior
@@ -4146,10 +6519,6 @@ declare const editorMachine: StateMachine<
4146
6519
  type: 'update schema'
4147
6520
  schema: EditorSchema
4148
6521
  }
4149
- | {
4150
- type: 'update behaviors'
4151
- behaviors: Array<Behavior>
4152
- }
4153
6522
  | {
4154
6523
  type: 'update key generator'
4155
6524
  keyGenerator: () => string
@@ -4162,7 +6531,6 @@ declare const editorMachine: StateMachine<
4162
6531
  type: 'update maxBlocks'
4163
6532
  maxBlocks: number | undefined
4164
6533
  }
4165
- | PatchesEvent
4166
6534
  | {
4167
6535
  type: 'blur'
4168
6536
  editor: PortableTextSlateEditor
@@ -4178,7 +6546,10 @@ declare const editorMachine: StateMachine<
4178
6546
  type: 'done normalizing'
4179
6547
  }
4180
6548
  | {
4181
- type: 'done syncing initial value'
6549
+ type: 'done syncing value'
6550
+ }
6551
+ | {
6552
+ type: 'syncing value'
4182
6553
  }
4183
6554
  | {
4184
6555
  type: 'behavior event'
@@ -4280,6 +6651,7 @@ declare const editorMachine: StateMachine<
4280
6651
  pendingEvents: Array<
4281
6652
  InternalPatchEvent | MutationEvent
4282
6653
  >
6654
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4283
6655
  schema: EditorSchema
4284
6656
  initialReadOnly: boolean
4285
6657
  maxBlocks: number | undefined
@@ -4298,6 +6670,7 @@ declare const editorMachine: StateMachine<
4298
6670
  },
4299
6671
  | InternalPatchEvent
4300
6672
  | MutationEvent
6673
+ | PatchesEvent
4301
6674
  | {
4302
6675
  type: 'add behavior'
4303
6676
  behavior: Behavior
@@ -4314,10 +6687,6 @@ declare const editorMachine: StateMachine<
4314
6687
  type: 'update schema'
4315
6688
  schema: EditorSchema
4316
6689
  }
4317
- | {
4318
- type: 'update behaviors'
4319
- behaviors: Array<Behavior>
4320
- }
4321
6690
  | {
4322
6691
  type: 'update key generator'
4323
6692
  keyGenerator: () => string
@@ -4330,7 +6699,6 @@ declare const editorMachine: StateMachine<
4330
6699
  type: 'update maxBlocks'
4331
6700
  maxBlocks: number | undefined
4332
6701
  }
4333
- | PatchesEvent
4334
6702
  | {
4335
6703
  type: 'blur'
4336
6704
  editor: PortableTextSlateEditor
@@ -4346,7 +6714,10 @@ declare const editorMachine: StateMachine<
4346
6714
  type: 'done normalizing'
4347
6715
  }
4348
6716
  | {
4349
- type: 'done syncing initial value'
6717
+ type: 'done syncing value'
6718
+ }
6719
+ | {
6720
+ type: 'syncing value'
4350
6721
  }
4351
6722
  | {
4352
6723
  type: 'behavior event'
@@ -4470,6 +6841,7 @@ declare const editorMachine: StateMachine<
4470
6841
  getLegacySchema: () => PortableTextMemberSchemaTypes
4471
6842
  keyGenerator: () => string
4472
6843
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
6844
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4473
6845
  schema: EditorSchema
4474
6846
  initialReadOnly: boolean
4475
6847
  maxBlocks: number | undefined
@@ -4483,6 +6855,7 @@ declare const editorMachine: StateMachine<
4483
6855
  },
4484
6856
  | InternalPatchEvent
4485
6857
  | MutationEvent
6858
+ | PatchesEvent
4486
6859
  | {
4487
6860
  type: 'add behavior'
4488
6861
  behavior: Behavior
@@ -4499,10 +6872,6 @@ declare const editorMachine: StateMachine<
4499
6872
  type: 'update schema'
4500
6873
  schema: EditorSchema
4501
6874
  }
4502
- | {
4503
- type: 'update behaviors'
4504
- behaviors: Array<Behavior>
4505
- }
4506
6875
  | {
4507
6876
  type: 'update key generator'
4508
6877
  keyGenerator: () => string
@@ -4515,7 +6884,6 @@ declare const editorMachine: StateMachine<
4515
6884
  type: 'update maxBlocks'
4516
6885
  maxBlocks: number | undefined
4517
6886
  }
4518
- | PatchesEvent
4519
6887
  | {
4520
6888
  type: 'blur'
4521
6889
  editor: PortableTextSlateEditor
@@ -4531,7 +6899,10 @@ declare const editorMachine: StateMachine<
4531
6899
  type: 'done normalizing'
4532
6900
  }
4533
6901
  | {
4534
- type: 'done syncing initial value'
6902
+ type: 'done syncing value'
6903
+ }
6904
+ | {
6905
+ type: 'syncing value'
4535
6906
  }
4536
6907
  | {
4537
6908
  type: 'behavior event'
@@ -4610,6 +6981,7 @@ declare const editorMachine: StateMachine<
4610
6981
  },
4611
6982
  | InternalPatchEvent
4612
6983
  | MutationEvent
6984
+ | PatchesEvent
4613
6985
  | {
4614
6986
  type: 'add behavior'
4615
6987
  behavior: Behavior
@@ -4626,10 +6998,6 @@ declare const editorMachine: StateMachine<
4626
6998
  type: 'update schema'
4627
6999
  schema: EditorSchema
4628
7000
  }
4629
- | {
4630
- type: 'update behaviors'
4631
- behaviors: Array<Behavior>
4632
- }
4633
7001
  | {
4634
7002
  type: 'update key generator'
4635
7003
  keyGenerator: () => string
@@ -4642,7 +7010,6 @@ declare const editorMachine: StateMachine<
4642
7010
  type: 'update maxBlocks'
4643
7011
  maxBlocks: number | undefined
4644
7012
  }
4645
- | PatchesEvent
4646
7013
  | {
4647
7014
  type: 'blur'
4648
7015
  editor: PortableTextSlateEditor
@@ -4658,7 +7025,10 @@ declare const editorMachine: StateMachine<
4658
7025
  type: 'done normalizing'
4659
7026
  }
4660
7027
  | {
4661
- type: 'done syncing initial value'
7028
+ type: 'done syncing value'
7029
+ }
7030
+ | {
7031
+ type: 'syncing value'
4662
7032
  }
4663
7033
  | {
4664
7034
  type: 'behavior event'
@@ -4743,6 +7113,7 @@ declare const editorMachine: StateMachine<
4743
7113
  getLegacySchema: () => PortableTextMemberSchemaTypes
4744
7114
  keyGenerator: () => string
4745
7115
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
7116
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
4746
7117
  schema: EditorSchema
4747
7118
  initialReadOnly: boolean
4748
7119
  maxBlocks: number | undefined
@@ -4756,6 +7127,7 @@ declare const editorMachine: StateMachine<
4756
7127
  },
4757
7128
  | InternalPatchEvent
4758
7129
  | MutationEvent
7130
+ | PatchesEvent
4759
7131
  | {
4760
7132
  type: 'add behavior'
4761
7133
  behavior: Behavior
@@ -4772,10 +7144,6 @@ declare const editorMachine: StateMachine<
4772
7144
  type: 'update schema'
4773
7145
  schema: EditorSchema
4774
7146
  }
4775
- | {
4776
- type: 'update behaviors'
4777
- behaviors: Array<Behavior>
4778
- }
4779
7147
  | {
4780
7148
  type: 'update key generator'
4781
7149
  keyGenerator: () => string
@@ -4788,7 +7156,6 @@ declare const editorMachine: StateMachine<
4788
7156
  type: 'update maxBlocks'
4789
7157
  maxBlocks: number | undefined
4790
7158
  }
4791
- | PatchesEvent
4792
7159
  | {
4793
7160
  type: 'blur'
4794
7161
  editor: PortableTextSlateEditor
@@ -4804,7 +7171,10 @@ declare const editorMachine: StateMachine<
4804
7171
  type: 'done normalizing'
4805
7172
  }
4806
7173
  | {
4807
- type: 'done syncing initial value'
7174
+ type: 'done syncing value'
7175
+ }
7176
+ | {
7177
+ type: 'syncing value'
4808
7178
  }
4809
7179
  | {
4810
7180
  type: 'behavior event'
@@ -4883,6 +7253,7 @@ declare const editorMachine: StateMachine<
4883
7253
  },
4884
7254
  | InternalPatchEvent
4885
7255
  | MutationEvent
7256
+ | PatchesEvent
4886
7257
  | {
4887
7258
  type: 'add behavior'
4888
7259
  behavior: Behavior
@@ -4899,10 +7270,6 @@ declare const editorMachine: StateMachine<
4899
7270
  type: 'update schema'
4900
7271
  schema: EditorSchema
4901
7272
  }
4902
- | {
4903
- type: 'update behaviors'
4904
- behaviors: Array<Behavior>
4905
- }
4906
7273
  | {
4907
7274
  type: 'update key generator'
4908
7275
  keyGenerator: () => string
@@ -4915,7 +7282,6 @@ declare const editorMachine: StateMachine<
4915
7282
  type: 'update maxBlocks'
4916
7283
  maxBlocks: number | undefined
4917
7284
  }
4918
- | PatchesEvent
4919
7285
  | {
4920
7286
  type: 'blur'
4921
7287
  editor: PortableTextSlateEditor
@@ -4931,7 +7297,10 @@ declare const editorMachine: StateMachine<
4931
7297
  type: 'done normalizing'
4932
7298
  }
4933
7299
  | {
4934
- type: 'done syncing initial value'
7300
+ type: 'done syncing value'
7301
+ }
7302
+ | {
7303
+ type: 'syncing value'
4935
7304
  }
4936
7305
  | {
4937
7306
  type: 'behavior event'
@@ -5034,7 +7403,11 @@ declare const editorMachine: StateMachine<
5034
7403
  readonly initial: 'setting up'
5035
7404
  readonly states: {
5036
7405
  readonly 'setting up': {
5037
- readonly exit: readonly ['emit ready']
7406
+ readonly exit: readonly [
7407
+ 'emit ready',
7408
+ 'emit pending incoming patches',
7409
+ 'clear pending incoming patches',
7410
+ ]
5038
7411
  readonly on: {
5039
7412
  readonly 'internal.patch': {
5040
7413
  readonly actions: 'defer event'
@@ -5042,58 +7415,304 @@ declare const editorMachine: StateMachine<
5042
7415
  readonly 'mutation': {
5043
7416
  readonly actions: 'defer event'
5044
7417
  }
5045
- readonly 'done syncing initial value': {
5046
- readonly target: 'pristine'
7418
+ readonly 'done syncing value': {
7419
+ readonly target: 'set up'
7420
+ }
7421
+ readonly 'patches': {
7422
+ readonly actions: readonly ['defer incoming patches']
5047
7423
  }
5048
7424
  }
5049
7425
  }
5050
- readonly 'pristine': {
5051
- readonly initial: 'idle'
7426
+ readonly 'set up': {
7427
+ readonly type: 'parallel'
5052
7428
  readonly states: {
5053
- readonly idle: {
5054
- readonly on: {
5055
- readonly 'normalizing': {
5056
- readonly target: 'normalizing'
5057
- }
5058
- readonly 'internal.patch': {
5059
- readonly actions: 'defer event'
5060
- readonly target: '#editor.setup.dirty'
7429
+ readonly 'value sync': {
7430
+ readonly initial: 'idle'
7431
+ readonly states: {
7432
+ readonly 'idle': {
7433
+ readonly on: {
7434
+ readonly 'patches': {
7435
+ readonly actions: readonly [
7436
+ ActionFunction<
7437
+ {
7438
+ behaviors: Set<Behavior>
7439
+ converters: Set<Converter>
7440
+ getLegacySchema: () => PortableTextMemberSchemaTypes
7441
+ keyGenerator: () => string
7442
+ pendingEvents: Array<
7443
+ InternalPatchEvent | MutationEvent
7444
+ >
7445
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
7446
+ schema: EditorSchema
7447
+ initialReadOnly: boolean
7448
+ maxBlocks: number | undefined
7449
+ selection: EditorSelection
7450
+ incomingValue:
7451
+ | Array<PortableTextBlock>
7452
+ | undefined
7453
+ internalDrag?: {
7454
+ ghost?: HTMLElement
7455
+ origin: Pick<EventPosition, 'selection'>
7456
+ }
7457
+ slateEditor?: PortableTextSlateEditor
7458
+ },
7459
+ PatchesEvent,
7460
+ | InternalPatchEvent
7461
+ | MutationEvent
7462
+ | PatchesEvent
7463
+ | {
7464
+ type: 'add behavior'
7465
+ behavior: Behavior
7466
+ }
7467
+ | {
7468
+ type: 'remove behavior'
7469
+ behavior: Behavior
7470
+ }
7471
+ | {
7472
+ type: 'update readOnly'
7473
+ readOnly: boolean
7474
+ }
7475
+ | {
7476
+ type: 'update schema'
7477
+ schema: EditorSchema
7478
+ }
7479
+ | {
7480
+ type: 'update key generator'
7481
+ keyGenerator: () => string
7482
+ }
7483
+ | {
7484
+ type: 'update value'
7485
+ value: Array<PortableTextBlock> | undefined
7486
+ }
7487
+ | {
7488
+ type: 'update maxBlocks'
7489
+ maxBlocks: number | undefined
7490
+ }
7491
+ | {
7492
+ type: 'blur'
7493
+ editor: PortableTextSlateEditor
7494
+ }
7495
+ | {
7496
+ type: 'focus'
7497
+ editor: PortableTextSlateEditor
7498
+ }
7499
+ | {
7500
+ type: 'normalizing'
7501
+ }
7502
+ | {
7503
+ type: 'done normalizing'
7504
+ }
7505
+ | {
7506
+ type: 'done syncing value'
7507
+ }
7508
+ | {
7509
+ type: 'syncing value'
7510
+ }
7511
+ | {
7512
+ type: 'behavior event'
7513
+ behaviorEvent: BehaviorEvent
7514
+ editor: PortableTextSlateEditor
7515
+ nativeEvent?: {
7516
+ preventDefault: () => void
7517
+ }
7518
+ }
7519
+ | {
7520
+ type: 'notify.patch'
7521
+ patch: Patch
7522
+ }
7523
+ | {
7524
+ type: 'notify.mutation'
7525
+ patches: Array<Patch>
7526
+ snapshot: Array<PortableTextBlock> | undefined
7527
+ value: Array<PortableTextBlock> | undefined
7528
+ }
7529
+ | {
7530
+ type: 'notify.blurred'
7531
+ event: FocusEvent_2<HTMLDivElement, Element>
7532
+ }
7533
+ | {
7534
+ type: 'notify.done loading'
7535
+ }
7536
+ | {
7537
+ type: 'notify.editable'
7538
+ }
7539
+ | {
7540
+ type: 'notify.error'
7541
+ name: string
7542
+ description: string
7543
+ data: unknown
7544
+ }
7545
+ | {
7546
+ type: 'notify.focused'
7547
+ event: FocusEvent_2<HTMLDivElement, Element>
7548
+ }
7549
+ | {
7550
+ type: 'notify.invalid value'
7551
+ resolution: InvalidValueResolution | null
7552
+ value: Array<PortableTextBlock> | undefined
7553
+ }
7554
+ | {
7555
+ type: 'notify.loading'
7556
+ }
7557
+ | {
7558
+ type: 'notify.read only'
7559
+ }
7560
+ | {
7561
+ type: 'notify.ready'
7562
+ }
7563
+ | {
7564
+ type: 'notify.selection'
7565
+ selection: EditorSelection
7566
+ }
7567
+ | {
7568
+ type: 'notify.value changed'
7569
+ value: Array<PortableTextBlock> | undefined
7570
+ }
7571
+ | {
7572
+ type: 'notify.unset'
7573
+ previousValue: Array<PortableTextBlock>
7574
+ }
7575
+ | {
7576
+ type: 'dragstart'
7577
+ origin: Pick<EventPosition, 'selection'>
7578
+ ghost?: HTMLElement
7579
+ }
7580
+ | {
7581
+ type: 'dragend'
7582
+ }
7583
+ | {
7584
+ type: 'drop'
7585
+ },
7586
+ undefined,
7587
+ never,
7588
+ never,
7589
+ never,
7590
+ never,
7591
+ | PatchEvent
7592
+ | InternalPatchEvent
7593
+ | MutationEvent
7594
+ | PatchesEvent
7595
+ | {
7596
+ type: 'blurred'
7597
+ event: FocusEvent_2<HTMLDivElement, Element>
7598
+ }
7599
+ | {
7600
+ type: 'done loading'
7601
+ }
7602
+ | {
7603
+ type: 'editable'
7604
+ }
7605
+ | {
7606
+ type: 'error'
7607
+ name: string
7608
+ description: string
7609
+ data: unknown
7610
+ }
7611
+ | {
7612
+ type: 'focused'
7613
+ event: FocusEvent_2<HTMLDivElement, Element>
7614
+ }
7615
+ | {
7616
+ type: 'invalid value'
7617
+ resolution: InvalidValueResolution | null
7618
+ value: Array<PortableTextBlock> | undefined
7619
+ }
7620
+ | {
7621
+ type: 'loading'
7622
+ }
7623
+ | {
7624
+ type: 'read only'
7625
+ }
7626
+ | {
7627
+ type: 'ready'
7628
+ }
7629
+ | {
7630
+ type: 'selection'
7631
+ selection: EditorSelection
7632
+ }
7633
+ | {
7634
+ type: 'value changed'
7635
+ value: Array<PortableTextBlock> | undefined
7636
+ }
7637
+ | UnsetEvent
7638
+ >,
7639
+ ]
7640
+ }
7641
+ readonly 'syncing value': {
7642
+ readonly target: 'syncing value'
7643
+ }
7644
+ }
5061
7645
  }
5062
- readonly 'mutation': {
5063
- readonly actions: 'defer event'
5064
- readonly target: '#editor.setup.dirty'
7646
+ readonly 'syncing value': {
7647
+ readonly exit: readonly [
7648
+ 'emit pending incoming patches',
7649
+ 'clear pending incoming patches',
7650
+ ]
7651
+ readonly on: {
7652
+ readonly 'patches': {
7653
+ readonly actions: readonly ['defer incoming patches']
7654
+ }
7655
+ readonly 'done syncing value': {
7656
+ readonly target: 'idle'
7657
+ }
7658
+ }
5065
7659
  }
5066
7660
  }
5067
7661
  }
5068
- readonly normalizing: {
5069
- readonly on: {
5070
- readonly 'done normalizing': {
5071
- readonly target: 'idle'
5072
- }
5073
- readonly 'internal.patch': {
5074
- readonly actions: 'defer event'
7662
+ readonly 'writing': {
7663
+ readonly initial: 'pristine'
7664
+ readonly states: {
7665
+ readonly pristine: {
7666
+ readonly initial: 'idle'
7667
+ readonly states: {
7668
+ readonly idle: {
7669
+ readonly on: {
7670
+ readonly 'normalizing': {
7671
+ readonly target: 'normalizing'
7672
+ }
7673
+ readonly 'internal.patch': {
7674
+ readonly actions: 'defer event'
7675
+ readonly target: '#editor.setup.set up.writing.dirty'
7676
+ }
7677
+ readonly 'mutation': {
7678
+ readonly actions: 'defer event'
7679
+ readonly target: '#editor.setup.set up.writing.dirty'
7680
+ }
7681
+ }
7682
+ }
7683
+ readonly normalizing: {
7684
+ readonly on: {
7685
+ readonly 'done normalizing': {
7686
+ readonly target: 'idle'
7687
+ }
7688
+ readonly 'internal.patch': {
7689
+ readonly actions: 'defer event'
7690
+ }
7691
+ readonly 'mutation': {
7692
+ readonly actions: 'defer event'
7693
+ }
7694
+ }
7695
+ }
7696
+ }
5075
7697
  }
5076
- readonly 'mutation': {
5077
- readonly actions: 'defer event'
7698
+ readonly dirty: {
7699
+ readonly entry: readonly [
7700
+ 'emit pending events',
7701
+ 'clear pending events',
7702
+ ]
7703
+ readonly on: {
7704
+ readonly 'internal.patch': {
7705
+ readonly actions: 'emit patch event'
7706
+ }
7707
+ readonly 'mutation': {
7708
+ readonly actions: 'emit mutation event'
7709
+ }
7710
+ }
5078
7711
  }
5079
7712
  }
5080
7713
  }
5081
7714
  }
5082
7715
  }
5083
- readonly 'dirty': {
5084
- readonly entry: readonly [
5085
- 'emit pending events',
5086
- 'clear pending events',
5087
- ]
5088
- readonly on: {
5089
- readonly 'internal.patch': {
5090
- readonly actions: 'emit patch event'
5091
- }
5092
- readonly 'mutation': {
5093
- readonly actions: 'emit mutation event'
5094
- }
5095
- }
5096
- }
5097
7716
  }
5098
7717
  }
5099
7718
  }