@cntrl-site/sdk-nextjs 1.2.1 → 1.2.3-alpha.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.
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +15 -0
- package/cntrl-site-sdk-nextjs-1.2.3.tgz +0 -0
- package/lib/components/items/EmbedVideoItem/VimeoEmbed.js +4 -1
- package/package.json +2 -2
- package/src/components/items/EmbedVideoItem/VimeoEmbed.tsx +4 -1
- package/cntrl-site-sdk-nextjs-1.2.0.tgz +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
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>
|
|
Binary file
|
|
@@ -94,7 +94,10 @@ const VimeoEmbedItem = ({ item, sectionId, onResize, interactionCtrl, onVisibili
|
|
|
94
94
|
const isInteractive = opacity !== 0;
|
|
95
95
|
(0, react_1.useEffect)(() => {
|
|
96
96
|
onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
|
|
97
|
-
|
|
97
|
+
if (!isInteractive && vimeoPlayer) {
|
|
98
|
+
vimeoPlayer.pause();
|
|
99
|
+
}
|
|
100
|
+
}, [isInteractive, onVisibilityChange, vimeoPlayer]);
|
|
98
101
|
return ((0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { url: (_e = item.link) === null || _e === void 0 ? void 0 : _e.url, target: (_f = item.link) === null || _f === void 0 ? void 0 : _f.target, children: [(0, jsx_runtime_1.jsxs)("div", { className: `embed-video-wrapper-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_g = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.transition) !== null && _g !== void 0 ? _g : 'none' }), onMouseEnter: () => {
|
|
99
102
|
if (!vimeoPlayer || play !== 'on-hover')
|
|
100
103
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntrl-site/sdk-nextjs",
|
|
3
|
-
"version": "1.2.1",
|
|
3
|
+
"version": "1.2.3-alpha.1",
|
|
4
4
|
"description": "SDK for Next.js",
|
|
5
5
|
"author": "arsen@momdesign.nyc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@cntrl-site/effects": "^1.2.0",
|
|
34
34
|
"@cntrl-site/sdk": "^1.14.0",
|
|
35
35
|
"@types/vimeo__player": "^2.18.0",
|
|
36
|
-
"@vimeo/player": "^2.
|
|
36
|
+
"@vimeo/player": "^2.25.0",
|
|
37
37
|
"html-react-parser": "^3.0.1",
|
|
38
38
|
"resize-observer-polyfill": "^1.5.1",
|
|
39
39
|
"styled-jsx": "^5.0.2"
|
|
@@ -87,7 +87,10 @@ export const VimeoEmbedItem: FC<ItemProps<TVimeoEmbedItem>> = ({ item, sectionId
|
|
|
87
87
|
const isInteractive = opacity !== 0;
|
|
88
88
|
useEffect(() => {
|
|
89
89
|
onVisibilityChange?.(isInteractive);
|
|
90
|
-
|
|
90
|
+
if (!isInteractive && vimeoPlayer) {
|
|
91
|
+
vimeoPlayer.pause();
|
|
92
|
+
}
|
|
93
|
+
}, [isInteractive, onVisibilityChange, vimeoPlayer]);
|
|
91
94
|
|
|
92
95
|
return (
|
|
93
96
|
<LinkWrapper url={item.link?.url} target={item.link?.target}>
|
|
Binary file
|