@manuscripts/body-editor 3.7.20 → 3.7.22
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/components/form/FormFooter.js +2 -12
- package/dist/cjs/plugins/placeholder.js +1 -1
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/attachments.js +1 -1
- package/dist/es/components/form/FormFooter.js +2 -12
- package/dist/es/plugins/placeholder.js +1 -1
- package/dist/es/versions.js +1 -1
- package/dist/es/views/attachments.js +1 -1
- package/dist/types/versions.d.ts +1 -1
- package/package.json +1 -1
- package/styles/Editor.css +14 -2
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const style_guide_1 = require("@manuscripts/style-guide");
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
9
|
const Footer = styled_components_1.default.div `
|
|
@@ -16,19 +17,8 @@ const Footer = styled_components_1.default.div `
|
|
|
16
17
|
position: relative;
|
|
17
18
|
z-index: 3;
|
|
18
19
|
`;
|
|
19
|
-
const RemoveButton = styled_components_1.default.button `
|
|
20
|
-
background-color: #0d79d0;
|
|
21
|
-
color: ${(props) => props.theme.colors.text.onDark};
|
|
22
|
-
padding: 8px 32px;
|
|
23
|
-
border-radius: 4px;
|
|
24
|
-
border: 1px solid #0d79d0;
|
|
25
|
-
&:hover {
|
|
26
|
-
background-color: ${(props) => props.theme.colors.background.hover};
|
|
27
|
-
}
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
`;
|
|
30
20
|
const FormFooter = ({ onCancel }) => {
|
|
31
21
|
return (react_1.default.createElement(Footer, null,
|
|
32
|
-
react_1.default.createElement(
|
|
22
|
+
react_1.default.createElement(style_guide_1.PrimaryButton, { onClick: onCancel }, "Close")));
|
|
33
23
|
};
|
|
34
24
|
exports.default = FormFooter;
|
|
@@ -26,7 +26,7 @@ const placeholderWidget = (placeholder) => (view, getPos) => {
|
|
|
26
26
|
const element = document.createElement('span');
|
|
27
27
|
element.className = 'placeholder-text';
|
|
28
28
|
element.setAttribute('aria-hidden', 'true');
|
|
29
|
-
element.
|
|
29
|
+
element.dataset.placeholder = placeholder;
|
|
30
30
|
element.addEventListener('click', (event) => {
|
|
31
31
|
event.preventDefault();
|
|
32
32
|
const pos = getPos();
|
package/dist/cjs/versions.js
CHANGED
|
@@ -42,7 +42,7 @@ class AttachmentsView extends block_view_1.default {
|
|
|
42
42
|
const panel = document.createElement('div');
|
|
43
43
|
panel.classList.add('panel-header');
|
|
44
44
|
const label = document.createElement('span');
|
|
45
|
-
label.textContent = 'Main
|
|
45
|
+
label.textContent = 'Main document';
|
|
46
46
|
label.contentEditable = 'false';
|
|
47
47
|
const toggleBtn = document.createElement('button');
|
|
48
48
|
toggleBtn.classList.add('toggle-btn', 'button-reset');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PrimaryButton } from '@manuscripts/style-guide';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
const Footer = styled.div `
|
|
@@ -11,19 +12,8 @@ const Footer = styled.div `
|
|
|
11
12
|
position: relative;
|
|
12
13
|
z-index: 3;
|
|
13
14
|
`;
|
|
14
|
-
const RemoveButton = styled.button `
|
|
15
|
-
background-color: #0d79d0;
|
|
16
|
-
color: ${(props) => props.theme.colors.text.onDark};
|
|
17
|
-
padding: 8px 32px;
|
|
18
|
-
border-radius: 4px;
|
|
19
|
-
border: 1px solid #0d79d0;
|
|
20
|
-
&:hover {
|
|
21
|
-
background-color: ${(props) => props.theme.colors.background.hover};
|
|
22
|
-
}
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
`;
|
|
25
15
|
const FormFooter = ({ onCancel }) => {
|
|
26
16
|
return (React.createElement(Footer, null,
|
|
27
|
-
React.createElement(
|
|
17
|
+
React.createElement(PrimaryButton, { onClick: onCancel }, "Close")));
|
|
28
18
|
};
|
|
29
19
|
export default FormFooter;
|
|
@@ -24,7 +24,7 @@ const placeholderWidget = (placeholder) => (view, getPos) => {
|
|
|
24
24
|
const element = document.createElement('span');
|
|
25
25
|
element.className = 'placeholder-text';
|
|
26
26
|
element.setAttribute('aria-hidden', 'true');
|
|
27
|
-
element.
|
|
27
|
+
element.dataset.placeholder = placeholder;
|
|
28
28
|
element.addEventListener('click', (event) => {
|
|
29
29
|
event.preventDefault();
|
|
30
30
|
const pos = getPos();
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.7.
|
|
1
|
+
export const VERSION = '3.7.22';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -36,7 +36,7 @@ export class AttachmentsView extends BlockView {
|
|
|
36
36
|
const panel = document.createElement('div');
|
|
37
37
|
panel.classList.add('panel-header');
|
|
38
38
|
const label = document.createElement('span');
|
|
39
|
-
label.textContent = 'Main
|
|
39
|
+
label.textContent = 'Main document';
|
|
40
40
|
label.contentEditable = 'false';
|
|
41
41
|
const toggleBtn = document.createElement('button');
|
|
42
42
|
toggleBtn.classList.add('toggle-btn', 'button-reset');
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.7.
|
|
1
|
+
export declare const VERSION = "3.7.22";
|
|
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.7.
|
|
4
|
+
"version": "3.7.22",
|
|
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
|
@@ -155,9 +155,16 @@
|
|
|
155
155
|
.ProseMirror .pullquote figure {
|
|
156
156
|
margin: 0;
|
|
157
157
|
}
|
|
158
|
-
.ProseMirror .pullquote footer.empty-node:after
|
|
158
|
+
.ProseMirror .pullquote footer.empty-node:after {
|
|
159
|
+
background: #ddf3fa;
|
|
160
|
+
color: #6e6e6e;
|
|
161
|
+
}
|
|
162
|
+
|
|
159
163
|
.ProseMirror .pullquote .placeholder-text {
|
|
160
164
|
background: #ddf3fa;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.ProseMirror .pullquote .placeholder-text::before {
|
|
161
168
|
color: #6e6e6e;
|
|
162
169
|
}
|
|
163
170
|
|
|
@@ -572,8 +579,13 @@
|
|
|
572
579
|
|
|
573
580
|
.ProseMirror .placeholder-text {
|
|
574
581
|
font-style: italic;
|
|
575
|
-
color: #c9c9c9;
|
|
576
582
|
margin: 0;
|
|
583
|
+
cursor: text;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.ProseMirror .placeholder-text::before {
|
|
587
|
+
content: attr(data-placeholder);
|
|
588
|
+
color: #c9c9c9;
|
|
577
589
|
}
|
|
578
590
|
|
|
579
591
|
.ProseMirror .add-subtitle {
|