@portabletext/editor 1.16.2 → 1.16.4

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.ts CHANGED
@@ -552,6 +552,8 @@ export declare type EditorEmittedEvent = PickFromUnion<
552
552
  export declare type EditorEvent = PickFromUnion<
553
553
  InternalEditorEvent,
554
554
  'type',
555
+ | 'annotation.add'
556
+ | 'annotation.remove'
555
557
  | 'annotation.toggle'
556
558
  | 'blur'
557
559
  | 'decorator.add'
@@ -667,7 +669,7 @@ export declare const editorMachine: StateMachine<
667
669
  type: 'done normalizing'
668
670
  }
669
671
  | {
670
- type: 'done syncing'
672
+ type: 'done syncing initial value'
671
673
  }
672
674
  | {
673
675
  type: 'behavior event'
@@ -702,9 +704,6 @@ export declare const editorMachine: StateMachine<
702
704
  type: 'update maxBlocks'
703
705
  maxBlocks: number | undefined
704
706
  }
705
- | {
706
- type: 'ready'
707
- }
708
707
  | PatchesEvent
709
708
  | {
710
709
  type: 'unset'
@@ -1055,7 +1054,7 @@ export declare const editorMachine: StateMachine<
1055
1054
  type: 'done normalizing'
1056
1055
  }
1057
1056
  | {
1058
- type: 'done syncing'
1057
+ type: 'done syncing initial value'
1059
1058
  }
1060
1059
  | {
1061
1060
  type: 'behavior event'
@@ -1090,9 +1089,6 @@ export declare const editorMachine: StateMachine<
1090
1089
  type: 'update maxBlocks'
1091
1090
  maxBlocks: number | undefined
1092
1091
  }
1093
- | {
1094
- type: 'ready'
1095
- }
1096
1092
  | PatchesEvent
1097
1093
  | {
1098
1094
  type: 'unset'
@@ -1216,7 +1212,7 @@ export declare const editorMachine: StateMachine<
1216
1212
  type: 'done normalizing'
1217
1213
  }
1218
1214
  | {
1219
- type: 'done syncing'
1215
+ type: 'done syncing initial value'
1220
1216
  }
1221
1217
  | {
1222
1218
  type: 'behavior event'
@@ -1251,9 +1247,6 @@ export declare const editorMachine: StateMachine<
1251
1247
  type: 'update maxBlocks'
1252
1248
  maxBlocks: number | undefined
1253
1249
  }
1254
- | {
1255
- type: 'ready'
1256
- }
1257
1250
  | PatchesEvent
1258
1251
  | {
1259
1252
  type: 'unset'
@@ -1399,7 +1392,7 @@ export declare const editorMachine: StateMachine<
1399
1392
  type: 'done normalizing'
1400
1393
  }
1401
1394
  | {
1402
- type: 'done syncing'
1395
+ type: 'done syncing initial value'
1403
1396
  }
1404
1397
  | {
1405
1398
  type: 'behavior event'
@@ -1434,9 +1427,6 @@ export declare const editorMachine: StateMachine<
1434
1427
  type: 'update maxBlocks'
1435
1428
  maxBlocks: number | undefined
1436
1429
  }
1437
- | {
1438
- type: 'ready'
1439
- }
1440
1430
  | PatchesEvent
1441
1431
  | {
1442
1432
  type: 'unset'
@@ -1694,7 +1684,7 @@ export declare const editorMachine: StateMachine<
1694
1684
  type: 'done normalizing'
1695
1685
  }
1696
1686
  | {
1697
- type: 'done syncing'
1687
+ type: 'done syncing initial value'
1698
1688
  }
1699
1689
  | {
1700
1690
  type: 'behavior event'
@@ -1729,9 +1719,6 @@ export declare const editorMachine: StateMachine<
1729
1719
  type: 'update maxBlocks'
1730
1720
  maxBlocks: number | undefined
1731
1721
  }
1732
- | {
1733
- type: 'ready'
1734
- }
1735
1722
  | PatchesEvent
1736
1723
  | {
1737
1724
  type: 'unset'
@@ -1990,7 +1977,7 @@ export declare const editorMachine: StateMachine<
1990
1977
  type: 'done normalizing'
1991
1978
  }
1992
1979
  | {
1993
- type: 'done syncing'
1980
+ type: 'done syncing initial value'
1994
1981
  }
1995
1982
  | {
1996
1983
  type: 'behavior event'
@@ -2025,9 +2012,6 @@ export declare const editorMachine: StateMachine<
2025
2012
  type: 'update maxBlocks'
2026
2013
  maxBlocks: number | undefined
2027
2014
  }
2028
- | {
2029
- type: 'ready'
2030
- }
2031
2015
  | PatchesEvent
2032
2016
  | {
2033
2017
  type: 'unset'
@@ -2287,7 +2271,7 @@ export declare const editorMachine: StateMachine<
2287
2271
  type: 'done normalizing'
2288
2272
  }
2289
2273
  | {
2290
- type: 'done syncing'
2274
+ type: 'done syncing initial value'
2291
2275
  }
2292
2276
  | {
2293
2277
  type: 'behavior event'
@@ -2322,9 +2306,6 @@ export declare const editorMachine: StateMachine<
2322
2306
  type: 'update maxBlocks'
2323
2307
  maxBlocks: number | undefined
2324
2308
  }
2325
- | {
2326
- type: 'ready'
2327
- }
2328
2309
  | PatchesEvent
2329
2310
  | {
2330
2311
  type: 'unset'
@@ -2583,7 +2564,7 @@ export declare const editorMachine: StateMachine<
2583
2564
  type: 'done normalizing'
2584
2565
  }
2585
2566
  | {
2586
- type: 'done syncing'
2567
+ type: 'done syncing initial value'
2587
2568
  }
2588
2569
  | {
2589
2570
  type: 'behavior event'
@@ -2618,9 +2599,6 @@ export declare const editorMachine: StateMachine<
2618
2599
  type: 'update maxBlocks'
2619
2600
  maxBlocks: number | undefined
2620
2601
  }
2621
- | {
2622
- type: 'ready'
2623
- }
2624
2602
  | PatchesEvent
2625
2603
  | {
2626
2604
  type: 'unset'
@@ -2759,7 +2737,7 @@ export declare const editorMachine: StateMachine<
2759
2737
  type: 'done normalizing'
2760
2738
  }
2761
2739
  | {
2762
- type: 'done syncing'
2740
+ type: 'done syncing initial value'
2763
2741
  }
2764
2742
  | {
2765
2743
  type: 'behavior event'
@@ -2794,9 +2772,6 @@ export declare const editorMachine: StateMachine<
2794
2772
  type: 'update maxBlocks'
2795
2773
  maxBlocks: number | undefined
2796
2774
  }
2797
- | {
2798
- type: 'ready'
2799
- }
2800
2775
  | PatchesEvent
2801
2776
  | {
2802
2777
  type: 'unset'
@@ -3055,7 +3030,7 @@ export declare const editorMachine: StateMachine<
3055
3030
  type: 'done normalizing'
3056
3031
  }
3057
3032
  | {
3058
- type: 'done syncing'
3033
+ type: 'done syncing initial value'
3059
3034
  }
3060
3035
  | {
3061
3036
  type: 'behavior event'
@@ -3090,9 +3065,6 @@ export declare const editorMachine: StateMachine<
3090
3065
  type: 'update maxBlocks'
3091
3066
  maxBlocks: number | undefined
3092
3067
  }
3093
- | {
3094
- type: 'ready'
3095
- }
3096
3068
  | PatchesEvent
3097
3069
  | {
3098
3070
  type: 'unset'
@@ -3350,7 +3322,7 @@ export declare const editorMachine: StateMachine<
3350
3322
  type: 'done normalizing'
3351
3323
  }
3352
3324
  | {
3353
- type: 'done syncing'
3325
+ type: 'done syncing initial value'
3354
3326
  }
3355
3327
  | {
3356
3328
  type: 'behavior event'
@@ -3385,9 +3357,6 @@ export declare const editorMachine: StateMachine<
3385
3357
  type: 'update maxBlocks'
3386
3358
  maxBlocks: number | undefined
3387
3359
  }
3388
- | {
3389
- type: 'ready'
3390
- }
3391
3360
  | PatchesEvent
3392
3361
  | {
3393
3362
  type: 'unset'
@@ -3644,7 +3613,7 @@ export declare const editorMachine: StateMachine<
3644
3613
  type: 'done normalizing'
3645
3614
  }
3646
3615
  | {
3647
- type: 'done syncing'
3616
+ type: 'done syncing initial value'
3648
3617
  }
3649
3618
  | {
3650
3619
  type: 'behavior event'
@@ -3679,9 +3648,6 @@ export declare const editorMachine: StateMachine<
3679
3648
  type: 'update maxBlocks'
3680
3649
  maxBlocks: number | undefined
3681
3650
  }
3682
- | {
3683
- type: 'ready'
3684
- }
3685
3651
  | PatchesEvent
3686
3652
  | {
3687
3653
  type: 'unset'
@@ -3936,7 +3902,7 @@ export declare const editorMachine: StateMachine<
3936
3902
  type: 'done normalizing'
3937
3903
  }
3938
3904
  | {
3939
- type: 'done syncing'
3905
+ type: 'done syncing initial value'
3940
3906
  }
3941
3907
  | {
3942
3908
  type: 'behavior event'
@@ -3971,9 +3937,6 @@ export declare const editorMachine: StateMachine<
3971
3937
  type: 'update maxBlocks'
3972
3938
  maxBlocks: number | undefined
3973
3939
  }
3974
- | {
3975
- type: 'ready'
3976
- }
3977
3940
  | PatchesEvent
3978
3941
  | {
3979
3942
  type: 'unset'
@@ -4230,7 +4193,7 @@ export declare const editorMachine: StateMachine<
4230
4193
  type: 'done normalizing'
4231
4194
  }
4232
4195
  | {
4233
- type: 'done syncing'
4196
+ type: 'done syncing initial value'
4234
4197
  }
4235
4198
  | {
4236
4199
  type: 'behavior event'
@@ -4265,9 +4228,6 @@ export declare const editorMachine: StateMachine<
4265
4228
  type: 'update maxBlocks'
4266
4229
  maxBlocks: number | undefined
4267
4230
  }
4268
- | {
4269
- type: 'ready'
4270
- }
4271
4231
  | PatchesEvent
4272
4232
  | {
4273
4233
  type: 'unset'
@@ -4531,7 +4491,7 @@ export declare const editorMachine: StateMachine<
4531
4491
  type: 'done normalizing'
4532
4492
  }
4533
4493
  | {
4534
- type: 'done syncing'
4494
+ type: 'done syncing initial value'
4535
4495
  }
4536
4496
  | {
4537
4497
  type: 'behavior event'
@@ -4566,9 +4526,6 @@ export declare const editorMachine: StateMachine<
4566
4526
  type: 'update maxBlocks'
4567
4527
  maxBlocks: number | undefined
4568
4528
  }
4569
- | {
4570
- type: 'ready'
4571
- }
4572
4529
  | PatchesEvent
4573
4530
  | {
4574
4531
  type: 'unset'
@@ -4709,7 +4666,7 @@ export declare const editorMachine: StateMachine<
4709
4666
  type: 'done normalizing'
4710
4667
  }
4711
4668
  | {
4712
- type: 'done syncing'
4669
+ type: 'done syncing initial value'
4713
4670
  }
4714
4671
  | {
4715
4672
  type: 'behavior event'
@@ -4744,9 +4701,6 @@ export declare const editorMachine: StateMachine<
4744
4701
  type: 'update maxBlocks'
4745
4702
  maxBlocks: number | undefined
4746
4703
  }
4747
- | {
4748
- type: 'ready'
4749
- }
4750
4704
  | PatchesEvent
4751
4705
  | {
4752
4706
  type: 'unset'
@@ -4892,7 +4846,7 @@ export declare const editorMachine: StateMachine<
4892
4846
  type: 'done normalizing'
4893
4847
  }
4894
4848
  | {
4895
- type: 'done syncing'
4849
+ type: 'done syncing initial value'
4896
4850
  }
4897
4851
  | {
4898
4852
  type: 'behavior event'
@@ -4927,9 +4881,6 @@ export declare const editorMachine: StateMachine<
4927
4881
  type: 'update maxBlocks'
4928
4882
  maxBlocks: number | undefined
4929
4883
  }
4930
- | {
4931
- type: 'ready'
4932
- }
4933
4884
  | PatchesEvent
4934
4885
  | {
4935
4886
  type: 'unset'
@@ -5063,7 +5014,7 @@ export declare const editorMachine: StateMachine<
5063
5014
  type: 'done normalizing'
5064
5015
  }
5065
5016
  | {
5066
- type: 'done syncing'
5017
+ type: 'done syncing initial value'
5067
5018
  }
5068
5019
  | {
5069
5020
  type: 'behavior event'
@@ -5098,9 +5049,6 @@ export declare const editorMachine: StateMachine<
5098
5049
  type: 'update maxBlocks'
5099
5050
  maxBlocks: number | undefined
5100
5051
  }
5101
- | {
5102
- type: 'ready'
5103
- }
5104
5052
  | PatchesEvent
5105
5053
  | {
5106
5054
  type: 'unset'
@@ -5321,7 +5269,7 @@ export declare const editorMachine: StateMachine<
5321
5269
  readonly states: {
5322
5270
  readonly 'determine initial edit mode': {
5323
5271
  readonly on: {
5324
- readonly 'done syncing': readonly [
5272
+ readonly 'done syncing initial value': readonly [
5325
5273
  {
5326
5274
  readonly target: '#editor.edit mode.read only.read only'
5327
5275
  readonly guard: ({
@@ -5338,7 +5286,7 @@ export declare const editorMachine: StateMachine<
5338
5286
  value: Array<PortableTextBlock> | undefined
5339
5287
  },
5340
5288
  {
5341
- type: 'done syncing'
5289
+ type: 'done syncing initial value'
5342
5290
  }
5343
5291
  >) => boolean
5344
5292
  },
@@ -5502,7 +5450,7 @@ export declare const editorMachine: StateMachine<
5502
5450
  type: 'done normalizing'
5503
5451
  }
5504
5452
  | {
5505
- type: 'done syncing'
5453
+ type: 'done syncing initial value'
5506
5454
  }
5507
5455
  | {
5508
5456
  type: 'behavior event'
@@ -5539,9 +5487,6 @@ export declare const editorMachine: StateMachine<
5539
5487
  type: 'update maxBlocks'
5540
5488
  maxBlocks: number | undefined
5541
5489
  }
5542
- | {
5543
- type: 'ready'
5544
- }
5545
5490
  | PatchesEvent
5546
5491
  | {
5547
5492
  type: 'unset'
@@ -5801,7 +5746,7 @@ export declare const editorMachine: StateMachine<
5801
5746
  type: 'done normalizing'
5802
5747
  }
5803
5748
  | {
5804
- type: 'done syncing'
5749
+ type: 'done syncing initial value'
5805
5750
  }
5806
5751
  | {
5807
5752
  type: 'behavior event'
@@ -5838,9 +5783,6 @@ export declare const editorMachine: StateMachine<
5838
5783
  type: 'update maxBlocks'
5839
5784
  maxBlocks: number | undefined
5840
5785
  }
5841
- | {
5842
- type: 'ready'
5843
- }
5844
5786
  | PatchesEvent
5845
5787
  | {
5846
5788
  type: 'unset'
@@ -6103,7 +6045,7 @@ export declare const editorMachine: StateMachine<
6103
6045
  type: 'done normalizing'
6104
6046
  }
6105
6047
  | {
6106
- type: 'done syncing'
6048
+ type: 'done syncing initial value'
6107
6049
  }
6108
6050
  | {
6109
6051
  type: 'behavior event'
@@ -6140,9 +6082,6 @@ export declare const editorMachine: StateMachine<
6140
6082
  type: 'update maxBlocks'
6141
6083
  maxBlocks: number | undefined
6142
6084
  }
6143
- | {
6144
- type: 'ready'
6145
- }
6146
6085
  | PatchesEvent
6147
6086
  | {
6148
6087
  type: 'unset'
@@ -6399,7 +6338,7 @@ export declare const editorMachine: StateMachine<
6399
6338
  type: 'done normalizing'
6400
6339
  }
6401
6340
  | {
6402
- type: 'done syncing'
6341
+ type: 'done syncing initial value'
6403
6342
  }
6404
6343
  | {
6405
6344
  type: 'behavior event'
@@ -6436,9 +6375,6 @@ export declare const editorMachine: StateMachine<
6436
6375
  type: 'update maxBlocks'
6437
6376
  maxBlocks: number | undefined
6438
6377
  }
6439
- | {
6440
- type: 'ready'
6441
- }
6442
6378
  | PatchesEvent
6443
6379
  | {
6444
6380
  type: 'unset'
@@ -6704,7 +6640,7 @@ export declare const editorMachine: StateMachine<
6704
6640
  type: 'done normalizing'
6705
6641
  }
6706
6642
  | {
6707
- type: 'done syncing'
6643
+ type: 'done syncing initial value'
6708
6644
  }
6709
6645
  | {
6710
6646
  type: 'behavior event'
@@ -6741,9 +6677,6 @@ export declare const editorMachine: StateMachine<
6741
6677
  type: 'update maxBlocks'
6742
6678
  maxBlocks: number | undefined
6743
6679
  }
6744
- | {
6745
- type: 'ready'
6746
- }
6747
6680
  | PatchesEvent
6748
6681
  | {
6749
6682
  type: 'unset'
@@ -7000,7 +6933,7 @@ export declare const editorMachine: StateMachine<
7000
6933
  type: 'done normalizing'
7001
6934
  }
7002
6935
  | {
7003
- type: 'done syncing'
6936
+ type: 'done syncing initial value'
7004
6937
  }
7005
6938
  | {
7006
6939
  type: 'behavior event'
@@ -7037,9 +6970,6 @@ export declare const editorMachine: StateMachine<
7037
6970
  type: 'update maxBlocks'
7038
6971
  maxBlocks: number | undefined
7039
6972
  }
7040
- | {
7041
- type: 'ready'
7042
- }
7043
6973
  | PatchesEvent
7044
6974
  | {
7045
6975
  type: 'unset'
@@ -7312,7 +7242,7 @@ export declare const editorMachine: StateMachine<
7312
7242
  type: 'done normalizing'
7313
7243
  }
7314
7244
  | {
7315
- type: 'done syncing'
7245
+ type: 'done syncing initial value'
7316
7246
  }
7317
7247
  | {
7318
7248
  type: 'behavior event'
@@ -7349,9 +7279,6 @@ export declare const editorMachine: StateMachine<
7349
7279
  type: 'update maxBlocks'
7350
7280
  maxBlocks: number | undefined
7351
7281
  }
7352
- | {
7353
- type: 'ready'
7354
- }
7355
7282
  | PatchesEvent
7356
7283
  | {
7357
7284
  type: 'unset'
@@ -7609,7 +7536,7 @@ export declare const editorMachine: StateMachine<
7609
7536
  type: 'done normalizing'
7610
7537
  }
7611
7538
  | {
7612
- type: 'done syncing'
7539
+ type: 'done syncing initial value'
7613
7540
  }
7614
7541
  | {
7615
7542
  type: 'behavior event'
@@ -7646,9 +7573,6 @@ export declare const editorMachine: StateMachine<
7646
7573
  type: 'update maxBlocks'
7647
7574
  maxBlocks: number | undefined
7648
7575
  }
7649
- | {
7650
- type: 'ready'
7651
- }
7652
7576
  | PatchesEvent
7653
7577
  | {
7654
7578
  type: 'unset'
@@ -7906,7 +7830,7 @@ export declare const editorMachine: StateMachine<
7906
7830
  type: 'done normalizing'
7907
7831
  }
7908
7832
  | {
7909
- type: 'done syncing'
7833
+ type: 'done syncing initial value'
7910
7834
  }
7911
7835
  | {
7912
7836
  type: 'behavior event'
@@ -7943,9 +7867,6 @@ export declare const editorMachine: StateMachine<
7943
7867
  type: 'update maxBlocks'
7944
7868
  maxBlocks: number | undefined
7945
7869
  }
7946
- | {
7947
- type: 'ready'
7948
- }
7949
7870
  | PatchesEvent
7950
7871
  | {
7951
7872
  type: 'unset'
@@ -8125,7 +8046,7 @@ export declare const editorMachine: StateMachine<
8125
8046
  readonly 'mutation': {
8126
8047
  readonly actions: 'defer event'
8127
8048
  }
8128
- readonly 'done syncing': {
8049
+ readonly 'done syncing initial value': {
8129
8050
  readonly target: 'pristine'
8130
8051
  }
8131
8052
  }
@@ -8360,7 +8281,7 @@ export declare type InternalEditorEvent =
8360
8281
  type: 'done normalizing'
8361
8282
  }
8362
8283
  | {
8363
- type: 'done syncing'
8284
+ type: 'done syncing initial value'
8364
8285
  }
8365
8286
  | {
8366
8287
  type: 'behavior event'
@@ -8395,7 +8316,11 @@ export declare type InternalEditorEvent =
8395
8316
  type: 'update maxBlocks'
8396
8317
  maxBlocks: number | undefined
8397
8318
  }
8398
- | OmitFromUnion<InternalEditorEmittedEvent, 'type', 'read only' | 'editable'>
8319
+ | OmitFromUnion<
8320
+ InternalEditorEmittedEvent,
8321
+ 'type',
8322
+ 'ready' | 'read only' | 'editable'
8323
+ >
8399
8324
 
8400
8325
  /**
8401
8326
  * The editor has an invalid value