@portabletext/editor 7.10.4 → 7.10.6

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/index.js CHANGED
@@ -5934,7 +5934,7 @@ function RenderSpan(props) {
5934
5934
  if (decoratorSchemaTypes.includes(mark_0))
5935
5935
  return [];
5936
5936
  const markDef_0 = block?.markDefs?.find((markDef) => markDef._key === mark_0);
5937
- return markDef_0 ? [markDef_0] : (console.warn(`Mark ${mark_0} is neither a decorator in the schema nor a markDef key in the block. The mark is kept in the value but does not render. If it is a decorator, add it to the schema.`), []);
5937
+ return markDef_0 ? [markDef_0] : [];
5938
5938
  }), children = props.children;
5939
5939
  for (const mark_1 of decorators) {
5940
5940
  const decoratorSchemaType = subSchema.decorators.find((dec) => dec.name === mark_1);
@@ -5942,7 +5942,7 @@ function RenderSpan(props) {
5942
5942
  }
5943
5943
  for (const annotationMarkDef of annotationMarkDefs) {
5944
5944
  const annotationSchemaType = subSchema.annotations.find((t) => t.name === annotationMarkDef._type);
5945
- annotationSchemaType || console.warn(`The schema has no annotation type ${annotationMarkDef._type}. The annotation is kept in the value but does not render. Add ${annotationMarkDef._type} to the schema to render it.`), annotationSchemaType && (block && props.renderAnnotation ? children = /* @__PURE__ */ jsx("span", { ref: spanRef, children: /* @__PURE__ */ jsx(RenderAnnotation, { renderAnnotation: props.renderAnnotation, block, editorElementRef: spanRef, focused, path: props.path, selected, schemaType: annotationSchemaType, value: annotationMarkDef, children }) }) : children = /* @__PURE__ */ jsx("span", { ref: spanRef, children }));
5945
+ annotationSchemaType && (block && props.renderAnnotation ? children = /* @__PURE__ */ jsx("span", { ref: spanRef, children: /* @__PURE__ */ jsx(RenderAnnotation, { renderAnnotation: props.renderAnnotation, block, editorElementRef: spanRef, focused, path: props.path, selected, schemaType: annotationSchemaType, value: annotationMarkDef, children }) }) : children = /* @__PURE__ */ jsx("span", { ref: spanRef, children }));
5946
5946
  }
5947
5947
  $[8] = block, $[9] = focused, $[10] = props.children, $[11] = props.leaf.marks, $[12] = props.path, $[13] = props.renderAnnotation, $[14] = props.renderDecorator, $[15] = selected, $[16] = subSchema.annotations, $[17] = subSchema.decorators, $[18] = annotationMarkDefs, $[19] = children;
5948
5948
  } else
@@ -18775,7 +18775,7 @@ function updateBlock({
18775
18775
  _key: oldChild._key
18776
18776
  }]
18777
18777
  });
18778
- const prevSibling = currentBlockChildIndex > 0 ? oldEngineBlock.children[currentBlockChildIndex - 1] : void 0;
18778
+ const prevSibling = currentBlockChildIndex > 0 ? engineBlock.children[currentBlockChildIndex - 1] : void 0;
18779
18779
  prevSibling ? editorEngine.apply({
18780
18780
  type: "insert",
18781
18781
  path: [{