@douyinfe/semi-animation-react 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.
- package/lib/cjs/src/Animation.js +0 -3
- package/lib/cjs/src/KeyFrames.js +0 -2
- package/lib/cjs/src/StyledAnimation.js +0 -6
- package/lib/cjs/src/StyledTransition.js +0 -2
- package/lib/cjs/src/Transition.js +0 -3
- package/lib/cjs/src/utils/noop.js +0 -1
- package/lib/cjs/src/utils/string.js +0 -3
- package/lib/es/src/Animation.js +0 -3
- package/lib/es/src/KeyFrames.js +0 -1
- package/lib/es/src/StyledAnimation.js +0 -5
- package/lib/es/src/StyledTransition.js +0 -1
- package/lib/es/src/Transition.js +0 -2
- package/lib/es/src/utils/noop.js +0 -1
- package/lib/es/src/utils/string.js +0 -3
- package/package.json +4 -5
package/lib/cjs/src/Animation.js
CHANGED
|
@@ -10,16 +10,13 @@ var _semiAnimation = require("@douyinfe/semi-animation");
|
|
|
10
10
|
var _noop = _interopRequireDefault(require("./utils/noop"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
13
|
-
/* eslint-disable react/destructuring-assignment */
|
|
14
13
|
|
|
15
14
|
class Animation extends _react.PureComponent {
|
|
16
15
|
constructor() {
|
|
17
16
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
17
|
super(props);
|
|
19
18
|
this.initAnimation = props => {
|
|
20
|
-
// eslint-disable-next-line eqeqeq
|
|
21
19
|
props = props == null ? this.props : props;
|
|
22
|
-
// eslint-disable-next-line prefer-const
|
|
23
20
|
let {
|
|
24
21
|
from,
|
|
25
22
|
to,
|
package/lib/cjs/src/KeyFrames.js
CHANGED
|
@@ -11,8 +11,6 @@ var _Animation = _interopRequireDefault(require("./Animation"));
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
/* eslint-disable react/destructuring-assignment */
|
|
15
|
-
|
|
16
14
|
class KeyFrames extends _react.Component {
|
|
17
15
|
constructor() {
|
|
18
16
|
var _this;
|
|
@@ -11,12 +11,6 @@ var _semiAnimationStyled = require("@douyinfe/semi-animation-styled");
|
|
|
11
11
|
var _noop = _interopRequireDefault(require("./utils/noop"));
|
|
12
12
|
var _invokeFns = _interopRequireDefault(require("./utils/invokeFns"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
/* eslint-disable react/destructuring-assignment */
|
|
15
|
-
/* eslint-disable prefer-const */
|
|
16
|
-
/* eslint-disable eqeqeq */
|
|
17
|
-
/* eslint-disable import/no-duplicates */
|
|
18
|
-
/* eslint-disable no-duplicate-imports */
|
|
19
|
-
|
|
20
14
|
const types = Object.values(_semiAnimationStyled.types).reduce((arr, cur) => [...arr, ...cur], []);
|
|
21
15
|
class StyledAnimation extends _react.PureComponent {
|
|
22
16
|
constructor() {
|
|
@@ -19,8 +19,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
/* eslint-disable eqeqeq */
|
|
23
|
-
|
|
24
22
|
class StyledTransition extends _react.Component {
|
|
25
23
|
constructor() {
|
|
26
24
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -19,8 +19,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
/* eslint-disable eqeqeq */
|
|
23
|
-
|
|
24
22
|
class Transition extends _react.Component {
|
|
25
23
|
constructor() {
|
|
26
24
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -94,7 +92,6 @@ class Transition extends _react.Component {
|
|
|
94
92
|
} = _a,
|
|
95
93
|
restProps = __rest(_a, ["from", "enter", "leave"]);
|
|
96
94
|
let children;
|
|
97
|
-
// eslint-disable-next-line prefer-const
|
|
98
95
|
let {
|
|
99
96
|
currentChildren,
|
|
100
97
|
lastChildren,
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.lowerCase = lowerCase;
|
|
7
7
|
exports.upperCase = upperCase;
|
|
8
|
-
/* eslint-disable eqeqeq */
|
|
9
8
|
function upperCase(str, pos) {
|
|
10
9
|
if (typeof str === 'string') {
|
|
11
10
|
return str
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
11
|
// @ts-ignore
|
|
14
12
|
.split().reduce((total, cur, index) => pos == null || pos === index ? total + cur.toUpperCase() : total + cur, '');
|
|
15
13
|
}
|
|
@@ -18,7 +16,6 @@ function upperCase(str, pos) {
|
|
|
18
16
|
function lowerCase(str, pos) {
|
|
19
17
|
if (typeof str === 'string') {
|
|
20
18
|
return str
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
19
|
// @ts-ignore
|
|
23
20
|
.split().reduce((total, cur, index) => pos == null || pos === index ? total + cur.toLowerCase() : total + cur, '');
|
|
24
21
|
}
|
package/lib/es/src/Animation.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
2
|
-
/* eslint-disable react/destructuring-assignment */
|
|
3
2
|
import { PureComponent, isValidElement } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import { Animation as SemiAnimation, events } from '@douyinfe/semi-animation';
|
|
@@ -9,9 +8,7 @@ export default class Animation extends PureComponent {
|
|
|
9
8
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10
9
|
super(props);
|
|
11
10
|
this.initAnimation = props => {
|
|
12
|
-
// eslint-disable-next-line eqeqeq
|
|
13
11
|
props = props == null ? this.props : props;
|
|
14
|
-
// eslint-disable-next-line prefer-const
|
|
15
12
|
let {
|
|
16
13
|
from,
|
|
17
14
|
to,
|
package/lib/es/src/KeyFrames.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/* eslint-disable react/destructuring-assignment */
|
|
2
|
-
/* eslint-disable prefer-const */
|
|
3
|
-
/* eslint-disable eqeqeq */
|
|
4
|
-
/* eslint-disable import/no-duplicates */
|
|
5
|
-
/* eslint-disable no-duplicate-imports */
|
|
6
1
|
import { PureComponent, isValidElement, cloneElement, Children } from 'react';
|
|
7
2
|
import PropTypes from 'prop-types';
|
|
8
3
|
import classnames from 'classnames';
|
package/lib/es/src/Transition.js
CHANGED
|
@@ -6,7 +6,6 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
6
6
|
}
|
|
7
7
|
return t;
|
|
8
8
|
};
|
|
9
|
-
/* eslint-disable eqeqeq */
|
|
10
9
|
import Animation from './Animation';
|
|
11
10
|
import PropTypes from 'prop-types';
|
|
12
11
|
import React, { Component, isValidElement } from 'react';
|
|
@@ -84,7 +83,6 @@ export default class Transition extends Component {
|
|
|
84
83
|
} = _a,
|
|
85
84
|
restProps = __rest(_a, ["from", "enter", "leave"]);
|
|
86
85
|
let children;
|
|
87
|
-
// eslint-disable-next-line prefer-const
|
|
88
86
|
let {
|
|
89
87
|
currentChildren,
|
|
90
88
|
lastChildren,
|
package/lib/es/src/utils/noop.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/* eslint-disable eqeqeq */
|
|
2
1
|
export function upperCase(str, pos) {
|
|
3
2
|
if (typeof str === 'string') {
|
|
4
3
|
return str
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
4
|
// @ts-ignore
|
|
7
5
|
.split().reduce((total, cur, index) => pos == null || pos === index ? total + cur.toUpperCase() : total + cur, '');
|
|
8
6
|
}
|
|
@@ -11,7 +9,6 @@ export function upperCase(str, pos) {
|
|
|
11
9
|
export function lowerCase(str, pos) {
|
|
12
10
|
if (typeof str === 'string') {
|
|
13
11
|
return str
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
12
|
// @ts-ignore
|
|
16
13
|
.split().reduce((total, cur, index) => pos == null || pos === index ? total + cur.toLowerCase() : total + cur, '');
|
|
17
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-animation-react",
|
|
3
|
-
"version": "2.40.0
|
|
3
|
+
"version": "2.40.0",
|
|
4
4
|
"description": "motion library for semi-ui-react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"motion",
|
|
@@ -25,14 +25,13 @@
|
|
|
25
25
|
"prepublishOnly": "npm run build:lib"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@douyinfe/semi-animation": "2.40.0
|
|
29
|
-
"@douyinfe/semi-animation-styled": "2.40.0
|
|
28
|
+
"@douyinfe/semi-animation": "2.40.0",
|
|
29
|
+
"@douyinfe/semi-animation-styled": "2.40.0",
|
|
30
30
|
"classnames": "^2.2.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/preset-env": "^7.15.8",
|
|
34
34
|
"@babel/preset-react": "^7.14.5",
|
|
35
|
-
"@storybook/addon-knobs": "^6.3.1",
|
|
36
35
|
"@vx/gradient": "0.0.199",
|
|
37
36
|
"del": "^6.0.0",
|
|
38
37
|
"flubber": "^0.4.2",
|
|
@@ -43,5 +42,5 @@
|
|
|
43
42
|
"prop-types": "^15.7.2",
|
|
44
43
|
"react-storybook-addon-props-combinations": "^1.1.0"
|
|
45
44
|
},
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d73b400df9309f0c545a82da4534ce5a7a311a92"
|
|
47
46
|
}
|