@manuscripts/body-editor 2.8.23 → 2.8.25
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/commands.js +3 -2
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/cross_reference_editable.js +3 -1
- package/dist/es/commands.js +3 -2
- package/dist/es/versions.js +1 -1
- package/dist/es/views/cross_reference_editable.js +3 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/commands.js
CHANGED
|
@@ -786,8 +786,9 @@ function toggleOffList(state, dispatch) {
|
|
|
786
786
|
}
|
|
787
787
|
if (rootList) {
|
|
788
788
|
state.doc.nodesBetween(rootList.pos, rootList.pos + rootList.node.nodeSize, (node, pos) => {
|
|
789
|
-
if (
|
|
790
|
-
|
|
789
|
+
if (rootList &&
|
|
790
|
+
(pos < rootList.pos ||
|
|
791
|
+
node.nodeSize > rootList.pos + rootList.node.nodeSize)) {
|
|
791
792
|
return true;
|
|
792
793
|
}
|
|
793
794
|
const $fromPos = tr.doc.resolve(tr.mapping.map(pos));
|
package/dist/cjs/versions.js
CHANGED
|
@@ -29,6 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.CrossReferenceEditableView = void 0;
|
|
31
31
|
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
|
32
|
+
const transform_1 = require("@manuscripts/transform");
|
|
32
33
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
33
34
|
const CrossReferenceItems_1 = require("../components/views/CrossReferenceItems");
|
|
34
35
|
const objects_1 = require("../plugins/objects");
|
|
@@ -64,8 +65,9 @@ class CrossReferenceEditableView extends cross_reference_1.CrossReferenceView {
|
|
|
64
65
|
this.handleCancel();
|
|
65
66
|
};
|
|
66
67
|
this.getTargets = () => {
|
|
68
|
+
const excludedTypes = [transform_1.schema.nodes.image_element.name];
|
|
67
69
|
const targets = objects_1.objectsKey.getState(this.view.state);
|
|
68
|
-
return Array.from(targets.values());
|
|
70
|
+
return Array.from(targets.values()).filter((t) => !excludedTypes.includes(t.type));
|
|
69
71
|
};
|
|
70
72
|
this.handleCancel = () => {
|
|
71
73
|
if (!this.node.attrs.rids.length) {
|
package/dist/es/commands.js
CHANGED
|
@@ -747,8 +747,9 @@ function toggleOffList(state, dispatch) {
|
|
|
747
747
|
}
|
|
748
748
|
if (rootList) {
|
|
749
749
|
state.doc.nodesBetween(rootList.pos, rootList.pos + rootList.node.nodeSize, (node, pos) => {
|
|
750
|
-
if (
|
|
751
|
-
|
|
750
|
+
if (rootList &&
|
|
751
|
+
(pos < rootList.pos ||
|
|
752
|
+
node.nodeSize > rootList.pos + rootList.node.nodeSize)) {
|
|
752
753
|
return true;
|
|
753
754
|
}
|
|
754
755
|
const $fromPos = tr.doc.resolve(tr.mapping.map(pos));
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.8.
|
|
1
|
+
export const VERSION = '2.8.25';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -23,6 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
import { skipTracking } from '@manuscripts/track-changes-plugin';
|
|
26
|
+
import { schema } from '@manuscripts/transform';
|
|
26
27
|
import { TextSelection } from 'prosemirror-state';
|
|
27
28
|
import { CrossReferenceItems } from '../components/views/CrossReferenceItems';
|
|
28
29
|
import { objectsKey } from '../plugins/objects';
|
|
@@ -58,8 +59,9 @@ export class CrossReferenceEditableView extends CrossReferenceView {
|
|
|
58
59
|
this.handleCancel();
|
|
59
60
|
};
|
|
60
61
|
this.getTargets = () => {
|
|
62
|
+
const excludedTypes = [schema.nodes.image_element.name];
|
|
61
63
|
const targets = objectsKey.getState(this.view.state);
|
|
62
|
-
return Array.from(targets.values());
|
|
64
|
+
return Array.from(targets.values()).filter((t) => !excludedTypes.includes(t.type));
|
|
63
65
|
};
|
|
64
66
|
this.handleCancel = () => {
|
|
65
67
|
if (!this.node.attrs.rids.length) {
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.8.
|
|
1
|
+
export declare const VERSION = "2.8.25";
|
|
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.8.
|
|
4
|
+
"version": "2.8.25",
|
|
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.13",
|
|
35
35
|
"@manuscripts/style-guide": "2.1.6",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "1.10.1",
|
|
37
|
-
"@manuscripts/transform": "3.0.
|
|
37
|
+
"@manuscripts/transform": "3.0.52",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
39
39
|
"astrocite-eutils": "^0.16.4",
|
|
40
40
|
"codemirror": "^5.58.1",
|