@manuscripts/body-editor 3.10.16 → 3.10.17

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/icons.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tickIcon = exports.fileMainDocumentIcon = exports.linkIcon = exports.translateIcon = exports.draggableIcon = exports.fileCorruptedIcon = exports.imageDefaultIcon = exports.imageLeftIcon = exports.imageRightIcon = exports.plusIcon = exports.lockIcon = exports.scrollIcon = exports.sectionCategoryIcon = exports.editIcon = exports.deleteIcon = exports.alertIcon = exports.arrowUp = exports.arrowDown = exports.addAuthorIcon = void 0;
3
+ exports.ORCIDIcon = exports.tickIcon = exports.fileMainDocumentIcon = exports.linkIcon = exports.translateIcon = exports.draggableIcon = exports.fileCorruptedIcon = exports.imageDefaultIcon = exports.imageLeftIcon = exports.imageRightIcon = exports.plusIcon = exports.lockIcon = exports.scrollIcon = exports.sectionCategoryIcon = exports.editIcon = exports.deleteIcon = exports.alertIcon = exports.arrowUp = exports.arrowDown = exports.addAuthorIcon = void 0;
4
4
  const style_guide_1 = require("@manuscripts/style-guide");
5
5
  const react_1 = require("react");
6
6
  const server_1 = require("react-dom/server");
@@ -24,3 +24,4 @@ exports.translateIcon = renderIcon(style_guide_1.TranslateIcon);
24
24
  exports.linkIcon = renderIcon(style_guide_1.LinkIcon);
25
25
  exports.fileMainDocumentIcon = renderIcon(style_guide_1.FileMainDocumentIcon);
26
26
  exports.tickIcon = renderIcon(style_guide_1.TickIcon);
27
+ exports.ORCIDIcon = renderIcon(style_guide_1.ORCIDIcon);
@@ -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.16';
4
+ exports.VERSION = '3.10.17';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -34,6 +34,7 @@ const selected_suggestion_1 = require("../plugins/selected-suggestion");
34
34
  const block_view_1 = __importDefault(require("./block_view"));
35
35
  const creators_1 = require("./creators");
36
36
  const ReactSubView_1 = __importDefault(require("./ReactSubView"));
37
+ const icons_1 = require("../icons");
37
38
  class ContributorsView extends block_view_1.default {
38
39
  constructor() {
39
40
  super(...arguments);
@@ -95,6 +96,9 @@ class ContributorsView extends block_view_1.default {
95
96
  attrs.isCorresponding && attrs.email
96
97
  ? `<span class="name">${name} (${attrs.email})</span>`
97
98
  : `<span class="name">${name}</span>`;
99
+ if (attrs.ORCID) {
100
+ container.innerHTML += `<a href="${attrs.ORCID}" target="_blank" class="orcid-link">${icons_1.ORCIDIcon}</span>`;
101
+ }
98
102
  const noteText = [];
99
103
  if (affs) {
100
104
  attrs.affiliationIDs?.map((a) => {
package/dist/es/icons.js CHANGED
@@ -1,4 +1,4 @@
1
- import { AddAuthorIcon, AlertIcon, ArrowDownCircleIcon, ArrowUpIcon, DeleteIcon, DraggableIcon, EditIcon, FileCorruptedIcon, FileMainDocumentIcon, ImageDefaultIcon, ImageLeftIcon, ImageRightIcon, LinkIcon, LockIcon, PlusIcon, ScrollIcon, SectionCategoryIcon, TickIcon, TranslateIcon, } from '@manuscripts/style-guide';
1
+ import { AddAuthorIcon, AlertIcon, ArrowDownCircleIcon, ArrowUpIcon, DeleteIcon, DraggableIcon, EditIcon, FileCorruptedIcon, FileMainDocumentIcon, ImageDefaultIcon, ImageLeftIcon, ImageRightIcon, LinkIcon, LockIcon, ORCIDIcon as ORCID, PlusIcon, ScrollIcon, SectionCategoryIcon, TickIcon, TranslateIcon, } from '@manuscripts/style-guide';
2
2
  import { createElement } from 'react';
3
3
  import { renderToStaticMarkup } from 'react-dom/server';
4
4
  const renderIcon = (c) => renderToStaticMarkup(createElement(c));
@@ -21,3 +21,4 @@ export const translateIcon = renderIcon(TranslateIcon);
21
21
  export const linkIcon = renderIcon(LinkIcon);
22
22
  export const fileMainDocumentIcon = renderIcon(FileMainDocumentIcon);
23
23
  export const tickIcon = renderIcon(TickIcon);
24
+ export const ORCIDIcon = renderIcon(ORCID);
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.10.16';
1
+ export const VERSION = '3.10.17';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -28,6 +28,7 @@ import { selectedSuggestionKey } from '../plugins/selected-suggestion';
28
28
  import BlockView from './block_view';
29
29
  import { createNodeView } from './creators';
30
30
  import ReactSubView from './ReactSubView';
31
+ import { ORCIDIcon } from '../icons';
31
32
  export class ContributorsView extends BlockView {
32
33
  constructor() {
33
34
  super(...arguments);
@@ -89,6 +90,9 @@ export class ContributorsView extends BlockView {
89
90
  attrs.isCorresponding && attrs.email
90
91
  ? `<span class="name">${name} (${attrs.email})</span>`
91
92
  : `<span class="name">${name}</span>`;
93
+ if (attrs.ORCID) {
94
+ container.innerHTML += `<a href="${attrs.ORCID}" target="_blank" class="orcid-link">${ORCIDIcon}</span>`;
95
+ }
92
96
  const noteText = [];
93
97
  if (affs) {
94
98
  attrs.affiliationIDs?.map((a) => {
@@ -17,3 +17,4 @@ export declare const translateIcon: string;
17
17
  export declare const linkIcon: string;
18
18
  export declare const fileMainDocumentIcon: string;
19
19
  export declare const tickIcon: string;
20
+ export declare const ORCIDIcon: string;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.10.16";
1
+ export declare const VERSION = "3.10.17";
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.16",
4
+ "version": "3.10.17",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -37,7 +37,7 @@
37
37
  "@citation-js/plugin-pubmed": "0.3.0",
38
38
  "@citation-js/plugin-ris": "0.7.18",
39
39
  "@iarna/word-count": "1.1.2",
40
- "@manuscripts/style-guide": "3.5.2",
40
+ "@manuscripts/style-guide": "3.5.4",
41
41
  "@manuscripts/track-changes-plugin": "2.3.8",
42
42
  "@manuscripts/transform": "4.3.27",
43
43
  "@popperjs/core": "2.11.8",
@@ -139,9 +139,10 @@
139
139
  border: 1px solid #f2f2f2;
140
140
  border-radius: 4px;
141
141
 
142
-
143
142
  grid-template-columns: repeat(3, auto) !important;
144
- grid-template-rows: repeat(1, minmax(min-content, max-content)) [caption listing] auto !important;
143
+ grid-template-rows:
144
+ repeat(1, minmax(min-content, max-content))
145
+ [caption listing] auto !important;
145
146
 
146
147
  margin: 16px 0 0 !important;
147
148
  box-sizing: border-box;
@@ -156,7 +157,9 @@
156
157
  padding: 8px;
157
158
 
158
159
  grid-template-columns: repeat(3, auto) !important;
159
- grid-template-rows: repeat(1, minmax(min-content, max-content)) [caption listing] auto !important;
160
+ grid-template-rows:
161
+ repeat(1, minmax(min-content, max-content))
162
+ [caption listing] auto !important;
160
163
  }
161
164
 
162
165
  .ProseMirror .figure-block-group .figure-block {
@@ -414,7 +417,9 @@ ProseMirror .block-embed .position-menu {
414
417
  .ProseMirror .figure-block .figure.drop-target-above,
415
418
  .ProseMirror .figure-block .figure.drop-target-below {
416
419
  border: 2px dotted #20aedf !important;
417
- transition: border 0.2s, box-shadow 0.2s;
420
+ transition:
421
+ border 0.2s,
422
+ box-shadow 0.2s;
418
423
  position: relative;
419
424
  }
420
425
 
@@ -437,7 +442,8 @@ ProseMirror .block-embed .position-menu {
437
442
  .ProseMirror .block-contributors {
438
443
  grid-template-columns: 52px auto 65px;
439
444
  }
440
- .ProseMirror .block-contributors.empty-node, .ProseMirror .block-affiliations.empty-node {
445
+ .ProseMirror .block-contributors.empty-node,
446
+ .ProseMirror .block-affiliations.empty-node {
441
447
  display: none !important;
442
448
  }
443
449
  .ProseMirror .block-affiliations {
@@ -1039,7 +1045,9 @@ figure .selected-suggestion {
1039
1045
  .block:not(.box-element):not(.trans-abstract):not(.trans-graphical-abstract),
1040
1046
  .block:has(figure.selected-suggestion),
1041
1047
  figure.block:has(.equation.selected-suggestion) {
1042
- box-shadow: inset 6px 0 0 black, inset 9px 0 0 lightgray;
1048
+ box-shadow:
1049
+ inset 6px 0 0 black,
1050
+ inset 9px 0 0 lightgray;
1043
1051
  --fade-color: none;
1044
1052
  }
1045
1053
 
@@ -1065,7 +1073,8 @@ figure.block:has(.equation.selected-suggestion) {
1065
1073
  .tracking-visible
1066
1074
  .selected-suggestion[data-track-op='wrap_with_node'][data-track-status='pending']
1067
1075
  .block {
1068
- box-shadow: inset 6px 0 0 var(--inserted-pending-color),
1076
+ box-shadow:
1077
+ inset 6px 0 0 var(--inserted-pending-color),
1069
1078
  inset 9px 0 0 var(--inserted-pending-bg-color) !important;
1070
1079
  animation: fadeOutBackground 3s forwards;
1071
1080
  --fade-color: var(--inserted-pending-bg-color);
@@ -1104,7 +1113,8 @@ figure.block:has(.equation.selected-suggestion) {
1104
1113
 
1105
1114
  .selected-suggestion[data-track-status='pending'][data-track-op='delete']
1106
1115
  .block:not(.box-element):not(.trans-abstract):not(.trans-graphical-abstract) {
1107
- box-shadow: inset 6px 0 0 var(--deleted-color),
1116
+ box-shadow:
1117
+ inset 6px 0 0 var(--deleted-color),
1108
1118
  inset 9px 0 0 var(--deleted-pending-bg-color) !important;
1109
1119
  animation: fadeOutBackground 3s forwards;
1110
1120
  --fade-color: var(--deleted-pending-bg-color);
@@ -1147,7 +1157,8 @@ figure.block:has(.equation.selected-suggestion) {
1147
1157
  .tracking-visible
1148
1158
  .selected-suggestion:is([data-track-op='move'], [data-track-op='structure'])
1149
1159
  .block {
1150
- box-shadow: inset 6px 0 0 var(--updated-border-color),
1160
+ box-shadow:
1161
+ inset 6px 0 0 var(--updated-border-color),
1151
1162
  inset 9px 0 0 var(--updated-bg-color) !important;
1152
1163
  animation: fadeOutBackground 3s forwards;
1153
1164
  --fade-color: var(--updated-bg-color);
@@ -1350,6 +1361,16 @@ s[data-track-status='pending'][data-track-op='delete'] {
1350
1361
  vertical-align: top;
1351
1362
  }
1352
1363
 
1364
+ .contributor .orcid-link {
1365
+ margin-left: 0.2em;
1366
+ align-items: center;
1367
+ display: inline-flex;
1368
+ }
1369
+ .contributor .orcid-link svg {
1370
+ width: 0.875em;
1371
+ height: 0.875em;
1372
+ }
1373
+
1353
1374
  .block-affiliations {
1354
1375
  color: #6e6e6e;
1355
1376
  }
@@ -1614,7 +1635,9 @@ th:hover > .table-context-menu-button,
1614
1635
  position: relative;
1615
1636
  pointer-events: none;
1616
1637
  user-select: none;
1617
- box-shadow: inset 49px 0 0 white, inset 53px 0 0 #6e6e6e;
1638
+ box-shadow:
1639
+ inset 49px 0 0 white,
1640
+ inset 53px 0 0 #6e6e6e;
1618
1641
  }
1619
1642
  .ProseMirror .non-editable .body-overlay,
1620
1643
  .ProseMirror .non-editable .figure-overlay {
@@ -1781,7 +1804,8 @@ th:hover > .table-context-menu-button,
1781
1804
  left: 93%;
1782
1805
  }
1783
1806
 
1784
- .block-hero_image, .block-supplements {
1807
+ .block-hero_image,
1808
+ .block-supplements {
1785
1809
  margin-bottom: 30px;
1786
1810
  }
1787
1811
 
@@ -1916,7 +1940,7 @@ th:hover > .table-context-menu-button,
1916
1940
  }
1917
1941
 
1918
1942
  .ProseMirror .add-button svg rect {
1919
- fill: #6E6E6E !important;
1943
+ fill: #6e6e6e !important;
1920
1944
  }
1921
1945
 
1922
1946
  .ProseMirror .add-button.disabled svg rect {
@@ -1947,7 +1971,7 @@ th:hover > .table-context-menu-button,
1947
1971
  }
1948
1972
 
1949
1973
  .ProseMirror .add-trans-abstract svg rect {
1950
- fill: #6E6E6E !important;
1974
+ fill: #6e6e6e !important;
1951
1975
  }
1952
1976
 
1953
1977
  .ProseMirror .add-trans-abstract-text {
@@ -1983,7 +2007,7 @@ th:hover > .table-context-menu-button,
1983
2007
  }
1984
2008
 
1985
2009
  .language.menu .menu-item {
1986
- margin-right: 25px
2010
+ margin-right: 25px;
1987
2011
  }
1988
2012
 
1989
2013
  .language.menu .menu-item.selected:after {
@@ -2012,7 +2036,9 @@ th:hover > .table-context-menu-button,
2012
2036
  color: #c9c9c9;
2013
2037
  margin: 0;
2014
2038
  }
2015
- .ProseMirror .block-trans_graphical_abstract section.block.trans-graphical-abstract {
2039
+ .ProseMirror
2040
+ .block-trans_graphical_abstract
2041
+ section.block.trans-graphical-abstract {
2016
2042
  padding: 0 !important;
2017
2043
  }
2018
2044
  .ProseMirror .abstracts.empty-node .add-translation-container {
@@ -2050,7 +2076,11 @@ th:hover > .table-context-menu-button,
2050
2076
  flex-shrink: 0;
2051
2077
  justify-content: center;
2052
2078
  outline: none;
2053
- transition: border 0.1s, color 0.1s, background-color 0.1s, color 0.1s,
2079
+ transition:
2080
+ border 0.1s,
2081
+ color 0.1s,
2082
+ background-color 0.1s,
2083
+ color 0.1s,
2054
2084
  filter 0.1s;
2055
2085
  vertical-align: middle;
2056
2086
  white-space: nowrap;
package/styles/Editor.css CHANGED
@@ -314,7 +314,7 @@
314
314
 
315
315
  .ProseMirror .caption-description {
316
316
  margin: 0;
317
- outline: none !important
317
+ outline: none !important;
318
318
  }
319
319
 
320
320
  .ProseMirror .suppress-title .caption-description {
@@ -344,7 +344,7 @@
344
344
  color: #999;
345
345
  font-style: italic;
346
346
  pointer-events: none;
347
- }
347
+ }
348
348
 
349
349
  .ProseMirror .caption-description.empty-node::before {
350
350
  content: 'Caption...';
@@ -626,7 +626,7 @@
626
626
  }
627
627
 
628
628
  .ProseMirror .add-subtitle svg rect {
629
- fill: #6E6E6E !important;
629
+ fill: #6e6e6e !important;
630
630
  }
631
631
 
632
632
  .ProseMirror .empty-node:hover::before {
@@ -682,6 +682,7 @@
682
682
  .ProseMirror .block-container.block-contributors {
683
683
  grid-template-columns: 52px auto 100px !important;
684
684
  }
685
+
685
686
  .ProseMirror .block-container.block-affiliations {
686
687
  grid-template-columns: 52px auto 100px !important;
687
688
  }
@@ -1263,7 +1264,6 @@
1263
1264
  font-size: 14px;
1264
1265
  }
1265
1266
 
1266
-
1267
1267
  .ProseMirror .supplements-toggle-btn {
1268
1268
  background: none;
1269
1269
  border: none;
@@ -1279,7 +1279,6 @@
1279
1279
  z-index: 10;
1280
1280
  }
1281
1281
 
1282
-
1283
1282
  .ProseMirror .supplements-toggle-btn svg {
1284
1283
  width: 16px;
1285
1284
  height: 9px;
@@ -1289,7 +1288,6 @@
1289
1288
  transform: rotate(180deg);
1290
1289
  }
1291
1290
 
1292
-
1293
1291
  .ProseMirror .supplements-content {
1294
1292
  border: 1px solid #c9c9c9;
1295
1293
  border-radius: 4px;
@@ -1333,18 +1331,18 @@
1333
1331
  }
1334
1332
 
1335
1333
  .ProseMirror .supplement-item.dragging {
1336
- background-color: #F2F2F2 !important;
1334
+ background-color: #f2f2f2 !important;
1337
1335
  opacity: 0.3;
1338
1336
  z-index: 1000;
1339
1337
  }
1340
1338
 
1341
1339
  .ProseMirror .supplement-item:hover {
1342
- background-color: #F2F2F2 !important;
1340
+ background-color: #f2f2f2 !important;
1343
1341
  cursor: move;
1344
1342
  }
1345
1343
 
1346
1344
  .ProseMirror .supplement-item:hover figcaption {
1347
- background-color: #F2F2F2 !important;
1345
+ background-color: #f2f2f2 !important;
1348
1346
  }
1349
1347
 
1350
1348
  .ProseMirror .supplement-item .drag-icon {