@portabletext/editor 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as _portabletext_schema6 from "@portabletext/schema";
2
2
  import { AnnotationDefinition, AnnotationSchemaType, BaseDefinition, BlockObjectDefinition, BlockObjectSchemaType, DecoratorDefinition, DecoratorSchemaType, FieldDefinition, InlineObjectDefinition, InlineObjectSchemaType, ListDefinition, ListSchemaType, 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, Schema, SchemaDefinition, SchemaDefinition as SchemaDefinition$1, StyleDefinition, StyleSchemaType, TypedObject, defineSchema } from "@portabletext/schema";
3
3
  import { BaseRange, Descendant, Operation, Range } from "slate";
4
- import * as xstate72 from "xstate";
4
+ import * as xstate71 from "xstate";
5
5
  import { ActorRef, ActorRefFrom, EventObject, Snapshot } from "xstate";
6
6
  import * as react10 from "react";
7
7
  import React$1, { BaseSyntheticEvent, ClipboardEvent, Component, FocusEvent, JSX, KeyboardEvent as KeyboardEvent$1, MutableRefObject, PropsWithChildren, ReactElement, RefObject, TextareaHTMLAttributes } from "react";
@@ -148,6 +148,7 @@ interface PortableTextSlateEditor extends ReactEditor {
148
148
  remotePatches: Array<RemotePatch>;
149
149
  undoStepId: string | undefined;
150
150
  value: Array<PortableTextBlock>;
151
+ isDeferringMutations: boolean;
151
152
  isNormalizingNode: boolean;
152
153
  isPatching: boolean;
153
154
  isPerformingBehaviorOperation: boolean;
@@ -1365,7 +1366,7 @@ type EditorActor = ActorRefFrom<typeof editorMachine>;
1365
1366
  /**
1366
1367
  * @internal
1367
1368
  */
1368
- declare const editorMachine: xstate72.StateMachine<{
1369
+ declare const editorMachine: xstate71.StateMachine<{
1369
1370
  behaviors: Set<BehaviorConfig>;
1370
1371
  behaviorsSorted: boolean;
1371
1372
  converters: Set<Converter>;
@@ -1427,46 +1428,46 @@ declare const editorMachine: xstate72.StateMachine<{
1427
1428
  editor: PortableTextSlateEditor;
1428
1429
  }, {}, never, {
1429
1430
  type: "add behavior to context";
1430
- params: xstate72.NonReducibleUnknown;
1431
+ params: xstate71.NonReducibleUnknown;
1431
1432
  } | {
1432
1433
  type: "remove behavior from context";
1433
- params: xstate72.NonReducibleUnknown;
1434
+ params: xstate71.NonReducibleUnknown;
1434
1435
  } | {
1435
1436
  type: "add slate editor to context";
1436
- params: xstate72.NonReducibleUnknown;
1437
+ params: xstate71.NonReducibleUnknown;
1437
1438
  } | {
1438
1439
  type: "emit patch event";
1439
- params: xstate72.NonReducibleUnknown;
1440
+ params: xstate71.NonReducibleUnknown;
1440
1441
  } | {
1441
1442
  type: "emit mutation event";
1442
- params: xstate72.NonReducibleUnknown;
1443
+ params: xstate71.NonReducibleUnknown;
1443
1444
  } | {
1444
1445
  type: "emit read only";
1445
- params: xstate72.NonReducibleUnknown;
1446
+ params: xstate71.NonReducibleUnknown;
1446
1447
  } | {
1447
1448
  type: "emit editable";
1448
- params: xstate72.NonReducibleUnknown;
1449
+ params: xstate71.NonReducibleUnknown;
1449
1450
  } | {
1450
1451
  type: "defer event";
1451
- params: xstate72.NonReducibleUnknown;
1452
+ params: xstate71.NonReducibleUnknown;
1452
1453
  } | {
1453
1454
  type: "emit pending events";
1454
- params: xstate72.NonReducibleUnknown;
1455
+ params: xstate71.NonReducibleUnknown;
1455
1456
  } | {
1456
1457
  type: "emit ready";
1457
- params: xstate72.NonReducibleUnknown;
1458
+ params: xstate71.NonReducibleUnknown;
1458
1459
  } | {
1459
1460
  type: "clear pending events";
1460
- params: xstate72.NonReducibleUnknown;
1461
+ params: xstate71.NonReducibleUnknown;
1461
1462
  } | {
1462
1463
  type: "defer incoming patches";
1463
- params: xstate72.NonReducibleUnknown;
1464
+ params: xstate71.NonReducibleUnknown;
1464
1465
  } | {
1465
1466
  type: "emit pending incoming patches";
1466
- params: xstate72.NonReducibleUnknown;
1467
+ params: xstate71.NonReducibleUnknown;
1467
1468
  } | {
1468
1469
  type: "clear pending incoming patches";
1469
- params: xstate72.NonReducibleUnknown;
1470
+ params: xstate71.NonReducibleUnknown;
1470
1471
  } | {
1471
1472
  type: "handle blur";
1472
1473
  params: unknown;
@@ -1478,7 +1479,7 @@ declare const editorMachine: xstate72.StateMachine<{
1478
1479
  params: unknown;
1479
1480
  } | {
1480
1481
  type: "sort behaviors";
1481
- params: xstate72.NonReducibleUnknown;
1482
+ params: xstate71.NonReducibleUnknown;
1482
1483
  }, {
1483
1484
  type: "slate is busy";
1484
1485
  params: unknown;
@@ -1508,7 +1509,7 @@ declare const editorMachine: xstate72.StateMachine<{
1508
1509
  readOnly?: boolean;
1509
1510
  schema: EditorSchema;
1510
1511
  initialValue?: Array<PortableTextBlock>;
1511
- }, xstate72.NonReducibleUnknown, InternalPatchEvent | MutationEvent | PatchesEvent | {
1512
+ }, xstate71.NonReducibleUnknown, InternalPatchEvent | MutationEvent | PatchesEvent | {
1512
1513
  type: "blurred";
1513
1514
  event: react10.FocusEvent<HTMLDivElement, Element>;
1514
1515
  } | {
@@ -1539,7 +1540,7 @@ declare const editorMachine: xstate72.StateMachine<{
1539
1540
  } | {
1540
1541
  type: "value changed";
1541
1542
  value: Array<PortableTextBlock> | undefined;
1542
- }, xstate72.MetaObject, {
1543
+ }, xstate71.MetaObject, {
1543
1544
  id: "editor";
1544
1545
  states: {
1545
1546
  readonly 'edit mode': {