@portabletext/editor 7.3.0 → 7.3.1

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,4 +1,4 @@
1
- import * as _portabletext_schema6 from "@portabletext/schema";
1
+ import * as _portabletext_schema5 from "@portabletext/schema";
2
2
  import { AnnotationDefinition, AnnotationSchemaType, AnnotationSchemaType as AnnotationSchemaType$1, BaseDefinition, BlockObjectDefinition, BlockObjectSchemaType, BlockObjectSchemaType as BlockObjectSchemaType$1, DecoratorDefinition, DecoratorSchemaType, DecoratorSchemaType as DecoratorSchemaType$1, FieldDefinition, FieldDefinition as FieldDefinition$1, InlineObjectDefinition, InlineObjectSchemaType, InlineObjectSchemaType as InlineObjectSchemaType$1, ListDefinition, ListSchemaType, ListSchemaType as ListSchemaType$1, OfDefinition, PortableTextBlock, PortableTextBlock as PortableTextBlock$1, PortableTextChild, PortableTextChild as PortableTextChild$1, PortableTextObject, PortableTextObject as PortableTextObject$1, PortableTextSpan, PortableTextSpan as PortableTextSpan$1, PortableTextTextBlock, PortableTextTextBlock as PortableTextTextBlock$1, Schema, SchemaDefinition, SchemaDefinition as SchemaDefinition$1, StyleDefinition, StyleSchemaType, StyleSchemaType as StyleSchemaType$1, TypedObject, defineSchema } from "@portabletext/schema";
3
3
  import * as xstate35 from "xstate";
4
4
  import { ActorRef, ActorRefFrom, EventObject, Snapshot } from "xstate";
@@ -855,7 +855,7 @@ declare class PortableTextEditor {
855
855
  */
856
856
  static delete: (editor: PortableTextEditor, selection: EditorSelection, options?: EditableAPIDeleteOptions) => void;
857
857
  static findDOMNode: (editor: PortableTextEditor, element: PortableTextBlock | PortableTextChild) => Node | undefined;
858
- static findByPath: (editor: PortableTextEditor, path: Path) => [_portabletext_schema6.PortableTextTextBlock<PortableTextObject | _portabletext_schema6.PortableTextSpan> | PortableTextObject | _portabletext_schema6.PortableTextSpan | undefined, Path | undefined];
858
+ static findByPath: (editor: PortableTextEditor, path: Path) => [_portabletext_schema5.PortableTextTextBlock<PortableTextObject | _portabletext_schema5.PortableTextSpan> | PortableTextObject | _portabletext_schema5.PortableTextSpan | undefined, Path | undefined];
859
859
  /**
860
860
  * @deprecated
861
861
  * Use `editor.send(...)` instead
package/lib/index.js CHANGED
@@ -16368,6 +16368,8 @@ function isTypeAlreadyRegistered(maps, attempting, type) {
16368
16368
  };
16369
16369
  if (claimedAs(attempting))
16370
16370
  return console.warn(`registerNode: type "${type}" is already registered as a ${attempting}. Registration skipped.`), !0;
16371
+ if (type === "*")
16372
+ return !1;
16371
16373
  const exclusiveKinds = ["container", "textBlock", "span"], allKinds = ["container", "textBlock", "span", "blockObject", "inlineObject"];
16372
16374
  for (const otherKind of allKinds) {
16373
16375
  if (otherKind === attempting || attempting === "blockObject" && otherKind === "inlineObject" || attempting === "inlineObject" && otherKind === "blockObject")