@tramvai/module-autoscroll 2.56.1 → 2.56.5

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.
@@ -1 +1 @@
1
- export declare function Autoscroll(): any;
1
+ export declare function Autoscroll(): null;
package/lib/index.es.js CHANGED
@@ -18,8 +18,9 @@ const isAutoScrollEnabled = (route) => {
18
18
  return !((_a = route.navigateState) === null || _a === void 0 ? void 0 : _a.disableAutoscroll);
19
19
  };
20
20
  const scrollToAnchor = (anchor) => {
21
+ var _a;
21
22
  try {
22
- document.querySelector(anchor).scrollIntoView({
23
+ (_a = document.querySelector(anchor)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
23
24
  behavior: 'smooth',
24
25
  });
25
26
  return true;
package/lib/index.js CHANGED
@@ -22,8 +22,9 @@ const isAutoScrollEnabled = (route) => {
22
22
  return !((_a = route.navigateState) === null || _a === void 0 ? void 0 : _a.disableAutoscroll);
23
23
  };
24
24
  const scrollToAnchor = (anchor) => {
25
+ var _a;
25
26
  try {
26
- document.querySelector(anchor).scrollIntoView({
27
+ (_a = document.querySelector(anchor)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
27
28
  behavior: 'smooth',
28
29
  });
29
30
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-autoscroll",
3
- "version": "2.56.1",
3
+ "version": "2.56.5",
4
4
  "description": "Компонент с автопрокруткой к началу страницы",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "build-for-publish": "true"
19
19
  },
20
20
  "peerDependencies": {
21
- "@tramvai/core": "2.56.1",
22
- "@tramvai/module-router": "2.56.1",
23
- "@tramvai/tokens-render": "2.56.1",
24
- "@tinkoff/dippy": "0.8.10",
21
+ "@tramvai/core": "2.56.5",
22
+ "@tramvai/module-router": "2.56.5",
23
+ "@tramvai/tokens-render": "2.56.5",
24
+ "@tinkoff/dippy": "0.8.11",
25
25
  "react": ">=16.14.0",
26
26
  "tslib": "^2.4.0"
27
27
  },