@cntrl-site/sdk-nextjs 0.12.4 → 0.12.6

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>
@@ -75,7 +75,7 @@ const Item = ({ item, sectionId }) => {
75
75
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, sticky, sectionHeight, layoutParams]) => {
76
76
  const sizingAxis = parseSizing(layoutParams.sizing);
77
77
  return (`
78
- .item-${item.id} {
78
+ .item-${item.id} {
79
79
  position: ${sticky ? 'sticky' : 'absolute'};
80
80
  width: ${sizingAxis.x === sdk_1.ArticleItemSizingType.Manual ? `${area.width * 100}vw` : 'max-content'};
81
81
  height: ${sizingAxis.y === sdk_1.ArticleItemSizingType.Manual ? `w${area.height * 100}vw` : 'unset'};
@@ -84,10 +84,13 @@ const Item = ({ item, sectionId }) => {
84
84
  transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
85
85
  pointer-events: auto;
86
86
  --webkit-backface-visibility: hidden;
87
+ visibility: ${item.hidden[layout] ? 'hidden' : 'visible'};
87
88
  }
88
89
  .item-wrapper-${item.id} {
89
90
  position: absolute;
90
91
  z-index: ${area.zIndex};
92
+ -webkit-transform: translate3d(0, 0, 0);
93
+ transform: translate3d(0, 0, 0);
91
94
  pointer-events: none;
92
95
  top: ${(0, useItemPosition_1.getItemTopStyle)(area.top, area.anchorSide)};
93
96
  left: ${area.left * 100}vw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "SDK for Next.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "homepage": "https://github.com/cntrl-site/sdk-nextjs#readme",
23
23
  "dependencies": {
24
- "@cntrl-site/sdk": "^1.1.4",
24
+ "@cntrl-site/sdk": "^1.1.5",
25
25
  "html-react-parser": "^3.0.1",
26
26
  "styled-jsx": "^5.0.2"
27
27
  },
@@ -100,21 +100,24 @@ export const Item: FC<ItemProps<TArticleItemAny>> = ({ item, sectionId}) => {
100
100
  </div>
101
101
  <JSXStyle id={id}>{`
102
102
  ${getLayoutStyles(layouts, layoutValues, ([area, sticky, sectionHeight, layoutParams]) => {
103
- const sizingAxis = parseSizing(layoutParams.sizing);
104
- return (`
105
- .item-${item.id} {
103
+ const sizingAxis = parseSizing(layoutParams.sizing);
104
+ return (`
105
+ .item-${item.id} {
106
106
  position: ${sticky ? 'sticky' : 'absolute'};
107
107
  width: ${sizingAxis.x === SizingType.Manual ? `${area.width * 100}vw` : 'max-content'};
108
108
  height: ${sizingAxis.y === SizingType.Manual ? `w${area.height * 100}vw` : 'unset'};
109
109
  transform: scale(${scale});
110
- top: ${sticky ? `${getAnchoredItemTop(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
110
+ top: ${sticky ? `${getAnchoredItemTop(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
111
111
  transform-origin: ${ScaleAnchorMap[scaleAnchor]};
112
112
  pointer-events: auto;
113
113
  --webkit-backface-visibility: hidden;
114
+ visibility: ${item.hidden[layout] ? 'hidden' : 'visible'};
114
115
  }
115
116
  .item-wrapper-${item.id} {
116
117
  position: absolute;
117
118
  z-index: ${area.zIndex};
119
+ -webkit-transform: translate3d(0, 0, 0);
120
+ transform: translate3d(0, 0, 0);
118
121
  pointer-events: none;
119
122
  top: ${getItemTopStyle(area.top, area.anchorSide)};
120
123
  left: ${area.left * 100}vw;