@portabletext/editor 1.44.16 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_chunks-cjs/behavior.core.cjs +5 -5
- package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
- package/lib/_chunks-cjs/behavior.markdown.cjs +28 -22
- package/lib/_chunks-cjs/behavior.markdown.cjs.map +1 -1
- package/lib/_chunks-cjs/editor-provider.cjs +62 -38
- package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
- package/lib/_chunks-cjs/parse-blocks.cjs +74 -22
- package/lib/_chunks-cjs/parse-blocks.cjs.map +1 -1
- package/lib/_chunks-es/behavior.core.js +5 -5
- package/lib/_chunks-es/behavior.core.js.map +1 -1
- package/lib/_chunks-es/behavior.markdown.js +28 -22
- package/lib/_chunks-es/behavior.markdown.js.map +1 -1
- package/lib/_chunks-es/editor-provider.js +63 -39
- package/lib/_chunks-es/editor-provider.js.map +1 -1
- package/lib/_chunks-es/parse-blocks.js +75 -23
- package/lib/_chunks-es/parse-blocks.js.map +1 -1
- package/lib/behaviors/index.cjs +18 -14
- package/lib/behaviors/index.cjs.map +1 -1
- package/lib/behaviors/index.d.cts +53 -41
- package/lib/behaviors/index.d.ts +53 -41
- package/lib/behaviors/index.js +18 -14
- package/lib/behaviors/index.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +28 -9
- package/lib/index.d.ts +28 -9
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.cjs +7 -7
- package/lib/plugins/index.cjs.map +1 -1
- package/lib/plugins/index.d.cts +8 -6
- package/lib/plugins/index.d.ts +8 -6
- package/lib/plugins/index.js +7 -7
- package/lib/plugins/index.js.map +1 -1
- package/lib/selectors/index.d.cts +8 -6
- package/lib/selectors/index.d.ts +8 -6
- package/lib/utils/index.d.cts +8 -6
- package/lib/utils/index.d.ts +8 -6
- package/package.json +3 -3
- package/src/behavior-actions/behavior.action.annotation.add.ts +26 -5
- package/src/behavior-actions/behavior.action.decorator.add.ts +4 -4
- package/src/behavior-actions/behavior.action.delete.text.ts +1 -4
- package/src/behavior-actions/behavior.action.delete.ts +2 -2
- package/src/behavior-actions/behavior.action.insert-inline-object.ts +14 -13
- package/src/behavior-actions/behavior.action.select.ts +1 -1
- package/src/behaviors/behavior.abstract.decorator.ts +2 -2
- package/src/behaviors/behavior.abstract.select.ts +2 -2
- package/src/behaviors/behavior.core.annotations.ts +1 -1
- package/src/behaviors/behavior.core.block-objects.ts +4 -4
- package/src/behaviors/behavior.decorator-pair.ts +3 -3
- package/src/behaviors/behavior.default.ts +4 -4
- package/src/behaviors/behavior.emoji-picker.ts +18 -14
- package/src/behaviors/behavior.markdown.ts +28 -22
- package/src/behaviors/behavior.types.event.ts +11 -6
- package/src/converters/converter.portable-text.deserialize.test.ts +12 -3
- package/src/converters/converter.text-html.deserialize.test.ts +3 -1
- package/src/editor/Editable.tsx +1 -1
- package/src/editor/define-schema.ts +29 -5
- package/src/editor/plugins/__tests__/withEditableAPIInsert.test.tsx +2 -2
- package/src/editor/plugins/create-with-event-listeners.ts +1 -1
- package/src/internal-utils/parse-blocks.ts +109 -39
- package/src/plugins/plugin.decorator-shortcut.ts +3 -3
- package/src/plugins/plugin.one-line.tsx +1 -1
|
@@ -73,7 +73,7 @@ declare type AbstractBehaviorEvent =
|
|
|
73
73
|
| {
|
|
74
74
|
type: StrictExtract_2<AbstractBehaviorEventType, 'decorator.toggle'>
|
|
75
75
|
decorator: string
|
|
76
|
-
|
|
76
|
+
at?: {
|
|
77
77
|
anchor: BlockOffset_2
|
|
78
78
|
focus: BlockOffset_2
|
|
79
79
|
}
|
|
@@ -474,8 +474,8 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
474
474
|
| 'deserialize.*'
|
|
475
475
|
| 'split.*'
|
|
476
476
|
| 'focus.*'
|
|
477
|
-
| 'block.*'
|
|
478
477
|
| 'style.*'
|
|
478
|
+
| 'block.*'
|
|
479
479
|
| 'delete.*'
|
|
480
480
|
| 'move.*'
|
|
481
481
|
| 'select.*'
|
|
@@ -668,7 +668,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
668
668
|
'decorator.add'
|
|
669
669
|
>
|
|
670
670
|
decorator: string
|
|
671
|
-
|
|
671
|
+
at?: {
|
|
672
672
|
anchor: BlockOffset
|
|
673
673
|
focus: BlockOffset
|
|
674
674
|
}
|
|
@@ -727,7 +727,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
727
727
|
| 'split.block',
|
|
728
728
|
'delete'
|
|
729
729
|
>
|
|
730
|
-
|
|
730
|
+
at: NonNullable<EditorSelection>
|
|
731
731
|
}
|
|
732
732
|
| {
|
|
733
733
|
type: StrictExtract<
|
|
@@ -839,8 +839,10 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
839
839
|
| 'split.block',
|
|
840
840
|
'delete.text'
|
|
841
841
|
>
|
|
842
|
-
|
|
843
|
-
|
|
842
|
+
at: {
|
|
843
|
+
anchor: BlockOffset
|
|
844
|
+
focus: BlockOffset
|
|
845
|
+
}
|
|
844
846
|
}
|
|
845
847
|
| {
|
|
846
848
|
type: StrictExtract<
|
|
@@ -1104,7 +1106,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
1104
1106
|
| 'split.block',
|
|
1105
1107
|
'select'
|
|
1106
1108
|
>
|
|
1107
|
-
|
|
1109
|
+
at: EditorSelection
|
|
1108
1110
|
}
|
|
1109
1111
|
| {
|
|
1110
1112
|
type: StrictExtract<
|
|
@@ -1191,7 +1193,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
1191
1193
|
'decorator.toggle'
|
|
1192
1194
|
>
|
|
1193
1195
|
decorator: string
|
|
1194
|
-
|
|
1196
|
+
at?: {
|
|
1195
1197
|
anchor: BlockOffset
|
|
1196
1198
|
focus: BlockOffset
|
|
1197
1199
|
}
|
|
@@ -2092,8 +2094,8 @@ export declare function createCodeEditorBehaviors(
|
|
|
2092
2094
|
| 'deserialize.*'
|
|
2093
2095
|
| 'split.*'
|
|
2094
2096
|
| 'focus.*'
|
|
2095
|
-
| 'block.*'
|
|
2096
2097
|
| 'style.*'
|
|
2098
|
+
| 'block.*'
|
|
2097
2099
|
| 'delete.*'
|
|
2098
2100
|
| 'move.*'
|
|
2099
2101
|
| 'select.*'
|
|
@@ -2286,7 +2288,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2286
2288
|
'decorator.add'
|
|
2287
2289
|
>
|
|
2288
2290
|
decorator: string
|
|
2289
|
-
|
|
2291
|
+
at?: {
|
|
2290
2292
|
anchor: BlockOffset
|
|
2291
2293
|
focus: BlockOffset
|
|
2292
2294
|
}
|
|
@@ -2345,7 +2347,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2345
2347
|
| 'split.block',
|
|
2346
2348
|
'delete'
|
|
2347
2349
|
>
|
|
2348
|
-
|
|
2350
|
+
at: NonNullable<EditorSelection>
|
|
2349
2351
|
}
|
|
2350
2352
|
| {
|
|
2351
2353
|
type: StrictExtract<
|
|
@@ -2457,8 +2459,10 @@ export declare function createCodeEditorBehaviors(
|
|
|
2457
2459
|
| 'split.block',
|
|
2458
2460
|
'delete.text'
|
|
2459
2461
|
>
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
+
at: {
|
|
2463
|
+
anchor: BlockOffset
|
|
2464
|
+
focus: BlockOffset
|
|
2465
|
+
}
|
|
2462
2466
|
}
|
|
2463
2467
|
| {
|
|
2464
2468
|
type: StrictExtract<
|
|
@@ -2722,7 +2726,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2722
2726
|
| 'split.block',
|
|
2723
2727
|
'select'
|
|
2724
2728
|
>
|
|
2725
|
-
|
|
2729
|
+
at: EditorSelection
|
|
2726
2730
|
}
|
|
2727
2731
|
| {
|
|
2728
2732
|
type: StrictExtract<
|
|
@@ -2809,7 +2813,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2809
2813
|
'decorator.toggle'
|
|
2810
2814
|
>
|
|
2811
2815
|
decorator: string
|
|
2812
|
-
|
|
2816
|
+
at?: {
|
|
2813
2817
|
anchor: BlockOffset
|
|
2814
2818
|
focus: BlockOffset
|
|
2815
2819
|
}
|
|
@@ -3710,8 +3714,8 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3710
3714
|
| 'deserialize.*'
|
|
3711
3715
|
| 'split.*'
|
|
3712
3716
|
| 'focus.*'
|
|
3713
|
-
| 'block.*'
|
|
3714
3717
|
| 'style.*'
|
|
3718
|
+
| 'block.*'
|
|
3715
3719
|
| 'delete.*'
|
|
3716
3720
|
| 'move.*'
|
|
3717
3721
|
| 'select.*'
|
|
@@ -3904,7 +3908,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3904
3908
|
'decorator.add'
|
|
3905
3909
|
>
|
|
3906
3910
|
decorator: string
|
|
3907
|
-
|
|
3911
|
+
at?: {
|
|
3908
3912
|
anchor: BlockOffset
|
|
3909
3913
|
focus: BlockOffset
|
|
3910
3914
|
}
|
|
@@ -3963,7 +3967,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3963
3967
|
| 'split.block',
|
|
3964
3968
|
'delete'
|
|
3965
3969
|
>
|
|
3966
|
-
|
|
3970
|
+
at: NonNullable<EditorSelection>
|
|
3967
3971
|
}
|
|
3968
3972
|
| {
|
|
3969
3973
|
type: StrictExtract<
|
|
@@ -4075,8 +4079,10 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4075
4079
|
| 'split.block',
|
|
4076
4080
|
'delete.text'
|
|
4077
4081
|
>
|
|
4078
|
-
|
|
4079
|
-
|
|
4082
|
+
at: {
|
|
4083
|
+
anchor: BlockOffset
|
|
4084
|
+
focus: BlockOffset
|
|
4085
|
+
}
|
|
4080
4086
|
}
|
|
4081
4087
|
| {
|
|
4082
4088
|
type: StrictExtract<
|
|
@@ -4340,7 +4346,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4340
4346
|
| 'split.block',
|
|
4341
4347
|
'select'
|
|
4342
4348
|
>
|
|
4343
|
-
|
|
4349
|
+
at: EditorSelection
|
|
4344
4350
|
}
|
|
4345
4351
|
| {
|
|
4346
4352
|
type: StrictExtract<
|
|
@@ -4427,7 +4433,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4427
4433
|
'decorator.toggle'
|
|
4428
4434
|
>
|
|
4429
4435
|
decorator: string
|
|
4430
|
-
|
|
4436
|
+
at?: {
|
|
4431
4437
|
anchor: BlockOffset
|
|
4432
4438
|
focus: BlockOffset
|
|
4433
4439
|
}
|
|
@@ -5328,8 +5334,8 @@ export declare function createLinkBehaviors(
|
|
|
5328
5334
|
| 'deserialize.*'
|
|
5329
5335
|
| 'split.*'
|
|
5330
5336
|
| 'focus.*'
|
|
5331
|
-
| 'block.*'
|
|
5332
5337
|
| 'style.*'
|
|
5338
|
+
| 'block.*'
|
|
5333
5339
|
| 'delete.*'
|
|
5334
5340
|
| 'move.*'
|
|
5335
5341
|
| 'select.*'
|
|
@@ -5522,7 +5528,7 @@ export declare function createLinkBehaviors(
|
|
|
5522
5528
|
'decorator.add'
|
|
5523
5529
|
>
|
|
5524
5530
|
decorator: string
|
|
5525
|
-
|
|
5531
|
+
at?: {
|
|
5526
5532
|
anchor: BlockOffset
|
|
5527
5533
|
focus: BlockOffset
|
|
5528
5534
|
}
|
|
@@ -5581,7 +5587,7 @@ export declare function createLinkBehaviors(
|
|
|
5581
5587
|
| 'split.block',
|
|
5582
5588
|
'delete'
|
|
5583
5589
|
>
|
|
5584
|
-
|
|
5590
|
+
at: NonNullable<EditorSelection>
|
|
5585
5591
|
}
|
|
5586
5592
|
| {
|
|
5587
5593
|
type: StrictExtract<
|
|
@@ -5693,8 +5699,10 @@ export declare function createLinkBehaviors(
|
|
|
5693
5699
|
| 'split.block',
|
|
5694
5700
|
'delete.text'
|
|
5695
5701
|
>
|
|
5696
|
-
|
|
5697
|
-
|
|
5702
|
+
at: {
|
|
5703
|
+
anchor: BlockOffset
|
|
5704
|
+
focus: BlockOffset
|
|
5705
|
+
}
|
|
5698
5706
|
}
|
|
5699
5707
|
| {
|
|
5700
5708
|
type: StrictExtract<
|
|
@@ -5958,7 +5966,7 @@ export declare function createLinkBehaviors(
|
|
|
5958
5966
|
| 'split.block',
|
|
5959
5967
|
'select'
|
|
5960
5968
|
>
|
|
5961
|
-
|
|
5969
|
+
at: EditorSelection
|
|
5962
5970
|
}
|
|
5963
5971
|
| {
|
|
5964
5972
|
type: StrictExtract<
|
|
@@ -6045,7 +6053,7 @@ export declare function createLinkBehaviors(
|
|
|
6045
6053
|
'decorator.toggle'
|
|
6046
6054
|
>
|
|
6047
6055
|
decorator: string
|
|
6048
|
-
|
|
6056
|
+
at?: {
|
|
6049
6057
|
anchor: BlockOffset
|
|
6050
6058
|
focus: BlockOffset
|
|
6051
6059
|
}
|
|
@@ -6988,8 +6996,8 @@ export declare function createMarkdownBehaviors(
|
|
|
6988
6996
|
| 'deserialize.*'
|
|
6989
6997
|
| 'split.*'
|
|
6990
6998
|
| 'focus.*'
|
|
6991
|
-
| 'block.*'
|
|
6992
6999
|
| 'style.*'
|
|
7000
|
+
| 'block.*'
|
|
6993
7001
|
| 'delete.*'
|
|
6994
7002
|
| 'move.*'
|
|
6995
7003
|
| 'select.*'
|
|
@@ -7182,7 +7190,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7182
7190
|
'decorator.add'
|
|
7183
7191
|
>
|
|
7184
7192
|
decorator: string
|
|
7185
|
-
|
|
7193
|
+
at?: {
|
|
7186
7194
|
anchor: BlockOffset
|
|
7187
7195
|
focus: BlockOffset
|
|
7188
7196
|
}
|
|
@@ -7241,7 +7249,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7241
7249
|
| 'split.block',
|
|
7242
7250
|
'delete'
|
|
7243
7251
|
>
|
|
7244
|
-
|
|
7252
|
+
at: NonNullable<EditorSelection>
|
|
7245
7253
|
}
|
|
7246
7254
|
| {
|
|
7247
7255
|
type: StrictExtract<
|
|
@@ -7353,8 +7361,10 @@ export declare function createMarkdownBehaviors(
|
|
|
7353
7361
|
| 'split.block',
|
|
7354
7362
|
'delete.text'
|
|
7355
7363
|
>
|
|
7356
|
-
|
|
7357
|
-
|
|
7364
|
+
at: {
|
|
7365
|
+
anchor: BlockOffset
|
|
7366
|
+
focus: BlockOffset
|
|
7367
|
+
}
|
|
7358
7368
|
}
|
|
7359
7369
|
| {
|
|
7360
7370
|
type: StrictExtract<
|
|
@@ -7618,7 +7628,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7618
7628
|
| 'split.block',
|
|
7619
7629
|
'select'
|
|
7620
7630
|
>
|
|
7621
|
-
|
|
7631
|
+
at: EditorSelection
|
|
7622
7632
|
}
|
|
7623
7633
|
| {
|
|
7624
7634
|
type: StrictExtract<
|
|
@@ -7705,7 +7715,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7705
7715
|
'decorator.toggle'
|
|
7706
7716
|
>
|
|
7707
7717
|
decorator: string
|
|
7708
|
-
|
|
7718
|
+
at?: {
|
|
7709
7719
|
anchor: BlockOffset
|
|
7710
7720
|
focus: BlockOffset
|
|
7711
7721
|
}
|
|
@@ -13220,7 +13230,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13220
13230
|
| {
|
|
13221
13231
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'decorator.add'>
|
|
13222
13232
|
decorator: string
|
|
13223
|
-
|
|
13233
|
+
at?: {
|
|
13224
13234
|
anchor: BlockOffset_2
|
|
13225
13235
|
focus: BlockOffset_2
|
|
13226
13236
|
}
|
|
@@ -13231,7 +13241,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13231
13241
|
}
|
|
13232
13242
|
| {
|
|
13233
13243
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete'>
|
|
13234
|
-
|
|
13244
|
+
at: NonNullable<EditorSelection_2>
|
|
13235
13245
|
}
|
|
13236
13246
|
| {
|
|
13237
13247
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.backward'>
|
|
@@ -13247,8 +13257,10 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13247
13257
|
}
|
|
13248
13258
|
| {
|
|
13249
13259
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.text'>
|
|
13250
|
-
|
|
13251
|
-
|
|
13260
|
+
at: {
|
|
13261
|
+
anchor: BlockOffset_2
|
|
13262
|
+
focus: BlockOffset_2
|
|
13263
|
+
}
|
|
13252
13264
|
}
|
|
13253
13265
|
| {
|
|
13254
13266
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'focus'>
|
|
@@ -13296,7 +13308,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13296
13308
|
}
|
|
13297
13309
|
| {
|
|
13298
13310
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'select'>
|
|
13299
|
-
|
|
13311
|
+
at: EditorSelection_2
|
|
13300
13312
|
}
|
|
13301
13313
|
| {
|
|
13302
13314
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'split.block'>
|
package/lib/behaviors/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare type AbstractBehaviorEvent =
|
|
|
73
73
|
| {
|
|
74
74
|
type: StrictExtract_2<AbstractBehaviorEventType, 'decorator.toggle'>
|
|
75
75
|
decorator: string
|
|
76
|
-
|
|
76
|
+
at?: {
|
|
77
77
|
anchor: BlockOffset_2
|
|
78
78
|
focus: BlockOffset_2
|
|
79
79
|
}
|
|
@@ -474,8 +474,8 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
474
474
|
| 'deserialize.*'
|
|
475
475
|
| 'split.*'
|
|
476
476
|
| 'focus.*'
|
|
477
|
-
| 'block.*'
|
|
478
477
|
| 'style.*'
|
|
478
|
+
| 'block.*'
|
|
479
479
|
| 'delete.*'
|
|
480
480
|
| 'move.*'
|
|
481
481
|
| 'select.*'
|
|
@@ -668,7 +668,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
668
668
|
'decorator.add'
|
|
669
669
|
>
|
|
670
670
|
decorator: string
|
|
671
|
-
|
|
671
|
+
at?: {
|
|
672
672
|
anchor: BlockOffset
|
|
673
673
|
focus: BlockOffset
|
|
674
674
|
}
|
|
@@ -727,7 +727,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
727
727
|
| 'split.block',
|
|
728
728
|
'delete'
|
|
729
729
|
>
|
|
730
|
-
|
|
730
|
+
at: NonNullable<EditorSelection>
|
|
731
731
|
}
|
|
732
732
|
| {
|
|
733
733
|
type: StrictExtract<
|
|
@@ -839,8 +839,10 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
839
839
|
| 'split.block',
|
|
840
840
|
'delete.text'
|
|
841
841
|
>
|
|
842
|
-
|
|
843
|
-
|
|
842
|
+
at: {
|
|
843
|
+
anchor: BlockOffset
|
|
844
|
+
focus: BlockOffset
|
|
845
|
+
}
|
|
844
846
|
}
|
|
845
847
|
| {
|
|
846
848
|
type: StrictExtract<
|
|
@@ -1104,7 +1106,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
1104
1106
|
| 'split.block',
|
|
1105
1107
|
'select'
|
|
1106
1108
|
>
|
|
1107
|
-
|
|
1109
|
+
at: EditorSelection
|
|
1108
1110
|
}
|
|
1109
1111
|
| {
|
|
1110
1112
|
type: StrictExtract<
|
|
@@ -1191,7 +1193,7 @@ export declare const coreBehaviors: Behavior_2<
|
|
|
1191
1193
|
'decorator.toggle'
|
|
1192
1194
|
>
|
|
1193
1195
|
decorator: string
|
|
1194
|
-
|
|
1196
|
+
at?: {
|
|
1195
1197
|
anchor: BlockOffset
|
|
1196
1198
|
focus: BlockOffset
|
|
1197
1199
|
}
|
|
@@ -2092,8 +2094,8 @@ export declare function createCodeEditorBehaviors(
|
|
|
2092
2094
|
| 'deserialize.*'
|
|
2093
2095
|
| 'split.*'
|
|
2094
2096
|
| 'focus.*'
|
|
2095
|
-
| 'block.*'
|
|
2096
2097
|
| 'style.*'
|
|
2098
|
+
| 'block.*'
|
|
2097
2099
|
| 'delete.*'
|
|
2098
2100
|
| 'move.*'
|
|
2099
2101
|
| 'select.*'
|
|
@@ -2286,7 +2288,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2286
2288
|
'decorator.add'
|
|
2287
2289
|
>
|
|
2288
2290
|
decorator: string
|
|
2289
|
-
|
|
2291
|
+
at?: {
|
|
2290
2292
|
anchor: BlockOffset
|
|
2291
2293
|
focus: BlockOffset
|
|
2292
2294
|
}
|
|
@@ -2345,7 +2347,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2345
2347
|
| 'split.block',
|
|
2346
2348
|
'delete'
|
|
2347
2349
|
>
|
|
2348
|
-
|
|
2350
|
+
at: NonNullable<EditorSelection>
|
|
2349
2351
|
}
|
|
2350
2352
|
| {
|
|
2351
2353
|
type: StrictExtract<
|
|
@@ -2457,8 +2459,10 @@ export declare function createCodeEditorBehaviors(
|
|
|
2457
2459
|
| 'split.block',
|
|
2458
2460
|
'delete.text'
|
|
2459
2461
|
>
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
+
at: {
|
|
2463
|
+
anchor: BlockOffset
|
|
2464
|
+
focus: BlockOffset
|
|
2465
|
+
}
|
|
2462
2466
|
}
|
|
2463
2467
|
| {
|
|
2464
2468
|
type: StrictExtract<
|
|
@@ -2722,7 +2726,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2722
2726
|
| 'split.block',
|
|
2723
2727
|
'select'
|
|
2724
2728
|
>
|
|
2725
|
-
|
|
2729
|
+
at: EditorSelection
|
|
2726
2730
|
}
|
|
2727
2731
|
| {
|
|
2728
2732
|
type: StrictExtract<
|
|
@@ -2809,7 +2813,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
2809
2813
|
'decorator.toggle'
|
|
2810
2814
|
>
|
|
2811
2815
|
decorator: string
|
|
2812
|
-
|
|
2816
|
+
at?: {
|
|
2813
2817
|
anchor: BlockOffset
|
|
2814
2818
|
focus: BlockOffset
|
|
2815
2819
|
}
|
|
@@ -3710,8 +3714,8 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3710
3714
|
| 'deserialize.*'
|
|
3711
3715
|
| 'split.*'
|
|
3712
3716
|
| 'focus.*'
|
|
3713
|
-
| 'block.*'
|
|
3714
3717
|
| 'style.*'
|
|
3718
|
+
| 'block.*'
|
|
3715
3719
|
| 'delete.*'
|
|
3716
3720
|
| 'move.*'
|
|
3717
3721
|
| 'select.*'
|
|
@@ -3904,7 +3908,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3904
3908
|
'decorator.add'
|
|
3905
3909
|
>
|
|
3906
3910
|
decorator: string
|
|
3907
|
-
|
|
3911
|
+
at?: {
|
|
3908
3912
|
anchor: BlockOffset
|
|
3909
3913
|
focus: BlockOffset
|
|
3910
3914
|
}
|
|
@@ -3963,7 +3967,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
3963
3967
|
| 'split.block',
|
|
3964
3968
|
'delete'
|
|
3965
3969
|
>
|
|
3966
|
-
|
|
3970
|
+
at: NonNullable<EditorSelection>
|
|
3967
3971
|
}
|
|
3968
3972
|
| {
|
|
3969
3973
|
type: StrictExtract<
|
|
@@ -4075,8 +4079,10 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4075
4079
|
| 'split.block',
|
|
4076
4080
|
'delete.text'
|
|
4077
4081
|
>
|
|
4078
|
-
|
|
4079
|
-
|
|
4082
|
+
at: {
|
|
4083
|
+
anchor: BlockOffset
|
|
4084
|
+
focus: BlockOffset
|
|
4085
|
+
}
|
|
4080
4086
|
}
|
|
4081
4087
|
| {
|
|
4082
4088
|
type: StrictExtract<
|
|
@@ -4340,7 +4346,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4340
4346
|
| 'split.block',
|
|
4341
4347
|
'select'
|
|
4342
4348
|
>
|
|
4343
|
-
|
|
4349
|
+
at: EditorSelection
|
|
4344
4350
|
}
|
|
4345
4351
|
| {
|
|
4346
4352
|
type: StrictExtract<
|
|
@@ -4427,7 +4433,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
4427
4433
|
'decorator.toggle'
|
|
4428
4434
|
>
|
|
4429
4435
|
decorator: string
|
|
4430
|
-
|
|
4436
|
+
at?: {
|
|
4431
4437
|
anchor: BlockOffset
|
|
4432
4438
|
focus: BlockOffset
|
|
4433
4439
|
}
|
|
@@ -5328,8 +5334,8 @@ export declare function createLinkBehaviors(
|
|
|
5328
5334
|
| 'deserialize.*'
|
|
5329
5335
|
| 'split.*'
|
|
5330
5336
|
| 'focus.*'
|
|
5331
|
-
| 'block.*'
|
|
5332
5337
|
| 'style.*'
|
|
5338
|
+
| 'block.*'
|
|
5333
5339
|
| 'delete.*'
|
|
5334
5340
|
| 'move.*'
|
|
5335
5341
|
| 'select.*'
|
|
@@ -5522,7 +5528,7 @@ export declare function createLinkBehaviors(
|
|
|
5522
5528
|
'decorator.add'
|
|
5523
5529
|
>
|
|
5524
5530
|
decorator: string
|
|
5525
|
-
|
|
5531
|
+
at?: {
|
|
5526
5532
|
anchor: BlockOffset
|
|
5527
5533
|
focus: BlockOffset
|
|
5528
5534
|
}
|
|
@@ -5581,7 +5587,7 @@ export declare function createLinkBehaviors(
|
|
|
5581
5587
|
| 'split.block',
|
|
5582
5588
|
'delete'
|
|
5583
5589
|
>
|
|
5584
|
-
|
|
5590
|
+
at: NonNullable<EditorSelection>
|
|
5585
5591
|
}
|
|
5586
5592
|
| {
|
|
5587
5593
|
type: StrictExtract<
|
|
@@ -5693,8 +5699,10 @@ export declare function createLinkBehaviors(
|
|
|
5693
5699
|
| 'split.block',
|
|
5694
5700
|
'delete.text'
|
|
5695
5701
|
>
|
|
5696
|
-
|
|
5697
|
-
|
|
5702
|
+
at: {
|
|
5703
|
+
anchor: BlockOffset
|
|
5704
|
+
focus: BlockOffset
|
|
5705
|
+
}
|
|
5698
5706
|
}
|
|
5699
5707
|
| {
|
|
5700
5708
|
type: StrictExtract<
|
|
@@ -5958,7 +5966,7 @@ export declare function createLinkBehaviors(
|
|
|
5958
5966
|
| 'split.block',
|
|
5959
5967
|
'select'
|
|
5960
5968
|
>
|
|
5961
|
-
|
|
5969
|
+
at: EditorSelection
|
|
5962
5970
|
}
|
|
5963
5971
|
| {
|
|
5964
5972
|
type: StrictExtract<
|
|
@@ -6045,7 +6053,7 @@ export declare function createLinkBehaviors(
|
|
|
6045
6053
|
'decorator.toggle'
|
|
6046
6054
|
>
|
|
6047
6055
|
decorator: string
|
|
6048
|
-
|
|
6056
|
+
at?: {
|
|
6049
6057
|
anchor: BlockOffset
|
|
6050
6058
|
focus: BlockOffset
|
|
6051
6059
|
}
|
|
@@ -6988,8 +6996,8 @@ export declare function createMarkdownBehaviors(
|
|
|
6988
6996
|
| 'deserialize.*'
|
|
6989
6997
|
| 'split.*'
|
|
6990
6998
|
| 'focus.*'
|
|
6991
|
-
| 'block.*'
|
|
6992
6999
|
| 'style.*'
|
|
7000
|
+
| 'block.*'
|
|
6993
7001
|
| 'delete.*'
|
|
6994
7002
|
| 'move.*'
|
|
6995
7003
|
| 'select.*'
|
|
@@ -7182,7 +7190,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7182
7190
|
'decorator.add'
|
|
7183
7191
|
>
|
|
7184
7192
|
decorator: string
|
|
7185
|
-
|
|
7193
|
+
at?: {
|
|
7186
7194
|
anchor: BlockOffset
|
|
7187
7195
|
focus: BlockOffset
|
|
7188
7196
|
}
|
|
@@ -7241,7 +7249,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7241
7249
|
| 'split.block',
|
|
7242
7250
|
'delete'
|
|
7243
7251
|
>
|
|
7244
|
-
|
|
7252
|
+
at: NonNullable<EditorSelection>
|
|
7245
7253
|
}
|
|
7246
7254
|
| {
|
|
7247
7255
|
type: StrictExtract<
|
|
@@ -7353,8 +7361,10 @@ export declare function createMarkdownBehaviors(
|
|
|
7353
7361
|
| 'split.block',
|
|
7354
7362
|
'delete.text'
|
|
7355
7363
|
>
|
|
7356
|
-
|
|
7357
|
-
|
|
7364
|
+
at: {
|
|
7365
|
+
anchor: BlockOffset
|
|
7366
|
+
focus: BlockOffset
|
|
7367
|
+
}
|
|
7358
7368
|
}
|
|
7359
7369
|
| {
|
|
7360
7370
|
type: StrictExtract<
|
|
@@ -7618,7 +7628,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7618
7628
|
| 'split.block',
|
|
7619
7629
|
'select'
|
|
7620
7630
|
>
|
|
7621
|
-
|
|
7631
|
+
at: EditorSelection
|
|
7622
7632
|
}
|
|
7623
7633
|
| {
|
|
7624
7634
|
type: StrictExtract<
|
|
@@ -7705,7 +7715,7 @@ export declare function createMarkdownBehaviors(
|
|
|
7705
7715
|
'decorator.toggle'
|
|
7706
7716
|
>
|
|
7707
7717
|
decorator: string
|
|
7708
|
-
|
|
7718
|
+
at?: {
|
|
7709
7719
|
anchor: BlockOffset
|
|
7710
7720
|
focus: BlockOffset
|
|
7711
7721
|
}
|
|
@@ -13220,7 +13230,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13220
13230
|
| {
|
|
13221
13231
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'decorator.add'>
|
|
13222
13232
|
decorator: string
|
|
13223
|
-
|
|
13233
|
+
at?: {
|
|
13224
13234
|
anchor: BlockOffset_2
|
|
13225
13235
|
focus: BlockOffset_2
|
|
13226
13236
|
}
|
|
@@ -13231,7 +13241,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13231
13241
|
}
|
|
13232
13242
|
| {
|
|
13233
13243
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete'>
|
|
13234
|
-
|
|
13244
|
+
at: NonNullable<EditorSelection_2>
|
|
13235
13245
|
}
|
|
13236
13246
|
| {
|
|
13237
13247
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.backward'>
|
|
@@ -13247,8 +13257,10 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13247
13257
|
}
|
|
13248
13258
|
| {
|
|
13249
13259
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'delete.text'>
|
|
13250
|
-
|
|
13251
|
-
|
|
13260
|
+
at: {
|
|
13261
|
+
anchor: BlockOffset_2
|
|
13262
|
+
focus: BlockOffset_2
|
|
13263
|
+
}
|
|
13252
13264
|
}
|
|
13253
13265
|
| {
|
|
13254
13266
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'focus'>
|
|
@@ -13296,7 +13308,7 @@ export declare type SyntheticBehaviorEvent =
|
|
|
13296
13308
|
}
|
|
13297
13309
|
| {
|
|
13298
13310
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'select'>
|
|
13299
|
-
|
|
13311
|
+
at: EditorSelection_2
|
|
13300
13312
|
}
|
|
13301
13313
|
| {
|
|
13302
13314
|
type: StrictExtract_2<SyntheticBehaviorEventType, 'split.block'>
|
package/lib/behaviors/index.js
CHANGED
|
@@ -113,13 +113,15 @@ function createEmojiPickerBehaviors(config) {
|
|
|
113
113
|
}
|
|
114
114
|
}, {
|
|
115
115
|
type: "delete.text",
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
at: {
|
|
117
|
+
anchor: {
|
|
118
|
+
path: params.focusBlock.path,
|
|
119
|
+
offset: params.textBeforeLength - params.emojiStringLength
|
|
120
|
+
},
|
|
121
|
+
focus: {
|
|
122
|
+
path: params.focusBlock.path,
|
|
123
|
+
offset: params.textBeforeLength
|
|
124
|
+
}
|
|
123
125
|
}
|
|
124
126
|
}, {
|
|
125
127
|
type: "insert.text",
|
|
@@ -173,13 +175,15 @@ function createEmojiPickerBehaviors(config) {
|
|
|
173
175
|
}
|
|
174
176
|
}, {
|
|
175
177
|
type: "delete.text",
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
at: {
|
|
179
|
+
anchor: {
|
|
180
|
+
path: params.focusBlock.path,
|
|
181
|
+
offset: params.textBeforeLength - params.emojiStringLength
|
|
182
|
+
},
|
|
183
|
+
focus: {
|
|
184
|
+
path: params.focusBlock.path,
|
|
185
|
+
offset: params.textBeforeLength
|
|
186
|
+
}
|
|
183
187
|
}
|
|
184
188
|
}, {
|
|
185
189
|
type: "insert.text",
|