@kids-reporter/draft-renderer 1.0.24 → 1.0.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.
- package/lib/block-render-maps/annotation.js +2 -12
- package/lib/block-render-maps/article-content.js +5 -16
- package/lib/block-render-maps/image-link.js +0 -4
- package/lib/block-render-maps/info-box.js +0 -10
- package/lib/block-renderers/blockquote.js +1 -5
- package/lib/block-renderers/dropdown.js +0 -6
- package/lib/block-renderers/embedded-code-block.js +1 -5
- package/lib/block-renderers/image-block.js +0 -12
- package/lib/block-renderers/image-link.js +0 -4
- package/lib/block-renderers/multimedia.js +1 -6
- package/lib/block-renderers/slideshow-block.js +1 -1
- package/lib/entity-decorators/link-decorator.js +3 -2
- package/package.json +1 -1
|
@@ -24,13 +24,8 @@ const HeadingForAnnotation = (0, _styledComponents.default)(_articleContent.Head
|
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
26
|
const ListForAnnotation = (0, _styledComponents.default)(_articleContent.List)`
|
|
27
|
-
color: #
|
|
27
|
+
color: #575757;
|
|
28
28
|
|
|
29
|
-
li {
|
|
30
|
-
font-size: ${({
|
|
31
|
-
theme
|
|
32
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
|
|
33
|
-
}
|
|
34
29
|
margin-bottom: 0px;
|
|
35
30
|
|
|
36
31
|
${_mediaQuery.mediaQuery.smallOnly} {
|
|
@@ -40,12 +35,7 @@ const ListForAnnotation = (0, _styledComponents.default)(_articleContent.List)`
|
|
|
40
35
|
}
|
|
41
36
|
`;
|
|
42
37
|
const ParagraphForAnnotation = (0, _styledComponents.default)(_articleContent.Paragraph)`
|
|
43
|
-
|
|
44
|
-
font-size: ${({
|
|
45
|
-
theme
|
|
46
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
|
|
47
|
-
font-weight: 400;
|
|
48
|
-
color: #494949;
|
|
38
|
+
color: #575757;
|
|
49
39
|
|
|
50
40
|
> div[data-block='true'] {
|
|
51
41
|
margin-bottom: 0px;
|
|
@@ -114,22 +114,11 @@ const Atomic = exports.Atomic = _styledComponents.default.div`
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
${_mediaQuery.mediaQuery.desktopAbove} {
|
|
117
|
-
div:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
[data-image-slideshow-caption-alignment='default'] {
|
|
123
|
-
position: relative !important;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
div:has(+ div [data-image-slideshow-caption-alignment='default'])
|
|
127
|
-
[data-image-block-caption-alignment='default'] {
|
|
128
|
-
position: relative !important;
|
|
129
|
-
}
|
|
130
|
-
div:has(+ div [data-image-slideshow-caption-alignment='default'])
|
|
131
|
-
[data-image-slideshow-caption-alignment='default'] {
|
|
132
|
-
position: relative !important;
|
|
117
|
+
> div:last-child figcaption[data-image-block-caption-alignment='default'] {
|
|
118
|
+
position: absolute;
|
|
119
|
+
right: 0;
|
|
120
|
+
top: 100%;
|
|
121
|
+
margin-right: 0px;
|
|
133
122
|
}
|
|
134
123
|
}
|
|
135
124
|
`;
|
|
@@ -13,10 +13,6 @@ var _articleContent = require("./article-content");
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
const ParagraphForImageLink = (0, _styledComponents.default)(_articleContent.Paragraph)`
|
|
16
|
-
/* overwrite css */
|
|
17
|
-
font-size: ${({
|
|
18
|
-
theme
|
|
19
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
|
|
20
16
|
margin: 0;
|
|
21
17
|
text-align: left;
|
|
22
18
|
max-width: 100%;
|
|
@@ -44,21 +44,11 @@ const ListForInfoBox = (0, _styledComponents.default)(_articleContent.List)`
|
|
|
44
44
|
|
|
45
45
|
color: #232323;
|
|
46
46
|
li {
|
|
47
|
-
font-size: ${({
|
|
48
|
-
theme
|
|
49
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
|
|
50
47
|
line-height: 1.5;
|
|
51
48
|
}
|
|
52
49
|
`;
|
|
53
50
|
const ParagraphForInfoBox = (0, _styledComponents.default)(_articleContent.Paragraph)`
|
|
54
|
-
/* overwrite css */
|
|
55
|
-
font-size: ${({
|
|
56
|
-
theme
|
|
57
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
|
|
58
|
-
font-weight: 400;
|
|
59
51
|
margin-bottom: 16px;
|
|
60
|
-
line-height: 1.5;
|
|
61
|
-
color: #232323;
|
|
62
52
|
|
|
63
53
|
&:last-child {
|
|
64
54
|
margin-bottom: 0px;
|
|
@@ -44,13 +44,9 @@ const QuoteLeftContainer = _styledComponents.default.blockquote`
|
|
|
44
44
|
const QuoteText = _styledComponents.default.p`
|
|
45
45
|
margin: 0;
|
|
46
46
|
word-break: break-word;
|
|
47
|
-
font-size: ${({
|
|
48
|
-
theme
|
|
49
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '22px' : '18px'};
|
|
50
47
|
font-weight: 700;
|
|
51
48
|
letter-spacing: 0.9px;
|
|
52
|
-
|
|
53
|
-
color: #232323;
|
|
49
|
+
font-size: inherit;
|
|
54
50
|
`;
|
|
55
51
|
const SvgBlock = _styledComponents.default.div`
|
|
56
52
|
svg {
|
|
@@ -35,10 +35,6 @@ const DropdownOption = _styledComponents.default.li`
|
|
|
35
35
|
const Container = _styledComponents.default.div`
|
|
36
36
|
width: 100%;
|
|
37
37
|
overflow: hidden;
|
|
38
|
-
|
|
39
|
-
font-size: 18px;
|
|
40
|
-
font-weight: 400;
|
|
41
|
-
line-height: 1.5;
|
|
42
38
|
`;
|
|
43
39
|
const InputBlock = _styledComponents.default.div`
|
|
44
40
|
display: flex;
|
|
@@ -48,14 +44,12 @@ const InputBlock = _styledComponents.default.div`
|
|
|
48
44
|
`;
|
|
49
45
|
const Input = _styledComponents.default.input`
|
|
50
46
|
background: #ffffff;
|
|
51
|
-
font-size: 18px;
|
|
52
47
|
padding: 12px 0;
|
|
53
48
|
outline: none;
|
|
54
49
|
border: none;
|
|
55
50
|
`;
|
|
56
51
|
const Label = _styledComponents.default.span`
|
|
57
52
|
margin-left: 10px;
|
|
58
|
-
font-size: 14px;
|
|
59
53
|
cursor: pointer;
|
|
60
54
|
`;
|
|
61
55
|
const Arrow = _styledComponents.default.span`
|
|
@@ -21,13 +21,9 @@ const Block = exports.Block = _styledComponents.default.div`
|
|
|
21
21
|
display: block;
|
|
22
22
|
}
|
|
23
23
|
`;
|
|
24
|
-
const Caption = exports.Caption = _styledComponents.default.
|
|
25
|
-
font-size: ${({
|
|
26
|
-
theme
|
|
27
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
|
|
24
|
+
const Caption = exports.Caption = _styledComponents.default.p`
|
|
28
25
|
padding: 10px 0 0 0;
|
|
29
26
|
margin-top: 5px;
|
|
30
|
-
line-height: 28px;
|
|
31
27
|
text-align: center;
|
|
32
28
|
color: var(--paletteColor3, #808080);
|
|
33
29
|
`;
|
|
@@ -39,14 +39,10 @@ const Figure = _styledComponents.default.figure`
|
|
|
39
39
|
const FigureCaption = _styledComponents.default.figcaption`
|
|
40
40
|
width: fit-content;
|
|
41
41
|
max-width: 100%;
|
|
42
|
-
font-size: ${({
|
|
43
|
-
theme
|
|
44
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
|
|
45
42
|
margin-left: auto;
|
|
46
43
|
margin-right: auto;
|
|
47
44
|
color: #575757;
|
|
48
45
|
letter-spacing: 0.7px;
|
|
49
|
-
line-height: 28px;
|
|
50
46
|
text-align: center;
|
|
51
47
|
padding: 16px 0 20px 0;
|
|
52
48
|
border-bottom: 2px solid #c6c6c6;
|
|
@@ -73,18 +69,10 @@ const FigureCaption = _styledComponents.default.figcaption`
|
|
|
73
69
|
|
|
74
70
|
${_mediaQuery.mediaQuery.desktopAbove} {
|
|
75
71
|
max-width: calc(100% - 640px);
|
|
76
|
-
position: absolute;
|
|
77
|
-
right: 0;
|
|
78
|
-
top: 100%;
|
|
79
|
-
margin-right: 0px;
|
|
80
72
|
}
|
|
81
73
|
|
|
82
74
|
${_mediaQuery.mediaQuery.largeOnly} {
|
|
83
75
|
max-width: 240px;
|
|
84
|
-
position: absolute;
|
|
85
|
-
right: 0;
|
|
86
|
-
top: 100%;
|
|
87
|
-
margin-right: 0px;
|
|
88
76
|
}
|
|
89
77
|
`;
|
|
90
78
|
case 'paragraph-width':
|
|
@@ -41,14 +41,10 @@ const Figure = _styledComponents.default.figure`
|
|
|
41
41
|
const FigureCaption = _styledComponents.default.figcaption`
|
|
42
42
|
width: 100%;
|
|
43
43
|
max-width: 100%;
|
|
44
|
-
font-size: ${({
|
|
45
|
-
theme
|
|
46
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
|
|
47
44
|
margin-left: auto;
|
|
48
45
|
margin-right: auto;
|
|
49
46
|
color: #575757;
|
|
50
47
|
letter-spacing: 0.7px;
|
|
51
|
-
line-height: 28px;
|
|
52
48
|
text-align: left;
|
|
53
49
|
padding: 16px 0 20px 0;
|
|
54
50
|
border-bottom: 2px solid #c6c6c6;
|
|
@@ -50,17 +50,12 @@ const mockup = {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
const Caption = _styledComponents.default.figcaption`
|
|
53
|
-
color: #
|
|
53
|
+
color: #575757;
|
|
54
54
|
&::after {
|
|
55
55
|
border-color: #c6c6c6;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
line-height: 1.36;
|
|
59
58
|
letter-spacing: 0.5px;
|
|
60
|
-
font-weight: normal;
|
|
61
|
-
font-size: ${({
|
|
62
|
-
theme
|
|
63
|
-
}) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
|
|
64
59
|
margin-bottom: 30px;
|
|
65
60
|
padding: 0 0 20px 0;
|
|
66
61
|
|
|
@@ -153,6 +153,7 @@ const ImageNumber = _styledComponents.default.span`
|
|
|
153
153
|
font-size: 18px;
|
|
154
154
|
font-weight: 700;
|
|
155
155
|
line-height: 1.6;
|
|
156
|
+
letter-spacing: 0.9px;
|
|
156
157
|
color: #232323;
|
|
157
158
|
`;
|
|
158
159
|
const ImageTotal = (0, _styledComponents.default)(ImageNumber)`
|
|
@@ -167,7 +168,6 @@ const CaptionContainer = _styledComponents.default.div`
|
|
|
167
168
|
${_mediaQuery.mediaQuery.desktopAbove} {
|
|
168
169
|
position: absolute;
|
|
169
170
|
right: 0;
|
|
170
|
-
top: calc(100% - 76px);
|
|
171
171
|
}
|
|
172
172
|
`;
|
|
173
173
|
const SequenceNumberContainer = _styledComponents.default.div`
|
|
@@ -40,15 +40,16 @@ const LinkInner = props => {
|
|
|
40
40
|
const {
|
|
41
41
|
url
|
|
42
42
|
} = props.contentState.getEntity(props.entityKey).getData();
|
|
43
|
-
const theme = (0, _styledComponents.useTheme)();
|
|
44
43
|
|
|
45
44
|
// Handling for internal/external links, internal links start with '#'
|
|
46
45
|
const linkProps = url.match(/^#/) ? {
|
|
47
46
|
onClick: () => {
|
|
48
47
|
const anchor = document.querySelector(url);
|
|
48
|
+
const elementPosition = anchor.getBoundingClientRect().top;
|
|
49
|
+
const offsetPosition = elementPosition + window.scrollY - 64;
|
|
49
50
|
if (anchor) {
|
|
50
51
|
window.scrollTo({
|
|
51
|
-
top:
|
|
52
|
+
top: offsetPosition,
|
|
52
53
|
behavior: 'smooth'
|
|
53
54
|
});
|
|
54
55
|
}
|