@gxpl/sdk 0.0.10 → 0.0.11
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.
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const SectionImage = ({ media, sectionId }) => {
|
|
6
6
|
const { url, size, position, offsetX } = media;
|
|
7
7
|
const isContainHeight = size === 'contain-height';
|
|
8
|
-
const hasOffsetX = offsetX !== null
|
|
8
|
+
const hasOffsetX = offsetX !== null;
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: `section-image-wrapper-${sectionId}`, style: {
|
|
10
10
|
position: position === 'fixed' ? 'sticky' : 'relative',
|
|
11
11
|
height: position === 'fixed' ? '100vh' : '100%',
|
|
@@ -14,7 +14,7 @@ const SectionImage = ({ media, sectionId }) => {
|
|
|
14
14
|
overflow: 'hidden'
|
|
15
15
|
}, children: (0, jsx_runtime_1.jsx)("img", { src: url, className: `image-background-${sectionId}`, style: {
|
|
16
16
|
objectFit: isContainHeight ? 'unset' : (size !== null && size !== void 0 ? size : 'cover'),
|
|
17
|
-
width: isContainHeight
|
|
17
|
+
width: isContainHeight ? 'auto' : '100%',
|
|
18
18
|
transform: isContainHeight ? 'translateX(-50%)' : 'none',
|
|
19
19
|
position: 'relative',
|
|
20
20
|
left: isContainHeight ? '50%' : (hasOffsetX ? `${offsetX * 100}vw` : '0'),
|
|
@@ -57,7 +57,7 @@ const RectangleItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilit
|
|
|
57
57
|
backgroundRepeat: strokeValue.behavior === 'repeat' ? 'repeat' : 'no-repeat'
|
|
58
58
|
} : {
|
|
59
59
|
background: stroke,
|
|
60
|
-
})) : { background: stroke })) }), itemFill && itemFill.map((fill) => {
|
|
60
|
+
})) : { background: stroke })) }), itemFill && itemFill.map((fill, i) => {
|
|
61
61
|
var _a, _b;
|
|
62
62
|
const stateFillLayer = stateFillLayers === null || stateFillLayers === void 0 ? void 0 : stateFillLayers.find((layer) => layer.id === fill.id);
|
|
63
63
|
const value = stateFillLayer
|
|
@@ -66,7 +66,7 @@ const RectangleItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilit
|
|
|
66
66
|
const background = value
|
|
67
67
|
? (_b = (0, getFill_1.getFill)(value)) !== null && _b !== void 0 ? _b : 'transparent'
|
|
68
68
|
: 'transparent';
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(Fill, { fill: value, itemId: item.id, background: background, solidTransition: solidTransition }));
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(Fill, { fill: value, itemId: item.id, background: background, solidTransition: solidTransition }, `fill-${i}-${fill.id}`));
|
|
70
70
|
})] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
71
71
|
.rectangle-${item.id} {
|
|
72
72
|
position: absolute;
|