@manuscripts/body-editor 1.5.14 → 1.5.15

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.
@@ -15,6 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ const transform_1 = require("@manuscripts/transform");
18
19
  const prosemirror_commands_1 = require("prosemirror-commands");
19
20
  const prosemirror_model_1 = require("prosemirror-model");
20
21
  const prosemirror_state_1 = require("prosemirror-state");
@@ -80,6 +81,9 @@ const leaveSectionTitle = (state, dispatch, view) => {
80
81
  if ($cursor.parent.type !== $cursor.parent.type.schema.nodes.section_title) {
81
82
  return false;
82
83
  }
84
+ if ((0, transform_1.isInGraphicalAbstractSection)($cursor)) {
85
+ return false;
86
+ }
83
87
  if (!(0, commands_1.isAtEndOfTextBlock)(state, $cursor, view)) {
84
88
  return false;
85
89
  }
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { isInGraphicalAbstractSection, } from '@manuscripts/transform';
16
17
  import { chainCommands } from 'prosemirror-commands';
17
18
  import { Fragment, Slice } from 'prosemirror-model';
18
19
  import { Selection, TextSelection } from 'prosemirror-state';
@@ -78,6 +79,9 @@ const leaveSectionTitle = (state, dispatch, view) => {
78
79
  if ($cursor.parent.type !== $cursor.parent.type.schema.nodes.section_title) {
79
80
  return false;
80
81
  }
82
+ if (isInGraphicalAbstractSection($cursor)) {
83
+ return false;
84
+ }
81
85
  if (!isAtEndOfTextBlock(state, $cursor, view)) {
82
86
  return false;
83
87
  }
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": "1.5.14",
4
+ "version": "1.5.15",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -33,7 +33,7 @@
33
33
  "@manuscripts/style-guide": "1.4.6",
34
34
  "@manuscripts/title-editor": "^1.1.0",
35
35
  "@manuscripts/track-changes-plugin": "^1.7.4",
36
- "@manuscripts/transform": "1.5.7",
36
+ "@manuscripts/transform": "1.5.8",
37
37
  "astrocite-eutils": "^0.16.4",
38
38
  "axios": "^1.2.2",
39
39
  "codemirror": "^5.58.1",