@portabletext/editor 1.47.2 → 1.47.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_chunks-cjs/editor-provider.cjs +125 -100
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-es/editor-provider.js +126 -101
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/lib/behaviors/index.d.cts +404 -543
- package/lib/behaviors/index.d.ts +404 -543
- package/lib/index.cjs +9 -6
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +411 -34
- package/lib/index.d.ts +411 -34
- package/lib/index.js +9 -6
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.cts +411 -34
- package/lib/plugins/index.d.ts +411 -34
- package/lib/selectors/index.d.cts +404 -33
- package/lib/selectors/index.d.ts +404 -33
- package/lib/utils/index.d.cts +404 -33
- package/lib/utils/index.d.ts +404 -33
- package/package.json +3 -3
- package/src/behavior-actions/behavior.action.insert.text.ts +10 -1
- package/src/behavior-actions/behavior.actions.ts +0 -18
- package/src/behaviors/behavior.perform-event.ts +55 -65
- package/src/behaviors/behavior.types.event.ts +7 -9
- package/src/editor/Editable.tsx +18 -13
- package/src/editor/create-editor.ts +14 -0
- package/src/editor/editor-machine.ts +76 -5
- package/src/editor/plugins/create-with-event-listeners.ts +0 -6
- package/src/editor/plugins/createWithEditableAPI.ts +2 -8
- package/src/editor/with-applying-behavior-actions.ts +2 -2
- package/src/behavior-actions/behavior.action.blur.ts +0 -8
- package/src/behavior-actions/behavior.action.focus.ts +0 -8
package/lib/plugins/index.d.cts
CHANGED
|
@@ -686,6 +686,7 @@ declare const editorMachine: StateMachine<
|
|
|
686
686
|
ghost?: HTMLElement
|
|
687
687
|
origin: Pick<EventPosition, 'selection'>
|
|
688
688
|
}
|
|
689
|
+
slateEditor?: PortableTextSlateEditor
|
|
689
690
|
},
|
|
690
691
|
| InternalPatchEvent
|
|
691
692
|
| MutationEvent
|
|
@@ -722,6 +723,14 @@ declare const editorMachine: StateMachine<
|
|
|
722
723
|
maxBlocks: number | undefined
|
|
723
724
|
}
|
|
724
725
|
| PatchesEvent
|
|
726
|
+
| {
|
|
727
|
+
type: 'blur'
|
|
728
|
+
editor: PortableTextSlateEditor
|
|
729
|
+
}
|
|
730
|
+
| {
|
|
731
|
+
type: 'focus'
|
|
732
|
+
editor: PortableTextSlateEditor
|
|
733
|
+
}
|
|
725
734
|
| {
|
|
726
735
|
type: 'normalizing'
|
|
727
736
|
}
|
|
@@ -735,7 +744,6 @@ declare const editorMachine: StateMachine<
|
|
|
735
744
|
type: 'behavior event'
|
|
736
745
|
behaviorEvent: BehaviorEvent
|
|
737
746
|
editor: PortableTextSlateEditor
|
|
738
|
-
defaultActionCallback?: () => void
|
|
739
747
|
nativeEvent?: {
|
|
740
748
|
preventDefault: () => void
|
|
741
749
|
}
|
|
@@ -858,17 +866,33 @@ declare const editorMachine: StateMachine<
|
|
|
858
866
|
type: 'clear pending events'
|
|
859
867
|
params: NonReducibleUnknown
|
|
860
868
|
}
|
|
869
|
+
'handle blur': {
|
|
870
|
+
type: 'handle blur'
|
|
871
|
+
params: unknown
|
|
872
|
+
}
|
|
873
|
+
'handle focus': {
|
|
874
|
+
type: 'handle focus'
|
|
875
|
+
params: unknown
|
|
876
|
+
}
|
|
861
877
|
'handle behavior event': {
|
|
862
878
|
type: 'handle behavior event'
|
|
863
879
|
params: unknown
|
|
864
880
|
}
|
|
865
881
|
}>,
|
|
866
|
-
|
|
882
|
+
{
|
|
883
|
+
type: 'slate is busy'
|
|
884
|
+
params: unknown
|
|
885
|
+
},
|
|
867
886
|
never,
|
|
868
887
|
{
|
|
869
888
|
'edit mode':
|
|
870
889
|
| {
|
|
871
|
-
editable:
|
|
890
|
+
editable:
|
|
891
|
+
| 'dragging internally'
|
|
892
|
+
| 'idle'
|
|
893
|
+
| {
|
|
894
|
+
focusing: 'checking if busy' | 'busy'
|
|
895
|
+
}
|
|
872
896
|
}
|
|
873
897
|
| {
|
|
874
898
|
'read only': 'read only' | 'determine initial edit mode'
|
|
@@ -991,6 +1015,7 @@ declare const editorMachine: StateMachine<
|
|
|
991
1015
|
ghost?: HTMLElement
|
|
992
1016
|
origin: Pick<EventPosition, 'selection'>
|
|
993
1017
|
}
|
|
1018
|
+
slateEditor?: PortableTextSlateEditor
|
|
994
1019
|
},
|
|
995
1020
|
| InternalPatchEvent
|
|
996
1021
|
| MutationEvent
|
|
@@ -1027,6 +1052,14 @@ declare const editorMachine: StateMachine<
|
|
|
1027
1052
|
maxBlocks: number | undefined
|
|
1028
1053
|
}
|
|
1029
1054
|
| PatchesEvent
|
|
1055
|
+
| {
|
|
1056
|
+
type: 'blur'
|
|
1057
|
+
editor: PortableTextSlateEditor
|
|
1058
|
+
}
|
|
1059
|
+
| {
|
|
1060
|
+
type: 'focus'
|
|
1061
|
+
editor: PortableTextSlateEditor
|
|
1062
|
+
}
|
|
1030
1063
|
| {
|
|
1031
1064
|
type: 'normalizing'
|
|
1032
1065
|
}
|
|
@@ -1040,7 +1073,6 @@ declare const editorMachine: StateMachine<
|
|
|
1040
1073
|
type: 'behavior event'
|
|
1041
1074
|
behaviorEvent: BehaviorEvent
|
|
1042
1075
|
editor: PortableTextSlateEditor
|
|
1043
|
-
defaultActionCallback?: () => void
|
|
1044
1076
|
nativeEvent?: {
|
|
1045
1077
|
preventDefault: () => void
|
|
1046
1078
|
}
|
|
@@ -1154,6 +1186,14 @@ declare const editorMachine: StateMachine<
|
|
|
1154
1186
|
maxBlocks: number | undefined
|
|
1155
1187
|
}
|
|
1156
1188
|
| PatchesEvent
|
|
1189
|
+
| {
|
|
1190
|
+
type: 'blur'
|
|
1191
|
+
editor: PortableTextSlateEditor
|
|
1192
|
+
}
|
|
1193
|
+
| {
|
|
1194
|
+
type: 'focus'
|
|
1195
|
+
editor: PortableTextSlateEditor
|
|
1196
|
+
}
|
|
1157
1197
|
| {
|
|
1158
1198
|
type: 'normalizing'
|
|
1159
1199
|
}
|
|
@@ -1167,7 +1207,6 @@ declare const editorMachine: StateMachine<
|
|
|
1167
1207
|
type: 'behavior event'
|
|
1168
1208
|
behaviorEvent: BehaviorEvent
|
|
1169
1209
|
editor: PortableTextSlateEditor
|
|
1170
|
-
defaultActionCallback?: () => void
|
|
1171
1210
|
nativeEvent?: {
|
|
1172
1211
|
preventDefault: () => void
|
|
1173
1212
|
}
|
|
@@ -1269,6 +1308,7 @@ declare const editorMachine: StateMachine<
|
|
|
1269
1308
|
ghost?: HTMLElement
|
|
1270
1309
|
origin: Pick<EventPosition, 'selection'>
|
|
1271
1310
|
}
|
|
1311
|
+
slateEditor?: PortableTextSlateEditor
|
|
1272
1312
|
},
|
|
1273
1313
|
{
|
|
1274
1314
|
type: 'notify.blurred'
|
|
@@ -1309,6 +1349,14 @@ declare const editorMachine: StateMachine<
|
|
|
1309
1349
|
maxBlocks: number | undefined
|
|
1310
1350
|
}
|
|
1311
1351
|
| PatchesEvent
|
|
1352
|
+
| {
|
|
1353
|
+
type: 'blur'
|
|
1354
|
+
editor: PortableTextSlateEditor
|
|
1355
|
+
}
|
|
1356
|
+
| {
|
|
1357
|
+
type: 'focus'
|
|
1358
|
+
editor: PortableTextSlateEditor
|
|
1359
|
+
}
|
|
1312
1360
|
| {
|
|
1313
1361
|
type: 'normalizing'
|
|
1314
1362
|
}
|
|
@@ -1322,7 +1370,6 @@ declare const editorMachine: StateMachine<
|
|
|
1322
1370
|
type: 'behavior event'
|
|
1323
1371
|
behaviorEvent: BehaviorEvent
|
|
1324
1372
|
editor: PortableTextSlateEditor
|
|
1325
|
-
defaultActionCallback?: () => void
|
|
1326
1373
|
nativeEvent?: {
|
|
1327
1374
|
preventDefault: () => void
|
|
1328
1375
|
}
|
|
@@ -1464,6 +1511,7 @@ declare const editorMachine: StateMachine<
|
|
|
1464
1511
|
ghost?: HTMLElement
|
|
1465
1512
|
origin: Pick<EventPosition, 'selection'>
|
|
1466
1513
|
}
|
|
1514
|
+
slateEditor?: PortableTextSlateEditor
|
|
1467
1515
|
},
|
|
1468
1516
|
{
|
|
1469
1517
|
type: 'notify.done loading'
|
|
@@ -1503,6 +1551,14 @@ declare const editorMachine: StateMachine<
|
|
|
1503
1551
|
maxBlocks: number | undefined
|
|
1504
1552
|
}
|
|
1505
1553
|
| PatchesEvent
|
|
1554
|
+
| {
|
|
1555
|
+
type: 'blur'
|
|
1556
|
+
editor: PortableTextSlateEditor
|
|
1557
|
+
}
|
|
1558
|
+
| {
|
|
1559
|
+
type: 'focus'
|
|
1560
|
+
editor: PortableTextSlateEditor
|
|
1561
|
+
}
|
|
1506
1562
|
| {
|
|
1507
1563
|
type: 'normalizing'
|
|
1508
1564
|
}
|
|
@@ -1516,7 +1572,6 @@ declare const editorMachine: StateMachine<
|
|
|
1516
1572
|
type: 'behavior event'
|
|
1517
1573
|
behaviorEvent: BehaviorEvent
|
|
1518
1574
|
editor: PortableTextSlateEditor
|
|
1519
|
-
defaultActionCallback?: () => void
|
|
1520
1575
|
nativeEvent?: {
|
|
1521
1576
|
preventDefault: () => void
|
|
1522
1577
|
}
|
|
@@ -1658,6 +1713,7 @@ declare const editorMachine: StateMachine<
|
|
|
1658
1713
|
ghost?: HTMLElement
|
|
1659
1714
|
origin: Pick<EventPosition, 'selection'>
|
|
1660
1715
|
}
|
|
1716
|
+
slateEditor?: PortableTextSlateEditor
|
|
1661
1717
|
},
|
|
1662
1718
|
{
|
|
1663
1719
|
type: 'notify.error'
|
|
@@ -1700,6 +1756,14 @@ declare const editorMachine: StateMachine<
|
|
|
1700
1756
|
maxBlocks: number | undefined
|
|
1701
1757
|
}
|
|
1702
1758
|
| PatchesEvent
|
|
1759
|
+
| {
|
|
1760
|
+
type: 'blur'
|
|
1761
|
+
editor: PortableTextSlateEditor
|
|
1762
|
+
}
|
|
1763
|
+
| {
|
|
1764
|
+
type: 'focus'
|
|
1765
|
+
editor: PortableTextSlateEditor
|
|
1766
|
+
}
|
|
1703
1767
|
| {
|
|
1704
1768
|
type: 'normalizing'
|
|
1705
1769
|
}
|
|
@@ -1713,7 +1777,6 @@ declare const editorMachine: StateMachine<
|
|
|
1713
1777
|
type: 'behavior event'
|
|
1714
1778
|
behaviorEvent: BehaviorEvent
|
|
1715
1779
|
editor: PortableTextSlateEditor
|
|
1716
|
-
defaultActionCallback?: () => void
|
|
1717
1780
|
nativeEvent?: {
|
|
1718
1781
|
preventDefault: () => void
|
|
1719
1782
|
}
|
|
@@ -1855,6 +1918,7 @@ declare const editorMachine: StateMachine<
|
|
|
1855
1918
|
ghost?: HTMLElement
|
|
1856
1919
|
origin: Pick<EventPosition, 'selection'>
|
|
1857
1920
|
}
|
|
1921
|
+
slateEditor?: PortableTextSlateEditor
|
|
1858
1922
|
},
|
|
1859
1923
|
{
|
|
1860
1924
|
type: 'notify.invalid value'
|
|
@@ -1896,6 +1960,14 @@ declare const editorMachine: StateMachine<
|
|
|
1896
1960
|
maxBlocks: number | undefined
|
|
1897
1961
|
}
|
|
1898
1962
|
| PatchesEvent
|
|
1963
|
+
| {
|
|
1964
|
+
type: 'blur'
|
|
1965
|
+
editor: PortableTextSlateEditor
|
|
1966
|
+
}
|
|
1967
|
+
| {
|
|
1968
|
+
type: 'focus'
|
|
1969
|
+
editor: PortableTextSlateEditor
|
|
1970
|
+
}
|
|
1899
1971
|
| {
|
|
1900
1972
|
type: 'normalizing'
|
|
1901
1973
|
}
|
|
@@ -1909,7 +1981,6 @@ declare const editorMachine: StateMachine<
|
|
|
1909
1981
|
type: 'behavior event'
|
|
1910
1982
|
behaviorEvent: BehaviorEvent
|
|
1911
1983
|
editor: PortableTextSlateEditor
|
|
1912
|
-
defaultActionCallback?: () => void
|
|
1913
1984
|
nativeEvent?: {
|
|
1914
1985
|
preventDefault: () => void
|
|
1915
1986
|
}
|
|
@@ -2051,6 +2122,7 @@ declare const editorMachine: StateMachine<
|
|
|
2051
2122
|
ghost?: HTMLElement
|
|
2052
2123
|
origin: Pick<EventPosition, 'selection'>
|
|
2053
2124
|
}
|
|
2125
|
+
slateEditor?: PortableTextSlateEditor
|
|
2054
2126
|
},
|
|
2055
2127
|
{
|
|
2056
2128
|
type: 'notify.focused'
|
|
@@ -2091,6 +2163,14 @@ declare const editorMachine: StateMachine<
|
|
|
2091
2163
|
maxBlocks: number | undefined
|
|
2092
2164
|
}
|
|
2093
2165
|
| PatchesEvent
|
|
2166
|
+
| {
|
|
2167
|
+
type: 'blur'
|
|
2168
|
+
editor: PortableTextSlateEditor
|
|
2169
|
+
}
|
|
2170
|
+
| {
|
|
2171
|
+
type: 'focus'
|
|
2172
|
+
editor: PortableTextSlateEditor
|
|
2173
|
+
}
|
|
2094
2174
|
| {
|
|
2095
2175
|
type: 'normalizing'
|
|
2096
2176
|
}
|
|
@@ -2104,7 +2184,6 @@ declare const editorMachine: StateMachine<
|
|
|
2104
2184
|
type: 'behavior event'
|
|
2105
2185
|
behaviorEvent: BehaviorEvent
|
|
2106
2186
|
editor: PortableTextSlateEditor
|
|
2107
|
-
defaultActionCallback?: () => void
|
|
2108
2187
|
nativeEvent?: {
|
|
2109
2188
|
preventDefault: () => void
|
|
2110
2189
|
}
|
|
@@ -2247,6 +2326,7 @@ declare const editorMachine: StateMachine<
|
|
|
2247
2326
|
ghost?: HTMLElement
|
|
2248
2327
|
origin: Pick<EventPosition, 'selection'>
|
|
2249
2328
|
}
|
|
2329
|
+
slateEditor?: PortableTextSlateEditor
|
|
2250
2330
|
},
|
|
2251
2331
|
{
|
|
2252
2332
|
type: 'notify.selection'
|
|
@@ -2287,6 +2367,14 @@ declare const editorMachine: StateMachine<
|
|
|
2287
2367
|
maxBlocks: number | undefined
|
|
2288
2368
|
}
|
|
2289
2369
|
| PatchesEvent
|
|
2370
|
+
| {
|
|
2371
|
+
type: 'blur'
|
|
2372
|
+
editor: PortableTextSlateEditor
|
|
2373
|
+
}
|
|
2374
|
+
| {
|
|
2375
|
+
type: 'focus'
|
|
2376
|
+
editor: PortableTextSlateEditor
|
|
2377
|
+
}
|
|
2290
2378
|
| {
|
|
2291
2379
|
type: 'normalizing'
|
|
2292
2380
|
}
|
|
@@ -2300,7 +2388,6 @@ declare const editorMachine: StateMachine<
|
|
|
2300
2388
|
type: 'behavior event'
|
|
2301
2389
|
behaviorEvent: BehaviorEvent
|
|
2302
2390
|
editor: PortableTextSlateEditor
|
|
2303
|
-
defaultActionCallback?: () => void
|
|
2304
2391
|
nativeEvent?: {
|
|
2305
2392
|
preventDefault: () => void
|
|
2306
2393
|
}
|
|
@@ -2394,6 +2481,7 @@ declare const editorMachine: StateMachine<
|
|
|
2394
2481
|
ghost?: HTMLElement
|
|
2395
2482
|
origin: Pick<EventPosition, 'selection'>
|
|
2396
2483
|
}
|
|
2484
|
+
slateEditor?: PortableTextSlateEditor
|
|
2397
2485
|
},
|
|
2398
2486
|
{
|
|
2399
2487
|
type: 'notify.selection'
|
|
@@ -2434,6 +2522,14 @@ declare const editorMachine: StateMachine<
|
|
|
2434
2522
|
maxBlocks: number | undefined
|
|
2435
2523
|
}
|
|
2436
2524
|
| PatchesEvent
|
|
2525
|
+
| {
|
|
2526
|
+
type: 'blur'
|
|
2527
|
+
editor: PortableTextSlateEditor
|
|
2528
|
+
}
|
|
2529
|
+
| {
|
|
2530
|
+
type: 'focus'
|
|
2531
|
+
editor: PortableTextSlateEditor
|
|
2532
|
+
}
|
|
2437
2533
|
| {
|
|
2438
2534
|
type: 'normalizing'
|
|
2439
2535
|
}
|
|
@@ -2447,7 +2543,6 @@ declare const editorMachine: StateMachine<
|
|
|
2447
2543
|
type: 'behavior event'
|
|
2448
2544
|
behaviorEvent: BehaviorEvent
|
|
2449
2545
|
editor: PortableTextSlateEditor
|
|
2450
|
-
defaultActionCallback?: () => void
|
|
2451
2546
|
nativeEvent?: {
|
|
2452
2547
|
preventDefault: () => void
|
|
2453
2548
|
}
|
|
@@ -2590,6 +2685,7 @@ declare const editorMachine: StateMachine<
|
|
|
2590
2685
|
ghost?: HTMLElement
|
|
2591
2686
|
origin: Pick<EventPosition, 'selection'>
|
|
2592
2687
|
}
|
|
2688
|
+
slateEditor?: PortableTextSlateEditor
|
|
2593
2689
|
},
|
|
2594
2690
|
{
|
|
2595
2691
|
type: 'notify.unset'
|
|
@@ -2630,6 +2726,14 @@ declare const editorMachine: StateMachine<
|
|
|
2630
2726
|
maxBlocks: number | undefined
|
|
2631
2727
|
}
|
|
2632
2728
|
| PatchesEvent
|
|
2729
|
+
| {
|
|
2730
|
+
type: 'blur'
|
|
2731
|
+
editor: PortableTextSlateEditor
|
|
2732
|
+
}
|
|
2733
|
+
| {
|
|
2734
|
+
type: 'focus'
|
|
2735
|
+
editor: PortableTextSlateEditor
|
|
2736
|
+
}
|
|
2633
2737
|
| {
|
|
2634
2738
|
type: 'normalizing'
|
|
2635
2739
|
}
|
|
@@ -2643,7 +2747,6 @@ declare const editorMachine: StateMachine<
|
|
|
2643
2747
|
type: 'behavior event'
|
|
2644
2748
|
behaviorEvent: BehaviorEvent
|
|
2645
2749
|
editor: PortableTextSlateEditor
|
|
2646
|
-
defaultActionCallback?: () => void
|
|
2647
2750
|
nativeEvent?: {
|
|
2648
2751
|
preventDefault: () => void
|
|
2649
2752
|
}
|
|
@@ -2785,6 +2888,7 @@ declare const editorMachine: StateMachine<
|
|
|
2785
2888
|
ghost?: HTMLElement
|
|
2786
2889
|
origin: Pick<EventPosition, 'selection'>
|
|
2787
2890
|
}
|
|
2891
|
+
slateEditor?: PortableTextSlateEditor
|
|
2788
2892
|
},
|
|
2789
2893
|
{
|
|
2790
2894
|
type: 'notify.loading'
|
|
@@ -2824,6 +2928,14 @@ declare const editorMachine: StateMachine<
|
|
|
2824
2928
|
maxBlocks: number | undefined
|
|
2825
2929
|
}
|
|
2826
2930
|
| PatchesEvent
|
|
2931
|
+
| {
|
|
2932
|
+
type: 'blur'
|
|
2933
|
+
editor: PortableTextSlateEditor
|
|
2934
|
+
}
|
|
2935
|
+
| {
|
|
2936
|
+
type: 'focus'
|
|
2937
|
+
editor: PortableTextSlateEditor
|
|
2938
|
+
}
|
|
2827
2939
|
| {
|
|
2828
2940
|
type: 'normalizing'
|
|
2829
2941
|
}
|
|
@@ -2837,7 +2949,6 @@ declare const editorMachine: StateMachine<
|
|
|
2837
2949
|
type: 'behavior event'
|
|
2838
2950
|
behaviorEvent: BehaviorEvent
|
|
2839
2951
|
editor: PortableTextSlateEditor
|
|
2840
|
-
defaultActionCallback?: () => void
|
|
2841
2952
|
nativeEvent?: {
|
|
2842
2953
|
preventDefault: () => void
|
|
2843
2954
|
}
|
|
@@ -2979,6 +3090,7 @@ declare const editorMachine: StateMachine<
|
|
|
2979
3090
|
ghost?: HTMLElement
|
|
2980
3091
|
origin: Pick<EventPosition, 'selection'>
|
|
2981
3092
|
}
|
|
3093
|
+
slateEditor?: PortableTextSlateEditor
|
|
2982
3094
|
},
|
|
2983
3095
|
{
|
|
2984
3096
|
type: 'notify.value changed'
|
|
@@ -3019,6 +3131,14 @@ declare const editorMachine: StateMachine<
|
|
|
3019
3131
|
maxBlocks: number | undefined
|
|
3020
3132
|
}
|
|
3021
3133
|
| PatchesEvent
|
|
3134
|
+
| {
|
|
3135
|
+
type: 'blur'
|
|
3136
|
+
editor: PortableTextSlateEditor
|
|
3137
|
+
}
|
|
3138
|
+
| {
|
|
3139
|
+
type: 'focus'
|
|
3140
|
+
editor: PortableTextSlateEditor
|
|
3141
|
+
}
|
|
3022
3142
|
| {
|
|
3023
3143
|
type: 'normalizing'
|
|
3024
3144
|
}
|
|
@@ -3032,7 +3152,6 @@ declare const editorMachine: StateMachine<
|
|
|
3032
3152
|
type: 'behavior event'
|
|
3033
3153
|
behaviorEvent: BehaviorEvent
|
|
3034
3154
|
editor: PortableTextSlateEditor
|
|
3035
|
-
defaultActionCallback?: () => void
|
|
3036
3155
|
nativeEvent?: {
|
|
3037
3156
|
preventDefault: () => void
|
|
3038
3157
|
}
|
|
@@ -3180,6 +3299,7 @@ declare const editorMachine: StateMachine<
|
|
|
3180
3299
|
ghost?: HTMLElement
|
|
3181
3300
|
origin: Pick<EventPosition, 'selection'>
|
|
3182
3301
|
}
|
|
3302
|
+
slateEditor?: PortableTextSlateEditor
|
|
3183
3303
|
},
|
|
3184
3304
|
PatchesEvent,
|
|
3185
3305
|
| InternalPatchEvent
|
|
@@ -3217,6 +3337,14 @@ declare const editorMachine: StateMachine<
|
|
|
3217
3337
|
maxBlocks: number | undefined
|
|
3218
3338
|
}
|
|
3219
3339
|
| PatchesEvent
|
|
3340
|
+
| {
|
|
3341
|
+
type: 'blur'
|
|
3342
|
+
editor: PortableTextSlateEditor
|
|
3343
|
+
}
|
|
3344
|
+
| {
|
|
3345
|
+
type: 'focus'
|
|
3346
|
+
editor: PortableTextSlateEditor
|
|
3347
|
+
}
|
|
3220
3348
|
| {
|
|
3221
3349
|
type: 'normalizing'
|
|
3222
3350
|
}
|
|
@@ -3230,7 +3358,6 @@ declare const editorMachine: StateMachine<
|
|
|
3230
3358
|
type: 'behavior event'
|
|
3231
3359
|
behaviorEvent: BehaviorEvent
|
|
3232
3360
|
editor: PortableTextSlateEditor
|
|
3233
|
-
defaultActionCallback?: () => void
|
|
3234
3361
|
nativeEvent?: {
|
|
3235
3362
|
preventDefault: () => void
|
|
3236
3363
|
}
|
|
@@ -3375,6 +3502,7 @@ declare const editorMachine: StateMachine<
|
|
|
3375
3502
|
ghost?: HTMLElement
|
|
3376
3503
|
origin: Pick<EventPosition, 'selection'>
|
|
3377
3504
|
}
|
|
3505
|
+
slateEditor?: PortableTextSlateEditor
|
|
3378
3506
|
},
|
|
3379
3507
|
{
|
|
3380
3508
|
type: 'update key generator'
|
|
@@ -3415,6 +3543,14 @@ declare const editorMachine: StateMachine<
|
|
|
3415
3543
|
maxBlocks: number | undefined
|
|
3416
3544
|
}
|
|
3417
3545
|
| PatchesEvent
|
|
3546
|
+
| {
|
|
3547
|
+
type: 'blur'
|
|
3548
|
+
editor: PortableTextSlateEditor
|
|
3549
|
+
}
|
|
3550
|
+
| {
|
|
3551
|
+
type: 'focus'
|
|
3552
|
+
editor: PortableTextSlateEditor
|
|
3553
|
+
}
|
|
3418
3554
|
| {
|
|
3419
3555
|
type: 'normalizing'
|
|
3420
3556
|
}
|
|
@@ -3428,7 +3564,6 @@ declare const editorMachine: StateMachine<
|
|
|
3428
3564
|
type: 'behavior event'
|
|
3429
3565
|
behaviorEvent: BehaviorEvent
|
|
3430
3566
|
editor: PortableTextSlateEditor
|
|
3431
|
-
defaultActionCallback?: () => void
|
|
3432
3567
|
nativeEvent?: {
|
|
3433
3568
|
preventDefault: () => void
|
|
3434
3569
|
}
|
|
@@ -3527,6 +3662,7 @@ declare const editorMachine: StateMachine<
|
|
|
3527
3662
|
ghost?: HTMLElement
|
|
3528
3663
|
origin: Pick<EventPosition, 'selection'>
|
|
3529
3664
|
}
|
|
3665
|
+
slateEditor?: PortableTextSlateEditor
|
|
3530
3666
|
},
|
|
3531
3667
|
{
|
|
3532
3668
|
type: 'update value'
|
|
@@ -3567,6 +3703,14 @@ declare const editorMachine: StateMachine<
|
|
|
3567
3703
|
maxBlocks: number | undefined
|
|
3568
3704
|
}
|
|
3569
3705
|
| PatchesEvent
|
|
3706
|
+
| {
|
|
3707
|
+
type: 'blur'
|
|
3708
|
+
editor: PortableTextSlateEditor
|
|
3709
|
+
}
|
|
3710
|
+
| {
|
|
3711
|
+
type: 'focus'
|
|
3712
|
+
editor: PortableTextSlateEditor
|
|
3713
|
+
}
|
|
3570
3714
|
| {
|
|
3571
3715
|
type: 'normalizing'
|
|
3572
3716
|
}
|
|
@@ -3580,7 +3724,6 @@ declare const editorMachine: StateMachine<
|
|
|
3580
3724
|
type: 'behavior event'
|
|
3581
3725
|
behaviorEvent: BehaviorEvent
|
|
3582
3726
|
editor: PortableTextSlateEditor
|
|
3583
|
-
defaultActionCallback?: () => void
|
|
3584
3727
|
nativeEvent?: {
|
|
3585
3728
|
preventDefault: () => void
|
|
3586
3729
|
}
|
|
@@ -3676,6 +3819,7 @@ declare const editorMachine: StateMachine<
|
|
|
3676
3819
|
ghost?: HTMLElement
|
|
3677
3820
|
origin: Pick<EventPosition, 'selection'>
|
|
3678
3821
|
}
|
|
3822
|
+
slateEditor?: PortableTextSlateEditor
|
|
3679
3823
|
},
|
|
3680
3824
|
{
|
|
3681
3825
|
type: 'update maxBlocks'
|
|
@@ -3716,6 +3860,14 @@ declare const editorMachine: StateMachine<
|
|
|
3716
3860
|
maxBlocks: number | undefined
|
|
3717
3861
|
}
|
|
3718
3862
|
| PatchesEvent
|
|
3863
|
+
| {
|
|
3864
|
+
type: 'blur'
|
|
3865
|
+
editor: PortableTextSlateEditor
|
|
3866
|
+
}
|
|
3867
|
+
| {
|
|
3868
|
+
type: 'focus'
|
|
3869
|
+
editor: PortableTextSlateEditor
|
|
3870
|
+
}
|
|
3719
3871
|
| {
|
|
3720
3872
|
type: 'normalizing'
|
|
3721
3873
|
}
|
|
@@ -3729,7 +3881,6 @@ declare const editorMachine: StateMachine<
|
|
|
3729
3881
|
type: 'behavior event'
|
|
3730
3882
|
behaviorEvent: BehaviorEvent
|
|
3731
3883
|
editor: PortableTextSlateEditor
|
|
3732
|
-
defaultActionCallback?: () => void
|
|
3733
3884
|
nativeEvent?: {
|
|
3734
3885
|
preventDefault: () => void
|
|
3735
3886
|
}
|
|
@@ -3837,12 +3988,12 @@ declare const editorMachine: StateMachine<
|
|
|
3837
3988
|
ghost?: HTMLElement
|
|
3838
3989
|
origin: Pick<EventPosition, 'selection'>
|
|
3839
3990
|
}
|
|
3991
|
+
slateEditor?: PortableTextSlateEditor
|
|
3840
3992
|
},
|
|
3841
3993
|
{
|
|
3842
3994
|
type: 'behavior event'
|
|
3843
3995
|
behaviorEvent: BehaviorEvent
|
|
3844
3996
|
editor: PortableTextSlateEditor
|
|
3845
|
-
defaultActionCallback?: () => void
|
|
3846
3997
|
nativeEvent?: {
|
|
3847
3998
|
preventDefault: () => void
|
|
3848
3999
|
}
|
|
@@ -3875,6 +4026,7 @@ declare const editorMachine: StateMachine<
|
|
|
3875
4026
|
ghost?: HTMLElement
|
|
3876
4027
|
origin: Pick<EventPosition, 'selection'>
|
|
3877
4028
|
}
|
|
4029
|
+
slateEditor?: PortableTextSlateEditor
|
|
3878
4030
|
},
|
|
3879
4031
|
{
|
|
3880
4032
|
type: 'done syncing initial value'
|
|
@@ -3907,6 +4059,7 @@ declare const editorMachine: StateMachine<
|
|
|
3907
4059
|
ghost?: HTMLElement
|
|
3908
4060
|
origin: Pick<EventPosition, 'selection'>
|
|
3909
4061
|
}
|
|
4062
|
+
slateEditor?: PortableTextSlateEditor
|
|
3910
4063
|
},
|
|
3911
4064
|
{
|
|
3912
4065
|
type: 'update readOnly'
|
|
@@ -3940,6 +4093,7 @@ declare const editorMachine: StateMachine<
|
|
|
3940
4093
|
ghost?: HTMLElement
|
|
3941
4094
|
origin: Pick<EventPosition, 'selection'>
|
|
3942
4095
|
}
|
|
4096
|
+
slateEditor?: PortableTextSlateEditor
|
|
3943
4097
|
},
|
|
3944
4098
|
{
|
|
3945
4099
|
type: 'update readOnly'
|
|
@@ -3952,6 +4106,169 @@ declare const editorMachine: StateMachine<
|
|
|
3952
4106
|
readonly 'behavior event': {
|
|
3953
4107
|
readonly actions: 'handle behavior event'
|
|
3954
4108
|
}
|
|
4109
|
+
readonly 'blur': {
|
|
4110
|
+
readonly actions: 'handle blur'
|
|
4111
|
+
}
|
|
4112
|
+
readonly 'focus': {
|
|
4113
|
+
readonly target: '.focusing'
|
|
4114
|
+
readonly actions: readonly [
|
|
4115
|
+
ActionFunction<
|
|
4116
|
+
{
|
|
4117
|
+
behaviors: Set<Behavior>
|
|
4118
|
+
converters: Set<Converter>
|
|
4119
|
+
keyGenerator: () => string
|
|
4120
|
+
pendingEvents: Array<InternalPatchEvent | MutationEvent>
|
|
4121
|
+
schema: EditorSchema
|
|
4122
|
+
initialReadOnly: boolean
|
|
4123
|
+
maxBlocks: number | undefined
|
|
4124
|
+
selection: EditorSelection
|
|
4125
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
4126
|
+
internalDrag?: {
|
|
4127
|
+
ghost?: HTMLElement
|
|
4128
|
+
origin: Pick<EventPosition, 'selection'>
|
|
4129
|
+
}
|
|
4130
|
+
slateEditor?: PortableTextSlateEditor
|
|
4131
|
+
},
|
|
4132
|
+
{
|
|
4133
|
+
type: 'focus'
|
|
4134
|
+
editor: PortableTextSlateEditor
|
|
4135
|
+
},
|
|
4136
|
+
| InternalPatchEvent
|
|
4137
|
+
| MutationEvent
|
|
4138
|
+
| {
|
|
4139
|
+
type: 'add behavior'
|
|
4140
|
+
behavior: Behavior
|
|
4141
|
+
}
|
|
4142
|
+
| {
|
|
4143
|
+
type: 'remove behavior'
|
|
4144
|
+
behavior: Behavior
|
|
4145
|
+
}
|
|
4146
|
+
| {
|
|
4147
|
+
type: 'update readOnly'
|
|
4148
|
+
readOnly: boolean
|
|
4149
|
+
}
|
|
4150
|
+
| {
|
|
4151
|
+
type: 'update schema'
|
|
4152
|
+
schema: EditorSchema
|
|
4153
|
+
}
|
|
4154
|
+
| {
|
|
4155
|
+
type: 'update behaviors'
|
|
4156
|
+
behaviors: Array<Behavior>
|
|
4157
|
+
}
|
|
4158
|
+
| {
|
|
4159
|
+
type: 'update key generator'
|
|
4160
|
+
keyGenerator: () => string
|
|
4161
|
+
}
|
|
4162
|
+
| {
|
|
4163
|
+
type: 'update value'
|
|
4164
|
+
value: Array<PortableTextBlock> | undefined
|
|
4165
|
+
}
|
|
4166
|
+
| {
|
|
4167
|
+
type: 'update maxBlocks'
|
|
4168
|
+
maxBlocks: number | undefined
|
|
4169
|
+
}
|
|
4170
|
+
| PatchesEvent
|
|
4171
|
+
| {
|
|
4172
|
+
type: 'blur'
|
|
4173
|
+
editor: PortableTextSlateEditor
|
|
4174
|
+
}
|
|
4175
|
+
| {
|
|
4176
|
+
type: 'focus'
|
|
4177
|
+
editor: PortableTextSlateEditor
|
|
4178
|
+
}
|
|
4179
|
+
| {
|
|
4180
|
+
type: 'normalizing'
|
|
4181
|
+
}
|
|
4182
|
+
| {
|
|
4183
|
+
type: 'done normalizing'
|
|
4184
|
+
}
|
|
4185
|
+
| {
|
|
4186
|
+
type: 'done syncing initial value'
|
|
4187
|
+
}
|
|
4188
|
+
| {
|
|
4189
|
+
type: 'behavior event'
|
|
4190
|
+
behaviorEvent: BehaviorEvent
|
|
4191
|
+
editor: PortableTextSlateEditor
|
|
4192
|
+
nativeEvent?: {
|
|
4193
|
+
preventDefault: () => void
|
|
4194
|
+
}
|
|
4195
|
+
}
|
|
4196
|
+
| {
|
|
4197
|
+
type: 'notify.patch'
|
|
4198
|
+
patch: Patch
|
|
4199
|
+
}
|
|
4200
|
+
| {
|
|
4201
|
+
type: 'notify.mutation'
|
|
4202
|
+
patches: Array<Patch>
|
|
4203
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
4204
|
+
value: Array<PortableTextBlock> | undefined
|
|
4205
|
+
}
|
|
4206
|
+
| {
|
|
4207
|
+
type: 'notify.blurred'
|
|
4208
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4209
|
+
}
|
|
4210
|
+
| {
|
|
4211
|
+
type: 'notify.done loading'
|
|
4212
|
+
}
|
|
4213
|
+
| {
|
|
4214
|
+
type: 'notify.editable'
|
|
4215
|
+
}
|
|
4216
|
+
| {
|
|
4217
|
+
type: 'notify.error'
|
|
4218
|
+
name: string
|
|
4219
|
+
description: string
|
|
4220
|
+
data: unknown
|
|
4221
|
+
}
|
|
4222
|
+
| {
|
|
4223
|
+
type: 'notify.focused'
|
|
4224
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4225
|
+
}
|
|
4226
|
+
| {
|
|
4227
|
+
type: 'notify.invalid value'
|
|
4228
|
+
resolution: InvalidValueResolution | null
|
|
4229
|
+
value: Array<PortableTextBlock> | undefined
|
|
4230
|
+
}
|
|
4231
|
+
| {
|
|
4232
|
+
type: 'notify.loading'
|
|
4233
|
+
}
|
|
4234
|
+
| {
|
|
4235
|
+
type: 'notify.read only'
|
|
4236
|
+
}
|
|
4237
|
+
| {
|
|
4238
|
+
type: 'notify.ready'
|
|
4239
|
+
}
|
|
4240
|
+
| {
|
|
4241
|
+
type: 'notify.selection'
|
|
4242
|
+
selection: EditorSelection
|
|
4243
|
+
}
|
|
4244
|
+
| {
|
|
4245
|
+
type: 'notify.value changed'
|
|
4246
|
+
value: Array<PortableTextBlock> | undefined
|
|
4247
|
+
}
|
|
4248
|
+
| {
|
|
4249
|
+
type: 'notify.unset'
|
|
4250
|
+
previousValue: Array<PortableTextBlock>
|
|
4251
|
+
}
|
|
4252
|
+
| {
|
|
4253
|
+
type: 'dragstart'
|
|
4254
|
+
origin: Pick<EventPosition, 'selection'>
|
|
4255
|
+
ghost?: HTMLElement
|
|
4256
|
+
}
|
|
4257
|
+
| {
|
|
4258
|
+
type: 'dragend'
|
|
4259
|
+
}
|
|
4260
|
+
| {
|
|
4261
|
+
type: 'drop'
|
|
4262
|
+
},
|
|
4263
|
+
undefined,
|
|
4264
|
+
never,
|
|
4265
|
+
never,
|
|
4266
|
+
never,
|
|
4267
|
+
never,
|
|
4268
|
+
never
|
|
4269
|
+
>,
|
|
4270
|
+
]
|
|
4271
|
+
}
|
|
3955
4272
|
}
|
|
3956
4273
|
readonly initial: 'idle'
|
|
3957
4274
|
readonly states: {
|
|
@@ -3976,6 +4293,7 @@ declare const editorMachine: StateMachine<
|
|
|
3976
4293
|
ghost?: HTMLElement
|
|
3977
4294
|
origin: Pick<EventPosition, 'selection'>
|
|
3978
4295
|
}
|
|
4296
|
+
slateEditor?: PortableTextSlateEditor
|
|
3979
4297
|
},
|
|
3980
4298
|
{
|
|
3981
4299
|
type: 'dragstart'
|
|
@@ -4017,6 +4335,14 @@ declare const editorMachine: StateMachine<
|
|
|
4017
4335
|
maxBlocks: number | undefined
|
|
4018
4336
|
}
|
|
4019
4337
|
| PatchesEvent
|
|
4338
|
+
| {
|
|
4339
|
+
type: 'blur'
|
|
4340
|
+
editor: PortableTextSlateEditor
|
|
4341
|
+
}
|
|
4342
|
+
| {
|
|
4343
|
+
type: 'focus'
|
|
4344
|
+
editor: PortableTextSlateEditor
|
|
4345
|
+
}
|
|
4020
4346
|
| {
|
|
4021
4347
|
type: 'normalizing'
|
|
4022
4348
|
}
|
|
@@ -4030,7 +4356,6 @@ declare const editorMachine: StateMachine<
|
|
|
4030
4356
|
type: 'behavior event'
|
|
4031
4357
|
behaviorEvent: BehaviorEvent
|
|
4032
4358
|
editor: PortableTextSlateEditor
|
|
4033
|
-
defaultActionCallback?: () => void
|
|
4034
4359
|
nativeEvent?: {
|
|
4035
4360
|
preventDefault: () => void
|
|
4036
4361
|
}
|
|
@@ -4114,6 +4439,30 @@ declare const editorMachine: StateMachine<
|
|
|
4114
4439
|
}
|
|
4115
4440
|
}
|
|
4116
4441
|
}
|
|
4442
|
+
readonly 'focusing': {
|
|
4443
|
+
readonly initial: 'checking if busy'
|
|
4444
|
+
readonly states: {
|
|
4445
|
+
readonly 'checking if busy': {
|
|
4446
|
+
readonly always: readonly [
|
|
4447
|
+
{
|
|
4448
|
+
readonly guard: 'slate is busy'
|
|
4449
|
+
readonly target: 'busy'
|
|
4450
|
+
},
|
|
4451
|
+
{
|
|
4452
|
+
readonly target: '#editor.edit mode.editable.idle'
|
|
4453
|
+
readonly actions: readonly ['handle focus']
|
|
4454
|
+
},
|
|
4455
|
+
]
|
|
4456
|
+
}
|
|
4457
|
+
readonly 'busy': {
|
|
4458
|
+
readonly after: {
|
|
4459
|
+
readonly 10: {
|
|
4460
|
+
readonly target: 'checking if busy'
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
}
|
|
4117
4466
|
readonly 'dragging internally': {
|
|
4118
4467
|
readonly exit: readonly [
|
|
4119
4468
|
({
|
|
@@ -4133,6 +4482,7 @@ declare const editorMachine: StateMachine<
|
|
|
4133
4482
|
ghost?: HTMLElement
|
|
4134
4483
|
origin: Pick<EventPosition, 'selection'>
|
|
4135
4484
|
}
|
|
4485
|
+
slateEditor?: PortableTextSlateEditor
|
|
4136
4486
|
},
|
|
4137
4487
|
| InternalPatchEvent
|
|
4138
4488
|
| MutationEvent
|
|
@@ -4169,6 +4519,14 @@ declare const editorMachine: StateMachine<
|
|
|
4169
4519
|
maxBlocks: number | undefined
|
|
4170
4520
|
}
|
|
4171
4521
|
| PatchesEvent
|
|
4522
|
+
| {
|
|
4523
|
+
type: 'blur'
|
|
4524
|
+
editor: PortableTextSlateEditor
|
|
4525
|
+
}
|
|
4526
|
+
| {
|
|
4527
|
+
type: 'focus'
|
|
4528
|
+
editor: PortableTextSlateEditor
|
|
4529
|
+
}
|
|
4172
4530
|
| {
|
|
4173
4531
|
type: 'normalizing'
|
|
4174
4532
|
}
|
|
@@ -4182,7 +4540,6 @@ declare const editorMachine: StateMachine<
|
|
|
4182
4540
|
type: 'behavior event'
|
|
4183
4541
|
behaviorEvent: BehaviorEvent
|
|
4184
4542
|
editor: PortableTextSlateEditor
|
|
4185
|
-
defaultActionCallback?: () => void
|
|
4186
4543
|
nativeEvent?: {
|
|
4187
4544
|
preventDefault: () => void
|
|
4188
4545
|
}
|
|
@@ -4289,6 +4646,14 @@ declare const editorMachine: StateMachine<
|
|
|
4289
4646
|
maxBlocks: number | undefined
|
|
4290
4647
|
}
|
|
4291
4648
|
| PatchesEvent
|
|
4649
|
+
| {
|
|
4650
|
+
type: 'blur'
|
|
4651
|
+
editor: PortableTextSlateEditor
|
|
4652
|
+
}
|
|
4653
|
+
| {
|
|
4654
|
+
type: 'focus'
|
|
4655
|
+
editor: PortableTextSlateEditor
|
|
4656
|
+
}
|
|
4292
4657
|
| {
|
|
4293
4658
|
type: 'normalizing'
|
|
4294
4659
|
}
|
|
@@ -4302,7 +4667,6 @@ declare const editorMachine: StateMachine<
|
|
|
4302
4667
|
type: 'behavior event'
|
|
4303
4668
|
behaviorEvent: BehaviorEvent
|
|
4304
4669
|
editor: PortableTextSlateEditor
|
|
4305
|
-
defaultActionCallback?: () => void
|
|
4306
4670
|
nativeEvent?: {
|
|
4307
4671
|
preventDefault: () => void
|
|
4308
4672
|
}
|
|
@@ -4390,6 +4754,7 @@ declare const editorMachine: StateMachine<
|
|
|
4390
4754
|
ghost?: HTMLElement
|
|
4391
4755
|
origin: Pick<EventPosition, 'selection'>
|
|
4392
4756
|
}
|
|
4757
|
+
slateEditor?: PortableTextSlateEditor
|
|
4393
4758
|
},
|
|
4394
4759
|
| InternalPatchEvent
|
|
4395
4760
|
| MutationEvent
|
|
@@ -4426,6 +4791,14 @@ declare const editorMachine: StateMachine<
|
|
|
4426
4791
|
maxBlocks: number | undefined
|
|
4427
4792
|
}
|
|
4428
4793
|
| PatchesEvent
|
|
4794
|
+
| {
|
|
4795
|
+
type: 'blur'
|
|
4796
|
+
editor: PortableTextSlateEditor
|
|
4797
|
+
}
|
|
4798
|
+
| {
|
|
4799
|
+
type: 'focus'
|
|
4800
|
+
editor: PortableTextSlateEditor
|
|
4801
|
+
}
|
|
4429
4802
|
| {
|
|
4430
4803
|
type: 'normalizing'
|
|
4431
4804
|
}
|
|
@@ -4439,7 +4812,6 @@ declare const editorMachine: StateMachine<
|
|
|
4439
4812
|
type: 'behavior event'
|
|
4440
4813
|
behaviorEvent: BehaviorEvent
|
|
4441
4814
|
editor: PortableTextSlateEditor
|
|
4442
|
-
defaultActionCallback?: () => void
|
|
4443
4815
|
nativeEvent?: {
|
|
4444
4816
|
preventDefault: () => void
|
|
4445
4817
|
}
|
|
@@ -4546,6 +4918,14 @@ declare const editorMachine: StateMachine<
|
|
|
4546
4918
|
maxBlocks: number | undefined
|
|
4547
4919
|
}
|
|
4548
4920
|
| PatchesEvent
|
|
4921
|
+
| {
|
|
4922
|
+
type: 'blur'
|
|
4923
|
+
editor: PortableTextSlateEditor
|
|
4924
|
+
}
|
|
4925
|
+
| {
|
|
4926
|
+
type: 'focus'
|
|
4927
|
+
editor: PortableTextSlateEditor
|
|
4928
|
+
}
|
|
4549
4929
|
| {
|
|
4550
4930
|
type: 'normalizing'
|
|
4551
4931
|
}
|
|
@@ -4559,7 +4939,6 @@ declare const editorMachine: StateMachine<
|
|
|
4559
4939
|
type: 'behavior event'
|
|
4560
4940
|
behaviorEvent: BehaviorEvent
|
|
4561
4941
|
editor: PortableTextSlateEditor
|
|
4562
|
-
defaultActionCallback?: () => void
|
|
4563
4942
|
nativeEvent?: {
|
|
4564
4943
|
preventDefault: () => void
|
|
4565
4944
|
}
|
|
@@ -4888,6 +5267,12 @@ declare type EventPosition = {
|
|
|
4888
5267
|
}
|
|
4889
5268
|
|
|
4890
5269
|
declare type ExternalBehaviorEvent =
|
|
5270
|
+
| {
|
|
5271
|
+
type: ExternalBehaviorEventType<'blur'>
|
|
5272
|
+
}
|
|
5273
|
+
| {
|
|
5274
|
+
type: ExternalBehaviorEventType<'focus'>
|
|
5275
|
+
}
|
|
4891
5276
|
| {
|
|
4892
5277
|
type: ExternalBehaviorEventType<'insert', 'block object'>
|
|
4893
5278
|
placement: InsertPlacement
|
|
@@ -4905,7 +5290,7 @@ declare type ExternalBehaviorEvent =
|
|
|
4905
5290
|
/**************************************
|
|
4906
5291
|
* External events
|
|
4907
5292
|
**************************************/
|
|
4908
|
-
declare type ExternalBehaviorEventNamespace = 'insert'
|
|
5293
|
+
declare type ExternalBehaviorEventNamespace = 'blur' | 'focus' | 'insert'
|
|
4909
5294
|
|
|
4910
5295
|
declare type ExternalBehaviorEventType<
|
|
4911
5296
|
TNamespace extends ExternalBehaviorEventNamespace,
|
|
@@ -5329,9 +5714,6 @@ declare type SyntheticBehaviorEvent =
|
|
|
5329
5714
|
at: [KeyedSegment]
|
|
5330
5715
|
props: Array<string>
|
|
5331
5716
|
}
|
|
5332
|
-
| {
|
|
5333
|
-
type: StrictExtract<SyntheticBehaviorEventType, 'blur'>
|
|
5334
|
-
}
|
|
5335
5717
|
| {
|
|
5336
5718
|
type: StrictExtract<SyntheticBehaviorEventType, 'decorator.add'>
|
|
5337
5719
|
decorator: string
|
|
@@ -5360,9 +5742,6 @@ declare type SyntheticBehaviorEvent =
|
|
|
5360
5742
|
type: StrictExtract<SyntheticBehaviorEventType, 'delete.forward'>
|
|
5361
5743
|
unit: TextUnit
|
|
5362
5744
|
}
|
|
5363
|
-
| {
|
|
5364
|
-
type: StrictExtract<SyntheticBehaviorEventType, 'focus'>
|
|
5365
|
-
}
|
|
5366
5745
|
| {
|
|
5367
5746
|
type: StrictExtract<SyntheticBehaviorEventType, 'history.redo'>
|
|
5368
5747
|
}
|
|
@@ -5434,14 +5813,12 @@ declare const syntheticBehaviorEventTypes: readonly [
|
|
|
5434
5813
|
'annotation.remove',
|
|
5435
5814
|
'block.set',
|
|
5436
5815
|
'block.unset',
|
|
5437
|
-
'blur',
|
|
5438
5816
|
'decorator.add',
|
|
5439
5817
|
'decorator.remove',
|
|
5440
5818
|
'delete',
|
|
5441
5819
|
'delete.backward',
|
|
5442
5820
|
'delete.block',
|
|
5443
5821
|
'delete.forward',
|
|
5444
|
-
'focus',
|
|
5445
5822
|
'history.redo',
|
|
5446
5823
|
'history.undo',
|
|
5447
5824
|
'insert.inline object',
|