@portabletext/editor 1.18.7 → 1.19.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 +52 -35
- package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
- package/lib/_chunks-es/behavior.core.js +52 -35
- package/lib/_chunks-es/behavior.core.js.map +1 -1
- package/lib/behaviors/index.cjs +1 -0
- package/lib/behaviors/index.cjs.map +1 -1
- package/lib/behaviors/index.d.cts +76 -84
- package/lib/behaviors/index.d.ts +76 -84
- package/lib/behaviors/index.js +3 -2
- package/lib/index.cjs +234 -251
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +241 -1098
- package/lib/index.d.ts +241 -1098
- package/lib/index.js +235 -252
- package/lib/index.js.map +1 -1
- package/lib/selectors/index.cjs +12 -9
- package/lib/selectors/index.cjs.map +1 -1
- package/lib/selectors/index.js +12 -9
- package/lib/selectors/index.js.map +1 -1
- package/package.json +2 -2
- package/src/behavior-actions/behavior.actions.ts +28 -36
- package/src/behaviors/behavior.core.decorators.ts +36 -42
- package/src/behaviors/behavior.core.ts +4 -3
- package/src/behaviors/behavior.types.ts +38 -24
- package/src/behaviors/index.ts +1 -0
- package/src/editor/PortableTextEditor.tsx +14 -16
- package/src/editor/__tests__/self-solving.test.tsx +4 -11
- package/src/editor/create-editor.ts +1 -3
- package/src/editor/editor-machine.ts +37 -41
- package/src/editor/plugins/create-with-event-listeners.ts +44 -57
- package/src/editor/plugins/createWithHotKeys.ts +1 -11
- package/src/editor/plugins/createWithPortableTextMarkModel.ts +12 -1
- package/src/editor/plugins/createWithPortableTextSelections.ts +1 -5
- package/src/editor/with-applying-behavior-actions.ts +15 -0
- package/src/selectors/selector.get-selected-spans.test.ts +122 -0
- package/src/selectors/selector.get-selected-spans.ts +3 -1
- package/src/selectors/selector.is-active-decorator.test.ts +65 -0
|
@@ -43,6 +43,27 @@ export declare type Behavior<
|
|
|
43
43
|
*/
|
|
44
44
|
export declare type BehaviorActionIntend =
|
|
45
45
|
| SyntheticBehaviorEvent
|
|
46
|
+
| {
|
|
47
|
+
type: 'raise'
|
|
48
|
+
event: SyntheticBehaviorEvent
|
|
49
|
+
}
|
|
50
|
+
| {
|
|
51
|
+
type: 'annotation.toggle'
|
|
52
|
+
annotation: {
|
|
53
|
+
name: string
|
|
54
|
+
value: {
|
|
55
|
+
[prop: string]: unknown
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
| {
|
|
60
|
+
type: 'decorator.add'
|
|
61
|
+
decorator: string
|
|
62
|
+
}
|
|
63
|
+
| {
|
|
64
|
+
type: 'decorator.remove'
|
|
65
|
+
decorator: string
|
|
66
|
+
}
|
|
46
67
|
| {
|
|
47
68
|
type: 'insert.span'
|
|
48
69
|
text: string
|
|
@@ -98,13 +119,6 @@ export declare type BehaviorActionIntend =
|
|
|
98
119
|
type: 'effect'
|
|
99
120
|
effect: () => void
|
|
100
121
|
}
|
|
101
|
-
| {
|
|
102
|
-
type: 'reselect'
|
|
103
|
-
}
|
|
104
|
-
| {
|
|
105
|
-
type: 'select'
|
|
106
|
-
selection: EditorSelection
|
|
107
|
-
}
|
|
108
122
|
| {
|
|
109
123
|
type: 'select.previous block'
|
|
110
124
|
}
|
|
@@ -191,10 +205,7 @@ export declare const coreBehavior: {
|
|
|
191
205
|
softReturn: Behavior<
|
|
192
206
|
| 'annotation.add'
|
|
193
207
|
| 'annotation.remove'
|
|
194
|
-
| 'annotation.toggle'
|
|
195
208
|
| 'blur'
|
|
196
|
-
| 'decorator.add'
|
|
197
|
-
| 'decorator.remove'
|
|
198
209
|
| 'decorator.toggle'
|
|
199
210
|
| 'delete.backward'
|
|
200
211
|
| 'delete.forward'
|
|
@@ -205,6 +216,7 @@ export declare const coreBehavior: {
|
|
|
205
216
|
| 'insert.soft break'
|
|
206
217
|
| 'insert.text'
|
|
207
218
|
| 'list item.toggle'
|
|
219
|
+
| 'select'
|
|
208
220
|
| 'style.toggle'
|
|
209
221
|
| 'copy'
|
|
210
222
|
| 'key.down'
|
|
@@ -213,13 +225,32 @@ export declare const coreBehavior: {
|
|
|
213
225
|
true
|
|
214
226
|
>
|
|
215
227
|
decorators: {
|
|
216
|
-
|
|
228
|
+
strongShortcut: Behavior<
|
|
229
|
+
| 'annotation.add'
|
|
230
|
+
| 'annotation.remove'
|
|
231
|
+
| 'blur'
|
|
232
|
+
| 'decorator.toggle'
|
|
233
|
+
| 'delete.backward'
|
|
234
|
+
| 'delete.forward'
|
|
235
|
+
| 'focus'
|
|
236
|
+
| 'insert.block object'
|
|
237
|
+
| 'insert.inline object'
|
|
238
|
+
| 'insert.break'
|
|
239
|
+
| 'insert.soft break'
|
|
240
|
+
| 'insert.text'
|
|
241
|
+
| 'list item.toggle'
|
|
242
|
+
| 'select'
|
|
243
|
+
| 'style.toggle'
|
|
244
|
+
| 'copy'
|
|
245
|
+
| 'key.down'
|
|
246
|
+
| 'key.up'
|
|
247
|
+
| 'paste',
|
|
248
|
+
true
|
|
249
|
+
>
|
|
250
|
+
emShortcut: Behavior<
|
|
217
251
|
| 'annotation.add'
|
|
218
252
|
| 'annotation.remove'
|
|
219
|
-
| 'annotation.toggle'
|
|
220
253
|
| 'blur'
|
|
221
|
-
| 'decorator.add'
|
|
222
|
-
| 'decorator.remove'
|
|
223
254
|
| 'decorator.toggle'
|
|
224
255
|
| 'delete.backward'
|
|
225
256
|
| 'delete.forward'
|
|
@@ -230,6 +261,7 @@ export declare const coreBehavior: {
|
|
|
230
261
|
| 'insert.soft break'
|
|
231
262
|
| 'insert.text'
|
|
232
263
|
| 'list item.toggle'
|
|
264
|
+
| 'select'
|
|
233
265
|
| 'style.toggle'
|
|
234
266
|
| 'copy'
|
|
235
267
|
| 'key.down'
|
|
@@ -237,13 +269,10 @@ export declare const coreBehavior: {
|
|
|
237
269
|
| 'paste',
|
|
238
270
|
true
|
|
239
271
|
>
|
|
240
|
-
|
|
272
|
+
underlineShortcut: Behavior<
|
|
241
273
|
| 'annotation.add'
|
|
242
274
|
| 'annotation.remove'
|
|
243
|
-
| 'annotation.toggle'
|
|
244
275
|
| 'blur'
|
|
245
|
-
| 'decorator.add'
|
|
246
|
-
| 'decorator.remove'
|
|
247
276
|
| 'decorator.toggle'
|
|
248
277
|
| 'delete.backward'
|
|
249
278
|
| 'delete.forward'
|
|
@@ -254,6 +283,7 @@ export declare const coreBehavior: {
|
|
|
254
283
|
| 'insert.soft break'
|
|
255
284
|
| 'insert.text'
|
|
256
285
|
| 'list item.toggle'
|
|
286
|
+
| 'select'
|
|
257
287
|
| 'style.toggle'
|
|
258
288
|
| 'copy'
|
|
259
289
|
| 'key.down'
|
|
@@ -261,13 +291,10 @@ export declare const coreBehavior: {
|
|
|
261
291
|
| 'paste',
|
|
262
292
|
true
|
|
263
293
|
>
|
|
264
|
-
|
|
294
|
+
codeShortcut: Behavior<
|
|
265
295
|
| 'annotation.add'
|
|
266
296
|
| 'annotation.remove'
|
|
267
|
-
| 'annotation.toggle'
|
|
268
297
|
| 'blur'
|
|
269
|
-
| 'decorator.add'
|
|
270
|
-
| 'decorator.remove'
|
|
271
298
|
| 'decorator.toggle'
|
|
272
299
|
| 'delete.backward'
|
|
273
300
|
| 'delete.forward'
|
|
@@ -278,6 +305,7 @@ export declare const coreBehavior: {
|
|
|
278
305
|
| 'insert.soft break'
|
|
279
306
|
| 'insert.text'
|
|
280
307
|
| 'list item.toggle'
|
|
308
|
+
| 'select'
|
|
281
309
|
| 'style.toggle'
|
|
282
310
|
| 'copy'
|
|
283
311
|
| 'key.down'
|
|
@@ -290,10 +318,7 @@ export declare const coreBehavior: {
|
|
|
290
318
|
arrowDownOnLonelyBlockObject: Behavior<
|
|
291
319
|
| 'annotation.add'
|
|
292
320
|
| 'annotation.remove'
|
|
293
|
-
| 'annotation.toggle'
|
|
294
321
|
| 'blur'
|
|
295
|
-
| 'decorator.add'
|
|
296
|
-
| 'decorator.remove'
|
|
297
322
|
| 'decorator.toggle'
|
|
298
323
|
| 'delete.backward'
|
|
299
324
|
| 'delete.forward'
|
|
@@ -304,6 +329,7 @@ export declare const coreBehavior: {
|
|
|
304
329
|
| 'insert.soft break'
|
|
305
330
|
| 'insert.text'
|
|
306
331
|
| 'list item.toggle'
|
|
332
|
+
| 'select'
|
|
307
333
|
| 'style.toggle'
|
|
308
334
|
| 'copy'
|
|
309
335
|
| 'key.down'
|
|
@@ -314,10 +340,7 @@ export declare const coreBehavior: {
|
|
|
314
340
|
arrowUpOnLonelyBlockObject: Behavior<
|
|
315
341
|
| 'annotation.add'
|
|
316
342
|
| 'annotation.remove'
|
|
317
|
-
| 'annotation.toggle'
|
|
318
343
|
| 'blur'
|
|
319
|
-
| 'decorator.add'
|
|
320
|
-
| 'decorator.remove'
|
|
321
344
|
| 'decorator.toggle'
|
|
322
345
|
| 'delete.backward'
|
|
323
346
|
| 'delete.forward'
|
|
@@ -328,6 +351,7 @@ export declare const coreBehavior: {
|
|
|
328
351
|
| 'insert.soft break'
|
|
329
352
|
| 'insert.text'
|
|
330
353
|
| 'list item.toggle'
|
|
354
|
+
| 'select'
|
|
331
355
|
| 'style.toggle'
|
|
332
356
|
| 'copy'
|
|
333
357
|
| 'key.down'
|
|
@@ -338,10 +362,7 @@ export declare const coreBehavior: {
|
|
|
338
362
|
breakingBlockObject: Behavior<
|
|
339
363
|
| 'annotation.add'
|
|
340
364
|
| 'annotation.remove'
|
|
341
|
-
| 'annotation.toggle'
|
|
342
365
|
| 'blur'
|
|
343
|
-
| 'decorator.add'
|
|
344
|
-
| 'decorator.remove'
|
|
345
366
|
| 'decorator.toggle'
|
|
346
367
|
| 'delete.backward'
|
|
347
368
|
| 'delete.forward'
|
|
@@ -352,6 +373,7 @@ export declare const coreBehavior: {
|
|
|
352
373
|
| 'insert.soft break'
|
|
353
374
|
| 'insert.text'
|
|
354
375
|
| 'list item.toggle'
|
|
376
|
+
| 'select'
|
|
355
377
|
| 'style.toggle'
|
|
356
378
|
| 'copy'
|
|
357
379
|
| 'key.down'
|
|
@@ -362,10 +384,7 @@ export declare const coreBehavior: {
|
|
|
362
384
|
deletingEmptyTextBlockAfterBlockObject: Behavior<
|
|
363
385
|
| 'annotation.add'
|
|
364
386
|
| 'annotation.remove'
|
|
365
|
-
| 'annotation.toggle'
|
|
366
387
|
| 'blur'
|
|
367
|
-
| 'decorator.add'
|
|
368
|
-
| 'decorator.remove'
|
|
369
388
|
| 'decorator.toggle'
|
|
370
389
|
| 'delete.backward'
|
|
371
390
|
| 'delete.forward'
|
|
@@ -376,6 +395,7 @@ export declare const coreBehavior: {
|
|
|
376
395
|
| 'insert.soft break'
|
|
377
396
|
| 'insert.text'
|
|
378
397
|
| 'list item.toggle'
|
|
398
|
+
| 'select'
|
|
379
399
|
| 'style.toggle'
|
|
380
400
|
| 'copy'
|
|
381
401
|
| 'key.down'
|
|
@@ -386,10 +406,7 @@ export declare const coreBehavior: {
|
|
|
386
406
|
deletingEmptyTextBlockBeforeBlockObject: Behavior<
|
|
387
407
|
| 'annotation.add'
|
|
388
408
|
| 'annotation.remove'
|
|
389
|
-
| 'annotation.toggle'
|
|
390
409
|
| 'blur'
|
|
391
|
-
| 'decorator.add'
|
|
392
|
-
| 'decorator.remove'
|
|
393
410
|
| 'decorator.toggle'
|
|
394
411
|
| 'delete.backward'
|
|
395
412
|
| 'delete.forward'
|
|
@@ -400,6 +417,7 @@ export declare const coreBehavior: {
|
|
|
400
417
|
| 'insert.soft break'
|
|
401
418
|
| 'insert.text'
|
|
402
419
|
| 'list item.toggle'
|
|
420
|
+
| 'select'
|
|
403
421
|
| 'style.toggle'
|
|
404
422
|
| 'copy'
|
|
405
423
|
| 'key.down'
|
|
@@ -412,10 +430,7 @@ export declare const coreBehavior: {
|
|
|
412
430
|
clearListOnBackspace: Behavior<
|
|
413
431
|
| 'annotation.add'
|
|
414
432
|
| 'annotation.remove'
|
|
415
|
-
| 'annotation.toggle'
|
|
416
433
|
| 'blur'
|
|
417
|
-
| 'decorator.add'
|
|
418
|
-
| 'decorator.remove'
|
|
419
434
|
| 'decorator.toggle'
|
|
420
435
|
| 'delete.backward'
|
|
421
436
|
| 'delete.forward'
|
|
@@ -426,6 +441,7 @@ export declare const coreBehavior: {
|
|
|
426
441
|
| 'insert.soft break'
|
|
427
442
|
| 'insert.text'
|
|
428
443
|
| 'list item.toggle'
|
|
444
|
+
| 'select'
|
|
429
445
|
| 'style.toggle'
|
|
430
446
|
| 'copy'
|
|
431
447
|
| 'key.down'
|
|
@@ -436,10 +452,7 @@ export declare const coreBehavior: {
|
|
|
436
452
|
unindentListOnBackspace: Behavior<
|
|
437
453
|
| 'annotation.add'
|
|
438
454
|
| 'annotation.remove'
|
|
439
|
-
| 'annotation.toggle'
|
|
440
455
|
| 'blur'
|
|
441
|
-
| 'decorator.add'
|
|
442
|
-
| 'decorator.remove'
|
|
443
456
|
| 'decorator.toggle'
|
|
444
457
|
| 'delete.backward'
|
|
445
458
|
| 'delete.forward'
|
|
@@ -450,6 +463,7 @@ export declare const coreBehavior: {
|
|
|
450
463
|
| 'insert.soft break'
|
|
451
464
|
| 'insert.text'
|
|
452
465
|
| 'list item.toggle'
|
|
466
|
+
| 'select'
|
|
453
467
|
| 'style.toggle'
|
|
454
468
|
| 'copy'
|
|
455
469
|
| 'key.down'
|
|
@@ -460,10 +474,7 @@ export declare const coreBehavior: {
|
|
|
460
474
|
clearListOnEnter: Behavior<
|
|
461
475
|
| 'annotation.add'
|
|
462
476
|
| 'annotation.remove'
|
|
463
|
-
| 'annotation.toggle'
|
|
464
477
|
| 'blur'
|
|
465
|
-
| 'decorator.add'
|
|
466
|
-
| 'decorator.remove'
|
|
467
478
|
| 'decorator.toggle'
|
|
468
479
|
| 'delete.backward'
|
|
469
480
|
| 'delete.forward'
|
|
@@ -474,6 +485,7 @@ export declare const coreBehavior: {
|
|
|
474
485
|
| 'insert.soft break'
|
|
475
486
|
| 'insert.text'
|
|
476
487
|
| 'list item.toggle'
|
|
488
|
+
| 'select'
|
|
477
489
|
| 'style.toggle'
|
|
478
490
|
| 'copy'
|
|
479
491
|
| 'key.down'
|
|
@@ -484,10 +496,7 @@ export declare const coreBehavior: {
|
|
|
484
496
|
indentListOnTab: Behavior<
|
|
485
497
|
| 'annotation.add'
|
|
486
498
|
| 'annotation.remove'
|
|
487
|
-
| 'annotation.toggle'
|
|
488
499
|
| 'blur'
|
|
489
|
-
| 'decorator.add'
|
|
490
|
-
| 'decorator.remove'
|
|
491
500
|
| 'decorator.toggle'
|
|
492
501
|
| 'delete.backward'
|
|
493
502
|
| 'delete.forward'
|
|
@@ -498,6 +507,7 @@ export declare const coreBehavior: {
|
|
|
498
507
|
| 'insert.soft break'
|
|
499
508
|
| 'insert.text'
|
|
500
509
|
| 'list item.toggle'
|
|
510
|
+
| 'select'
|
|
501
511
|
| 'style.toggle'
|
|
502
512
|
| 'copy'
|
|
503
513
|
| 'key.down'
|
|
@@ -508,10 +518,7 @@ export declare const coreBehavior: {
|
|
|
508
518
|
unindentListOnShiftTab: Behavior<
|
|
509
519
|
| 'annotation.add'
|
|
510
520
|
| 'annotation.remove'
|
|
511
|
-
| 'annotation.toggle'
|
|
512
521
|
| 'blur'
|
|
513
|
-
| 'decorator.add'
|
|
514
|
-
| 'decorator.remove'
|
|
515
522
|
| 'decorator.toggle'
|
|
516
523
|
| 'delete.backward'
|
|
517
524
|
| 'delete.forward'
|
|
@@ -522,6 +529,7 @@ export declare const coreBehavior: {
|
|
|
522
529
|
| 'insert.soft break'
|
|
523
530
|
| 'insert.text'
|
|
524
531
|
| 'list item.toggle'
|
|
532
|
+
| 'select'
|
|
525
533
|
| 'style.toggle'
|
|
526
534
|
| 'copy'
|
|
527
535
|
| 'key.down'
|
|
@@ -538,10 +546,7 @@ export declare const coreBehavior: {
|
|
|
538
546
|
export declare const coreBehaviors: Behavior<
|
|
539
547
|
| 'annotation.add'
|
|
540
548
|
| 'annotation.remove'
|
|
541
|
-
| 'annotation.toggle'
|
|
542
549
|
| 'blur'
|
|
543
|
-
| 'decorator.add'
|
|
544
|
-
| 'decorator.remove'
|
|
545
550
|
| 'decorator.toggle'
|
|
546
551
|
| 'delete.backward'
|
|
547
552
|
| 'delete.forward'
|
|
@@ -552,6 +557,7 @@ export declare const coreBehaviors: Behavior<
|
|
|
552
557
|
| 'insert.soft break'
|
|
553
558
|
| 'insert.text'
|
|
554
559
|
| 'list item.toggle'
|
|
560
|
+
| 'select'
|
|
555
561
|
| 'style.toggle'
|
|
556
562
|
| 'copy'
|
|
557
563
|
| 'key.down'
|
|
@@ -568,10 +574,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
568
574
|
): Behavior<
|
|
569
575
|
| 'annotation.add'
|
|
570
576
|
| 'annotation.remove'
|
|
571
|
-
| 'annotation.toggle'
|
|
572
577
|
| 'blur'
|
|
573
|
-
| 'decorator.add'
|
|
574
|
-
| 'decorator.remove'
|
|
575
578
|
| 'decorator.toggle'
|
|
576
579
|
| 'delete.backward'
|
|
577
580
|
| 'delete.forward'
|
|
@@ -582,6 +585,7 @@ export declare function createCodeEditorBehaviors(
|
|
|
582
585
|
| 'insert.soft break'
|
|
583
586
|
| 'insert.text'
|
|
584
587
|
| 'list item.toggle'
|
|
588
|
+
| 'select'
|
|
585
589
|
| 'style.toggle'
|
|
586
590
|
| 'copy'
|
|
587
591
|
| 'key.down'
|
|
@@ -598,10 +602,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
598
602
|
): Behavior<
|
|
599
603
|
| 'annotation.add'
|
|
600
604
|
| 'annotation.remove'
|
|
601
|
-
| 'annotation.toggle'
|
|
602
605
|
| 'blur'
|
|
603
|
-
| 'decorator.add'
|
|
604
|
-
| 'decorator.remove'
|
|
605
606
|
| 'decorator.toggle'
|
|
606
607
|
| 'delete.backward'
|
|
607
608
|
| 'delete.forward'
|
|
@@ -612,6 +613,7 @@ export declare function createEmojiPickerBehaviors<TEmojiMatch>(
|
|
|
612
613
|
| 'insert.soft break'
|
|
613
614
|
| 'insert.text'
|
|
614
615
|
| 'list item.toggle'
|
|
616
|
+
| 'select'
|
|
615
617
|
| 'style.toggle'
|
|
616
618
|
| 'copy'
|
|
617
619
|
| 'key.down'
|
|
@@ -628,10 +630,7 @@ export declare function createLinkBehaviors(
|
|
|
628
630
|
): Behavior<
|
|
629
631
|
| 'annotation.add'
|
|
630
632
|
| 'annotation.remove'
|
|
631
|
-
| 'annotation.toggle'
|
|
632
633
|
| 'blur'
|
|
633
|
-
| 'decorator.add'
|
|
634
|
-
| 'decorator.remove'
|
|
635
634
|
| 'decorator.toggle'
|
|
636
635
|
| 'delete.backward'
|
|
637
636
|
| 'delete.forward'
|
|
@@ -642,6 +641,7 @@ export declare function createLinkBehaviors(
|
|
|
642
641
|
| 'insert.soft break'
|
|
643
642
|
| 'insert.text'
|
|
644
643
|
| 'list item.toggle'
|
|
644
|
+
| 'select'
|
|
645
645
|
| 'style.toggle'
|
|
646
646
|
| 'copy'
|
|
647
647
|
| 'key.down'
|
|
@@ -658,10 +658,7 @@ export declare function createMarkdownBehaviors(
|
|
|
658
658
|
): Behavior<
|
|
659
659
|
| 'annotation.add'
|
|
660
660
|
| 'annotation.remove'
|
|
661
|
-
| 'annotation.toggle'
|
|
662
661
|
| 'blur'
|
|
663
|
-
| 'decorator.add'
|
|
664
|
-
| 'decorator.remove'
|
|
665
662
|
| 'decorator.toggle'
|
|
666
663
|
| 'delete.backward'
|
|
667
664
|
| 'delete.forward'
|
|
@@ -672,6 +669,7 @@ export declare function createMarkdownBehaviors(
|
|
|
672
669
|
| 'insert.soft break'
|
|
673
670
|
| 'insert.text'
|
|
674
671
|
| 'list item.toggle'
|
|
672
|
+
| 'select'
|
|
675
673
|
| 'style.toggle'
|
|
676
674
|
| 'copy'
|
|
677
675
|
| 'key.down'
|
|
@@ -820,6 +818,13 @@ export declare type PortableTextMemberSchemaTypes = {
|
|
|
820
818
|
lists: BlockListDefinition[]
|
|
821
819
|
}
|
|
822
820
|
|
|
821
|
+
/**
|
|
822
|
+
* @beta
|
|
823
|
+
*/
|
|
824
|
+
export declare function raise(
|
|
825
|
+
event: SyntheticBehaviorEvent,
|
|
826
|
+
): PickFromUnion<BehaviorActionIntend, 'type', 'raise'>
|
|
827
|
+
|
|
823
828
|
/**
|
|
824
829
|
* @beta
|
|
825
830
|
*/
|
|
@@ -839,26 +844,9 @@ export declare type SyntheticBehaviorEvent =
|
|
|
839
844
|
name: string
|
|
840
845
|
}
|
|
841
846
|
}
|
|
842
|
-
| {
|
|
843
|
-
type: 'annotation.toggle'
|
|
844
|
-
annotation: {
|
|
845
|
-
name: string
|
|
846
|
-
value: {
|
|
847
|
-
[prop: string]: unknown
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
847
|
| {
|
|
852
848
|
type: 'blur'
|
|
853
849
|
}
|
|
854
|
-
| {
|
|
855
|
-
type: 'decorator.add'
|
|
856
|
-
decorator: string
|
|
857
|
-
}
|
|
858
|
-
| {
|
|
859
|
-
type: 'decorator.remove'
|
|
860
|
-
decorator: string
|
|
861
|
-
}
|
|
862
850
|
| {
|
|
863
851
|
type: 'decorator.toggle'
|
|
864
852
|
decorator: string
|
|
@@ -908,6 +896,10 @@ export declare type SyntheticBehaviorEvent =
|
|
|
908
896
|
type: 'list item.toggle'
|
|
909
897
|
listItem: string
|
|
910
898
|
}
|
|
899
|
+
| {
|
|
900
|
+
type: 'select'
|
|
901
|
+
selection: EditorSelection
|
|
902
|
+
}
|
|
911
903
|
| {
|
|
912
904
|
type: 'style.toggle'
|
|
913
905
|
style: string
|