flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
22
BACK_BACK/node_modules/postcss-normalize-timing-functions/LICENSE-MIT
generated
vendored
Executable file
22
BACK_BACK/node_modules/postcss-normalize-timing-functions/LICENSE-MIT
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
44
BACK_BACK/node_modules/postcss-normalize-timing-functions/README.md
generated
vendored
Executable file
44
BACK_BACK/node_modules/postcss-normalize-timing-functions/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
# [postcss][postcss]-normalize-timing-functions
|
||||
|
||||
> Normalize timing functions with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-timing-functions) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-timing-functions --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
div {
|
||||
animate: fade 3s cubic-bezier(0.42, 0, 1, 1)
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
div {
|
||||
animate: fade 3s ease-in
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
[postcss]: https://github.com/postcss/postcss
|
||||
93
BACK_BACK/node_modules/postcss-normalize-timing-functions/dist/index.js
generated
vendored
Executable file
93
BACK_BACK/node_modules/postcss-normalize-timing-functions/dist/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _cssnanoUtilGetMatch = require('cssnano-util-get-match');
|
||||
|
||||
var _cssnanoUtilGetMatch2 = _interopRequireDefault(_cssnanoUtilGetMatch);
|
||||
|
||||
var _map = require('./lib/map');
|
||||
|
||||
var _map2 = _interopRequireDefault(_map);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const getMatch = (0, _cssnanoUtilGetMatch2.default)(_map2.default);
|
||||
const getValue = node => parseFloat(node.value);
|
||||
|
||||
function evenValues(list, index) {
|
||||
return index % 2 === 0;
|
||||
}
|
||||
|
||||
function reduce(node) {
|
||||
if (node.type !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const lowerCasedValue = node.value.toLowerCase();
|
||||
|
||||
if (lowerCasedValue === 'steps') {
|
||||
// Don't bother checking the step-end case as it has the same length
|
||||
// as steps(1)
|
||||
if (getValue(node.nodes[0]) === 1 && node.nodes[2] && node.nodes[2].value.toLowerCase() === 'start') {
|
||||
node.type = 'word';
|
||||
node.value = 'step-start';
|
||||
|
||||
delete node.nodes;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// The end case is actually the browser default, so it isn't required.
|
||||
if (node.nodes[2] && node.nodes[2].value.toLowerCase() === 'end') {
|
||||
node.nodes = [node.nodes[0]];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lowerCasedValue === 'cubic-bezier') {
|
||||
const match = getMatch(node.nodes.filter(evenValues).map(getValue));
|
||||
|
||||
if (match) {
|
||||
node.type = 'word';
|
||||
node.value = match;
|
||||
|
||||
delete node.nodes;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('postcss-normalize-timing-functions', () => {
|
||||
return css => {
|
||||
const cache = {};
|
||||
|
||||
css.walkDecls(/(animation|transition)(-timing-function|$)/i, decl => {
|
||||
const value = decl.value;
|
||||
|
||||
if (cache[value]) {
|
||||
decl.value = cache[value];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const result = (0, _postcssValueParser2.default)(value).walk(reduce).toString();
|
||||
|
||||
decl.value = result;
|
||||
cache[value] = result;
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
7
BACK_BACK/node_modules/postcss-normalize-timing-functions/dist/lib/map.js
generated
vendored
Executable file
7
BACK_BACK/node_modules/postcss-normalize-timing-functions/dist/lib/map.js
generated
vendored
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = [['ease', [0.25, 0.1, 0.25, 1]], ['linear', [0, 0, 1, 1]], ['ease-in', [0.42, 0, 1, 1]], ['ease-out', [0, 0, 0.58, 1]], ['ease-in-out', [0.42, 0, 0.58, 1]]];
|
||||
module.exports = exports['default'];
|
||||
36
BACK_BACK/node_modules/postcss-normalize-timing-functions/package.json
generated
vendored
Executable file
36
BACK_BACK/node_modules/postcss-normalize-timing-functions/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "postcss-normalize-timing-functions",
|
||||
"version": "4.0.2",
|
||||
"description": "Normalize CSS animation/transition timing functions.",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE-MIT",
|
||||
"dist"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cssnano-util-get-match": "^4.0.0",
|
||||
"postcss": "^7.0.0",
|
||||
"postcss-value-parser": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0"
|
||||
},
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue