@cntrl-site/sdk-nextjs 0.16.10 → 0.16.12
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/components/items/RichTextItem.js +1 -1
- package/lib/utils/RichTextConverter/RichTextConverter.js +1 -1
- package/package.json +2 -2
- package/src/components/items/RichTextItem.tsx +1 -1
- package/src/utils/RichTextConverter/RichTextConverter.tsx +1 -1
- package/src/utils/generateTypePresetStyles/__mock__/layoutsMock.ts +9 -3
|
@@ -40,7 +40,7 @@ const RichTextItem = ({ item, sectionId, onResize }) => {
|
|
|
40
40
|
line-height: ${layoutParams.lineHeight * exemplary}px;
|
|
41
41
|
letter-spacing: ${layoutParams.letterSpacing * exemplary}px;
|
|
42
42
|
word-spacing: ${layoutParams.wordSpacing * exemplary}px;
|
|
43
|
-
font-family: ${layoutParams.typeFace};
|
|
43
|
+
font-family: "${layoutParams.typeFace}";
|
|
44
44
|
font-weight: ${layoutParams.fontWeight};
|
|
45
45
|
font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
|
|
46
46
|
text-decoration: ${layoutParams.textDecoration};
|
|
@@ -199,7 +199,7 @@ class RichTextConverter {
|
|
|
199
199
|
const { value, name } = draftStyle;
|
|
200
200
|
const map = {
|
|
201
201
|
'COLOR': { 'color': getResolvedValue(value, name) },
|
|
202
|
-
'TYPEFACE': { 'font-family':
|
|
202
|
+
'TYPEFACE': { 'font-family': `"${value}"` },
|
|
203
203
|
'FONTSTYLE': value ? Object.assign({}, exports.FontStyles[value]) : {},
|
|
204
204
|
'FONTWEIGHT': { 'font-weight': value },
|
|
205
205
|
'FONTSIZE': { 'font-size': `${parseFloat(value) * exemplary}px` },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntrl-site/sdk-nextjs",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.12",
|
|
4
4
|
"description": "SDK for Next.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/cntrl-site/sdk-nextjs#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@cntrl-site/sdk": "^1.2.
|
|
24
|
+
"@cntrl-site/sdk": "^1.2.2",
|
|
25
25
|
"@types/vimeo__player": "^2.18.0",
|
|
26
26
|
"@vimeo/player": "^2.20.1",
|
|
27
27
|
"html-react-parser": "^3.0.1",
|
|
@@ -48,7 +48,7 @@ export const RichTextItem: FC<ItemProps<TRichTextItem>> = ({ item, sectionId, on
|
|
|
48
48
|
line-height: ${layoutParams.lineHeight * exemplary}px;
|
|
49
49
|
letter-spacing: ${layoutParams.letterSpacing * exemplary}px;
|
|
50
50
|
word-spacing: ${layoutParams.wordSpacing * exemplary}px;
|
|
51
|
-
font-family: ${layoutParams.typeFace};
|
|
51
|
+
font-family: "${layoutParams.typeFace}";
|
|
52
52
|
font-weight: ${layoutParams.fontWeight};
|
|
53
53
|
font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
|
|
54
54
|
text-decoration: ${layoutParams.textDecoration};
|
|
@@ -237,7 +237,7 @@ export class RichTextConverter {
|
|
|
237
237
|
const { value, name } = draftStyle;
|
|
238
238
|
const map: Record<string, Record<string, string | undefined>> = {
|
|
239
239
|
'COLOR': { 'color': getResolvedValue(value, name) },
|
|
240
|
-
'TYPEFACE': { 'font-family':
|
|
240
|
+
'TYPEFACE': { 'font-family': `"${value}"` },
|
|
241
241
|
'FONTSTYLE': value ? { ...FontStyles[value] } : {},
|
|
242
242
|
'FONTWEIGHT': { 'font-weight': value },
|
|
243
243
|
'FONTSIZE': { 'font-size': `${parseFloat(value!) * exemplary}px` },
|
|
@@ -16,7 +16,9 @@ export const layoutsMock: TLayout[] = [
|
|
|
16
16
|
startsWith: 768,
|
|
17
17
|
title: 'Tablet',
|
|
18
18
|
icon: 'any',
|
|
19
|
-
grid: sampleGrid
|
|
19
|
+
grid: sampleGrid,
|
|
20
|
+
disabled: false,
|
|
21
|
+
locked: false
|
|
20
22
|
},
|
|
21
23
|
{
|
|
22
24
|
id: 'desktop',
|
|
@@ -24,7 +26,9 @@ export const layoutsMock: TLayout[] = [
|
|
|
24
26
|
startsWith: 1024,
|
|
25
27
|
title: 'Desktop',
|
|
26
28
|
icon: 'any',
|
|
27
|
-
grid: sampleGrid
|
|
29
|
+
grid: sampleGrid,
|
|
30
|
+
disabled: false,
|
|
31
|
+
locked: false
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
id: 'mobile',
|
|
@@ -32,6 +36,8 @@ export const layoutsMock: TLayout[] = [
|
|
|
32
36
|
startsWith: 0,
|
|
33
37
|
title: 'Mobile',
|
|
34
38
|
icon: 'any',
|
|
35
|
-
grid: sampleGrid
|
|
39
|
+
grid: sampleGrid,
|
|
40
|
+
disabled: false,
|
|
41
|
+
locked: false
|
|
36
42
|
}
|
|
37
43
|
];
|