@manuscripts/body-editor 3.2.1 → 3.2.3

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.
@@ -260,7 +260,7 @@ const insertTable = (config, state, dispatch) => {
260
260
  if (!pos) {
261
261
  return false;
262
262
  }
263
- const node = (0, exports.createAndFillTableElement)(config);
263
+ const node = (0, exports.createAndFillTableElement)(undefined, config);
264
264
  const tr = state.tr.insert(pos, node);
265
265
  (0, accessibility_element_1.expandAccessibilitySection)(tr, node);
266
266
  tr.setSelection(prosemirror_state_1.NodeSelection.create(tr.doc, pos)).scrollIntoView();
@@ -264,7 +264,9 @@ class ContextMenu {
264
264
  menu.append(this.createMenuSection((e) => e.append(...items)));
265
265
  }
266
266
  }
267
- if (!readonlyTypes.includes(type) &&
267
+ if (!(type === transform_1.schema.nodes.figure_element &&
268
+ (0, transform_1.isInGraphicalAbstractSection)($pos)) &&
269
+ !readonlyTypes.includes(type) &&
268
270
  !readonlyTypes.includes($pos.parent.type)) {
269
271
  menu.appendChild(this.createMenuSection((section) => {
270
272
  let nodeName = transform_1.nodeNames.get(type) || '';
@@ -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 = '3.2.1';
4
+ exports.VERSION = '3.2.3';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -245,7 +245,7 @@ export const insertTable = (config, state, dispatch) => {
245
245
  if (!pos) {
246
246
  return false;
247
247
  }
248
- const node = createAndFillTableElement(config);
248
+ const node = createAndFillTableElement(undefined, config);
249
249
  const tr = state.tr.insert(pos, node);
250
250
  expandAccessibilitySection(tr, node);
251
251
  tr.setSelection(NodeSelection.create(tr.doc, pos)).scrollIntoView();
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ImageDefaultIcon, ImageLeftIcon, ImageRightIcon, TriangleCollapsedIcon, } from '@manuscripts/style-guide';
17
- import { isSectionTitleNode, nodeNames, schema, } from '@manuscripts/transform';
17
+ import { isInGraphicalAbstractSection, isSectionTitleNode, nodeNames, schema, } from '@manuscripts/transform';
18
18
  import { findChildrenByType } from 'prosemirror-utils';
19
19
  import { createElement } from 'react';
20
20
  import { renderToStaticMarkup } from 'react-dom/server';
@@ -260,7 +260,9 @@ export class ContextMenu {
260
260
  menu.append(this.createMenuSection((e) => e.append(...items)));
261
261
  }
262
262
  }
263
- if (!readonlyTypes.includes(type) &&
263
+ if (!(type === schema.nodes.figure_element &&
264
+ isInGraphicalAbstractSection($pos)) &&
265
+ !readonlyTypes.includes(type) &&
264
266
  !readonlyTypes.includes($pos.parent.type)) {
265
267
  menu.appendChild(this.createMenuSection((section) => {
266
268
  let nodeName = nodeNames.get(type) || '';
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.2.1';
1
+ export const VERSION = '3.2.3';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.2.1";
1
+ export declare const VERSION = "3.2.3";
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": "3.2.1",
4
+ "version": "3.2.3",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -25,7 +25,8 @@
25
25
  "preversion": "npm-run-all --parallel typecheck lint test",
26
26
  "test": "jest --runInBand",
27
27
  "typecheck": "tsc --noEmit",
28
- "version": "pnpm build"
28
+ "version": "pnpm build",
29
+ "unlink-all": "rm pnpm-workspace.yaml && pnpm install"
29
30
  },
30
31
  "dependencies": {
31
32
  "@iarna/word-count": "1.1.2",