@portabletext/editor 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -435,6 +435,13 @@ This monorepo also contains additional libraries that can be used with the Porta
435
435
  - 💻 [./packages/keyboard-shortcuts](./packages/keyboard-shortcuts/)
436
436
  - 📦 [@portabletext/keyboard-shortcuts](https://www.npmjs.com/package/@portabletext/keyboard-shortcuts)
437
437
 
438
+ ### `@portabletext/test`
439
+
440
+ > Testing utilities for the Portable Text Editor
441
+
442
+ - 💻 [./packages/test](./packages/test/)
443
+ - 📦 [@portabletext/test](https://www.npmjs.com/package/@portabletext/test)
444
+
438
445
  ### `@portabletext/toolbar`
439
446
 
440
447
  > Powered by [Behaviors](https://www.portabletext.org/concepts/behavior/) and [State Machines](https://stately.ai/docs/xstate), `@portabletext/toolbar` is a collection of robust React hooks for building toolbars and related UI components
@@ -1701,6 +1701,7 @@ declare const editorMachine: xstate229.StateMachine<{
1701
1701
  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">;
1702
1702
  annotation: {
1703
1703
  name: string;
1704
+ _key?: string;
1704
1705
  value: {
1705
1706
  [prop: string]: unknown;
1706
1707
  };
@@ -3222,6 +3223,7 @@ type SyntheticBehaviorEvent = {
3222
3223
  type: StrictExtract<SyntheticBehaviorEventType, 'annotation.add'>;
3223
3224
  annotation: {
3224
3225
  name: string;
3226
+ _key?: string;
3225
3227
  value: {
3226
3228
  [prop: string]: unknown;
3227
3229
  };
package/lib/index.js CHANGED
@@ -4135,6 +4135,7 @@ const addAnnotationOperationImplementation = ({
4135
4135
  const parsedAnnotation = parseAnnotation({
4136
4136
  annotation: {
4137
4137
  _type: operation.annotation.name,
4138
+ _key: operation.annotation._key,
4138
4139
  ...operation.annotation.value
4139
4140
  },
4140
4141
  context,