@manuscripts/body-editor 3.3.0 → 3.3.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.
@@ -65,8 +65,8 @@ const buildFootnotesElementState = (container, element) => {
65
65
  const orderedFootnoteIDs = [];
66
66
  inlineFootnotes.forEach(({ node, pos }) => {
67
67
  const inlineFootnote = node;
68
- const rids = inlineFootnote.attrs.rids;
69
- if (rids.some((rid) => !footnoteIDs.has(rid))) {
68
+ const rids = inlineFootnote.attrs.rids.filter((rid) => footnoteIDs.has(rid));
69
+ if (!rids.length) {
70
70
  return;
71
71
  }
72
72
  if (container[1]) {
@@ -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.3.0';
4
+ exports.VERSION = '3.3.1';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -180,9 +180,10 @@ class InlineFootnoteView extends base_node_view_1.BaseNodeView {
180
180
  const state = this.view.state;
181
181
  const fn = (0, footnotes_1.getFootnotesElementState)(state, this.node.attrs.id);
182
182
  if (!fn) {
183
+ this.dom.innerText = '?';
183
184
  return;
184
185
  }
185
- this.dom.innerText = fn.labels.get(this.node.attrs.id) || '';
186
+ this.dom.innerText = fn.labels.get(this.node.attrs.id) || '?';
186
187
  }
187
188
  deselectNode() {
188
189
  this.dom.classList.remove('footnote-marker-selected');
@@ -62,8 +62,8 @@ const buildFootnotesElementState = (container, element) => {
62
62
  const orderedFootnoteIDs = [];
63
63
  inlineFootnotes.forEach(({ node, pos }) => {
64
64
  const inlineFootnote = node;
65
- const rids = inlineFootnote.attrs.rids;
66
- if (rids.some((rid) => !footnoteIDs.has(rid))) {
65
+ const rids = inlineFootnote.attrs.rids.filter((rid) => footnoteIDs.has(rid));
66
+ if (!rids.length) {
67
67
  return;
68
68
  }
69
69
  if (container[1]) {
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.3.0';
1
+ export const VERSION = '3.3.1';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -174,9 +174,10 @@ export class InlineFootnoteView extends BaseNodeView {
174
174
  const state = this.view.state;
175
175
  const fn = getFootnotesElementState(state, this.node.attrs.id);
176
176
  if (!fn) {
177
+ this.dom.innerText = '?';
177
178
  return;
178
179
  }
179
- this.dom.innerText = fn.labels.get(this.node.attrs.id) || '';
180
+ this.dom.innerText = fn.labels.get(this.node.attrs.id) || '?';
180
181
  }
181
182
  deselectNode() {
182
183
  this.dom.classList.remove('footnote-marker-selected');
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.3.0";
1
+ export declare const VERSION = "3.3.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": "3.3.0",
4
+ "version": "3.3.1",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",