@portabletext/editor 1.33.5 → 1.34.0

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 (50) hide show
  1. package/lib/_chunks-cjs/behavior.core.cjs +14 -8
  2. package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
  3. package/lib/_chunks-cjs/behavior.markdown.cjs +20 -12
  4. package/lib/_chunks-cjs/behavior.markdown.cjs.map +1 -1
  5. package/lib/_chunks-cjs/plugin.event-listener.cjs +95 -70
  6. package/lib/_chunks-cjs/plugin.event-listener.cjs.map +1 -1
  7. package/lib/_chunks-cjs/util.block-offsets-to-selection.cjs +103 -46
  8. package/lib/_chunks-cjs/util.block-offsets-to-selection.cjs.map +1 -1
  9. package/lib/_chunks-es/behavior.core.js +14 -8
  10. package/lib/_chunks-es/behavior.core.js.map +1 -1
  11. package/lib/_chunks-es/behavior.markdown.js +20 -12
  12. package/lib/_chunks-es/behavior.markdown.js.map +1 -1
  13. package/lib/_chunks-es/plugin.event-listener.js +101 -75
  14. package/lib/_chunks-es/plugin.event-listener.js.map +1 -1
  15. package/lib/_chunks-es/util.block-offsets-to-selection.js +102 -46
  16. package/lib/_chunks-es/util.block-offsets-to-selection.js.map +1 -1
  17. package/lib/behaviors/index.d.cts +5 -34
  18. package/lib/behaviors/index.d.ts +5 -34
  19. package/lib/index.d.cts +300 -1460
  20. package/lib/index.d.ts +300 -1460
  21. package/lib/plugins/index.cjs +60 -43
  22. package/lib/plugins/index.cjs.map +1 -1
  23. package/lib/plugins/index.d.cts +300 -1460
  24. package/lib/plugins/index.d.ts +300 -1460
  25. package/lib/plugins/index.js +63 -45
  26. package/lib/plugins/index.js.map +1 -1
  27. package/lib/selectors/index.d.cts +12 -0
  28. package/lib/selectors/index.d.ts +12 -0
  29. package/lib/utils/index.cjs +23 -1
  30. package/lib/utils/index.cjs.map +1 -1
  31. package/lib/utils/index.d.cts +11 -0
  32. package/lib/utils/index.d.ts +11 -0
  33. package/lib/utils/index.js +25 -2
  34. package/lib/utils/index.js.map +1 -1
  35. package/package.json +6 -6
  36. package/src/behavior-actions/behavior.action.block.set.ts +48 -5
  37. package/src/behavior-actions/behavior.action.block.unset.ts +77 -3
  38. package/src/behavior-actions/behavior.action.decorator.add.ts +30 -8
  39. package/src/behavior-actions/behavior.actions.ts +1 -18
  40. package/src/behaviors/behavior.core.lists.ts +18 -14
  41. package/src/behaviors/behavior.markdown-emphasis.ts +82 -41
  42. package/src/behaviors/behavior.markdown.ts +14 -12
  43. package/src/behaviors/behavior.types.ts +2 -14
  44. package/src/converters/converter.portable-text.deserialize.test.ts +3 -2
  45. package/src/internal-utils/parse-blocks.test.ts +455 -0
  46. package/src/internal-utils/parse-blocks.ts +202 -87
  47. package/src/utils/index.ts +1 -0
  48. package/src/utils/util.child-selection-point-to-block-offset.ts +55 -0
  49. package/src/behavior-actions/behavior.action.text-block.set.ts +0 -25
  50. package/src/behavior-actions/behavior.action.text-block.unset.ts +0 -17
package/lib/index.d.cts CHANGED
@@ -54,6 +54,7 @@ import {
54
54
  EventObject,
55
55
  InputFrom,
56
56
  IsNotNever,
57
+ MachineContext,
57
58
  MachineSnapshot,
58
59
  MetaObject,
59
60
  NonReducibleUnknown,
@@ -692,9 +693,9 @@ declare const editorMachine: StateMachine<
692
693
  }
693
694
  }
694
695
  | {
695
- [props: string]: unknown
696
696
  type: 'block.set'
697
697
  at: [KeyedSegment]
698
+ props: Record<string, unknown>
698
699
  }
699
700
  | {
700
701
  type: 'block.unset'
@@ -713,7 +714,10 @@ declare const editorMachine: StateMachine<
713
714
  | {
714
715
  type: 'decorator.add'
715
716
  decorator: string
716
- selection?: NonNullable<EditorSelection>
717
+ offsets?: {
718
+ anchor: BlockOffset_2
719
+ focus: BlockOffset_2
720
+ }
717
721
  }
718
722
  | {
719
723
  type: 'decorator.remove'
@@ -857,18 +861,6 @@ declare const editorMachine: StateMachine<
857
861
  type: 'style.toggle'
858
862
  style: string
859
863
  }
860
- | {
861
- type: 'text block.set'
862
- at: [KeyedSegment]
863
- level?: number
864
- listItem?: string
865
- style?: string
866
- }
867
- | {
868
- type: 'text block.unset'
869
- at: [KeyedSegment]
870
- props: Array<'level' | 'listItem' | 'style'>
871
- }
872
864
  | ({
873
865
  type: 'serialization.failure'
874
866
  mimeType: `${string}/${string}`
@@ -1123,9 +1115,9 @@ declare const editorMachine: StateMachine<
1123
1115
  }
1124
1116
  }
1125
1117
  | {
1126
- [props: string]: unknown
1127
1118
  type: 'block.set'
1128
1119
  at: [KeyedSegment]
1120
+ props: Record<string, unknown>
1129
1121
  }
1130
1122
  | {
1131
1123
  type: 'block.unset'
@@ -1144,7 +1136,10 @@ declare const editorMachine: StateMachine<
1144
1136
  | {
1145
1137
  type: 'decorator.add'
1146
1138
  decorator: string
1147
- selection?: NonNullable<EditorSelection>
1139
+ offsets?: {
1140
+ anchor: BlockOffset_2
1141
+ focus: BlockOffset_2
1142
+ }
1148
1143
  }
1149
1144
  | {
1150
1145
  type: 'decorator.remove'
@@ -1288,18 +1283,6 @@ declare const editorMachine: StateMachine<
1288
1283
  type: 'style.toggle'
1289
1284
  style: string
1290
1285
  }
1291
- | {
1292
- type: 'text block.set'
1293
- at: [KeyedSegment]
1294
- level?: number
1295
- listItem?: string
1296
- style?: string
1297
- }
1298
- | {
1299
- type: 'text block.unset'
1300
- at: [KeyedSegment]
1301
- props: Array<'level' | 'listItem' | 'style'>
1302
- }
1303
1286
  | ({
1304
1287
  type: 'serialization.failure'
1305
1288
  mimeType: `${string}/${string}`
@@ -1454,9 +1437,9 @@ declare const editorMachine: StateMachine<
1454
1437
  }
1455
1438
  }
1456
1439
  | {
1457
- [props: string]: unknown
1458
1440
  type: 'block.set'
1459
1441
  at: [KeyedSegment]
1442
+ props: Record<string, unknown>
1460
1443
  }
1461
1444
  | {
1462
1445
  type: 'block.unset'
@@ -1475,7 +1458,10 @@ declare const editorMachine: StateMachine<
1475
1458
  | {
1476
1459
  type: 'decorator.add'
1477
1460
  decorator: string
1478
- selection?: NonNullable<EditorSelection>
1461
+ offsets?: {
1462
+ anchor: BlockOffset_2
1463
+ focus: BlockOffset_2
1464
+ }
1479
1465
  }
1480
1466
  | {
1481
1467
  type: 'decorator.remove'
@@ -1619,18 +1605,6 @@ declare const editorMachine: StateMachine<
1619
1605
  type: 'style.toggle'
1620
1606
  style: string
1621
1607
  }
1622
- | {
1623
- type: 'text block.set'
1624
- at: [KeyedSegment]
1625
- level?: number
1626
- listItem?: string
1627
- style?: string
1628
- }
1629
- | {
1630
- type: 'text block.unset'
1631
- at: [KeyedSegment]
1632
- props: Array<'level' | 'listItem' | 'style'>
1633
- }
1634
1608
  | ({
1635
1609
  type: 'serialization.failure'
1636
1610
  mimeType: `${string}/${string}`
@@ -1810,9 +1784,9 @@ declare const editorMachine: StateMachine<
1810
1784
  }
1811
1785
  }
1812
1786
  | {
1813
- [props: string]: unknown
1814
1787
  type: 'block.set'
1815
1788
  at: [KeyedSegment]
1789
+ props: Record<string, unknown>
1816
1790
  }
1817
1791
  | {
1818
1792
  type: 'block.unset'
@@ -1831,7 +1805,10 @@ declare const editorMachine: StateMachine<
1831
1805
  | {
1832
1806
  type: 'decorator.add'
1833
1807
  decorator: string
1834
- selection?: NonNullable<EditorSelection>
1808
+ offsets?: {
1809
+ anchor: BlockOffset_2
1810
+ focus: BlockOffset_2
1811
+ }
1835
1812
  }
1836
1813
  | {
1837
1814
  type: 'decorator.remove'
@@ -1975,18 +1952,6 @@ declare const editorMachine: StateMachine<
1975
1952
  type: 'style.toggle'
1976
1953
  style: string
1977
1954
  }
1978
- | {
1979
- type: 'text block.set'
1980
- at: [KeyedSegment]
1981
- level?: number
1982
- listItem?: string
1983
- style?: string
1984
- }
1985
- | {
1986
- type: 'text block.unset'
1987
- at: [KeyedSegment]
1988
- props: Array<'level' | 'listItem' | 'style'>
1989
- }
1990
1955
  | ({
1991
1956
  type: 'serialization.failure'
1992
1957
  mimeType: `${string}/${string}`
@@ -2190,9 +2155,9 @@ declare const editorMachine: StateMachine<
2190
2155
  }
2191
2156
  }
2192
2157
  | {
2193
- [props: string]: unknown
2194
2158
  type: 'block.set'
2195
2159
  at: [KeyedSegment]
2160
+ props: Record<string, unknown>
2196
2161
  }
2197
2162
  | {
2198
2163
  type: 'block.unset'
@@ -2211,7 +2176,10 @@ declare const editorMachine: StateMachine<
2211
2176
  | {
2212
2177
  type: 'decorator.add'
2213
2178
  decorator: string
2214
- selection?: NonNullable<EditorSelection>
2179
+ offsets?: {
2180
+ anchor: BlockOffset_2
2181
+ focus: BlockOffset_2
2182
+ }
2215
2183
  }
2216
2184
  | {
2217
2185
  type: 'decorator.remove'
@@ -2355,18 +2323,6 @@ declare const editorMachine: StateMachine<
2355
2323
  type: 'style.toggle'
2356
2324
  style: string
2357
2325
  }
2358
- | {
2359
- type: 'text block.set'
2360
- at: [KeyedSegment]
2361
- level?: number
2362
- listItem?: string
2363
- style?: string
2364
- }
2365
- | {
2366
- type: 'text block.unset'
2367
- at: [KeyedSegment]
2368
- props: Array<'level' | 'listItem' | 'style'>
2369
- }
2370
2326
  | ({
2371
2327
  type: 'serialization.failure'
2372
2328
  mimeType: `${string}/${string}`
@@ -2544,9 +2500,9 @@ declare const editorMachine: StateMachine<
2544
2500
  }
2545
2501
  }
2546
2502
  | {
2547
- [props: string]: unknown
2548
2503
  type: 'block.set'
2549
2504
  at: [KeyedSegment]
2505
+ props: Record<string, unknown>
2550
2506
  }
2551
2507
  | {
2552
2508
  type: 'block.unset'
@@ -2565,7 +2521,10 @@ declare const editorMachine: StateMachine<
2565
2521
  | {
2566
2522
  type: 'decorator.add'
2567
2523
  decorator: string
2568
- selection?: NonNullable<EditorSelection>
2524
+ offsets?: {
2525
+ anchor: BlockOffset_2
2526
+ focus: BlockOffset_2
2527
+ }
2569
2528
  }
2570
2529
  | {
2571
2530
  type: 'decorator.remove'
@@ -2709,18 +2668,6 @@ declare const editorMachine: StateMachine<
2709
2668
  type: 'style.toggle'
2710
2669
  style: string
2711
2670
  }
2712
- | {
2713
- type: 'text block.set'
2714
- at: [KeyedSegment]
2715
- level?: number
2716
- listItem?: string
2717
- style?: string
2718
- }
2719
- | {
2720
- type: 'text block.unset'
2721
- at: [KeyedSegment]
2722
- props: Array<'level' | 'listItem' | 'style'>
2723
- }
2724
2671
  | ({
2725
2672
  type: 'serialization.failure'
2726
2673
  mimeType: `${string}/${string}`
@@ -2843,9 +2790,9 @@ declare const editorMachine: StateMachine<
2843
2790
  }
2844
2791
  }
2845
2792
  | {
2846
- [props: string]: unknown
2847
2793
  type: 'block.set'
2848
2794
  at: [KeyedSegment]
2795
+ props: Record<string, unknown>
2849
2796
  }
2850
2797
  | {
2851
2798
  type: 'block.unset'
@@ -2864,7 +2811,10 @@ declare const editorMachine: StateMachine<
2864
2811
  | {
2865
2812
  type: 'decorator.add'
2866
2813
  decorator: string
2867
- selection?: NonNullable<EditorSelection>
2814
+ offsets?: {
2815
+ anchor: BlockOffset_2
2816
+ focus: BlockOffset_2
2817
+ }
2868
2818
  }
2869
2819
  | {
2870
2820
  type: 'decorator.remove'
@@ -3008,18 +2958,6 @@ declare const editorMachine: StateMachine<
3008
2958
  type: 'style.toggle'
3009
2959
  style: string
3010
2960
  }
3011
- | {
3012
- type: 'text block.set'
3013
- at: [KeyedSegment]
3014
- level?: number
3015
- listItem?: string
3016
- style?: string
3017
- }
3018
- | {
3019
- type: 'text block.unset'
3020
- at: [KeyedSegment]
3021
- props: Array<'level' | 'listItem' | 'style'>
3022
- }
3023
2961
  | ({
3024
2962
  type: 'serialization.failure'
3025
2963
  mimeType: `${string}/${string}`
@@ -3197,9 +3135,9 @@ declare const editorMachine: StateMachine<
3197
3135
  }
3198
3136
  }
3199
3137
  | {
3200
- [props: string]: unknown
3201
3138
  type: 'block.set'
3202
3139
  at: [KeyedSegment]
3140
+ props: Record<string, unknown>
3203
3141
  }
3204
3142
  | {
3205
3143
  type: 'block.unset'
@@ -3218,7 +3156,10 @@ declare const editorMachine: StateMachine<
3218
3156
  | {
3219
3157
  type: 'decorator.add'
3220
3158
  decorator: string
3221
- selection?: NonNullable<EditorSelection>
3159
+ offsets?: {
3160
+ anchor: BlockOffset_2
3161
+ focus: BlockOffset_2
3162
+ }
3222
3163
  }
3223
3164
  | {
3224
3165
  type: 'decorator.remove'
@@ -3362,18 +3303,6 @@ declare const editorMachine: StateMachine<
3362
3303
  type: 'style.toggle'
3363
3304
  style: string
3364
3305
  }
3365
- | {
3366
- type: 'text block.set'
3367
- at: [KeyedSegment]
3368
- level?: number
3369
- listItem?: string
3370
- style?: string
3371
- }
3372
- | {
3373
- type: 'text block.unset'
3374
- at: [KeyedSegment]
3375
- props: Array<'level' | 'listItem' | 'style'>
3376
- }
3377
3306
  | ({
3378
3307
  type: 'serialization.failure'
3379
3308
  mimeType: `${string}/${string}`
@@ -3499,9 +3428,9 @@ declare const editorMachine: StateMachine<
3499
3428
  }
3500
3429
  }
3501
3430
  | {
3502
- [props: string]: unknown
3503
3431
  type: 'block.set'
3504
3432
  at: [KeyedSegment]
3433
+ props: Record<string, unknown>
3505
3434
  }
3506
3435
  | {
3507
3436
  type: 'block.unset'
@@ -3520,7 +3449,10 @@ declare const editorMachine: StateMachine<
3520
3449
  | {
3521
3450
  type: 'decorator.add'
3522
3451
  decorator: string
3523
- selection?: NonNullable<EditorSelection>
3452
+ offsets?: {
3453
+ anchor: BlockOffset_2
3454
+ focus: BlockOffset_2
3455
+ }
3524
3456
  }
3525
3457
  | {
3526
3458
  type: 'decorator.remove'
@@ -3664,18 +3596,6 @@ declare const editorMachine: StateMachine<
3664
3596
  type: 'style.toggle'
3665
3597
  style: string
3666
3598
  }
3667
- | {
3668
- type: 'text block.set'
3669
- at: [KeyedSegment]
3670
- level?: number
3671
- listItem?: string
3672
- style?: string
3673
- }
3674
- | {
3675
- type: 'text block.unset'
3676
- at: [KeyedSegment]
3677
- props: Array<'level' | 'listItem' | 'style'>
3678
- }
3679
3599
  | ({
3680
3600
  type: 'serialization.failure'
3681
3601
  mimeType: `${string}/${string}`
@@ -3853,9 +3773,9 @@ declare const editorMachine: StateMachine<
3853
3773
  }
3854
3774
  }
3855
3775
  | {
3856
- [props: string]: unknown
3857
3776
  type: 'block.set'
3858
3777
  at: [KeyedSegment]
3778
+ props: Record<string, unknown>
3859
3779
  }
3860
3780
  | {
3861
3781
  type: 'block.unset'
@@ -3874,7 +3794,10 @@ declare const editorMachine: StateMachine<
3874
3794
  | {
3875
3795
  type: 'decorator.add'
3876
3796
  decorator: string
3877
- selection?: NonNullable<EditorSelection>
3797
+ offsets?: {
3798
+ anchor: BlockOffset_2
3799
+ focus: BlockOffset_2
3800
+ }
3878
3801
  }
3879
3802
  | {
3880
3803
  type: 'decorator.remove'
@@ -4018,18 +3941,6 @@ declare const editorMachine: StateMachine<
4018
3941
  type: 'style.toggle'
4019
3942
  style: string
4020
3943
  }
4021
- | {
4022
- type: 'text block.set'
4023
- at: [KeyedSegment]
4024
- level?: number
4025
- listItem?: string
4026
- style?: string
4027
- }
4028
- | {
4029
- type: 'text block.unset'
4030
- at: [KeyedSegment]
4031
- props: Array<'level' | 'listItem' | 'style'>
4032
- }
4033
3944
  | ({
4034
3945
  type: 'serialization.failure'
4035
3946
  mimeType: `${string}/${string}`
@@ -4154,9 +4065,9 @@ declare const editorMachine: StateMachine<
4154
4065
  }
4155
4066
  }
4156
4067
  | {
4157
- [props: string]: unknown
4158
4068
  type: 'block.set'
4159
4069
  at: [KeyedSegment]
4070
+ props: Record<string, unknown>
4160
4071
  }
4161
4072
  | {
4162
4073
  type: 'block.unset'
@@ -4175,7 +4086,10 @@ declare const editorMachine: StateMachine<
4175
4086
  | {
4176
4087
  type: 'decorator.add'
4177
4088
  decorator: string
4178
- selection?: NonNullable<EditorSelection>
4089
+ offsets?: {
4090
+ anchor: BlockOffset_2
4091
+ focus: BlockOffset_2
4092
+ }
4179
4093
  }
4180
4094
  | {
4181
4095
  type: 'decorator.remove'
@@ -4319,18 +4233,6 @@ declare const editorMachine: StateMachine<
4319
4233
  type: 'style.toggle'
4320
4234
  style: string
4321
4235
  }
4322
- | {
4323
- type: 'text block.set'
4324
- at: [KeyedSegment]
4325
- level?: number
4326
- listItem?: string
4327
- style?: string
4328
- }
4329
- | {
4330
- type: 'text block.unset'
4331
- at: [KeyedSegment]
4332
- props: Array<'level' | 'listItem' | 'style'>
4333
- }
4334
4236
  | ({
4335
4237
  type: 'serialization.failure'
4336
4238
  mimeType: `${string}/${string}`
@@ -4508,9 +4410,9 @@ declare const editorMachine: StateMachine<
4508
4410
  }
4509
4411
  }
4510
4412
  | {
4511
- [props: string]: unknown
4512
4413
  type: 'block.set'
4513
4414
  at: [KeyedSegment]
4415
+ props: Record<string, unknown>
4514
4416
  }
4515
4417
  | {
4516
4418
  type: 'block.unset'
@@ -4529,7 +4431,10 @@ declare const editorMachine: StateMachine<
4529
4431
  | {
4530
4432
  type: 'decorator.add'
4531
4433
  decorator: string
4532
- selection?: NonNullable<EditorSelection>
4434
+ offsets?: {
4435
+ anchor: BlockOffset_2
4436
+ focus: BlockOffset_2
4437
+ }
4533
4438
  }
4534
4439
  | {
4535
4440
  type: 'decorator.remove'
@@ -4673,18 +4578,6 @@ declare const editorMachine: StateMachine<
4673
4578
  type: 'style.toggle'
4674
4579
  style: string
4675
4580
  }
4676
- | {
4677
- type: 'text block.set'
4678
- at: [KeyedSegment]
4679
- level?: number
4680
- listItem?: string
4681
- style?: string
4682
- }
4683
- | {
4684
- type: 'text block.unset'
4685
- at: [KeyedSegment]
4686
- props: Array<'level' | 'listItem' | 'style'>
4687
- }
4688
4581
  | ({
4689
4582
  type: 'serialization.failure'
4690
4583
  mimeType: `${string}/${string}`
@@ -4808,9 +4701,9 @@ declare const editorMachine: StateMachine<
4808
4701
  }
4809
4702
  }
4810
4703
  | {
4811
- [props: string]: unknown
4812
4704
  type: 'block.set'
4813
4705
  at: [KeyedSegment]
4706
+ props: Record<string, unknown>
4814
4707
  }
4815
4708
  | {
4816
4709
  type: 'block.unset'
@@ -4829,7 +4722,10 @@ declare const editorMachine: StateMachine<
4829
4722
  | {
4830
4723
  type: 'decorator.add'
4831
4724
  decorator: string
4832
- selection?: NonNullable<EditorSelection>
4725
+ offsets?: {
4726
+ anchor: BlockOffset_2
4727
+ focus: BlockOffset_2
4728
+ }
4833
4729
  }
4834
4730
  | {
4835
4731
  type: 'decorator.remove'
@@ -4973,18 +4869,6 @@ declare const editorMachine: StateMachine<
4973
4869
  type: 'style.toggle'
4974
4870
  style: string
4975
4871
  }
4976
- | {
4977
- type: 'text block.set'
4978
- at: [KeyedSegment]
4979
- level?: number
4980
- listItem?: string
4981
- style?: string
4982
- }
4983
- | {
4984
- type: 'text block.unset'
4985
- at: [KeyedSegment]
4986
- props: Array<'level' | 'listItem' | 'style'>
4987
- }
4988
4872
  | ({
4989
4873
  type: 'serialization.failure'
4990
4874
  mimeType: `${string}/${string}`
@@ -5162,9 +5046,9 @@ declare const editorMachine: StateMachine<
5162
5046
  }
5163
5047
  }
5164
5048
  | {
5165
- [props: string]: unknown
5166
5049
  type: 'block.set'
5167
5050
  at: [KeyedSegment]
5051
+ props: Record<string, unknown>
5168
5052
  }
5169
5053
  | {
5170
5054
  type: 'block.unset'
@@ -5183,7 +5067,10 @@ declare const editorMachine: StateMachine<
5183
5067
  | {
5184
5068
  type: 'decorator.add'
5185
5069
  decorator: string
5186
- selection?: NonNullable<EditorSelection>
5070
+ offsets?: {
5071
+ anchor: BlockOffset_2
5072
+ focus: BlockOffset_2
5073
+ }
5187
5074
  }
5188
5075
  | {
5189
5076
  type: 'decorator.remove'
@@ -5327,18 +5214,6 @@ declare const editorMachine: StateMachine<
5327
5214
  type: 'style.toggle'
5328
5215
  style: string
5329
5216
  }
5330
- | {
5331
- type: 'text block.set'
5332
- at: [KeyedSegment]
5333
- level?: number
5334
- listItem?: string
5335
- style?: string
5336
- }
5337
- | {
5338
- type: 'text block.unset'
5339
- at: [KeyedSegment]
5340
- props: Array<'level' | 'listItem' | 'style'>
5341
- }
5342
5217
  | ({
5343
5218
  type: 'serialization.failure'
5344
5219
  mimeType: `${string}/${string}`
@@ -5463,9 +5338,9 @@ declare const editorMachine: StateMachine<
5463
5338
  }
5464
5339
  }
5465
5340
  | {
5466
- [props: string]: unknown
5467
5341
  type: 'block.set'
5468
5342
  at: [KeyedSegment]
5343
+ props: Record<string, unknown>
5469
5344
  }
5470
5345
  | {
5471
5346
  type: 'block.unset'
@@ -5484,7 +5359,10 @@ declare const editorMachine: StateMachine<
5484
5359
  | {
5485
5360
  type: 'decorator.add'
5486
5361
  decorator: string
5487
- selection?: NonNullable<EditorSelection>
5362
+ offsets?: {
5363
+ anchor: BlockOffset_2
5364
+ focus: BlockOffset_2
5365
+ }
5488
5366
  }
5489
5367
  | {
5490
5368
  type: 'decorator.remove'
@@ -5628,18 +5506,6 @@ declare const editorMachine: StateMachine<
5628
5506
  type: 'style.toggle'
5629
5507
  style: string
5630
5508
  }
5631
- | {
5632
- type: 'text block.set'
5633
- at: [KeyedSegment]
5634
- level?: number
5635
- listItem?: string
5636
- style?: string
5637
- }
5638
- | {
5639
- type: 'text block.unset'
5640
- at: [KeyedSegment]
5641
- props: Array<'level' | 'listItem' | 'style'>
5642
- }
5643
5509
  | ({
5644
5510
  type: 'serialization.failure'
5645
5511
  mimeType: `${string}/${string}`
@@ -5835,9 +5701,9 @@ declare const editorMachine: StateMachine<
5835
5701
  }
5836
5702
  }
5837
5703
  | {
5838
- [props: string]: unknown
5839
5704
  type: 'block.set'
5840
5705
  at: [KeyedSegment]
5706
+ props: Record<string, unknown>
5841
5707
  }
5842
5708
  | {
5843
5709
  type: 'block.unset'
@@ -5856,7 +5722,10 @@ declare const editorMachine: StateMachine<
5856
5722
  | {
5857
5723
  type: 'decorator.add'
5858
5724
  decorator: string
5859
- selection?: NonNullable<EditorSelection>
5725
+ offsets?: {
5726
+ anchor: BlockOffset_2
5727
+ focus: BlockOffset_2
5728
+ }
5860
5729
  }
5861
5730
  | {
5862
5731
  type: 'decorator.remove'
@@ -6000,18 +5869,6 @@ declare const editorMachine: StateMachine<
6000
5869
  type: 'style.toggle'
6001
5870
  style: string
6002
5871
  }
6003
- | {
6004
- type: 'text block.set'
6005
- at: [KeyedSegment]
6006
- level?: number
6007
- listItem?: string
6008
- style?: string
6009
- }
6010
- | {
6011
- type: 'text block.unset'
6012
- at: [KeyedSegment]
6013
- props: Array<'level' | 'listItem' | 'style'>
6014
- }
6015
5872
  | ({
6016
5873
  type: 'serialization.failure'
6017
5874
  mimeType: `${string}/${string}`
@@ -6189,9 +6046,9 @@ declare const editorMachine: StateMachine<
6189
6046
  }
6190
6047
  }
6191
6048
  | {
6192
- [props: string]: unknown
6193
6049
  type: 'block.set'
6194
6050
  at: [KeyedSegment]
6051
+ props: Record<string, unknown>
6195
6052
  }
6196
6053
  | {
6197
6054
  type: 'block.unset'
@@ -6210,7 +6067,10 @@ declare const editorMachine: StateMachine<
6210
6067
  | {
6211
6068
  type: 'decorator.add'
6212
6069
  decorator: string
6213
- selection?: NonNullable<EditorSelection>
6070
+ offsets?: {
6071
+ anchor: BlockOffset_2
6072
+ focus: BlockOffset_2
6073
+ }
6214
6074
  }
6215
6075
  | {
6216
6076
  type: 'decorator.remove'
@@ -6354,18 +6214,6 @@ declare const editorMachine: StateMachine<
6354
6214
  type: 'style.toggle'
6355
6215
  style: string
6356
6216
  }
6357
- | {
6358
- type: 'text block.set'
6359
- at: [KeyedSegment]
6360
- level?: number
6361
- listItem?: string
6362
- style?: string
6363
- }
6364
- | {
6365
- type: 'text block.unset'
6366
- at: [KeyedSegment]
6367
- props: Array<'level' | 'listItem' | 'style'>
6368
- }
6369
6217
  | ({
6370
6218
  type: 'serialization.failure'
6371
6219
  mimeType: `${string}/${string}`
@@ -6490,9 +6338,9 @@ declare const editorMachine: StateMachine<
6490
6338
  }
6491
6339
  }
6492
6340
  | {
6493
- [props: string]: unknown
6494
6341
  type: 'block.set'
6495
6342
  at: [KeyedSegment]
6343
+ props: Record<string, unknown>
6496
6344
  }
6497
6345
  | {
6498
6346
  type: 'block.unset'
@@ -6511,7 +6359,10 @@ declare const editorMachine: StateMachine<
6511
6359
  | {
6512
6360
  type: 'decorator.add'
6513
6361
  decorator: string
6514
- selection?: NonNullable<EditorSelection>
6362
+ offsets?: {
6363
+ anchor: BlockOffset_2
6364
+ focus: BlockOffset_2
6365
+ }
6515
6366
  }
6516
6367
  | {
6517
6368
  type: 'decorator.remove'
@@ -6655,18 +6506,6 @@ declare const editorMachine: StateMachine<
6655
6506
  type: 'style.toggle'
6656
6507
  style: string
6657
6508
  }
6658
- | {
6659
- type: 'text block.set'
6660
- at: [KeyedSegment]
6661
- level?: number
6662
- listItem?: string
6663
- style?: string
6664
- }
6665
- | {
6666
- type: 'text block.unset'
6667
- at: [KeyedSegment]
6668
- props: Array<'level' | 'listItem' | 'style'>
6669
- }
6670
6509
  | ({
6671
6510
  type: 'serialization.failure'
6672
6511
  mimeType: `${string}/${string}`
@@ -6844,9 +6683,9 @@ declare const editorMachine: StateMachine<
6844
6683
  }
6845
6684
  }
6846
6685
  | {
6847
- [props: string]: unknown
6848
6686
  type: 'block.set'
6849
6687
  at: [KeyedSegment]
6688
+ props: Record<string, unknown>
6850
6689
  }
6851
6690
  | {
6852
6691
  type: 'block.unset'
@@ -6865,7 +6704,10 @@ declare const editorMachine: StateMachine<
6865
6704
  | {
6866
6705
  type: 'decorator.add'
6867
6706
  decorator: string
6868
- selection?: NonNullable<EditorSelection>
6707
+ offsets?: {
6708
+ anchor: BlockOffset_2
6709
+ focus: BlockOffset_2
6710
+ }
6869
6711
  }
6870
6712
  | {
6871
6713
  type: 'decorator.remove'
@@ -7009,18 +6851,6 @@ declare const editorMachine: StateMachine<
7009
6851
  type: 'style.toggle'
7010
6852
  style: string
7011
6853
  }
7012
- | {
7013
- type: 'text block.set'
7014
- at: [KeyedSegment]
7015
- level?: number
7016
- listItem?: string
7017
- style?: string
7018
- }
7019
- | {
7020
- type: 'text block.unset'
7021
- at: [KeyedSegment]
7022
- props: Array<'level' | 'listItem' | 'style'>
7023
- }
7024
6854
  | ({
7025
6855
  type: 'serialization.failure'
7026
6856
  mimeType: `${string}/${string}`
@@ -7143,9 +6973,9 @@ declare const editorMachine: StateMachine<
7143
6973
  }
7144
6974
  }
7145
6975
  | {
7146
- [props: string]: unknown
7147
6976
  type: 'block.set'
7148
6977
  at: [KeyedSegment]
6978
+ props: Record<string, unknown>
7149
6979
  }
7150
6980
  | {
7151
6981
  type: 'block.unset'
@@ -7164,7 +6994,10 @@ declare const editorMachine: StateMachine<
7164
6994
  | {
7165
6995
  type: 'decorator.add'
7166
6996
  decorator: string
7167
- selection?: NonNullable<EditorSelection>
6997
+ offsets?: {
6998
+ anchor: BlockOffset_2
6999
+ focus: BlockOffset_2
7000
+ }
7168
7001
  }
7169
7002
  | {
7170
7003
  type: 'decorator.remove'
@@ -7308,18 +7141,6 @@ declare const editorMachine: StateMachine<
7308
7141
  type: 'style.toggle'
7309
7142
  style: string
7310
7143
  }
7311
- | {
7312
- type: 'text block.set'
7313
- at: [KeyedSegment]
7314
- level?: number
7315
- listItem?: string
7316
- style?: string
7317
- }
7318
- | {
7319
- type: 'text block.unset'
7320
- at: [KeyedSegment]
7321
- props: Array<'level' | 'listItem' | 'style'>
7322
- }
7323
7144
  | ({
7324
7145
  type: 'serialization.failure'
7325
7146
  mimeType: `${string}/${string}`
@@ -7497,9 +7318,9 @@ declare const editorMachine: StateMachine<
7497
7318
  }
7498
7319
  }
7499
7320
  | {
7500
- [props: string]: unknown
7501
7321
  type: 'block.set'
7502
7322
  at: [KeyedSegment]
7323
+ props: Record<string, unknown>
7503
7324
  }
7504
7325
  | {
7505
7326
  type: 'block.unset'
@@ -7518,7 +7339,10 @@ declare const editorMachine: StateMachine<
7518
7339
  | {
7519
7340
  type: 'decorator.add'
7520
7341
  decorator: string
7521
- selection?: NonNullable<EditorSelection>
7342
+ offsets?: {
7343
+ anchor: BlockOffset_2
7344
+ focus: BlockOffset_2
7345
+ }
7522
7346
  }
7523
7347
  | {
7524
7348
  type: 'decorator.remove'
@@ -7662,18 +7486,6 @@ declare const editorMachine: StateMachine<
7662
7486
  type: 'style.toggle'
7663
7487
  style: string
7664
7488
  }
7665
- | {
7666
- type: 'text block.set'
7667
- at: [KeyedSegment]
7668
- level?: number
7669
- listItem?: string
7670
- style?: string
7671
- }
7672
- | {
7673
- type: 'text block.unset'
7674
- at: [KeyedSegment]
7675
- props: Array<'level' | 'listItem' | 'style'>
7676
- }
7677
7489
  | ({
7678
7490
  type: 'serialization.failure'
7679
7491
  mimeType: `${string}/${string}`
@@ -7797,9 +7609,9 @@ declare const editorMachine: StateMachine<
7797
7609
  }
7798
7610
  }
7799
7611
  | {
7800
- [props: string]: unknown
7801
7612
  type: 'block.set'
7802
7613
  at: [KeyedSegment]
7614
+ props: Record<string, unknown>
7803
7615
  }
7804
7616
  | {
7805
7617
  type: 'block.unset'
@@ -7818,7 +7630,10 @@ declare const editorMachine: StateMachine<
7818
7630
  | {
7819
7631
  type: 'decorator.add'
7820
7632
  decorator: string
7821
- selection?: NonNullable<EditorSelection>
7633
+ offsets?: {
7634
+ anchor: BlockOffset_2
7635
+ focus: BlockOffset_2
7636
+ }
7822
7637
  }
7823
7638
  | {
7824
7639
  type: 'decorator.remove'
@@ -7962,18 +7777,6 @@ declare const editorMachine: StateMachine<
7962
7777
  type: 'style.toggle'
7963
7778
  style: string
7964
7779
  }
7965
- | {
7966
- type: 'text block.set'
7967
- at: [KeyedSegment]
7968
- level?: number
7969
- listItem?: string
7970
- style?: string
7971
- }
7972
- | {
7973
- type: 'text block.unset'
7974
- at: [KeyedSegment]
7975
- props: Array<'level' | 'listItem' | 'style'>
7976
- }
7977
7780
  | ({
7978
7781
  type: 'serialization.failure'
7979
7782
  mimeType: `${string}/${string}`
@@ -8151,9 +7954,9 @@ declare const editorMachine: StateMachine<
8151
7954
  }
8152
7955
  }
8153
7956
  | {
8154
- [props: string]: unknown
8155
7957
  type: 'block.set'
8156
7958
  at: [KeyedSegment]
7959
+ props: Record<string, unknown>
8157
7960
  }
8158
7961
  | {
8159
7962
  type: 'block.unset'
@@ -8172,7 +7975,10 @@ declare const editorMachine: StateMachine<
8172
7975
  | {
8173
7976
  type: 'decorator.add'
8174
7977
  decorator: string
8175
- selection?: NonNullable<EditorSelection>
7978
+ offsets?: {
7979
+ anchor: BlockOffset_2
7980
+ focus: BlockOffset_2
7981
+ }
8176
7982
  }
8177
7983
  | {
8178
7984
  type: 'decorator.remove'
@@ -8316,18 +8122,6 @@ declare const editorMachine: StateMachine<
8316
8122
  type: 'style.toggle'
8317
8123
  style: string
8318
8124
  }
8319
- | {
8320
- type: 'text block.set'
8321
- at: [KeyedSegment]
8322
- level?: number
8323
- listItem?: string
8324
- style?: string
8325
- }
8326
- | {
8327
- type: 'text block.unset'
8328
- at: [KeyedSegment]
8329
- props: Array<'level' | 'listItem' | 'style'>
8330
- }
8331
8125
  | ({
8332
8126
  type: 'serialization.failure'
8333
8127
  mimeType: `${string}/${string}`
@@ -8454,9 +8248,9 @@ declare const editorMachine: StateMachine<
8454
8248
  }
8455
8249
  }
8456
8250
  | {
8457
- [props: string]: unknown
8458
8251
  type: 'block.set'
8459
8252
  at: [KeyedSegment]
8253
+ props: Record<string, unknown>
8460
8254
  }
8461
8255
  | {
8462
8256
  type: 'block.unset'
@@ -8475,7 +8269,10 @@ declare const editorMachine: StateMachine<
8475
8269
  | {
8476
8270
  type: 'decorator.add'
8477
8271
  decorator: string
8478
- selection?: NonNullable<EditorSelection>
8272
+ offsets?: {
8273
+ anchor: BlockOffset_2
8274
+ focus: BlockOffset_2
8275
+ }
8479
8276
  }
8480
8277
  | {
8481
8278
  type: 'decorator.remove'
@@ -8619,18 +8416,6 @@ declare const editorMachine: StateMachine<
8619
8416
  type: 'style.toggle'
8620
8417
  style: string
8621
8418
  }
8622
- | {
8623
- type: 'text block.set'
8624
- at: [KeyedSegment]
8625
- level?: number
8626
- listItem?: string
8627
- style?: string
8628
- }
8629
- | {
8630
- type: 'text block.unset'
8631
- at: [KeyedSegment]
8632
- props: Array<'level' | 'listItem' | 'style'>
8633
- }
8634
8419
  | ({
8635
8420
  type: 'serialization.failure'
8636
8421
  mimeType: `${string}/${string}`
@@ -8808,9 +8593,9 @@ declare const editorMachine: StateMachine<
8808
8593
  }
8809
8594
  }
8810
8595
  | {
8811
- [props: string]: unknown
8812
8596
  type: 'block.set'
8813
8597
  at: [KeyedSegment]
8598
+ props: Record<string, unknown>
8814
8599
  }
8815
8600
  | {
8816
8601
  type: 'block.unset'
@@ -8829,7 +8614,10 @@ declare const editorMachine: StateMachine<
8829
8614
  | {
8830
8615
  type: 'decorator.add'
8831
8616
  decorator: string
8832
- selection?: NonNullable<EditorSelection>
8617
+ offsets?: {
8618
+ anchor: BlockOffset_2
8619
+ focus: BlockOffset_2
8620
+ }
8833
8621
  }
8834
8622
  | {
8835
8623
  type: 'decorator.remove'
@@ -8973,18 +8761,6 @@ declare const editorMachine: StateMachine<
8973
8761
  type: 'style.toggle'
8974
8762
  style: string
8975
8763
  }
8976
- | {
8977
- type: 'text block.set'
8978
- at: [KeyedSegment]
8979
- level?: number
8980
- listItem?: string
8981
- style?: string
8982
- }
8983
- | {
8984
- type: 'text block.unset'
8985
- at: [KeyedSegment]
8986
- props: Array<'level' | 'listItem' | 'style'>
8987
- }
8988
8764
  | ({
8989
8765
  type: 'serialization.failure'
8990
8766
  mimeType: `${string}/${string}`
@@ -9111,9 +8887,9 @@ declare const editorMachine: StateMachine<
9111
8887
  }
9112
8888
  }
9113
8889
  | {
9114
- [props: string]: unknown
9115
8890
  type: 'block.set'
9116
8891
  at: [KeyedSegment]
8892
+ props: Record<string, unknown>
9117
8893
  }
9118
8894
  | {
9119
8895
  type: 'block.unset'
@@ -9132,7 +8908,10 @@ declare const editorMachine: StateMachine<
9132
8908
  | {
9133
8909
  type: 'decorator.add'
9134
8910
  decorator: string
9135
- selection?: NonNullable<EditorSelection>
8911
+ offsets?: {
8912
+ anchor: BlockOffset_2
8913
+ focus: BlockOffset_2
8914
+ }
9136
8915
  }
9137
8916
  | {
9138
8917
  type: 'decorator.remove'
@@ -9276,18 +9055,6 @@ declare const editorMachine: StateMachine<
9276
9055
  type: 'style.toggle'
9277
9056
  style: string
9278
9057
  }
9279
- | {
9280
- type: 'text block.set'
9281
- at: [KeyedSegment]
9282
- level?: number
9283
- listItem?: string
9284
- style?: string
9285
- }
9286
- | {
9287
- type: 'text block.unset'
9288
- at: [KeyedSegment]
9289
- props: Array<'level' | 'listItem' | 'style'>
9290
- }
9291
9058
  | ({
9292
9059
  type: 'serialization.failure'
9293
9060
  mimeType: `${string}/${string}`
@@ -9488,9 +9255,9 @@ declare const editorMachine: StateMachine<
9488
9255
  }
9489
9256
  }
9490
9257
  | {
9491
- [props: string]: unknown
9492
9258
  type: 'block.set'
9493
9259
  at: [KeyedSegment]
9260
+ props: Record<string, unknown>
9494
9261
  }
9495
9262
  | {
9496
9263
  type: 'block.unset'
@@ -9509,7 +9276,10 @@ declare const editorMachine: StateMachine<
9509
9276
  | {
9510
9277
  type: 'decorator.add'
9511
9278
  decorator: string
9512
- selection?: NonNullable<EditorSelection>
9279
+ offsets?: {
9280
+ anchor: BlockOffset_2
9281
+ focus: BlockOffset_2
9282
+ }
9513
9283
  }
9514
9284
  | {
9515
9285
  type: 'decorator.remove'
@@ -9653,18 +9423,6 @@ declare const editorMachine: StateMachine<
9653
9423
  type: 'style.toggle'
9654
9424
  style: string
9655
9425
  }
9656
- | {
9657
- type: 'text block.set'
9658
- at: [KeyedSegment]
9659
- level?: number
9660
- listItem?: string
9661
- style?: string
9662
- }
9663
- | {
9664
- type: 'text block.unset'
9665
- at: [KeyedSegment]
9666
- props: Array<'level' | 'listItem' | 'style'>
9667
- }
9668
9426
  | ({
9669
9427
  type: 'serialization.failure'
9670
9428
  mimeType: `${string}/${string}`
@@ -9862,9 +9620,9 @@ declare const editorMachine: StateMachine<
9862
9620
  }
9863
9621
  }
9864
9622
  | {
9865
- [props: string]: unknown
9866
9623
  type: 'block.set'
9867
9624
  at: [KeyedSegment]
9625
+ props: Record<string, unknown>
9868
9626
  }
9869
9627
  | {
9870
9628
  type: 'block.unset'
@@ -9883,7 +9641,10 @@ declare const editorMachine: StateMachine<
9883
9641
  | {
9884
9642
  type: 'decorator.add'
9885
9643
  decorator: string
9886
- selection?: NonNullable<EditorSelection>
9644
+ offsets?: {
9645
+ anchor: BlockOffset_2
9646
+ focus: BlockOffset_2
9647
+ }
9887
9648
  }
9888
9649
  | {
9889
9650
  type: 'decorator.remove'
@@ -10027,18 +9788,6 @@ declare const editorMachine: StateMachine<
10027
9788
  type: 'style.toggle'
10028
9789
  style: string
10029
9790
  }
10030
- | {
10031
- type: 'text block.set'
10032
- at: [KeyedSegment]
10033
- level?: number
10034
- listItem?: string
10035
- style?: string
10036
- }
10037
- | {
10038
- type: 'text block.unset'
10039
- at: [KeyedSegment]
10040
- props: Array<'level' | 'listItem' | 'style'>
10041
- }
10042
9791
  | ({
10043
9792
  type: 'serialization.failure'
10044
9793
  mimeType: `${string}/${string}`
@@ -10384,9 +10133,9 @@ declare const editorMachine: StateMachine<
10384
10133
  }
10385
10134
  }
10386
10135
  | {
10387
- [props: string]: unknown
10388
10136
  type: 'block.set'
10389
10137
  at: [KeyedSegment]
10138
+ props: Record<string, unknown>
10390
10139
  }
10391
10140
  | {
10392
10141
  type: 'block.unset'
@@ -10405,7 +10154,10 @@ declare const editorMachine: StateMachine<
10405
10154
  | {
10406
10155
  type: 'decorator.add'
10407
10156
  decorator: string
10408
- selection?: NonNullable<EditorSelection>
10157
+ offsets?: {
10158
+ anchor: BlockOffset_2
10159
+ focus: BlockOffset_2
10160
+ }
10409
10161
  }
10410
10162
  | {
10411
10163
  type: 'decorator.remove'
@@ -10549,18 +10301,6 @@ declare const editorMachine: StateMachine<
10549
10301
  type: 'style.toggle'
10550
10302
  style: string
10551
10303
  }
10552
- | {
10553
- type: 'text block.set'
10554
- at: [KeyedSegment]
10555
- level?: number
10556
- listItem?: string
10557
- style?: string
10558
- }
10559
- | {
10560
- type: 'text block.unset'
10561
- at: [KeyedSegment]
10562
- props: Array<'level' | 'listItem' | 'style'>
10563
- }
10564
10304
  | ({
10565
10305
  type: 'serialization.failure'
10566
10306
  mimeType: `${string}/${string}`
@@ -10740,9 +10480,9 @@ declare const editorMachine: StateMachine<
10740
10480
  }
10741
10481
  }
10742
10482
  | {
10743
- [props: string]: unknown
10744
10483
  type: 'block.set'
10745
10484
  at: [KeyedSegment]
10485
+ props: Record<string, unknown>
10746
10486
  }
10747
10487
  | {
10748
10488
  type: 'block.unset'
@@ -10761,7 +10501,10 @@ declare const editorMachine: StateMachine<
10761
10501
  | {
10762
10502
  type: 'decorator.add'
10763
10503
  decorator: string
10764
- selection?: NonNullable<EditorSelection>
10504
+ offsets?: {
10505
+ anchor: BlockOffset_2
10506
+ focus: BlockOffset_2
10507
+ }
10765
10508
  }
10766
10509
  | {
10767
10510
  type: 'decorator.remove'
@@ -10905,18 +10648,6 @@ declare const editorMachine: StateMachine<
10905
10648
  type: 'style.toggle'
10906
10649
  style: string
10907
10650
  }
10908
- | {
10909
- type: 'text block.set'
10910
- at: [KeyedSegment]
10911
- level?: number
10912
- listItem?: string
10913
- style?: string
10914
- }
10915
- | {
10916
- type: 'text block.unset'
10917
- at: [KeyedSegment]
10918
- props: Array<'level' | 'listItem' | 'style'>
10919
- }
10920
10651
  | ({
10921
10652
  type: 'serialization.failure'
10922
10653
  mimeType: `${string}/${string}`
@@ -11012,9 +10743,9 @@ declare const editorMachine: StateMachine<
11012
10743
  value: Array<PortableTextBlock> | undefined
11013
10744
  },
11014
10745
  | {
11015
- [props: string]: unknown
11016
10746
  type: 'block.set'
11017
10747
  at: [KeyedSegment]
10748
+ props: Record<string, unknown>
11018
10749
  }
11019
10750
  | {
11020
10751
  type: 'block.unset'
@@ -11046,9 +10777,9 @@ declare const editorMachine: StateMachine<
11046
10777
  }
11047
10778
  }
11048
10779
  | {
11049
- [props: string]: unknown
11050
10780
  type: 'block.set'
11051
10781
  at: [KeyedSegment]
10782
+ props: Record<string, unknown>
11052
10783
  }
11053
10784
  | {
11054
10785
  type: 'block.unset'
@@ -11067,7 +10798,10 @@ declare const editorMachine: StateMachine<
11067
10798
  | {
11068
10799
  type: 'decorator.add'
11069
10800
  decorator: string
11070
- selection?: NonNullable<EditorSelection>
10801
+ offsets?: {
10802
+ anchor: BlockOffset_2
10803
+ focus: BlockOffset_2
10804
+ }
11071
10805
  }
11072
10806
  | {
11073
10807
  type: 'decorator.remove'
@@ -11211,18 +10945,6 @@ declare const editorMachine: StateMachine<
11211
10945
  type: 'style.toggle'
11212
10946
  style: string
11213
10947
  }
11214
- | {
11215
- type: 'text block.set'
11216
- at: [KeyedSegment]
11217
- level?: number
11218
- listItem?: string
11219
- style?: string
11220
- }
11221
- | {
11222
- type: 'text block.unset'
11223
- at: [KeyedSegment]
11224
- props: Array<'level' | 'listItem' | 'style'>
11225
- }
11226
10948
  | ({
11227
10949
  type: 'serialization.failure'
11228
10950
  mimeType: `${string}/${string}`
@@ -11402,9 +11124,9 @@ declare const editorMachine: StateMachine<
11402
11124
  }
11403
11125
  }
11404
11126
  | {
11405
- [props: string]: unknown
11406
11127
  type: 'block.set'
11407
11128
  at: [KeyedSegment]
11129
+ props: Record<string, unknown>
11408
11130
  }
11409
11131
  | {
11410
11132
  type: 'block.unset'
@@ -11423,7 +11145,10 @@ declare const editorMachine: StateMachine<
11423
11145
  | {
11424
11146
  type: 'decorator.add'
11425
11147
  decorator: string
11426
- selection?: NonNullable<EditorSelection>
11148
+ offsets?: {
11149
+ anchor: BlockOffset_2
11150
+ focus: BlockOffset_2
11151
+ }
11427
11152
  }
11428
11153
  | {
11429
11154
  type: 'decorator.remove'
@@ -11567,18 +11292,6 @@ declare const editorMachine: StateMachine<
11567
11292
  type: 'style.toggle'
11568
11293
  style: string
11569
11294
  }
11570
- | {
11571
- type: 'text block.set'
11572
- at: [KeyedSegment]
11573
- level?: number
11574
- listItem?: string
11575
- style?: string
11576
- }
11577
- | {
11578
- type: 'text block.unset'
11579
- at: [KeyedSegment]
11580
- props: Array<'level' | 'listItem' | 'style'>
11581
- }
11582
11295
  | ({
11583
11296
  type: 'serialization.failure'
11584
11297
  mimeType: `${string}/${string}`
@@ -11701,9 +11414,9 @@ declare const editorMachine: StateMachine<
11701
11414
  }
11702
11415
  }
11703
11416
  | {
11704
- [props: string]: unknown
11705
11417
  type: 'block.set'
11706
11418
  at: [KeyedSegment]
11419
+ props: Record<string, unknown>
11707
11420
  }
11708
11421
  | {
11709
11422
  type: 'block.unset'
@@ -11722,7 +11435,10 @@ declare const editorMachine: StateMachine<
11722
11435
  | {
11723
11436
  type: 'decorator.add'
11724
11437
  decorator: string
11725
- selection?: NonNullable<EditorSelection>
11438
+ offsets?: {
11439
+ anchor: BlockOffset_2
11440
+ focus: BlockOffset_2
11441
+ }
11726
11442
  }
11727
11443
  | {
11728
11444
  type: 'decorator.remove'
@@ -11866,18 +11582,6 @@ declare const editorMachine: StateMachine<
11866
11582
  type: 'style.toggle'
11867
11583
  style: string
11868
11584
  }
11869
- | {
11870
- type: 'text block.set'
11871
- at: [KeyedSegment]
11872
- level?: number
11873
- listItem?: string
11874
- style?: string
11875
- }
11876
- | {
11877
- type: 'text block.unset'
11878
- at: [KeyedSegment]
11879
- props: Array<'level' | 'listItem' | 'style'>
11880
- }
11881
11585
  | ({
11882
11586
  type: 'serialization.failure'
11883
11587
  mimeType: `${string}/${string}`
@@ -12057,9 +11761,9 @@ declare const editorMachine: StateMachine<
12057
11761
  }
12058
11762
  }
12059
11763
  | {
12060
- [props: string]: unknown
12061
11764
  type: 'block.set'
12062
11765
  at: [KeyedSegment]
11766
+ props: Record<string, unknown>
12063
11767
  }
12064
11768
  | {
12065
11769
  type: 'block.unset'
@@ -12078,7 +11782,10 @@ declare const editorMachine: StateMachine<
12078
11782
  | {
12079
11783
  type: 'decorator.add'
12080
11784
  decorator: string
12081
- selection?: NonNullable<EditorSelection>
11785
+ offsets?: {
11786
+ anchor: BlockOffset_2
11787
+ focus: BlockOffset_2
11788
+ }
12082
11789
  }
12083
11790
  | {
12084
11791
  type: 'decorator.remove'
@@ -12222,18 +11929,6 @@ declare const editorMachine: StateMachine<
12222
11929
  type: 'style.toggle'
12223
11930
  style: string
12224
11931
  }
12225
- | {
12226
- type: 'text block.set'
12227
- at: [KeyedSegment]
12228
- level?: number
12229
- listItem?: string
12230
- style?: string
12231
- }
12232
- | {
12233
- type: 'text block.unset'
12234
- at: [KeyedSegment]
12235
- props: Array<'level' | 'listItem' | 'style'>
12236
- }
12237
11932
  | ({
12238
11933
  type: 'serialization.failure'
12239
11934
  mimeType: `${string}/${string}`
@@ -12356,9 +12051,9 @@ declare const editorMachine: StateMachine<
12356
12051
  }
12357
12052
  }
12358
12053
  | {
12359
- [props: string]: unknown
12360
12054
  type: 'block.set'
12361
12055
  at: [KeyedSegment]
12056
+ props: Record<string, unknown>
12362
12057
  }
12363
12058
  | {
12364
12059
  type: 'block.unset'
@@ -12377,7 +12072,10 @@ declare const editorMachine: StateMachine<
12377
12072
  | {
12378
12073
  type: 'decorator.add'
12379
12074
  decorator: string
12380
- selection?: NonNullable<EditorSelection>
12075
+ offsets?: {
12076
+ anchor: BlockOffset_2
12077
+ focus: BlockOffset_2
12078
+ }
12381
12079
  }
12382
12080
  | {
12383
12081
  type: 'decorator.remove'
@@ -12521,18 +12219,6 @@ declare const editorMachine: StateMachine<
12521
12219
  type: 'style.toggle'
12522
12220
  style: string
12523
12221
  }
12524
- | {
12525
- type: 'text block.set'
12526
- at: [KeyedSegment]
12527
- level?: number
12528
- listItem?: string
12529
- style?: string
12530
- }
12531
- | {
12532
- type: 'text block.unset'
12533
- at: [KeyedSegment]
12534
- props: Array<'level' | 'listItem' | 'style'>
12535
- }
12536
12222
  | ({
12537
12223
  type: 'serialization.failure'
12538
12224
  mimeType: `${string}/${string}`
@@ -12712,9 +12398,9 @@ declare const editorMachine: StateMachine<
12712
12398
  }
12713
12399
  }
12714
12400
  | {
12715
- [props: string]: unknown
12716
12401
  type: 'block.set'
12717
12402
  at: [KeyedSegment]
12403
+ props: Record<string, unknown>
12718
12404
  }
12719
12405
  | {
12720
12406
  type: 'block.unset'
@@ -12733,7 +12419,10 @@ declare const editorMachine: StateMachine<
12733
12419
  | {
12734
12420
  type: 'decorator.add'
12735
12421
  decorator: string
12736
- selection?: NonNullable<EditorSelection>
12422
+ offsets?: {
12423
+ anchor: BlockOffset_2
12424
+ focus: BlockOffset_2
12425
+ }
12737
12426
  }
12738
12427
  | {
12739
12428
  type: 'decorator.remove'
@@ -12877,18 +12566,6 @@ declare const editorMachine: StateMachine<
12877
12566
  type: 'style.toggle'
12878
12567
  style: string
12879
12568
  }
12880
- | {
12881
- type: 'text block.set'
12882
- at: [KeyedSegment]
12883
- level?: number
12884
- listItem?: string
12885
- style?: string
12886
- }
12887
- | {
12888
- type: 'text block.unset'
12889
- at: [KeyedSegment]
12890
- props: Array<'level' | 'listItem' | 'style'>
12891
- }
12892
12569
  | ({
12893
12570
  type: 'serialization.failure'
12894
12571
  mimeType: `${string}/${string}`
@@ -12986,7 +12663,10 @@ declare const editorMachine: StateMachine<
12986
12663
  | {
12987
12664
  type: 'decorator.add'
12988
12665
  decorator: string
12989
- selection?: NonNullable<EditorSelection>
12666
+ offsets?: {
12667
+ anchor: BlockOffset_2
12668
+ focus: BlockOffset_2
12669
+ }
12990
12670
  }
12991
12671
  | {
12992
12672
  type: 'decorator.remove'
@@ -13021,9 +12701,9 @@ declare const editorMachine: StateMachine<
13021
12701
  }
13022
12702
  }
13023
12703
  | {
13024
- [props: string]: unknown
13025
12704
  type: 'block.set'
13026
12705
  at: [KeyedSegment]
12706
+ props: Record<string, unknown>
13027
12707
  }
13028
12708
  | {
13029
12709
  type: 'block.unset'
@@ -13042,7 +12722,10 @@ declare const editorMachine: StateMachine<
13042
12722
  | {
13043
12723
  type: 'decorator.add'
13044
12724
  decorator: string
13045
- selection?: NonNullable<EditorSelection>
12725
+ offsets?: {
12726
+ anchor: BlockOffset_2
12727
+ focus: BlockOffset_2
12728
+ }
13046
12729
  }
13047
12730
  | {
13048
12731
  type: 'decorator.remove'
@@ -13186,18 +12869,6 @@ declare const editorMachine: StateMachine<
13186
12869
  type: 'style.toggle'
13187
12870
  style: string
13188
12871
  }
13189
- | {
13190
- type: 'text block.set'
13191
- at: [KeyedSegment]
13192
- level?: number
13193
- listItem?: string
13194
- style?: string
13195
- }
13196
- | {
13197
- type: 'text block.unset'
13198
- at: [KeyedSegment]
13199
- props: Array<'level' | 'listItem' | 'style'>
13200
- }
13201
12872
  | ({
13202
12873
  type: 'serialization.failure'
13203
12874
  mimeType: `${string}/${string}`
@@ -13377,9 +13048,9 @@ declare const editorMachine: StateMachine<
13377
13048
  }
13378
13049
  }
13379
13050
  | {
13380
- [props: string]: unknown
13381
13051
  type: 'block.set'
13382
13052
  at: [KeyedSegment]
13053
+ props: Record<string, unknown>
13383
13054
  }
13384
13055
  | {
13385
13056
  type: 'block.unset'
@@ -13398,7 +13069,10 @@ declare const editorMachine: StateMachine<
13398
13069
  | {
13399
13070
  type: 'decorator.add'
13400
13071
  decorator: string
13401
- selection?: NonNullable<EditorSelection>
13072
+ offsets?: {
13073
+ anchor: BlockOffset_2
13074
+ focus: BlockOffset_2
13075
+ }
13402
13076
  }
13403
13077
  | {
13404
13078
  type: 'decorator.remove'
@@ -13542,18 +13216,6 @@ declare const editorMachine: StateMachine<
13542
13216
  type: 'style.toggle'
13543
13217
  style: string
13544
13218
  }
13545
- | {
13546
- type: 'text block.set'
13547
- at: [KeyedSegment]
13548
- level?: number
13549
- listItem?: string
13550
- style?: string
13551
- }
13552
- | {
13553
- type: 'text block.unset'
13554
- at: [KeyedSegment]
13555
- props: Array<'level' | 'listItem' | 'style'>
13556
- }
13557
13219
  | ({
13558
13220
  type: 'serialization.failure'
13559
13221
  mimeType: `${string}/${string}`
@@ -13690,9 +13352,9 @@ declare const editorMachine: StateMachine<
13690
13352
  }
13691
13353
  }
13692
13354
  | {
13693
- [props: string]: unknown
13694
13355
  type: 'block.set'
13695
13356
  at: [KeyedSegment]
13357
+ props: Record<string, unknown>
13696
13358
  }
13697
13359
  | {
13698
13360
  type: 'block.unset'
@@ -13711,7 +13373,10 @@ declare const editorMachine: StateMachine<
13711
13373
  | {
13712
13374
  type: 'decorator.add'
13713
13375
  decorator: string
13714
- selection?: NonNullable<EditorSelection>
13376
+ offsets?: {
13377
+ anchor: BlockOffset_2
13378
+ focus: BlockOffset_2
13379
+ }
13715
13380
  }
13716
13381
  | {
13717
13382
  type: 'decorator.remove'
@@ -13855,18 +13520,6 @@ declare const editorMachine: StateMachine<
13855
13520
  type: 'style.toggle'
13856
13521
  style: string
13857
13522
  }
13858
- | {
13859
- type: 'text block.set'
13860
- at: [KeyedSegment]
13861
- level?: number
13862
- listItem?: string
13863
- style?: string
13864
- }
13865
- | {
13866
- type: 'text block.unset'
13867
- at: [KeyedSegment]
13868
- props: Array<'level' | 'listItem' | 'style'>
13869
- }
13870
13523
  | ({
13871
13524
  type: 'serialization.failure'
13872
13525
  mimeType: `${string}/${string}`
@@ -14046,9 +13699,9 @@ declare const editorMachine: StateMachine<
14046
13699
  }
14047
13700
  }
14048
13701
  | {
14049
- [props: string]: unknown
14050
13702
  type: 'block.set'
14051
13703
  at: [KeyedSegment]
13704
+ props: Record<string, unknown>
14052
13705
  }
14053
13706
  | {
14054
13707
  type: 'block.unset'
@@ -14067,7 +13720,10 @@ declare const editorMachine: StateMachine<
14067
13720
  | {
14068
13721
  type: 'decorator.add'
14069
13722
  decorator: string
14070
- selection?: NonNullable<EditorSelection>
13723
+ offsets?: {
13724
+ anchor: BlockOffset_2
13725
+ focus: BlockOffset_2
13726
+ }
14071
13727
  }
14072
13728
  | {
14073
13729
  type: 'decorator.remove'
@@ -14211,18 +13867,6 @@ declare const editorMachine: StateMachine<
14211
13867
  type: 'style.toggle'
14212
13868
  style: string
14213
13869
  }
14214
- | {
14215
- type: 'text block.set'
14216
- at: [KeyedSegment]
14217
- level?: number
14218
- listItem?: string
14219
- style?: string
14220
- }
14221
- | {
14222
- type: 'text block.unset'
14223
- at: [KeyedSegment]
14224
- props: Array<'level' | 'listItem' | 'style'>
14225
- }
14226
13870
  | ({
14227
13871
  type: 'serialization.failure'
14228
13872
  mimeType: `${string}/${string}`
@@ -14345,9 +13989,9 @@ declare const editorMachine: StateMachine<
14345
13989
  }
14346
13990
  }
14347
13991
  | {
14348
- [props: string]: unknown
14349
13992
  type: 'block.set'
14350
13993
  at: [KeyedSegment]
13994
+ props: Record<string, unknown>
14351
13995
  }
14352
13996
  | {
14353
13997
  type: 'block.unset'
@@ -14366,7 +14010,10 @@ declare const editorMachine: StateMachine<
14366
14010
  | {
14367
14011
  type: 'decorator.add'
14368
14012
  decorator: string
14369
- selection?: NonNullable<EditorSelection>
14013
+ offsets?: {
14014
+ anchor: BlockOffset_2
14015
+ focus: BlockOffset_2
14016
+ }
14370
14017
  }
14371
14018
  | {
14372
14019
  type: 'decorator.remove'
@@ -14510,18 +14157,6 @@ declare const editorMachine: StateMachine<
14510
14157
  type: 'style.toggle'
14511
14158
  style: string
14512
14159
  }
14513
- | {
14514
- type: 'text block.set'
14515
- at: [KeyedSegment]
14516
- level?: number
14517
- listItem?: string
14518
- style?: string
14519
- }
14520
- | {
14521
- type: 'text block.unset'
14522
- at: [KeyedSegment]
14523
- props: Array<'level' | 'listItem' | 'style'>
14524
- }
14525
14160
  | ({
14526
14161
  type: 'serialization.failure'
14527
14162
  mimeType: `${string}/${string}`
@@ -14701,9 +14336,9 @@ declare const editorMachine: StateMachine<
14701
14336
  }
14702
14337
  }
14703
14338
  | {
14704
- [props: string]: unknown
14705
14339
  type: 'block.set'
14706
14340
  at: [KeyedSegment]
14341
+ props: Record<string, unknown>
14707
14342
  }
14708
14343
  | {
14709
14344
  type: 'block.unset'
@@ -14722,7 +14357,10 @@ declare const editorMachine: StateMachine<
14722
14357
  | {
14723
14358
  type: 'decorator.add'
14724
14359
  decorator: string
14725
- selection?: NonNullable<EditorSelection>
14360
+ offsets?: {
14361
+ anchor: BlockOffset_2
14362
+ focus: BlockOffset_2
14363
+ }
14726
14364
  }
14727
14365
  | {
14728
14366
  type: 'decorator.remove'
@@ -14866,18 +14504,6 @@ declare const editorMachine: StateMachine<
14866
14504
  type: 'style.toggle'
14867
14505
  style: string
14868
14506
  }
14869
- | {
14870
- type: 'text block.set'
14871
- at: [KeyedSegment]
14872
- level?: number
14873
- listItem?: string
14874
- style?: string
14875
- }
14876
- | {
14877
- type: 'text block.unset'
14878
- at: [KeyedSegment]
14879
- props: Array<'level' | 'listItem' | 'style'>
14880
- }
14881
14507
  | ({
14882
14508
  type: 'serialization.failure'
14883
14509
  mimeType: `${string}/${string}`
@@ -15003,9 +14629,9 @@ declare const editorMachine: StateMachine<
15003
14629
  }
15004
14630
  }
15005
14631
  | {
15006
- [props: string]: unknown
15007
14632
  type: 'block.set'
15008
14633
  at: [KeyedSegment]
14634
+ props: Record<string, unknown>
15009
14635
  }
15010
14636
  | {
15011
14637
  type: 'block.unset'
@@ -15024,7 +14650,10 @@ declare const editorMachine: StateMachine<
15024
14650
  | {
15025
14651
  type: 'decorator.add'
15026
14652
  decorator: string
15027
- selection?: NonNullable<EditorSelection>
14653
+ offsets?: {
14654
+ anchor: BlockOffset_2
14655
+ focus: BlockOffset_2
14656
+ }
15028
14657
  }
15029
14658
  | {
15030
14659
  type: 'decorator.remove'
@@ -15168,18 +14797,6 @@ declare const editorMachine: StateMachine<
15168
14797
  type: 'style.toggle'
15169
14798
  style: string
15170
14799
  }
15171
- | {
15172
- type: 'text block.set'
15173
- at: [KeyedSegment]
15174
- level?: number
15175
- listItem?: string
15176
- style?: string
15177
- }
15178
- | {
15179
- type: 'text block.unset'
15180
- at: [KeyedSegment]
15181
- props: Array<'level' | 'listItem' | 'style'>
15182
- }
15183
14800
  | ({
15184
14801
  type: 'serialization.failure'
15185
14802
  mimeType: `${string}/${string}`
@@ -15359,9 +14976,9 @@ declare const editorMachine: StateMachine<
15359
14976
  }
15360
14977
  }
15361
14978
  | {
15362
- [props: string]: unknown
15363
14979
  type: 'block.set'
15364
14980
  at: [KeyedSegment]
14981
+ props: Record<string, unknown>
15365
14982
  }
15366
14983
  | {
15367
14984
  type: 'block.unset'
@@ -15380,7 +14997,10 @@ declare const editorMachine: StateMachine<
15380
14997
  | {
15381
14998
  type: 'decorator.add'
15382
14999
  decorator: string
15383
- selection?: NonNullable<EditorSelection>
15000
+ offsets?: {
15001
+ anchor: BlockOffset_2
15002
+ focus: BlockOffset_2
15003
+ }
15384
15004
  }
15385
15005
  | {
15386
15006
  type: 'decorator.remove'
@@ -15524,18 +15144,6 @@ declare const editorMachine: StateMachine<
15524
15144
  type: 'style.toggle'
15525
15145
  style: string
15526
15146
  }
15527
- | {
15528
- type: 'text block.set'
15529
- at: [KeyedSegment]
15530
- level?: number
15531
- listItem?: string
15532
- style?: string
15533
- }
15534
- | {
15535
- type: 'text block.unset'
15536
- at: [KeyedSegment]
15537
- props: Array<'level' | 'listItem' | 'style'>
15538
- }
15539
15147
  | ({
15540
15148
  type: 'serialization.failure'
15541
15149
  mimeType: `${string}/${string}`
@@ -15712,9 +15320,9 @@ declare const editorMachine: StateMachine<
15712
15320
  }
15713
15321
  }
15714
15322
  | {
15715
- [props: string]: unknown
15716
15323
  type: 'block.set'
15717
15324
  at: [KeyedSegment]
15325
+ props: Record<string, unknown>
15718
15326
  }
15719
15327
  | {
15720
15328
  type: 'block.unset'
@@ -15733,7 +15341,10 @@ declare const editorMachine: StateMachine<
15733
15341
  | {
15734
15342
  type: 'decorator.add'
15735
15343
  decorator: string
15736
- selection?: NonNullable<EditorSelection>
15344
+ offsets?: {
15345
+ anchor: BlockOffset_2
15346
+ focus: BlockOffset_2
15347
+ }
15737
15348
  }
15738
15349
  | {
15739
15350
  type: 'decorator.remove'
@@ -15877,18 +15488,6 @@ declare const editorMachine: StateMachine<
15877
15488
  type: 'style.toggle'
15878
15489
  style: string
15879
15490
  }
15880
- | {
15881
- type: 'text block.set'
15882
- at: [KeyedSegment]
15883
- level?: number
15884
- listItem?: string
15885
- style?: string
15886
- }
15887
- | {
15888
- type: 'text block.unset'
15889
- at: [KeyedSegment]
15890
- props: Array<'level' | 'listItem' | 'style'>
15891
- }
15892
15491
  | ({
15893
15492
  type: 'serialization.failure'
15894
15493
  mimeType: `${string}/${string}`
@@ -16068,9 +15667,9 @@ declare const editorMachine: StateMachine<
16068
15667
  }
16069
15668
  }
16070
15669
  | {
16071
- [props: string]: unknown
16072
15670
  type: 'block.set'
16073
15671
  at: [KeyedSegment]
15672
+ props: Record<string, unknown>
16074
15673
  }
16075
15674
  | {
16076
15675
  type: 'block.unset'
@@ -16089,7 +15688,10 @@ declare const editorMachine: StateMachine<
16089
15688
  | {
16090
15689
  type: 'decorator.add'
16091
15690
  decorator: string
16092
- selection?: NonNullable<EditorSelection>
15691
+ offsets?: {
15692
+ anchor: BlockOffset_2
15693
+ focus: BlockOffset_2
15694
+ }
16093
15695
  }
16094
15696
  | {
16095
15697
  type: 'decorator.remove'
@@ -16233,18 +15835,6 @@ declare const editorMachine: StateMachine<
16233
15835
  type: 'style.toggle'
16234
15836
  style: string
16235
15837
  }
16236
- | {
16237
- type: 'text block.set'
16238
- at: [KeyedSegment]
16239
- level?: number
16240
- listItem?: string
16241
- style?: string
16242
- }
16243
- | {
16244
- type: 'text block.unset'
16245
- at: [KeyedSegment]
16246
- props: Array<'level' | 'listItem' | 'style'>
16247
- }
16248
15838
  | ({
16249
15839
  type: 'serialization.failure'
16250
15840
  mimeType: `${string}/${string}`
@@ -16376,9 +15966,9 @@ declare const editorMachine: StateMachine<
16376
15966
  }
16377
15967
  }
16378
15968
  | {
16379
- [props: string]: unknown
16380
15969
  type: 'block.set'
16381
15970
  at: [KeyedSegment]
15971
+ props: Record<string, unknown>
16382
15972
  }
16383
15973
  | {
16384
15974
  type: 'block.unset'
@@ -16397,7 +15987,10 @@ declare const editorMachine: StateMachine<
16397
15987
  | {
16398
15988
  type: 'decorator.add'
16399
15989
  decorator: string
16400
- selection?: NonNullable<EditorSelection>
15990
+ offsets?: {
15991
+ anchor: BlockOffset_2
15992
+ focus: BlockOffset_2
15993
+ }
16401
15994
  }
16402
15995
  | {
16403
15996
  type: 'decorator.remove'
@@ -16541,18 +16134,6 @@ declare const editorMachine: StateMachine<
16541
16134
  type: 'style.toggle'
16542
16135
  style: string
16543
16136
  }
16544
- | {
16545
- type: 'text block.set'
16546
- at: [KeyedSegment]
16547
- level?: number
16548
- listItem?: string
16549
- style?: string
16550
- }
16551
- | {
16552
- type: 'text block.unset'
16553
- at: [KeyedSegment]
16554
- props: Array<'level' | 'listItem' | 'style'>
16555
- }
16556
16137
  | ({
16557
16138
  type: 'serialization.failure'
16558
16139
  mimeType: `${string}/${string}`
@@ -16732,9 +16313,9 @@ declare const editorMachine: StateMachine<
16732
16313
  }
16733
16314
  }
16734
16315
  | {
16735
- [props: string]: unknown
16736
16316
  type: 'block.set'
16737
16317
  at: [KeyedSegment]
16318
+ props: Record<string, unknown>
16738
16319
  }
16739
16320
  | {
16740
16321
  type: 'block.unset'
@@ -16753,7 +16334,10 @@ declare const editorMachine: StateMachine<
16753
16334
  | {
16754
16335
  type: 'decorator.add'
16755
16336
  decorator: string
16756
- selection?: NonNullable<EditorSelection>
16337
+ offsets?: {
16338
+ anchor: BlockOffset_2
16339
+ focus: BlockOffset_2
16340
+ }
16757
16341
  }
16758
16342
  | {
16759
16343
  type: 'decorator.remove'
@@ -16897,18 +16481,6 @@ declare const editorMachine: StateMachine<
16897
16481
  type: 'style.toggle'
16898
16482
  style: string
16899
16483
  }
16900
- | {
16901
- type: 'text block.set'
16902
- at: [KeyedSegment]
16903
- level?: number
16904
- listItem?: string
16905
- style?: string
16906
- }
16907
- | {
16908
- type: 'text block.unset'
16909
- at: [KeyedSegment]
16910
- props: Array<'level' | 'listItem' | 'style'>
16911
- }
16912
16484
  | ({
16913
16485
  type: 'serialization.failure'
16914
16486
  mimeType: `${string}/${string}`
@@ -17041,9 +16613,9 @@ declare const editorMachine: StateMachine<
17041
16613
  }
17042
16614
  }
17043
16615
  | {
17044
- [props: string]: unknown
17045
16616
  type: 'block.set'
17046
16617
  at: [KeyedSegment]
16618
+ props: Record<string, unknown>
17047
16619
  }
17048
16620
  | {
17049
16621
  type: 'block.unset'
@@ -17062,7 +16634,10 @@ declare const editorMachine: StateMachine<
17062
16634
  | {
17063
16635
  type: 'decorator.add'
17064
16636
  decorator: string
17065
- selection?: NonNullable<EditorSelection>
16637
+ offsets?: {
16638
+ anchor: BlockOffset_2
16639
+ focus: BlockOffset_2
16640
+ }
17066
16641
  }
17067
16642
  | {
17068
16643
  type: 'decorator.remove'
@@ -17206,18 +16781,6 @@ declare const editorMachine: StateMachine<
17206
16781
  type: 'style.toggle'
17207
16782
  style: string
17208
16783
  }
17209
- | {
17210
- type: 'text block.set'
17211
- at: [KeyedSegment]
17212
- level?: number
17213
- listItem?: string
17214
- style?: string
17215
- }
17216
- | {
17217
- type: 'text block.unset'
17218
- at: [KeyedSegment]
17219
- props: Array<'level' | 'listItem' | 'style'>
17220
- }
17221
16784
  | ({
17222
16785
  type: 'serialization.failure'
17223
16786
  mimeType: `${string}/${string}`
@@ -17397,9 +16960,9 @@ declare const editorMachine: StateMachine<
17397
16960
  }
17398
16961
  }
17399
16962
  | {
17400
- [props: string]: unknown
17401
16963
  type: 'block.set'
17402
16964
  at: [KeyedSegment]
16965
+ props: Record<string, unknown>
17403
16966
  }
17404
16967
  | {
17405
16968
  type: 'block.unset'
@@ -17418,7 +16981,10 @@ declare const editorMachine: StateMachine<
17418
16981
  | {
17419
16982
  type: 'decorator.add'
17420
16983
  decorator: string
17421
- selection?: NonNullable<EditorSelection>
16984
+ offsets?: {
16985
+ anchor: BlockOffset_2
16986
+ focus: BlockOffset_2
16987
+ }
17422
16988
  }
17423
16989
  | {
17424
16990
  type: 'decorator.remove'
@@ -17562,18 +17128,6 @@ declare const editorMachine: StateMachine<
17562
17128
  type: 'style.toggle'
17563
17129
  style: string
17564
17130
  }
17565
- | {
17566
- type: 'text block.set'
17567
- at: [KeyedSegment]
17568
- level?: number
17569
- listItem?: string
17570
- style?: string
17571
- }
17572
- | {
17573
- type: 'text block.unset'
17574
- at: [KeyedSegment]
17575
- props: Array<'level' | 'listItem' | 'style'>
17576
- }
17577
17131
  | ({
17578
17132
  type: 'serialization.failure'
17579
17133
  mimeType: `${string}/${string}`
@@ -17697,9 +17251,9 @@ declare const editorMachine: StateMachine<
17697
17251
  }
17698
17252
  }
17699
17253
  | {
17700
- [props: string]: unknown
17701
17254
  type: 'block.set'
17702
17255
  at: [KeyedSegment]
17256
+ props: Record<string, unknown>
17703
17257
  }
17704
17258
  | {
17705
17259
  type: 'block.unset'
@@ -17718,7 +17272,10 @@ declare const editorMachine: StateMachine<
17718
17272
  | {
17719
17273
  type: 'decorator.add'
17720
17274
  decorator: string
17721
- selection?: NonNullable<EditorSelection>
17275
+ offsets?: {
17276
+ anchor: BlockOffset_2
17277
+ focus: BlockOffset_2
17278
+ }
17722
17279
  }
17723
17280
  | {
17724
17281
  type: 'decorator.remove'
@@ -17862,18 +17419,6 @@ declare const editorMachine: StateMachine<
17862
17419
  type: 'style.toggle'
17863
17420
  style: string
17864
17421
  }
17865
- | {
17866
- type: 'text block.set'
17867
- at: [KeyedSegment]
17868
- level?: number
17869
- listItem?: string
17870
- style?: string
17871
- }
17872
- | {
17873
- type: 'text block.unset'
17874
- at: [KeyedSegment]
17875
- props: Array<'level' | 'listItem' | 'style'>
17876
- }
17877
17422
  | ({
17878
17423
  type: 'serialization.failure'
17879
17424
  mimeType: `${string}/${string}`
@@ -18053,9 +17598,9 @@ declare const editorMachine: StateMachine<
18053
17598
  }
18054
17599
  }
18055
17600
  | {
18056
- [props: string]: unknown
18057
17601
  type: 'block.set'
18058
17602
  at: [KeyedSegment]
17603
+ props: Record<string, unknown>
18059
17604
  }
18060
17605
  | {
18061
17606
  type: 'block.unset'
@@ -18074,7 +17619,10 @@ declare const editorMachine: StateMachine<
18074
17619
  | {
18075
17620
  type: 'decorator.add'
18076
17621
  decorator: string
18077
- selection?: NonNullable<EditorSelection>
17622
+ offsets?: {
17623
+ anchor: BlockOffset_2
17624
+ focus: BlockOffset_2
17625
+ }
18078
17626
  }
18079
17627
  | {
18080
17628
  type: 'decorator.remove'
@@ -18218,18 +17766,6 @@ declare const editorMachine: StateMachine<
18218
17766
  type: 'style.toggle'
18219
17767
  style: string
18220
17768
  }
18221
- | {
18222
- type: 'text block.set'
18223
- at: [KeyedSegment]
18224
- level?: number
18225
- listItem?: string
18226
- style?: string
18227
- }
18228
- | {
18229
- type: 'text block.unset'
18230
- at: [KeyedSegment]
18231
- props: Array<'level' | 'listItem' | 'style'>
18232
- }
18233
17769
  | ({
18234
17770
  type: 'serialization.failure'
18235
17771
  mimeType: `${string}/${string}`
@@ -18355,9 +17891,9 @@ declare const editorMachine: StateMachine<
18355
17891
  }
18356
17892
  }
18357
17893
  | {
18358
- [props: string]: unknown
18359
17894
  type: 'block.set'
18360
17895
  at: [KeyedSegment]
17896
+ props: Record<string, unknown>
18361
17897
  }
18362
17898
  | {
18363
17899
  type: 'block.unset'
@@ -18376,7 +17912,10 @@ declare const editorMachine: StateMachine<
18376
17912
  | {
18377
17913
  type: 'decorator.add'
18378
17914
  decorator: string
18379
- selection?: NonNullable<EditorSelection>
17915
+ offsets?: {
17916
+ anchor: BlockOffset_2
17917
+ focus: BlockOffset_2
17918
+ }
18380
17919
  }
18381
17920
  | {
18382
17921
  type: 'decorator.remove'
@@ -18520,18 +18059,6 @@ declare const editorMachine: StateMachine<
18520
18059
  type: 'style.toggle'
18521
18060
  style: string
18522
18061
  }
18523
- | {
18524
- type: 'text block.set'
18525
- at: [KeyedSegment]
18526
- level?: number
18527
- listItem?: string
18528
- style?: string
18529
- }
18530
- | {
18531
- type: 'text block.unset'
18532
- at: [KeyedSegment]
18533
- props: Array<'level' | 'listItem' | 'style'>
18534
- }
18535
18062
  | ({
18536
18063
  type: 'serialization.failure'
18537
18064
  mimeType: `${string}/${string}`
@@ -18711,9 +18238,9 @@ declare const editorMachine: StateMachine<
18711
18238
  }
18712
18239
  }
18713
18240
  | {
18714
- [props: string]: unknown
18715
18241
  type: 'block.set'
18716
18242
  at: [KeyedSegment]
18243
+ props: Record<string, unknown>
18717
18244
  }
18718
18245
  | {
18719
18246
  type: 'block.unset'
@@ -18732,7 +18259,10 @@ declare const editorMachine: StateMachine<
18732
18259
  | {
18733
18260
  type: 'decorator.add'
18734
18261
  decorator: string
18735
- selection?: NonNullable<EditorSelection>
18262
+ offsets?: {
18263
+ anchor: BlockOffset_2
18264
+ focus: BlockOffset_2
18265
+ }
18736
18266
  }
18737
18267
  | {
18738
18268
  type: 'decorator.remove'
@@ -18876,18 +18406,6 @@ declare const editorMachine: StateMachine<
18876
18406
  type: 'style.toggle'
18877
18407
  style: string
18878
18408
  }
18879
- | {
18880
- type: 'text block.set'
18881
- at: [KeyedSegment]
18882
- level?: number
18883
- listItem?: string
18884
- style?: string
18885
- }
18886
- | {
18887
- type: 'text block.unset'
18888
- at: [KeyedSegment]
18889
- props: Array<'level' | 'listItem' | 'style'>
18890
- }
18891
18409
  | ({
18892
18410
  type: 'serialization.failure'
18893
18411
  mimeType: `${string}/${string}`
@@ -19019,9 +18537,9 @@ declare const editorMachine: StateMachine<
19019
18537
  }
19020
18538
  }
19021
18539
  | {
19022
- [props: string]: unknown
19023
18540
  type: 'block.set'
19024
18541
  at: [KeyedSegment]
18542
+ props: Record<string, unknown>
19025
18543
  }
19026
18544
  | {
19027
18545
  type: 'block.unset'
@@ -19040,7 +18558,10 @@ declare const editorMachine: StateMachine<
19040
18558
  | {
19041
18559
  type: 'decorator.add'
19042
18560
  decorator: string
19043
- selection?: NonNullable<EditorSelection>
18561
+ offsets?: {
18562
+ anchor: BlockOffset_2
18563
+ focus: BlockOffset_2
18564
+ }
19044
18565
  }
19045
18566
  | {
19046
18567
  type: 'decorator.remove'
@@ -19184,18 +18705,6 @@ declare const editorMachine: StateMachine<
19184
18705
  type: 'style.toggle'
19185
18706
  style: string
19186
18707
  }
19187
- | {
19188
- type: 'text block.set'
19189
- at: [KeyedSegment]
19190
- level?: number
19191
- listItem?: string
19192
- style?: string
19193
- }
19194
- | {
19195
- type: 'text block.unset'
19196
- at: [KeyedSegment]
19197
- props: Array<'level' | 'listItem' | 'style'>
19198
- }
19199
18708
  | ({
19200
18709
  type: 'serialization.failure'
19201
18710
  mimeType: `${string}/${string}`
@@ -19375,9 +18884,9 @@ declare const editorMachine: StateMachine<
19375
18884
  }
19376
18885
  }
19377
18886
  | {
19378
- [props: string]: unknown
19379
18887
  type: 'block.set'
19380
18888
  at: [KeyedSegment]
18889
+ props: Record<string, unknown>
19381
18890
  }
19382
18891
  | {
19383
18892
  type: 'block.unset'
@@ -19396,7 +18905,10 @@ declare const editorMachine: StateMachine<
19396
18905
  | {
19397
18906
  type: 'decorator.add'
19398
18907
  decorator: string
19399
- selection?: NonNullable<EditorSelection>
18908
+ offsets?: {
18909
+ anchor: BlockOffset_2
18910
+ focus: BlockOffset_2
18911
+ }
19400
18912
  }
19401
18913
  | {
19402
18914
  type: 'decorator.remove'
@@ -19540,18 +19052,6 @@ declare const editorMachine: StateMachine<
19540
19052
  type: 'style.toggle'
19541
19053
  style: string
19542
19054
  }
19543
- | {
19544
- type: 'text block.set'
19545
- at: [KeyedSegment]
19546
- level?: number
19547
- listItem?: string
19548
- style?: string
19549
- }
19550
- | {
19551
- type: 'text block.unset'
19552
- at: [KeyedSegment]
19553
- props: Array<'level' | 'listItem' | 'style'>
19554
- }
19555
19055
  | ({
19556
19056
  type: 'serialization.failure'
19557
19057
  mimeType: `${string}/${string}`
@@ -19635,666 +19135,15 @@ declare const editorMachine: StateMachine<
19635
19135
  }
19636
19136
  readonly 'text block.*': {
19637
19137
  readonly actions: ActionFunction<
19638
- {
19639
- behaviors: Set<Behavior>
19640
- converters: Set<Converter>
19641
- keyGenerator: () => string
19642
- pendingEvents: Array<PatchEvent | MutationEvent>
19643
- schema: EditorSchema
19644
- initialReadOnly: boolean
19645
- maxBlocks: number | undefined
19646
- selection: EditorSelection
19647
- value: Array<PortableTextBlock> | undefined
19648
- },
19649
- | {
19650
- type: 'text block.set'
19651
- at: [KeyedSegment]
19652
- level?: number
19653
- listItem?: string
19654
- style?: string
19655
- }
19656
- | {
19657
- type: 'text block.unset'
19658
- at: [KeyedSegment]
19659
- props: Array<'level' | 'listItem' | 'style'>
19660
- },
19661
- | {
19662
- type: 'annotation.add'
19663
- annotation: {
19664
- name: string
19665
- value: {
19666
- [prop: string]: unknown
19667
- }
19668
- }
19669
- }
19670
- | {
19671
- type: 'annotation.remove'
19672
- annotation: {
19673
- name: string
19674
- }
19675
- }
19676
- | {
19677
- type: 'annotation.toggle'
19678
- annotation: {
19679
- name: string
19680
- value: {
19681
- [prop: string]: unknown
19682
- }
19683
- }
19684
- }
19685
- | {
19686
- [props: string]: unknown
19687
- type: 'block.set'
19688
- at: [KeyedSegment]
19689
- }
19690
- | {
19691
- type: 'block.unset'
19692
- at: [KeyedSegment]
19693
- props: Array<string>
19694
- }
19695
- | {
19696
- type: 'blur'
19697
- }
19698
- | {
19699
- type: 'data transfer.set'
19700
- data: string
19701
- dataTransfer: DataTransfer
19702
- mimeType: MIMEType_2
19703
- }
19704
- | {
19705
- type: 'decorator.add'
19706
- decorator: string
19707
- selection?: NonNullable<EditorSelection>
19708
- }
19709
- | {
19710
- type: 'decorator.remove'
19711
- decorator: string
19712
- }
19713
- | {
19714
- type: 'decorator.toggle'
19715
- decorator: string
19716
- }
19717
- | {
19718
- type: 'delete'
19719
- selection: NonNullable<EditorSelection>
19720
- }
19721
- | {
19722
- type: 'delete.backward'
19723
- unit: TextUnit
19724
- }
19725
- | {
19726
- type: 'delete.block'
19727
- blockPath: [KeyedSegment]
19728
- }
19729
- | {
19730
- type: 'delete.forward'
19731
- unit: TextUnit
19732
- }
19733
- | {
19734
- type: 'delete.text'
19735
- anchor: BlockOffset_2
19736
- focus: BlockOffset_2
19737
- }
19738
- | {
19739
- type: 'focus'
19740
- }
19741
- | {
19742
- type: 'history.redo'
19743
- }
19744
- | {
19745
- type: 'history.undo'
19746
- }
19747
- | {
19748
- type: 'insert.blocks'
19749
- blocks: Array<PortableTextBlock>
19750
- }
19751
- | {
19752
- type: 'insert.block object'
19753
- placement: 'auto' | 'after' | 'before'
19754
- blockObject: {
19755
- name: string
19756
- value?: {
19757
- [prop: string]: unknown
19758
- }
19759
- }
19760
- }
19761
- | {
19762
- type: 'insert.inline object'
19763
- inlineObject: {
19764
- name: string
19765
- value?: {
19766
- [prop: string]: unknown
19767
- }
19768
- }
19769
- }
19770
- | {
19771
- type: 'insert.break'
19772
- }
19773
- | {
19774
- type: 'insert.soft break'
19775
- }
19776
- | {
19777
- type: 'insert.block'
19778
- block: PortableTextBlock
19779
- placement: 'auto' | 'after' | 'before'
19780
- }
19781
- | {
19782
- type: 'insert.span'
19783
- text: string
19784
- annotations?: Array<{
19785
- name: string
19786
- value: {
19787
- [prop: string]: unknown
19788
- }
19789
- }>
19790
- decorators?: Array<string>
19791
- }
19792
- | {
19793
- type: 'insert.text'
19794
- text: string
19795
- options?: TextInsertTextOptions
19796
- }
19797
- | {
19798
- type: 'insert.text block'
19799
- placement: 'auto' | 'after' | 'before'
19800
- textBlock?: {
19801
- children?: PortableTextTextBlock['children']
19802
- }
19803
- }
19804
- | {
19805
- type: 'list item.add'
19806
- listItem: string
19807
- }
19808
- | {
19809
- type: 'list item.remove'
19810
- listItem: string
19811
- }
19812
- | {
19813
- type: 'list item.toggle'
19814
- listItem: string
19815
- }
19816
- | {
19817
- type: 'move.block'
19818
- at: [KeyedSegment]
19819
- to: [KeyedSegment]
19820
- }
19821
- | {
19822
- type: 'move.block down'
19823
- at: [KeyedSegment]
19824
- }
19825
- | {
19826
- type: 'move.block up'
19827
- at: [KeyedSegment]
19828
- }
19829
- | {
19830
- type: 'select'
19831
- selection: EditorSelection
19832
- }
19833
- | {
19834
- type: 'select.previous block'
19835
- }
19836
- | {
19837
- type: 'select.next block'
19838
- }
19839
- | {
19840
- type: 'style.add'
19841
- style: string
19842
- }
19843
- | {
19844
- type: 'style.remove'
19845
- style: string
19846
- }
19847
- | {
19848
- type: 'style.toggle'
19849
- style: string
19850
- }
19851
- | {
19852
- type: 'text block.set'
19853
- at: [KeyedSegment]
19854
- level?: number
19855
- listItem?: string
19856
- style?: string
19857
- }
19858
- | {
19859
- type: 'text block.unset'
19860
- at: [KeyedSegment]
19861
- props: Array<'level' | 'listItem' | 'style'>
19862
- }
19863
- | ({
19864
- type: 'serialization.failure'
19865
- mimeType: `${string}/${string}`
19866
- reason: string
19867
- } & {
19868
- dataTransfer: DataTransfer
19869
- })
19870
- | ({
19871
- type: 'serialization.success'
19872
- data: string
19873
- mimeType: `${string}/${string}`
19874
- originEvent: 'copy' | 'cut' | 'unknown'
19875
- } & {
19876
- dataTransfer: DataTransfer
19877
- })
19878
- | ({
19879
- type: 'deserialization.failure'
19880
- mimeType: `${string}/${string}`
19881
- reason: string
19882
- } & {
19883
- dataTransfer: DataTransfer
19884
- })
19885
- | ({
19886
- type: 'deserialization.success'
19887
- data: Array<PortableTextBlock>
19888
- mimeType: `${string}/${string}`
19889
- } & {
19890
- dataTransfer: DataTransfer
19891
- })
19892
- | PatchEvent
19893
- | MutationEvent
19894
- | {
19895
- type: 'normalizing'
19896
- }
19897
- | {
19898
- type: 'done normalizing'
19899
- }
19900
- | {
19901
- type: 'done syncing initial value'
19902
- }
19903
- | {
19904
- type: 'behavior event'
19905
- behaviorEvent:
19906
- | SyntheticBehaviorEvent
19907
- | NativeBehaviorEvent
19908
- editor: PortableTextSlateEditor
19909
- defaultActionCallback?: () => void
19910
- nativeEvent?: {
19911
- preventDefault: () => void
19912
- }
19913
- }
19914
- | {
19915
- type: 'custom behavior event'
19916
- behaviorEvent: CustomBehaviorEvent
19917
- editor: PortableTextSlateEditor
19918
- nativeEvent?: {
19919
- preventDefault: () => void
19920
- }
19921
- }
19922
- | CustomBehaviorEvent
19923
- | {
19924
- type: 'add behavior'
19925
- behavior: Behavior
19926
- }
19927
- | {
19928
- type: 'remove behavior'
19929
- behavior: Behavior
19930
- }
19931
- | {
19932
- type: 'update readOnly'
19933
- readOnly: boolean
19934
- }
19935
- | {
19936
- type: 'update schema'
19937
- schema: EditorSchema
19938
- }
19939
- | {
19940
- type: 'update behaviors'
19941
- behaviors: Array<Behavior>
19942
- }
19943
- | {
19944
- type: 'update key generator'
19945
- keyGenerator: () => string
19946
- }
19947
- | {
19948
- type: 'update value'
19949
- value: Array<PortableTextBlock> | undefined
19950
- }
19951
- | {
19952
- type: 'update maxBlocks'
19953
- maxBlocks: number | undefined
19954
- }
19955
- | PatchesEvent
19956
- | {
19957
- type: 'notify.patch'
19958
- patch: Patch
19959
- }
19960
- | {
19961
- type: 'notify.mutation'
19962
- patches: Array<Patch>
19963
- snapshot: Array<PortableTextBlock> | undefined
19964
- value: Array<PortableTextBlock> | undefined
19965
- }
19966
- | {
19967
- type: 'notify.blurred'
19968
- event: FocusEvent_2<HTMLDivElement, Element>
19969
- }
19970
- | {
19971
- type: 'notify.done loading'
19972
- }
19973
- | {
19974
- type: 'notify.editable'
19975
- }
19976
- | {
19977
- type: 'notify.error'
19978
- name: string
19979
- description: string
19980
- data: unknown
19981
- }
19982
- | {
19983
- type: 'notify.focused'
19984
- event: FocusEvent_2<HTMLDivElement, Element>
19985
- }
19986
- | {
19987
- type: 'notify.invalid value'
19988
- resolution: InvalidValueResolution | null
19989
- value: Array<PortableTextBlock> | undefined
19990
- }
19991
- | {
19992
- type: 'notify.loading'
19993
- }
19994
- | {
19995
- type: 'notify.read only'
19996
- }
19997
- | {
19998
- type: 'notify.ready'
19999
- }
20000
- | {
20001
- type: 'notify.selection'
20002
- selection: EditorSelection
20003
- }
20004
- | {
20005
- type: 'notify.value changed'
20006
- value: Array<PortableTextBlock> | undefined
20007
- }
20008
- | {
20009
- type: 'notify.unset'
20010
- previousValue: Array<PortableTextBlock>
20011
- },
20012
- undefined,
20013
- never,
20014
- never,
20015
- never,
20016
- never,
20017
- | {
20018
- type: 'annotation.add'
20019
- annotation: {
20020
- name: string
20021
- value: {
20022
- [prop: string]: unknown
20023
- }
20024
- }
20025
- }
20026
- | {
20027
- type: 'annotation.remove'
20028
- annotation: {
20029
- name: string
20030
- }
20031
- }
20032
- | {
20033
- type: 'annotation.toggle'
20034
- annotation: {
20035
- name: string
20036
- value: {
20037
- [prop: string]: unknown
20038
- }
20039
- }
20040
- }
20041
- | {
20042
- [props: string]: unknown
20043
- type: 'block.set'
20044
- at: [KeyedSegment]
20045
- }
20046
- | {
20047
- type: 'block.unset'
20048
- at: [KeyedSegment]
20049
- props: Array<string>
20050
- }
20051
- | {
20052
- type: 'blur'
20053
- }
20054
- | {
20055
- type: 'data transfer.set'
20056
- data: string
20057
- dataTransfer: DataTransfer
20058
- mimeType: MIMEType_2
20059
- }
20060
- | {
20061
- type: 'decorator.add'
20062
- decorator: string
20063
- selection?: NonNullable<EditorSelection>
20064
- }
20065
- | {
20066
- type: 'decorator.remove'
20067
- decorator: string
20068
- }
20069
- | {
20070
- type: 'decorator.toggle'
20071
- decorator: string
20072
- }
20073
- | {
20074
- type: 'delete'
20075
- selection: NonNullable<EditorSelection>
20076
- }
20077
- | {
20078
- type: 'delete.backward'
20079
- unit: TextUnit
20080
- }
20081
- | {
20082
- type: 'delete.block'
20083
- blockPath: [KeyedSegment]
20084
- }
20085
- | {
20086
- type: 'delete.forward'
20087
- unit: TextUnit
20088
- }
20089
- | {
20090
- type: 'delete.text'
20091
- anchor: BlockOffset_2
20092
- focus: BlockOffset_2
20093
- }
20094
- | {
20095
- type: 'focus'
20096
- }
20097
- | {
20098
- type: 'history.redo'
20099
- }
20100
- | {
20101
- type: 'history.undo'
20102
- }
20103
- | {
20104
- type: 'insert.blocks'
20105
- blocks: Array<PortableTextBlock>
20106
- }
20107
- | {
20108
- type: 'insert.block object'
20109
- placement: 'auto' | 'after' | 'before'
20110
- blockObject: {
20111
- name: string
20112
- value?: {
20113
- [prop: string]: unknown
20114
- }
20115
- }
20116
- }
20117
- | {
20118
- type: 'insert.inline object'
20119
- inlineObject: {
20120
- name: string
20121
- value?: {
20122
- [prop: string]: unknown
20123
- }
20124
- }
20125
- }
20126
- | {
20127
- type: 'insert.break'
20128
- }
20129
- | {
20130
- type: 'insert.soft break'
20131
- }
20132
- | {
20133
- type: 'insert.block'
20134
- block: PortableTextBlock
20135
- placement: 'auto' | 'after' | 'before'
20136
- }
20137
- | {
20138
- type: 'insert.span'
20139
- text: string
20140
- annotations?: Array<{
20141
- name: string
20142
- value: {
20143
- [prop: string]: unknown
20144
- }
20145
- }>
20146
- decorators?: Array<string>
20147
- }
20148
- | {
20149
- type: 'insert.text'
20150
- text: string
20151
- options?: TextInsertTextOptions
20152
- }
20153
- | {
20154
- type: 'insert.text block'
20155
- placement: 'auto' | 'after' | 'before'
20156
- textBlock?: {
20157
- children?: PortableTextTextBlock['children']
20158
- }
20159
- }
20160
- | {
20161
- type: 'list item.add'
20162
- listItem: string
20163
- }
20164
- | {
20165
- type: 'list item.remove'
20166
- listItem: string
20167
- }
20168
- | {
20169
- type: 'list item.toggle'
20170
- listItem: string
20171
- }
20172
- | {
20173
- type: 'move.block'
20174
- at: [KeyedSegment]
20175
- to: [KeyedSegment]
20176
- }
20177
- | {
20178
- type: 'move.block down'
20179
- at: [KeyedSegment]
20180
- }
20181
- | {
20182
- type: 'move.block up'
20183
- at: [KeyedSegment]
20184
- }
20185
- | {
20186
- type: 'select'
20187
- selection: EditorSelection
20188
- }
20189
- | {
20190
- type: 'select.previous block'
20191
- }
20192
- | {
20193
- type: 'select.next block'
20194
- }
20195
- | {
20196
- type: 'style.add'
20197
- style: string
20198
- }
20199
- | {
20200
- type: 'style.remove'
20201
- style: string
20202
- }
20203
- | {
20204
- type: 'style.toggle'
20205
- style: string
20206
- }
20207
- | {
20208
- type: 'text block.set'
20209
- at: [KeyedSegment]
20210
- level?: number
20211
- listItem?: string
20212
- style?: string
20213
- }
20214
- | {
20215
- type: 'text block.unset'
20216
- at: [KeyedSegment]
20217
- props: Array<'level' | 'listItem' | 'style'>
20218
- }
20219
- | ({
20220
- type: 'serialization.failure'
20221
- mimeType: `${string}/${string}`
20222
- reason: string
20223
- } & {
20224
- dataTransfer: DataTransfer
20225
- })
20226
- | ({
20227
- type: 'serialization.success'
20228
- data: string
20229
- mimeType: `${string}/${string}`
20230
- originEvent: 'copy' | 'cut' | 'unknown'
20231
- } & {
20232
- dataTransfer: DataTransfer
20233
- })
20234
- | ({
20235
- type: 'deserialization.failure'
20236
- mimeType: `${string}/${string}`
20237
- reason: string
20238
- } & {
20239
- dataTransfer: DataTransfer
20240
- })
20241
- | ({
20242
- type: 'deserialization.success'
20243
- data: Array<PortableTextBlock>
20244
- mimeType: `${string}/${string}`
20245
- } & {
20246
- dataTransfer: DataTransfer
20247
- })
20248
- | PatchEvent
20249
- | MutationEvent
20250
- | PatchesEvent
20251
- | {
20252
- type: 'blurred'
20253
- event: FocusEvent_2<HTMLDivElement, Element>
20254
- }
20255
- | {
20256
- type: 'done loading'
20257
- }
20258
- | {
20259
- type: 'editable'
20260
- }
20261
- | {
20262
- type: 'error'
20263
- name: string
20264
- description: string
20265
- data: unknown
20266
- }
20267
- | {
20268
- type: 'focused'
20269
- event: FocusEvent_2<HTMLDivElement, Element>
20270
- }
20271
- | {
20272
- type: 'invalid value'
20273
- resolution: InvalidValueResolution | null
20274
- value: Array<PortableTextBlock> | undefined
20275
- }
20276
- | {
20277
- type: 'loading'
20278
- }
20279
- | {
20280
- type: 'read only'
20281
- }
20282
- | {
20283
- type: 'ready'
20284
- }
20285
- | {
20286
- type: 'selection'
20287
- selection: EditorSelection
20288
- }
20289
- | {
20290
- type: 'value changed'
20291
- value: Array<PortableTextBlock> | undefined
20292
- }
20293
- | UnsetEvent
20294
- | {
20295
- type: 'custom.*'
20296
- event: CustomBehaviorEvent
20297
- }
19138
+ MachineContext,
19139
+ EventObject,
19140
+ EventObject,
19141
+ NonReducibleUnknown,
19142
+ never,
19143
+ never,
19144
+ never,
19145
+ never,
19146
+ AnyEventObject
20298
19147
  >
20299
19148
  }
20300
19149
  }
@@ -21464,7 +20313,7 @@ export declare type SyntheticBehaviorEvent =
21464
20313
  | {
21465
20314
  type: 'block.set'
21466
20315
  at: [KeyedSegment]
21467
- [props: string]: unknown
20316
+ props: Record<string, unknown>
21468
20317
  }
21469
20318
  | {
21470
20319
  type: 'block.unset'
@@ -21483,7 +20332,10 @@ export declare type SyntheticBehaviorEvent =
21483
20332
  | {
21484
20333
  type: 'decorator.add'
21485
20334
  decorator: string
21486
- selection?: NonNullable<EditorSelection>
20335
+ offsets?: {
20336
+ anchor: BlockOffset
20337
+ focus: BlockOffset
20338
+ }
21487
20339
  }
21488
20340
  | {
21489
20341
  type: 'decorator.remove'
@@ -21627,18 +20479,6 @@ export declare type SyntheticBehaviorEvent =
21627
20479
  type: 'style.toggle'
21628
20480
  style: string
21629
20481
  }
21630
- | {
21631
- type: 'text block.set'
21632
- at: [KeyedSegment]
21633
- level?: number
21634
- listItem?: string
21635
- style?: string
21636
- }
21637
- | {
21638
- type: 'text block.unset'
21639
- at: [KeyedSegment]
21640
- props: Array<'level' | 'listItem' | 'style'>
21641
- }
21642
20482
  | (PickFromUnion<
21643
20483
  ConverterEvent,
21644
20484
  'type',