@portabletext/editor 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_chunks-dts/behavior.types.action.d.ts +122 -122
- package/lib/index.cjs +162 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +164 -4
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.ts +3 -3
- package/lib/utils/index.d.cts +2 -2
- package/lib/utils/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/behaviors/behavior.core.lists.ts +149 -1
- package/src/behaviors/behavior.core.ts +1 -0
- package/src/converters/converter.text-plain.test.ts +7 -5
- package/src/editor/__tests__/PortableTextEditor.test.tsx +5 -14
- package/src/editor/__tests__/PortableTextEditorTester.tsx +23 -77
- package/src/editor/__tests__/RangeDecorations.test.tsx +2 -9
- package/src/editor/__tests__/insert-block.test.tsx +7 -28
- package/src/editor/__tests__/self-solving.test.tsx +5 -17
- package/src/editor/create-editor.ts +4 -1
- package/src/editor/editor-schema.ts +36 -3
- package/src/editor/plugins/__tests__/withEditableAPIDelete.test.tsx +8 -15
- package/src/editor/plugins/__tests__/withEditableAPIGetFragment.test.tsx +7 -11
- package/src/editor/plugins/__tests__/withEditableAPIInsert.test.tsx +81 -63
- package/src/editor/plugins/__tests__/withEditableAPISelectionsOverlapping.test.tsx +2 -9
- package/src/editor/plugins/__tests__/withPortableTextLists.test.tsx +3 -7
- package/src/editor/plugins/__tests__/withPortableTextMarkModel.test.tsx +17 -27
- package/src/editor/plugins/__tests__/withPortableTextSelections.test.tsx +3 -7
- package/src/editor/plugins/__tests__/withUndoRedo.test.tsx +4 -9
- package/src/internal-utils/__tests__/valueNormalization.test.tsx +3 -7
- package/src/internal-utils/__tests__/values.test.ts +5 -6
- package/src/internal-utils/operation-to-patches.test.ts +17 -12
- package/src/plugins/plugin.internal.portable-text-editor-ref.tsx +16 -0
- package/src/editor/__tests__/sync-value.test.tsx +0 -154
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Patch, Patch as Patch$1 } from "@portabletext/patches";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _sanity_types8 from "@sanity/types";
|
|
3
3
|
import { ArrayDefinition, ArraySchemaType, BlockDecoratorDefinition, BlockListDefinition, BlockStyleDefinition, ObjectSchemaType, Path, PortableTextBlock, PortableTextBlock as PortableTextBlock$1, PortableTextChild, PortableTextChild as PortableTextChild$1, PortableTextListBlock, PortableTextObject, PortableTextObject as PortableTextObject$1, PortableTextSpan, PortableTextSpan as PortableTextSpan$1, PortableTextTextBlock, PortableTextTextBlock as PortableTextTextBlock$1, TypedObject } from "@sanity/types";
|
|
4
|
-
import * as
|
|
4
|
+
import * as xstate241 from "xstate";
|
|
5
5
|
import { ActorRef, ActorRefFrom, EventObject, Snapshot } from "xstate";
|
|
6
6
|
import { BaseRange, Descendant, Operation } from "slate";
|
|
7
|
-
import * as
|
|
7
|
+
import * as react22 from "react";
|
|
8
8
|
import React$1, { BaseSyntheticEvent, ClipboardEvent, Component, FocusEvent, JSX, KeyboardEvent as KeyboardEvent$1, MutableRefObject, PropsWithChildren, ReactElement, RefObject, TextareaHTMLAttributes } from "react";
|
|
9
|
-
import * as
|
|
9
|
+
import * as xstate_guards14 from "xstate/guards";
|
|
10
10
|
import { Observable, Subject } from "rxjs";
|
|
11
11
|
import { DOMNode } from "slate-dom";
|
|
12
12
|
import { ReactEditor } from "slate-react";
|
|
@@ -352,7 +352,7 @@ declare class PortableTextEditor extends Component<PortableTextEditorProps<Inter
|
|
|
352
352
|
componentDidUpdate(prevProps: PortableTextEditorProps): void;
|
|
353
353
|
componentWillUnmount(): void;
|
|
354
354
|
setEditable: (editable: EditableAPI) => void;
|
|
355
|
-
render():
|
|
355
|
+
render(): react22.JSX.Element;
|
|
356
356
|
/**
|
|
357
357
|
* @deprecated
|
|
358
358
|
* Use built-in selectors or write your own: https://www.portabletext.org/reference/selectors/
|
|
@@ -409,7 +409,7 @@ declare class PortableTextEditor extends Component<PortableTextEditorProps<Inter
|
|
|
409
409
|
static blur: (editor: PortableTextEditor) => void;
|
|
410
410
|
static delete: (editor: PortableTextEditor, selection: EditorSelection, options?: EditableAPIDeleteOptions) => void;
|
|
411
411
|
static findDOMNode: (editor: PortableTextEditor, element: PortableTextBlock | PortableTextChild) => Node | undefined;
|
|
412
|
-
static findByPath: (editor: PortableTextEditor, path: Path) => [
|
|
412
|
+
static findByPath: (editor: PortableTextEditor, path: Path) => [_sanity_types8.PortableTextSpan | PortableTextObject | _sanity_types8.PortableTextTextBlock<_sanity_types8.PortableTextSpan | PortableTextObject> | undefined, Path | undefined];
|
|
413
413
|
/**
|
|
414
414
|
* @deprecated
|
|
415
415
|
* Use `editor.send(...)` instead
|
|
@@ -747,7 +747,7 @@ type PortableTextEditableProps = Omit<TextareaHTMLAttributes<HTMLDivElement>, 'o
|
|
|
747
747
|
* ```
|
|
748
748
|
* @group Components
|
|
749
749
|
*/
|
|
750
|
-
declare const PortableTextEditable:
|
|
750
|
+
declare const PortableTextEditable: react22.ForwardRefExoticComponent<Omit<PortableTextEditableProps, "ref"> & react22.RefAttributes<Omit<HTMLDivElement, "as" | "onPaste" | "onBeforeInput">>>;
|
|
751
751
|
type DecoratedRange = BaseRange & {
|
|
752
752
|
rangeDecoration: RangeDecoration;
|
|
753
753
|
};
|
|
@@ -1313,7 +1313,7 @@ type EditorActor = ActorRefFrom<typeof editorMachine>;
|
|
|
1313
1313
|
/**
|
|
1314
1314
|
* @internal
|
|
1315
1315
|
*/
|
|
1316
|
-
declare const editorMachine:
|
|
1316
|
+
declare const editorMachine: xstate241.StateMachine<{
|
|
1317
1317
|
behaviors: Set<BehaviorConfig>;
|
|
1318
1318
|
behaviorsSorted: boolean;
|
|
1319
1319
|
converters: Set<Converter>;
|
|
@@ -1331,7 +1331,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1331
1331
|
};
|
|
1332
1332
|
dragGhost?: HTMLElement;
|
|
1333
1333
|
slateEditor?: PortableTextSlateEditor;
|
|
1334
|
-
},
|
|
1334
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
1335
1335
|
type: "update readOnly";
|
|
1336
1336
|
readOnly: boolean;
|
|
1337
1337
|
} | {
|
|
@@ -1378,58 +1378,58 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1378
1378
|
type: "dragend";
|
|
1379
1379
|
} | {
|
|
1380
1380
|
type: "drop";
|
|
1381
|
-
}, {}, never,
|
|
1381
|
+
}, {}, never, xstate241.Values<{
|
|
1382
1382
|
"add behavior to context": {
|
|
1383
1383
|
type: "add behavior to context";
|
|
1384
|
-
params:
|
|
1384
|
+
params: xstate241.NonReducibleUnknown;
|
|
1385
1385
|
};
|
|
1386
1386
|
"remove behavior from context": {
|
|
1387
1387
|
type: "remove behavior from context";
|
|
1388
|
-
params:
|
|
1388
|
+
params: xstate241.NonReducibleUnknown;
|
|
1389
1389
|
};
|
|
1390
1390
|
"emit patch event": {
|
|
1391
1391
|
type: "emit patch event";
|
|
1392
|
-
params:
|
|
1392
|
+
params: xstate241.NonReducibleUnknown;
|
|
1393
1393
|
};
|
|
1394
1394
|
"emit mutation event": {
|
|
1395
1395
|
type: "emit mutation event";
|
|
1396
|
-
params:
|
|
1396
|
+
params: xstate241.NonReducibleUnknown;
|
|
1397
1397
|
};
|
|
1398
1398
|
"emit read only": {
|
|
1399
1399
|
type: "emit read only";
|
|
1400
|
-
params:
|
|
1400
|
+
params: xstate241.NonReducibleUnknown;
|
|
1401
1401
|
};
|
|
1402
1402
|
"emit editable": {
|
|
1403
1403
|
type: "emit editable";
|
|
1404
|
-
params:
|
|
1404
|
+
params: xstate241.NonReducibleUnknown;
|
|
1405
1405
|
};
|
|
1406
1406
|
"defer event": {
|
|
1407
1407
|
type: "defer event";
|
|
1408
|
-
params:
|
|
1408
|
+
params: xstate241.NonReducibleUnknown;
|
|
1409
1409
|
};
|
|
1410
1410
|
"emit pending events": {
|
|
1411
1411
|
type: "emit pending events";
|
|
1412
|
-
params:
|
|
1412
|
+
params: xstate241.NonReducibleUnknown;
|
|
1413
1413
|
};
|
|
1414
1414
|
"emit ready": {
|
|
1415
1415
|
type: "emit ready";
|
|
1416
|
-
params:
|
|
1416
|
+
params: xstate241.NonReducibleUnknown;
|
|
1417
1417
|
};
|
|
1418
1418
|
"clear pending events": {
|
|
1419
1419
|
type: "clear pending events";
|
|
1420
|
-
params:
|
|
1420
|
+
params: xstate241.NonReducibleUnknown;
|
|
1421
1421
|
};
|
|
1422
1422
|
"defer incoming patches": {
|
|
1423
1423
|
type: "defer incoming patches";
|
|
1424
|
-
params:
|
|
1424
|
+
params: xstate241.NonReducibleUnknown;
|
|
1425
1425
|
};
|
|
1426
1426
|
"emit pending incoming patches": {
|
|
1427
1427
|
type: "emit pending incoming patches";
|
|
1428
|
-
params:
|
|
1428
|
+
params: xstate241.NonReducibleUnknown;
|
|
1429
1429
|
};
|
|
1430
1430
|
"clear pending incoming patches": {
|
|
1431
1431
|
type: "clear pending incoming patches";
|
|
1432
|
-
params:
|
|
1432
|
+
params: xstate241.NonReducibleUnknown;
|
|
1433
1433
|
};
|
|
1434
1434
|
"handle blur": {
|
|
1435
1435
|
type: "handle blur";
|
|
@@ -1445,7 +1445,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1445
1445
|
};
|
|
1446
1446
|
"sort behaviors": {
|
|
1447
1447
|
type: "sort behaviors";
|
|
1448
|
-
params:
|
|
1448
|
+
params: xstate241.NonReducibleUnknown;
|
|
1449
1449
|
};
|
|
1450
1450
|
}>, {
|
|
1451
1451
|
type: "slate is busy";
|
|
@@ -1474,9 +1474,9 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1474
1474
|
readOnly?: boolean;
|
|
1475
1475
|
schema: EditorSchema;
|
|
1476
1476
|
initialValue?: Array<PortableTextBlock>;
|
|
1477
|
-
},
|
|
1477
|
+
}, xstate241.NonReducibleUnknown, {
|
|
1478
1478
|
type: "blurred";
|
|
1479
|
-
event:
|
|
1479
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
1480
1480
|
} | {
|
|
1481
1481
|
type: "done loading";
|
|
1482
1482
|
} | {
|
|
@@ -1488,14 +1488,14 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1488
1488
|
data: unknown;
|
|
1489
1489
|
} | {
|
|
1490
1490
|
type: "focused";
|
|
1491
|
-
event:
|
|
1491
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
1492
1492
|
} | {
|
|
1493
1493
|
type: "invalid value";
|
|
1494
1494
|
resolution: InvalidValueResolution | null;
|
|
1495
1495
|
value: Array<PortableTextBlock> | undefined;
|
|
1496
1496
|
} | {
|
|
1497
1497
|
type: "loading";
|
|
1498
|
-
} | {
|
|
1498
|
+
} | MutationEvent | {
|
|
1499
1499
|
type: "read only";
|
|
1500
1500
|
} | {
|
|
1501
1501
|
type: "ready";
|
|
@@ -1505,19 +1505,19 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1505
1505
|
} | {
|
|
1506
1506
|
type: "value changed";
|
|
1507
1507
|
value: Array<PortableTextBlock> | undefined;
|
|
1508
|
-
},
|
|
1508
|
+
} | InternalPatchEvent | PatchesEvent, xstate241.MetaObject, {
|
|
1509
1509
|
readonly id: "editor";
|
|
1510
1510
|
readonly context: ({
|
|
1511
1511
|
input
|
|
1512
1512
|
}: {
|
|
1513
1513
|
spawn: {
|
|
1514
|
-
<TSrc extends never>(logic: TSrc, ...[options]: never):
|
|
1515
|
-
<TLogic extends
|
|
1514
|
+
<TSrc extends never>(logic: TSrc, ...[options]: never): xstate241.ActorRefFromLogic<never>;
|
|
1515
|
+
<TLogic extends xstate241.AnyActorLogic>(src: TLogic, ...[options]: xstate241.ConditionalRequired<[options?: ({
|
|
1516
1516
|
id?: never;
|
|
1517
1517
|
systemId?: string;
|
|
1518
|
-
input?:
|
|
1518
|
+
input?: xstate241.InputFrom<TLogic> | undefined;
|
|
1519
1519
|
syncSnapshot?: boolean;
|
|
1520
|
-
} & { [K in
|
|
1520
|
+
} & { [K in xstate241.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate241.IsNotNever<xstate241.RequiredLogicInput<TLogic>>>): xstate241.ActorRefFromLogic<TLogic>;
|
|
1521
1521
|
};
|
|
1522
1522
|
input: {
|
|
1523
1523
|
converters?: Array<Converter>;
|
|
@@ -1528,7 +1528,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1528
1528
|
schema: EditorSchema;
|
|
1529
1529
|
initialValue?: Array<PortableTextBlock>;
|
|
1530
1530
|
};
|
|
1531
|
-
self:
|
|
1531
|
+
self: xstate241.ActorRef<xstate241.MachineSnapshot<{
|
|
1532
1532
|
behaviors: Set<BehaviorConfig>;
|
|
1533
1533
|
behaviorsSorted: boolean;
|
|
1534
1534
|
converters: Set<Converter>;
|
|
@@ -1546,7 +1546,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1546
1546
|
};
|
|
1547
1547
|
dragGhost?: HTMLElement;
|
|
1548
1548
|
slateEditor?: PortableTextSlateEditor;
|
|
1549
|
-
},
|
|
1549
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
1550
1550
|
type: "update readOnly";
|
|
1551
1551
|
readOnly: boolean;
|
|
1552
1552
|
} | {
|
|
@@ -1593,7 +1593,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1593
1593
|
type: "dragend";
|
|
1594
1594
|
} | {
|
|
1595
1595
|
type: "drop";
|
|
1596
|
-
}, Record<string,
|
|
1596
|
+
}, Record<string, xstate241.AnyActorRef | undefined>, xstate241.StateValue, string, unknown, any, any>, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
1597
1597
|
type: "update readOnly";
|
|
1598
1598
|
readOnly: boolean;
|
|
1599
1599
|
} | {
|
|
@@ -1640,11 +1640,11 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1640
1640
|
type: "dragend";
|
|
1641
1641
|
} | {
|
|
1642
1642
|
type: "drop";
|
|
1643
|
-
},
|
|
1643
|
+
}, xstate241.AnyEventObject>;
|
|
1644
1644
|
}) => {
|
|
1645
1645
|
behaviors: Set<{
|
|
1646
|
-
behavior: Behavior<"*" | "
|
|
1647
|
-
type: StrictExtract<"
|
|
1646
|
+
behavior: Behavior<"*" | "insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle" | "clipboard.copy" | "clipboard.cut" | "clipboard.paste" | "drag.dragstart" | "drag.drag" | "drag.dragend" | "drag.dragenter" | "drag.dragover" | "drag.dragleave" | "drag.drop" | "input.*" | "keyboard.keydown" | "keyboard.keyup" | "mouse.click" | "delete.*" | "select.*" | "deserialize.*" | "serialize.*" | "split.*" | "insert.*" | "annotation.*" | "block.*" | "child.*" | "decorator.*" | "history.*" | "move.*" | "deserialization.*" | "list item.*" | "serialization.*" | "style.*" | "clipboard.*" | "drag.*" | "keyboard.*" | "mouse.*" | `custom.${string}`, true, {
|
|
1647
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "annotation.add">;
|
|
1648
1648
|
annotation: {
|
|
1649
1649
|
name: string;
|
|
1650
1650
|
value: {
|
|
@@ -1652,49 +1652,49 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1652
1652
|
};
|
|
1653
1653
|
};
|
|
1654
1654
|
} | {
|
|
1655
|
-
type: StrictExtract<"
|
|
1655
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "annotation.remove">;
|
|
1656
1656
|
annotation: {
|
|
1657
1657
|
name: string;
|
|
1658
1658
|
};
|
|
1659
1659
|
} | {
|
|
1660
|
-
type: StrictExtract<"
|
|
1660
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "block.set">;
|
|
1661
1661
|
at: BlockPath;
|
|
1662
1662
|
props: Record<string, unknown>;
|
|
1663
1663
|
} | {
|
|
1664
|
-
type: StrictExtract<"
|
|
1664
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "block.unset">;
|
|
1665
1665
|
at: BlockPath;
|
|
1666
1666
|
props: Array<string>;
|
|
1667
1667
|
} | {
|
|
1668
|
-
type: StrictExtract<"
|
|
1668
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "child.set">;
|
|
1669
1669
|
at: ChildPath;
|
|
1670
1670
|
props: {
|
|
1671
1671
|
[prop: string]: unknown;
|
|
1672
1672
|
};
|
|
1673
1673
|
} | {
|
|
1674
|
-
type: StrictExtract<"
|
|
1674
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "child.unset">;
|
|
1675
1675
|
at: ChildPath;
|
|
1676
1676
|
props: Array<string>;
|
|
1677
1677
|
} | {
|
|
1678
|
-
type: StrictExtract<"
|
|
1678
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "decorator.add">;
|
|
1679
1679
|
decorator: string;
|
|
1680
1680
|
at?: {
|
|
1681
1681
|
anchor: BlockOffset;
|
|
1682
1682
|
focus: BlockOffset;
|
|
1683
1683
|
};
|
|
1684
1684
|
} | {
|
|
1685
|
-
type: StrictExtract<"
|
|
1685
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "decorator.remove">;
|
|
1686
1686
|
decorator: string;
|
|
1687
1687
|
} | {
|
|
1688
|
-
type: StrictExtract<"
|
|
1688
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete">;
|
|
1689
1689
|
at: NonNullable<EditorSelection>;
|
|
1690
1690
|
direction?: "backward" | "forward";
|
|
1691
1691
|
unit?: "character" | "word" | "line" | "block";
|
|
1692
1692
|
} | {
|
|
1693
|
-
type: StrictExtract<"
|
|
1693
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "history.redo">;
|
|
1694
1694
|
} | {
|
|
1695
|
-
type: StrictExtract<"
|
|
1695
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "history.undo">;
|
|
1696
1696
|
} | {
|
|
1697
|
-
type: StrictExtract<"
|
|
1697
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.inline object">;
|
|
1698
1698
|
inlineObject: {
|
|
1699
1699
|
name: string;
|
|
1700
1700
|
value?: {
|
|
@@ -1702,12 +1702,12 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1702
1702
|
};
|
|
1703
1703
|
};
|
|
1704
1704
|
} | {
|
|
1705
|
-
type: StrictExtract<"
|
|
1705
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.block">;
|
|
1706
1706
|
block: BlockWithOptionalKey;
|
|
1707
1707
|
placement: InsertPlacement;
|
|
1708
1708
|
select?: "start" | "end" | "none";
|
|
1709
1709
|
} | {
|
|
1710
|
-
type: StrictExtract<"
|
|
1710
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.span">;
|
|
1711
1711
|
text: string;
|
|
1712
1712
|
annotations?: Array<{
|
|
1713
1713
|
name: string;
|
|
@@ -1717,27 +1717,27 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1717
1717
|
}>;
|
|
1718
1718
|
decorators?: Array<string>;
|
|
1719
1719
|
} | {
|
|
1720
|
-
type: StrictExtract<"
|
|
1720
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.text">;
|
|
1721
1721
|
text: string;
|
|
1722
1722
|
} | {
|
|
1723
|
-
type: StrictExtract<"
|
|
1723
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "move.backward">;
|
|
1724
1724
|
distance: number;
|
|
1725
1725
|
} | {
|
|
1726
|
-
type: StrictExtract<"
|
|
1726
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "move.block">;
|
|
1727
1727
|
at: BlockPath;
|
|
1728
1728
|
to: BlockPath;
|
|
1729
1729
|
} | {
|
|
1730
|
-
type: StrictExtract<"
|
|
1730
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "move.forward">;
|
|
1731
1731
|
distance: number;
|
|
1732
1732
|
} | {
|
|
1733
|
-
type: StrictExtract<"
|
|
1733
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "select">;
|
|
1734
1734
|
at: EditorSelection;
|
|
1735
1735
|
} | {
|
|
1736
|
-
type: StrictExtract<"
|
|
1736
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "annotation.set">;
|
|
1737
1737
|
at: AnnotationPath;
|
|
1738
1738
|
props: Record<string, unknown>;
|
|
1739
1739
|
} | {
|
|
1740
|
-
type: StrictExtract<"
|
|
1740
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "annotation.toggle">;
|
|
1741
1741
|
annotation: {
|
|
1742
1742
|
name: string;
|
|
1743
1743
|
value: {
|
|
@@ -1745,96 +1745,96 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1745
1745
|
};
|
|
1746
1746
|
};
|
|
1747
1747
|
} | {
|
|
1748
|
-
type: StrictExtract<"
|
|
1748
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "decorator.toggle">;
|
|
1749
1749
|
decorator: string;
|
|
1750
1750
|
at?: {
|
|
1751
1751
|
anchor: BlockOffset;
|
|
1752
1752
|
focus: BlockOffset;
|
|
1753
1753
|
};
|
|
1754
1754
|
} | {
|
|
1755
|
-
type: StrictExtract<"
|
|
1755
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete.backward">;
|
|
1756
1756
|
unit: "character" | "word" | "line" | "block";
|
|
1757
1757
|
} | {
|
|
1758
|
-
type: StrictExtract<"
|
|
1758
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete.block">;
|
|
1759
1759
|
at: BlockPath;
|
|
1760
1760
|
} | {
|
|
1761
|
-
type: StrictExtract<"
|
|
1761
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete.child">;
|
|
1762
1762
|
at: ChildPath;
|
|
1763
1763
|
} | {
|
|
1764
|
-
type: StrictExtract<"
|
|
1764
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete.forward">;
|
|
1765
1765
|
unit: "character" | "word" | "line" | "block";
|
|
1766
1766
|
} | {
|
|
1767
|
-
type: StrictExtract<"
|
|
1767
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "delete.text">;
|
|
1768
1768
|
at: {
|
|
1769
1769
|
anchor: BlockOffset;
|
|
1770
1770
|
focus: BlockOffset;
|
|
1771
1771
|
};
|
|
1772
1772
|
} | {
|
|
1773
|
-
type: StrictExtract<"
|
|
1773
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "deserialize">;
|
|
1774
1774
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "drag.drop" | "clipboard.paste"> | InputBehaviorEvent;
|
|
1775
1775
|
} | {
|
|
1776
|
-
type: StrictExtract<"
|
|
1776
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "serialize">;
|
|
1777
1777
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "clipboard.copy" | "clipboard.cut" | "drag.dragstart">;
|
|
1778
1778
|
} | {
|
|
1779
|
-
type: StrictExtract<"
|
|
1779
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "deserialization.success">;
|
|
1780
1780
|
mimeType: MIMEType;
|
|
1781
1781
|
data: Array<PortableTextBlock>;
|
|
1782
1782
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "drag.drop" | "clipboard.paste"> | InputBehaviorEvent;
|
|
1783
1783
|
} | {
|
|
1784
|
-
type: StrictExtract<"
|
|
1784
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "deserialization.failure">;
|
|
1785
1785
|
mimeType: MIMEType;
|
|
1786
1786
|
reason: string;
|
|
1787
1787
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "drag.drop" | "clipboard.paste"> | InputBehaviorEvent;
|
|
1788
1788
|
} | {
|
|
1789
|
-
type: StrictExtract<"
|
|
1789
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "serialization.success">;
|
|
1790
1790
|
mimeType: MIMEType;
|
|
1791
1791
|
data: string;
|
|
1792
1792
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "clipboard.copy" | "clipboard.cut" | "drag.dragstart">;
|
|
1793
1793
|
} | {
|
|
1794
|
-
type: StrictExtract<"
|
|
1794
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "serialization.failure">;
|
|
1795
1795
|
mimeType: MIMEType;
|
|
1796
1796
|
reason: string;
|
|
1797
1797
|
originEvent: PickFromUnion<NativeBehaviorEvent, "type", "clipboard.copy" | "clipboard.cut" | "drag.dragstart">;
|
|
1798
1798
|
} | {
|
|
1799
|
-
type: StrictExtract<"
|
|
1799
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.blocks">;
|
|
1800
1800
|
blocks: Array<BlockWithOptionalKey>;
|
|
1801
1801
|
placement: InsertPlacement;
|
|
1802
1802
|
select?: "start" | "end" | "none";
|
|
1803
1803
|
} | {
|
|
1804
|
-
type: StrictExtract<"
|
|
1804
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.break">;
|
|
1805
1805
|
} | {
|
|
1806
|
-
type: StrictExtract<"
|
|
1806
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "insert.soft break">;
|
|
1807
1807
|
} | {
|
|
1808
|
-
type: StrictExtract<"
|
|
1808
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "list item.add">;
|
|
1809
1809
|
listItem: string;
|
|
1810
1810
|
} | {
|
|
1811
|
-
type: StrictExtract<"
|
|
1811
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "list item.remove">;
|
|
1812
1812
|
listItem: string;
|
|
1813
1813
|
} | {
|
|
1814
|
-
type: StrictExtract<"
|
|
1814
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "list item.toggle">;
|
|
1815
1815
|
listItem: string;
|
|
1816
1816
|
} | {
|
|
1817
|
-
type: StrictExtract<"
|
|
1817
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "move.block down">;
|
|
1818
1818
|
at: BlockPath;
|
|
1819
1819
|
} | {
|
|
1820
|
-
type: StrictExtract<"
|
|
1820
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "move.block up">;
|
|
1821
1821
|
at: BlockPath;
|
|
1822
1822
|
} | {
|
|
1823
|
-
type: StrictExtract<"
|
|
1823
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "select.previous block">;
|
|
1824
1824
|
select?: "start" | "end";
|
|
1825
1825
|
} | {
|
|
1826
|
-
type: StrictExtract<"
|
|
1826
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "select.next block">;
|
|
1827
1827
|
select?: "start" | "end";
|
|
1828
1828
|
} | {
|
|
1829
|
-
type: StrictExtract<"
|
|
1829
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "split">;
|
|
1830
1830
|
} | {
|
|
1831
|
-
type: StrictExtract<"
|
|
1831
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "style.add">;
|
|
1832
1832
|
style: string;
|
|
1833
1833
|
} | {
|
|
1834
|
-
type: StrictExtract<"
|
|
1834
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "style.remove">;
|
|
1835
1835
|
style: string;
|
|
1836
1836
|
} | {
|
|
1837
|
-
type: StrictExtract<"
|
|
1837
|
+
type: StrictExtract<"insert.text" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.inline object" | "insert.block" | "insert.span" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.soft break" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.previous block" | "select.next block" | "serialize" | "serialization.success" | "serialization.failure" | "split" | "style.add" | "style.remove" | "style.toggle", "style.toggle">;
|
|
1838
1838
|
style: string;
|
|
1839
1839
|
} | {
|
|
1840
1840
|
type: StrictExtract<"clipboard.copy" | "clipboard.cut" | "clipboard.paste" | "drag.dragstart" | "drag.drag" | "drag.dragend" | "drag.dragenter" | "drag.dragover" | "drag.dragleave" | "drag.drop" | "input.*" | "keyboard.keydown" | "keyboard.keyup" | "mouse.click", "clipboard.copy">;
|
|
@@ -1926,7 +1926,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1926
1926
|
readonly actions: "remove behavior from context";
|
|
1927
1927
|
};
|
|
1928
1928
|
readonly 'update maxBlocks': {
|
|
1929
|
-
readonly actions:
|
|
1929
|
+
readonly actions: xstate241.ActionFunction<{
|
|
1930
1930
|
behaviors: Set<BehaviorConfig>;
|
|
1931
1931
|
behaviorsSorted: boolean;
|
|
1932
1932
|
converters: Set<Converter>;
|
|
@@ -1947,7 +1947,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1947
1947
|
}, {
|
|
1948
1948
|
type: "update maxBlocks";
|
|
1949
1949
|
maxBlocks: number | undefined;
|
|
1950
|
-
},
|
|
1950
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
1951
1951
|
type: "update readOnly";
|
|
1952
1952
|
readOnly: boolean;
|
|
1953
1953
|
} | {
|
|
@@ -1997,7 +1997,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
1997
1997
|
}, undefined, never, never, never, never, never>;
|
|
1998
1998
|
};
|
|
1999
1999
|
readonly 'update selection': {
|
|
2000
|
-
readonly actions: readonly [
|
|
2000
|
+
readonly actions: readonly [xstate241.ActionFunction<{
|
|
2001
2001
|
behaviors: Set<BehaviorConfig>;
|
|
2002
2002
|
behaviorsSorted: boolean;
|
|
2003
2003
|
converters: Set<Converter>;
|
|
@@ -2018,7 +2018,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2018
2018
|
}, {
|
|
2019
2019
|
type: "update selection";
|
|
2020
2020
|
selection: EditorSelection;
|
|
2021
|
-
},
|
|
2021
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2022
2022
|
type: "update readOnly";
|
|
2023
2023
|
readOnly: boolean;
|
|
2024
2024
|
} | {
|
|
@@ -2065,7 +2065,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2065
2065
|
type: "dragend";
|
|
2066
2066
|
} | {
|
|
2067
2067
|
type: "drop";
|
|
2068
|
-
}, undefined, never, never, never, never, never>,
|
|
2068
|
+
}, undefined, never, never, never, never, never>, xstate241.ActionFunction<{
|
|
2069
2069
|
behaviors: Set<BehaviorConfig>;
|
|
2070
2070
|
behaviorsSorted: boolean;
|
|
2071
2071
|
converters: Set<Converter>;
|
|
@@ -2086,7 +2086,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2086
2086
|
}, {
|
|
2087
2087
|
type: "update selection";
|
|
2088
2088
|
selection: EditorSelection;
|
|
2089
|
-
},
|
|
2089
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2090
2090
|
type: "update readOnly";
|
|
2091
2091
|
readOnly: boolean;
|
|
2092
2092
|
} | {
|
|
@@ -2133,9 +2133,9 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2133
2133
|
type: "dragend";
|
|
2134
2134
|
} | {
|
|
2135
2135
|
type: "drop";
|
|
2136
|
-
}, undefined, never, never, never, never,
|
|
2136
|
+
}, undefined, never, never, never, never, {
|
|
2137
2137
|
type: "blurred";
|
|
2138
|
-
event:
|
|
2138
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
2139
2139
|
} | {
|
|
2140
2140
|
type: "done loading";
|
|
2141
2141
|
} | {
|
|
@@ -2147,14 +2147,14 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2147
2147
|
data: unknown;
|
|
2148
2148
|
} | {
|
|
2149
2149
|
type: "focused";
|
|
2150
|
-
event:
|
|
2150
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
2151
2151
|
} | {
|
|
2152
2152
|
type: "invalid value";
|
|
2153
2153
|
resolution: InvalidValueResolution | null;
|
|
2154
2154
|
value: Array<PortableTextBlock> | undefined;
|
|
2155
2155
|
} | {
|
|
2156
2156
|
type: "loading";
|
|
2157
|
-
} | {
|
|
2157
|
+
} | MutationEvent | {
|
|
2158
2158
|
type: "read only";
|
|
2159
2159
|
} | {
|
|
2160
2160
|
type: "ready";
|
|
@@ -2164,10 +2164,10 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2164
2164
|
} | {
|
|
2165
2165
|
type: "value changed";
|
|
2166
2166
|
value: Array<PortableTextBlock> | undefined;
|
|
2167
|
-
}>];
|
|
2167
|
+
} | InternalPatchEvent | PatchesEvent>];
|
|
2168
2168
|
};
|
|
2169
2169
|
readonly 'set drag ghost': {
|
|
2170
|
-
readonly actions:
|
|
2170
|
+
readonly actions: xstate241.ActionFunction<{
|
|
2171
2171
|
behaviors: Set<BehaviorConfig>;
|
|
2172
2172
|
behaviorsSorted: boolean;
|
|
2173
2173
|
converters: Set<Converter>;
|
|
@@ -2188,7 +2188,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2188
2188
|
}, {
|
|
2189
2189
|
type: "set drag ghost";
|
|
2190
2190
|
ghost: HTMLElement;
|
|
2191
|
-
},
|
|
2191
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2192
2192
|
type: "update readOnly";
|
|
2193
2193
|
readOnly: boolean;
|
|
2194
2194
|
} | {
|
|
@@ -2250,7 +2250,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2250
2250
|
readonly actions: readonly ["sort behaviors", "handle behavior event"];
|
|
2251
2251
|
readonly guard: ({
|
|
2252
2252
|
event
|
|
2253
|
-
}:
|
|
2253
|
+
}: xstate_guards14.GuardArgs<{
|
|
2254
2254
|
behaviors: Set<BehaviorConfig>;
|
|
2255
2255
|
behaviorsSorted: boolean;
|
|
2256
2256
|
converters: Set<Converter>;
|
|
@@ -2287,7 +2287,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2287
2287
|
readonly target: "#editor.edit mode.read only.read only";
|
|
2288
2288
|
readonly guard: ({
|
|
2289
2289
|
context
|
|
2290
|
-
}:
|
|
2290
|
+
}: xstate_guards14.GuardArgs<{
|
|
2291
2291
|
behaviors: Set<BehaviorConfig>;
|
|
2292
2292
|
behaviorsSorted: boolean;
|
|
2293
2293
|
converters: Set<Converter>;
|
|
@@ -2320,7 +2320,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2320
2320
|
readonly 'update readOnly': {
|
|
2321
2321
|
readonly guard: ({
|
|
2322
2322
|
event
|
|
2323
|
-
}:
|
|
2323
|
+
}: xstate_guards14.GuardArgs<{
|
|
2324
2324
|
behaviors: Set<BehaviorConfig>;
|
|
2325
2325
|
behaviorsSorted: boolean;
|
|
2326
2326
|
converters: Set<Converter>;
|
|
@@ -2354,7 +2354,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2354
2354
|
readonly 'update readOnly': {
|
|
2355
2355
|
readonly guard: ({
|
|
2356
2356
|
event
|
|
2357
|
-
}:
|
|
2357
|
+
}: xstate_guards14.GuardArgs<{
|
|
2358
2358
|
behaviors: Set<BehaviorConfig>;
|
|
2359
2359
|
behaviorsSorted: boolean;
|
|
2360
2360
|
converters: Set<Converter>;
|
|
@@ -2387,7 +2387,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2387
2387
|
};
|
|
2388
2388
|
readonly focus: {
|
|
2389
2389
|
readonly target: ".focusing";
|
|
2390
|
-
readonly actions: readonly [
|
|
2390
|
+
readonly actions: readonly [xstate241.ActionFunction<{
|
|
2391
2391
|
behaviors: Set<BehaviorConfig>;
|
|
2392
2392
|
behaviorsSorted: boolean;
|
|
2393
2393
|
converters: Set<Converter>;
|
|
@@ -2408,7 +2408,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2408
2408
|
}, {
|
|
2409
2409
|
type: "focus";
|
|
2410
2410
|
editor: PortableTextSlateEditor;
|
|
2411
|
-
},
|
|
2411
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2412
2412
|
type: "update readOnly";
|
|
2413
2413
|
readOnly: boolean;
|
|
2414
2414
|
} | {
|
|
@@ -2465,7 +2465,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2465
2465
|
readonly exit: readonly [() => void];
|
|
2466
2466
|
readonly on: {
|
|
2467
2467
|
readonly dragstart: {
|
|
2468
|
-
readonly actions: readonly [
|
|
2468
|
+
readonly actions: readonly [xstate241.ActionFunction<{
|
|
2469
2469
|
behaviors: Set<BehaviorConfig>;
|
|
2470
2470
|
behaviorsSorted: boolean;
|
|
2471
2471
|
converters: Set<Converter>;
|
|
@@ -2487,7 +2487,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2487
2487
|
type: "dragstart";
|
|
2488
2488
|
ghost?: HTMLElement;
|
|
2489
2489
|
origin: Pick<EventPosition, "selection">;
|
|
2490
|
-
},
|
|
2490
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2491
2491
|
type: "update readOnly";
|
|
2492
2492
|
readOnly: boolean;
|
|
2493
2493
|
} | {
|
|
@@ -2568,7 +2568,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2568
2568
|
readonly entry: readonly [() => void];
|
|
2569
2569
|
readonly exit: readonly [() => void, ({
|
|
2570
2570
|
context
|
|
2571
|
-
}:
|
|
2571
|
+
}: xstate241.ActionArgs<{
|
|
2572
2572
|
behaviors: Set<BehaviorConfig>;
|
|
2573
2573
|
behaviorsSorted: boolean;
|
|
2574
2574
|
converters: Set<Converter>;
|
|
@@ -2586,7 +2586,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2586
2586
|
};
|
|
2587
2587
|
dragGhost?: HTMLElement;
|
|
2588
2588
|
slateEditor?: PortableTextSlateEditor;
|
|
2589
|
-
},
|
|
2589
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2590
2590
|
type: "update readOnly";
|
|
2591
2591
|
readOnly: boolean;
|
|
2592
2592
|
} | {
|
|
@@ -2633,7 +2633,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2633
2633
|
type: "dragend";
|
|
2634
2634
|
} | {
|
|
2635
2635
|
type: "drop";
|
|
2636
|
-
},
|
|
2636
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2637
2637
|
type: "update readOnly";
|
|
2638
2638
|
readOnly: boolean;
|
|
2639
2639
|
} | {
|
|
@@ -2680,7 +2680,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2680
2680
|
type: "dragend";
|
|
2681
2681
|
} | {
|
|
2682
2682
|
type: "drop";
|
|
2683
|
-
}>) => void,
|
|
2683
|
+
}>) => void, xstate241.ActionFunction<{
|
|
2684
2684
|
behaviors: Set<BehaviorConfig>;
|
|
2685
2685
|
behaviorsSorted: boolean;
|
|
2686
2686
|
converters: Set<Converter>;
|
|
@@ -2698,7 +2698,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2698
2698
|
};
|
|
2699
2699
|
dragGhost?: HTMLElement;
|
|
2700
2700
|
slateEditor?: PortableTextSlateEditor;
|
|
2701
|
-
},
|
|
2701
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2702
2702
|
type: "update readOnly";
|
|
2703
2703
|
readOnly: boolean;
|
|
2704
2704
|
} | {
|
|
@@ -2745,7 +2745,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2745
2745
|
type: "dragend";
|
|
2746
2746
|
} | {
|
|
2747
2747
|
type: "drop";
|
|
2748
|
-
},
|
|
2748
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2749
2749
|
type: "update readOnly";
|
|
2750
2750
|
readOnly: boolean;
|
|
2751
2751
|
} | {
|
|
@@ -2792,7 +2792,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2792
2792
|
type: "dragend";
|
|
2793
2793
|
} | {
|
|
2794
2794
|
type: "drop";
|
|
2795
|
-
}, undefined, never, never, never, never, never>,
|
|
2795
|
+
}, undefined, never, never, never, never, never>, xstate241.ActionFunction<{
|
|
2796
2796
|
behaviors: Set<BehaviorConfig>;
|
|
2797
2797
|
behaviorsSorted: boolean;
|
|
2798
2798
|
converters: Set<Converter>;
|
|
@@ -2810,7 +2810,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2810
2810
|
};
|
|
2811
2811
|
dragGhost?: HTMLElement;
|
|
2812
2812
|
slateEditor?: PortableTextSlateEditor;
|
|
2813
|
-
},
|
|
2813
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2814
2814
|
type: "update readOnly";
|
|
2815
2815
|
readOnly: boolean;
|
|
2816
2816
|
} | {
|
|
@@ -2857,7 +2857,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2857
2857
|
type: "dragend";
|
|
2858
2858
|
} | {
|
|
2859
2859
|
type: "drop";
|
|
2860
|
-
},
|
|
2860
|
+
}, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2861
2861
|
type: "update readOnly";
|
|
2862
2862
|
readOnly: boolean;
|
|
2863
2863
|
} | {
|
|
@@ -2951,7 +2951,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2951
2951
|
readonly exit: readonly [() => void];
|
|
2952
2952
|
readonly on: {
|
|
2953
2953
|
readonly patches: {
|
|
2954
|
-
readonly actions: readonly [
|
|
2954
|
+
readonly actions: readonly [xstate241.ActionFunction<{
|
|
2955
2955
|
behaviors: Set<BehaviorConfig>;
|
|
2956
2956
|
behaviorsSorted: boolean;
|
|
2957
2957
|
converters: Set<Converter>;
|
|
@@ -2969,7 +2969,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
2969
2969
|
};
|
|
2970
2970
|
dragGhost?: HTMLElement;
|
|
2971
2971
|
slateEditor?: PortableTextSlateEditor;
|
|
2972
|
-
}, PatchesEvent,
|
|
2972
|
+
}, PatchesEvent, MutationEvent | InternalPatchEvent | PatchesEvent | {
|
|
2973
2973
|
type: "update readOnly";
|
|
2974
2974
|
readOnly: boolean;
|
|
2975
2975
|
} | {
|
|
@@ -3016,9 +3016,9 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
3016
3016
|
type: "dragend";
|
|
3017
3017
|
} | {
|
|
3018
3018
|
type: "drop";
|
|
3019
|
-
}, undefined, never, never, never, never,
|
|
3019
|
+
}, undefined, never, never, never, never, {
|
|
3020
3020
|
type: "blurred";
|
|
3021
|
-
event:
|
|
3021
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
3022
3022
|
} | {
|
|
3023
3023
|
type: "done loading";
|
|
3024
3024
|
} | {
|
|
@@ -3030,14 +3030,14 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
3030
3030
|
data: unknown;
|
|
3031
3031
|
} | {
|
|
3032
3032
|
type: "focused";
|
|
3033
|
-
event:
|
|
3033
|
+
event: react22.FocusEvent<HTMLDivElement, Element>;
|
|
3034
3034
|
} | {
|
|
3035
3035
|
type: "invalid value";
|
|
3036
3036
|
resolution: InvalidValueResolution | null;
|
|
3037
3037
|
value: Array<PortableTextBlock> | undefined;
|
|
3038
3038
|
} | {
|
|
3039
3039
|
type: "loading";
|
|
3040
|
-
} | {
|
|
3040
|
+
} | MutationEvent | {
|
|
3041
3041
|
type: "read only";
|
|
3042
3042
|
} | {
|
|
3043
3043
|
type: "ready";
|
|
@@ -3047,7 +3047,7 @@ declare const editorMachine: xstate227.StateMachine<{
|
|
|
3047
3047
|
} | {
|
|
3048
3048
|
type: "value changed";
|
|
3049
3049
|
value: Array<PortableTextBlock> | undefined;
|
|
3050
|
-
}>];
|
|
3050
|
+
} | InternalPatchEvent | PatchesEvent>];
|
|
3051
3051
|
};
|
|
3052
3052
|
readonly 'syncing value': {
|
|
3053
3053
|
readonly target: "syncing value";
|