@manuscripts/body-editor 2.7.13 → 2.7.14

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.
@@ -96,6 +96,11 @@ const canInsert = (type) => (state) => {
96
96
  $from.pos === $to.pos) {
97
97
  return false;
98
98
  }
99
+ if ((0, transform_1.isElementNodeType)(type) &&
100
+ type !== transform_1.schema.nodes.paragraph &&
101
+ (0, prosemirror_utils_1.findParentNodeOfType)(transform_1.schema.nodes.backmatter)(state.selection)) {
102
+ return false;
103
+ }
99
104
  const initDepth = ((_a = (0, prosemirror_utils_1.findParentNodeOfType)(transform_1.schema.nodes.box_element)(state.selection)) === null || _a === void 0 ? void 0 : _a.depth) ||
100
105
  0;
101
106
  for (let d = $from.depth; d >= initDepth; d--) {
@@ -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.7.13';
4
+ exports.VERSION = '2.7.14';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -88,6 +88,11 @@ export const canInsert = (type) => (state) => {
88
88
  $from.pos === $to.pos) {
89
89
  return false;
90
90
  }
91
+ if (isElementNodeType(type) &&
92
+ type !== schema.nodes.paragraph &&
93
+ findParentNodeOfType(schema.nodes.backmatter)(state.selection)) {
94
+ return false;
95
+ }
91
96
  const initDepth = ((_a = findParentNodeOfType(schema.nodes.box_element)(state.selection)) === null || _a === void 0 ? void 0 : _a.depth) ||
92
97
  0;
93
98
  for (let d = $from.depth; d >= initDepth; d--) {
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.7.13';
1
+ export const VERSION = '2.7.14';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.13";
1
+ export declare const VERSION = "2.7.14";
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.7.13",
4
+ "version": "2.7.14",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",