@semcore/notice-bubble 5.54.0 → 5.54.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/lib/esm/utils.mjs CHANGED
@@ -1,31 +1,43 @@
1
- import s from "@babel/runtime/helpers/esm/classCallCheck";
2
- import a from "@babel/runtime/helpers/esm/createClass";
3
- var n = /* @__PURE__ */ function() {
4
- function t(e, i) {
5
- s(this, t), this.callback = e, this.delay = i, this.remaining = i, this.paused = !1, this.resume();
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ var Timer = /* @__PURE__ */ function() {
4
+ function Timer2(callback, delay) {
5
+ _classCallCheck(this, Timer2);
6
+ this.callback = callback;
7
+ this.delay = delay;
8
+ this.remaining = delay;
9
+ this.paused = false;
10
+ this.resume();
6
11
  }
7
- return a(t, [{
12
+ _createClass(Timer2, [{
8
13
  key: "pause",
9
- value: function() {
10
- clearTimeout(this.timerId), this.remaining -= Date.now() - this.start, this.paused = !0;
14
+ value: function pause() {
15
+ clearTimeout(this.timerId);
16
+ this.remaining -= Date.now() - this.start;
17
+ this.paused = true;
11
18
  }
12
19
  }, {
13
20
  key: "resume",
14
- value: function() {
15
- this.start = Date.now(), this.paused = !1, clearTimeout(this.timerId), this.timerId = setTimeout(this.callback, this.remaining);
21
+ value: function resume() {
22
+ this.start = Date.now();
23
+ this.paused = false;
24
+ clearTimeout(this.timerId);
25
+ this.timerId = setTimeout(this.callback, this.remaining);
16
26
  }
17
27
  }, {
18
28
  key: "reset",
19
- value: function() {
20
- this.remaining = this.delay, this.resume();
29
+ value: function reset() {
30
+ this.remaining = this.delay;
31
+ this.resume();
21
32
  }
22
33
  }, {
23
34
  key: "clear",
24
- value: function() {
35
+ value: function clear() {
25
36
  clearTimeout(this.timerId);
26
37
  }
27
- }]), t;
38
+ }]);
39
+ return Timer2;
28
40
  }();
29
41
  export {
30
- n as Timer
42
+ Timer
31
43
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice-bubble",
3
3
  "description": "Semrush NoticeBubble Component",
4
- "version": "5.54.0",
4
+ "version": "5.54.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,13 +14,13 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/button": "5.43.1",
18
- "@semcore/utils": "4.48.2",
19
- "@semcore/icon": "4.61.0",
20
- "@semcore/portal": "3.41.2",
21
- "@semcore/flex-box": "5.41.2",
22
- "@semcore/animation": "2.41.2",
23
- "@semcore/tooltip": "6.49.2"
17
+ "@semcore/button": "5.43.2",
18
+ "@semcore/utils": "4.48.4",
19
+ "@semcore/icon": "4.62.0",
20
+ "@semcore/portal": "3.41.3",
21
+ "@semcore/flex-box": "5.41.3",
22
+ "@semcore/animation": "2.41.3",
23
+ "@semcore/tooltip": "6.49.3"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@semcore/core": "^2.17.5",