@portabletext/editor 1.31.2 → 1.32.0
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/_chunks-cjs/behavior.core.cjs.map +1 -1
- package/lib/_chunks-cjs/plugin.event-listener.cjs +1425 -1349
- package/lib/_chunks-cjs/plugin.event-listener.cjs.map +1 -1
- package/lib/_chunks-es/behavior.core.js.map +1 -1
- package/lib/_chunks-es/plugin.event-listener.js +1424 -1348
- package/lib/_chunks-es/plugin.event-listener.js.map +1 -1
- package/lib/behaviors/index.d.cts +26 -0
- package/lib/behaviors/index.d.ts +26 -0
- package/lib/index.d.cts +1068 -66
- package/lib/index.d.ts +1068 -66
- package/lib/plugins/index.d.cts +1068 -66
- package/lib/plugins/index.d.ts +1068 -66
- package/package.json +1 -1
- package/src/behavior-actions/behavior.actions.ts +20 -0
- package/src/behaviors/behavior.types.ts +6 -0
- package/src/editor/editor-machine.ts +80 -85
- package/src/editor/plugins/create-with-event-listeners.ts +51 -0
- package/src/editor/plugins/createWithEditableAPI.ts +18 -2
- package/src/editor/plugins/createWithUndoRedo.ts +132 -107
- package/src/editor/with-applying-behavior-actions.ts +27 -3
package/lib/plugins/index.d.cts
CHANGED
|
@@ -481,6 +481,12 @@ declare const editorMachine: StateMachine<
|
|
|
481
481
|
| {
|
|
482
482
|
type: 'focus'
|
|
483
483
|
}
|
|
484
|
+
| {
|
|
485
|
+
type: 'history.redo'
|
|
486
|
+
}
|
|
487
|
+
| {
|
|
488
|
+
type: 'history.undo'
|
|
489
|
+
}
|
|
484
490
|
| {
|
|
485
491
|
type: 'insert.blocks'
|
|
486
492
|
blocks: Array<PortableTextBlock>
|
|
@@ -905,6 +911,12 @@ declare const editorMachine: StateMachine<
|
|
|
905
911
|
| {
|
|
906
912
|
type: 'focus'
|
|
907
913
|
}
|
|
914
|
+
| {
|
|
915
|
+
type: 'history.redo'
|
|
916
|
+
}
|
|
917
|
+
| {
|
|
918
|
+
type: 'history.undo'
|
|
919
|
+
}
|
|
908
920
|
| {
|
|
909
921
|
type: 'insert.blocks'
|
|
910
922
|
blocks: Array<PortableTextBlock>
|
|
@@ -1229,6 +1241,12 @@ declare const editorMachine: StateMachine<
|
|
|
1229
1241
|
| {
|
|
1230
1242
|
type: 'focus'
|
|
1231
1243
|
}
|
|
1244
|
+
| {
|
|
1245
|
+
type: 'history.redo'
|
|
1246
|
+
}
|
|
1247
|
+
| {
|
|
1248
|
+
type: 'history.undo'
|
|
1249
|
+
}
|
|
1232
1250
|
| {
|
|
1233
1251
|
type: 'insert.blocks'
|
|
1234
1252
|
blocks: Array<PortableTextBlock>
|
|
@@ -1578,6 +1596,12 @@ declare const editorMachine: StateMachine<
|
|
|
1578
1596
|
| {
|
|
1579
1597
|
type: 'focus'
|
|
1580
1598
|
}
|
|
1599
|
+
| {
|
|
1600
|
+
type: 'history.redo'
|
|
1601
|
+
}
|
|
1602
|
+
| {
|
|
1603
|
+
type: 'history.undo'
|
|
1604
|
+
}
|
|
1581
1605
|
| {
|
|
1582
1606
|
type: 'insert.blocks'
|
|
1583
1607
|
blocks: Array<PortableTextBlock>
|
|
@@ -1870,6 +1894,8 @@ declare const editorMachine: StateMachine<
|
|
|
1870
1894
|
| 'delete.block'
|
|
1871
1895
|
| 'delete.forward'
|
|
1872
1896
|
| 'delete.text'
|
|
1897
|
+
| 'history.redo'
|
|
1898
|
+
| 'history.undo'
|
|
1873
1899
|
| 'insert.blocks'
|
|
1874
1900
|
| 'insert.block object'
|
|
1875
1901
|
| 'insert.inline object'
|
|
@@ -1924,6 +1950,8 @@ declare const editorMachine: StateMachine<
|
|
|
1924
1950
|
| 'delete.block'
|
|
1925
1951
|
| 'delete.forward'
|
|
1926
1952
|
| 'delete.text'
|
|
1953
|
+
| 'history.redo'
|
|
1954
|
+
| 'history.undo'
|
|
1927
1955
|
| 'insert.blocks'
|
|
1928
1956
|
| 'insert.block object'
|
|
1929
1957
|
| 'insert.inline object'
|
|
@@ -2059,6 +2087,12 @@ declare const editorMachine: StateMachine<
|
|
|
2059
2087
|
| {
|
|
2060
2088
|
type: 'focus'
|
|
2061
2089
|
}
|
|
2090
|
+
| {
|
|
2091
|
+
type: 'history.redo'
|
|
2092
|
+
}
|
|
2093
|
+
| {
|
|
2094
|
+
type: 'history.undo'
|
|
2095
|
+
}
|
|
2062
2096
|
| {
|
|
2063
2097
|
type: 'insert.blocks'
|
|
2064
2098
|
blocks: Array<PortableTextBlock>
|
|
@@ -2406,6 +2440,12 @@ declare const editorMachine: StateMachine<
|
|
|
2406
2440
|
| {
|
|
2407
2441
|
type: 'focus'
|
|
2408
2442
|
}
|
|
2443
|
+
| {
|
|
2444
|
+
type: 'history.redo'
|
|
2445
|
+
}
|
|
2446
|
+
| {
|
|
2447
|
+
type: 'history.undo'
|
|
2448
|
+
}
|
|
2409
2449
|
| {
|
|
2410
2450
|
type: 'insert.blocks'
|
|
2411
2451
|
blocks: Array<PortableTextBlock>
|
|
@@ -2698,6 +2738,12 @@ declare const editorMachine: StateMachine<
|
|
|
2698
2738
|
| {
|
|
2699
2739
|
type: 'focus'
|
|
2700
2740
|
}
|
|
2741
|
+
| {
|
|
2742
|
+
type: 'history.redo'
|
|
2743
|
+
}
|
|
2744
|
+
| {
|
|
2745
|
+
type: 'history.undo'
|
|
2746
|
+
}
|
|
2701
2747
|
| {
|
|
2702
2748
|
type: 'insert.blocks'
|
|
2703
2749
|
blocks: Array<PortableTextBlock>
|
|
@@ -3045,6 +3091,12 @@ declare const editorMachine: StateMachine<
|
|
|
3045
3091
|
| {
|
|
3046
3092
|
type: 'focus'
|
|
3047
3093
|
}
|
|
3094
|
+
| {
|
|
3095
|
+
type: 'history.redo'
|
|
3096
|
+
}
|
|
3097
|
+
| {
|
|
3098
|
+
type: 'history.undo'
|
|
3099
|
+
}
|
|
3048
3100
|
| {
|
|
3049
3101
|
type: 'insert.blocks'
|
|
3050
3102
|
blocks: Array<PortableTextBlock>
|
|
@@ -3340,6 +3392,12 @@ declare const editorMachine: StateMachine<
|
|
|
3340
3392
|
| {
|
|
3341
3393
|
type: 'focus'
|
|
3342
3394
|
}
|
|
3395
|
+
| {
|
|
3396
|
+
type: 'history.redo'
|
|
3397
|
+
}
|
|
3398
|
+
| {
|
|
3399
|
+
type: 'history.undo'
|
|
3400
|
+
}
|
|
3343
3401
|
| {
|
|
3344
3402
|
type: 'insert.blocks'
|
|
3345
3403
|
blocks: Array<PortableTextBlock>
|
|
@@ -3687,6 +3745,12 @@ declare const editorMachine: StateMachine<
|
|
|
3687
3745
|
| {
|
|
3688
3746
|
type: 'focus'
|
|
3689
3747
|
}
|
|
3748
|
+
| {
|
|
3749
|
+
type: 'history.redo'
|
|
3750
|
+
}
|
|
3751
|
+
| {
|
|
3752
|
+
type: 'history.undo'
|
|
3753
|
+
}
|
|
3690
3754
|
| {
|
|
3691
3755
|
type: 'insert.blocks'
|
|
3692
3756
|
blocks: Array<PortableTextBlock>
|
|
@@ -3981,6 +4045,12 @@ declare const editorMachine: StateMachine<
|
|
|
3981
4045
|
| {
|
|
3982
4046
|
type: 'focus'
|
|
3983
4047
|
}
|
|
4048
|
+
| {
|
|
4049
|
+
type: 'history.redo'
|
|
4050
|
+
}
|
|
4051
|
+
| {
|
|
4052
|
+
type: 'history.undo'
|
|
4053
|
+
}
|
|
3984
4054
|
| {
|
|
3985
4055
|
type: 'insert.blocks'
|
|
3986
4056
|
blocks: Array<PortableTextBlock>
|
|
@@ -4328,6 +4398,12 @@ declare const editorMachine: StateMachine<
|
|
|
4328
4398
|
| {
|
|
4329
4399
|
type: 'focus'
|
|
4330
4400
|
}
|
|
4401
|
+
| {
|
|
4402
|
+
type: 'history.redo'
|
|
4403
|
+
}
|
|
4404
|
+
| {
|
|
4405
|
+
type: 'history.undo'
|
|
4406
|
+
}
|
|
4331
4407
|
| {
|
|
4332
4408
|
type: 'insert.blocks'
|
|
4333
4409
|
blocks: Array<PortableTextBlock>
|
|
@@ -4621,6 +4697,12 @@ declare const editorMachine: StateMachine<
|
|
|
4621
4697
|
| {
|
|
4622
4698
|
type: 'focus'
|
|
4623
4699
|
}
|
|
4700
|
+
| {
|
|
4701
|
+
type: 'history.redo'
|
|
4702
|
+
}
|
|
4703
|
+
| {
|
|
4704
|
+
type: 'history.undo'
|
|
4705
|
+
}
|
|
4624
4706
|
| {
|
|
4625
4707
|
type: 'insert.blocks'
|
|
4626
4708
|
blocks: Array<PortableTextBlock>
|
|
@@ -4968,6 +5050,12 @@ declare const editorMachine: StateMachine<
|
|
|
4968
5050
|
| {
|
|
4969
5051
|
type: 'focus'
|
|
4970
5052
|
}
|
|
5053
|
+
| {
|
|
5054
|
+
type: 'history.redo'
|
|
5055
|
+
}
|
|
5056
|
+
| {
|
|
5057
|
+
type: 'history.undo'
|
|
5058
|
+
}
|
|
4971
5059
|
| {
|
|
4972
5060
|
type: 'insert.blocks'
|
|
4973
5061
|
blocks: Array<PortableTextBlock>
|
|
@@ -5262,6 +5350,12 @@ declare const editorMachine: StateMachine<
|
|
|
5262
5350
|
| {
|
|
5263
5351
|
type: 'focus'
|
|
5264
5352
|
}
|
|
5353
|
+
| {
|
|
5354
|
+
type: 'history.redo'
|
|
5355
|
+
}
|
|
5356
|
+
| {
|
|
5357
|
+
type: 'history.undo'
|
|
5358
|
+
}
|
|
5265
5359
|
| {
|
|
5266
5360
|
type: 'insert.blocks'
|
|
5267
5361
|
blocks: Array<PortableTextBlock>
|
|
@@ -5627,6 +5721,12 @@ declare const editorMachine: StateMachine<
|
|
|
5627
5721
|
| {
|
|
5628
5722
|
type: 'focus'
|
|
5629
5723
|
}
|
|
5724
|
+
| {
|
|
5725
|
+
type: 'history.redo'
|
|
5726
|
+
}
|
|
5727
|
+
| {
|
|
5728
|
+
type: 'history.undo'
|
|
5729
|
+
}
|
|
5630
5730
|
| {
|
|
5631
5731
|
type: 'insert.blocks'
|
|
5632
5732
|
blocks: Array<PortableTextBlock>
|
|
@@ -5974,6 +6074,12 @@ declare const editorMachine: StateMachine<
|
|
|
5974
6074
|
| {
|
|
5975
6075
|
type: 'focus'
|
|
5976
6076
|
}
|
|
6077
|
+
| {
|
|
6078
|
+
type: 'history.redo'
|
|
6079
|
+
}
|
|
6080
|
+
| {
|
|
6081
|
+
type: 'history.undo'
|
|
6082
|
+
}
|
|
5977
6083
|
| {
|
|
5978
6084
|
type: 'insert.blocks'
|
|
5979
6085
|
blocks: Array<PortableTextBlock>
|
|
@@ -6268,6 +6374,12 @@ declare const editorMachine: StateMachine<
|
|
|
6268
6374
|
| {
|
|
6269
6375
|
type: 'focus'
|
|
6270
6376
|
}
|
|
6377
|
+
| {
|
|
6378
|
+
type: 'history.redo'
|
|
6379
|
+
}
|
|
6380
|
+
| {
|
|
6381
|
+
type: 'history.undo'
|
|
6382
|
+
}
|
|
6271
6383
|
| {
|
|
6272
6384
|
type: 'insert.blocks'
|
|
6273
6385
|
blocks: Array<PortableTextBlock>
|
|
@@ -6615,6 +6727,12 @@ declare const editorMachine: StateMachine<
|
|
|
6615
6727
|
| {
|
|
6616
6728
|
type: 'focus'
|
|
6617
6729
|
}
|
|
6730
|
+
| {
|
|
6731
|
+
type: 'history.redo'
|
|
6732
|
+
}
|
|
6733
|
+
| {
|
|
6734
|
+
type: 'history.undo'
|
|
6735
|
+
}
|
|
6618
6736
|
| {
|
|
6619
6737
|
type: 'insert.blocks'
|
|
6620
6738
|
blocks: Array<PortableTextBlock>
|
|
@@ -6907,6 +7025,12 @@ declare const editorMachine: StateMachine<
|
|
|
6907
7025
|
| {
|
|
6908
7026
|
type: 'focus'
|
|
6909
7027
|
}
|
|
7028
|
+
| {
|
|
7029
|
+
type: 'history.redo'
|
|
7030
|
+
}
|
|
7031
|
+
| {
|
|
7032
|
+
type: 'history.undo'
|
|
7033
|
+
}
|
|
6910
7034
|
| {
|
|
6911
7035
|
type: 'insert.blocks'
|
|
6912
7036
|
blocks: Array<PortableTextBlock>
|
|
@@ -7254,6 +7378,12 @@ declare const editorMachine: StateMachine<
|
|
|
7254
7378
|
| {
|
|
7255
7379
|
type: 'focus'
|
|
7256
7380
|
}
|
|
7381
|
+
| {
|
|
7382
|
+
type: 'history.redo'
|
|
7383
|
+
}
|
|
7384
|
+
| {
|
|
7385
|
+
type: 'history.undo'
|
|
7386
|
+
}
|
|
7257
7387
|
| {
|
|
7258
7388
|
type: 'insert.blocks'
|
|
7259
7389
|
blocks: Array<PortableTextBlock>
|
|
@@ -7547,6 +7677,12 @@ declare const editorMachine: StateMachine<
|
|
|
7547
7677
|
| {
|
|
7548
7678
|
type: 'focus'
|
|
7549
7679
|
}
|
|
7680
|
+
| {
|
|
7681
|
+
type: 'history.redo'
|
|
7682
|
+
}
|
|
7683
|
+
| {
|
|
7684
|
+
type: 'history.undo'
|
|
7685
|
+
}
|
|
7550
7686
|
| {
|
|
7551
7687
|
type: 'insert.blocks'
|
|
7552
7688
|
blocks: Array<PortableTextBlock>
|
|
@@ -7894,6 +8030,12 @@ declare const editorMachine: StateMachine<
|
|
|
7894
8030
|
| {
|
|
7895
8031
|
type: 'focus'
|
|
7896
8032
|
}
|
|
8033
|
+
| {
|
|
8034
|
+
type: 'history.redo'
|
|
8035
|
+
}
|
|
8036
|
+
| {
|
|
8037
|
+
type: 'history.undo'
|
|
8038
|
+
}
|
|
7897
8039
|
| {
|
|
7898
8040
|
type: 'insert.blocks'
|
|
7899
8041
|
blocks: Array<PortableTextBlock>
|
|
@@ -8190,6 +8332,12 @@ declare const editorMachine: StateMachine<
|
|
|
8190
8332
|
| {
|
|
8191
8333
|
type: 'focus'
|
|
8192
8334
|
}
|
|
8335
|
+
| {
|
|
8336
|
+
type: 'history.redo'
|
|
8337
|
+
}
|
|
8338
|
+
| {
|
|
8339
|
+
type: 'history.undo'
|
|
8340
|
+
}
|
|
8193
8341
|
| {
|
|
8194
8342
|
type: 'insert.blocks'
|
|
8195
8343
|
blocks: Array<PortableTextBlock>
|
|
@@ -8537,6 +8685,12 @@ declare const editorMachine: StateMachine<
|
|
|
8537
8685
|
| {
|
|
8538
8686
|
type: 'focus'
|
|
8539
8687
|
}
|
|
8688
|
+
| {
|
|
8689
|
+
type: 'history.redo'
|
|
8690
|
+
}
|
|
8691
|
+
| {
|
|
8692
|
+
type: 'history.undo'
|
|
8693
|
+
}
|
|
8540
8694
|
| {
|
|
8541
8695
|
type: 'insert.blocks'
|
|
8542
8696
|
blocks: Array<PortableTextBlock>
|
|
@@ -8833,6 +8987,12 @@ declare const editorMachine: StateMachine<
|
|
|
8833
8987
|
| {
|
|
8834
8988
|
type: 'focus'
|
|
8835
8989
|
}
|
|
8990
|
+
| {
|
|
8991
|
+
type: 'history.redo'
|
|
8992
|
+
}
|
|
8993
|
+
| {
|
|
8994
|
+
type: 'history.undo'
|
|
8995
|
+
}
|
|
8836
8996
|
| {
|
|
8837
8997
|
type: 'insert.blocks'
|
|
8838
8998
|
blocks: Array<PortableTextBlock>
|
|
@@ -9203,6 +9363,12 @@ declare const editorMachine: StateMachine<
|
|
|
9203
9363
|
| {
|
|
9204
9364
|
type: 'focus'
|
|
9205
9365
|
}
|
|
9366
|
+
| {
|
|
9367
|
+
type: 'history.redo'
|
|
9368
|
+
}
|
|
9369
|
+
| {
|
|
9370
|
+
type: 'history.undo'
|
|
9371
|
+
}
|
|
9206
9372
|
| {
|
|
9207
9373
|
type: 'insert.blocks'
|
|
9208
9374
|
blocks: Array<PortableTextBlock>
|
|
@@ -9570,6 +9736,12 @@ declare const editorMachine: StateMachine<
|
|
|
9570
9736
|
| {
|
|
9571
9737
|
type: 'focus'
|
|
9572
9738
|
}
|
|
9739
|
+
| {
|
|
9740
|
+
type: 'history.redo'
|
|
9741
|
+
}
|
|
9742
|
+
| {
|
|
9743
|
+
type: 'history.undo'
|
|
9744
|
+
}
|
|
9573
9745
|
| {
|
|
9574
9746
|
type: 'insert.blocks'
|
|
9575
9747
|
blocks: Array<PortableTextBlock>
|
|
@@ -10085,6 +10257,12 @@ declare const editorMachine: StateMachine<
|
|
|
10085
10257
|
| {
|
|
10086
10258
|
type: 'focus'
|
|
10087
10259
|
}
|
|
10260
|
+
| {
|
|
10261
|
+
type: 'history.redo'
|
|
10262
|
+
}
|
|
10263
|
+
| {
|
|
10264
|
+
type: 'history.undo'
|
|
10265
|
+
}
|
|
10088
10266
|
| {
|
|
10089
10267
|
type: 'insert.blocks'
|
|
10090
10268
|
blocks: Array<PortableTextBlock>
|
|
@@ -10434,6 +10612,12 @@ declare const editorMachine: StateMachine<
|
|
|
10434
10612
|
| {
|
|
10435
10613
|
type: 'focus'
|
|
10436
10614
|
}
|
|
10615
|
+
| {
|
|
10616
|
+
type: 'history.redo'
|
|
10617
|
+
}
|
|
10618
|
+
| {
|
|
10619
|
+
type: 'history.undo'
|
|
10620
|
+
}
|
|
10437
10621
|
| {
|
|
10438
10622
|
type: 'insert.blocks'
|
|
10439
10623
|
blocks: Array<PortableTextBlock>
|
|
@@ -10733,6 +10917,12 @@ declare const editorMachine: StateMachine<
|
|
|
10733
10917
|
| {
|
|
10734
10918
|
type: 'focus'
|
|
10735
10919
|
}
|
|
10920
|
+
| {
|
|
10921
|
+
type: 'history.redo'
|
|
10922
|
+
}
|
|
10923
|
+
| {
|
|
10924
|
+
type: 'history.undo'
|
|
10925
|
+
}
|
|
10736
10926
|
| {
|
|
10737
10927
|
type: 'insert.blocks'
|
|
10738
10928
|
blocks: Array<PortableTextBlock>
|
|
@@ -11082,6 +11272,12 @@ declare const editorMachine: StateMachine<
|
|
|
11082
11272
|
| {
|
|
11083
11273
|
type: 'focus'
|
|
11084
11274
|
}
|
|
11275
|
+
| {
|
|
11276
|
+
type: 'history.redo'
|
|
11277
|
+
}
|
|
11278
|
+
| {
|
|
11279
|
+
type: 'history.undo'
|
|
11280
|
+
}
|
|
11085
11281
|
| {
|
|
11086
11282
|
type: 'insert.blocks'
|
|
11087
11283
|
blocks: Array<PortableTextBlock>
|
|
@@ -11374,6 +11570,12 @@ declare const editorMachine: StateMachine<
|
|
|
11374
11570
|
| {
|
|
11375
11571
|
type: 'focus'
|
|
11376
11572
|
}
|
|
11573
|
+
| {
|
|
11574
|
+
type: 'history.redo'
|
|
11575
|
+
}
|
|
11576
|
+
| {
|
|
11577
|
+
type: 'history.undo'
|
|
11578
|
+
}
|
|
11377
11579
|
| {
|
|
11378
11580
|
type: 'insert.blocks'
|
|
11379
11581
|
blocks: Array<PortableTextBlock>
|
|
@@ -11723,6 +11925,12 @@ declare const editorMachine: StateMachine<
|
|
|
11723
11925
|
| {
|
|
11724
11926
|
type: 'focus'
|
|
11725
11927
|
}
|
|
11928
|
+
| {
|
|
11929
|
+
type: 'history.redo'
|
|
11930
|
+
}
|
|
11931
|
+
| {
|
|
11932
|
+
type: 'history.undo'
|
|
11933
|
+
}
|
|
11726
11934
|
| {
|
|
11727
11935
|
type: 'insert.blocks'
|
|
11728
11936
|
blocks: Array<PortableTextBlock>
|
|
@@ -12015,6 +12223,12 @@ declare const editorMachine: StateMachine<
|
|
|
12015
12223
|
| {
|
|
12016
12224
|
type: 'focus'
|
|
12017
12225
|
}
|
|
12226
|
+
| {
|
|
12227
|
+
type: 'history.redo'
|
|
12228
|
+
}
|
|
12229
|
+
| {
|
|
12230
|
+
type: 'history.undo'
|
|
12231
|
+
}
|
|
12018
12232
|
| {
|
|
12019
12233
|
type: 'insert.blocks'
|
|
12020
12234
|
blocks: Array<PortableTextBlock>
|
|
@@ -12364,6 +12578,12 @@ declare const editorMachine: StateMachine<
|
|
|
12364
12578
|
| {
|
|
12365
12579
|
type: 'focus'
|
|
12366
12580
|
}
|
|
12581
|
+
| {
|
|
12582
|
+
type: 'history.redo'
|
|
12583
|
+
}
|
|
12584
|
+
| {
|
|
12585
|
+
type: 'history.undo'
|
|
12586
|
+
}
|
|
12367
12587
|
| {
|
|
12368
12588
|
type: 'insert.blocks'
|
|
12369
12589
|
blocks: Array<PortableTextBlock>
|
|
@@ -12665,6 +12885,12 @@ declare const editorMachine: StateMachine<
|
|
|
12665
12885
|
| {
|
|
12666
12886
|
type: 'focus'
|
|
12667
12887
|
}
|
|
12888
|
+
| {
|
|
12889
|
+
type: 'history.redo'
|
|
12890
|
+
}
|
|
12891
|
+
| {
|
|
12892
|
+
type: 'history.undo'
|
|
12893
|
+
}
|
|
12668
12894
|
| {
|
|
12669
12895
|
type: 'insert.blocks'
|
|
12670
12896
|
blocks: Array<PortableTextBlock>
|
|
@@ -13014,6 +13240,12 @@ declare const editorMachine: StateMachine<
|
|
|
13014
13240
|
| {
|
|
13015
13241
|
type: 'focus'
|
|
13016
13242
|
}
|
|
13243
|
+
| {
|
|
13244
|
+
type: 'history.redo'
|
|
13245
|
+
}
|
|
13246
|
+
| {
|
|
13247
|
+
type: 'history.undo'
|
|
13248
|
+
}
|
|
13017
13249
|
| {
|
|
13018
13250
|
type: 'insert.blocks'
|
|
13019
13251
|
blocks: Array<PortableTextBlock>
|
|
@@ -13320,6 +13552,12 @@ declare const editorMachine: StateMachine<
|
|
|
13320
13552
|
| {
|
|
13321
13553
|
type: 'focus'
|
|
13322
13554
|
}
|
|
13555
|
+
| {
|
|
13556
|
+
type: 'history.redo'
|
|
13557
|
+
}
|
|
13558
|
+
| {
|
|
13559
|
+
type: 'history.undo'
|
|
13560
|
+
}
|
|
13323
13561
|
| {
|
|
13324
13562
|
type: 'insert.blocks'
|
|
13325
13563
|
blocks: Array<PortableTextBlock>
|
|
@@ -13669,6 +13907,12 @@ declare const editorMachine: StateMachine<
|
|
|
13669
13907
|
| {
|
|
13670
13908
|
type: 'focus'
|
|
13671
13909
|
}
|
|
13910
|
+
| {
|
|
13911
|
+
type: 'history.redo'
|
|
13912
|
+
}
|
|
13913
|
+
| {
|
|
13914
|
+
type: 'history.undo'
|
|
13915
|
+
}
|
|
13672
13916
|
| {
|
|
13673
13917
|
type: 'insert.blocks'
|
|
13674
13918
|
blocks: Array<PortableTextBlock>
|
|
@@ -13961,6 +14205,12 @@ declare const editorMachine: StateMachine<
|
|
|
13961
14205
|
| {
|
|
13962
14206
|
type: 'focus'
|
|
13963
14207
|
}
|
|
14208
|
+
| {
|
|
14209
|
+
type: 'history.redo'
|
|
14210
|
+
}
|
|
14211
|
+
| {
|
|
14212
|
+
type: 'history.undo'
|
|
14213
|
+
}
|
|
13964
14214
|
| {
|
|
13965
14215
|
type: 'insert.blocks'
|
|
13966
14216
|
blocks: Array<PortableTextBlock>
|
|
@@ -14310,6 +14560,12 @@ declare const editorMachine: StateMachine<
|
|
|
14310
14560
|
| {
|
|
14311
14561
|
type: 'focus'
|
|
14312
14562
|
}
|
|
14563
|
+
| {
|
|
14564
|
+
type: 'history.redo'
|
|
14565
|
+
}
|
|
14566
|
+
| {
|
|
14567
|
+
type: 'history.undo'
|
|
14568
|
+
}
|
|
14313
14569
|
| {
|
|
14314
14570
|
type: 'insert.blocks'
|
|
14315
14571
|
blocks: Array<PortableTextBlock>
|
|
@@ -14507,7 +14763,7 @@ declare const editorMachine: StateMachine<
|
|
|
14507
14763
|
}
|
|
14508
14764
|
>
|
|
14509
14765
|
}
|
|
14510
|
-
readonly '
|
|
14766
|
+
readonly 'history.*': {
|
|
14511
14767
|
readonly actions: ActionFunction<
|
|
14512
14768
|
{
|
|
14513
14769
|
behaviors: Set<Behavior>
|
|
@@ -14521,61 +14777,10 @@ declare const editorMachine: StateMachine<
|
|
|
14521
14777
|
value: Array<PortableTextBlock> | undefined
|
|
14522
14778
|
},
|
|
14523
14779
|
| {
|
|
14524
|
-
type: '
|
|
14525
|
-
blocks: Array<PortableTextBlock>
|
|
14526
|
-
}
|
|
14527
|
-
| {
|
|
14528
|
-
type: 'insert.block object'
|
|
14529
|
-
placement: 'auto' | 'after' | 'before'
|
|
14530
|
-
blockObject: {
|
|
14531
|
-
name: string
|
|
14532
|
-
value?: {
|
|
14533
|
-
[prop: string]: unknown
|
|
14534
|
-
}
|
|
14535
|
-
}
|
|
14536
|
-
}
|
|
14537
|
-
| {
|
|
14538
|
-
type: 'insert.inline object'
|
|
14539
|
-
inlineObject: {
|
|
14540
|
-
name: string
|
|
14541
|
-
value?: {
|
|
14542
|
-
[prop: string]: unknown
|
|
14543
|
-
}
|
|
14544
|
-
}
|
|
14545
|
-
}
|
|
14546
|
-
| {
|
|
14547
|
-
type: 'insert.break'
|
|
14548
|
-
}
|
|
14549
|
-
| {
|
|
14550
|
-
type: 'insert.soft break'
|
|
14551
|
-
}
|
|
14552
|
-
| {
|
|
14553
|
-
type: 'insert.block'
|
|
14554
|
-
block: PortableTextBlock
|
|
14555
|
-
placement: 'auto' | 'after' | 'before'
|
|
14556
|
-
}
|
|
14557
|
-
| {
|
|
14558
|
-
type: 'insert.span'
|
|
14559
|
-
text: string
|
|
14560
|
-
annotations?: Array<{
|
|
14561
|
-
name: string
|
|
14562
|
-
value: {
|
|
14563
|
-
[prop: string]: unknown
|
|
14564
|
-
}
|
|
14565
|
-
}>
|
|
14566
|
-
decorators?: Array<string>
|
|
14567
|
-
}
|
|
14568
|
-
| {
|
|
14569
|
-
type: 'insert.text'
|
|
14570
|
-
text: string
|
|
14571
|
-
options?: TextInsertTextOptions
|
|
14780
|
+
type: 'history.redo'
|
|
14572
14781
|
}
|
|
14573
14782
|
| {
|
|
14574
|
-
type: '
|
|
14575
|
-
placement: 'auto' | 'after' | 'before'
|
|
14576
|
-
textBlock?: {
|
|
14577
|
-
children?: PortableTextTextBlock['children']
|
|
14578
|
-
}
|
|
14783
|
+
type: 'history.undo'
|
|
14579
14784
|
},
|
|
14580
14785
|
| {
|
|
14581
14786
|
type: 'annotation.add'
|
|
@@ -14656,6 +14861,12 @@ declare const editorMachine: StateMachine<
|
|
|
14656
14861
|
| {
|
|
14657
14862
|
type: 'focus'
|
|
14658
14863
|
}
|
|
14864
|
+
| {
|
|
14865
|
+
type: 'history.redo'
|
|
14866
|
+
}
|
|
14867
|
+
| {
|
|
14868
|
+
type: 'history.undo'
|
|
14869
|
+
}
|
|
14659
14870
|
| {
|
|
14660
14871
|
type: 'insert.blocks'
|
|
14661
14872
|
blocks: Array<PortableTextBlock>
|
|
@@ -15005,6 +15216,12 @@ declare const editorMachine: StateMachine<
|
|
|
15005
15216
|
| {
|
|
15006
15217
|
type: 'focus'
|
|
15007
15218
|
}
|
|
15219
|
+
| {
|
|
15220
|
+
type: 'history.redo'
|
|
15221
|
+
}
|
|
15222
|
+
| {
|
|
15223
|
+
type: 'history.undo'
|
|
15224
|
+
}
|
|
15008
15225
|
| {
|
|
15009
15226
|
type: 'insert.blocks'
|
|
15010
15227
|
blocks: Array<PortableTextBlock>
|
|
@@ -15202,7 +15419,7 @@ declare const editorMachine: StateMachine<
|
|
|
15202
15419
|
}
|
|
15203
15420
|
>
|
|
15204
15421
|
}
|
|
15205
|
-
readonly '
|
|
15422
|
+
readonly 'insert.*': {
|
|
15206
15423
|
readonly actions: ActionFunction<
|
|
15207
15424
|
{
|
|
15208
15425
|
behaviors: Set<Behavior>
|
|
@@ -15216,22 +15433,729 @@ declare const editorMachine: StateMachine<
|
|
|
15216
15433
|
value: Array<PortableTextBlock> | undefined
|
|
15217
15434
|
},
|
|
15218
15435
|
| {
|
|
15219
|
-
type: '
|
|
15220
|
-
|
|
15436
|
+
type: 'insert.blocks'
|
|
15437
|
+
blocks: Array<PortableTextBlock>
|
|
15221
15438
|
}
|
|
15222
15439
|
| {
|
|
15223
|
-
type: '
|
|
15224
|
-
|
|
15440
|
+
type: 'insert.block object'
|
|
15441
|
+
placement: 'auto' | 'after' | 'before'
|
|
15442
|
+
blockObject: {
|
|
15443
|
+
name: string
|
|
15444
|
+
value?: {
|
|
15445
|
+
[prop: string]: unknown
|
|
15446
|
+
}
|
|
15447
|
+
}
|
|
15225
15448
|
}
|
|
15226
15449
|
| {
|
|
15227
|
-
type: '
|
|
15228
|
-
|
|
15229
|
-
},
|
|
15230
|
-
| {
|
|
15231
|
-
type: 'annotation.add'
|
|
15232
|
-
annotation: {
|
|
15450
|
+
type: 'insert.inline object'
|
|
15451
|
+
inlineObject: {
|
|
15233
15452
|
name: string
|
|
15234
|
-
value
|
|
15453
|
+
value?: {
|
|
15454
|
+
[prop: string]: unknown
|
|
15455
|
+
}
|
|
15456
|
+
}
|
|
15457
|
+
}
|
|
15458
|
+
| {
|
|
15459
|
+
type: 'insert.break'
|
|
15460
|
+
}
|
|
15461
|
+
| {
|
|
15462
|
+
type: 'insert.soft break'
|
|
15463
|
+
}
|
|
15464
|
+
| {
|
|
15465
|
+
type: 'insert.block'
|
|
15466
|
+
block: PortableTextBlock
|
|
15467
|
+
placement: 'auto' | 'after' | 'before'
|
|
15468
|
+
}
|
|
15469
|
+
| {
|
|
15470
|
+
type: 'insert.span'
|
|
15471
|
+
text: string
|
|
15472
|
+
annotations?: Array<{
|
|
15473
|
+
name: string
|
|
15474
|
+
value: {
|
|
15475
|
+
[prop: string]: unknown
|
|
15476
|
+
}
|
|
15477
|
+
}>
|
|
15478
|
+
decorators?: Array<string>
|
|
15479
|
+
}
|
|
15480
|
+
| {
|
|
15481
|
+
type: 'insert.text'
|
|
15482
|
+
text: string
|
|
15483
|
+
options?: TextInsertTextOptions
|
|
15484
|
+
}
|
|
15485
|
+
| {
|
|
15486
|
+
type: 'insert.text block'
|
|
15487
|
+
placement: 'auto' | 'after' | 'before'
|
|
15488
|
+
textBlock?: {
|
|
15489
|
+
children?: PortableTextTextBlock['children']
|
|
15490
|
+
}
|
|
15491
|
+
},
|
|
15492
|
+
| {
|
|
15493
|
+
type: 'annotation.add'
|
|
15494
|
+
annotation: {
|
|
15495
|
+
name: string
|
|
15496
|
+
value: {
|
|
15497
|
+
[prop: string]: unknown
|
|
15498
|
+
}
|
|
15499
|
+
}
|
|
15500
|
+
}
|
|
15501
|
+
| {
|
|
15502
|
+
type: 'annotation.remove'
|
|
15503
|
+
annotation: {
|
|
15504
|
+
name: string
|
|
15505
|
+
}
|
|
15506
|
+
}
|
|
15507
|
+
| {
|
|
15508
|
+
type: 'annotation.toggle'
|
|
15509
|
+
annotation: {
|
|
15510
|
+
name: string
|
|
15511
|
+
value: {
|
|
15512
|
+
[prop: string]: unknown
|
|
15513
|
+
}
|
|
15514
|
+
}
|
|
15515
|
+
}
|
|
15516
|
+
| {
|
|
15517
|
+
[props: string]: unknown
|
|
15518
|
+
type: 'block.set'
|
|
15519
|
+
at: [KeyedSegment]
|
|
15520
|
+
}
|
|
15521
|
+
| {
|
|
15522
|
+
type: 'block.unset'
|
|
15523
|
+
at: [KeyedSegment]
|
|
15524
|
+
props: Array<string>
|
|
15525
|
+
}
|
|
15526
|
+
| {
|
|
15527
|
+
type: 'blur'
|
|
15528
|
+
}
|
|
15529
|
+
| {
|
|
15530
|
+
type: 'data transfer.set'
|
|
15531
|
+
data: string
|
|
15532
|
+
dataTransfer: DataTransfer
|
|
15533
|
+
mimeType: MIMEType_2
|
|
15534
|
+
}
|
|
15535
|
+
| {
|
|
15536
|
+
type: 'decorator.add'
|
|
15537
|
+
decorator: string
|
|
15538
|
+
}
|
|
15539
|
+
| {
|
|
15540
|
+
type: 'decorator.remove'
|
|
15541
|
+
decorator: string
|
|
15542
|
+
}
|
|
15543
|
+
| {
|
|
15544
|
+
type: 'decorator.toggle'
|
|
15545
|
+
decorator: string
|
|
15546
|
+
}
|
|
15547
|
+
| {
|
|
15548
|
+
type: 'delete'
|
|
15549
|
+
selection: NonNullable<EditorSelection>
|
|
15550
|
+
}
|
|
15551
|
+
| {
|
|
15552
|
+
type: 'delete.backward'
|
|
15553
|
+
unit: TextUnit
|
|
15554
|
+
}
|
|
15555
|
+
| {
|
|
15556
|
+
type: 'delete.block'
|
|
15557
|
+
blockPath: [KeyedSegment]
|
|
15558
|
+
}
|
|
15559
|
+
| {
|
|
15560
|
+
type: 'delete.forward'
|
|
15561
|
+
unit: TextUnit
|
|
15562
|
+
}
|
|
15563
|
+
| {
|
|
15564
|
+
type: 'delete.text'
|
|
15565
|
+
anchor: BlockOffset_2
|
|
15566
|
+
focus: BlockOffset_2
|
|
15567
|
+
}
|
|
15568
|
+
| {
|
|
15569
|
+
type: 'focus'
|
|
15570
|
+
}
|
|
15571
|
+
| {
|
|
15572
|
+
type: 'history.redo'
|
|
15573
|
+
}
|
|
15574
|
+
| {
|
|
15575
|
+
type: 'history.undo'
|
|
15576
|
+
}
|
|
15577
|
+
| {
|
|
15578
|
+
type: 'insert.blocks'
|
|
15579
|
+
blocks: Array<PortableTextBlock>
|
|
15580
|
+
}
|
|
15581
|
+
| {
|
|
15582
|
+
type: 'insert.block object'
|
|
15583
|
+
placement: 'auto' | 'after' | 'before'
|
|
15584
|
+
blockObject: {
|
|
15585
|
+
name: string
|
|
15586
|
+
value?: {
|
|
15587
|
+
[prop: string]: unknown
|
|
15588
|
+
}
|
|
15589
|
+
}
|
|
15590
|
+
}
|
|
15591
|
+
| {
|
|
15592
|
+
type: 'insert.inline object'
|
|
15593
|
+
inlineObject: {
|
|
15594
|
+
name: string
|
|
15595
|
+
value?: {
|
|
15596
|
+
[prop: string]: unknown
|
|
15597
|
+
}
|
|
15598
|
+
}
|
|
15599
|
+
}
|
|
15600
|
+
| {
|
|
15601
|
+
type: 'insert.break'
|
|
15602
|
+
}
|
|
15603
|
+
| {
|
|
15604
|
+
type: 'insert.soft break'
|
|
15605
|
+
}
|
|
15606
|
+
| {
|
|
15607
|
+
type: 'insert.block'
|
|
15608
|
+
block: PortableTextBlock
|
|
15609
|
+
placement: 'auto' | 'after' | 'before'
|
|
15610
|
+
}
|
|
15611
|
+
| {
|
|
15612
|
+
type: 'insert.span'
|
|
15613
|
+
text: string
|
|
15614
|
+
annotations?: Array<{
|
|
15615
|
+
name: string
|
|
15616
|
+
value: {
|
|
15617
|
+
[prop: string]: unknown
|
|
15618
|
+
}
|
|
15619
|
+
}>
|
|
15620
|
+
decorators?: Array<string>
|
|
15621
|
+
}
|
|
15622
|
+
| {
|
|
15623
|
+
type: 'insert.text'
|
|
15624
|
+
text: string
|
|
15625
|
+
options?: TextInsertTextOptions
|
|
15626
|
+
}
|
|
15627
|
+
| {
|
|
15628
|
+
type: 'insert.text block'
|
|
15629
|
+
placement: 'auto' | 'after' | 'before'
|
|
15630
|
+
textBlock?: {
|
|
15631
|
+
children?: PortableTextTextBlock['children']
|
|
15632
|
+
}
|
|
15633
|
+
}
|
|
15634
|
+
| {
|
|
15635
|
+
type: 'list item.add'
|
|
15636
|
+
listItem: string
|
|
15637
|
+
}
|
|
15638
|
+
| {
|
|
15639
|
+
type: 'list item.remove'
|
|
15640
|
+
listItem: string
|
|
15641
|
+
}
|
|
15642
|
+
| {
|
|
15643
|
+
type: 'list item.toggle'
|
|
15644
|
+
listItem: string
|
|
15645
|
+
}
|
|
15646
|
+
| {
|
|
15647
|
+
type: 'move.block'
|
|
15648
|
+
at: [KeyedSegment]
|
|
15649
|
+
to: [KeyedSegment]
|
|
15650
|
+
}
|
|
15651
|
+
| {
|
|
15652
|
+
type: 'move.block down'
|
|
15653
|
+
at: [KeyedSegment]
|
|
15654
|
+
}
|
|
15655
|
+
| {
|
|
15656
|
+
type: 'move.block up'
|
|
15657
|
+
at: [KeyedSegment]
|
|
15658
|
+
}
|
|
15659
|
+
| {
|
|
15660
|
+
type: 'select'
|
|
15661
|
+
selection: EditorSelection
|
|
15662
|
+
}
|
|
15663
|
+
| {
|
|
15664
|
+
type: 'select.previous block'
|
|
15665
|
+
}
|
|
15666
|
+
| {
|
|
15667
|
+
type: 'select.next block'
|
|
15668
|
+
}
|
|
15669
|
+
| {
|
|
15670
|
+
type: 'style.add'
|
|
15671
|
+
style: string
|
|
15672
|
+
}
|
|
15673
|
+
| {
|
|
15674
|
+
type: 'style.remove'
|
|
15675
|
+
style: string
|
|
15676
|
+
}
|
|
15677
|
+
| {
|
|
15678
|
+
type: 'style.toggle'
|
|
15679
|
+
style: string
|
|
15680
|
+
}
|
|
15681
|
+
| {
|
|
15682
|
+
type: 'text block.set'
|
|
15683
|
+
at: [KeyedSegment]
|
|
15684
|
+
level?: number
|
|
15685
|
+
listItem?: string
|
|
15686
|
+
style?: string
|
|
15687
|
+
}
|
|
15688
|
+
| {
|
|
15689
|
+
type: 'text block.unset'
|
|
15690
|
+
at: [KeyedSegment]
|
|
15691
|
+
props: Array<'level' | 'listItem' | 'style'>
|
|
15692
|
+
}
|
|
15693
|
+
| ({
|
|
15694
|
+
type: 'serialization.failure'
|
|
15695
|
+
mimeType: `${string}/${string}`
|
|
15696
|
+
reason: string
|
|
15697
|
+
} & {
|
|
15698
|
+
dataTransfer: DataTransfer
|
|
15699
|
+
})
|
|
15700
|
+
| ({
|
|
15701
|
+
type: 'serialization.success'
|
|
15702
|
+
data: string
|
|
15703
|
+
mimeType: `${string}/${string}`
|
|
15704
|
+
originEvent: 'copy' | 'cut' | 'unknown'
|
|
15705
|
+
} & {
|
|
15706
|
+
dataTransfer: DataTransfer
|
|
15707
|
+
})
|
|
15708
|
+
| ({
|
|
15709
|
+
type: 'deserialization.failure'
|
|
15710
|
+
mimeType: `${string}/${string}`
|
|
15711
|
+
reason: string
|
|
15712
|
+
} & {
|
|
15713
|
+
dataTransfer: DataTransfer
|
|
15714
|
+
})
|
|
15715
|
+
| ({
|
|
15716
|
+
type: 'deserialization.success'
|
|
15717
|
+
data: Array<PortableTextBlock>
|
|
15718
|
+
mimeType: `${string}/${string}`
|
|
15719
|
+
} & {
|
|
15720
|
+
dataTransfer: DataTransfer
|
|
15721
|
+
})
|
|
15722
|
+
| PatchEvent
|
|
15723
|
+
| MutationEvent
|
|
15724
|
+
| {
|
|
15725
|
+
type: 'normalizing'
|
|
15726
|
+
}
|
|
15727
|
+
| {
|
|
15728
|
+
type: 'done normalizing'
|
|
15729
|
+
}
|
|
15730
|
+
| {
|
|
15731
|
+
type: 'done syncing initial value'
|
|
15732
|
+
}
|
|
15733
|
+
| {
|
|
15734
|
+
type: 'behavior event'
|
|
15735
|
+
behaviorEvent:
|
|
15736
|
+
| SyntheticBehaviorEvent
|
|
15737
|
+
| NativeBehaviorEvent
|
|
15738
|
+
editor: PortableTextSlateEditor
|
|
15739
|
+
defaultActionCallback?: () => void
|
|
15740
|
+
nativeEvent?: {
|
|
15741
|
+
preventDefault: () => void
|
|
15742
|
+
}
|
|
15743
|
+
}
|
|
15744
|
+
| {
|
|
15745
|
+
type: 'custom behavior event'
|
|
15746
|
+
behaviorEvent: CustomBehaviorEvent
|
|
15747
|
+
editor: PortableTextSlateEditor
|
|
15748
|
+
nativeEvent?: {
|
|
15749
|
+
preventDefault: () => void
|
|
15750
|
+
}
|
|
15751
|
+
}
|
|
15752
|
+
| CustomBehaviorEvent
|
|
15753
|
+
| {
|
|
15754
|
+
type: 'add behavior'
|
|
15755
|
+
behavior: Behavior
|
|
15756
|
+
}
|
|
15757
|
+
| {
|
|
15758
|
+
type: 'remove behavior'
|
|
15759
|
+
behavior: Behavior
|
|
15760
|
+
}
|
|
15761
|
+
| {
|
|
15762
|
+
type: 'update readOnly'
|
|
15763
|
+
readOnly: boolean
|
|
15764
|
+
}
|
|
15765
|
+
| {
|
|
15766
|
+
type: 'update schema'
|
|
15767
|
+
schema: EditorSchema
|
|
15768
|
+
}
|
|
15769
|
+
| {
|
|
15770
|
+
type: 'update behaviors'
|
|
15771
|
+
behaviors: Array<Behavior>
|
|
15772
|
+
}
|
|
15773
|
+
| {
|
|
15774
|
+
type: 'update key generator'
|
|
15775
|
+
keyGenerator: () => string
|
|
15776
|
+
}
|
|
15777
|
+
| {
|
|
15778
|
+
type: 'update value'
|
|
15779
|
+
value: Array<PortableTextBlock> | undefined
|
|
15780
|
+
}
|
|
15781
|
+
| {
|
|
15782
|
+
type: 'update maxBlocks'
|
|
15783
|
+
maxBlocks: number | undefined
|
|
15784
|
+
}
|
|
15785
|
+
| PatchesEvent
|
|
15786
|
+
| {
|
|
15787
|
+
type: 'notify.patch'
|
|
15788
|
+
patch: Patch
|
|
15789
|
+
}
|
|
15790
|
+
| {
|
|
15791
|
+
type: 'notify.mutation'
|
|
15792
|
+
patches: Array<Patch>
|
|
15793
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
15794
|
+
value: Array<PortableTextBlock> | undefined
|
|
15795
|
+
}
|
|
15796
|
+
| {
|
|
15797
|
+
type: 'notify.blurred'
|
|
15798
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
15799
|
+
}
|
|
15800
|
+
| {
|
|
15801
|
+
type: 'notify.done loading'
|
|
15802
|
+
}
|
|
15803
|
+
| {
|
|
15804
|
+
type: 'notify.editable'
|
|
15805
|
+
}
|
|
15806
|
+
| {
|
|
15807
|
+
type: 'notify.error'
|
|
15808
|
+
name: string
|
|
15809
|
+
description: string
|
|
15810
|
+
data: unknown
|
|
15811
|
+
}
|
|
15812
|
+
| {
|
|
15813
|
+
type: 'notify.focused'
|
|
15814
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
15815
|
+
}
|
|
15816
|
+
| {
|
|
15817
|
+
type: 'notify.invalid value'
|
|
15818
|
+
resolution: InvalidValueResolution | null
|
|
15819
|
+
value: Array<PortableTextBlock> | undefined
|
|
15820
|
+
}
|
|
15821
|
+
| {
|
|
15822
|
+
type: 'notify.loading'
|
|
15823
|
+
}
|
|
15824
|
+
| {
|
|
15825
|
+
type: 'notify.read only'
|
|
15826
|
+
}
|
|
15827
|
+
| {
|
|
15828
|
+
type: 'notify.ready'
|
|
15829
|
+
}
|
|
15830
|
+
| {
|
|
15831
|
+
type: 'notify.selection'
|
|
15832
|
+
selection: EditorSelection
|
|
15833
|
+
}
|
|
15834
|
+
| {
|
|
15835
|
+
type: 'notify.value changed'
|
|
15836
|
+
value: Array<PortableTextBlock> | undefined
|
|
15837
|
+
}
|
|
15838
|
+
| {
|
|
15839
|
+
type: 'notify.unset'
|
|
15840
|
+
previousValue: Array<PortableTextBlock>
|
|
15841
|
+
},
|
|
15842
|
+
undefined,
|
|
15843
|
+
never,
|
|
15844
|
+
never,
|
|
15845
|
+
never,
|
|
15846
|
+
never,
|
|
15847
|
+
| {
|
|
15848
|
+
type: 'annotation.add'
|
|
15849
|
+
annotation: {
|
|
15850
|
+
name: string
|
|
15851
|
+
value: {
|
|
15852
|
+
[prop: string]: unknown
|
|
15853
|
+
}
|
|
15854
|
+
}
|
|
15855
|
+
}
|
|
15856
|
+
| {
|
|
15857
|
+
type: 'annotation.remove'
|
|
15858
|
+
annotation: {
|
|
15859
|
+
name: string
|
|
15860
|
+
}
|
|
15861
|
+
}
|
|
15862
|
+
| {
|
|
15863
|
+
type: 'annotation.toggle'
|
|
15864
|
+
annotation: {
|
|
15865
|
+
name: string
|
|
15866
|
+
value: {
|
|
15867
|
+
[prop: string]: unknown
|
|
15868
|
+
}
|
|
15869
|
+
}
|
|
15870
|
+
}
|
|
15871
|
+
| {
|
|
15872
|
+
[props: string]: unknown
|
|
15873
|
+
type: 'block.set'
|
|
15874
|
+
at: [KeyedSegment]
|
|
15875
|
+
}
|
|
15876
|
+
| {
|
|
15877
|
+
type: 'block.unset'
|
|
15878
|
+
at: [KeyedSegment]
|
|
15879
|
+
props: Array<string>
|
|
15880
|
+
}
|
|
15881
|
+
| {
|
|
15882
|
+
type: 'blur'
|
|
15883
|
+
}
|
|
15884
|
+
| {
|
|
15885
|
+
type: 'data transfer.set'
|
|
15886
|
+
data: string
|
|
15887
|
+
dataTransfer: DataTransfer
|
|
15888
|
+
mimeType: MIMEType_2
|
|
15889
|
+
}
|
|
15890
|
+
| {
|
|
15891
|
+
type: 'decorator.add'
|
|
15892
|
+
decorator: string
|
|
15893
|
+
}
|
|
15894
|
+
| {
|
|
15895
|
+
type: 'decorator.remove'
|
|
15896
|
+
decorator: string
|
|
15897
|
+
}
|
|
15898
|
+
| {
|
|
15899
|
+
type: 'decorator.toggle'
|
|
15900
|
+
decorator: string
|
|
15901
|
+
}
|
|
15902
|
+
| {
|
|
15903
|
+
type: 'delete'
|
|
15904
|
+
selection: NonNullable<EditorSelection>
|
|
15905
|
+
}
|
|
15906
|
+
| {
|
|
15907
|
+
type: 'delete.backward'
|
|
15908
|
+
unit: TextUnit
|
|
15909
|
+
}
|
|
15910
|
+
| {
|
|
15911
|
+
type: 'delete.block'
|
|
15912
|
+
blockPath: [KeyedSegment]
|
|
15913
|
+
}
|
|
15914
|
+
| {
|
|
15915
|
+
type: 'delete.forward'
|
|
15916
|
+
unit: TextUnit
|
|
15917
|
+
}
|
|
15918
|
+
| {
|
|
15919
|
+
type: 'delete.text'
|
|
15920
|
+
anchor: BlockOffset_2
|
|
15921
|
+
focus: BlockOffset_2
|
|
15922
|
+
}
|
|
15923
|
+
| {
|
|
15924
|
+
type: 'focus'
|
|
15925
|
+
}
|
|
15926
|
+
| {
|
|
15927
|
+
type: 'history.redo'
|
|
15928
|
+
}
|
|
15929
|
+
| {
|
|
15930
|
+
type: 'history.undo'
|
|
15931
|
+
}
|
|
15932
|
+
| {
|
|
15933
|
+
type: 'insert.blocks'
|
|
15934
|
+
blocks: Array<PortableTextBlock>
|
|
15935
|
+
}
|
|
15936
|
+
| {
|
|
15937
|
+
type: 'insert.block object'
|
|
15938
|
+
placement: 'auto' | 'after' | 'before'
|
|
15939
|
+
blockObject: {
|
|
15940
|
+
name: string
|
|
15941
|
+
value?: {
|
|
15942
|
+
[prop: string]: unknown
|
|
15943
|
+
}
|
|
15944
|
+
}
|
|
15945
|
+
}
|
|
15946
|
+
| {
|
|
15947
|
+
type: 'insert.inline object'
|
|
15948
|
+
inlineObject: {
|
|
15949
|
+
name: string
|
|
15950
|
+
value?: {
|
|
15951
|
+
[prop: string]: unknown
|
|
15952
|
+
}
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
| {
|
|
15956
|
+
type: 'insert.break'
|
|
15957
|
+
}
|
|
15958
|
+
| {
|
|
15959
|
+
type: 'insert.soft break'
|
|
15960
|
+
}
|
|
15961
|
+
| {
|
|
15962
|
+
type: 'insert.block'
|
|
15963
|
+
block: PortableTextBlock
|
|
15964
|
+
placement: 'auto' | 'after' | 'before'
|
|
15965
|
+
}
|
|
15966
|
+
| {
|
|
15967
|
+
type: 'insert.span'
|
|
15968
|
+
text: string
|
|
15969
|
+
annotations?: Array<{
|
|
15970
|
+
name: string
|
|
15971
|
+
value: {
|
|
15972
|
+
[prop: string]: unknown
|
|
15973
|
+
}
|
|
15974
|
+
}>
|
|
15975
|
+
decorators?: Array<string>
|
|
15976
|
+
}
|
|
15977
|
+
| {
|
|
15978
|
+
type: 'insert.text'
|
|
15979
|
+
text: string
|
|
15980
|
+
options?: TextInsertTextOptions
|
|
15981
|
+
}
|
|
15982
|
+
| {
|
|
15983
|
+
type: 'insert.text block'
|
|
15984
|
+
placement: 'auto' | 'after' | 'before'
|
|
15985
|
+
textBlock?: {
|
|
15986
|
+
children?: PortableTextTextBlock['children']
|
|
15987
|
+
}
|
|
15988
|
+
}
|
|
15989
|
+
| {
|
|
15990
|
+
type: 'list item.add'
|
|
15991
|
+
listItem: string
|
|
15992
|
+
}
|
|
15993
|
+
| {
|
|
15994
|
+
type: 'list item.remove'
|
|
15995
|
+
listItem: string
|
|
15996
|
+
}
|
|
15997
|
+
| {
|
|
15998
|
+
type: 'list item.toggle'
|
|
15999
|
+
listItem: string
|
|
16000
|
+
}
|
|
16001
|
+
| {
|
|
16002
|
+
type: 'move.block'
|
|
16003
|
+
at: [KeyedSegment]
|
|
16004
|
+
to: [KeyedSegment]
|
|
16005
|
+
}
|
|
16006
|
+
| {
|
|
16007
|
+
type: 'move.block down'
|
|
16008
|
+
at: [KeyedSegment]
|
|
16009
|
+
}
|
|
16010
|
+
| {
|
|
16011
|
+
type: 'move.block up'
|
|
16012
|
+
at: [KeyedSegment]
|
|
16013
|
+
}
|
|
16014
|
+
| {
|
|
16015
|
+
type: 'select'
|
|
16016
|
+
selection: EditorSelection
|
|
16017
|
+
}
|
|
16018
|
+
| {
|
|
16019
|
+
type: 'select.previous block'
|
|
16020
|
+
}
|
|
16021
|
+
| {
|
|
16022
|
+
type: 'select.next block'
|
|
16023
|
+
}
|
|
16024
|
+
| {
|
|
16025
|
+
type: 'style.add'
|
|
16026
|
+
style: string
|
|
16027
|
+
}
|
|
16028
|
+
| {
|
|
16029
|
+
type: 'style.remove'
|
|
16030
|
+
style: string
|
|
16031
|
+
}
|
|
16032
|
+
| {
|
|
16033
|
+
type: 'style.toggle'
|
|
16034
|
+
style: string
|
|
16035
|
+
}
|
|
16036
|
+
| {
|
|
16037
|
+
type: 'text block.set'
|
|
16038
|
+
at: [KeyedSegment]
|
|
16039
|
+
level?: number
|
|
16040
|
+
listItem?: string
|
|
16041
|
+
style?: string
|
|
16042
|
+
}
|
|
16043
|
+
| {
|
|
16044
|
+
type: 'text block.unset'
|
|
16045
|
+
at: [KeyedSegment]
|
|
16046
|
+
props: Array<'level' | 'listItem' | 'style'>
|
|
16047
|
+
}
|
|
16048
|
+
| ({
|
|
16049
|
+
type: 'serialization.failure'
|
|
16050
|
+
mimeType: `${string}/${string}`
|
|
16051
|
+
reason: string
|
|
16052
|
+
} & {
|
|
16053
|
+
dataTransfer: DataTransfer
|
|
16054
|
+
})
|
|
16055
|
+
| ({
|
|
16056
|
+
type: 'serialization.success'
|
|
16057
|
+
data: string
|
|
16058
|
+
mimeType: `${string}/${string}`
|
|
16059
|
+
originEvent: 'copy' | 'cut' | 'unknown'
|
|
16060
|
+
} & {
|
|
16061
|
+
dataTransfer: DataTransfer
|
|
16062
|
+
})
|
|
16063
|
+
| ({
|
|
16064
|
+
type: 'deserialization.failure'
|
|
16065
|
+
mimeType: `${string}/${string}`
|
|
16066
|
+
reason: string
|
|
16067
|
+
} & {
|
|
16068
|
+
dataTransfer: DataTransfer
|
|
16069
|
+
})
|
|
16070
|
+
| ({
|
|
16071
|
+
type: 'deserialization.success'
|
|
16072
|
+
data: Array<PortableTextBlock>
|
|
16073
|
+
mimeType: `${string}/${string}`
|
|
16074
|
+
} & {
|
|
16075
|
+
dataTransfer: DataTransfer
|
|
16076
|
+
})
|
|
16077
|
+
| PatchEvent
|
|
16078
|
+
| MutationEvent
|
|
16079
|
+
| PatchesEvent
|
|
16080
|
+
| {
|
|
16081
|
+
type: 'blurred'
|
|
16082
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
16083
|
+
}
|
|
16084
|
+
| {
|
|
16085
|
+
type: 'done loading'
|
|
16086
|
+
}
|
|
16087
|
+
| {
|
|
16088
|
+
type: 'editable'
|
|
16089
|
+
}
|
|
16090
|
+
| {
|
|
16091
|
+
type: 'error'
|
|
16092
|
+
name: string
|
|
16093
|
+
description: string
|
|
16094
|
+
data: unknown
|
|
16095
|
+
}
|
|
16096
|
+
| {
|
|
16097
|
+
type: 'focused'
|
|
16098
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
16099
|
+
}
|
|
16100
|
+
| {
|
|
16101
|
+
type: 'invalid value'
|
|
16102
|
+
resolution: InvalidValueResolution | null
|
|
16103
|
+
value: Array<PortableTextBlock> | undefined
|
|
16104
|
+
}
|
|
16105
|
+
| {
|
|
16106
|
+
type: 'loading'
|
|
16107
|
+
}
|
|
16108
|
+
| {
|
|
16109
|
+
type: 'read only'
|
|
16110
|
+
}
|
|
16111
|
+
| {
|
|
16112
|
+
type: 'ready'
|
|
16113
|
+
}
|
|
16114
|
+
| {
|
|
16115
|
+
type: 'selection'
|
|
16116
|
+
selection: EditorSelection
|
|
16117
|
+
}
|
|
16118
|
+
| {
|
|
16119
|
+
type: 'value changed'
|
|
16120
|
+
value: Array<PortableTextBlock> | undefined
|
|
16121
|
+
}
|
|
16122
|
+
| UnsetEvent
|
|
16123
|
+
| {
|
|
16124
|
+
type: 'custom.*'
|
|
16125
|
+
event: CustomBehaviorEvent
|
|
16126
|
+
}
|
|
16127
|
+
>
|
|
16128
|
+
}
|
|
16129
|
+
readonly 'list item.*': {
|
|
16130
|
+
readonly actions: ActionFunction<
|
|
16131
|
+
{
|
|
16132
|
+
behaviors: Set<Behavior>
|
|
16133
|
+
converters: Set<Converter>
|
|
16134
|
+
keyGenerator: () => string
|
|
16135
|
+
pendingEvents: Array<PatchEvent | MutationEvent>
|
|
16136
|
+
schema: EditorSchema
|
|
16137
|
+
initialReadOnly: boolean
|
|
16138
|
+
maxBlocks: number | undefined
|
|
16139
|
+
selection: EditorSelection
|
|
16140
|
+
value: Array<PortableTextBlock> | undefined
|
|
16141
|
+
},
|
|
16142
|
+
| {
|
|
16143
|
+
type: 'list item.add'
|
|
16144
|
+
listItem: string
|
|
16145
|
+
}
|
|
16146
|
+
| {
|
|
16147
|
+
type: 'list item.remove'
|
|
16148
|
+
listItem: string
|
|
16149
|
+
}
|
|
16150
|
+
| {
|
|
16151
|
+
type: 'list item.toggle'
|
|
16152
|
+
listItem: string
|
|
16153
|
+
},
|
|
16154
|
+
| {
|
|
16155
|
+
type: 'annotation.add'
|
|
16156
|
+
annotation: {
|
|
16157
|
+
name: string
|
|
16158
|
+
value: {
|
|
15235
16159
|
[prop: string]: unknown
|
|
15236
16160
|
}
|
|
15237
16161
|
}
|
|
@@ -15306,6 +16230,12 @@ declare const editorMachine: StateMachine<
|
|
|
15306
16230
|
| {
|
|
15307
16231
|
type: 'focus'
|
|
15308
16232
|
}
|
|
16233
|
+
| {
|
|
16234
|
+
type: 'history.redo'
|
|
16235
|
+
}
|
|
16236
|
+
| {
|
|
16237
|
+
type: 'history.undo'
|
|
16238
|
+
}
|
|
15309
16239
|
| {
|
|
15310
16240
|
type: 'insert.blocks'
|
|
15311
16241
|
blocks: Array<PortableTextBlock>
|
|
@@ -15655,6 +16585,12 @@ declare const editorMachine: StateMachine<
|
|
|
15655
16585
|
| {
|
|
15656
16586
|
type: 'focus'
|
|
15657
16587
|
}
|
|
16588
|
+
| {
|
|
16589
|
+
type: 'history.redo'
|
|
16590
|
+
}
|
|
16591
|
+
| {
|
|
16592
|
+
type: 'history.undo'
|
|
16593
|
+
}
|
|
15658
16594
|
| {
|
|
15659
16595
|
type: 'insert.blocks'
|
|
15660
16596
|
blocks: Array<PortableTextBlock>
|
|
@@ -15957,6 +16893,12 @@ declare const editorMachine: StateMachine<
|
|
|
15957
16893
|
| {
|
|
15958
16894
|
type: 'focus'
|
|
15959
16895
|
}
|
|
16896
|
+
| {
|
|
16897
|
+
type: 'history.redo'
|
|
16898
|
+
}
|
|
16899
|
+
| {
|
|
16900
|
+
type: 'history.undo'
|
|
16901
|
+
}
|
|
15960
16902
|
| {
|
|
15961
16903
|
type: 'insert.blocks'
|
|
15962
16904
|
blocks: Array<PortableTextBlock>
|
|
@@ -16306,6 +17248,12 @@ declare const editorMachine: StateMachine<
|
|
|
16306
17248
|
| {
|
|
16307
17249
|
type: 'focus'
|
|
16308
17250
|
}
|
|
17251
|
+
| {
|
|
17252
|
+
type: 'history.redo'
|
|
17253
|
+
}
|
|
17254
|
+
| {
|
|
17255
|
+
type: 'history.undo'
|
|
17256
|
+
}
|
|
16309
17257
|
| {
|
|
16310
17258
|
type: 'insert.blocks'
|
|
16311
17259
|
blocks: Array<PortableTextBlock>
|
|
@@ -16599,6 +17547,12 @@ declare const editorMachine: StateMachine<
|
|
|
16599
17547
|
| {
|
|
16600
17548
|
type: 'focus'
|
|
16601
17549
|
}
|
|
17550
|
+
| {
|
|
17551
|
+
type: 'history.redo'
|
|
17552
|
+
}
|
|
17553
|
+
| {
|
|
17554
|
+
type: 'history.undo'
|
|
17555
|
+
}
|
|
16602
17556
|
| {
|
|
16603
17557
|
type: 'insert.blocks'
|
|
16604
17558
|
blocks: Array<PortableTextBlock>
|
|
@@ -16948,6 +17902,12 @@ declare const editorMachine: StateMachine<
|
|
|
16948
17902
|
| {
|
|
16949
17903
|
type: 'focus'
|
|
16950
17904
|
}
|
|
17905
|
+
| {
|
|
17906
|
+
type: 'history.redo'
|
|
17907
|
+
}
|
|
17908
|
+
| {
|
|
17909
|
+
type: 'history.undo'
|
|
17910
|
+
}
|
|
16951
17911
|
| {
|
|
16952
17912
|
type: 'insert.blocks'
|
|
16953
17913
|
blocks: Array<PortableTextBlock>
|
|
@@ -17243,6 +18203,12 @@ declare const editorMachine: StateMachine<
|
|
|
17243
18203
|
| {
|
|
17244
18204
|
type: 'focus'
|
|
17245
18205
|
}
|
|
18206
|
+
| {
|
|
18207
|
+
type: 'history.redo'
|
|
18208
|
+
}
|
|
18209
|
+
| {
|
|
18210
|
+
type: 'history.undo'
|
|
18211
|
+
}
|
|
17246
18212
|
| {
|
|
17247
18213
|
type: 'insert.blocks'
|
|
17248
18214
|
blocks: Array<PortableTextBlock>
|
|
@@ -17592,6 +18558,12 @@ declare const editorMachine: StateMachine<
|
|
|
17592
18558
|
| {
|
|
17593
18559
|
type: 'focus'
|
|
17594
18560
|
}
|
|
18561
|
+
| {
|
|
18562
|
+
type: 'history.redo'
|
|
18563
|
+
}
|
|
18564
|
+
| {
|
|
18565
|
+
type: 'history.undo'
|
|
18566
|
+
}
|
|
17595
18567
|
| {
|
|
17596
18568
|
type: 'insert.blocks'
|
|
17597
18569
|
blocks: Array<PortableTextBlock>
|
|
@@ -17893,6 +18865,12 @@ declare const editorMachine: StateMachine<
|
|
|
17893
18865
|
| {
|
|
17894
18866
|
type: 'focus'
|
|
17895
18867
|
}
|
|
18868
|
+
| {
|
|
18869
|
+
type: 'history.redo'
|
|
18870
|
+
}
|
|
18871
|
+
| {
|
|
18872
|
+
type: 'history.undo'
|
|
18873
|
+
}
|
|
17896
18874
|
| {
|
|
17897
18875
|
type: 'insert.blocks'
|
|
17898
18876
|
blocks: Array<PortableTextBlock>
|
|
@@ -18242,6 +19220,12 @@ declare const editorMachine: StateMachine<
|
|
|
18242
19220
|
| {
|
|
18243
19221
|
type: 'focus'
|
|
18244
19222
|
}
|
|
19223
|
+
| {
|
|
19224
|
+
type: 'history.redo'
|
|
19225
|
+
}
|
|
19226
|
+
| {
|
|
19227
|
+
type: 'history.undo'
|
|
19228
|
+
}
|
|
18245
19229
|
| {
|
|
18246
19230
|
type: 'insert.blocks'
|
|
18247
19231
|
blocks: Array<PortableTextBlock>
|
|
@@ -18543,6 +19527,12 @@ declare const editorMachine: StateMachine<
|
|
|
18543
19527
|
| {
|
|
18544
19528
|
type: 'focus'
|
|
18545
19529
|
}
|
|
19530
|
+
| {
|
|
19531
|
+
type: 'history.redo'
|
|
19532
|
+
}
|
|
19533
|
+
| {
|
|
19534
|
+
type: 'history.undo'
|
|
19535
|
+
}
|
|
18546
19536
|
| {
|
|
18547
19537
|
type: 'insert.blocks'
|
|
18548
19538
|
blocks: Array<PortableTextBlock>
|
|
@@ -18892,6 +19882,12 @@ declare const editorMachine: StateMachine<
|
|
|
18892
19882
|
| {
|
|
18893
19883
|
type: 'focus'
|
|
18894
19884
|
}
|
|
19885
|
+
| {
|
|
19886
|
+
type: 'history.redo'
|
|
19887
|
+
}
|
|
19888
|
+
| {
|
|
19889
|
+
type: 'history.undo'
|
|
19890
|
+
}
|
|
18895
19891
|
| {
|
|
18896
19892
|
type: 'insert.blocks'
|
|
18897
19893
|
blocks: Array<PortableTextBlock>
|
|
@@ -19627,6 +20623,12 @@ declare type SyntheticBehaviorEvent =
|
|
|
19627
20623
|
| {
|
|
19628
20624
|
type: 'focus'
|
|
19629
20625
|
}
|
|
20626
|
+
| {
|
|
20627
|
+
type: 'history.redo'
|
|
20628
|
+
}
|
|
20629
|
+
| {
|
|
20630
|
+
type: 'history.undo'
|
|
20631
|
+
}
|
|
19630
20632
|
| {
|
|
19631
20633
|
type: 'insert.blocks'
|
|
19632
20634
|
blocks: Array<PortableTextBlock>
|