This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

22
node_modules/cssnano-preset-default/LICENSE-MIT generated vendored Normal file
View 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.

295
node_modules/cssnano-preset-default/README.md generated vendored Normal file
View File

@ -0,0 +1,295 @@
# cssnano-preset-default
> Safe defaults for cssnano which require minimal configuration.
## Table of Contents
- [Overview](#overview)
- [Usage](#usage)
- [Install](#install)
- [Configuration](#configuration)
- [Plugins](#plugins)
- [css-declaration-sorter (external)](#css-declaration-sorter-external)
- [cssnano-utils](#cssnano-utils)
- [postcss-calc (external)](#postcss-calc-external)
- [postcss-colormin](#postcss-colormin)
- [postcss-convert-values](#postcss-convert-values)
- [postcss-discard-comments](#postcss-discard-comments)
- [postcss-discard-duplicates](#postcss-discard-duplicates)
- [postcss-discard-empty](#postcss-discard-empty)
- [postcss-discard-overridden](#postcss-discard-overridden)
- [postcss-merge-longhand](#postcss-merge-longhand)
- [postcss-merge-rules](#postcss-merge-rules)
- [postcss-minify-font-values](#postcss-minify-font-values)
- [postcss-minify-gradients](#postcss-minify-gradients)
- [postcss-minify-params](#postcss-minify-params)
- [postcss-minify-selectors](#postcss-minify-selectors)
- [postcss-normalize-charset](#postcss-normalize-charset)
- [postcss-normalize-display-values](#postcss-normalize-display-values)
- [postcss-normalize-positions](#postcss-normalize-positions)
- [postcss-normalize-repeat-style](#postcss-normalize-repeat-style)
- [postcss-normalize-string](#postcss-normalize-string)
- [postcss-normalize-timing-functions](#postcss-normalize-timing-functions)
- [postcss-normalize-unicode](#postcss-normalize-unicode)
- [postcss-normalize-url](#postcss-normalize-url)
- [postcss-normalize-whitespace](#postcss-normalize-whitespace)
- [postcss-ordered-values](#postcss-ordered-values)
- [postcss-reduce-initial](#postcss-reduce-initial)
- [postcss-reduce-transforms](#postcss-reduce-transforms)
- [postcss-svgo](#postcss-svgo)
- [postcss-unique-selectors](#postcss-unique-selectors)
- [Contributors](#contributors)
- [License](#license)
## Overview
This default preset for cssnano only includes transforms that make no
assumptions about your CSS other than what is passed in. In previous
iterations of cssnano, assumptions were made about your CSS which caused
output to look different in certain use cases, but not others. These
transforms have been moved from the defaults to other presets, to make
this preset require only minimal configuration.
## Usage
### Install
Note that this preset comes bundled with cssnano _by default_, so you don't need to install it separately.
### Configuration
If you would like to use the default configuration, then you don't need to add anything to your `package.json`.
But should you wish to customise this, you can pass an array with the second parameter as the options object to use. For example, to remove all comments:
```diff
{
"name": "awesome-application",
+ "cssnano": {
+ "preset": [
+ "default",
+ {"discardComments": {"removeAll": true}}
+ ]
+ }
}
```
Depending on your usage, the JSON configuration might not work for you, such as in cases where you would like to use options with customisable function parameters. For this use case, we recommend a `cssnano.config.js` at the same location as your `package.json`. You can then load a preset and export it with your custom parameters:
```js
const defaultPreset = require('cssnano-preset-default');
module.exports = defaultPreset({
discardComments: {
remove: (comment) => comment[0] === '@',
},
});
```
Note that you may wish to publish your own preset to npm for reusability, should it differ a lot from this one. This is highly encouraged!
## Plugins
### [`css-declaration-sorter`](https://github.com/Siilwyn/css-declaration-sorter) (external)
> Sorts CSS declarations fast and automatically in a certain order.
This plugin is loaded with the following configuration:
```js
{
keepOverrides: true
}
```
### [`cssnano-utils`](https://github.com/cssnano/cssnano/tree/master/packages/cssnano-utils)
> Utility methods used by cssnano
### [`postcss-calc`](https://github.com/postcss/postcss-calc) (external)
> PostCSS plugin to reduce calc()
This plugin is loaded with its default configuration.
### [`postcss-colormin`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-colormin)
> Minify colors in your CSS files with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-convert-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-convert-values)
> Convert values with PostCSS (e.g. ms -> s)
This plugin is loaded with the following configuration:
```js
{
length: false;
}
```
### [`postcss-discard-comments`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-comments)
> Discard comments in your CSS files with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-discard-duplicates`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-duplicates)
> Discard duplicate rules in your CSS files with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-discard-empty`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-empty)
> Discard empty rules and values with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-discard-overridden`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-overridden)
> PostCSS plugin to discard overridden @keyframes or @counter-style.
This plugin is loaded with its default configuration.
### [`postcss-merge-longhand`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-longhand)
> Merge longhand properties into shorthand with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-merge-rules`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-rules)
> Merge CSS rules with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-minify-font-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-font-values)
> Minify font declarations with PostCSS
This plugin is loaded with its default configuration.
### [`postcss-minify-gradients`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-gradients)
> Minify gradient parameters with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-minify-params`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-params)
> Minify at-rule params with PostCSS
This plugin is loaded with its default configuration.
### [`postcss-minify-selectors`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-selectors)
> Minify selectors with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-normalize-charset`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-charset)
> Add necessary or remove extra charset with PostCSS
This plugin is loaded with the following configuration:
```js
{
add: false;
}
```
### [`postcss-normalize-display-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-display-values)
> Normalize multiple value display syntaxes into single values.
This plugin is loaded with its default configuration.
### [`postcss-normalize-positions`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-positions)
> Normalize keyword values for position into length values.
This plugin is loaded with its default configuration.
### [`postcss-normalize-repeat-style`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-repeat-style)
> Convert two value syntax for repeat-style into one value.
This plugin is loaded with its default configuration.
### [`postcss-normalize-string`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-string)
> Normalize wrapping quotes for CSS string literals.
This plugin is loaded with its default configuration.
### [`postcss-normalize-timing-functions`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-timing-functions)
> Normalize CSS animation/transition timing functions.
This plugin is loaded with its default configuration.
### [`postcss-normalize-unicode`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-unicode)
> Normalize unicode-range descriptors, and can convert to wildcard ranges.
This plugin is loaded with its default configuration.
### [`postcss-normalize-url`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-url)
> Normalize URLs with PostCSS
This plugin is loaded with its default configuration.
### [`postcss-normalize-whitespace`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-whitespace)
> Trim whitespace inside and around CSS rules & declarations.
This plugin is loaded with its default configuration.
### [`postcss-ordered-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-ordered-values)
> Ensure values are ordered consistently in your CSS.
This plugin is loaded with its default configuration.
### [`postcss-reduce-initial`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-reduce-initial)
> Reduce initial definitions to the actual initial value, where possible.
This plugin is loaded with its default configuration.
### [`postcss-reduce-transforms`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-reduce-transforms)
> Reduce transform functions with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-svgo`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-svgo)
> Optimise inline SVG with PostCSS.
This plugin is loaded with its default configuration.
### [`postcss-unique-selectors`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-unique-selectors)
> Ensure CSS selectors are unique.
This plugin is loaded with its default configuration.
## Contributors
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
## License
MIT © [Ben Briggs](http://beneb.info)

91
node_modules/cssnano-preset-default/package.json generated vendored Normal file
View File

@ -0,0 +1,91 @@
{
"_from": "cssnano-preset-default@^5.2.14",
"_id": "cssnano-preset-default@5.2.14",
"_inBundle": false,
"_integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==",
"_location": "/cssnano-preset-default",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "cssnano-preset-default@^5.2.14",
"name": "cssnano-preset-default",
"escapedName": "cssnano-preset-default",
"rawSpec": "^5.2.14",
"saveSpec": null,
"fetchSpec": "^5.2.14"
},
"_requiredBy": [
"/cssnano"
],
"_resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz",
"_shasum": "309def4f7b7e16d71ab2438052093330d9ab45d8",
"_spec": "cssnano-preset-default@^5.2.14",
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\cssnano",
"author": {
"name": "Ben Briggs",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"
},
"bugs": {
"url": "https://github.com/cssnano/cssnano/issues"
},
"bundleDependencies": false,
"dependencies": {
"css-declaration-sorter": "^6.3.1",
"cssnano-utils": "^3.1.0",
"postcss-calc": "^8.2.3",
"postcss-colormin": "^5.3.1",
"postcss-convert-values": "^5.1.3",
"postcss-discard-comments": "^5.1.2",
"postcss-discard-duplicates": "^5.1.0",
"postcss-discard-empty": "^5.1.1",
"postcss-discard-overridden": "^5.1.0",
"postcss-merge-longhand": "^5.1.7",
"postcss-merge-rules": "^5.1.4",
"postcss-minify-font-values": "^5.1.0",
"postcss-minify-gradients": "^5.1.1",
"postcss-minify-params": "^5.1.4",
"postcss-minify-selectors": "^5.2.1",
"postcss-normalize-charset": "^5.1.0",
"postcss-normalize-display-values": "^5.1.0",
"postcss-normalize-positions": "^5.1.1",
"postcss-normalize-repeat-style": "^5.1.1",
"postcss-normalize-string": "^5.1.0",
"postcss-normalize-timing-functions": "^5.1.0",
"postcss-normalize-unicode": "^5.1.1",
"postcss-normalize-url": "^5.1.0",
"postcss-normalize-whitespace": "^5.1.1",
"postcss-ordered-values": "^5.1.3",
"postcss-reduce-initial": "^5.1.2",
"postcss-reduce-transforms": "^5.1.0",
"postcss-svgo": "^5.1.0",
"postcss-unique-selectors": "^5.1.1"
},
"deprecated": false,
"description": "Safe defaults for cssnano which require minimal configuration.",
"devDependencies": {
"postcss": "^8.2.15"
},
"engines": {
"node": "^10 || ^12 || >=14.0"
},
"files": [
"LICENSE-MIT",
"src",
"types"
],
"homepage": "https://github.com/cssnano/cssnano",
"license": "MIT",
"main": "src/index.js",
"name": "cssnano-preset-default",
"peerDependencies": {
"postcss": "^8.2.15"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cssnano/cssnano.git"
},
"types": "types/index.d.ts",
"version": "5.2.14"
}

131
node_modules/cssnano-preset-default/src/index.js generated vendored Normal file
View File

@ -0,0 +1,131 @@
'use strict';
/**
* @author Ben Briggs
* @license MIT
* @module cssnano:preset:default
* @overview
*
* This default preset for cssnano only includes transforms that make no
* assumptions about your CSS other than what is passed in. In previous
* iterations of cssnano, assumptions were made about your CSS which caused
* output to look different in certain use cases, but not others. These
* transforms have been moved from the defaults to other presets, to make
* this preset require only minimal configuration.
*/
const cssDeclarationSorter = require('css-declaration-sorter');
const postcssDiscardComments = require('postcss-discard-comments');
const postcssReduceInitial = require('postcss-reduce-initial');
const postcssMinifyGradients = require('postcss-minify-gradients');
const postcssSvgo = require('postcss-svgo');
const postcssReduceTransforms = require('postcss-reduce-transforms');
const postcssConvertValues = require('postcss-convert-values');
const postcssCalc = require('postcss-calc');
const postcssColormin = require('postcss-colormin');
const postcssOrderedValues = require('postcss-ordered-values');
const postcssMinifySelectors = require('postcss-minify-selectors');
const postcssMinifyParams = require('postcss-minify-params');
const postcssNormalizeCharset = require('postcss-normalize-charset');
const postcssMinifyFontValues = require('postcss-minify-font-values');
const postcssNormalizeUrl = require('postcss-normalize-url');
const postcssMergeLonghand = require('postcss-merge-longhand');
const postcssDiscardDuplicates = require('postcss-discard-duplicates');
const postcssDiscardOverridden = require('postcss-discard-overridden');
const postcssNormalizeRepeatStyle = require('postcss-normalize-repeat-style');
const postcssMergeRules = require('postcss-merge-rules');
const postcssDiscardEmpty = require('postcss-discard-empty');
const postcssUniqueSelectors = require('postcss-unique-selectors');
const postcssNormalizeString = require('postcss-normalize-string');
const postcssNormalizePositions = require('postcss-normalize-positions');
const postcssNormalizeWhitespace = require('postcss-normalize-whitespace');
const postcssNormalizeUnicode = require('postcss-normalize-unicode');
const postcssNormalizeDisplayValues = require('postcss-normalize-display-values');
const postcssNormalizeTimingFunctions = require('postcss-normalize-timing-functions');
const { rawCache } = require('cssnano-utils');
/** @typedef {{
discardComments?: false | import('postcss-discard-comments').Options & { exclude?: true},
reduceInitial?: false | { exclude?: true}
minifyGradients?: false | { exclude?: true}
svgo?: false | import('postcss-svgo').Options & { exclude?: true},
reduceTransforms?: false | { exclude?: true}
convertValues?: false | import('postcss-convert-values').Options & { exclude?: true},
calc?: false | import('postcss-calc').PostCssCalcOptions & { exclude?: true},
colormin?: false | Record<string, any> & { exclude?: true},
orderedValues?: false | { exclude?: true},
minifySelectors?: false | { exclude?: true},
minifyParams?: false | { exclude?: true},
normalizeCharset?: false | import('postcss-normalize-charset').Options & { exclude?: true},
minifyFontValues?: false | import('postcss-minify-font-values').Options & { exclude?: true},
normalizeUrl?: false | import('postcss-normalize-url').Options & { exclude?: true},
mergeLonghand?: false | { exclude?: true},
discardDuplicates?: false | { exclude?: true},
discardOverridden?: false | { exclude?: true},
normalizeRepeatStyle?: false | { exclude?: true},
mergeRules?: false | { exclude?: true},
discardEmpty?: false | { exclude?: true},
uniqueSelectors?: false | { exclude?: true},
normalizeString?: false | import('postcss-normalize-string').Options & { exclude?: true},
normalizePositions?: false | { exclude?: true},
normalizeWhitespace?: false| { exclude?: true},
normalizeUnicode?: false | { exclude?: true},
normalizeDisplayValues?: false | { exclude?: true},
normalizeTimingFunctions?: false | { exclude?: true},
rawCache?: false | { exclude?: true}}} Options */
const defaultOpts = {
convertValues: {
length: false,
},
normalizeCharset: {
add: false,
},
cssDeclarationSorter: {
keepOverrides: true,
},
};
/**
* @param {Options} opts
* @return {{plugins: [import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][]}}
*/
function defaultPreset(opts = {}) {
const options = Object.assign({}, defaultOpts, opts);
/** @type {[import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][]} **/
const plugins = [
[postcssDiscardComments, options.discardComments],
[postcssMinifyGradients, options.minifyGradients],
[postcssReduceInitial, options.reduceInitial],
[postcssSvgo, options.svgo],
[postcssNormalizeDisplayValues, options.normalizeDisplayValues],
[postcssReduceTransforms, options.reduceTransforms],
[postcssColormin, options.colormin],
[postcssNormalizeTimingFunctions, options.normalizeTimingFunctions],
[postcssCalc, options.calc],
[postcssConvertValues, options.convertValues],
[postcssOrderedValues, options.orderedValues],
[postcssMinifySelectors, options.minifySelectors],
[postcssMinifyParams, options.minifyParams],
[postcssNormalizeCharset, options.normalizeCharset],
[postcssDiscardOverridden, options.discardOverridden],
[postcssNormalizeString, options.normalizeString],
[postcssNormalizeUnicode, options.normalizeUnicode],
[postcssMinifyFontValues, options.minifyFontValues],
[postcssNormalizeUrl, options.normalizeUrl],
[postcssNormalizeRepeatStyle, options.normalizeRepeatStyle],
[postcssNormalizePositions, options.normalizePositions],
[postcssNormalizeWhitespace, options.normalizeWhitespace],
[postcssMergeLonghand, options.mergeLonghand],
[postcssDiscardDuplicates, options.discardDuplicates],
[postcssMergeRules, options.mergeRules],
[postcssDiscardEmpty, options.discardEmpty],
[postcssUniqueSelectors, options.uniqueSelectors],
[cssDeclarationSorter, options.cssDeclarationSorter],
[rawCache, options.rawCache],
];
return { plugins };
}
module.exports = defaultPreset;

98
node_modules/cssnano-preset-default/types/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,98 @@
export = defaultPreset;
/**
* @param {Options} opts
* @return {{plugins: [import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][]}}
*/
declare function defaultPreset(opts?: Options): {
plugins: [import('postcss').PluginCreator<any>, boolean | Record<string, any> | undefined][];
};
declare namespace defaultPreset {
export { Options };
}
type Options = {
discardComments?: false | import('postcss-discard-comments').Options & {
exclude?: true;
};
reduceInitial?: false | {
exclude?: true;
};
minifyGradients?: false | {
exclude?: true;
};
svgo?: false | import('postcss-svgo').Options & {
exclude?: true;
};
reduceTransforms?: false | {
exclude?: true;
};
convertValues?: false | import('postcss-convert-values').Options & {
exclude?: true;
};
calc?: false | import('postcss-calc').PostCssCalcOptions & {
exclude?: true;
};
colormin?: false | (Record<string, any> & {
exclude?: true;
});
orderedValues?: false | {
exclude?: true;
};
minifySelectors?: false | {
exclude?: true;
};
minifyParams?: false | {
exclude?: true;
};
normalizeCharset?: false | import('postcss-normalize-charset').Options & {
exclude?: true;
};
minifyFontValues?: false | import('postcss-minify-font-values').Options & {
exclude?: true;
};
normalizeUrl?: false | import('postcss-normalize-url').Options & {
exclude?: true;
};
mergeLonghand?: false | {
exclude?: true;
};
discardDuplicates?: false | {
exclude?: true;
};
discardOverridden?: false | {
exclude?: true;
};
normalizeRepeatStyle?: false | {
exclude?: true;
};
mergeRules?: false | {
exclude?: true;
};
discardEmpty?: false | {
exclude?: true;
};
uniqueSelectors?: false | {
exclude?: true;
};
normalizeString?: false | import('postcss-normalize-string').Options & {
exclude?: true;
};
normalizePositions?: false | {
exclude?: true;
};
normalizeWhitespace?: false | {
exclude?: true;
};
normalizeUnicode?: false | {
exclude?: true;
};
normalizeDisplayValues?: false | {
exclude?: true;
};
normalizeTimingFunctions?: false | {
exclude?: true;
};
rawCache?: false | {
exclude?: true;
};
};
import { rawCache } from "cssnano-utils";