@manuscripts/body-editor 1.5.5 → 1.5.6
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.
|
@@ -25,10 +25,9 @@ exports.default = () => {
|
|
|
25
25
|
else if ((0, transform_1.isFootnoteNode)(node)) {
|
|
26
26
|
endOfFootnote = Math.max(endOfFootnote, pos + node.nodeSize);
|
|
27
27
|
}
|
|
28
|
-
const insideList = pos <= endOfList;
|
|
29
28
|
const insideFootnote = pos <= endOfFootnote;
|
|
30
29
|
if ('id' in node.attrs &&
|
|
31
|
-
(
|
|
30
|
+
(!insideFootnote || node.isInline) &&
|
|
32
31
|
(!id || id.length === 0 || ids.has(id))) {
|
|
33
32
|
const newId = (0, transform_1.generateNodeID)(node.type);
|
|
34
33
|
const updatedAttrs = Object.assign(Object.assign({}, node.attrs), { id: newId });
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -78,7 +78,9 @@ exports.toolbar = {
|
|
|
78
78
|
title: 'Wrap in ordered list',
|
|
79
79
|
active: (0, commands_1.blockActive)(transform_1.schema.nodes.ordered_list),
|
|
80
80
|
enable: (0, prosemirror_schema_list_1.wrapInList)(transform_1.schema.nodes.ordered_list),
|
|
81
|
-
run: (0, list_1.skipTrackingChanges)((0, prosemirror_schema_list_1.wrapInList)(transform_1.schema.nodes.ordered_list
|
|
81
|
+
run: (0, list_1.skipTrackingChanges)((0, prosemirror_schema_list_1.wrapInList)(transform_1.schema.nodes.ordered_list, {
|
|
82
|
+
listStyleType: 'order',
|
|
83
|
+
})),
|
|
82
84
|
Component: OrderListSelector_1.OrderListSelector,
|
|
83
85
|
},
|
|
84
86
|
},
|
|
@@ -90,7 +90,6 @@ class CrossReferenceEditableView extends cross_reference_1.CrossReferenceView {
|
|
|
90
90
|
const $pos = state.doc.resolve(pos);
|
|
91
91
|
const rids = rid.trim().split(/\s+/);
|
|
92
92
|
const auxiliaryObjectReference = (0, transform_1.buildAuxiliaryObjectReference)($pos.parent.attrs.id, rids);
|
|
93
|
-
yield this.props.saveModel(auxiliaryObjectReference);
|
|
94
93
|
const tr = state.tr.setNodeMarkup(pos, undefined, Object.assign(Object.assign({}, this.node.attrs), { customLabel: customLabel || '', rid: auxiliaryObjectReference._id }));
|
|
95
94
|
const selection = prosemirror_state_1.TextSelection.create(tr.doc, pos);
|
|
96
95
|
this.view.dispatch(tr.setSelection(selection));
|
|
@@ -23,10 +23,9 @@ export default () => {
|
|
|
23
23
|
else if (isFootnoteNode(node)) {
|
|
24
24
|
endOfFootnote = Math.max(endOfFootnote, pos + node.nodeSize);
|
|
25
25
|
}
|
|
26
|
-
const insideList = pos <= endOfList;
|
|
27
26
|
const insideFootnote = pos <= endOfFootnote;
|
|
28
27
|
if ('id' in node.attrs &&
|
|
29
|
-
(
|
|
28
|
+
(!insideFootnote || node.isInline) &&
|
|
30
29
|
(!id || id.length === 0 || ids.has(id))) {
|
|
31
30
|
const newId = generateNodeID(node.type);
|
|
32
31
|
const updatedAttrs = Object.assign(Object.assign({}, node.attrs), { id: newId });
|
package/dist/es/toolbar.js
CHANGED
|
@@ -72,7 +72,9 @@ export const toolbar = {
|
|
|
72
72
|
title: 'Wrap in ordered list',
|
|
73
73
|
active: blockActive(schema.nodes.ordered_list),
|
|
74
74
|
enable: wrapInList(schema.nodes.ordered_list),
|
|
75
|
-
run: skipTrackingChanges(wrapInList(schema.nodes.ordered_list
|
|
75
|
+
run: skipTrackingChanges(wrapInList(schema.nodes.ordered_list, {
|
|
76
|
+
listStyleType: 'order',
|
|
77
|
+
})),
|
|
76
78
|
Component: OrderListSelector,
|
|
77
79
|
},
|
|
78
80
|
},
|
|
@@ -84,7 +84,6 @@ export class CrossReferenceEditableView extends CrossReferenceView {
|
|
|
84
84
|
const $pos = state.doc.resolve(pos);
|
|
85
85
|
const rids = rid.trim().split(/\s+/);
|
|
86
86
|
const auxiliaryObjectReference = buildAuxiliaryObjectReference($pos.parent.attrs.id, rids);
|
|
87
|
-
yield this.props.saveModel(auxiliaryObjectReference);
|
|
88
87
|
const tr = state.tr.setNodeMarkup(pos, undefined, Object.assign(Object.assign({}, this.node.attrs), { customLabel: customLabel || '', rid: auxiliaryObjectReference._id }));
|
|
89
88
|
const selection = TextSelection.create(tr.doc, pos);
|
|
90
89
|
this.view.dispatch(tr.setSelection(selection));
|
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.5.
|
|
4
|
+
"version": "1.5.6",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -28,10 +28,9 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@iarna/word-count": "^1.1.2",
|
|
30
30
|
"@manuscripts/assets": "^0.6.4",
|
|
31
|
-
"@manuscripts/comment-editor": "^1.0.3",
|
|
32
31
|
"@manuscripts/json-schema": "^2.2.0",
|
|
33
32
|
"@manuscripts/library": "1.2.1",
|
|
34
|
-
"@manuscripts/style-guide": "1.4.
|
|
33
|
+
"@manuscripts/style-guide": "^1.4.3",
|
|
35
34
|
"@manuscripts/title-editor": "^1.1.0",
|
|
36
35
|
"@manuscripts/track-changes-plugin": "^1.7.3",
|
|
37
36
|
"@manuscripts/transform": "1.5.2",
|
|
@@ -145,4 +144,4 @@
|
|
|
145
144
|
"resolutions": {
|
|
146
145
|
"@types/react": "^17.0.2"
|
|
147
146
|
}
|
|
148
|
-
}
|
|
147
|
+
}
|