@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
package/lib/index.d.ts CHANGED
@@ -54,6 +54,7 @@ import {
54
54
  EventObject,
55
55
  InputFrom,
56
56
  IsNotNever,
57
+ MachineContext,
57
58
  MachineSnapshot,
58
59
  MetaObject,
59
60
  NonReducibleUnknown,
@@ -692,9 +693,9 @@ declare const editorMachine: StateMachine<
692
693
  }
693
694
  }
694
695
  | {
695
- [props: string]: unknown
696
696
  type: 'block.set'
697
697
  at: [KeyedSegment]
698
+ props: Record<string, unknown>
698
699
  }
699
700
  | {
700
701
  type: 'block.unset'
@@ -857,18 +858,6 @@ declare const editorMachine: StateMachine<
857
858
  type: 'style.toggle'
858
859
  style: string
859
860
  }
860
- | {
861
- type: 'text block.set'
862
- at: [KeyedSegment]
863
- level?: number
864
- listItem?: string
865
- style?: string
866
- }
867
- | {
868
- type: 'text block.unset'
869
- at: [KeyedSegment]
870
- props: Array<'level' | 'listItem' | 'style'>
871
- }
872
861
  | ({
873
862
  type: 'serialization.failure'
874
863
  mimeType: `${string}/${string}`
@@ -1123,9 +1112,9 @@ declare const editorMachine: StateMachine<
1123
1112
  }
1124
1113
  }
1125
1114
  | {
1126
- [props: string]: unknown
1127
1115
  type: 'block.set'
1128
1116
  at: [KeyedSegment]
1117
+ props: Record<string, unknown>
1129
1118
  }
1130
1119
  | {
1131
1120
  type: 'block.unset'
@@ -1288,18 +1277,6 @@ declare const editorMachine: StateMachine<
1288
1277
  type: 'style.toggle'
1289
1278
  style: string
1290
1279
  }
1291
- | {
1292
- type: 'text block.set'
1293
- at: [KeyedSegment]
1294
- level?: number
1295
- listItem?: string
1296
- style?: string
1297
- }
1298
- | {
1299
- type: 'text block.unset'
1300
- at: [KeyedSegment]
1301
- props: Array<'level' | 'listItem' | 'style'>
1302
- }
1303
1280
  | ({
1304
1281
  type: 'serialization.failure'
1305
1282
  mimeType: `${string}/${string}`
@@ -1454,9 +1431,9 @@ declare const editorMachine: StateMachine<
1454
1431
  }
1455
1432
  }
1456
1433
  | {
1457
- [props: string]: unknown
1458
1434
  type: 'block.set'
1459
1435
  at: [KeyedSegment]
1436
+ props: Record<string, unknown>
1460
1437
  }
1461
1438
  | {
1462
1439
  type: 'block.unset'
@@ -1619,18 +1596,6 @@ declare const editorMachine: StateMachine<
1619
1596
  type: 'style.toggle'
1620
1597
  style: string
1621
1598
  }
1622
- | {
1623
- type: 'text block.set'
1624
- at: [KeyedSegment]
1625
- level?: number
1626
- listItem?: string
1627
- style?: string
1628
- }
1629
- | {
1630
- type: 'text block.unset'
1631
- at: [KeyedSegment]
1632
- props: Array<'level' | 'listItem' | 'style'>
1633
- }
1634
1599
  | ({
1635
1600
  type: 'serialization.failure'
1636
1601
  mimeType: `${string}/${string}`
@@ -1810,9 +1775,9 @@ declare const editorMachine: StateMachine<
1810
1775
  }
1811
1776
  }
1812
1777
  | {
1813
- [props: string]: unknown
1814
1778
  type: 'block.set'
1815
1779
  at: [KeyedSegment]
1780
+ props: Record<string, unknown>
1816
1781
  }
1817
1782
  | {
1818
1783
  type: 'block.unset'
@@ -1975,18 +1940,6 @@ declare const editorMachine: StateMachine<
1975
1940
  type: 'style.toggle'
1976
1941
  style: string
1977
1942
  }
1978
- | {
1979
- type: 'text block.set'
1980
- at: [KeyedSegment]
1981
- level?: number
1982
- listItem?: string
1983
- style?: string
1984
- }
1985
- | {
1986
- type: 'text block.unset'
1987
- at: [KeyedSegment]
1988
- props: Array<'level' | 'listItem' | 'style'>
1989
- }
1990
1943
  | ({
1991
1944
  type: 'serialization.failure'
1992
1945
  mimeType: `${string}/${string}`
@@ -2190,9 +2143,9 @@ declare const editorMachine: StateMachine<
2190
2143
  }
2191
2144
  }
2192
2145
  | {
2193
- [props: string]: unknown
2194
2146
  type: 'block.set'
2195
2147
  at: [KeyedSegment]
2148
+ props: Record<string, unknown>
2196
2149
  }
2197
2150
  | {
2198
2151
  type: 'block.unset'
@@ -2355,18 +2308,6 @@ declare const editorMachine: StateMachine<
2355
2308
  type: 'style.toggle'
2356
2309
  style: string
2357
2310
  }
2358
- | {
2359
- type: 'text block.set'
2360
- at: [KeyedSegment]
2361
- level?: number
2362
- listItem?: string
2363
- style?: string
2364
- }
2365
- | {
2366
- type: 'text block.unset'
2367
- at: [KeyedSegment]
2368
- props: Array<'level' | 'listItem' | 'style'>
2369
- }
2370
2311
  | ({
2371
2312
  type: 'serialization.failure'
2372
2313
  mimeType: `${string}/${string}`
@@ -2544,9 +2485,9 @@ declare const editorMachine: StateMachine<
2544
2485
  }
2545
2486
  }
2546
2487
  | {
2547
- [props: string]: unknown
2548
2488
  type: 'block.set'
2549
2489
  at: [KeyedSegment]
2490
+ props: Record<string, unknown>
2550
2491
  }
2551
2492
  | {
2552
2493
  type: 'block.unset'
@@ -2709,18 +2650,6 @@ declare const editorMachine: StateMachine<
2709
2650
  type: 'style.toggle'
2710
2651
  style: string
2711
2652
  }
2712
- | {
2713
- type: 'text block.set'
2714
- at: [KeyedSegment]
2715
- level?: number
2716
- listItem?: string
2717
- style?: string
2718
- }
2719
- | {
2720
- type: 'text block.unset'
2721
- at: [KeyedSegment]
2722
- props: Array<'level' | 'listItem' | 'style'>
2723
- }
2724
2653
  | ({
2725
2654
  type: 'serialization.failure'
2726
2655
  mimeType: `${string}/${string}`
@@ -2843,9 +2772,9 @@ declare const editorMachine: StateMachine<
2843
2772
  }
2844
2773
  }
2845
2774
  | {
2846
- [props: string]: unknown
2847
2775
  type: 'block.set'
2848
2776
  at: [KeyedSegment]
2777
+ props: Record<string, unknown>
2849
2778
  }
2850
2779
  | {
2851
2780
  type: 'block.unset'
@@ -3008,18 +2937,6 @@ declare const editorMachine: StateMachine<
3008
2937
  type: 'style.toggle'
3009
2938
  style: string
3010
2939
  }
3011
- | {
3012
- type: 'text block.set'
3013
- at: [KeyedSegment]
3014
- level?: number
3015
- listItem?: string
3016
- style?: string
3017
- }
3018
- | {
3019
- type: 'text block.unset'
3020
- at: [KeyedSegment]
3021
- props: Array<'level' | 'listItem' | 'style'>
3022
- }
3023
2940
  | ({
3024
2941
  type: 'serialization.failure'
3025
2942
  mimeType: `${string}/${string}`
@@ -3197,9 +3114,9 @@ declare const editorMachine: StateMachine<
3197
3114
  }
3198
3115
  }
3199
3116
  | {
3200
- [props: string]: unknown
3201
3117
  type: 'block.set'
3202
3118
  at: [KeyedSegment]
3119
+ props: Record<string, unknown>
3203
3120
  }
3204
3121
  | {
3205
3122
  type: 'block.unset'
@@ -3362,18 +3279,6 @@ declare const editorMachine: StateMachine<
3362
3279
  type: 'style.toggle'
3363
3280
  style: string
3364
3281
  }
3365
- | {
3366
- type: 'text block.set'
3367
- at: [KeyedSegment]
3368
- level?: number
3369
- listItem?: string
3370
- style?: string
3371
- }
3372
- | {
3373
- type: 'text block.unset'
3374
- at: [KeyedSegment]
3375
- props: Array<'level' | 'listItem' | 'style'>
3376
- }
3377
3282
  | ({
3378
3283
  type: 'serialization.failure'
3379
3284
  mimeType: `${string}/${string}`
@@ -3499,9 +3404,9 @@ declare const editorMachine: StateMachine<
3499
3404
  }
3500
3405
  }
3501
3406
  | {
3502
- [props: string]: unknown
3503
3407
  type: 'block.set'
3504
3408
  at: [KeyedSegment]
3409
+ props: Record<string, unknown>
3505
3410
  }
3506
3411
  | {
3507
3412
  type: 'block.unset'
@@ -3664,18 +3569,6 @@ declare const editorMachine: StateMachine<
3664
3569
  type: 'style.toggle'
3665
3570
  style: string
3666
3571
  }
3667
- | {
3668
- type: 'text block.set'
3669
- at: [KeyedSegment]
3670
- level?: number
3671
- listItem?: string
3672
- style?: string
3673
- }
3674
- | {
3675
- type: 'text block.unset'
3676
- at: [KeyedSegment]
3677
- props: Array<'level' | 'listItem' | 'style'>
3678
- }
3679
3572
  | ({
3680
3573
  type: 'serialization.failure'
3681
3574
  mimeType: `${string}/${string}`
@@ -3853,9 +3746,9 @@ declare const editorMachine: StateMachine<
3853
3746
  }
3854
3747
  }
3855
3748
  | {
3856
- [props: string]: unknown
3857
3749
  type: 'block.set'
3858
3750
  at: [KeyedSegment]
3751
+ props: Record<string, unknown>
3859
3752
  }
3860
3753
  | {
3861
3754
  type: 'block.unset'
@@ -4018,18 +3911,6 @@ declare const editorMachine: StateMachine<
4018
3911
  type: 'style.toggle'
4019
3912
  style: string
4020
3913
  }
4021
- | {
4022
- type: 'text block.set'
4023
- at: [KeyedSegment]
4024
- level?: number
4025
- listItem?: string
4026
- style?: string
4027
- }
4028
- | {
4029
- type: 'text block.unset'
4030
- at: [KeyedSegment]
4031
- props: Array<'level' | 'listItem' | 'style'>
4032
- }
4033
3914
  | ({
4034
3915
  type: 'serialization.failure'
4035
3916
  mimeType: `${string}/${string}`
@@ -4154,9 +4035,9 @@ declare const editorMachine: StateMachine<
4154
4035
  }
4155
4036
  }
4156
4037
  | {
4157
- [props: string]: unknown
4158
4038
  type: 'block.set'
4159
4039
  at: [KeyedSegment]
4040
+ props: Record<string, unknown>
4160
4041
  }
4161
4042
  | {
4162
4043
  type: 'block.unset'
@@ -4319,18 +4200,6 @@ declare const editorMachine: StateMachine<
4319
4200
  type: 'style.toggle'
4320
4201
  style: string
4321
4202
  }
4322
- | {
4323
- type: 'text block.set'
4324
- at: [KeyedSegment]
4325
- level?: number
4326
- listItem?: string
4327
- style?: string
4328
- }
4329
- | {
4330
- type: 'text block.unset'
4331
- at: [KeyedSegment]
4332
- props: Array<'level' | 'listItem' | 'style'>
4333
- }
4334
4203
  | ({
4335
4204
  type: 'serialization.failure'
4336
4205
  mimeType: `${string}/${string}`
@@ -4508,9 +4377,9 @@ declare const editorMachine: StateMachine<
4508
4377
  }
4509
4378
  }
4510
4379
  | {
4511
- [props: string]: unknown
4512
4380
  type: 'block.set'
4513
4381
  at: [KeyedSegment]
4382
+ props: Record<string, unknown>
4514
4383
  }
4515
4384
  | {
4516
4385
  type: 'block.unset'
@@ -4673,18 +4542,6 @@ declare const editorMachine: StateMachine<
4673
4542
  type: 'style.toggle'
4674
4543
  style: string
4675
4544
  }
4676
- | {
4677
- type: 'text block.set'
4678
- at: [KeyedSegment]
4679
- level?: number
4680
- listItem?: string
4681
- style?: string
4682
- }
4683
- | {
4684
- type: 'text block.unset'
4685
- at: [KeyedSegment]
4686
- props: Array<'level' | 'listItem' | 'style'>
4687
- }
4688
4545
  | ({
4689
4546
  type: 'serialization.failure'
4690
4547
  mimeType: `${string}/${string}`
@@ -4808,9 +4665,9 @@ declare const editorMachine: StateMachine<
4808
4665
  }
4809
4666
  }
4810
4667
  | {
4811
- [props: string]: unknown
4812
4668
  type: 'block.set'
4813
4669
  at: [KeyedSegment]
4670
+ props: Record<string, unknown>
4814
4671
  }
4815
4672
  | {
4816
4673
  type: 'block.unset'
@@ -4973,18 +4830,6 @@ declare const editorMachine: StateMachine<
4973
4830
  type: 'style.toggle'
4974
4831
  style: string
4975
4832
  }
4976
- | {
4977
- type: 'text block.set'
4978
- at: [KeyedSegment]
4979
- level?: number
4980
- listItem?: string
4981
- style?: string
4982
- }
4983
- | {
4984
- type: 'text block.unset'
4985
- at: [KeyedSegment]
4986
- props: Array<'level' | 'listItem' | 'style'>
4987
- }
4988
4833
  | ({
4989
4834
  type: 'serialization.failure'
4990
4835
  mimeType: `${string}/${string}`
@@ -5162,9 +5007,9 @@ declare const editorMachine: StateMachine<
5162
5007
  }
5163
5008
  }
5164
5009
  | {
5165
- [props: string]: unknown
5166
5010
  type: 'block.set'
5167
5011
  at: [KeyedSegment]
5012
+ props: Record<string, unknown>
5168
5013
  }
5169
5014
  | {
5170
5015
  type: 'block.unset'
@@ -5327,18 +5172,6 @@ declare const editorMachine: StateMachine<
5327
5172
  type: 'style.toggle'
5328
5173
  style: string
5329
5174
  }
5330
- | {
5331
- type: 'text block.set'
5332
- at: [KeyedSegment]
5333
- level?: number
5334
- listItem?: string
5335
- style?: string
5336
- }
5337
- | {
5338
- type: 'text block.unset'
5339
- at: [KeyedSegment]
5340
- props: Array<'level' | 'listItem' | 'style'>
5341
- }
5342
5175
  | ({
5343
5176
  type: 'serialization.failure'
5344
5177
  mimeType: `${string}/${string}`
@@ -5463,9 +5296,9 @@ declare const editorMachine: StateMachine<
5463
5296
  }
5464
5297
  }
5465
5298
  | {
5466
- [props: string]: unknown
5467
5299
  type: 'block.set'
5468
5300
  at: [KeyedSegment]
5301
+ props: Record<string, unknown>
5469
5302
  }
5470
5303
  | {
5471
5304
  type: 'block.unset'
@@ -5628,18 +5461,6 @@ declare const editorMachine: StateMachine<
5628
5461
  type: 'style.toggle'
5629
5462
  style: string
5630
5463
  }
5631
- | {
5632
- type: 'text block.set'
5633
- at: [KeyedSegment]
5634
- level?: number
5635
- listItem?: string
5636
- style?: string
5637
- }
5638
- | {
5639
- type: 'text block.unset'
5640
- at: [KeyedSegment]
5641
- props: Array<'level' | 'listItem' | 'style'>
5642
- }
5643
5464
  | ({
5644
5465
  type: 'serialization.failure'
5645
5466
  mimeType: `${string}/${string}`
@@ -5835,9 +5656,9 @@ declare const editorMachine: StateMachine<
5835
5656
  }
5836
5657
  }
5837
5658
  | {
5838
- [props: string]: unknown
5839
5659
  type: 'block.set'
5840
5660
  at: [KeyedSegment]
5661
+ props: Record<string, unknown>
5841
5662
  }
5842
5663
  | {
5843
5664
  type: 'block.unset'
@@ -6000,18 +5821,6 @@ declare const editorMachine: StateMachine<
6000
5821
  type: 'style.toggle'
6001
5822
  style: string
6002
5823
  }
6003
- | {
6004
- type: 'text block.set'
6005
- at: [KeyedSegment]
6006
- level?: number
6007
- listItem?: string
6008
- style?: string
6009
- }
6010
- | {
6011
- type: 'text block.unset'
6012
- at: [KeyedSegment]
6013
- props: Array<'level' | 'listItem' | 'style'>
6014
- }
6015
5824
  | ({
6016
5825
  type: 'serialization.failure'
6017
5826
  mimeType: `${string}/${string}`
@@ -6189,9 +5998,9 @@ declare const editorMachine: StateMachine<
6189
5998
  }
6190
5999
  }
6191
6000
  | {
6192
- [props: string]: unknown
6193
6001
  type: 'block.set'
6194
6002
  at: [KeyedSegment]
6003
+ props: Record<string, unknown>
6195
6004
  }
6196
6005
  | {
6197
6006
  type: 'block.unset'
@@ -6354,18 +6163,6 @@ declare const editorMachine: StateMachine<
6354
6163
  type: 'style.toggle'
6355
6164
  style: string
6356
6165
  }
6357
- | {
6358
- type: 'text block.set'
6359
- at: [KeyedSegment]
6360
- level?: number
6361
- listItem?: string
6362
- style?: string
6363
- }
6364
- | {
6365
- type: 'text block.unset'
6366
- at: [KeyedSegment]
6367
- props: Array<'level' | 'listItem' | 'style'>
6368
- }
6369
6166
  | ({
6370
6167
  type: 'serialization.failure'
6371
6168
  mimeType: `${string}/${string}`
@@ -6490,9 +6287,9 @@ declare const editorMachine: StateMachine<
6490
6287
  }
6491
6288
  }
6492
6289
  | {
6493
- [props: string]: unknown
6494
6290
  type: 'block.set'
6495
6291
  at: [KeyedSegment]
6292
+ props: Record<string, unknown>
6496
6293
  }
6497
6294
  | {
6498
6295
  type: 'block.unset'
@@ -6655,18 +6452,6 @@ declare const editorMachine: StateMachine<
6655
6452
  type: 'style.toggle'
6656
6453
  style: string
6657
6454
  }
6658
- | {
6659
- type: 'text block.set'
6660
- at: [KeyedSegment]
6661
- level?: number
6662
- listItem?: string
6663
- style?: string
6664
- }
6665
- | {
6666
- type: 'text block.unset'
6667
- at: [KeyedSegment]
6668
- props: Array<'level' | 'listItem' | 'style'>
6669
- }
6670
6455
  | ({
6671
6456
  type: 'serialization.failure'
6672
6457
  mimeType: `${string}/${string}`
@@ -6844,9 +6629,9 @@ declare const editorMachine: StateMachine<
6844
6629
  }
6845
6630
  }
6846
6631
  | {
6847
- [props: string]: unknown
6848
6632
  type: 'block.set'
6849
6633
  at: [KeyedSegment]
6634
+ props: Record<string, unknown>
6850
6635
  }
6851
6636
  | {
6852
6637
  type: 'block.unset'
@@ -7009,18 +6794,6 @@ declare const editorMachine: StateMachine<
7009
6794
  type: 'style.toggle'
7010
6795
  style: string
7011
6796
  }
7012
- | {
7013
- type: 'text block.set'
7014
- at: [KeyedSegment]
7015
- level?: number
7016
- listItem?: string
7017
- style?: string
7018
- }
7019
- | {
7020
- type: 'text block.unset'
7021
- at: [KeyedSegment]
7022
- props: Array<'level' | 'listItem' | 'style'>
7023
- }
7024
6797
  | ({
7025
6798
  type: 'serialization.failure'
7026
6799
  mimeType: `${string}/${string}`
@@ -7143,9 +6916,9 @@ declare const editorMachine: StateMachine<
7143
6916
  }
7144
6917
  }
7145
6918
  | {
7146
- [props: string]: unknown
7147
6919
  type: 'block.set'
7148
6920
  at: [KeyedSegment]
6921
+ props: Record<string, unknown>
7149
6922
  }
7150
6923
  | {
7151
6924
  type: 'block.unset'
@@ -7308,18 +7081,6 @@ declare const editorMachine: StateMachine<
7308
7081
  type: 'style.toggle'
7309
7082
  style: string
7310
7083
  }
7311
- | {
7312
- type: 'text block.set'
7313
- at: [KeyedSegment]
7314
- level?: number
7315
- listItem?: string
7316
- style?: string
7317
- }
7318
- | {
7319
- type: 'text block.unset'
7320
- at: [KeyedSegment]
7321
- props: Array<'level' | 'listItem' | 'style'>
7322
- }
7323
7084
  | ({
7324
7085
  type: 'serialization.failure'
7325
7086
  mimeType: `${string}/${string}`
@@ -7497,9 +7258,9 @@ declare const editorMachine: StateMachine<
7497
7258
  }
7498
7259
  }
7499
7260
  | {
7500
- [props: string]: unknown
7501
7261
  type: 'block.set'
7502
7262
  at: [KeyedSegment]
7263
+ props: Record<string, unknown>
7503
7264
  }
7504
7265
  | {
7505
7266
  type: 'block.unset'
@@ -7662,18 +7423,6 @@ declare const editorMachine: StateMachine<
7662
7423
  type: 'style.toggle'
7663
7424
  style: string
7664
7425
  }
7665
- | {
7666
- type: 'text block.set'
7667
- at: [KeyedSegment]
7668
- level?: number
7669
- listItem?: string
7670
- style?: string
7671
- }
7672
- | {
7673
- type: 'text block.unset'
7674
- at: [KeyedSegment]
7675
- props: Array<'level' | 'listItem' | 'style'>
7676
- }
7677
7426
  | ({
7678
7427
  type: 'serialization.failure'
7679
7428
  mimeType: `${string}/${string}`
@@ -7797,9 +7546,9 @@ declare const editorMachine: StateMachine<
7797
7546
  }
7798
7547
  }
7799
7548
  | {
7800
- [props: string]: unknown
7801
7549
  type: 'block.set'
7802
7550
  at: [KeyedSegment]
7551
+ props: Record<string, unknown>
7803
7552
  }
7804
7553
  | {
7805
7554
  type: 'block.unset'
@@ -7962,18 +7711,6 @@ declare const editorMachine: StateMachine<
7962
7711
  type: 'style.toggle'
7963
7712
  style: string
7964
7713
  }
7965
- | {
7966
- type: 'text block.set'
7967
- at: [KeyedSegment]
7968
- level?: number
7969
- listItem?: string
7970
- style?: string
7971
- }
7972
- | {
7973
- type: 'text block.unset'
7974
- at: [KeyedSegment]
7975
- props: Array<'level' | 'listItem' | 'style'>
7976
- }
7977
7714
  | ({
7978
7715
  type: 'serialization.failure'
7979
7716
  mimeType: `${string}/${string}`
@@ -8151,9 +7888,9 @@ declare const editorMachine: StateMachine<
8151
7888
  }
8152
7889
  }
8153
7890
  | {
8154
- [props: string]: unknown
8155
7891
  type: 'block.set'
8156
7892
  at: [KeyedSegment]
7893
+ props: Record<string, unknown>
8157
7894
  }
8158
7895
  | {
8159
7896
  type: 'block.unset'
@@ -8316,18 +8053,6 @@ declare const editorMachine: StateMachine<
8316
8053
  type: 'style.toggle'
8317
8054
  style: string
8318
8055
  }
8319
- | {
8320
- type: 'text block.set'
8321
- at: [KeyedSegment]
8322
- level?: number
8323
- listItem?: string
8324
- style?: string
8325
- }
8326
- | {
8327
- type: 'text block.unset'
8328
- at: [KeyedSegment]
8329
- props: Array<'level' | 'listItem' | 'style'>
8330
- }
8331
8056
  | ({
8332
8057
  type: 'serialization.failure'
8333
8058
  mimeType: `${string}/${string}`
@@ -8454,9 +8179,9 @@ declare const editorMachine: StateMachine<
8454
8179
  }
8455
8180
  }
8456
8181
  | {
8457
- [props: string]: unknown
8458
8182
  type: 'block.set'
8459
8183
  at: [KeyedSegment]
8184
+ props: Record<string, unknown>
8460
8185
  }
8461
8186
  | {
8462
8187
  type: 'block.unset'
@@ -8619,18 +8344,6 @@ declare const editorMachine: StateMachine<
8619
8344
  type: 'style.toggle'
8620
8345
  style: string
8621
8346
  }
8622
- | {
8623
- type: 'text block.set'
8624
- at: [KeyedSegment]
8625
- level?: number
8626
- listItem?: string
8627
- style?: string
8628
- }
8629
- | {
8630
- type: 'text block.unset'
8631
- at: [KeyedSegment]
8632
- props: Array<'level' | 'listItem' | 'style'>
8633
- }
8634
8347
  | ({
8635
8348
  type: 'serialization.failure'
8636
8349
  mimeType: `${string}/${string}`
@@ -8808,9 +8521,9 @@ declare const editorMachine: StateMachine<
8808
8521
  }
8809
8522
  }
8810
8523
  | {
8811
- [props: string]: unknown
8812
8524
  type: 'block.set'
8813
8525
  at: [KeyedSegment]
8526
+ props: Record<string, unknown>
8814
8527
  }
8815
8528
  | {
8816
8529
  type: 'block.unset'
@@ -8973,18 +8686,6 @@ declare const editorMachine: StateMachine<
8973
8686
  type: 'style.toggle'
8974
8687
  style: string
8975
8688
  }
8976
- | {
8977
- type: 'text block.set'
8978
- at: [KeyedSegment]
8979
- level?: number
8980
- listItem?: string
8981
- style?: string
8982
- }
8983
- | {
8984
- type: 'text block.unset'
8985
- at: [KeyedSegment]
8986
- props: Array<'level' | 'listItem' | 'style'>
8987
- }
8988
8689
  | ({
8989
8690
  type: 'serialization.failure'
8990
8691
  mimeType: `${string}/${string}`
@@ -9111,9 +8812,9 @@ declare const editorMachine: StateMachine<
9111
8812
  }
9112
8813
  }
9113
8814
  | {
9114
- [props: string]: unknown
9115
8815
  type: 'block.set'
9116
8816
  at: [KeyedSegment]
8817
+ props: Record<string, unknown>
9117
8818
  }
9118
8819
  | {
9119
8820
  type: 'block.unset'
@@ -9276,18 +8977,6 @@ declare const editorMachine: StateMachine<
9276
8977
  type: 'style.toggle'
9277
8978
  style: string
9278
8979
  }
9279
- | {
9280
- type: 'text block.set'
9281
- at: [KeyedSegment]
9282
- level?: number
9283
- listItem?: string
9284
- style?: string
9285
- }
9286
- | {
9287
- type: 'text block.unset'
9288
- at: [KeyedSegment]
9289
- props: Array<'level' | 'listItem' | 'style'>
9290
- }
9291
8980
  | ({
9292
8981
  type: 'serialization.failure'
9293
8982
  mimeType: `${string}/${string}`
@@ -9488,9 +9177,9 @@ declare const editorMachine: StateMachine<
9488
9177
  }
9489
9178
  }
9490
9179
  | {
9491
- [props: string]: unknown
9492
9180
  type: 'block.set'
9493
9181
  at: [KeyedSegment]
9182
+ props: Record<string, unknown>
9494
9183
  }
9495
9184
  | {
9496
9185
  type: 'block.unset'
@@ -9653,18 +9342,6 @@ declare const editorMachine: StateMachine<
9653
9342
  type: 'style.toggle'
9654
9343
  style: string
9655
9344
  }
9656
- | {
9657
- type: 'text block.set'
9658
- at: [KeyedSegment]
9659
- level?: number
9660
- listItem?: string
9661
- style?: string
9662
- }
9663
- | {
9664
- type: 'text block.unset'
9665
- at: [KeyedSegment]
9666
- props: Array<'level' | 'listItem' | 'style'>
9667
- }
9668
9345
  | ({
9669
9346
  type: 'serialization.failure'
9670
9347
  mimeType: `${string}/${string}`
@@ -9862,9 +9539,9 @@ declare const editorMachine: StateMachine<
9862
9539
  }
9863
9540
  }
9864
9541
  | {
9865
- [props: string]: unknown
9866
9542
  type: 'block.set'
9867
9543
  at: [KeyedSegment]
9544
+ props: Record<string, unknown>
9868
9545
  }
9869
9546
  | {
9870
9547
  type: 'block.unset'
@@ -10027,18 +9704,6 @@ declare const editorMachine: StateMachine<
10027
9704
  type: 'style.toggle'
10028
9705
  style: string
10029
9706
  }
10030
- | {
10031
- type: 'text block.set'
10032
- at: [KeyedSegment]
10033
- level?: number
10034
- listItem?: string
10035
- style?: string
10036
- }
10037
- | {
10038
- type: 'text block.unset'
10039
- at: [KeyedSegment]
10040
- props: Array<'level' | 'listItem' | 'style'>
10041
- }
10042
9707
  | ({
10043
9708
  type: 'serialization.failure'
10044
9709
  mimeType: `${string}/${string}`
@@ -10384,9 +10049,9 @@ declare const editorMachine: StateMachine<
10384
10049
  }
10385
10050
  }
10386
10051
  | {
10387
- [props: string]: unknown
10388
10052
  type: 'block.set'
10389
10053
  at: [KeyedSegment]
10054
+ props: Record<string, unknown>
10390
10055
  }
10391
10056
  | {
10392
10057
  type: 'block.unset'
@@ -10549,18 +10214,6 @@ declare const editorMachine: StateMachine<
10549
10214
  type: 'style.toggle'
10550
10215
  style: string
10551
10216
  }
10552
- | {
10553
- type: 'text block.set'
10554
- at: [KeyedSegment]
10555
- level?: number
10556
- listItem?: string
10557
- style?: string
10558
- }
10559
- | {
10560
- type: 'text block.unset'
10561
- at: [KeyedSegment]
10562
- props: Array<'level' | 'listItem' | 'style'>
10563
- }
10564
10217
  | ({
10565
10218
  type: 'serialization.failure'
10566
10219
  mimeType: `${string}/${string}`
@@ -10740,9 +10393,9 @@ declare const editorMachine: StateMachine<
10740
10393
  }
10741
10394
  }
10742
10395
  | {
10743
- [props: string]: unknown
10744
10396
  type: 'block.set'
10745
10397
  at: [KeyedSegment]
10398
+ props: Record<string, unknown>
10746
10399
  }
10747
10400
  | {
10748
10401
  type: 'block.unset'
@@ -10905,18 +10558,6 @@ declare const editorMachine: StateMachine<
10905
10558
  type: 'style.toggle'
10906
10559
  style: string
10907
10560
  }
10908
- | {
10909
- type: 'text block.set'
10910
- at: [KeyedSegment]
10911
- level?: number
10912
- listItem?: string
10913
- style?: string
10914
- }
10915
- | {
10916
- type: 'text block.unset'
10917
- at: [KeyedSegment]
10918
- props: Array<'level' | 'listItem' | 'style'>
10919
- }
10920
10561
  | ({
10921
10562
  type: 'serialization.failure'
10922
10563
  mimeType: `${string}/${string}`
@@ -11012,9 +10653,9 @@ declare const editorMachine: StateMachine<
11012
10653
  value: Array<PortableTextBlock> | undefined
11013
10654
  },
11014
10655
  | {
11015
- [props: string]: unknown
11016
10656
  type: 'block.set'
11017
10657
  at: [KeyedSegment]
10658
+ props: Record<string, unknown>
11018
10659
  }
11019
10660
  | {
11020
10661
  type: 'block.unset'
@@ -11046,9 +10687,9 @@ declare const editorMachine: StateMachine<
11046
10687
  }
11047
10688
  }
11048
10689
  | {
11049
- [props: string]: unknown
11050
10690
  type: 'block.set'
11051
10691
  at: [KeyedSegment]
10692
+ props: Record<string, unknown>
11052
10693
  }
11053
10694
  | {
11054
10695
  type: 'block.unset'
@@ -11211,18 +10852,6 @@ declare const editorMachine: StateMachine<
11211
10852
  type: 'style.toggle'
11212
10853
  style: string
11213
10854
  }
11214
- | {
11215
- type: 'text block.set'
11216
- at: [KeyedSegment]
11217
- level?: number
11218
- listItem?: string
11219
- style?: string
11220
- }
11221
- | {
11222
- type: 'text block.unset'
11223
- at: [KeyedSegment]
11224
- props: Array<'level' | 'listItem' | 'style'>
11225
- }
11226
10855
  | ({
11227
10856
  type: 'serialization.failure'
11228
10857
  mimeType: `${string}/${string}`
@@ -11402,9 +11031,9 @@ declare const editorMachine: StateMachine<
11402
11031
  }
11403
11032
  }
11404
11033
  | {
11405
- [props: string]: unknown
11406
11034
  type: 'block.set'
11407
11035
  at: [KeyedSegment]
11036
+ props: Record<string, unknown>
11408
11037
  }
11409
11038
  | {
11410
11039
  type: 'block.unset'
@@ -11567,18 +11196,6 @@ declare const editorMachine: StateMachine<
11567
11196
  type: 'style.toggle'
11568
11197
  style: string
11569
11198
  }
11570
- | {
11571
- type: 'text block.set'
11572
- at: [KeyedSegment]
11573
- level?: number
11574
- listItem?: string
11575
- style?: string
11576
- }
11577
- | {
11578
- type: 'text block.unset'
11579
- at: [KeyedSegment]
11580
- props: Array<'level' | 'listItem' | 'style'>
11581
- }
11582
11199
  | ({
11583
11200
  type: 'serialization.failure'
11584
11201
  mimeType: `${string}/${string}`
@@ -11701,9 +11318,9 @@ declare const editorMachine: StateMachine<
11701
11318
  }
11702
11319
  }
11703
11320
  | {
11704
- [props: string]: unknown
11705
11321
  type: 'block.set'
11706
11322
  at: [KeyedSegment]
11323
+ props: Record<string, unknown>
11707
11324
  }
11708
11325
  | {
11709
11326
  type: 'block.unset'
@@ -11866,18 +11483,6 @@ declare const editorMachine: StateMachine<
11866
11483
  type: 'style.toggle'
11867
11484
  style: string
11868
11485
  }
11869
- | {
11870
- type: 'text block.set'
11871
- at: [KeyedSegment]
11872
- level?: number
11873
- listItem?: string
11874
- style?: string
11875
- }
11876
- | {
11877
- type: 'text block.unset'
11878
- at: [KeyedSegment]
11879
- props: Array<'level' | 'listItem' | 'style'>
11880
- }
11881
11486
  | ({
11882
11487
  type: 'serialization.failure'
11883
11488
  mimeType: `${string}/${string}`
@@ -12057,9 +11662,9 @@ declare const editorMachine: StateMachine<
12057
11662
  }
12058
11663
  }
12059
11664
  | {
12060
- [props: string]: unknown
12061
11665
  type: 'block.set'
12062
11666
  at: [KeyedSegment]
11667
+ props: Record<string, unknown>
12063
11668
  }
12064
11669
  | {
12065
11670
  type: 'block.unset'
@@ -12222,18 +11827,6 @@ declare const editorMachine: StateMachine<
12222
11827
  type: 'style.toggle'
12223
11828
  style: string
12224
11829
  }
12225
- | {
12226
- type: 'text block.set'
12227
- at: [KeyedSegment]
12228
- level?: number
12229
- listItem?: string
12230
- style?: string
12231
- }
12232
- | {
12233
- type: 'text block.unset'
12234
- at: [KeyedSegment]
12235
- props: Array<'level' | 'listItem' | 'style'>
12236
- }
12237
11830
  | ({
12238
11831
  type: 'serialization.failure'
12239
11832
  mimeType: `${string}/${string}`
@@ -12356,9 +11949,9 @@ declare const editorMachine: StateMachine<
12356
11949
  }
12357
11950
  }
12358
11951
  | {
12359
- [props: string]: unknown
12360
11952
  type: 'block.set'
12361
11953
  at: [KeyedSegment]
11954
+ props: Record<string, unknown>
12362
11955
  }
12363
11956
  | {
12364
11957
  type: 'block.unset'
@@ -12521,18 +12114,6 @@ declare const editorMachine: StateMachine<
12521
12114
  type: 'style.toggle'
12522
12115
  style: string
12523
12116
  }
12524
- | {
12525
- type: 'text block.set'
12526
- at: [KeyedSegment]
12527
- level?: number
12528
- listItem?: string
12529
- style?: string
12530
- }
12531
- | {
12532
- type: 'text block.unset'
12533
- at: [KeyedSegment]
12534
- props: Array<'level' | 'listItem' | 'style'>
12535
- }
12536
12117
  | ({
12537
12118
  type: 'serialization.failure'
12538
12119
  mimeType: `${string}/${string}`
@@ -12712,9 +12293,9 @@ declare const editorMachine: StateMachine<
12712
12293
  }
12713
12294
  }
12714
12295
  | {
12715
- [props: string]: unknown
12716
12296
  type: 'block.set'
12717
12297
  at: [KeyedSegment]
12298
+ props: Record<string, unknown>
12718
12299
  }
12719
12300
  | {
12720
12301
  type: 'block.unset'
@@ -12877,18 +12458,6 @@ declare const editorMachine: StateMachine<
12877
12458
  type: 'style.toggle'
12878
12459
  style: string
12879
12460
  }
12880
- | {
12881
- type: 'text block.set'
12882
- at: [KeyedSegment]
12883
- level?: number
12884
- listItem?: string
12885
- style?: string
12886
- }
12887
- | {
12888
- type: 'text block.unset'
12889
- at: [KeyedSegment]
12890
- props: Array<'level' | 'listItem' | 'style'>
12891
- }
12892
12461
  | ({
12893
12462
  type: 'serialization.failure'
12894
12463
  mimeType: `${string}/${string}`
@@ -13021,9 +12590,9 @@ declare const editorMachine: StateMachine<
13021
12590
  }
13022
12591
  }
13023
12592
  | {
13024
- [props: string]: unknown
13025
12593
  type: 'block.set'
13026
12594
  at: [KeyedSegment]
12595
+ props: Record<string, unknown>
13027
12596
  }
13028
12597
  | {
13029
12598
  type: 'block.unset'
@@ -13186,18 +12755,6 @@ declare const editorMachine: StateMachine<
13186
12755
  type: 'style.toggle'
13187
12756
  style: string
13188
12757
  }
13189
- | {
13190
- type: 'text block.set'
13191
- at: [KeyedSegment]
13192
- level?: number
13193
- listItem?: string
13194
- style?: string
13195
- }
13196
- | {
13197
- type: 'text block.unset'
13198
- at: [KeyedSegment]
13199
- props: Array<'level' | 'listItem' | 'style'>
13200
- }
13201
12758
  | ({
13202
12759
  type: 'serialization.failure'
13203
12760
  mimeType: `${string}/${string}`
@@ -13377,9 +12934,9 @@ declare const editorMachine: StateMachine<
13377
12934
  }
13378
12935
  }
13379
12936
  | {
13380
- [props: string]: unknown
13381
12937
  type: 'block.set'
13382
12938
  at: [KeyedSegment]
12939
+ props: Record<string, unknown>
13383
12940
  }
13384
12941
  | {
13385
12942
  type: 'block.unset'
@@ -13542,18 +13099,6 @@ declare const editorMachine: StateMachine<
13542
13099
  type: 'style.toggle'
13543
13100
  style: string
13544
13101
  }
13545
- | {
13546
- type: 'text block.set'
13547
- at: [KeyedSegment]
13548
- level?: number
13549
- listItem?: string
13550
- style?: string
13551
- }
13552
- | {
13553
- type: 'text block.unset'
13554
- at: [KeyedSegment]
13555
- props: Array<'level' | 'listItem' | 'style'>
13556
- }
13557
13102
  | ({
13558
13103
  type: 'serialization.failure'
13559
13104
  mimeType: `${string}/${string}`
@@ -13690,9 +13235,9 @@ declare const editorMachine: StateMachine<
13690
13235
  }
13691
13236
  }
13692
13237
  | {
13693
- [props: string]: unknown
13694
13238
  type: 'block.set'
13695
13239
  at: [KeyedSegment]
13240
+ props: Record<string, unknown>
13696
13241
  }
13697
13242
  | {
13698
13243
  type: 'block.unset'
@@ -13855,18 +13400,6 @@ declare const editorMachine: StateMachine<
13855
13400
  type: 'style.toggle'
13856
13401
  style: string
13857
13402
  }
13858
- | {
13859
- type: 'text block.set'
13860
- at: [KeyedSegment]
13861
- level?: number
13862
- listItem?: string
13863
- style?: string
13864
- }
13865
- | {
13866
- type: 'text block.unset'
13867
- at: [KeyedSegment]
13868
- props: Array<'level' | 'listItem' | 'style'>
13869
- }
13870
13403
  | ({
13871
13404
  type: 'serialization.failure'
13872
13405
  mimeType: `${string}/${string}`
@@ -14046,9 +13579,9 @@ declare const editorMachine: StateMachine<
14046
13579
  }
14047
13580
  }
14048
13581
  | {
14049
- [props: string]: unknown
14050
13582
  type: 'block.set'
14051
13583
  at: [KeyedSegment]
13584
+ props: Record<string, unknown>
14052
13585
  }
14053
13586
  | {
14054
13587
  type: 'block.unset'
@@ -14211,18 +13744,6 @@ declare const editorMachine: StateMachine<
14211
13744
  type: 'style.toggle'
14212
13745
  style: string
14213
13746
  }
14214
- | {
14215
- type: 'text block.set'
14216
- at: [KeyedSegment]
14217
- level?: number
14218
- listItem?: string
14219
- style?: string
14220
- }
14221
- | {
14222
- type: 'text block.unset'
14223
- at: [KeyedSegment]
14224
- props: Array<'level' | 'listItem' | 'style'>
14225
- }
14226
13747
  | ({
14227
13748
  type: 'serialization.failure'
14228
13749
  mimeType: `${string}/${string}`
@@ -14345,9 +13866,9 @@ declare const editorMachine: StateMachine<
14345
13866
  }
14346
13867
  }
14347
13868
  | {
14348
- [props: string]: unknown
14349
13869
  type: 'block.set'
14350
13870
  at: [KeyedSegment]
13871
+ props: Record<string, unknown>
14351
13872
  }
14352
13873
  | {
14353
13874
  type: 'block.unset'
@@ -14510,18 +14031,6 @@ declare const editorMachine: StateMachine<
14510
14031
  type: 'style.toggle'
14511
14032
  style: string
14512
14033
  }
14513
- | {
14514
- type: 'text block.set'
14515
- at: [KeyedSegment]
14516
- level?: number
14517
- listItem?: string
14518
- style?: string
14519
- }
14520
- | {
14521
- type: 'text block.unset'
14522
- at: [KeyedSegment]
14523
- props: Array<'level' | 'listItem' | 'style'>
14524
- }
14525
14034
  | ({
14526
14035
  type: 'serialization.failure'
14527
14036
  mimeType: `${string}/${string}`
@@ -14701,9 +14210,9 @@ declare const editorMachine: StateMachine<
14701
14210
  }
14702
14211
  }
14703
14212
  | {
14704
- [props: string]: unknown
14705
14213
  type: 'block.set'
14706
14214
  at: [KeyedSegment]
14215
+ props: Record<string, unknown>
14707
14216
  }
14708
14217
  | {
14709
14218
  type: 'block.unset'
@@ -14866,18 +14375,6 @@ declare const editorMachine: StateMachine<
14866
14375
  type: 'style.toggle'
14867
14376
  style: string
14868
14377
  }
14869
- | {
14870
- type: 'text block.set'
14871
- at: [KeyedSegment]
14872
- level?: number
14873
- listItem?: string
14874
- style?: string
14875
- }
14876
- | {
14877
- type: 'text block.unset'
14878
- at: [KeyedSegment]
14879
- props: Array<'level' | 'listItem' | 'style'>
14880
- }
14881
14378
  | ({
14882
14379
  type: 'serialization.failure'
14883
14380
  mimeType: `${string}/${string}`
@@ -15003,9 +14500,9 @@ declare const editorMachine: StateMachine<
15003
14500
  }
15004
14501
  }
15005
14502
  | {
15006
- [props: string]: unknown
15007
14503
  type: 'block.set'
15008
14504
  at: [KeyedSegment]
14505
+ props: Record<string, unknown>
15009
14506
  }
15010
14507
  | {
15011
14508
  type: 'block.unset'
@@ -15168,727 +14665,6 @@ declare const editorMachine: StateMachine<
15168
14665
  type: 'style.toggle'
15169
14666
  style: string
15170
14667
  }
15171
- | {
15172
- type: 'text block.set'
15173
- at: [KeyedSegment]
15174
- level?: number
15175
- listItem?: string
15176
- style?: string
15177
- }
15178
- | {
15179
- type: 'text block.unset'
15180
- at: [KeyedSegment]
15181
- props: Array<'level' | 'listItem' | 'style'>
15182
- }
15183
- | ({
15184
- type: 'serialization.failure'
15185
- mimeType: `${string}/${string}`
15186
- reason: string
15187
- } & {
15188
- dataTransfer: DataTransfer
15189
- })
15190
- | ({
15191
- type: 'serialization.success'
15192
- data: string
15193
- mimeType: `${string}/${string}`
15194
- originEvent: 'copy' | 'cut' | 'unknown'
15195
- } & {
15196
- dataTransfer: DataTransfer
15197
- })
15198
- | ({
15199
- type: 'deserialization.failure'
15200
- mimeType: `${string}/${string}`
15201
- reason: string
15202
- } & {
15203
- dataTransfer: DataTransfer
15204
- })
15205
- | ({
15206
- type: 'deserialization.success'
15207
- data: Array<PortableTextBlock>
15208
- mimeType: `${string}/${string}`
15209
- } & {
15210
- dataTransfer: DataTransfer
15211
- })
15212
- | PatchEvent
15213
- | MutationEvent
15214
- | {
15215
- type: 'normalizing'
15216
- }
15217
- | {
15218
- type: 'done normalizing'
15219
- }
15220
- | {
15221
- type: 'done syncing initial value'
15222
- }
15223
- | {
15224
- type: 'behavior event'
15225
- behaviorEvent:
15226
- | SyntheticBehaviorEvent
15227
- | NativeBehaviorEvent
15228
- editor: PortableTextSlateEditor
15229
- defaultActionCallback?: () => void
15230
- nativeEvent?: {
15231
- preventDefault: () => void
15232
- }
15233
- }
15234
- | {
15235
- type: 'custom behavior event'
15236
- behaviorEvent: CustomBehaviorEvent
15237
- editor: PortableTextSlateEditor
15238
- nativeEvent?: {
15239
- preventDefault: () => void
15240
- }
15241
- }
15242
- | CustomBehaviorEvent
15243
- | {
15244
- type: 'add behavior'
15245
- behavior: Behavior
15246
- }
15247
- | {
15248
- type: 'remove behavior'
15249
- behavior: Behavior
15250
- }
15251
- | {
15252
- type: 'update readOnly'
15253
- readOnly: boolean
15254
- }
15255
- | {
15256
- type: 'update schema'
15257
- schema: EditorSchema
15258
- }
15259
- | {
15260
- type: 'update behaviors'
15261
- behaviors: Array<Behavior>
15262
- }
15263
- | {
15264
- type: 'update key generator'
15265
- keyGenerator: () => string
15266
- }
15267
- | {
15268
- type: 'update value'
15269
- value: Array<PortableTextBlock> | undefined
15270
- }
15271
- | {
15272
- type: 'update maxBlocks'
15273
- maxBlocks: number | undefined
15274
- }
15275
- | PatchesEvent
15276
- | {
15277
- type: 'notify.patch'
15278
- patch: Patch
15279
- }
15280
- | {
15281
- type: 'notify.mutation'
15282
- patches: Array<Patch>
15283
- snapshot: Array<PortableTextBlock> | undefined
15284
- value: Array<PortableTextBlock> | undefined
15285
- }
15286
- | {
15287
- type: 'notify.blurred'
15288
- event: FocusEvent_2<HTMLDivElement, Element>
15289
- }
15290
- | {
15291
- type: 'notify.done loading'
15292
- }
15293
- | {
15294
- type: 'notify.editable'
15295
- }
15296
- | {
15297
- type: 'notify.error'
15298
- name: string
15299
- description: string
15300
- data: unknown
15301
- }
15302
- | {
15303
- type: 'notify.focused'
15304
- event: FocusEvent_2<HTMLDivElement, Element>
15305
- }
15306
- | {
15307
- type: 'notify.invalid value'
15308
- resolution: InvalidValueResolution | null
15309
- value: Array<PortableTextBlock> | undefined
15310
- }
15311
- | {
15312
- type: 'notify.loading'
15313
- }
15314
- | {
15315
- type: 'notify.read only'
15316
- }
15317
- | {
15318
- type: 'notify.ready'
15319
- }
15320
- | {
15321
- type: 'notify.selection'
15322
- selection: EditorSelection
15323
- }
15324
- | {
15325
- type: 'notify.value changed'
15326
- value: Array<PortableTextBlock> | undefined
15327
- }
15328
- | {
15329
- type: 'notify.unset'
15330
- previousValue: Array<PortableTextBlock>
15331
- },
15332
- undefined,
15333
- never,
15334
- never,
15335
- never,
15336
- never,
15337
- | {
15338
- type: 'annotation.add'
15339
- annotation: {
15340
- name: string
15341
- value: {
15342
- [prop: string]: unknown
15343
- }
15344
- }
15345
- }
15346
- | {
15347
- type: 'annotation.remove'
15348
- annotation: {
15349
- name: string
15350
- }
15351
- }
15352
- | {
15353
- type: 'annotation.toggle'
15354
- annotation: {
15355
- name: string
15356
- value: {
15357
- [prop: string]: unknown
15358
- }
15359
- }
15360
- }
15361
- | {
15362
- [props: string]: unknown
15363
- type: 'block.set'
15364
- at: [KeyedSegment]
15365
- }
15366
- | {
15367
- type: 'block.unset'
15368
- at: [KeyedSegment]
15369
- props: Array<string>
15370
- }
15371
- | {
15372
- type: 'blur'
15373
- }
15374
- | {
15375
- type: 'data transfer.set'
15376
- data: string
15377
- dataTransfer: DataTransfer
15378
- mimeType: MIMEType_2
15379
- }
15380
- | {
15381
- type: 'decorator.add'
15382
- decorator: string
15383
- selection?: NonNullable<EditorSelection>
15384
- }
15385
- | {
15386
- type: 'decorator.remove'
15387
- decorator: string
15388
- }
15389
- | {
15390
- type: 'decorator.toggle'
15391
- decorator: string
15392
- }
15393
- | {
15394
- type: 'delete'
15395
- selection: NonNullable<EditorSelection>
15396
- }
15397
- | {
15398
- type: 'delete.backward'
15399
- unit: TextUnit
15400
- }
15401
- | {
15402
- type: 'delete.block'
15403
- blockPath: [KeyedSegment]
15404
- }
15405
- | {
15406
- type: 'delete.forward'
15407
- unit: TextUnit
15408
- }
15409
- | {
15410
- type: 'delete.text'
15411
- anchor: BlockOffset_2
15412
- focus: BlockOffset_2
15413
- }
15414
- | {
15415
- type: 'focus'
15416
- }
15417
- | {
15418
- type: 'history.redo'
15419
- }
15420
- | {
15421
- type: 'history.undo'
15422
- }
15423
- | {
15424
- type: 'insert.blocks'
15425
- blocks: Array<PortableTextBlock>
15426
- }
15427
- | {
15428
- type: 'insert.block object'
15429
- placement: 'auto' | 'after' | 'before'
15430
- blockObject: {
15431
- name: string
15432
- value?: {
15433
- [prop: string]: unknown
15434
- }
15435
- }
15436
- }
15437
- | {
15438
- type: 'insert.inline object'
15439
- inlineObject: {
15440
- name: string
15441
- value?: {
15442
- [prop: string]: unknown
15443
- }
15444
- }
15445
- }
15446
- | {
15447
- type: 'insert.break'
15448
- }
15449
- | {
15450
- type: 'insert.soft break'
15451
- }
15452
- | {
15453
- type: 'insert.block'
15454
- block: PortableTextBlock
15455
- placement: 'auto' | 'after' | 'before'
15456
- }
15457
- | {
15458
- type: 'insert.span'
15459
- text: string
15460
- annotations?: Array<{
15461
- name: string
15462
- value: {
15463
- [prop: string]: unknown
15464
- }
15465
- }>
15466
- decorators?: Array<string>
15467
- }
15468
- | {
15469
- type: 'insert.text'
15470
- text: string
15471
- options?: TextInsertTextOptions
15472
- }
15473
- | {
15474
- type: 'insert.text block'
15475
- placement: 'auto' | 'after' | 'before'
15476
- textBlock?: {
15477
- children?: PortableTextTextBlock['children']
15478
- }
15479
- }
15480
- | {
15481
- type: 'list item.add'
15482
- listItem: string
15483
- }
15484
- | {
15485
- type: 'list item.remove'
15486
- listItem: string
15487
- }
15488
- | {
15489
- type: 'list item.toggle'
15490
- listItem: string
15491
- }
15492
- | {
15493
- type: 'move.block'
15494
- at: [KeyedSegment]
15495
- to: [KeyedSegment]
15496
- }
15497
- | {
15498
- type: 'move.block down'
15499
- at: [KeyedSegment]
15500
- }
15501
- | {
15502
- type: 'move.block up'
15503
- at: [KeyedSegment]
15504
- }
15505
- | {
15506
- type: 'select'
15507
- selection: EditorSelection
15508
- }
15509
- | {
15510
- type: 'select.previous block'
15511
- }
15512
- | {
15513
- type: 'select.next block'
15514
- }
15515
- | {
15516
- type: 'style.add'
15517
- style: string
15518
- }
15519
- | {
15520
- type: 'style.remove'
15521
- style: string
15522
- }
15523
- | {
15524
- type: 'style.toggle'
15525
- style: string
15526
- }
15527
- | {
15528
- type: 'text block.set'
15529
- at: [KeyedSegment]
15530
- level?: number
15531
- listItem?: string
15532
- style?: string
15533
- }
15534
- | {
15535
- type: 'text block.unset'
15536
- at: [KeyedSegment]
15537
- props: Array<'level' | 'listItem' | 'style'>
15538
- }
15539
- | ({
15540
- type: 'serialization.failure'
15541
- mimeType: `${string}/${string}`
15542
- reason: string
15543
- } & {
15544
- dataTransfer: DataTransfer
15545
- })
15546
- | ({
15547
- type: 'serialization.success'
15548
- data: string
15549
- mimeType: `${string}/${string}`
15550
- originEvent: 'copy' | 'cut' | 'unknown'
15551
- } & {
15552
- dataTransfer: DataTransfer
15553
- })
15554
- | ({
15555
- type: 'deserialization.failure'
15556
- mimeType: `${string}/${string}`
15557
- reason: string
15558
- } & {
15559
- dataTransfer: DataTransfer
15560
- })
15561
- | ({
15562
- type: 'deserialization.success'
15563
- data: Array<PortableTextBlock>
15564
- mimeType: `${string}/${string}`
15565
- } & {
15566
- dataTransfer: DataTransfer
15567
- })
15568
- | PatchEvent
15569
- | MutationEvent
15570
- | PatchesEvent
15571
- | {
15572
- type: 'blurred'
15573
- event: FocusEvent_2<HTMLDivElement, Element>
15574
- }
15575
- | {
15576
- type: 'done loading'
15577
- }
15578
- | {
15579
- type: 'editable'
15580
- }
15581
- | {
15582
- type: 'error'
15583
- name: string
15584
- description: string
15585
- data: unknown
15586
- }
15587
- | {
15588
- type: 'focused'
15589
- event: FocusEvent_2<HTMLDivElement, Element>
15590
- }
15591
- | {
15592
- type: 'invalid value'
15593
- resolution: InvalidValueResolution | null
15594
- value: Array<PortableTextBlock> | undefined
15595
- }
15596
- | {
15597
- type: 'loading'
15598
- }
15599
- | {
15600
- type: 'read only'
15601
- }
15602
- | {
15603
- type: 'ready'
15604
- }
15605
- | {
15606
- type: 'selection'
15607
- selection: EditorSelection
15608
- }
15609
- | {
15610
- type: 'value changed'
15611
- value: Array<PortableTextBlock> | undefined
15612
- }
15613
- | UnsetEvent
15614
- | {
15615
- type: 'custom.*'
15616
- event: CustomBehaviorEvent
15617
- }
15618
- >
15619
- }
15620
- readonly 'insert.*': {
15621
- readonly actions: ActionFunction<
15622
- {
15623
- behaviors: Set<Behavior>
15624
- converters: Set<Converter>
15625
- keyGenerator: () => string
15626
- pendingEvents: Array<PatchEvent | MutationEvent>
15627
- schema: EditorSchema
15628
- initialReadOnly: boolean
15629
- maxBlocks: number | undefined
15630
- selection: EditorSelection
15631
- value: Array<PortableTextBlock> | undefined
15632
- },
15633
- | {
15634
- type: 'insert.blocks'
15635
- blocks: Array<PortableTextBlock>
15636
- }
15637
- | {
15638
- type: 'insert.block object'
15639
- placement: 'auto' | 'after' | 'before'
15640
- blockObject: {
15641
- name: string
15642
- value?: {
15643
- [prop: string]: unknown
15644
- }
15645
- }
15646
- }
15647
- | {
15648
- type: 'insert.inline object'
15649
- inlineObject: {
15650
- name: string
15651
- value?: {
15652
- [prop: string]: unknown
15653
- }
15654
- }
15655
- }
15656
- | {
15657
- type: 'insert.break'
15658
- }
15659
- | {
15660
- type: 'insert.soft break'
15661
- }
15662
- | {
15663
- type: 'insert.block'
15664
- block: PortableTextBlock
15665
- placement: 'auto' | 'after' | 'before'
15666
- }
15667
- | {
15668
- type: 'insert.span'
15669
- text: string
15670
- annotations?: Array<{
15671
- name: string
15672
- value: {
15673
- [prop: string]: unknown
15674
- }
15675
- }>
15676
- decorators?: Array<string>
15677
- }
15678
- | {
15679
- type: 'insert.text'
15680
- text: string
15681
- options?: TextInsertTextOptions
15682
- }
15683
- | {
15684
- type: 'insert.text block'
15685
- placement: 'auto' | 'after' | 'before'
15686
- textBlock?: {
15687
- children?: PortableTextTextBlock['children']
15688
- }
15689
- },
15690
- | {
15691
- type: 'annotation.add'
15692
- annotation: {
15693
- name: string
15694
- value: {
15695
- [prop: string]: unknown
15696
- }
15697
- }
15698
- }
15699
- | {
15700
- type: 'annotation.remove'
15701
- annotation: {
15702
- name: string
15703
- }
15704
- }
15705
- | {
15706
- type: 'annotation.toggle'
15707
- annotation: {
15708
- name: string
15709
- value: {
15710
- [prop: string]: unknown
15711
- }
15712
- }
15713
- }
15714
- | {
15715
- [props: string]: unknown
15716
- type: 'block.set'
15717
- at: [KeyedSegment]
15718
- }
15719
- | {
15720
- type: 'block.unset'
15721
- at: [KeyedSegment]
15722
- props: Array<string>
15723
- }
15724
- | {
15725
- type: 'blur'
15726
- }
15727
- | {
15728
- type: 'data transfer.set'
15729
- data: string
15730
- dataTransfer: DataTransfer
15731
- mimeType: MIMEType_2
15732
- }
15733
- | {
15734
- type: 'decorator.add'
15735
- decorator: string
15736
- selection?: NonNullable<EditorSelection>
15737
- }
15738
- | {
15739
- type: 'decorator.remove'
15740
- decorator: string
15741
- }
15742
- | {
15743
- type: 'decorator.toggle'
15744
- decorator: string
15745
- }
15746
- | {
15747
- type: 'delete'
15748
- selection: NonNullable<EditorSelection>
15749
- }
15750
- | {
15751
- type: 'delete.backward'
15752
- unit: TextUnit
15753
- }
15754
- | {
15755
- type: 'delete.block'
15756
- blockPath: [KeyedSegment]
15757
- }
15758
- | {
15759
- type: 'delete.forward'
15760
- unit: TextUnit
15761
- }
15762
- | {
15763
- type: 'delete.text'
15764
- anchor: BlockOffset_2
15765
- focus: BlockOffset_2
15766
- }
15767
- | {
15768
- type: 'focus'
15769
- }
15770
- | {
15771
- type: 'history.redo'
15772
- }
15773
- | {
15774
- type: 'history.undo'
15775
- }
15776
- | {
15777
- type: 'insert.blocks'
15778
- blocks: Array<PortableTextBlock>
15779
- }
15780
- | {
15781
- type: 'insert.block object'
15782
- placement: 'auto' | 'after' | 'before'
15783
- blockObject: {
15784
- name: string
15785
- value?: {
15786
- [prop: string]: unknown
15787
- }
15788
- }
15789
- }
15790
- | {
15791
- type: 'insert.inline object'
15792
- inlineObject: {
15793
- name: string
15794
- value?: {
15795
- [prop: string]: unknown
15796
- }
15797
- }
15798
- }
15799
- | {
15800
- type: 'insert.break'
15801
- }
15802
- | {
15803
- type: 'insert.soft break'
15804
- }
15805
- | {
15806
- type: 'insert.block'
15807
- block: PortableTextBlock
15808
- placement: 'auto' | 'after' | 'before'
15809
- }
15810
- | {
15811
- type: 'insert.span'
15812
- text: string
15813
- annotations?: Array<{
15814
- name: string
15815
- value: {
15816
- [prop: string]: unknown
15817
- }
15818
- }>
15819
- decorators?: Array<string>
15820
- }
15821
- | {
15822
- type: 'insert.text'
15823
- text: string
15824
- options?: TextInsertTextOptions
15825
- }
15826
- | {
15827
- type: 'insert.text block'
15828
- placement: 'auto' | 'after' | 'before'
15829
- textBlock?: {
15830
- children?: PortableTextTextBlock['children']
15831
- }
15832
- }
15833
- | {
15834
- type: 'list item.add'
15835
- listItem: string
15836
- }
15837
- | {
15838
- type: 'list item.remove'
15839
- listItem: string
15840
- }
15841
- | {
15842
- type: 'list item.toggle'
15843
- listItem: string
15844
- }
15845
- | {
15846
- type: 'move.block'
15847
- at: [KeyedSegment]
15848
- to: [KeyedSegment]
15849
- }
15850
- | {
15851
- type: 'move.block down'
15852
- at: [KeyedSegment]
15853
- }
15854
- | {
15855
- type: 'move.block up'
15856
- at: [KeyedSegment]
15857
- }
15858
- | {
15859
- type: 'select'
15860
- selection: EditorSelection
15861
- }
15862
- | {
15863
- type: 'select.previous block'
15864
- }
15865
- | {
15866
- type: 'select.next block'
15867
- }
15868
- | {
15869
- type: 'style.add'
15870
- style: string
15871
- }
15872
- | {
15873
- type: 'style.remove'
15874
- style: string
15875
- }
15876
- | {
15877
- type: 'style.toggle'
15878
- style: string
15879
- }
15880
- | {
15881
- type: 'text block.set'
15882
- at: [KeyedSegment]
15883
- level?: number
15884
- listItem?: string
15885
- style?: string
15886
- }
15887
- | {
15888
- type: 'text block.unset'
15889
- at: [KeyedSegment]
15890
- props: Array<'level' | 'listItem' | 'style'>
15891
- }
15892
14668
  | ({
15893
14669
  type: 'serialization.failure'
15894
14670
  mimeType: `${string}/${string}`
@@ -16068,9 +14844,9 @@ declare const editorMachine: StateMachine<
16068
14844
  }
16069
14845
  }
16070
14846
  | {
16071
- [props: string]: unknown
16072
14847
  type: 'block.set'
16073
14848
  at: [KeyedSegment]
14849
+ props: Record<string, unknown>
16074
14850
  }
16075
14851
  | {
16076
14852
  type: 'block.unset'
@@ -16233,18 +15009,6 @@ declare const editorMachine: StateMachine<
16233
15009
  type: 'style.toggle'
16234
15010
  style: string
16235
15011
  }
16236
- | {
16237
- type: 'text block.set'
16238
- at: [KeyedSegment]
16239
- level?: number
16240
- listItem?: string
16241
- style?: string
16242
- }
16243
- | {
16244
- type: 'text block.unset'
16245
- at: [KeyedSegment]
16246
- props: Array<'level' | 'listItem' | 'style'>
16247
- }
16248
15012
  | ({
16249
15013
  type: 'serialization.failure'
16250
15014
  mimeType: `${string}/${string}`
@@ -16326,7 +15090,7 @@ declare const editorMachine: StateMachine<
16326
15090
  }
16327
15091
  >
16328
15092
  }
16329
- readonly 'list item.*': {
15093
+ readonly 'insert.*': {
16330
15094
  readonly actions: ActionFunction<
16331
15095
  {
16332
15096
  behaviors: Set<Behavior>
@@ -16340,16 +15104,61 @@ declare const editorMachine: StateMachine<
16340
15104
  value: Array<PortableTextBlock> | undefined
16341
15105
  },
16342
15106
  | {
16343
- type: 'list item.add'
16344
- listItem: string
15107
+ type: 'insert.blocks'
15108
+ blocks: Array<PortableTextBlock>
16345
15109
  }
16346
15110
  | {
16347
- type: 'list item.remove'
16348
- listItem: string
15111
+ type: 'insert.block object'
15112
+ placement: 'auto' | 'after' | 'before'
15113
+ blockObject: {
15114
+ name: string
15115
+ value?: {
15116
+ [prop: string]: unknown
15117
+ }
15118
+ }
16349
15119
  }
16350
15120
  | {
16351
- type: 'list item.toggle'
16352
- listItem: string
15121
+ type: 'insert.inline object'
15122
+ inlineObject: {
15123
+ name: string
15124
+ value?: {
15125
+ [prop: string]: unknown
15126
+ }
15127
+ }
15128
+ }
15129
+ | {
15130
+ type: 'insert.break'
15131
+ }
15132
+ | {
15133
+ type: 'insert.soft break'
15134
+ }
15135
+ | {
15136
+ type: 'insert.block'
15137
+ block: PortableTextBlock
15138
+ placement: 'auto' | 'after' | 'before'
15139
+ }
15140
+ | {
15141
+ type: 'insert.span'
15142
+ text: string
15143
+ annotations?: Array<{
15144
+ name: string
15145
+ value: {
15146
+ [prop: string]: unknown
15147
+ }
15148
+ }>
15149
+ decorators?: Array<string>
15150
+ }
15151
+ | {
15152
+ type: 'insert.text'
15153
+ text: string
15154
+ options?: TextInsertTextOptions
15155
+ }
15156
+ | {
15157
+ type: 'insert.text block'
15158
+ placement: 'auto' | 'after' | 'before'
15159
+ textBlock?: {
15160
+ children?: PortableTextTextBlock['children']
15161
+ }
16353
15162
  },
16354
15163
  | {
16355
15164
  type: 'annotation.add'
@@ -16376,9 +15185,9 @@ declare const editorMachine: StateMachine<
16376
15185
  }
16377
15186
  }
16378
15187
  | {
16379
- [props: string]: unknown
16380
15188
  type: 'block.set'
16381
15189
  at: [KeyedSegment]
15190
+ props: Record<string, unknown>
16382
15191
  }
16383
15192
  | {
16384
15193
  type: 'block.unset'
@@ -16541,18 +15350,6 @@ declare const editorMachine: StateMachine<
16541
15350
  type: 'style.toggle'
16542
15351
  style: string
16543
15352
  }
16544
- | {
16545
- type: 'text block.set'
16546
- at: [KeyedSegment]
16547
- level?: number
16548
- listItem?: string
16549
- style?: string
16550
- }
16551
- | {
16552
- type: 'text block.unset'
16553
- at: [KeyedSegment]
16554
- props: Array<'level' | 'listItem' | 'style'>
16555
- }
16556
15353
  | ({
16557
15354
  type: 'serialization.failure'
16558
15355
  mimeType: `${string}/${string}`
@@ -16732,9 +15529,9 @@ declare const editorMachine: StateMachine<
16732
15529
  }
16733
15530
  }
16734
15531
  | {
16735
- [props: string]: unknown
16736
15532
  type: 'block.set'
16737
15533
  at: [KeyedSegment]
15534
+ props: Record<string, unknown>
16738
15535
  }
16739
15536
  | {
16740
15537
  type: 'block.unset'
@@ -16897,18 +15694,6 @@ declare const editorMachine: StateMachine<
16897
15694
  type: 'style.toggle'
16898
15695
  style: string
16899
15696
  }
16900
- | {
16901
- type: 'text block.set'
16902
- at: [KeyedSegment]
16903
- level?: number
16904
- listItem?: string
16905
- style?: string
16906
- }
16907
- | {
16908
- type: 'text block.unset'
16909
- at: [KeyedSegment]
16910
- props: Array<'level' | 'listItem' | 'style'>
16911
- }
16912
15697
  | ({
16913
15698
  type: 'serialization.failure'
16914
15699
  mimeType: `${string}/${string}`
@@ -16990,7 +15775,7 @@ declare const editorMachine: StateMachine<
16990
15775
  }
16991
15776
  >
16992
15777
  }
16993
- readonly 'move.*': {
15778
+ readonly 'list item.*': {
16994
15779
  readonly actions: ActionFunction<
16995
15780
  {
16996
15781
  behaviors: Set<Behavior>
@@ -17004,17 +15789,16 @@ declare const editorMachine: StateMachine<
17004
15789
  value: Array<PortableTextBlock> | undefined
17005
15790
  },
17006
15791
  | {
17007
- type: 'move.block'
17008
- at: [KeyedSegment]
17009
- to: [KeyedSegment]
15792
+ type: 'list item.add'
15793
+ listItem: string
17010
15794
  }
17011
15795
  | {
17012
- type: 'move.block down'
17013
- at: [KeyedSegment]
15796
+ type: 'list item.remove'
15797
+ listItem: string
17014
15798
  }
17015
15799
  | {
17016
- type: 'move.block up'
17017
- at: [KeyedSegment]
15800
+ type: 'list item.toggle'
15801
+ listItem: string
17018
15802
  },
17019
15803
  | {
17020
15804
  type: 'annotation.add'
@@ -17041,9 +15825,9 @@ declare const editorMachine: StateMachine<
17041
15825
  }
17042
15826
  }
17043
15827
  | {
17044
- [props: string]: unknown
17045
15828
  type: 'block.set'
17046
15829
  at: [KeyedSegment]
15830
+ props: Record<string, unknown>
17047
15831
  }
17048
15832
  | {
17049
15833
  type: 'block.unset'
@@ -17206,18 +15990,6 @@ declare const editorMachine: StateMachine<
17206
15990
  type: 'style.toggle'
17207
15991
  style: string
17208
15992
  }
17209
- | {
17210
- type: 'text block.set'
17211
- at: [KeyedSegment]
17212
- level?: number
17213
- listItem?: string
17214
- style?: string
17215
- }
17216
- | {
17217
- type: 'text block.unset'
17218
- at: [KeyedSegment]
17219
- props: Array<'level' | 'listItem' | 'style'>
17220
- }
17221
15993
  | ({
17222
15994
  type: 'serialization.failure'
17223
15995
  mimeType: `${string}/${string}`
@@ -17397,9 +16169,9 @@ declare const editorMachine: StateMachine<
17397
16169
  }
17398
16170
  }
17399
16171
  | {
17400
- [props: string]: unknown
17401
16172
  type: 'block.set'
17402
16173
  at: [KeyedSegment]
16174
+ props: Record<string, unknown>
17403
16175
  }
17404
16176
  | {
17405
16177
  type: 'block.unset'
@@ -17562,18 +16334,6 @@ declare const editorMachine: StateMachine<
17562
16334
  type: 'style.toggle'
17563
16335
  style: string
17564
16336
  }
17565
- | {
17566
- type: 'text block.set'
17567
- at: [KeyedSegment]
17568
- level?: number
17569
- listItem?: string
17570
- style?: string
17571
- }
17572
- | {
17573
- type: 'text block.unset'
17574
- at: [KeyedSegment]
17575
- props: Array<'level' | 'listItem' | 'style'>
17576
- }
17577
16337
  | ({
17578
16338
  type: 'serialization.failure'
17579
16339
  mimeType: `${string}/${string}`
@@ -17655,7 +16415,7 @@ declare const editorMachine: StateMachine<
17655
16415
  }
17656
16416
  >
17657
16417
  }
17658
- readonly 'select': {
16418
+ readonly 'move.*': {
17659
16419
  readonly actions: ActionFunction<
17660
16420
  {
17661
16421
  behaviors: Set<Behavior>
@@ -17668,10 +16428,19 @@ declare const editorMachine: StateMachine<
17668
16428
  selection: EditorSelection
17669
16429
  value: Array<PortableTextBlock> | undefined
17670
16430
  },
17671
- {
17672
- type: 'select'
17673
- selection: EditorSelection
17674
- },
16431
+ | {
16432
+ type: 'move.block'
16433
+ at: [KeyedSegment]
16434
+ to: [KeyedSegment]
16435
+ }
16436
+ | {
16437
+ type: 'move.block down'
16438
+ at: [KeyedSegment]
16439
+ }
16440
+ | {
16441
+ type: 'move.block up'
16442
+ at: [KeyedSegment]
16443
+ },
17675
16444
  | {
17676
16445
  type: 'annotation.add'
17677
16446
  annotation: {
@@ -17697,9 +16466,9 @@ declare const editorMachine: StateMachine<
17697
16466
  }
17698
16467
  }
17699
16468
  | {
17700
- [props: string]: unknown
17701
16469
  type: 'block.set'
17702
16470
  at: [KeyedSegment]
16471
+ props: Record<string, unknown>
17703
16472
  }
17704
16473
  | {
17705
16474
  type: 'block.unset'
@@ -17862,18 +16631,6 @@ declare const editorMachine: StateMachine<
17862
16631
  type: 'style.toggle'
17863
16632
  style: string
17864
16633
  }
17865
- | {
17866
- type: 'text block.set'
17867
- at: [KeyedSegment]
17868
- level?: number
17869
- listItem?: string
17870
- style?: string
17871
- }
17872
- | {
17873
- type: 'text block.unset'
17874
- at: [KeyedSegment]
17875
- props: Array<'level' | 'listItem' | 'style'>
17876
- }
17877
16634
  | ({
17878
16635
  type: 'serialization.failure'
17879
16636
  mimeType: `${string}/${string}`
@@ -18053,9 +16810,9 @@ declare const editorMachine: StateMachine<
18053
16810
  }
18054
16811
  }
18055
16812
  | {
18056
- [props: string]: unknown
18057
16813
  type: 'block.set'
18058
16814
  at: [KeyedSegment]
16815
+ props: Record<string, unknown>
18059
16816
  }
18060
16817
  | {
18061
16818
  type: 'block.unset'
@@ -18218,18 +16975,6 @@ declare const editorMachine: StateMachine<
18218
16975
  type: 'style.toggle'
18219
16976
  style: string
18220
16977
  }
18221
- | {
18222
- type: 'text block.set'
18223
- at: [KeyedSegment]
18224
- level?: number
18225
- listItem?: string
18226
- style?: string
18227
- }
18228
- | {
18229
- type: 'text block.unset'
18230
- at: [KeyedSegment]
18231
- props: Array<'level' | 'listItem' | 'style'>
18232
- }
18233
16978
  | ({
18234
16979
  type: 'serialization.failure'
18235
16980
  mimeType: `${string}/${string}`
@@ -18311,7 +17056,7 @@ declare const editorMachine: StateMachine<
18311
17056
  }
18312
17057
  >
18313
17058
  }
18314
- readonly 'select.*': {
17059
+ readonly 'select': {
18315
17060
  readonly actions: ActionFunction<
18316
17061
  {
18317
17062
  behaviors: Set<Behavior>
@@ -18324,12 +17069,10 @@ declare const editorMachine: StateMachine<
18324
17069
  selection: EditorSelection
18325
17070
  value: Array<PortableTextBlock> | undefined
18326
17071
  },
18327
- | {
18328
- type: 'select.previous block'
18329
- }
18330
- | {
18331
- type: 'select.next block'
18332
- },
17072
+ {
17073
+ type: 'select'
17074
+ selection: EditorSelection
17075
+ },
18333
17076
  | {
18334
17077
  type: 'annotation.add'
18335
17078
  annotation: {
@@ -18355,9 +17098,9 @@ declare const editorMachine: StateMachine<
18355
17098
  }
18356
17099
  }
18357
17100
  | {
18358
- [props: string]: unknown
18359
17101
  type: 'block.set'
18360
17102
  at: [KeyedSegment]
17103
+ props: Record<string, unknown>
18361
17104
  }
18362
17105
  | {
18363
17106
  type: 'block.unset'
@@ -18520,18 +17263,6 @@ declare const editorMachine: StateMachine<
18520
17263
  type: 'style.toggle'
18521
17264
  style: string
18522
17265
  }
18523
- | {
18524
- type: 'text block.set'
18525
- at: [KeyedSegment]
18526
- level?: number
18527
- listItem?: string
18528
- style?: string
18529
- }
18530
- | {
18531
- type: 'text block.unset'
18532
- at: [KeyedSegment]
18533
- props: Array<'level' | 'listItem' | 'style'>
18534
- }
18535
17266
  | ({
18536
17267
  type: 'serialization.failure'
18537
17268
  mimeType: `${string}/${string}`
@@ -18711,9 +17442,9 @@ declare const editorMachine: StateMachine<
18711
17442
  }
18712
17443
  }
18713
17444
  | {
18714
- [props: string]: unknown
18715
17445
  type: 'block.set'
18716
17446
  at: [KeyedSegment]
17447
+ props: Record<string, unknown>
18717
17448
  }
18718
17449
  | {
18719
17450
  type: 'block.unset'
@@ -18876,18 +17607,6 @@ declare const editorMachine: StateMachine<
18876
17607
  type: 'style.toggle'
18877
17608
  style: string
18878
17609
  }
18879
- | {
18880
- type: 'text block.set'
18881
- at: [KeyedSegment]
18882
- level?: number
18883
- listItem?: string
18884
- style?: string
18885
- }
18886
- | {
18887
- type: 'text block.unset'
18888
- at: [KeyedSegment]
18889
- props: Array<'level' | 'listItem' | 'style'>
18890
- }
18891
17610
  | ({
18892
17611
  type: 'serialization.failure'
18893
17612
  mimeType: `${string}/${string}`
@@ -18969,7 +17688,7 @@ declare const editorMachine: StateMachine<
18969
17688
  }
18970
17689
  >
18971
17690
  }
18972
- readonly 'style.*': {
17691
+ readonly 'select.*': {
18973
17692
  readonly actions: ActionFunction<
18974
17693
  {
18975
17694
  behaviors: Set<Behavior>
@@ -18983,16 +17702,10 @@ declare const editorMachine: StateMachine<
18983
17702
  value: Array<PortableTextBlock> | undefined
18984
17703
  },
18985
17704
  | {
18986
- type: 'style.add'
18987
- style: string
18988
- }
18989
- | {
18990
- type: 'style.remove'
18991
- style: string
17705
+ type: 'select.previous block'
18992
17706
  }
18993
17707
  | {
18994
- type: 'style.toggle'
18995
- style: string
17708
+ type: 'select.next block'
18996
17709
  },
18997
17710
  | {
18998
17711
  type: 'annotation.add'
@@ -19019,9 +17732,9 @@ declare const editorMachine: StateMachine<
19019
17732
  }
19020
17733
  }
19021
17734
  | {
19022
- [props: string]: unknown
19023
17735
  type: 'block.set'
19024
17736
  at: [KeyedSegment]
17737
+ props: Record<string, unknown>
19025
17738
  }
19026
17739
  | {
19027
17740
  type: 'block.unset'
@@ -19184,18 +17897,6 @@ declare const editorMachine: StateMachine<
19184
17897
  type: 'style.toggle'
19185
17898
  style: string
19186
17899
  }
19187
- | {
19188
- type: 'text block.set'
19189
- at: [KeyedSegment]
19190
- level?: number
19191
- listItem?: string
19192
- style?: string
19193
- }
19194
- | {
19195
- type: 'text block.unset'
19196
- at: [KeyedSegment]
19197
- props: Array<'level' | 'listItem' | 'style'>
19198
- }
19199
17900
  | ({
19200
17901
  type: 'serialization.failure'
19201
17902
  mimeType: `${string}/${string}`
@@ -19375,9 +18076,9 @@ declare const editorMachine: StateMachine<
19375
18076
  }
19376
18077
  }
19377
18078
  | {
19378
- [props: string]: unknown
19379
18079
  type: 'block.set'
19380
18080
  at: [KeyedSegment]
18081
+ props: Record<string, unknown>
19381
18082
  }
19382
18083
  | {
19383
18084
  type: 'block.unset'
@@ -19540,18 +18241,6 @@ declare const editorMachine: StateMachine<
19540
18241
  type: 'style.toggle'
19541
18242
  style: string
19542
18243
  }
19543
- | {
19544
- type: 'text block.set'
19545
- at: [KeyedSegment]
19546
- level?: number
19547
- listItem?: string
19548
- style?: string
19549
- }
19550
- | {
19551
- type: 'text block.unset'
19552
- at: [KeyedSegment]
19553
- props: Array<'level' | 'listItem' | 'style'>
19554
- }
19555
18244
  | ({
19556
18245
  type: 'serialization.failure'
19557
18246
  mimeType: `${string}/${string}`
@@ -19633,7 +18322,7 @@ declare const editorMachine: StateMachine<
19633
18322
  }
19634
18323
  >
19635
18324
  }
19636
- readonly 'text block.*': {
18325
+ readonly 'style.*': {
19637
18326
  readonly actions: ActionFunction<
19638
18327
  {
19639
18328
  behaviors: Set<Behavior>
@@ -19647,16 +18336,16 @@ declare const editorMachine: StateMachine<
19647
18336
  value: Array<PortableTextBlock> | undefined
19648
18337
  },
19649
18338
  | {
19650
- type: 'text block.set'
19651
- at: [KeyedSegment]
19652
- level?: number
19653
- listItem?: string
19654
- style?: string
18339
+ type: 'style.add'
18340
+ style: string
19655
18341
  }
19656
18342
  | {
19657
- type: 'text block.unset'
19658
- at: [KeyedSegment]
19659
- props: Array<'level' | 'listItem' | 'style'>
18343
+ type: 'style.remove'
18344
+ style: string
18345
+ }
18346
+ | {
18347
+ type: 'style.toggle'
18348
+ style: string
19660
18349
  },
19661
18350
  | {
19662
18351
  type: 'annotation.add'
@@ -19683,9 +18372,9 @@ declare const editorMachine: StateMachine<
19683
18372
  }
19684
18373
  }
19685
18374
  | {
19686
- [props: string]: unknown
19687
18375
  type: 'block.set'
19688
18376
  at: [KeyedSegment]
18377
+ props: Record<string, unknown>
19689
18378
  }
19690
18379
  | {
19691
18380
  type: 'block.unset'
@@ -19848,18 +18537,6 @@ declare const editorMachine: StateMachine<
19848
18537
  type: 'style.toggle'
19849
18538
  style: string
19850
18539
  }
19851
- | {
19852
- type: 'text block.set'
19853
- at: [KeyedSegment]
19854
- level?: number
19855
- listItem?: string
19856
- style?: string
19857
- }
19858
- | {
19859
- type: 'text block.unset'
19860
- at: [KeyedSegment]
19861
- props: Array<'level' | 'listItem' | 'style'>
19862
- }
19863
18540
  | ({
19864
18541
  type: 'serialization.failure'
19865
18542
  mimeType: `${string}/${string}`
@@ -20039,9 +18716,9 @@ declare const editorMachine: StateMachine<
20039
18716
  }
20040
18717
  }
20041
18718
  | {
20042
- [props: string]: unknown
20043
18719
  type: 'block.set'
20044
18720
  at: [KeyedSegment]
18721
+ props: Record<string, unknown>
20045
18722
  }
20046
18723
  | {
20047
18724
  type: 'block.unset'
@@ -20204,18 +18881,6 @@ declare const editorMachine: StateMachine<
20204
18881
  type: 'style.toggle'
20205
18882
  style: string
20206
18883
  }
20207
- | {
20208
- type: 'text block.set'
20209
- at: [KeyedSegment]
20210
- level?: number
20211
- listItem?: string
20212
- style?: string
20213
- }
20214
- | {
20215
- type: 'text block.unset'
20216
- at: [KeyedSegment]
20217
- props: Array<'level' | 'listItem' | 'style'>
20218
- }
20219
18884
  | ({
20220
18885
  type: 'serialization.failure'
20221
18886
  mimeType: `${string}/${string}`
@@ -20297,6 +18962,19 @@ declare const editorMachine: StateMachine<
20297
18962
  }
20298
18963
  >
20299
18964
  }
18965
+ readonly 'text block.*': {
18966
+ readonly actions: ActionFunction<
18967
+ MachineContext,
18968
+ EventObject,
18969
+ EventObject,
18970
+ NonReducibleUnknown,
18971
+ never,
18972
+ never,
18973
+ never,
18974
+ never,
18975
+ AnyEventObject
18976
+ >
18977
+ }
20300
18978
  }
20301
18979
  }
20302
18980
  }
@@ -21464,7 +20142,7 @@ export declare type SyntheticBehaviorEvent =
21464
20142
  | {
21465
20143
  type: 'block.set'
21466
20144
  at: [KeyedSegment]
21467
- [props: string]: unknown
20145
+ props: Record<string, unknown>
21468
20146
  }
21469
20147
  | {
21470
20148
  type: 'block.unset'
@@ -21627,18 +20305,6 @@ export declare type SyntheticBehaviorEvent =
21627
20305
  type: 'style.toggle'
21628
20306
  style: string
21629
20307
  }
21630
- | {
21631
- type: 'text block.set'
21632
- at: [KeyedSegment]
21633
- level?: number
21634
- listItem?: string
21635
- style?: string
21636
- }
21637
- | {
21638
- type: 'text block.unset'
21639
- at: [KeyedSegment]
21640
- props: Array<'level' | 'listItem' | 'style'>
21641
- }
21642
20308
  | (PickFromUnion<
21643
20309
  ConverterEvent,
21644
20310
  'type',