@portabletext/editor 1.48.9 → 1.48.10

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.
@@ -13397,6 +13397,7 @@ declare const editorMachine: StateMachine<
13397
13397
  getLegacySchema: () => PortableTextMemberSchemaTypes
13398
13398
  keyGenerator: () => string
13399
13399
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
13400
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
13400
13401
  schema: EditorSchema
13401
13402
  initialReadOnly: boolean
13402
13403
  maxBlocks: number | undefined
@@ -13410,6 +13411,7 @@ declare const editorMachine: StateMachine<
13410
13411
  },
13411
13412
  | InternalPatchEvent
13412
13413
  | MutationEvent
13414
+ | PatchesEvent
13413
13415
  | {
13414
13416
  type: 'add behavior'
13415
13417
  behavior: Behavior
@@ -13442,7 +13444,6 @@ declare const editorMachine: StateMachine<
13442
13444
  type: 'update maxBlocks'
13443
13445
  maxBlocks: number | undefined
13444
13446
  }
13445
- | PatchesEvent
13446
13447
  | {
13447
13448
  type: 'blur'
13448
13449
  editor: PortableTextSlateEditor
@@ -13458,7 +13459,10 @@ declare const editorMachine: StateMachine<
13458
13459
  type: 'done normalizing'
13459
13460
  }
13460
13461
  | {
13461
- type: 'done syncing initial value'
13462
+ type: 'done syncing value'
13463
+ }
13464
+ | {
13465
+ type: 'syncing value'
13462
13466
  }
13463
13467
  | {
13464
13468
  type: 'behavior event'
@@ -13586,6 +13590,18 @@ declare const editorMachine: StateMachine<
13586
13590
  type: 'clear pending events'
13587
13591
  params: NonReducibleUnknown
13588
13592
  }
13593
+ 'defer incoming patches': {
13594
+ type: 'defer incoming patches'
13595
+ params: NonReducibleUnknown
13596
+ }
13597
+ 'emit pending incoming patches': {
13598
+ type: 'emit pending incoming patches'
13599
+ params: NonReducibleUnknown
13600
+ }
13601
+ 'clear pending incoming patches': {
13602
+ type: 'clear pending incoming patches'
13603
+ params: NonReducibleUnknown
13604
+ }
13589
13605
  'handle blur': {
13590
13606
  type: 'handle blur'
13591
13607
  params: unknown
@@ -13619,9 +13635,15 @@ declare const editorMachine: StateMachine<
13619
13635
  }
13620
13636
  'setup':
13621
13637
  | 'setting up'
13622
- | 'dirty'
13623
13638
  | {
13624
- pristine: 'normalizing' | 'idle'
13639
+ 'set up': {
13640
+ 'value sync': 'syncing value' | 'idle'
13641
+ 'writing':
13642
+ | 'dirty'
13643
+ | {
13644
+ pristine: 'normalizing' | 'idle'
13645
+ }
13646
+ }
13625
13647
  }
13626
13648
  },
13627
13649
  'dragging internally',
@@ -13729,6 +13751,7 @@ declare const editorMachine: StateMachine<
13729
13751
  getLegacySchema: () => PortableTextMemberSchemaTypes
13730
13752
  keyGenerator: () => string
13731
13753
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
13754
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
13732
13755
  schema: EditorSchema
13733
13756
  initialReadOnly: boolean
13734
13757
  maxBlocks: number | undefined
@@ -13742,6 +13765,7 @@ declare const editorMachine: StateMachine<
13742
13765
  },
13743
13766
  | InternalPatchEvent
13744
13767
  | MutationEvent
13768
+ | PatchesEvent
13745
13769
  | {
13746
13770
  type: 'add behavior'
13747
13771
  behavior: Behavior
@@ -13774,7 +13798,6 @@ declare const editorMachine: StateMachine<
13774
13798
  type: 'update maxBlocks'
13775
13799
  maxBlocks: number | undefined
13776
13800
  }
13777
- | PatchesEvent
13778
13801
  | {
13779
13802
  type: 'blur'
13780
13803
  editor: PortableTextSlateEditor
@@ -13790,7 +13813,10 @@ declare const editorMachine: StateMachine<
13790
13813
  type: 'done normalizing'
13791
13814
  }
13792
13815
  | {
13793
- type: 'done syncing initial value'
13816
+ type: 'done syncing value'
13817
+ }
13818
+ | {
13819
+ type: 'syncing value'
13794
13820
  }
13795
13821
  | {
13796
13822
  type: 'behavior event'
@@ -13876,6 +13902,7 @@ declare const editorMachine: StateMachine<
13876
13902
  >,
13877
13903
  | InternalPatchEvent
13878
13904
  | MutationEvent
13905
+ | PatchesEvent
13879
13906
  | {
13880
13907
  type: 'add behavior'
13881
13908
  behavior: Behavior
@@ -13908,7 +13935,6 @@ declare const editorMachine: StateMachine<
13908
13935
  type: 'update maxBlocks'
13909
13936
  maxBlocks: number | undefined
13910
13937
  }
13911
- | PatchesEvent
13912
13938
  | {
13913
13939
  type: 'blur'
13914
13940
  editor: PortableTextSlateEditor
@@ -13924,7 +13950,10 @@ declare const editorMachine: StateMachine<
13924
13950
  type: 'done normalizing'
13925
13951
  }
13926
13952
  | {
13927
- type: 'done syncing initial value'
13953
+ type: 'done syncing value'
13954
+ }
13955
+ | {
13956
+ type: 'syncing value'
13928
13957
  }
13929
13958
  | {
13930
13959
  type: 'behavior event'
@@ -14009,6 +14038,7 @@ declare const editorMachine: StateMachine<
14009
14038
  getLegacySchema: () => PortableTextMemberSchemaTypes
14010
14039
  keyGenerator: () => string
14011
14040
  pendingEvents: never[]
14041
+ pendingIncomingPatchesEvents: never[]
14012
14042
  schema: EditorSchema
14013
14043
  selection: null
14014
14044
  initialReadOnly: boolean
@@ -14024,6 +14054,7 @@ declare const editorMachine: StateMachine<
14024
14054
  getLegacySchema: () => PortableTextMemberSchemaTypes
14025
14055
  keyGenerator: () => string
14026
14056
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
14057
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
14027
14058
  schema: EditorSchema
14028
14059
  initialReadOnly: boolean
14029
14060
  maxBlocks: number | undefined
@@ -14041,6 +14072,7 @@ declare const editorMachine: StateMachine<
14041
14072
  },
14042
14073
  | InternalPatchEvent
14043
14074
  | MutationEvent
14075
+ | PatchesEvent
14044
14076
  | {
14045
14077
  type: 'add behavior'
14046
14078
  behavior: Behavior
@@ -14073,7 +14105,6 @@ declare const editorMachine: StateMachine<
14073
14105
  type: 'update maxBlocks'
14074
14106
  maxBlocks: number | undefined
14075
14107
  }
14076
- | PatchesEvent
14077
14108
  | {
14078
14109
  type: 'blur'
14079
14110
  editor: PortableTextSlateEditor
@@ -14089,7 +14120,10 @@ declare const editorMachine: StateMachine<
14089
14120
  type: 'done normalizing'
14090
14121
  }
14091
14122
  | {
14092
- type: 'done syncing initial value'
14123
+ type: 'done syncing value'
14124
+ }
14125
+ | {
14126
+ type: 'syncing value'
14093
14127
  }
14094
14128
  | {
14095
14129
  type: 'behavior event'
@@ -14228,6 +14262,7 @@ declare const editorMachine: StateMachine<
14228
14262
  getLegacySchema: () => PortableTextMemberSchemaTypes
14229
14263
  keyGenerator: () => string
14230
14264
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
14265
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
14231
14266
  schema: EditorSchema
14232
14267
  initialReadOnly: boolean
14233
14268
  maxBlocks: number | undefined
@@ -14244,6 +14279,7 @@ declare const editorMachine: StateMachine<
14244
14279
  },
14245
14280
  | InternalPatchEvent
14246
14281
  | MutationEvent
14282
+ | PatchesEvent
14247
14283
  | {
14248
14284
  type: 'add behavior'
14249
14285
  behavior: Behavior
@@ -14276,7 +14312,6 @@ declare const editorMachine: StateMachine<
14276
14312
  type: 'update maxBlocks'
14277
14313
  maxBlocks: number | undefined
14278
14314
  }
14279
- | PatchesEvent
14280
14315
  | {
14281
14316
  type: 'blur'
14282
14317
  editor: PortableTextSlateEditor
@@ -14292,7 +14327,10 @@ declare const editorMachine: StateMachine<
14292
14327
  type: 'done normalizing'
14293
14328
  }
14294
14329
  | {
14295
- type: 'done syncing initial value'
14330
+ type: 'done syncing value'
14331
+ }
14332
+ | {
14333
+ type: 'syncing value'
14296
14334
  }
14297
14335
  | {
14298
14336
  type: 'behavior event'
@@ -14431,6 +14469,7 @@ declare const editorMachine: StateMachine<
14431
14469
  getLegacySchema: () => PortableTextMemberSchemaTypes
14432
14470
  keyGenerator: () => string
14433
14471
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
14472
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
14434
14473
  schema: EditorSchema
14435
14474
  initialReadOnly: boolean
14436
14475
  maxBlocks: number | undefined
@@ -14450,6 +14489,7 @@ declare const editorMachine: StateMachine<
14450
14489
  },
14451
14490
  | InternalPatchEvent
14452
14491
  | MutationEvent
14492
+ | PatchesEvent
14453
14493
  | {
14454
14494
  type: 'add behavior'
14455
14495
  behavior: Behavior
@@ -14482,7 +14522,6 @@ declare const editorMachine: StateMachine<
14482
14522
  type: 'update maxBlocks'
14483
14523
  maxBlocks: number | undefined
14484
14524
  }
14485
- | PatchesEvent
14486
14525
  | {
14487
14526
  type: 'blur'
14488
14527
  editor: PortableTextSlateEditor
@@ -14498,7 +14537,10 @@ declare const editorMachine: StateMachine<
14498
14537
  type: 'done normalizing'
14499
14538
  }
14500
14539
  | {
14501
- type: 'done syncing initial value'
14540
+ type: 'done syncing value'
14541
+ }
14542
+ | {
14543
+ type: 'syncing value'
14502
14544
  }
14503
14545
  | {
14504
14546
  type: 'behavior event'
@@ -14637,6 +14679,7 @@ declare const editorMachine: StateMachine<
14637
14679
  getLegacySchema: () => PortableTextMemberSchemaTypes
14638
14680
  keyGenerator: () => string
14639
14681
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
14682
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
14640
14683
  schema: EditorSchema
14641
14684
  initialReadOnly: boolean
14642
14685
  maxBlocks: number | undefined
@@ -14655,6 +14698,7 @@ declare const editorMachine: StateMachine<
14655
14698
  },
14656
14699
  | InternalPatchEvent
14657
14700
  | MutationEvent
14701
+ | PatchesEvent
14658
14702
  | {
14659
14703
  type: 'add behavior'
14660
14704
  behavior: Behavior
@@ -14687,7 +14731,6 @@ declare const editorMachine: StateMachine<
14687
14731
  type: 'update maxBlocks'
14688
14732
  maxBlocks: number | undefined
14689
14733
  }
14690
- | PatchesEvent
14691
14734
  | {
14692
14735
  type: 'blur'
14693
14736
  editor: PortableTextSlateEditor
@@ -14703,7 +14746,10 @@ declare const editorMachine: StateMachine<
14703
14746
  type: 'done normalizing'
14704
14747
  }
14705
14748
  | {
14706
- type: 'done syncing initial value'
14749
+ type: 'done syncing value'
14750
+ }
14751
+ | {
14752
+ type: 'syncing value'
14707
14753
  }
14708
14754
  | {
14709
14755
  type: 'behavior event'
@@ -14842,6 +14888,7 @@ declare const editorMachine: StateMachine<
14842
14888
  getLegacySchema: () => PortableTextMemberSchemaTypes
14843
14889
  keyGenerator: () => string
14844
14890
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
14891
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
14845
14892
  schema: EditorSchema
14846
14893
  initialReadOnly: boolean
14847
14894
  maxBlocks: number | undefined
@@ -14859,6 +14906,7 @@ declare const editorMachine: StateMachine<
14859
14906
  },
14860
14907
  | InternalPatchEvent
14861
14908
  | MutationEvent
14909
+ | PatchesEvent
14862
14910
  | {
14863
14911
  type: 'add behavior'
14864
14912
  behavior: Behavior
@@ -14891,7 +14939,6 @@ declare const editorMachine: StateMachine<
14891
14939
  type: 'update maxBlocks'
14892
14940
  maxBlocks: number | undefined
14893
14941
  }
14894
- | PatchesEvent
14895
14942
  | {
14896
14943
  type: 'blur'
14897
14944
  editor: PortableTextSlateEditor
@@ -14907,7 +14954,10 @@ declare const editorMachine: StateMachine<
14907
14954
  type: 'done normalizing'
14908
14955
  }
14909
14956
  | {
14910
- type: 'done syncing initial value'
14957
+ type: 'done syncing value'
14958
+ }
14959
+ | {
14960
+ type: 'syncing value'
14911
14961
  }
14912
14962
  | {
14913
14963
  type: 'behavior event'
@@ -15047,6 +15097,7 @@ declare const editorMachine: StateMachine<
15047
15097
  getLegacySchema: () => PortableTextMemberSchemaTypes
15048
15098
  keyGenerator: () => string
15049
15099
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
15100
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
15050
15101
  schema: EditorSchema
15051
15102
  initialReadOnly: boolean
15052
15103
  maxBlocks: number | undefined
@@ -15064,6 +15115,7 @@ declare const editorMachine: StateMachine<
15064
15115
  },
15065
15116
  | InternalPatchEvent
15066
15117
  | MutationEvent
15118
+ | PatchesEvent
15067
15119
  | {
15068
15120
  type: 'add behavior'
15069
15121
  behavior: Behavior
@@ -15096,7 +15148,6 @@ declare const editorMachine: StateMachine<
15096
15148
  type: 'update maxBlocks'
15097
15149
  maxBlocks: number | undefined
15098
15150
  }
15099
- | PatchesEvent
15100
15151
  | {
15101
15152
  type: 'blur'
15102
15153
  editor: PortableTextSlateEditor
@@ -15112,7 +15163,10 @@ declare const editorMachine: StateMachine<
15112
15163
  type: 'done normalizing'
15113
15164
  }
15114
15165
  | {
15115
- type: 'done syncing initial value'
15166
+ type: 'done syncing value'
15167
+ }
15168
+ | {
15169
+ type: 'syncing value'
15116
15170
  }
15117
15171
  | {
15118
15172
  type: 'behavior event'
@@ -15203,6 +15257,7 @@ declare const editorMachine: StateMachine<
15203
15257
  getLegacySchema: () => PortableTextMemberSchemaTypes
15204
15258
  keyGenerator: () => string
15205
15259
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
15260
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
15206
15261
  schema: EditorSchema
15207
15262
  initialReadOnly: boolean
15208
15263
  maxBlocks: number | undefined
@@ -15220,6 +15275,7 @@ declare const editorMachine: StateMachine<
15220
15275
  },
15221
15276
  | InternalPatchEvent
15222
15277
  | MutationEvent
15278
+ | PatchesEvent
15223
15279
  | {
15224
15280
  type: 'add behavior'
15225
15281
  behavior: Behavior
@@ -15252,7 +15308,6 @@ declare const editorMachine: StateMachine<
15252
15308
  type: 'update maxBlocks'
15253
15309
  maxBlocks: number | undefined
15254
15310
  }
15255
- | PatchesEvent
15256
15311
  | {
15257
15312
  type: 'blur'
15258
15313
  editor: PortableTextSlateEditor
@@ -15268,7 +15323,10 @@ declare const editorMachine: StateMachine<
15268
15323
  type: 'done normalizing'
15269
15324
  }
15270
15325
  | {
15271
- type: 'done syncing initial value'
15326
+ type: 'done syncing value'
15327
+ }
15328
+ | {
15329
+ type: 'syncing value'
15272
15330
  }
15273
15331
  | {
15274
15332
  type: 'behavior event'
@@ -15408,6 +15466,7 @@ declare const editorMachine: StateMachine<
15408
15466
  getLegacySchema: () => PortableTextMemberSchemaTypes
15409
15467
  keyGenerator: () => string
15410
15468
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
15469
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
15411
15470
  schema: EditorSchema
15412
15471
  initialReadOnly: boolean
15413
15472
  maxBlocks: number | undefined
@@ -15425,6 +15484,7 @@ declare const editorMachine: StateMachine<
15425
15484
  },
15426
15485
  | InternalPatchEvent
15427
15486
  | MutationEvent
15487
+ | PatchesEvent
15428
15488
  | {
15429
15489
  type: 'add behavior'
15430
15490
  behavior: Behavior
@@ -15457,7 +15517,6 @@ declare const editorMachine: StateMachine<
15457
15517
  type: 'update maxBlocks'
15458
15518
  maxBlocks: number | undefined
15459
15519
  }
15460
- | PatchesEvent
15461
15520
  | {
15462
15521
  type: 'blur'
15463
15522
  editor: PortableTextSlateEditor
@@ -15473,7 +15532,10 @@ declare const editorMachine: StateMachine<
15473
15532
  type: 'done normalizing'
15474
15533
  }
15475
15534
  | {
15476
- type: 'done syncing initial value'
15535
+ type: 'done syncing value'
15536
+ }
15537
+ | {
15538
+ type: 'syncing value'
15477
15539
  }
15478
15540
  | {
15479
15541
  type: 'behavior event'
@@ -15612,6 +15674,7 @@ declare const editorMachine: StateMachine<
15612
15674
  getLegacySchema: () => PortableTextMemberSchemaTypes
15613
15675
  keyGenerator: () => string
15614
15676
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
15677
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
15615
15678
  schema: EditorSchema
15616
15679
  initialReadOnly: boolean
15617
15680
  maxBlocks: number | undefined
@@ -15628,6 +15691,7 @@ declare const editorMachine: StateMachine<
15628
15691
  },
15629
15692
  | InternalPatchEvent
15630
15693
  | MutationEvent
15694
+ | PatchesEvent
15631
15695
  | {
15632
15696
  type: 'add behavior'
15633
15697
  behavior: Behavior
@@ -15660,7 +15724,6 @@ declare const editorMachine: StateMachine<
15660
15724
  type: 'update maxBlocks'
15661
15725
  maxBlocks: number | undefined
15662
15726
  }
15663
- | PatchesEvent
15664
15727
  | {
15665
15728
  type: 'blur'
15666
15729
  editor: PortableTextSlateEditor
@@ -15676,7 +15739,10 @@ declare const editorMachine: StateMachine<
15676
15739
  type: 'done normalizing'
15677
15740
  }
15678
15741
  | {
15679
- type: 'done syncing initial value'
15742
+ type: 'done syncing value'
15743
+ }
15744
+ | {
15745
+ type: 'syncing value'
15680
15746
  }
15681
15747
  | {
15682
15748
  type: 'behavior event'
@@ -15815,6 +15881,7 @@ declare const editorMachine: StateMachine<
15815
15881
  getLegacySchema: () => PortableTextMemberSchemaTypes
15816
15882
  keyGenerator: () => string
15817
15883
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
15884
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
15818
15885
  schema: EditorSchema
15819
15886
  initialReadOnly: boolean
15820
15887
  maxBlocks: number | undefined
@@ -15832,6 +15899,7 @@ declare const editorMachine: StateMachine<
15832
15899
  },
15833
15900
  | InternalPatchEvent
15834
15901
  | MutationEvent
15902
+ | PatchesEvent
15835
15903
  | {
15836
15904
  type: 'add behavior'
15837
15905
  behavior: Behavior
@@ -15864,7 +15932,6 @@ declare const editorMachine: StateMachine<
15864
15932
  type: 'update maxBlocks'
15865
15933
  maxBlocks: number | undefined
15866
15934
  }
15867
- | PatchesEvent
15868
15935
  | {
15869
15936
  type: 'blur'
15870
15937
  editor: PortableTextSlateEditor
@@ -15880,7 +15947,10 @@ declare const editorMachine: StateMachine<
15880
15947
  type: 'done normalizing'
15881
15948
  }
15882
15949
  | {
15883
- type: 'done syncing initial value'
15950
+ type: 'done syncing value'
15951
+ }
15952
+ | {
15953
+ type: 'syncing value'
15884
15954
  }
15885
15955
  | {
15886
15956
  type: 'behavior event'
@@ -16017,207 +16087,6 @@ declare const editorMachine: StateMachine<
16017
16087
  readonly 'remove behavior': {
16018
16088
  readonly actions: 'remove behavior from context'
16019
16089
  }
16020
- readonly 'patches': {
16021
- readonly actions: ActionFunction<
16022
- {
16023
- behaviors: Set<Behavior>
16024
- converters: Set<Converter>
16025
- getLegacySchema: () => PortableTextMemberSchemaTypes
16026
- keyGenerator: () => string
16027
- pendingEvents: Array<InternalPatchEvent | MutationEvent>
16028
- schema: EditorSchema
16029
- initialReadOnly: boolean
16030
- maxBlocks: number | undefined
16031
- selection: EditorSelection_2
16032
- incomingValue: Array<PortableTextBlock> | undefined
16033
- internalDrag?: {
16034
- ghost?: HTMLElement
16035
- origin: Pick<EventPosition_2, 'selection'>
16036
- }
16037
- slateEditor?: PortableTextSlateEditor
16038
- },
16039
- PatchesEvent,
16040
- | InternalPatchEvent
16041
- | MutationEvent
16042
- | {
16043
- type: 'add behavior'
16044
- behavior: Behavior
16045
- }
16046
- | {
16047
- type: 'remove behavior'
16048
- behavior: Behavior
16049
- }
16050
- | {
16051
- type: 'update readOnly'
16052
- readOnly: boolean
16053
- }
16054
- | {
16055
- type: 'update schema'
16056
- schema: EditorSchema
16057
- }
16058
- | {
16059
- type: 'update behaviors'
16060
- behaviors: Array<Behavior>
16061
- }
16062
- | {
16063
- type: 'update key generator'
16064
- keyGenerator: () => string
16065
- }
16066
- | {
16067
- type: 'update value'
16068
- value: Array<PortableTextBlock> | undefined
16069
- }
16070
- | {
16071
- type: 'update maxBlocks'
16072
- maxBlocks: number | undefined
16073
- }
16074
- | PatchesEvent
16075
- | {
16076
- type: 'blur'
16077
- editor: PortableTextSlateEditor
16078
- }
16079
- | {
16080
- type: 'focus'
16081
- editor: PortableTextSlateEditor
16082
- }
16083
- | {
16084
- type: 'normalizing'
16085
- }
16086
- | {
16087
- type: 'done normalizing'
16088
- }
16089
- | {
16090
- type: 'done syncing initial value'
16091
- }
16092
- | {
16093
- type: 'behavior event'
16094
- behaviorEvent: BehaviorEvent
16095
- editor: PortableTextSlateEditor
16096
- nativeEvent?: {
16097
- preventDefault: () => void
16098
- }
16099
- }
16100
- | {
16101
- type: 'notify.patch'
16102
- patch: Patch
16103
- }
16104
- | {
16105
- type: 'notify.mutation'
16106
- patches: Array<Patch>
16107
- snapshot: Array<PortableTextBlock> | undefined
16108
- value: Array<PortableTextBlock> | undefined
16109
- }
16110
- | {
16111
- type: 'notify.blurred'
16112
- event: FocusEvent_2<HTMLDivElement, Element>
16113
- }
16114
- | {
16115
- type: 'notify.done loading'
16116
- }
16117
- | {
16118
- type: 'notify.editable'
16119
- }
16120
- | {
16121
- type: 'notify.error'
16122
- name: string
16123
- description: string
16124
- data: unknown
16125
- }
16126
- | {
16127
- type: 'notify.focused'
16128
- event: FocusEvent_2<HTMLDivElement, Element>
16129
- }
16130
- | {
16131
- type: 'notify.invalid value'
16132
- resolution: InvalidValueResolution | null
16133
- value: Array<PortableTextBlock> | undefined
16134
- }
16135
- | {
16136
- type: 'notify.loading'
16137
- }
16138
- | {
16139
- type: 'notify.read only'
16140
- }
16141
- | {
16142
- type: 'notify.ready'
16143
- }
16144
- | {
16145
- type: 'notify.selection'
16146
- selection: EditorSelection_2
16147
- }
16148
- | {
16149
- type: 'notify.value changed'
16150
- value: Array<PortableTextBlock> | undefined
16151
- }
16152
- | {
16153
- type: 'notify.unset'
16154
- previousValue: Array<PortableTextBlock>
16155
- }
16156
- | {
16157
- type: 'dragstart'
16158
- origin: Pick<EventPosition_2, 'selection'>
16159
- ghost?: HTMLElement
16160
- }
16161
- | {
16162
- type: 'dragend'
16163
- }
16164
- | {
16165
- type: 'drop'
16166
- },
16167
- undefined,
16168
- never,
16169
- never,
16170
- never,
16171
- never,
16172
- | PatchEvent
16173
- | InternalPatchEvent
16174
- | MutationEvent
16175
- | PatchesEvent
16176
- | {
16177
- type: 'blurred'
16178
- event: FocusEvent_2<HTMLDivElement, Element>
16179
- }
16180
- | {
16181
- type: 'done loading'
16182
- }
16183
- | {
16184
- type: 'editable'
16185
- }
16186
- | {
16187
- type: 'error'
16188
- name: string
16189
- description: string
16190
- data: unknown
16191
- }
16192
- | {
16193
- type: 'focused'
16194
- event: FocusEvent_2<HTMLDivElement, Element>
16195
- }
16196
- | {
16197
- type: 'invalid value'
16198
- resolution: InvalidValueResolution | null
16199
- value: Array<PortableTextBlock> | undefined
16200
- }
16201
- | {
16202
- type: 'loading'
16203
- }
16204
- | {
16205
- type: 'read only'
16206
- }
16207
- | {
16208
- type: 'ready'
16209
- }
16210
- | {
16211
- type: 'selection'
16212
- selection: EditorSelection_2
16213
- }
16214
- | {
16215
- type: 'value changed'
16216
- value: Array<PortableTextBlock> | undefined
16217
- }
16218
- | UnsetEvent
16219
- >
16220
- }
16221
16090
  readonly 'update behaviors': {
16222
16091
  readonly actions: 'assign behaviors'
16223
16092
  }
@@ -16229,6 +16098,7 @@ declare const editorMachine: StateMachine<
16229
16098
  getLegacySchema: () => PortableTextMemberSchemaTypes
16230
16099
  keyGenerator: () => string
16231
16100
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16101
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16232
16102
  schema: EditorSchema
16233
16103
  initialReadOnly: boolean
16234
16104
  maxBlocks: number | undefined
@@ -16246,6 +16116,7 @@ declare const editorMachine: StateMachine<
16246
16116
  },
16247
16117
  | InternalPatchEvent
16248
16118
  | MutationEvent
16119
+ | PatchesEvent
16249
16120
  | {
16250
16121
  type: 'add behavior'
16251
16122
  behavior: Behavior
@@ -16278,7 +16149,6 @@ declare const editorMachine: StateMachine<
16278
16149
  type: 'update maxBlocks'
16279
16150
  maxBlocks: number | undefined
16280
16151
  }
16281
- | PatchesEvent
16282
16152
  | {
16283
16153
  type: 'blur'
16284
16154
  editor: PortableTextSlateEditor
@@ -16294,7 +16164,10 @@ declare const editorMachine: StateMachine<
16294
16164
  type: 'done normalizing'
16295
16165
  }
16296
16166
  | {
16297
- type: 'done syncing initial value'
16167
+ type: 'done syncing value'
16168
+ }
16169
+ | {
16170
+ type: 'syncing value'
16298
16171
  }
16299
16172
  | {
16300
16173
  type: 'behavior event'
@@ -16390,6 +16263,7 @@ declare const editorMachine: StateMachine<
16390
16263
  getLegacySchema: () => PortableTextMemberSchemaTypes
16391
16264
  keyGenerator: () => string
16392
16265
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16266
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16393
16267
  schema: EditorSchema
16394
16268
  initialReadOnly: boolean
16395
16269
  maxBlocks: number | undefined
@@ -16407,6 +16281,7 @@ declare const editorMachine: StateMachine<
16407
16281
  },
16408
16282
  | InternalPatchEvent
16409
16283
  | MutationEvent
16284
+ | PatchesEvent
16410
16285
  | {
16411
16286
  type: 'add behavior'
16412
16287
  behavior: Behavior
@@ -16439,7 +16314,6 @@ declare const editorMachine: StateMachine<
16439
16314
  type: 'update maxBlocks'
16440
16315
  maxBlocks: number | undefined
16441
16316
  }
16442
- | PatchesEvent
16443
16317
  | {
16444
16318
  type: 'blur'
16445
16319
  editor: PortableTextSlateEditor
@@ -16455,7 +16329,10 @@ declare const editorMachine: StateMachine<
16455
16329
  type: 'done normalizing'
16456
16330
  }
16457
16331
  | {
16458
- type: 'done syncing initial value'
16332
+ type: 'done syncing value'
16333
+ }
16334
+ | {
16335
+ type: 'syncing value'
16459
16336
  }
16460
16337
  | {
16461
16338
  type: 'behavior event'
@@ -16548,6 +16425,7 @@ declare const editorMachine: StateMachine<
16548
16425
  getLegacySchema: () => PortableTextMemberSchemaTypes
16549
16426
  keyGenerator: () => string
16550
16427
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16428
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16551
16429
  schema: EditorSchema
16552
16430
  initialReadOnly: boolean
16553
16431
  maxBlocks: number | undefined
@@ -16565,6 +16443,7 @@ declare const editorMachine: StateMachine<
16565
16443
  },
16566
16444
  | InternalPatchEvent
16567
16445
  | MutationEvent
16446
+ | PatchesEvent
16568
16447
  | {
16569
16448
  type: 'add behavior'
16570
16449
  behavior: Behavior
@@ -16597,7 +16476,6 @@ declare const editorMachine: StateMachine<
16597
16476
  type: 'update maxBlocks'
16598
16477
  maxBlocks: number | undefined
16599
16478
  }
16600
- | PatchesEvent
16601
16479
  | {
16602
16480
  type: 'blur'
16603
16481
  editor: PortableTextSlateEditor
@@ -16613,7 +16491,10 @@ declare const editorMachine: StateMachine<
16613
16491
  type: 'done normalizing'
16614
16492
  }
16615
16493
  | {
16616
- type: 'done syncing initial value'
16494
+ type: 'done syncing value'
16495
+ }
16496
+ | {
16497
+ type: 'syncing value'
16617
16498
  }
16618
16499
  | {
16619
16500
  type: 'behavior event'
@@ -16718,6 +16599,7 @@ declare const editorMachine: StateMachine<
16718
16599
  getLegacySchema: () => PortableTextMemberSchemaTypes
16719
16600
  keyGenerator: () => string
16720
16601
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16602
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16721
16603
  schema: EditorSchema
16722
16604
  initialReadOnly: boolean
16723
16605
  maxBlocks: number | undefined
@@ -16743,7 +16625,7 @@ declare const editorMachine: StateMachine<
16743
16625
  readonly states: {
16744
16626
  readonly 'determine initial edit mode': {
16745
16627
  readonly on: {
16746
- readonly 'done syncing initial value': readonly [
16628
+ readonly 'done syncing value': readonly [
16747
16629
  {
16748
16630
  readonly target: '#editor.edit mode.read only.read only'
16749
16631
  readonly guard: ({
@@ -16757,6 +16639,7 @@ declare const editorMachine: StateMachine<
16757
16639
  pendingEvents: Array<
16758
16640
  InternalPatchEvent | MutationEvent
16759
16641
  >
16642
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16760
16643
  schema: EditorSchema
16761
16644
  initialReadOnly: boolean
16762
16645
  maxBlocks: number | undefined
@@ -16769,7 +16652,7 @@ declare const editorMachine: StateMachine<
16769
16652
  slateEditor?: PortableTextSlateEditor
16770
16653
  },
16771
16654
  {
16772
- type: 'done syncing initial value'
16655
+ type: 'done syncing value'
16773
16656
  }
16774
16657
  >) => boolean
16775
16658
  },
@@ -16791,6 +16674,7 @@ declare const editorMachine: StateMachine<
16791
16674
  getLegacySchema: () => PortableTextMemberSchemaTypes
16792
16675
  keyGenerator: () => string
16793
16676
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16677
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16794
16678
  schema: EditorSchema
16795
16679
  initialReadOnly: boolean
16796
16680
  maxBlocks: number | undefined
@@ -16826,6 +16710,7 @@ declare const editorMachine: StateMachine<
16826
16710
  getLegacySchema: () => PortableTextMemberSchemaTypes
16827
16711
  keyGenerator: () => string
16828
16712
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16713
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16829
16714
  schema: EditorSchema
16830
16715
  initialReadOnly: boolean
16831
16716
  maxBlocks: number | undefined
@@ -16861,6 +16746,7 @@ declare const editorMachine: StateMachine<
16861
16746
  getLegacySchema: () => PortableTextMemberSchemaTypes
16862
16747
  keyGenerator: () => string
16863
16748
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
16749
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
16864
16750
  schema: EditorSchema
16865
16751
  initialReadOnly: boolean
16866
16752
  maxBlocks: number | undefined
@@ -16878,6 +16764,7 @@ declare const editorMachine: StateMachine<
16878
16764
  },
16879
16765
  | InternalPatchEvent
16880
16766
  | MutationEvent
16767
+ | PatchesEvent
16881
16768
  | {
16882
16769
  type: 'add behavior'
16883
16770
  behavior: Behavior
@@ -16910,7 +16797,6 @@ declare const editorMachine: StateMachine<
16910
16797
  type: 'update maxBlocks'
16911
16798
  maxBlocks: number | undefined
16912
16799
  }
16913
- | PatchesEvent
16914
16800
  | {
16915
16801
  type: 'blur'
16916
16802
  editor: PortableTextSlateEditor
@@ -16926,7 +16812,10 @@ declare const editorMachine: StateMachine<
16926
16812
  type: 'done normalizing'
16927
16813
  }
16928
16814
  | {
16929
- type: 'done syncing initial value'
16815
+ type: 'done syncing value'
16816
+ }
16817
+ | {
16818
+ type: 'syncing value'
16930
16819
  }
16931
16820
  | {
16932
16821
  type: 'behavior event'
@@ -17028,6 +16917,7 @@ declare const editorMachine: StateMachine<
17028
16917
  pendingEvents: Array<
17029
16918
  InternalPatchEvent | MutationEvent
17030
16919
  >
16920
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
17031
16921
  schema: EditorSchema
17032
16922
  initialReadOnly: boolean
17033
16923
  maxBlocks: number | undefined
@@ -17046,6 +16936,7 @@ declare const editorMachine: StateMachine<
17046
16936
  },
17047
16937
  | InternalPatchEvent
17048
16938
  | MutationEvent
16939
+ | PatchesEvent
17049
16940
  | {
17050
16941
  type: 'add behavior'
17051
16942
  behavior: Behavior
@@ -17078,7 +16969,6 @@ declare const editorMachine: StateMachine<
17078
16969
  type: 'update maxBlocks'
17079
16970
  maxBlocks: number | undefined
17080
16971
  }
17081
- | PatchesEvent
17082
16972
  | {
17083
16973
  type: 'blur'
17084
16974
  editor: PortableTextSlateEditor
@@ -17094,7 +16984,10 @@ declare const editorMachine: StateMachine<
17094
16984
  type: 'done normalizing'
17095
16985
  }
17096
16986
  | {
17097
- type: 'done syncing initial value'
16987
+ type: 'done syncing value'
16988
+ }
16989
+ | {
16990
+ type: 'syncing value'
17098
16991
  }
17099
16992
  | {
17100
16993
  type: 'behavior event'
@@ -17218,6 +17111,7 @@ declare const editorMachine: StateMachine<
17218
17111
  getLegacySchema: () => PortableTextMemberSchemaTypes
17219
17112
  keyGenerator: () => string
17220
17113
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
17114
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
17221
17115
  schema: EditorSchema
17222
17116
  initialReadOnly: boolean
17223
17117
  maxBlocks: number | undefined
@@ -17231,6 +17125,7 @@ declare const editorMachine: StateMachine<
17231
17125
  },
17232
17126
  | InternalPatchEvent
17233
17127
  | MutationEvent
17128
+ | PatchesEvent
17234
17129
  | {
17235
17130
  type: 'add behavior'
17236
17131
  behavior: Behavior
@@ -17263,7 +17158,6 @@ declare const editorMachine: StateMachine<
17263
17158
  type: 'update maxBlocks'
17264
17159
  maxBlocks: number | undefined
17265
17160
  }
17266
- | PatchesEvent
17267
17161
  | {
17268
17162
  type: 'blur'
17269
17163
  editor: PortableTextSlateEditor
@@ -17279,7 +17173,10 @@ declare const editorMachine: StateMachine<
17279
17173
  type: 'done normalizing'
17280
17174
  }
17281
17175
  | {
17282
- type: 'done syncing initial value'
17176
+ type: 'done syncing value'
17177
+ }
17178
+ | {
17179
+ type: 'syncing value'
17283
17180
  }
17284
17181
  | {
17285
17182
  type: 'behavior event'
@@ -17358,6 +17255,7 @@ declare const editorMachine: StateMachine<
17358
17255
  },
17359
17256
  | InternalPatchEvent
17360
17257
  | MutationEvent
17258
+ | PatchesEvent
17361
17259
  | {
17362
17260
  type: 'add behavior'
17363
17261
  behavior: Behavior
@@ -17390,7 +17288,6 @@ declare const editorMachine: StateMachine<
17390
17288
  type: 'update maxBlocks'
17391
17289
  maxBlocks: number | undefined
17392
17290
  }
17393
- | PatchesEvent
17394
17291
  | {
17395
17292
  type: 'blur'
17396
17293
  editor: PortableTextSlateEditor
@@ -17406,7 +17303,10 @@ declare const editorMachine: StateMachine<
17406
17303
  type: 'done normalizing'
17407
17304
  }
17408
17305
  | {
17409
- type: 'done syncing initial value'
17306
+ type: 'done syncing value'
17307
+ }
17308
+ | {
17309
+ type: 'syncing value'
17410
17310
  }
17411
17311
  | {
17412
17312
  type: 'behavior event'
@@ -17491,6 +17391,7 @@ declare const editorMachine: StateMachine<
17491
17391
  getLegacySchema: () => PortableTextMemberSchemaTypes
17492
17392
  keyGenerator: () => string
17493
17393
  pendingEvents: Array<InternalPatchEvent | MutationEvent>
17394
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
17494
17395
  schema: EditorSchema
17495
17396
  initialReadOnly: boolean
17496
17397
  maxBlocks: number | undefined
@@ -17504,6 +17405,7 @@ declare const editorMachine: StateMachine<
17504
17405
  },
17505
17406
  | InternalPatchEvent
17506
17407
  | MutationEvent
17408
+ | PatchesEvent
17507
17409
  | {
17508
17410
  type: 'add behavior'
17509
17411
  behavior: Behavior
@@ -17536,7 +17438,6 @@ declare const editorMachine: StateMachine<
17536
17438
  type: 'update maxBlocks'
17537
17439
  maxBlocks: number | undefined
17538
17440
  }
17539
- | PatchesEvent
17540
17441
  | {
17541
17442
  type: 'blur'
17542
17443
  editor: PortableTextSlateEditor
@@ -17552,7 +17453,10 @@ declare const editorMachine: StateMachine<
17552
17453
  type: 'done normalizing'
17553
17454
  }
17554
17455
  | {
17555
- type: 'done syncing initial value'
17456
+ type: 'done syncing value'
17457
+ }
17458
+ | {
17459
+ type: 'syncing value'
17556
17460
  }
17557
17461
  | {
17558
17462
  type: 'behavior event'
@@ -17631,6 +17535,7 @@ declare const editorMachine: StateMachine<
17631
17535
  },
17632
17536
  | InternalPatchEvent
17633
17537
  | MutationEvent
17538
+ | PatchesEvent
17634
17539
  | {
17635
17540
  type: 'add behavior'
17636
17541
  behavior: Behavior
@@ -17663,7 +17568,6 @@ declare const editorMachine: StateMachine<
17663
17568
  type: 'update maxBlocks'
17664
17569
  maxBlocks: number | undefined
17665
17570
  }
17666
- | PatchesEvent
17667
17571
  | {
17668
17572
  type: 'blur'
17669
17573
  editor: PortableTextSlateEditor
@@ -17679,7 +17583,10 @@ declare const editorMachine: StateMachine<
17679
17583
  type: 'done normalizing'
17680
17584
  }
17681
17585
  | {
17682
- type: 'done syncing initial value'
17586
+ type: 'done syncing value'
17587
+ }
17588
+ | {
17589
+ type: 'syncing value'
17683
17590
  }
17684
17591
  | {
17685
17592
  type: 'behavior event'
@@ -17782,7 +17689,11 @@ declare const editorMachine: StateMachine<
17782
17689
  readonly initial: 'setting up'
17783
17690
  readonly states: {
17784
17691
  readonly 'setting up': {
17785
- readonly exit: readonly ['emit ready']
17692
+ readonly exit: readonly [
17693
+ 'emit ready',
17694
+ 'emit pending incoming patches',
17695
+ 'clear pending incoming patches',
17696
+ ]
17786
17697
  readonly on: {
17787
17698
  readonly 'internal.patch': {
17788
17699
  readonly actions: 'defer event'
@@ -17790,58 +17701,308 @@ declare const editorMachine: StateMachine<
17790
17701
  readonly 'mutation': {
17791
17702
  readonly actions: 'defer event'
17792
17703
  }
17793
- readonly 'done syncing initial value': {
17794
- readonly target: 'pristine'
17704
+ readonly 'done syncing value': {
17705
+ readonly target: 'set up'
17706
+ }
17707
+ readonly 'patches': {
17708
+ readonly actions: readonly ['defer incoming patches']
17795
17709
  }
17796
17710
  }
17797
17711
  }
17798
- readonly 'pristine': {
17799
- readonly initial: 'idle'
17712
+ readonly 'set up': {
17713
+ readonly type: 'parallel'
17800
17714
  readonly states: {
17801
- readonly idle: {
17802
- readonly on: {
17803
- readonly 'normalizing': {
17804
- readonly target: 'normalizing'
17805
- }
17806
- readonly 'internal.patch': {
17807
- readonly actions: 'defer event'
17808
- readonly target: '#editor.setup.dirty'
17715
+ readonly 'value sync': {
17716
+ readonly initial: 'idle'
17717
+ readonly states: {
17718
+ readonly 'idle': {
17719
+ readonly on: {
17720
+ readonly 'patches': {
17721
+ readonly actions: readonly [
17722
+ ActionFunction<
17723
+ {
17724
+ behaviors: Set<Behavior>
17725
+ converters: Set<Converter>
17726
+ getLegacySchema: () => PortableTextMemberSchemaTypes
17727
+ keyGenerator: () => string
17728
+ pendingEvents: Array<
17729
+ InternalPatchEvent | MutationEvent
17730
+ >
17731
+ pendingIncomingPatchesEvents: Array<PatchesEvent>
17732
+ schema: EditorSchema
17733
+ initialReadOnly: boolean
17734
+ maxBlocks: number | undefined
17735
+ selection: EditorSelection_2
17736
+ incomingValue:
17737
+ | Array<PortableTextBlock>
17738
+ | undefined
17739
+ internalDrag?: {
17740
+ ghost?: HTMLElement
17741
+ origin: Pick<EventPosition_2, 'selection'>
17742
+ }
17743
+ slateEditor?: PortableTextSlateEditor
17744
+ },
17745
+ PatchesEvent,
17746
+ | InternalPatchEvent
17747
+ | MutationEvent
17748
+ | PatchesEvent
17749
+ | {
17750
+ type: 'add behavior'
17751
+ behavior: Behavior
17752
+ }
17753
+ | {
17754
+ type: 'remove behavior'
17755
+ behavior: Behavior
17756
+ }
17757
+ | {
17758
+ type: 'update readOnly'
17759
+ readOnly: boolean
17760
+ }
17761
+ | {
17762
+ type: 'update schema'
17763
+ schema: EditorSchema
17764
+ }
17765
+ | {
17766
+ type: 'update behaviors'
17767
+ behaviors: Array<Behavior>
17768
+ }
17769
+ | {
17770
+ type: 'update key generator'
17771
+ keyGenerator: () => string
17772
+ }
17773
+ | {
17774
+ type: 'update value'
17775
+ value: Array<PortableTextBlock> | undefined
17776
+ }
17777
+ | {
17778
+ type: 'update maxBlocks'
17779
+ maxBlocks: number | undefined
17780
+ }
17781
+ | {
17782
+ type: 'blur'
17783
+ editor: PortableTextSlateEditor
17784
+ }
17785
+ | {
17786
+ type: 'focus'
17787
+ editor: PortableTextSlateEditor
17788
+ }
17789
+ | {
17790
+ type: 'normalizing'
17791
+ }
17792
+ | {
17793
+ type: 'done normalizing'
17794
+ }
17795
+ | {
17796
+ type: 'done syncing value'
17797
+ }
17798
+ | {
17799
+ type: 'syncing value'
17800
+ }
17801
+ | {
17802
+ type: 'behavior event'
17803
+ behaviorEvent: BehaviorEvent
17804
+ editor: PortableTextSlateEditor
17805
+ nativeEvent?: {
17806
+ preventDefault: () => void
17807
+ }
17808
+ }
17809
+ | {
17810
+ type: 'notify.patch'
17811
+ patch: Patch
17812
+ }
17813
+ | {
17814
+ type: 'notify.mutation'
17815
+ patches: Array<Patch>
17816
+ snapshot: Array<PortableTextBlock> | undefined
17817
+ value: Array<PortableTextBlock> | undefined
17818
+ }
17819
+ | {
17820
+ type: 'notify.blurred'
17821
+ event: FocusEvent_2<HTMLDivElement, Element>
17822
+ }
17823
+ | {
17824
+ type: 'notify.done loading'
17825
+ }
17826
+ | {
17827
+ type: 'notify.editable'
17828
+ }
17829
+ | {
17830
+ type: 'notify.error'
17831
+ name: string
17832
+ description: string
17833
+ data: unknown
17834
+ }
17835
+ | {
17836
+ type: 'notify.focused'
17837
+ event: FocusEvent_2<HTMLDivElement, Element>
17838
+ }
17839
+ | {
17840
+ type: 'notify.invalid value'
17841
+ resolution: InvalidValueResolution | null
17842
+ value: Array<PortableTextBlock> | undefined
17843
+ }
17844
+ | {
17845
+ type: 'notify.loading'
17846
+ }
17847
+ | {
17848
+ type: 'notify.read only'
17849
+ }
17850
+ | {
17851
+ type: 'notify.ready'
17852
+ }
17853
+ | {
17854
+ type: 'notify.selection'
17855
+ selection: EditorSelection_2
17856
+ }
17857
+ | {
17858
+ type: 'notify.value changed'
17859
+ value: Array<PortableTextBlock> | undefined
17860
+ }
17861
+ | {
17862
+ type: 'notify.unset'
17863
+ previousValue: Array<PortableTextBlock>
17864
+ }
17865
+ | {
17866
+ type: 'dragstart'
17867
+ origin: Pick<EventPosition_2, 'selection'>
17868
+ ghost?: HTMLElement
17869
+ }
17870
+ | {
17871
+ type: 'dragend'
17872
+ }
17873
+ | {
17874
+ type: 'drop'
17875
+ },
17876
+ undefined,
17877
+ never,
17878
+ never,
17879
+ never,
17880
+ never,
17881
+ | PatchEvent
17882
+ | InternalPatchEvent
17883
+ | MutationEvent
17884
+ | PatchesEvent
17885
+ | {
17886
+ type: 'blurred'
17887
+ event: FocusEvent_2<HTMLDivElement, Element>
17888
+ }
17889
+ | {
17890
+ type: 'done loading'
17891
+ }
17892
+ | {
17893
+ type: 'editable'
17894
+ }
17895
+ | {
17896
+ type: 'error'
17897
+ name: string
17898
+ description: string
17899
+ data: unknown
17900
+ }
17901
+ | {
17902
+ type: 'focused'
17903
+ event: FocusEvent_2<HTMLDivElement, Element>
17904
+ }
17905
+ | {
17906
+ type: 'invalid value'
17907
+ resolution: InvalidValueResolution | null
17908
+ value: Array<PortableTextBlock> | undefined
17909
+ }
17910
+ | {
17911
+ type: 'loading'
17912
+ }
17913
+ | {
17914
+ type: 'read only'
17915
+ }
17916
+ | {
17917
+ type: 'ready'
17918
+ }
17919
+ | {
17920
+ type: 'selection'
17921
+ selection: EditorSelection_2
17922
+ }
17923
+ | {
17924
+ type: 'value changed'
17925
+ value: Array<PortableTextBlock> | undefined
17926
+ }
17927
+ | UnsetEvent
17928
+ >,
17929
+ ]
17930
+ }
17931
+ readonly 'syncing value': {
17932
+ readonly target: 'syncing value'
17933
+ }
17934
+ }
17809
17935
  }
17810
- readonly 'mutation': {
17811
- readonly actions: 'defer event'
17812
- readonly target: '#editor.setup.dirty'
17936
+ readonly 'syncing value': {
17937
+ readonly exit: readonly [
17938
+ 'emit pending incoming patches',
17939
+ 'clear pending incoming patches',
17940
+ ]
17941
+ readonly on: {
17942
+ readonly 'patches': {
17943
+ readonly actions: readonly ['defer incoming patches']
17944
+ }
17945
+ readonly 'done syncing value': {
17946
+ readonly target: 'idle'
17947
+ }
17948
+ }
17813
17949
  }
17814
17950
  }
17815
17951
  }
17816
- readonly normalizing: {
17817
- readonly on: {
17818
- readonly 'done normalizing': {
17819
- readonly target: 'idle'
17820
- }
17821
- readonly 'internal.patch': {
17822
- readonly actions: 'defer event'
17952
+ readonly 'writing': {
17953
+ readonly initial: 'pristine'
17954
+ readonly states: {
17955
+ readonly pristine: {
17956
+ readonly initial: 'idle'
17957
+ readonly states: {
17958
+ readonly idle: {
17959
+ readonly on: {
17960
+ readonly 'normalizing': {
17961
+ readonly target: 'normalizing'
17962
+ }
17963
+ readonly 'internal.patch': {
17964
+ readonly actions: 'defer event'
17965
+ readonly target: '#editor.setup.set up.writing.dirty'
17966
+ }
17967
+ readonly 'mutation': {
17968
+ readonly actions: 'defer event'
17969
+ readonly target: '#editor.setup.set up.writing.dirty'
17970
+ }
17971
+ }
17972
+ }
17973
+ readonly normalizing: {
17974
+ readonly on: {
17975
+ readonly 'done normalizing': {
17976
+ readonly target: 'idle'
17977
+ }
17978
+ readonly 'internal.patch': {
17979
+ readonly actions: 'defer event'
17980
+ }
17981
+ readonly 'mutation': {
17982
+ readonly actions: 'defer event'
17983
+ }
17984
+ }
17985
+ }
17986
+ }
17823
17987
  }
17824
- readonly 'mutation': {
17825
- readonly actions: 'defer event'
17988
+ readonly dirty: {
17989
+ readonly entry: readonly [
17990
+ 'emit pending events',
17991
+ 'clear pending events',
17992
+ ]
17993
+ readonly on: {
17994
+ readonly 'internal.patch': {
17995
+ readonly actions: 'emit patch event'
17996
+ }
17997
+ readonly 'mutation': {
17998
+ readonly actions: 'emit mutation event'
17999
+ }
18000
+ }
17826
18001
  }
17827
18002
  }
17828
18003
  }
17829
18004
  }
17830
18005
  }
17831
- readonly 'dirty': {
17832
- readonly entry: readonly [
17833
- 'emit pending events',
17834
- 'clear pending events',
17835
- ]
17836
- readonly on: {
17837
- readonly 'internal.patch': {
17838
- readonly actions: 'emit patch event'
17839
- }
17840
- readonly 'mutation': {
17841
- readonly actions: 'emit mutation event'
17842
- }
17843
- }
17844
- }
17845
18006
  }
17846
18007
  }
17847
18008
  }