@manuscripts/body-editor 2.5.7 → 2.5.9-LEAN-4049.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.
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/equation.js +7 -0
- package/dist/cjs/views/inline_equation.js +7 -0
- package/dist/es/versions.js +1 -1
- package/dist/es/views/equation.js +7 -0
- package/dist/es/views/inline_equation.js +7 -0
- package/dist/types/versions.d.ts +1 -1
- package/package.json +2 -2
- package/styles/AdvancedEditor.css +61 -77
- package/styles/Editor.css +6 -5
- package/styles/track-styles.css +5 -19
package/dist/cjs/versions.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.EquationView = void 0;
|
|
19
19
|
const math_1 = require("../lib/math");
|
|
20
|
+
const track_changes_utils_1 = require("../lib/track-changes-utils");
|
|
20
21
|
const base_node_view_1 = require("./base_node_view");
|
|
21
22
|
const creators_1 = require("./creators");
|
|
22
23
|
class EquationView extends base_node_view_1.BaseNodeView {
|
|
@@ -33,6 +34,12 @@ class EquationView extends base_node_view_1.BaseNodeView {
|
|
|
33
34
|
};
|
|
34
35
|
this.updateContents = () => {
|
|
35
36
|
this.dom.innerHTML = this.node.attrs.contents;
|
|
37
|
+
if ((0, track_changes_utils_1.isDeleted)(this.node)) {
|
|
38
|
+
this.dom.classList.add('deleted');
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.dom.classList.remove('deleted');
|
|
42
|
+
}
|
|
36
43
|
(0, math_1.renderMath)(this.dom);
|
|
37
44
|
};
|
|
38
45
|
this.ignoreMutation = () => true;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.InlineEquationView = void 0;
|
|
19
19
|
const math_1 = require("../lib/math");
|
|
20
|
+
const track_changes_utils_1 = require("../lib/track-changes-utils");
|
|
20
21
|
const base_node_view_1 = require("./base_node_view");
|
|
21
22
|
const creators_1 = require("./creators");
|
|
22
23
|
class InlineEquationView extends base_node_view_1.BaseNodeView {
|
|
@@ -27,6 +28,12 @@ class InlineEquationView extends base_node_view_1.BaseNodeView {
|
|
|
27
28
|
this.updateContents();
|
|
28
29
|
};
|
|
29
30
|
this.updateContents = () => {
|
|
31
|
+
if ((0, track_changes_utils_1.isDeleted)(this.node)) {
|
|
32
|
+
this.dom.classList.add('deleted');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.dom.classList.remove('deleted');
|
|
36
|
+
}
|
|
30
37
|
this.dom.innerHTML = this.node.attrs.contents;
|
|
31
38
|
(0, math_1.renderMath)(this.dom);
|
|
32
39
|
};
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.5.
|
|
1
|
+
export const VERSION = '2.5.9-LEAN-4049.0';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { renderMath } from '../lib/math';
|
|
17
|
+
import { isDeleted } from '../lib/track-changes-utils';
|
|
17
18
|
import { BaseNodeView } from './base_node_view';
|
|
18
19
|
import { createNodeView } from './creators';
|
|
19
20
|
export class EquationView extends BaseNodeView {
|
|
@@ -30,6 +31,12 @@ export class EquationView extends BaseNodeView {
|
|
|
30
31
|
};
|
|
31
32
|
this.updateContents = () => {
|
|
32
33
|
this.dom.innerHTML = this.node.attrs.contents;
|
|
34
|
+
if (isDeleted(this.node)) {
|
|
35
|
+
this.dom.classList.add('deleted');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.dom.classList.remove('deleted');
|
|
39
|
+
}
|
|
33
40
|
renderMath(this.dom);
|
|
34
41
|
};
|
|
35
42
|
this.ignoreMutation = () => true;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { renderMath } from '../lib/math';
|
|
17
|
+
import { isDeleted } from '../lib/track-changes-utils';
|
|
17
18
|
import { BaseNodeView } from './base_node_view';
|
|
18
19
|
import { createNodeView } from './creators';
|
|
19
20
|
export class InlineEquationView extends BaseNodeView {
|
|
@@ -24,6 +25,12 @@ export class InlineEquationView extends BaseNodeView {
|
|
|
24
25
|
this.updateContents();
|
|
25
26
|
};
|
|
26
27
|
this.updateContents = () => {
|
|
28
|
+
if (isDeleted(this.node)) {
|
|
29
|
+
this.dom.classList.add('deleted');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.dom.classList.remove('deleted');
|
|
33
|
+
}
|
|
27
34
|
this.dom.innerHTML = this.node.attrs.contents;
|
|
28
35
|
renderMath(this.dom);
|
|
29
36
|
};
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.5.
|
|
1
|
+
export declare const VERSION = "2.5.9-LEAN-4049.0";
|
|
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.5.
|
|
4
|
+
"version": "2.5.9-LEAN-4049.0",
|
|
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.11",
|
|
35
35
|
"@manuscripts/style-guide": "2.0.22",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "1.8.1",
|
|
37
|
-
"@manuscripts/transform": "3.0.
|
|
37
|
+
"@manuscripts/transform": "3.0.11",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|
|
39
39
|
"astrocite-eutils": "^0.16.4",
|
|
40
40
|
"codemirror": "^5.58.1",
|
|
@@ -10,13 +10,23 @@
|
|
|
10
10
|
content: attr(data-section-number) '. ';
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.ProseMirror
|
|
14
|
-
|
|
13
|
+
.ProseMirror
|
|
14
|
+
> div.body
|
|
15
|
+
.block-box_element
|
|
16
|
+
.box-element
|
|
17
|
+
section:not(.toc)
|
|
18
|
+
.block-section_title
|
|
19
|
+
h1.empty-node[data-placeholder]::before {
|
|
15
20
|
content: attr(data-placeholder);
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
.ProseMirror
|
|
19
|
-
.
|
|
23
|
+
.ProseMirror
|
|
24
|
+
> div.body
|
|
25
|
+
.block-box_element
|
|
26
|
+
.box-element
|
|
27
|
+
section:not(.toc)
|
|
28
|
+
.block-section_title
|
|
29
|
+
h1::before {
|
|
20
30
|
content: none;
|
|
21
31
|
}
|
|
22
32
|
|
|
@@ -154,15 +164,16 @@
|
|
|
154
164
|
.ProseMirror .box-element .block-container .block {
|
|
155
165
|
background: var(--box-element-bg-color);
|
|
156
166
|
padding-left: 12px;
|
|
157
|
-
border-left: 2px solid #
|
|
158
|
-
border-right: 2px solid #
|
|
167
|
+
border-left: 2px solid #e2e2e2;
|
|
168
|
+
border-right: 2px solid #e2e2e2;
|
|
159
169
|
}
|
|
160
170
|
|
|
161
|
-
.ProseMirror .box-element::after,
|
|
171
|
+
.ProseMirror .box-element::after,
|
|
172
|
+
.box-element > .block-section::before {
|
|
162
173
|
content: ' ';
|
|
163
174
|
margin-left: 52px;
|
|
164
175
|
margin-right: 52px;
|
|
165
|
-
border-top: 2px solid #
|
|
176
|
+
border-top: 2px solid #e2e2e2;
|
|
166
177
|
height: 0;
|
|
167
178
|
}
|
|
168
179
|
|
|
@@ -173,15 +184,23 @@
|
|
|
173
184
|
text-align: left;
|
|
174
185
|
}
|
|
175
186
|
|
|
176
|
-
.ProseMirror
|
|
187
|
+
.ProseMirror
|
|
188
|
+
.box-element
|
|
189
|
+
.block-section_title
|
|
190
|
+
h1.empty-node[data-placeholder]::before {
|
|
177
191
|
font-style: italic !important;
|
|
178
192
|
font-weight: 400 !important;
|
|
179
|
-
line-height: 24px;
|
|
193
|
+
line-height: 24px;
|
|
180
194
|
letter-spacing: -0.369px;
|
|
181
|
-
font-size: 13.5pt
|
|
195
|
+
font-size: 13.5pt;
|
|
182
196
|
}
|
|
183
|
-
.ProseMirror
|
|
184
|
-
|
|
197
|
+
.ProseMirror
|
|
198
|
+
.box-element
|
|
199
|
+
.block-section:first-of-type
|
|
200
|
+
> section:first-of-type
|
|
201
|
+
> .block-section_title:first-of-type
|
|
202
|
+
> h1.empty-node[data-placeholder]::before {
|
|
203
|
+
font-size: 16pt;
|
|
185
204
|
}
|
|
186
205
|
.box-element section figcaption {
|
|
187
206
|
background: var(--box-element-bg-color);
|
|
@@ -233,7 +252,8 @@
|
|
|
233
252
|
left: 100%;
|
|
234
253
|
}
|
|
235
254
|
|
|
236
|
-
ul > .comment-marker,
|
|
255
|
+
ul > .comment-marker,
|
|
256
|
+
ol > .comment-marker {
|
|
237
257
|
float: left;
|
|
238
258
|
}
|
|
239
259
|
|
|
@@ -394,17 +414,13 @@ span.comment-marker {
|
|
|
394
414
|
background-color: inherit !important;
|
|
395
415
|
}
|
|
396
416
|
|
|
397
|
-
.keywords .keyword:hover:not(.pending) {
|
|
398
|
-
background-color: #f2fbfc !important;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
417
|
.keywords .keyword.selected {
|
|
402
418
|
background-color: #f2fbfc;
|
|
403
419
|
border-color: #bce7f6;
|
|
404
420
|
}
|
|
405
421
|
|
|
406
|
-
.keywords .keyword.deleted
|
|
407
|
-
.keywords .keyword.deleted
|
|
422
|
+
.keywords .keyword.deleted,
|
|
423
|
+
.keywords .keyword.deleted {
|
|
408
424
|
text-decoration: line-through;
|
|
409
425
|
}
|
|
410
426
|
|
|
@@ -426,11 +442,7 @@ span.comment-marker {
|
|
|
426
442
|
display: none;
|
|
427
443
|
}
|
|
428
444
|
|
|
429
|
-
.keywords .
|
|
430
|
-
display: inline;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.keywords .inserted.pending .delete-keyword {
|
|
445
|
+
.keywords .inserted .delete-keyword {
|
|
434
446
|
display: none;
|
|
435
447
|
}
|
|
436
448
|
|
|
@@ -532,7 +544,7 @@ span.comment-marker {
|
|
|
532
544
|
}
|
|
533
545
|
|
|
534
546
|
span.selected-suggestion,
|
|
535
|
-
.selected-suggestion > .block-container .block
|
|
547
|
+
.selected-suggestion > .block-container .block,
|
|
536
548
|
.selected-suggestion:not(:has(> .block-container)) {
|
|
537
549
|
background-color: var(--selected-pending-background-color) !important;
|
|
538
550
|
color: var(--common-color) !important;
|
|
@@ -542,24 +554,6 @@ span.selected-suggestion,
|
|
|
542
554
|
border-style: solid !important;
|
|
543
555
|
}
|
|
544
556
|
|
|
545
|
-
span.accepted .selected-suggestion,
|
|
546
|
-
.accepted .selected-suggestion > .block-container .block,
|
|
547
|
-
.accepted .selected-suggestion:not(:has(> .block-container)),
|
|
548
|
-
.selected-suggestion[data-track-status='accepted'],
|
|
549
|
-
.selected-suggestion > .block-container .block.accepted,
|
|
550
|
-
.selected-suggestion
|
|
551
|
-
> .block-container
|
|
552
|
-
.block:has([data-track-status='accepted']),
|
|
553
|
-
.selected-suggestion:not(:has(> .block-container)):has(
|
|
554
|
-
[data-track-status='accepted']
|
|
555
|
-
) {
|
|
556
|
-
background-color: var(--selected-accepted-background-color) !important;
|
|
557
|
-
border-width: 2px 0 2px 0 !important;
|
|
558
|
-
border-color: #c9c9c9 !important;
|
|
559
|
-
border-radius: 3px !important;
|
|
560
|
-
border-style: solid !important;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
557
|
.block-bullet_list .selected-suggestion p,
|
|
564
558
|
.block-ordered_list .selected-suggestion p {
|
|
565
559
|
margin: 0;
|
|
@@ -570,61 +564,51 @@ span.accepted .selected-suggestion,
|
|
|
570
564
|
margin: 16px 0;
|
|
571
565
|
}
|
|
572
566
|
|
|
573
|
-
.ProseMirror .inserted
|
|
567
|
+
.ProseMirror .inserted,
|
|
574
568
|
.ProseMirror [data-track-op='insert'][data-track-status='pending'] .block,
|
|
575
569
|
.ProseMirror [data-track-op='node_split'][data-track-status='pending'] .block,
|
|
576
|
-
.ProseMirror
|
|
570
|
+
.ProseMirror
|
|
571
|
+
[data-track-op='wrap_with_node'][data-track-status='pending']
|
|
572
|
+
.block {
|
|
577
573
|
background: var(--inserted-pending-bg-color);
|
|
578
574
|
color: var(--inserted-pending-color);
|
|
579
575
|
text-decoration: underline;
|
|
580
576
|
}
|
|
581
577
|
|
|
582
|
-
.ProseMirror .selected-suggestion .inserted
|
|
583
|
-
.ProseMirror
|
|
584
|
-
|
|
585
|
-
[data-track-op='insert'][data-track-status='pending']
|
|
586
|
-
.block,
|
|
587
|
-
.ProseMirror .selected-suggestion .deleted.pending {
|
|
578
|
+
.ProseMirror .selected-suggestion .inserted,
|
|
579
|
+
.ProseMirror .selected-suggestion [data-track-op='insert'] .block,
|
|
580
|
+
.ProseMirror .selected-suggestion .deleted {
|
|
588
581
|
background-color: var(--selected-pending-background-color) !important;
|
|
589
582
|
color: var(--common-color) !important;
|
|
590
583
|
}
|
|
591
584
|
|
|
592
|
-
.ProseMirror .
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
.ProseMirror .inserted.rejected {
|
|
596
|
-
display: none;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
.ProseMirror .selected-suggestion .deleted.accepted,
|
|
600
|
-
.ProseMirror .selected-suggestion .inserted.accepted {
|
|
601
|
-
background-color: var(--selected-accepted-background-color) !important;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.ProseMirror .set_attrs.pending,
|
|
605
|
-
.ProseMirror [data-track-op='set_attrs'].pending,
|
|
606
|
-
.ProseMirror [data-track-op='set_attrs'][data-track-status='pending'] {
|
|
585
|
+
.ProseMirror .set_attrs,
|
|
586
|
+
.ProseMirror [data-track-op='set_attrs'] {
|
|
607
587
|
background: var(--inserted-pending-bg-color);
|
|
608
588
|
text-decoration: none;
|
|
609
589
|
}
|
|
610
590
|
|
|
611
|
-
.ProseMirror .deleted
|
|
612
|
-
.ProseMirror .deleted
|
|
591
|
+
.ProseMirror .deleted::before,
|
|
592
|
+
.ProseMirror .deleted {
|
|
613
593
|
background: var(--deleted-pending-bg-color);
|
|
614
594
|
color: var(--deleted-color);
|
|
615
595
|
text-decoration: line-through;
|
|
616
596
|
}
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
.ProseMirror .deleted.accepted {
|
|
620
|
-
text-decoration: line-through;
|
|
597
|
+
.equation.deleted {
|
|
598
|
+
position: relative;
|
|
621
599
|
}
|
|
622
|
-
|
|
623
|
-
|
|
600
|
+
|
|
601
|
+
.equation.deleted:after {
|
|
602
|
+
content: '';
|
|
603
|
+
width: 100%;
|
|
604
|
+
left: 0;
|
|
605
|
+
position: absolute;
|
|
606
|
+
border-top: 1px solid red;
|
|
607
|
+
top: calc(50% + 1px);
|
|
624
608
|
}
|
|
625
609
|
|
|
626
|
-
.ProseMirror .inserted
|
|
627
|
-
.ProseMirror .deleted
|
|
610
|
+
.ProseMirror .inserted:has(.selected-suggestion),
|
|
611
|
+
.ProseMirror .deleted:has(.selected-suggestion),
|
|
628
612
|
.ProseMirror .selected-suggestion .highlight,
|
|
629
613
|
.ProseMirror
|
|
630
614
|
.selected-suggestion
|
package/styles/Editor.css
CHANGED
|
@@ -178,8 +178,7 @@
|
|
|
178
178
|
color: inherit;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
.ProseMirror .cross-reference.deleted
|
|
182
|
-
.ProseMirror .cross-reference.deleted.accepted {
|
|
181
|
+
.ProseMirror .cross-reference.deleted {
|
|
183
182
|
text-decoration: line-through;
|
|
184
183
|
}
|
|
185
184
|
|
|
@@ -577,7 +576,7 @@
|
|
|
577
576
|
position: absolute;
|
|
578
577
|
color: #c9c9c9;
|
|
579
578
|
font-style: italic;
|
|
580
|
-
font-family:
|
|
579
|
+
font-family: 'PT Sans';
|
|
581
580
|
font-size: 28px;
|
|
582
581
|
font-weight: 400;
|
|
583
582
|
line-height: 40px;
|
|
@@ -670,7 +669,9 @@
|
|
|
670
669
|
margin-top: 16px;
|
|
671
670
|
}
|
|
672
671
|
|
|
673
|
-
.ProseMirror
|
|
672
|
+
.ProseMirror
|
|
673
|
+
.block-container:not(.block-section, .block-box_element):hover
|
|
674
|
+
.block-gutter {
|
|
674
675
|
opacity: 1;
|
|
675
676
|
z-index: 2;
|
|
676
677
|
}
|
|
@@ -957,7 +958,7 @@
|
|
|
957
958
|
fill: #353535;
|
|
958
959
|
}
|
|
959
960
|
|
|
960
|
-
.ProseMirror .table-footer .inserted
|
|
961
|
+
.ProseMirror .table-footer .inserted {
|
|
961
962
|
margin-bottom: 5px;
|
|
962
963
|
}
|
|
963
964
|
|
package/styles/track-styles.css
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
.ProseMirror .inserted
|
|
2
|
-
.ProseMirror .set_attrs
|
|
3
|
-
background: #bffca7;
|
|
1
|
+
.ProseMirror .inserted,
|
|
2
|
+
.ProseMirror .set_attrs {
|
|
4
3
|
text-decoration: none;
|
|
5
4
|
}
|
|
6
|
-
.ProseMirror .inserted
|
|
7
|
-
.ProseMirror .set_attrs
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
.ProseMirror .inserted.rejected {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
.ProseMirror .deleted.accepted {
|
|
14
|
-
background: #bffca7;
|
|
15
|
-
}
|
|
16
|
-
.ProseMirror .deleted.rejected {
|
|
17
|
-
text-decoration: none;
|
|
18
|
-
}
|
|
19
|
-
.ProseMirror .inserted.pending,
|
|
20
|
-
.ProseMirror .set_attrs.pending,
|
|
21
|
-
.ProseMirror .deleted.pending {
|
|
5
|
+
.ProseMirror .inserted,
|
|
6
|
+
.ProseMirror .set_attrs,
|
|
7
|
+
.ProseMirror .deleted {
|
|
22
8
|
background: #ddf3fa;
|
|
23
9
|
}
|
|
24
10
|
.ProseMirror
|