@portabletext/editor 2.13.7 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { ActorRef, ActorRefFrom, EventObject, Snapshot } from "xstate";
6
6
  import * as react20 from "react";
7
7
  import React$1, { BaseSyntheticEvent, ClipboardEvent, Component, FocusEvent, JSX, KeyboardEvent as KeyboardEvent$1, MutableRefObject, PropsWithChildren, ReactElement, RefObject, TextareaHTMLAttributes } from "react";
8
8
  import { Patch, Patch as Patch$1 } from "@portabletext/patches";
9
- import * as _portabletext_schema5 from "@portabletext/schema";
9
+ import * as _portabletext_schema6 from "@portabletext/schema";
10
10
  import { AnnotationDefinition, AnnotationSchemaType, BaseDefinition, BlockObjectDefinition, BlockObjectSchemaType, DecoratorDefinition, DecoratorSchemaType, FieldDefinition, InlineObjectDefinition, InlineObjectSchemaType, ListDefinition, ListSchemaType, PortableTextObject as PortableTextObject$1, PortableTextSpan as PortableTextSpan$1, PortableTextTextBlock as PortableTextTextBlock$1, Schema, SchemaDefinition, SchemaDefinition as SchemaDefinition$1, StyleDefinition, StyleSchemaType, defineSchema } from "@portabletext/schema";
11
11
  import { Observable, Subject } from "rxjs";
12
12
  import { DOMNode } from "slate-dom";
@@ -1690,7 +1690,7 @@ declare const editorMachine: xstate227.StateMachine<{
1690
1690
  }, xstate227.AnyEventObject>;
1691
1691
  }) => {
1692
1692
  behaviors: Set<{
1693
- behavior: Behavior<"*" | "split" | `custom.${string}` | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "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" | "style.*" | "history.*" | "split.*" | "delete.*" | "select.*" | "deserialize.*" | "serialize.*" | "annotation.*" | "block.*" | "child.*" | "decorator.*" | "insert.*" | "move.*" | "deserialization.*" | "list item.*" | "serialization.*" | "clipboard.*" | "drag.*" | "keyboard.*" | "mouse.*", true, {
1693
+ behavior: Behavior<"*" | "split" | `custom.${string}` | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "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" | "history.*" | "split.*" | "delete.*" | "select.*" | "deserialize.*" | "serialize.*" | "annotation.*" | "block.*" | "child.*" | "decorator.*" | "insert.*" | "move.*" | "deserialization.*" | "list item.*" | "serialization.*" | "style.*" | "clipboard.*" | "drag.*" | "keyboard.*" | "mouse.*", true, {
1694
1694
  type: StrictExtract<"split" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "style.add" | "style.remove" | "style.toggle", "annotation.add">;
1695
1695
  annotation: {
1696
1696
  name: string;
@@ -1975,7 +1975,7 @@ declare const editorMachine: xstate227.StateMachine<{
1975
1975
  keyGenerator: () => string;
1976
1976
  pendingEvents: never[];
1977
1977
  pendingIncomingPatchesEvents: never[];
1978
- schema: _portabletext_schema5.Schema;
1978
+ schema: _portabletext_schema6.Schema;
1979
1979
  selection: null;
1980
1980
  initialReadOnly: boolean;
1981
1981
  maxBlocks: number | undefined;
@@ -1,9 +1,9 @@
1
1
  import * as _sanity_types5 from "@sanity/types";
2
2
  import { ArrayDefinition, ArraySchemaType, BlockDecoratorDefinition, BlockListDefinition, BlockStyleDefinition, ObjectSchemaType, Path, PortableTextBlock, PortableTextBlock as PortableTextBlock$1, PortableTextChild, PortableTextChild as PortableTextChild$1, PortableTextListBlock, PortableTextObject, PortableTextObject as PortableTextObject$2, PortableTextSpan, PortableTextSpan as PortableTextSpan$2, PortableTextTextBlock, PortableTextTextBlock as PortableTextTextBlock$2, TypedObject } from "@sanity/types";
3
3
  import { BaseRange, Descendant, Operation } from "slate";
4
- import * as xstate241 from "xstate";
4
+ import * as xstate227 from "xstate";
5
5
  import { ActorRef, ActorRefFrom, EventObject, Snapshot } from "xstate";
6
- import * as react12 from "react";
6
+ import * as react20 from "react";
7
7
  import React$1, { BaseSyntheticEvent, ClipboardEvent, Component, FocusEvent, JSX, KeyboardEvent as KeyboardEvent$1, MutableRefObject, PropsWithChildren, ReactElement, RefObject, TextareaHTMLAttributes } from "react";
8
8
  import { Patch, Patch as Patch$1 } from "@portabletext/patches";
9
9
  import * as _portabletext_schema6 from "@portabletext/schema";
@@ -11,7 +11,7 @@ import { AnnotationDefinition, AnnotationSchemaType, BaseDefinition, BlockObject
11
11
  import { Observable, Subject } from "rxjs";
12
12
  import { DOMNode } from "slate-dom";
13
13
  import { ReactEditor } from "slate-react";
14
- import * as xstate_guards14 from "xstate/guards";
14
+ import * as xstate_guards12 from "xstate/guards";
15
15
  type MIMEType = `${string}/${string}`;
16
16
  /**
17
17
  * @internal
@@ -219,7 +219,7 @@ declare class PortableTextEditor extends Component<PortableTextEditorProps<Inter
219
219
  componentDidUpdate(prevProps: PortableTextEditorProps): void;
220
220
  componentWillUnmount(): void;
221
221
  setEditable: (editable: EditableAPI) => void;
222
- render(): react12.JSX.Element;
222
+ render(): react20.JSX.Element;
223
223
  /**
224
224
  * @deprecated
225
225
  * Use built-in selectors or write your own: https://www.portabletext.org/reference/selectors/
@@ -614,7 +614,7 @@ type PortableTextEditableProps = Omit<TextareaHTMLAttributes<HTMLDivElement>, 'o
614
614
  * ```
615
615
  * @group Components
616
616
  */
617
- declare const PortableTextEditable: react12.ForwardRefExoticComponent<Omit<PortableTextEditableProps, "ref"> & react12.RefAttributes<Omit<HTMLDivElement, "as" | "onPaste" | "onBeforeInput">>>;
617
+ declare const PortableTextEditable: react20.ForwardRefExoticComponent<Omit<PortableTextEditableProps, "ref"> & react20.RefAttributes<Omit<HTMLDivElement, "as" | "onPaste" | "onBeforeInput">>>;
618
618
  type DecoratedRange = BaseRange & {
619
619
  rangeDecoration: RangeDecoration;
620
620
  };
@@ -1360,7 +1360,7 @@ type EditorActor = ActorRefFrom<typeof editorMachine>;
1360
1360
  /**
1361
1361
  * @internal
1362
1362
  */
1363
- declare const editorMachine: xstate241.StateMachine<{
1363
+ declare const editorMachine: xstate227.StateMachine<{
1364
1364
  behaviors: Set<BehaviorConfig>;
1365
1365
  behaviorsSorted: boolean;
1366
1366
  converters: Set<Converter>;
@@ -1425,58 +1425,58 @@ declare const editorMachine: xstate241.StateMachine<{
1425
1425
  type: "dragend";
1426
1426
  } | {
1427
1427
  type: "drop";
1428
- }, {}, never, xstate241.Values<{
1428
+ }, {}, never, xstate227.Values<{
1429
1429
  "add behavior to context": {
1430
1430
  type: "add behavior to context";
1431
- params: xstate241.NonReducibleUnknown;
1431
+ params: xstate227.NonReducibleUnknown;
1432
1432
  };
1433
1433
  "remove behavior from context": {
1434
1434
  type: "remove behavior from context";
1435
- params: xstate241.NonReducibleUnknown;
1435
+ params: xstate227.NonReducibleUnknown;
1436
1436
  };
1437
1437
  "emit patch event": {
1438
1438
  type: "emit patch event";
1439
- params: xstate241.NonReducibleUnknown;
1439
+ params: xstate227.NonReducibleUnknown;
1440
1440
  };
1441
1441
  "emit mutation event": {
1442
1442
  type: "emit mutation event";
1443
- params: xstate241.NonReducibleUnknown;
1443
+ params: xstate227.NonReducibleUnknown;
1444
1444
  };
1445
1445
  "emit read only": {
1446
1446
  type: "emit read only";
1447
- params: xstate241.NonReducibleUnknown;
1447
+ params: xstate227.NonReducibleUnknown;
1448
1448
  };
1449
1449
  "emit editable": {
1450
1450
  type: "emit editable";
1451
- params: xstate241.NonReducibleUnknown;
1451
+ params: xstate227.NonReducibleUnknown;
1452
1452
  };
1453
1453
  "defer event": {
1454
1454
  type: "defer event";
1455
- params: xstate241.NonReducibleUnknown;
1455
+ params: xstate227.NonReducibleUnknown;
1456
1456
  };
1457
1457
  "emit pending events": {
1458
1458
  type: "emit pending events";
1459
- params: xstate241.NonReducibleUnknown;
1459
+ params: xstate227.NonReducibleUnknown;
1460
1460
  };
1461
1461
  "emit ready": {
1462
1462
  type: "emit ready";
1463
- params: xstate241.NonReducibleUnknown;
1463
+ params: xstate227.NonReducibleUnknown;
1464
1464
  };
1465
1465
  "clear pending events": {
1466
1466
  type: "clear pending events";
1467
- params: xstate241.NonReducibleUnknown;
1467
+ params: xstate227.NonReducibleUnknown;
1468
1468
  };
1469
1469
  "defer incoming patches": {
1470
1470
  type: "defer incoming patches";
1471
- params: xstate241.NonReducibleUnknown;
1471
+ params: xstate227.NonReducibleUnknown;
1472
1472
  };
1473
1473
  "emit pending incoming patches": {
1474
1474
  type: "emit pending incoming patches";
1475
- params: xstate241.NonReducibleUnknown;
1475
+ params: xstate227.NonReducibleUnknown;
1476
1476
  };
1477
1477
  "clear pending incoming patches": {
1478
1478
  type: "clear pending incoming patches";
1479
- params: xstate241.NonReducibleUnknown;
1479
+ params: xstate227.NonReducibleUnknown;
1480
1480
  };
1481
1481
  "handle blur": {
1482
1482
  type: "handle blur";
@@ -1492,7 +1492,7 @@ declare const editorMachine: xstate241.StateMachine<{
1492
1492
  };
1493
1493
  "sort behaviors": {
1494
1494
  type: "sort behaviors";
1495
- params: xstate241.NonReducibleUnknown;
1495
+ params: xstate227.NonReducibleUnknown;
1496
1496
  };
1497
1497
  }>, {
1498
1498
  type: "slate is busy";
@@ -1521,9 +1521,9 @@ declare const editorMachine: xstate241.StateMachine<{
1521
1521
  readOnly?: boolean;
1522
1522
  schema: EditorSchema;
1523
1523
  initialValue?: Array<PortableTextBlock>;
1524
- }, xstate241.NonReducibleUnknown, InternalPatchEvent | MutationEvent | PatchesEvent | {
1524
+ }, xstate227.NonReducibleUnknown, InternalPatchEvent | MutationEvent | PatchesEvent | {
1525
1525
  type: "blurred";
1526
- event: react12.FocusEvent<HTMLDivElement, Element>;
1526
+ event: react20.FocusEvent<HTMLDivElement, Element>;
1527
1527
  } | {
1528
1528
  type: "done loading";
1529
1529
  } | {
@@ -1535,7 +1535,7 @@ declare const editorMachine: xstate241.StateMachine<{
1535
1535
  data: unknown;
1536
1536
  } | {
1537
1537
  type: "focused";
1538
- event: react12.FocusEvent<HTMLDivElement, Element>;
1538
+ event: react20.FocusEvent<HTMLDivElement, Element>;
1539
1539
  } | {
1540
1540
  type: "invalid value";
1541
1541
  resolution: InvalidValueResolution | null;
@@ -1552,19 +1552,19 @@ declare const editorMachine: xstate241.StateMachine<{
1552
1552
  } | {
1553
1553
  type: "value changed";
1554
1554
  value: Array<PortableTextBlock> | undefined;
1555
- }, xstate241.MetaObject, {
1555
+ }, xstate227.MetaObject, {
1556
1556
  readonly id: "editor";
1557
1557
  readonly context: ({
1558
1558
  input
1559
1559
  }: {
1560
1560
  spawn: {
1561
- <TSrc extends never>(logic: TSrc, ...[options]: never): xstate241.ActorRefFromLogic<never>;
1562
- <TLogic extends xstate241.AnyActorLogic>(src: TLogic, ...[options]: xstate241.ConditionalRequired<[options?: ({
1561
+ <TSrc extends never>(logic: TSrc, ...[options]: never): xstate227.ActorRefFromLogic<never>;
1562
+ <TLogic extends xstate227.AnyActorLogic>(src: TLogic, ...[options]: xstate227.ConditionalRequired<[options?: ({
1563
1563
  id?: never;
1564
1564
  systemId?: string;
1565
- input?: xstate241.InputFrom<TLogic> | undefined;
1565
+ input?: xstate227.InputFrom<TLogic> | undefined;
1566
1566
  syncSnapshot?: boolean;
1567
- } & { [K in xstate241.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate241.IsNotNever<xstate241.RequiredLogicInput<TLogic>>>): xstate241.ActorRefFromLogic<TLogic>;
1567
+ } & { [K in xstate227.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate227.IsNotNever<xstate227.RequiredLogicInput<TLogic>>>): xstate227.ActorRefFromLogic<TLogic>;
1568
1568
  };
1569
1569
  input: {
1570
1570
  converters?: Array<Converter>;
@@ -1575,7 +1575,7 @@ declare const editorMachine: xstate241.StateMachine<{
1575
1575
  schema: EditorSchema;
1576
1576
  initialValue?: Array<PortableTextBlock>;
1577
1577
  };
1578
- self: xstate241.ActorRef<xstate241.MachineSnapshot<{
1578
+ self: xstate227.ActorRef<xstate227.MachineSnapshot<{
1579
1579
  behaviors: Set<BehaviorConfig>;
1580
1580
  behaviorsSorted: boolean;
1581
1581
  converters: Set<Converter>;
@@ -1640,7 +1640,7 @@ declare const editorMachine: xstate241.StateMachine<{
1640
1640
  type: "dragend";
1641
1641
  } | {
1642
1642
  type: "drop";
1643
- }, Record<string, xstate241.AnyActorRef | undefined>, xstate241.StateValue, string, unknown, any, any>, InternalPatchEvent | MutationEvent | PatchesEvent | {
1643
+ }, Record<string, xstate227.AnyActorRef | undefined>, xstate227.StateValue, string, unknown, any, any>, InternalPatchEvent | MutationEvent | PatchesEvent | {
1644
1644
  type: "update readOnly";
1645
1645
  readOnly: boolean;
1646
1646
  } | {
@@ -1687,10 +1687,10 @@ declare const editorMachine: xstate241.StateMachine<{
1687
1687
  type: "dragend";
1688
1688
  } | {
1689
1689
  type: "drop";
1690
- }, xstate241.AnyEventObject>;
1690
+ }, xstate227.AnyEventObject>;
1691
1691
  }) => {
1692
1692
  behaviors: Set<{
1693
- behavior: Behavior<"*" | "split" | `custom.${string}` | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "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" | "history.*" | "split.*" | "delete.*" | "select.*" | "deserialize.*" | "serialize.*" | "annotation.*" | "block.*" | "child.*" | "decorator.*" | "insert.*" | "move.*" | "deserialization.*" | "list item.*" | "serialization.*" | "style.*" | "clipboard.*" | "drag.*" | "keyboard.*" | "mouse.*", true, {
1693
+ behavior: Behavior<"*" | "split" | `custom.${string}` | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "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" | "style.*" | "history.*" | "split.*" | "delete.*" | "select.*" | "deserialize.*" | "serialize.*" | "annotation.*" | "block.*" | "child.*" | "decorator.*" | "insert.*" | "move.*" | "deserialization.*" | "list item.*" | "serialization.*" | "clipboard.*" | "drag.*" | "keyboard.*" | "mouse.*", true, {
1694
1694
  type: StrictExtract<"split" | "annotation.add" | "annotation.remove" | "block.set" | "block.unset" | "child.set" | "child.unset" | "decorator.add" | "decorator.remove" | "delete" | "history.redo" | "history.undo" | "insert.block" | "insert.child" | "insert.text" | "move.backward" | "move.block" | "move.forward" | "select" | "annotation.set" | "annotation.toggle" | "decorator.toggle" | "delete.backward" | "delete.block" | "delete.child" | "delete.forward" | "delete.text" | "deserialize" | "deserialize.data" | "deserialization.success" | "deserialization.failure" | "insert.blocks" | "insert.break" | "insert.inline object" | "insert.soft break" | "insert.span" | "list item.add" | "list item.remove" | "list item.toggle" | "move.block down" | "move.block up" | "select.block" | "select.previous block" | "select.next block" | "serialize" | "serialize.data" | "serialization.success" | "serialization.failure" | "style.add" | "style.remove" | "style.toggle", "annotation.add">;
1695
1695
  annotation: {
1696
1696
  name: string;
@@ -1989,7 +1989,7 @@ declare const editorMachine: xstate241.StateMachine<{
1989
1989
  readonly actions: "remove behavior from context";
1990
1990
  };
1991
1991
  readonly 'update maxBlocks': {
1992
- readonly actions: xstate241.ActionFunction<{
1992
+ readonly actions: xstate227.ActionFunction<{
1993
1993
  behaviors: Set<BehaviorConfig>;
1994
1994
  behaviorsSorted: boolean;
1995
1995
  converters: Set<Converter>;
@@ -2060,7 +2060,7 @@ declare const editorMachine: xstate241.StateMachine<{
2060
2060
  }, undefined, never, never, never, never, never>;
2061
2061
  };
2062
2062
  readonly 'update selection': {
2063
- readonly actions: readonly [xstate241.ActionFunction<{
2063
+ readonly actions: readonly [xstate227.ActionFunction<{
2064
2064
  behaviors: Set<BehaviorConfig>;
2065
2065
  behaviorsSorted: boolean;
2066
2066
  converters: Set<Converter>;
@@ -2128,7 +2128,7 @@ declare const editorMachine: xstate241.StateMachine<{
2128
2128
  type: "dragend";
2129
2129
  } | {
2130
2130
  type: "drop";
2131
- }, undefined, never, never, never, never, never>, xstate241.ActionFunction<{
2131
+ }, undefined, never, never, never, never, never>, xstate227.ActionFunction<{
2132
2132
  behaviors: Set<BehaviorConfig>;
2133
2133
  behaviorsSorted: boolean;
2134
2134
  converters: Set<Converter>;
@@ -2198,7 +2198,7 @@ declare const editorMachine: xstate241.StateMachine<{
2198
2198
  type: "drop";
2199
2199
  }, undefined, never, never, never, never, InternalPatchEvent | MutationEvent | PatchesEvent | {
2200
2200
  type: "blurred";
2201
- event: react12.FocusEvent<HTMLDivElement, Element>;
2201
+ event: react20.FocusEvent<HTMLDivElement, Element>;
2202
2202
  } | {
2203
2203
  type: "done loading";
2204
2204
  } | {
@@ -2210,7 +2210,7 @@ declare const editorMachine: xstate241.StateMachine<{
2210
2210
  data: unknown;
2211
2211
  } | {
2212
2212
  type: "focused";
2213
- event: react12.FocusEvent<HTMLDivElement, Element>;
2213
+ event: react20.FocusEvent<HTMLDivElement, Element>;
2214
2214
  } | {
2215
2215
  type: "invalid value";
2216
2216
  resolution: InvalidValueResolution | null;
@@ -2230,7 +2230,7 @@ declare const editorMachine: xstate241.StateMachine<{
2230
2230
  }>];
2231
2231
  };
2232
2232
  readonly 'set drag ghost': {
2233
- readonly actions: xstate241.ActionFunction<{
2233
+ readonly actions: xstate227.ActionFunction<{
2234
2234
  behaviors: Set<BehaviorConfig>;
2235
2235
  behaviorsSorted: boolean;
2236
2236
  converters: Set<Converter>;
@@ -2313,7 +2313,7 @@ declare const editorMachine: xstate241.StateMachine<{
2313
2313
  readonly actions: readonly ["sort behaviors", "handle behavior event"];
2314
2314
  readonly guard: ({
2315
2315
  event
2316
- }: xstate_guards14.GuardArgs<{
2316
+ }: xstate_guards12.GuardArgs<{
2317
2317
  behaviors: Set<BehaviorConfig>;
2318
2318
  behaviorsSorted: boolean;
2319
2319
  converters: Set<Converter>;
@@ -2350,7 +2350,7 @@ declare const editorMachine: xstate241.StateMachine<{
2350
2350
  readonly target: "#editor.edit mode.read only.read only";
2351
2351
  readonly guard: ({
2352
2352
  context
2353
- }: xstate_guards14.GuardArgs<{
2353
+ }: xstate_guards12.GuardArgs<{
2354
2354
  behaviors: Set<BehaviorConfig>;
2355
2355
  behaviorsSorted: boolean;
2356
2356
  converters: Set<Converter>;
@@ -2383,7 +2383,7 @@ declare const editorMachine: xstate241.StateMachine<{
2383
2383
  readonly 'update readOnly': {
2384
2384
  readonly guard: ({
2385
2385
  event
2386
- }: xstate_guards14.GuardArgs<{
2386
+ }: xstate_guards12.GuardArgs<{
2387
2387
  behaviors: Set<BehaviorConfig>;
2388
2388
  behaviorsSorted: boolean;
2389
2389
  converters: Set<Converter>;
@@ -2417,7 +2417,7 @@ declare const editorMachine: xstate241.StateMachine<{
2417
2417
  readonly 'update readOnly': {
2418
2418
  readonly guard: ({
2419
2419
  event
2420
- }: xstate_guards14.GuardArgs<{
2420
+ }: xstate_guards12.GuardArgs<{
2421
2421
  behaviors: Set<BehaviorConfig>;
2422
2422
  behaviorsSorted: boolean;
2423
2423
  converters: Set<Converter>;
@@ -2450,7 +2450,7 @@ declare const editorMachine: xstate241.StateMachine<{
2450
2450
  };
2451
2451
  readonly focus: {
2452
2452
  readonly target: ".focusing";
2453
- readonly actions: readonly [xstate241.ActionFunction<{
2453
+ readonly actions: readonly [xstate227.ActionFunction<{
2454
2454
  behaviors: Set<BehaviorConfig>;
2455
2455
  behaviorsSorted: boolean;
2456
2456
  converters: Set<Converter>;
@@ -2528,7 +2528,7 @@ declare const editorMachine: xstate241.StateMachine<{
2528
2528
  readonly exit: readonly [() => void];
2529
2529
  readonly on: {
2530
2530
  readonly dragstart: {
2531
- readonly actions: readonly [xstate241.ActionFunction<{
2531
+ readonly actions: readonly [xstate227.ActionFunction<{
2532
2532
  behaviors: Set<BehaviorConfig>;
2533
2533
  behaviorsSorted: boolean;
2534
2534
  converters: Set<Converter>;
@@ -2631,7 +2631,7 @@ declare const editorMachine: xstate241.StateMachine<{
2631
2631
  readonly entry: readonly [() => void];
2632
2632
  readonly exit: readonly [() => void, ({
2633
2633
  context
2634
- }: xstate241.ActionArgs<{
2634
+ }: xstate227.ActionArgs<{
2635
2635
  behaviors: Set<BehaviorConfig>;
2636
2636
  behaviorsSorted: boolean;
2637
2637
  converters: Set<Converter>;
@@ -2743,7 +2743,7 @@ declare const editorMachine: xstate241.StateMachine<{
2743
2743
  type: "dragend";
2744
2744
  } | {
2745
2745
  type: "drop";
2746
- }>) => void, xstate241.ActionFunction<{
2746
+ }>) => void, xstate227.ActionFunction<{
2747
2747
  behaviors: Set<BehaviorConfig>;
2748
2748
  behaviorsSorted: boolean;
2749
2749
  converters: Set<Converter>;
@@ -2855,7 +2855,7 @@ declare const editorMachine: xstate241.StateMachine<{
2855
2855
  type: "dragend";
2856
2856
  } | {
2857
2857
  type: "drop";
2858
- }, undefined, never, never, never, never, never>, xstate241.ActionFunction<{
2858
+ }, undefined, never, never, never, never, never>, xstate227.ActionFunction<{
2859
2859
  behaviors: Set<BehaviorConfig>;
2860
2860
  behaviorsSorted: boolean;
2861
2861
  converters: Set<Converter>;
@@ -3014,7 +3014,7 @@ declare const editorMachine: xstate241.StateMachine<{
3014
3014
  readonly exit: readonly [() => void];
3015
3015
  readonly on: {
3016
3016
  readonly patches: {
3017
- readonly actions: readonly [xstate241.ActionFunction<{
3017
+ readonly actions: readonly [xstate227.ActionFunction<{
3018
3018
  behaviors: Set<BehaviorConfig>;
3019
3019
  behaviorsSorted: boolean;
3020
3020
  converters: Set<Converter>;
@@ -3081,7 +3081,7 @@ declare const editorMachine: xstate241.StateMachine<{
3081
3081
  type: "drop";
3082
3082
  }, undefined, never, never, never, never, InternalPatchEvent | MutationEvent | PatchesEvent | {
3083
3083
  type: "blurred";
3084
- event: react12.FocusEvent<HTMLDivElement, Element>;
3084
+ event: react20.FocusEvent<HTMLDivElement, Element>;
3085
3085
  } | {
3086
3086
  type: "done loading";
3087
3087
  } | {
@@ -3093,7 +3093,7 @@ declare const editorMachine: xstate241.StateMachine<{
3093
3093
  data: unknown;
3094
3094
  } | {
3095
3095
  type: "focused";
3096
- event: react12.FocusEvent<HTMLDivElement, Element>;
3096
+ event: react20.FocusEvent<HTMLDivElement, Element>;
3097
3097
  } | {
3098
3098
  type: "invalid value";
3099
3099
  resolution: InvalidValueResolution | null;
package/lib/index.cjs CHANGED
@@ -563,7 +563,7 @@ function toSlateRange(snapshot) {
563
563
  if (!snapshot.context.selection)
564
564
  return null;
565
565
  if (util_isEmptyTextBlock.isEqualSelectionPoints(snapshot.context.selection.anchor, snapshot.context.selection.focus)) {
566
- const anchorPoint2 = toSlateSelectionPoint(snapshot, snapshot.context.selection.anchor, snapshot.context.selection.backward ? "forward" : "backward");
566
+ const anchorPoint2 = toSlateSelectionPoint(snapshot, snapshot.context.selection.anchor, snapshot.context.selection.backward ? "backward" : "forward");
567
567
  return anchorPoint2 ? {
568
568
  anchor: anchorPoint2,
569
569
  focus: anchorPoint2