@nok-integration/storefront-react 0.19.45 → 0.19.46

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/dist/index.mjs CHANGED
@@ -11016,7 +11016,13 @@ function useDocumentSnap(ref, enabled = true) {
11016
11016
  const previousPadding = root2.style.scrollPaddingTop;
11017
11017
  root2.style.scrollSnapType = "y mandatory";
11018
11018
  root2.style.scrollPaddingTop = "0px";
11019
+ const top2 = () => window.scrollTo(0, 0);
11020
+ top2();
11021
+ const frame2 = typeof window.requestAnimationFrame === "function" ? window.requestAnimationFrame(top2) : null;
11019
11022
  return () => {
11023
+ if (frame2 !== null && typeof window.cancelAnimationFrame === "function") {
11024
+ window.cancelAnimationFrame(frame2);
11025
+ }
11020
11026
  root2.style.scrollSnapType = previousType;
11021
11027
  root2.style.scrollPaddingTop = previousPadding;
11022
11028
  };
@@ -11016,7 +11016,13 @@ function useDocumentSnap(ref, enabled = true) {
11016
11016
  const previousPadding = root2.style.scrollPaddingTop;
11017
11017
  root2.style.scrollSnapType = "y mandatory";
11018
11018
  root2.style.scrollPaddingTop = "0px";
11019
+ const top2 = () => window.scrollTo(0, 0);
11020
+ top2();
11021
+ const frame2 = typeof window.requestAnimationFrame === "function" ? window.requestAnimationFrame(top2) : null;
11019
11022
  return () => {
11023
+ if (frame2 !== null && typeof window.cancelAnimationFrame === "function") {
11024
+ window.cancelAnimationFrame(frame2);
11025
+ }
11020
11026
  root2.style.scrollSnapType = previousType;
11021
11027
  root2.style.scrollPaddingTop = previousPadding;
11022
11028
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.19.45",
3
+ "version": "0.19.46",
4
4
  "description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",