@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/index.d.cts
CHANGED
|
@@ -894,6 +894,7 @@ declare const editorMachine: StateMachine<
|
|
|
894
894
|
ghost?: HTMLElement
|
|
895
895
|
origin: Pick<EventPosition, 'selection'>
|
|
896
896
|
}
|
|
897
|
+
slateEditor?: PortableTextSlateEditor
|
|
897
898
|
},
|
|
898
899
|
| InternalPatchEvent
|
|
899
900
|
| MutationEvent
|
|
@@ -930,6 +931,14 @@ declare const editorMachine: StateMachine<
|
|
|
930
931
|
maxBlocks: number | undefined
|
|
931
932
|
}
|
|
932
933
|
| PatchesEvent
|
|
934
|
+
| {
|
|
935
|
+
type: 'blur'
|
|
936
|
+
editor: PortableTextSlateEditor
|
|
937
|
+
}
|
|
938
|
+
| {
|
|
939
|
+
type: 'focus'
|
|
940
|
+
editor: PortableTextSlateEditor
|
|
941
|
+
}
|
|
933
942
|
| {
|
|
934
943
|
type: 'normalizing'
|
|
935
944
|
}
|
|
@@ -943,7 +952,6 @@ declare const editorMachine: StateMachine<
|
|
|
943
952
|
type: 'behavior event'
|
|
944
953
|
behaviorEvent: BehaviorEvent
|
|
945
954
|
editor: PortableTextSlateEditor
|
|
946
|
-
defaultActionCallback?: () => void
|
|
947
955
|
nativeEvent?: {
|
|
948
956
|
preventDefault: () => void
|
|
949
957
|
}
|
|
@@ -1066,17 +1074,33 @@ declare const editorMachine: StateMachine<
|
|
|
1066
1074
|
type: 'clear pending events'
|
|
1067
1075
|
params: NonReducibleUnknown
|
|
1068
1076
|
}
|
|
1077
|
+
'handle blur': {
|
|
1078
|
+
type: 'handle blur'
|
|
1079
|
+
params: unknown
|
|
1080
|
+
}
|
|
1081
|
+
'handle focus': {
|
|
1082
|
+
type: 'handle focus'
|
|
1083
|
+
params: unknown
|
|
1084
|
+
}
|
|
1069
1085
|
'handle behavior event': {
|
|
1070
1086
|
type: 'handle behavior event'
|
|
1071
1087
|
params: unknown
|
|
1072
1088
|
}
|
|
1073
1089
|
}>,
|
|
1074
|
-
|
|
1090
|
+
{
|
|
1091
|
+
type: 'slate is busy'
|
|
1092
|
+
params: unknown
|
|
1093
|
+
},
|
|
1075
1094
|
never,
|
|
1076
1095
|
{
|
|
1077
1096
|
'edit mode':
|
|
1078
1097
|
| {
|
|
1079
|
-
editable:
|
|
1098
|
+
editable:
|
|
1099
|
+
| 'dragging internally'
|
|
1100
|
+
| 'idle'
|
|
1101
|
+
| {
|
|
1102
|
+
focusing: 'checking if busy' | 'busy'
|
|
1103
|
+
}
|
|
1080
1104
|
}
|
|
1081
1105
|
| {
|
|
1082
1106
|
'read only': 'read only' | 'determine initial edit mode'
|
|
@@ -1199,6 +1223,7 @@ declare const editorMachine: StateMachine<
|
|
|
1199
1223
|
ghost?: HTMLElement
|
|
1200
1224
|
origin: Pick<EventPosition, 'selection'>
|
|
1201
1225
|
}
|
|
1226
|
+
slateEditor?: PortableTextSlateEditor
|
|
1202
1227
|
},
|
|
1203
1228
|
| InternalPatchEvent
|
|
1204
1229
|
| MutationEvent
|
|
@@ -1235,6 +1260,14 @@ declare const editorMachine: StateMachine<
|
|
|
1235
1260
|
maxBlocks: number | undefined
|
|
1236
1261
|
}
|
|
1237
1262
|
| PatchesEvent
|
|
1263
|
+
| {
|
|
1264
|
+
type: 'blur'
|
|
1265
|
+
editor: PortableTextSlateEditor
|
|
1266
|
+
}
|
|
1267
|
+
| {
|
|
1268
|
+
type: 'focus'
|
|
1269
|
+
editor: PortableTextSlateEditor
|
|
1270
|
+
}
|
|
1238
1271
|
| {
|
|
1239
1272
|
type: 'normalizing'
|
|
1240
1273
|
}
|
|
@@ -1248,7 +1281,6 @@ declare const editorMachine: StateMachine<
|
|
|
1248
1281
|
type: 'behavior event'
|
|
1249
1282
|
behaviorEvent: BehaviorEvent
|
|
1250
1283
|
editor: PortableTextSlateEditor
|
|
1251
|
-
defaultActionCallback?: () => void
|
|
1252
1284
|
nativeEvent?: {
|
|
1253
1285
|
preventDefault: () => void
|
|
1254
1286
|
}
|
|
@@ -1362,6 +1394,14 @@ declare const editorMachine: StateMachine<
|
|
|
1362
1394
|
maxBlocks: number | undefined
|
|
1363
1395
|
}
|
|
1364
1396
|
| PatchesEvent
|
|
1397
|
+
| {
|
|
1398
|
+
type: 'blur'
|
|
1399
|
+
editor: PortableTextSlateEditor
|
|
1400
|
+
}
|
|
1401
|
+
| {
|
|
1402
|
+
type: 'focus'
|
|
1403
|
+
editor: PortableTextSlateEditor
|
|
1404
|
+
}
|
|
1365
1405
|
| {
|
|
1366
1406
|
type: 'normalizing'
|
|
1367
1407
|
}
|
|
@@ -1375,7 +1415,6 @@ declare const editorMachine: StateMachine<
|
|
|
1375
1415
|
type: 'behavior event'
|
|
1376
1416
|
behaviorEvent: BehaviorEvent
|
|
1377
1417
|
editor: PortableTextSlateEditor
|
|
1378
|
-
defaultActionCallback?: () => void
|
|
1379
1418
|
nativeEvent?: {
|
|
1380
1419
|
preventDefault: () => void
|
|
1381
1420
|
}
|
|
@@ -1477,6 +1516,7 @@ declare const editorMachine: StateMachine<
|
|
|
1477
1516
|
ghost?: HTMLElement
|
|
1478
1517
|
origin: Pick<EventPosition, 'selection'>
|
|
1479
1518
|
}
|
|
1519
|
+
slateEditor?: PortableTextSlateEditor
|
|
1480
1520
|
},
|
|
1481
1521
|
{
|
|
1482
1522
|
type: 'notify.blurred'
|
|
@@ -1517,6 +1557,14 @@ declare const editorMachine: StateMachine<
|
|
|
1517
1557
|
maxBlocks: number | undefined
|
|
1518
1558
|
}
|
|
1519
1559
|
| PatchesEvent
|
|
1560
|
+
| {
|
|
1561
|
+
type: 'blur'
|
|
1562
|
+
editor: PortableTextSlateEditor
|
|
1563
|
+
}
|
|
1564
|
+
| {
|
|
1565
|
+
type: 'focus'
|
|
1566
|
+
editor: PortableTextSlateEditor
|
|
1567
|
+
}
|
|
1520
1568
|
| {
|
|
1521
1569
|
type: 'normalizing'
|
|
1522
1570
|
}
|
|
@@ -1530,7 +1578,6 @@ declare const editorMachine: StateMachine<
|
|
|
1530
1578
|
type: 'behavior event'
|
|
1531
1579
|
behaviorEvent: BehaviorEvent
|
|
1532
1580
|
editor: PortableTextSlateEditor
|
|
1533
|
-
defaultActionCallback?: () => void
|
|
1534
1581
|
nativeEvent?: {
|
|
1535
1582
|
preventDefault: () => void
|
|
1536
1583
|
}
|
|
@@ -1672,6 +1719,7 @@ declare const editorMachine: StateMachine<
|
|
|
1672
1719
|
ghost?: HTMLElement
|
|
1673
1720
|
origin: Pick<EventPosition, 'selection'>
|
|
1674
1721
|
}
|
|
1722
|
+
slateEditor?: PortableTextSlateEditor
|
|
1675
1723
|
},
|
|
1676
1724
|
{
|
|
1677
1725
|
type: 'notify.done loading'
|
|
@@ -1711,6 +1759,14 @@ declare const editorMachine: StateMachine<
|
|
|
1711
1759
|
maxBlocks: number | undefined
|
|
1712
1760
|
}
|
|
1713
1761
|
| PatchesEvent
|
|
1762
|
+
| {
|
|
1763
|
+
type: 'blur'
|
|
1764
|
+
editor: PortableTextSlateEditor
|
|
1765
|
+
}
|
|
1766
|
+
| {
|
|
1767
|
+
type: 'focus'
|
|
1768
|
+
editor: PortableTextSlateEditor
|
|
1769
|
+
}
|
|
1714
1770
|
| {
|
|
1715
1771
|
type: 'normalizing'
|
|
1716
1772
|
}
|
|
@@ -1724,7 +1780,6 @@ declare const editorMachine: StateMachine<
|
|
|
1724
1780
|
type: 'behavior event'
|
|
1725
1781
|
behaviorEvent: BehaviorEvent
|
|
1726
1782
|
editor: PortableTextSlateEditor
|
|
1727
|
-
defaultActionCallback?: () => void
|
|
1728
1783
|
nativeEvent?: {
|
|
1729
1784
|
preventDefault: () => void
|
|
1730
1785
|
}
|
|
@@ -1866,6 +1921,7 @@ declare const editorMachine: StateMachine<
|
|
|
1866
1921
|
ghost?: HTMLElement
|
|
1867
1922
|
origin: Pick<EventPosition, 'selection'>
|
|
1868
1923
|
}
|
|
1924
|
+
slateEditor?: PortableTextSlateEditor
|
|
1869
1925
|
},
|
|
1870
1926
|
{
|
|
1871
1927
|
type: 'notify.error'
|
|
@@ -1908,6 +1964,14 @@ declare const editorMachine: StateMachine<
|
|
|
1908
1964
|
maxBlocks: number | undefined
|
|
1909
1965
|
}
|
|
1910
1966
|
| PatchesEvent
|
|
1967
|
+
| {
|
|
1968
|
+
type: 'blur'
|
|
1969
|
+
editor: PortableTextSlateEditor
|
|
1970
|
+
}
|
|
1971
|
+
| {
|
|
1972
|
+
type: 'focus'
|
|
1973
|
+
editor: PortableTextSlateEditor
|
|
1974
|
+
}
|
|
1911
1975
|
| {
|
|
1912
1976
|
type: 'normalizing'
|
|
1913
1977
|
}
|
|
@@ -1921,7 +1985,6 @@ declare const editorMachine: StateMachine<
|
|
|
1921
1985
|
type: 'behavior event'
|
|
1922
1986
|
behaviorEvent: BehaviorEvent
|
|
1923
1987
|
editor: PortableTextSlateEditor
|
|
1924
|
-
defaultActionCallback?: () => void
|
|
1925
1988
|
nativeEvent?: {
|
|
1926
1989
|
preventDefault: () => void
|
|
1927
1990
|
}
|
|
@@ -2063,6 +2126,7 @@ declare const editorMachine: StateMachine<
|
|
|
2063
2126
|
ghost?: HTMLElement
|
|
2064
2127
|
origin: Pick<EventPosition, 'selection'>
|
|
2065
2128
|
}
|
|
2129
|
+
slateEditor?: PortableTextSlateEditor
|
|
2066
2130
|
},
|
|
2067
2131
|
{
|
|
2068
2132
|
type: 'notify.invalid value'
|
|
@@ -2104,6 +2168,14 @@ declare const editorMachine: StateMachine<
|
|
|
2104
2168
|
maxBlocks: number | undefined
|
|
2105
2169
|
}
|
|
2106
2170
|
| PatchesEvent
|
|
2171
|
+
| {
|
|
2172
|
+
type: 'blur'
|
|
2173
|
+
editor: PortableTextSlateEditor
|
|
2174
|
+
}
|
|
2175
|
+
| {
|
|
2176
|
+
type: 'focus'
|
|
2177
|
+
editor: PortableTextSlateEditor
|
|
2178
|
+
}
|
|
2107
2179
|
| {
|
|
2108
2180
|
type: 'normalizing'
|
|
2109
2181
|
}
|
|
@@ -2117,7 +2189,6 @@ declare const editorMachine: StateMachine<
|
|
|
2117
2189
|
type: 'behavior event'
|
|
2118
2190
|
behaviorEvent: BehaviorEvent
|
|
2119
2191
|
editor: PortableTextSlateEditor
|
|
2120
|
-
defaultActionCallback?: () => void
|
|
2121
2192
|
nativeEvent?: {
|
|
2122
2193
|
preventDefault: () => void
|
|
2123
2194
|
}
|
|
@@ -2259,6 +2330,7 @@ declare const editorMachine: StateMachine<
|
|
|
2259
2330
|
ghost?: HTMLElement
|
|
2260
2331
|
origin: Pick<EventPosition, 'selection'>
|
|
2261
2332
|
}
|
|
2333
|
+
slateEditor?: PortableTextSlateEditor
|
|
2262
2334
|
},
|
|
2263
2335
|
{
|
|
2264
2336
|
type: 'notify.focused'
|
|
@@ -2299,6 +2371,14 @@ declare const editorMachine: StateMachine<
|
|
|
2299
2371
|
maxBlocks: number | undefined
|
|
2300
2372
|
}
|
|
2301
2373
|
| PatchesEvent
|
|
2374
|
+
| {
|
|
2375
|
+
type: 'blur'
|
|
2376
|
+
editor: PortableTextSlateEditor
|
|
2377
|
+
}
|
|
2378
|
+
| {
|
|
2379
|
+
type: 'focus'
|
|
2380
|
+
editor: PortableTextSlateEditor
|
|
2381
|
+
}
|
|
2302
2382
|
| {
|
|
2303
2383
|
type: 'normalizing'
|
|
2304
2384
|
}
|
|
@@ -2312,7 +2392,6 @@ declare const editorMachine: StateMachine<
|
|
|
2312
2392
|
type: 'behavior event'
|
|
2313
2393
|
behaviorEvent: BehaviorEvent
|
|
2314
2394
|
editor: PortableTextSlateEditor
|
|
2315
|
-
defaultActionCallback?: () => void
|
|
2316
2395
|
nativeEvent?: {
|
|
2317
2396
|
preventDefault: () => void
|
|
2318
2397
|
}
|
|
@@ -2455,6 +2534,7 @@ declare const editorMachine: StateMachine<
|
|
|
2455
2534
|
ghost?: HTMLElement
|
|
2456
2535
|
origin: Pick<EventPosition, 'selection'>
|
|
2457
2536
|
}
|
|
2537
|
+
slateEditor?: PortableTextSlateEditor
|
|
2458
2538
|
},
|
|
2459
2539
|
{
|
|
2460
2540
|
type: 'notify.selection'
|
|
@@ -2495,6 +2575,14 @@ declare const editorMachine: StateMachine<
|
|
|
2495
2575
|
maxBlocks: number | undefined
|
|
2496
2576
|
}
|
|
2497
2577
|
| PatchesEvent
|
|
2578
|
+
| {
|
|
2579
|
+
type: 'blur'
|
|
2580
|
+
editor: PortableTextSlateEditor
|
|
2581
|
+
}
|
|
2582
|
+
| {
|
|
2583
|
+
type: 'focus'
|
|
2584
|
+
editor: PortableTextSlateEditor
|
|
2585
|
+
}
|
|
2498
2586
|
| {
|
|
2499
2587
|
type: 'normalizing'
|
|
2500
2588
|
}
|
|
@@ -2508,7 +2596,6 @@ declare const editorMachine: StateMachine<
|
|
|
2508
2596
|
type: 'behavior event'
|
|
2509
2597
|
behaviorEvent: BehaviorEvent
|
|
2510
2598
|
editor: PortableTextSlateEditor
|
|
2511
|
-
defaultActionCallback?: () => void
|
|
2512
2599
|
nativeEvent?: {
|
|
2513
2600
|
preventDefault: () => void
|
|
2514
2601
|
}
|
|
@@ -2602,6 +2689,7 @@ declare const editorMachine: StateMachine<
|
|
|
2602
2689
|
ghost?: HTMLElement
|
|
2603
2690
|
origin: Pick<EventPosition, 'selection'>
|
|
2604
2691
|
}
|
|
2692
|
+
slateEditor?: PortableTextSlateEditor
|
|
2605
2693
|
},
|
|
2606
2694
|
{
|
|
2607
2695
|
type: 'notify.selection'
|
|
@@ -2642,6 +2730,14 @@ declare const editorMachine: StateMachine<
|
|
|
2642
2730
|
maxBlocks: number | undefined
|
|
2643
2731
|
}
|
|
2644
2732
|
| PatchesEvent
|
|
2733
|
+
| {
|
|
2734
|
+
type: 'blur'
|
|
2735
|
+
editor: PortableTextSlateEditor
|
|
2736
|
+
}
|
|
2737
|
+
| {
|
|
2738
|
+
type: 'focus'
|
|
2739
|
+
editor: PortableTextSlateEditor
|
|
2740
|
+
}
|
|
2645
2741
|
| {
|
|
2646
2742
|
type: 'normalizing'
|
|
2647
2743
|
}
|
|
@@ -2655,7 +2751,6 @@ declare const editorMachine: StateMachine<
|
|
|
2655
2751
|
type: 'behavior event'
|
|
2656
2752
|
behaviorEvent: BehaviorEvent
|
|
2657
2753
|
editor: PortableTextSlateEditor
|
|
2658
|
-
defaultActionCallback?: () => void
|
|
2659
2754
|
nativeEvent?: {
|
|
2660
2755
|
preventDefault: () => void
|
|
2661
2756
|
}
|
|
@@ -2798,6 +2893,7 @@ declare const editorMachine: StateMachine<
|
|
|
2798
2893
|
ghost?: HTMLElement
|
|
2799
2894
|
origin: Pick<EventPosition, 'selection'>
|
|
2800
2895
|
}
|
|
2896
|
+
slateEditor?: PortableTextSlateEditor
|
|
2801
2897
|
},
|
|
2802
2898
|
{
|
|
2803
2899
|
type: 'notify.unset'
|
|
@@ -2838,6 +2934,14 @@ declare const editorMachine: StateMachine<
|
|
|
2838
2934
|
maxBlocks: number | undefined
|
|
2839
2935
|
}
|
|
2840
2936
|
| PatchesEvent
|
|
2937
|
+
| {
|
|
2938
|
+
type: 'blur'
|
|
2939
|
+
editor: PortableTextSlateEditor
|
|
2940
|
+
}
|
|
2941
|
+
| {
|
|
2942
|
+
type: 'focus'
|
|
2943
|
+
editor: PortableTextSlateEditor
|
|
2944
|
+
}
|
|
2841
2945
|
| {
|
|
2842
2946
|
type: 'normalizing'
|
|
2843
2947
|
}
|
|
@@ -2851,7 +2955,6 @@ declare const editorMachine: StateMachine<
|
|
|
2851
2955
|
type: 'behavior event'
|
|
2852
2956
|
behaviorEvent: BehaviorEvent
|
|
2853
2957
|
editor: PortableTextSlateEditor
|
|
2854
|
-
defaultActionCallback?: () => void
|
|
2855
2958
|
nativeEvent?: {
|
|
2856
2959
|
preventDefault: () => void
|
|
2857
2960
|
}
|
|
@@ -2993,6 +3096,7 @@ declare const editorMachine: StateMachine<
|
|
|
2993
3096
|
ghost?: HTMLElement
|
|
2994
3097
|
origin: Pick<EventPosition, 'selection'>
|
|
2995
3098
|
}
|
|
3099
|
+
slateEditor?: PortableTextSlateEditor
|
|
2996
3100
|
},
|
|
2997
3101
|
{
|
|
2998
3102
|
type: 'notify.loading'
|
|
@@ -3032,6 +3136,14 @@ declare const editorMachine: StateMachine<
|
|
|
3032
3136
|
maxBlocks: number | undefined
|
|
3033
3137
|
}
|
|
3034
3138
|
| PatchesEvent
|
|
3139
|
+
| {
|
|
3140
|
+
type: 'blur'
|
|
3141
|
+
editor: PortableTextSlateEditor
|
|
3142
|
+
}
|
|
3143
|
+
| {
|
|
3144
|
+
type: 'focus'
|
|
3145
|
+
editor: PortableTextSlateEditor
|
|
3146
|
+
}
|
|
3035
3147
|
| {
|
|
3036
3148
|
type: 'normalizing'
|
|
3037
3149
|
}
|
|
@@ -3045,7 +3157,6 @@ declare const editorMachine: StateMachine<
|
|
|
3045
3157
|
type: 'behavior event'
|
|
3046
3158
|
behaviorEvent: BehaviorEvent
|
|
3047
3159
|
editor: PortableTextSlateEditor
|
|
3048
|
-
defaultActionCallback?: () => void
|
|
3049
3160
|
nativeEvent?: {
|
|
3050
3161
|
preventDefault: () => void
|
|
3051
3162
|
}
|
|
@@ -3187,6 +3298,7 @@ declare const editorMachine: StateMachine<
|
|
|
3187
3298
|
ghost?: HTMLElement
|
|
3188
3299
|
origin: Pick<EventPosition, 'selection'>
|
|
3189
3300
|
}
|
|
3301
|
+
slateEditor?: PortableTextSlateEditor
|
|
3190
3302
|
},
|
|
3191
3303
|
{
|
|
3192
3304
|
type: 'notify.value changed'
|
|
@@ -3227,6 +3339,14 @@ declare const editorMachine: StateMachine<
|
|
|
3227
3339
|
maxBlocks: number | undefined
|
|
3228
3340
|
}
|
|
3229
3341
|
| PatchesEvent
|
|
3342
|
+
| {
|
|
3343
|
+
type: 'blur'
|
|
3344
|
+
editor: PortableTextSlateEditor
|
|
3345
|
+
}
|
|
3346
|
+
| {
|
|
3347
|
+
type: 'focus'
|
|
3348
|
+
editor: PortableTextSlateEditor
|
|
3349
|
+
}
|
|
3230
3350
|
| {
|
|
3231
3351
|
type: 'normalizing'
|
|
3232
3352
|
}
|
|
@@ -3240,7 +3360,6 @@ declare const editorMachine: StateMachine<
|
|
|
3240
3360
|
type: 'behavior event'
|
|
3241
3361
|
behaviorEvent: BehaviorEvent
|
|
3242
3362
|
editor: PortableTextSlateEditor
|
|
3243
|
-
defaultActionCallback?: () => void
|
|
3244
3363
|
nativeEvent?: {
|
|
3245
3364
|
preventDefault: () => void
|
|
3246
3365
|
}
|
|
@@ -3388,6 +3507,7 @@ declare const editorMachine: StateMachine<
|
|
|
3388
3507
|
ghost?: HTMLElement
|
|
3389
3508
|
origin: Pick<EventPosition, 'selection'>
|
|
3390
3509
|
}
|
|
3510
|
+
slateEditor?: PortableTextSlateEditor
|
|
3391
3511
|
},
|
|
3392
3512
|
PatchesEvent,
|
|
3393
3513
|
| InternalPatchEvent
|
|
@@ -3425,6 +3545,14 @@ declare const editorMachine: StateMachine<
|
|
|
3425
3545
|
maxBlocks: number | undefined
|
|
3426
3546
|
}
|
|
3427
3547
|
| PatchesEvent
|
|
3548
|
+
| {
|
|
3549
|
+
type: 'blur'
|
|
3550
|
+
editor: PortableTextSlateEditor
|
|
3551
|
+
}
|
|
3552
|
+
| {
|
|
3553
|
+
type: 'focus'
|
|
3554
|
+
editor: PortableTextSlateEditor
|
|
3555
|
+
}
|
|
3428
3556
|
| {
|
|
3429
3557
|
type: 'normalizing'
|
|
3430
3558
|
}
|
|
@@ -3438,7 +3566,6 @@ declare const editorMachine: StateMachine<
|
|
|
3438
3566
|
type: 'behavior event'
|
|
3439
3567
|
behaviorEvent: BehaviorEvent
|
|
3440
3568
|
editor: PortableTextSlateEditor
|
|
3441
|
-
defaultActionCallback?: () => void
|
|
3442
3569
|
nativeEvent?: {
|
|
3443
3570
|
preventDefault: () => void
|
|
3444
3571
|
}
|
|
@@ -3583,6 +3710,7 @@ declare const editorMachine: StateMachine<
|
|
|
3583
3710
|
ghost?: HTMLElement
|
|
3584
3711
|
origin: Pick<EventPosition, 'selection'>
|
|
3585
3712
|
}
|
|
3713
|
+
slateEditor?: PortableTextSlateEditor
|
|
3586
3714
|
},
|
|
3587
3715
|
{
|
|
3588
3716
|
type: 'update key generator'
|
|
@@ -3623,6 +3751,14 @@ declare const editorMachine: StateMachine<
|
|
|
3623
3751
|
maxBlocks: number | undefined
|
|
3624
3752
|
}
|
|
3625
3753
|
| PatchesEvent
|
|
3754
|
+
| {
|
|
3755
|
+
type: 'blur'
|
|
3756
|
+
editor: PortableTextSlateEditor
|
|
3757
|
+
}
|
|
3758
|
+
| {
|
|
3759
|
+
type: 'focus'
|
|
3760
|
+
editor: PortableTextSlateEditor
|
|
3761
|
+
}
|
|
3626
3762
|
| {
|
|
3627
3763
|
type: 'normalizing'
|
|
3628
3764
|
}
|
|
@@ -3636,7 +3772,6 @@ declare const editorMachine: StateMachine<
|
|
|
3636
3772
|
type: 'behavior event'
|
|
3637
3773
|
behaviorEvent: BehaviorEvent
|
|
3638
3774
|
editor: PortableTextSlateEditor
|
|
3639
|
-
defaultActionCallback?: () => void
|
|
3640
3775
|
nativeEvent?: {
|
|
3641
3776
|
preventDefault: () => void
|
|
3642
3777
|
}
|
|
@@ -3735,6 +3870,7 @@ declare const editorMachine: StateMachine<
|
|
|
3735
3870
|
ghost?: HTMLElement
|
|
3736
3871
|
origin: Pick<EventPosition, 'selection'>
|
|
3737
3872
|
}
|
|
3873
|
+
slateEditor?: PortableTextSlateEditor
|
|
3738
3874
|
},
|
|
3739
3875
|
{
|
|
3740
3876
|
type: 'update value'
|
|
@@ -3775,6 +3911,14 @@ declare const editorMachine: StateMachine<
|
|
|
3775
3911
|
maxBlocks: number | undefined
|
|
3776
3912
|
}
|
|
3777
3913
|
| PatchesEvent
|
|
3914
|
+
| {
|
|
3915
|
+
type: 'blur'
|
|
3916
|
+
editor: PortableTextSlateEditor
|
|
3917
|
+
}
|
|
3918
|
+
| {
|
|
3919
|
+
type: 'focus'
|
|
3920
|
+
editor: PortableTextSlateEditor
|
|
3921
|
+
}
|
|
3778
3922
|
| {
|
|
3779
3923
|
type: 'normalizing'
|
|
3780
3924
|
}
|
|
@@ -3788,7 +3932,6 @@ declare const editorMachine: StateMachine<
|
|
|
3788
3932
|
type: 'behavior event'
|
|
3789
3933
|
behaviorEvent: BehaviorEvent
|
|
3790
3934
|
editor: PortableTextSlateEditor
|
|
3791
|
-
defaultActionCallback?: () => void
|
|
3792
3935
|
nativeEvent?: {
|
|
3793
3936
|
preventDefault: () => void
|
|
3794
3937
|
}
|
|
@@ -3884,6 +4027,7 @@ declare const editorMachine: StateMachine<
|
|
|
3884
4027
|
ghost?: HTMLElement
|
|
3885
4028
|
origin: Pick<EventPosition, 'selection'>
|
|
3886
4029
|
}
|
|
4030
|
+
slateEditor?: PortableTextSlateEditor
|
|
3887
4031
|
},
|
|
3888
4032
|
{
|
|
3889
4033
|
type: 'update maxBlocks'
|
|
@@ -3924,6 +4068,14 @@ declare const editorMachine: StateMachine<
|
|
|
3924
4068
|
maxBlocks: number | undefined
|
|
3925
4069
|
}
|
|
3926
4070
|
| PatchesEvent
|
|
4071
|
+
| {
|
|
4072
|
+
type: 'blur'
|
|
4073
|
+
editor: PortableTextSlateEditor
|
|
4074
|
+
}
|
|
4075
|
+
| {
|
|
4076
|
+
type: 'focus'
|
|
4077
|
+
editor: PortableTextSlateEditor
|
|
4078
|
+
}
|
|
3927
4079
|
| {
|
|
3928
4080
|
type: 'normalizing'
|
|
3929
4081
|
}
|
|
@@ -3937,7 +4089,6 @@ declare const editorMachine: StateMachine<
|
|
|
3937
4089
|
type: 'behavior event'
|
|
3938
4090
|
behaviorEvent: BehaviorEvent
|
|
3939
4091
|
editor: PortableTextSlateEditor
|
|
3940
|
-
defaultActionCallback?: () => void
|
|
3941
4092
|
nativeEvent?: {
|
|
3942
4093
|
preventDefault: () => void
|
|
3943
4094
|
}
|
|
@@ -4045,12 +4196,12 @@ declare const editorMachine: StateMachine<
|
|
|
4045
4196
|
ghost?: HTMLElement
|
|
4046
4197
|
origin: Pick<EventPosition, 'selection'>
|
|
4047
4198
|
}
|
|
4199
|
+
slateEditor?: PortableTextSlateEditor
|
|
4048
4200
|
},
|
|
4049
4201
|
{
|
|
4050
4202
|
type: 'behavior event'
|
|
4051
4203
|
behaviorEvent: BehaviorEvent
|
|
4052
4204
|
editor: PortableTextSlateEditor
|
|
4053
|
-
defaultActionCallback?: () => void
|
|
4054
4205
|
nativeEvent?: {
|
|
4055
4206
|
preventDefault: () => void
|
|
4056
4207
|
}
|
|
@@ -4083,6 +4234,7 @@ declare const editorMachine: StateMachine<
|
|
|
4083
4234
|
ghost?: HTMLElement
|
|
4084
4235
|
origin: Pick<EventPosition, 'selection'>
|
|
4085
4236
|
}
|
|
4237
|
+
slateEditor?: PortableTextSlateEditor
|
|
4086
4238
|
},
|
|
4087
4239
|
{
|
|
4088
4240
|
type: 'done syncing initial value'
|
|
@@ -4115,6 +4267,7 @@ declare const editorMachine: StateMachine<
|
|
|
4115
4267
|
ghost?: HTMLElement
|
|
4116
4268
|
origin: Pick<EventPosition, 'selection'>
|
|
4117
4269
|
}
|
|
4270
|
+
slateEditor?: PortableTextSlateEditor
|
|
4118
4271
|
},
|
|
4119
4272
|
{
|
|
4120
4273
|
type: 'update readOnly'
|
|
@@ -4148,6 +4301,7 @@ declare const editorMachine: StateMachine<
|
|
|
4148
4301
|
ghost?: HTMLElement
|
|
4149
4302
|
origin: Pick<EventPosition, 'selection'>
|
|
4150
4303
|
}
|
|
4304
|
+
slateEditor?: PortableTextSlateEditor
|
|
4151
4305
|
},
|
|
4152
4306
|
{
|
|
4153
4307
|
type: 'update readOnly'
|
|
@@ -4160,6 +4314,169 @@ declare const editorMachine: StateMachine<
|
|
|
4160
4314
|
readonly 'behavior event': {
|
|
4161
4315
|
readonly actions: 'handle behavior event'
|
|
4162
4316
|
}
|
|
4317
|
+
readonly 'blur': {
|
|
4318
|
+
readonly actions: 'handle blur'
|
|
4319
|
+
}
|
|
4320
|
+
readonly 'focus': {
|
|
4321
|
+
readonly target: '.focusing'
|
|
4322
|
+
readonly actions: readonly [
|
|
4323
|
+
ActionFunction<
|
|
4324
|
+
{
|
|
4325
|
+
behaviors: Set<Behavior>
|
|
4326
|
+
converters: Set<Converter>
|
|
4327
|
+
keyGenerator: () => string
|
|
4328
|
+
pendingEvents: Array<InternalPatchEvent | MutationEvent>
|
|
4329
|
+
schema: EditorSchema
|
|
4330
|
+
initialReadOnly: boolean
|
|
4331
|
+
maxBlocks: number | undefined
|
|
4332
|
+
selection: EditorSelection
|
|
4333
|
+
incomingValue: Array<PortableTextBlock> | undefined
|
|
4334
|
+
internalDrag?: {
|
|
4335
|
+
ghost?: HTMLElement
|
|
4336
|
+
origin: Pick<EventPosition, 'selection'>
|
|
4337
|
+
}
|
|
4338
|
+
slateEditor?: PortableTextSlateEditor
|
|
4339
|
+
},
|
|
4340
|
+
{
|
|
4341
|
+
type: 'focus'
|
|
4342
|
+
editor: PortableTextSlateEditor
|
|
4343
|
+
},
|
|
4344
|
+
| InternalPatchEvent
|
|
4345
|
+
| MutationEvent
|
|
4346
|
+
| {
|
|
4347
|
+
type: 'add behavior'
|
|
4348
|
+
behavior: Behavior
|
|
4349
|
+
}
|
|
4350
|
+
| {
|
|
4351
|
+
type: 'remove behavior'
|
|
4352
|
+
behavior: Behavior
|
|
4353
|
+
}
|
|
4354
|
+
| {
|
|
4355
|
+
type: 'update readOnly'
|
|
4356
|
+
readOnly: boolean
|
|
4357
|
+
}
|
|
4358
|
+
| {
|
|
4359
|
+
type: 'update schema'
|
|
4360
|
+
schema: EditorSchema
|
|
4361
|
+
}
|
|
4362
|
+
| {
|
|
4363
|
+
type: 'update behaviors'
|
|
4364
|
+
behaviors: Array<Behavior>
|
|
4365
|
+
}
|
|
4366
|
+
| {
|
|
4367
|
+
type: 'update key generator'
|
|
4368
|
+
keyGenerator: () => string
|
|
4369
|
+
}
|
|
4370
|
+
| {
|
|
4371
|
+
type: 'update value'
|
|
4372
|
+
value: Array<PortableTextBlock> | undefined
|
|
4373
|
+
}
|
|
4374
|
+
| {
|
|
4375
|
+
type: 'update maxBlocks'
|
|
4376
|
+
maxBlocks: number | undefined
|
|
4377
|
+
}
|
|
4378
|
+
| PatchesEvent
|
|
4379
|
+
| {
|
|
4380
|
+
type: 'blur'
|
|
4381
|
+
editor: PortableTextSlateEditor
|
|
4382
|
+
}
|
|
4383
|
+
| {
|
|
4384
|
+
type: 'focus'
|
|
4385
|
+
editor: PortableTextSlateEditor
|
|
4386
|
+
}
|
|
4387
|
+
| {
|
|
4388
|
+
type: 'normalizing'
|
|
4389
|
+
}
|
|
4390
|
+
| {
|
|
4391
|
+
type: 'done normalizing'
|
|
4392
|
+
}
|
|
4393
|
+
| {
|
|
4394
|
+
type: 'done syncing initial value'
|
|
4395
|
+
}
|
|
4396
|
+
| {
|
|
4397
|
+
type: 'behavior event'
|
|
4398
|
+
behaviorEvent: BehaviorEvent
|
|
4399
|
+
editor: PortableTextSlateEditor
|
|
4400
|
+
nativeEvent?: {
|
|
4401
|
+
preventDefault: () => void
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4404
|
+
| {
|
|
4405
|
+
type: 'notify.patch'
|
|
4406
|
+
patch: Patch
|
|
4407
|
+
}
|
|
4408
|
+
| {
|
|
4409
|
+
type: 'notify.mutation'
|
|
4410
|
+
patches: Array<Patch>
|
|
4411
|
+
snapshot: Array<PortableTextBlock> | undefined
|
|
4412
|
+
value: Array<PortableTextBlock> | undefined
|
|
4413
|
+
}
|
|
4414
|
+
| {
|
|
4415
|
+
type: 'notify.blurred'
|
|
4416
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4417
|
+
}
|
|
4418
|
+
| {
|
|
4419
|
+
type: 'notify.done loading'
|
|
4420
|
+
}
|
|
4421
|
+
| {
|
|
4422
|
+
type: 'notify.editable'
|
|
4423
|
+
}
|
|
4424
|
+
| {
|
|
4425
|
+
type: 'notify.error'
|
|
4426
|
+
name: string
|
|
4427
|
+
description: string
|
|
4428
|
+
data: unknown
|
|
4429
|
+
}
|
|
4430
|
+
| {
|
|
4431
|
+
type: 'notify.focused'
|
|
4432
|
+
event: FocusEvent_2<HTMLDivElement, Element>
|
|
4433
|
+
}
|
|
4434
|
+
| {
|
|
4435
|
+
type: 'notify.invalid value'
|
|
4436
|
+
resolution: InvalidValueResolution | null
|
|
4437
|
+
value: Array<PortableTextBlock> | undefined
|
|
4438
|
+
}
|
|
4439
|
+
| {
|
|
4440
|
+
type: 'notify.loading'
|
|
4441
|
+
}
|
|
4442
|
+
| {
|
|
4443
|
+
type: 'notify.read only'
|
|
4444
|
+
}
|
|
4445
|
+
| {
|
|
4446
|
+
type: 'notify.ready'
|
|
4447
|
+
}
|
|
4448
|
+
| {
|
|
4449
|
+
type: 'notify.selection'
|
|
4450
|
+
selection: EditorSelection
|
|
4451
|
+
}
|
|
4452
|
+
| {
|
|
4453
|
+
type: 'notify.value changed'
|
|
4454
|
+
value: Array<PortableTextBlock> | undefined
|
|
4455
|
+
}
|
|
4456
|
+
| {
|
|
4457
|
+
type: 'notify.unset'
|
|
4458
|
+
previousValue: Array<PortableTextBlock>
|
|
4459
|
+
}
|
|
4460
|
+
| {
|
|
4461
|
+
type: 'dragstart'
|
|
4462
|
+
origin: Pick<EventPosition, 'selection'>
|
|
4463
|
+
ghost?: HTMLElement
|
|
4464
|
+
}
|
|
4465
|
+
| {
|
|
4466
|
+
type: 'dragend'
|
|
4467
|
+
}
|
|
4468
|
+
| {
|
|
4469
|
+
type: 'drop'
|
|
4470
|
+
},
|
|
4471
|
+
undefined,
|
|
4472
|
+
never,
|
|
4473
|
+
never,
|
|
4474
|
+
never,
|
|
4475
|
+
never,
|
|
4476
|
+
never
|
|
4477
|
+
>,
|
|
4478
|
+
]
|
|
4479
|
+
}
|
|
4163
4480
|
}
|
|
4164
4481
|
readonly initial: 'idle'
|
|
4165
4482
|
readonly states: {
|
|
@@ -4184,6 +4501,7 @@ declare const editorMachine: StateMachine<
|
|
|
4184
4501
|
ghost?: HTMLElement
|
|
4185
4502
|
origin: Pick<EventPosition, 'selection'>
|
|
4186
4503
|
}
|
|
4504
|
+
slateEditor?: PortableTextSlateEditor
|
|
4187
4505
|
},
|
|
4188
4506
|
{
|
|
4189
4507
|
type: 'dragstart'
|
|
@@ -4225,6 +4543,14 @@ declare const editorMachine: StateMachine<
|
|
|
4225
4543
|
maxBlocks: number | undefined
|
|
4226
4544
|
}
|
|
4227
4545
|
| PatchesEvent
|
|
4546
|
+
| {
|
|
4547
|
+
type: 'blur'
|
|
4548
|
+
editor: PortableTextSlateEditor
|
|
4549
|
+
}
|
|
4550
|
+
| {
|
|
4551
|
+
type: 'focus'
|
|
4552
|
+
editor: PortableTextSlateEditor
|
|
4553
|
+
}
|
|
4228
4554
|
| {
|
|
4229
4555
|
type: 'normalizing'
|
|
4230
4556
|
}
|
|
@@ -4238,7 +4564,6 @@ declare const editorMachine: StateMachine<
|
|
|
4238
4564
|
type: 'behavior event'
|
|
4239
4565
|
behaviorEvent: BehaviorEvent
|
|
4240
4566
|
editor: PortableTextSlateEditor
|
|
4241
|
-
defaultActionCallback?: () => void
|
|
4242
4567
|
nativeEvent?: {
|
|
4243
4568
|
preventDefault: () => void
|
|
4244
4569
|
}
|
|
@@ -4322,6 +4647,30 @@ declare const editorMachine: StateMachine<
|
|
|
4322
4647
|
}
|
|
4323
4648
|
}
|
|
4324
4649
|
}
|
|
4650
|
+
readonly 'focusing': {
|
|
4651
|
+
readonly initial: 'checking if busy'
|
|
4652
|
+
readonly states: {
|
|
4653
|
+
readonly 'checking if busy': {
|
|
4654
|
+
readonly always: readonly [
|
|
4655
|
+
{
|
|
4656
|
+
readonly guard: 'slate is busy'
|
|
4657
|
+
readonly target: 'busy'
|
|
4658
|
+
},
|
|
4659
|
+
{
|
|
4660
|
+
readonly target: '#editor.edit mode.editable.idle'
|
|
4661
|
+
readonly actions: readonly ['handle focus']
|
|
4662
|
+
},
|
|
4663
|
+
]
|
|
4664
|
+
}
|
|
4665
|
+
readonly 'busy': {
|
|
4666
|
+
readonly after: {
|
|
4667
|
+
readonly 10: {
|
|
4668
|
+
readonly target: 'checking if busy'
|
|
4669
|
+
}
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4325
4674
|
readonly 'dragging internally': {
|
|
4326
4675
|
readonly exit: readonly [
|
|
4327
4676
|
({
|
|
@@ -4341,6 +4690,7 @@ declare const editorMachine: StateMachine<
|
|
|
4341
4690
|
ghost?: HTMLElement
|
|
4342
4691
|
origin: Pick<EventPosition, 'selection'>
|
|
4343
4692
|
}
|
|
4693
|
+
slateEditor?: PortableTextSlateEditor
|
|
4344
4694
|
},
|
|
4345
4695
|
| InternalPatchEvent
|
|
4346
4696
|
| MutationEvent
|
|
@@ -4377,6 +4727,14 @@ declare const editorMachine: StateMachine<
|
|
|
4377
4727
|
maxBlocks: number | undefined
|
|
4378
4728
|
}
|
|
4379
4729
|
| PatchesEvent
|
|
4730
|
+
| {
|
|
4731
|
+
type: 'blur'
|
|
4732
|
+
editor: PortableTextSlateEditor
|
|
4733
|
+
}
|
|
4734
|
+
| {
|
|
4735
|
+
type: 'focus'
|
|
4736
|
+
editor: PortableTextSlateEditor
|
|
4737
|
+
}
|
|
4380
4738
|
| {
|
|
4381
4739
|
type: 'normalizing'
|
|
4382
4740
|
}
|
|
@@ -4390,7 +4748,6 @@ declare const editorMachine: StateMachine<
|
|
|
4390
4748
|
type: 'behavior event'
|
|
4391
4749
|
behaviorEvent: BehaviorEvent
|
|
4392
4750
|
editor: PortableTextSlateEditor
|
|
4393
|
-
defaultActionCallback?: () => void
|
|
4394
4751
|
nativeEvent?: {
|
|
4395
4752
|
preventDefault: () => void
|
|
4396
4753
|
}
|
|
@@ -4497,6 +4854,14 @@ declare const editorMachine: StateMachine<
|
|
|
4497
4854
|
maxBlocks: number | undefined
|
|
4498
4855
|
}
|
|
4499
4856
|
| PatchesEvent
|
|
4857
|
+
| {
|
|
4858
|
+
type: 'blur'
|
|
4859
|
+
editor: PortableTextSlateEditor
|
|
4860
|
+
}
|
|
4861
|
+
| {
|
|
4862
|
+
type: 'focus'
|
|
4863
|
+
editor: PortableTextSlateEditor
|
|
4864
|
+
}
|
|
4500
4865
|
| {
|
|
4501
4866
|
type: 'normalizing'
|
|
4502
4867
|
}
|
|
@@ -4510,7 +4875,6 @@ declare const editorMachine: StateMachine<
|
|
|
4510
4875
|
type: 'behavior event'
|
|
4511
4876
|
behaviorEvent: BehaviorEvent
|
|
4512
4877
|
editor: PortableTextSlateEditor
|
|
4513
|
-
defaultActionCallback?: () => void
|
|
4514
4878
|
nativeEvent?: {
|
|
4515
4879
|
preventDefault: () => void
|
|
4516
4880
|
}
|
|
@@ -4598,6 +4962,7 @@ declare const editorMachine: StateMachine<
|
|
|
4598
4962
|
ghost?: HTMLElement
|
|
4599
4963
|
origin: Pick<EventPosition, 'selection'>
|
|
4600
4964
|
}
|
|
4965
|
+
slateEditor?: PortableTextSlateEditor
|
|
4601
4966
|
},
|
|
4602
4967
|
| InternalPatchEvent
|
|
4603
4968
|
| MutationEvent
|
|
@@ -4634,6 +4999,14 @@ declare const editorMachine: StateMachine<
|
|
|
4634
4999
|
maxBlocks: number | undefined
|
|
4635
5000
|
}
|
|
4636
5001
|
| PatchesEvent
|
|
5002
|
+
| {
|
|
5003
|
+
type: 'blur'
|
|
5004
|
+
editor: PortableTextSlateEditor
|
|
5005
|
+
}
|
|
5006
|
+
| {
|
|
5007
|
+
type: 'focus'
|
|
5008
|
+
editor: PortableTextSlateEditor
|
|
5009
|
+
}
|
|
4637
5010
|
| {
|
|
4638
5011
|
type: 'normalizing'
|
|
4639
5012
|
}
|
|
@@ -4647,7 +5020,6 @@ declare const editorMachine: StateMachine<
|
|
|
4647
5020
|
type: 'behavior event'
|
|
4648
5021
|
behaviorEvent: BehaviorEvent
|
|
4649
5022
|
editor: PortableTextSlateEditor
|
|
4650
|
-
defaultActionCallback?: () => void
|
|
4651
5023
|
nativeEvent?: {
|
|
4652
5024
|
preventDefault: () => void
|
|
4653
5025
|
}
|
|
@@ -4754,6 +5126,14 @@ declare const editorMachine: StateMachine<
|
|
|
4754
5126
|
maxBlocks: number | undefined
|
|
4755
5127
|
}
|
|
4756
5128
|
| PatchesEvent
|
|
5129
|
+
| {
|
|
5130
|
+
type: 'blur'
|
|
5131
|
+
editor: PortableTextSlateEditor
|
|
5132
|
+
}
|
|
5133
|
+
| {
|
|
5134
|
+
type: 'focus'
|
|
5135
|
+
editor: PortableTextSlateEditor
|
|
5136
|
+
}
|
|
4757
5137
|
| {
|
|
4758
5138
|
type: 'normalizing'
|
|
4759
5139
|
}
|
|
@@ -4767,7 +5147,6 @@ declare const editorMachine: StateMachine<
|
|
|
4767
5147
|
type: 'behavior event'
|
|
4768
5148
|
behaviorEvent: BehaviorEvent
|
|
4769
5149
|
editor: PortableTextSlateEditor
|
|
4770
|
-
defaultActionCallback?: () => void
|
|
4771
5150
|
nativeEvent?: {
|
|
4772
5151
|
preventDefault: () => void
|
|
4773
5152
|
}
|
|
@@ -5084,6 +5463,12 @@ declare type EventPosition = {
|
|
|
5084
5463
|
}
|
|
5085
5464
|
|
|
5086
5465
|
declare type ExternalBehaviorEvent =
|
|
5466
|
+
| {
|
|
5467
|
+
type: ExternalBehaviorEventType<'blur'>
|
|
5468
|
+
}
|
|
5469
|
+
| {
|
|
5470
|
+
type: ExternalBehaviorEventType<'focus'>
|
|
5471
|
+
}
|
|
5087
5472
|
| {
|
|
5088
5473
|
type: ExternalBehaviorEventType<'insert', 'block object'>
|
|
5089
5474
|
placement: InsertPlacement
|
|
@@ -5101,7 +5486,7 @@ declare type ExternalBehaviorEvent =
|
|
|
5101
5486
|
/**************************************
|
|
5102
5487
|
* External events
|
|
5103
5488
|
**************************************/
|
|
5104
|
-
declare type ExternalBehaviorEventNamespace = 'insert'
|
|
5489
|
+
declare type ExternalBehaviorEventNamespace = 'blur' | 'focus' | 'insert'
|
|
5105
5490
|
|
|
5106
5491
|
declare type ExternalBehaviorEventType<
|
|
5107
5492
|
TNamespace extends ExternalBehaviorEventNamespace,
|
|
@@ -6261,9 +6646,6 @@ declare type SyntheticBehaviorEvent =
|
|
|
6261
6646
|
at: [KeyedSegment]
|
|
6262
6647
|
props: Array<string>
|
|
6263
6648
|
}
|
|
6264
|
-
| {
|
|
6265
|
-
type: StrictExtract<SyntheticBehaviorEventType, 'blur'>
|
|
6266
|
-
}
|
|
6267
6649
|
| {
|
|
6268
6650
|
type: StrictExtract<SyntheticBehaviorEventType, 'decorator.add'>
|
|
6269
6651
|
decorator: string
|
|
@@ -6292,9 +6674,6 @@ declare type SyntheticBehaviorEvent =
|
|
|
6292
6674
|
type: StrictExtract<SyntheticBehaviorEventType, 'delete.forward'>
|
|
6293
6675
|
unit: TextUnit
|
|
6294
6676
|
}
|
|
6295
|
-
| {
|
|
6296
|
-
type: StrictExtract<SyntheticBehaviorEventType, 'focus'>
|
|
6297
|
-
}
|
|
6298
6677
|
| {
|
|
6299
6678
|
type: StrictExtract<SyntheticBehaviorEventType, 'history.redo'>
|
|
6300
6679
|
}
|
|
@@ -6366,14 +6745,12 @@ declare const syntheticBehaviorEventTypes: readonly [
|
|
|
6366
6745
|
'annotation.remove',
|
|
6367
6746
|
'block.set',
|
|
6368
6747
|
'block.unset',
|
|
6369
|
-
'blur',
|
|
6370
6748
|
'decorator.add',
|
|
6371
6749
|
'decorator.remove',
|
|
6372
6750
|
'delete',
|
|
6373
6751
|
'delete.backward',
|
|
6374
6752
|
'delete.block',
|
|
6375
6753
|
'delete.forward',
|
|
6376
|
-
'focus',
|
|
6377
6754
|
'history.redo',
|
|
6378
6755
|
'history.undo',
|
|
6379
6756
|
'insert.inline object',
|