@manuscripts/body-editor 2.2.6 → 2.2.7

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.
@@ -480,7 +480,9 @@ const insertInlineFootnote = (kind) => (state, dispatch) => {
480
480
  };
481
481
  exports.insertInlineFootnote = insertInlineFootnote;
482
482
  const insertGraphicalAbstract = (state, dispatch, view) => {
483
- if ((0, utils_1.getChildOfType)(state.doc, transform_1.schema.nodes.graphical_abstract_section, true)) {
483
+ const GraphicalAbstractSectionNode = (0, prosemirror_utils_1.findChildrenByType)(state.doc, transform_1.schema.nodes.graphical_abstract_section)[0];
484
+ if ((0, utils_1.getChildOfType)(state.doc, transform_1.schema.nodes.graphical_abstract_section, true) &&
485
+ !(0, track_changes_utils_1.isRejectedInsert)(GraphicalAbstractSectionNode.node)) {
484
486
  return false;
485
487
  }
486
488
  const abstracts = (0, prosemirror_utils_1.findChildrenByType)(state.doc, transform_1.schema.nodes.abstracts)[0];
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '2.2.6';
4
+ exports.VERSION = '2.2.7';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -453,7 +453,9 @@ export const insertInlineFootnote = (kind) => (state, dispatch) => {
453
453
  return true;
454
454
  };
455
455
  export const insertGraphicalAbstract = (state, dispatch, view) => {
456
- if (getChildOfType(state.doc, schema.nodes.graphical_abstract_section, true)) {
456
+ const GraphicalAbstractSectionNode = findChildrenByType(state.doc, schema.nodes.graphical_abstract_section)[0];
457
+ if (getChildOfType(state.doc, schema.nodes.graphical_abstract_section, true) &&
458
+ !isRejectedInsert(GraphicalAbstractSectionNode.node)) {
457
459
  return false;
458
460
  }
459
461
  const abstracts = findChildrenByType(state.doc, schema.nodes.abstracts)[0];
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.2.6';
1
+ export const VERSION = '2.2.7';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.2.6";
1
+ export declare const VERSION = "2.2.7";
2
2
  export declare const MATHJAX_VERSION = "3.2.2";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/body-editor",
3
3
  "description": "Prosemirror components for editing and viewing manuscripts",
4
- "version": "2.2.6",
4
+ "version": "2.2.7",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",