@portabletext/editor 1.15.1 → 1.15.3
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 +496 -0
- package/lib/_chunks-cjs/behavior.core.cjs.map +1 -0
- package/lib/_chunks-cjs/selector.get-text-before.cjs +0 -231
- package/lib/_chunks-cjs/selector.get-text-before.cjs.map +1 -1
- package/lib/_chunks-cjs/selectors.cjs +234 -0
- package/lib/_chunks-cjs/selectors.cjs.map +1 -0
- package/lib/_chunks-es/behavior.core.js +498 -0
- package/lib/_chunks-es/behavior.core.js.map +1 -0
- package/lib/_chunks-es/selector.get-text-before.js +2 -233
- package/lib/_chunks-es/selector.get-text-before.js.map +1 -1
- package/lib/_chunks-es/selectors.js +235 -0
- package/lib/_chunks-es/selectors.js.map +1 -0
- package/lib/behaviors/index.cjs +460 -0
- package/lib/behaviors/index.cjs.map +1 -0
- package/lib/behaviors/index.d.cts +869 -0
- package/lib/behaviors/index.d.ts +869 -0
- package/lib/behaviors/index.js +464 -0
- package/lib/behaviors/index.js.map +1 -0
- package/lib/index.cjs +51 -1035
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +146 -669
- package/lib/index.d.ts +146 -669
- package/lib/index.js +44 -1027
- package/lib/index.js.map +1 -1
- package/lib/selectors/index.cjs +16 -16
- package/lib/selectors/index.cjs.map +1 -1
- package/lib/selectors/index.d.cts +8 -12
- package/lib/selectors/index.d.ts +8 -12
- package/lib/selectors/index.js +3 -2
- package/lib/selectors/index.js.map +1 -1
- package/package.json +11 -5
- package/src/{editor/behavior → behavior-actions}/behavior.action-utils.insert-block.ts +4 -6
- package/src/{editor/behavior → behavior-actions}/behavior.action.insert-block-object.ts +1 -1
- package/src/{editor/behavior → behavior-actions}/behavior.action.insert-break.ts +1 -1
- package/src/{editor/behavior → behavior-actions}/behavior.action.insert-inline-object.ts +1 -1
- package/src/{editor/behavior → behavior-actions}/behavior.action.list-item.ts +2 -2
- package/src/{editor/behavior → behavior-actions}/behavior.action.text-block.set.ts +1 -1
- package/src/{editor/behavior → behavior-actions}/behavior.action.text-block.unset.ts +1 -1
- package/src/{editor/behavior → behavior-actions}/behavior.actions.ts +20 -20
- package/src/{editor/behavior → behavior-actions}/behavior.guards.ts +2 -6
- package/src/{editor/behavior → behaviors}/behavior.code-editor.ts +4 -4
- package/src/{editor/behavior → behaviors}/behavior.core.block-objects.ts +6 -6
- package/src/{editor/behavior → behaviors}/behavior.core.decorators.ts +6 -16
- package/src/{editor/behavior → behaviors}/behavior.core.lists.ts +17 -17
- package/src/{editor/behavior → behaviors}/behavior.links.ts +5 -5
- package/src/{editor/behavior → behaviors}/behavior.markdown.ts +25 -43
- package/src/{editor/behavior → behaviors}/behavior.types.ts +39 -46
- package/src/behaviors/index.ts +29 -0
- package/src/editor/PortableTextEditor.tsx +2 -2
- package/src/{utils/getPortableTextMemberSchemaTypes.ts → editor/create-editor-schema.ts} +3 -3
- package/src/editor/create-editor.ts +28 -48
- package/src/editor/define-schema.ts +8 -3
- package/src/editor/editor-machine.ts +21 -36
- package/src/editor/editor-selector.ts +1 -13
- package/src/editor/editor-snapshot.ts +4 -6
- package/src/editor/plugins/createWithEditableAPI.ts +3 -3
- package/src/editor/plugins/createWithPortableTextMarkModel.ts +1 -1
- package/src/editor/utils/utils.block-offset.ts +1 -1
- package/src/index.ts +14 -31
- package/src/selectors/index.ts +2 -4
- package/src/selectors/selector.get-active-list-item.ts +1 -1
- package/src/selectors/selectors.ts +1 -1
- package/src/type-utils.ts +17 -0
- package/src/utils/__tests__/operationToPatches.test.ts +3 -3
- package/src/utils/__tests__/patchToOperations.test.ts +3 -3
- package/src/utils/__tests__/values.test.ts +2 -2
- /package/src/{editor/behavior → behavior-actions}/behavior.action.insert-span.ts +0 -0
- /package/src/{editor/behavior → behavior-actions}/behavior.action.style.ts +0 -0
- /package/src/{editor/behavior → behaviors}/behavior.core.ts +0 -0
package/lib/index.d.cts
CHANGED
|
@@ -94,26 +94,26 @@ export declare type BaseDefinition = {
|
|
|
94
94
|
* @alpha
|
|
95
95
|
*/
|
|
96
96
|
export declare type Behavior<
|
|
97
|
-
|
|
97
|
+
TBehaviorEventType extends BehaviorEvent['type'] = BehaviorEvent['type'],
|
|
98
98
|
TGuardResponse = true,
|
|
99
99
|
> = {
|
|
100
100
|
/**
|
|
101
101
|
* The internal editor event that triggers this behavior.
|
|
102
102
|
*/
|
|
103
|
-
on:
|
|
103
|
+
on: TBehaviorEventType
|
|
104
104
|
/**
|
|
105
105
|
* Predicate function that determines if the behavior should be executed.
|
|
106
106
|
* Returning a non-nullable value from the guard will pass the value to the
|
|
107
107
|
* actions and execute them.
|
|
108
108
|
*/
|
|
109
109
|
guard?: BehaviorGuard<
|
|
110
|
-
PickFromUnion<BehaviorEvent, 'type',
|
|
110
|
+
PickFromUnion<BehaviorEvent, 'type', TBehaviorEventType>,
|
|
111
111
|
TGuardResponse
|
|
112
112
|
>
|
|
113
113
|
/**
|
|
114
114
|
* Array of behavior action sets.
|
|
115
115
|
*/
|
|
116
|
-
actions: Array<BehaviorActionIntendSet<TGuardResponse>>
|
|
116
|
+
actions: Array<BehaviorActionIntendSet<TBehaviorEventType, TGuardResponse>>
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
@@ -177,17 +177,17 @@ export declare type BehaviorActionIntend =
|
|
|
177
177
|
effect: () => void
|
|
178
178
|
}
|
|
179
179
|
| {
|
|
180
|
-
type: '
|
|
181
|
-
selection: EditorSelection
|
|
180
|
+
type: 'reselect'
|
|
182
181
|
}
|
|
183
182
|
| {
|
|
184
|
-
type: 'select
|
|
183
|
+
type: 'select'
|
|
184
|
+
selection: EditorSelection
|
|
185
185
|
}
|
|
186
186
|
| {
|
|
187
|
-
type: 'select
|
|
187
|
+
type: 'select.previous block'
|
|
188
188
|
}
|
|
189
189
|
| {
|
|
190
|
-
type: '
|
|
190
|
+
type: 'select.next block'
|
|
191
191
|
}
|
|
192
192
|
| {
|
|
193
193
|
type: 'style.add'
|
|
@@ -213,7 +213,17 @@ export declare type BehaviorActionIntend =
|
|
|
213
213
|
/**
|
|
214
214
|
* @alpha
|
|
215
215
|
*/
|
|
216
|
-
export declare type BehaviorActionIntendSet<
|
|
216
|
+
export declare type BehaviorActionIntendSet<
|
|
217
|
+
TBehaviorEventType extends BehaviorEvent['type'] = BehaviorEvent['type'],
|
|
218
|
+
TGuardResponse = true,
|
|
219
|
+
> = (
|
|
220
|
+
{
|
|
221
|
+
context,
|
|
222
|
+
event,
|
|
223
|
+
}: {
|
|
224
|
+
context: EditorContext
|
|
225
|
+
event: PickFromUnion<BehaviorEvent, 'type', TBehaviorEventType>
|
|
226
|
+
},
|
|
217
227
|
guardResponse: TGuardResponse,
|
|
218
228
|
) => Array<BehaviorActionIntend>
|
|
219
229
|
|
|
@@ -226,14 +236,14 @@ export declare type BehaviorEvent = SyntheticBehaviorEvent | NativeBehaviorEvent
|
|
|
226
236
|
* @alpha
|
|
227
237
|
*/
|
|
228
238
|
export declare type BehaviorGuard<
|
|
229
|
-
|
|
239
|
+
TBehaviorEvent extends BehaviorEvent,
|
|
230
240
|
TGuardResponse,
|
|
231
241
|
> = ({
|
|
232
242
|
context,
|
|
233
243
|
event,
|
|
234
244
|
}: {
|
|
235
245
|
context: EditorContext
|
|
236
|
-
event:
|
|
246
|
+
event: TBehaviorEvent
|
|
237
247
|
}) => TGuardResponse | false
|
|
238
248
|
|
|
239
249
|
/** @beta */
|
|
@@ -334,14 +344,6 @@ export declare type BlurChange = {
|
|
|
334
344
|
event: FocusEvent_2<HTMLDivElement, Element>
|
|
335
345
|
}
|
|
336
346
|
|
|
337
|
-
/**
|
|
338
|
-
* @alpha
|
|
339
|
-
*/
|
|
340
|
-
export declare type CodeEditorBehaviorsConfig = {
|
|
341
|
-
moveBlockUpShortcut: string
|
|
342
|
-
moveBlockDownShortcut: string
|
|
343
|
-
}
|
|
344
|
-
|
|
345
347
|
/**
|
|
346
348
|
* The editor was either connected or disconnected to the network
|
|
347
349
|
* To show out of sync warnings etc when in collaborative mode.
|
|
@@ -351,480 +353,6 @@ export declare type ConnectionChange = {
|
|
|
351
353
|
value: 'online' | 'offline'
|
|
352
354
|
}
|
|
353
355
|
|
|
354
|
-
/**
|
|
355
|
-
* @alpha
|
|
356
|
-
*/
|
|
357
|
-
export declare const coreBehavior: {
|
|
358
|
-
softReturn: Behavior<
|
|
359
|
-
| 'focus'
|
|
360
|
-
| 'list item.toggle'
|
|
361
|
-
| 'annotation.add'
|
|
362
|
-
| 'annotation.remove'
|
|
363
|
-
| 'annotation.toggle'
|
|
364
|
-
| 'blur'
|
|
365
|
-
| 'decorator.add'
|
|
366
|
-
| 'decorator.remove'
|
|
367
|
-
| 'decorator.toggle'
|
|
368
|
-
| 'delete.backward'
|
|
369
|
-
| 'delete.forward'
|
|
370
|
-
| 'insert.block object'
|
|
371
|
-
| 'insert.inline object'
|
|
372
|
-
| 'insert.soft break'
|
|
373
|
-
| 'insert.break'
|
|
374
|
-
| 'insert.text'
|
|
375
|
-
| 'style.toggle'
|
|
376
|
-
| 'copy'
|
|
377
|
-
| 'key.down'
|
|
378
|
-
| 'key.up'
|
|
379
|
-
| 'paste',
|
|
380
|
-
true
|
|
381
|
-
>
|
|
382
|
-
decorators: {
|
|
383
|
-
decoratorAdd: Behavior<
|
|
384
|
-
| 'focus'
|
|
385
|
-
| 'list item.toggle'
|
|
386
|
-
| 'annotation.add'
|
|
387
|
-
| 'annotation.remove'
|
|
388
|
-
| 'annotation.toggle'
|
|
389
|
-
| 'blur'
|
|
390
|
-
| 'decorator.add'
|
|
391
|
-
| 'decorator.remove'
|
|
392
|
-
| 'decorator.toggle'
|
|
393
|
-
| 'delete.backward'
|
|
394
|
-
| 'delete.forward'
|
|
395
|
-
| 'insert.block object'
|
|
396
|
-
| 'insert.inline object'
|
|
397
|
-
| 'insert.soft break'
|
|
398
|
-
| 'insert.break'
|
|
399
|
-
| 'insert.text'
|
|
400
|
-
| 'style.toggle'
|
|
401
|
-
| 'copy'
|
|
402
|
-
| 'key.down'
|
|
403
|
-
| 'key.up'
|
|
404
|
-
| 'paste',
|
|
405
|
-
true
|
|
406
|
-
>
|
|
407
|
-
decoratorRemove: Behavior<
|
|
408
|
-
| 'focus'
|
|
409
|
-
| 'list item.toggle'
|
|
410
|
-
| 'annotation.add'
|
|
411
|
-
| 'annotation.remove'
|
|
412
|
-
| 'annotation.toggle'
|
|
413
|
-
| 'blur'
|
|
414
|
-
| 'decorator.add'
|
|
415
|
-
| 'decorator.remove'
|
|
416
|
-
| 'decorator.toggle'
|
|
417
|
-
| 'delete.backward'
|
|
418
|
-
| 'delete.forward'
|
|
419
|
-
| 'insert.block object'
|
|
420
|
-
| 'insert.inline object'
|
|
421
|
-
| 'insert.soft break'
|
|
422
|
-
| 'insert.break'
|
|
423
|
-
| 'insert.text'
|
|
424
|
-
| 'style.toggle'
|
|
425
|
-
| 'copy'
|
|
426
|
-
| 'key.down'
|
|
427
|
-
| 'key.up'
|
|
428
|
-
| 'paste',
|
|
429
|
-
true
|
|
430
|
-
>
|
|
431
|
-
decoratorToggle: Behavior<
|
|
432
|
-
| 'focus'
|
|
433
|
-
| 'list item.toggle'
|
|
434
|
-
| 'annotation.add'
|
|
435
|
-
| 'annotation.remove'
|
|
436
|
-
| 'annotation.toggle'
|
|
437
|
-
| 'blur'
|
|
438
|
-
| 'decorator.add'
|
|
439
|
-
| 'decorator.remove'
|
|
440
|
-
| 'decorator.toggle'
|
|
441
|
-
| 'delete.backward'
|
|
442
|
-
| 'delete.forward'
|
|
443
|
-
| 'insert.block object'
|
|
444
|
-
| 'insert.inline object'
|
|
445
|
-
| 'insert.soft break'
|
|
446
|
-
| 'insert.break'
|
|
447
|
-
| 'insert.text'
|
|
448
|
-
| 'style.toggle'
|
|
449
|
-
| 'copy'
|
|
450
|
-
| 'key.down'
|
|
451
|
-
| 'key.up'
|
|
452
|
-
| 'paste',
|
|
453
|
-
true
|
|
454
|
-
>
|
|
455
|
-
}
|
|
456
|
-
blockObjects: {
|
|
457
|
-
arrowDownOnLonelyBlockObject: Behavior<
|
|
458
|
-
| 'focus'
|
|
459
|
-
| 'list item.toggle'
|
|
460
|
-
| 'annotation.add'
|
|
461
|
-
| 'annotation.remove'
|
|
462
|
-
| 'annotation.toggle'
|
|
463
|
-
| 'blur'
|
|
464
|
-
| 'decorator.add'
|
|
465
|
-
| 'decorator.remove'
|
|
466
|
-
| 'decorator.toggle'
|
|
467
|
-
| 'delete.backward'
|
|
468
|
-
| 'delete.forward'
|
|
469
|
-
| 'insert.block object'
|
|
470
|
-
| 'insert.inline object'
|
|
471
|
-
| 'insert.soft break'
|
|
472
|
-
| 'insert.break'
|
|
473
|
-
| 'insert.text'
|
|
474
|
-
| 'style.toggle'
|
|
475
|
-
| 'copy'
|
|
476
|
-
| 'key.down'
|
|
477
|
-
| 'key.up'
|
|
478
|
-
| 'paste',
|
|
479
|
-
true
|
|
480
|
-
>
|
|
481
|
-
arrowUpOnLonelyBlockObject: Behavior<
|
|
482
|
-
| 'focus'
|
|
483
|
-
| 'list item.toggle'
|
|
484
|
-
| 'annotation.add'
|
|
485
|
-
| 'annotation.remove'
|
|
486
|
-
| 'annotation.toggle'
|
|
487
|
-
| 'blur'
|
|
488
|
-
| 'decorator.add'
|
|
489
|
-
| 'decorator.remove'
|
|
490
|
-
| 'decorator.toggle'
|
|
491
|
-
| 'delete.backward'
|
|
492
|
-
| 'delete.forward'
|
|
493
|
-
| 'insert.block object'
|
|
494
|
-
| 'insert.inline object'
|
|
495
|
-
| 'insert.soft break'
|
|
496
|
-
| 'insert.break'
|
|
497
|
-
| 'insert.text'
|
|
498
|
-
| 'style.toggle'
|
|
499
|
-
| 'copy'
|
|
500
|
-
| 'key.down'
|
|
501
|
-
| 'key.up'
|
|
502
|
-
| 'paste',
|
|
503
|
-
true
|
|
504
|
-
>
|
|
505
|
-
breakingBlockObject: Behavior<
|
|
506
|
-
| 'focus'
|
|
507
|
-
| 'list item.toggle'
|
|
508
|
-
| 'annotation.add'
|
|
509
|
-
| 'annotation.remove'
|
|
510
|
-
| 'annotation.toggle'
|
|
511
|
-
| 'blur'
|
|
512
|
-
| 'decorator.add'
|
|
513
|
-
| 'decorator.remove'
|
|
514
|
-
| 'decorator.toggle'
|
|
515
|
-
| 'delete.backward'
|
|
516
|
-
| 'delete.forward'
|
|
517
|
-
| 'insert.block object'
|
|
518
|
-
| 'insert.inline object'
|
|
519
|
-
| 'insert.soft break'
|
|
520
|
-
| 'insert.break'
|
|
521
|
-
| 'insert.text'
|
|
522
|
-
| 'style.toggle'
|
|
523
|
-
| 'copy'
|
|
524
|
-
| 'key.down'
|
|
525
|
-
| 'key.up'
|
|
526
|
-
| 'paste',
|
|
527
|
-
true
|
|
528
|
-
>
|
|
529
|
-
deletingEmptyTextBlockAfterBlockObject: Behavior<
|
|
530
|
-
| 'focus'
|
|
531
|
-
| 'list item.toggle'
|
|
532
|
-
| 'annotation.add'
|
|
533
|
-
| 'annotation.remove'
|
|
534
|
-
| 'annotation.toggle'
|
|
535
|
-
| 'blur'
|
|
536
|
-
| 'decorator.add'
|
|
537
|
-
| 'decorator.remove'
|
|
538
|
-
| 'decorator.toggle'
|
|
539
|
-
| 'delete.backward'
|
|
540
|
-
| 'delete.forward'
|
|
541
|
-
| 'insert.block object'
|
|
542
|
-
| 'insert.inline object'
|
|
543
|
-
| 'insert.soft break'
|
|
544
|
-
| 'insert.break'
|
|
545
|
-
| 'insert.text'
|
|
546
|
-
| 'style.toggle'
|
|
547
|
-
| 'copy'
|
|
548
|
-
| 'key.down'
|
|
549
|
-
| 'key.up'
|
|
550
|
-
| 'paste',
|
|
551
|
-
true
|
|
552
|
-
>
|
|
553
|
-
deletingEmptyTextBlockBeforeBlockObject: Behavior<
|
|
554
|
-
| 'focus'
|
|
555
|
-
| 'list item.toggle'
|
|
556
|
-
| 'annotation.add'
|
|
557
|
-
| 'annotation.remove'
|
|
558
|
-
| 'annotation.toggle'
|
|
559
|
-
| 'blur'
|
|
560
|
-
| 'decorator.add'
|
|
561
|
-
| 'decorator.remove'
|
|
562
|
-
| 'decorator.toggle'
|
|
563
|
-
| 'delete.backward'
|
|
564
|
-
| 'delete.forward'
|
|
565
|
-
| 'insert.block object'
|
|
566
|
-
| 'insert.inline object'
|
|
567
|
-
| 'insert.soft break'
|
|
568
|
-
| 'insert.break'
|
|
569
|
-
| 'insert.text'
|
|
570
|
-
| 'style.toggle'
|
|
571
|
-
| 'copy'
|
|
572
|
-
| 'key.down'
|
|
573
|
-
| 'key.up'
|
|
574
|
-
| 'paste',
|
|
575
|
-
true
|
|
576
|
-
>
|
|
577
|
-
}
|
|
578
|
-
lists: {
|
|
579
|
-
clearListOnBackspace: Behavior<
|
|
580
|
-
| 'focus'
|
|
581
|
-
| 'list item.toggle'
|
|
582
|
-
| 'annotation.add'
|
|
583
|
-
| 'annotation.remove'
|
|
584
|
-
| 'annotation.toggle'
|
|
585
|
-
| 'blur'
|
|
586
|
-
| 'decorator.add'
|
|
587
|
-
| 'decorator.remove'
|
|
588
|
-
| 'decorator.toggle'
|
|
589
|
-
| 'delete.backward'
|
|
590
|
-
| 'delete.forward'
|
|
591
|
-
| 'insert.block object'
|
|
592
|
-
| 'insert.inline object'
|
|
593
|
-
| 'insert.soft break'
|
|
594
|
-
| 'insert.break'
|
|
595
|
-
| 'insert.text'
|
|
596
|
-
| 'style.toggle'
|
|
597
|
-
| 'copy'
|
|
598
|
-
| 'key.down'
|
|
599
|
-
| 'key.up'
|
|
600
|
-
| 'paste',
|
|
601
|
-
true
|
|
602
|
-
>
|
|
603
|
-
unindentListOnBackspace: Behavior<
|
|
604
|
-
| 'focus'
|
|
605
|
-
| 'list item.toggle'
|
|
606
|
-
| 'annotation.add'
|
|
607
|
-
| 'annotation.remove'
|
|
608
|
-
| 'annotation.toggle'
|
|
609
|
-
| 'blur'
|
|
610
|
-
| 'decorator.add'
|
|
611
|
-
| 'decorator.remove'
|
|
612
|
-
| 'decorator.toggle'
|
|
613
|
-
| 'delete.backward'
|
|
614
|
-
| 'delete.forward'
|
|
615
|
-
| 'insert.block object'
|
|
616
|
-
| 'insert.inline object'
|
|
617
|
-
| 'insert.soft break'
|
|
618
|
-
| 'insert.break'
|
|
619
|
-
| 'insert.text'
|
|
620
|
-
| 'style.toggle'
|
|
621
|
-
| 'copy'
|
|
622
|
-
| 'key.down'
|
|
623
|
-
| 'key.up'
|
|
624
|
-
| 'paste',
|
|
625
|
-
true
|
|
626
|
-
>
|
|
627
|
-
clearListOnEnter: Behavior<
|
|
628
|
-
| 'focus'
|
|
629
|
-
| 'list item.toggle'
|
|
630
|
-
| 'annotation.add'
|
|
631
|
-
| 'annotation.remove'
|
|
632
|
-
| 'annotation.toggle'
|
|
633
|
-
| 'blur'
|
|
634
|
-
| 'decorator.add'
|
|
635
|
-
| 'decorator.remove'
|
|
636
|
-
| 'decorator.toggle'
|
|
637
|
-
| 'delete.backward'
|
|
638
|
-
| 'delete.forward'
|
|
639
|
-
| 'insert.block object'
|
|
640
|
-
| 'insert.inline object'
|
|
641
|
-
| 'insert.soft break'
|
|
642
|
-
| 'insert.break'
|
|
643
|
-
| 'insert.text'
|
|
644
|
-
| 'style.toggle'
|
|
645
|
-
| 'copy'
|
|
646
|
-
| 'key.down'
|
|
647
|
-
| 'key.up'
|
|
648
|
-
| 'paste',
|
|
649
|
-
true
|
|
650
|
-
>
|
|
651
|
-
indentListOnTab: Behavior<
|
|
652
|
-
| 'focus'
|
|
653
|
-
| 'list item.toggle'
|
|
654
|
-
| 'annotation.add'
|
|
655
|
-
| 'annotation.remove'
|
|
656
|
-
| 'annotation.toggle'
|
|
657
|
-
| 'blur'
|
|
658
|
-
| 'decorator.add'
|
|
659
|
-
| 'decorator.remove'
|
|
660
|
-
| 'decorator.toggle'
|
|
661
|
-
| 'delete.backward'
|
|
662
|
-
| 'delete.forward'
|
|
663
|
-
| 'insert.block object'
|
|
664
|
-
| 'insert.inline object'
|
|
665
|
-
| 'insert.soft break'
|
|
666
|
-
| 'insert.break'
|
|
667
|
-
| 'insert.text'
|
|
668
|
-
| 'style.toggle'
|
|
669
|
-
| 'copy'
|
|
670
|
-
| 'key.down'
|
|
671
|
-
| 'key.up'
|
|
672
|
-
| 'paste',
|
|
673
|
-
true
|
|
674
|
-
>
|
|
675
|
-
unindentListOnShiftTab: Behavior<
|
|
676
|
-
| 'focus'
|
|
677
|
-
| 'list item.toggle'
|
|
678
|
-
| 'annotation.add'
|
|
679
|
-
| 'annotation.remove'
|
|
680
|
-
| 'annotation.toggle'
|
|
681
|
-
| 'blur'
|
|
682
|
-
| 'decorator.add'
|
|
683
|
-
| 'decorator.remove'
|
|
684
|
-
| 'decorator.toggle'
|
|
685
|
-
| 'delete.backward'
|
|
686
|
-
| 'delete.forward'
|
|
687
|
-
| 'insert.block object'
|
|
688
|
-
| 'insert.inline object'
|
|
689
|
-
| 'insert.soft break'
|
|
690
|
-
| 'insert.break'
|
|
691
|
-
| 'insert.text'
|
|
692
|
-
| 'style.toggle'
|
|
693
|
-
| 'copy'
|
|
694
|
-
| 'key.down'
|
|
695
|
-
| 'key.up'
|
|
696
|
-
| 'paste',
|
|
697
|
-
true
|
|
698
|
-
>
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* @alpha
|
|
704
|
-
*/
|
|
705
|
-
export declare const coreBehaviors: Behavior<
|
|
706
|
-
| 'focus'
|
|
707
|
-
| 'list item.toggle'
|
|
708
|
-
| 'annotation.add'
|
|
709
|
-
| 'annotation.remove'
|
|
710
|
-
| 'annotation.toggle'
|
|
711
|
-
| 'blur'
|
|
712
|
-
| 'decorator.add'
|
|
713
|
-
| 'decorator.remove'
|
|
714
|
-
| 'decorator.toggle'
|
|
715
|
-
| 'delete.backward'
|
|
716
|
-
| 'delete.forward'
|
|
717
|
-
| 'insert.block object'
|
|
718
|
-
| 'insert.inline object'
|
|
719
|
-
| 'insert.soft break'
|
|
720
|
-
| 'insert.break'
|
|
721
|
-
| 'insert.text'
|
|
722
|
-
| 'style.toggle'
|
|
723
|
-
| 'copy'
|
|
724
|
-
| 'key.down'
|
|
725
|
-
| 'key.up'
|
|
726
|
-
| 'paste',
|
|
727
|
-
true
|
|
728
|
-
>[]
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* @alpha
|
|
732
|
-
*/
|
|
733
|
-
export declare function createCodeEditorBehaviors(
|
|
734
|
-
config: CodeEditorBehaviorsConfig,
|
|
735
|
-
): Behavior<
|
|
736
|
-
| 'focus'
|
|
737
|
-
| 'list item.toggle'
|
|
738
|
-
| 'annotation.add'
|
|
739
|
-
| 'annotation.remove'
|
|
740
|
-
| 'annotation.toggle'
|
|
741
|
-
| 'blur'
|
|
742
|
-
| 'decorator.add'
|
|
743
|
-
| 'decorator.remove'
|
|
744
|
-
| 'decorator.toggle'
|
|
745
|
-
| 'delete.backward'
|
|
746
|
-
| 'delete.forward'
|
|
747
|
-
| 'insert.block object'
|
|
748
|
-
| 'insert.inline object'
|
|
749
|
-
| 'insert.soft break'
|
|
750
|
-
| 'insert.break'
|
|
751
|
-
| 'insert.text'
|
|
752
|
-
| 'style.toggle'
|
|
753
|
-
| 'copy'
|
|
754
|
-
| 'key.down'
|
|
755
|
-
| 'key.up'
|
|
756
|
-
| 'paste',
|
|
757
|
-
true
|
|
758
|
-
>[]
|
|
759
|
-
|
|
760
|
-
/**
|
|
761
|
-
* @alpha
|
|
762
|
-
*/
|
|
763
|
-
export declare function createLinkBehaviors(
|
|
764
|
-
config: LinkBehaviorsConfig,
|
|
765
|
-
): Behavior<
|
|
766
|
-
| 'focus'
|
|
767
|
-
| 'list item.toggle'
|
|
768
|
-
| 'annotation.add'
|
|
769
|
-
| 'annotation.remove'
|
|
770
|
-
| 'annotation.toggle'
|
|
771
|
-
| 'blur'
|
|
772
|
-
| 'decorator.add'
|
|
773
|
-
| 'decorator.remove'
|
|
774
|
-
| 'decorator.toggle'
|
|
775
|
-
| 'delete.backward'
|
|
776
|
-
| 'delete.forward'
|
|
777
|
-
| 'insert.block object'
|
|
778
|
-
| 'insert.inline object'
|
|
779
|
-
| 'insert.soft break'
|
|
780
|
-
| 'insert.break'
|
|
781
|
-
| 'insert.text'
|
|
782
|
-
| 'style.toggle'
|
|
783
|
-
| 'copy'
|
|
784
|
-
| 'key.down'
|
|
785
|
-
| 'key.up'
|
|
786
|
-
| 'paste',
|
|
787
|
-
true
|
|
788
|
-
>[]
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* @alpha
|
|
792
|
-
*/
|
|
793
|
-
export declare function createMarkdownBehaviors(
|
|
794
|
-
config: MarkdownBehaviorsConfig,
|
|
795
|
-
): Behavior<
|
|
796
|
-
| 'focus'
|
|
797
|
-
| 'list item.toggle'
|
|
798
|
-
| 'annotation.add'
|
|
799
|
-
| 'annotation.remove'
|
|
800
|
-
| 'annotation.toggle'
|
|
801
|
-
| 'blur'
|
|
802
|
-
| 'decorator.add'
|
|
803
|
-
| 'decorator.remove'
|
|
804
|
-
| 'decorator.toggle'
|
|
805
|
-
| 'delete.backward'
|
|
806
|
-
| 'delete.forward'
|
|
807
|
-
| 'insert.block object'
|
|
808
|
-
| 'insert.inline object'
|
|
809
|
-
| 'insert.soft break'
|
|
810
|
-
| 'insert.break'
|
|
811
|
-
| 'insert.text'
|
|
812
|
-
| 'style.toggle'
|
|
813
|
-
| 'copy'
|
|
814
|
-
| 'key.down'
|
|
815
|
-
| 'key.up'
|
|
816
|
-
| 'paste',
|
|
817
|
-
true
|
|
818
|
-
>[]
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* @alpha
|
|
822
|
-
*/
|
|
823
|
-
export declare function defineBehavior<
|
|
824
|
-
TAnyBehaviorEventType extends BehaviorEvent['type'],
|
|
825
|
-
TGuardResponse = true,
|
|
826
|
-
>(behavior: Behavior<TAnyBehaviorEventType, TGuardResponse>): Behavior
|
|
827
|
-
|
|
828
356
|
/**
|
|
829
357
|
* @alpha
|
|
830
358
|
*/
|
|
@@ -988,8 +516,8 @@ export declare type EditorConfig = {
|
|
|
988
516
|
*/
|
|
989
517
|
export declare type EditorContext = {
|
|
990
518
|
keyGenerator: () => string
|
|
991
|
-
schema:
|
|
992
|
-
selection:
|
|
519
|
+
schema: EditorSchema
|
|
520
|
+
selection: EditorSelection
|
|
993
521
|
value: Array<PortableTextBlock>
|
|
994
522
|
}
|
|
995
523
|
|
|
@@ -1050,10 +578,10 @@ export declare const editorMachine: StateMachine<
|
|
|
1050
578
|
behaviors: Array<Behavior>
|
|
1051
579
|
keyGenerator: () => string
|
|
1052
580
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1053
|
-
schema:
|
|
581
|
+
schema: EditorSchema
|
|
1054
582
|
readOnly: boolean
|
|
1055
583
|
maxBlocks: number | undefined
|
|
1056
|
-
selection:
|
|
584
|
+
selection: EditorSelection
|
|
1057
585
|
value: Array<PortableTextBlock> | undefined
|
|
1058
586
|
},
|
|
1059
587
|
| {
|
|
@@ -1148,7 +676,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1148
676
|
}
|
|
1149
677
|
| {
|
|
1150
678
|
type: 'update schema'
|
|
1151
|
-
schema:
|
|
679
|
+
schema: EditorSchema
|
|
1152
680
|
}
|
|
1153
681
|
| {
|
|
1154
682
|
type: 'update behaviors'
|
|
@@ -1254,7 +782,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1254
782
|
keyGenerator: () => string
|
|
1255
783
|
maxBlocks?: number
|
|
1256
784
|
readOnly?: boolean
|
|
1257
|
-
schema:
|
|
785
|
+
schema: EditorSchema
|
|
1258
786
|
value?: Array<PortableTextBlock>
|
|
1259
787
|
},
|
|
1260
788
|
NonReducibleUnknown,
|
|
@@ -1402,7 +930,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1402
930
|
keyGenerator: () => string
|
|
1403
931
|
maxBlocks?: number
|
|
1404
932
|
readOnly?: boolean
|
|
1405
|
-
schema:
|
|
933
|
+
schema: EditorSchema
|
|
1406
934
|
value?: Array<PortableTextBlock>
|
|
1407
935
|
}
|
|
1408
936
|
self: ActorRef<
|
|
@@ -1411,10 +939,10 @@ export declare const editorMachine: StateMachine<
|
|
|
1411
939
|
behaviors: Array<Behavior>
|
|
1412
940
|
keyGenerator: () => string
|
|
1413
941
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1414
|
-
schema:
|
|
942
|
+
schema: EditorSchema
|
|
1415
943
|
readOnly: boolean
|
|
1416
944
|
maxBlocks: number | undefined
|
|
1417
|
-
selection:
|
|
945
|
+
selection: EditorSelection
|
|
1418
946
|
value: Array<PortableTextBlock> | undefined
|
|
1419
947
|
},
|
|
1420
948
|
| {
|
|
@@ -1509,7 +1037,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1509
1037
|
}
|
|
1510
1038
|
| {
|
|
1511
1039
|
type: 'update schema'
|
|
1512
|
-
schema:
|
|
1040
|
+
schema: EditorSchema
|
|
1513
1041
|
}
|
|
1514
1042
|
| {
|
|
1515
1043
|
type: 'update behaviors'
|
|
@@ -1666,7 +1194,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1666
1194
|
}
|
|
1667
1195
|
| {
|
|
1668
1196
|
type: 'update schema'
|
|
1669
|
-
schema:
|
|
1197
|
+
schema: EditorSchema
|
|
1670
1198
|
}
|
|
1671
1199
|
| {
|
|
1672
1200
|
type: 'update behaviors'
|
|
@@ -1731,7 +1259,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1731
1259
|
keyGenerator: () => string
|
|
1732
1260
|
pendingEvents: never[]
|
|
1733
1261
|
schema: PortableTextMemberSchemaTypes
|
|
1734
|
-
selection:
|
|
1262
|
+
selection: null
|
|
1735
1263
|
readOnly: boolean
|
|
1736
1264
|
maxBlocks: number | undefined
|
|
1737
1265
|
value: PortableTextBlock[] | undefined
|
|
@@ -1743,10 +1271,10 @@ export declare const editorMachine: StateMachine<
|
|
|
1743
1271
|
behaviors: Array<Behavior>
|
|
1744
1272
|
keyGenerator: () => string
|
|
1745
1273
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
1746
|
-
schema:
|
|
1274
|
+
schema: EditorSchema
|
|
1747
1275
|
readOnly: boolean
|
|
1748
1276
|
maxBlocks: number | undefined
|
|
1749
|
-
selection:
|
|
1277
|
+
selection: EditorSelection
|
|
1750
1278
|
value: Array<PortableTextBlock> | undefined
|
|
1751
1279
|
},
|
|
1752
1280
|
{
|
|
@@ -1850,7 +1378,7 @@ export declare const editorMachine: StateMachine<
|
|
|
1850
1378
|
}
|
|
1851
1379
|
| {
|
|
1852
1380
|
type: 'update schema'
|
|
1853
|
-
schema:
|
|
1381
|
+
schema: EditorSchema
|
|
1854
1382
|
}
|
|
1855
1383
|
| {
|
|
1856
1384
|
type: 'update behaviors'
|
|
@@ -2037,10 +1565,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2037
1565
|
behaviors: Array<Behavior>
|
|
2038
1566
|
keyGenerator: () => string
|
|
2039
1567
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2040
|
-
schema:
|
|
1568
|
+
schema: EditorSchema
|
|
2041
1569
|
readOnly: boolean
|
|
2042
1570
|
maxBlocks: number | undefined
|
|
2043
|
-
selection:
|
|
1571
|
+
selection: EditorSelection
|
|
2044
1572
|
value: Array<PortableTextBlock> | undefined
|
|
2045
1573
|
},
|
|
2046
1574
|
{
|
|
@@ -2060,10 +1588,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2060
1588
|
behaviors: Array<Behavior>
|
|
2061
1589
|
keyGenerator: () => string
|
|
2062
1590
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2063
|
-
schema:
|
|
1591
|
+
schema: EditorSchema
|
|
2064
1592
|
readOnly: boolean
|
|
2065
1593
|
maxBlocks: number | undefined
|
|
2066
|
-
selection:
|
|
1594
|
+
selection: EditorSelection
|
|
2067
1595
|
value: Array<PortableTextBlock> | undefined
|
|
2068
1596
|
},
|
|
2069
1597
|
{
|
|
@@ -2164,7 +1692,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2164
1692
|
}
|
|
2165
1693
|
| {
|
|
2166
1694
|
type: 'update schema'
|
|
2167
|
-
schema:
|
|
1695
|
+
schema: EditorSchema
|
|
2168
1696
|
}
|
|
2169
1697
|
| {
|
|
2170
1698
|
type: 'update behaviors'
|
|
@@ -2351,10 +1879,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2351
1879
|
behaviors: Array<Behavior>
|
|
2352
1880
|
keyGenerator: () => string
|
|
2353
1881
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2354
|
-
schema:
|
|
1882
|
+
schema: EditorSchema
|
|
2355
1883
|
readOnly: boolean
|
|
2356
1884
|
maxBlocks: number | undefined
|
|
2357
|
-
selection:
|
|
1885
|
+
selection: EditorSelection
|
|
2358
1886
|
value: Array<PortableTextBlock> | undefined
|
|
2359
1887
|
},
|
|
2360
1888
|
{
|
|
@@ -2371,10 +1899,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2371
1899
|
behaviors: Array<Behavior>
|
|
2372
1900
|
keyGenerator: () => string
|
|
2373
1901
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2374
|
-
schema:
|
|
1902
|
+
schema: EditorSchema
|
|
2375
1903
|
readOnly: boolean
|
|
2376
1904
|
maxBlocks: number | undefined
|
|
2377
|
-
selection:
|
|
1905
|
+
selection: EditorSelection
|
|
2378
1906
|
value: Array<PortableTextBlock> | undefined
|
|
2379
1907
|
},
|
|
2380
1908
|
{
|
|
@@ -2478,7 +2006,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2478
2006
|
}
|
|
2479
2007
|
| {
|
|
2480
2008
|
type: 'update schema'
|
|
2481
|
-
schema:
|
|
2009
|
+
schema: EditorSchema
|
|
2482
2010
|
}
|
|
2483
2011
|
| {
|
|
2484
2012
|
type: 'update behaviors'
|
|
@@ -2665,10 +2193,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2665
2193
|
behaviors: Array<Behavior>
|
|
2666
2194
|
keyGenerator: () => string
|
|
2667
2195
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2668
|
-
schema:
|
|
2196
|
+
schema: EditorSchema
|
|
2669
2197
|
readOnly: boolean
|
|
2670
2198
|
maxBlocks: number | undefined
|
|
2671
|
-
selection:
|
|
2199
|
+
selection: EditorSelection
|
|
2672
2200
|
value: Array<PortableTextBlock> | undefined
|
|
2673
2201
|
},
|
|
2674
2202
|
{
|
|
@@ -2688,10 +2216,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2688
2216
|
behaviors: Array<Behavior>
|
|
2689
2217
|
keyGenerator: () => string
|
|
2690
2218
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2691
|
-
schema:
|
|
2219
|
+
schema: EditorSchema
|
|
2692
2220
|
readOnly: boolean
|
|
2693
2221
|
maxBlocks: number | undefined
|
|
2694
|
-
selection:
|
|
2222
|
+
selection: EditorSelection
|
|
2695
2223
|
value: Array<PortableTextBlock> | undefined
|
|
2696
2224
|
},
|
|
2697
2225
|
{
|
|
@@ -2789,7 +2317,7 @@ export declare const editorMachine: StateMachine<
|
|
|
2789
2317
|
}
|
|
2790
2318
|
| {
|
|
2791
2319
|
type: 'update schema'
|
|
2792
|
-
schema:
|
|
2320
|
+
schema: EditorSchema
|
|
2793
2321
|
}
|
|
2794
2322
|
| {
|
|
2795
2323
|
type: 'update behaviors'
|
|
@@ -2976,10 +2504,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2976
2504
|
behaviors: Array<Behavior>
|
|
2977
2505
|
keyGenerator: () => string
|
|
2978
2506
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2979
|
-
schema:
|
|
2507
|
+
schema: EditorSchema
|
|
2980
2508
|
readOnly: boolean
|
|
2981
2509
|
maxBlocks: number | undefined
|
|
2982
|
-
selection:
|
|
2510
|
+
selection: EditorSelection
|
|
2983
2511
|
value: Array<PortableTextBlock> | undefined
|
|
2984
2512
|
},
|
|
2985
2513
|
{
|
|
@@ -2993,10 +2521,10 @@ export declare const editorMachine: StateMachine<
|
|
|
2993
2521
|
behaviors: Array<Behavior>
|
|
2994
2522
|
keyGenerator: () => string
|
|
2995
2523
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
2996
|
-
schema:
|
|
2524
|
+
schema: EditorSchema
|
|
2997
2525
|
readOnly: boolean
|
|
2998
2526
|
maxBlocks: number | undefined
|
|
2999
|
-
selection:
|
|
2527
|
+
selection: EditorSelection
|
|
3000
2528
|
value: Array<PortableTextBlock> | undefined
|
|
3001
2529
|
},
|
|
3002
2530
|
| {
|
|
@@ -3103,7 +2631,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3103
2631
|
}
|
|
3104
2632
|
| {
|
|
3105
2633
|
type: 'update schema'
|
|
3106
|
-
schema:
|
|
2634
|
+
schema: EditorSchema
|
|
3107
2635
|
}
|
|
3108
2636
|
| {
|
|
3109
2637
|
type: 'update behaviors'
|
|
@@ -3290,10 +2818,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3290
2818
|
behaviors: Array<Behavior>
|
|
3291
2819
|
keyGenerator: () => string
|
|
3292
2820
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3293
|
-
schema:
|
|
2821
|
+
schema: EditorSchema
|
|
3294
2822
|
readOnly: boolean
|
|
3295
2823
|
maxBlocks: number | undefined
|
|
3296
|
-
selection:
|
|
2824
|
+
selection: EditorSelection
|
|
3297
2825
|
value: Array<PortableTextBlock> | undefined
|
|
3298
2826
|
},
|
|
3299
2827
|
| {
|
|
@@ -3316,10 +2844,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3316
2844
|
behaviors: Array<Behavior>
|
|
3317
2845
|
keyGenerator: () => string
|
|
3318
2846
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3319
|
-
schema:
|
|
2847
|
+
schema: EditorSchema
|
|
3320
2848
|
readOnly: boolean
|
|
3321
2849
|
maxBlocks: number | undefined
|
|
3322
|
-
selection:
|
|
2850
|
+
selection: EditorSelection
|
|
3323
2851
|
value: Array<PortableTextBlock> | undefined
|
|
3324
2852
|
},
|
|
3325
2853
|
{
|
|
@@ -3417,7 +2945,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3417
2945
|
}
|
|
3418
2946
|
| {
|
|
3419
2947
|
type: 'update schema'
|
|
3420
|
-
schema:
|
|
2948
|
+
schema: EditorSchema
|
|
3421
2949
|
}
|
|
3422
2950
|
| {
|
|
3423
2951
|
type: 'update behaviors'
|
|
@@ -3604,10 +3132,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3604
3132
|
behaviors: Array<Behavior>
|
|
3605
3133
|
keyGenerator: () => string
|
|
3606
3134
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3607
|
-
schema:
|
|
3135
|
+
schema: EditorSchema
|
|
3608
3136
|
readOnly: boolean
|
|
3609
3137
|
maxBlocks: number | undefined
|
|
3610
|
-
selection:
|
|
3138
|
+
selection: EditorSelection
|
|
3611
3139
|
value: Array<PortableTextBlock> | undefined
|
|
3612
3140
|
},
|
|
3613
3141
|
{
|
|
@@ -3621,10 +3149,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3621
3149
|
behaviors: Array<Behavior>
|
|
3622
3150
|
keyGenerator: () => string
|
|
3623
3151
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3624
|
-
schema:
|
|
3152
|
+
schema: EditorSchema
|
|
3625
3153
|
readOnly: boolean
|
|
3626
3154
|
maxBlocks: number | undefined
|
|
3627
|
-
selection:
|
|
3155
|
+
selection: EditorSelection
|
|
3628
3156
|
value: Array<PortableTextBlock> | undefined
|
|
3629
3157
|
},
|
|
3630
3158
|
| {
|
|
@@ -3738,7 +3266,7 @@ export declare const editorMachine: StateMachine<
|
|
|
3738
3266
|
}
|
|
3739
3267
|
| {
|
|
3740
3268
|
type: 'update schema'
|
|
3741
|
-
schema:
|
|
3269
|
+
schema: EditorSchema
|
|
3742
3270
|
}
|
|
3743
3271
|
| {
|
|
3744
3272
|
type: 'update behaviors'
|
|
@@ -3925,10 +3453,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3925
3453
|
behaviors: Array<Behavior>
|
|
3926
3454
|
keyGenerator: () => string
|
|
3927
3455
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3928
|
-
schema:
|
|
3456
|
+
schema: EditorSchema
|
|
3929
3457
|
readOnly: boolean
|
|
3930
3458
|
maxBlocks: number | undefined
|
|
3931
|
-
selection:
|
|
3459
|
+
selection: EditorSelection
|
|
3932
3460
|
value: Array<PortableTextBlock> | undefined
|
|
3933
3461
|
},
|
|
3934
3462
|
| {
|
|
@@ -3958,10 +3486,10 @@ export declare const editorMachine: StateMachine<
|
|
|
3958
3486
|
behaviors: Array<Behavior>
|
|
3959
3487
|
keyGenerator: () => string
|
|
3960
3488
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
3961
|
-
schema:
|
|
3489
|
+
schema: EditorSchema
|
|
3962
3490
|
readOnly: boolean
|
|
3963
3491
|
maxBlocks: number | undefined
|
|
3964
|
-
selection:
|
|
3492
|
+
selection: EditorSelection
|
|
3965
3493
|
value: Array<PortableTextBlock> | undefined
|
|
3966
3494
|
},
|
|
3967
3495
|
{
|
|
@@ -4060,7 +3588,7 @@ export declare const editorMachine: StateMachine<
|
|
|
4060
3588
|
}
|
|
4061
3589
|
| {
|
|
4062
3590
|
type: 'update schema'
|
|
4063
|
-
schema:
|
|
3591
|
+
schema: EditorSchema
|
|
4064
3592
|
}
|
|
4065
3593
|
| {
|
|
4066
3594
|
type: 'update behaviors'
|
|
@@ -4247,10 +3775,10 @@ export declare const editorMachine: StateMachine<
|
|
|
4247
3775
|
behaviors: Array<Behavior>
|
|
4248
3776
|
keyGenerator: () => string
|
|
4249
3777
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
4250
|
-
schema:
|
|
3778
|
+
schema: EditorSchema
|
|
4251
3779
|
readOnly: boolean
|
|
4252
3780
|
maxBlocks: number | undefined
|
|
4253
|
-
selection:
|
|
3781
|
+
selection: EditorSelection
|
|
4254
3782
|
value: Array<PortableTextBlock> | undefined
|
|
4255
3783
|
},
|
|
4256
3784
|
{
|
|
@@ -4265,10 +3793,10 @@ export declare const editorMachine: StateMachine<
|
|
|
4265
3793
|
behaviors: Array<Behavior>
|
|
4266
3794
|
keyGenerator: () => string
|
|
4267
3795
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
4268
|
-
schema:
|
|
3796
|
+
schema: EditorSchema
|
|
4269
3797
|
readOnly: boolean
|
|
4270
3798
|
maxBlocks: number | undefined
|
|
4271
|
-
selection:
|
|
3799
|
+
selection: EditorSelection
|
|
4272
3800
|
value: Array<PortableTextBlock> | undefined
|
|
4273
3801
|
},
|
|
4274
3802
|
{
|
|
@@ -4367,7 +3895,7 @@ export declare const editorMachine: StateMachine<
|
|
|
4367
3895
|
}
|
|
4368
3896
|
| {
|
|
4369
3897
|
type: 'update schema'
|
|
4370
|
-
schema:
|
|
3898
|
+
schema: EditorSchema
|
|
4371
3899
|
}
|
|
4372
3900
|
| {
|
|
4373
3901
|
type: 'update behaviors'
|
|
@@ -4554,10 +4082,10 @@ export declare const editorMachine: StateMachine<
|
|
|
4554
4082
|
behaviors: Array<Behavior>
|
|
4555
4083
|
keyGenerator: () => string
|
|
4556
4084
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
4557
|
-
schema:
|
|
4085
|
+
schema: EditorSchema
|
|
4558
4086
|
readOnly: boolean
|
|
4559
4087
|
maxBlocks: number | undefined
|
|
4560
|
-
selection:
|
|
4088
|
+
selection: EditorSelection
|
|
4561
4089
|
value: Array<PortableTextBlock> | undefined
|
|
4562
4090
|
},
|
|
4563
4091
|
{
|
|
@@ -4572,10 +4100,10 @@ export declare const editorMachine: StateMachine<
|
|
|
4572
4100
|
behaviors: Array<Behavior>
|
|
4573
4101
|
keyGenerator: () => string
|
|
4574
4102
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
4575
|
-
schema:
|
|
4103
|
+
schema: EditorSchema
|
|
4576
4104
|
readOnly: boolean
|
|
4577
4105
|
maxBlocks: number | undefined
|
|
4578
|
-
selection:
|
|
4106
|
+
selection: EditorSelection
|
|
4579
4107
|
value: Array<PortableTextBlock> | undefined
|
|
4580
4108
|
},
|
|
4581
4109
|
{
|
|
@@ -4673,7 +4201,7 @@ export declare const editorMachine: StateMachine<
|
|
|
4673
4201
|
}
|
|
4674
4202
|
| {
|
|
4675
4203
|
type: 'update schema'
|
|
4676
|
-
schema:
|
|
4204
|
+
schema: EditorSchema
|
|
4677
4205
|
}
|
|
4678
4206
|
| {
|
|
4679
4207
|
type: 'update behaviors'
|
|
@@ -4860,10 +4388,10 @@ export declare const editorMachine: StateMachine<
|
|
|
4860
4388
|
behaviors: Array<Behavior>
|
|
4861
4389
|
keyGenerator: () => string
|
|
4862
4390
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
4863
|
-
schema:
|
|
4391
|
+
schema: EditorSchema
|
|
4864
4392
|
readOnly: boolean
|
|
4865
4393
|
maxBlocks: number | undefined
|
|
4866
|
-
selection:
|
|
4394
|
+
selection: EditorSelection
|
|
4867
4395
|
value: Array<PortableTextBlock> | undefined
|
|
4868
4396
|
},
|
|
4869
4397
|
{
|
|
@@ -4962,7 +4490,7 @@ export declare const editorMachine: StateMachine<
|
|
|
4962
4490
|
}
|
|
4963
4491
|
| {
|
|
4964
4492
|
type: 'update schema'
|
|
4965
|
-
schema:
|
|
4493
|
+
schema: EditorSchema
|
|
4966
4494
|
}
|
|
4967
4495
|
| {
|
|
4968
4496
|
type: 'update behaviors'
|
|
@@ -5149,10 +4677,10 @@ export declare const editorMachine: StateMachine<
|
|
|
5149
4677
|
behaviors: Array<Behavior>
|
|
5150
4678
|
keyGenerator: () => string
|
|
5151
4679
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
5152
|
-
schema:
|
|
4680
|
+
schema: EditorSchema
|
|
5153
4681
|
readOnly: boolean
|
|
5154
4682
|
maxBlocks: number | undefined
|
|
5155
|
-
selection:
|
|
4683
|
+
selection: EditorSelection
|
|
5156
4684
|
value: Array<PortableTextBlock> | undefined
|
|
5157
4685
|
},
|
|
5158
4686
|
{
|
|
@@ -5251,7 +4779,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5251
4779
|
}
|
|
5252
4780
|
| {
|
|
5253
4781
|
type: 'update schema'
|
|
5254
|
-
schema:
|
|
4782
|
+
schema: EditorSchema
|
|
5255
4783
|
}
|
|
5256
4784
|
| {
|
|
5257
4785
|
type: 'update behaviors'
|
|
@@ -5438,10 +4966,10 @@ export declare const editorMachine: StateMachine<
|
|
|
5438
4966
|
behaviors: Array<Behavior>
|
|
5439
4967
|
keyGenerator: () => string
|
|
5440
4968
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
5441
|
-
schema:
|
|
4969
|
+
schema: EditorSchema
|
|
5442
4970
|
readOnly: boolean
|
|
5443
4971
|
maxBlocks: number | undefined
|
|
5444
|
-
selection:
|
|
4972
|
+
selection: EditorSelection
|
|
5445
4973
|
value: Array<PortableTextBlock> | undefined
|
|
5446
4974
|
},
|
|
5447
4975
|
{
|
|
@@ -5541,7 +5069,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5541
5069
|
}
|
|
5542
5070
|
| {
|
|
5543
5071
|
type: 'update schema'
|
|
5544
|
-
schema:
|
|
5072
|
+
schema: EditorSchema
|
|
5545
5073
|
}
|
|
5546
5074
|
| {
|
|
5547
5075
|
type: 'update behaviors'
|
|
@@ -5728,10 +5256,10 @@ export declare const editorMachine: StateMachine<
|
|
|
5728
5256
|
behaviors: Array<Behavior>
|
|
5729
5257
|
keyGenerator: () => string
|
|
5730
5258
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
5731
|
-
schema:
|
|
5259
|
+
schema: EditorSchema
|
|
5732
5260
|
readOnly: boolean
|
|
5733
5261
|
maxBlocks: number | undefined
|
|
5734
|
-
selection:
|
|
5262
|
+
selection: EditorSelection
|
|
5735
5263
|
value: Array<PortableTextBlock> | undefined
|
|
5736
5264
|
},
|
|
5737
5265
|
{
|
|
@@ -5832,7 +5360,7 @@ export declare const editorMachine: StateMachine<
|
|
|
5832
5360
|
}
|
|
5833
5361
|
| {
|
|
5834
5362
|
type: 'update schema'
|
|
5835
|
-
schema:
|
|
5363
|
+
schema: EditorSchema
|
|
5836
5364
|
}
|
|
5837
5365
|
| {
|
|
5838
5366
|
type: 'update behaviors'
|
|
@@ -6020,10 +5548,10 @@ export declare const editorMachine: StateMachine<
|
|
|
6020
5548
|
behaviors: Array<Behavior>
|
|
6021
5549
|
keyGenerator: () => string
|
|
6022
5550
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
6023
|
-
schema:
|
|
5551
|
+
schema: EditorSchema
|
|
6024
5552
|
readOnly: boolean
|
|
6025
5553
|
maxBlocks: number | undefined
|
|
6026
|
-
selection:
|
|
5554
|
+
selection: EditorSelection
|
|
6027
5555
|
value: Array<PortableTextBlock> | undefined
|
|
6028
5556
|
},
|
|
6029
5557
|
{
|
|
@@ -6122,7 +5650,7 @@ export declare const editorMachine: StateMachine<
|
|
|
6122
5650
|
}
|
|
6123
5651
|
| {
|
|
6124
5652
|
type: 'update schema'
|
|
6125
|
-
schema:
|
|
5653
|
+
schema: EditorSchema
|
|
6126
5654
|
}
|
|
6127
5655
|
| {
|
|
6128
5656
|
type: 'update behaviors'
|
|
@@ -6192,10 +5720,10 @@ export declare const editorMachine: StateMachine<
|
|
|
6192
5720
|
behaviors: Array<Behavior>
|
|
6193
5721
|
keyGenerator: () => string
|
|
6194
5722
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
6195
|
-
schema:
|
|
5723
|
+
schema: EditorSchema
|
|
6196
5724
|
readOnly: boolean
|
|
6197
5725
|
maxBlocks: number | undefined
|
|
6198
|
-
selection:
|
|
5726
|
+
selection: EditorSelection
|
|
6199
5727
|
value: Array<PortableTextBlock> | undefined
|
|
6200
5728
|
},
|
|
6201
5729
|
{
|
|
@@ -6294,7 +5822,7 @@ export declare const editorMachine: StateMachine<
|
|
|
6294
5822
|
}
|
|
6295
5823
|
| {
|
|
6296
5824
|
type: 'update schema'
|
|
6297
|
-
schema:
|
|
5825
|
+
schema: EditorSchema
|
|
6298
5826
|
}
|
|
6299
5827
|
| {
|
|
6300
5828
|
type: 'update behaviors'
|
|
@@ -6482,10 +6010,10 @@ export declare const editorMachine: StateMachine<
|
|
|
6482
6010
|
behaviors: Array<Behavior>
|
|
6483
6011
|
keyGenerator: () => string
|
|
6484
6012
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
6485
|
-
schema:
|
|
6013
|
+
schema: EditorSchema
|
|
6486
6014
|
readOnly: boolean
|
|
6487
6015
|
maxBlocks: number | undefined
|
|
6488
|
-
selection:
|
|
6016
|
+
selection: EditorSelection
|
|
6489
6017
|
value: Array<PortableTextBlock> | undefined
|
|
6490
6018
|
},
|
|
6491
6019
|
{
|
|
@@ -6584,7 +6112,7 @@ export declare const editorMachine: StateMachine<
|
|
|
6584
6112
|
}
|
|
6585
6113
|
| {
|
|
6586
6114
|
type: 'update schema'
|
|
6587
|
-
schema:
|
|
6115
|
+
schema: EditorSchema
|
|
6588
6116
|
}
|
|
6589
6117
|
| {
|
|
6590
6118
|
type: 'update behaviors'
|
|
@@ -6771,10 +6299,10 @@ export declare const editorMachine: StateMachine<
|
|
|
6771
6299
|
behaviors: Array<Behavior>
|
|
6772
6300
|
keyGenerator: () => string
|
|
6773
6301
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
6774
|
-
schema:
|
|
6302
|
+
schema: EditorSchema
|
|
6775
6303
|
readOnly: boolean
|
|
6776
6304
|
maxBlocks: number | undefined
|
|
6777
|
-
selection:
|
|
6305
|
+
selection: EditorSelection
|
|
6778
6306
|
value: Array<PortableTextBlock> | undefined
|
|
6779
6307
|
},
|
|
6780
6308
|
{
|
|
@@ -6873,7 +6401,7 @@ export declare const editorMachine: StateMachine<
|
|
|
6873
6401
|
}
|
|
6874
6402
|
| {
|
|
6875
6403
|
type: 'update schema'
|
|
6876
|
-
schema:
|
|
6404
|
+
schema: EditorSchema
|
|
6877
6405
|
}
|
|
6878
6406
|
| {
|
|
6879
6407
|
type: 'update behaviors'
|
|
@@ -7060,10 +6588,10 @@ export declare const editorMachine: StateMachine<
|
|
|
7060
6588
|
behaviors: Array<Behavior>
|
|
7061
6589
|
keyGenerator: () => string
|
|
7062
6590
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
7063
|
-
schema:
|
|
6591
|
+
schema: EditorSchema
|
|
7064
6592
|
readOnly: boolean
|
|
7065
6593
|
maxBlocks: number | undefined
|
|
7066
|
-
selection:
|
|
6594
|
+
selection: EditorSelection
|
|
7067
6595
|
value: Array<PortableTextBlock> | undefined
|
|
7068
6596
|
},
|
|
7069
6597
|
{
|
|
@@ -7161,7 +6689,7 @@ export declare const editorMachine: StateMachine<
|
|
|
7161
6689
|
}
|
|
7162
6690
|
| {
|
|
7163
6691
|
type: 'update schema'
|
|
7164
|
-
schema:
|
|
6692
|
+
schema: EditorSchema
|
|
7165
6693
|
}
|
|
7166
6694
|
| {
|
|
7167
6695
|
type: 'update behaviors'
|
|
@@ -7348,10 +6876,10 @@ export declare const editorMachine: StateMachine<
|
|
|
7348
6876
|
behaviors: Array<Behavior>
|
|
7349
6877
|
keyGenerator: () => string
|
|
7350
6878
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
7351
|
-
schema:
|
|
6879
|
+
schema: EditorSchema
|
|
7352
6880
|
readOnly: boolean
|
|
7353
6881
|
maxBlocks: number | undefined
|
|
7354
|
-
selection:
|
|
6882
|
+
selection: EditorSelection
|
|
7355
6883
|
value: Array<PortableTextBlock> | undefined
|
|
7356
6884
|
},
|
|
7357
6885
|
PatchesEvent,
|
|
@@ -7447,7 +6975,7 @@ export declare const editorMachine: StateMachine<
|
|
|
7447
6975
|
}
|
|
7448
6976
|
| {
|
|
7449
6977
|
type: 'update schema'
|
|
7450
|
-
schema:
|
|
6978
|
+
schema: EditorSchema
|
|
7451
6979
|
}
|
|
7452
6980
|
| {
|
|
7453
6981
|
type: 'update behaviors'
|
|
@@ -7634,10 +7162,10 @@ export declare const editorMachine: StateMachine<
|
|
|
7634
7162
|
behaviors: Array<Behavior>
|
|
7635
7163
|
keyGenerator: () => string
|
|
7636
7164
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
7637
|
-
schema:
|
|
7165
|
+
schema: EditorSchema
|
|
7638
7166
|
readOnly: boolean
|
|
7639
7167
|
maxBlocks: number | undefined
|
|
7640
|
-
selection:
|
|
7168
|
+
selection: EditorSelection
|
|
7641
7169
|
value: Array<PortableTextBlock> | undefined
|
|
7642
7170
|
},
|
|
7643
7171
|
{
|
|
@@ -7735,7 +7263,7 @@ export declare const editorMachine: StateMachine<
|
|
|
7735
7263
|
}
|
|
7736
7264
|
| {
|
|
7737
7265
|
type: 'update schema'
|
|
7738
|
-
schema:
|
|
7266
|
+
schema: EditorSchema
|
|
7739
7267
|
}
|
|
7740
7268
|
| {
|
|
7741
7269
|
type: 'update behaviors'
|
|
@@ -7928,10 +7456,10 @@ export declare const editorMachine: StateMachine<
|
|
|
7928
7456
|
behaviors: Array<Behavior>
|
|
7929
7457
|
keyGenerator: () => string
|
|
7930
7458
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
7931
|
-
schema:
|
|
7459
|
+
schema: EditorSchema
|
|
7932
7460
|
readOnly: boolean
|
|
7933
7461
|
maxBlocks: number | undefined
|
|
7934
|
-
selection:
|
|
7462
|
+
selection: EditorSelection
|
|
7935
7463
|
value: Array<PortableTextBlock> | undefined
|
|
7936
7464
|
},
|
|
7937
7465
|
{
|
|
@@ -8030,7 +7558,7 @@ export declare const editorMachine: StateMachine<
|
|
|
8030
7558
|
}
|
|
8031
7559
|
| {
|
|
8032
7560
|
type: 'update schema'
|
|
8033
|
-
schema:
|
|
7561
|
+
schema: EditorSchema
|
|
8034
7562
|
}
|
|
8035
7563
|
| {
|
|
8036
7564
|
type: 'update behaviors'
|
|
@@ -8103,10 +7631,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8103
7631
|
behaviors: Array<Behavior>
|
|
8104
7632
|
keyGenerator: () => string
|
|
8105
7633
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8106
|
-
schema:
|
|
7634
|
+
schema: EditorSchema
|
|
8107
7635
|
readOnly: boolean
|
|
8108
7636
|
maxBlocks: number | undefined
|
|
8109
|
-
selection:
|
|
7637
|
+
selection: EditorSelection
|
|
8110
7638
|
value: Array<PortableTextBlock> | undefined
|
|
8111
7639
|
},
|
|
8112
7640
|
{
|
|
@@ -8204,7 +7732,7 @@ export declare const editorMachine: StateMachine<
|
|
|
8204
7732
|
}
|
|
8205
7733
|
| {
|
|
8206
7734
|
type: 'update schema'
|
|
8207
|
-
schema:
|
|
7735
|
+
schema: EditorSchema
|
|
8208
7736
|
}
|
|
8209
7737
|
| {
|
|
8210
7738
|
type: 'update behaviors'
|
|
@@ -8274,10 +7802,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8274
7802
|
behaviors: Array<Behavior>
|
|
8275
7803
|
keyGenerator: () => string
|
|
8276
7804
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8277
|
-
schema:
|
|
7805
|
+
schema: EditorSchema
|
|
8278
7806
|
readOnly: boolean
|
|
8279
7807
|
maxBlocks: number | undefined
|
|
8280
|
-
selection:
|
|
7808
|
+
selection: EditorSelection
|
|
8281
7809
|
value: Array<PortableTextBlock> | undefined
|
|
8282
7810
|
},
|
|
8283
7811
|
{
|
|
@@ -8375,7 +7903,7 @@ export declare const editorMachine: StateMachine<
|
|
|
8375
7903
|
}
|
|
8376
7904
|
| {
|
|
8377
7905
|
type: 'update schema'
|
|
8378
|
-
schema:
|
|
7906
|
+
schema: EditorSchema
|
|
8379
7907
|
}
|
|
8380
7908
|
| {
|
|
8381
7909
|
type: 'update behaviors'
|
|
@@ -8563,10 +8091,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8563
8091
|
behaviors: Array<Behavior>
|
|
8564
8092
|
keyGenerator: () => string
|
|
8565
8093
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8566
|
-
schema:
|
|
8094
|
+
schema: EditorSchema
|
|
8567
8095
|
readOnly: boolean
|
|
8568
8096
|
maxBlocks: number | undefined
|
|
8569
|
-
selection:
|
|
8097
|
+
selection: EditorSelection
|
|
8570
8098
|
value: Array<PortableTextBlock> | undefined
|
|
8571
8099
|
},
|
|
8572
8100
|
{
|
|
@@ -8665,7 +8193,7 @@ export declare const editorMachine: StateMachine<
|
|
|
8665
8193
|
}
|
|
8666
8194
|
| {
|
|
8667
8195
|
type: 'update schema'
|
|
8668
|
-
schema:
|
|
8196
|
+
schema: EditorSchema
|
|
8669
8197
|
}
|
|
8670
8198
|
| {
|
|
8671
8199
|
type: 'update behaviors'
|
|
@@ -8740,10 +8268,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8740
8268
|
behaviors: Array<Behavior>
|
|
8741
8269
|
keyGenerator: () => string
|
|
8742
8270
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8743
|
-
schema:
|
|
8271
|
+
schema: EditorSchema
|
|
8744
8272
|
readOnly: boolean
|
|
8745
8273
|
maxBlocks: number | undefined
|
|
8746
|
-
selection:
|
|
8274
|
+
selection: EditorSelection
|
|
8747
8275
|
value: Array<PortableTextBlock> | undefined
|
|
8748
8276
|
},
|
|
8749
8277
|
{
|
|
@@ -8766,10 +8294,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8766
8294
|
behaviors: Array<Behavior>
|
|
8767
8295
|
keyGenerator: () => string
|
|
8768
8296
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8769
|
-
schema:
|
|
8297
|
+
schema: EditorSchema
|
|
8770
8298
|
readOnly: boolean
|
|
8771
8299
|
maxBlocks: number | undefined
|
|
8772
|
-
selection:
|
|
8300
|
+
selection: EditorSelection
|
|
8773
8301
|
value: Array<PortableTextBlock> | undefined
|
|
8774
8302
|
},
|
|
8775
8303
|
{
|
|
@@ -8869,7 +8397,7 @@ export declare const editorMachine: StateMachine<
|
|
|
8869
8397
|
}
|
|
8870
8398
|
| {
|
|
8871
8399
|
type: 'update schema'
|
|
8872
|
-
schema:
|
|
8400
|
+
schema: EditorSchema
|
|
8873
8401
|
}
|
|
8874
8402
|
| {
|
|
8875
8403
|
type: 'update behaviors'
|
|
@@ -8933,10 +8461,10 @@ export declare const editorMachine: StateMachine<
|
|
|
8933
8461
|
behaviors: Array<Behavior>
|
|
8934
8462
|
keyGenerator: () => string
|
|
8935
8463
|
pendingEvents: Array<PatchEvent | MutationEvent_2>
|
|
8936
|
-
schema:
|
|
8464
|
+
schema: EditorSchema
|
|
8937
8465
|
readOnly: boolean
|
|
8938
8466
|
maxBlocks: number | undefined
|
|
8939
|
-
selection:
|
|
8467
|
+
selection: EditorSelection
|
|
8940
8468
|
value: Array<PortableTextBlock> | undefined
|
|
8941
8469
|
},
|
|
8942
8470
|
{
|
|
@@ -9036,7 +8564,7 @@ export declare const editorMachine: StateMachine<
|
|
|
9036
8564
|
}
|
|
9037
8565
|
| {
|
|
9038
8566
|
type: 'update schema'
|
|
9039
|
-
schema:
|
|
8567
|
+
schema: EditorSchema
|
|
9040
8568
|
}
|
|
9041
8569
|
| {
|
|
9042
8570
|
type: 'update behaviors'
|
|
@@ -9323,6 +8851,11 @@ export declare type EditorProviderProps = {
|
|
|
9323
8851
|
children?: React_2.ReactNode
|
|
9324
8852
|
}
|
|
9325
8853
|
|
|
8854
|
+
/**
|
|
8855
|
+
* @alpha
|
|
8856
|
+
*/
|
|
8857
|
+
export declare type EditorSchema = PortableTextMemberSchemaTypes
|
|
8858
|
+
|
|
9326
8859
|
/** @beta */
|
|
9327
8860
|
export declare type EditorSelection = {
|
|
9328
8861
|
anchor: EditorSelectionPoint
|
|
@@ -9340,18 +8873,9 @@ export declare type EditorSelectionPoint = {
|
|
|
9340
8873
|
* @alpha
|
|
9341
8874
|
*/
|
|
9342
8875
|
export declare type EditorSelector<TSelected> = (
|
|
9343
|
-
snapshot:
|
|
8876
|
+
snapshot: EditorSnapshot,
|
|
9344
8877
|
) => TSelected
|
|
9345
8878
|
|
|
9346
|
-
/**
|
|
9347
|
-
* @alpha
|
|
9348
|
-
*/
|
|
9349
|
-
export declare type EditorSelectorSnapshot = {
|
|
9350
|
-
context: Omit<EditorSnapshot['context'], 'selection'> & {
|
|
9351
|
-
selection?: NonNullable<EditorSelection>
|
|
9352
|
-
}
|
|
9353
|
-
}
|
|
9354
|
-
|
|
9355
8879
|
/**
|
|
9356
8880
|
* @alpha
|
|
9357
8881
|
*/
|
|
@@ -9495,7 +9019,7 @@ export declare type InternalEditorEvent =
|
|
|
9495
9019
|
}
|
|
9496
9020
|
| {
|
|
9497
9021
|
type: 'update schema'
|
|
9498
|
-
schema:
|
|
9022
|
+
schema: EditorSchema
|
|
9499
9023
|
}
|
|
9500
9024
|
| {
|
|
9501
9025
|
type: 'update behaviors'
|
|
@@ -9551,23 +9075,6 @@ export declare type InvalidValueResolution = {
|
|
|
9551
9075
|
*/
|
|
9552
9076
|
export declare const keyGenerator: () => string
|
|
9553
9077
|
|
|
9554
|
-
/**
|
|
9555
|
-
* @alpha
|
|
9556
|
-
*/
|
|
9557
|
-
export declare type LinkBehaviorsConfig = {
|
|
9558
|
-
linkAnnotation?: (context: {
|
|
9559
|
-
schema: PortableTextMemberSchemaTypes
|
|
9560
|
-
url: string
|
|
9561
|
-
}) =>
|
|
9562
|
-
| {
|
|
9563
|
-
name: string
|
|
9564
|
-
value: {
|
|
9565
|
-
[prop: string]: unknown
|
|
9566
|
-
}
|
|
9567
|
-
}
|
|
9568
|
-
| undefined
|
|
9569
|
-
}
|
|
9570
|
-
|
|
9571
9078
|
/**
|
|
9572
9079
|
* The editor is currently loading something
|
|
9573
9080
|
* Could be used to show a spinner etc.
|
|
@@ -9577,36 +9084,6 @@ export declare type LoadingChange = {
|
|
|
9577
9084
|
isLoading: boolean
|
|
9578
9085
|
}
|
|
9579
9086
|
|
|
9580
|
-
/**
|
|
9581
|
-
* @alpha
|
|
9582
|
-
*/
|
|
9583
|
-
export declare type MarkdownBehaviorsConfig = {
|
|
9584
|
-
horizontalRuleObject?: (context: {schema: PortableTextMemberSchemaTypes}) =>
|
|
9585
|
-
| {
|
|
9586
|
-
name: string
|
|
9587
|
-
value?: {
|
|
9588
|
-
[prop: string]: unknown
|
|
9589
|
-
}
|
|
9590
|
-
}
|
|
9591
|
-
| undefined
|
|
9592
|
-
defaultStyle?: (context: {
|
|
9593
|
-
schema: PortableTextMemberSchemaTypes
|
|
9594
|
-
}) => string | undefined
|
|
9595
|
-
headingStyle?: (context: {
|
|
9596
|
-
schema: PortableTextMemberSchemaTypes
|
|
9597
|
-
level: number
|
|
9598
|
-
}) => string | undefined
|
|
9599
|
-
blockquoteStyle?: (context: {
|
|
9600
|
-
schema: PortableTextMemberSchemaTypes
|
|
9601
|
-
}) => string | undefined
|
|
9602
|
-
unorderedListStyle?: (context: {
|
|
9603
|
-
schema: PortableTextMemberSchemaTypes
|
|
9604
|
-
}) => string | undefined
|
|
9605
|
-
orderedListStyle?: (context: {
|
|
9606
|
-
schema: PortableTextMemberSchemaTypes
|
|
9607
|
-
}) => string | undefined
|
|
9608
|
-
}
|
|
9609
|
-
|
|
9610
9087
|
/**
|
|
9611
9088
|
* The editor has mutated it's content.
|
|
9612
9089
|
* @beta */
|
|
@@ -9836,9 +9313,9 @@ export declare class PortableTextEditor extends Component<
|
|
|
9836
9313
|
path: Path,
|
|
9837
9314
|
) => [
|
|
9838
9315
|
(
|
|
9839
|
-
| PortableTextTextBlock<PortableTextObject | PortableTextSpan>
|
|
9840
|
-
| PortableTextObject
|
|
9841
9316
|
| PortableTextSpan
|
|
9317
|
+
| PortableTextObject
|
|
9318
|
+
| PortableTextTextBlock<PortableTextSpan | PortableTextObject>
|
|
9842
9319
|
| undefined
|
|
9843
9320
|
),
|
|
9844
9321
|
Path | undefined,
|
|
@@ -10240,10 +9717,10 @@ export declare type SyntheticBehaviorEvent =
|
|
|
10240
9717
|
}
|
|
10241
9718
|
}
|
|
10242
9719
|
| {
|
|
10243
|
-
type: 'insert.
|
|
9720
|
+
type: 'insert.break'
|
|
10244
9721
|
}
|
|
10245
9722
|
| {
|
|
10246
|
-
type: 'insert.break'
|
|
9723
|
+
type: 'insert.soft break'
|
|
10247
9724
|
}
|
|
10248
9725
|
| {
|
|
10249
9726
|
type: 'insert.text'
|