@manuscripts/body-editor 2.6.25 → 2.6.26

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.
@@ -180,12 +180,12 @@ const DraggableTree = ({ tree, view, depth, can, }) => {
180
180
  dragRef(dropRef(ref));
181
181
  const dragClass = isDragging ? 'dragging' : '';
182
182
  const dropClass = isOver && dropSide ? `drop-${dropSide}` : '';
183
- return (react_1.default.createElement(Outline_1.Outline, { ref: ref, className: `${dragClass} ${dropClass}` },
183
+ return (react_1.default.createElement(Outline_1.Outline, { ref: ref, className: `${dragClass} ${dropClass} ${isDeletedItem && 'deleted'}` },
184
184
  !isTop && node.type.name != 'manuscript' && (react_1.default.createElement(Outline_1.OutlineItem, { depth: depth, onContextMenu: handleContextMenu },
185
185
  items.length ? (react_1.default.createElement(Outline_1.OutlineItemArrow, { onClick: toggleOpen }, isOpen ? react_1.default.createElement(style_guide_1.TriangleExpandedIcon, null) : react_1.default.createElement(style_guide_1.TriangleCollapsedIcon, null))) : (react_1.default.createElement(Outline_1.OutlineItemNoArrow, null)),
186
186
  react_1.default.createElement(Outline_1.OutlineItemLink, { to: `#${node.attrs.id}` },
187
187
  react_1.default.createElement(Outline_1.OutlineItemIcon, null, (0, node_type_icons_1.nodeTypeIcon)(node.type)),
188
- react_1.default.createElement(Outline_1.OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, itemText(node))))),
188
+ react_1.default.createElement(Outline_1.OutlineItemLinkText, { className: `outline-text-${node.type.name}` }, itemText(node))))),
189
189
  items.length ? (react_1.default.createElement("div", { className: `subtree ${isOpen ? '' : 'collapsed'}` }, items.map((subtree, index) => (react_1.default.createElement(exports.DraggableTree, { key: subtree.node.attrs.id || 'subtree-' + index, tree: subtree, view: view, depth: !tree.parent ? depth : depth + 1, can: can }))))) : null));
190
190
  };
191
191
  exports.DraggableTree = DraggableTree;
@@ -95,10 +95,6 @@ exports.OutlineItemLinkText = styled_components_1.default.span `
95
95
  overflow-x: hidden;
96
96
  text-overflow: ellipsis;
97
97
  margin-left: ${(props) => props.theme.grid.unit * 2}px;
98
-
99
- &.deleted {
100
- text-decoration: line-through;
101
- }
102
98
  `;
103
99
  exports.Outline = styled_components_1.default.div `
104
100
  font-size: ${(props) => props.theme.font.size.medium};
@@ -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 = '2.6.25';
4
+ exports.VERSION = '2.6.26';
5
5
  exports.MATHJAX_VERSION = '3.2.2';
@@ -153,11 +153,11 @@ export const DraggableTree = ({ tree, view, depth, can, }) => {
153
153
  dragRef(dropRef(ref));
154
154
  const dragClass = isDragging ? 'dragging' : '';
155
155
  const dropClass = isOver && dropSide ? `drop-${dropSide}` : '';
156
- return (React.createElement(Outline, { ref: ref, className: `${dragClass} ${dropClass}` },
156
+ return (React.createElement(Outline, { ref: ref, className: `${dragClass} ${dropClass} ${isDeletedItem && 'deleted'}` },
157
157
  !isTop && node.type.name != 'manuscript' && (React.createElement(OutlineItem, { depth: depth, onContextMenu: handleContextMenu },
158
158
  items.length ? (React.createElement(OutlineItemArrow, { onClick: toggleOpen }, isOpen ? React.createElement(TriangleExpandedIcon, null) : React.createElement(TriangleCollapsedIcon, null))) : (React.createElement(OutlineItemNoArrow, null)),
159
159
  React.createElement(OutlineItemLink, { to: `#${node.attrs.id}` },
160
160
  React.createElement(OutlineItemIcon, null, nodeTypeIcon(node.type)),
161
- React.createElement(OutlineItemLinkText, { className: `outline-text-${node.type.name} ${isDeletedItem && 'deleted'}` }, itemText(node))))),
161
+ React.createElement(OutlineItemLinkText, { className: `outline-text-${node.type.name}` }, itemText(node))))),
162
162
  items.length ? (React.createElement("div", { className: `subtree ${isOpen ? '' : 'collapsed'}` }, items.map((subtree, index) => (React.createElement(DraggableTree, { key: subtree.node.attrs.id || 'subtree-' + index, tree: subtree, view: view, depth: !tree.parent ? depth : depth + 1, can: can }))))) : null));
163
163
  };
@@ -89,10 +89,6 @@ export const OutlineItemLinkText = styled.span `
89
89
  overflow-x: hidden;
90
90
  text-overflow: ellipsis;
91
91
  margin-left: ${(props) => props.theme.grid.unit * 2}px;
92
-
93
- &.deleted {
94
- text-decoration: line-through;
95
- }
96
92
  `;
97
93
  export const Outline = styled.div `
98
94
  font-size: ${(props) => props.theme.font.size.medium};
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.6.25';
1
+ export const VERSION = '2.6.26';
2
2
  export const MATHJAX_VERSION = '3.2.2';
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.6.25";
1
+ export declare const VERSION = "2.6.26";
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": "2.6.25",
4
+ "version": "2.6.26",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -32,7 +32,7 @@
32
32
  "@iarna/word-count": "^1.1.2",
33
33
  "@manuscripts/json-schema": "2.2.11",
34
34
  "@manuscripts/library": "1.3.11",
35
- "@manuscripts/style-guide": "2.0.24",
35
+ "@manuscripts/style-guide": "2.0.25",
36
36
  "@manuscripts/track-changes-plugin": "1.8.4",
37
37
  "@manuscripts/transform": "3.0.22",
38
38
  "@popperjs/core": "^2.11.8",
@@ -419,11 +419,6 @@ span.comment-marker {
419
419
  border-color: #bce7f6;
420
420
  }
421
421
 
422
- .keywords .keyword.deleted,
423
- .keywords .keyword.deleted {
424
- text-decoration: line-through;
425
- }
426
-
427
422
  .keywords .keyword .track-changes--control {
428
423
  top: 0;
429
424
  }
@@ -564,10 +559,17 @@ span.selected-suggestion,
564
559
  margin: 16px 0;
565
560
  }
566
561
 
567
- .ProseMirror .inserted,
568
- .ProseMirror [data-track-op='insert'][data-track-status='pending'] .block,
569
- .ProseMirror [data-track-op='node_split'][data-track-status='pending'] .block,
570
- .ProseMirror
562
+ .tracking-visible .ProseMirror .inserted,
563
+ .tracking-visible
564
+ .ProseMirror
565
+ [data-track-op='insert'][data-track-status='pending']
566
+ .block,
567
+ .tracking-visible
568
+ .ProseMirror
569
+ [data-track-op='node_split'][data-track-status='pending']
570
+ .block,
571
+ .tracking-visible
572
+ .ProseMirror
571
573
  [data-track-op='wrap_with_node'][data-track-status='pending']
572
574
  .block {
573
575
  background: var(--inserted-pending-bg-color);
@@ -582,23 +584,32 @@ span.selected-suggestion,
582
584
  color: var(--common-color) !important;
583
585
  }
584
586
 
585
- .ProseMirror .set_attrs,
586
- .ProseMirror [data-track-op='set_attrs'] {
587
+ .tracking-visible .ProseMirror .set_attrs,
588
+ .tracking-visible .ProseMirror [data-track-op='set_attrs'] {
587
589
  background: var(--inserted-pending-bg-color);
588
590
  text-decoration: none;
589
591
  }
590
592
 
591
593
  .ProseMirror .deleted::before,
592
- .ProseMirror .deleted {
594
+ .ProseMirror .deleted,
595
+ .ProseMirror p .equation.deleted {
596
+ display: none;
597
+ }
598
+
599
+ .tracking-visible .ProseMirror .deleted::before,
600
+ .tracking-visible .ProseMirror .deleted,
601
+ .tracking-visible .ProseMirror p .equation.deleted {
602
+ display: inline;
593
603
  background: var(--deleted-pending-bg-color);
594
604
  color: var(--deleted-color);
595
605
  text-decoration: line-through;
596
606
  }
597
- .equation.deleted {
598
- position: relative;
607
+
608
+ .tracking-visible .ProseMirror .equation.deleted {
609
+ display: flex;
599
610
  }
600
611
 
601
- .equation.deleted:after {
612
+ .tracking-visible .equation.deleted:after {
602
613
  content: '';
603
614
  width: 100%;
604
615
  left: 0;
@@ -607,6 +618,20 @@ span.selected-suggestion,
607
618
  top: calc(50% + 1px);
608
619
  }
609
620
 
621
+ .tracking-visible .ProseMirror .footnote.deleted::before,
622
+ .tracking-visible .ProseMirror .footnote.deleted {
623
+ display: flex;
624
+ }
625
+
626
+ .tracking-visible .subtree .deleted {
627
+ display: inline;
628
+ text-decoration: line-through;
629
+ }
630
+
631
+ .subtree .deleted {
632
+ display: none;
633
+ }
634
+
610
635
  .ProseMirror .inserted:has(.selected-suggestion),
611
636
  .ProseMirror .deleted:has(.selected-suggestion),
612
637
  .ProseMirror .selected-suggestion .highlight,
@@ -649,20 +674,35 @@ span.selected-suggestion,
649
674
  display: none;
650
675
  }
651
676
 
677
+ .ProseMirror
678
+ .block-container[data-track-status='pending'][data-track-op='delete'] {
679
+ display: none;
680
+ }
681
+ .tracking-visible
682
+ .ProseMirror
683
+ .block-container[data-track-status='pending'][data-track-op='delete'] {
684
+ display: grid;
685
+ }
686
+
652
687
  .contributor[data-track-status='pending'][data-track-op='delete'],
653
688
  .affiliation[data-track-status='pending'][data-track-op='delete'] {
654
- text-decoration: line-through;
655
- color: var(--deleted-color);
656
- background-color: var(--deleted-pending-bg-color);
689
+ display: none;
657
690
  }
658
691
 
659
- .contributor[data-track-op='delete']:not([data-track-status='rejected']),
660
- .affiliation[data-track-op='delete']:not([data-track-status='rejected']) {
692
+ .tracking-visible
693
+ .contributor[data-track-status='pending'][data-track-op='delete'],
694
+ .tracking-visible
695
+ .affiliation[data-track-status='pending'][data-track-op='delete'] {
696
+ display: inline-flex;
661
697
  text-decoration: line-through;
698
+ color: var(--deleted-color);
699
+ background-color: var(--deleted-pending-bg-color);
662
700
  }
663
701
 
664
- .contributor[data-track-status='pending'][data-track-op='insert'],
665
- .affiliation[data-track-status='pending'][data-track-op='insert'] {
702
+ .tracking-visible
703
+ .contributor[data-track-status='pending'][data-track-op='insert'],
704
+ .tracking-visible
705
+ .affiliation[data-track-status='pending'][data-track-op='insert'] {
666
706
  background: var(--inserted-pending-bg-color);
667
707
  color: var(--inserted-pending-color);
668
708
  text-decoration: underline;
package/styles/Editor.css CHANGED
@@ -182,10 +182,6 @@
182
182
  color: inherit;
183
183
  }
184
184
 
185
- .ProseMirror .cross-reference.deleted {
186
- text-decoration: line-through;
187
- }
188
-
189
185
  .ProseMirror .bib-item.ProseMirror-selectednode,
190
186
  .ProseMirror .citation.ProseMirror-selectednode,
191
187
  .ProseMirror .cross-reference.ProseMirror-selectednode {