@cntrl-site/sdk-nextjs 1.0.6 → 1.0.8
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/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/cntrl-site-sdk-nextjs-0.30.2.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.30.3.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.30.4.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.30.5.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.0.8.tgz +0 -0
- package/lib/components/Item.js +1 -3
- package/lib/components/items/RichTextItem.js +1 -1
- package/lib/components/items/VideoItem.js +1 -0
- package/package.json +1 -1
- package/src/components/Item.tsx +1 -3
- package/src/components/items/RichTextItem.tsx +1 -1
- package/src/components/items/VideoItem.tsx +2 -1
- package/cntrl-site-sdk-nextjs-1.0.3.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.0.6.tgz +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/components/Item.js
CHANGED
|
@@ -128,9 +128,7 @@ const Item = ({ item, sectionId, articleHeight, isInGroup = false }) => {
|
|
|
128
128
|
.item-${item.id}-inner {
|
|
129
129
|
transition: ${(0, HoverStyles_1.getTransitions)(['width', 'height', 'scale'], hoverParams)};
|
|
130
130
|
width: ${sizingAxis.x === 'manual'
|
|
131
|
-
?
|
|
132
|
-
? `${area.width * exemplary}px`
|
|
133
|
-
: `${area.width * 100}vw`
|
|
131
|
+
? `${area.width * 100}vw`
|
|
134
132
|
: 'max-content'};
|
|
135
133
|
height: ${sizingAxis.y === 'manual' ? `${area.height * 100}vw` : 'unset'};
|
|
136
134
|
}
|
|
@@ -28,7 +28,7 @@ const RichTextItem = ({ item, sectionId, onResize }) => {
|
|
|
28
28
|
const layoutValues = [item.area, item.layoutParams, item.state.hover];
|
|
29
29
|
const exemplary = (0, useExemplary_1.useExemplary)();
|
|
30
30
|
(0, useRegisterResize_1.useRegisterResize)(ref, onResize);
|
|
31
|
-
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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (letterSpacing !== undefined ? { letterSpacing: `${letterSpacing * exemplary}px` } : {})), (wordSpacing !== undefined ? { wordSpacing: `${wordSpacing * exemplary}px` } : {})), (fontSize !== undefined ? { fontSize: `${Math.round(fontSize * exemplary)}px` } : {})), (lineHeight !== undefined ? { lineHeight: `${lineHeight * exemplary}px` } : {})), children: content }), (0, jsx_runtime_1.jsxs)(style_1.default, { id: id, children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams, hoverParams]
|
|
31
|
+
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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (letterSpacing !== undefined ? { letterSpacing: `${letterSpacing * exemplary}px` } : {})), (wordSpacing !== undefined ? { wordSpacing: `${wordSpacing * exemplary}px` } : {})), (fontSize !== undefined ? { fontSize: `${Math.round(fontSize * exemplary)}px` } : {})), (lineHeight !== undefined ? { lineHeight: `${lineHeight * exemplary}px` } : {})), children: content }), (0, jsx_runtime_1.jsxs)(style_1.default, { id: id, children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams, hoverParams]) => {
|
|
32
32
|
const color = color_1.CntrlColor.parse(layoutParams.color);
|
|
33
33
|
return (`
|
|
34
34
|
.rich-text-wrapper-${item.id} {
|
package/package.json
CHANGED
package/src/components/Item.tsx
CHANGED
|
@@ -187,9 +187,7 @@ export const Item: FC<ItemWrapperProps> = ({ item, sectionId, articleHeight, isI
|
|
|
187
187
|
.item-${item.id}-inner {
|
|
188
188
|
transition: ${getTransitions(['width', 'height', 'scale'], hoverParams)};
|
|
189
189
|
width: ${sizingAxis.x === 'manual'
|
|
190
|
-
?
|
|
191
|
-
? `${area.width * exemplary}px`
|
|
192
|
-
: `${area.width * 100}vw`
|
|
190
|
+
? `${area.width * 100}vw`
|
|
193
191
|
: 'max-content'};
|
|
194
192
|
height: ${sizingAxis.y === 'manual' ? `${area.height * 100}vw` : 'unset'};
|
|
195
193
|
}
|
|
@@ -43,7 +43,7 @@ export const RichTextItem: FC<ItemProps<TRichTextItem>> = ({ item, sectionId, on
|
|
|
43
43
|
</div>
|
|
44
44
|
<JSXStyle id={id}>
|
|
45
45
|
{styles}
|
|
46
|
-
{`${getLayoutStyles(layouts, layoutValues, ([area, layoutParams, hoverParams]
|
|
46
|
+
{`${getLayoutStyles(layouts, layoutValues, ([area, layoutParams, hoverParams]) => {
|
|
47
47
|
const color = CntrlColor.parse(layoutParams.color);
|
|
48
48
|
return (`
|
|
49
49
|
.rich-text-wrapper-${item.id} {
|
|
@@ -39,7 +39,7 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
|
|
|
39
39
|
style={{
|
|
40
40
|
...(opacity !== undefined ? { opacity } : {}),
|
|
41
41
|
...(angle !== undefined ? { transform: `rotate(${angle}deg)` } : {}),
|
|
42
|
-
...(blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})
|
|
42
|
+
...(blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
45
45
|
{hasScrollPlayback ? (
|
|
@@ -82,6 +82,7 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
|
|
|
82
82
|
pointer-events: none;
|
|
83
83
|
overflow: hidden;
|
|
84
84
|
border-style: solid;
|
|
85
|
+
pointer-events: auto;
|
|
85
86
|
}
|
|
86
87
|
.video-${item.id} {
|
|
87
88
|
border-color: ${strokeColor};
|
|
Binary file
|
|
Binary file
|