@portabletext/editor 1.33.4 → 1.33.6

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 (34) 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 +82 -68
  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 +87 -72
  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 +1 -33
  18. package/lib/behaviors/index.d.ts +1 -33
  19. package/lib/index.d.cts +162 -1496
  20. package/lib/index.d.ts +162 -1496
  21. package/lib/plugins/index.d.cts +162 -1496
  22. package/lib/plugins/index.d.ts +162 -1496
  23. package/package.json +9 -9
  24. package/src/behavior-actions/behavior.action.block.set.ts +48 -5
  25. package/src/behavior-actions/behavior.action.block.unset.ts +77 -3
  26. package/src/behavior-actions/behavior.actions.ts +1 -18
  27. package/src/behaviors/behavior.core.lists.ts +18 -14
  28. package/src/behaviors/behavior.markdown.ts +14 -12
  29. package/src/behaviors/behavior.types.ts +1 -13
  30. package/src/converters/converter.portable-text.deserialize.test.ts +3 -2
  31. package/src/internal-utils/parse-blocks.test.ts +455 -0
  32. package/src/internal-utils/parse-blocks.ts +202 -87
  33. package/src/behavior-actions/behavior.action.text-block.set.ts +0 -25
  34. 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'
@@ -590,18 +591,6 @@ declare const editorMachine: StateMachine<
590
591
  type: 'style.toggle'
591
592
  style: string
592
593
  }
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
594
  | ({
606
595
  type: 'serialization.failure'
607
596
  mimeType: `${string}/${string}`
@@ -856,9 +845,9 @@ declare const editorMachine: StateMachine<
856
845
  }
857
846
  }
858
847
  | {
859
- [props: string]: unknown
860
848
  type: 'block.set'
861
849
  at: [KeyedSegment]
850
+ props: Record<string, unknown>
862
851
  }
863
852
  | {
864
853
  type: 'block.unset'
@@ -1021,18 +1010,6 @@ declare const editorMachine: StateMachine<
1021
1010
  type: 'style.toggle'
1022
1011
  style: string
1023
1012
  }
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
1013
  | ({
1037
1014
  type: 'serialization.failure'
1038
1015
  mimeType: `${string}/${string}`
@@ -1187,9 +1164,9 @@ declare const editorMachine: StateMachine<
1187
1164
  }
1188
1165
  }
1189
1166
  | {
1190
- [props: string]: unknown
1191
1167
  type: 'block.set'
1192
1168
  at: [KeyedSegment]
1169
+ props: Record<string, unknown>
1193
1170
  }
1194
1171
  | {
1195
1172
  type: 'block.unset'
@@ -1352,18 +1329,6 @@ declare const editorMachine: StateMachine<
1352
1329
  type: 'style.toggle'
1353
1330
  style: string
1354
1331
  }
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
1332
  | ({
1368
1333
  type: 'serialization.failure'
1369
1334
  mimeType: `${string}/${string}`
@@ -1543,9 +1508,9 @@ declare const editorMachine: StateMachine<
1543
1508
  }
1544
1509
  }
1545
1510
  | {
1546
- [props: string]: unknown
1547
1511
  type: 'block.set'
1548
1512
  at: [KeyedSegment]
1513
+ props: Record<string, unknown>
1549
1514
  }
1550
1515
  | {
1551
1516
  type: 'block.unset'
@@ -1708,18 +1673,6 @@ declare const editorMachine: StateMachine<
1708
1673
  type: 'style.toggle'
1709
1674
  style: string
1710
1675
  }
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
1676
  | ({
1724
1677
  type: 'serialization.failure'
1725
1678
  mimeType: `${string}/${string}`
@@ -1923,9 +1876,9 @@ declare const editorMachine: StateMachine<
1923
1876
  }
1924
1877
  }
1925
1878
  | {
1926
- [props: string]: unknown
1927
1879
  type: 'block.set'
1928
1880
  at: [KeyedSegment]
1881
+ props: Record<string, unknown>
1929
1882
  }
1930
1883
  | {
1931
1884
  type: 'block.unset'
@@ -2088,18 +2041,6 @@ declare const editorMachine: StateMachine<
2088
2041
  type: 'style.toggle'
2089
2042
  style: string
2090
2043
  }
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
2044
  | ({
2104
2045
  type: 'serialization.failure'
2105
2046
  mimeType: `${string}/${string}`
@@ -2277,9 +2218,9 @@ declare const editorMachine: StateMachine<
2277
2218
  }
2278
2219
  }
2279
2220
  | {
2280
- [props: string]: unknown
2281
2221
  type: 'block.set'
2282
2222
  at: [KeyedSegment]
2223
+ props: Record<string, unknown>
2283
2224
  }
2284
2225
  | {
2285
2226
  type: 'block.unset'
@@ -2442,18 +2383,6 @@ declare const editorMachine: StateMachine<
2442
2383
  type: 'style.toggle'
2443
2384
  style: string
2444
2385
  }
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
2386
  | ({
2458
2387
  type: 'serialization.failure'
2459
2388
  mimeType: `${string}/${string}`
@@ -2576,9 +2505,9 @@ declare const editorMachine: StateMachine<
2576
2505
  }
2577
2506
  }
2578
2507
  | {
2579
- [props: string]: unknown
2580
2508
  type: 'block.set'
2581
2509
  at: [KeyedSegment]
2510
+ props: Record<string, unknown>
2582
2511
  }
2583
2512
  | {
2584
2513
  type: 'block.unset'
@@ -2741,18 +2670,6 @@ declare const editorMachine: StateMachine<
2741
2670
  type: 'style.toggle'
2742
2671
  style: string
2743
2672
  }
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
2673
  | ({
2757
2674
  type: 'serialization.failure'
2758
2675
  mimeType: `${string}/${string}`
@@ -2930,9 +2847,9 @@ declare const editorMachine: StateMachine<
2930
2847
  }
2931
2848
  }
2932
2849
  | {
2933
- [props: string]: unknown
2934
2850
  type: 'block.set'
2935
2851
  at: [KeyedSegment]
2852
+ props: Record<string, unknown>
2936
2853
  }
2937
2854
  | {
2938
2855
  type: 'block.unset'
@@ -3095,18 +3012,6 @@ declare const editorMachine: StateMachine<
3095
3012
  type: 'style.toggle'
3096
3013
  style: string
3097
3014
  }
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
3015
  | ({
3111
3016
  type: 'serialization.failure'
3112
3017
  mimeType: `${string}/${string}`
@@ -3232,9 +3137,9 @@ declare const editorMachine: StateMachine<
3232
3137
  }
3233
3138
  }
3234
3139
  | {
3235
- [props: string]: unknown
3236
3140
  type: 'block.set'
3237
3141
  at: [KeyedSegment]
3142
+ props: Record<string, unknown>
3238
3143
  }
3239
3144
  | {
3240
3145
  type: 'block.unset'
@@ -3397,18 +3302,6 @@ declare const editorMachine: StateMachine<
3397
3302
  type: 'style.toggle'
3398
3303
  style: string
3399
3304
  }
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
3305
  | ({
3413
3306
  type: 'serialization.failure'
3414
3307
  mimeType: `${string}/${string}`
@@ -3586,9 +3479,9 @@ declare const editorMachine: StateMachine<
3586
3479
  }
3587
3480
  }
3588
3481
  | {
3589
- [props: string]: unknown
3590
3482
  type: 'block.set'
3591
3483
  at: [KeyedSegment]
3484
+ props: Record<string, unknown>
3592
3485
  }
3593
3486
  | {
3594
3487
  type: 'block.unset'
@@ -3751,18 +3644,6 @@ declare const editorMachine: StateMachine<
3751
3644
  type: 'style.toggle'
3752
3645
  style: string
3753
3646
  }
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
3647
  | ({
3767
3648
  type: 'serialization.failure'
3768
3649
  mimeType: `${string}/${string}`
@@ -3887,9 +3768,9 @@ declare const editorMachine: StateMachine<
3887
3768
  }
3888
3769
  }
3889
3770
  | {
3890
- [props: string]: unknown
3891
3771
  type: 'block.set'
3892
3772
  at: [KeyedSegment]
3773
+ props: Record<string, unknown>
3893
3774
  }
3894
3775
  | {
3895
3776
  type: 'block.unset'
@@ -4052,18 +3933,6 @@ declare const editorMachine: StateMachine<
4052
3933
  type: 'style.toggle'
4053
3934
  style: string
4054
3935
  }
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
3936
  | ({
4068
3937
  type: 'serialization.failure'
4069
3938
  mimeType: `${string}/${string}`
@@ -4241,9 +4110,9 @@ declare const editorMachine: StateMachine<
4241
4110
  }
4242
4111
  }
4243
4112
  | {
4244
- [props: string]: unknown
4245
4113
  type: 'block.set'
4246
4114
  at: [KeyedSegment]
4115
+ props: Record<string, unknown>
4247
4116
  }
4248
4117
  | {
4249
4118
  type: 'block.unset'
@@ -4406,18 +4275,6 @@ declare const editorMachine: StateMachine<
4406
4275
  type: 'style.toggle'
4407
4276
  style: string
4408
4277
  }
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
4278
  | ({
4422
4279
  type: 'serialization.failure'
4423
4280
  mimeType: `${string}/${string}`
@@ -4541,9 +4398,9 @@ declare const editorMachine: StateMachine<
4541
4398
  }
4542
4399
  }
4543
4400
  | {
4544
- [props: string]: unknown
4545
4401
  type: 'block.set'
4546
4402
  at: [KeyedSegment]
4403
+ props: Record<string, unknown>
4547
4404
  }
4548
4405
  | {
4549
4406
  type: 'block.unset'
@@ -4706,18 +4563,6 @@ declare const editorMachine: StateMachine<
4706
4563
  type: 'style.toggle'
4707
4564
  style: string
4708
4565
  }
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
4566
  | ({
4722
4567
  type: 'serialization.failure'
4723
4568
  mimeType: `${string}/${string}`
@@ -4895,9 +4740,9 @@ declare const editorMachine: StateMachine<
4895
4740
  }
4896
4741
  }
4897
4742
  | {
4898
- [props: string]: unknown
4899
4743
  type: 'block.set'
4900
4744
  at: [KeyedSegment]
4745
+ props: Record<string, unknown>
4901
4746
  }
4902
4747
  | {
4903
4748
  type: 'block.unset'
@@ -5060,18 +4905,6 @@ declare const editorMachine: StateMachine<
5060
4905
  type: 'style.toggle'
5061
4906
  style: string
5062
4907
  }
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
4908
  | ({
5076
4909
  type: 'serialization.failure'
5077
4910
  mimeType: `${string}/${string}`
@@ -5196,9 +5029,9 @@ declare const editorMachine: StateMachine<
5196
5029
  }
5197
5030
  }
5198
5031
  | {
5199
- [props: string]: unknown
5200
5032
  type: 'block.set'
5201
5033
  at: [KeyedSegment]
5034
+ props: Record<string, unknown>
5202
5035
  }
5203
5036
  | {
5204
5037
  type: 'block.unset'
@@ -5361,18 +5194,6 @@ declare const editorMachine: StateMachine<
5361
5194
  type: 'style.toggle'
5362
5195
  style: string
5363
5196
  }
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
5197
  | ({
5377
5198
  type: 'serialization.failure'
5378
5199
  mimeType: `${string}/${string}`
@@ -5568,9 +5389,9 @@ declare const editorMachine: StateMachine<
5568
5389
  }
5569
5390
  }
5570
5391
  | {
5571
- [props: string]: unknown
5572
5392
  type: 'block.set'
5573
5393
  at: [KeyedSegment]
5394
+ props: Record<string, unknown>
5574
5395
  }
5575
5396
  | {
5576
5397
  type: 'block.unset'
@@ -5733,18 +5554,6 @@ declare const editorMachine: StateMachine<
5733
5554
  type: 'style.toggle'
5734
5555
  style: string
5735
5556
  }
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
5557
  | ({
5749
5558
  type: 'serialization.failure'
5750
5559
  mimeType: `${string}/${string}`
@@ -5922,9 +5731,9 @@ declare const editorMachine: StateMachine<
5922
5731
  }
5923
5732
  }
5924
5733
  | {
5925
- [props: string]: unknown
5926
5734
  type: 'block.set'
5927
5735
  at: [KeyedSegment]
5736
+ props: Record<string, unknown>
5928
5737
  }
5929
5738
  | {
5930
5739
  type: 'block.unset'
@@ -6087,18 +5896,6 @@ declare const editorMachine: StateMachine<
6087
5896
  type: 'style.toggle'
6088
5897
  style: string
6089
5898
  }
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
5899
  | ({
6103
5900
  type: 'serialization.failure'
6104
5901
  mimeType: `${string}/${string}`
@@ -6223,9 +6020,9 @@ declare const editorMachine: StateMachine<
6223
6020
  }
6224
6021
  }
6225
6022
  | {
6226
- [props: string]: unknown
6227
6023
  type: 'block.set'
6228
6024
  at: [KeyedSegment]
6025
+ props: Record<string, unknown>
6229
6026
  }
6230
6027
  | {
6231
6028
  type: 'block.unset'
@@ -6388,18 +6185,6 @@ declare const editorMachine: StateMachine<
6388
6185
  type: 'style.toggle'
6389
6186
  style: string
6390
6187
  }
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
6188
  | ({
6404
6189
  type: 'serialization.failure'
6405
6190
  mimeType: `${string}/${string}`
@@ -6577,9 +6362,9 @@ declare const editorMachine: StateMachine<
6577
6362
  }
6578
6363
  }
6579
6364
  | {
6580
- [props: string]: unknown
6581
6365
  type: 'block.set'
6582
6366
  at: [KeyedSegment]
6367
+ props: Record<string, unknown>
6583
6368
  }
6584
6369
  | {
6585
6370
  type: 'block.unset'
@@ -6742,18 +6527,6 @@ declare const editorMachine: StateMachine<
6742
6527
  type: 'style.toggle'
6743
6528
  style: string
6744
6529
  }
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
6530
  | ({
6758
6531
  type: 'serialization.failure'
6759
6532
  mimeType: `${string}/${string}`
@@ -6876,9 +6649,9 @@ declare const editorMachine: StateMachine<
6876
6649
  }
6877
6650
  }
6878
6651
  | {
6879
- [props: string]: unknown
6880
6652
  type: 'block.set'
6881
6653
  at: [KeyedSegment]
6654
+ props: Record<string, unknown>
6882
6655
  }
6883
6656
  | {
6884
6657
  type: 'block.unset'
@@ -7041,18 +6814,6 @@ declare const editorMachine: StateMachine<
7041
6814
  type: 'style.toggle'
7042
6815
  style: string
7043
6816
  }
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
6817
  | ({
7057
6818
  type: 'serialization.failure'
7058
6819
  mimeType: `${string}/${string}`
@@ -7230,9 +6991,9 @@ declare const editorMachine: StateMachine<
7230
6991
  }
7231
6992
  }
7232
6993
  | {
7233
- [props: string]: unknown
7234
6994
  type: 'block.set'
7235
6995
  at: [KeyedSegment]
6996
+ props: Record<string, unknown>
7236
6997
  }
7237
6998
  | {
7238
6999
  type: 'block.unset'
@@ -7395,18 +7156,6 @@ declare const editorMachine: StateMachine<
7395
7156
  type: 'style.toggle'
7396
7157
  style: string
7397
7158
  }
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
7159
  | ({
7411
7160
  type: 'serialization.failure'
7412
7161
  mimeType: `${string}/${string}`
@@ -7530,9 +7279,9 @@ declare const editorMachine: StateMachine<
7530
7279
  }
7531
7280
  }
7532
7281
  | {
7533
- [props: string]: unknown
7534
7282
  type: 'block.set'
7535
7283
  at: [KeyedSegment]
7284
+ props: Record<string, unknown>
7536
7285
  }
7537
7286
  | {
7538
7287
  type: 'block.unset'
@@ -7695,18 +7444,6 @@ declare const editorMachine: StateMachine<
7695
7444
  type: 'style.toggle'
7696
7445
  style: string
7697
7446
  }
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
7447
  | ({
7711
7448
  type: 'serialization.failure'
7712
7449
  mimeType: `${string}/${string}`
@@ -7884,9 +7621,9 @@ declare const editorMachine: StateMachine<
7884
7621
  }
7885
7622
  }
7886
7623
  | {
7887
- [props: string]: unknown
7888
7624
  type: 'block.set'
7889
7625
  at: [KeyedSegment]
7626
+ props: Record<string, unknown>
7890
7627
  }
7891
7628
  | {
7892
7629
  type: 'block.unset'
@@ -8049,18 +7786,6 @@ declare const editorMachine: StateMachine<
8049
7786
  type: 'style.toggle'
8050
7787
  style: string
8051
7788
  }
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
7789
  | ({
8065
7790
  type: 'serialization.failure'
8066
7791
  mimeType: `${string}/${string}`
@@ -8187,9 +7912,9 @@ declare const editorMachine: StateMachine<
8187
7912
  }
8188
7913
  }
8189
7914
  | {
8190
- [props: string]: unknown
8191
7915
  type: 'block.set'
8192
7916
  at: [KeyedSegment]
7917
+ props: Record<string, unknown>
8193
7918
  }
8194
7919
  | {
8195
7920
  type: 'block.unset'
@@ -8352,18 +8077,6 @@ declare const editorMachine: StateMachine<
8352
8077
  type: 'style.toggle'
8353
8078
  style: string
8354
8079
  }
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
8080
  | ({
8368
8081
  type: 'serialization.failure'
8369
8082
  mimeType: `${string}/${string}`
@@ -8541,9 +8254,9 @@ declare const editorMachine: StateMachine<
8541
8254
  }
8542
8255
  }
8543
8256
  | {
8544
- [props: string]: unknown
8545
8257
  type: 'block.set'
8546
8258
  at: [KeyedSegment]
8259
+ props: Record<string, unknown>
8547
8260
  }
8548
8261
  | {
8549
8262
  type: 'block.unset'
@@ -8706,18 +8419,6 @@ declare const editorMachine: StateMachine<
8706
8419
  type: 'style.toggle'
8707
8420
  style: string
8708
8421
  }
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
8422
  | ({
8722
8423
  type: 'serialization.failure'
8723
8424
  mimeType: `${string}/${string}`
@@ -8844,9 +8545,9 @@ declare const editorMachine: StateMachine<
8844
8545
  }
8845
8546
  }
8846
8547
  | {
8847
- [props: string]: unknown
8848
8548
  type: 'block.set'
8849
8549
  at: [KeyedSegment]
8550
+ props: Record<string, unknown>
8850
8551
  }
8851
8552
  | {
8852
8553
  type: 'block.unset'
@@ -9009,18 +8710,6 @@ declare const editorMachine: StateMachine<
9009
8710
  type: 'style.toggle'
9010
8711
  style: string
9011
8712
  }
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
8713
  | ({
9025
8714
  type: 'serialization.failure'
9026
8715
  mimeType: `${string}/${string}`
@@ -9221,9 +8910,9 @@ declare const editorMachine: StateMachine<
9221
8910
  }
9222
8911
  }
9223
8912
  | {
9224
- [props: string]: unknown
9225
8913
  type: 'block.set'
9226
8914
  at: [KeyedSegment]
8915
+ props: Record<string, unknown>
9227
8916
  }
9228
8917
  | {
9229
8918
  type: 'block.unset'
@@ -9386,18 +9075,6 @@ declare const editorMachine: StateMachine<
9386
9075
  type: 'style.toggle'
9387
9076
  style: string
9388
9077
  }
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
9078
  | ({
9402
9079
  type: 'serialization.failure'
9403
9080
  mimeType: `${string}/${string}`
@@ -9595,9 +9272,9 @@ declare const editorMachine: StateMachine<
9595
9272
  }
9596
9273
  }
9597
9274
  | {
9598
- [props: string]: unknown
9599
9275
  type: 'block.set'
9600
9276
  at: [KeyedSegment]
9277
+ props: Record<string, unknown>
9601
9278
  }
9602
9279
  | {
9603
9280
  type: 'block.unset'
@@ -9760,18 +9437,6 @@ declare const editorMachine: StateMachine<
9760
9437
  type: 'style.toggle'
9761
9438
  style: string
9762
9439
  }
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
9440
  | ({
9776
9441
  type: 'serialization.failure'
9777
9442
  mimeType: `${string}/${string}`
@@ -10117,9 +9782,9 @@ declare const editorMachine: StateMachine<
10117
9782
  }
10118
9783
  }
10119
9784
  | {
10120
- [props: string]: unknown
10121
9785
  type: 'block.set'
10122
9786
  at: [KeyedSegment]
9787
+ props: Record<string, unknown>
10123
9788
  }
10124
9789
  | {
10125
9790
  type: 'block.unset'
@@ -10282,18 +9947,6 @@ declare const editorMachine: StateMachine<
10282
9947
  type: 'style.toggle'
10283
9948
  style: string
10284
9949
  }
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
9950
  | ({
10298
9951
  type: 'serialization.failure'
10299
9952
  mimeType: `${string}/${string}`
@@ -10473,9 +10126,9 @@ declare const editorMachine: StateMachine<
10473
10126
  }
10474
10127
  }
10475
10128
  | {
10476
- [props: string]: unknown
10477
10129
  type: 'block.set'
10478
10130
  at: [KeyedSegment]
10131
+ props: Record<string, unknown>
10479
10132
  }
10480
10133
  | {
10481
10134
  type: 'block.unset'
@@ -10638,18 +10291,6 @@ declare const editorMachine: StateMachine<
10638
10291
  type: 'style.toggle'
10639
10292
  style: string
10640
10293
  }
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
10294
  | ({
10654
10295
  type: 'serialization.failure'
10655
10296
  mimeType: `${string}/${string}`
@@ -10745,9 +10386,9 @@ declare const editorMachine: StateMachine<
10745
10386
  value: Array<PortableTextBlock> | undefined
10746
10387
  },
10747
10388
  | {
10748
- [props: string]: unknown
10749
10389
  type: 'block.set'
10750
10390
  at: [KeyedSegment]
10391
+ props: Record<string, unknown>
10751
10392
  }
10752
10393
  | {
10753
10394
  type: 'block.unset'
@@ -10779,9 +10420,9 @@ declare const editorMachine: StateMachine<
10779
10420
  }
10780
10421
  }
10781
10422
  | {
10782
- [props: string]: unknown
10783
10423
  type: 'block.set'
10784
10424
  at: [KeyedSegment]
10425
+ props: Record<string, unknown>
10785
10426
  }
10786
10427
  | {
10787
10428
  type: 'block.unset'
@@ -10944,18 +10585,6 @@ declare const editorMachine: StateMachine<
10944
10585
  type: 'style.toggle'
10945
10586
  style: string
10946
10587
  }
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
10588
  | ({
10960
10589
  type: 'serialization.failure'
10961
10590
  mimeType: `${string}/${string}`
@@ -11135,9 +10764,9 @@ declare const editorMachine: StateMachine<
11135
10764
  }
11136
10765
  }
11137
10766
  | {
11138
- [props: string]: unknown
11139
10767
  type: 'block.set'
11140
10768
  at: [KeyedSegment]
10769
+ props: Record<string, unknown>
11141
10770
  }
11142
10771
  | {
11143
10772
  type: 'block.unset'
@@ -11300,18 +10929,6 @@ declare const editorMachine: StateMachine<
11300
10929
  type: 'style.toggle'
11301
10930
  style: string
11302
10931
  }
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
10932
  | ({
11316
10933
  type: 'serialization.failure'
11317
10934
  mimeType: `${string}/${string}`
@@ -11434,9 +11051,9 @@ declare const editorMachine: StateMachine<
11434
11051
  }
11435
11052
  }
11436
11053
  | {
11437
- [props: string]: unknown
11438
11054
  type: 'block.set'
11439
11055
  at: [KeyedSegment]
11056
+ props: Record<string, unknown>
11440
11057
  }
11441
11058
  | {
11442
11059
  type: 'block.unset'
@@ -11599,18 +11216,6 @@ declare const editorMachine: StateMachine<
11599
11216
  type: 'style.toggle'
11600
11217
  style: string
11601
11218
  }
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
11219
  | ({
11615
11220
  type: 'serialization.failure'
11616
11221
  mimeType: `${string}/${string}`
@@ -11790,9 +11395,9 @@ declare const editorMachine: StateMachine<
11790
11395
  }
11791
11396
  }
11792
11397
  | {
11793
- [props: string]: unknown
11794
11398
  type: 'block.set'
11795
11399
  at: [KeyedSegment]
11400
+ props: Record<string, unknown>
11796
11401
  }
11797
11402
  | {
11798
11403
  type: 'block.unset'
@@ -11955,18 +11560,6 @@ declare const editorMachine: StateMachine<
11955
11560
  type: 'style.toggle'
11956
11561
  style: string
11957
11562
  }
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
11563
  | ({
11971
11564
  type: 'serialization.failure'
11972
11565
  mimeType: `${string}/${string}`
@@ -12089,9 +11682,9 @@ declare const editorMachine: StateMachine<
12089
11682
  }
12090
11683
  }
12091
11684
  | {
12092
- [props: string]: unknown
12093
11685
  type: 'block.set'
12094
11686
  at: [KeyedSegment]
11687
+ props: Record<string, unknown>
12095
11688
  }
12096
11689
  | {
12097
11690
  type: 'block.unset'
@@ -12254,18 +11847,6 @@ declare const editorMachine: StateMachine<
12254
11847
  type: 'style.toggle'
12255
11848
  style: string
12256
11849
  }
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
11850
  | ({
12270
11851
  type: 'serialization.failure'
12271
11852
  mimeType: `${string}/${string}`
@@ -12445,9 +12026,9 @@ declare const editorMachine: StateMachine<
12445
12026
  }
12446
12027
  }
12447
12028
  | {
12448
- [props: string]: unknown
12449
12029
  type: 'block.set'
12450
12030
  at: [KeyedSegment]
12031
+ props: Record<string, unknown>
12451
12032
  }
12452
12033
  | {
12453
12034
  type: 'block.unset'
@@ -12610,18 +12191,6 @@ declare const editorMachine: StateMachine<
12610
12191
  type: 'style.toggle'
12611
12192
  style: string
12612
12193
  }
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
12194
  | ({
12626
12195
  type: 'serialization.failure'
12627
12196
  mimeType: `${string}/${string}`
@@ -12754,9 +12323,9 @@ declare const editorMachine: StateMachine<
12754
12323
  }
12755
12324
  }
12756
12325
  | {
12757
- [props: string]: unknown
12758
12326
  type: 'block.set'
12759
12327
  at: [KeyedSegment]
12328
+ props: Record<string, unknown>
12760
12329
  }
12761
12330
  | {
12762
12331
  type: 'block.unset'
@@ -12919,18 +12488,6 @@ declare const editorMachine: StateMachine<
12919
12488
  type: 'style.toggle'
12920
12489
  style: string
12921
12490
  }
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
12491
  | ({
12935
12492
  type: 'serialization.failure'
12936
12493
  mimeType: `${string}/${string}`
@@ -13110,9 +12667,9 @@ declare const editorMachine: StateMachine<
13110
12667
  }
13111
12668
  }
13112
12669
  | {
13113
- [props: string]: unknown
13114
12670
  type: 'block.set'
13115
12671
  at: [KeyedSegment]
12672
+ props: Record<string, unknown>
13116
12673
  }
13117
12674
  | {
13118
12675
  type: 'block.unset'
@@ -13275,18 +12832,6 @@ declare const editorMachine: StateMachine<
13275
12832
  type: 'style.toggle'
13276
12833
  style: string
13277
12834
  }
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
12835
  | ({
13291
12836
  type: 'serialization.failure'
13292
12837
  mimeType: `${string}/${string}`
@@ -13423,9 +12968,9 @@ declare const editorMachine: StateMachine<
13423
12968
  }
13424
12969
  }
13425
12970
  | {
13426
- [props: string]: unknown
13427
12971
  type: 'block.set'
13428
12972
  at: [KeyedSegment]
12973
+ props: Record<string, unknown>
13429
12974
  }
13430
12975
  | {
13431
12976
  type: 'block.unset'
@@ -13588,18 +13133,6 @@ declare const editorMachine: StateMachine<
13588
13133
  type: 'style.toggle'
13589
13134
  style: string
13590
13135
  }
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
13136
  | ({
13604
13137
  type: 'serialization.failure'
13605
13138
  mimeType: `${string}/${string}`
@@ -13779,9 +13312,9 @@ declare const editorMachine: StateMachine<
13779
13312
  }
13780
13313
  }
13781
13314
  | {
13782
- [props: string]: unknown
13783
13315
  type: 'block.set'
13784
13316
  at: [KeyedSegment]
13317
+ props: Record<string, unknown>
13785
13318
  }
13786
13319
  | {
13787
13320
  type: 'block.unset'
@@ -13944,18 +13477,6 @@ declare const editorMachine: StateMachine<
13944
13477
  type: 'style.toggle'
13945
13478
  style: string
13946
13479
  }
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
13480
  | ({
13960
13481
  type: 'serialization.failure'
13961
13482
  mimeType: `${string}/${string}`
@@ -14078,9 +13599,9 @@ declare const editorMachine: StateMachine<
14078
13599
  }
14079
13600
  }
14080
13601
  | {
14081
- [props: string]: unknown
14082
13602
  type: 'block.set'
14083
13603
  at: [KeyedSegment]
13604
+ props: Record<string, unknown>
14084
13605
  }
14085
13606
  | {
14086
13607
  type: 'block.unset'
@@ -14243,18 +13764,6 @@ declare const editorMachine: StateMachine<
14243
13764
  type: 'style.toggle'
14244
13765
  style: string
14245
13766
  }
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
13767
  | ({
14259
13768
  type: 'serialization.failure'
14260
13769
  mimeType: `${string}/${string}`
@@ -14434,9 +13943,9 @@ declare const editorMachine: StateMachine<
14434
13943
  }
14435
13944
  }
14436
13945
  | {
14437
- [props: string]: unknown
14438
13946
  type: 'block.set'
14439
13947
  at: [KeyedSegment]
13948
+ props: Record<string, unknown>
14440
13949
  }
14441
13950
  | {
14442
13951
  type: 'block.unset'
@@ -14599,18 +14108,6 @@ declare const editorMachine: StateMachine<
14599
14108
  type: 'style.toggle'
14600
14109
  style: string
14601
14110
  }
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
14111
  | ({
14615
14112
  type: 'serialization.failure'
14616
14113
  mimeType: `${string}/${string}`
@@ -14736,9 +14233,9 @@ declare const editorMachine: StateMachine<
14736
14233
  }
14737
14234
  }
14738
14235
  | {
14739
- [props: string]: unknown
14740
14236
  type: 'block.set'
14741
14237
  at: [KeyedSegment]
14238
+ props: Record<string, unknown>
14742
14239
  }
14743
14240
  | {
14744
14241
  type: 'block.unset'
@@ -14901,727 +14398,6 @@ declare const editorMachine: StateMachine<
14901
14398
  type: 'style.toggle'
14902
14399
  style: string
14903
14400
  }
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
- | ({
14917
- type: 'serialization.failure'
14918
- mimeType: `${string}/${string}`
14919
- reason: string
14920
- } & {
14921
- dataTransfer: DataTransfer
14922
- })
14923
- | ({
14924
- type: 'serialization.success'
14925
- data: string
14926
- mimeType: `${string}/${string}`
14927
- originEvent: 'copy' | 'cut' | 'unknown'
14928
- } & {
14929
- dataTransfer: DataTransfer
14930
- })
14931
- | ({
14932
- type: 'deserialization.failure'
14933
- mimeType: `${string}/${string}`
14934
- reason: string
14935
- } & {
14936
- dataTransfer: DataTransfer
14937
- })
14938
- | ({
14939
- type: 'deserialization.success'
14940
- data: Array<PortableTextBlock>
14941
- mimeType: `${string}/${string}`
14942
- } & {
14943
- dataTransfer: DataTransfer
14944
- })
14945
- | PatchEvent
14946
- | MutationEvent
14947
- | {
14948
- type: 'normalizing'
14949
- }
14950
- | {
14951
- type: 'done normalizing'
14952
- }
14953
- | {
14954
- type: 'done syncing initial value'
14955
- }
14956
- | {
14957
- type: 'behavior event'
14958
- behaviorEvent:
14959
- | SyntheticBehaviorEvent
14960
- | NativeBehaviorEvent
14961
- editor: PortableTextSlateEditor
14962
- defaultActionCallback?: () => void
14963
- nativeEvent?: {
14964
- preventDefault: () => void
14965
- }
14966
- }
14967
- | {
14968
- type: 'custom behavior event'
14969
- behaviorEvent: CustomBehaviorEvent
14970
- editor: PortableTextSlateEditor
14971
- nativeEvent?: {
14972
- preventDefault: () => void
14973
- }
14974
- }
14975
- | CustomBehaviorEvent
14976
- | {
14977
- type: 'add behavior'
14978
- behavior: Behavior
14979
- }
14980
- | {
14981
- type: 'remove behavior'
14982
- behavior: Behavior
14983
- }
14984
- | {
14985
- type: 'update readOnly'
14986
- readOnly: boolean
14987
- }
14988
- | {
14989
- type: 'update schema'
14990
- schema: EditorSchema
14991
- }
14992
- | {
14993
- type: 'update behaviors'
14994
- behaviors: Array<Behavior>
14995
- }
14996
- | {
14997
- type: 'update key generator'
14998
- keyGenerator: () => string
14999
- }
15000
- | {
15001
- type: 'update value'
15002
- value: Array<PortableTextBlock> | undefined
15003
- }
15004
- | {
15005
- type: 'update maxBlocks'
15006
- maxBlocks: number | undefined
15007
- }
15008
- | PatchesEvent
15009
- | {
15010
- type: 'notify.patch'
15011
- patch: Patch
15012
- }
15013
- | {
15014
- type: 'notify.mutation'
15015
- patches: Array<Patch>
15016
- snapshot: Array<PortableTextBlock> | undefined
15017
- value: Array<PortableTextBlock> | undefined
15018
- }
15019
- | {
15020
- type: 'notify.blurred'
15021
- event: FocusEvent_2<HTMLDivElement, Element>
15022
- }
15023
- | {
15024
- type: 'notify.done loading'
15025
- }
15026
- | {
15027
- type: 'notify.editable'
15028
- }
15029
- | {
15030
- type: 'notify.error'
15031
- name: string
15032
- description: string
15033
- data: unknown
15034
- }
15035
- | {
15036
- type: 'notify.focused'
15037
- event: FocusEvent_2<HTMLDivElement, Element>
15038
- }
15039
- | {
15040
- type: 'notify.invalid value'
15041
- resolution: InvalidValueResolution | null
15042
- value: Array<PortableTextBlock> | undefined
15043
- }
15044
- | {
15045
- type: 'notify.loading'
15046
- }
15047
- | {
15048
- type: 'notify.read only'
15049
- }
15050
- | {
15051
- type: 'notify.ready'
15052
- }
15053
- | {
15054
- type: 'notify.selection'
15055
- selection: EditorSelection
15056
- }
15057
- | {
15058
- type: 'notify.value changed'
15059
- value: Array<PortableTextBlock> | undefined
15060
- }
15061
- | {
15062
- type: 'notify.unset'
15063
- previousValue: Array<PortableTextBlock>
15064
- },
15065
- undefined,
15066
- never,
15067
- never,
15068
- never,
15069
- never,
15070
- | {
15071
- type: 'annotation.add'
15072
- annotation: {
15073
- name: string
15074
- value: {
15075
- [prop: string]: unknown
15076
- }
15077
- }
15078
- }
15079
- | {
15080
- type: 'annotation.remove'
15081
- annotation: {
15082
- name: string
15083
- }
15084
- }
15085
- | {
15086
- type: 'annotation.toggle'
15087
- annotation: {
15088
- name: string
15089
- value: {
15090
- [prop: string]: unknown
15091
- }
15092
- }
15093
- }
15094
- | {
15095
- [props: string]: unknown
15096
- type: 'block.set'
15097
- at: [KeyedSegment]
15098
- }
15099
- | {
15100
- type: 'block.unset'
15101
- at: [KeyedSegment]
15102
- props: Array<string>
15103
- }
15104
- | {
15105
- type: 'blur'
15106
- }
15107
- | {
15108
- type: 'data transfer.set'
15109
- data: string
15110
- dataTransfer: DataTransfer
15111
- mimeType: MIMEType_2
15112
- }
15113
- | {
15114
- type: 'decorator.add'
15115
- decorator: string
15116
- selection?: NonNullable<EditorSelection>
15117
- }
15118
- | {
15119
- type: 'decorator.remove'
15120
- decorator: string
15121
- }
15122
- | {
15123
- type: 'decorator.toggle'
15124
- decorator: string
15125
- }
15126
- | {
15127
- type: 'delete'
15128
- selection: NonNullable<EditorSelection>
15129
- }
15130
- | {
15131
- type: 'delete.backward'
15132
- unit: TextUnit
15133
- }
15134
- | {
15135
- type: 'delete.block'
15136
- blockPath: [KeyedSegment]
15137
- }
15138
- | {
15139
- type: 'delete.forward'
15140
- unit: TextUnit
15141
- }
15142
- | {
15143
- type: 'delete.text'
15144
- anchor: BlockOffset_2
15145
- focus: BlockOffset_2
15146
- }
15147
- | {
15148
- type: 'focus'
15149
- }
15150
- | {
15151
- type: 'history.redo'
15152
- }
15153
- | {
15154
- type: 'history.undo'
15155
- }
15156
- | {
15157
- type: 'insert.blocks'
15158
- blocks: Array<PortableTextBlock>
15159
- }
15160
- | {
15161
- type: 'insert.block object'
15162
- placement: 'auto' | 'after' | 'before'
15163
- blockObject: {
15164
- name: string
15165
- value?: {
15166
- [prop: string]: unknown
15167
- }
15168
- }
15169
- }
15170
- | {
15171
- type: 'insert.inline object'
15172
- inlineObject: {
15173
- name: string
15174
- value?: {
15175
- [prop: string]: unknown
15176
- }
15177
- }
15178
- }
15179
- | {
15180
- type: 'insert.break'
15181
- }
15182
- | {
15183
- type: 'insert.soft break'
15184
- }
15185
- | {
15186
- type: 'insert.block'
15187
- block: PortableTextBlock
15188
- placement: 'auto' | 'after' | 'before'
15189
- }
15190
- | {
15191
- type: 'insert.span'
15192
- text: string
15193
- annotations?: Array<{
15194
- name: string
15195
- value: {
15196
- [prop: string]: unknown
15197
- }
15198
- }>
15199
- decorators?: Array<string>
15200
- }
15201
- | {
15202
- type: 'insert.text'
15203
- text: string
15204
- options?: TextInsertTextOptions
15205
- }
15206
- | {
15207
- type: 'insert.text block'
15208
- placement: 'auto' | 'after' | 'before'
15209
- textBlock?: {
15210
- children?: PortableTextTextBlock['children']
15211
- }
15212
- }
15213
- | {
15214
- type: 'list item.add'
15215
- listItem: string
15216
- }
15217
- | {
15218
- type: 'list item.remove'
15219
- listItem: string
15220
- }
15221
- | {
15222
- type: 'list item.toggle'
15223
- listItem: string
15224
- }
15225
- | {
15226
- type: 'move.block'
15227
- at: [KeyedSegment]
15228
- to: [KeyedSegment]
15229
- }
15230
- | {
15231
- type: 'move.block down'
15232
- at: [KeyedSegment]
15233
- }
15234
- | {
15235
- type: 'move.block up'
15236
- at: [KeyedSegment]
15237
- }
15238
- | {
15239
- type: 'select'
15240
- selection: EditorSelection
15241
- }
15242
- | {
15243
- type: 'select.previous block'
15244
- }
15245
- | {
15246
- type: 'select.next block'
15247
- }
15248
- | {
15249
- type: 'style.add'
15250
- style: string
15251
- }
15252
- | {
15253
- type: 'style.remove'
15254
- style: string
15255
- }
15256
- | {
15257
- type: 'style.toggle'
15258
- style: string
15259
- }
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
- | ({
15273
- type: 'serialization.failure'
15274
- mimeType: `${string}/${string}`
15275
- reason: string
15276
- } & {
15277
- dataTransfer: DataTransfer
15278
- })
15279
- | ({
15280
- type: 'serialization.success'
15281
- data: string
15282
- mimeType: `${string}/${string}`
15283
- originEvent: 'copy' | 'cut' | 'unknown'
15284
- } & {
15285
- dataTransfer: DataTransfer
15286
- })
15287
- | ({
15288
- type: 'deserialization.failure'
15289
- mimeType: `${string}/${string}`
15290
- reason: string
15291
- } & {
15292
- dataTransfer: DataTransfer
15293
- })
15294
- | ({
15295
- type: 'deserialization.success'
15296
- data: Array<PortableTextBlock>
15297
- mimeType: `${string}/${string}`
15298
- } & {
15299
- dataTransfer: DataTransfer
15300
- })
15301
- | PatchEvent
15302
- | MutationEvent
15303
- | PatchesEvent
15304
- | {
15305
- type: 'blurred'
15306
- event: FocusEvent_2<HTMLDivElement, Element>
15307
- }
15308
- | {
15309
- type: 'done loading'
15310
- }
15311
- | {
15312
- type: 'editable'
15313
- }
15314
- | {
15315
- type: 'error'
15316
- name: string
15317
- description: string
15318
- data: unknown
15319
- }
15320
- | {
15321
- type: 'focused'
15322
- event: FocusEvent_2<HTMLDivElement, Element>
15323
- }
15324
- | {
15325
- type: 'invalid value'
15326
- resolution: InvalidValueResolution | null
15327
- value: Array<PortableTextBlock> | undefined
15328
- }
15329
- | {
15330
- type: 'loading'
15331
- }
15332
- | {
15333
- type: 'read only'
15334
- }
15335
- | {
15336
- type: 'ready'
15337
- }
15338
- | {
15339
- type: 'selection'
15340
- selection: EditorSelection
15341
- }
15342
- | {
15343
- type: 'value changed'
15344
- value: Array<PortableTextBlock> | undefined
15345
- }
15346
- | UnsetEvent
15347
- | {
15348
- type: 'custom.*'
15349
- event: CustomBehaviorEvent
15350
- }
15351
- >
15352
- }
15353
- readonly 'insert.*': {
15354
- readonly actions: ActionFunction<
15355
- {
15356
- behaviors: Set<Behavior>
15357
- converters: Set<Converter>
15358
- keyGenerator: () => string
15359
- pendingEvents: Array<PatchEvent | MutationEvent>
15360
- schema: EditorSchema
15361
- initialReadOnly: boolean
15362
- maxBlocks: number | undefined
15363
- selection: EditorSelection
15364
- value: Array<PortableTextBlock> | undefined
15365
- },
15366
- | {
15367
- type: 'insert.blocks'
15368
- blocks: Array<PortableTextBlock>
15369
- }
15370
- | {
15371
- type: 'insert.block object'
15372
- placement: 'auto' | 'after' | 'before'
15373
- blockObject: {
15374
- name: string
15375
- value?: {
15376
- [prop: string]: unknown
15377
- }
15378
- }
15379
- }
15380
- | {
15381
- type: 'insert.inline object'
15382
- inlineObject: {
15383
- name: string
15384
- value?: {
15385
- [prop: string]: unknown
15386
- }
15387
- }
15388
- }
15389
- | {
15390
- type: 'insert.break'
15391
- }
15392
- | {
15393
- type: 'insert.soft break'
15394
- }
15395
- | {
15396
- type: 'insert.block'
15397
- block: PortableTextBlock
15398
- placement: 'auto' | 'after' | 'before'
15399
- }
15400
- | {
15401
- type: 'insert.span'
15402
- text: string
15403
- annotations?: Array<{
15404
- name: string
15405
- value: {
15406
- [prop: string]: unknown
15407
- }
15408
- }>
15409
- decorators?: Array<string>
15410
- }
15411
- | {
15412
- type: 'insert.text'
15413
- text: string
15414
- options?: TextInsertTextOptions
15415
- }
15416
- | {
15417
- type: 'insert.text block'
15418
- placement: 'auto' | 'after' | 'before'
15419
- textBlock?: {
15420
- children?: PortableTextTextBlock['children']
15421
- }
15422
- },
15423
- | {
15424
- type: 'annotation.add'
15425
- annotation: {
15426
- name: string
15427
- value: {
15428
- [prop: string]: unknown
15429
- }
15430
- }
15431
- }
15432
- | {
15433
- type: 'annotation.remove'
15434
- annotation: {
15435
- name: string
15436
- }
15437
- }
15438
- | {
15439
- type: 'annotation.toggle'
15440
- annotation: {
15441
- name: string
15442
- value: {
15443
- [prop: string]: unknown
15444
- }
15445
- }
15446
- }
15447
- | {
15448
- [props: string]: unknown
15449
- type: 'block.set'
15450
- at: [KeyedSegment]
15451
- }
15452
- | {
15453
- type: 'block.unset'
15454
- at: [KeyedSegment]
15455
- props: Array<string>
15456
- }
15457
- | {
15458
- type: 'blur'
15459
- }
15460
- | {
15461
- type: 'data transfer.set'
15462
- data: string
15463
- dataTransfer: DataTransfer
15464
- mimeType: MIMEType_2
15465
- }
15466
- | {
15467
- type: 'decorator.add'
15468
- decorator: string
15469
- selection?: NonNullable<EditorSelection>
15470
- }
15471
- | {
15472
- type: 'decorator.remove'
15473
- decorator: string
15474
- }
15475
- | {
15476
- type: 'decorator.toggle'
15477
- decorator: string
15478
- }
15479
- | {
15480
- type: 'delete'
15481
- selection: NonNullable<EditorSelection>
15482
- }
15483
- | {
15484
- type: 'delete.backward'
15485
- unit: TextUnit
15486
- }
15487
- | {
15488
- type: 'delete.block'
15489
- blockPath: [KeyedSegment]
15490
- }
15491
- | {
15492
- type: 'delete.forward'
15493
- unit: TextUnit
15494
- }
15495
- | {
15496
- type: 'delete.text'
15497
- anchor: BlockOffset_2
15498
- focus: BlockOffset_2
15499
- }
15500
- | {
15501
- type: 'focus'
15502
- }
15503
- | {
15504
- type: 'history.redo'
15505
- }
15506
- | {
15507
- type: 'history.undo'
15508
- }
15509
- | {
15510
- type: 'insert.blocks'
15511
- blocks: Array<PortableTextBlock>
15512
- }
15513
- | {
15514
- type: 'insert.block object'
15515
- placement: 'auto' | 'after' | 'before'
15516
- blockObject: {
15517
- name: string
15518
- value?: {
15519
- [prop: string]: unknown
15520
- }
15521
- }
15522
- }
15523
- | {
15524
- type: 'insert.inline object'
15525
- inlineObject: {
15526
- name: string
15527
- value?: {
15528
- [prop: string]: unknown
15529
- }
15530
- }
15531
- }
15532
- | {
15533
- type: 'insert.break'
15534
- }
15535
- | {
15536
- type: 'insert.soft break'
15537
- }
15538
- | {
15539
- type: 'insert.block'
15540
- block: PortableTextBlock
15541
- placement: 'auto' | 'after' | 'before'
15542
- }
15543
- | {
15544
- type: 'insert.span'
15545
- text: string
15546
- annotations?: Array<{
15547
- name: string
15548
- value: {
15549
- [prop: string]: unknown
15550
- }
15551
- }>
15552
- decorators?: Array<string>
15553
- }
15554
- | {
15555
- type: 'insert.text'
15556
- text: string
15557
- options?: TextInsertTextOptions
15558
- }
15559
- | {
15560
- type: 'insert.text block'
15561
- placement: 'auto' | 'after' | 'before'
15562
- textBlock?: {
15563
- children?: PortableTextTextBlock['children']
15564
- }
15565
- }
15566
- | {
15567
- type: 'list item.add'
15568
- listItem: string
15569
- }
15570
- | {
15571
- type: 'list item.remove'
15572
- listItem: string
15573
- }
15574
- | {
15575
- type: 'list item.toggle'
15576
- listItem: string
15577
- }
15578
- | {
15579
- type: 'move.block'
15580
- at: [KeyedSegment]
15581
- to: [KeyedSegment]
15582
- }
15583
- | {
15584
- type: 'move.block down'
15585
- at: [KeyedSegment]
15586
- }
15587
- | {
15588
- type: 'move.block up'
15589
- at: [KeyedSegment]
15590
- }
15591
- | {
15592
- type: 'select'
15593
- selection: EditorSelection
15594
- }
15595
- | {
15596
- type: 'select.previous block'
15597
- }
15598
- | {
15599
- type: 'select.next block'
15600
- }
15601
- | {
15602
- type: 'style.add'
15603
- style: string
15604
- }
15605
- | {
15606
- type: 'style.remove'
15607
- style: string
15608
- }
15609
- | {
15610
- type: 'style.toggle'
15611
- style: string
15612
- }
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
14401
  | ({
15626
14402
  type: 'serialization.failure'
15627
14403
  mimeType: `${string}/${string}`
@@ -15801,9 +14577,9 @@ declare const editorMachine: StateMachine<
15801
14577
  }
15802
14578
  }
15803
14579
  | {
15804
- [props: string]: unknown
15805
14580
  type: 'block.set'
15806
14581
  at: [KeyedSegment]
14582
+ props: Record<string, unknown>
15807
14583
  }
15808
14584
  | {
15809
14585
  type: 'block.unset'
@@ -15966,18 +14742,6 @@ declare const editorMachine: StateMachine<
15966
14742
  type: 'style.toggle'
15967
14743
  style: string
15968
14744
  }
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
14745
  | ({
15982
14746
  type: 'serialization.failure'
15983
14747
  mimeType: `${string}/${string}`
@@ -16059,7 +14823,7 @@ declare const editorMachine: StateMachine<
16059
14823
  }
16060
14824
  >
16061
14825
  }
16062
- readonly 'list item.*': {
14826
+ readonly 'insert.*': {
16063
14827
  readonly actions: ActionFunction<
16064
14828
  {
16065
14829
  behaviors: Set<Behavior>
@@ -16073,16 +14837,61 @@ declare const editorMachine: StateMachine<
16073
14837
  value: Array<PortableTextBlock> | undefined
16074
14838
  },
16075
14839
  | {
16076
- type: 'list item.add'
16077
- listItem: string
14840
+ type: 'insert.blocks'
14841
+ blocks: Array<PortableTextBlock>
16078
14842
  }
16079
14843
  | {
16080
- type: 'list item.remove'
16081
- listItem: string
14844
+ type: 'insert.block object'
14845
+ placement: 'auto' | 'after' | 'before'
14846
+ blockObject: {
14847
+ name: string
14848
+ value?: {
14849
+ [prop: string]: unknown
14850
+ }
14851
+ }
16082
14852
  }
16083
14853
  | {
16084
- type: 'list item.toggle'
16085
- listItem: string
14854
+ type: 'insert.inline object'
14855
+ inlineObject: {
14856
+ name: string
14857
+ value?: {
14858
+ [prop: string]: unknown
14859
+ }
14860
+ }
14861
+ }
14862
+ | {
14863
+ type: 'insert.break'
14864
+ }
14865
+ | {
14866
+ type: 'insert.soft break'
14867
+ }
14868
+ | {
14869
+ type: 'insert.block'
14870
+ block: PortableTextBlock
14871
+ placement: 'auto' | 'after' | 'before'
14872
+ }
14873
+ | {
14874
+ type: 'insert.span'
14875
+ text: string
14876
+ annotations?: Array<{
14877
+ name: string
14878
+ value: {
14879
+ [prop: string]: unknown
14880
+ }
14881
+ }>
14882
+ decorators?: Array<string>
14883
+ }
14884
+ | {
14885
+ type: 'insert.text'
14886
+ text: string
14887
+ options?: TextInsertTextOptions
14888
+ }
14889
+ | {
14890
+ type: 'insert.text block'
14891
+ placement: 'auto' | 'after' | 'before'
14892
+ textBlock?: {
14893
+ children?: PortableTextTextBlock['children']
14894
+ }
16086
14895
  },
16087
14896
  | {
16088
14897
  type: 'annotation.add'
@@ -16109,9 +14918,9 @@ declare const editorMachine: StateMachine<
16109
14918
  }
16110
14919
  }
16111
14920
  | {
16112
- [props: string]: unknown
16113
14921
  type: 'block.set'
16114
14922
  at: [KeyedSegment]
14923
+ props: Record<string, unknown>
16115
14924
  }
16116
14925
  | {
16117
14926
  type: 'block.unset'
@@ -16274,18 +15083,6 @@ declare const editorMachine: StateMachine<
16274
15083
  type: 'style.toggle'
16275
15084
  style: string
16276
15085
  }
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
15086
  | ({
16290
15087
  type: 'serialization.failure'
16291
15088
  mimeType: `${string}/${string}`
@@ -16465,9 +15262,9 @@ declare const editorMachine: StateMachine<
16465
15262
  }
16466
15263
  }
16467
15264
  | {
16468
- [props: string]: unknown
16469
15265
  type: 'block.set'
16470
15266
  at: [KeyedSegment]
15267
+ props: Record<string, unknown>
16471
15268
  }
16472
15269
  | {
16473
15270
  type: 'block.unset'
@@ -16630,18 +15427,6 @@ declare const editorMachine: StateMachine<
16630
15427
  type: 'style.toggle'
16631
15428
  style: string
16632
15429
  }
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
15430
  | ({
16646
15431
  type: 'serialization.failure'
16647
15432
  mimeType: `${string}/${string}`
@@ -16723,7 +15508,7 @@ declare const editorMachine: StateMachine<
16723
15508
  }
16724
15509
  >
16725
15510
  }
16726
- readonly 'move.*': {
15511
+ readonly 'list item.*': {
16727
15512
  readonly actions: ActionFunction<
16728
15513
  {
16729
15514
  behaviors: Set<Behavior>
@@ -16737,17 +15522,16 @@ declare const editorMachine: StateMachine<
16737
15522
  value: Array<PortableTextBlock> | undefined
16738
15523
  },
16739
15524
  | {
16740
- type: 'move.block'
16741
- at: [KeyedSegment]
16742
- to: [KeyedSegment]
15525
+ type: 'list item.add'
15526
+ listItem: string
16743
15527
  }
16744
15528
  | {
16745
- type: 'move.block down'
16746
- at: [KeyedSegment]
15529
+ type: 'list item.remove'
15530
+ listItem: string
16747
15531
  }
16748
15532
  | {
16749
- type: 'move.block up'
16750
- at: [KeyedSegment]
15533
+ type: 'list item.toggle'
15534
+ listItem: string
16751
15535
  },
16752
15536
  | {
16753
15537
  type: 'annotation.add'
@@ -16774,9 +15558,9 @@ declare const editorMachine: StateMachine<
16774
15558
  }
16775
15559
  }
16776
15560
  | {
16777
- [props: string]: unknown
16778
15561
  type: 'block.set'
16779
15562
  at: [KeyedSegment]
15563
+ props: Record<string, unknown>
16780
15564
  }
16781
15565
  | {
16782
15566
  type: 'block.unset'
@@ -16939,18 +15723,6 @@ declare const editorMachine: StateMachine<
16939
15723
  type: 'style.toggle'
16940
15724
  style: string
16941
15725
  }
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
15726
  | ({
16955
15727
  type: 'serialization.failure'
16956
15728
  mimeType: `${string}/${string}`
@@ -17130,9 +15902,9 @@ declare const editorMachine: StateMachine<
17130
15902
  }
17131
15903
  }
17132
15904
  | {
17133
- [props: string]: unknown
17134
15905
  type: 'block.set'
17135
15906
  at: [KeyedSegment]
15907
+ props: Record<string, unknown>
17136
15908
  }
17137
15909
  | {
17138
15910
  type: 'block.unset'
@@ -17295,18 +16067,6 @@ declare const editorMachine: StateMachine<
17295
16067
  type: 'style.toggle'
17296
16068
  style: string
17297
16069
  }
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
16070
  | ({
17311
16071
  type: 'serialization.failure'
17312
16072
  mimeType: `${string}/${string}`
@@ -17388,7 +16148,7 @@ declare const editorMachine: StateMachine<
17388
16148
  }
17389
16149
  >
17390
16150
  }
17391
- readonly 'select': {
16151
+ readonly 'move.*': {
17392
16152
  readonly actions: ActionFunction<
17393
16153
  {
17394
16154
  behaviors: Set<Behavior>
@@ -17401,10 +16161,19 @@ declare const editorMachine: StateMachine<
17401
16161
  selection: EditorSelection
17402
16162
  value: Array<PortableTextBlock> | undefined
17403
16163
  },
17404
- {
17405
- type: 'select'
17406
- selection: EditorSelection
17407
- },
16164
+ | {
16165
+ type: 'move.block'
16166
+ at: [KeyedSegment]
16167
+ to: [KeyedSegment]
16168
+ }
16169
+ | {
16170
+ type: 'move.block down'
16171
+ at: [KeyedSegment]
16172
+ }
16173
+ | {
16174
+ type: 'move.block up'
16175
+ at: [KeyedSegment]
16176
+ },
17408
16177
  | {
17409
16178
  type: 'annotation.add'
17410
16179
  annotation: {
@@ -17430,9 +16199,9 @@ declare const editorMachine: StateMachine<
17430
16199
  }
17431
16200
  }
17432
16201
  | {
17433
- [props: string]: unknown
17434
16202
  type: 'block.set'
17435
16203
  at: [KeyedSegment]
16204
+ props: Record<string, unknown>
17436
16205
  }
17437
16206
  | {
17438
16207
  type: 'block.unset'
@@ -17595,18 +16364,6 @@ declare const editorMachine: StateMachine<
17595
16364
  type: 'style.toggle'
17596
16365
  style: string
17597
16366
  }
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
16367
  | ({
17611
16368
  type: 'serialization.failure'
17612
16369
  mimeType: `${string}/${string}`
@@ -17786,9 +16543,9 @@ declare const editorMachine: StateMachine<
17786
16543
  }
17787
16544
  }
17788
16545
  | {
17789
- [props: string]: unknown
17790
16546
  type: 'block.set'
17791
16547
  at: [KeyedSegment]
16548
+ props: Record<string, unknown>
17792
16549
  }
17793
16550
  | {
17794
16551
  type: 'block.unset'
@@ -17951,18 +16708,6 @@ declare const editorMachine: StateMachine<
17951
16708
  type: 'style.toggle'
17952
16709
  style: string
17953
16710
  }
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
16711
  | ({
17967
16712
  type: 'serialization.failure'
17968
16713
  mimeType: `${string}/${string}`
@@ -18044,7 +16789,7 @@ declare const editorMachine: StateMachine<
18044
16789
  }
18045
16790
  >
18046
16791
  }
18047
- readonly 'select.*': {
16792
+ readonly 'select': {
18048
16793
  readonly actions: ActionFunction<
18049
16794
  {
18050
16795
  behaviors: Set<Behavior>
@@ -18057,12 +16802,10 @@ declare const editorMachine: StateMachine<
18057
16802
  selection: EditorSelection
18058
16803
  value: Array<PortableTextBlock> | undefined
18059
16804
  },
18060
- | {
18061
- type: 'select.previous block'
18062
- }
18063
- | {
18064
- type: 'select.next block'
18065
- },
16805
+ {
16806
+ type: 'select'
16807
+ selection: EditorSelection
16808
+ },
18066
16809
  | {
18067
16810
  type: 'annotation.add'
18068
16811
  annotation: {
@@ -18088,9 +16831,9 @@ declare const editorMachine: StateMachine<
18088
16831
  }
18089
16832
  }
18090
16833
  | {
18091
- [props: string]: unknown
18092
16834
  type: 'block.set'
18093
16835
  at: [KeyedSegment]
16836
+ props: Record<string, unknown>
18094
16837
  }
18095
16838
  | {
18096
16839
  type: 'block.unset'
@@ -18253,18 +16996,6 @@ declare const editorMachine: StateMachine<
18253
16996
  type: 'style.toggle'
18254
16997
  style: string
18255
16998
  }
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
16999
  | ({
18269
17000
  type: 'serialization.failure'
18270
17001
  mimeType: `${string}/${string}`
@@ -18444,9 +17175,9 @@ declare const editorMachine: StateMachine<
18444
17175
  }
18445
17176
  }
18446
17177
  | {
18447
- [props: string]: unknown
18448
17178
  type: 'block.set'
18449
17179
  at: [KeyedSegment]
17180
+ props: Record<string, unknown>
18450
17181
  }
18451
17182
  | {
18452
17183
  type: 'block.unset'
@@ -18609,18 +17340,6 @@ declare const editorMachine: StateMachine<
18609
17340
  type: 'style.toggle'
18610
17341
  style: string
18611
17342
  }
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
17343
  | ({
18625
17344
  type: 'serialization.failure'
18626
17345
  mimeType: `${string}/${string}`
@@ -18702,7 +17421,7 @@ declare const editorMachine: StateMachine<
18702
17421
  }
18703
17422
  >
18704
17423
  }
18705
- readonly 'style.*': {
17424
+ readonly 'select.*': {
18706
17425
  readonly actions: ActionFunction<
18707
17426
  {
18708
17427
  behaviors: Set<Behavior>
@@ -18716,16 +17435,10 @@ declare const editorMachine: StateMachine<
18716
17435
  value: Array<PortableTextBlock> | undefined
18717
17436
  },
18718
17437
  | {
18719
- type: 'style.add'
18720
- style: string
18721
- }
18722
- | {
18723
- type: 'style.remove'
18724
- style: string
17438
+ type: 'select.previous block'
18725
17439
  }
18726
17440
  | {
18727
- type: 'style.toggle'
18728
- style: string
17441
+ type: 'select.next block'
18729
17442
  },
18730
17443
  | {
18731
17444
  type: 'annotation.add'
@@ -18752,9 +17465,9 @@ declare const editorMachine: StateMachine<
18752
17465
  }
18753
17466
  }
18754
17467
  | {
18755
- [props: string]: unknown
18756
17468
  type: 'block.set'
18757
17469
  at: [KeyedSegment]
17470
+ props: Record<string, unknown>
18758
17471
  }
18759
17472
  | {
18760
17473
  type: 'block.unset'
@@ -18917,18 +17630,6 @@ declare const editorMachine: StateMachine<
18917
17630
  type: 'style.toggle'
18918
17631
  style: string
18919
17632
  }
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
17633
  | ({
18933
17634
  type: 'serialization.failure'
18934
17635
  mimeType: `${string}/${string}`
@@ -19108,9 +17809,9 @@ declare const editorMachine: StateMachine<
19108
17809
  }
19109
17810
  }
19110
17811
  | {
19111
- [props: string]: unknown
19112
17812
  type: 'block.set'
19113
17813
  at: [KeyedSegment]
17814
+ props: Record<string, unknown>
19114
17815
  }
19115
17816
  | {
19116
17817
  type: 'block.unset'
@@ -19273,18 +17974,6 @@ declare const editorMachine: StateMachine<
19273
17974
  type: 'style.toggle'
19274
17975
  style: string
19275
17976
  }
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
17977
  | ({
19289
17978
  type: 'serialization.failure'
19290
17979
  mimeType: `${string}/${string}`
@@ -19366,7 +18055,7 @@ declare const editorMachine: StateMachine<
19366
18055
  }
19367
18056
  >
19368
18057
  }
19369
- readonly 'text block.*': {
18058
+ readonly 'style.*': {
19370
18059
  readonly actions: ActionFunction<
19371
18060
  {
19372
18061
  behaviors: Set<Behavior>
@@ -19380,16 +18069,16 @@ declare const editorMachine: StateMachine<
19380
18069
  value: Array<PortableTextBlock> | undefined
19381
18070
  },
19382
18071
  | {
19383
- type: 'text block.set'
19384
- at: [KeyedSegment]
19385
- level?: number
19386
- listItem?: string
19387
- style?: string
18072
+ type: 'style.add'
18073
+ style: string
19388
18074
  }
19389
18075
  | {
19390
- type: 'text block.unset'
19391
- at: [KeyedSegment]
19392
- props: Array<'level' | 'listItem' | 'style'>
18076
+ type: 'style.remove'
18077
+ style: string
18078
+ }
18079
+ | {
18080
+ type: 'style.toggle'
18081
+ style: string
19393
18082
  },
19394
18083
  | {
19395
18084
  type: 'annotation.add'
@@ -19416,9 +18105,9 @@ declare const editorMachine: StateMachine<
19416
18105
  }
19417
18106
  }
19418
18107
  | {
19419
- [props: string]: unknown
19420
18108
  type: 'block.set'
19421
18109
  at: [KeyedSegment]
18110
+ props: Record<string, unknown>
19422
18111
  }
19423
18112
  | {
19424
18113
  type: 'block.unset'
@@ -19581,18 +18270,6 @@ declare const editorMachine: StateMachine<
19581
18270
  type: 'style.toggle'
19582
18271
  style: string
19583
18272
  }
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
18273
  | ({
19597
18274
  type: 'serialization.failure'
19598
18275
  mimeType: `${string}/${string}`
@@ -19772,9 +18449,9 @@ declare const editorMachine: StateMachine<
19772
18449
  }
19773
18450
  }
19774
18451
  | {
19775
- [props: string]: unknown
19776
18452
  type: 'block.set'
19777
18453
  at: [KeyedSegment]
18454
+ props: Record<string, unknown>
19778
18455
  }
19779
18456
  | {
19780
18457
  type: 'block.unset'
@@ -19937,18 +18614,6 @@ declare const editorMachine: StateMachine<
19937
18614
  type: 'style.toggle'
19938
18615
  style: string
19939
18616
  }
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
18617
  | ({
19953
18618
  type: 'serialization.failure'
19954
18619
  mimeType: `${string}/${string}`
@@ -20030,6 +18695,19 @@ declare const editorMachine: StateMachine<
20030
18695
  }
20031
18696
  >
20032
18697
  }
18698
+ readonly 'text block.*': {
18699
+ readonly actions: ActionFunction<
18700
+ MachineContext,
18701
+ EventObject,
18702
+ EventObject,
18703
+ NonReducibleUnknown,
18704
+ never,
18705
+ never,
18706
+ never,
18707
+ never,
18708
+ AnyEventObject
18709
+ >
18710
+ }
20033
18711
  }
20034
18712
  }
20035
18713
  }
@@ -20529,7 +19207,7 @@ declare type SyntheticBehaviorEvent =
20529
19207
  | {
20530
19208
  type: 'block.set'
20531
19209
  at: [KeyedSegment]
20532
- [props: string]: unknown
19210
+ props: Record<string, unknown>
20533
19211
  }
20534
19212
  | {
20535
19213
  type: 'block.unset'
@@ -20692,18 +19370,6 @@ declare type SyntheticBehaviorEvent =
20692
19370
  type: 'style.toggle'
20693
19371
  style: string
20694
19372
  }
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
19373
  | (PickFromUnion<
20708
19374
  ConverterEvent,
20709
19375
  'type',