@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
@@ -35,6 +35,7 @@ import {
35
35
  EventObject,
36
36
  InputFrom,
37
37
  IsNotNever,
38
+ MachineContext,
38
39
  MachineSnapshot,
39
40
  MetaObject,
40
41
  NonReducibleUnknown,
@@ -425,9 +426,9 @@ declare const editorMachine: StateMachine<
425
426
  }
426
427
  }
427
428
  | {
428
- [props: string]: unknown
429
429
  type: 'block.set'
430
430
  at: [KeyedSegment]
431
+ props: Record<string, unknown>
431
432
  }
432
433
  | {
433
434
  type: 'block.unset'
@@ -446,7 +447,10 @@ declare const editorMachine: StateMachine<
446
447
  | {
447
448
  type: 'decorator.add'
448
449
  decorator: string
449
- selection?: NonNullable<EditorSelection>
450
+ offsets?: {
451
+ anchor: BlockOffset_2
452
+ focus: BlockOffset_2
453
+ }
450
454
  }
451
455
  | {
452
456
  type: 'decorator.remove'
@@ -590,18 +594,6 @@ declare const editorMachine: StateMachine<
590
594
  type: 'style.toggle'
591
595
  style: string
592
596
  }
593
- | {
594
- type: 'text block.set'
595
- at: [KeyedSegment]
596
- level?: number
597
- listItem?: string
598
- style?: string
599
- }
600
- | {
601
- type: 'text block.unset'
602
- at: [KeyedSegment]
603
- props: Array<'level' | 'listItem' | 'style'>
604
- }
605
597
  | ({
606
598
  type: 'serialization.failure'
607
599
  mimeType: `${string}/${string}`
@@ -856,9 +848,9 @@ declare const editorMachine: StateMachine<
856
848
  }
857
849
  }
858
850
  | {
859
- [props: string]: unknown
860
851
  type: 'block.set'
861
852
  at: [KeyedSegment]
853
+ props: Record<string, unknown>
862
854
  }
863
855
  | {
864
856
  type: 'block.unset'
@@ -877,7 +869,10 @@ declare const editorMachine: StateMachine<
877
869
  | {
878
870
  type: 'decorator.add'
879
871
  decorator: string
880
- selection?: NonNullable<EditorSelection>
872
+ offsets?: {
873
+ anchor: BlockOffset_2
874
+ focus: BlockOffset_2
875
+ }
881
876
  }
882
877
  | {
883
878
  type: 'decorator.remove'
@@ -1021,18 +1016,6 @@ declare const editorMachine: StateMachine<
1021
1016
  type: 'style.toggle'
1022
1017
  style: string
1023
1018
  }
1024
- | {
1025
- type: 'text block.set'
1026
- at: [KeyedSegment]
1027
- level?: number
1028
- listItem?: string
1029
- style?: string
1030
- }
1031
- | {
1032
- type: 'text block.unset'
1033
- at: [KeyedSegment]
1034
- props: Array<'level' | 'listItem' | 'style'>
1035
- }
1036
1019
  | ({
1037
1020
  type: 'serialization.failure'
1038
1021
  mimeType: `${string}/${string}`
@@ -1187,9 +1170,9 @@ declare const editorMachine: StateMachine<
1187
1170
  }
1188
1171
  }
1189
1172
  | {
1190
- [props: string]: unknown
1191
1173
  type: 'block.set'
1192
1174
  at: [KeyedSegment]
1175
+ props: Record<string, unknown>
1193
1176
  }
1194
1177
  | {
1195
1178
  type: 'block.unset'
@@ -1208,7 +1191,10 @@ declare const editorMachine: StateMachine<
1208
1191
  | {
1209
1192
  type: 'decorator.add'
1210
1193
  decorator: string
1211
- selection?: NonNullable<EditorSelection>
1194
+ offsets?: {
1195
+ anchor: BlockOffset_2
1196
+ focus: BlockOffset_2
1197
+ }
1212
1198
  }
1213
1199
  | {
1214
1200
  type: 'decorator.remove'
@@ -1352,18 +1338,6 @@ declare const editorMachine: StateMachine<
1352
1338
  type: 'style.toggle'
1353
1339
  style: string
1354
1340
  }
1355
- | {
1356
- type: 'text block.set'
1357
- at: [KeyedSegment]
1358
- level?: number
1359
- listItem?: string
1360
- style?: string
1361
- }
1362
- | {
1363
- type: 'text block.unset'
1364
- at: [KeyedSegment]
1365
- props: Array<'level' | 'listItem' | 'style'>
1366
- }
1367
1341
  | ({
1368
1342
  type: 'serialization.failure'
1369
1343
  mimeType: `${string}/${string}`
@@ -1543,9 +1517,9 @@ declare const editorMachine: StateMachine<
1543
1517
  }
1544
1518
  }
1545
1519
  | {
1546
- [props: string]: unknown
1547
1520
  type: 'block.set'
1548
1521
  at: [KeyedSegment]
1522
+ props: Record<string, unknown>
1549
1523
  }
1550
1524
  | {
1551
1525
  type: 'block.unset'
@@ -1564,7 +1538,10 @@ declare const editorMachine: StateMachine<
1564
1538
  | {
1565
1539
  type: 'decorator.add'
1566
1540
  decorator: string
1567
- selection?: NonNullable<EditorSelection>
1541
+ offsets?: {
1542
+ anchor: BlockOffset_2
1543
+ focus: BlockOffset_2
1544
+ }
1568
1545
  }
1569
1546
  | {
1570
1547
  type: 'decorator.remove'
@@ -1708,18 +1685,6 @@ declare const editorMachine: StateMachine<
1708
1685
  type: 'style.toggle'
1709
1686
  style: string
1710
1687
  }
1711
- | {
1712
- type: 'text block.set'
1713
- at: [KeyedSegment]
1714
- level?: number
1715
- listItem?: string
1716
- style?: string
1717
- }
1718
- | {
1719
- type: 'text block.unset'
1720
- at: [KeyedSegment]
1721
- props: Array<'level' | 'listItem' | 'style'>
1722
- }
1723
1688
  | ({
1724
1689
  type: 'serialization.failure'
1725
1690
  mimeType: `${string}/${string}`
@@ -1923,9 +1888,9 @@ declare const editorMachine: StateMachine<
1923
1888
  }
1924
1889
  }
1925
1890
  | {
1926
- [props: string]: unknown
1927
1891
  type: 'block.set'
1928
1892
  at: [KeyedSegment]
1893
+ props: Record<string, unknown>
1929
1894
  }
1930
1895
  | {
1931
1896
  type: 'block.unset'
@@ -1944,7 +1909,10 @@ declare const editorMachine: StateMachine<
1944
1909
  | {
1945
1910
  type: 'decorator.add'
1946
1911
  decorator: string
1947
- selection?: NonNullable<EditorSelection>
1912
+ offsets?: {
1913
+ anchor: BlockOffset_2
1914
+ focus: BlockOffset_2
1915
+ }
1948
1916
  }
1949
1917
  | {
1950
1918
  type: 'decorator.remove'
@@ -2088,18 +2056,6 @@ declare const editorMachine: StateMachine<
2088
2056
  type: 'style.toggle'
2089
2057
  style: string
2090
2058
  }
2091
- | {
2092
- type: 'text block.set'
2093
- at: [KeyedSegment]
2094
- level?: number
2095
- listItem?: string
2096
- style?: string
2097
- }
2098
- | {
2099
- type: 'text block.unset'
2100
- at: [KeyedSegment]
2101
- props: Array<'level' | 'listItem' | 'style'>
2102
- }
2103
2059
  | ({
2104
2060
  type: 'serialization.failure'
2105
2061
  mimeType: `${string}/${string}`
@@ -2277,9 +2233,9 @@ declare const editorMachine: StateMachine<
2277
2233
  }
2278
2234
  }
2279
2235
  | {
2280
- [props: string]: unknown
2281
2236
  type: 'block.set'
2282
2237
  at: [KeyedSegment]
2238
+ props: Record<string, unknown>
2283
2239
  }
2284
2240
  | {
2285
2241
  type: 'block.unset'
@@ -2298,7 +2254,10 @@ declare const editorMachine: StateMachine<
2298
2254
  | {
2299
2255
  type: 'decorator.add'
2300
2256
  decorator: string
2301
- selection?: NonNullable<EditorSelection>
2257
+ offsets?: {
2258
+ anchor: BlockOffset_2
2259
+ focus: BlockOffset_2
2260
+ }
2302
2261
  }
2303
2262
  | {
2304
2263
  type: 'decorator.remove'
@@ -2442,18 +2401,6 @@ declare const editorMachine: StateMachine<
2442
2401
  type: 'style.toggle'
2443
2402
  style: string
2444
2403
  }
2445
- | {
2446
- type: 'text block.set'
2447
- at: [KeyedSegment]
2448
- level?: number
2449
- listItem?: string
2450
- style?: string
2451
- }
2452
- | {
2453
- type: 'text block.unset'
2454
- at: [KeyedSegment]
2455
- props: Array<'level' | 'listItem' | 'style'>
2456
- }
2457
2404
  | ({
2458
2405
  type: 'serialization.failure'
2459
2406
  mimeType: `${string}/${string}`
@@ -2576,9 +2523,9 @@ declare const editorMachine: StateMachine<
2576
2523
  }
2577
2524
  }
2578
2525
  | {
2579
- [props: string]: unknown
2580
2526
  type: 'block.set'
2581
2527
  at: [KeyedSegment]
2528
+ props: Record<string, unknown>
2582
2529
  }
2583
2530
  | {
2584
2531
  type: 'block.unset'
@@ -2597,7 +2544,10 @@ declare const editorMachine: StateMachine<
2597
2544
  | {
2598
2545
  type: 'decorator.add'
2599
2546
  decorator: string
2600
- selection?: NonNullable<EditorSelection>
2547
+ offsets?: {
2548
+ anchor: BlockOffset_2
2549
+ focus: BlockOffset_2
2550
+ }
2601
2551
  }
2602
2552
  | {
2603
2553
  type: 'decorator.remove'
@@ -2741,18 +2691,6 @@ declare const editorMachine: StateMachine<
2741
2691
  type: 'style.toggle'
2742
2692
  style: string
2743
2693
  }
2744
- | {
2745
- type: 'text block.set'
2746
- at: [KeyedSegment]
2747
- level?: number
2748
- listItem?: string
2749
- style?: string
2750
- }
2751
- | {
2752
- type: 'text block.unset'
2753
- at: [KeyedSegment]
2754
- props: Array<'level' | 'listItem' | 'style'>
2755
- }
2756
2694
  | ({
2757
2695
  type: 'serialization.failure'
2758
2696
  mimeType: `${string}/${string}`
@@ -2930,9 +2868,9 @@ declare const editorMachine: StateMachine<
2930
2868
  }
2931
2869
  }
2932
2870
  | {
2933
- [props: string]: unknown
2934
2871
  type: 'block.set'
2935
2872
  at: [KeyedSegment]
2873
+ props: Record<string, unknown>
2936
2874
  }
2937
2875
  | {
2938
2876
  type: 'block.unset'
@@ -2951,7 +2889,10 @@ declare const editorMachine: StateMachine<
2951
2889
  | {
2952
2890
  type: 'decorator.add'
2953
2891
  decorator: string
2954
- selection?: NonNullable<EditorSelection>
2892
+ offsets?: {
2893
+ anchor: BlockOffset_2
2894
+ focus: BlockOffset_2
2895
+ }
2955
2896
  }
2956
2897
  | {
2957
2898
  type: 'decorator.remove'
@@ -3095,18 +3036,6 @@ declare const editorMachine: StateMachine<
3095
3036
  type: 'style.toggle'
3096
3037
  style: string
3097
3038
  }
3098
- | {
3099
- type: 'text block.set'
3100
- at: [KeyedSegment]
3101
- level?: number
3102
- listItem?: string
3103
- style?: string
3104
- }
3105
- | {
3106
- type: 'text block.unset'
3107
- at: [KeyedSegment]
3108
- props: Array<'level' | 'listItem' | 'style'>
3109
- }
3110
3039
  | ({
3111
3040
  type: 'serialization.failure'
3112
3041
  mimeType: `${string}/${string}`
@@ -3232,9 +3161,9 @@ declare const editorMachine: StateMachine<
3232
3161
  }
3233
3162
  }
3234
3163
  | {
3235
- [props: string]: unknown
3236
3164
  type: 'block.set'
3237
3165
  at: [KeyedSegment]
3166
+ props: Record<string, unknown>
3238
3167
  }
3239
3168
  | {
3240
3169
  type: 'block.unset'
@@ -3253,7 +3182,10 @@ declare const editorMachine: StateMachine<
3253
3182
  | {
3254
3183
  type: 'decorator.add'
3255
3184
  decorator: string
3256
- selection?: NonNullable<EditorSelection>
3185
+ offsets?: {
3186
+ anchor: BlockOffset_2
3187
+ focus: BlockOffset_2
3188
+ }
3257
3189
  }
3258
3190
  | {
3259
3191
  type: 'decorator.remove'
@@ -3397,18 +3329,6 @@ declare const editorMachine: StateMachine<
3397
3329
  type: 'style.toggle'
3398
3330
  style: string
3399
3331
  }
3400
- | {
3401
- type: 'text block.set'
3402
- at: [KeyedSegment]
3403
- level?: number
3404
- listItem?: string
3405
- style?: string
3406
- }
3407
- | {
3408
- type: 'text block.unset'
3409
- at: [KeyedSegment]
3410
- props: Array<'level' | 'listItem' | 'style'>
3411
- }
3412
3332
  | ({
3413
3333
  type: 'serialization.failure'
3414
3334
  mimeType: `${string}/${string}`
@@ -3586,9 +3506,9 @@ declare const editorMachine: StateMachine<
3586
3506
  }
3587
3507
  }
3588
3508
  | {
3589
- [props: string]: unknown
3590
3509
  type: 'block.set'
3591
3510
  at: [KeyedSegment]
3511
+ props: Record<string, unknown>
3592
3512
  }
3593
3513
  | {
3594
3514
  type: 'block.unset'
@@ -3607,7 +3527,10 @@ declare const editorMachine: StateMachine<
3607
3527
  | {
3608
3528
  type: 'decorator.add'
3609
3529
  decorator: string
3610
- selection?: NonNullable<EditorSelection>
3530
+ offsets?: {
3531
+ anchor: BlockOffset_2
3532
+ focus: BlockOffset_2
3533
+ }
3611
3534
  }
3612
3535
  | {
3613
3536
  type: 'decorator.remove'
@@ -3751,18 +3674,6 @@ declare const editorMachine: StateMachine<
3751
3674
  type: 'style.toggle'
3752
3675
  style: string
3753
3676
  }
3754
- | {
3755
- type: 'text block.set'
3756
- at: [KeyedSegment]
3757
- level?: number
3758
- listItem?: string
3759
- style?: string
3760
- }
3761
- | {
3762
- type: 'text block.unset'
3763
- at: [KeyedSegment]
3764
- props: Array<'level' | 'listItem' | 'style'>
3765
- }
3766
3677
  | ({
3767
3678
  type: 'serialization.failure'
3768
3679
  mimeType: `${string}/${string}`
@@ -3887,9 +3798,9 @@ declare const editorMachine: StateMachine<
3887
3798
  }
3888
3799
  }
3889
3800
  | {
3890
- [props: string]: unknown
3891
3801
  type: 'block.set'
3892
3802
  at: [KeyedSegment]
3803
+ props: Record<string, unknown>
3893
3804
  }
3894
3805
  | {
3895
3806
  type: 'block.unset'
@@ -3908,7 +3819,10 @@ declare const editorMachine: StateMachine<
3908
3819
  | {
3909
3820
  type: 'decorator.add'
3910
3821
  decorator: string
3911
- selection?: NonNullable<EditorSelection>
3822
+ offsets?: {
3823
+ anchor: BlockOffset_2
3824
+ focus: BlockOffset_2
3825
+ }
3912
3826
  }
3913
3827
  | {
3914
3828
  type: 'decorator.remove'
@@ -4052,18 +3966,6 @@ declare const editorMachine: StateMachine<
4052
3966
  type: 'style.toggle'
4053
3967
  style: string
4054
3968
  }
4055
- | {
4056
- type: 'text block.set'
4057
- at: [KeyedSegment]
4058
- level?: number
4059
- listItem?: string
4060
- style?: string
4061
- }
4062
- | {
4063
- type: 'text block.unset'
4064
- at: [KeyedSegment]
4065
- props: Array<'level' | 'listItem' | 'style'>
4066
- }
4067
3969
  | ({
4068
3970
  type: 'serialization.failure'
4069
3971
  mimeType: `${string}/${string}`
@@ -4241,9 +4143,9 @@ declare const editorMachine: StateMachine<
4241
4143
  }
4242
4144
  }
4243
4145
  | {
4244
- [props: string]: unknown
4245
4146
  type: 'block.set'
4246
4147
  at: [KeyedSegment]
4148
+ props: Record<string, unknown>
4247
4149
  }
4248
4150
  | {
4249
4151
  type: 'block.unset'
@@ -4262,7 +4164,10 @@ declare const editorMachine: StateMachine<
4262
4164
  | {
4263
4165
  type: 'decorator.add'
4264
4166
  decorator: string
4265
- selection?: NonNullable<EditorSelection>
4167
+ offsets?: {
4168
+ anchor: BlockOffset_2
4169
+ focus: BlockOffset_2
4170
+ }
4266
4171
  }
4267
4172
  | {
4268
4173
  type: 'decorator.remove'
@@ -4406,18 +4311,6 @@ declare const editorMachine: StateMachine<
4406
4311
  type: 'style.toggle'
4407
4312
  style: string
4408
4313
  }
4409
- | {
4410
- type: 'text block.set'
4411
- at: [KeyedSegment]
4412
- level?: number
4413
- listItem?: string
4414
- style?: string
4415
- }
4416
- | {
4417
- type: 'text block.unset'
4418
- at: [KeyedSegment]
4419
- props: Array<'level' | 'listItem' | 'style'>
4420
- }
4421
4314
  | ({
4422
4315
  type: 'serialization.failure'
4423
4316
  mimeType: `${string}/${string}`
@@ -4541,9 +4434,9 @@ declare const editorMachine: StateMachine<
4541
4434
  }
4542
4435
  }
4543
4436
  | {
4544
- [props: string]: unknown
4545
4437
  type: 'block.set'
4546
4438
  at: [KeyedSegment]
4439
+ props: Record<string, unknown>
4547
4440
  }
4548
4441
  | {
4549
4442
  type: 'block.unset'
@@ -4562,7 +4455,10 @@ declare const editorMachine: StateMachine<
4562
4455
  | {
4563
4456
  type: 'decorator.add'
4564
4457
  decorator: string
4565
- selection?: NonNullable<EditorSelection>
4458
+ offsets?: {
4459
+ anchor: BlockOffset_2
4460
+ focus: BlockOffset_2
4461
+ }
4566
4462
  }
4567
4463
  | {
4568
4464
  type: 'decorator.remove'
@@ -4706,18 +4602,6 @@ declare const editorMachine: StateMachine<
4706
4602
  type: 'style.toggle'
4707
4603
  style: string
4708
4604
  }
4709
- | {
4710
- type: 'text block.set'
4711
- at: [KeyedSegment]
4712
- level?: number
4713
- listItem?: string
4714
- style?: string
4715
- }
4716
- | {
4717
- type: 'text block.unset'
4718
- at: [KeyedSegment]
4719
- props: Array<'level' | 'listItem' | 'style'>
4720
- }
4721
4605
  | ({
4722
4606
  type: 'serialization.failure'
4723
4607
  mimeType: `${string}/${string}`
@@ -4895,9 +4779,9 @@ declare const editorMachine: StateMachine<
4895
4779
  }
4896
4780
  }
4897
4781
  | {
4898
- [props: string]: unknown
4899
4782
  type: 'block.set'
4900
4783
  at: [KeyedSegment]
4784
+ props: Record<string, unknown>
4901
4785
  }
4902
4786
  | {
4903
4787
  type: 'block.unset'
@@ -4916,7 +4800,10 @@ declare const editorMachine: StateMachine<
4916
4800
  | {
4917
4801
  type: 'decorator.add'
4918
4802
  decorator: string
4919
- selection?: NonNullable<EditorSelection>
4803
+ offsets?: {
4804
+ anchor: BlockOffset_2
4805
+ focus: BlockOffset_2
4806
+ }
4920
4807
  }
4921
4808
  | {
4922
4809
  type: 'decorator.remove'
@@ -5060,18 +4947,6 @@ declare const editorMachine: StateMachine<
5060
4947
  type: 'style.toggle'
5061
4948
  style: string
5062
4949
  }
5063
- | {
5064
- type: 'text block.set'
5065
- at: [KeyedSegment]
5066
- level?: number
5067
- listItem?: string
5068
- style?: string
5069
- }
5070
- | {
5071
- type: 'text block.unset'
5072
- at: [KeyedSegment]
5073
- props: Array<'level' | 'listItem' | 'style'>
5074
- }
5075
4950
  | ({
5076
4951
  type: 'serialization.failure'
5077
4952
  mimeType: `${string}/${string}`
@@ -5196,9 +5071,9 @@ declare const editorMachine: StateMachine<
5196
5071
  }
5197
5072
  }
5198
5073
  | {
5199
- [props: string]: unknown
5200
5074
  type: 'block.set'
5201
5075
  at: [KeyedSegment]
5076
+ props: Record<string, unknown>
5202
5077
  }
5203
5078
  | {
5204
5079
  type: 'block.unset'
@@ -5217,7 +5092,10 @@ declare const editorMachine: StateMachine<
5217
5092
  | {
5218
5093
  type: 'decorator.add'
5219
5094
  decorator: string
5220
- selection?: NonNullable<EditorSelection>
5095
+ offsets?: {
5096
+ anchor: BlockOffset_2
5097
+ focus: BlockOffset_2
5098
+ }
5221
5099
  }
5222
5100
  | {
5223
5101
  type: 'decorator.remove'
@@ -5361,18 +5239,6 @@ declare const editorMachine: StateMachine<
5361
5239
  type: 'style.toggle'
5362
5240
  style: string
5363
5241
  }
5364
- | {
5365
- type: 'text block.set'
5366
- at: [KeyedSegment]
5367
- level?: number
5368
- listItem?: string
5369
- style?: string
5370
- }
5371
- | {
5372
- type: 'text block.unset'
5373
- at: [KeyedSegment]
5374
- props: Array<'level' | 'listItem' | 'style'>
5375
- }
5376
5242
  | ({
5377
5243
  type: 'serialization.failure'
5378
5244
  mimeType: `${string}/${string}`
@@ -5568,9 +5434,9 @@ declare const editorMachine: StateMachine<
5568
5434
  }
5569
5435
  }
5570
5436
  | {
5571
- [props: string]: unknown
5572
5437
  type: 'block.set'
5573
5438
  at: [KeyedSegment]
5439
+ props: Record<string, unknown>
5574
5440
  }
5575
5441
  | {
5576
5442
  type: 'block.unset'
@@ -5589,7 +5455,10 @@ declare const editorMachine: StateMachine<
5589
5455
  | {
5590
5456
  type: 'decorator.add'
5591
5457
  decorator: string
5592
- selection?: NonNullable<EditorSelection>
5458
+ offsets?: {
5459
+ anchor: BlockOffset_2
5460
+ focus: BlockOffset_2
5461
+ }
5593
5462
  }
5594
5463
  | {
5595
5464
  type: 'decorator.remove'
@@ -5733,18 +5602,6 @@ declare const editorMachine: StateMachine<
5733
5602
  type: 'style.toggle'
5734
5603
  style: string
5735
5604
  }
5736
- | {
5737
- type: 'text block.set'
5738
- at: [KeyedSegment]
5739
- level?: number
5740
- listItem?: string
5741
- style?: string
5742
- }
5743
- | {
5744
- type: 'text block.unset'
5745
- at: [KeyedSegment]
5746
- props: Array<'level' | 'listItem' | 'style'>
5747
- }
5748
5605
  | ({
5749
5606
  type: 'serialization.failure'
5750
5607
  mimeType: `${string}/${string}`
@@ -5922,9 +5779,9 @@ declare const editorMachine: StateMachine<
5922
5779
  }
5923
5780
  }
5924
5781
  | {
5925
- [props: string]: unknown
5926
5782
  type: 'block.set'
5927
5783
  at: [KeyedSegment]
5784
+ props: Record<string, unknown>
5928
5785
  }
5929
5786
  | {
5930
5787
  type: 'block.unset'
@@ -5943,7 +5800,10 @@ declare const editorMachine: StateMachine<
5943
5800
  | {
5944
5801
  type: 'decorator.add'
5945
5802
  decorator: string
5946
- selection?: NonNullable<EditorSelection>
5803
+ offsets?: {
5804
+ anchor: BlockOffset_2
5805
+ focus: BlockOffset_2
5806
+ }
5947
5807
  }
5948
5808
  | {
5949
5809
  type: 'decorator.remove'
@@ -6087,18 +5947,6 @@ declare const editorMachine: StateMachine<
6087
5947
  type: 'style.toggle'
6088
5948
  style: string
6089
5949
  }
6090
- | {
6091
- type: 'text block.set'
6092
- at: [KeyedSegment]
6093
- level?: number
6094
- listItem?: string
6095
- style?: string
6096
- }
6097
- | {
6098
- type: 'text block.unset'
6099
- at: [KeyedSegment]
6100
- props: Array<'level' | 'listItem' | 'style'>
6101
- }
6102
5950
  | ({
6103
5951
  type: 'serialization.failure'
6104
5952
  mimeType: `${string}/${string}`
@@ -6223,9 +6071,9 @@ declare const editorMachine: StateMachine<
6223
6071
  }
6224
6072
  }
6225
6073
  | {
6226
- [props: string]: unknown
6227
6074
  type: 'block.set'
6228
6075
  at: [KeyedSegment]
6076
+ props: Record<string, unknown>
6229
6077
  }
6230
6078
  | {
6231
6079
  type: 'block.unset'
@@ -6244,7 +6092,10 @@ declare const editorMachine: StateMachine<
6244
6092
  | {
6245
6093
  type: 'decorator.add'
6246
6094
  decorator: string
6247
- selection?: NonNullable<EditorSelection>
6095
+ offsets?: {
6096
+ anchor: BlockOffset_2
6097
+ focus: BlockOffset_2
6098
+ }
6248
6099
  }
6249
6100
  | {
6250
6101
  type: 'decorator.remove'
@@ -6388,18 +6239,6 @@ declare const editorMachine: StateMachine<
6388
6239
  type: 'style.toggle'
6389
6240
  style: string
6390
6241
  }
6391
- | {
6392
- type: 'text block.set'
6393
- at: [KeyedSegment]
6394
- level?: number
6395
- listItem?: string
6396
- style?: string
6397
- }
6398
- | {
6399
- type: 'text block.unset'
6400
- at: [KeyedSegment]
6401
- props: Array<'level' | 'listItem' | 'style'>
6402
- }
6403
6242
  | ({
6404
6243
  type: 'serialization.failure'
6405
6244
  mimeType: `${string}/${string}`
@@ -6577,9 +6416,9 @@ declare const editorMachine: StateMachine<
6577
6416
  }
6578
6417
  }
6579
6418
  | {
6580
- [props: string]: unknown
6581
6419
  type: 'block.set'
6582
6420
  at: [KeyedSegment]
6421
+ props: Record<string, unknown>
6583
6422
  }
6584
6423
  | {
6585
6424
  type: 'block.unset'
@@ -6598,7 +6437,10 @@ declare const editorMachine: StateMachine<
6598
6437
  | {
6599
6438
  type: 'decorator.add'
6600
6439
  decorator: string
6601
- selection?: NonNullable<EditorSelection>
6440
+ offsets?: {
6441
+ anchor: BlockOffset_2
6442
+ focus: BlockOffset_2
6443
+ }
6602
6444
  }
6603
6445
  | {
6604
6446
  type: 'decorator.remove'
@@ -6742,18 +6584,6 @@ declare const editorMachine: StateMachine<
6742
6584
  type: 'style.toggle'
6743
6585
  style: string
6744
6586
  }
6745
- | {
6746
- type: 'text block.set'
6747
- at: [KeyedSegment]
6748
- level?: number
6749
- listItem?: string
6750
- style?: string
6751
- }
6752
- | {
6753
- type: 'text block.unset'
6754
- at: [KeyedSegment]
6755
- props: Array<'level' | 'listItem' | 'style'>
6756
- }
6757
6587
  | ({
6758
6588
  type: 'serialization.failure'
6759
6589
  mimeType: `${string}/${string}`
@@ -6876,9 +6706,9 @@ declare const editorMachine: StateMachine<
6876
6706
  }
6877
6707
  }
6878
6708
  | {
6879
- [props: string]: unknown
6880
6709
  type: 'block.set'
6881
6710
  at: [KeyedSegment]
6711
+ props: Record<string, unknown>
6882
6712
  }
6883
6713
  | {
6884
6714
  type: 'block.unset'
@@ -6897,7 +6727,10 @@ declare const editorMachine: StateMachine<
6897
6727
  | {
6898
6728
  type: 'decorator.add'
6899
6729
  decorator: string
6900
- selection?: NonNullable<EditorSelection>
6730
+ offsets?: {
6731
+ anchor: BlockOffset_2
6732
+ focus: BlockOffset_2
6733
+ }
6901
6734
  }
6902
6735
  | {
6903
6736
  type: 'decorator.remove'
@@ -7041,18 +6874,6 @@ declare const editorMachine: StateMachine<
7041
6874
  type: 'style.toggle'
7042
6875
  style: string
7043
6876
  }
7044
- | {
7045
- type: 'text block.set'
7046
- at: [KeyedSegment]
7047
- level?: number
7048
- listItem?: string
7049
- style?: string
7050
- }
7051
- | {
7052
- type: 'text block.unset'
7053
- at: [KeyedSegment]
7054
- props: Array<'level' | 'listItem' | 'style'>
7055
- }
7056
6877
  | ({
7057
6878
  type: 'serialization.failure'
7058
6879
  mimeType: `${string}/${string}`
@@ -7230,9 +7051,9 @@ declare const editorMachine: StateMachine<
7230
7051
  }
7231
7052
  }
7232
7053
  | {
7233
- [props: string]: unknown
7234
7054
  type: 'block.set'
7235
7055
  at: [KeyedSegment]
7056
+ props: Record<string, unknown>
7236
7057
  }
7237
7058
  | {
7238
7059
  type: 'block.unset'
@@ -7251,7 +7072,10 @@ declare const editorMachine: StateMachine<
7251
7072
  | {
7252
7073
  type: 'decorator.add'
7253
7074
  decorator: string
7254
- selection?: NonNullable<EditorSelection>
7075
+ offsets?: {
7076
+ anchor: BlockOffset_2
7077
+ focus: BlockOffset_2
7078
+ }
7255
7079
  }
7256
7080
  | {
7257
7081
  type: 'decorator.remove'
@@ -7395,18 +7219,6 @@ declare const editorMachine: StateMachine<
7395
7219
  type: 'style.toggle'
7396
7220
  style: string
7397
7221
  }
7398
- | {
7399
- type: 'text block.set'
7400
- at: [KeyedSegment]
7401
- level?: number
7402
- listItem?: string
7403
- style?: string
7404
- }
7405
- | {
7406
- type: 'text block.unset'
7407
- at: [KeyedSegment]
7408
- props: Array<'level' | 'listItem' | 'style'>
7409
- }
7410
7222
  | ({
7411
7223
  type: 'serialization.failure'
7412
7224
  mimeType: `${string}/${string}`
@@ -7530,9 +7342,9 @@ declare const editorMachine: StateMachine<
7530
7342
  }
7531
7343
  }
7532
7344
  | {
7533
- [props: string]: unknown
7534
7345
  type: 'block.set'
7535
7346
  at: [KeyedSegment]
7347
+ props: Record<string, unknown>
7536
7348
  }
7537
7349
  | {
7538
7350
  type: 'block.unset'
@@ -7551,7 +7363,10 @@ declare const editorMachine: StateMachine<
7551
7363
  | {
7552
7364
  type: 'decorator.add'
7553
7365
  decorator: string
7554
- selection?: NonNullable<EditorSelection>
7366
+ offsets?: {
7367
+ anchor: BlockOffset_2
7368
+ focus: BlockOffset_2
7369
+ }
7555
7370
  }
7556
7371
  | {
7557
7372
  type: 'decorator.remove'
@@ -7695,18 +7510,6 @@ declare const editorMachine: StateMachine<
7695
7510
  type: 'style.toggle'
7696
7511
  style: string
7697
7512
  }
7698
- | {
7699
- type: 'text block.set'
7700
- at: [KeyedSegment]
7701
- level?: number
7702
- listItem?: string
7703
- style?: string
7704
- }
7705
- | {
7706
- type: 'text block.unset'
7707
- at: [KeyedSegment]
7708
- props: Array<'level' | 'listItem' | 'style'>
7709
- }
7710
7513
  | ({
7711
7514
  type: 'serialization.failure'
7712
7515
  mimeType: `${string}/${string}`
@@ -7884,9 +7687,9 @@ declare const editorMachine: StateMachine<
7884
7687
  }
7885
7688
  }
7886
7689
  | {
7887
- [props: string]: unknown
7888
7690
  type: 'block.set'
7889
7691
  at: [KeyedSegment]
7692
+ props: Record<string, unknown>
7890
7693
  }
7891
7694
  | {
7892
7695
  type: 'block.unset'
@@ -7905,7 +7708,10 @@ declare const editorMachine: StateMachine<
7905
7708
  | {
7906
7709
  type: 'decorator.add'
7907
7710
  decorator: string
7908
- selection?: NonNullable<EditorSelection>
7711
+ offsets?: {
7712
+ anchor: BlockOffset_2
7713
+ focus: BlockOffset_2
7714
+ }
7909
7715
  }
7910
7716
  | {
7911
7717
  type: 'decorator.remove'
@@ -8049,18 +7855,6 @@ declare const editorMachine: StateMachine<
8049
7855
  type: 'style.toggle'
8050
7856
  style: string
8051
7857
  }
8052
- | {
8053
- type: 'text block.set'
8054
- at: [KeyedSegment]
8055
- level?: number
8056
- listItem?: string
8057
- style?: string
8058
- }
8059
- | {
8060
- type: 'text block.unset'
8061
- at: [KeyedSegment]
8062
- props: Array<'level' | 'listItem' | 'style'>
8063
- }
8064
7858
  | ({
8065
7859
  type: 'serialization.failure'
8066
7860
  mimeType: `${string}/${string}`
@@ -8187,9 +7981,9 @@ declare const editorMachine: StateMachine<
8187
7981
  }
8188
7982
  }
8189
7983
  | {
8190
- [props: string]: unknown
8191
7984
  type: 'block.set'
8192
7985
  at: [KeyedSegment]
7986
+ props: Record<string, unknown>
8193
7987
  }
8194
7988
  | {
8195
7989
  type: 'block.unset'
@@ -8208,7 +8002,10 @@ declare const editorMachine: StateMachine<
8208
8002
  | {
8209
8003
  type: 'decorator.add'
8210
8004
  decorator: string
8211
- selection?: NonNullable<EditorSelection>
8005
+ offsets?: {
8006
+ anchor: BlockOffset_2
8007
+ focus: BlockOffset_2
8008
+ }
8212
8009
  }
8213
8010
  | {
8214
8011
  type: 'decorator.remove'
@@ -8352,18 +8149,6 @@ declare const editorMachine: StateMachine<
8352
8149
  type: 'style.toggle'
8353
8150
  style: string
8354
8151
  }
8355
- | {
8356
- type: 'text block.set'
8357
- at: [KeyedSegment]
8358
- level?: number
8359
- listItem?: string
8360
- style?: string
8361
- }
8362
- | {
8363
- type: 'text block.unset'
8364
- at: [KeyedSegment]
8365
- props: Array<'level' | 'listItem' | 'style'>
8366
- }
8367
8152
  | ({
8368
8153
  type: 'serialization.failure'
8369
8154
  mimeType: `${string}/${string}`
@@ -8541,9 +8326,9 @@ declare const editorMachine: StateMachine<
8541
8326
  }
8542
8327
  }
8543
8328
  | {
8544
- [props: string]: unknown
8545
8329
  type: 'block.set'
8546
8330
  at: [KeyedSegment]
8331
+ props: Record<string, unknown>
8547
8332
  }
8548
8333
  | {
8549
8334
  type: 'block.unset'
@@ -8562,7 +8347,10 @@ declare const editorMachine: StateMachine<
8562
8347
  | {
8563
8348
  type: 'decorator.add'
8564
8349
  decorator: string
8565
- selection?: NonNullable<EditorSelection>
8350
+ offsets?: {
8351
+ anchor: BlockOffset_2
8352
+ focus: BlockOffset_2
8353
+ }
8566
8354
  }
8567
8355
  | {
8568
8356
  type: 'decorator.remove'
@@ -8706,18 +8494,6 @@ declare const editorMachine: StateMachine<
8706
8494
  type: 'style.toggle'
8707
8495
  style: string
8708
8496
  }
8709
- | {
8710
- type: 'text block.set'
8711
- at: [KeyedSegment]
8712
- level?: number
8713
- listItem?: string
8714
- style?: string
8715
- }
8716
- | {
8717
- type: 'text block.unset'
8718
- at: [KeyedSegment]
8719
- props: Array<'level' | 'listItem' | 'style'>
8720
- }
8721
8497
  | ({
8722
8498
  type: 'serialization.failure'
8723
8499
  mimeType: `${string}/${string}`
@@ -8844,9 +8620,9 @@ declare const editorMachine: StateMachine<
8844
8620
  }
8845
8621
  }
8846
8622
  | {
8847
- [props: string]: unknown
8848
8623
  type: 'block.set'
8849
8624
  at: [KeyedSegment]
8625
+ props: Record<string, unknown>
8850
8626
  }
8851
8627
  | {
8852
8628
  type: 'block.unset'
@@ -8865,7 +8641,10 @@ declare const editorMachine: StateMachine<
8865
8641
  | {
8866
8642
  type: 'decorator.add'
8867
8643
  decorator: string
8868
- selection?: NonNullable<EditorSelection>
8644
+ offsets?: {
8645
+ anchor: BlockOffset_2
8646
+ focus: BlockOffset_2
8647
+ }
8869
8648
  }
8870
8649
  | {
8871
8650
  type: 'decorator.remove'
@@ -9009,18 +8788,6 @@ declare const editorMachine: StateMachine<
9009
8788
  type: 'style.toggle'
9010
8789
  style: string
9011
8790
  }
9012
- | {
9013
- type: 'text block.set'
9014
- at: [KeyedSegment]
9015
- level?: number
9016
- listItem?: string
9017
- style?: string
9018
- }
9019
- | {
9020
- type: 'text block.unset'
9021
- at: [KeyedSegment]
9022
- props: Array<'level' | 'listItem' | 'style'>
9023
- }
9024
8791
  | ({
9025
8792
  type: 'serialization.failure'
9026
8793
  mimeType: `${string}/${string}`
@@ -9221,9 +8988,9 @@ declare const editorMachine: StateMachine<
9221
8988
  }
9222
8989
  }
9223
8990
  | {
9224
- [props: string]: unknown
9225
8991
  type: 'block.set'
9226
8992
  at: [KeyedSegment]
8993
+ props: Record<string, unknown>
9227
8994
  }
9228
8995
  | {
9229
8996
  type: 'block.unset'
@@ -9242,7 +9009,10 @@ declare const editorMachine: StateMachine<
9242
9009
  | {
9243
9010
  type: 'decorator.add'
9244
9011
  decorator: string
9245
- selection?: NonNullable<EditorSelection>
9012
+ offsets?: {
9013
+ anchor: BlockOffset_2
9014
+ focus: BlockOffset_2
9015
+ }
9246
9016
  }
9247
9017
  | {
9248
9018
  type: 'decorator.remove'
@@ -9386,18 +9156,6 @@ declare const editorMachine: StateMachine<
9386
9156
  type: 'style.toggle'
9387
9157
  style: string
9388
9158
  }
9389
- | {
9390
- type: 'text block.set'
9391
- at: [KeyedSegment]
9392
- level?: number
9393
- listItem?: string
9394
- style?: string
9395
- }
9396
- | {
9397
- type: 'text block.unset'
9398
- at: [KeyedSegment]
9399
- props: Array<'level' | 'listItem' | 'style'>
9400
- }
9401
9159
  | ({
9402
9160
  type: 'serialization.failure'
9403
9161
  mimeType: `${string}/${string}`
@@ -9595,9 +9353,9 @@ declare const editorMachine: StateMachine<
9595
9353
  }
9596
9354
  }
9597
9355
  | {
9598
- [props: string]: unknown
9599
9356
  type: 'block.set'
9600
9357
  at: [KeyedSegment]
9358
+ props: Record<string, unknown>
9601
9359
  }
9602
9360
  | {
9603
9361
  type: 'block.unset'
@@ -9616,7 +9374,10 @@ declare const editorMachine: StateMachine<
9616
9374
  | {
9617
9375
  type: 'decorator.add'
9618
9376
  decorator: string
9619
- selection?: NonNullable<EditorSelection>
9377
+ offsets?: {
9378
+ anchor: BlockOffset_2
9379
+ focus: BlockOffset_2
9380
+ }
9620
9381
  }
9621
9382
  | {
9622
9383
  type: 'decorator.remove'
@@ -9760,18 +9521,6 @@ declare const editorMachine: StateMachine<
9760
9521
  type: 'style.toggle'
9761
9522
  style: string
9762
9523
  }
9763
- | {
9764
- type: 'text block.set'
9765
- at: [KeyedSegment]
9766
- level?: number
9767
- listItem?: string
9768
- style?: string
9769
- }
9770
- | {
9771
- type: 'text block.unset'
9772
- at: [KeyedSegment]
9773
- props: Array<'level' | 'listItem' | 'style'>
9774
- }
9775
9524
  | ({
9776
9525
  type: 'serialization.failure'
9777
9526
  mimeType: `${string}/${string}`
@@ -10117,9 +9866,9 @@ declare const editorMachine: StateMachine<
10117
9866
  }
10118
9867
  }
10119
9868
  | {
10120
- [props: string]: unknown
10121
9869
  type: 'block.set'
10122
9870
  at: [KeyedSegment]
9871
+ props: Record<string, unknown>
10123
9872
  }
10124
9873
  | {
10125
9874
  type: 'block.unset'
@@ -10138,7 +9887,10 @@ declare const editorMachine: StateMachine<
10138
9887
  | {
10139
9888
  type: 'decorator.add'
10140
9889
  decorator: string
10141
- selection?: NonNullable<EditorSelection>
9890
+ offsets?: {
9891
+ anchor: BlockOffset_2
9892
+ focus: BlockOffset_2
9893
+ }
10142
9894
  }
10143
9895
  | {
10144
9896
  type: 'decorator.remove'
@@ -10282,18 +10034,6 @@ declare const editorMachine: StateMachine<
10282
10034
  type: 'style.toggle'
10283
10035
  style: string
10284
10036
  }
10285
- | {
10286
- type: 'text block.set'
10287
- at: [KeyedSegment]
10288
- level?: number
10289
- listItem?: string
10290
- style?: string
10291
- }
10292
- | {
10293
- type: 'text block.unset'
10294
- at: [KeyedSegment]
10295
- props: Array<'level' | 'listItem' | 'style'>
10296
- }
10297
10037
  | ({
10298
10038
  type: 'serialization.failure'
10299
10039
  mimeType: `${string}/${string}`
@@ -10473,9 +10213,9 @@ declare const editorMachine: StateMachine<
10473
10213
  }
10474
10214
  }
10475
10215
  | {
10476
- [props: string]: unknown
10477
10216
  type: 'block.set'
10478
10217
  at: [KeyedSegment]
10218
+ props: Record<string, unknown>
10479
10219
  }
10480
10220
  | {
10481
10221
  type: 'block.unset'
@@ -10494,7 +10234,10 @@ declare const editorMachine: StateMachine<
10494
10234
  | {
10495
10235
  type: 'decorator.add'
10496
10236
  decorator: string
10497
- selection?: NonNullable<EditorSelection>
10237
+ offsets?: {
10238
+ anchor: BlockOffset_2
10239
+ focus: BlockOffset_2
10240
+ }
10498
10241
  }
10499
10242
  | {
10500
10243
  type: 'decorator.remove'
@@ -10638,18 +10381,6 @@ declare const editorMachine: StateMachine<
10638
10381
  type: 'style.toggle'
10639
10382
  style: string
10640
10383
  }
10641
- | {
10642
- type: 'text block.set'
10643
- at: [KeyedSegment]
10644
- level?: number
10645
- listItem?: string
10646
- style?: string
10647
- }
10648
- | {
10649
- type: 'text block.unset'
10650
- at: [KeyedSegment]
10651
- props: Array<'level' | 'listItem' | 'style'>
10652
- }
10653
10384
  | ({
10654
10385
  type: 'serialization.failure'
10655
10386
  mimeType: `${string}/${string}`
@@ -10745,9 +10476,9 @@ declare const editorMachine: StateMachine<
10745
10476
  value: Array<PortableTextBlock> | undefined
10746
10477
  },
10747
10478
  | {
10748
- [props: string]: unknown
10749
10479
  type: 'block.set'
10750
10480
  at: [KeyedSegment]
10481
+ props: Record<string, unknown>
10751
10482
  }
10752
10483
  | {
10753
10484
  type: 'block.unset'
@@ -10779,9 +10510,9 @@ declare const editorMachine: StateMachine<
10779
10510
  }
10780
10511
  }
10781
10512
  | {
10782
- [props: string]: unknown
10783
10513
  type: 'block.set'
10784
10514
  at: [KeyedSegment]
10515
+ props: Record<string, unknown>
10785
10516
  }
10786
10517
  | {
10787
10518
  type: 'block.unset'
@@ -10800,7 +10531,10 @@ declare const editorMachine: StateMachine<
10800
10531
  | {
10801
10532
  type: 'decorator.add'
10802
10533
  decorator: string
10803
- selection?: NonNullable<EditorSelection>
10534
+ offsets?: {
10535
+ anchor: BlockOffset_2
10536
+ focus: BlockOffset_2
10537
+ }
10804
10538
  }
10805
10539
  | {
10806
10540
  type: 'decorator.remove'
@@ -10944,18 +10678,6 @@ declare const editorMachine: StateMachine<
10944
10678
  type: 'style.toggle'
10945
10679
  style: string
10946
10680
  }
10947
- | {
10948
- type: 'text block.set'
10949
- at: [KeyedSegment]
10950
- level?: number
10951
- listItem?: string
10952
- style?: string
10953
- }
10954
- | {
10955
- type: 'text block.unset'
10956
- at: [KeyedSegment]
10957
- props: Array<'level' | 'listItem' | 'style'>
10958
- }
10959
10681
  | ({
10960
10682
  type: 'serialization.failure'
10961
10683
  mimeType: `${string}/${string}`
@@ -11135,9 +10857,9 @@ declare const editorMachine: StateMachine<
11135
10857
  }
11136
10858
  }
11137
10859
  | {
11138
- [props: string]: unknown
11139
10860
  type: 'block.set'
11140
10861
  at: [KeyedSegment]
10862
+ props: Record<string, unknown>
11141
10863
  }
11142
10864
  | {
11143
10865
  type: 'block.unset'
@@ -11156,7 +10878,10 @@ declare const editorMachine: StateMachine<
11156
10878
  | {
11157
10879
  type: 'decorator.add'
11158
10880
  decorator: string
11159
- selection?: NonNullable<EditorSelection>
10881
+ offsets?: {
10882
+ anchor: BlockOffset_2
10883
+ focus: BlockOffset_2
10884
+ }
11160
10885
  }
11161
10886
  | {
11162
10887
  type: 'decorator.remove'
@@ -11300,18 +11025,6 @@ declare const editorMachine: StateMachine<
11300
11025
  type: 'style.toggle'
11301
11026
  style: string
11302
11027
  }
11303
- | {
11304
- type: 'text block.set'
11305
- at: [KeyedSegment]
11306
- level?: number
11307
- listItem?: string
11308
- style?: string
11309
- }
11310
- | {
11311
- type: 'text block.unset'
11312
- at: [KeyedSegment]
11313
- props: Array<'level' | 'listItem' | 'style'>
11314
- }
11315
11028
  | ({
11316
11029
  type: 'serialization.failure'
11317
11030
  mimeType: `${string}/${string}`
@@ -11434,9 +11147,9 @@ declare const editorMachine: StateMachine<
11434
11147
  }
11435
11148
  }
11436
11149
  | {
11437
- [props: string]: unknown
11438
11150
  type: 'block.set'
11439
11151
  at: [KeyedSegment]
11152
+ props: Record<string, unknown>
11440
11153
  }
11441
11154
  | {
11442
11155
  type: 'block.unset'
@@ -11455,7 +11168,10 @@ declare const editorMachine: StateMachine<
11455
11168
  | {
11456
11169
  type: 'decorator.add'
11457
11170
  decorator: string
11458
- selection?: NonNullable<EditorSelection>
11171
+ offsets?: {
11172
+ anchor: BlockOffset_2
11173
+ focus: BlockOffset_2
11174
+ }
11459
11175
  }
11460
11176
  | {
11461
11177
  type: 'decorator.remove'
@@ -11599,18 +11315,6 @@ declare const editorMachine: StateMachine<
11599
11315
  type: 'style.toggle'
11600
11316
  style: string
11601
11317
  }
11602
- | {
11603
- type: 'text block.set'
11604
- at: [KeyedSegment]
11605
- level?: number
11606
- listItem?: string
11607
- style?: string
11608
- }
11609
- | {
11610
- type: 'text block.unset'
11611
- at: [KeyedSegment]
11612
- props: Array<'level' | 'listItem' | 'style'>
11613
- }
11614
11318
  | ({
11615
11319
  type: 'serialization.failure'
11616
11320
  mimeType: `${string}/${string}`
@@ -11790,9 +11494,9 @@ declare const editorMachine: StateMachine<
11790
11494
  }
11791
11495
  }
11792
11496
  | {
11793
- [props: string]: unknown
11794
11497
  type: 'block.set'
11795
11498
  at: [KeyedSegment]
11499
+ props: Record<string, unknown>
11796
11500
  }
11797
11501
  | {
11798
11502
  type: 'block.unset'
@@ -11811,7 +11515,10 @@ declare const editorMachine: StateMachine<
11811
11515
  | {
11812
11516
  type: 'decorator.add'
11813
11517
  decorator: string
11814
- selection?: NonNullable<EditorSelection>
11518
+ offsets?: {
11519
+ anchor: BlockOffset_2
11520
+ focus: BlockOffset_2
11521
+ }
11815
11522
  }
11816
11523
  | {
11817
11524
  type: 'decorator.remove'
@@ -11955,18 +11662,6 @@ declare const editorMachine: StateMachine<
11955
11662
  type: 'style.toggle'
11956
11663
  style: string
11957
11664
  }
11958
- | {
11959
- type: 'text block.set'
11960
- at: [KeyedSegment]
11961
- level?: number
11962
- listItem?: string
11963
- style?: string
11964
- }
11965
- | {
11966
- type: 'text block.unset'
11967
- at: [KeyedSegment]
11968
- props: Array<'level' | 'listItem' | 'style'>
11969
- }
11970
11665
  | ({
11971
11666
  type: 'serialization.failure'
11972
11667
  mimeType: `${string}/${string}`
@@ -12089,9 +11784,9 @@ declare const editorMachine: StateMachine<
12089
11784
  }
12090
11785
  }
12091
11786
  | {
12092
- [props: string]: unknown
12093
11787
  type: 'block.set'
12094
11788
  at: [KeyedSegment]
11789
+ props: Record<string, unknown>
12095
11790
  }
12096
11791
  | {
12097
11792
  type: 'block.unset'
@@ -12110,7 +11805,10 @@ declare const editorMachine: StateMachine<
12110
11805
  | {
12111
11806
  type: 'decorator.add'
12112
11807
  decorator: string
12113
- selection?: NonNullable<EditorSelection>
11808
+ offsets?: {
11809
+ anchor: BlockOffset_2
11810
+ focus: BlockOffset_2
11811
+ }
12114
11812
  }
12115
11813
  | {
12116
11814
  type: 'decorator.remove'
@@ -12254,18 +11952,6 @@ declare const editorMachine: StateMachine<
12254
11952
  type: 'style.toggle'
12255
11953
  style: string
12256
11954
  }
12257
- | {
12258
- type: 'text block.set'
12259
- at: [KeyedSegment]
12260
- level?: number
12261
- listItem?: string
12262
- style?: string
12263
- }
12264
- | {
12265
- type: 'text block.unset'
12266
- at: [KeyedSegment]
12267
- props: Array<'level' | 'listItem' | 'style'>
12268
- }
12269
11955
  | ({
12270
11956
  type: 'serialization.failure'
12271
11957
  mimeType: `${string}/${string}`
@@ -12445,9 +12131,9 @@ declare const editorMachine: StateMachine<
12445
12131
  }
12446
12132
  }
12447
12133
  | {
12448
- [props: string]: unknown
12449
12134
  type: 'block.set'
12450
12135
  at: [KeyedSegment]
12136
+ props: Record<string, unknown>
12451
12137
  }
12452
12138
  | {
12453
12139
  type: 'block.unset'
@@ -12466,7 +12152,10 @@ declare const editorMachine: StateMachine<
12466
12152
  | {
12467
12153
  type: 'decorator.add'
12468
12154
  decorator: string
12469
- selection?: NonNullable<EditorSelection>
12155
+ offsets?: {
12156
+ anchor: BlockOffset_2
12157
+ focus: BlockOffset_2
12158
+ }
12470
12159
  }
12471
12160
  | {
12472
12161
  type: 'decorator.remove'
@@ -12610,18 +12299,6 @@ declare const editorMachine: StateMachine<
12610
12299
  type: 'style.toggle'
12611
12300
  style: string
12612
12301
  }
12613
- | {
12614
- type: 'text block.set'
12615
- at: [KeyedSegment]
12616
- level?: number
12617
- listItem?: string
12618
- style?: string
12619
- }
12620
- | {
12621
- type: 'text block.unset'
12622
- at: [KeyedSegment]
12623
- props: Array<'level' | 'listItem' | 'style'>
12624
- }
12625
12302
  | ({
12626
12303
  type: 'serialization.failure'
12627
12304
  mimeType: `${string}/${string}`
@@ -12719,7 +12396,10 @@ declare const editorMachine: StateMachine<
12719
12396
  | {
12720
12397
  type: 'decorator.add'
12721
12398
  decorator: string
12722
- selection?: NonNullable<EditorSelection>
12399
+ offsets?: {
12400
+ anchor: BlockOffset_2
12401
+ focus: BlockOffset_2
12402
+ }
12723
12403
  }
12724
12404
  | {
12725
12405
  type: 'decorator.remove'
@@ -12754,9 +12434,9 @@ declare const editorMachine: StateMachine<
12754
12434
  }
12755
12435
  }
12756
12436
  | {
12757
- [props: string]: unknown
12758
12437
  type: 'block.set'
12759
12438
  at: [KeyedSegment]
12439
+ props: Record<string, unknown>
12760
12440
  }
12761
12441
  | {
12762
12442
  type: 'block.unset'
@@ -12775,7 +12455,10 @@ declare const editorMachine: StateMachine<
12775
12455
  | {
12776
12456
  type: 'decorator.add'
12777
12457
  decorator: string
12778
- selection?: NonNullable<EditorSelection>
12458
+ offsets?: {
12459
+ anchor: BlockOffset_2
12460
+ focus: BlockOffset_2
12461
+ }
12779
12462
  }
12780
12463
  | {
12781
12464
  type: 'decorator.remove'
@@ -12919,18 +12602,6 @@ declare const editorMachine: StateMachine<
12919
12602
  type: 'style.toggle'
12920
12603
  style: string
12921
12604
  }
12922
- | {
12923
- type: 'text block.set'
12924
- at: [KeyedSegment]
12925
- level?: number
12926
- listItem?: string
12927
- style?: string
12928
- }
12929
- | {
12930
- type: 'text block.unset'
12931
- at: [KeyedSegment]
12932
- props: Array<'level' | 'listItem' | 'style'>
12933
- }
12934
12605
  | ({
12935
12606
  type: 'serialization.failure'
12936
12607
  mimeType: `${string}/${string}`
@@ -13110,9 +12781,9 @@ declare const editorMachine: StateMachine<
13110
12781
  }
13111
12782
  }
13112
12783
  | {
13113
- [props: string]: unknown
13114
12784
  type: 'block.set'
13115
12785
  at: [KeyedSegment]
12786
+ props: Record<string, unknown>
13116
12787
  }
13117
12788
  | {
13118
12789
  type: 'block.unset'
@@ -13131,7 +12802,10 @@ declare const editorMachine: StateMachine<
13131
12802
  | {
13132
12803
  type: 'decorator.add'
13133
12804
  decorator: string
13134
- selection?: NonNullable<EditorSelection>
12805
+ offsets?: {
12806
+ anchor: BlockOffset_2
12807
+ focus: BlockOffset_2
12808
+ }
13135
12809
  }
13136
12810
  | {
13137
12811
  type: 'decorator.remove'
@@ -13275,18 +12949,6 @@ declare const editorMachine: StateMachine<
13275
12949
  type: 'style.toggle'
13276
12950
  style: string
13277
12951
  }
13278
- | {
13279
- type: 'text block.set'
13280
- at: [KeyedSegment]
13281
- level?: number
13282
- listItem?: string
13283
- style?: string
13284
- }
13285
- | {
13286
- type: 'text block.unset'
13287
- at: [KeyedSegment]
13288
- props: Array<'level' | 'listItem' | 'style'>
13289
- }
13290
12952
  | ({
13291
12953
  type: 'serialization.failure'
13292
12954
  mimeType: `${string}/${string}`
@@ -13423,9 +13085,9 @@ declare const editorMachine: StateMachine<
13423
13085
  }
13424
13086
  }
13425
13087
  | {
13426
- [props: string]: unknown
13427
13088
  type: 'block.set'
13428
13089
  at: [KeyedSegment]
13090
+ props: Record<string, unknown>
13429
13091
  }
13430
13092
  | {
13431
13093
  type: 'block.unset'
@@ -13444,7 +13106,10 @@ declare const editorMachine: StateMachine<
13444
13106
  | {
13445
13107
  type: 'decorator.add'
13446
13108
  decorator: string
13447
- selection?: NonNullable<EditorSelection>
13109
+ offsets?: {
13110
+ anchor: BlockOffset_2
13111
+ focus: BlockOffset_2
13112
+ }
13448
13113
  }
13449
13114
  | {
13450
13115
  type: 'decorator.remove'
@@ -13588,18 +13253,6 @@ declare const editorMachine: StateMachine<
13588
13253
  type: 'style.toggle'
13589
13254
  style: string
13590
13255
  }
13591
- | {
13592
- type: 'text block.set'
13593
- at: [KeyedSegment]
13594
- level?: number
13595
- listItem?: string
13596
- style?: string
13597
- }
13598
- | {
13599
- type: 'text block.unset'
13600
- at: [KeyedSegment]
13601
- props: Array<'level' | 'listItem' | 'style'>
13602
- }
13603
13256
  | ({
13604
13257
  type: 'serialization.failure'
13605
13258
  mimeType: `${string}/${string}`
@@ -13779,9 +13432,9 @@ declare const editorMachine: StateMachine<
13779
13432
  }
13780
13433
  }
13781
13434
  | {
13782
- [props: string]: unknown
13783
13435
  type: 'block.set'
13784
13436
  at: [KeyedSegment]
13437
+ props: Record<string, unknown>
13785
13438
  }
13786
13439
  | {
13787
13440
  type: 'block.unset'
@@ -13800,7 +13453,10 @@ declare const editorMachine: StateMachine<
13800
13453
  | {
13801
13454
  type: 'decorator.add'
13802
13455
  decorator: string
13803
- selection?: NonNullable<EditorSelection>
13456
+ offsets?: {
13457
+ anchor: BlockOffset_2
13458
+ focus: BlockOffset_2
13459
+ }
13804
13460
  }
13805
13461
  | {
13806
13462
  type: 'decorator.remove'
@@ -13944,18 +13600,6 @@ declare const editorMachine: StateMachine<
13944
13600
  type: 'style.toggle'
13945
13601
  style: string
13946
13602
  }
13947
- | {
13948
- type: 'text block.set'
13949
- at: [KeyedSegment]
13950
- level?: number
13951
- listItem?: string
13952
- style?: string
13953
- }
13954
- | {
13955
- type: 'text block.unset'
13956
- at: [KeyedSegment]
13957
- props: Array<'level' | 'listItem' | 'style'>
13958
- }
13959
13603
  | ({
13960
13604
  type: 'serialization.failure'
13961
13605
  mimeType: `${string}/${string}`
@@ -14078,9 +13722,9 @@ declare const editorMachine: StateMachine<
14078
13722
  }
14079
13723
  }
14080
13724
  | {
14081
- [props: string]: unknown
14082
13725
  type: 'block.set'
14083
13726
  at: [KeyedSegment]
13727
+ props: Record<string, unknown>
14084
13728
  }
14085
13729
  | {
14086
13730
  type: 'block.unset'
@@ -14099,7 +13743,10 @@ declare const editorMachine: StateMachine<
14099
13743
  | {
14100
13744
  type: 'decorator.add'
14101
13745
  decorator: string
14102
- selection?: NonNullable<EditorSelection>
13746
+ offsets?: {
13747
+ anchor: BlockOffset_2
13748
+ focus: BlockOffset_2
13749
+ }
14103
13750
  }
14104
13751
  | {
14105
13752
  type: 'decorator.remove'
@@ -14243,18 +13890,6 @@ declare const editorMachine: StateMachine<
14243
13890
  type: 'style.toggle'
14244
13891
  style: string
14245
13892
  }
14246
- | {
14247
- type: 'text block.set'
14248
- at: [KeyedSegment]
14249
- level?: number
14250
- listItem?: string
14251
- style?: string
14252
- }
14253
- | {
14254
- type: 'text block.unset'
14255
- at: [KeyedSegment]
14256
- props: Array<'level' | 'listItem' | 'style'>
14257
- }
14258
13893
  | ({
14259
13894
  type: 'serialization.failure'
14260
13895
  mimeType: `${string}/${string}`
@@ -14434,9 +14069,9 @@ declare const editorMachine: StateMachine<
14434
14069
  }
14435
14070
  }
14436
14071
  | {
14437
- [props: string]: unknown
14438
14072
  type: 'block.set'
14439
14073
  at: [KeyedSegment]
14074
+ props: Record<string, unknown>
14440
14075
  }
14441
14076
  | {
14442
14077
  type: 'block.unset'
@@ -14455,7 +14090,10 @@ declare const editorMachine: StateMachine<
14455
14090
  | {
14456
14091
  type: 'decorator.add'
14457
14092
  decorator: string
14458
- selection?: NonNullable<EditorSelection>
14093
+ offsets?: {
14094
+ anchor: BlockOffset_2
14095
+ focus: BlockOffset_2
14096
+ }
14459
14097
  }
14460
14098
  | {
14461
14099
  type: 'decorator.remove'
@@ -14599,18 +14237,6 @@ declare const editorMachine: StateMachine<
14599
14237
  type: 'style.toggle'
14600
14238
  style: string
14601
14239
  }
14602
- | {
14603
- type: 'text block.set'
14604
- at: [KeyedSegment]
14605
- level?: number
14606
- listItem?: string
14607
- style?: string
14608
- }
14609
- | {
14610
- type: 'text block.unset'
14611
- at: [KeyedSegment]
14612
- props: Array<'level' | 'listItem' | 'style'>
14613
- }
14614
14240
  | ({
14615
14241
  type: 'serialization.failure'
14616
14242
  mimeType: `${string}/${string}`
@@ -14736,9 +14362,9 @@ declare const editorMachine: StateMachine<
14736
14362
  }
14737
14363
  }
14738
14364
  | {
14739
- [props: string]: unknown
14740
14365
  type: 'block.set'
14741
14366
  at: [KeyedSegment]
14367
+ props: Record<string, unknown>
14742
14368
  }
14743
14369
  | {
14744
14370
  type: 'block.unset'
@@ -14757,7 +14383,10 @@ declare const editorMachine: StateMachine<
14757
14383
  | {
14758
14384
  type: 'decorator.add'
14759
14385
  decorator: string
14760
- selection?: NonNullable<EditorSelection>
14386
+ offsets?: {
14387
+ anchor: BlockOffset_2
14388
+ focus: BlockOffset_2
14389
+ }
14761
14390
  }
14762
14391
  | {
14763
14392
  type: 'decorator.remove'
@@ -14901,18 +14530,6 @@ declare const editorMachine: StateMachine<
14901
14530
  type: 'style.toggle'
14902
14531
  style: string
14903
14532
  }
14904
- | {
14905
- type: 'text block.set'
14906
- at: [KeyedSegment]
14907
- level?: number
14908
- listItem?: string
14909
- style?: string
14910
- }
14911
- | {
14912
- type: 'text block.unset'
14913
- at: [KeyedSegment]
14914
- props: Array<'level' | 'listItem' | 'style'>
14915
- }
14916
14533
  | ({
14917
14534
  type: 'serialization.failure'
14918
14535
  mimeType: `${string}/${string}`
@@ -15092,9 +14709,9 @@ declare const editorMachine: StateMachine<
15092
14709
  }
15093
14710
  }
15094
14711
  | {
15095
- [props: string]: unknown
15096
14712
  type: 'block.set'
15097
14713
  at: [KeyedSegment]
14714
+ props: Record<string, unknown>
15098
14715
  }
15099
14716
  | {
15100
14717
  type: 'block.unset'
@@ -15113,7 +14730,10 @@ declare const editorMachine: StateMachine<
15113
14730
  | {
15114
14731
  type: 'decorator.add'
15115
14732
  decorator: string
15116
- selection?: NonNullable<EditorSelection>
14733
+ offsets?: {
14734
+ anchor: BlockOffset_2
14735
+ focus: BlockOffset_2
14736
+ }
15117
14737
  }
15118
14738
  | {
15119
14739
  type: 'decorator.remove'
@@ -15257,18 +14877,6 @@ declare const editorMachine: StateMachine<
15257
14877
  type: 'style.toggle'
15258
14878
  style: string
15259
14879
  }
15260
- | {
15261
- type: 'text block.set'
15262
- at: [KeyedSegment]
15263
- level?: number
15264
- listItem?: string
15265
- style?: string
15266
- }
15267
- | {
15268
- type: 'text block.unset'
15269
- at: [KeyedSegment]
15270
- props: Array<'level' | 'listItem' | 'style'>
15271
- }
15272
14880
  | ({
15273
14881
  type: 'serialization.failure'
15274
14882
  mimeType: `${string}/${string}`
@@ -15445,9 +15053,9 @@ declare const editorMachine: StateMachine<
15445
15053
  }
15446
15054
  }
15447
15055
  | {
15448
- [props: string]: unknown
15449
15056
  type: 'block.set'
15450
15057
  at: [KeyedSegment]
15058
+ props: Record<string, unknown>
15451
15059
  }
15452
15060
  | {
15453
15061
  type: 'block.unset'
@@ -15466,7 +15074,10 @@ declare const editorMachine: StateMachine<
15466
15074
  | {
15467
15075
  type: 'decorator.add'
15468
15076
  decorator: string
15469
- selection?: NonNullable<EditorSelection>
15077
+ offsets?: {
15078
+ anchor: BlockOffset_2
15079
+ focus: BlockOffset_2
15080
+ }
15470
15081
  }
15471
15082
  | {
15472
15083
  type: 'decorator.remove'
@@ -15610,18 +15221,6 @@ declare const editorMachine: StateMachine<
15610
15221
  type: 'style.toggle'
15611
15222
  style: string
15612
15223
  }
15613
- | {
15614
- type: 'text block.set'
15615
- at: [KeyedSegment]
15616
- level?: number
15617
- listItem?: string
15618
- style?: string
15619
- }
15620
- | {
15621
- type: 'text block.unset'
15622
- at: [KeyedSegment]
15623
- props: Array<'level' | 'listItem' | 'style'>
15624
- }
15625
15224
  | ({
15626
15225
  type: 'serialization.failure'
15627
15226
  mimeType: `${string}/${string}`
@@ -15801,9 +15400,9 @@ declare const editorMachine: StateMachine<
15801
15400
  }
15802
15401
  }
15803
15402
  | {
15804
- [props: string]: unknown
15805
15403
  type: 'block.set'
15806
15404
  at: [KeyedSegment]
15405
+ props: Record<string, unknown>
15807
15406
  }
15808
15407
  | {
15809
15408
  type: 'block.unset'
@@ -15822,7 +15421,10 @@ declare const editorMachine: StateMachine<
15822
15421
  | {
15823
15422
  type: 'decorator.add'
15824
15423
  decorator: string
15825
- selection?: NonNullable<EditorSelection>
15424
+ offsets?: {
15425
+ anchor: BlockOffset_2
15426
+ focus: BlockOffset_2
15427
+ }
15826
15428
  }
15827
15429
  | {
15828
15430
  type: 'decorator.remove'
@@ -15966,18 +15568,6 @@ declare const editorMachine: StateMachine<
15966
15568
  type: 'style.toggle'
15967
15569
  style: string
15968
15570
  }
15969
- | {
15970
- type: 'text block.set'
15971
- at: [KeyedSegment]
15972
- level?: number
15973
- listItem?: string
15974
- style?: string
15975
- }
15976
- | {
15977
- type: 'text block.unset'
15978
- at: [KeyedSegment]
15979
- props: Array<'level' | 'listItem' | 'style'>
15980
- }
15981
15571
  | ({
15982
15572
  type: 'serialization.failure'
15983
15573
  mimeType: `${string}/${string}`
@@ -16109,9 +15699,9 @@ declare const editorMachine: StateMachine<
16109
15699
  }
16110
15700
  }
16111
15701
  | {
16112
- [props: string]: unknown
16113
15702
  type: 'block.set'
16114
15703
  at: [KeyedSegment]
15704
+ props: Record<string, unknown>
16115
15705
  }
16116
15706
  | {
16117
15707
  type: 'block.unset'
@@ -16130,7 +15720,10 @@ declare const editorMachine: StateMachine<
16130
15720
  | {
16131
15721
  type: 'decorator.add'
16132
15722
  decorator: string
16133
- selection?: NonNullable<EditorSelection>
15723
+ offsets?: {
15724
+ anchor: BlockOffset_2
15725
+ focus: BlockOffset_2
15726
+ }
16134
15727
  }
16135
15728
  | {
16136
15729
  type: 'decorator.remove'
@@ -16274,18 +15867,6 @@ declare const editorMachine: StateMachine<
16274
15867
  type: 'style.toggle'
16275
15868
  style: string
16276
15869
  }
16277
- | {
16278
- type: 'text block.set'
16279
- at: [KeyedSegment]
16280
- level?: number
16281
- listItem?: string
16282
- style?: string
16283
- }
16284
- | {
16285
- type: 'text block.unset'
16286
- at: [KeyedSegment]
16287
- props: Array<'level' | 'listItem' | 'style'>
16288
- }
16289
15870
  | ({
16290
15871
  type: 'serialization.failure'
16291
15872
  mimeType: `${string}/${string}`
@@ -16465,9 +16046,9 @@ declare const editorMachine: StateMachine<
16465
16046
  }
16466
16047
  }
16467
16048
  | {
16468
- [props: string]: unknown
16469
16049
  type: 'block.set'
16470
16050
  at: [KeyedSegment]
16051
+ props: Record<string, unknown>
16471
16052
  }
16472
16053
  | {
16473
16054
  type: 'block.unset'
@@ -16486,7 +16067,10 @@ declare const editorMachine: StateMachine<
16486
16067
  | {
16487
16068
  type: 'decorator.add'
16488
16069
  decorator: string
16489
- selection?: NonNullable<EditorSelection>
16070
+ offsets?: {
16071
+ anchor: BlockOffset_2
16072
+ focus: BlockOffset_2
16073
+ }
16490
16074
  }
16491
16075
  | {
16492
16076
  type: 'decorator.remove'
@@ -16630,18 +16214,6 @@ declare const editorMachine: StateMachine<
16630
16214
  type: 'style.toggle'
16631
16215
  style: string
16632
16216
  }
16633
- | {
16634
- type: 'text block.set'
16635
- at: [KeyedSegment]
16636
- level?: number
16637
- listItem?: string
16638
- style?: string
16639
- }
16640
- | {
16641
- type: 'text block.unset'
16642
- at: [KeyedSegment]
16643
- props: Array<'level' | 'listItem' | 'style'>
16644
- }
16645
16217
  | ({
16646
16218
  type: 'serialization.failure'
16647
16219
  mimeType: `${string}/${string}`
@@ -16774,9 +16346,9 @@ declare const editorMachine: StateMachine<
16774
16346
  }
16775
16347
  }
16776
16348
  | {
16777
- [props: string]: unknown
16778
16349
  type: 'block.set'
16779
16350
  at: [KeyedSegment]
16351
+ props: Record<string, unknown>
16780
16352
  }
16781
16353
  | {
16782
16354
  type: 'block.unset'
@@ -16795,7 +16367,10 @@ declare const editorMachine: StateMachine<
16795
16367
  | {
16796
16368
  type: 'decorator.add'
16797
16369
  decorator: string
16798
- selection?: NonNullable<EditorSelection>
16370
+ offsets?: {
16371
+ anchor: BlockOffset_2
16372
+ focus: BlockOffset_2
16373
+ }
16799
16374
  }
16800
16375
  | {
16801
16376
  type: 'decorator.remove'
@@ -16939,18 +16514,6 @@ declare const editorMachine: StateMachine<
16939
16514
  type: 'style.toggle'
16940
16515
  style: string
16941
16516
  }
16942
- | {
16943
- type: 'text block.set'
16944
- at: [KeyedSegment]
16945
- level?: number
16946
- listItem?: string
16947
- style?: string
16948
- }
16949
- | {
16950
- type: 'text block.unset'
16951
- at: [KeyedSegment]
16952
- props: Array<'level' | 'listItem' | 'style'>
16953
- }
16954
16517
  | ({
16955
16518
  type: 'serialization.failure'
16956
16519
  mimeType: `${string}/${string}`
@@ -17130,9 +16693,9 @@ declare const editorMachine: StateMachine<
17130
16693
  }
17131
16694
  }
17132
16695
  | {
17133
- [props: string]: unknown
17134
16696
  type: 'block.set'
17135
16697
  at: [KeyedSegment]
16698
+ props: Record<string, unknown>
17136
16699
  }
17137
16700
  | {
17138
16701
  type: 'block.unset'
@@ -17151,7 +16714,10 @@ declare const editorMachine: StateMachine<
17151
16714
  | {
17152
16715
  type: 'decorator.add'
17153
16716
  decorator: string
17154
- selection?: NonNullable<EditorSelection>
16717
+ offsets?: {
16718
+ anchor: BlockOffset_2
16719
+ focus: BlockOffset_2
16720
+ }
17155
16721
  }
17156
16722
  | {
17157
16723
  type: 'decorator.remove'
@@ -17295,18 +16861,6 @@ declare const editorMachine: StateMachine<
17295
16861
  type: 'style.toggle'
17296
16862
  style: string
17297
16863
  }
17298
- | {
17299
- type: 'text block.set'
17300
- at: [KeyedSegment]
17301
- level?: number
17302
- listItem?: string
17303
- style?: string
17304
- }
17305
- | {
17306
- type: 'text block.unset'
17307
- at: [KeyedSegment]
17308
- props: Array<'level' | 'listItem' | 'style'>
17309
- }
17310
16864
  | ({
17311
16865
  type: 'serialization.failure'
17312
16866
  mimeType: `${string}/${string}`
@@ -17430,9 +16984,9 @@ declare const editorMachine: StateMachine<
17430
16984
  }
17431
16985
  }
17432
16986
  | {
17433
- [props: string]: unknown
17434
16987
  type: 'block.set'
17435
16988
  at: [KeyedSegment]
16989
+ props: Record<string, unknown>
17436
16990
  }
17437
16991
  | {
17438
16992
  type: 'block.unset'
@@ -17451,7 +17005,10 @@ declare const editorMachine: StateMachine<
17451
17005
  | {
17452
17006
  type: 'decorator.add'
17453
17007
  decorator: string
17454
- selection?: NonNullable<EditorSelection>
17008
+ offsets?: {
17009
+ anchor: BlockOffset_2
17010
+ focus: BlockOffset_2
17011
+ }
17455
17012
  }
17456
17013
  | {
17457
17014
  type: 'decorator.remove'
@@ -17595,18 +17152,6 @@ declare const editorMachine: StateMachine<
17595
17152
  type: 'style.toggle'
17596
17153
  style: string
17597
17154
  }
17598
- | {
17599
- type: 'text block.set'
17600
- at: [KeyedSegment]
17601
- level?: number
17602
- listItem?: string
17603
- style?: string
17604
- }
17605
- | {
17606
- type: 'text block.unset'
17607
- at: [KeyedSegment]
17608
- props: Array<'level' | 'listItem' | 'style'>
17609
- }
17610
17155
  | ({
17611
17156
  type: 'serialization.failure'
17612
17157
  mimeType: `${string}/${string}`
@@ -17786,9 +17331,9 @@ declare const editorMachine: StateMachine<
17786
17331
  }
17787
17332
  }
17788
17333
  | {
17789
- [props: string]: unknown
17790
17334
  type: 'block.set'
17791
17335
  at: [KeyedSegment]
17336
+ props: Record<string, unknown>
17792
17337
  }
17793
17338
  | {
17794
17339
  type: 'block.unset'
@@ -17807,7 +17352,10 @@ declare const editorMachine: StateMachine<
17807
17352
  | {
17808
17353
  type: 'decorator.add'
17809
17354
  decorator: string
17810
- selection?: NonNullable<EditorSelection>
17355
+ offsets?: {
17356
+ anchor: BlockOffset_2
17357
+ focus: BlockOffset_2
17358
+ }
17811
17359
  }
17812
17360
  | {
17813
17361
  type: 'decorator.remove'
@@ -17951,18 +17499,6 @@ declare const editorMachine: StateMachine<
17951
17499
  type: 'style.toggle'
17952
17500
  style: string
17953
17501
  }
17954
- | {
17955
- type: 'text block.set'
17956
- at: [KeyedSegment]
17957
- level?: number
17958
- listItem?: string
17959
- style?: string
17960
- }
17961
- | {
17962
- type: 'text block.unset'
17963
- at: [KeyedSegment]
17964
- props: Array<'level' | 'listItem' | 'style'>
17965
- }
17966
17502
  | ({
17967
17503
  type: 'serialization.failure'
17968
17504
  mimeType: `${string}/${string}`
@@ -18088,9 +17624,9 @@ declare const editorMachine: StateMachine<
18088
17624
  }
18089
17625
  }
18090
17626
  | {
18091
- [props: string]: unknown
18092
17627
  type: 'block.set'
18093
17628
  at: [KeyedSegment]
17629
+ props: Record<string, unknown>
18094
17630
  }
18095
17631
  | {
18096
17632
  type: 'block.unset'
@@ -18109,7 +17645,10 @@ declare const editorMachine: StateMachine<
18109
17645
  | {
18110
17646
  type: 'decorator.add'
18111
17647
  decorator: string
18112
- selection?: NonNullable<EditorSelection>
17648
+ offsets?: {
17649
+ anchor: BlockOffset_2
17650
+ focus: BlockOffset_2
17651
+ }
18113
17652
  }
18114
17653
  | {
18115
17654
  type: 'decorator.remove'
@@ -18253,18 +17792,6 @@ declare const editorMachine: StateMachine<
18253
17792
  type: 'style.toggle'
18254
17793
  style: string
18255
17794
  }
18256
- | {
18257
- type: 'text block.set'
18258
- at: [KeyedSegment]
18259
- level?: number
18260
- listItem?: string
18261
- style?: string
18262
- }
18263
- | {
18264
- type: 'text block.unset'
18265
- at: [KeyedSegment]
18266
- props: Array<'level' | 'listItem' | 'style'>
18267
- }
18268
17795
  | ({
18269
17796
  type: 'serialization.failure'
18270
17797
  mimeType: `${string}/${string}`
@@ -18444,9 +17971,9 @@ declare const editorMachine: StateMachine<
18444
17971
  }
18445
17972
  }
18446
17973
  | {
18447
- [props: string]: unknown
18448
17974
  type: 'block.set'
18449
17975
  at: [KeyedSegment]
17976
+ props: Record<string, unknown>
18450
17977
  }
18451
17978
  | {
18452
17979
  type: 'block.unset'
@@ -18465,7 +17992,10 @@ declare const editorMachine: StateMachine<
18465
17992
  | {
18466
17993
  type: 'decorator.add'
18467
17994
  decorator: string
18468
- selection?: NonNullable<EditorSelection>
17995
+ offsets?: {
17996
+ anchor: BlockOffset_2
17997
+ focus: BlockOffset_2
17998
+ }
18469
17999
  }
18470
18000
  | {
18471
18001
  type: 'decorator.remove'
@@ -18609,18 +18139,6 @@ declare const editorMachine: StateMachine<
18609
18139
  type: 'style.toggle'
18610
18140
  style: string
18611
18141
  }
18612
- | {
18613
- type: 'text block.set'
18614
- at: [KeyedSegment]
18615
- level?: number
18616
- listItem?: string
18617
- style?: string
18618
- }
18619
- | {
18620
- type: 'text block.unset'
18621
- at: [KeyedSegment]
18622
- props: Array<'level' | 'listItem' | 'style'>
18623
- }
18624
18142
  | ({
18625
18143
  type: 'serialization.failure'
18626
18144
  mimeType: `${string}/${string}`
@@ -18752,9 +18270,9 @@ declare const editorMachine: StateMachine<
18752
18270
  }
18753
18271
  }
18754
18272
  | {
18755
- [props: string]: unknown
18756
18273
  type: 'block.set'
18757
18274
  at: [KeyedSegment]
18275
+ props: Record<string, unknown>
18758
18276
  }
18759
18277
  | {
18760
18278
  type: 'block.unset'
@@ -18773,7 +18291,10 @@ declare const editorMachine: StateMachine<
18773
18291
  | {
18774
18292
  type: 'decorator.add'
18775
18293
  decorator: string
18776
- selection?: NonNullable<EditorSelection>
18294
+ offsets?: {
18295
+ anchor: BlockOffset_2
18296
+ focus: BlockOffset_2
18297
+ }
18777
18298
  }
18778
18299
  | {
18779
18300
  type: 'decorator.remove'
@@ -18917,18 +18438,6 @@ declare const editorMachine: StateMachine<
18917
18438
  type: 'style.toggle'
18918
18439
  style: string
18919
18440
  }
18920
- | {
18921
- type: 'text block.set'
18922
- at: [KeyedSegment]
18923
- level?: number
18924
- listItem?: string
18925
- style?: string
18926
- }
18927
- | {
18928
- type: 'text block.unset'
18929
- at: [KeyedSegment]
18930
- props: Array<'level' | 'listItem' | 'style'>
18931
- }
18932
18441
  | ({
18933
18442
  type: 'serialization.failure'
18934
18443
  mimeType: `${string}/${string}`
@@ -19108,9 +18617,9 @@ declare const editorMachine: StateMachine<
19108
18617
  }
19109
18618
  }
19110
18619
  | {
19111
- [props: string]: unknown
19112
18620
  type: 'block.set'
19113
18621
  at: [KeyedSegment]
18622
+ props: Record<string, unknown>
19114
18623
  }
19115
18624
  | {
19116
18625
  type: 'block.unset'
@@ -19129,7 +18638,10 @@ declare const editorMachine: StateMachine<
19129
18638
  | {
19130
18639
  type: 'decorator.add'
19131
18640
  decorator: string
19132
- selection?: NonNullable<EditorSelection>
18641
+ offsets?: {
18642
+ anchor: BlockOffset_2
18643
+ focus: BlockOffset_2
18644
+ }
19133
18645
  }
19134
18646
  | {
19135
18647
  type: 'decorator.remove'
@@ -19273,18 +18785,6 @@ declare const editorMachine: StateMachine<
19273
18785
  type: 'style.toggle'
19274
18786
  style: string
19275
18787
  }
19276
- | {
19277
- type: 'text block.set'
19278
- at: [KeyedSegment]
19279
- level?: number
19280
- listItem?: string
19281
- style?: string
19282
- }
19283
- | {
19284
- type: 'text block.unset'
19285
- at: [KeyedSegment]
19286
- props: Array<'level' | 'listItem' | 'style'>
19287
- }
19288
18788
  | ({
19289
18789
  type: 'serialization.failure'
19290
18790
  mimeType: `${string}/${string}`
@@ -19368,666 +18868,15 @@ declare const editorMachine: StateMachine<
19368
18868
  }
19369
18869
  readonly 'text block.*': {
19370
18870
  readonly actions: ActionFunction<
19371
- {
19372
- behaviors: Set<Behavior>
19373
- converters: Set<Converter>
19374
- keyGenerator: () => string
19375
- pendingEvents: Array<PatchEvent | MutationEvent>
19376
- schema: EditorSchema
19377
- initialReadOnly: boolean
19378
- maxBlocks: number | undefined
19379
- selection: EditorSelection
19380
- value: Array<PortableTextBlock> | undefined
19381
- },
19382
- | {
19383
- type: 'text block.set'
19384
- at: [KeyedSegment]
19385
- level?: number
19386
- listItem?: string
19387
- style?: string
19388
- }
19389
- | {
19390
- type: 'text block.unset'
19391
- at: [KeyedSegment]
19392
- props: Array<'level' | 'listItem' | 'style'>
19393
- },
19394
- | {
19395
- type: 'annotation.add'
19396
- annotation: {
19397
- name: string
19398
- value: {
19399
- [prop: string]: unknown
19400
- }
19401
- }
19402
- }
19403
- | {
19404
- type: 'annotation.remove'
19405
- annotation: {
19406
- name: string
19407
- }
19408
- }
19409
- | {
19410
- type: 'annotation.toggle'
19411
- annotation: {
19412
- name: string
19413
- value: {
19414
- [prop: string]: unknown
19415
- }
19416
- }
19417
- }
19418
- | {
19419
- [props: string]: unknown
19420
- type: 'block.set'
19421
- at: [KeyedSegment]
19422
- }
19423
- | {
19424
- type: 'block.unset'
19425
- at: [KeyedSegment]
19426
- props: Array<string>
19427
- }
19428
- | {
19429
- type: 'blur'
19430
- }
19431
- | {
19432
- type: 'data transfer.set'
19433
- data: string
19434
- dataTransfer: DataTransfer
19435
- mimeType: MIMEType_2
19436
- }
19437
- | {
19438
- type: 'decorator.add'
19439
- decorator: string
19440
- selection?: NonNullable<EditorSelection>
19441
- }
19442
- | {
19443
- type: 'decorator.remove'
19444
- decorator: string
19445
- }
19446
- | {
19447
- type: 'decorator.toggle'
19448
- decorator: string
19449
- }
19450
- | {
19451
- type: 'delete'
19452
- selection: NonNullable<EditorSelection>
19453
- }
19454
- | {
19455
- type: 'delete.backward'
19456
- unit: TextUnit
19457
- }
19458
- | {
19459
- type: 'delete.block'
19460
- blockPath: [KeyedSegment]
19461
- }
19462
- | {
19463
- type: 'delete.forward'
19464
- unit: TextUnit
19465
- }
19466
- | {
19467
- type: 'delete.text'
19468
- anchor: BlockOffset_2
19469
- focus: BlockOffset_2
19470
- }
19471
- | {
19472
- type: 'focus'
19473
- }
19474
- | {
19475
- type: 'history.redo'
19476
- }
19477
- | {
19478
- type: 'history.undo'
19479
- }
19480
- | {
19481
- type: 'insert.blocks'
19482
- blocks: Array<PortableTextBlock>
19483
- }
19484
- | {
19485
- type: 'insert.block object'
19486
- placement: 'auto' | 'after' | 'before'
19487
- blockObject: {
19488
- name: string
19489
- value?: {
19490
- [prop: string]: unknown
19491
- }
19492
- }
19493
- }
19494
- | {
19495
- type: 'insert.inline object'
19496
- inlineObject: {
19497
- name: string
19498
- value?: {
19499
- [prop: string]: unknown
19500
- }
19501
- }
19502
- }
19503
- | {
19504
- type: 'insert.break'
19505
- }
19506
- | {
19507
- type: 'insert.soft break'
19508
- }
19509
- | {
19510
- type: 'insert.block'
19511
- block: PortableTextBlock
19512
- placement: 'auto' | 'after' | 'before'
19513
- }
19514
- | {
19515
- type: 'insert.span'
19516
- text: string
19517
- annotations?: Array<{
19518
- name: string
19519
- value: {
19520
- [prop: string]: unknown
19521
- }
19522
- }>
19523
- decorators?: Array<string>
19524
- }
19525
- | {
19526
- type: 'insert.text'
19527
- text: string
19528
- options?: TextInsertTextOptions
19529
- }
19530
- | {
19531
- type: 'insert.text block'
19532
- placement: 'auto' | 'after' | 'before'
19533
- textBlock?: {
19534
- children?: PortableTextTextBlock['children']
19535
- }
19536
- }
19537
- | {
19538
- type: 'list item.add'
19539
- listItem: string
19540
- }
19541
- | {
19542
- type: 'list item.remove'
19543
- listItem: string
19544
- }
19545
- | {
19546
- type: 'list item.toggle'
19547
- listItem: string
19548
- }
19549
- | {
19550
- type: 'move.block'
19551
- at: [KeyedSegment]
19552
- to: [KeyedSegment]
19553
- }
19554
- | {
19555
- type: 'move.block down'
19556
- at: [KeyedSegment]
19557
- }
19558
- | {
19559
- type: 'move.block up'
19560
- at: [KeyedSegment]
19561
- }
19562
- | {
19563
- type: 'select'
19564
- selection: EditorSelection
19565
- }
19566
- | {
19567
- type: 'select.previous block'
19568
- }
19569
- | {
19570
- type: 'select.next block'
19571
- }
19572
- | {
19573
- type: 'style.add'
19574
- style: string
19575
- }
19576
- | {
19577
- type: 'style.remove'
19578
- style: string
19579
- }
19580
- | {
19581
- type: 'style.toggle'
19582
- style: string
19583
- }
19584
- | {
19585
- type: 'text block.set'
19586
- at: [KeyedSegment]
19587
- level?: number
19588
- listItem?: string
19589
- style?: string
19590
- }
19591
- | {
19592
- type: 'text block.unset'
19593
- at: [KeyedSegment]
19594
- props: Array<'level' | 'listItem' | 'style'>
19595
- }
19596
- | ({
19597
- type: 'serialization.failure'
19598
- mimeType: `${string}/${string}`
19599
- reason: string
19600
- } & {
19601
- dataTransfer: DataTransfer
19602
- })
19603
- | ({
19604
- type: 'serialization.success'
19605
- data: string
19606
- mimeType: `${string}/${string}`
19607
- originEvent: 'copy' | 'cut' | 'unknown'
19608
- } & {
19609
- dataTransfer: DataTransfer
19610
- })
19611
- | ({
19612
- type: 'deserialization.failure'
19613
- mimeType: `${string}/${string}`
19614
- reason: string
19615
- } & {
19616
- dataTransfer: DataTransfer
19617
- })
19618
- | ({
19619
- type: 'deserialization.success'
19620
- data: Array<PortableTextBlock>
19621
- mimeType: `${string}/${string}`
19622
- } & {
19623
- dataTransfer: DataTransfer
19624
- })
19625
- | PatchEvent
19626
- | MutationEvent
19627
- | {
19628
- type: 'normalizing'
19629
- }
19630
- | {
19631
- type: 'done normalizing'
19632
- }
19633
- | {
19634
- type: 'done syncing initial value'
19635
- }
19636
- | {
19637
- type: 'behavior event'
19638
- behaviorEvent:
19639
- | SyntheticBehaviorEvent
19640
- | NativeBehaviorEvent
19641
- editor: PortableTextSlateEditor
19642
- defaultActionCallback?: () => void
19643
- nativeEvent?: {
19644
- preventDefault: () => void
19645
- }
19646
- }
19647
- | {
19648
- type: 'custom behavior event'
19649
- behaviorEvent: CustomBehaviorEvent
19650
- editor: PortableTextSlateEditor
19651
- nativeEvent?: {
19652
- preventDefault: () => void
19653
- }
19654
- }
19655
- | CustomBehaviorEvent
19656
- | {
19657
- type: 'add behavior'
19658
- behavior: Behavior
19659
- }
19660
- | {
19661
- type: 'remove behavior'
19662
- behavior: Behavior
19663
- }
19664
- | {
19665
- type: 'update readOnly'
19666
- readOnly: boolean
19667
- }
19668
- | {
19669
- type: 'update schema'
19670
- schema: EditorSchema
19671
- }
19672
- | {
19673
- type: 'update behaviors'
19674
- behaviors: Array<Behavior>
19675
- }
19676
- | {
19677
- type: 'update key generator'
19678
- keyGenerator: () => string
19679
- }
19680
- | {
19681
- type: 'update value'
19682
- value: Array<PortableTextBlock> | undefined
19683
- }
19684
- | {
19685
- type: 'update maxBlocks'
19686
- maxBlocks: number | undefined
19687
- }
19688
- | PatchesEvent
19689
- | {
19690
- type: 'notify.patch'
19691
- patch: Patch
19692
- }
19693
- | {
19694
- type: 'notify.mutation'
19695
- patches: Array<Patch>
19696
- snapshot: Array<PortableTextBlock> | undefined
19697
- value: Array<PortableTextBlock> | undefined
19698
- }
19699
- | {
19700
- type: 'notify.blurred'
19701
- event: FocusEvent_2<HTMLDivElement, Element>
19702
- }
19703
- | {
19704
- type: 'notify.done loading'
19705
- }
19706
- | {
19707
- type: 'notify.editable'
19708
- }
19709
- | {
19710
- type: 'notify.error'
19711
- name: string
19712
- description: string
19713
- data: unknown
19714
- }
19715
- | {
19716
- type: 'notify.focused'
19717
- event: FocusEvent_2<HTMLDivElement, Element>
19718
- }
19719
- | {
19720
- type: 'notify.invalid value'
19721
- resolution: InvalidValueResolution | null
19722
- value: Array<PortableTextBlock> | undefined
19723
- }
19724
- | {
19725
- type: 'notify.loading'
19726
- }
19727
- | {
19728
- type: 'notify.read only'
19729
- }
19730
- | {
19731
- type: 'notify.ready'
19732
- }
19733
- | {
19734
- type: 'notify.selection'
19735
- selection: EditorSelection
19736
- }
19737
- | {
19738
- type: 'notify.value changed'
19739
- value: Array<PortableTextBlock> | undefined
19740
- }
19741
- | {
19742
- type: 'notify.unset'
19743
- previousValue: Array<PortableTextBlock>
19744
- },
19745
- undefined,
19746
- never,
19747
- never,
19748
- never,
19749
- never,
19750
- | {
19751
- type: 'annotation.add'
19752
- annotation: {
19753
- name: string
19754
- value: {
19755
- [prop: string]: unknown
19756
- }
19757
- }
19758
- }
19759
- | {
19760
- type: 'annotation.remove'
19761
- annotation: {
19762
- name: string
19763
- }
19764
- }
19765
- | {
19766
- type: 'annotation.toggle'
19767
- annotation: {
19768
- name: string
19769
- value: {
19770
- [prop: string]: unknown
19771
- }
19772
- }
19773
- }
19774
- | {
19775
- [props: string]: unknown
19776
- type: 'block.set'
19777
- at: [KeyedSegment]
19778
- }
19779
- | {
19780
- type: 'block.unset'
19781
- at: [KeyedSegment]
19782
- props: Array<string>
19783
- }
19784
- | {
19785
- type: 'blur'
19786
- }
19787
- | {
19788
- type: 'data transfer.set'
19789
- data: string
19790
- dataTransfer: DataTransfer
19791
- mimeType: MIMEType_2
19792
- }
19793
- | {
19794
- type: 'decorator.add'
19795
- decorator: string
19796
- selection?: NonNullable<EditorSelection>
19797
- }
19798
- | {
19799
- type: 'decorator.remove'
19800
- decorator: string
19801
- }
19802
- | {
19803
- type: 'decorator.toggle'
19804
- decorator: string
19805
- }
19806
- | {
19807
- type: 'delete'
19808
- selection: NonNullable<EditorSelection>
19809
- }
19810
- | {
19811
- type: 'delete.backward'
19812
- unit: TextUnit
19813
- }
19814
- | {
19815
- type: 'delete.block'
19816
- blockPath: [KeyedSegment]
19817
- }
19818
- | {
19819
- type: 'delete.forward'
19820
- unit: TextUnit
19821
- }
19822
- | {
19823
- type: 'delete.text'
19824
- anchor: BlockOffset_2
19825
- focus: BlockOffset_2
19826
- }
19827
- | {
19828
- type: 'focus'
19829
- }
19830
- | {
19831
- type: 'history.redo'
19832
- }
19833
- | {
19834
- type: 'history.undo'
19835
- }
19836
- | {
19837
- type: 'insert.blocks'
19838
- blocks: Array<PortableTextBlock>
19839
- }
19840
- | {
19841
- type: 'insert.block object'
19842
- placement: 'auto' | 'after' | 'before'
19843
- blockObject: {
19844
- name: string
19845
- value?: {
19846
- [prop: string]: unknown
19847
- }
19848
- }
19849
- }
19850
- | {
19851
- type: 'insert.inline object'
19852
- inlineObject: {
19853
- name: string
19854
- value?: {
19855
- [prop: string]: unknown
19856
- }
19857
- }
19858
- }
19859
- | {
19860
- type: 'insert.break'
19861
- }
19862
- | {
19863
- type: 'insert.soft break'
19864
- }
19865
- | {
19866
- type: 'insert.block'
19867
- block: PortableTextBlock
19868
- placement: 'auto' | 'after' | 'before'
19869
- }
19870
- | {
19871
- type: 'insert.span'
19872
- text: string
19873
- annotations?: Array<{
19874
- name: string
19875
- value: {
19876
- [prop: string]: unknown
19877
- }
19878
- }>
19879
- decorators?: Array<string>
19880
- }
19881
- | {
19882
- type: 'insert.text'
19883
- text: string
19884
- options?: TextInsertTextOptions
19885
- }
19886
- | {
19887
- type: 'insert.text block'
19888
- placement: 'auto' | 'after' | 'before'
19889
- textBlock?: {
19890
- children?: PortableTextTextBlock['children']
19891
- }
19892
- }
19893
- | {
19894
- type: 'list item.add'
19895
- listItem: string
19896
- }
19897
- | {
19898
- type: 'list item.remove'
19899
- listItem: string
19900
- }
19901
- | {
19902
- type: 'list item.toggle'
19903
- listItem: string
19904
- }
19905
- | {
19906
- type: 'move.block'
19907
- at: [KeyedSegment]
19908
- to: [KeyedSegment]
19909
- }
19910
- | {
19911
- type: 'move.block down'
19912
- at: [KeyedSegment]
19913
- }
19914
- | {
19915
- type: 'move.block up'
19916
- at: [KeyedSegment]
19917
- }
19918
- | {
19919
- type: 'select'
19920
- selection: EditorSelection
19921
- }
19922
- | {
19923
- type: 'select.previous block'
19924
- }
19925
- | {
19926
- type: 'select.next block'
19927
- }
19928
- | {
19929
- type: 'style.add'
19930
- style: string
19931
- }
19932
- | {
19933
- type: 'style.remove'
19934
- style: string
19935
- }
19936
- | {
19937
- type: 'style.toggle'
19938
- style: string
19939
- }
19940
- | {
19941
- type: 'text block.set'
19942
- at: [KeyedSegment]
19943
- level?: number
19944
- listItem?: string
19945
- style?: string
19946
- }
19947
- | {
19948
- type: 'text block.unset'
19949
- at: [KeyedSegment]
19950
- props: Array<'level' | 'listItem' | 'style'>
19951
- }
19952
- | ({
19953
- type: 'serialization.failure'
19954
- mimeType: `${string}/${string}`
19955
- reason: string
19956
- } & {
19957
- dataTransfer: DataTransfer
19958
- })
19959
- | ({
19960
- type: 'serialization.success'
19961
- data: string
19962
- mimeType: `${string}/${string}`
19963
- originEvent: 'copy' | 'cut' | 'unknown'
19964
- } & {
19965
- dataTransfer: DataTransfer
19966
- })
19967
- | ({
19968
- type: 'deserialization.failure'
19969
- mimeType: `${string}/${string}`
19970
- reason: string
19971
- } & {
19972
- dataTransfer: DataTransfer
19973
- })
19974
- | ({
19975
- type: 'deserialization.success'
19976
- data: Array<PortableTextBlock>
19977
- mimeType: `${string}/${string}`
19978
- } & {
19979
- dataTransfer: DataTransfer
19980
- })
19981
- | PatchEvent
19982
- | MutationEvent
19983
- | PatchesEvent
19984
- | {
19985
- type: 'blurred'
19986
- event: FocusEvent_2<HTMLDivElement, Element>
19987
- }
19988
- | {
19989
- type: 'done loading'
19990
- }
19991
- | {
19992
- type: 'editable'
19993
- }
19994
- | {
19995
- type: 'error'
19996
- name: string
19997
- description: string
19998
- data: unknown
19999
- }
20000
- | {
20001
- type: 'focused'
20002
- event: FocusEvent_2<HTMLDivElement, Element>
20003
- }
20004
- | {
20005
- type: 'invalid value'
20006
- resolution: InvalidValueResolution | null
20007
- value: Array<PortableTextBlock> | undefined
20008
- }
20009
- | {
20010
- type: 'loading'
20011
- }
20012
- | {
20013
- type: 'read only'
20014
- }
20015
- | {
20016
- type: 'ready'
20017
- }
20018
- | {
20019
- type: 'selection'
20020
- selection: EditorSelection
20021
- }
20022
- | {
20023
- type: 'value changed'
20024
- value: Array<PortableTextBlock> | undefined
20025
- }
20026
- | UnsetEvent
20027
- | {
20028
- type: 'custom.*'
20029
- event: CustomBehaviorEvent
20030
- }
18871
+ MachineContext,
18872
+ EventObject,
18873
+ EventObject,
18874
+ NonReducibleUnknown,
18875
+ never,
18876
+ never,
18877
+ never,
18878
+ never,
18879
+ AnyEventObject
20031
18880
  >
20032
18881
  }
20033
18882
  }
@@ -20529,7 +19378,7 @@ declare type SyntheticBehaviorEvent =
20529
19378
  | {
20530
19379
  type: 'block.set'
20531
19380
  at: [KeyedSegment]
20532
- [props: string]: unknown
19381
+ props: Record<string, unknown>
20533
19382
  }
20534
19383
  | {
20535
19384
  type: 'block.unset'
@@ -20548,7 +19397,10 @@ declare type SyntheticBehaviorEvent =
20548
19397
  | {
20549
19398
  type: 'decorator.add'
20550
19399
  decorator: string
20551
- selection?: NonNullable<EditorSelection>
19400
+ offsets?: {
19401
+ anchor: BlockOffset
19402
+ focus: BlockOffset
19403
+ }
20552
19404
  }
20553
19405
  | {
20554
19406
  type: 'decorator.remove'
@@ -20692,18 +19544,6 @@ declare type SyntheticBehaviorEvent =
20692
19544
  type: 'style.toggle'
20693
19545
  style: string
20694
19546
  }
20695
- | {
20696
- type: 'text block.set'
20697
- at: [KeyedSegment]
20698
- level?: number
20699
- listItem?: string
20700
- style?: string
20701
- }
20702
- | {
20703
- type: 'text block.unset'
20704
- at: [KeyedSegment]
20705
- props: Array<'level' | 'listItem' | 'style'>
20706
- }
20707
19547
  | (PickFromUnion<
20708
19548
  ConverterEvent,
20709
19549
  'type',