@cntrl-site/sdk-nextjs 0.15.5-0 → 0.15.5-2
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/cntrl-site-sdk-nextjs-0.15.5-1.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.15.5-2.tgz +0 -0
- package/lib/components/Item.js +4 -2
- package/lib/components/items/RichTextItem.js +1 -4
- package/lib/utils/RichTextConverter/RichTextConverter.js +1 -0
- package/package.json +1 -1
- package/src/components/Item.tsx +16 -11
- package/src/components/items/RichTextItem.tsx +1 -6
- package/src/utils/RichTextConverter/RichTextConverter.tsx +1 -0
- package/cntrl-site-sdk-nextjs-0.15.2.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.15.3.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.15.5-beta.0.tgz +0 -0
|
Binary file
|
|
Binary file
|
package/lib/components/Item.js
CHANGED
|
@@ -79,7 +79,7 @@ const Item = ({ item, sectionId }) => {
|
|
|
79
79
|
? { transformOrigin: 'top left', transform: 'scale(var(--layout-deviation))' }
|
|
80
80
|
: {};
|
|
81
81
|
const styles = Object.assign(Object.assign({}, scaleIfRichText), { top: stickyTop });
|
|
82
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `item-wrapper-${item.id}`, style: isInitialRef.current ? {} : Object.assign({ top, left }, (wrapperHeight ? { height: `${wrapperHeight * 100}vw` } : {})) }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ suppressHydrationWarning: true, className: `item-${item.id}`, style: isInitialRef.current ? {} : styles }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: {
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `item-wrapper-${item.id}`, style: isInitialRef.current ? {} : Object.assign({ top, left }, (wrapperHeight ? { height: `${wrapperHeight * 100}vw` } : {})) }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ suppressHydrationWarning: true, className: `item-${item.id}`, style: isInitialRef.current ? {} : styles }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `item-${item.id}-inner`, style: {
|
|
83
83
|
width: `${sizingAxis.x === sdk_1.ArticleItemSizingType.Manual
|
|
84
84
|
? isRichText
|
|
85
85
|
? `${width * exemplary}px`
|
|
@@ -103,6 +103,8 @@ const Item = ({ item, sectionId }) => {
|
|
|
103
103
|
--webkit-backface-visibility: hidden;
|
|
104
104
|
cursor: ${hoverParams ? 'pointer' : 'default'};
|
|
105
105
|
visibility: ${hidden ? 'hidden' : 'visible'};
|
|
106
|
+
}
|
|
107
|
+
.item-${item.id}-inner {
|
|
106
108
|
transition: ${(0, HoverStyles_1.getTransitions)(['width', 'height', 'scale'], hoverParams)};
|
|
107
109
|
}
|
|
108
110
|
.item-wrapper-${item.id} {
|
|
@@ -116,7 +118,7 @@ const Item = ({ item, sectionId }) => {
|
|
|
116
118
|
height: ${sticky ? `${getStickyItemWrapperHeight(sticky, area.height) * 100}vw` : 'unset'};
|
|
117
119
|
transition: ${(0, HoverStyles_1.getTransitions)(['left', 'top'], hoverParams)};
|
|
118
120
|
}
|
|
119
|
-
.item-${item.id}:hover {
|
|
121
|
+
.item-${item.id}-inner:hover {
|
|
120
122
|
${(0, HoverStyles_1.getHoverStyles)(['width', 'height', 'scale'], hoverParams)}
|
|
121
123
|
}
|
|
122
124
|
.item-wrapper-${item.id}:hover {
|
|
@@ -35,10 +35,7 @@ const RichTextItem = ({ item, sectionId, onResize }) => {
|
|
|
35
35
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ ref: setRef, className: `${className} rich-text-wrapper-${item.id}`, style: {
|
|
36
36
|
transform: `rotate(${angle}deg)`,
|
|
37
37
|
filter: `blur(${blur * 100}vw)`
|
|
38
|
-
} }, { children: (0, jsx_runtime_1.
|
|
39
|
-
// transformOrigin: 'top left',
|
|
40
|
-
// transform: 'scale(var(--layout-deviation))'
|
|
41
|
-
} }, { children: content })) })), (0, jsx_runtime_1.jsxs)(style_1.default, Object.assign({ id: id }, { children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, [item.state.hover], ([hoverParams]) => {
|
|
38
|
+
} }, { children: content })), (0, jsx_runtime_1.jsxs)(style_1.default, Object.assign({ id: id }, { children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, [item.state.hover], ([hoverParams]) => {
|
|
42
39
|
return (`
|
|
43
40
|
.rich-text-wrapper-${item.id} {
|
|
44
41
|
transition: ${(0, HoverStyles_1.getTransitions)(['angle', 'blur'], hoverParams)};
|
package/package.json
CHANGED
package/src/components/Item.tsx
CHANGED
|
@@ -107,16 +107,19 @@ export const Item: FC<ItemProps<TArticleItemAny>> = ({ item, sectionId}) => {
|
|
|
107
107
|
className={`item-${item.id}`}
|
|
108
108
|
style={isInitialRef.current ? {} : styles }
|
|
109
109
|
>
|
|
110
|
-
<div
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
<div
|
|
111
|
+
className={`item-${item.id}-inner`}
|
|
112
|
+
style={{
|
|
113
|
+
width: `${sizingAxis.x === SizingType.Manual
|
|
114
|
+
? isRichText
|
|
115
|
+
? `${width * exemplary}px`
|
|
116
|
+
: `${width * 100}vw`
|
|
117
|
+
: 'max-content'}`,
|
|
118
|
+
height: `${sizingAxis.y === SizingType.Manual ? `${height * 100}vw` : 'unset'}`,
|
|
119
|
+
transform: `scale(${scale})`,
|
|
120
|
+
transformOrigin: ScaleAnchorMap[scaleAnchor]
|
|
121
|
+
}}
|
|
122
|
+
>
|
|
120
123
|
<ItemComponent item={item} sectionId={sectionId} onResize={handleItemResize} />
|
|
121
124
|
</div>
|
|
122
125
|
</div>
|
|
@@ -135,6 +138,8 @@ export const Item: FC<ItemProps<TArticleItemAny>> = ({ item, sectionId}) => {
|
|
|
135
138
|
--webkit-backface-visibility: hidden;
|
|
136
139
|
cursor: ${hoverParams ? 'pointer' : 'default'};
|
|
137
140
|
visibility: ${hidden ? 'hidden' : 'visible'};
|
|
141
|
+
}
|
|
142
|
+
.item-${item.id}-inner {
|
|
138
143
|
transition: ${getTransitions(['width', 'height', 'scale'], hoverParams)};
|
|
139
144
|
}
|
|
140
145
|
.item-wrapper-${item.id} {
|
|
@@ -148,7 +153,7 @@ export const Item: FC<ItemProps<TArticleItemAny>> = ({ item, sectionId}) => {
|
|
|
148
153
|
height: ${sticky ? `${getStickyItemWrapperHeight(sticky, area.height) * 100}vw` : 'unset'};
|
|
149
154
|
transition: ${getTransitions(['left', 'top'], hoverParams)};
|
|
150
155
|
}
|
|
151
|
-
.item-${item.id}:hover {
|
|
156
|
+
.item-${item.id}-inner:hover {
|
|
152
157
|
${getHoverStyles(['width', 'height', 'scale'], hoverParams)}
|
|
153
158
|
}
|
|
154
159
|
.item-wrapper-${item.id}:hover {
|
|
@@ -38,12 +38,7 @@ export const RichTextItem: FC<ItemProps<TRichTextItem>> = ({ item, sectionId, on
|
|
|
38
38
|
filter: `blur(${blur * 100}vw)`
|
|
39
39
|
}}
|
|
40
40
|
>
|
|
41
|
-
|
|
42
|
-
// transformOrigin: 'top left',
|
|
43
|
-
// transform: 'scale(var(--layout-deviation))'
|
|
44
|
-
}}>
|
|
45
|
-
{content}
|
|
46
|
-
</div>
|
|
41
|
+
{content}
|
|
47
42
|
</div>
|
|
48
43
|
<JSXStyle id={id}>
|
|
49
44
|
{styles}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|