@manuscripts/body-editor 1.7.1 → 1.7.2-LEAN-3254-0

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.
@@ -86,5 +86,6 @@ exports.default = (props, dispatch) => {
86
86
  table_element_footer: (0, table_element_footer_editable_1.default)(props),
87
87
  toc_element: (0, toc_element_editable_1.default)(props),
88
88
  comments: (0, empty_1.default)('comments'),
89
+ supplements: (0, empty_1.default)('supplements'),
89
90
  };
90
91
  };
@@ -5,13 +5,7 @@ const transform_1 = require("@manuscripts/transform");
5
5
  function findHighlightMarkers(doc) {
6
6
  const markers = [];
7
7
  let current;
8
- const commentIds = [];
9
8
  doc.descendants((node, pos) => {
10
- if (node.type.name === transform_1.schema.nodes.comments.name) {
11
- node.content.forEach(({ attrs }) => {
12
- commentIds.push(attrs.id);
13
- });
14
- }
15
9
  if ((0, transform_1.isHighlightMarkerNode)(node)) {
16
10
  const { position, tid, id } = node.attrs;
17
11
  if (position === 'start') {
@@ -27,6 +21,6 @@ function findHighlightMarkers(doc) {
27
21
  }
28
22
  }
29
23
  });
30
- return markers.filter((marker) => commentIds.includes(marker.id));
24
+ return markers;
31
25
  }
32
26
  exports.findHighlightMarkers = findHighlightMarkers;
@@ -81,5 +81,6 @@ export default (props, dispatch) => {
81
81
  table_element_footer: tableElementFooter(props),
82
82
  toc_element: tocElement(props),
83
83
  comments: empty('comments'),
84
+ supplements: empty('supplements'),
84
85
  };
85
86
  };
@@ -1,14 +1,8 @@
1
- import { isHighlightMarkerNode, schema } from '@manuscripts/transform';
1
+ import { isHighlightMarkerNode } from '@manuscripts/transform';
2
2
  export function findHighlightMarkers(doc) {
3
3
  const markers = [];
4
4
  let current;
5
- const commentIds = [];
6
5
  doc.descendants((node, pos) => {
7
- if (node.type.name === schema.nodes.comments.name) {
8
- node.content.forEach(({ attrs }) => {
9
- commentIds.push(attrs.id);
10
- });
11
- }
12
6
  if (isHighlightMarkerNode(node)) {
13
7
  const { position, tid, id } = node.attrs;
14
8
  if (position === 'start') {
@@ -24,5 +18,5 @@ export function findHighlightMarkers(doc) {
24
18
  }
25
19
  }
26
20
  });
27
- return markers.filter((marker) => commentIds.includes(marker.id));
21
+ return markers;
28
22
  }
@@ -574,5 +574,8 @@ declare const _default: (props: EditorProps, dispatch: Dispatch) => {
574
574
  comments: () => {
575
575
  dom: HTMLDivElement;
576
576
  };
577
+ supplements: () => {
578
+ dom: HTMLDivElement;
579
+ };
577
580
  };
578
581
  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": "1.7.1",
4
+ "version": "1.7.2-LEAN-3254-0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
package/styles/Editor.css CHANGED
@@ -1013,6 +1013,6 @@
1013
1013
  line-height: 1.43;
1014
1014
  padding-left: 65px;
1015
1015
  }
1016
- div[style*="background-color: rgba(249, 2, 2, 0.53)"] {
1016
+ .highlight {
1017
1017
  background-color: #ffe08b !important;
1018
1018
  }