@douyinfe/semi-animation 2.40.0-alpha.0 → 2.40.0

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.
@@ -12,10 +12,6 @@ var _stepper = _interopRequireDefault(require("./stepper"));
12
12
  var _mapToZero = _interopRequireDefault(require("./mapToZero"));
13
13
  var _wrapValue = _interopRequireDefault(require("./wrapValue"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- /* eslint-disable max-depth */
16
- /* eslint-disable eqeqeq */
17
- /* eslint-disable max-lines-per-function */
18
-
19
15
  const now = () => Date.now();
20
16
  const msPerFrame = 1000 / 60;
21
17
  /**
@@ -65,7 +65,6 @@ function getEasing(easing) {
65
65
  if (name === 'cubic-bezier' || name === 'cubicBezier') {
66
66
  return (0, _bezierEasing.default)(...(args.length ? args : easingMap.linear));
67
67
  } else {
68
- // eslint-disable-next-line eqeqeq
69
68
  if (!name || typeof name !== 'string' || typeof name === 'string' && easingMap[name] == null) {
70
69
  name = 'linear';
71
70
  }
@@ -13,7 +13,6 @@ exports.default = interpolate;
13
13
  * @param {Function} [formatter]
14
14
  * @returns {any}
15
15
  */
16
- // eslint-disable-next-line max-len
17
16
  function interpolate(from, to) {
18
17
  let ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
19
18
  let parser = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
  * @param {number} nowTime
18
18
  *
19
19
  * @returns {boolean}
20
- */ // eslint-disable-next-line max-len
20
+ */
21
21
  function shouldStopAnimation(currentStyle, style, currentVelocity, startTime, nowTime) {
22
22
  for (const key of Object.keys(style)) {
23
23
  const styleValue = style[key];
@@ -24,7 +24,6 @@ const reusedTuple = [0, 0];
24
24
  * @param {number} b
25
25
  * @param {number} precision
26
26
  */
27
- // eslint-disable-next-line max-len
28
27
  function stepper(secondPerFrame, x, v, destX, k, b, precision) {
29
28
  // Spring stiffness, in kg / s^2
30
29
  // for animations, destX is really spring length (spring at rest). initial
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = stripStyle;
7
- /* eslint-disable no-restricted-syntax */
8
7
  function stripStyle(style) {
9
8
  const ret = {};
10
9
  for (const key in style) {
@@ -31,12 +31,10 @@ class Event {
31
31
  const callbacks = this._eventMap.get(event);
32
32
  if (Array.isArray(callbacks) && callbacks.length) {
33
33
  let index = -1;
34
- // eslint-disable-next-line max-depth
35
34
  while ((index = callbacks.findIndex(cb => cb === callback)) > -1) {
36
35
  callbacks.splice(index, 1);
37
36
  }
38
37
  }
39
- // eslint-disable-next-line eqeqeq
40
38
  } else if (callback == null) {
41
39
  this._eventMap.delete(event);
42
40
  }
@@ -4,5 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = noop;
7
- // eslint-disable-next-line @typescript-eslint/no-empty-function
8
7
  function noop() {}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = shallowEqual;
7
- /* eslint-disable no-restricted-syntax */
8
7
  function shallowEqual(a, b) {
9
8
  if (typeof a !== typeof b) {
10
9
  return false;
@@ -1,6 +1,3 @@
1
- /* eslint-disable max-depth */
2
- /* eslint-disable eqeqeq */
3
- /* eslint-disable max-lines-per-function */
4
1
  import Event from './utils/Event';
5
2
  import shouldStopAnimation from './shouldStopAnimation';
6
3
  import shouldUseBezier from './shouldUseBezier';
@@ -56,7 +56,6 @@ export default function getEasing(easing) {
56
56
  if (name === 'cubic-bezier' || name === 'cubicBezier') {
57
57
  return bezier(...(args.length ? args : easingMap.linear));
58
58
  } else {
59
- // eslint-disable-next-line eqeqeq
60
59
  if (!name || typeof name !== 'string' || typeof name === 'string' && easingMap[name] == null) {
61
60
  name = 'linear';
62
61
  }
@@ -7,7 +7,6 @@
7
7
  * @param {Function} [formatter]
8
8
  * @returns {any}
9
9
  */
10
- // eslint-disable-next-line max-len
11
10
  export default function interpolate(from, to) {
12
11
  let ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
13
12
  let parser = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
@@ -11,7 +11,6 @@ import shouldUseBezier from './shouldUseBezier';
11
11
  *
12
12
  * @returns {boolean}
13
13
  */
14
- // eslint-disable-next-line max-len
15
14
  export default function shouldStopAnimation(currentStyle, style, currentVelocity, startTime, nowTime) {
16
15
  for (const key of Object.keys(style)) {
17
16
  const styleValue = style[key];
@@ -18,7 +18,6 @@ const reusedTuple = [0, 0];
18
18
  * @param {number} b
19
19
  * @param {number} precision
20
20
  */
21
- // eslint-disable-next-line max-len
22
21
  export default function stepper(secondPerFrame, x, v, destX, k, b, precision) {
23
22
  // Spring stiffness, in kg / s^2
24
23
  // for animations, destX is really spring length (spring at rest). initial
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-restricted-syntax */
2
1
  export default function stripStyle(style) {
3
2
  const ret = {};
4
3
  for (const key in style) {
@@ -25,12 +25,10 @@ export default class Event {
25
25
  const callbacks = this._eventMap.get(event);
26
26
  if (Array.isArray(callbacks) && callbacks.length) {
27
27
  let index = -1;
28
- // eslint-disable-next-line max-depth
29
28
  while ((index = callbacks.findIndex(cb => cb === callback)) > -1) {
30
29
  callbacks.splice(index, 1);
31
30
  }
32
31
  }
33
- // eslint-disable-next-line eqeqeq
34
32
  } else if (callback == null) {
35
33
  this._eventMap.delete(event);
36
34
  }
@@ -1,2 +1 @@
1
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2
1
  export default function noop() {}
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-restricted-syntax */
2
1
  export default function shallowEqual(a, b) {
3
2
  if (typeof a !== typeof b) {
4
3
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-animation",
3
- "version": "2.40.0-alpha.0",
3
+ "version": "2.40.0",
4
4
  "description": "animation base library for semi-ui",
5
5
  "keywords": [
6
6
  "animation",
@@ -42,5 +42,5 @@
42
42
  "merge2": "^1.4.1",
43
43
  "react-storybook-addon-props-combinations": "^1.1.0"
44
44
  },
45
- "gitHead": "3c30c680ff8335f275dce40e16c8994af178ca78"
45
+ "gitHead": "d73b400df9309f0c545a82da4534ce5a7a311a92"
46
46
  }