@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.
- package/dist/cjs/plugins/detect-inconsistency/detect-inconsistency-utils.js +1 -0
- package/dist/cjs/plugins/detect-inconsistency/validators.js +2 -2
- package/dist/cjs/versions.js +1 -1
- package/dist/es/plugins/detect-inconsistency/detect-inconsistency-utils.js +1 -0
- package/dist/es/plugins/detect-inconsistency/validators.js +2 -2
- package/dist/es/versions.js +1 -1
- package/dist/types/plugins/detect-inconsistency/validators.d.ts +1 -0
- package/dist/types/versions.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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.
|
|
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);
|
package/dist/cjs/versions.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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);
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.7.
|
|
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>;
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.7.
|
|
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.
|
|
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",
|