@cntrl-site/sdk-nextjs 1.0.6 → 1.0.7

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.
Binary file
@@ -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
- ? isRichText
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], exemplary) => {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "SDK for Next.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -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
- ? isRichText
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], exemplary) => {
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} {
Binary file
Binary file