@douyinfe/semi-animation-react 2.1.1 → 2.1.2
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/index.d.ts +6 -0
- package/lib/cjs/index.js +70 -0
- package/lib/cjs/src/Animation.d.ts +70 -0
- package/lib/cjs/src/Animation.js +228 -0
- package/lib/cjs/src/KeyFrames.d.ts +39 -0
- package/lib/cjs/src/KeyFrames.js +136 -0
- package/lib/cjs/src/StyledAnimation.d.ts +56 -0
- package/lib/cjs/src/StyledAnimation.js +181 -0
- package/lib/cjs/src/StyledTransition.d.ts +49 -0
- package/lib/cjs/src/StyledTransition.js +191 -0
- package/lib/cjs/src/Transition.d.ts +52 -0
- package/lib/cjs/src/Transition.js +208 -0
- package/lib/cjs/src/utils/invokeFns.d.ts +1 -0
- package/lib/cjs/src/utils/invokeFns.js +27 -0
- package/lib/cjs/src/utils/noop.d.ts +1 -0
- package/lib/cjs/src/utils/noop.js +12 -0
- package/lib/cjs/src/utils/object.d.ts +1 -0
- package/lib/cjs/src/utils/object.js +1 -0
- package/lib/cjs/src/utils/string.d.ts +2 -0
- package/lib/cjs/src/utils/string.js +39 -0
- package/lib/es/src/StyledAnimation.d.ts +0 -1
- package/lib/es/src/StyledAnimation.js +0 -2
- package/package.json +5 -5
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.default = invokeFns;
|
|
12
|
+
|
|
13
|
+
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
14
|
+
|
|
15
|
+
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
16
|
+
|
|
17
|
+
function invokeFns(fns) {
|
|
18
|
+
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
19
|
+
|
|
20
|
+
if ((0, _isArray.default)(fns) && fns.length) {
|
|
21
|
+
(0, _forEach.default)(fns).call(fns, fn => {
|
|
22
|
+
if (typeof fn === 'function') {
|
|
23
|
+
fn(...args);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function noop(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
exports.default = noop;
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
12
|
+
function noop() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.lowerCase = lowerCase;
|
|
12
|
+
exports.upperCase = upperCase;
|
|
13
|
+
|
|
14
|
+
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
15
|
+
|
|
16
|
+
/* eslint-disable eqeqeq */
|
|
17
|
+
function upperCase(str, pos) {
|
|
18
|
+
if (typeof str === 'string') {
|
|
19
|
+
var _context;
|
|
20
|
+
|
|
21
|
+
return (0, _reduce.default)(_context = str // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
.split()).call(_context, (total, cur, index) => pos == null || pos === index ? total + cur.toUpperCase() : total + cur, '');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return str;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function lowerCase(str, pos) {
|
|
30
|
+
if (typeof str === 'string') {
|
|
31
|
+
var _context2;
|
|
32
|
+
|
|
33
|
+
return (0, _reduce.default)(_context2 = str // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
.split()).call(_context2, (total, cur, index) => pos == null || pos === index ? total + cur.toLowerCase() : total + cur, '');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return str;
|
|
39
|
+
}
|
|
@@ -19,8 +19,6 @@ import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign"
|
|
|
19
19
|
import { PureComponent, isValidElement, cloneElement, Children } from 'react';
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
21
|
import classnames from 'classnames';
|
|
22
|
-
import '@douyinfe/semi-animation-styled'; // eslint-disable-next-line @typescript-eslint/no-duplicate-imports
|
|
23
|
-
|
|
24
22
|
import { types as styledTypes, loops, delays, speeds } from '@douyinfe/semi-animation-styled';
|
|
25
23
|
import noop from './utils/noop';
|
|
26
24
|
import invokeFns from './utils/invokeFns';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-animation-react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "motion library for semi-ui-react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"motion",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"main": "lib/
|
|
15
|
+
"main": "lib/cjs/index.js",
|
|
16
16
|
"module": "lib/es/index.js",
|
|
17
17
|
"typings": "lib/es/index.d.ts",
|
|
18
18
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
29
|
-
"@douyinfe/semi-animation": "2.1.
|
|
30
|
-
"@douyinfe/semi-animation-styled": "2.1.
|
|
29
|
+
"@douyinfe/semi-animation": "2.1.2",
|
|
30
|
+
"@douyinfe/semi-animation-styled": "2.1.2",
|
|
31
31
|
"classnames": "^2.2.6"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"prop-types": "15.7.2",
|
|
52
52
|
"react-storybook-addon-props-combinations": "^1.1.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "49e7bdabe06525ab4990e5b12b5541e668aa6b11"
|
|
55
55
|
}
|