@manuscripts/body-editor 3.10.12 → 3.10.14

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.
@@ -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 + 1, (view) => {
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
- }));
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 + 1, (view) => {
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
- }));
151
+ }, { key: `lang-selector-${node.attrs.id}`, side: -1 }));
152
152
  }
153
153
  });
154
154
  return prosemirror_view_1.DecorationSet.create(state.doc, widgets);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MATHJAX_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '3.10.12';
4
+ exports.VERSION = '3.10.14';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -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 + 1, (view) => {
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
- }));
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 + 1, (view) => {
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
- }));
149
+ }, { key: `lang-selector-${node.attrs.id}`, side: -1 }));
150
150
  }
151
151
  });
152
152
  return DecorationSet.create(state.doc, widgets);
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.10.12';
1
+ export const VERSION = '3.10.14';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.10.12";
1
+ export declare const VERSION = "3.10.14";
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.12",
4
+ "version": "3.10.14",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -38,7 +38,7 @@
38
38
  "@citation-js/plugin-ris": "0.7.18",
39
39
  "@iarna/word-count": "1.1.2",
40
40
  "@manuscripts/style-guide": "3.5.2",
41
- "@manuscripts/track-changes-plugin": "2.3.7",
41
+ "@manuscripts/track-changes-plugin": "2.3.8",
42
42
  "@manuscripts/transform": "4.3.27",
43
43
  "@popperjs/core": "2.11.8",
44
44
  "citeproc": "2.4.63",
@@ -1925,14 +1925,10 @@ th:hover > .table-context-menu-button,
1925
1925
  }
1926
1926
 
1927
1927
  .ProseMirror .add-trans-abstract {
1928
- display: flex;
1928
+ display: inline-flex;
1929
1929
  align-items: center;
1930
+ float: right;
1930
1931
  gap: 8px;
1931
- margin: 8px 0;
1932
- padding: 6px 12px;
1933
- position: absolute;
1934
- right: 50px;
1935
- top: 0;
1936
1932
  z-index: 5;
1937
1933
  cursor: pointer;
1938
1934
  background: unset;
@@ -1968,18 +1964,13 @@ th:hover > .table-context-menu-button,
1968
1964
  }
1969
1965
  .ProseMirror .block-trans_abstract .language-selector-btn,
1970
1966
  .ProseMirror .block-trans_graphical_abstract .language-selector-btn {
1971
- display: flex;
1972
- position: absolute;
1973
- top: 14px;
1974
- right: 50px;
1967
+ display: inline-flex;
1968
+ float: right;
1975
1969
  line-height: 1.6;
1976
1970
  background: unset;
1977
1971
  border: none;
1978
- padding: 0;
1979
- margin: 0 6px;
1980
1972
  cursor: pointer;
1981
1973
  z-index: 10;
1982
- align-items: end;
1983
1974
  gap: 8px;
1984
1975
  font-size: 14px;
1985
1976
  color: #6e6e6e;