This commit is contained in:
Aevann1 2021-12-13 22:28:32 +00:00
parent 628618df89
commit e031240dff
3749 changed files with 1120848 additions and 1 deletions

15
node_modules/css-unit-converter/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,15 @@
# 1.1.2 - 2020-05-16
* Add TypeScript definitions (thanks to @seaneking)
# 1.1.1 - 2017-01-25
* Change decimal rounding technique
# 1.1 - 2017-01-24
* Add optional precision argument
# 1.0 - 2015-05-18
* Initial release

20
node_modules/css-unit-converter/LICENSE generated vendored Normal file
View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2015 Andy Jansson <andyjansson@users.noreply.github.com>
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.

26
node_modules/css-unit-converter/README.md generated vendored Normal file
View file

@ -0,0 +1,26 @@
# css-unit-converter [![Build Status][ci-img]][ci]
Converts CSS values from one unit to another
[PostCSS]: https://github.com/postcss/css-unit-converter
[ci-img]: https://travis-ci.org/andyjansson/css-unit-converter.svg
[ci]: https://travis-ci.org/andyjansson/css-unit-converter
## Installation
```js
npm install css-unit-converter
```
## Usage
```js
var convert = require('css-unit-converter');
//convert 1 inch to pc
convert(1, 'in', 'pc'); // 6
//convert 10px to cm with a maximum of 10 decimals
convert(10, 'px', 'cm', 10); // 0.2645833333
```

10
node_modules/css-unit-converter/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,10 @@
declare module 'css-unit-converter' {
export type CSSUnits = 'px' | 'cm' | 'mm' | 'in' | 'pt' | 'pc' | 'deg' | 'grad' | 'rad' | 'turn' | 's' | 'ms' | 'Hz' | 'kHz' | 'dpi' | 'dpcm' | 'dppx';
export default function (
value: number,
sourceUnit: CSSUnits,
targetUnit: CSSUnits,
precision?: number
): number;
}

127
node_modules/css-unit-converter/index.js generated vendored Normal file
View file

@ -0,0 +1,127 @@
var conversions = {
// length
'px': {
'px': 1,
'cm': 96.0/2.54,
'mm': 96.0/25.4,
'in': 96,
'pt': 96.0/72.0,
'pc': 16
},
'cm': {
'px': 2.54/96.0,
'cm': 1,
'mm': 0.1,
'in': 2.54,
'pt': 2.54/72.0,
'pc': 2.54/6.0
},
'mm': {
'px': 25.4/96.0,
'cm': 10,
'mm': 1,
'in': 25.4,
'pt': 25.4/72.0,
'pc': 25.4/6.0
},
'in': {
'px': 1.0/96.0,
'cm': 1.0/2.54,
'mm': 1.0/25.4,
'in': 1,
'pt': 1.0/72.0,
'pc': 1.0/6.0
},
'pt': {
'px': 0.75,
'cm': 72.0/2.54,
'mm': 72.0/25.4,
'in': 72,
'pt': 1,
'pc': 12
},
'pc': {
'px': 6.0/96.0,
'cm': 6.0/2.54,
'mm': 6.0/25.4,
'in': 6,
'pt': 6.0/72.0,
'pc': 1
},
// angle
'deg': {
'deg': 1,
'grad': 0.9,
'rad': 180/Math.PI,
'turn': 360
},
'grad': {
'deg': 400/360,
'grad': 1,
'rad': 200/Math.PI,
'turn': 400
},
'rad': {
'deg': Math.PI/180,
'grad': Math.PI/200,
'rad': 1,
'turn': Math.PI*2
},
'turn': {
'deg': 1/360,
'grad': 1/400,
'rad': 0.5/Math.PI,
'turn': 1
},
// time
's': {
's': 1,
'ms': 1/1000
},
'ms': {
's': 1000,
'ms': 1
},
// frequency
'Hz': {
'Hz': 1,
'kHz': 1000
},
'kHz': {
'Hz': 1/1000,
'kHz': 1
},
// resolution
'dpi': {
'dpi': 1,
'dpcm': 1.0/2.54,
'dppx': 1/96
},
'dpcm': {
'dpi': 2.54,
'dpcm': 1,
'dppx': 2.54/96.0
},
'dppx': {
'dpi': 96,
'dpcm': 96.0/2.54,
'dppx': 1
}
};
module.exports = function (value, sourceUnit, targetUnit, precision) {
if (!conversions.hasOwnProperty(targetUnit))
throw new Error("Cannot convert to " + targetUnit);
if (!conversions[targetUnit].hasOwnProperty(sourceUnit))
throw new Error("Cannot convert from " + sourceUnit + " to " + targetUnit);
var converted = conversions[targetUnit][sourceUnit] * value;
if (precision !== false) {
precision = Math.pow(10, parseInt(precision) || 5);
return Math.round(converted * precision) / precision;
}
return converted;
};

59
node_modules/css-unit-converter/package.json generated vendored Normal file
View file

@ -0,0 +1,59 @@
{
"_args": [
[
"css-unit-converter@1.1.2",
"/d"
]
],
"_from": "css-unit-converter@1.1.2",
"_id": "css-unit-converter@1.1.2",
"_inBundle": false,
"_integrity": "sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==",
"_location": "/css-unit-converter",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "css-unit-converter@1.1.2",
"name": "css-unit-converter",
"escapedName": "css-unit-converter",
"rawSpec": "1.1.2",
"saveSpec": null,
"fetchSpec": "1.1.2"
},
"_requiredBy": [
"/reduce-css-calc"
],
"_resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz",
"_spec": "1.1.2",
"_where": "/d",
"author": {
"name": "Andy Jansson"
},
"bugs": {
"url": "https://github.com/andyjansson/css-unit-converter/issues"
},
"description": "Converts CSS values from one unit to another",
"devDependencies": {
"tape": "^4.6.3"
},
"homepage": "https://github.com/andyjansson/css-unit-converter",
"keywords": [
"css",
"value",
"unit",
"converter",
"convert"
],
"license": "MIT",
"main": "index.js",
"name": "css-unit-converter",
"repository": {
"type": "git",
"url": "git+https://github.com/andyjansson/css-unit-converter.git"
},
"scripts": {
"test": "node test/test.js"
},
"version": "1.1.2"
}