@portabletext/editor 1.3.0 → 1.4.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/index.d.ts CHANGED
@@ -20,13 +20,13 @@ import {PortableTextSpan, PortableTextTextBlock} from '@sanity/types'
20
20
  import type {
21
21
  BaseSyntheticEvent,
22
22
  ClipboardEvent as ClipboardEvent_2,
23
- FocusEvent as FocusEvent_2,
24
23
  KeyboardEvent as KeyboardEvent_2,
25
24
  ReactElement,
26
25
  RefObject,
27
26
  } from 'react'
28
27
  import {
29
28
  Component,
29
+ FocusEvent as FocusEvent_2,
30
30
  ForwardRefExoticComponent,
31
31
  JSX as JSX_2,
32
32
  MutableRefObject,
@@ -42,6 +42,7 @@ import type {TextInsertTextOptions} from 'slate/dist/interfaces/transforms/text'
42
42
  import {
43
43
  ActionArgs,
44
44
  ActionFunction,
45
+ Actor,
45
46
  ActorRef,
46
47
  ActorRefFrom,
47
48
  ActorRefFromLogic,
@@ -291,12 +292,33 @@ export declare type ConnectionChange = {
291
292
  */
292
293
  export declare type createEditorOptions = {
293
294
  editorActor: EditorActor
294
- patches$?: PatchObservable
295
295
  portableTextEditor: PortableTextEditor
296
296
  readOnly: boolean
297
297
  maxBlocks?: number
298
298
  }
299
299
 
300
+ /**
301
+ * @alpha
302
+ */
303
+ export declare function createMarkdownBehaviors(
304
+ config: MarkdownBehaviorsConfig,
305
+ ): Behavior<
306
+ | 'insert break'
307
+ | 'insert soft break'
308
+ | 'delete backward'
309
+ | 'delete forward'
310
+ | 'insert text',
311
+ true
312
+ >[]
313
+
314
+ /**
315
+ * @alpha
316
+ */
317
+ export declare function defineBehavior<
318
+ TBehaviorEventType extends BehaviorEvent['type'],
319
+ TGuardResponse = true,
320
+ >(behavior: Behavior<TBehaviorEventType, TGuardResponse>): Behavior
321
+
300
322
  /** @beta */
301
323
  export declare interface EditableAPI {
302
324
  activeAnnotations: () => PortableTextObject[]
@@ -368,6 +390,11 @@ export declare interface EditableAPIDeleteOptions {
368
390
  mode?: 'blocks' | 'children' | 'selected'
369
391
  }
370
392
 
393
+ /**
394
+ * @alpha
395
+ */
396
+ export declare type Editor = ReturnType<typeof useEditor>
397
+
371
398
  /**
372
399
  * @internal
373
400
  */
@@ -397,6 +424,15 @@ export declare type EditorChange =
397
424
  */
398
425
  export declare type EditorChanges = Subject<EditorChange>
399
426
 
427
+ /**
428
+ * @alpha
429
+ */
430
+ export declare type EditorConfig = {
431
+ behaviors?: Array<Behavior>
432
+ keyGenerator?: () => string
433
+ schema: ArraySchemaType<PortableTextBlock> | ArrayDefinition
434
+ }
435
+
400
436
  /**
401
437
  * @internal
402
438
  */
@@ -429,9 +465,14 @@ export declare const editorMachine: StateMachine<
429
465
  type: 'update schema'
430
466
  schema: PortableTextMemberSchemaTypes
431
467
  }
468
+ | {
469
+ type: 'update behaviors'
470
+ behaviors: Array<Behavior>
471
+ }
432
472
  | {
433
473
  type: 'ready'
434
474
  }
475
+ | PatchesEvent
435
476
  | {
436
477
  type: 'unset'
437
478
  previousValue: Array<PortableTextBlock>
@@ -488,6 +529,10 @@ export declare const editorMachine: StateMachine<
488
529
  id: string | undefined
489
530
  },
490
531
  Values<{
532
+ 'assign behaviors': {
533
+ type: 'assign behaviors'
534
+ params: NonReducibleUnknown
535
+ }
491
536
  'assign schema': {
492
537
  type: 'assign schema'
493
538
  params: NonReducibleUnknown
@@ -525,7 +570,7 @@ export declare const editorMachine: StateMachine<
525
570
  },
526
571
  string,
527
572
  {
528
- behaviors: Array<Behavior>
573
+ behaviors?: Array<Behavior>
529
574
  keyGenerator: () => string
530
575
  schema: PortableTextMemberSchemaTypes
531
576
  },
@@ -535,6 +580,7 @@ export declare const editorMachine: StateMachine<
535
580
  | {
536
581
  type: 'ready'
537
582
  }
583
+ | PatchesEvent
538
584
  | {
539
585
  type: 'unset'
540
586
  previousValue: Array<PortableTextBlock>
@@ -652,7 +698,7 @@ export declare const editorMachine: StateMachine<
652
698
  ): ActorRefFromLogic<TLogic>
653
699
  }
654
700
  input: {
655
- behaviors: Array<Behavior>
701
+ behaviors?: Array<Behavior>
656
702
  keyGenerator: () => string
657
703
  schema: PortableTextMemberSchemaTypes
658
704
  }
@@ -686,9 +732,14 @@ export declare const editorMachine: StateMachine<
686
732
  type: 'update schema'
687
733
  schema: PortableTextMemberSchemaTypes
688
734
  }
735
+ | {
736
+ type: 'update behaviors'
737
+ behaviors: Array<Behavior>
738
+ }
689
739
  | {
690
740
  type: 'ready'
691
741
  }
742
+ | PatchesEvent
692
743
  | {
693
744
  type: 'unset'
694
745
  previousValue: Array<PortableTextBlock>
@@ -761,9 +812,14 @@ export declare const editorMachine: StateMachine<
761
812
  type: 'update schema'
762
813
  schema: PortableTextMemberSchemaTypes
763
814
  }
815
+ | {
816
+ type: 'update behaviors'
817
+ behaviors: Array<Behavior>
818
+ }
764
819
  | {
765
820
  type: 'ready'
766
821
  }
822
+ | PatchesEvent
767
823
  | {
768
824
  type: 'unset'
769
825
  previousValue: Array<PortableTextBlock>
@@ -810,7 +866,14 @@ export declare const editorMachine: StateMachine<
810
866
  AnyEventObject
811
867
  >
812
868
  }) => {
813
- behaviors: Behavior[]
869
+ behaviors: Behavior<
870
+ | 'insert break'
871
+ | 'insert soft break'
872
+ | 'delete backward'
873
+ | 'delete forward'
874
+ | 'insert text',
875
+ true
876
+ >[]
814
877
  keyGenerator: () => string
815
878
  pendingEvents: never[]
816
879
  schema: PortableTextMemberSchemaTypes
@@ -853,9 +916,14 @@ export declare const editorMachine: StateMachine<
853
916
  type: 'update schema'
854
917
  schema: PortableTextMemberSchemaTypes
855
918
  }
919
+ | {
920
+ type: 'update behaviors'
921
+ behaviors: Array<Behavior>
922
+ }
856
923
  | {
857
924
  type: 'ready'
858
925
  }
926
+ | PatchesEvent
859
927
  | {
860
928
  type: 'unset'
861
929
  previousValue: Array<PortableTextBlock>
@@ -909,6 +977,7 @@ export declare const editorMachine: StateMachine<
909
977
  | {
910
978
  type: 'ready'
911
979
  }
980
+ | PatchesEvent
912
981
  | {
913
982
  type: 'unset'
914
983
  previousValue: Array<PortableTextBlock>
@@ -988,9 +1057,14 @@ export declare const editorMachine: StateMachine<
988
1057
  type: 'update schema'
989
1058
  schema: PortableTextMemberSchemaTypes
990
1059
  }
1060
+ | {
1061
+ type: 'update behaviors'
1062
+ behaviors: Array<Behavior>
1063
+ }
991
1064
  | {
992
1065
  type: 'ready'
993
1066
  }
1067
+ | PatchesEvent
994
1068
  | {
995
1069
  type: 'unset'
996
1070
  previousValue: Array<PortableTextBlock>
@@ -1044,6 +1118,7 @@ export declare const editorMachine: StateMachine<
1044
1118
  | {
1045
1119
  type: 'ready'
1046
1120
  }
1121
+ | PatchesEvent
1047
1122
  | {
1048
1123
  type: 'unset'
1049
1124
  previousValue: Array<PortableTextBlock>
@@ -1123,9 +1198,14 @@ export declare const editorMachine: StateMachine<
1123
1198
  type: 'update schema'
1124
1199
  schema: PortableTextMemberSchemaTypes
1125
1200
  }
1201
+ | {
1202
+ type: 'update behaviors'
1203
+ behaviors: Array<Behavior>
1204
+ }
1126
1205
  | {
1127
1206
  type: 'ready'
1128
1207
  }
1208
+ | PatchesEvent
1129
1209
  | {
1130
1210
  type: 'unset'
1131
1211
  previousValue: Array<PortableTextBlock>
@@ -1179,6 +1259,7 @@ export declare const editorMachine: StateMachine<
1179
1259
  | {
1180
1260
  type: 'ready'
1181
1261
  }
1262
+ | PatchesEvent
1182
1263
  | {
1183
1264
  type: 'unset'
1184
1265
  previousValue: Array<PortableTextBlock>
@@ -1259,9 +1340,14 @@ export declare const editorMachine: StateMachine<
1259
1340
  type: 'update schema'
1260
1341
  schema: PortableTextMemberSchemaTypes
1261
1342
  }
1343
+ | {
1344
+ type: 'update behaviors'
1345
+ behaviors: Array<Behavior>
1346
+ }
1262
1347
  | {
1263
1348
  type: 'ready'
1264
1349
  }
1350
+ | PatchesEvent
1265
1351
  | {
1266
1352
  type: 'unset'
1267
1353
  previousValue: Array<PortableTextBlock>
@@ -1315,6 +1401,7 @@ export declare const editorMachine: StateMachine<
1315
1401
  | {
1316
1402
  type: 'ready'
1317
1403
  }
1404
+ | PatchesEvent
1318
1405
  | {
1319
1406
  type: 'unset'
1320
1407
  previousValue: Array<PortableTextBlock>
@@ -1396,9 +1483,14 @@ export declare const editorMachine: StateMachine<
1396
1483
  type: 'update schema'
1397
1484
  schema: PortableTextMemberSchemaTypes
1398
1485
  }
1486
+ | {
1487
+ type: 'update behaviors'
1488
+ behaviors: Array<Behavior>
1489
+ }
1399
1490
  | {
1400
1491
  type: 'ready'
1401
1492
  }
1493
+ | PatchesEvent
1402
1494
  | {
1403
1495
  type: 'unset'
1404
1496
  previousValue: Array<PortableTextBlock>
@@ -1452,6 +1544,7 @@ export declare const editorMachine: StateMachine<
1452
1544
  | {
1453
1545
  type: 'ready'
1454
1546
  }
1547
+ | PatchesEvent
1455
1548
  | {
1456
1549
  type: 'unset'
1457
1550
  previousValue: Array<PortableTextBlock>
@@ -1531,9 +1624,14 @@ export declare const editorMachine: StateMachine<
1531
1624
  type: 'update schema'
1532
1625
  schema: PortableTextMemberSchemaTypes
1533
1626
  }
1627
+ | {
1628
+ type: 'update behaviors'
1629
+ behaviors: Array<Behavior>
1630
+ }
1534
1631
  | {
1535
1632
  type: 'ready'
1536
1633
  }
1634
+ | PatchesEvent
1537
1635
  | {
1538
1636
  type: 'unset'
1539
1637
  previousValue: Array<PortableTextBlock>
@@ -1587,6 +1685,7 @@ export declare const editorMachine: StateMachine<
1587
1685
  | {
1588
1686
  type: 'ready'
1589
1687
  }
1688
+ | PatchesEvent
1590
1689
  | {
1591
1690
  type: 'unset'
1592
1691
  previousValue: Array<PortableTextBlock>
@@ -1666,9 +1765,14 @@ export declare const editorMachine: StateMachine<
1666
1765
  type: 'update schema'
1667
1766
  schema: PortableTextMemberSchemaTypes
1668
1767
  }
1768
+ | {
1769
+ type: 'update behaviors'
1770
+ behaviors: Array<Behavior>
1771
+ }
1669
1772
  | {
1670
1773
  type: 'ready'
1671
1774
  }
1775
+ | PatchesEvent
1672
1776
  | {
1673
1777
  type: 'unset'
1674
1778
  previousValue: Array<PortableTextBlock>
@@ -1722,6 +1826,7 @@ export declare const editorMachine: StateMachine<
1722
1826
  | {
1723
1827
  type: 'ready'
1724
1828
  }
1829
+ | PatchesEvent
1725
1830
  | {
1726
1831
  type: 'unset'
1727
1832
  previousValue: Array<PortableTextBlock>
@@ -1801,9 +1906,14 @@ export declare const editorMachine: StateMachine<
1801
1906
  type: 'update schema'
1802
1907
  schema: PortableTextMemberSchemaTypes
1803
1908
  }
1909
+ | {
1910
+ type: 'update behaviors'
1911
+ behaviors: Array<Behavior>
1912
+ }
1804
1913
  | {
1805
1914
  type: 'ready'
1806
1915
  }
1916
+ | PatchesEvent
1807
1917
  | {
1808
1918
  type: 'unset'
1809
1919
  previousValue: Array<PortableTextBlock>
@@ -1857,6 +1967,7 @@ export declare const editorMachine: StateMachine<
1857
1967
  | {
1858
1968
  type: 'ready'
1859
1969
  }
1970
+ | PatchesEvent
1860
1971
  | {
1861
1972
  type: 'unset'
1862
1973
  previousValue: Array<PortableTextBlock>
@@ -1935,9 +2046,14 @@ export declare const editorMachine: StateMachine<
1935
2046
  type: 'update schema'
1936
2047
  schema: PortableTextMemberSchemaTypes
1937
2048
  }
2049
+ | {
2050
+ type: 'update behaviors'
2051
+ behaviors: Array<Behavior>
2052
+ }
1938
2053
  | {
1939
2054
  type: 'ready'
1940
2055
  }
2056
+ | PatchesEvent
1941
2057
  | {
1942
2058
  type: 'unset'
1943
2059
  previousValue: Array<PortableTextBlock>
@@ -1991,6 +2107,7 @@ export declare const editorMachine: StateMachine<
1991
2107
  | {
1992
2108
  type: 'ready'
1993
2109
  }
2110
+ | PatchesEvent
1994
2111
  | {
1995
2112
  type: 'unset'
1996
2113
  previousValue: Array<PortableTextBlock>
@@ -2069,9 +2186,14 @@ export declare const editorMachine: StateMachine<
2069
2186
  type: 'update schema'
2070
2187
  schema: PortableTextMemberSchemaTypes
2071
2188
  }
2189
+ | {
2190
+ type: 'update behaviors'
2191
+ behaviors: Array<Behavior>
2192
+ }
2072
2193
  | {
2073
2194
  type: 'ready'
2074
2195
  }
2196
+ | PatchesEvent
2075
2197
  | {
2076
2198
  type: 'unset'
2077
2199
  previousValue: Array<PortableTextBlock>
@@ -2125,6 +2247,7 @@ export declare const editorMachine: StateMachine<
2125
2247
  | {
2126
2248
  type: 'ready'
2127
2249
  }
2250
+ | PatchesEvent
2128
2251
  | {
2129
2252
  type: 'unset'
2130
2253
  previousValue: Array<PortableTextBlock>
@@ -2203,9 +2326,152 @@ export declare const editorMachine: StateMachine<
2203
2326
  type: 'update schema'
2204
2327
  schema: PortableTextMemberSchemaTypes
2205
2328
  }
2329
+ | {
2330
+ type: 'update behaviors'
2331
+ behaviors: Array<Behavior>
2332
+ }
2333
+ | {
2334
+ type: 'ready'
2335
+ }
2336
+ | PatchesEvent
2337
+ | {
2338
+ type: 'unset'
2339
+ previousValue: Array<PortableTextBlock>
2340
+ }
2341
+ | {
2342
+ type: 'value changed'
2343
+ value: Array<PortableTextBlock> | undefined
2344
+ }
2345
+ | {
2346
+ type: 'invalid value'
2347
+ resolution: InvalidValueResolution | null
2348
+ value: Array<PortableTextBlock> | undefined
2349
+ }
2350
+ | {
2351
+ type: 'error'
2352
+ name: string
2353
+ description: string
2354
+ data: unknown
2355
+ }
2356
+ | {
2357
+ type: 'selection'
2358
+ selection: EditorSelection
2359
+ }
2360
+ | {
2361
+ type: 'blur'
2362
+ event: FocusEvent_2<HTMLDivElement, Element>
2363
+ }
2364
+ | {
2365
+ type: 'focus'
2366
+ event: FocusEvent_2<HTMLDivElement, Element>
2367
+ }
2368
+ | {
2369
+ type: 'online'
2370
+ }
2371
+ | {
2372
+ type: 'offline'
2373
+ }
2374
+ | {
2375
+ type: 'loading'
2376
+ }
2377
+ | {
2378
+ type: 'done loading'
2379
+ },
2380
+ undefined,
2381
+ never,
2382
+ never,
2383
+ never,
2384
+ never,
2385
+ | PatchEvent
2386
+ | MutationEvent_2
2387
+ | {
2388
+ type: 'ready'
2389
+ }
2390
+ | PatchesEvent
2391
+ | {
2392
+ type: 'unset'
2393
+ previousValue: Array<PortableTextBlock>
2394
+ }
2395
+ | {
2396
+ type: 'value changed'
2397
+ value: Array<PortableTextBlock> | undefined
2398
+ }
2399
+ | {
2400
+ type: 'invalid value'
2401
+ resolution: InvalidValueResolution | null
2402
+ value: Array<PortableTextBlock> | undefined
2403
+ }
2404
+ | {
2405
+ type: 'error'
2406
+ name: string
2407
+ description: string
2408
+ data: unknown
2409
+ }
2410
+ | {
2411
+ type: 'selection'
2412
+ selection: EditorSelection
2413
+ }
2414
+ | {
2415
+ type: 'blur'
2416
+ event: FocusEvent_2<HTMLDivElement, Element>
2417
+ }
2418
+ | {
2419
+ type: 'focus'
2420
+ event: FocusEvent_2<HTMLDivElement, Element>
2421
+ }
2422
+ | {
2423
+ type: 'online'
2424
+ }
2425
+ | {
2426
+ type: 'offline'
2427
+ }
2428
+ | {
2429
+ type: 'loading'
2430
+ }
2431
+ | {
2432
+ type: 'done loading'
2433
+ }
2434
+ >
2435
+ }
2436
+ readonly 'patches': {
2437
+ readonly actions: ActionFunction<
2438
+ {
2439
+ behaviors: Array<Behavior>
2440
+ keyGenerator: () => string
2441
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
2442
+ schema: PortableTextMemberSchemaTypes
2443
+ },
2444
+ PatchesEvent,
2445
+ | PatchEvent
2446
+ | MutationEvent_2
2447
+ | {
2448
+ type: 'normalizing'
2449
+ }
2450
+ | {
2451
+ type: 'done normalizing'
2452
+ }
2453
+ | {
2454
+ type: 'behavior event'
2455
+ behaviorEvent: BehaviorEvent
2456
+ editor: PortableTextSlateEditor
2457
+ }
2458
+ | {
2459
+ type: 'behavior action intends'
2460
+ editor: PortableTextSlateEditor
2461
+ actionIntends: Array<BehaviorActionIntend>
2462
+ }
2463
+ | {
2464
+ type: 'update schema'
2465
+ schema: PortableTextMemberSchemaTypes
2466
+ }
2467
+ | {
2468
+ type: 'update behaviors'
2469
+ behaviors: Array<Behavior>
2470
+ }
2206
2471
  | {
2207
2472
  type: 'ready'
2208
2473
  }
2474
+ | PatchesEvent
2209
2475
  | {
2210
2476
  type: 'unset'
2211
2477
  previousValue: Array<PortableTextBlock>
@@ -2259,6 +2525,7 @@ export declare const editorMachine: StateMachine<
2259
2525
  | {
2260
2526
  type: 'ready'
2261
2527
  }
2528
+ | PatchesEvent
2262
2529
  | {
2263
2530
  type: 'unset'
2264
2531
  previousValue: Array<PortableTextBlock>
@@ -2337,9 +2604,14 @@ export declare const editorMachine: StateMachine<
2337
2604
  type: 'update schema'
2338
2605
  schema: PortableTextMemberSchemaTypes
2339
2606
  }
2607
+ | {
2608
+ type: 'update behaviors'
2609
+ behaviors: Array<Behavior>
2610
+ }
2340
2611
  | {
2341
2612
  type: 'ready'
2342
2613
  }
2614
+ | PatchesEvent
2343
2615
  | {
2344
2616
  type: 'unset'
2345
2617
  previousValue: Array<PortableTextBlock>
@@ -2393,6 +2665,7 @@ export declare const editorMachine: StateMachine<
2393
2665
  | {
2394
2666
  type: 'ready'
2395
2667
  }
2668
+ | PatchesEvent
2396
2669
  | {
2397
2670
  type: 'unset'
2398
2671
  previousValue: Array<PortableTextBlock>
@@ -2438,6 +2711,9 @@ export declare const editorMachine: StateMachine<
2438
2711
  }
2439
2712
  >
2440
2713
  }
2714
+ readonly 'update behaviors': {
2715
+ readonly actions: 'assign behaviors'
2716
+ }
2441
2717
  readonly 'update schema': {
2442
2718
  readonly actions: 'assign schema'
2443
2719
  }
@@ -2483,9 +2759,14 @@ export declare const editorMachine: StateMachine<
2483
2759
  type: 'update schema'
2484
2760
  schema: PortableTextMemberSchemaTypes
2485
2761
  }
2762
+ | {
2763
+ type: 'update behaviors'
2764
+ behaviors: Array<Behavior>
2765
+ }
2486
2766
  | {
2487
2767
  type: 'ready'
2488
2768
  }
2769
+ | PatchesEvent
2489
2770
  | {
2490
2771
  type: 'unset'
2491
2772
  previousValue: Array<PortableTextBlock>
@@ -2691,6 +2972,26 @@ export declare type LoadingChange = {
2691
2972
  isLoading: boolean
2692
2973
  }
2693
2974
 
2975
+ /**
2976
+ * @alpha
2977
+ */
2978
+ export declare type MarkdownBehaviorsConfig = {
2979
+ mapDefaultStyle: (schema: PortableTextMemberSchemaTypes) => string | undefined
2980
+ mapHeadingStyle: (
2981
+ schema: PortableTextMemberSchemaTypes,
2982
+ level: number,
2983
+ ) => string | undefined
2984
+ mapBlockquoteStyle: (
2985
+ schema: PortableTextMemberSchemaTypes,
2986
+ ) => string | undefined
2987
+ mapUnorderedListStyle: (
2988
+ schema: PortableTextMemberSchemaTypes,
2989
+ ) => string | undefined
2990
+ mapOrderedListStyle: (
2991
+ schema: PortableTextMemberSchemaTypes,
2992
+ ) => string | undefined
2993
+ }
2994
+
2694
2995
  /**
2695
2996
  * The editor has mutated it's content.
2696
2997
  * @beta */
@@ -2759,6 +3060,15 @@ export declare type PatchChange = {
2759
3060
  patch: Patch
2760
3061
  }
2761
3062
 
3063
+ /**
3064
+ * @internal
3065
+ */
3066
+ export declare type PatchesEvent = {
3067
+ type: 'patches'
3068
+ patches: Array<Patch>
3069
+ snapshot: Array<PortableTextBlock> | undefined
3070
+ }
3071
+
2762
3072
  /**
2763
3073
  * @internal
2764
3074
  */
@@ -2819,7 +3129,9 @@ export declare type PortableTextEditableProps = Omit<
2819
3129
  * The main Portable Text Editor component.
2820
3130
  * @public
2821
3131
  */
2822
- export declare class PortableTextEditor extends Component<PortableTextEditorProps> {
3132
+ export declare class PortableTextEditor extends Component<
3133
+ PortableTextEditorProps<Editor | undefined>
3134
+ > {
2823
3135
  static displayName: string
2824
3136
  /**
2825
3137
  * An observable of all the editor changes.
@@ -2971,44 +3283,57 @@ export declare class PortableTextEditor extends Component<PortableTextEditorProp
2971
3283
  *
2972
3284
  * @public
2973
3285
  */
2974
- export declare type PortableTextEditorProps = PropsWithChildren<{
2975
- /**
2976
- * Function that gets called when the editor changes the value
2977
- */
2978
- onChange: (change: EditorChange) => void
2979
- /**
2980
- * Schema type for the portable text field
2981
- */
2982
- schemaType: ArraySchemaType<PortableTextBlock> | ArrayDefinition
2983
- /**
2984
- * Maximum number of blocks to allow within the editor
2985
- */
2986
- maxBlocks?: number | string
2987
- /**
2988
- * Whether or not the editor should be in read-only mode
2989
- */
2990
- readOnly?: boolean
2991
- /**
2992
- * The current value of the portable text field
2993
- */
2994
- value?: PortableTextBlock[]
2995
- /**
2996
- * Function used to generate keys for array items (`_key`)
2997
- */
2998
- keyGenerator?: () => string
2999
- /**
3000
- * Observable of local and remote patches for the edited value.
3001
- */
3002
- patches$?: PatchObservable
3003
- /**
3004
- * Backward compatibility (renamed to patches$).
3005
- */
3006
- incomingPatches$?: PatchObservable
3007
- /**
3008
- * A ref to the editor instance
3009
- */
3010
- editorRef?: MutableRefObject<PortableTextEditor | null>
3011
- }>
3286
+ export declare type PortableTextEditorProps<
3287
+ TEditor extends Editor | undefined = undefined,
3288
+ > = PropsWithChildren<
3289
+ (TEditor extends Editor
3290
+ ? {
3291
+ /**
3292
+ * @alpha
3293
+ */
3294
+ editor: TEditor
3295
+ }
3296
+ : {
3297
+ editor?: undefined
3298
+ /**
3299
+ * Function that gets called when the editor changes the value
3300
+ */
3301
+ onChange: (change: EditorChange) => void
3302
+ /**
3303
+ * Schema type for the portable text field
3304
+ */
3305
+ schemaType: ArraySchemaType<PortableTextBlock> | ArrayDefinition
3306
+ /**
3307
+ * Maximum number of blocks to allow within the editor
3308
+ */
3309
+ maxBlocks?: number | string
3310
+ /**
3311
+ * Function used to generate keys for array items (`_key`)
3312
+ */
3313
+ keyGenerator?: () => string
3314
+ /**
3315
+ * Observable of local and remote patches for the edited value.
3316
+ */
3317
+ patches$?: PatchObservable
3318
+ /**
3319
+ * Backward compatibility (renamed to patches$).
3320
+ */
3321
+ incomingPatches$?: PatchObservable
3322
+ }) & {
3323
+ /**
3324
+ * Whether or not the editor should be in read-only mode
3325
+ */
3326
+ readOnly?: boolean
3327
+ /**
3328
+ * The current value of the portable text field
3329
+ */
3330
+ value?: PortableTextBlock[]
3331
+ /**
3332
+ * A ref to the editor instance
3333
+ */
3334
+ editorRef?: MutableRefObject<PortableTextEditor | null>
3335
+ }
3336
+ >
3012
3337
 
3013
3338
  /** @internal */
3014
3339
  export declare type PortableTextMemberSchemaTypes = {
@@ -3255,6 +3580,2442 @@ export declare type UnsetChange = {
3255
3580
  previousValue: PortableTextBlock[]
3256
3581
  }
3257
3582
 
3583
+ /**
3584
+ * @alpha
3585
+ */
3586
+ export declare function useEditor(config: EditorConfig): Actor<
3587
+ StateMachine<
3588
+ {
3589
+ behaviors: Array<Behavior>
3590
+ keyGenerator: () => string
3591
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
3592
+ schema: PortableTextMemberSchemaTypes
3593
+ },
3594
+ | PatchEvent
3595
+ | MutationEvent_2
3596
+ | {
3597
+ type: 'normalizing'
3598
+ }
3599
+ | {
3600
+ type: 'done normalizing'
3601
+ }
3602
+ | {
3603
+ type: 'behavior event'
3604
+ behaviorEvent: BehaviorEvent
3605
+ editor: PortableTextSlateEditor
3606
+ }
3607
+ | {
3608
+ type: 'behavior action intends'
3609
+ editor: PortableTextSlateEditor
3610
+ actionIntends: Array<BehaviorActionIntend>
3611
+ }
3612
+ | {
3613
+ type: 'update schema'
3614
+ schema: PortableTextMemberSchemaTypes
3615
+ }
3616
+ | {
3617
+ type: 'update behaviors'
3618
+ behaviors: Array<Behavior>
3619
+ }
3620
+ | {
3621
+ type: 'ready'
3622
+ }
3623
+ | PatchesEvent
3624
+ | {
3625
+ type: 'unset'
3626
+ previousValue: Array<PortableTextBlock>
3627
+ }
3628
+ | {
3629
+ type: 'value changed'
3630
+ value: Array<PortableTextBlock> | undefined
3631
+ }
3632
+ | {
3633
+ type: 'invalid value'
3634
+ resolution: InvalidValueResolution | null
3635
+ value: Array<PortableTextBlock> | undefined
3636
+ }
3637
+ | {
3638
+ type: 'error'
3639
+ name: string
3640
+ description: string
3641
+ data: unknown
3642
+ }
3643
+ | {
3644
+ type: 'selection'
3645
+ selection: EditorSelection
3646
+ }
3647
+ | {
3648
+ type: 'blur'
3649
+ event: FocusEvent_2<HTMLDivElement, Element>
3650
+ }
3651
+ | {
3652
+ type: 'focus'
3653
+ event: FocusEvent_2<HTMLDivElement, Element>
3654
+ }
3655
+ | {
3656
+ type: 'online'
3657
+ }
3658
+ | {
3659
+ type: 'offline'
3660
+ }
3661
+ | {
3662
+ type: 'loading'
3663
+ }
3664
+ | {
3665
+ type: 'done loading'
3666
+ },
3667
+ {
3668
+ [x: string]:
3669
+ | ActorRefFromLogic<
3670
+ CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
3671
+ >
3672
+ | undefined
3673
+ },
3674
+ {
3675
+ src: 'networkLogic'
3676
+ logic: CallbackActorLogic<EventObject, NonReducibleUnknown, EventObject>
3677
+ id: string | undefined
3678
+ },
3679
+ Values<{
3680
+ 'assign behaviors': {
3681
+ type: 'assign behaviors'
3682
+ params: NonReducibleUnknown
3683
+ }
3684
+ 'assign schema': {
3685
+ type: 'assign schema'
3686
+ params: NonReducibleUnknown
3687
+ }
3688
+ 'emit patch event': {
3689
+ type: 'emit patch event'
3690
+ params: NonReducibleUnknown
3691
+ }
3692
+ 'emit mutation event': {
3693
+ type: 'emit mutation event'
3694
+ params: NonReducibleUnknown
3695
+ }
3696
+ 'defer event': {
3697
+ type: 'defer event'
3698
+ params: NonReducibleUnknown
3699
+ }
3700
+ 'emit pending events': {
3701
+ type: 'emit pending events'
3702
+ params: NonReducibleUnknown
3703
+ }
3704
+ 'clear pending events': {
3705
+ type: 'clear pending events'
3706
+ params: NonReducibleUnknown
3707
+ }
3708
+ 'handle behavior event': {
3709
+ type: 'handle behavior event'
3710
+ params: NonReducibleUnknown
3711
+ }
3712
+ }>,
3713
+ never,
3714
+ never,
3715
+ | 'dirty'
3716
+ | {
3717
+ pristine: 'normalizing' | 'idle'
3718
+ },
3719
+ string,
3720
+ {
3721
+ behaviors?: Array<Behavior>
3722
+ keyGenerator: () => string
3723
+ schema: PortableTextMemberSchemaTypes
3724
+ },
3725
+ NonReducibleUnknown,
3726
+ | PatchEvent
3727
+ | MutationEvent_2
3728
+ | {
3729
+ type: 'ready'
3730
+ }
3731
+ | PatchesEvent
3732
+ | {
3733
+ type: 'unset'
3734
+ previousValue: Array<PortableTextBlock>
3735
+ }
3736
+ | {
3737
+ type: 'value changed'
3738
+ value: Array<PortableTextBlock> | undefined
3739
+ }
3740
+ | {
3741
+ type: 'invalid value'
3742
+ resolution: InvalidValueResolution | null
3743
+ value: Array<PortableTextBlock> | undefined
3744
+ }
3745
+ | {
3746
+ type: 'error'
3747
+ name: string
3748
+ description: string
3749
+ data: unknown
3750
+ }
3751
+ | {
3752
+ type: 'selection'
3753
+ selection: EditorSelection
3754
+ }
3755
+ | {
3756
+ type: 'blur'
3757
+ event: FocusEvent_2<HTMLDivElement, Element>
3758
+ }
3759
+ | {
3760
+ type: 'focus'
3761
+ event: FocusEvent_2<HTMLDivElement, Element>
3762
+ }
3763
+ | {
3764
+ type: 'online'
3765
+ }
3766
+ | {
3767
+ type: 'offline'
3768
+ }
3769
+ | {
3770
+ type: 'loading'
3771
+ }
3772
+ | {
3773
+ type: 'done loading'
3774
+ },
3775
+ MetaObject,
3776
+ {
3777
+ readonly id: 'editor'
3778
+ readonly context: ({
3779
+ input,
3780
+ }: {
3781
+ spawn: {
3782
+ <TSrc extends 'networkLogic'>(
3783
+ logic: TSrc,
3784
+ ...[options]: {
3785
+ src: 'networkLogic'
3786
+ logic: CallbackActorLogic<
3787
+ EventObject,
3788
+ NonReducibleUnknown,
3789
+ EventObject
3790
+ >
3791
+ id: string | undefined
3792
+ } extends infer T
3793
+ ? T extends {
3794
+ src: 'networkLogic'
3795
+ logic: CallbackActorLogic<
3796
+ EventObject,
3797
+ NonReducibleUnknown,
3798
+ EventObject
3799
+ >
3800
+ id: string | undefined
3801
+ }
3802
+ ? T extends {
3803
+ src: TSrc
3804
+ }
3805
+ ? ConditionalRequired<
3806
+ [
3807
+ options?:
3808
+ | ({
3809
+ id?: T['id'] | undefined
3810
+ systemId?: string
3811
+ input?: InputFrom<T['logic']> | undefined
3812
+ syncSnapshot?: boolean
3813
+ } & {[K in RequiredActorOptions<T>]: unknown})
3814
+ | undefined,
3815
+ ],
3816
+ IsNotNever<RequiredActorOptions<T>>
3817
+ >
3818
+ : never
3819
+ : never
3820
+ : never
3821
+ ): ActorRefFromLogic<
3822
+ GetConcreteByKey<
3823
+ {
3824
+ src: 'networkLogic'
3825
+ logic: CallbackActorLogic<
3826
+ EventObject,
3827
+ NonReducibleUnknown,
3828
+ EventObject
3829
+ >
3830
+ id: string | undefined
3831
+ },
3832
+ 'src',
3833
+ TSrc
3834
+ >['logic']
3835
+ >
3836
+ <TLogic extends AnyActorLogic>(
3837
+ src: TLogic,
3838
+ options?:
3839
+ | {
3840
+ id?: never
3841
+ systemId?: string
3842
+ input?: InputFrom<TLogic> | undefined
3843
+ syncSnapshot?: boolean
3844
+ }
3845
+ | undefined,
3846
+ ): ActorRefFromLogic<TLogic>
3847
+ }
3848
+ input: {
3849
+ behaviors?: Array<Behavior>
3850
+ keyGenerator: () => string
3851
+ schema: PortableTextMemberSchemaTypes
3852
+ }
3853
+ self: ActorRef<
3854
+ MachineSnapshot<
3855
+ {
3856
+ behaviors: Array<Behavior>
3857
+ keyGenerator: () => string
3858
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
3859
+ schema: PortableTextMemberSchemaTypes
3860
+ },
3861
+ | PatchEvent
3862
+ | MutationEvent_2
3863
+ | {
3864
+ type: 'normalizing'
3865
+ }
3866
+ | {
3867
+ type: 'done normalizing'
3868
+ }
3869
+ | {
3870
+ type: 'behavior event'
3871
+ behaviorEvent: BehaviorEvent
3872
+ editor: PortableTextSlateEditor
3873
+ }
3874
+ | {
3875
+ type: 'behavior action intends'
3876
+ editor: PortableTextSlateEditor
3877
+ actionIntends: Array<BehaviorActionIntend>
3878
+ }
3879
+ | {
3880
+ type: 'update schema'
3881
+ schema: PortableTextMemberSchemaTypes
3882
+ }
3883
+ | {
3884
+ type: 'update behaviors'
3885
+ behaviors: Array<Behavior>
3886
+ }
3887
+ | {
3888
+ type: 'ready'
3889
+ }
3890
+ | PatchesEvent
3891
+ | {
3892
+ type: 'unset'
3893
+ previousValue: Array<PortableTextBlock>
3894
+ }
3895
+ | {
3896
+ type: 'value changed'
3897
+ value: Array<PortableTextBlock> | undefined
3898
+ }
3899
+ | {
3900
+ type: 'invalid value'
3901
+ resolution: InvalidValueResolution | null
3902
+ value: Array<PortableTextBlock> | undefined
3903
+ }
3904
+ | {
3905
+ type: 'error'
3906
+ name: string
3907
+ description: string
3908
+ data: unknown
3909
+ }
3910
+ | {
3911
+ type: 'selection'
3912
+ selection: EditorSelection
3913
+ }
3914
+ | {
3915
+ type: 'blur'
3916
+ event: FocusEvent_2<HTMLDivElement, Element>
3917
+ }
3918
+ | {
3919
+ type: 'focus'
3920
+ event: FocusEvent_2<HTMLDivElement, Element>
3921
+ }
3922
+ | {
3923
+ type: 'online'
3924
+ }
3925
+ | {
3926
+ type: 'offline'
3927
+ }
3928
+ | {
3929
+ type: 'loading'
3930
+ }
3931
+ | {
3932
+ type: 'done loading'
3933
+ },
3934
+ Record<string, AnyActorRef | undefined>,
3935
+ StateValue,
3936
+ string,
3937
+ unknown,
3938
+ any,
3939
+ any
3940
+ >,
3941
+ | PatchEvent
3942
+ | MutationEvent_2
3943
+ | {
3944
+ type: 'normalizing'
3945
+ }
3946
+ | {
3947
+ type: 'done normalizing'
3948
+ }
3949
+ | {
3950
+ type: 'behavior event'
3951
+ behaviorEvent: BehaviorEvent
3952
+ editor: PortableTextSlateEditor
3953
+ }
3954
+ | {
3955
+ type: 'behavior action intends'
3956
+ editor: PortableTextSlateEditor
3957
+ actionIntends: Array<BehaviorActionIntend>
3958
+ }
3959
+ | {
3960
+ type: 'update schema'
3961
+ schema: PortableTextMemberSchemaTypes
3962
+ }
3963
+ | {
3964
+ type: 'update behaviors'
3965
+ behaviors: Array<Behavior>
3966
+ }
3967
+ | {
3968
+ type: 'ready'
3969
+ }
3970
+ | PatchesEvent
3971
+ | {
3972
+ type: 'unset'
3973
+ previousValue: Array<PortableTextBlock>
3974
+ }
3975
+ | {
3976
+ type: 'value changed'
3977
+ value: Array<PortableTextBlock> | undefined
3978
+ }
3979
+ | {
3980
+ type: 'invalid value'
3981
+ resolution: InvalidValueResolution | null
3982
+ value: Array<PortableTextBlock> | undefined
3983
+ }
3984
+ | {
3985
+ type: 'error'
3986
+ name: string
3987
+ description: string
3988
+ data: unknown
3989
+ }
3990
+ | {
3991
+ type: 'selection'
3992
+ selection: EditorSelection
3993
+ }
3994
+ | {
3995
+ type: 'blur'
3996
+ event: FocusEvent_2<HTMLDivElement, Element>
3997
+ }
3998
+ | {
3999
+ type: 'focus'
4000
+ event: FocusEvent_2<HTMLDivElement, Element>
4001
+ }
4002
+ | {
4003
+ type: 'online'
4004
+ }
4005
+ | {
4006
+ type: 'offline'
4007
+ }
4008
+ | {
4009
+ type: 'loading'
4010
+ }
4011
+ | {
4012
+ type: 'done loading'
4013
+ },
4014
+ AnyEventObject
4015
+ >
4016
+ }) => {
4017
+ behaviors: Behavior<
4018
+ | 'insert break'
4019
+ | 'insert soft break'
4020
+ | 'delete backward'
4021
+ | 'delete forward'
4022
+ | 'insert text',
4023
+ true
4024
+ >[]
4025
+ keyGenerator: () => string
4026
+ pendingEvents: never[]
4027
+ schema: PortableTextMemberSchemaTypes
4028
+ }
4029
+ readonly invoke: {
4030
+ readonly id: 'networkLogic'
4031
+ readonly src: 'networkLogic'
4032
+ }
4033
+ readonly on: {
4034
+ readonly 'ready': {
4035
+ readonly actions: ActionFunction<
4036
+ {
4037
+ behaviors: Array<Behavior>
4038
+ keyGenerator: () => string
4039
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4040
+ schema: PortableTextMemberSchemaTypes
4041
+ },
4042
+ {
4043
+ type: 'ready'
4044
+ },
4045
+ | PatchEvent
4046
+ | MutationEvent_2
4047
+ | {
4048
+ type: 'normalizing'
4049
+ }
4050
+ | {
4051
+ type: 'done normalizing'
4052
+ }
4053
+ | {
4054
+ type: 'behavior event'
4055
+ behaviorEvent: BehaviorEvent
4056
+ editor: PortableTextSlateEditor
4057
+ }
4058
+ | {
4059
+ type: 'behavior action intends'
4060
+ editor: PortableTextSlateEditor
4061
+ actionIntends: Array<BehaviorActionIntend>
4062
+ }
4063
+ | {
4064
+ type: 'update schema'
4065
+ schema: PortableTextMemberSchemaTypes
4066
+ }
4067
+ | {
4068
+ type: 'update behaviors'
4069
+ behaviors: Array<Behavior>
4070
+ }
4071
+ | {
4072
+ type: 'ready'
4073
+ }
4074
+ | PatchesEvent
4075
+ | {
4076
+ type: 'unset'
4077
+ previousValue: Array<PortableTextBlock>
4078
+ }
4079
+ | {
4080
+ type: 'value changed'
4081
+ value: Array<PortableTextBlock> | undefined
4082
+ }
4083
+ | {
4084
+ type: 'invalid value'
4085
+ resolution: InvalidValueResolution | null
4086
+ value: Array<PortableTextBlock> | undefined
4087
+ }
4088
+ | {
4089
+ type: 'error'
4090
+ name: string
4091
+ description: string
4092
+ data: unknown
4093
+ }
4094
+ | {
4095
+ type: 'selection'
4096
+ selection: EditorSelection
4097
+ }
4098
+ | {
4099
+ type: 'blur'
4100
+ event: FocusEvent_2<HTMLDivElement, Element>
4101
+ }
4102
+ | {
4103
+ type: 'focus'
4104
+ event: FocusEvent_2<HTMLDivElement, Element>
4105
+ }
4106
+ | {
4107
+ type: 'online'
4108
+ }
4109
+ | {
4110
+ type: 'offline'
4111
+ }
4112
+ | {
4113
+ type: 'loading'
4114
+ }
4115
+ | {
4116
+ type: 'done loading'
4117
+ },
4118
+ undefined,
4119
+ never,
4120
+ never,
4121
+ never,
4122
+ never,
4123
+ | PatchEvent
4124
+ | MutationEvent_2
4125
+ | {
4126
+ type: 'ready'
4127
+ }
4128
+ | PatchesEvent
4129
+ | {
4130
+ type: 'unset'
4131
+ previousValue: Array<PortableTextBlock>
4132
+ }
4133
+ | {
4134
+ type: 'value changed'
4135
+ value: Array<PortableTextBlock> | undefined
4136
+ }
4137
+ | {
4138
+ type: 'invalid value'
4139
+ resolution: InvalidValueResolution | null
4140
+ value: Array<PortableTextBlock> | undefined
4141
+ }
4142
+ | {
4143
+ type: 'error'
4144
+ name: string
4145
+ description: string
4146
+ data: unknown
4147
+ }
4148
+ | {
4149
+ type: 'selection'
4150
+ selection: EditorSelection
4151
+ }
4152
+ | {
4153
+ type: 'blur'
4154
+ event: FocusEvent_2<HTMLDivElement, Element>
4155
+ }
4156
+ | {
4157
+ type: 'focus'
4158
+ event: FocusEvent_2<HTMLDivElement, Element>
4159
+ }
4160
+ | {
4161
+ type: 'online'
4162
+ }
4163
+ | {
4164
+ type: 'offline'
4165
+ }
4166
+ | {
4167
+ type: 'loading'
4168
+ }
4169
+ | {
4170
+ type: 'done loading'
4171
+ }
4172
+ >
4173
+ }
4174
+ readonly 'unset': {
4175
+ readonly actions: ActionFunction<
4176
+ {
4177
+ behaviors: Array<Behavior>
4178
+ keyGenerator: () => string
4179
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4180
+ schema: PortableTextMemberSchemaTypes
4181
+ },
4182
+ {
4183
+ type: 'unset'
4184
+ previousValue: Array<PortableTextBlock>
4185
+ },
4186
+ | PatchEvent
4187
+ | MutationEvent_2
4188
+ | {
4189
+ type: 'normalizing'
4190
+ }
4191
+ | {
4192
+ type: 'done normalizing'
4193
+ }
4194
+ | {
4195
+ type: 'behavior event'
4196
+ behaviorEvent: BehaviorEvent
4197
+ editor: PortableTextSlateEditor
4198
+ }
4199
+ | {
4200
+ type: 'behavior action intends'
4201
+ editor: PortableTextSlateEditor
4202
+ actionIntends: Array<BehaviorActionIntend>
4203
+ }
4204
+ | {
4205
+ type: 'update schema'
4206
+ schema: PortableTextMemberSchemaTypes
4207
+ }
4208
+ | {
4209
+ type: 'update behaviors'
4210
+ behaviors: Array<Behavior>
4211
+ }
4212
+ | {
4213
+ type: 'ready'
4214
+ }
4215
+ | PatchesEvent
4216
+ | {
4217
+ type: 'unset'
4218
+ previousValue: Array<PortableTextBlock>
4219
+ }
4220
+ | {
4221
+ type: 'value changed'
4222
+ value: Array<PortableTextBlock> | undefined
4223
+ }
4224
+ | {
4225
+ type: 'invalid value'
4226
+ resolution: InvalidValueResolution | null
4227
+ value: Array<PortableTextBlock> | undefined
4228
+ }
4229
+ | {
4230
+ type: 'error'
4231
+ name: string
4232
+ description: string
4233
+ data: unknown
4234
+ }
4235
+ | {
4236
+ type: 'selection'
4237
+ selection: EditorSelection
4238
+ }
4239
+ | {
4240
+ type: 'blur'
4241
+ event: FocusEvent_2<HTMLDivElement, Element>
4242
+ }
4243
+ | {
4244
+ type: 'focus'
4245
+ event: FocusEvent_2<HTMLDivElement, Element>
4246
+ }
4247
+ | {
4248
+ type: 'online'
4249
+ }
4250
+ | {
4251
+ type: 'offline'
4252
+ }
4253
+ | {
4254
+ type: 'loading'
4255
+ }
4256
+ | {
4257
+ type: 'done loading'
4258
+ },
4259
+ undefined,
4260
+ never,
4261
+ never,
4262
+ never,
4263
+ never,
4264
+ | PatchEvent
4265
+ | MutationEvent_2
4266
+ | {
4267
+ type: 'ready'
4268
+ }
4269
+ | PatchesEvent
4270
+ | {
4271
+ type: 'unset'
4272
+ previousValue: Array<PortableTextBlock>
4273
+ }
4274
+ | {
4275
+ type: 'value changed'
4276
+ value: Array<PortableTextBlock> | undefined
4277
+ }
4278
+ | {
4279
+ type: 'invalid value'
4280
+ resolution: InvalidValueResolution | null
4281
+ value: Array<PortableTextBlock> | undefined
4282
+ }
4283
+ | {
4284
+ type: 'error'
4285
+ name: string
4286
+ description: string
4287
+ data: unknown
4288
+ }
4289
+ | {
4290
+ type: 'selection'
4291
+ selection: EditorSelection
4292
+ }
4293
+ | {
4294
+ type: 'blur'
4295
+ event: FocusEvent_2<HTMLDivElement, Element>
4296
+ }
4297
+ | {
4298
+ type: 'focus'
4299
+ event: FocusEvent_2<HTMLDivElement, Element>
4300
+ }
4301
+ | {
4302
+ type: 'online'
4303
+ }
4304
+ | {
4305
+ type: 'offline'
4306
+ }
4307
+ | {
4308
+ type: 'loading'
4309
+ }
4310
+ | {
4311
+ type: 'done loading'
4312
+ }
4313
+ >
4314
+ }
4315
+ readonly 'value changed': {
4316
+ readonly actions: ActionFunction<
4317
+ {
4318
+ behaviors: Array<Behavior>
4319
+ keyGenerator: () => string
4320
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4321
+ schema: PortableTextMemberSchemaTypes
4322
+ },
4323
+ {
4324
+ type: 'value changed'
4325
+ value: Array<PortableTextBlock> | undefined
4326
+ },
4327
+ | PatchEvent
4328
+ | MutationEvent_2
4329
+ | {
4330
+ type: 'normalizing'
4331
+ }
4332
+ | {
4333
+ type: 'done normalizing'
4334
+ }
4335
+ | {
4336
+ type: 'behavior event'
4337
+ behaviorEvent: BehaviorEvent
4338
+ editor: PortableTextSlateEditor
4339
+ }
4340
+ | {
4341
+ type: 'behavior action intends'
4342
+ editor: PortableTextSlateEditor
4343
+ actionIntends: Array<BehaviorActionIntend>
4344
+ }
4345
+ | {
4346
+ type: 'update schema'
4347
+ schema: PortableTextMemberSchemaTypes
4348
+ }
4349
+ | {
4350
+ type: 'update behaviors'
4351
+ behaviors: Array<Behavior>
4352
+ }
4353
+ | {
4354
+ type: 'ready'
4355
+ }
4356
+ | PatchesEvent
4357
+ | {
4358
+ type: 'unset'
4359
+ previousValue: Array<PortableTextBlock>
4360
+ }
4361
+ | {
4362
+ type: 'value changed'
4363
+ value: Array<PortableTextBlock> | undefined
4364
+ }
4365
+ | {
4366
+ type: 'invalid value'
4367
+ resolution: InvalidValueResolution | null
4368
+ value: Array<PortableTextBlock> | undefined
4369
+ }
4370
+ | {
4371
+ type: 'error'
4372
+ name: string
4373
+ description: string
4374
+ data: unknown
4375
+ }
4376
+ | {
4377
+ type: 'selection'
4378
+ selection: EditorSelection
4379
+ }
4380
+ | {
4381
+ type: 'blur'
4382
+ event: FocusEvent_2<HTMLDivElement, Element>
4383
+ }
4384
+ | {
4385
+ type: 'focus'
4386
+ event: FocusEvent_2<HTMLDivElement, Element>
4387
+ }
4388
+ | {
4389
+ type: 'online'
4390
+ }
4391
+ | {
4392
+ type: 'offline'
4393
+ }
4394
+ | {
4395
+ type: 'loading'
4396
+ }
4397
+ | {
4398
+ type: 'done loading'
4399
+ },
4400
+ undefined,
4401
+ never,
4402
+ never,
4403
+ never,
4404
+ never,
4405
+ | PatchEvent
4406
+ | MutationEvent_2
4407
+ | {
4408
+ type: 'ready'
4409
+ }
4410
+ | PatchesEvent
4411
+ | {
4412
+ type: 'unset'
4413
+ previousValue: Array<PortableTextBlock>
4414
+ }
4415
+ | {
4416
+ type: 'value changed'
4417
+ value: Array<PortableTextBlock> | undefined
4418
+ }
4419
+ | {
4420
+ type: 'invalid value'
4421
+ resolution: InvalidValueResolution | null
4422
+ value: Array<PortableTextBlock> | undefined
4423
+ }
4424
+ | {
4425
+ type: 'error'
4426
+ name: string
4427
+ description: string
4428
+ data: unknown
4429
+ }
4430
+ | {
4431
+ type: 'selection'
4432
+ selection: EditorSelection
4433
+ }
4434
+ | {
4435
+ type: 'blur'
4436
+ event: FocusEvent_2<HTMLDivElement, Element>
4437
+ }
4438
+ | {
4439
+ type: 'focus'
4440
+ event: FocusEvent_2<HTMLDivElement, Element>
4441
+ }
4442
+ | {
4443
+ type: 'online'
4444
+ }
4445
+ | {
4446
+ type: 'offline'
4447
+ }
4448
+ | {
4449
+ type: 'loading'
4450
+ }
4451
+ | {
4452
+ type: 'done loading'
4453
+ }
4454
+ >
4455
+ }
4456
+ readonly 'invalid value': {
4457
+ readonly actions: ActionFunction<
4458
+ {
4459
+ behaviors: Array<Behavior>
4460
+ keyGenerator: () => string
4461
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4462
+ schema: PortableTextMemberSchemaTypes
4463
+ },
4464
+ {
4465
+ type: 'invalid value'
4466
+ resolution: InvalidValueResolution | null
4467
+ value: Array<PortableTextBlock> | undefined
4468
+ },
4469
+ | PatchEvent
4470
+ | MutationEvent_2
4471
+ | {
4472
+ type: 'normalizing'
4473
+ }
4474
+ | {
4475
+ type: 'done normalizing'
4476
+ }
4477
+ | {
4478
+ type: 'behavior event'
4479
+ behaviorEvent: BehaviorEvent
4480
+ editor: PortableTextSlateEditor
4481
+ }
4482
+ | {
4483
+ type: 'behavior action intends'
4484
+ editor: PortableTextSlateEditor
4485
+ actionIntends: Array<BehaviorActionIntend>
4486
+ }
4487
+ | {
4488
+ type: 'update schema'
4489
+ schema: PortableTextMemberSchemaTypes
4490
+ }
4491
+ | {
4492
+ type: 'update behaviors'
4493
+ behaviors: Array<Behavior>
4494
+ }
4495
+ | {
4496
+ type: 'ready'
4497
+ }
4498
+ | PatchesEvent
4499
+ | {
4500
+ type: 'unset'
4501
+ previousValue: Array<PortableTextBlock>
4502
+ }
4503
+ | {
4504
+ type: 'value changed'
4505
+ value: Array<PortableTextBlock> | undefined
4506
+ }
4507
+ | {
4508
+ type: 'invalid value'
4509
+ resolution: InvalidValueResolution | null
4510
+ value: Array<PortableTextBlock> | undefined
4511
+ }
4512
+ | {
4513
+ type: 'error'
4514
+ name: string
4515
+ description: string
4516
+ data: unknown
4517
+ }
4518
+ | {
4519
+ type: 'selection'
4520
+ selection: EditorSelection
4521
+ }
4522
+ | {
4523
+ type: 'blur'
4524
+ event: FocusEvent_2<HTMLDivElement, Element>
4525
+ }
4526
+ | {
4527
+ type: 'focus'
4528
+ event: FocusEvent_2<HTMLDivElement, Element>
4529
+ }
4530
+ | {
4531
+ type: 'online'
4532
+ }
4533
+ | {
4534
+ type: 'offline'
4535
+ }
4536
+ | {
4537
+ type: 'loading'
4538
+ }
4539
+ | {
4540
+ type: 'done loading'
4541
+ },
4542
+ undefined,
4543
+ never,
4544
+ never,
4545
+ never,
4546
+ never,
4547
+ | PatchEvent
4548
+ | MutationEvent_2
4549
+ | {
4550
+ type: 'ready'
4551
+ }
4552
+ | PatchesEvent
4553
+ | {
4554
+ type: 'unset'
4555
+ previousValue: Array<PortableTextBlock>
4556
+ }
4557
+ | {
4558
+ type: 'value changed'
4559
+ value: Array<PortableTextBlock> | undefined
4560
+ }
4561
+ | {
4562
+ type: 'invalid value'
4563
+ resolution: InvalidValueResolution | null
4564
+ value: Array<PortableTextBlock> | undefined
4565
+ }
4566
+ | {
4567
+ type: 'error'
4568
+ name: string
4569
+ description: string
4570
+ data: unknown
4571
+ }
4572
+ | {
4573
+ type: 'selection'
4574
+ selection: EditorSelection
4575
+ }
4576
+ | {
4577
+ type: 'blur'
4578
+ event: FocusEvent_2<HTMLDivElement, Element>
4579
+ }
4580
+ | {
4581
+ type: 'focus'
4582
+ event: FocusEvent_2<HTMLDivElement, Element>
4583
+ }
4584
+ | {
4585
+ type: 'online'
4586
+ }
4587
+ | {
4588
+ type: 'offline'
4589
+ }
4590
+ | {
4591
+ type: 'loading'
4592
+ }
4593
+ | {
4594
+ type: 'done loading'
4595
+ }
4596
+ >
4597
+ }
4598
+ readonly 'error': {
4599
+ readonly actions: ActionFunction<
4600
+ {
4601
+ behaviors: Array<Behavior>
4602
+ keyGenerator: () => string
4603
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4604
+ schema: PortableTextMemberSchemaTypes
4605
+ },
4606
+ {
4607
+ type: 'error'
4608
+ name: string
4609
+ description: string
4610
+ data: unknown
4611
+ },
4612
+ | PatchEvent
4613
+ | MutationEvent_2
4614
+ | {
4615
+ type: 'normalizing'
4616
+ }
4617
+ | {
4618
+ type: 'done normalizing'
4619
+ }
4620
+ | {
4621
+ type: 'behavior event'
4622
+ behaviorEvent: BehaviorEvent
4623
+ editor: PortableTextSlateEditor
4624
+ }
4625
+ | {
4626
+ type: 'behavior action intends'
4627
+ editor: PortableTextSlateEditor
4628
+ actionIntends: Array<BehaviorActionIntend>
4629
+ }
4630
+ | {
4631
+ type: 'update schema'
4632
+ schema: PortableTextMemberSchemaTypes
4633
+ }
4634
+ | {
4635
+ type: 'update behaviors'
4636
+ behaviors: Array<Behavior>
4637
+ }
4638
+ | {
4639
+ type: 'ready'
4640
+ }
4641
+ | PatchesEvent
4642
+ | {
4643
+ type: 'unset'
4644
+ previousValue: Array<PortableTextBlock>
4645
+ }
4646
+ | {
4647
+ type: 'value changed'
4648
+ value: Array<PortableTextBlock> | undefined
4649
+ }
4650
+ | {
4651
+ type: 'invalid value'
4652
+ resolution: InvalidValueResolution | null
4653
+ value: Array<PortableTextBlock> | undefined
4654
+ }
4655
+ | {
4656
+ type: 'error'
4657
+ name: string
4658
+ description: string
4659
+ data: unknown
4660
+ }
4661
+ | {
4662
+ type: 'selection'
4663
+ selection: EditorSelection
4664
+ }
4665
+ | {
4666
+ type: 'blur'
4667
+ event: FocusEvent_2<HTMLDivElement, Element>
4668
+ }
4669
+ | {
4670
+ type: 'focus'
4671
+ event: FocusEvent_2<HTMLDivElement, Element>
4672
+ }
4673
+ | {
4674
+ type: 'online'
4675
+ }
4676
+ | {
4677
+ type: 'offline'
4678
+ }
4679
+ | {
4680
+ type: 'loading'
4681
+ }
4682
+ | {
4683
+ type: 'done loading'
4684
+ },
4685
+ undefined,
4686
+ never,
4687
+ never,
4688
+ never,
4689
+ never,
4690
+ | PatchEvent
4691
+ | MutationEvent_2
4692
+ | {
4693
+ type: 'ready'
4694
+ }
4695
+ | PatchesEvent
4696
+ | {
4697
+ type: 'unset'
4698
+ previousValue: Array<PortableTextBlock>
4699
+ }
4700
+ | {
4701
+ type: 'value changed'
4702
+ value: Array<PortableTextBlock> | undefined
4703
+ }
4704
+ | {
4705
+ type: 'invalid value'
4706
+ resolution: InvalidValueResolution | null
4707
+ value: Array<PortableTextBlock> | undefined
4708
+ }
4709
+ | {
4710
+ type: 'error'
4711
+ name: string
4712
+ description: string
4713
+ data: unknown
4714
+ }
4715
+ | {
4716
+ type: 'selection'
4717
+ selection: EditorSelection
4718
+ }
4719
+ | {
4720
+ type: 'blur'
4721
+ event: FocusEvent_2<HTMLDivElement, Element>
4722
+ }
4723
+ | {
4724
+ type: 'focus'
4725
+ event: FocusEvent_2<HTMLDivElement, Element>
4726
+ }
4727
+ | {
4728
+ type: 'online'
4729
+ }
4730
+ | {
4731
+ type: 'offline'
4732
+ }
4733
+ | {
4734
+ type: 'loading'
4735
+ }
4736
+ | {
4737
+ type: 'done loading'
4738
+ }
4739
+ >
4740
+ }
4741
+ readonly 'selection': {
4742
+ readonly actions: ActionFunction<
4743
+ {
4744
+ behaviors: Array<Behavior>
4745
+ keyGenerator: () => string
4746
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4747
+ schema: PortableTextMemberSchemaTypes
4748
+ },
4749
+ {
4750
+ type: 'selection'
4751
+ selection: EditorSelection
4752
+ },
4753
+ | PatchEvent
4754
+ | MutationEvent_2
4755
+ | {
4756
+ type: 'normalizing'
4757
+ }
4758
+ | {
4759
+ type: 'done normalizing'
4760
+ }
4761
+ | {
4762
+ type: 'behavior event'
4763
+ behaviorEvent: BehaviorEvent
4764
+ editor: PortableTextSlateEditor
4765
+ }
4766
+ | {
4767
+ type: 'behavior action intends'
4768
+ editor: PortableTextSlateEditor
4769
+ actionIntends: Array<BehaviorActionIntend>
4770
+ }
4771
+ | {
4772
+ type: 'update schema'
4773
+ schema: PortableTextMemberSchemaTypes
4774
+ }
4775
+ | {
4776
+ type: 'update behaviors'
4777
+ behaviors: Array<Behavior>
4778
+ }
4779
+ | {
4780
+ type: 'ready'
4781
+ }
4782
+ | PatchesEvent
4783
+ | {
4784
+ type: 'unset'
4785
+ previousValue: Array<PortableTextBlock>
4786
+ }
4787
+ | {
4788
+ type: 'value changed'
4789
+ value: Array<PortableTextBlock> | undefined
4790
+ }
4791
+ | {
4792
+ type: 'invalid value'
4793
+ resolution: InvalidValueResolution | null
4794
+ value: Array<PortableTextBlock> | undefined
4795
+ }
4796
+ | {
4797
+ type: 'error'
4798
+ name: string
4799
+ description: string
4800
+ data: unknown
4801
+ }
4802
+ | {
4803
+ type: 'selection'
4804
+ selection: EditorSelection
4805
+ }
4806
+ | {
4807
+ type: 'blur'
4808
+ event: FocusEvent_2<HTMLDivElement, Element>
4809
+ }
4810
+ | {
4811
+ type: 'focus'
4812
+ event: FocusEvent_2<HTMLDivElement, Element>
4813
+ }
4814
+ | {
4815
+ type: 'online'
4816
+ }
4817
+ | {
4818
+ type: 'offline'
4819
+ }
4820
+ | {
4821
+ type: 'loading'
4822
+ }
4823
+ | {
4824
+ type: 'done loading'
4825
+ },
4826
+ undefined,
4827
+ never,
4828
+ never,
4829
+ never,
4830
+ never,
4831
+ | PatchEvent
4832
+ | MutationEvent_2
4833
+ | {
4834
+ type: 'ready'
4835
+ }
4836
+ | PatchesEvent
4837
+ | {
4838
+ type: 'unset'
4839
+ previousValue: Array<PortableTextBlock>
4840
+ }
4841
+ | {
4842
+ type: 'value changed'
4843
+ value: Array<PortableTextBlock> | undefined
4844
+ }
4845
+ | {
4846
+ type: 'invalid value'
4847
+ resolution: InvalidValueResolution | null
4848
+ value: Array<PortableTextBlock> | undefined
4849
+ }
4850
+ | {
4851
+ type: 'error'
4852
+ name: string
4853
+ description: string
4854
+ data: unknown
4855
+ }
4856
+ | {
4857
+ type: 'selection'
4858
+ selection: EditorSelection
4859
+ }
4860
+ | {
4861
+ type: 'blur'
4862
+ event: FocusEvent_2<HTMLDivElement, Element>
4863
+ }
4864
+ | {
4865
+ type: 'focus'
4866
+ event: FocusEvent_2<HTMLDivElement, Element>
4867
+ }
4868
+ | {
4869
+ type: 'online'
4870
+ }
4871
+ | {
4872
+ type: 'offline'
4873
+ }
4874
+ | {
4875
+ type: 'loading'
4876
+ }
4877
+ | {
4878
+ type: 'done loading'
4879
+ }
4880
+ >
4881
+ }
4882
+ readonly 'blur': {
4883
+ readonly actions: ActionFunction<
4884
+ {
4885
+ behaviors: Array<Behavior>
4886
+ keyGenerator: () => string
4887
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
4888
+ schema: PortableTextMemberSchemaTypes
4889
+ },
4890
+ {
4891
+ type: 'blur'
4892
+ event: FocusEvent_2<HTMLDivElement, Element>
4893
+ },
4894
+ | PatchEvent
4895
+ | MutationEvent_2
4896
+ | {
4897
+ type: 'normalizing'
4898
+ }
4899
+ | {
4900
+ type: 'done normalizing'
4901
+ }
4902
+ | {
4903
+ type: 'behavior event'
4904
+ behaviorEvent: BehaviorEvent
4905
+ editor: PortableTextSlateEditor
4906
+ }
4907
+ | {
4908
+ type: 'behavior action intends'
4909
+ editor: PortableTextSlateEditor
4910
+ actionIntends: Array<BehaviorActionIntend>
4911
+ }
4912
+ | {
4913
+ type: 'update schema'
4914
+ schema: PortableTextMemberSchemaTypes
4915
+ }
4916
+ | {
4917
+ type: 'update behaviors'
4918
+ behaviors: Array<Behavior>
4919
+ }
4920
+ | {
4921
+ type: 'ready'
4922
+ }
4923
+ | PatchesEvent
4924
+ | {
4925
+ type: 'unset'
4926
+ previousValue: Array<PortableTextBlock>
4927
+ }
4928
+ | {
4929
+ type: 'value changed'
4930
+ value: Array<PortableTextBlock> | undefined
4931
+ }
4932
+ | {
4933
+ type: 'invalid value'
4934
+ resolution: InvalidValueResolution | null
4935
+ value: Array<PortableTextBlock> | undefined
4936
+ }
4937
+ | {
4938
+ type: 'error'
4939
+ name: string
4940
+ description: string
4941
+ data: unknown
4942
+ }
4943
+ | {
4944
+ type: 'selection'
4945
+ selection: EditorSelection
4946
+ }
4947
+ | {
4948
+ type: 'blur'
4949
+ event: FocusEvent_2<HTMLDivElement, Element>
4950
+ }
4951
+ | {
4952
+ type: 'focus'
4953
+ event: FocusEvent_2<HTMLDivElement, Element>
4954
+ }
4955
+ | {
4956
+ type: 'online'
4957
+ }
4958
+ | {
4959
+ type: 'offline'
4960
+ }
4961
+ | {
4962
+ type: 'loading'
4963
+ }
4964
+ | {
4965
+ type: 'done loading'
4966
+ },
4967
+ undefined,
4968
+ never,
4969
+ never,
4970
+ never,
4971
+ never,
4972
+ | PatchEvent
4973
+ | MutationEvent_2
4974
+ | {
4975
+ type: 'ready'
4976
+ }
4977
+ | PatchesEvent
4978
+ | {
4979
+ type: 'unset'
4980
+ previousValue: Array<PortableTextBlock>
4981
+ }
4982
+ | {
4983
+ type: 'value changed'
4984
+ value: Array<PortableTextBlock> | undefined
4985
+ }
4986
+ | {
4987
+ type: 'invalid value'
4988
+ resolution: InvalidValueResolution | null
4989
+ value: Array<PortableTextBlock> | undefined
4990
+ }
4991
+ | {
4992
+ type: 'error'
4993
+ name: string
4994
+ description: string
4995
+ data: unknown
4996
+ }
4997
+ | {
4998
+ type: 'selection'
4999
+ selection: EditorSelection
5000
+ }
5001
+ | {
5002
+ type: 'blur'
5003
+ event: FocusEvent_2<HTMLDivElement, Element>
5004
+ }
5005
+ | {
5006
+ type: 'focus'
5007
+ event: FocusEvent_2<HTMLDivElement, Element>
5008
+ }
5009
+ | {
5010
+ type: 'online'
5011
+ }
5012
+ | {
5013
+ type: 'offline'
5014
+ }
5015
+ | {
5016
+ type: 'loading'
5017
+ }
5018
+ | {
5019
+ type: 'done loading'
5020
+ }
5021
+ >
5022
+ }
5023
+ readonly 'focus': {
5024
+ readonly actions: ActionFunction<
5025
+ {
5026
+ behaviors: Array<Behavior>
5027
+ keyGenerator: () => string
5028
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5029
+ schema: PortableTextMemberSchemaTypes
5030
+ },
5031
+ {
5032
+ type: 'focus'
5033
+ event: FocusEvent_2<HTMLDivElement, Element>
5034
+ },
5035
+ | PatchEvent
5036
+ | MutationEvent_2
5037
+ | {
5038
+ type: 'normalizing'
5039
+ }
5040
+ | {
5041
+ type: 'done normalizing'
5042
+ }
5043
+ | {
5044
+ type: 'behavior event'
5045
+ behaviorEvent: BehaviorEvent
5046
+ editor: PortableTextSlateEditor
5047
+ }
5048
+ | {
5049
+ type: 'behavior action intends'
5050
+ editor: PortableTextSlateEditor
5051
+ actionIntends: Array<BehaviorActionIntend>
5052
+ }
5053
+ | {
5054
+ type: 'update schema'
5055
+ schema: PortableTextMemberSchemaTypes
5056
+ }
5057
+ | {
5058
+ type: 'update behaviors'
5059
+ behaviors: Array<Behavior>
5060
+ }
5061
+ | {
5062
+ type: 'ready'
5063
+ }
5064
+ | PatchesEvent
5065
+ | {
5066
+ type: 'unset'
5067
+ previousValue: Array<PortableTextBlock>
5068
+ }
5069
+ | {
5070
+ type: 'value changed'
5071
+ value: Array<PortableTextBlock> | undefined
5072
+ }
5073
+ | {
5074
+ type: 'invalid value'
5075
+ resolution: InvalidValueResolution | null
5076
+ value: Array<PortableTextBlock> | undefined
5077
+ }
5078
+ | {
5079
+ type: 'error'
5080
+ name: string
5081
+ description: string
5082
+ data: unknown
5083
+ }
5084
+ | {
5085
+ type: 'selection'
5086
+ selection: EditorSelection
5087
+ }
5088
+ | {
5089
+ type: 'blur'
5090
+ event: FocusEvent_2<HTMLDivElement, Element>
5091
+ }
5092
+ | {
5093
+ type: 'focus'
5094
+ event: FocusEvent_2<HTMLDivElement, Element>
5095
+ }
5096
+ | {
5097
+ type: 'online'
5098
+ }
5099
+ | {
5100
+ type: 'offline'
5101
+ }
5102
+ | {
5103
+ type: 'loading'
5104
+ }
5105
+ | {
5106
+ type: 'done loading'
5107
+ },
5108
+ undefined,
5109
+ never,
5110
+ never,
5111
+ never,
5112
+ never,
5113
+ | PatchEvent
5114
+ | MutationEvent_2
5115
+ | {
5116
+ type: 'ready'
5117
+ }
5118
+ | PatchesEvent
5119
+ | {
5120
+ type: 'unset'
5121
+ previousValue: Array<PortableTextBlock>
5122
+ }
5123
+ | {
5124
+ type: 'value changed'
5125
+ value: Array<PortableTextBlock> | undefined
5126
+ }
5127
+ | {
5128
+ type: 'invalid value'
5129
+ resolution: InvalidValueResolution | null
5130
+ value: Array<PortableTextBlock> | undefined
5131
+ }
5132
+ | {
5133
+ type: 'error'
5134
+ name: string
5135
+ description: string
5136
+ data: unknown
5137
+ }
5138
+ | {
5139
+ type: 'selection'
5140
+ selection: EditorSelection
5141
+ }
5142
+ | {
5143
+ type: 'blur'
5144
+ event: FocusEvent_2<HTMLDivElement, Element>
5145
+ }
5146
+ | {
5147
+ type: 'focus'
5148
+ event: FocusEvent_2<HTMLDivElement, Element>
5149
+ }
5150
+ | {
5151
+ type: 'online'
5152
+ }
5153
+ | {
5154
+ type: 'offline'
5155
+ }
5156
+ | {
5157
+ type: 'loading'
5158
+ }
5159
+ | {
5160
+ type: 'done loading'
5161
+ }
5162
+ >
5163
+ }
5164
+ readonly 'online': {
5165
+ readonly actions: ActionFunction<
5166
+ {
5167
+ behaviors: Array<Behavior>
5168
+ keyGenerator: () => string
5169
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5170
+ schema: PortableTextMemberSchemaTypes
5171
+ },
5172
+ {
5173
+ type: 'online'
5174
+ },
5175
+ | PatchEvent
5176
+ | MutationEvent_2
5177
+ | {
5178
+ type: 'normalizing'
5179
+ }
5180
+ | {
5181
+ type: 'done normalizing'
5182
+ }
5183
+ | {
5184
+ type: 'behavior event'
5185
+ behaviorEvent: BehaviorEvent
5186
+ editor: PortableTextSlateEditor
5187
+ }
5188
+ | {
5189
+ type: 'behavior action intends'
5190
+ editor: PortableTextSlateEditor
5191
+ actionIntends: Array<BehaviorActionIntend>
5192
+ }
5193
+ | {
5194
+ type: 'update schema'
5195
+ schema: PortableTextMemberSchemaTypes
5196
+ }
5197
+ | {
5198
+ type: 'update behaviors'
5199
+ behaviors: Array<Behavior>
5200
+ }
5201
+ | {
5202
+ type: 'ready'
5203
+ }
5204
+ | PatchesEvent
5205
+ | {
5206
+ type: 'unset'
5207
+ previousValue: Array<PortableTextBlock>
5208
+ }
5209
+ | {
5210
+ type: 'value changed'
5211
+ value: Array<PortableTextBlock> | undefined
5212
+ }
5213
+ | {
5214
+ type: 'invalid value'
5215
+ resolution: InvalidValueResolution | null
5216
+ value: Array<PortableTextBlock> | undefined
5217
+ }
5218
+ | {
5219
+ type: 'error'
5220
+ name: string
5221
+ description: string
5222
+ data: unknown
5223
+ }
5224
+ | {
5225
+ type: 'selection'
5226
+ selection: EditorSelection
5227
+ }
5228
+ | {
5229
+ type: 'blur'
5230
+ event: FocusEvent_2<HTMLDivElement, Element>
5231
+ }
5232
+ | {
5233
+ type: 'focus'
5234
+ event: FocusEvent_2<HTMLDivElement, Element>
5235
+ }
5236
+ | {
5237
+ type: 'online'
5238
+ }
5239
+ | {
5240
+ type: 'offline'
5241
+ }
5242
+ | {
5243
+ type: 'loading'
5244
+ }
5245
+ | {
5246
+ type: 'done loading'
5247
+ },
5248
+ undefined,
5249
+ never,
5250
+ never,
5251
+ never,
5252
+ never,
5253
+ | PatchEvent
5254
+ | MutationEvent_2
5255
+ | {
5256
+ type: 'ready'
5257
+ }
5258
+ | PatchesEvent
5259
+ | {
5260
+ type: 'unset'
5261
+ previousValue: Array<PortableTextBlock>
5262
+ }
5263
+ | {
5264
+ type: 'value changed'
5265
+ value: Array<PortableTextBlock> | undefined
5266
+ }
5267
+ | {
5268
+ type: 'invalid value'
5269
+ resolution: InvalidValueResolution | null
5270
+ value: Array<PortableTextBlock> | undefined
5271
+ }
5272
+ | {
5273
+ type: 'error'
5274
+ name: string
5275
+ description: string
5276
+ data: unknown
5277
+ }
5278
+ | {
5279
+ type: 'selection'
5280
+ selection: EditorSelection
5281
+ }
5282
+ | {
5283
+ type: 'blur'
5284
+ event: FocusEvent_2<HTMLDivElement, Element>
5285
+ }
5286
+ | {
5287
+ type: 'focus'
5288
+ event: FocusEvent_2<HTMLDivElement, Element>
5289
+ }
5290
+ | {
5291
+ type: 'online'
5292
+ }
5293
+ | {
5294
+ type: 'offline'
5295
+ }
5296
+ | {
5297
+ type: 'loading'
5298
+ }
5299
+ | {
5300
+ type: 'done loading'
5301
+ }
5302
+ >
5303
+ }
5304
+ readonly 'offline': {
5305
+ readonly actions: ActionFunction<
5306
+ {
5307
+ behaviors: Array<Behavior>
5308
+ keyGenerator: () => string
5309
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5310
+ schema: PortableTextMemberSchemaTypes
5311
+ },
5312
+ {
5313
+ type: 'offline'
5314
+ },
5315
+ | PatchEvent
5316
+ | MutationEvent_2
5317
+ | {
5318
+ type: 'normalizing'
5319
+ }
5320
+ | {
5321
+ type: 'done normalizing'
5322
+ }
5323
+ | {
5324
+ type: 'behavior event'
5325
+ behaviorEvent: BehaviorEvent
5326
+ editor: PortableTextSlateEditor
5327
+ }
5328
+ | {
5329
+ type: 'behavior action intends'
5330
+ editor: PortableTextSlateEditor
5331
+ actionIntends: Array<BehaviorActionIntend>
5332
+ }
5333
+ | {
5334
+ type: 'update schema'
5335
+ schema: PortableTextMemberSchemaTypes
5336
+ }
5337
+ | {
5338
+ type: 'update behaviors'
5339
+ behaviors: Array<Behavior>
5340
+ }
5341
+ | {
5342
+ type: 'ready'
5343
+ }
5344
+ | PatchesEvent
5345
+ | {
5346
+ type: 'unset'
5347
+ previousValue: Array<PortableTextBlock>
5348
+ }
5349
+ | {
5350
+ type: 'value changed'
5351
+ value: Array<PortableTextBlock> | undefined
5352
+ }
5353
+ | {
5354
+ type: 'invalid value'
5355
+ resolution: InvalidValueResolution | null
5356
+ value: Array<PortableTextBlock> | undefined
5357
+ }
5358
+ | {
5359
+ type: 'error'
5360
+ name: string
5361
+ description: string
5362
+ data: unknown
5363
+ }
5364
+ | {
5365
+ type: 'selection'
5366
+ selection: EditorSelection
5367
+ }
5368
+ | {
5369
+ type: 'blur'
5370
+ event: FocusEvent_2<HTMLDivElement, Element>
5371
+ }
5372
+ | {
5373
+ type: 'focus'
5374
+ event: FocusEvent_2<HTMLDivElement, Element>
5375
+ }
5376
+ | {
5377
+ type: 'online'
5378
+ }
5379
+ | {
5380
+ type: 'offline'
5381
+ }
5382
+ | {
5383
+ type: 'loading'
5384
+ }
5385
+ | {
5386
+ type: 'done loading'
5387
+ },
5388
+ undefined,
5389
+ never,
5390
+ never,
5391
+ never,
5392
+ never,
5393
+ | PatchEvent
5394
+ | MutationEvent_2
5395
+ | {
5396
+ type: 'ready'
5397
+ }
5398
+ | PatchesEvent
5399
+ | {
5400
+ type: 'unset'
5401
+ previousValue: Array<PortableTextBlock>
5402
+ }
5403
+ | {
5404
+ type: 'value changed'
5405
+ value: Array<PortableTextBlock> | undefined
5406
+ }
5407
+ | {
5408
+ type: 'invalid value'
5409
+ resolution: InvalidValueResolution | null
5410
+ value: Array<PortableTextBlock> | undefined
5411
+ }
5412
+ | {
5413
+ type: 'error'
5414
+ name: string
5415
+ description: string
5416
+ data: unknown
5417
+ }
5418
+ | {
5419
+ type: 'selection'
5420
+ selection: EditorSelection
5421
+ }
5422
+ | {
5423
+ type: 'blur'
5424
+ event: FocusEvent_2<HTMLDivElement, Element>
5425
+ }
5426
+ | {
5427
+ type: 'focus'
5428
+ event: FocusEvent_2<HTMLDivElement, Element>
5429
+ }
5430
+ | {
5431
+ type: 'online'
5432
+ }
5433
+ | {
5434
+ type: 'offline'
5435
+ }
5436
+ | {
5437
+ type: 'loading'
5438
+ }
5439
+ | {
5440
+ type: 'done loading'
5441
+ }
5442
+ >
5443
+ }
5444
+ readonly 'loading': {
5445
+ readonly actions: ActionFunction<
5446
+ {
5447
+ behaviors: Array<Behavior>
5448
+ keyGenerator: () => string
5449
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5450
+ schema: PortableTextMemberSchemaTypes
5451
+ },
5452
+ {
5453
+ type: 'loading'
5454
+ },
5455
+ | PatchEvent
5456
+ | MutationEvent_2
5457
+ | {
5458
+ type: 'normalizing'
5459
+ }
5460
+ | {
5461
+ type: 'done normalizing'
5462
+ }
5463
+ | {
5464
+ type: 'behavior event'
5465
+ behaviorEvent: BehaviorEvent
5466
+ editor: PortableTextSlateEditor
5467
+ }
5468
+ | {
5469
+ type: 'behavior action intends'
5470
+ editor: PortableTextSlateEditor
5471
+ actionIntends: Array<BehaviorActionIntend>
5472
+ }
5473
+ | {
5474
+ type: 'update schema'
5475
+ schema: PortableTextMemberSchemaTypes
5476
+ }
5477
+ | {
5478
+ type: 'update behaviors'
5479
+ behaviors: Array<Behavior>
5480
+ }
5481
+ | {
5482
+ type: 'ready'
5483
+ }
5484
+ | PatchesEvent
5485
+ | {
5486
+ type: 'unset'
5487
+ previousValue: Array<PortableTextBlock>
5488
+ }
5489
+ | {
5490
+ type: 'value changed'
5491
+ value: Array<PortableTextBlock> | undefined
5492
+ }
5493
+ | {
5494
+ type: 'invalid value'
5495
+ resolution: InvalidValueResolution | null
5496
+ value: Array<PortableTextBlock> | undefined
5497
+ }
5498
+ | {
5499
+ type: 'error'
5500
+ name: string
5501
+ description: string
5502
+ data: unknown
5503
+ }
5504
+ | {
5505
+ type: 'selection'
5506
+ selection: EditorSelection
5507
+ }
5508
+ | {
5509
+ type: 'blur'
5510
+ event: FocusEvent_2<HTMLDivElement, Element>
5511
+ }
5512
+ | {
5513
+ type: 'focus'
5514
+ event: FocusEvent_2<HTMLDivElement, Element>
5515
+ }
5516
+ | {
5517
+ type: 'online'
5518
+ }
5519
+ | {
5520
+ type: 'offline'
5521
+ }
5522
+ | {
5523
+ type: 'loading'
5524
+ }
5525
+ | {
5526
+ type: 'done loading'
5527
+ },
5528
+ undefined,
5529
+ never,
5530
+ never,
5531
+ never,
5532
+ never,
5533
+ | PatchEvent
5534
+ | MutationEvent_2
5535
+ | {
5536
+ type: 'ready'
5537
+ }
5538
+ | PatchesEvent
5539
+ | {
5540
+ type: 'unset'
5541
+ previousValue: Array<PortableTextBlock>
5542
+ }
5543
+ | {
5544
+ type: 'value changed'
5545
+ value: Array<PortableTextBlock> | undefined
5546
+ }
5547
+ | {
5548
+ type: 'invalid value'
5549
+ resolution: InvalidValueResolution | null
5550
+ value: Array<PortableTextBlock> | undefined
5551
+ }
5552
+ | {
5553
+ type: 'error'
5554
+ name: string
5555
+ description: string
5556
+ data: unknown
5557
+ }
5558
+ | {
5559
+ type: 'selection'
5560
+ selection: EditorSelection
5561
+ }
5562
+ | {
5563
+ type: 'blur'
5564
+ event: FocusEvent_2<HTMLDivElement, Element>
5565
+ }
5566
+ | {
5567
+ type: 'focus'
5568
+ event: FocusEvent_2<HTMLDivElement, Element>
5569
+ }
5570
+ | {
5571
+ type: 'online'
5572
+ }
5573
+ | {
5574
+ type: 'offline'
5575
+ }
5576
+ | {
5577
+ type: 'loading'
5578
+ }
5579
+ | {
5580
+ type: 'done loading'
5581
+ }
5582
+ >
5583
+ }
5584
+ readonly 'patches': {
5585
+ readonly actions: ActionFunction<
5586
+ {
5587
+ behaviors: Array<Behavior>
5588
+ keyGenerator: () => string
5589
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5590
+ schema: PortableTextMemberSchemaTypes
5591
+ },
5592
+ PatchesEvent,
5593
+ | PatchEvent
5594
+ | MutationEvent_2
5595
+ | {
5596
+ type: 'normalizing'
5597
+ }
5598
+ | {
5599
+ type: 'done normalizing'
5600
+ }
5601
+ | {
5602
+ type: 'behavior event'
5603
+ behaviorEvent: BehaviorEvent
5604
+ editor: PortableTextSlateEditor
5605
+ }
5606
+ | {
5607
+ type: 'behavior action intends'
5608
+ editor: PortableTextSlateEditor
5609
+ actionIntends: Array<BehaviorActionIntend>
5610
+ }
5611
+ | {
5612
+ type: 'update schema'
5613
+ schema: PortableTextMemberSchemaTypes
5614
+ }
5615
+ | {
5616
+ type: 'update behaviors'
5617
+ behaviors: Array<Behavior>
5618
+ }
5619
+ | {
5620
+ type: 'ready'
5621
+ }
5622
+ | PatchesEvent
5623
+ | {
5624
+ type: 'unset'
5625
+ previousValue: Array<PortableTextBlock>
5626
+ }
5627
+ | {
5628
+ type: 'value changed'
5629
+ value: Array<PortableTextBlock> | undefined
5630
+ }
5631
+ | {
5632
+ type: 'invalid value'
5633
+ resolution: InvalidValueResolution | null
5634
+ value: Array<PortableTextBlock> | undefined
5635
+ }
5636
+ | {
5637
+ type: 'error'
5638
+ name: string
5639
+ description: string
5640
+ data: unknown
5641
+ }
5642
+ | {
5643
+ type: 'selection'
5644
+ selection: EditorSelection
5645
+ }
5646
+ | {
5647
+ type: 'blur'
5648
+ event: FocusEvent_2<HTMLDivElement, Element>
5649
+ }
5650
+ | {
5651
+ type: 'focus'
5652
+ event: FocusEvent_2<HTMLDivElement, Element>
5653
+ }
5654
+ | {
5655
+ type: 'online'
5656
+ }
5657
+ | {
5658
+ type: 'offline'
5659
+ }
5660
+ | {
5661
+ type: 'loading'
5662
+ }
5663
+ | {
5664
+ type: 'done loading'
5665
+ },
5666
+ undefined,
5667
+ never,
5668
+ never,
5669
+ never,
5670
+ never,
5671
+ | PatchEvent
5672
+ | MutationEvent_2
5673
+ | {
5674
+ type: 'ready'
5675
+ }
5676
+ | PatchesEvent
5677
+ | {
5678
+ type: 'unset'
5679
+ previousValue: Array<PortableTextBlock>
5680
+ }
5681
+ | {
5682
+ type: 'value changed'
5683
+ value: Array<PortableTextBlock> | undefined
5684
+ }
5685
+ | {
5686
+ type: 'invalid value'
5687
+ resolution: InvalidValueResolution | null
5688
+ value: Array<PortableTextBlock> | undefined
5689
+ }
5690
+ | {
5691
+ type: 'error'
5692
+ name: string
5693
+ description: string
5694
+ data: unknown
5695
+ }
5696
+ | {
5697
+ type: 'selection'
5698
+ selection: EditorSelection
5699
+ }
5700
+ | {
5701
+ type: 'blur'
5702
+ event: FocusEvent_2<HTMLDivElement, Element>
5703
+ }
5704
+ | {
5705
+ type: 'focus'
5706
+ event: FocusEvent_2<HTMLDivElement, Element>
5707
+ }
5708
+ | {
5709
+ type: 'online'
5710
+ }
5711
+ | {
5712
+ type: 'offline'
5713
+ }
5714
+ | {
5715
+ type: 'loading'
5716
+ }
5717
+ | {
5718
+ type: 'done loading'
5719
+ }
5720
+ >
5721
+ }
5722
+ readonly 'done loading': {
5723
+ readonly actions: ActionFunction<
5724
+ {
5725
+ behaviors: Array<Behavior>
5726
+ keyGenerator: () => string
5727
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5728
+ schema: PortableTextMemberSchemaTypes
5729
+ },
5730
+ {
5731
+ type: 'done loading'
5732
+ },
5733
+ | PatchEvent
5734
+ | MutationEvent_2
5735
+ | {
5736
+ type: 'normalizing'
5737
+ }
5738
+ | {
5739
+ type: 'done normalizing'
5740
+ }
5741
+ | {
5742
+ type: 'behavior event'
5743
+ behaviorEvent: BehaviorEvent
5744
+ editor: PortableTextSlateEditor
5745
+ }
5746
+ | {
5747
+ type: 'behavior action intends'
5748
+ editor: PortableTextSlateEditor
5749
+ actionIntends: Array<BehaviorActionIntend>
5750
+ }
5751
+ | {
5752
+ type: 'update schema'
5753
+ schema: PortableTextMemberSchemaTypes
5754
+ }
5755
+ | {
5756
+ type: 'update behaviors'
5757
+ behaviors: Array<Behavior>
5758
+ }
5759
+ | {
5760
+ type: 'ready'
5761
+ }
5762
+ | PatchesEvent
5763
+ | {
5764
+ type: 'unset'
5765
+ previousValue: Array<PortableTextBlock>
5766
+ }
5767
+ | {
5768
+ type: 'value changed'
5769
+ value: Array<PortableTextBlock> | undefined
5770
+ }
5771
+ | {
5772
+ type: 'invalid value'
5773
+ resolution: InvalidValueResolution | null
5774
+ value: Array<PortableTextBlock> | undefined
5775
+ }
5776
+ | {
5777
+ type: 'error'
5778
+ name: string
5779
+ description: string
5780
+ data: unknown
5781
+ }
5782
+ | {
5783
+ type: 'selection'
5784
+ selection: EditorSelection
5785
+ }
5786
+ | {
5787
+ type: 'blur'
5788
+ event: FocusEvent_2<HTMLDivElement, Element>
5789
+ }
5790
+ | {
5791
+ type: 'focus'
5792
+ event: FocusEvent_2<HTMLDivElement, Element>
5793
+ }
5794
+ | {
5795
+ type: 'online'
5796
+ }
5797
+ | {
5798
+ type: 'offline'
5799
+ }
5800
+ | {
5801
+ type: 'loading'
5802
+ }
5803
+ | {
5804
+ type: 'done loading'
5805
+ },
5806
+ undefined,
5807
+ never,
5808
+ never,
5809
+ never,
5810
+ never,
5811
+ | PatchEvent
5812
+ | MutationEvent_2
5813
+ | {
5814
+ type: 'ready'
5815
+ }
5816
+ | PatchesEvent
5817
+ | {
5818
+ type: 'unset'
5819
+ previousValue: Array<PortableTextBlock>
5820
+ }
5821
+ | {
5822
+ type: 'value changed'
5823
+ value: Array<PortableTextBlock> | undefined
5824
+ }
5825
+ | {
5826
+ type: 'invalid value'
5827
+ resolution: InvalidValueResolution | null
5828
+ value: Array<PortableTextBlock> | undefined
5829
+ }
5830
+ | {
5831
+ type: 'error'
5832
+ name: string
5833
+ description: string
5834
+ data: unknown
5835
+ }
5836
+ | {
5837
+ type: 'selection'
5838
+ selection: EditorSelection
5839
+ }
5840
+ | {
5841
+ type: 'blur'
5842
+ event: FocusEvent_2<HTMLDivElement, Element>
5843
+ }
5844
+ | {
5845
+ type: 'focus'
5846
+ event: FocusEvent_2<HTMLDivElement, Element>
5847
+ }
5848
+ | {
5849
+ type: 'online'
5850
+ }
5851
+ | {
5852
+ type: 'offline'
5853
+ }
5854
+ | {
5855
+ type: 'loading'
5856
+ }
5857
+ | {
5858
+ type: 'done loading'
5859
+ }
5860
+ >
5861
+ }
5862
+ readonly 'update behaviors': {
5863
+ readonly actions: 'assign behaviors'
5864
+ }
5865
+ readonly 'update schema': {
5866
+ readonly actions: 'assign schema'
5867
+ }
5868
+ readonly 'behavior event': {
5869
+ readonly actions: 'handle behavior event'
5870
+ }
5871
+ readonly 'behavior action intends': {
5872
+ readonly actions: readonly [
5873
+ ({
5874
+ context,
5875
+ event,
5876
+ }: ActionArgs<
5877
+ {
5878
+ behaviors: Array<Behavior>
5879
+ keyGenerator: () => string
5880
+ pendingEvents: Array<PatchEvent | MutationEvent_2>
5881
+ schema: PortableTextMemberSchemaTypes
5882
+ },
5883
+ {
5884
+ type: 'behavior action intends'
5885
+ editor: PortableTextSlateEditor
5886
+ actionIntends: Array<BehaviorActionIntend>
5887
+ },
5888
+ | PatchEvent
5889
+ | MutationEvent_2
5890
+ | {
5891
+ type: 'normalizing'
5892
+ }
5893
+ | {
5894
+ type: 'done normalizing'
5895
+ }
5896
+ | {
5897
+ type: 'behavior event'
5898
+ behaviorEvent: BehaviorEvent
5899
+ editor: PortableTextSlateEditor
5900
+ }
5901
+ | {
5902
+ type: 'behavior action intends'
5903
+ editor: PortableTextSlateEditor
5904
+ actionIntends: Array<BehaviorActionIntend>
5905
+ }
5906
+ | {
5907
+ type: 'update schema'
5908
+ schema: PortableTextMemberSchemaTypes
5909
+ }
5910
+ | {
5911
+ type: 'update behaviors'
5912
+ behaviors: Array<Behavior>
5913
+ }
5914
+ | {
5915
+ type: 'ready'
5916
+ }
5917
+ | PatchesEvent
5918
+ | {
5919
+ type: 'unset'
5920
+ previousValue: Array<PortableTextBlock>
5921
+ }
5922
+ | {
5923
+ type: 'value changed'
5924
+ value: Array<PortableTextBlock> | undefined
5925
+ }
5926
+ | {
5927
+ type: 'invalid value'
5928
+ resolution: InvalidValueResolution | null
5929
+ value: Array<PortableTextBlock> | undefined
5930
+ }
5931
+ | {
5932
+ type: 'error'
5933
+ name: string
5934
+ description: string
5935
+ data: unknown
5936
+ }
5937
+ | {
5938
+ type: 'selection'
5939
+ selection: EditorSelection
5940
+ }
5941
+ | {
5942
+ type: 'blur'
5943
+ event: FocusEvent_2<HTMLDivElement, Element>
5944
+ }
5945
+ | {
5946
+ type: 'focus'
5947
+ event: FocusEvent_2<HTMLDivElement, Element>
5948
+ }
5949
+ | {
5950
+ type: 'online'
5951
+ }
5952
+ | {
5953
+ type: 'offline'
5954
+ }
5955
+ | {
5956
+ type: 'loading'
5957
+ }
5958
+ | {
5959
+ type: 'done loading'
5960
+ }
5961
+ >) => void,
5962
+ ]
5963
+ }
5964
+ }
5965
+ readonly initial: 'pristine'
5966
+ readonly states: {
5967
+ readonly pristine: {
5968
+ readonly initial: 'idle'
5969
+ readonly states: {
5970
+ readonly idle: {
5971
+ readonly on: {
5972
+ readonly normalizing: {
5973
+ readonly target: 'normalizing'
5974
+ }
5975
+ readonly patch: {
5976
+ readonly actions: 'defer event'
5977
+ readonly target: '#editor.dirty'
5978
+ }
5979
+ readonly mutation: {
5980
+ readonly actions: 'defer event'
5981
+ readonly target: '#editor.dirty'
5982
+ }
5983
+ }
5984
+ }
5985
+ readonly normalizing: {
5986
+ readonly on: {
5987
+ readonly 'done normalizing': {
5988
+ readonly target: 'idle'
5989
+ }
5990
+ readonly 'patch': {
5991
+ readonly actions: 'defer event'
5992
+ }
5993
+ readonly 'mutation': {
5994
+ readonly actions: 'defer event'
5995
+ }
5996
+ }
5997
+ }
5998
+ }
5999
+ }
6000
+ readonly dirty: {
6001
+ readonly entry: readonly [
6002
+ 'emit pending events',
6003
+ 'clear pending events',
6004
+ ]
6005
+ readonly on: {
6006
+ readonly patch: {
6007
+ readonly actions: 'emit patch event'
6008
+ }
6009
+ readonly mutation: {
6010
+ readonly actions: 'emit mutation event'
6011
+ }
6012
+ }
6013
+ }
6014
+ }
6015
+ }
6016
+ >
6017
+ >
6018
+
3258
6019
  /**
3259
6020
  * @public
3260
6021
  * Get the current editor object from the React context.