@portabletext/editor 1.16.0 → 1.16.2

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.
package/lib/index.d.cts CHANGED
@@ -497,6 +497,9 @@ export declare type EditorChanges = Subject<EditorChange>
497
497
  export declare type EditorConfig = {
498
498
  behaviors?: Array<Behavior>
499
499
  keyGenerator?: () => string
500
+ /**
501
+ * @deprecated Will be removed in the next major version
502
+ */
500
503
  maxBlocks?: number
501
504
  readOnly?: boolean
502
505
  initialValue?: Array<PortableTextBlock>
@@ -560,8 +563,8 @@ export declare type EditorEvent = PickFromUnion<
560
563
  | 'list item.toggle'
561
564
  | 'style.toggle'
562
565
  | 'patches'
563
- | 'toggle readOnly'
564
566
  | 'update behaviors'
567
+ | 'update readOnly'
565
568
  | 'update value'
566
569
  >
567
570
 
@@ -679,6 +682,10 @@ export declare const editorMachine: StateMachine<
679
682
  editor: PortableTextSlateEditor
680
683
  actionIntends: Array<BehaviorActionIntend>
681
684
  }
685
+ | {
686
+ type: 'update readOnly'
687
+ readOnly: boolean
688
+ }
682
689
  | {
683
690
  type: 'update schema'
684
691
  schema: EditorSchema
@@ -691,9 +698,6 @@ export declare const editorMachine: StateMachine<
691
698
  type: 'update value'
692
699
  value: Array<PortableTextBlock> | undefined
693
700
  }
694
- | {
695
- type: 'toggle readOnly'
696
- }
697
701
  | {
698
702
  type: 'update maxBlocks'
699
703
  maxBlocks: number | undefined
@@ -1066,6 +1070,10 @@ export declare const editorMachine: StateMachine<
1066
1070
  editor: PortableTextSlateEditor
1067
1071
  actionIntends: Array<BehaviorActionIntend>
1068
1072
  }
1073
+ | {
1074
+ type: 'update readOnly'
1075
+ readOnly: boolean
1076
+ }
1069
1077
  | {
1070
1078
  type: 'update schema'
1071
1079
  schema: EditorSchema
@@ -1078,9 +1086,6 @@ export declare const editorMachine: StateMachine<
1078
1086
  type: 'update value'
1079
1087
  value: Array<PortableTextBlock> | undefined
1080
1088
  }
1081
- | {
1082
- type: 'toggle readOnly'
1083
- }
1084
1089
  | {
1085
1090
  type: 'update maxBlocks'
1086
1091
  maxBlocks: number | undefined
@@ -1226,6 +1231,10 @@ export declare const editorMachine: StateMachine<
1226
1231
  editor: PortableTextSlateEditor
1227
1232
  actionIntends: Array<BehaviorActionIntend>
1228
1233
  }
1234
+ | {
1235
+ type: 'update readOnly'
1236
+ readOnly: boolean
1237
+ }
1229
1238
  | {
1230
1239
  type: 'update schema'
1231
1240
  schema: EditorSchema
@@ -1238,9 +1247,6 @@ export declare const editorMachine: StateMachine<
1238
1247
  type: 'update value'
1239
1248
  value: Array<PortableTextBlock> | undefined
1240
1249
  }
1241
- | {
1242
- type: 'toggle readOnly'
1243
- }
1244
1250
  | {
1245
1251
  type: 'update maxBlocks'
1246
1252
  maxBlocks: number | undefined
@@ -1408,6 +1414,10 @@ export declare const editorMachine: StateMachine<
1408
1414
  editor: PortableTextSlateEditor
1409
1415
  actionIntends: Array<BehaviorActionIntend>
1410
1416
  }
1417
+ | {
1418
+ type: 'update readOnly'
1419
+ readOnly: boolean
1420
+ }
1411
1421
  | {
1412
1422
  type: 'update schema'
1413
1423
  schema: EditorSchema
@@ -1420,9 +1430,6 @@ export declare const editorMachine: StateMachine<
1420
1430
  type: 'update value'
1421
1431
  value: Array<PortableTextBlock> | undefined
1422
1432
  }
1423
- | {
1424
- type: 'toggle readOnly'
1425
- }
1426
1433
  | {
1427
1434
  type: 'update maxBlocks'
1428
1435
  maxBlocks: number | undefined
@@ -1702,6 +1709,10 @@ export declare const editorMachine: StateMachine<
1702
1709
  editor: PortableTextSlateEditor
1703
1710
  actionIntends: Array<BehaviorActionIntend>
1704
1711
  }
1712
+ | {
1713
+ type: 'update readOnly'
1714
+ readOnly: boolean
1715
+ }
1705
1716
  | {
1706
1717
  type: 'update schema'
1707
1718
  schema: EditorSchema
@@ -1714,9 +1725,6 @@ export declare const editorMachine: StateMachine<
1714
1725
  type: 'update value'
1715
1726
  value: Array<PortableTextBlock> | undefined
1716
1727
  }
1717
- | {
1718
- type: 'toggle readOnly'
1719
- }
1720
1728
  | {
1721
1729
  type: 'update maxBlocks'
1722
1730
  maxBlocks: number | undefined
@@ -1997,6 +2005,10 @@ export declare const editorMachine: StateMachine<
1997
2005
  editor: PortableTextSlateEditor
1998
2006
  actionIntends: Array<BehaviorActionIntend>
1999
2007
  }
2008
+ | {
2009
+ type: 'update readOnly'
2010
+ readOnly: boolean
2011
+ }
2000
2012
  | {
2001
2013
  type: 'update schema'
2002
2014
  schema: EditorSchema
@@ -2009,9 +2021,6 @@ export declare const editorMachine: StateMachine<
2009
2021
  type: 'update value'
2010
2022
  value: Array<PortableTextBlock> | undefined
2011
2023
  }
2012
- | {
2013
- type: 'toggle readOnly'
2014
- }
2015
2024
  | {
2016
2025
  type: 'update maxBlocks'
2017
2026
  maxBlocks: number | undefined
@@ -2293,6 +2302,10 @@ export declare const editorMachine: StateMachine<
2293
2302
  editor: PortableTextSlateEditor
2294
2303
  actionIntends: Array<BehaviorActionIntend>
2295
2304
  }
2305
+ | {
2306
+ type: 'update readOnly'
2307
+ readOnly: boolean
2308
+ }
2296
2309
  | {
2297
2310
  type: 'update schema'
2298
2311
  schema: EditorSchema
@@ -2305,9 +2318,6 @@ export declare const editorMachine: StateMachine<
2305
2318
  type: 'update value'
2306
2319
  value: Array<PortableTextBlock> | undefined
2307
2320
  }
2308
- | {
2309
- type: 'toggle readOnly'
2310
- }
2311
2321
  | {
2312
2322
  type: 'update maxBlocks'
2313
2323
  maxBlocks: number | undefined
@@ -2588,6 +2598,10 @@ export declare const editorMachine: StateMachine<
2588
2598
  editor: PortableTextSlateEditor
2589
2599
  actionIntends: Array<BehaviorActionIntend>
2590
2600
  }
2601
+ | {
2602
+ type: 'update readOnly'
2603
+ readOnly: boolean
2604
+ }
2591
2605
  | {
2592
2606
  type: 'update schema'
2593
2607
  schema: EditorSchema
@@ -2600,9 +2614,6 @@ export declare const editorMachine: StateMachine<
2600
2614
  type: 'update value'
2601
2615
  value: Array<PortableTextBlock> | undefined
2602
2616
  }
2603
- | {
2604
- type: 'toggle readOnly'
2605
- }
2606
2617
  | {
2607
2618
  type: 'update maxBlocks'
2608
2619
  maxBlocks: number | undefined
@@ -2763,6 +2774,10 @@ export declare const editorMachine: StateMachine<
2763
2774
  editor: PortableTextSlateEditor
2764
2775
  actionIntends: Array<BehaviorActionIntend>
2765
2776
  }
2777
+ | {
2778
+ type: 'update readOnly'
2779
+ readOnly: boolean
2780
+ }
2766
2781
  | {
2767
2782
  type: 'update schema'
2768
2783
  schema: EditorSchema
@@ -2775,9 +2790,6 @@ export declare const editorMachine: StateMachine<
2775
2790
  type: 'update value'
2776
2791
  value: Array<PortableTextBlock> | undefined
2777
2792
  }
2778
- | {
2779
- type: 'toggle readOnly'
2780
- }
2781
2793
  | {
2782
2794
  type: 'update maxBlocks'
2783
2795
  maxBlocks: number | undefined
@@ -3058,6 +3070,10 @@ export declare const editorMachine: StateMachine<
3058
3070
  editor: PortableTextSlateEditor
3059
3071
  actionIntends: Array<BehaviorActionIntend>
3060
3072
  }
3073
+ | {
3074
+ type: 'update readOnly'
3075
+ readOnly: boolean
3076
+ }
3061
3077
  | {
3062
3078
  type: 'update schema'
3063
3079
  schema: EditorSchema
@@ -3070,9 +3086,6 @@ export declare const editorMachine: StateMachine<
3070
3086
  type: 'update value'
3071
3087
  value: Array<PortableTextBlock> | undefined
3072
3088
  }
3073
- | {
3074
- type: 'toggle readOnly'
3075
- }
3076
3089
  | {
3077
3090
  type: 'update maxBlocks'
3078
3091
  maxBlocks: number | undefined
@@ -3352,6 +3365,10 @@ export declare const editorMachine: StateMachine<
3352
3365
  editor: PortableTextSlateEditor
3353
3366
  actionIntends: Array<BehaviorActionIntend>
3354
3367
  }
3368
+ | {
3369
+ type: 'update readOnly'
3370
+ readOnly: boolean
3371
+ }
3355
3372
  | {
3356
3373
  type: 'update schema'
3357
3374
  schema: EditorSchema
@@ -3364,9 +3381,6 @@ export declare const editorMachine: StateMachine<
3364
3381
  type: 'update value'
3365
3382
  value: Array<PortableTextBlock> | undefined
3366
3383
  }
3367
- | {
3368
- type: 'toggle readOnly'
3369
- }
3370
3384
  | {
3371
3385
  type: 'update maxBlocks'
3372
3386
  maxBlocks: number | undefined
@@ -3645,6 +3659,10 @@ export declare const editorMachine: StateMachine<
3645
3659
  editor: PortableTextSlateEditor
3646
3660
  actionIntends: Array<BehaviorActionIntend>
3647
3661
  }
3662
+ | {
3663
+ type: 'update readOnly'
3664
+ readOnly: boolean
3665
+ }
3648
3666
  | {
3649
3667
  type: 'update schema'
3650
3668
  schema: EditorSchema
@@ -3657,9 +3675,6 @@ export declare const editorMachine: StateMachine<
3657
3675
  type: 'update value'
3658
3676
  value: Array<PortableTextBlock> | undefined
3659
3677
  }
3660
- | {
3661
- type: 'toggle readOnly'
3662
- }
3663
3678
  | {
3664
3679
  type: 'update maxBlocks'
3665
3680
  maxBlocks: number | undefined
@@ -3936,6 +3951,10 @@ export declare const editorMachine: StateMachine<
3936
3951
  editor: PortableTextSlateEditor
3937
3952
  actionIntends: Array<BehaviorActionIntend>
3938
3953
  }
3954
+ | {
3955
+ type: 'update readOnly'
3956
+ readOnly: boolean
3957
+ }
3939
3958
  | {
3940
3959
  type: 'update schema'
3941
3960
  schema: EditorSchema
@@ -3948,9 +3967,6 @@ export declare const editorMachine: StateMachine<
3948
3967
  type: 'update value'
3949
3968
  value: Array<PortableTextBlock> | undefined
3950
3969
  }
3951
- | {
3952
- type: 'toggle readOnly'
3953
- }
3954
3970
  | {
3955
3971
  type: 'update maxBlocks'
3956
3972
  maxBlocks: number | undefined
@@ -4229,6 +4245,10 @@ export declare const editorMachine: StateMachine<
4229
4245
  editor: PortableTextSlateEditor
4230
4246
  actionIntends: Array<BehaviorActionIntend>
4231
4247
  }
4248
+ | {
4249
+ type: 'update readOnly'
4250
+ readOnly: boolean
4251
+ }
4232
4252
  | {
4233
4253
  type: 'update schema'
4234
4254
  schema: EditorSchema
@@ -4241,9 +4261,6 @@ export declare const editorMachine: StateMachine<
4241
4261
  type: 'update value'
4242
4262
  value: Array<PortableTextBlock> | undefined
4243
4263
  }
4244
- | {
4245
- type: 'toggle readOnly'
4246
- }
4247
4264
  | {
4248
4265
  type: 'update maxBlocks'
4249
4266
  maxBlocks: number | undefined
@@ -4529,6 +4546,10 @@ export declare const editorMachine: StateMachine<
4529
4546
  editor: PortableTextSlateEditor
4530
4547
  actionIntends: Array<BehaviorActionIntend>
4531
4548
  }
4549
+ | {
4550
+ type: 'update readOnly'
4551
+ readOnly: boolean
4552
+ }
4532
4553
  | {
4533
4554
  type: 'update schema'
4534
4555
  schema: EditorSchema
@@ -4541,9 +4562,6 @@ export declare const editorMachine: StateMachine<
4541
4562
  type: 'update value'
4542
4563
  value: Array<PortableTextBlock> | undefined
4543
4564
  }
4544
- | {
4545
- type: 'toggle readOnly'
4546
- }
4547
4565
  | {
4548
4566
  type: 'update maxBlocks'
4549
4567
  maxBlocks: number | undefined
@@ -4706,6 +4724,10 @@ export declare const editorMachine: StateMachine<
4706
4724
  editor: PortableTextSlateEditor
4707
4725
  actionIntends: Array<BehaviorActionIntend>
4708
4726
  }
4727
+ | {
4728
+ type: 'update readOnly'
4729
+ readOnly: boolean
4730
+ }
4709
4731
  | {
4710
4732
  type: 'update schema'
4711
4733
  schema: EditorSchema
@@ -4718,9 +4740,6 @@ export declare const editorMachine: StateMachine<
4718
4740
  type: 'update value'
4719
4741
  value: Array<PortableTextBlock> | undefined
4720
4742
  }
4721
- | {
4722
- type: 'toggle readOnly'
4723
- }
4724
4743
  | {
4725
4744
  type: 'update maxBlocks'
4726
4745
  maxBlocks: number | undefined
@@ -4888,6 +4907,10 @@ export declare const editorMachine: StateMachine<
4888
4907
  editor: PortableTextSlateEditor
4889
4908
  actionIntends: Array<BehaviorActionIntend>
4890
4909
  }
4910
+ | {
4911
+ type: 'update readOnly'
4912
+ readOnly: boolean
4913
+ }
4891
4914
  | {
4892
4915
  type: 'update schema'
4893
4916
  schema: EditorSchema
@@ -4900,9 +4923,6 @@ export declare const editorMachine: StateMachine<
4900
4923
  type: 'update value'
4901
4924
  value: Array<PortableTextBlock> | undefined
4902
4925
  }
4903
- | {
4904
- type: 'toggle readOnly'
4905
- }
4906
4926
  | {
4907
4927
  type: 'update maxBlocks'
4908
4928
  maxBlocks: number | undefined
@@ -5058,6 +5078,10 @@ export declare const editorMachine: StateMachine<
5058
5078
  editor: PortableTextSlateEditor
5059
5079
  actionIntends: Array<BehaviorActionIntend>
5060
5080
  }
5081
+ | {
5082
+ type: 'update readOnly'
5083
+ readOnly: boolean
5084
+ }
5061
5085
  | {
5062
5086
  type: 'update schema'
5063
5087
  schema: EditorSchema
@@ -5070,9 +5094,6 @@ export declare const editorMachine: StateMachine<
5070
5094
  type: 'update value'
5071
5095
  value: Array<PortableTextBlock> | undefined
5072
5096
  }
5073
- | {
5074
- type: 'toggle readOnly'
5075
- }
5076
5097
  | {
5077
5098
  type: 'update maxBlocks'
5078
5099
  maxBlocks: number | undefined
@@ -5329,7 +5350,25 @@ export declare const editorMachine: StateMachine<
5329
5350
  }
5330
5351
  readonly 'read only': {
5331
5352
  readonly on: {
5332
- readonly 'toggle readOnly': {
5353
+ readonly 'update readOnly': {
5354
+ readonly guard: ({
5355
+ event,
5356
+ }: GuardArgs<
5357
+ {
5358
+ behaviors: Array<Behavior>
5359
+ keyGenerator: () => string
5360
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5361
+ schema: EditorSchema
5362
+ initialReadOnly: boolean
5363
+ maxBlocks: number | undefined
5364
+ selection: EditorSelection
5365
+ value: Array<PortableTextBlock> | undefined
5366
+ },
5367
+ {
5368
+ type: 'update readOnly'
5369
+ readOnly: boolean
5370
+ }
5371
+ >) => boolean
5333
5372
  readonly target: '#editor.edit mode.editable'
5334
5373
  readonly actions: readonly ['emit editable']
5335
5374
  }
@@ -5339,7 +5378,25 @@ export declare const editorMachine: StateMachine<
5339
5378
  }
5340
5379
  readonly 'editable': {
5341
5380
  readonly on: {
5342
- readonly 'toggle readOnly': {
5381
+ readonly 'update readOnly': {
5382
+ readonly guard: ({
5383
+ event,
5384
+ }: GuardArgs<
5385
+ {
5386
+ behaviors: Array<Behavior>
5387
+ keyGenerator: () => string
5388
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5389
+ schema: EditorSchema
5390
+ initialReadOnly: boolean
5391
+ maxBlocks: number | undefined
5392
+ selection: EditorSelection
5393
+ value: Array<PortableTextBlock> | undefined
5394
+ },
5395
+ {
5396
+ type: 'update readOnly'
5397
+ readOnly: boolean
5398
+ }
5399
+ >) => boolean
5343
5400
  readonly target: '#editor.edit mode.read only.read only'
5344
5401
  readonly actions: readonly ['emit read only']
5345
5402
  }
@@ -5462,6 +5519,10 @@ export declare const editorMachine: StateMachine<
5462
5519
  editor: PortableTextSlateEditor
5463
5520
  actionIntends: Array<BehaviorActionIntend>
5464
5521
  }
5522
+ | {
5523
+ type: 'update readOnly'
5524
+ readOnly: boolean
5525
+ }
5465
5526
  | {
5466
5527
  type: 'update schema'
5467
5528
  schema: EditorSchema
@@ -5474,9 +5535,6 @@ export declare const editorMachine: StateMachine<
5474
5535
  type: 'update value'
5475
5536
  value: Array<PortableTextBlock> | undefined
5476
5537
  }
5477
- | {
5478
- type: 'toggle readOnly'
5479
- }
5480
5538
  | {
5481
5539
  type: 'update maxBlocks'
5482
5540
  maxBlocks: number | undefined
@@ -5760,6 +5818,10 @@ export declare const editorMachine: StateMachine<
5760
5818
  editor: PortableTextSlateEditor
5761
5819
  actionIntends: Array<BehaviorActionIntend>
5762
5820
  }
5821
+ | {
5822
+ type: 'update readOnly'
5823
+ readOnly: boolean
5824
+ }
5763
5825
  | {
5764
5826
  type: 'update schema'
5765
5827
  schema: EditorSchema
@@ -5772,9 +5834,6 @@ export declare const editorMachine: StateMachine<
5772
5834
  type: 'update value'
5773
5835
  value: Array<PortableTextBlock> | undefined
5774
5836
  }
5775
- | {
5776
- type: 'toggle readOnly'
5777
- }
5778
5837
  | {
5779
5838
  type: 'update maxBlocks'
5780
5839
  maxBlocks: number | undefined
@@ -6061,6 +6120,10 @@ export declare const editorMachine: StateMachine<
6061
6120
  editor: PortableTextSlateEditor
6062
6121
  actionIntends: Array<BehaviorActionIntend>
6063
6122
  }
6123
+ | {
6124
+ type: 'update readOnly'
6125
+ readOnly: boolean
6126
+ }
6064
6127
  | {
6065
6128
  type: 'update schema'
6066
6129
  schema: EditorSchema
@@ -6073,9 +6136,6 @@ export declare const editorMachine: StateMachine<
6073
6136
  type: 'update value'
6074
6137
  value: Array<PortableTextBlock> | undefined
6075
6138
  }
6076
- | {
6077
- type: 'toggle readOnly'
6078
- }
6079
6139
  | {
6080
6140
  type: 'update maxBlocks'
6081
6141
  maxBlocks: number | undefined
@@ -6356,6 +6416,10 @@ export declare const editorMachine: StateMachine<
6356
6416
  editor: PortableTextSlateEditor
6357
6417
  actionIntends: Array<BehaviorActionIntend>
6358
6418
  }
6419
+ | {
6420
+ type: 'update readOnly'
6421
+ readOnly: boolean
6422
+ }
6359
6423
  | {
6360
6424
  type: 'update schema'
6361
6425
  schema: EditorSchema
@@ -6368,9 +6432,6 @@ export declare const editorMachine: StateMachine<
6368
6432
  type: 'update value'
6369
6433
  value: Array<PortableTextBlock> | undefined
6370
6434
  }
6371
- | {
6372
- type: 'toggle readOnly'
6373
- }
6374
6435
  | {
6375
6436
  type: 'update maxBlocks'
6376
6437
  maxBlocks: number | undefined
@@ -6660,6 +6721,10 @@ export declare const editorMachine: StateMachine<
6660
6721
  editor: PortableTextSlateEditor
6661
6722
  actionIntends: Array<BehaviorActionIntend>
6662
6723
  }
6724
+ | {
6725
+ type: 'update readOnly'
6726
+ readOnly: boolean
6727
+ }
6663
6728
  | {
6664
6729
  type: 'update schema'
6665
6730
  schema: EditorSchema
@@ -6672,9 +6737,6 @@ export declare const editorMachine: StateMachine<
6672
6737
  type: 'update value'
6673
6738
  value: Array<PortableTextBlock> | undefined
6674
6739
  }
6675
- | {
6676
- type: 'toggle readOnly'
6677
- }
6678
6740
  | {
6679
6741
  type: 'update maxBlocks'
6680
6742
  maxBlocks: number | undefined
@@ -6955,6 +7017,10 @@ export declare const editorMachine: StateMachine<
6955
7017
  editor: PortableTextSlateEditor
6956
7018
  actionIntends: Array<BehaviorActionIntend>
6957
7019
  }
7020
+ | {
7021
+ type: 'update readOnly'
7022
+ readOnly: boolean
7023
+ }
6958
7024
  | {
6959
7025
  type: 'update schema'
6960
7026
  schema: EditorSchema
@@ -6967,9 +7033,6 @@ export declare const editorMachine: StateMachine<
6967
7033
  type: 'update value'
6968
7034
  value: Array<PortableTextBlock> | undefined
6969
7035
  }
6970
- | {
6971
- type: 'toggle readOnly'
6972
- }
6973
7036
  | {
6974
7037
  type: 'update maxBlocks'
6975
7038
  maxBlocks: number | undefined
@@ -7266,6 +7329,10 @@ export declare const editorMachine: StateMachine<
7266
7329
  editor: PortableTextSlateEditor
7267
7330
  actionIntends: Array<BehaviorActionIntend>
7268
7331
  }
7332
+ | {
7333
+ type: 'update readOnly'
7334
+ readOnly: boolean
7335
+ }
7269
7336
  | {
7270
7337
  type: 'update schema'
7271
7338
  schema: EditorSchema
@@ -7278,9 +7345,6 @@ export declare const editorMachine: StateMachine<
7278
7345
  type: 'update value'
7279
7346
  value: Array<PortableTextBlock> | undefined
7280
7347
  }
7281
- | {
7282
- type: 'toggle readOnly'
7283
- }
7284
7348
  | {
7285
7349
  type: 'update maxBlocks'
7286
7350
  maxBlocks: number | undefined
@@ -7562,6 +7626,10 @@ export declare const editorMachine: StateMachine<
7562
7626
  editor: PortableTextSlateEditor
7563
7627
  actionIntends: Array<BehaviorActionIntend>
7564
7628
  }
7629
+ | {
7630
+ type: 'update readOnly'
7631
+ readOnly: boolean
7632
+ }
7565
7633
  | {
7566
7634
  type: 'update schema'
7567
7635
  schema: EditorSchema
@@ -7574,9 +7642,6 @@ export declare const editorMachine: StateMachine<
7574
7642
  type: 'update value'
7575
7643
  value: Array<PortableTextBlock> | undefined
7576
7644
  }
7577
- | {
7578
- type: 'toggle readOnly'
7579
- }
7580
7645
  | {
7581
7646
  type: 'update maxBlocks'
7582
7647
  maxBlocks: number | undefined
@@ -7858,6 +7923,10 @@ export declare const editorMachine: StateMachine<
7858
7923
  editor: PortableTextSlateEditor
7859
7924
  actionIntends: Array<BehaviorActionIntend>
7860
7925
  }
7926
+ | {
7927
+ type: 'update readOnly'
7928
+ readOnly: boolean
7929
+ }
7861
7930
  | {
7862
7931
  type: 'update schema'
7863
7932
  schema: EditorSchema
@@ -7870,9 +7939,6 @@ export declare const editorMachine: StateMachine<
7870
7939
  type: 'update value'
7871
7940
  value: Array<PortableTextBlock> | undefined
7872
7941
  }
7873
- | {
7874
- type: 'toggle readOnly'
7875
- }
7876
7942
  | {
7877
7943
  type: 'update maxBlocks'
7878
7944
  maxBlocks: number | undefined
@@ -8309,6 +8375,10 @@ export declare type InternalEditorEvent =
8309
8375
  editor: PortableTextSlateEditor
8310
8376
  actionIntends: Array<BehaviorActionIntend>
8311
8377
  }
8378
+ | {
8379
+ type: 'update readOnly'
8380
+ readOnly: boolean
8381
+ }
8312
8382
  | {
8313
8383
  type: 'update schema'
8314
8384
  schema: EditorSchema
@@ -8321,9 +8391,6 @@ export declare type InternalEditorEvent =
8321
8391
  type: 'update value'
8322
8392
  value: Array<PortableTextBlock> | undefined
8323
8393
  }
8324
- | {
8325
- type: 'toggle readOnly'
8326
- }
8327
8394
  | {
8328
8395
  type: 'update maxBlocks'
8329
8396
  maxBlocks: number | undefined