@gxpl/sdk 0.0.14 → 0.0.15
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.
|
@@ -48,28 +48,6 @@ const RichTextItem = ({ item, sectionId, onResize, interactionCtrl, onVisibility
|
|
|
48
48
|
onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
|
|
49
49
|
}, [isInteractive, onVisibilityChange]);
|
|
50
50
|
const color = color_1.CntrlColor.parse(item.params.color);
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { ref: setRef, className: `rich-text-wrapper-${item.id}`, style: Object.assign(Object.assign({ filter: `blur(${blur * 100}vw)` }, (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), { transform: `rotate(${angle}deg)`, letterSpacing: `${letterSpacing * exemplary}px`, wordSpacing: `${wordSpacing * exemplary}px`, fontSize: `${Math.round(fontSize * exemplary)}px`, lineHeight: `${lineHeight * exemplary}px`, willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', transition }), children: content }), (0, jsx_runtime_1.
|
|
52
|
-
.rich-text-wrapper-${item.id} {
|
|
53
|
-
font-size: ${item.params.fontSize * 100}vw;
|
|
54
|
-
line-height: ${item.params.lineHeight * 100}vw;
|
|
55
|
-
letter-spacing: ${item.params.letterSpacing * 100}vw;
|
|
56
|
-
word-spacing: ${item.params.wordSpacing * 100}vw;
|
|
57
|
-
font-family: ${(0, getFontFamilyValue_1.getFontFamilyValue)(item.params.typeFace)};
|
|
58
|
-
font-weight: ${item.params.fontWeight};
|
|
59
|
-
font-style: ${item.params.fontStyle ? item.params.fontStyle : 'normal'};
|
|
60
|
-
vertical-align: ${item.params.verticalAlign};
|
|
61
|
-
font-variant: ${item.params.fontVariant};
|
|
62
|
-
color: ${color.fmt('rgba')};
|
|
63
|
-
transform: rotate(${item.area.angle}deg);
|
|
64
|
-
filter: ${item.params.blur !== 0 ? `blur(${item.params.blur * 100}vw)` : 'unset'};
|
|
65
|
-
text-transform: ${item.params.textTransform};
|
|
66
|
-
${item.params.blur !== 0 ? 'will-change: transform;' : ''}
|
|
67
|
-
}
|
|
68
|
-
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
69
|
-
.rich-text-wrapper-${item.id} {
|
|
70
|
-
color: ${color.fmt('rgba')};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`] })] }));
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { ref: setRef, className: `rich-text-wrapper-${item.id}`, style: Object.assign(Object.assign({ filter: `blur(${blur * 100}vw)` }, (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), { transform: `rotate(${angle}deg)`, letterSpacing: `${letterSpacing * exemplary}px`, wordSpacing: `${wordSpacing * exemplary}px`, fontSize: `${Math.round(fontSize * exemplary)}px`, lineHeight: `${lineHeight * exemplary}px`, willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', fontFamily: (0, getFontFamilyValue_1.getFontFamilyValue)(item.params.typeFace), fontWeight: item.params.fontWeight, fontStyle: item.params.fontStyle ? item.params.fontStyle : 'normal', verticalAlign: item.params.verticalAlign, fontVariant: item.params.fontVariant, color: color.fmt('rgba'), textTransform: item.params.textTransform, transition }), children: content }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: styles })] }));
|
|
74
52
|
};
|
|
75
53
|
exports.RichTextItem = RichTextItem;
|