@manuscripts/body-editor 2.8.30 → 2.8.31

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.
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { AltTitlesSectionNode } from '@manuscripts/transform';
17
+ import { Trackable } from '../types';
18
+ import BlockView from './block_view';
19
+ export declare class AltTitleSectionView extends BlockView<Trackable<AltTitlesSectionNode>> {
20
+ private container;
21
+ ignoreMutation: () => boolean;
22
+ createElement: () => void;
23
+ createClosingPanel(): HTMLDivElement;
24
+ }
25
+ declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<AltTitleSectionView>;
26
+ export default _default;
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": "2.8.30",
4
+ "version": "2.8.31",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -34,7 +34,7 @@
34
34
  "@manuscripts/library": "1.3.13",
35
35
  "@manuscripts/style-guide": "2.1.6",
36
36
  "@manuscripts/track-changes-plugin": "1.10.2",
37
- "@manuscripts/transform": "3.0.52",
37
+ "@manuscripts/transform": "3.0.53",
38
38
  "@popperjs/core": "^2.11.8",
39
39
  "astrocite-eutils": "^0.16.4",
40
40
  "codemirror": "^5.58.1",
@@ -1,3 +1,22 @@
1
+ * {
2
+ scroll-behavior: smooth;
3
+ }
4
+
5
+ .button-reset {
6
+ border: none;
7
+ margin: 0;
8
+ padding: 0;
9
+ width: auto;
10
+ overflow: visible;
11
+ background: transparent;
12
+ color: inherit;
13
+ font: inherit;
14
+ line-height: normal;
15
+ -webkit-font-smoothing: inherit;
16
+ -moz-osx-font-smoothing: inherit;
17
+ -webkit-appearance: none;
18
+ }
19
+
1
20
  .ProseMirror
2
21
  > div.body
3
22
  section:not(.toc)
@@ -614,7 +633,8 @@ span.comment-marker {
614
633
 
615
634
  /* Insert */
616
635
  .tracking-visible .ProseMirror .inserted,
617
- .tracking-visible .ProseMirror .block-award[data-track-op='insert'] span, .tracking-visible .ProseMirror a.link[data-track-op='wrap_with_node'] {
636
+ .tracking-visible .ProseMirror .block-award[data-track-op='insert'] span,
637
+ .tracking-visible .ProseMirror a.link[data-track-op='wrap_with_node'] {
618
638
  background: var(--inserted-pending-bg-color);
619
639
  color: var(--inserted-pending-color);
620
640
  text-decoration: underline;
@@ -733,10 +753,18 @@ figure.block:has(.equation.selected-suggestion) {
733
753
  box-shadow: inset 3px 0 0 var(--inserted-pending-color);
734
754
  }
735
755
 
736
- .tracking-visible .selected-suggestion[data-track-status='pending'][data-track-op='insert'] .block,
737
- .tracking-visible .selected-suggestion [data-track-status='pending'][data-track-op='insert'] .block,
738
- .tracking-visible .selected-suggestion[data-track-op='wrap_with_node'][data-track-status='pending'] .block {
739
- box-shadow: inset 6px 0 0 var(--inserted-pending-color), inset 9px 0 0 var(--inserted-pending-bg-color) !important;
756
+ .tracking-visible
757
+ .selected-suggestion[data-track-status='pending'][data-track-op='insert']
758
+ .block,
759
+ .tracking-visible
760
+ .selected-suggestion
761
+ [data-track-status='pending'][data-track-op='insert']
762
+ .block,
763
+ .tracking-visible
764
+ .selected-suggestion[data-track-op='wrap_with_node'][data-track-status='pending']
765
+ .block {
766
+ box-shadow: inset 6px 0 0 var(--inserted-pending-color),
767
+ inset 9px 0 0 var(--inserted-pending-bg-color) !important;
740
768
  animation: fadeOutBackground 3s forwards;
741
769
  --fade-color: var(--inserted-pending-bg-color);
742
770
  }
@@ -782,10 +810,12 @@ figure.block:has(.equation.selected-suggestion) {
782
810
 
783
811
  .tracking-visible .selected-suggestion[data-track-op='set_attrs'] .block,
784
812
  .tracking-visible .selected-suggestion [data-track-op='set_attrs'] .block,
785
- .tracking-visible .block:has(figure.selected-suggestion[data-track-op='set_attrs']),
813
+ .tracking-visible
814
+ .block:has(figure.selected-suggestion[data-track-op='set_attrs']),
786
815
  .tracking-visible .selected-suggestion[data-track-op='node_split'] .block,
787
816
  .tracking-visible figure.block:has(.equation.set_attrs.selected-suggestion) {
788
- box-shadow: inset 6px 0 0 var(--updated-border-color), inset 9px 0 0 var(--updated-bg-color) !important;
817
+ box-shadow: inset 6px 0 0 var(--updated-border-color),
818
+ inset 9px 0 0 var(--updated-bg-color) !important;
789
819
  animation: fadeOutBackground 3s forwards;
790
820
  --fade-color: var(--updated-bg-color);
791
821
  }
@@ -972,20 +1002,81 @@ figure.block:has(.equation.selected-suggestion) {
972
1002
  color: #6e6e6e;
973
1003
  }
974
1004
 
975
- * {
976
- scroll-behavior: smooth;
977
- }
978
-
979
1005
  .ProseMirror li.ProseMirror-selectednode:after {
980
1006
  content: none;
981
1007
  }
982
1008
  .manuscript-title {
983
1009
  margin-bottom: 20px;
1010
+ position: relative;
984
1011
  }
1012
+
985
1013
  .ProseMirror .manuscript-title.empty-node .article-titles::before {
986
1014
  content: attr(data-placeholder);
987
1015
  }
988
1016
 
1017
+ .alt-title-text {
1018
+ border-radius: 4px;
1019
+ border: 1px solid #e2e2e2;
1020
+ padding: 8px 16px;
1021
+ }
1022
+
1023
+ .manuscript-alt-title {
1024
+ display: block;
1025
+ margin: 13px 0 13px;
1026
+ }
1027
+ @keyframes alt-titles-in {
1028
+ from {
1029
+ opacity: 0;
1030
+ margin-top: -2rem;
1031
+ }
1032
+
1033
+ to {
1034
+ margin-top: 0;
1035
+ opacity: 1;
1036
+ }
1037
+ }
1038
+ .ProseMirror .block-alt_titles {
1039
+ display: none;
1040
+ }
1041
+ .ProseMirror .block-alt_titles.alt-titles-section-open {
1042
+ display: contents; /* covering the sides to prevent cursor setting into the parent block element */
1043
+ }
1044
+ /* covering the sides to prevent cursor setting into the parent block element */
1045
+ .alt-titles-section {
1046
+ opacity: 1;
1047
+ animation-name: alt-titles-in;
1048
+ animation-duration: 0.45s;
1049
+ padding: 0 calc(var(--body-side-margin) - 12px);
1050
+ }
1051
+ .alt-titles-closing-panel {
1052
+ border-bottom: 1px solid #e2e2e2;
1053
+ position: relative;
1054
+ padding-top: 0.2rem;
1055
+ margin: 1rem calc(var(--body-side-margin) - 12px) 0;
1056
+ }
1057
+ .alt-titles-closing-button {
1058
+ position: absolute;
1059
+ cursor: pointer;
1060
+ right: 0;
1061
+ top: 50%;
1062
+ transform: translate(100%, -50%) scaleY(-1);
1063
+ background: #fff;
1064
+ z-index: 2;
1065
+ }
1066
+ .alt-title-label {
1067
+ font-size: 18px;
1068
+ margin-bottom: 5px;
1069
+ text-transform: capitalize;
1070
+ color: #6e6e6e;
1071
+ line-height: 1.3;
1072
+ }
1073
+ .alt-titles-open {
1074
+ position: absolute;
1075
+ right: var(--body-side-margin);
1076
+ transform: translateX(100%);
1077
+ bottom: 0;
1078
+ cursor: pointer;
1079
+ }
989
1080
  .ProseMirror .table-context-menu-button svg {
990
1081
  margin: 4px;
991
1082
  pointer-events: none;
package/styles/Editor.css CHANGED
@@ -1,3 +1,6 @@
1
+ :root {
2
+ --body-side-margin: 65px;
3
+ }
1
4
  .ProseMirror.manuscript-editor {
2
5
  font-size: 16px;
3
6
  line-height: 1.5;
@@ -136,13 +139,13 @@
136
139
  .ProseMirror tr th {
137
140
  border-top: 1px solid #000;
138
141
  border-bottom: 1px solid #000;
139
- background: #E2E2E2;
142
+ background: #e2e2e2;
140
143
  text-align: left;
141
144
  font-weight: bold;
142
145
  }
143
146
 
144
147
  .ProseMirror tr th:not(:last-child) {
145
- border-right: 1px solid #C9C9C9;
148
+ border-right: 1px solid #c9c9c9;
146
149
  }
147
150
 
148
151
  .ProseMirror tr td {
@@ -272,7 +275,6 @@
272
275
  text-decoration: underline;
273
276
  }
274
277
 
275
-
276
278
  .ProseMirror .figure.placeholder.over {
277
279
  border-color: #bce7f6;
278
280
  }
@@ -626,16 +628,22 @@
626
628
  .ProseMirror .block-container.block-affiliations {
627
629
  grid-template-columns: 52px auto 100px !important;
628
630
  }
629
- .ProseMirror .block-container.block-section, .ProseMirror .block-container.block-graphical_abstract_section {
631
+ .ProseMirror .block-container.block-section,
632
+ .ProseMirror .block-container.block-graphical_abstract_section {
630
633
  position: relative;
631
634
  display: grid;
632
635
  grid-template-columns: auto;
633
636
  }
634
- .ProseMirror .block-container.block-section section, .ProseMirror .block-container.block-graphical_abstract_section section {
637
+ .ProseMirror .block-container.block-section section,
638
+ .ProseMirror .block-container.block-graphical_abstract_section section {
635
639
  position: relative;
636
640
  }
637
641
 
638
- .ProseMirror .block-container:not(.block-section, .block-graphical_abstract_section):hover {
642
+ .ProseMirror
643
+ .block-container:not(
644
+ .block-section,
645
+ .block-graphical_abstract_section
646
+ ):hover {
639
647
  z-index: 2;
640
648
  }
641
649
 
@@ -698,17 +706,25 @@
698
706
  }
699
707
 
700
708
  .ProseMirror
701
- .block-container:not(.block-section, .block-box_element, .block-graphical_abstract_section):hover
709
+ .block-container:not(
710
+ .block-section,
711
+ .block-box_element,
712
+ .block-graphical_abstract_section
713
+ ):hover
702
714
  .block-gutter {
703
715
  opacity: 1;
704
716
  z-index: 2;
705
717
  }
706
718
 
707
719
  .ProseMirror:not(.ProseMirror-focused.popper-open)
708
- .block-container:not(.block-section, .block-box_element, .block-graphical_abstract_section):hover
709
- .action-gutter {
710
- pointer-events: visible;
711
- opacity: 1;
720
+ .block-container:not(
721
+ .block-section,
722
+ .block-box_element,
723
+ .block-graphical_abstract_section
724
+ ):hover
725
+ .action-gutter {
726
+ pointer-events: visible;
727
+ opacity: 1;
712
728
  }
713
729
 
714
730
  .ProseMirror .block-box_element:hover > .block-gutter {
@@ -1046,7 +1062,7 @@
1046
1062
  .ProseMirror .footnote-marker-selected:not(.selected-suggestion) {
1047
1063
  text-decoration: underline;
1048
1064
  background-color: #f2fbfc;
1049
- border-color: #0d79d0;
1065
+ border-color: #0d79d0;
1050
1066
  }
1051
1067
  .ProseMirror .table-footer p {
1052
1068
  margin-bottom: 0;
@@ -1081,7 +1097,8 @@
1081
1097
  font-size: 28px;
1082
1098
  font-weight: 700;
1083
1099
  line-height: 1.43;
1084
- padding-left: 65px;
1100
+ padding-left: var(--body-side-margin);
1101
+ padding-right: var(--body-side-margin);
1085
1102
  }
1086
1103
  .highlight {
1087
1104
  background-color: #ffeebf !important;