@cntrl-site/sdk-nextjs 0.28.0 → 0.28.1
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.
|
@@ -30,20 +30,24 @@ const VideoItem = ({ item, sectionId, onResize }) => {
|
|
|
30
30
|
const scrollPlayback = item.layoutParams[layoutId].scrollPlayback;
|
|
31
31
|
const hasScrollPlayback = scrollPlayback !== null;
|
|
32
32
|
(0, useRegisterResize_1.useRegisterResize)(ref, onResize);
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { url: (_a = item.link) === null || _a === void 0 ? void 0 : _a.url, target: (_b = item.link) === null || _b === void 0 ? void 0 : _b.target, children: [(0, jsx_runtime_1.jsx)("div", { className: `video-wrapper-${item.id}`, ref: setRef, style: {
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { url: (_a = item.link) === null || _a === void 0 ? void 0 : _a.url, target: (_b = item.link) === null || _b === void 0 ? void 0 : _b.target, children: [hasScrollPlayback ? ((0, jsx_runtime_1.jsx)("div", { className: `video-wrapper-${item.id}`, ref: setRef, style: {
|
|
34
34
|
opacity: `${opacity}`,
|
|
35
35
|
transform: `rotate(${angle}deg)`,
|
|
36
36
|
filter: `blur(${blur * 100}vw)`,
|
|
37
|
-
overflow:
|
|
38
|
-
}, children:
|
|
37
|
+
overflow: 'hidden'
|
|
38
|
+
}, children: (0, jsx_runtime_1.jsx)(ScrollPlaybackVideo_1.ScrollPlaybackVideo, { sectionId: sectionId, src: item.commonParams.url, playbackParams: scrollPlayback, style: {
|
|
39
39
|
borderRadius: `${radius * 100}vw`,
|
|
40
40
|
borderWidth: `${strokeWidth * 100}vw`,
|
|
41
41
|
borderColor: `${borderColor.toCss()}`
|
|
42
|
-
}, className: `video video-playback-wrapper video-${item.id}` })) : ((0, jsx_runtime_1.jsx)("
|
|
42
|
+
}, className: `video video-playback-wrapper video-${item.id}` }) })) : ((0, jsx_runtime_1.jsx)("div", { className: `video-wrapper-${item.id}`, ref: setRef, style: {
|
|
43
|
+
opacity: `${opacity}`,
|
|
44
|
+
transform: `rotate(${angle}deg)`,
|
|
45
|
+
filter: `blur(${blur * 100}vw)`
|
|
46
|
+
}, children: (0, jsx_runtime_1.jsx)("video", { ref: videoRef, autoPlay: true, muted: true, loop: true, playsInline: true, className: `video video-${item.id}`, style: {
|
|
43
47
|
borderRadius: `${radius * 100}vw`,
|
|
44
48
|
borderWidth: `${strokeWidth * 100}vw`,
|
|
45
49
|
borderColor: `${borderColor.toCss()}`
|
|
46
|
-
}, children: (0, jsx_runtime_1.jsx)("source", { src: item.commonParams.url }) })
|
|
50
|
+
}, children: (0, jsx_runtime_1.jsx)("source", { src: item.commonParams.url }) }) })), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
47
51
|
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
48
52
|
.video-${item.id} {
|
|
49
53
|
border-color: ${borderColor.fmt('rgba')};
|
package/package.json
CHANGED
|
@@ -28,17 +28,17 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
|
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
30
|
<LinkWrapper url={item.link?.url} target={item.link?.target}>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
{hasScrollPlayback ? (
|
|
32
|
+
<div
|
|
33
|
+
className={`video-wrapper-${item.id}`}
|
|
34
|
+
ref={setRef}
|
|
35
|
+
style={{
|
|
36
|
+
opacity: `${opacity}`,
|
|
37
|
+
transform: `rotate(${angle}deg)`,
|
|
38
|
+
filter: `blur(${blur * 100}vw)`,
|
|
39
|
+
overflow: 'hidden'
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
42
|
<ScrollPlaybackVideo
|
|
43
43
|
sectionId={sectionId}
|
|
44
44
|
src={item.commonParams.url}
|
|
@@ -50,7 +50,17 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
|
|
|
50
50
|
}}
|
|
51
51
|
className={`video video-playback-wrapper video-${item.id}`}
|
|
52
52
|
/>
|
|
53
|
-
|
|
53
|
+
</div>
|
|
54
|
+
) : (
|
|
55
|
+
<div
|
|
56
|
+
className={`video-wrapper-${item.id}`}
|
|
57
|
+
ref={setRef}
|
|
58
|
+
style={{
|
|
59
|
+
opacity: `${opacity}`,
|
|
60
|
+
transform: `rotate(${angle}deg)`,
|
|
61
|
+
filter: `blur(${blur * 100}vw)`
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
54
64
|
<video
|
|
55
65
|
ref={videoRef}
|
|
56
66
|
autoPlay
|
|
@@ -59,15 +69,15 @@ export const VideoItem: FC<ItemProps<TVideoItem>> = ({ item, sectionId, onResize
|
|
|
59
69
|
playsInline
|
|
60
70
|
className={`video video-${item.id}`}
|
|
61
71
|
style={{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
borderRadius: `${radius * 100}vw`,
|
|
73
|
+
borderWidth: `${strokeWidth * 100}vw`,
|
|
74
|
+
borderColor: `${borderColor.toCss()}`
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<source src={item.commonParams.url} />
|
|
78
|
+
</video>
|
|
79
|
+
</div>
|
|
80
|
+
)}
|
|
71
81
|
<JSXStyle id={id}>{`
|
|
72
82
|
@supports not (color: oklch(42% 0.3 90 / 1)) {
|
|
73
83
|
.video-${item.id} {
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
|
5
|
-
<option name="myValues">
|
|
6
|
-
<value>
|
|
7
|
-
<list size="1">
|
|
8
|
-
<item index="0" class="java.lang.String" itemvalue="jsx" />
|
|
9
|
-
</list>
|
|
10
|
-
</value>
|
|
11
|
-
</option>
|
|
12
|
-
<option name="myCustomValuesEnabled" value="true" />
|
|
13
|
-
</inspection_tool>
|
|
14
|
-
</profile>
|
|
15
|
-
</component>
|