@manuscripts/body-editor 3.7.27 → 3.7.28

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.
@@ -54,6 +54,7 @@ const buildPluginState = (state, props, showDecorations) => {
54
54
  selectedPos,
55
55
  decorations,
56
56
  props,
57
+ doc: state.doc,
57
58
  };
58
59
  state.doc.descendants((node, pos) => {
59
60
  const validator = validators_1.validators[node.type.name];
@@ -141,7 +141,7 @@ const validateFootnote = (node, pos, context) => {
141
141
  : undefined;
142
142
  const unused = footnoteState?.unusedFootnoteIDs?.has(node.attrs.id);
143
143
  if (unused) {
144
- const isTableFootnote = (0, utils_1.isChildOfNodeTypes)(context.props.doc, pos, [
144
+ const isTableFootnote = (0, utils_1.isChildOfNodeTypes)(context.doc, pos, [
145
145
  transform_1.schema.nodes.table_element,
146
146
  ]);
147
147
  const inconsistency = createWarning(node, pos, 'not-used', 'warning', isTableFootnote ? 'table_footnote' : undefined);
@@ -153,7 +153,7 @@ const validateAffiliation = (node, pos, context) => {
153
153
  const inconsistencies = [];
154
154
  const unused = !context.pluginStates.affiliations?.get(node.attrs.id);
155
155
  if (unused) {
156
- const $pos = context.props.doc.resolve(pos);
156
+ const $pos = context.doc.resolve(pos);
157
157
  const affiliationsNodePos = $pos.before($pos.depth);
158
158
  const inconsistency = createWarning(node, affiliationsNodePos, 'not-used', 'warning');
159
159
  inconsistencies.push(inconsistency);
@@ -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.7.27';
4
+ exports.VERSION = '3.7.28';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -50,6 +50,7 @@ export const buildPluginState = (state, props, showDecorations) => {
50
50
  selectedPos,
51
51
  decorations,
52
52
  props,
53
+ doc: state.doc,
53
54
  };
54
55
  state.doc.descendants((node, pos) => {
55
56
  const validator = validators[node.type.name];
@@ -138,7 +138,7 @@ const validateFootnote = (node, pos, context) => {
138
138
  : undefined;
139
139
  const unused = footnoteState?.unusedFootnoteIDs?.has(node.attrs.id);
140
140
  if (unused) {
141
- const isTableFootnote = isChildOfNodeTypes(context.props.doc, pos, [
141
+ const isTableFootnote = isChildOfNodeTypes(context.doc, pos, [
142
142
  schema.nodes.table_element,
143
143
  ]);
144
144
  const inconsistency = createWarning(node, pos, 'not-used', 'warning', isTableFootnote ? 'table_footnote' : undefined);
@@ -150,7 +150,7 @@ const validateAffiliation = (node, pos, context) => {
150
150
  const inconsistencies = [];
151
151
  const unused = !context.pluginStates.affiliations?.get(node.attrs.id);
152
152
  if (unused) {
153
- const $pos = context.props.doc.resolve(pos);
153
+ const $pos = context.doc.resolve(pos);
154
154
  const affiliationsNodePos = $pos.before($pos.depth);
155
155
  const inconsistency = createWarning(node, affiliationsNodePos, 'not-used', 'warning');
156
156
  inconsistencies.push(inconsistency);
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.7.27';
1
+ export const VERSION = '3.7.28';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -30,6 +30,7 @@ export type ValidatorContext = {
30
30
  selectedPos: number | null;
31
31
  decorations: Decoration[];
32
32
  props: EditorProps;
33
+ doc: ManuscriptNode;
33
34
  };
34
35
  export type NodeValidator = (node: ManuscriptNode, pos: number, context: ValidatorContext) => Inconsistency[];
35
36
  export declare const validators: Record<string, NodeValidator>;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.7.27";
1
+ export declare const VERSION = "3.7.28";
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.7.27",
4
+ "version": "3.7.28",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",