@portabletext/editor 1.49.7 → 1.49.8
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/behaviors/index.d.cts +24 -272
- package/lib/behaviors/index.d.ts +24 -272
- package/lib/index.cjs +3049 -3097
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +31 -277
- package/lib/index.d.ts +31 -277
- package/lib/index.js +3127 -3175
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.cts +31 -277
- package/lib/plugins/index.d.ts +31 -277
- package/lib/selectors/index.d.cts +24 -272
- package/lib/selectors/index.d.ts +24 -272
- package/lib/utils/index.d.cts +24 -272
- package/lib/utils/index.d.ts +24 -272
- package/package.json +1 -1
- package/src/editor/PortableTextEditor.tsx +12 -101
- package/src/editor/create-editor.ts +132 -2
- package/src/editor/editor-machine.ts +2 -9
- package/src/editor/editor-provider.tsx +1 -6
- package/src/editor/route-events-to-changes.tsx +81 -0
- package/src/editor/sync-machine.ts +31 -0
- package/src/editor.ts +7 -1
- package/src/internal-utils/text-selection.ts +3 -1
- package/src/editor/__tests__/pteWarningsSelfSolving.test.tsx +0 -364
- package/src/editor/components/Synchronizer.tsx +0 -134
package/lib/utils/index.d.ts
CHANGED
|
@@ -659,7 +659,7 @@ declare const editorMachine: StateMachine<
|
|
|
659
659
|
initialReadOnly: boolean
|
|
660
660
|
maxBlocks: number | undefined
|
|
661
661
|
selection: EditorSelection
|
|
662
|
-
|
|
662
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
663
663
|
internalDrag?: {
|
|
664
664
|
ghost?: HTMLElement
|
|
665
665
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -681,10 +681,6 @@ declare const editorMachine: StateMachine<
|
|
|
681
681
|
type: 'update key generator'
|
|
682
682
|
keyGenerator: () => string
|
|
683
683
|
}
|
|
684
|
-
| {
|
|
685
|
-
type: 'update value'
|
|
686
|
-
value: Array<PortableTextBlock> | undefined
|
|
687
|
-
}
|
|
688
684
|
| {
|
|
689
685
|
type: 'update maxBlocks'
|
|
690
686
|
maxBlocks: number | undefined
|
|
@@ -1003,7 +999,7 @@ declare const editorMachine: StateMachine<
|
|
|
1003
999
|
initialReadOnly: boolean
|
|
1004
1000
|
maxBlocks: number | undefined
|
|
1005
1001
|
selection: EditorSelection
|
|
1006
|
-
|
|
1002
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
1007
1003
|
internalDrag?: {
|
|
1008
1004
|
ghost?: HTMLElement
|
|
1009
1005
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -1025,10 +1021,6 @@ declare const editorMachine: StateMachine<
|
|
|
1025
1021
|
type: 'update key generator'
|
|
1026
1022
|
keyGenerator: () => string
|
|
1027
1023
|
}
|
|
1028
|
-
| {
|
|
1029
|
-
type: 'update value'
|
|
1030
|
-
value: Array<PortableTextBlock> | undefined
|
|
1031
|
-
}
|
|
1032
1024
|
| {
|
|
1033
1025
|
type: 'update maxBlocks'
|
|
1034
1026
|
maxBlocks: number | undefined
|
|
@@ -1158,10 +1150,6 @@ declare const editorMachine: StateMachine<
|
|
|
1158
1150
|
type: 'update key generator'
|
|
1159
1151
|
keyGenerator: () => string
|
|
1160
1152
|
}
|
|
1161
|
-
| {
|
|
1162
|
-
type: 'update value'
|
|
1163
|
-
value: Array<PortableTextBlock> | undefined
|
|
1164
|
-
}
|
|
1165
1153
|
| {
|
|
1166
1154
|
type: 'update maxBlocks'
|
|
1167
1155
|
maxBlocks: number | undefined
|
|
@@ -1282,7 +1270,7 @@ declare const editorMachine: StateMachine<
|
|
|
1282
1270
|
selection: null
|
|
1283
1271
|
initialReadOnly: boolean
|
|
1284
1272
|
maxBlocks: number | undefined
|
|
1285
|
-
|
|
1273
|
+
initialValue: PortableTextBlock[] | undefined
|
|
1286
1274
|
}
|
|
1287
1275
|
readonly on: {
|
|
1288
1276
|
readonly 'notify.blurred': {
|
|
@@ -1298,7 +1286,7 @@ declare const editorMachine: StateMachine<
|
|
|
1298
1286
|
initialReadOnly: boolean
|
|
1299
1287
|
maxBlocks: number | undefined
|
|
1300
1288
|
selection: EditorSelection
|
|
1301
|
-
|
|
1289
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
1302
1290
|
internalDrag?: {
|
|
1303
1291
|
ghost?: HTMLElement
|
|
1304
1292
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -1324,10 +1312,6 @@ declare const editorMachine: StateMachine<
|
|
|
1324
1312
|
type: 'update key generator'
|
|
1325
1313
|
keyGenerator: () => string
|
|
1326
1314
|
}
|
|
1327
|
-
| {
|
|
1328
|
-
type: 'update value'
|
|
1329
|
-
value: Array<PortableTextBlock> | undefined
|
|
1330
|
-
}
|
|
1331
1315
|
| {
|
|
1332
1316
|
type: 'update maxBlocks'
|
|
1333
1317
|
maxBlocks: number | undefined
|
|
@@ -1502,7 +1486,7 @@ declare const editorMachine: StateMachine<
|
|
|
1502
1486
|
initialReadOnly: boolean
|
|
1503
1487
|
maxBlocks: number | undefined
|
|
1504
1488
|
selection: EditorSelection
|
|
1505
|
-
|
|
1489
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
1506
1490
|
internalDrag?: {
|
|
1507
1491
|
ghost?: HTMLElement
|
|
1508
1492
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -1527,10 +1511,6 @@ declare const editorMachine: StateMachine<
|
|
|
1527
1511
|
type: 'update key generator'
|
|
1528
1512
|
keyGenerator: () => string
|
|
1529
1513
|
}
|
|
1530
|
-
| {
|
|
1531
|
-
type: 'update value'
|
|
1532
|
-
value: Array<PortableTextBlock> | undefined
|
|
1533
|
-
}
|
|
1534
1514
|
| {
|
|
1535
1515
|
type: 'update maxBlocks'
|
|
1536
1516
|
maxBlocks: number | undefined
|
|
@@ -1705,7 +1685,7 @@ declare const editorMachine: StateMachine<
|
|
|
1705
1685
|
initialReadOnly: boolean
|
|
1706
1686
|
maxBlocks: number | undefined
|
|
1707
1687
|
selection: EditorSelection
|
|
1708
|
-
|
|
1688
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
1709
1689
|
internalDrag?: {
|
|
1710
1690
|
ghost?: HTMLElement
|
|
1711
1691
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -1733,10 +1713,6 @@ declare const editorMachine: StateMachine<
|
|
|
1733
1713
|
type: 'update key generator'
|
|
1734
1714
|
keyGenerator: () => string
|
|
1735
1715
|
}
|
|
1736
|
-
| {
|
|
1737
|
-
type: 'update value'
|
|
1738
|
-
value: Array<PortableTextBlock> | undefined
|
|
1739
|
-
}
|
|
1740
1716
|
| {
|
|
1741
1717
|
type: 'update maxBlocks'
|
|
1742
1718
|
maxBlocks: number | undefined
|
|
@@ -1911,7 +1887,7 @@ declare const editorMachine: StateMachine<
|
|
|
1911
1887
|
initialReadOnly: boolean
|
|
1912
1888
|
maxBlocks: number | undefined
|
|
1913
1889
|
selection: EditorSelection
|
|
1914
|
-
|
|
1890
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
1915
1891
|
internalDrag?: {
|
|
1916
1892
|
ghost?: HTMLElement
|
|
1917
1893
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -1938,10 +1914,6 @@ declare const editorMachine: StateMachine<
|
|
|
1938
1914
|
type: 'update key generator'
|
|
1939
1915
|
keyGenerator: () => string
|
|
1940
1916
|
}
|
|
1941
|
-
| {
|
|
1942
|
-
type: 'update value'
|
|
1943
|
-
value: Array<PortableTextBlock> | undefined
|
|
1944
|
-
}
|
|
1945
1917
|
| {
|
|
1946
1918
|
type: 'update maxBlocks'
|
|
1947
1919
|
maxBlocks: number | undefined
|
|
@@ -2116,7 +2088,7 @@ declare const editorMachine: StateMachine<
|
|
|
2116
2088
|
initialReadOnly: boolean
|
|
2117
2089
|
maxBlocks: number | undefined
|
|
2118
2090
|
selection: EditorSelection
|
|
2119
|
-
|
|
2091
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
2120
2092
|
internalDrag?: {
|
|
2121
2093
|
ghost?: HTMLElement
|
|
2122
2094
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -2142,10 +2114,6 @@ declare const editorMachine: StateMachine<
|
|
|
2142
2114
|
type: 'update key generator'
|
|
2143
2115
|
keyGenerator: () => string
|
|
2144
2116
|
}
|
|
2145
|
-
| {
|
|
2146
|
-
type: 'update value'
|
|
2147
|
-
value: Array<PortableTextBlock> | undefined
|
|
2148
|
-
}
|
|
2149
2117
|
| {
|
|
2150
2118
|
type: 'update maxBlocks'
|
|
2151
2119
|
maxBlocks: number | undefined
|
|
@@ -2321,7 +2289,7 @@ declare const editorMachine: StateMachine<
|
|
|
2321
2289
|
initialReadOnly: boolean
|
|
2322
2290
|
maxBlocks: number | undefined
|
|
2323
2291
|
selection: EditorSelection
|
|
2324
|
-
|
|
2292
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
2325
2293
|
internalDrag?: {
|
|
2326
2294
|
ghost?: HTMLElement
|
|
2327
2295
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -2347,10 +2315,6 @@ declare const editorMachine: StateMachine<
|
|
|
2347
2315
|
type: 'update key generator'
|
|
2348
2316
|
keyGenerator: () => string
|
|
2349
2317
|
}
|
|
2350
|
-
| {
|
|
2351
|
-
type: 'update value'
|
|
2352
|
-
value: Array<PortableTextBlock> | undefined
|
|
2353
|
-
}
|
|
2354
2318
|
| {
|
|
2355
2319
|
type: 'update maxBlocks'
|
|
2356
2320
|
maxBlocks: number | undefined
|
|
@@ -2477,7 +2441,7 @@ declare const editorMachine: StateMachine<
|
|
|
2477
2441
|
initialReadOnly: boolean
|
|
2478
2442
|
maxBlocks: number | undefined
|
|
2479
2443
|
selection: EditorSelection
|
|
2480
|
-
|
|
2444
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
2481
2445
|
internalDrag?: {
|
|
2482
2446
|
ghost?: HTMLElement
|
|
2483
2447
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -2503,10 +2467,6 @@ declare const editorMachine: StateMachine<
|
|
|
2503
2467
|
type: 'update key generator'
|
|
2504
2468
|
keyGenerator: () => string
|
|
2505
2469
|
}
|
|
2506
|
-
| {
|
|
2507
|
-
type: 'update value'
|
|
2508
|
-
value: Array<PortableTextBlock> | undefined
|
|
2509
|
-
}
|
|
2510
2470
|
| {
|
|
2511
2471
|
type: 'update maxBlocks'
|
|
2512
2472
|
maxBlocks: number | undefined
|
|
@@ -2682,7 +2642,7 @@ declare const editorMachine: StateMachine<
|
|
|
2682
2642
|
initialReadOnly: boolean
|
|
2683
2643
|
maxBlocks: number | undefined
|
|
2684
2644
|
selection: EditorSelection
|
|
2685
|
-
|
|
2645
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
2686
2646
|
internalDrag?: {
|
|
2687
2647
|
ghost?: HTMLElement
|
|
2688
2648
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -2708,10 +2668,6 @@ declare const editorMachine: StateMachine<
|
|
|
2708
2668
|
type: 'update key generator'
|
|
2709
2669
|
keyGenerator: () => string
|
|
2710
2670
|
}
|
|
2711
|
-
| {
|
|
2712
|
-
type: 'update value'
|
|
2713
|
-
value: Array<PortableTextBlock> | undefined
|
|
2714
|
-
}
|
|
2715
2671
|
| {
|
|
2716
2672
|
type: 'update maxBlocks'
|
|
2717
2673
|
maxBlocks: number | undefined
|
|
@@ -2886,7 +2842,7 @@ declare const editorMachine: StateMachine<
|
|
|
2886
2842
|
initialReadOnly: boolean
|
|
2887
2843
|
maxBlocks: number | undefined
|
|
2888
2844
|
selection: EditorSelection
|
|
2889
|
-
|
|
2845
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
2890
2846
|
internalDrag?: {
|
|
2891
2847
|
ghost?: HTMLElement
|
|
2892
2848
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -2911,10 +2867,6 @@ declare const editorMachine: StateMachine<
|
|
|
2911
2867
|
type: 'update key generator'
|
|
2912
2868
|
keyGenerator: () => string
|
|
2913
2869
|
}
|
|
2914
|
-
| {
|
|
2915
|
-
type: 'update value'
|
|
2916
|
-
value: Array<PortableTextBlock> | undefined
|
|
2917
|
-
}
|
|
2918
2870
|
| {
|
|
2919
2871
|
type: 'update maxBlocks'
|
|
2920
2872
|
maxBlocks: number | undefined
|
|
@@ -3089,7 +3041,7 @@ declare const editorMachine: StateMachine<
|
|
|
3089
3041
|
initialReadOnly: boolean
|
|
3090
3042
|
maxBlocks: number | undefined
|
|
3091
3043
|
selection: EditorSelection
|
|
3092
|
-
|
|
3044
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3093
3045
|
internalDrag?: {
|
|
3094
3046
|
ghost?: HTMLElement
|
|
3095
3047
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3115,10 +3067,6 @@ declare const editorMachine: StateMachine<
|
|
|
3115
3067
|
type: 'update key generator'
|
|
3116
3068
|
keyGenerator: () => string
|
|
3117
3069
|
}
|
|
3118
|
-
| {
|
|
3119
|
-
type: 'update value'
|
|
3120
|
-
value: Array<PortableTextBlock> | undefined
|
|
3121
|
-
}
|
|
3122
3070
|
| {
|
|
3123
3071
|
type: 'update maxBlocks'
|
|
3124
3072
|
maxBlocks: number | undefined
|
|
@@ -3299,7 +3247,7 @@ declare const editorMachine: StateMachine<
|
|
|
3299
3247
|
initialReadOnly: boolean
|
|
3300
3248
|
maxBlocks: number | undefined
|
|
3301
3249
|
selection: EditorSelection
|
|
3302
|
-
|
|
3250
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3303
3251
|
internalDrag?: {
|
|
3304
3252
|
ghost?: HTMLElement
|
|
3305
3253
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3325,10 +3273,6 @@ declare const editorMachine: StateMachine<
|
|
|
3325
3273
|
type: 'update key generator'
|
|
3326
3274
|
keyGenerator: () => string
|
|
3327
3275
|
}
|
|
3328
|
-
| {
|
|
3329
|
-
type: 'update value'
|
|
3330
|
-
value: Array<PortableTextBlock> | undefined
|
|
3331
|
-
}
|
|
3332
3276
|
| {
|
|
3333
3277
|
type: 'update maxBlocks'
|
|
3334
3278
|
maxBlocks: number | undefined
|
|
@@ -3447,164 +3391,6 @@ declare const editorMachine: StateMachine<
|
|
|
3447
3391
|
readonly 'update schema': {
|
|
3448
3392
|
readonly actions: 'assign schema'
|
|
3449
3393
|
}
|
|
3450
|
-
readonly 'update value': {
|
|
3451
|
-
readonly actions: ActionFunction<
|
|
3452
|
-
{
|
|
3453
|
-
behaviors: Set<BehaviorConfig>
|
|
3454
|
-
converters: Set<Converter>
|
|
3455
|
-
getLegacySchema: () => PortableTextMemberSchemaTypes
|
|
3456
|
-
keyGenerator: () => string
|
|
3457
|
-
pendingEvents: Array<InternalPatchEvent | MutationEvent>
|
|
3458
|
-
pendingIncomingPatchesEvents: Array<PatchesEvent>
|
|
3459
|
-
schema: EditorSchema
|
|
3460
|
-
initialReadOnly: boolean
|
|
3461
|
-
maxBlocks: number | undefined
|
|
3462
|
-
selection: EditorSelection
|
|
3463
|
-
incomingValue: Array<PortableTextBlock> | undefined
|
|
3464
|
-
internalDrag?: {
|
|
3465
|
-
ghost?: HTMLElement
|
|
3466
|
-
origin: Pick<EventPosition, 'selection'>
|
|
3467
|
-
}
|
|
3468
|
-
slateEditor?: PortableTextSlateEditor
|
|
3469
|
-
},
|
|
3470
|
-
{
|
|
3471
|
-
type: 'update value'
|
|
3472
|
-
value: Array<PortableTextBlock> | undefined
|
|
3473
|
-
},
|
|
3474
|
-
| InternalPatchEvent
|
|
3475
|
-
| MutationEvent
|
|
3476
|
-
| PatchesEvent
|
|
3477
|
-
| {
|
|
3478
|
-
type: 'update readOnly'
|
|
3479
|
-
readOnly: boolean
|
|
3480
|
-
}
|
|
3481
|
-
| {
|
|
3482
|
-
type: 'update schema'
|
|
3483
|
-
schema: EditorSchema
|
|
3484
|
-
}
|
|
3485
|
-
| {
|
|
3486
|
-
type: 'update key generator'
|
|
3487
|
-
keyGenerator: () => string
|
|
3488
|
-
}
|
|
3489
|
-
| {
|
|
3490
|
-
type: 'update value'
|
|
3491
|
-
value: Array<PortableTextBlock> | undefined
|
|
3492
|
-
}
|
|
3493
|
-
| {
|
|
3494
|
-
type: 'update maxBlocks'
|
|
3495
|
-
maxBlocks: number | undefined
|
|
3496
|
-
}
|
|
3497
|
-
| {
|
|
3498
|
-
type: 'add behavior'
|
|
3499
|
-
behaviorConfig: BehaviorConfig
|
|
3500
|
-
}
|
|
3501
|
-
| {
|
|
3502
|
-
type: 'remove behavior'
|
|
3503
|
-
behaviorConfig: BehaviorConfig
|
|
3504
|
-
}
|
|
3505
|
-
| {
|
|
3506
|
-
type: 'blur'
|
|
3507
|
-
editor: PortableTextSlateEditor
|
|
3508
|
-
}
|
|
3509
|
-
| {
|
|
3510
|
-
type: 'focus'
|
|
3511
|
-
editor: PortableTextSlateEditor
|
|
3512
|
-
}
|
|
3513
|
-
| {
|
|
3514
|
-
type: 'normalizing'
|
|
3515
|
-
}
|
|
3516
|
-
| {
|
|
3517
|
-
type: 'done normalizing'
|
|
3518
|
-
}
|
|
3519
|
-
| {
|
|
3520
|
-
type: 'done syncing value'
|
|
3521
|
-
}
|
|
3522
|
-
| {
|
|
3523
|
-
type: 'syncing value'
|
|
3524
|
-
}
|
|
3525
|
-
| {
|
|
3526
|
-
type: 'behavior event'
|
|
3527
|
-
behaviorEvent: BehaviorEvent
|
|
3528
|
-
editor: PortableTextSlateEditor
|
|
3529
|
-
nativeEvent?: {
|
|
3530
|
-
preventDefault: () => void
|
|
3531
|
-
}
|
|
3532
|
-
}
|
|
3533
|
-
| {
|
|
3534
|
-
type: 'notify.patch'
|
|
3535
|
-
patch: Patch
|
|
3536
|
-
}
|
|
3537
|
-
| {
|
|
3538
|
-
type: 'notify.mutation'
|
|
3539
|
-
patches: Array<Patch>
|
|
3540
|
-
snapshot: Array<PortableTextBlock> | undefined
|
|
3541
|
-
value: Array<PortableTextBlock> | undefined
|
|
3542
|
-
}
|
|
3543
|
-
| {
|
|
3544
|
-
type: 'notify.blurred'
|
|
3545
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3546
|
-
}
|
|
3547
|
-
| {
|
|
3548
|
-
type: 'notify.done loading'
|
|
3549
|
-
}
|
|
3550
|
-
| {
|
|
3551
|
-
type: 'notify.editable'
|
|
3552
|
-
}
|
|
3553
|
-
| {
|
|
3554
|
-
type: 'notify.error'
|
|
3555
|
-
name: string
|
|
3556
|
-
description: string
|
|
3557
|
-
data: unknown
|
|
3558
|
-
}
|
|
3559
|
-
| {
|
|
3560
|
-
type: 'notify.focused'
|
|
3561
|
-
event: FocusEvent_2<HTMLDivElement, Element>
|
|
3562
|
-
}
|
|
3563
|
-
| {
|
|
3564
|
-
type: 'notify.invalid value'
|
|
3565
|
-
resolution: InvalidValueResolution | null
|
|
3566
|
-
value: Array<PortableTextBlock> | undefined
|
|
3567
|
-
}
|
|
3568
|
-
| {
|
|
3569
|
-
type: 'notify.loading'
|
|
3570
|
-
}
|
|
3571
|
-
| {
|
|
3572
|
-
type: 'notify.read only'
|
|
3573
|
-
}
|
|
3574
|
-
| {
|
|
3575
|
-
type: 'notify.ready'
|
|
3576
|
-
}
|
|
3577
|
-
| {
|
|
3578
|
-
type: 'notify.selection'
|
|
3579
|
-
selection: EditorSelection
|
|
3580
|
-
}
|
|
3581
|
-
| {
|
|
3582
|
-
type: 'notify.value changed'
|
|
3583
|
-
value: Array<PortableTextBlock> | undefined
|
|
3584
|
-
}
|
|
3585
|
-
| {
|
|
3586
|
-
type: 'notify.unset'
|
|
3587
|
-
previousValue: Array<PortableTextBlock>
|
|
3588
|
-
}
|
|
3589
|
-
| {
|
|
3590
|
-
type: 'dragstart'
|
|
3591
|
-
origin: Pick<EventPosition, 'selection'>
|
|
3592
|
-
ghost?: HTMLElement
|
|
3593
|
-
}
|
|
3594
|
-
| {
|
|
3595
|
-
type: 'dragend'
|
|
3596
|
-
}
|
|
3597
|
-
| {
|
|
3598
|
-
type: 'drop'
|
|
3599
|
-
},
|
|
3600
|
-
undefined,
|
|
3601
|
-
never,
|
|
3602
|
-
never,
|
|
3603
|
-
never,
|
|
3604
|
-
never,
|
|
3605
|
-
never
|
|
3606
|
-
>
|
|
3607
|
-
}
|
|
3608
3394
|
readonly 'update maxBlocks': {
|
|
3609
3395
|
readonly actions: ActionFunction<
|
|
3610
3396
|
{
|
|
@@ -3618,7 +3404,7 @@ declare const editorMachine: StateMachine<
|
|
|
3618
3404
|
initialReadOnly: boolean
|
|
3619
3405
|
maxBlocks: number | undefined
|
|
3620
3406
|
selection: EditorSelection
|
|
3621
|
-
|
|
3407
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3622
3408
|
internalDrag?: {
|
|
3623
3409
|
ghost?: HTMLElement
|
|
3624
3410
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3644,10 +3430,6 @@ declare const editorMachine: StateMachine<
|
|
|
3644
3430
|
type: 'update key generator'
|
|
3645
3431
|
keyGenerator: () => string
|
|
3646
3432
|
}
|
|
3647
|
-
| {
|
|
3648
|
-
type: 'update value'
|
|
3649
|
-
value: Array<PortableTextBlock> | undefined
|
|
3650
|
-
}
|
|
3651
3433
|
| {
|
|
3652
3434
|
type: 'update maxBlocks'
|
|
3653
3435
|
maxBlocks: number | undefined
|
|
@@ -3788,7 +3570,7 @@ declare const editorMachine: StateMachine<
|
|
|
3788
3570
|
initialReadOnly: boolean
|
|
3789
3571
|
maxBlocks: number | undefined
|
|
3790
3572
|
selection: EditorSelection
|
|
3791
|
-
|
|
3573
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3792
3574
|
internalDrag?: {
|
|
3793
3575
|
ghost?: HTMLElement
|
|
3794
3576
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3830,7 +3612,7 @@ declare const editorMachine: StateMachine<
|
|
|
3830
3612
|
initialReadOnly: boolean
|
|
3831
3613
|
maxBlocks: number | undefined
|
|
3832
3614
|
selection: EditorSelection
|
|
3833
|
-
|
|
3615
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3834
3616
|
internalDrag?: {
|
|
3835
3617
|
ghost?: HTMLElement
|
|
3836
3618
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3867,7 +3649,7 @@ declare const editorMachine: StateMachine<
|
|
|
3867
3649
|
initialReadOnly: boolean
|
|
3868
3650
|
maxBlocks: number | undefined
|
|
3869
3651
|
selection: EditorSelection
|
|
3870
|
-
|
|
3652
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3871
3653
|
internalDrag?: {
|
|
3872
3654
|
ghost?: HTMLElement
|
|
3873
3655
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3903,7 +3685,7 @@ declare const editorMachine: StateMachine<
|
|
|
3903
3685
|
initialReadOnly: boolean
|
|
3904
3686
|
maxBlocks: number | undefined
|
|
3905
3687
|
selection: EditorSelection
|
|
3906
|
-
|
|
3688
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3907
3689
|
internalDrag?: {
|
|
3908
3690
|
ghost?: HTMLElement
|
|
3909
3691
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3939,7 +3721,7 @@ declare const editorMachine: StateMachine<
|
|
|
3939
3721
|
initialReadOnly: boolean
|
|
3940
3722
|
maxBlocks: number | undefined
|
|
3941
3723
|
selection: EditorSelection
|
|
3942
|
-
|
|
3724
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
3943
3725
|
internalDrag?: {
|
|
3944
3726
|
ghost?: HTMLElement
|
|
3945
3727
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -3965,10 +3747,6 @@ declare const editorMachine: StateMachine<
|
|
|
3965
3747
|
type: 'update key generator'
|
|
3966
3748
|
keyGenerator: () => string
|
|
3967
3749
|
}
|
|
3968
|
-
| {
|
|
3969
|
-
type: 'update value'
|
|
3970
|
-
value: Array<PortableTextBlock> | undefined
|
|
3971
|
-
}
|
|
3972
3750
|
| {
|
|
3973
3751
|
type: 'update maxBlocks'
|
|
3974
3752
|
maxBlocks: number | undefined
|
|
@@ -4108,7 +3886,7 @@ declare const editorMachine: StateMachine<
|
|
|
4108
3886
|
initialReadOnly: boolean
|
|
4109
3887
|
maxBlocks: number | undefined
|
|
4110
3888
|
selection: EditorSelection
|
|
4111
|
-
|
|
3889
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
4112
3890
|
internalDrag?: {
|
|
4113
3891
|
ghost?: HTMLElement
|
|
4114
3892
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -4135,10 +3913,6 @@ declare const editorMachine: StateMachine<
|
|
|
4135
3913
|
type: 'update key generator'
|
|
4136
3914
|
keyGenerator: () => string
|
|
4137
3915
|
}
|
|
4138
|
-
| {
|
|
4139
|
-
type: 'update value'
|
|
4140
|
-
value: Array<PortableTextBlock> | undefined
|
|
4141
|
-
}
|
|
4142
3916
|
| {
|
|
4143
3917
|
type: 'update maxBlocks'
|
|
4144
3918
|
maxBlocks: number | undefined
|
|
@@ -4304,7 +4078,7 @@ declare const editorMachine: StateMachine<
|
|
|
4304
4078
|
initialReadOnly: boolean
|
|
4305
4079
|
maxBlocks: number | undefined
|
|
4306
4080
|
selection: EditorSelection
|
|
4307
|
-
|
|
4081
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
4308
4082
|
internalDrag?: {
|
|
4309
4083
|
ghost?: HTMLElement
|
|
4310
4084
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -4326,10 +4100,6 @@ declare const editorMachine: StateMachine<
|
|
|
4326
4100
|
type: 'update key generator'
|
|
4327
4101
|
keyGenerator: () => string
|
|
4328
4102
|
}
|
|
4329
|
-
| {
|
|
4330
|
-
type: 'update value'
|
|
4331
|
-
value: Array<PortableTextBlock> | undefined
|
|
4332
|
-
}
|
|
4333
4103
|
| {
|
|
4334
4104
|
type: 'update maxBlocks'
|
|
4335
4105
|
maxBlocks: number | undefined
|
|
@@ -4452,10 +4222,6 @@ declare const editorMachine: StateMachine<
|
|
|
4452
4222
|
type: 'update key generator'
|
|
4453
4223
|
keyGenerator: () => string
|
|
4454
4224
|
}
|
|
4455
|
-
| {
|
|
4456
|
-
type: 'update value'
|
|
4457
|
-
value: Array<PortableTextBlock> | undefined
|
|
4458
|
-
}
|
|
4459
4225
|
| {
|
|
4460
4226
|
type: 'update maxBlocks'
|
|
4461
4227
|
maxBlocks: number | undefined
|
|
@@ -4576,7 +4342,7 @@ declare const editorMachine: StateMachine<
|
|
|
4576
4342
|
initialReadOnly: boolean
|
|
4577
4343
|
maxBlocks: number | undefined
|
|
4578
4344
|
selection: EditorSelection
|
|
4579
|
-
|
|
4345
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
4580
4346
|
internalDrag?: {
|
|
4581
4347
|
ghost?: HTMLElement
|
|
4582
4348
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -4598,10 +4364,6 @@ declare const editorMachine: StateMachine<
|
|
|
4598
4364
|
type: 'update key generator'
|
|
4599
4365
|
keyGenerator: () => string
|
|
4600
4366
|
}
|
|
4601
|
-
| {
|
|
4602
|
-
type: 'update value'
|
|
4603
|
-
value: Array<PortableTextBlock> | undefined
|
|
4604
|
-
}
|
|
4605
4367
|
| {
|
|
4606
4368
|
type: 'update maxBlocks'
|
|
4607
4369
|
maxBlocks: number | undefined
|
|
@@ -4724,10 +4486,6 @@ declare const editorMachine: StateMachine<
|
|
|
4724
4486
|
type: 'update key generator'
|
|
4725
4487
|
keyGenerator: () => string
|
|
4726
4488
|
}
|
|
4727
|
-
| {
|
|
4728
|
-
type: 'update value'
|
|
4729
|
-
value: Array<PortableTextBlock> | undefined
|
|
4730
|
-
}
|
|
4731
4489
|
| {
|
|
4732
4490
|
type: 'update maxBlocks'
|
|
4733
4491
|
maxBlocks: number | undefined
|
|
@@ -4909,9 +4667,7 @@ declare const editorMachine: StateMachine<
|
|
|
4909
4667
|
initialReadOnly: boolean
|
|
4910
4668
|
maxBlocks: number | undefined
|
|
4911
4669
|
selection: EditorSelection
|
|
4912
|
-
|
|
4913
|
-
| Array<PortableTextBlock>
|
|
4914
|
-
| undefined
|
|
4670
|
+
initialValue: Array<PortableTextBlock> | undefined
|
|
4915
4671
|
internalDrag?: {
|
|
4916
4672
|
ghost?: HTMLElement
|
|
4917
4673
|
origin: Pick<EventPosition, 'selection'>
|
|
@@ -4934,10 +4690,6 @@ declare const editorMachine: StateMachine<
|
|
|
4934
4690
|
type: 'update key generator'
|
|
4935
4691
|
keyGenerator: () => string
|
|
4936
4692
|
}
|
|
4937
|
-
| {
|
|
4938
|
-
type: 'update value'
|
|
4939
|
-
value: Array<PortableTextBlock> | undefined
|
|
4940
|
-
}
|
|
4941
4693
|
| {
|
|
4942
4694
|
type: 'update maxBlocks'
|
|
4943
4695
|
maxBlocks: number | undefined
|