@cntrl-site/sdk-nextjs 1.9.39 → 1.9.41
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/modules.xml +8 -0
- package/.idea/sdk-nextjs.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/lib/components/ScrollPlaybackVideo.js +1 -1
- package/package.json +2 -2
- package/src/components/ScrollPlaybackVideo.tsx +2 -2
- package/cntrl-site-sdk-nextjs-1.9.24.tgz +0 -0
- package/cntrl-site-sdk-nextjs-1.9.38.tgz +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/sdk-nextjs.iml" filepath="$PROJECT_DIR$/.idea/sdk-nextjs.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/.idea/vcs.xml
ADDED
|
@@ -18,7 +18,7 @@ const ScrollPlaybackVideo = ({ sectionId, src, playbackParams, style, className
|
|
|
18
18
|
const time = (0, rangeMap_1.rangeMap)(scrollPos, playbackParams.from, playbackParams.to, 0, 1, true);
|
|
19
19
|
setTime(toFixed(time));
|
|
20
20
|
});
|
|
21
|
-
}, [playbackParams === null || playbackParams === void 0 ? void 0 : playbackParams.from, playbackParams === null || playbackParams === void 0 ? void 0 : playbackParams.to, time]);
|
|
21
|
+
}, [playbackParams === null || playbackParams === void 0 ? void 0 : playbackParams.from, playbackParams === null || playbackParams === void 0 ? void 0 : playbackParams.to, time, articleRectObserver]);
|
|
22
22
|
const scrollVideoManager = (0, react_1.useMemo)(() => {
|
|
23
23
|
if (!containerElement)
|
|
24
24
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntrl-site/sdk-nextjs",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.41",
|
|
4
4
|
"description": "SDK for Next.js",
|
|
5
5
|
"author": "arsen@momdesign.nyc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@antfu/eslint-config": "^3.8.0",
|
|
32
32
|
"@cntrl-site/color": "^1.0.0",
|
|
33
|
-
"@cntrl-site/components": "^0.1.
|
|
33
|
+
"@cntrl-site/components": "^0.1.28",
|
|
34
34
|
"@cntrl-site/effects": "^1.4.0",
|
|
35
35
|
"@cntrl-site/sdk": "^1.25.6",
|
|
36
36
|
"@types/vimeo__player": "^2.18.0",
|
|
@@ -13,7 +13,7 @@ interface Props {
|
|
|
13
13
|
className: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export const ScrollPlaybackVideo: FC<Props> = ({ sectionId, src, playbackParams, style, className}) => {
|
|
16
|
+
export const ScrollPlaybackVideo: FC<Props> = ({ sectionId, src, playbackParams, style, className }) => {
|
|
17
17
|
const [containerElement, setContainerElement] = useState<HTMLDivElement | null>(null);
|
|
18
18
|
const [time, setTime] = useState(0);
|
|
19
19
|
const articleRectObserver = useContext(ArticleRectContext);
|
|
@@ -25,7 +25,7 @@ export const ScrollPlaybackVideo: FC<Props> = ({ sectionId, src, playbackParams,
|
|
|
25
25
|
const time = rangeMap(scrollPos, playbackParams.from, playbackParams.to, 0, 1, true);
|
|
26
26
|
setTime(toFixed(time));
|
|
27
27
|
});
|
|
28
|
-
}, [playbackParams?.from, playbackParams?.to, time]);
|
|
28
|
+
}, [playbackParams?.from, playbackParams?.to, time, articleRectObserver]);
|
|
29
29
|
|
|
30
30
|
const scrollVideoManager = useMemo<ScrollPlaybackVideoManager | null>(() => {
|
|
31
31
|
if (!containerElement) return null;
|
|
Binary file
|
|
Binary file
|