@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.
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
+ </state>
5
+ </component>
Binary file
Binary file
Binary file
Binary file
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} {
@@ -50,6 +50,7 @@ const VideoItem = ({ item, sectionId, onResize }) => {
50
50
  pointer-events: none;
51
51
  overflow: hidden;
52
52
  border-style: solid;
53
+ pointer-events: auto;
53
54
  }
54
55
  .video-${item.id} {
55
56
  border-color: ${strokeColor};
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.8",
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} {
@@ -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