@manuscripts/body-editor 3.10.13 → 3.10.15
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/lib/doc.js +4 -1
- package/dist/cjs/plugins/comments.js +1 -0
- package/dist/cjs/plugins/translations.js +4 -4
- package/dist/cjs/versions.js +1 -1
- package/dist/es/lib/doc.js +4 -1
- package/dist/es/plugins/comments.js +1 -0
- package/dist/es/plugins/translations.js +4 -4
- package/dist/es/versions.js +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +1 -1
- package/styles/AdvancedEditor.css +11 -14
package/dist/cjs/lib/doc.js
CHANGED
|
@@ -28,7 +28,10 @@ const upsertSupplementsSection = (tr, supplement) => {
|
|
|
28
28
|
return { node: supplements.node, pos };
|
|
29
29
|
}
|
|
30
30
|
const pos = (0, utils_1.findInsertionPosition)(transform_1.schema.nodes.supplements, doc);
|
|
31
|
-
const node = transform_1.schema.nodes.supplements.createAndFill({ id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.supplements) }, [
|
|
31
|
+
const node = transform_1.schema.nodes.supplements.createAndFill({ id: (0, transform_1.generateNodeID)(transform_1.schema.nodes.supplements) }, [
|
|
32
|
+
transform_1.schema.nodes.section_title.create(undefined, transform_1.schema.text('Supplements')),
|
|
33
|
+
supplement,
|
|
34
|
+
]);
|
|
32
35
|
tr.insert(pos, node);
|
|
33
36
|
return {
|
|
34
37
|
node,
|
|
@@ -206,6 +206,7 @@ const getDecorationPos = (node, pos) => {
|
|
|
206
206
|
case transform_1.schema.nodes.embed:
|
|
207
207
|
case transform_1.schema.nodes.contributors:
|
|
208
208
|
case transform_1.schema.nodes.hero_image:
|
|
209
|
+
case transform_1.schema.nodes.supplements:
|
|
209
210
|
return pos;
|
|
210
211
|
case transform_1.schema.nodes.keywords:
|
|
211
212
|
return pos + 2;
|
|
@@ -83,7 +83,7 @@ exports.default = (props) => new prosemirror_state_1.Plugin({
|
|
|
83
83
|
(0, commands_1.insertTransGraphicalAbstract)(category)(state)
|
|
84
84
|
: canEditTransAbstract;
|
|
85
85
|
if (canEdit) {
|
|
86
|
-
widgets.push(prosemirror_view_1.Decoration.widget(pos +
|
|
86
|
+
widgets.push(prosemirror_view_1.Decoration.widget(pos + 2, (view) => {
|
|
87
87
|
const $span = document.createElement('span');
|
|
88
88
|
$span.tabIndex = 0;
|
|
89
89
|
$span.className = 'add-trans-abstract';
|
|
@@ -102,7 +102,7 @@ exports.default = (props) => new prosemirror_state_1.Plugin({
|
|
|
102
102
|
$span.addEventListener('mousedown', handleActivate);
|
|
103
103
|
$span.addEventListener('keydown', (0, navigation_utils_1.handleEnterKey)(handleActivate));
|
|
104
104
|
return $span;
|
|
105
|
-
}, { key: `add-trans-${node.attrs.id || pos}
|
|
105
|
+
}, { key: `add-trans-${node.attrs.id || pos}`, side: -1 }));
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
const isTransNode = node.type === transform_1.schema.nodes.trans_abstract ||
|
|
@@ -111,7 +111,7 @@ exports.default = (props) => new prosemirror_state_1.Plugin({
|
|
|
111
111
|
const canEdit = node.type === transform_1.schema.nodes.trans_abstract
|
|
112
112
|
? canEditTransAbstract
|
|
113
113
|
: canEditTransGraphicalAbstract;
|
|
114
|
-
widgets.push(prosemirror_view_1.Decoration.widget(pos +
|
|
114
|
+
widgets.push(prosemirror_view_1.Decoration.widget(pos + 2, (view) => {
|
|
115
115
|
const $btn = document.createElement('span');
|
|
116
116
|
$btn.className = 'language-selector-btn';
|
|
117
117
|
$btn.setAttribute('data-cy', 'language-selector-btn');
|
|
@@ -148,7 +148,7 @@ exports.default = (props) => new prosemirror_state_1.Plugin({
|
|
|
148
148
|
$btn.addEventListener('mousedown', handleOpenMenu);
|
|
149
149
|
}
|
|
150
150
|
return $btn;
|
|
151
|
-
}, { key: `lang-selector-${node.attrs.id}
|
|
151
|
+
}, { key: `lang-selector-${node.attrs.id}`, side: -1 }));
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
return prosemirror_view_1.DecorationSet.create(state.doc, widgets);
|
package/dist/cjs/versions.js
CHANGED
package/dist/es/lib/doc.js
CHANGED
|
@@ -24,7 +24,10 @@ export const upsertSupplementsSection = (tr, supplement) => {
|
|
|
24
24
|
return { node: supplements.node, pos };
|
|
25
25
|
}
|
|
26
26
|
const pos = findInsertionPosition(schema.nodes.supplements, doc);
|
|
27
|
-
const node = schema.nodes.supplements.createAndFill({ id: generateNodeID(schema.nodes.supplements) }, [
|
|
27
|
+
const node = schema.nodes.supplements.createAndFill({ id: generateNodeID(schema.nodes.supplements) }, [
|
|
28
|
+
schema.nodes.section_title.create(undefined, schema.text('Supplements')),
|
|
29
|
+
supplement,
|
|
30
|
+
]);
|
|
28
31
|
tr.insert(pos, node);
|
|
29
32
|
return {
|
|
30
33
|
node,
|
|
@@ -81,7 +81,7 @@ export default (props) => new Plugin({
|
|
|
81
81
|
insertTransGraphicalAbstract(category)(state)
|
|
82
82
|
: canEditTransAbstract;
|
|
83
83
|
if (canEdit) {
|
|
84
|
-
widgets.push(Decoration.widget(pos +
|
|
84
|
+
widgets.push(Decoration.widget(pos + 2, (view) => {
|
|
85
85
|
const $span = document.createElement('span');
|
|
86
86
|
$span.tabIndex = 0;
|
|
87
87
|
$span.className = 'add-trans-abstract';
|
|
@@ -100,7 +100,7 @@ export default (props) => new Plugin({
|
|
|
100
100
|
$span.addEventListener('mousedown', handleActivate);
|
|
101
101
|
$span.addEventListener('keydown', handleEnterKey(handleActivate));
|
|
102
102
|
return $span;
|
|
103
|
-
}, { key: `add-trans-${node.attrs.id || pos}
|
|
103
|
+
}, { key: `add-trans-${node.attrs.id || pos}`, side: -1 }));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
const isTransNode = node.type === schema.nodes.trans_abstract ||
|
|
@@ -109,7 +109,7 @@ export default (props) => new Plugin({
|
|
|
109
109
|
const canEdit = node.type === schema.nodes.trans_abstract
|
|
110
110
|
? canEditTransAbstract
|
|
111
111
|
: canEditTransGraphicalAbstract;
|
|
112
|
-
widgets.push(Decoration.widget(pos +
|
|
112
|
+
widgets.push(Decoration.widget(pos + 2, (view) => {
|
|
113
113
|
const $btn = document.createElement('span');
|
|
114
114
|
$btn.className = 'language-selector-btn';
|
|
115
115
|
$btn.setAttribute('data-cy', 'language-selector-btn');
|
|
@@ -146,7 +146,7 @@ export default (props) => new Plugin({
|
|
|
146
146
|
$btn.addEventListener('mousedown', handleOpenMenu);
|
|
147
147
|
}
|
|
148
148
|
return $btn;
|
|
149
|
-
}, { key: `lang-selector-${node.attrs.id}
|
|
149
|
+
}, { key: `lang-selector-${node.attrs.id}`, side: -1 }));
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
return DecorationSet.create(state.doc, widgets);
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.10.
|
|
1
|
+
export const VERSION = '3.10.15';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.10.
|
|
1
|
+
export declare const VERSION = "3.10.15";
|
|
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.10.
|
|
4
|
+
"version": "3.10.15",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -555,7 +555,8 @@ ProseMirror .block-embed .position-menu {
|
|
|
555
555
|
|
|
556
556
|
.comment-marker:has(+ .block-contributors),
|
|
557
557
|
.comment-marker:has(+ .block-affiliations),
|
|
558
|
-
.comment-marker:has(+ .block-hero_image)
|
|
558
|
+
.comment-marker:has(+ .block-hero_image),
|
|
559
|
+
.comment-marker:has(+ .block-supplements) {
|
|
559
560
|
height: 0;
|
|
560
561
|
top: 0;
|
|
561
562
|
right: 60px;
|
|
@@ -563,6 +564,11 @@ ProseMirror .block-embed .position-menu {
|
|
|
563
564
|
float: right;
|
|
564
565
|
}
|
|
565
566
|
|
|
567
|
+
.comment-marker:has(+ .block-hero_image),
|
|
568
|
+
.comment-marker:has(+ .block-supplements) {
|
|
569
|
+
right: 50px;
|
|
570
|
+
}
|
|
571
|
+
|
|
566
572
|
.block-subtitles .comment-marker {
|
|
567
573
|
top: 0;
|
|
568
574
|
left: -10px;
|
|
@@ -1925,14 +1931,10 @@ th:hover > .table-context-menu-button,
|
|
|
1925
1931
|
}
|
|
1926
1932
|
|
|
1927
1933
|
.ProseMirror .add-trans-abstract {
|
|
1928
|
-
display: flex;
|
|
1934
|
+
display: inline-flex;
|
|
1929
1935
|
align-items: center;
|
|
1936
|
+
float: right;
|
|
1930
1937
|
gap: 8px;
|
|
1931
|
-
margin: 8px 0;
|
|
1932
|
-
padding: 6px 12px;
|
|
1933
|
-
position: absolute;
|
|
1934
|
-
right: 50px;
|
|
1935
|
-
top: 0;
|
|
1936
1938
|
z-index: 5;
|
|
1937
1939
|
cursor: pointer;
|
|
1938
1940
|
background: unset;
|
|
@@ -1968,18 +1970,13 @@ th:hover > .table-context-menu-button,
|
|
|
1968
1970
|
}
|
|
1969
1971
|
.ProseMirror .block-trans_abstract .language-selector-btn,
|
|
1970
1972
|
.ProseMirror .block-trans_graphical_abstract .language-selector-btn {
|
|
1971
|
-
display: flex;
|
|
1972
|
-
|
|
1973
|
-
top: 14px;
|
|
1974
|
-
right: 50px;
|
|
1973
|
+
display: inline-flex;
|
|
1974
|
+
float: right;
|
|
1975
1975
|
line-height: 1.6;
|
|
1976
1976
|
background: unset;
|
|
1977
1977
|
border: none;
|
|
1978
|
-
padding: 0;
|
|
1979
|
-
margin: 0 6px;
|
|
1980
1978
|
cursor: pointer;
|
|
1981
1979
|
z-index: 10;
|
|
1982
|
-
align-items: end;
|
|
1983
1980
|
gap: 8px;
|
|
1984
1981
|
font-size: 14px;
|
|
1985
1982
|
color: #6e6e6e;
|