flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
4
BACK_BACK/node_modules/postcss-normalize-unicode/CHANGELOG.md
generated
vendored
Executable file
4
BACK_BACK/node_modules/postcss-normalize-unicode/CHANGELOG.md
generated
vendored
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
# 4.0.0-rc.0
|
||||
|
||||
* Initial commit. This module was previously part of other cssnano modules and
|
||||
has been extracted out.
|
||||
22
BACK_BACK/node_modules/postcss-normalize-unicode/LICENSE-MIT
generated
vendored
Executable file
22
BACK_BACK/node_modules/postcss-normalize-unicode/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.
|
||||
46
BACK_BACK/node_modules/postcss-normalize-unicode/README.md
generated
vendored
Executable file
46
BACK_BACK/node_modules/postcss-normalize-unicode/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
# [postcss][postcss]-normalize-unicode
|
||||
|
||||
> Normalize unicode with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-unicode) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-unicode --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
@font-face{
|
||||
font-family: test;
|
||||
unicode-range: u+2b00-2bff
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
@font-face{
|
||||
font-family: test;
|
||||
unicode-range: u+2b??
|
||||
}
|
||||
```
|
||||
|
||||
## 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-unicode/dist/index.js
generated
vendored
Executable file
93
BACK_BACK/node_modules/postcss-normalize-unicode/dist/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _browserslist = require('browserslist');
|
||||
|
||||
var _browserslist2 = _interopRequireDefault(_browserslist);
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const regexLowerCaseUPrefix = /^u(?=\+)/;
|
||||
|
||||
function unicode(range) {
|
||||
const values = range.slice(2).split('-');
|
||||
if (values.length < 2) {
|
||||
return range;
|
||||
}
|
||||
const left = values[0].split('');
|
||||
const right = values[1].split('');
|
||||
|
||||
if (left.length !== right.length) {
|
||||
return range;
|
||||
}
|
||||
|
||||
let questionCounter = 0;
|
||||
|
||||
const merged = left.reduce((group, value, index) => {
|
||||
if (group === false) {
|
||||
return false;
|
||||
}
|
||||
if (value === right[index] && !questionCounter) {
|
||||
return group + value;
|
||||
}
|
||||
if (value === '0' && right[index] === 'f') {
|
||||
questionCounter++;
|
||||
return group + '?';
|
||||
}
|
||||
return false;
|
||||
}, 'u+');
|
||||
|
||||
/*
|
||||
* The maximum number of wildcard characters (?) for ranges is 5.
|
||||
*/
|
||||
|
||||
if (merged && questionCounter < 6) {
|
||||
return merged;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
/*
|
||||
* IE and Edge before 16 version ignore the unicode-range if the 'U' is lowercase
|
||||
*
|
||||
* https://caniuse.com/#search=unicode-range
|
||||
*/
|
||||
|
||||
function hasLowerCaseUPrefixBug(browser) {
|
||||
return ~(0, _browserslist2.default)('ie <=11, edge <= 15').indexOf(browser);
|
||||
}
|
||||
|
||||
function transform(legacy = false, node) {
|
||||
node.value = (0, _postcssValueParser2.default)(node.value).walk(child => {
|
||||
if (child.type === 'word') {
|
||||
const transformed = unicode(child.value.toLowerCase());
|
||||
child.value = legacy ? transformed.replace(regexLowerCaseUPrefix, 'U') : transformed;
|
||||
}
|
||||
return false;
|
||||
}).toString();
|
||||
}
|
||||
|
||||
exports.default = _postcss2.default.plugin('postcss-normalize-unicode', () => {
|
||||
return (css, result) => {
|
||||
const resultOpts = result.opts || {};
|
||||
const browsers = (0, _browserslist2.default)(null, {
|
||||
stats: resultOpts.stats,
|
||||
path: __dirname,
|
||||
env: resultOpts.env
|
||||
});
|
||||
css.walkDecls(/^unicode-range$/i, transform.bind(null, browsers.some(hasLowerCaseUPrefixBug)));
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
41
BACK_BACK/node_modules/postcss-normalize-unicode/package.json
generated
vendored
Executable file
41
BACK_BACK/node_modules/postcss-normalize-unicode/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "postcss-normalize-unicode",
|
||||
"version": "4.0.1",
|
||||
"description": "Normalize unicode-range descriptors, and can convert to wildcard ranges.",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
"LICENSE-MIT"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"postcss",
|
||||
"postcss-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.0.0",
|
||||
"postcss": "^7.0.0",
|
||||
"postcss-value-parser": "^3.0.0"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue