@manuscripts/body-editor 2.0.58 → 2.2.1

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.
@@ -398,6 +398,11 @@ const insertFootnote = (state, tr, footnote) => {
398
398
  else {
399
399
  const footnoteElement = (0, prosemirror_utils_1.findChildrenByType)(footnotesSection.node, transform_1.schema.nodes.footnotes_element).pop();
400
400
  if (footnoteElement) {
401
+ if ((0, track_changes_utils_1.isDeleted)(footnoteElement.node)) {
402
+ const footnoteElementPos = footnotesSection.pos + footnoteElement.pos + 1;
403
+ const updatedAttrs = Object.assign(Object.assign({}, footnoteElement.node.attrs), { dataTracked: null });
404
+ tr.setNodeMarkup(footnoteElementPos, undefined, updatedAttrs, footnoteElement.node.marks);
405
+ }
401
406
  const pos = footnotesSection.pos +
402
407
  footnoteElement.pos +
403
408
  footnoteElement.node.nodeSize -
@@ -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.0.58';
4
+ exports.VERSION = '2.2.1';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -375,6 +375,11 @@ export const insertFootnote = (state, tr, footnote) => {
375
375
  else {
376
376
  const footnoteElement = findChildrenByType(footnotesSection.node, schema.nodes.footnotes_element).pop();
377
377
  if (footnoteElement) {
378
+ if (isDeleted(footnoteElement.node)) {
379
+ const footnoteElementPos = footnotesSection.pos + footnoteElement.pos + 1;
380
+ const updatedAttrs = Object.assign(Object.assign({}, footnoteElement.node.attrs), { dataTracked: null });
381
+ tr.setNodeMarkup(footnoteElementPos, undefined, updatedAttrs, footnoteElement.node.marks);
382
+ }
378
383
  const pos = footnotesSection.pos +
379
384
  footnoteElement.pos +
380
385
  footnoteElement.node.nodeSize -
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.0.58';
1
+ export const VERSION = '2.2.1';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.58";
1
+ export declare const VERSION = "2.2.1";
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.0.58",
4
+ "version": "2.2.1",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -34,7 +34,7 @@
34
34
  "@manuscripts/library": "1.3.11",
35
35
  "@manuscripts/style-guide": "2.0.19",
36
36
  "@manuscripts/track-changes-plugin": "1.7.22",
37
- "@manuscripts/transform": "2.4.0",
37
+ "@manuscripts/transform": "2.6.0",
38
38
  "@popperjs/core": "^2.11.8",
39
39
  "astrocite-eutils": "^0.16.4",
40
40
  "codemirror": "^5.58.1",