@manuscripts/body-editor 1.10.8-LEAN-3589.0 → 1.10.8

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.
@@ -79,12 +79,8 @@ const orderTableFootnotes = (tr, footnotesElementWithPos, position) => {
79
79
  })
80
80
  .map(({ node }) => node);
81
81
  const { node: footnotesElement, pos } = footnotesElementWithPos;
82
- const footnoteElementPos = position + pos + 1;
83
- const oldDataTracked = footnotesElement.attrs.dataTracked;
84
- (0, track_changes_plugin_1.skipTracking)(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), prosemirror_model_1.Fragment.fromArray(orderedFootnotes)));
85
- if (oldDataTracked) {
86
- tr.setNodeMarkup(footnoteElementPos, transform_1.schema.nodes.footnotes_element, Object.assign(Object.assign({}, footnotesElement.attrs), { dataTracked: oldDataTracked }));
87
- }
82
+ const footnoteElementPos = position + pos;
83
+ return (0, track_changes_plugin_1.skipTracking)(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), prosemirror_model_1.Fragment.fromArray(orderedFootnotes)));
88
84
  };
89
85
  exports.orderTableFootnotes = orderTableFootnotes;
90
86
  const updateTableInlineFootnoteLabels = (tr, table) => {
@@ -73,12 +73,8 @@ export const orderTableFootnotes = (tr, footnotesElementWithPos, position) => {
73
73
  })
74
74
  .map(({ node }) => node);
75
75
  const { node: footnotesElement, pos } = footnotesElementWithPos;
76
- const footnoteElementPos = position + pos + 1;
77
- const oldDataTracked = footnotesElement.attrs.dataTracked;
78
- skipTracking(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), Fragment.fromArray(orderedFootnotes)));
79
- if (oldDataTracked) {
80
- tr.setNodeMarkup(footnoteElementPos, schema.nodes.footnotes_element, Object.assign(Object.assign({}, footnotesElement.attrs), { dataTracked: oldDataTracked }));
81
- }
76
+ const footnoteElementPos = position + pos;
77
+ return skipTracking(tr.replaceWith(tr.mapping.map(footnoteElementPos), tr.mapping.map(footnoteElementPos + footnotesElement.nodeSize), Fragment.fromArray(orderedFootnotes)));
82
78
  };
83
79
  export const updateTableInlineFootnoteLabels = (tr, table) => {
84
80
  const labels = buildTableFootnoteLabels(table.node);
@@ -20,7 +20,7 @@ import { ContentNodeWithPos, NodeWithPos } from 'prosemirror-utils';
20
20
  export declare const findTableInlineFootnoteIds: ($pos: ResolvedPos) => Set<string>;
21
21
  export declare const getNewFootnotePos: (footnotesElement: NodeWithPos, footnoteIndex: number) => number;
22
22
  export declare const buildTableFootnoteLabels: (node: ManuscriptNode) => Map<string, string | undefined>;
23
- export declare const orderTableFootnotes: (tr: Transaction, footnotesElementWithPos: NodeWithPos, position: number) => void;
23
+ export declare const orderTableFootnotes: (tr: Transaction, footnotesElementWithPos: NodeWithPos, position: number) => Transaction;
24
24
  export declare const updateTableInlineFootnoteLabels: (tr: Transaction, table: ContentNodeWithPos) => Transaction;
25
25
  interface InlineFootnote {
26
26
  node: InlineFootnoteNode;
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.10.8-LEAN-3589.0",
4
+ "version": "1.10.8",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@iarna/word-count": "^1.1.2",
31
- "@manuscripts/json-schema": "^2.2.7",
32
- "@manuscripts/library": "^1.3.6",
33
- "@manuscripts/style-guide": "1.12.9",
31
+ "@manuscripts/json-schema": "2.2.8",
32
+ "@manuscripts/library": "1.3.7",
33
+ "@manuscripts/style-guide": "1.12.10",
34
34
  "@manuscripts/track-changes-plugin": "1.7.12",
35
- "@manuscripts/transform": "2.3.4",
35
+ "@manuscripts/transform": "2.3.5",
36
36
  "astrocite-eutils": "^0.16.4",
37
37
  "mathjax-full": "^3.2.2",
38
38
  "codemirror": "^5.58.1",
@@ -110,4 +110,4 @@
110
110
  "@types/react": "^17.0.2",
111
111
  "prosemirror-tables": "^1.3.5"
112
112
  }
113
- }
113
+ }