@kids-reporter/draft-renderer 1.0.13 → 1.0.14
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.
|
@@ -38,7 +38,7 @@ const Img = _styledComponents.default.img`
|
|
|
38
38
|
object-fit: contain;
|
|
39
39
|
${props => props.$isDesktopAndAbove ? 'cursor: zoom-in;' : ''};
|
|
40
40
|
`;
|
|
41
|
-
function
|
|
41
|
+
function ImageBlockInner({
|
|
42
42
|
className = '',
|
|
43
43
|
data
|
|
44
44
|
}) {
|
|
@@ -91,6 +91,18 @@ function ImageBlock({
|
|
|
91
91
|
});
|
|
92
92
|
return imgBlock;
|
|
93
93
|
}
|
|
94
|
+
function ImageBlock({
|
|
95
|
+
className = '',
|
|
96
|
+
data
|
|
97
|
+
}) {
|
|
98
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.ThemeProvider, {
|
|
99
|
+
theme: {},
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageBlockInner, {
|
|
101
|
+
className: className,
|
|
102
|
+
data: data
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
94
106
|
const ArticleBodyContainer = _styledComponents.default.div`
|
|
95
107
|
/* reset browser default styles */
|
|
96
108
|
figure {
|
|
@@ -26,10 +26,10 @@ const Img = _styledComponents.default.img`
|
|
|
26
26
|
object-fit: contain;
|
|
27
27
|
${props => props.$isDesktopAndAbove ? 'cursor: zoom-in;' : ''};
|
|
28
28
|
`;
|
|
29
|
-
|
|
29
|
+
function ImageLinkBlockInner({
|
|
30
30
|
className = '',
|
|
31
31
|
data
|
|
32
|
-
})
|
|
32
|
+
}) {
|
|
33
33
|
const theme = (0, _styledComponents.useTheme)();
|
|
34
34
|
const {
|
|
35
35
|
url,
|
|
@@ -69,6 +69,18 @@ const ImageLinkBlock = ({
|
|
|
69
69
|
})]
|
|
70
70
|
});
|
|
71
71
|
return imgBlock;
|
|
72
|
+
}
|
|
73
|
+
const ImageLinkBlock = ({
|
|
74
|
+
className = '',
|
|
75
|
+
data
|
|
76
|
+
}) => {
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.ThemeProvider, {
|
|
78
|
+
theme: {},
|
|
79
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageLinkBlockInner, {
|
|
80
|
+
className: className,
|
|
81
|
+
data: data
|
|
82
|
+
})
|
|
83
|
+
});
|
|
72
84
|
};
|
|
73
85
|
exports.ImageLinkBlock = ImageLinkBlock;
|
|
74
86
|
const ArticleBodyContainer = _styledComponents.default.div`
|
|
@@ -263,43 +263,38 @@ const SlidesFlexBox = _styledComponents.default.div`
|
|
|
263
263
|
flex-wrap: nowrap;
|
|
264
264
|
width: 100%;
|
|
265
265
|
height: 100%;
|
|
266
|
-
${
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
266
|
+
${({
|
|
267
|
+
isSliding,
|
|
268
|
+
duration
|
|
269
|
+
}) => isSliding ? `transition: transform ${duration}ms ease-in-out;` : ''}
|
|
270
|
+
|
|
271
|
+
${({
|
|
272
|
+
translateXUint
|
|
273
|
+
}) => `
|
|
274
|
+
${_mediaQuery.mediaQuery.smallOnly} {
|
|
275
|
+
transform: translateX(
|
|
276
|
+
${getTranslateX(mockup.mobile, translateXUint) / getContainerWidth(mockup.mobile)} * 100%
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
${_mediaQuery.mediaQuery.mediumOnly} {
|
|
280
|
+
transform: translateX(
|
|
281
|
+
${getTranslateX(mockup.desktop, translateXUint) / getContainerWidth(mockup.desktop)} * 100%
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
${_mediaQuery.mediaQuery.largeOnly} {
|
|
285
|
+
transform: translateX(
|
|
286
|
+
${getTranslateX(mockup.hd, translateXUint) / getContainerWidth(mockup.hd)} * 100%
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
`}
|
|
290
290
|
`;
|
|
291
291
|
const SlideFlexItem = _styledComponents.default.div`
|
|
292
292
|
height: 100%;
|
|
293
293
|
flex-shrink: 0;
|
|
294
294
|
|
|
295
295
|
${_mediaQuery.mediaQuery.smallOnly} {
|
|
296
|
-
flex-basis: calc(
|
|
297
|
-
|
|
298
|
-
);
|
|
299
|
-
padding-right: calc(
|
|
300
|
-
${mockup.mobile.slide.paddingRight} /
|
|
301
|
-
${getContainerWidth(mockup.mobile)}*100%
|
|
302
|
-
);
|
|
296
|
+
flex-basis: ${() => `calc(${getSlideWidth(mockup.mobile)} / ${getContainerWidth(mockup.mobile)}*100%)`};
|
|
297
|
+
padding-right: ${() => `calc(${mockup.mobile.slide.paddingRight} / ${getContainerWidth(mockup.mobile)}*100%)`};
|
|
303
298
|
}
|
|
304
299
|
|
|
305
300
|
${_mediaQuery.mediaQuery.mediumOnly} {
|
|
@@ -21,7 +21,7 @@ const LinkWrapper = _styledComponents.default.a`
|
|
|
21
21
|
color: #232323;
|
|
22
22
|
}
|
|
23
23
|
`;
|
|
24
|
-
const
|
|
24
|
+
const LinkInner = props => {
|
|
25
25
|
const {
|
|
26
26
|
url
|
|
27
27
|
} = props.contentState.getEntity(props.entityKey).getData();
|
|
@@ -47,6 +47,14 @@ const Link = props => {
|
|
|
47
47
|
children: props.children
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
+
const Link = props => {
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.ThemeProvider, {
|
|
52
|
+
theme: {},
|
|
53
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkInner, {
|
|
54
|
+
...props
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
50
58
|
const linkDecorator = exports.linkDecorator = {
|
|
51
59
|
strategy: (0, _entity.findEntitiesByType)(_entity.ENTITY.Link),
|
|
52
60
|
component: Link
|
package/lib/global.d.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FontSizeLevel = void 0;
|
|
7
|
+
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
|
8
|
+
let FontSizeLevel = exports.FontSizeLevel = /*#__PURE__*/function (FontSizeLevel) {
|
|
9
|
+
FontSizeLevel["NORMAL"] = "normal";
|
|
10
|
+
FontSizeLevel["LARGE"] = "large";
|
|
11
|
+
return FontSizeLevel;
|
|
12
|
+
}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kids-reporter/draft-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"draft-js": "^0.11.7",
|
|
36
36
|
"react": "18.3.1",
|
|
37
37
|
"react-dom": "18.3.1",
|
|
38
|
-
"styled-components": "
|
|
38
|
+
"styled-components": "6.1.19"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"lib",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"react": "18.3.1",
|
|
46
46
|
"react-dom": "18.3.1",
|
|
47
|
-
"styled-components": "
|
|
47
|
+
"styled-components": "6.1.19"
|
|
48
48
|
}
|
|
49
49
|
}
|