@manuscripts/body-editor 1.5.13 → 1.5.14-LEAN-3047-2
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 +1 -1
- package/dist/cjs/keys/title.js +4 -0
- package/dist/es/commands.js +1 -1
- package/dist/es/keys/title.js +4 -0
- package/package.json +2 -2
package/dist/cjs/commands.js
CHANGED
|
@@ -343,7 +343,7 @@ const insertGraphicalAbstract = (state, dispatch) => {
|
|
|
343
343
|
!(0, transform_1.isInAbstractsSection)(state.selection.$from)) {
|
|
344
344
|
return false;
|
|
345
345
|
}
|
|
346
|
-
if (
|
|
346
|
+
if ((0, utils_1.getMatchingDescendant)(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
347
347
|
return false;
|
|
348
348
|
}
|
|
349
349
|
const section = state.schema.nodes.graphical_abstract_section.createAndFill({ category: 'MPSectionCategory:abstract-graphical' }, [
|
package/dist/cjs/keys/title.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const transform_1 = require("@manuscripts/transform");
|
|
18
19
|
const prosemirror_commands_1 = require("prosemirror-commands");
|
|
19
20
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
20
21
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
@@ -80,6 +81,9 @@ const leaveSectionTitle = (state, dispatch, view) => {
|
|
|
80
81
|
if ($cursor.parent.type !== $cursor.parent.type.schema.nodes.section_title) {
|
|
81
82
|
return false;
|
|
82
83
|
}
|
|
84
|
+
if ((0, transform_1.isInGraphicalAbstractSection)($cursor)) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
83
87
|
if (!(0, commands_1.isAtEndOfTextBlock)(state, $cursor, view)) {
|
|
84
88
|
return false;
|
|
85
89
|
}
|
package/dist/es/commands.js
CHANGED
|
@@ -301,7 +301,7 @@ export const insertGraphicalAbstract = (state, dispatch) => {
|
|
|
301
301
|
!isInAbstractsSection(state.selection.$from)) {
|
|
302
302
|
return false;
|
|
303
303
|
}
|
|
304
|
-
if (
|
|
304
|
+
if (getMatchingDescendant(state.doc, (node) => node.type === state.schema.nodes.graphical_abstract_section)) {
|
|
305
305
|
return false;
|
|
306
306
|
}
|
|
307
307
|
const section = state.schema.nodes.graphical_abstract_section.createAndFill({ category: 'MPSectionCategory:abstract-graphical' }, [
|
package/dist/es/keys/title.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { isInGraphicalAbstractSection, } from '@manuscripts/transform';
|
|
16
17
|
import { chainCommands } from 'prosemirror-commands';
|
|
17
18
|
import { Fragment, Slice } from 'prosemirror-model';
|
|
18
19
|
import { Selection, TextSelection } from 'prosemirror-state';
|
|
@@ -78,6 +79,9 @@ const leaveSectionTitle = (state, dispatch, view) => {
|
|
|
78
79
|
if ($cursor.parent.type !== $cursor.parent.type.schema.nodes.section_title) {
|
|
79
80
|
return false;
|
|
80
81
|
}
|
|
82
|
+
if (isInGraphicalAbstractSection($cursor)) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
81
85
|
if (!isAtEndOfTextBlock(state, $cursor, view)) {
|
|
82
86
|
return false;
|
|
83
87
|
}
|
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.14-LEAN-3047-2",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@manuscripts/style-guide": "1.4.6",
|
|
34
34
|
"@manuscripts/title-editor": "^1.1.0",
|
|
35
35
|
"@manuscripts/track-changes-plugin": "^1.7.4",
|
|
36
|
-
"@manuscripts/transform": "1.5.
|
|
36
|
+
"@manuscripts/transform": "1.5.7-LIT-528106",
|
|
37
37
|
"astrocite-eutils": "^0.16.4",
|
|
38
38
|
"axios": "^1.2.2",
|
|
39
39
|
"codemirror": "^5.58.1",
|