@portabletext/editor 1.27.0 → 1.30.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/README.md +5 -5
- package/lib/_chunks-cjs/behavior.core.cjs +40 -37
- package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
- package/lib/_chunks-cjs/parse-blocks.cjs +79 -0
- package/lib/_chunks-cjs/parse-blocks.cjs.map +1 -0
- package/lib/_chunks-cjs/plugin.event-listener.cjs +357 -140
- package/lib/_chunks-cjs/plugin.event-listener.cjs.map +1 -1
- package/lib/_chunks-cjs/selector.get-selection-start-point.cjs +15 -0
- package/lib/_chunks-cjs/selector.get-selection-start-point.cjs.map +1 -0
- package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs +88 -88
- package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs.map +1 -1
- package/lib/_chunks-es/behavior.core.js +40 -37
- package/lib/_chunks-es/behavior.core.js.map +1 -1
- package/lib/_chunks-es/parse-blocks.js +80 -0
- package/lib/_chunks-es/parse-blocks.js.map +1 -0
- package/lib/_chunks-es/plugin.event-listener.js +359 -141
- package/lib/_chunks-es/plugin.event-listener.js.map +1 -1
- package/lib/_chunks-es/selector.get-selection-start-point.js +16 -0
- package/lib/_chunks-es/selector.get-selection-start-point.js.map +1 -0
- package/lib/_chunks-es/selector.is-at-the-start-of-block.js +88 -88
- package/lib/_chunks-es/selector.is-at-the-start-of-block.js.map +1 -1
- package/lib/behaviors/index.d.cts +196 -124
- package/lib/behaviors/index.d.ts +196 -124
- package/lib/index.cjs +22 -21
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +505 -0
- package/lib/index.d.ts +505 -0
- package/lib/index.js +22 -21
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.cjs +249 -1
- package/lib/plugins/index.cjs.map +1 -1
- package/lib/plugins/index.d.cts +246 -1
- package/lib/plugins/index.d.ts +246 -1
- package/lib/plugins/index.js +257 -3
- package/lib/plugins/index.js.map +1 -1
- package/lib/selectors/index.cjs +42 -3
- package/lib/selectors/index.cjs.map +1 -1
- package/lib/selectors/index.d.cts +39 -0
- package/lib/selectors/index.d.ts +39 -0
- package/lib/selectors/index.js +45 -4
- package/lib/selectors/index.js.map +1 -1
- package/lib/utils/index.cjs +70 -1
- package/lib/utils/index.cjs.map +1 -1
- package/lib/utils/index.d.cts +168 -2
- package/lib/utils/index.d.ts +168 -2
- package/lib/utils/index.js +71 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +4 -4
- package/src/behavior-actions/behavior.action.delete.ts +18 -0
- package/src/behavior-actions/behavior.action.insert-break.ts +96 -91
- package/src/behavior-actions/behavior.actions.ts +9 -0
- package/src/behaviors/_exports/index.ts +1 -0
- package/src/behaviors/behavior.core.deserialize.ts +52 -38
- package/src/behaviors/behavior.core.ts +4 -11
- package/src/behaviors/behavior.types.ts +4 -0
- package/src/editor/PortableTextEditor.tsx +308 -1
- package/src/editor/components/DefaultObject.tsx +21 -0
- package/src/editor/components/Element.tsx +5 -5
- package/src/editor/components/Leaf.tsx +1 -6
- package/src/internal-utils/__tests__/patchToOperations.test.ts +19 -21
- package/src/internal-utils/applyPatch.ts +11 -3
- package/src/plugins/index.ts +2 -0
- package/src/plugins/plugin.behavior.tsx +22 -0
- package/src/plugins/plugin.one-line.tsx +225 -0
- package/src/selectors/index.ts +7 -2
- package/src/selectors/selector.get-active-annotations.test.ts +122 -0
- package/src/selectors/selector.get-active-annotations.ts +30 -0
- package/src/selectors/selector.get-selection-end-point.ts +17 -0
- package/src/selectors/selector.get-selection-start-point.ts +17 -0
- package/src/selectors/selector.get-selection.ts +8 -0
- package/src/selectors/selector.get-value.ts +11 -0
- package/src/selectors/selector.is-overlapping-selection.ts +46 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/util.is-span.ts +12 -0
- package/src/utils/util.is-text-block.ts +12 -0
- package/src/utils/util.merge-text-blocks.ts +36 -0
- package/src/utils/util.split-text-block.ts +55 -0
- package/src/editor/nodes/DefaultAnnotation.tsx +0 -20
- package/src/editor/nodes/DefaultObject.tsx +0 -18
package/lib/plugins/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ import type {
|
|
|
17
17
|
FocusEvent as FocusEvent_2,
|
|
18
18
|
KeyboardEvent as KeyboardEvent_2,
|
|
19
19
|
} from 'react'
|
|
20
|
-
import {default as React_2} from 'react'
|
|
20
|
+
import {JSX, default as React_2} from 'react'
|
|
21
21
|
import {Descendant, TextUnit} from 'slate'
|
|
22
22
|
import type {Operation} from 'slate'
|
|
23
23
|
import type {DOMNode} from 'slate-dom'
|
|
@@ -129,6 +129,13 @@ declare type BehaviorGuard<TBehaviorEvent, TGuardResponse> = ({
|
|
|
129
129
|
event: TBehaviorEvent
|
|
130
130
|
}) => TGuardResponse | false
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @beta
|
|
134
|
+
*/
|
|
135
|
+
export declare function BehaviorPlugin(props: {
|
|
136
|
+
behaviors: Array<Behavior>
|
|
137
|
+
}): null
|
|
138
|
+
|
|
132
139
|
/**
|
|
133
140
|
* @beta
|
|
134
141
|
*/
|
|
@@ -448,6 +455,10 @@ declare const editorMachine: StateMachine<
|
|
|
448
455
|
type: 'decorator.toggle'
|
|
449
456
|
decorator: string
|
|
450
457
|
}
|
|
458
|
+
| {
|
|
459
|
+
type: 'delete'
|
|
460
|
+
selection: NonNullable<EditorSelection>
|
|
461
|
+
}
|
|
451
462
|
| {
|
|
452
463
|
type: 'delete.backward'
|
|
453
464
|
unit: TextUnit
|
|
@@ -868,6 +879,10 @@ declare const editorMachine: StateMachine<
|
|
|
868
879
|
type: 'decorator.toggle'
|
|
869
880
|
decorator: string
|
|
870
881
|
}
|
|
882
|
+
| {
|
|
883
|
+
type: 'delete'
|
|
884
|
+
selection: NonNullable<EditorSelection>
|
|
885
|
+
}
|
|
871
886
|
| {
|
|
872
887
|
type: 'delete.backward'
|
|
873
888
|
unit: TextUnit
|
|
@@ -1188,6 +1203,10 @@ declare const editorMachine: StateMachine<
|
|
|
1188
1203
|
type: 'decorator.toggle'
|
|
1189
1204
|
decorator: string
|
|
1190
1205
|
}
|
|
1206
|
+
| {
|
|
1207
|
+
type: 'delete'
|
|
1208
|
+
selection: NonNullable<EditorSelection>
|
|
1209
|
+
}
|
|
1191
1210
|
| {
|
|
1192
1211
|
type: 'delete.backward'
|
|
1193
1212
|
unit: TextUnit
|
|
@@ -1533,6 +1552,10 @@ declare const editorMachine: StateMachine<
|
|
|
1533
1552
|
type: 'decorator.toggle'
|
|
1534
1553
|
decorator: string
|
|
1535
1554
|
}
|
|
1555
|
+
| {
|
|
1556
|
+
type: 'delete'
|
|
1557
|
+
selection: NonNullable<EditorSelection>
|
|
1558
|
+
}
|
|
1536
1559
|
| {
|
|
1537
1560
|
type: 'delete.backward'
|
|
1538
1561
|
unit: TextUnit
|
|
@@ -1902,6 +1925,10 @@ declare const editorMachine: StateMachine<
|
|
|
1902
1925
|
type: 'decorator.toggle'
|
|
1903
1926
|
decorator: string
|
|
1904
1927
|
}
|
|
1928
|
+
| {
|
|
1929
|
+
type: 'delete'
|
|
1930
|
+
selection: NonNullable<EditorSelection>
|
|
1931
|
+
}
|
|
1905
1932
|
| {
|
|
1906
1933
|
type: 'delete.backward'
|
|
1907
1934
|
unit: TextUnit
|
|
@@ -2245,6 +2272,10 @@ declare const editorMachine: StateMachine<
|
|
|
2245
2272
|
type: 'decorator.toggle'
|
|
2246
2273
|
decorator: string
|
|
2247
2274
|
}
|
|
2275
|
+
| {
|
|
2276
|
+
type: 'delete'
|
|
2277
|
+
selection: NonNullable<EditorSelection>
|
|
2278
|
+
}
|
|
2248
2279
|
| {
|
|
2249
2280
|
type: 'delete.backward'
|
|
2250
2281
|
unit: TextUnit
|
|
@@ -2533,6 +2564,10 @@ declare const editorMachine: StateMachine<
|
|
|
2533
2564
|
type: 'decorator.toggle'
|
|
2534
2565
|
decorator: string
|
|
2535
2566
|
}
|
|
2567
|
+
| {
|
|
2568
|
+
type: 'delete'
|
|
2569
|
+
selection: NonNullable<EditorSelection>
|
|
2570
|
+
}
|
|
2536
2571
|
| {
|
|
2537
2572
|
type: 'delete.backward'
|
|
2538
2573
|
unit: TextUnit
|
|
@@ -2876,6 +2911,10 @@ declare const editorMachine: StateMachine<
|
|
|
2876
2911
|
type: 'decorator.toggle'
|
|
2877
2912
|
decorator: string
|
|
2878
2913
|
}
|
|
2914
|
+
| {
|
|
2915
|
+
type: 'delete'
|
|
2916
|
+
selection: NonNullable<EditorSelection>
|
|
2917
|
+
}
|
|
2879
2918
|
| {
|
|
2880
2919
|
type: 'delete.backward'
|
|
2881
2920
|
unit: TextUnit
|
|
@@ -3167,6 +3206,10 @@ declare const editorMachine: StateMachine<
|
|
|
3167
3206
|
type: 'decorator.toggle'
|
|
3168
3207
|
decorator: string
|
|
3169
3208
|
}
|
|
3209
|
+
| {
|
|
3210
|
+
type: 'delete'
|
|
3211
|
+
selection: NonNullable<EditorSelection>
|
|
3212
|
+
}
|
|
3170
3213
|
| {
|
|
3171
3214
|
type: 'delete.backward'
|
|
3172
3215
|
unit: TextUnit
|
|
@@ -3510,6 +3553,10 @@ declare const editorMachine: StateMachine<
|
|
|
3510
3553
|
type: 'decorator.toggle'
|
|
3511
3554
|
decorator: string
|
|
3512
3555
|
}
|
|
3556
|
+
| {
|
|
3557
|
+
type: 'delete'
|
|
3558
|
+
selection: NonNullable<EditorSelection>
|
|
3559
|
+
}
|
|
3513
3560
|
| {
|
|
3514
3561
|
type: 'delete.backward'
|
|
3515
3562
|
unit: TextUnit
|
|
@@ -3800,6 +3847,10 @@ declare const editorMachine: StateMachine<
|
|
|
3800
3847
|
type: 'decorator.toggle'
|
|
3801
3848
|
decorator: string
|
|
3802
3849
|
}
|
|
3850
|
+
| {
|
|
3851
|
+
type: 'delete'
|
|
3852
|
+
selection: NonNullable<EditorSelection>
|
|
3853
|
+
}
|
|
3803
3854
|
| {
|
|
3804
3855
|
type: 'delete.backward'
|
|
3805
3856
|
unit: TextUnit
|
|
@@ -4143,6 +4194,10 @@ declare const editorMachine: StateMachine<
|
|
|
4143
4194
|
type: 'decorator.toggle'
|
|
4144
4195
|
decorator: string
|
|
4145
4196
|
}
|
|
4197
|
+
| {
|
|
4198
|
+
type: 'delete'
|
|
4199
|
+
selection: NonNullable<EditorSelection>
|
|
4200
|
+
}
|
|
4146
4201
|
| {
|
|
4147
4202
|
type: 'delete.backward'
|
|
4148
4203
|
unit: TextUnit
|
|
@@ -4432,6 +4487,10 @@ declare const editorMachine: StateMachine<
|
|
|
4432
4487
|
type: 'decorator.toggle'
|
|
4433
4488
|
decorator: string
|
|
4434
4489
|
}
|
|
4490
|
+
| {
|
|
4491
|
+
type: 'delete'
|
|
4492
|
+
selection: NonNullable<EditorSelection>
|
|
4493
|
+
}
|
|
4435
4494
|
| {
|
|
4436
4495
|
type: 'delete.backward'
|
|
4437
4496
|
unit: TextUnit
|
|
@@ -4775,6 +4834,10 @@ declare const editorMachine: StateMachine<
|
|
|
4775
4834
|
type: 'decorator.toggle'
|
|
4776
4835
|
decorator: string
|
|
4777
4836
|
}
|
|
4837
|
+
| {
|
|
4838
|
+
type: 'delete'
|
|
4839
|
+
selection: NonNullable<EditorSelection>
|
|
4840
|
+
}
|
|
4778
4841
|
| {
|
|
4779
4842
|
type: 'delete.backward'
|
|
4780
4843
|
unit: TextUnit
|
|
@@ -5065,6 +5128,10 @@ declare const editorMachine: StateMachine<
|
|
|
5065
5128
|
type: 'decorator.toggle'
|
|
5066
5129
|
decorator: string
|
|
5067
5130
|
}
|
|
5131
|
+
| {
|
|
5132
|
+
type: 'delete'
|
|
5133
|
+
selection: NonNullable<EditorSelection>
|
|
5134
|
+
}
|
|
5068
5135
|
| {
|
|
5069
5136
|
type: 'delete.backward'
|
|
5070
5137
|
unit: TextUnit
|
|
@@ -5426,6 +5493,10 @@ declare const editorMachine: StateMachine<
|
|
|
5426
5493
|
type: 'decorator.toggle'
|
|
5427
5494
|
decorator: string
|
|
5428
5495
|
}
|
|
5496
|
+
| {
|
|
5497
|
+
type: 'delete'
|
|
5498
|
+
selection: NonNullable<EditorSelection>
|
|
5499
|
+
}
|
|
5429
5500
|
| {
|
|
5430
5501
|
type: 'delete.backward'
|
|
5431
5502
|
unit: TextUnit
|
|
@@ -5769,6 +5840,10 @@ declare const editorMachine: StateMachine<
|
|
|
5769
5840
|
type: 'decorator.toggle'
|
|
5770
5841
|
decorator: string
|
|
5771
5842
|
}
|
|
5843
|
+
| {
|
|
5844
|
+
type: 'delete'
|
|
5845
|
+
selection: NonNullable<EditorSelection>
|
|
5846
|
+
}
|
|
5772
5847
|
| {
|
|
5773
5848
|
type: 'delete.backward'
|
|
5774
5849
|
unit: TextUnit
|
|
@@ -6059,6 +6134,10 @@ declare const editorMachine: StateMachine<
|
|
|
6059
6134
|
type: 'decorator.toggle'
|
|
6060
6135
|
decorator: string
|
|
6061
6136
|
}
|
|
6137
|
+
| {
|
|
6138
|
+
type: 'delete'
|
|
6139
|
+
selection: NonNullable<EditorSelection>
|
|
6140
|
+
}
|
|
6062
6141
|
| {
|
|
6063
6142
|
type: 'delete.backward'
|
|
6064
6143
|
unit: TextUnit
|
|
@@ -6402,6 +6481,10 @@ declare const editorMachine: StateMachine<
|
|
|
6402
6481
|
type: 'decorator.toggle'
|
|
6403
6482
|
decorator: string
|
|
6404
6483
|
}
|
|
6484
|
+
| {
|
|
6485
|
+
type: 'delete'
|
|
6486
|
+
selection: NonNullable<EditorSelection>
|
|
6487
|
+
}
|
|
6405
6488
|
| {
|
|
6406
6489
|
type: 'delete.backward'
|
|
6407
6490
|
unit: TextUnit
|
|
@@ -6690,6 +6773,10 @@ declare const editorMachine: StateMachine<
|
|
|
6690
6773
|
type: 'decorator.toggle'
|
|
6691
6774
|
decorator: string
|
|
6692
6775
|
}
|
|
6776
|
+
| {
|
|
6777
|
+
type: 'delete'
|
|
6778
|
+
selection: NonNullable<EditorSelection>
|
|
6779
|
+
}
|
|
6693
6780
|
| {
|
|
6694
6781
|
type: 'delete.backward'
|
|
6695
6782
|
unit: TextUnit
|
|
@@ -7033,6 +7120,10 @@ declare const editorMachine: StateMachine<
|
|
|
7033
7120
|
type: 'decorator.toggle'
|
|
7034
7121
|
decorator: string
|
|
7035
7122
|
}
|
|
7123
|
+
| {
|
|
7124
|
+
type: 'delete'
|
|
7125
|
+
selection: NonNullable<EditorSelection>
|
|
7126
|
+
}
|
|
7036
7127
|
| {
|
|
7037
7128
|
type: 'delete.backward'
|
|
7038
7129
|
unit: TextUnit
|
|
@@ -7322,6 +7413,10 @@ declare const editorMachine: StateMachine<
|
|
|
7322
7413
|
type: 'decorator.toggle'
|
|
7323
7414
|
decorator: string
|
|
7324
7415
|
}
|
|
7416
|
+
| {
|
|
7417
|
+
type: 'delete'
|
|
7418
|
+
selection: NonNullable<EditorSelection>
|
|
7419
|
+
}
|
|
7325
7420
|
| {
|
|
7326
7421
|
type: 'delete.backward'
|
|
7327
7422
|
unit: TextUnit
|
|
@@ -7665,6 +7760,10 @@ declare const editorMachine: StateMachine<
|
|
|
7665
7760
|
type: 'decorator.toggle'
|
|
7666
7761
|
decorator: string
|
|
7667
7762
|
}
|
|
7763
|
+
| {
|
|
7764
|
+
type: 'delete'
|
|
7765
|
+
selection: NonNullable<EditorSelection>
|
|
7766
|
+
}
|
|
7668
7767
|
| {
|
|
7669
7768
|
type: 'delete.backward'
|
|
7670
7769
|
unit: TextUnit
|
|
@@ -7957,6 +8056,10 @@ declare const editorMachine: StateMachine<
|
|
|
7957
8056
|
type: 'decorator.toggle'
|
|
7958
8057
|
decorator: string
|
|
7959
8058
|
}
|
|
8059
|
+
| {
|
|
8060
|
+
type: 'delete'
|
|
8061
|
+
selection: NonNullable<EditorSelection>
|
|
8062
|
+
}
|
|
7960
8063
|
| {
|
|
7961
8064
|
type: 'delete.backward'
|
|
7962
8065
|
unit: TextUnit
|
|
@@ -8300,6 +8403,10 @@ declare const editorMachine: StateMachine<
|
|
|
8300
8403
|
type: 'decorator.toggle'
|
|
8301
8404
|
decorator: string
|
|
8302
8405
|
}
|
|
8406
|
+
| {
|
|
8407
|
+
type: 'delete'
|
|
8408
|
+
selection: NonNullable<EditorSelection>
|
|
8409
|
+
}
|
|
8303
8410
|
| {
|
|
8304
8411
|
type: 'delete.backward'
|
|
8305
8412
|
unit: TextUnit
|
|
@@ -8592,6 +8699,10 @@ declare const editorMachine: StateMachine<
|
|
|
8592
8699
|
type: 'decorator.toggle'
|
|
8593
8700
|
decorator: string
|
|
8594
8701
|
}
|
|
8702
|
+
| {
|
|
8703
|
+
type: 'delete'
|
|
8704
|
+
selection: NonNullable<EditorSelection>
|
|
8705
|
+
}
|
|
8595
8706
|
| {
|
|
8596
8707
|
type: 'delete.backward'
|
|
8597
8708
|
unit: TextUnit
|
|
@@ -8958,6 +9069,10 @@ declare const editorMachine: StateMachine<
|
|
|
8958
9069
|
type: 'decorator.toggle'
|
|
8959
9070
|
decorator: string
|
|
8960
9071
|
}
|
|
9072
|
+
| {
|
|
9073
|
+
type: 'delete'
|
|
9074
|
+
selection: NonNullable<EditorSelection>
|
|
9075
|
+
}
|
|
8961
9076
|
| {
|
|
8962
9077
|
type: 'delete.backward'
|
|
8963
9078
|
unit: TextUnit
|
|
@@ -9321,6 +9436,10 @@ declare const editorMachine: StateMachine<
|
|
|
9321
9436
|
type: 'decorator.toggle'
|
|
9322
9437
|
decorator: string
|
|
9323
9438
|
}
|
|
9439
|
+
| {
|
|
9440
|
+
type: 'delete'
|
|
9441
|
+
selection: NonNullable<EditorSelection>
|
|
9442
|
+
}
|
|
9324
9443
|
| {
|
|
9325
9444
|
type: 'delete.backward'
|
|
9326
9445
|
unit: TextUnit
|
|
@@ -9832,6 +9951,10 @@ declare const editorMachine: StateMachine<
|
|
|
9832
9951
|
type: 'decorator.toggle'
|
|
9833
9952
|
decorator: string
|
|
9834
9953
|
}
|
|
9954
|
+
| {
|
|
9955
|
+
type: 'delete'
|
|
9956
|
+
selection: NonNullable<EditorSelection>
|
|
9957
|
+
}
|
|
9835
9958
|
| {
|
|
9836
9959
|
type: 'delete.backward'
|
|
9837
9960
|
unit: TextUnit
|
|
@@ -10177,6 +10300,10 @@ declare const editorMachine: StateMachine<
|
|
|
10177
10300
|
type: 'decorator.toggle'
|
|
10178
10301
|
decorator: string
|
|
10179
10302
|
}
|
|
10303
|
+
| {
|
|
10304
|
+
type: 'delete'
|
|
10305
|
+
selection: NonNullable<EditorSelection>
|
|
10306
|
+
}
|
|
10180
10307
|
| {
|
|
10181
10308
|
type: 'delete.backward'
|
|
10182
10309
|
unit: TextUnit
|
|
@@ -10472,6 +10599,10 @@ declare const editorMachine: StateMachine<
|
|
|
10472
10599
|
type: 'decorator.toggle'
|
|
10473
10600
|
decorator: string
|
|
10474
10601
|
}
|
|
10602
|
+
| {
|
|
10603
|
+
type: 'delete'
|
|
10604
|
+
selection: NonNullable<EditorSelection>
|
|
10605
|
+
}
|
|
10475
10606
|
| {
|
|
10476
10607
|
type: 'delete.backward'
|
|
10477
10608
|
unit: TextUnit
|
|
@@ -10817,6 +10948,10 @@ declare const editorMachine: StateMachine<
|
|
|
10817
10948
|
type: 'decorator.toggle'
|
|
10818
10949
|
decorator: string
|
|
10819
10950
|
}
|
|
10951
|
+
| {
|
|
10952
|
+
type: 'delete'
|
|
10953
|
+
selection: NonNullable<EditorSelection>
|
|
10954
|
+
}
|
|
10820
10955
|
| {
|
|
10821
10956
|
type: 'delete.backward'
|
|
10822
10957
|
unit: TextUnit
|
|
@@ -11105,6 +11240,10 @@ declare const editorMachine: StateMachine<
|
|
|
11105
11240
|
type: 'decorator.toggle'
|
|
11106
11241
|
decorator: string
|
|
11107
11242
|
}
|
|
11243
|
+
| {
|
|
11244
|
+
type: 'delete'
|
|
11245
|
+
selection: NonNullable<EditorSelection>
|
|
11246
|
+
}
|
|
11108
11247
|
| {
|
|
11109
11248
|
type: 'delete.backward'
|
|
11110
11249
|
unit: TextUnit
|
|
@@ -11450,6 +11589,10 @@ declare const editorMachine: StateMachine<
|
|
|
11450
11589
|
type: 'decorator.toggle'
|
|
11451
11590
|
decorator: string
|
|
11452
11591
|
}
|
|
11592
|
+
| {
|
|
11593
|
+
type: 'delete'
|
|
11594
|
+
selection: NonNullable<EditorSelection>
|
|
11595
|
+
}
|
|
11453
11596
|
| {
|
|
11454
11597
|
type: 'delete.backward'
|
|
11455
11598
|
unit: TextUnit
|
|
@@ -11738,6 +11881,10 @@ declare const editorMachine: StateMachine<
|
|
|
11738
11881
|
type: 'decorator.toggle'
|
|
11739
11882
|
decorator: string
|
|
11740
11883
|
}
|
|
11884
|
+
| {
|
|
11885
|
+
type: 'delete'
|
|
11886
|
+
selection: NonNullable<EditorSelection>
|
|
11887
|
+
}
|
|
11741
11888
|
| {
|
|
11742
11889
|
type: 'delete.backward'
|
|
11743
11890
|
unit: TextUnit
|
|
@@ -12083,6 +12230,10 @@ declare const editorMachine: StateMachine<
|
|
|
12083
12230
|
type: 'decorator.toggle'
|
|
12084
12231
|
decorator: string
|
|
12085
12232
|
}
|
|
12233
|
+
| {
|
|
12234
|
+
type: 'delete'
|
|
12235
|
+
selection: NonNullable<EditorSelection>
|
|
12236
|
+
}
|
|
12086
12237
|
| {
|
|
12087
12238
|
type: 'delete.backward'
|
|
12088
12239
|
unit: TextUnit
|
|
@@ -12380,6 +12531,10 @@ declare const editorMachine: StateMachine<
|
|
|
12380
12531
|
type: 'decorator.toggle'
|
|
12381
12532
|
decorator: string
|
|
12382
12533
|
}
|
|
12534
|
+
| {
|
|
12535
|
+
type: 'delete'
|
|
12536
|
+
selection: NonNullable<EditorSelection>
|
|
12537
|
+
}
|
|
12383
12538
|
| {
|
|
12384
12539
|
type: 'delete.backward'
|
|
12385
12540
|
unit: TextUnit
|
|
@@ -12725,6 +12880,10 @@ declare const editorMachine: StateMachine<
|
|
|
12725
12880
|
type: 'decorator.toggle'
|
|
12726
12881
|
decorator: string
|
|
12727
12882
|
}
|
|
12883
|
+
| {
|
|
12884
|
+
type: 'delete'
|
|
12885
|
+
selection: NonNullable<EditorSelection>
|
|
12886
|
+
}
|
|
12728
12887
|
| {
|
|
12729
12888
|
type: 'delete.backward'
|
|
12730
12889
|
unit: TextUnit
|
|
@@ -13027,6 +13186,10 @@ declare const editorMachine: StateMachine<
|
|
|
13027
13186
|
type: 'decorator.toggle'
|
|
13028
13187
|
decorator: string
|
|
13029
13188
|
}
|
|
13189
|
+
| {
|
|
13190
|
+
type: 'delete'
|
|
13191
|
+
selection: NonNullable<EditorSelection>
|
|
13192
|
+
}
|
|
13030
13193
|
| {
|
|
13031
13194
|
type: 'delete.backward'
|
|
13032
13195
|
unit: TextUnit
|
|
@@ -13372,6 +13535,10 @@ declare const editorMachine: StateMachine<
|
|
|
13372
13535
|
type: 'decorator.toggle'
|
|
13373
13536
|
decorator: string
|
|
13374
13537
|
}
|
|
13538
|
+
| {
|
|
13539
|
+
type: 'delete'
|
|
13540
|
+
selection: NonNullable<EditorSelection>
|
|
13541
|
+
}
|
|
13375
13542
|
| {
|
|
13376
13543
|
type: 'delete.backward'
|
|
13377
13544
|
unit: TextUnit
|
|
@@ -13660,6 +13827,10 @@ declare const editorMachine: StateMachine<
|
|
|
13660
13827
|
type: 'decorator.toggle'
|
|
13661
13828
|
decorator: string
|
|
13662
13829
|
}
|
|
13830
|
+
| {
|
|
13831
|
+
type: 'delete'
|
|
13832
|
+
selection: NonNullable<EditorSelection>
|
|
13833
|
+
}
|
|
13663
13834
|
| {
|
|
13664
13835
|
type: 'delete.backward'
|
|
13665
13836
|
unit: TextUnit
|
|
@@ -14005,6 +14176,10 @@ declare const editorMachine: StateMachine<
|
|
|
14005
14176
|
type: 'decorator.toggle'
|
|
14006
14177
|
decorator: string
|
|
14007
14178
|
}
|
|
14179
|
+
| {
|
|
14180
|
+
type: 'delete'
|
|
14181
|
+
selection: NonNullable<EditorSelection>
|
|
14182
|
+
}
|
|
14008
14183
|
| {
|
|
14009
14184
|
type: 'delete.backward'
|
|
14010
14185
|
unit: TextUnit
|
|
@@ -14347,6 +14522,10 @@ declare const editorMachine: StateMachine<
|
|
|
14347
14522
|
type: 'decorator.toggle'
|
|
14348
14523
|
decorator: string
|
|
14349
14524
|
}
|
|
14525
|
+
| {
|
|
14526
|
+
type: 'delete'
|
|
14527
|
+
selection: NonNullable<EditorSelection>
|
|
14528
|
+
}
|
|
14350
14529
|
| {
|
|
14351
14530
|
type: 'delete.backward'
|
|
14352
14531
|
unit: TextUnit
|
|
@@ -14692,6 +14871,10 @@ declare const editorMachine: StateMachine<
|
|
|
14692
14871
|
type: 'decorator.toggle'
|
|
14693
14872
|
decorator: string
|
|
14694
14873
|
}
|
|
14874
|
+
| {
|
|
14875
|
+
type: 'delete'
|
|
14876
|
+
selection: NonNullable<EditorSelection>
|
|
14877
|
+
}
|
|
14695
14878
|
| {
|
|
14696
14879
|
type: 'delete.backward'
|
|
14697
14880
|
unit: TextUnit
|
|
@@ -14989,6 +15172,10 @@ declare const editorMachine: StateMachine<
|
|
|
14989
15172
|
type: 'decorator.toggle'
|
|
14990
15173
|
decorator: string
|
|
14991
15174
|
}
|
|
15175
|
+
| {
|
|
15176
|
+
type: 'delete'
|
|
15177
|
+
selection: NonNullable<EditorSelection>
|
|
15178
|
+
}
|
|
14992
15179
|
| {
|
|
14993
15180
|
type: 'delete.backward'
|
|
14994
15181
|
unit: TextUnit
|
|
@@ -15334,6 +15521,10 @@ declare const editorMachine: StateMachine<
|
|
|
15334
15521
|
type: 'decorator.toggle'
|
|
15335
15522
|
decorator: string
|
|
15336
15523
|
}
|
|
15524
|
+
| {
|
|
15525
|
+
type: 'delete'
|
|
15526
|
+
selection: NonNullable<EditorSelection>
|
|
15527
|
+
}
|
|
15337
15528
|
| {
|
|
15338
15529
|
type: 'delete.backward'
|
|
15339
15530
|
unit: TextUnit
|
|
@@ -15632,6 +15823,10 @@ declare const editorMachine: StateMachine<
|
|
|
15632
15823
|
type: 'decorator.toggle'
|
|
15633
15824
|
decorator: string
|
|
15634
15825
|
}
|
|
15826
|
+
| {
|
|
15827
|
+
type: 'delete'
|
|
15828
|
+
selection: NonNullable<EditorSelection>
|
|
15829
|
+
}
|
|
15635
15830
|
| {
|
|
15636
15831
|
type: 'delete.backward'
|
|
15637
15832
|
unit: TextUnit
|
|
@@ -15977,6 +16172,10 @@ declare const editorMachine: StateMachine<
|
|
|
15977
16172
|
type: 'decorator.toggle'
|
|
15978
16173
|
decorator: string
|
|
15979
16174
|
}
|
|
16175
|
+
| {
|
|
16176
|
+
type: 'delete'
|
|
16177
|
+
selection: NonNullable<EditorSelection>
|
|
16178
|
+
}
|
|
15980
16179
|
| {
|
|
15981
16180
|
type: 'delete.backward'
|
|
15982
16181
|
unit: TextUnit
|
|
@@ -16266,6 +16465,10 @@ declare const editorMachine: StateMachine<
|
|
|
16266
16465
|
type: 'decorator.toggle'
|
|
16267
16466
|
decorator: string
|
|
16268
16467
|
}
|
|
16468
|
+
| {
|
|
16469
|
+
type: 'delete'
|
|
16470
|
+
selection: NonNullable<EditorSelection>
|
|
16471
|
+
}
|
|
16269
16472
|
| {
|
|
16270
16473
|
type: 'delete.backward'
|
|
16271
16474
|
unit: TextUnit
|
|
@@ -16611,6 +16814,10 @@ declare const editorMachine: StateMachine<
|
|
|
16611
16814
|
type: 'decorator.toggle'
|
|
16612
16815
|
decorator: string
|
|
16613
16816
|
}
|
|
16817
|
+
| {
|
|
16818
|
+
type: 'delete'
|
|
16819
|
+
selection: NonNullable<EditorSelection>
|
|
16820
|
+
}
|
|
16614
16821
|
| {
|
|
16615
16822
|
type: 'delete.backward'
|
|
16616
16823
|
unit: TextUnit
|
|
@@ -16902,6 +17109,10 @@ declare const editorMachine: StateMachine<
|
|
|
16902
17109
|
type: 'decorator.toggle'
|
|
16903
17110
|
decorator: string
|
|
16904
17111
|
}
|
|
17112
|
+
| {
|
|
17113
|
+
type: 'delete'
|
|
17114
|
+
selection: NonNullable<EditorSelection>
|
|
17115
|
+
}
|
|
16905
17116
|
| {
|
|
16906
17117
|
type: 'delete.backward'
|
|
16907
17118
|
unit: TextUnit
|
|
@@ -17247,6 +17458,10 @@ declare const editorMachine: StateMachine<
|
|
|
17247
17458
|
type: 'decorator.toggle'
|
|
17248
17459
|
decorator: string
|
|
17249
17460
|
}
|
|
17461
|
+
| {
|
|
17462
|
+
type: 'delete'
|
|
17463
|
+
selection: NonNullable<EditorSelection>
|
|
17464
|
+
}
|
|
17250
17465
|
| {
|
|
17251
17466
|
type: 'delete.backward'
|
|
17252
17467
|
unit: TextUnit
|
|
@@ -17544,6 +17759,10 @@ declare const editorMachine: StateMachine<
|
|
|
17544
17759
|
type: 'decorator.toggle'
|
|
17545
17760
|
decorator: string
|
|
17546
17761
|
}
|
|
17762
|
+
| {
|
|
17763
|
+
type: 'delete'
|
|
17764
|
+
selection: NonNullable<EditorSelection>
|
|
17765
|
+
}
|
|
17547
17766
|
| {
|
|
17548
17767
|
type: 'delete.backward'
|
|
17549
17768
|
unit: TextUnit
|
|
@@ -17889,6 +18108,10 @@ declare const editorMachine: StateMachine<
|
|
|
17889
18108
|
type: 'decorator.toggle'
|
|
17890
18109
|
decorator: string
|
|
17891
18110
|
}
|
|
18111
|
+
| {
|
|
18112
|
+
type: 'delete'
|
|
18113
|
+
selection: NonNullable<EditorSelection>
|
|
18114
|
+
}
|
|
17892
18115
|
| {
|
|
17893
18116
|
type: 'delete.backward'
|
|
17894
18117
|
unit: TextUnit
|
|
@@ -18186,6 +18409,10 @@ declare const editorMachine: StateMachine<
|
|
|
18186
18409
|
type: 'decorator.toggle'
|
|
18187
18410
|
decorator: string
|
|
18188
18411
|
}
|
|
18412
|
+
| {
|
|
18413
|
+
type: 'delete'
|
|
18414
|
+
selection: NonNullable<EditorSelection>
|
|
18415
|
+
}
|
|
18189
18416
|
| {
|
|
18190
18417
|
type: 'delete.backward'
|
|
18191
18418
|
unit: TextUnit
|
|
@@ -18531,6 +18758,10 @@ declare const editorMachine: StateMachine<
|
|
|
18531
18758
|
type: 'decorator.toggle'
|
|
18532
18759
|
decorator: string
|
|
18533
18760
|
}
|
|
18761
|
+
| {
|
|
18762
|
+
type: 'delete'
|
|
18763
|
+
selection: NonNullable<EditorSelection>
|
|
18764
|
+
}
|
|
18534
18765
|
| {
|
|
18535
18766
|
type: 'delete.backward'
|
|
18536
18767
|
unit: TextUnit
|
|
@@ -19101,6 +19332,16 @@ declare type NativeBehaviorEvent =
|
|
|
19101
19332
|
dataTransfer: DataTransfer
|
|
19102
19333
|
}
|
|
19103
19334
|
|
|
19335
|
+
/**
|
|
19336
|
+
* @beta
|
|
19337
|
+
* Restrict the editor to one line. The plugin takes care of blocking
|
|
19338
|
+
* `insert.break` events and smart handling of other `insert.*` events.
|
|
19339
|
+
*
|
|
19340
|
+
* Place it with as high priority as possible to make sure other plugins don't
|
|
19341
|
+
* overwrite `insert.*` events before this plugin gets a chance to do so.
|
|
19342
|
+
*/
|
|
19343
|
+
export declare function OneLinePlugin(): JSX.Element
|
|
19344
|
+
|
|
19104
19345
|
/**
|
|
19105
19346
|
* @public
|
|
19106
19347
|
*/
|
|
@@ -19256,6 +19497,10 @@ declare type SyntheticBehaviorEvent =
|
|
|
19256
19497
|
type: 'decorator.toggle'
|
|
19257
19498
|
decorator: string
|
|
19258
19499
|
}
|
|
19500
|
+
| {
|
|
19501
|
+
type: 'delete'
|
|
19502
|
+
selection: NonNullable<EditorSelection>
|
|
19503
|
+
}
|
|
19259
19504
|
| {
|
|
19260
19505
|
type: 'delete.backward'
|
|
19261
19506
|
unit: TextUnit
|