@cntrl-site/sdk-nextjs 1.8.16 → 1.8.17
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.
- package/LICENSE +21 -21
- package/README.md +4 -4
- package/TODO.md +1 -1
- package/cntrl-site-sdk-nextjs-1.8.12.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.8.13.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.8.14.tgz +0 -0
- package/eslint.config.mjs +35 -35
- package/jest.config.js +6 -6
- package/lib/common/useItemFXData.js +7 -7
- package/lib/components/Article.js +5 -5
- package/lib/components/LayoutStyle.js +4 -4
- package/lib/components/Section/Section.js +43 -43
- package/lib/components/items/CodeEmbedItem/CodeEmbedItem.js +35 -35
- package/lib/components/items/ComponentItem/ComponentItem.js +12 -12
- package/lib/components/items/CompoundItem/CompoundChild.js +20 -20
- package/lib/components/items/CompoundItem/CompoundItem.js +14 -14
- package/lib/components/items/CustomItem/CustomItem.js +9 -9
- package/lib/components/items/EmbedVideoItem/VimeoEmbed.js +23 -23
- package/lib/components/items/EmbedVideoItem/YoutubeEmbed.js +26 -26
- package/lib/components/items/FileItem/ImageItem.js +38 -38
- package/lib/components/items/FileItem/VideoItem.js +45 -45
- package/lib/components/items/GroupItem/GroupItem.js +13 -13
- package/lib/components/items/Item.js +30 -30
- package/lib/components/items/RectangleItem/RectangleItem.js +20 -20
- package/lib/components/items/RichTextItem/RichTextItem.js +21 -21
- package/lib/utils/RichTextConverter/RichTextConverter.js +21 -21
- package/package.json +57 -57
- package/src/common/useCurrentLayout.ts +52 -52
- package/src/common/useExemplary.ts +9 -9
- package/src/common/useItemFXData.ts +47 -47
- package/src/common/useKeyframeValue.ts +85 -85
- package/src/common/useRegisterResize.ts +16 -16
- package/src/components/Article.tsx +73 -73
- package/src/components/ArticleWrapper.tsx +21 -21
- package/src/components/Head.tsx +56 -56
- package/src/components/LayoutStyle.tsx +21 -21
- package/src/components/Page.tsx +33 -33
- package/src/components/ScrollPlaybackVideo.tsx +56 -56
- package/src/components/Section/Section.tsx +164 -164
- package/src/components/Section/useSectionColor.ts +19 -19
- package/src/components/Section/useSectionHeightMap.ts +19 -19
- package/src/components/items/CodeEmbedItem/CodeEmbedItem.tsx +137 -137
- package/src/components/items/CodeEmbedItem/useCodeEmbedItem.ts +36 -36
- package/src/components/items/ComponentItem/ComponentItem.tsx +65 -65
- package/src/components/items/ComponentItem/useComponentItem.ts +35 -35
- package/src/components/items/CompoundItem/CompoundChild.tsx +150 -150
- package/src/components/items/CompoundItem/CompoundItem.tsx +70 -70
- package/src/components/items/CompoundItem/useCompoundItem.ts +21 -21
- package/src/components/items/CustomItem/CustomItem.tsx +48 -48
- package/src/components/items/EmbedVideoItem/VimeoEmbed.tsx +202 -202
- package/src/components/items/EmbedVideoItem/YoutubeEmbed.tsx +187 -187
- package/src/components/items/EmbedVideoItem/useEmbedVideoItem.ts +46 -46
- package/src/components/items/FileItem/ImageItem.tsx +156 -156
- package/src/components/items/FileItem/VideoItem.tsx +185 -185
- package/src/components/items/FileItem/useFileItem.ts +73 -73
- package/src/components/items/GroupItem/GroupItem.tsx +79 -79
- package/src/components/items/GroupItem/useGroupItem.ts +34 -34
- package/src/components/items/Item.tsx +251 -251
- package/src/components/items/LinkWrapper.tsx +39 -39
- package/src/components/items/RectangleItem/RectangleItem.tsx +95 -95
- package/src/components/items/RectangleItem/useRectangleItem.ts +82 -82
- package/src/components/items/RichTextItem/RichTextItem.tsx +105 -105
- package/src/components/items/RichTextItem/useRichTextItem.ts +12 -12
- package/src/components/items/RichTextWrapper.tsx +15 -15
- package/src/components/items/itemsMap.ts +28 -28
- package/src/components/items/useDraggable.ts +252 -252
- package/src/components/items/useItemAngle.ts +13 -13
- package/src/components/items/useItemArea.ts +35 -35
- package/src/components/items/useItemPointerEvents.ts +23 -23
- package/src/components/items/useItemScale.ts +17 -17
- package/src/components/items/useItemTriggers.ts +15 -15
- package/src/components/items/useRichTextItemValues.ts +65 -65
- package/src/components/items/useSizing.ts +25 -25
- package/src/components/items/useStickyItemTop.ts +21 -21
- package/src/components/useLayoutContext.ts +7 -7
- package/src/index.ts +24 -24
- package/src/interactions/CSSPropertyNameMap.ts +38 -38
- package/src/interactions/InteractionsRegistry.ts +283 -283
- package/src/interactions/ItemInteractionCtrl.ts +77 -77
- package/src/interactions/getTransition.ts +27 -27
- package/src/interactions/types.ts +36 -36
- package/src/interactions/useItemInteractionCtrl.ts +18 -18
- package/src/provider/ArticleRectContext.ts +4 -4
- package/src/provider/CntrlContext.ts +5 -5
- package/src/provider/CntrlProvider.tsx +11 -11
- package/src/provider/CntrlSdkContext.ts +83 -83
- package/src/provider/CustomItemRegistry.ts +14 -14
- package/src/provider/CustomItemTypes.ts +3 -3
- package/src/provider/CustomSectionRegistry.ts +25 -25
- package/src/provider/InteractionsContext.old.tsx +66 -66
- package/src/provider/InteractionsContext.test.tsx +97 -97
- package/src/provider/InteractionsContext.tsx +28 -28
- package/src/provider/Keyframes.ts +11 -11
- package/src/provider/KeyframesContext.ts +5 -5
- package/src/provider/LayoutContext.ts +3 -3
- package/src/provider/WebGLContextManagerContext.tsx +4 -4
- package/src/provider/defaultContext.ts +8 -8
- package/src/provider/useCntrlContext.ts +8 -8
- package/src/styled-jsx.d.ts +1 -1
- package/src/utils/Animator/Animator.ts +371 -371
- package/src/utils/ArticleRectManager/ArticleRectObserver.ts +93 -93
- package/src/utils/ArticleRectManager/useArticleRectObserver.ts +17 -17
- package/src/utils/ArticleRectManager/useSectionRegistry.ts +11 -11
- package/src/utils/EventEmitter.ts +41 -41
- package/src/utils/RichTextConverter/RichTextConverter.tsx +326 -326
- package/src/utils/ScaleAnchorMap.ts +13 -13
- package/src/utils/StickyManager/StickyManager.ts +23 -23
- package/src/utils/Youtube/YouTubeIframeApiLoader.ts +58 -58
- package/src/utils/Youtube/YoutubeIframeApi.ts +101 -101
- package/src/utils/Youtube/useYouTubeIframeApi.ts +12 -12
- package/src/utils/binSearchInsertAt.ts +33 -33
- package/src/utils/castObject.ts +10 -10
- package/src/utils/effects/useImageFx.ts +156 -156
- package/src/utils/effects/useVideoFx.ts +158 -158
- package/src/utils/getAnchoredItemTop.ts +12 -12
- package/src/utils/getCompoundBoundaryStyles.ts +60 -60
- package/src/utils/getFontFamilyValue.ts +3 -3
- package/src/utils/getInvertedRanges.ts +43 -43
- package/src/utils/getItemTopStyle.ts +14 -14
- package/src/utils/getStyleFromItemStateAndParams.ts +8 -8
- package/src/utils/getValidYoutubeUrl.ts +29 -29
- package/src/utils/isItemType.ts +5 -5
- package/src/utils/rangeMap.ts +13 -13
- package/src/utils/useElementRect.ts +23 -23
|
@@ -128,34 +128,34 @@ const YoutubeEmbedItem = ({ item, sectionId, onResize, interactionCtrl, onVisibi
|
|
|
128
128
|
top: '0',
|
|
129
129
|
left: '0',
|
|
130
130
|
zIndex: 1
|
|
131
|
-
}, alt: "Cover img" })), (0, jsx_runtime_1.jsx)("div", { className: `embed-${item.id}`, ref: setDiv, style: Object.assign(Object.assign({}, (radius !== undefined ? { borderRadius: `${radius * 100}vw` } : {})), { transition: (_j = frameStateParams === null || frameStateParams === void 0 ? void 0 : frameStateParams.transition) !== null && _j !== void 0 ? _j : 'none' }) })] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
132
|
-
.embed-youtube-video-wrapper-${item.id},
|
|
133
|
-
.embed-${item.id} {
|
|
134
|
-
position: absolute;
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 100%;
|
|
137
|
-
}
|
|
138
|
-
.embed-${item.id} {
|
|
139
|
-
overflow: hidden;
|
|
140
|
-
}
|
|
141
|
-
.embed-youtube-video-wrapper-${item.id} iframe {
|
|
142
|
-
width: 100%;
|
|
143
|
-
height: 100%;
|
|
144
|
-
z-index: 1;
|
|
145
|
-
border: none;
|
|
146
|
-
}
|
|
131
|
+
}, alt: "Cover img" })), (0, jsx_runtime_1.jsx)("div", { className: `embed-${item.id}`, ref: setDiv, style: Object.assign(Object.assign({}, (radius !== undefined ? { borderRadius: `${radius * 100}vw` } : {})), { transition: (_j = frameStateParams === null || frameStateParams === void 0 ? void 0 : frameStateParams.transition) !== null && _j !== void 0 ? _j : 'none' }) })] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
132
|
+
.embed-youtube-video-wrapper-${item.id},
|
|
133
|
+
.embed-${item.id} {
|
|
134
|
+
position: absolute;
|
|
135
|
+
width: 100%;
|
|
136
|
+
height: 100%;
|
|
137
|
+
}
|
|
138
|
+
.embed-${item.id} {
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
}
|
|
141
|
+
.embed-youtube-video-wrapper-${item.id} iframe {
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 100%;
|
|
144
|
+
z-index: 1;
|
|
145
|
+
border: none;
|
|
146
|
+
}
|
|
147
147
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
148
|
-
return (`
|
|
149
|
-
.embed-youtube-video-wrapper-${item.id} {
|
|
150
|
-
opacity: ${layoutParams.opacity};
|
|
151
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
152
|
-
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
153
|
-
}
|
|
154
|
-
.embed-youtube-video-wrapper-${item.id} .embed-${item.id} {
|
|
155
|
-
border-radius: ${layoutParams.radius * 100}vw;
|
|
156
|
-
}
|
|
148
|
+
return (`
|
|
149
|
+
.embed-youtube-video-wrapper-${item.id} {
|
|
150
|
+
opacity: ${layoutParams.opacity};
|
|
151
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
152
|
+
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
153
|
+
}
|
|
154
|
+
.embed-youtube-video-wrapper-${item.id} .embed-${item.id} {
|
|
155
|
+
border-radius: ${layoutParams.radius * 100}vw;
|
|
156
|
+
}
|
|
157
157
|
`);
|
|
158
|
-
})}
|
|
158
|
+
})}
|
|
159
159
|
` })] }));
|
|
160
160
|
};
|
|
161
161
|
exports.YoutubeEmbedItem = YoutubeEmbedItem;
|
|
@@ -67,46 +67,46 @@ const ImageItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
|
|
|
67
67
|
}, [isInteractive, onVisibilityChange]);
|
|
68
68
|
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_l = item.link) === null || _l === void 0 ? void 0 : _l.url, target: (_m = item.link) === null || _m === void 0 ? void 0 : _m.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `image-wrapper-${item.id}`, ref: setWrapperRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg) translateZ(0)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_o = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.transition) !== null && _o !== void 0 ? _o : 'none' }), children: hasGLEffect && isFXAllowed
|
|
69
69
|
? ((0, jsx_runtime_1.jsx)("canvas", { style: inlineStyles, ref: fxCanvas, className: `img-canvas image-${item.id}`, width: rectWidth, height: rectHeight }))
|
|
70
|
-
: ((0, jsx_runtime_1.jsx)("img", { alt: "", className: `image image-${item.id}`, style: inlineStyles, src: item.commonParams.url })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
71
|
-
.image-wrapper-${item.id} {
|
|
72
|
-
position: absolute;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
display: flex;
|
|
77
|
-
}
|
|
78
|
-
.image {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 100%;
|
|
81
|
-
opacity: 1;
|
|
82
|
-
object-fit: cover;
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
border-style: solid;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
box-sizing: border-box;
|
|
87
|
-
}
|
|
88
|
-
.img-canvas {
|
|
89
|
-
border: solid;
|
|
90
|
-
width: 100%;
|
|
91
|
-
height: 100%;
|
|
92
|
-
pointer-events: none;
|
|
93
|
-
border-width: 0;
|
|
94
|
-
box-sizing: border-box;
|
|
95
|
-
}
|
|
70
|
+
: ((0, jsx_runtime_1.jsx)("img", { alt: "", className: `image image-${item.id}`, style: inlineStyles, src: item.commonParams.url })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
71
|
+
.image-wrapper-${item.id} {
|
|
72
|
+
position: absolute;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
.image {
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
object-fit: cover;
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
border-style: solid;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
}
|
|
88
|
+
.img-canvas {
|
|
89
|
+
border: solid;
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 100%;
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
border-width: 0;
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
}
|
|
96
96
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
97
|
-
return (`
|
|
98
|
-
.image-wrapper-${item.id} {
|
|
99
|
-
opacity: ${layoutParams.opacity};
|
|
100
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
101
|
-
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
102
|
-
}
|
|
103
|
-
.image-${item.id} {
|
|
104
|
-
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
105
|
-
border-radius: ${layoutParams.radius * 100}vw;
|
|
106
|
-
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
107
|
-
}
|
|
97
|
+
return (`
|
|
98
|
+
.image-wrapper-${item.id} {
|
|
99
|
+
opacity: ${layoutParams.opacity};
|
|
100
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
101
|
+
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
102
|
+
}
|
|
103
|
+
.image-${item.id} {
|
|
104
|
+
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
105
|
+
border-radius: ${layoutParams.radius * 100}vw;
|
|
106
|
+
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
107
|
+
}
|
|
108
108
|
`);
|
|
109
|
-
})}
|
|
109
|
+
})}
|
|
110
110
|
` })] }) }));
|
|
111
111
|
};
|
|
112
112
|
exports.ImageItem = ImageItem;
|
|
@@ -73,53 +73,53 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
|
|
|
73
73
|
? ((0, jsx_runtime_1.jsx)(ScrollPlaybackVideo_1.ScrollPlaybackVideo, { sectionId: sectionId, src: item.commonParams.url, playbackParams: scrollPlayback, style: inlineStyles, className: `video video-playback-wrapper video-${item.id}` }))
|
|
74
74
|
: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: hasGLEffect && isFXAllowed
|
|
75
75
|
? ((0, jsx_runtime_1.jsx)("canvas", { style: inlineStyles, ref: fxCanvas, className: `video-canvas video-${item.id}`, width: rectWidth, height: rectHeight }))
|
|
76
|
-
: ((0, jsx_runtime_1.jsx)("video", { poster: (_p = item.commonParams.coverUrl) !== null && _p !== void 0 ? _p : '', ref: videoRef, autoPlay: true, muted: true, loop: true, playsInline: true, className: `video video-${item.id}`, style: inlineStyles, children: (0, jsx_runtime_1.jsx)("source", { src: item.commonParams.url }) })) })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
77
|
-
.video-wrapper-${item.id} {
|
|
78
|
-
position: absolute;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 100%;
|
|
82
|
-
box-sizing: border-box;
|
|
83
|
-
opacity: ${opacity};
|
|
84
|
-
}
|
|
85
|
-
.video {
|
|
86
|
-
width: 100%;
|
|
87
|
-
height: 100%;
|
|
88
|
-
box-sizing: border-box;
|
|
89
|
-
opacity: 1;
|
|
90
|
-
object-fit: cover;
|
|
91
|
-
overflow: hidden;
|
|
92
|
-
border-style: solid;
|
|
93
|
-
}
|
|
94
|
-
.video-${item.id} {
|
|
95
|
-
border-color: ${itemStrokeColor};
|
|
96
|
-
}
|
|
97
|
-
.video-playback-wrapper {
|
|
98
|
-
display: flex;
|
|
99
|
-
justify-content: center;
|
|
100
|
-
}
|
|
101
|
-
.video-canvas {
|
|
102
|
-
border: solid;
|
|
103
|
-
width: 100%;
|
|
104
|
-
height: 100%;
|
|
105
|
-
pointer-events: none;
|
|
106
|
-
border-width: 0;
|
|
107
|
-
box-sizing: border-box;
|
|
108
|
-
}
|
|
76
|
+
: ((0, jsx_runtime_1.jsx)("video", { poster: (_p = item.commonParams.coverUrl) !== null && _p !== void 0 ? _p : '', ref: videoRef, autoPlay: true, muted: true, loop: true, playsInline: true, className: `video video-${item.id}`, style: inlineStyles, children: (0, jsx_runtime_1.jsx)("source", { src: item.commonParams.url }) })) })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
77
|
+
.video-wrapper-${item.id} {
|
|
78
|
+
position: absolute;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
opacity: ${opacity};
|
|
84
|
+
}
|
|
85
|
+
.video {
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
opacity: 1;
|
|
90
|
+
object-fit: cover;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
border-style: solid;
|
|
93
|
+
}
|
|
94
|
+
.video-${item.id} {
|
|
95
|
+
border-color: ${itemStrokeColor};
|
|
96
|
+
}
|
|
97
|
+
.video-playback-wrapper {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
}
|
|
101
|
+
.video-canvas {
|
|
102
|
+
border: solid;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
border-width: 0;
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
}
|
|
109
109
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
110
|
-
return (`
|
|
111
|
-
.video-wrapper-${item.id} {
|
|
112
|
-
opacity: ${layoutParams.opacity};
|
|
113
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
114
|
-
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
115
|
-
}
|
|
116
|
-
.video-${item.id} {
|
|
117
|
-
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
118
|
-
border-radius: ${layoutParams.radius * 100}vw;
|
|
119
|
-
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
120
|
-
}
|
|
110
|
+
return (`
|
|
111
|
+
.video-wrapper-${item.id} {
|
|
112
|
+
opacity: ${layoutParams.opacity};
|
|
113
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
114
|
+
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
115
|
+
}
|
|
116
|
+
.video-${item.id} {
|
|
117
|
+
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
118
|
+
border-radius: ${layoutParams.radius * 100}vw;
|
|
119
|
+
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
120
|
+
}
|
|
121
121
|
`);
|
|
122
|
-
})}
|
|
122
|
+
})}
|
|
123
123
|
` })] }));
|
|
124
124
|
};
|
|
125
125
|
exports.VideoItem = VideoItem;
|
|
@@ -34,21 +34,21 @@ const GroupItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
|
|
|
34
34
|
(0, react_1.useEffect)(() => {
|
|
35
35
|
onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
|
|
36
36
|
}, [isInteractive, onVisibilityChange]);
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_d = item.link) === null || _d === void 0 ? void 0 : _d.url, target: (_e = item.link) === null || _e === void 0 ? void 0 : _e.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `group-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg) translateZ(0)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_f = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _f !== void 0 ? _f : 'none' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
38
|
-
.group-${item.id} {
|
|
39
|
-
position: absolute;
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 100%;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
}
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_d = item.link) === null || _d === void 0 ? void 0 : _d.url, target: (_e = item.link) === null || _e === void 0 ? void 0 : _e.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `group-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg) translateZ(0)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_f = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _f !== void 0 ? _f : 'none' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
38
|
+
.group-${item.id} {
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
}
|
|
44
44
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
45
|
-
return (`
|
|
46
|
-
.group-${item.id} {
|
|
47
|
-
opacity: ${layoutParams.opacity};
|
|
48
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
49
|
-
}
|
|
45
|
+
return (`
|
|
46
|
+
.group-${item.id} {
|
|
47
|
+
opacity: ${layoutParams.opacity};
|
|
48
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
49
|
+
}
|
|
50
50
|
`);
|
|
51
|
-
})}
|
|
51
|
+
})}
|
|
52
52
|
` })] }) }));
|
|
53
53
|
};
|
|
54
54
|
exports.GroupItem = GroupItem;
|
|
@@ -28,9 +28,9 @@ const useSizing_1 = require("./useSizing");
|
|
|
28
28
|
const useItemPointerEvents_1 = require("./useItemPointerEvents");
|
|
29
29
|
const useItemArea_1 = require("./useItemArea");
|
|
30
30
|
const useDraggable_1 = require("./useDraggable");
|
|
31
|
-
const stickyFix = `
|
|
32
|
-
-webkit-transform: translate3d(0, 0, 0);
|
|
33
|
-
transform: translate3d(0, 0, 0);
|
|
31
|
+
const stickyFix = `
|
|
32
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
33
|
+
transform: translate3d(0, 0, 0);
|
|
34
34
|
`;
|
|
35
35
|
const noop = () => null;
|
|
36
36
|
const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGroup = false }) => {
|
|
@@ -134,40 +134,40 @@ const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGrou
|
|
|
134
134
|
? 'grab'
|
|
135
135
|
: hasClickTriggers
|
|
136
136
|
? 'pointer'
|
|
137
|
-
: 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none', userSelect: isDraggable ? 'none' : 'unset', WebkitUserSelect: isDraggable ? 'none' : 'unset', MozUserSelect: isDraggable ? 'none' : 'unset', msUserSelect: isDraggable ? 'none' : 'unset' }) }, triggers, { children: (0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId, onResize: handleItemResize, articleHeight: articleHeight, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
137
|
+
: 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none', userSelect: isDraggable ? 'none' : 'unset', WebkitUserSelect: isDraggable ? 'none' : 'unset', MozUserSelect: isDraggable ? 'none' : 'unset', msUserSelect: isDraggable ? 'none' : 'unset' }) }, triggers, { children: (0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId, onResize: handleItemResize, articleHeight: articleHeight, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
138
138
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, hidden, sticky, sectionHeight, layoutParams]) => {
|
|
139
139
|
const sizingAxis = (0, useSizing_1.parseSizing)(layoutParams.sizing);
|
|
140
140
|
const isScreenBasedBottom = area.positionType === sdk_1.PositionType.ScreenBased && area.anchorSide === sdk_1.AnchorSide.Bottom;
|
|
141
141
|
const scaleAnchor = area.scaleAnchor;
|
|
142
|
-
return (`
|
|
143
|
-
.item-${item.id} {
|
|
144
|
-
position: ${sticky ? 'sticky' : 'absolute'};
|
|
145
|
-
top: ${sticky ? `${(0, getAnchoredItemTop_1.getAnchoredItemTop)(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
|
|
146
|
-
transition: opacity 0.2s linear 0.1s;
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
display: ${hidden ? 'none' : 'block'};
|
|
149
|
-
height: fit-content;
|
|
150
|
-
}
|
|
151
|
-
.item-${item.id}-inner {
|
|
142
|
+
return (`
|
|
143
|
+
.item-${item.id} {
|
|
144
|
+
position: ${sticky ? 'sticky' : 'absolute'};
|
|
145
|
+
top: ${sticky ? `${(0, getAnchoredItemTop_1.getAnchoredItemTop)(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
|
|
146
|
+
transition: opacity 0.2s linear 0.1s;
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
display: ${hidden ? 'none' : 'block'};
|
|
149
|
+
height: fit-content;
|
|
150
|
+
}
|
|
151
|
+
.item-${item.id}-inner {
|
|
152
152
|
width: ${sizingAxis.x === 'manual'
|
|
153
153
|
? `${area.width * 100}vw`
|
|
154
|
-
: 'max-content'};
|
|
155
|
-
height: ${sizingAxis.y === 'manual' ? `${area.height * 100}vw` : 'unset'};
|
|
156
|
-
transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
|
|
157
|
-
transform: scale(${area.scale});
|
|
158
|
-
position: relative;
|
|
159
|
-
}
|
|
160
|
-
.item-wrapper-${item.id} {
|
|
161
|
-
position: ${area.positionType === sdk_1.PositionType.ScreenBased ? 'fixed' : 'absolute'};
|
|
162
|
-
z-index: ${area.zIndex};
|
|
163
|
-
${!isInGroup && stickyFix}
|
|
164
|
-
pointer-events: none;
|
|
165
|
-
bottom: ${isScreenBasedBottom ? `${-area.top * 100}vw` : 'unset'};
|
|
166
|
-
top: ${isScreenBasedBottom ? 'unset' : (0, getItemTopStyle_1.getItemTopStyle)(area.top, area.anchorSide)};
|
|
167
|
-
left: ${area.left * 100}vw;
|
|
168
|
-
}
|
|
154
|
+
: 'max-content'};
|
|
155
|
+
height: ${sizingAxis.y === 'manual' ? `${area.height * 100}vw` : 'unset'};
|
|
156
|
+
transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
|
|
157
|
+
transform: scale(${area.scale});
|
|
158
|
+
position: relative;
|
|
159
|
+
}
|
|
160
|
+
.item-wrapper-${item.id} {
|
|
161
|
+
position: ${area.positionType === sdk_1.PositionType.ScreenBased ? 'fixed' : 'absolute'};
|
|
162
|
+
z-index: ${area.zIndex};
|
|
163
|
+
${!isInGroup && stickyFix}
|
|
164
|
+
pointer-events: none;
|
|
165
|
+
bottom: ${isScreenBasedBottom ? `${-area.top * 100}vw` : 'unset'};
|
|
166
|
+
top: ${isScreenBasedBottom ? 'unset' : (0, getItemTopStyle_1.getItemTopStyle)(area.top, area.anchorSide)};
|
|
167
|
+
left: ${area.left * 100}vw;
|
|
168
|
+
}
|
|
169
169
|
`);
|
|
170
|
-
})}
|
|
170
|
+
})}
|
|
171
171
|
` })] }));
|
|
172
172
|
};
|
|
173
173
|
exports.Item = Item;
|
|
@@ -46,28 +46,28 @@ const RectangleItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilit
|
|
|
46
46
|
}, [isInteractive, onVisibilityChange]);
|
|
47
47
|
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_b = item.link) === null || _b === void 0 ? void 0 : _b.url, target: (_c = item.link) === null || _c === void 0 ? void 0 : _c.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `rectangle-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (backgroundColor ? { backgroundColor: `${backgroundColor.fmt('rgba')}` } : {})), (borderColor ? { borderColor: `${borderColor.fmt('rgba')}` } : {})), (radius !== undefined ? { borderRadius: `${radius * 100}vw` } : {})), (strokeWidth !== undefined ? { borderWidth: `${strokeWidth * 100}vw` } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg) translateZ(0)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), (backdropFilterValue !== undefined
|
|
48
48
|
? { backdropFilter: backdropFilterValue, WebkitBackdropFilter: backdropFilterValue }
|
|
49
|
-
: {})), { transition: (_d = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _d !== void 0 ? _d : 'none' }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
50
|
-
.rectangle-${item.id} {
|
|
51
|
-
position: absolute;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
border-style: solid;
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
}
|
|
49
|
+
: {})), { transition: (_d = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _d !== void 0 ? _d : 'none' }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
50
|
+
.rectangle-${item.id} {
|
|
51
|
+
position: absolute;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
border-style: solid;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
57
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
58
|
-
return (`
|
|
59
|
-
.rectangle-${item.id} {
|
|
60
|
-
background-color: ${color_1.CntrlColor.parse(layoutParams.fillColor).fmt('rgba')};
|
|
61
|
-
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
62
|
-
border-radius: ${layoutParams.radius * 100}vw;
|
|
63
|
-
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
64
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
65
|
-
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
66
|
-
backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
|
|
67
|
-
-webkit-backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
|
|
68
|
-
}
|
|
58
|
+
return (`
|
|
59
|
+
.rectangle-${item.id} {
|
|
60
|
+
background-color: ${color_1.CntrlColor.parse(layoutParams.fillColor).fmt('rgba')};
|
|
61
|
+
border-color: ${color_1.CntrlColor.parse(layoutParams.strokeColor).fmt('rgba')};
|
|
62
|
+
border-radius: ${layoutParams.radius * 100}vw;
|
|
63
|
+
border-width: ${layoutParams.strokeWidth * 100}vw;
|
|
64
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
65
|
+
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
66
|
+
backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
|
|
67
|
+
-webkit-backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
|
|
68
|
+
}
|
|
69
69
|
`);
|
|
70
|
-
})}
|
|
70
|
+
})}
|
|
71
71
|
` })] }) }));
|
|
72
72
|
};
|
|
73
73
|
exports.RectangleItem = RectangleItem;
|
|
@@ -55,27 +55,27 @@ const RichTextItem = ({ item, sectionId, onResize, interactionCtrl, onVisibility
|
|
|
55
55
|
}, [isInteractive, onVisibilityChange]);
|
|
56
56
|
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(Object.assign({}, (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg) translateZ(0)` } : {})), (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` } : {})), { transition }), children: content }), (0, jsx_runtime_1.jsxs)(style_1.default, { id: id, children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
57
57
|
const color = color_1.CntrlColor.parse(layoutParams.color);
|
|
58
|
-
return (`
|
|
59
|
-
.rich-text-wrapper-${item.id} {
|
|
60
|
-
font-size: ${layoutParams.fontSize * 100}vw;
|
|
61
|
-
line-height: ${layoutParams.lineHeight * 100}vw;
|
|
62
|
-
letter-spacing: ${layoutParams.letterSpacing * 100}vw;
|
|
63
|
-
word-spacing: ${layoutParams.wordSpacing * 100}vw;
|
|
64
|
-
font-family: ${(0, getFontFamilyValue_1.getFontFamilyValue)(layoutParams.typeFace)};
|
|
65
|
-
font-weight: ${layoutParams.fontWeight};
|
|
66
|
-
font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
|
|
67
|
-
vertical-align: ${layoutParams.verticalAlign};
|
|
68
|
-
font-variant: ${layoutParams.fontVariant};
|
|
69
|
-
color: ${color.fmt('rgba')};
|
|
70
|
-
transform: rotate(${area.angle}deg) translateZ(0);
|
|
71
|
-
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
72
|
-
text-transform: ${layoutParams.textTransform};
|
|
73
|
-
}
|
|
74
|
-
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
75
|
-
.rich-text-wrapper-${item.id} {
|
|
76
|
-
color: ${color.fmt('rgba')};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
58
|
+
return (`
|
|
59
|
+
.rich-text-wrapper-${item.id} {
|
|
60
|
+
font-size: ${layoutParams.fontSize * 100}vw;
|
|
61
|
+
line-height: ${layoutParams.lineHeight * 100}vw;
|
|
62
|
+
letter-spacing: ${layoutParams.letterSpacing * 100}vw;
|
|
63
|
+
word-spacing: ${layoutParams.wordSpacing * 100}vw;
|
|
64
|
+
font-family: ${(0, getFontFamilyValue_1.getFontFamilyValue)(layoutParams.typeFace)};
|
|
65
|
+
font-weight: ${layoutParams.fontWeight};
|
|
66
|
+
font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
|
|
67
|
+
vertical-align: ${layoutParams.verticalAlign};
|
|
68
|
+
font-variant: ${layoutParams.fontVariant};
|
|
69
|
+
color: ${color.fmt('rgba')};
|
|
70
|
+
transform: rotate(${area.angle}deg) translateZ(0);
|
|
71
|
+
filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
|
|
72
|
+
text-transform: ${layoutParams.textTransform};
|
|
73
|
+
}
|
|
74
|
+
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
75
|
+
.rich-text-wrapper-${item.id} {
|
|
76
|
+
color: ${color.fmt('rgba')};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
79
|
`);
|
|
80
80
|
})}`] })] }));
|
|
81
81
|
};
|
|
@@ -61,13 +61,13 @@ class RichTextConverter {
|
|
|
61
61
|
const kids = [];
|
|
62
62
|
layouts.forEach(l => {
|
|
63
63
|
const ta = richText.layoutParams[l.id].textAlign;
|
|
64
|
-
styleRules[l.id].push(`
|
|
65
|
-
.${blockClass} {
|
|
66
|
-
display: ${group.some(g => g.layout === l.id) ? 'block' : 'none'};
|
|
67
|
-
text-align: ${ta};
|
|
68
|
-
white-space: pre-wrap;
|
|
69
|
-
overflow-wrap: break-word;
|
|
70
|
-
}
|
|
64
|
+
styleRules[l.id].push(`
|
|
65
|
+
.${blockClass} {
|
|
66
|
+
display: ${group.some(g => g.layout === l.id) ? 'block' : 'none'};
|
|
67
|
+
text-align: ${ta};
|
|
68
|
+
white-space: pre-wrap;
|
|
69
|
+
overflow-wrap: break-word;
|
|
70
|
+
}
|
|
71
71
|
`);
|
|
72
72
|
});
|
|
73
73
|
const item = group[0];
|
|
@@ -111,18 +111,18 @@ class RichTextConverter {
|
|
|
111
111
|
if (lineHeight === null || lineHeight === void 0 ? void 0 : lineHeight.value) {
|
|
112
112
|
currentLineHeight[item.layout] = lineHeight.value;
|
|
113
113
|
}
|
|
114
|
-
styleRules[item.layout].push(`
|
|
115
|
-
.${blockClass} .s-${styleGroup.start}-${styleGroup.end} {
|
|
116
|
-
${styleGroup.styles.map(s => RichTextConverter.fromRangeStylesToInline(s, exemplary)).join('\n')}
|
|
117
|
-
}
|
|
114
|
+
styleRules[item.layout].push(`
|
|
115
|
+
.${blockClass} .s-${styleGroup.start}-${styleGroup.end} {
|
|
116
|
+
${styleGroup.styles.map(s => RichTextConverter.fromRangeStylesToInline(s, exemplary)).join('\n')}
|
|
117
|
+
}
|
|
118
118
|
`);
|
|
119
119
|
if (color) {
|
|
120
|
-
styleRules[item.layout].push(`
|
|
121
|
-
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
122
|
-
.${blockClass} .s-${styleGroup.start}-${styleGroup.end} {
|
|
123
|
-
color: ${color_1.CntrlColor.parse(getResolvedValue(color.value, 'COLOR')).fmt('rgba')};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
120
|
+
styleRules[item.layout].push(`
|
|
121
|
+
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
122
|
+
.${blockClass} .s-${styleGroup.start}-${styleGroup.end} {
|
|
123
|
+
color: ${color_1.CntrlColor.parse(getResolvedValue(color.value, 'COLOR')).fmt('rgba')};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
126
|
`);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -131,10 +131,10 @@ class RichTextConverter {
|
|
|
131
131
|
root.push((0, jsx_runtime_1.jsx)("div", { className: blockClass, children: kids }, blockClass));
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
const styles = layouts.map(l => `
|
|
135
|
-
${(0, sdk_1.getLayoutMediaQuery)(l.id, layouts)} {
|
|
136
|
-
${styleRules[l.id].join('\n')}
|
|
137
|
-
}
|
|
134
|
+
const styles = layouts.map(l => `
|
|
135
|
+
${(0, sdk_1.getLayoutMediaQuery)(l.id, layouts)} {
|
|
136
|
+
${styleRules[l.id].join('\n')}
|
|
137
|
+
}
|
|
138
138
|
`).join('\n');
|
|
139
139
|
return [
|
|
140
140
|
root,
|