@cntrl-site/sdk-nextjs 1.6.1 → 1.6.3

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
Binary file
Binary file
@@ -69,11 +69,15 @@ const CompoundChild = ({ item, sectionId, isParentVisible = true }) => {
69
69
  ? { height: `${sizingAxis.y === 'manual'
70
70
  ? (0, getCompoundBondaryStyles_1.getCompoundHeight)(compoundSettings, height)
71
71
  : 'unset'}` }
72
- : {})), (scale !== undefined && compoundSettings ? { transform: `scale(${scale}) ${(0, getCompoundBondaryStyles_1.getCompoundTransform)(compoundSettings)}` } : {})), { transition: (_k = stateProps === null || stateProps === void 0 ? void 0 : stateProps.transition) !== null && _k !== void 0 ? _k : 'none', cursor: hasClickTriggers ? 'pointer' : 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none' }) }, triggers, { children: [(0, jsx_runtime_1.jsx)(RichTextWrapper_1.RichTextWrapper, { isRichText: isRichText, transformOrigin: transformOrigin, children: (0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
72
+ : {})), (compoundSettings ? { transform: `${(0, getCompoundBondaryStyles_1.getCompoundTransform)(compoundSettings)}` } : {})), { transition: (_k = stateProps === null || stateProps === void 0 ? void 0 : stateProps.transition) !== null && _k !== void 0 ? _k : 'none', cursor: hasClickTriggers ? 'pointer' : 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none' }) }, triggers, { children: [(0, jsx_runtime_1.jsx)("div", { className: `item-${item.id}-inner`, style: Object.assign({}, (scale !== undefined ? { transform: `scale(${scale})` } : {})), children: (0, jsx_runtime_1.jsx)(RichTextWrapper_1.RichTextWrapper, { isRichText: isRichText, transformOrigin: transformOrigin, children: (0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
73
73
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, hidden, compoundSettings, layoutParams]) => {
74
74
  const sizingAxis = (0, useSizing_1.parseSizing)(layoutParams.sizing);
75
75
  const scaleAnchor = area.scaleAnchor;
76
76
  return (`
77
+ .item-${item.id}-inner {
78
+ transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
79
+ transform: scale(${area.scale});
80
+ }
77
81
  .item-${item.id} {
78
82
  position: absolute;
79
83
  top: ${(0, getCompoundBondaryStyles_1.getCompoundTop)(compoundSettings, area.top)};
@@ -84,8 +88,7 @@ const CompoundChild = ({ item, sectionId, isParentVisible = true }) => {
84
88
  ? `${(0, getCompoundBondaryStyles_1.getCompoundWidth)(compoundSettings, area.width, isRichText)}`
85
89
  : 'max-content'};
86
90
  height: ${sizingAxis.y === 'manual' ? `${(0, getCompoundBondaryStyles_1.getCompoundHeight)(compoundSettings, area.height)}` : 'unset'};
87
- transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
88
- transform: scale(${area.scale}) ${(0, getCompoundBondaryStyles_1.getCompoundTransform)(compoundSettings)};
91
+ transform: ${(0, getCompoundBondaryStyles_1.getCompoundTransform)(compoundSettings)};
89
92
  z-index: ${area.zIndex};
90
93
  }
91
94
  `);
@@ -96,10 +96,8 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
96
96
  box-sizing: border-box;
97
97
  opacity: 1;
98
98
  object-fit: cover;
99
- pointer-events: none;
100
99
  overflow: hidden;
101
100
  border-style: solid;
102
- pointer-events: auto;
103
101
  }
104
102
  .video-${item.id} {
105
103
  border-color: ${itemStrokeColor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -92,13 +92,18 @@ export const CompoundChild: FC<ChildItemProps> = ({ item, sectionId, isParentVis
92
92
  ? getCompoundHeight(compoundSettings, height)
93
93
  : 'unset'}` }
94
94
  : {}),
95
- ...(scale !== undefined && compoundSettings ? { transform: `scale(${scale}) ${getCompoundTransform(compoundSettings)}` } : {}),
95
+ ...(compoundSettings ? { transform: `${getCompoundTransform(compoundSettings)}` } : {}),
96
96
  transition: stateProps?.transition ?? 'none',
97
97
  cursor: hasClickTriggers ? 'pointer' : 'unset',
98
98
  pointerEvents: allowPointerEvents ? 'auto' : 'none'
99
99
  }}
100
100
  {...triggers}
101
101
  >
102
+ <div className={`item-${item.id}-inner`}
103
+ style={{
104
+ ...(scale !== undefined ? { transform: `scale(${scale})` } : {}),
105
+ }}
106
+ >
102
107
  <RichTextWrapper isRichText={isRichText} transformOrigin={transformOrigin}>
103
108
  <ItemComponent
104
109
  item={item}
@@ -107,11 +112,16 @@ export const CompoundChild: FC<ChildItemProps> = ({ item, sectionId, isParentVis
107
112
  onVisibilityChange={handleVisibilityChange}
108
113
  />
109
114
  </RichTextWrapper>
115
+ </div>
110
116
  <JSXStyle id={id}>{`
111
117
  ${getLayoutStyles(layouts, layoutValues, ([area, hidden, compoundSettings, layoutParams]) => {
112
118
  const sizingAxis = parseSizing(layoutParams.sizing);
113
119
  const scaleAnchor = area.scaleAnchor as AreaAnchor;
114
120
  return (`
121
+ .item-${item.id}-inner {
122
+ transform-origin: ${ScaleAnchorMap[scaleAnchor]};
123
+ transform: scale(${area.scale});
124
+ }
115
125
  .item-${item.id} {
116
126
  position: absolute;
117
127
  top: ${getCompoundTop(compoundSettings, area.top)};
@@ -122,8 +132,7 @@ export const CompoundChild: FC<ChildItemProps> = ({ item, sectionId, isParentVis
122
132
  ? `${getCompoundWidth(compoundSettings, area.width, isRichText)}`
123
133
  : 'max-content'};
124
134
  height: ${sizingAxis.y === 'manual' ? `${getCompoundHeight(compoundSettings, area.height)}` : 'unset'};
125
- transform-origin: ${ScaleAnchorMap[scaleAnchor]};
126
- transform: scale(${area.scale}) ${getCompoundTransform(compoundSettings)};
135
+ transform: ${getCompoundTransform(compoundSettings)};
127
136
  z-index: ${area.zIndex};
128
137
  }
129
138
  `);
@@ -155,10 +155,8 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
155
155
  box-sizing: border-box;
156
156
  opacity: 1;
157
157
  object-fit: cover;
158
- pointer-events: none;
159
158
  overflow: hidden;
160
159
  border-style: solid;
161
- pointer-events: auto;
162
160
  }
163
161
  .video-${item.id} {
164
162
  border-color: ${itemStrokeColor};
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>