0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

280
web/node_modules/postcss-preset-env/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,280 @@
# Changes to PostCSS Preset Env
### 6.7.0 (July 8, 2019)
- Fixed the issue of autoprefixer alerting an upcoming change to the API
- Updated `autoprefixer` to 9.6.1 (minor)
- Updated `browserslist` to 4.6.4 (minor)
- Updated `cssdb` to 4.4.0 (minor)
- Updated `caniuse-lite` to 1.0.30000981 (patch)
- Updated `postcss` to 7.0.17 (patch)
- Updated `postcss-color-hex-alpha` to 5.0.3 (patch)
- Updated `postcss-custom-media` to 7.0.8 (patch)
- Updated `postcss-custom-properties` to 8.0.11 (patch)
### 6.6.0 (February 28, 2019)
- Moved browserslist detection from using each input file per process to using
the working directory on intialization, as was implied by the documentation.
If fixing this previously undocumented behavior causes any harm to existing
projects, it can be easily rolled back in a subsequent patch. For the
majority of projects — those with a singular browserslist configuration and
potentially many individually processed CSS files — we should expect reported
build times around 35 seconds to drop to less than 2 seconds.
- Updated `browserslist` to 4.4.2 (minor)
- Updated `autoprefixer` to 9.4.9 (patch)
- Updated `caniuse-lite` to 1.0.30000939 (patch)
- Updated `postcss` to 7.0.14 (patch)
- Updated `postcss-attribute-case-insensitive` to 4.0.1 (patch)
### 6.5.0 (December 12, 2018)
- Added `css-blank-pseudo` polyfill
- Added `css-has-pseudo` polyfill
- Updated `autoprefixer` to 9.4.2 (minor)
- Updated `browserslist` to 4.3.5 (minor)
- Updated `caniuse-lite` to 1.0.30000918 (patch)
- Updated `css-prefers-color-scheme` to 3.1.1 (minor, patch for this project)
- Updated `cssdb` to 4.3.0 (minor)
- Updated `postcss` to 7.0.6 (patch)
### 6.4.0 (November 6, 2018)
- Fixed `exportTo` option to export Custom Media, Custom Properties, and Custom
Selectors all to the same function, object, or file
- Added `css-prefers-color-scheme` 3.0.0 (major, non-breaking for this project)
- Updated `cssdb` to 4.2.0 (minor)
### 6.3.1 (November 5, 2018)
- Updated `caniuse-lite` to 1.0.30000905 (patch)
- Updated `postcss-custom-properties` to 8.0.9 (patch)
### 6.3.0 (October 28, 2018)
- Added `postcss-double-position-gradients` 1.0.0 (major, non-breaking for this project)
- Updated `autoprefixer` to 9.3.1 (minor)
- Updated `browserslist` to 4.3.4 (patch)
- Updated `caniuse-lite` to 1.0.30000899 (patch)
- Updated `cssdb` to 4.1.0 (major, non-breaking for this project)
### 6.2.0 (October 22, 2018)
- Updated `autoprefixer` to 9.2.1 (minor)
- Updated `browserslist` to 4.3.1 (minor)
### 6.1.2 (October 19, 2018)
- Updated `browserslist` to 4.2.1 (patch)
- Updated `caniuse-lite` to 1.0.30000893 (patch)
- Updated `postcss-custom-media` to 7.0.7 (patch)
### 6.1.1 (October 12, 2018)
- Updated: `postcss-custom-media` to 7.0.6 (patch)
### 6.1.0 (October 10, 2018)
- Added: `postcss-color-gray`
- Added: Passing `autoprefixer: false` disables autoprefixer
- Updated: `browserslist` to 4.2.0 (minor)
- Updated: `caniuse-lite` to 1.0.30000890 (patch)
### 6.0.10 (October 2, 2018)
- Updated: `postcss-custom-properties` to 8.0.8 (patch)
### 6.0.9 (October 2, 2018)
- Updated: `browserslist` to 4.1.2 (patch)
- Updated: `postcss` to 7.0.5 (patch)
- Updated: `postcss-custom-properties` to 8.0.7 (patch)
### 6.0.8 (October 1, 2018)
- Updated: `caniuse-lite` to 1.0.30000888 (patch)
- Updated: `postcss` to 7.0.4 (patch)
**Did you hear? PostCSS Preset Env is now part of Create React App!** 🎉
### 6.0.7 (September 23, 2018)
- Updated: `postcss` to 7.0.3 (patch)
- Updated: `postcss-custom-properties` to 8.0.6 (patch)
### 6.0.6 (September 23, 2018)
- Updated: `postcss-custom-media` to 7.0.4 (patch)
### 6.0.5 (September 23, 2018)
- Updated: `postcss-color-mod-function` to 3.0.3 (patch)
### 6.0.4 (September 23, 2018)
- Updated: `caniuse-lite` to 1.0.30000887 (patch)
- Updated: `postcss-color-mod-function` to 3.0.2 (patch)
### 6.0.3 (September 21, 2018)
- Updated: `caniuse-lite` to 1.0.30000885 (patch)
- Updated: `postcss-custom-properties` to 8.0.5 (patch)
### 6.0.2 (September 20, 2018)
- Fixed: Do not break on an empty `importFrom` object
- Fixed: Actually run `postcss-env-function`
### 6.0.1 (September 20, 2018)
- Fixed: Issue with the `system-ui` font family polyfill by replacing
`postcss-font-family-system-ui` with an internal polyfill, at least until the
problem with the original plugin is resolved.
### 6.0.0 (September 20, 2018)
- Added: Support for PostCSS 7+
- Added: Support for PostCSS Values Parser 2+
- Added: Support for PostCSS Selector Parser 5+
- Added: Support for Node 6+
- Updated: All 28 plugins
### 5.4.0 (July 25, 2018)
- Added: `toggle` option to override which features are enabled or disabled
- Deprecated: toggle features with `toggle`, not `features`
### 5.3.0 (July 24, 2018)
- Updated: `postcss-lab-function` to v1.1.0 (minor update)
### 5.2.3 (July 21, 2018)
- Updated: `postcss-color-mod-function` to v2.4.3 (patch update)
### 5.2.2 (July 13, 2018)
- Updated: `autoprefixer` to v8.6.5 (patch update)
- Updated: `caniuse-lite` to v1.0.30000865 (patch update)
- Updated: `postcss-color-functional-notation` to v1.0.2 (patch update)
### 5.2.1 (June 26, 2018)
- Updated: `caniuse-lite` to v1.0.30000859 (patch update)
- Updated: `postcss-attribute-case-insensitive` to v3.0.1 (patch update)
### 5.2.0 (June 25, 2018)
- Updated: `autoprefixer` to v8.6.3 (minor update)
- Updated: `caniuse-lite` to v1.0.30000858 (patch update)
- Updated: `postcss` to 6.0.23 (patch update)
- Updated: `postcss-nesting` to v6.0.0 (major internal update, non-breaking for this project)
### 5.1.0 (May 21, 2018)
- Added: `autoprefixer` option to pass options into autoprefixer
- Updated: `autoprefixer` to v8.5.0 (minor update)
- Updated: `browserslist` to v3.2.8 (patch update)
- Updated: `caniuse-lite` to v1.0.30000844 (patch update)
- Updated: `postcss-color-functional-notation` to v1.0.1 (patch update)
### 5.0.0 (May 11, 2018)
- Added: `autoprefixer`
- Added: `postcss-color-functional-notation`
- Added: `postcss-env-function`
- Added: `postcss-lab-function`
- Added: `postcss-place`
- Added: `postcss-gap-properties`
- Added: `postcss-overflow-shorthand`
- Updated: `cssdb` to v3.1.0 (major update)
- Updated: In conformance with cssdb v3, the default stage is now 2
- Updated: `postcss-attribute-case-insensitive` to v3.0.0 (major update)
- Updated: `postcss-pseudo-class-any-link` to v5.0.0 (major update)
- Updated: `postcss-image-set-function` to v2.0.0 (major update)
- Updated: `postcss-dir-pseudo-class` to v4.0.0 (major update)
- Updated: `postcss-color-rebeccapurple` to v3.1.0 (minor update)
- Updated: `postcss` to v6.0.22 (patch update)
- Updated: `browserslist` to v3.2.7 (patch update)
- Updated: `caniuse-lite` to v1.0.30000839 (patch update)
All plugins now conform to the latest stable releases of `postcss-value-parser`
v1.5.0 and `postcss-selector-parser` v4.0.0.
### 4.1.0 (April 23, 2018)
- Updated: `browserslist` to v3.2.5 (patch update)
- Updated: `caniuse-lite` to v1.0.30000830 (patch update)
- Updated: `postcss-apply` to v0.10.0 (minor update)
- Updated: `postcss-nesting` to v5.0.0 (major update, non-breaking for this project)
### 4.0.0 (April 7, 2018)
- Added: `postcss-focus-within`
- Updated: `postcss-focus-visible` to v3.0.0 (major update)
- Updated: `caniuse-lite` to v1.0.30000824 (patch update)
- Updated: `cssdb` to v2.0.0 (major update)
- Changed: All `specificationId` names to new `id` names for the `cssdb` update.
### 3.5.0 (April 5, 2018)
- Fixed: `selectors-matches-pseudo` mapping to allow `:matches` polyfilling
- Updated: `postcss-dir-pseudo-class` to v3.0.0 (major update, non-breaking for this project)
- Updated: `postcss-logical` to v1.1.1 (minor update)
- Updated: `postcss` to v6.0.21 (patch update)
- Updated: `browserslist` to v3.2.4 (patch update)
- Updated: `caniuse-lite` to v1.0.30000823 (patch update)
### 3.4.0 (March 18, 2018)
- Updated: `browserslist` to v3.2.0 (minor update)
- Updated: `postcss` to v6.0.20 (patch update)
- Updated: `postcss-image-set-polyfill` to `@csstools/postcss-image-set-function` (hopefully temporarily)
### 3.3.0 (March 16, 2018)
- Updated: `postcss-apply` to v0.9.0 (minor update)
- Updated: `browserslist` to v3.1.2 (patch update)
- Updated: `caniuse-lite` to v1.0.30000815 (patch update)
- Updated: distribution to cjs and es bundles
### 3.2.2 (February 27, 2018)
- Updated: `postcss-color-mod-function` to v2.4.2 (patch update)
### 3.2.1 (February 21, 2018)
- Updated: Use the latest tested version of all dependencies
### 3.2.0 (February 18, 2018)
- Added: `postcss-page-break` which has moved here from Autoprefixer
### 3.1.0 (February 17, 2018)
- Added: `postcss-focus-visible`
### 3.0.0 (February 16, 2018)
- Updated: `postcss-color-mod-function` to v2.4 (minor update)
- Updated: `postcss-custom-properties` to v7.0 (major update)
### 2.2.0 (February 14, 2018)
- Updated: `browserslist` to v3.1 (major update)
- Updated: `postcss-color-mod-function` to v2.3 (minor update)
- Improved: cleaned up one reusable variable and added a few tests
### 2.1.0 (January 22, 2018)
- Updated: `cssdb` to v1.5 (minor update)
- Updated: `postcss-color-mod-function` to v2.2 (major update)
- Updated: `postcss-font-family-system-ui` to v3.0 (repo update)
### 2.0.0 (January 16, 2018)
- Initial version
### 1.0.0 (December 20, 2017)
- Unsupported version accidentally published by a member of the community

108
web/node_modules/postcss-preset-env/LICENSE.md generated vendored Normal file
View file

@ -0,0 +1,108 @@
# CC0 1.0 Universal
## Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an “owner”) of an original work of
authorship and/or a database (each, a “Work”).
Certain owners wish to permanently relinquish those rights to a Work for the
purpose of contributing to a commons of creative, cultural and scientific works
(“Commons”) that the public can reliably and without fear of later claims of
infringement build upon, modify, incorporate in other works, reuse and
redistribute as freely as possible in any form whatsoever and for any purposes,
including without limitation commercial purposes. These owners may contribute
to the Commons to promote the ideal of a free culture and the further
production of creative, cultural and scientific works, or to gain reputation or
greater distribution for their Work in part through the use and efforts of
others.
For these and/or other purposes and motivations, and without any expectation of
additional consideration or compensation, the person associating CC0 with a
Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights (“Copyright and
Related Rights”). Copyright and Related Rights include, but are not limited
to, the following:
1. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;
2. moral rights retained by the original author(s) and/or performer(s);
3. publicity and privacy rights pertaining to a persons image or likeness
depicted in a Work;
4. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(i), below;
5. rights protecting the extraction, dissemination, use and reuse of data in
a Work;
6. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and
7. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations
thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmers Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the “Waiver”). Affirmer
makes the Waiver for the benefit of each member of the public at large and
to the detriment of Affirmers heirs and successors, fully intending that
such Waiver shall not be subject to revocation, rescission, cancellation,
termination, or any other legal or equitable action to disrupt the quiet
enjoyment of the Work by the public as contemplated by Affirmers express
Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmers express Statement of Purpose. In addition, to the extent the
Waiver is so judged Affirmer hereby grants to each affected person a
royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmers Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the “License”). The License
shall be deemed effective as of the date CC0 was applied by Affirmer to the
Work. Should any part of the License for any reason be judged legally
invalid or ineffective under applicable law, such partial invalidity or
ineffectiveness shall not invalidate the remainder of the License, and in
such case Affirmer hereby affirms that he or she will not (i) exercise any
of his or her remaining Copyright and Related Rights in the Work or (ii)
assert any associated claims and causes of action with respect to the Work,
in either case contrary to Affirmers express Statement of Purpose.
4. Limitations and Disclaimers.
1. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
2. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or
otherwise, including without limitation warranties of title,
merchantability, fitness for a particular purpose, non infringement, or
the absence of latent or other defects, accuracy, or the present or
absence of errors, whether or not discoverable, all to the greatest
extent permissible under applicable law.
3. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any persons Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the Work.
4. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.
For more information, please see
http://creativecommons.org/publicdomain/zero/1.0/.

381
web/node_modules/postcss-preset-env/README.md generated vendored Normal file
View file

@ -0,0 +1,381 @@
# PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]
[PostCSS Preset Env] lets you convert modern CSS into something most browsers
can understand, determining the polyfills you need based on your targeted
browsers or runtime environments.
```bash
npm install postcss-preset-env
```
```pcss
@custom-media --viewport-medium (width <= 50rem);
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
:root {
--mainColor: #12345678;
}
body {
color: var(--mainColor);
font-family: system-ui;
overflow-wrap: break-word;
}
:--heading {
background-image: image-set(url(img/heading.png) 1x, url(img/heading@2x.png) 2x);
@media (--viewport-medium) {
margin-block: 0;
}
}
a {
color: rgb(0 0 100% / 90%);
&:hover {
color: rebeccapurple;
}
}
/* becomes */
:root {
--mainColor: rgba(18, 52, 86, 0.47059);
}
body {
color: rgba(18, 52, 86, 0.47059);
color: var(--mainColor);
font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue;
word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
background-image: url(img/heading.png);
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
h1, h2, h3, h4, h5, h6 {
background-image: url(img/heading@2x.png)
}
}
@media (max-width: 50rem) {
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0;
}
}
a {
color: rgba(0, 0, 255, 0.9)
}
a:hover {
color: #639;
}
```
Without any configuration options, [PostCSS Preset Env] enables **Stage 2**
features and supports **all** browsers.
[![Transform with Preset Env][readme-transform-with-preset-env-img]][readme-transform-with-preset-env-url]
[![Style with Preset Env][readme-style-with-preset-env-img]][readme-style-with-preset-env-url]
## Usage
Add [PostCSS Preset Env] to your project:
```bash
npm install postcss-preset-env --save-dev
```
Use [PostCSS Preset Env] to process your CSS:
```js
const postcssPresetEnv = require('postcss-preset-env');
postcssPresetEnv.process(YOUR_CSS /*, processOptions, pluginOptions */);
```
Or use it as a [PostCSS] plugin:
```js
const postcss = require('postcss');
const postcssPresetEnv = require('postcss-preset-env');
postcss([
postcssPresetEnv(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```
[PostCSS Preset Env] runs in all Node environments, with special instructions for:
| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
| --- | --- | --- | --- | --- | --- |
## Options
### stage
The `stage` option determines which CSS features to polyfill, based upon their
stability in the process of becoming implemented web standards.
```js
postcssPresetEnv({ stage: 0 })
```
The `stage` can be `0` (experimental) through `4` (stable), or `false`. Setting
`stage` to `false` will disable every polyfill. Doing this would only be useful
if you intended to exclusively use the [`features`](#features) option.
Without any configuration options, [PostCSS Preset Env] enables **Stage 2**
features.
### features
The `features` option enables or disables specific polyfills by ID. Passing
`true` to a specific feature ID will enable its polyfill, while passing `false`
will disable it.
```js
postcssPresetEnv({
/* use stage 3 features + css nesting rules */
stage: 3,
features: {
'nesting-rules': true
}
})
```
Passing an object to a specific feature ID will both enable and configure it.
```js
postcssPresetEnv({
/* use stage 3 features + css color-mod (warning on unresolved) */
stage: 3,
features: {
'color-mod-function': { unresolved: 'warn' }
}
})
```
Any polyfills not explicitly enabled or disabled through `features` are
determined by the [`stage`](#stage) option.
### browsers
The `browsers` option determines which polyfills are required based upon the
browsers you are supporting.
[PostCSS Preset Env] supports any standard [browserslist] configuration, which
can be a `.browserslistrc` file, a `browserslist` key in `package.json`, or
`browserslist` environment variables.
The `browsers` option should only be used when a standard browserslist
configuration is not available.
```js
postcssPresetEnv({ browsers: 'last 2 versions' })
```
If not valid browserslist configuration is specified, the
[default browserslist query](https://github.com/browserslist/browserslist#queries)
will be used.
### insertBefore / insertAfter
The `insertBefore` and `insertAfter` keys allow you to insert other PostCSS
plugins into the chain. This is only useful if you are also using sugary
PostCSS plugins that must execute before or after certain polyfills.
Both `insertBefore` and `insertAfter` support chaining one or multiple plugins.
```js
import postcssSimpleVars from 'postcss-simple-vars';
postcssPresetEnv({
insertBefore: {
'all-property': postcssSimpleVars
}
})
```
### autoprefixer
[PostCSS Preset Env] includes [autoprefixer] and [`browsers`](#browsers) option
will be passed to it automatically.
Specifying the `autoprefixer` option enables passing
[additional options](https://github.com/postcss/autoprefixer#options)
into [autoprefixer].
```js
postcssPresetEnv({
autoprefixer: { grid: true }
})
```
Passing `autoprefixer: false` disables autoprefixer.
### preserve
The `preserve` option determines whether all plugins should receive a
`preserve` option, which may preserve or remove otherwise-polyfilled CSS. By
default, this option is not configured.
```js
postcssPresetEnv({
preserve: false // instruct all plugins to omit pre-polyfilled CSS
});
```
### importFrom
The `importFrom` option specifies sources where variables like Custom Media,
Custom Properties, Custom Selectors, and Environment Variables can be imported
from, which might be CSS, JS, and JSON files, functions, and directly passed
objects.
```js
postcssPresetEnv({
/*
@custom-media --small-viewport (max-width: 30em);
@custom-selector :--heading h1, h2, h3;
:root { --color: red; }
*/
importFrom: 'path/to/file.css'
});
```
Multiple sources can be passed into this option, and they will be parsed in the
order they are received. JavaScript files, JSON files, functions, and objects
will use different namespaces to import different kinds of variables.
```js
postcssPresetEnv({
importFrom: [
/*
@custom-media --small-viewport (max-width: 30em);
@custom-selector :--heading h1, h2, h3;
:root { --color: red; }
*/
'path/to/file.css',
/* module.exports = {
customMedia: { '--small-viewport': '(max-width: 30em)' },
customProperties: { '--color': 'red' },
customSelectors: { ':--heading': 'h1, h2, h3' },
environmentVariables: { '--branding-padding': '20px' }
} */
'and/then/this.js',
/* {
"custom-media": { "--small-viewport": "(max-width: 30em)" }
"custom-properties": { "--color": "red" },
"custom-selectors": { ":--heading": "h1, h2, h3" },
"environment-variables": { "--branding-padding": "20px" }
} */
'and/then/that.json',
{
customMedia: { '--small-viewport': '(max-width: 30em)' },
customProperties: { '--color': 'red' },
customSelectors: { ':--heading': 'h1, h2, h3' },
environmentVariables: { '--branding-padding': '20px' }
},
() => {
const customMedia = { '--small-viewport': '(max-width: 30em)' };
const customProperties = { '--color': 'red' };
const customSelectors = { ':--heading': 'h1, h2, h3' };
const environmentVariables = { '--branding-padding': '20px' };
return { customMedia, customProperties, customSelectors, environmentVariables };
}
]
});
```
### exportTo
The `exportTo` option specifies destinations where variables like Custom Media,
Custom Properties, Custom Selectors, and Environment Variables can be exported
to, which might be CSS, JS, and JSON files, functions, and directly passed
objects.
```js
postcssPresetEnv({
/*
@custom-media --small-viewport (max-width: 30em);
@custom-selector :--heading h1, h2, h3;
:root { --color: red; }
*/
exportTo: 'path/to/file.css'
});
```
Multiple destinations can be passed into this option as well, and they will be
parsed in the order they are received. JavaScript files, JSON files, and
objects will use different namespaces to import different kinds of variables.
```js
const cachedObject = {};
postcssPresetEnv({
exportTo: [
/*
@custom-media --small-viewport (max-width: 30em);
@custom-selector :--heading h1, h2, h3;
:root { --color: red; }
*/
'path/to/file.css',
/* module.exports = {
customMedia: { '--small-viewport': '(max-width: 30em)' },
customProperties: { '--color': 'red' },
customSelectors: { ':--heading': 'h1, h2, h3' },
environmentVariables: { '--branding-padding': '20px' }
} */
'and/then/this.js',
/* {
"custom-media": { "--small-viewport": "(max-width: 30em)" }
"custom-properties": { "--color": "red" },
"custom-selectors": { ":--heading": "h1, h2, h3" },
"environment-variables": { "--branding-padding": "20px" }
} */
'and/then/that.json',
cachedObject,
variables => {
if ('customProperties' in variables) {
// do something special with customProperties
}
Object.assign(cachedObject, variables);
}
]
});
```
[cli-img]: https://img.shields.io/travis/csstools/postcss-preset-env/master.svg
[cli-url]: https://travis-ci.org/csstools/postcss-preset-env
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/postcss-preset-env.svg
[npm-url]: https://www.npmjs.com/package/postcss-preset-env
[autoprefixer]: https://github.com/postcss/autoprefixer
[browserslist]: https://github.com/browserslist/browserslist#readme
[caniuse]: https://caniuse.com/
[cssdb]: https://cssdb.org/
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
[readme-style-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-style-with-preset-env.svg
[readme-style-with-preset-env-url]: https://codepen.io/pen?template=OZRovK
[readme-transform-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-transform-with-preset-env.svg
[readme-transform-with-preset-env-url]: https://csstools.github.io/postcss-preset-env/

479
web/node_modules/postcss-preset-env/index.js generated vendored Normal file
View file

@ -0,0 +1,479 @@
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var autoprefixer = _interopDefault(require('autoprefixer'));
var browserslist = _interopDefault(require('browserslist'));
var cssdb = _interopDefault(require('cssdb'));
var postcss$1 = _interopDefault(require('postcss'));
var postcssAttributeCaseInsensitive = _interopDefault(require('postcss-attribute-case-insensitive'));
var postcssBlankPseudo = _interopDefault(require('css-blank-pseudo/postcss'));
var postcssColorFunctionalNotation = _interopDefault(require('postcss-color-functional-notation'));
var postcssColorGray = _interopDefault(require('postcss-color-gray'));
var postcssColorHexAlpha = _interopDefault(require('postcss-color-hex-alpha'));
var postcssColorModFunction = _interopDefault(require('postcss-color-mod-function'));
var postcssColorRebeccapurple = _interopDefault(require('postcss-color-rebeccapurple'));
var postcssCustomMedia = _interopDefault(require('postcss-custom-media'));
var postcssCustomProperties = _interopDefault(require('postcss-custom-properties'));
var postcssCustomSelectors = _interopDefault(require('postcss-custom-selectors'));
var postcssDirPseudoClass = _interopDefault(require('postcss-dir-pseudo-class'));
var postcssDoublePositionGradients = _interopDefault(require('postcss-double-position-gradients'));
var postcssEnvFunction = _interopDefault(require('postcss-env-function'));
var postcssFocusVisible = _interopDefault(require('postcss-focus-visible'));
var postcssFocusWithin = _interopDefault(require('postcss-focus-within'));
var postcssFontVariant = _interopDefault(require('postcss-font-variant'));
var postcssGapProperties = _interopDefault(require('postcss-gap-properties'));
var postcssHasPseudo = _interopDefault(require('css-has-pseudo/postcss'));
var postcssImageSetPolyfill = _interopDefault(require('postcss-image-set-function'));
var postcssInitial = _interopDefault(require('postcss-initial'));
var postcssLabFunction = _interopDefault(require('postcss-lab-function'));
var postcssLogical = _interopDefault(require('postcss-logical'));
var postcssMediaMinmax = _interopDefault(require('postcss-media-minmax'));
var postcssNesting = _interopDefault(require('postcss-nesting'));
var postcssOverflowShorthand = _interopDefault(require('postcss-overflow-shorthand'));
var postcssPageBreak = _interopDefault(require('postcss-page-break'));
var postcssPlace = _interopDefault(require('postcss-place'));
var postcssPrefersColorScheme = _interopDefault(require('css-prefers-color-scheme/postcss'));
var postcssPseudoClassAnyLink = _interopDefault(require('postcss-pseudo-class-any-link'));
var postcssReplaceOverflowWrap = _interopDefault(require('postcss-replace-overflow-wrap'));
var postcssSelectorMatches = _interopDefault(require('postcss-selector-matches'));
var postcssSelectorNot = _interopDefault(require('postcss-selector-not'));
var caniuse = require('caniuse-lite');
var fs = _interopDefault(require('fs'));
var path = _interopDefault(require('path'));
var postcssFontFamilySystemUi = postcss$1.plugin('postcss-system-ui-font', () => root => {
root.walkDecls(propertyRegExp, decl => {
decl.value = decl.value.replace(systemUiMatch, systemUiReplace);
});
});
const propertyRegExp = /(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i;
const whitespace = '[\\f\\n\\r\\x09\\x20]';
const systemUiFamily = ['system-ui',
/* macOS 10.11-10.12 */
'-apple-system',
/* Windows 6+ */
'Segoe UI',
/* Android 4+ */
'Roboto',
/* Ubuntu 10.10+ */
'Ubuntu',
/* Gnome 3+ */
'Cantarell',
/* KDE Plasma 5+ */
'Noto Sans',
/* fallback */
'sans-serif'];
const systemUiMatch = new RegExp(`(^|,|${whitespace}+)(?:system-ui${whitespace}*)(?:,${whitespace}*(?:${systemUiFamily.join('|')})${whitespace}*)?(,|$)`, 'i');
const systemUiReplace = `$1${systemUiFamily.join(', ')}$2`;
var plugins = {
'all-property': postcssInitial,
'any-link-pseudo-class': postcssPseudoClassAnyLink,
'blank-pseudo-class': postcssBlankPseudo,
'break-properties': postcssPageBreak,
'case-insensitive-attributes': postcssAttributeCaseInsensitive,
'color-functional-notation': postcssColorFunctionalNotation,
'color-mod-function': postcssColorModFunction,
'custom-media-queries': postcssCustomMedia,
'custom-properties': postcssCustomProperties,
'custom-selectors': postcssCustomSelectors,
'dir-pseudo-class': postcssDirPseudoClass,
'double-position-gradients': postcssDoublePositionGradients,
'environment-variables': postcssEnvFunction,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'gray-function': postcssColorGray,
'has-pseudo-class': postcssHasPseudo,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
'logical-properties-and-values': postcssLogical,
'matches-pseudo-class': postcssSelectorMatches,
'media-query-ranges': postcssMediaMinmax,
'nesting-rules': postcssNesting,
'not-pseudo-class': postcssSelectorNot,
'overflow-property': postcssOverflowShorthand,
'overflow-wrap-property': postcssReplaceOverflowWrap,
'place-properties': postcssPlace,
'prefers-color-scheme-query': postcssPrefersColorScheme,
'rebeccapurple-color': postcssColorRebeccapurple,
'system-ui-font-family': postcssFontFamilySystemUi
};
// return a list of features to be inserted before or after cssdb features
function getTransformedInsertions(insertions, placement) {
return Object.keys(insertions).map(id => [].concat(insertions[id]).map(plugin => ({
[placement]: true,
plugin,
id
}))).reduce((array, feature) => array.concat(feature), []);
}
function getUnsupportedBrowsersByFeature(feature) {
const caniuseFeature = caniuse.features[feature]; // if feature support can be determined
if (caniuseFeature) {
const stats = caniuse.feature(caniuseFeature).stats; // return an array of browsers and versions that do not support the feature
const results = Object.keys(stats).reduce((browsers, browser) => browsers.concat(Object.keys(stats[browser]).filter(version => stats[browser][version].indexOf('y') !== 0).map(version => `${browser} ${version}`)), []);
return results;
} else {
// otherwise, return that the feature does not work in any browser
return ['> 0%'];
}
}
// ids ordered by required execution, then alphabetically
var idsByExecutionOrder = ['custom-media-queries', 'custom-properties', 'environment-variables', // run environment-variables here to access transpiled custom media params and properties
'image-set-function', // run images-set-function before nesting-rules so that it may fix nested media
'media-query-ranges', // run media-query-range and
'prefers-color-scheme-query', // run prefers-color-scheme-query here to prevent duplicate transpilation after nesting-rules
'nesting-rules', 'custom-selectors', // run custom-selectors after nesting-rules to correctly transpile &:--custom-selector
'any-link-pseudo-class', 'case-insensitive-attributes', 'focus-visible-pseudo-class', 'focus-within-pseudo-class', 'matches-pseudo-class', // run matches-pseudo-class and
'not-pseudo-class', // run not-pseudo-class after other selectors have been transpiled
'logical-properties-and-values', // run logical-properties-and-values before dir-pseudo-class
'dir-pseudo-class', 'all-property', // run all-property before other property polyfills
'color-functional-notation', 'double-position-gradients', 'gray-function', 'hexadecimal-alpha-notation', 'lab-function', 'rebeccapurple-color', 'color-mod-function', // run color-mod after other color modifications have finished
'blank-pseudo-class', 'break-properties', 'font-variant-property', 'has-pseudo-class', 'gap-properties', 'overflow-property', 'overflow-wrap-property', 'place-properties', 'system-ui-font-family'];
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
/* Write Exports to CSS File
/* ========================================================================== */
function getCustomMediaAsCss(customMedia) {
const cssContent = Object.keys(customMedia).reduce((cssLines, name) => {
cssLines.push(`@custom-media ${name} ${customMedia[name]};`);
return cssLines;
}, []).join('\n');
const css = `${cssContent}\n`;
return css;
}
function getCustomPropertiesAsCss(customProperties) {
const cssContent = Object.keys(customProperties).reduce((cssLines, name) => {
cssLines.push(`\t${name}: ${customProperties[name]};`);
return cssLines;
}, []).join('\n');
const css = `:root {\n${cssContent}\n}\n`;
return css;
}
function getCustomSelectorsAsCss(customSelectors) {
const cssContent = Object.keys(customSelectors).reduce((cssLines, name) => {
cssLines.push(`@custom-selector ${name} ${customSelectors[name]};`);
return cssLines;
}, []).join('\n');
const css = `${cssContent}\n`;
return css;
}
function writeExportsToCssFile(_x, _x2, _x3, _x4) {
return _writeExportsToCssFile.apply(this, arguments);
}
/* Write Exports to JSON file
/* ========================================================================== */
function _writeExportsToCssFile() {
_writeExportsToCssFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customPropertiesAsCss = getCustomPropertiesAsCss(customProperties);
const customMediaAsCss = getCustomMediaAsCss(customMedia);
const customSelectorsAsCss = getCustomSelectorsAsCss(customSelectors);
const css = `${customMediaAsCss}\n${customSelectorsAsCss}\n${customPropertiesAsCss}`;
yield writeFile(to, css);
});
return _writeExportsToCssFile.apply(this, arguments);
}
function writeExportsToJsonFile(_x5, _x6, _x7, _x8) {
return _writeExportsToJsonFile.apply(this, arguments);
}
/* Write Exports to Common JS file
/* ========================================================================== */
function _writeExportsToJsonFile() {
_writeExportsToJsonFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const jsonContent = JSON.stringify({
'custom-media': customMedia,
'custom-properties': customProperties,
'custom-selectors': customSelectors
}, null, ' ');
const json = `${jsonContent}\n`;
yield writeFile(to, json);
});
return _writeExportsToJsonFile.apply(this, arguments);
}
function getObjectWithKeyAsCjs(key, object) {
const jsContents = Object.keys(object).reduce((jsLines, name) => {
jsLines.push(`\t\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);
return jsLines;
}, []).join(',\n');
const cjs = `\n\t${key}: {\n${jsContents}\n\t}`;
return cjs;
}
function writeExportsToCjsFile(_x9, _x10, _x11, _x12) {
return _writeExportsToCjsFile.apply(this, arguments);
}
/* Write Exports to Module JS file
/* ========================================================================== */
function _writeExportsToCjsFile() {
_writeExportsToCjsFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customMediaAsCjs = getObjectWithKeyAsCjs('customMedia', customMedia);
const customPropertiesAsCjs = getObjectWithKeyAsCjs('customProperties', customProperties);
const customSelectorsAsCjs = getObjectWithKeyAsCjs('customSelectors', customSelectors);
const cjs = `module.exports = {${customMediaAsCjs},${customPropertiesAsCjs},${customSelectorsAsCjs}\n};\n`;
yield writeFile(to, cjs);
});
return _writeExportsToCjsFile.apply(this, arguments);
}
function getObjectWithKeyAsMjs(key, object) {
const mjsContents = Object.keys(object).reduce((mjsLines, name) => {
mjsLines.push(`\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);
return mjsLines;
}, []).join(',\n');
const mjs = `export const ${key} = {\n${mjsContents}\n};\n`;
return mjs;
}
function writeExportsToMjsFile(_x13, _x14, _x15, _x16) {
return _writeExportsToMjsFile.apply(this, arguments);
}
/* Write Exports to Exports
/* ========================================================================== */
function _writeExportsToMjsFile() {
_writeExportsToMjsFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customMediaAsMjs = getObjectWithKeyAsMjs('customMedia', customMedia);
const customPropertiesAsMjs = getObjectWithKeyAsMjs('customProperties', customProperties);
const customSelectorsAsMjs = getObjectWithKeyAsMjs('customSelectors', customSelectors);
const mjs = `${customMediaAsMjs}\n${customPropertiesAsMjs}\n${customSelectorsAsMjs}`;
yield writeFile(to, mjs);
});
return _writeExportsToMjsFile.apply(this, arguments);
}
function writeToExports(customExports, destinations) {
return Promise.all([].concat(destinations).map(
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(function* (destination) {
if (destination instanceof Function) {
yield destination({
customMedia: getObjectWithStringifiedKeys(customExports.customMedia),
customProperties: getObjectWithStringifiedKeys(customExports.customProperties),
customSelectors: getObjectWithStringifiedKeys(customExports.customSelectors)
});
} else {
// read the destination as an object
const opts = destination === Object(destination) ? destination : {
to: String(destination)
}; // transformer for Exports into a JSON-compatible object
const toJSON = opts.toJSON || getObjectWithStringifiedKeys;
if ('customMedia' in opts || 'customProperties' in opts || 'customSelectors' in opts) {
// write directly to an object as customProperties
opts.customMedia = toJSON(customExports.customMedia);
opts.customProperties = toJSON(customExports.customProperties);
opts.customSelectors = toJSON(customExports.customSelectors);
} else if ('custom-media' in opts || 'custom-properties' in opts || 'custom-selectors' in opts) {
// write directly to an object as custom-properties
opts['custom-media'] = toJSON(customExports.customMedia);
opts['custom-properties'] = toJSON(customExports.customProperties);
opts['custom-selectors'] = toJSON(customExports.customSelectors);
} else {
// destination pathname
const to = String(opts.to || ''); // type of file being written to
const type = (opts.type || path.extname(opts.to).slice(1)).toLowerCase(); // transformed Exports
const customMediaJSON = toJSON(customExports.customMedia);
const customPropertiesJSON = toJSON(customExports.customProperties);
const customSelectorsJSON = toJSON(customExports.customSelectors);
if (type === 'css') {
yield writeExportsToCssFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'js') {
yield writeExportsToCjsFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'json') {
yield writeExportsToJsonFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'mjs') {
yield writeExportsToMjsFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
}
}
});
return function (_x17) {
return _ref.apply(this, arguments);
};
}()));
}
/* Helper utilities
/* ========================================================================== */
function getObjectWithStringifiedKeys(object) {
return Object.keys(object).reduce((objectJSON, key) => {
objectJSON[key] = String(object[key]);
return objectJSON;
}, {});
}
function writeFile(to, text) {
return new Promise((resolve, reject) => {
fs.writeFile(to, text, error => {
if (error) {
reject(error);
} else {
resolve();
}
});
});
}
function escapeForJS(string) {
return string.replace(/\\([\s\S])|(')/g, '\\$1$2').replace(/\n/g, '\\n').replace(/\r/g, '\\r');
}
var postcss = postcss$1.plugin('postcss-preset-env', opts => {
// initialize options
const features = Object(Object(opts).features);
const insertBefore = Object(Object(opts).insertBefore);
const insertAfter = Object(Object(opts).insertAfter);
const browsers = Object(opts).browsers;
const stage = 'stage' in Object(opts) ? opts.stage === false ? 5 : parseInt(opts.stage) || 0 : 2;
const autoprefixerOptions = Object(opts).autoprefixer;
const sharedOpts = initializeSharedOpts(Object(opts));
const stagedAutoprefixer = autoprefixerOptions === false ? () => {} : autoprefixer(Object.assign({
overrideBrowserslist: browsers
}, autoprefixerOptions)); // polyfillable features (those with an available postcss plugin)
const polyfillableFeatures = cssdb.concat( // additional features to be inserted before cssdb features
getTransformedInsertions(insertBefore, 'insertBefore'), // additional features to be inserted after cssdb features
getTransformedInsertions(insertAfter, 'insertAfter')).filter( // inserted features or features with an available postcss plugin
feature => feature.insertBefore || feature.id in plugins).sort( // features sorted by execution order and then insertion order
(a, b) => idsByExecutionOrder.indexOf(a.id) - idsByExecutionOrder.indexOf(b.id) || (a.insertBefore ? -1 : b.insertBefore ? 1 : 0) || (a.insertAfter ? 1 : b.insertAfter ? -1 : 0)).map( // polyfillable features as an object
feature => {
// target browsers for the polyfill
const unsupportedBrowsers = getUnsupportedBrowsersByFeature(feature.caniuse);
return feature.insertBefore || feature.insertAfter ? {
browsers: unsupportedBrowsers,
plugin: feature.plugin,
id: `${feature.insertBefore ? 'before' : 'after'}-${feature.id}`,
stage: 6
} : {
browsers: unsupportedBrowsers,
plugin: plugins[feature.id],
id: feature.id,
stage: feature.stage
};
}); // staged features (those at or above the selected stage)
const stagedFeatures = polyfillableFeatures.filter(feature => feature.id in features ? features[feature.id] : feature.stage >= stage).map(feature => ({
browsers: feature.browsers,
plugin: typeof feature.plugin.process === 'function' ? features[feature.id] === true ? sharedOpts // if the plugin is enabled and has shared options
? feature.plugin(Object.assign({}, sharedOpts)) // otherwise, if the plugin is enabled
: feature.plugin() : sharedOpts // if the plugin has shared options and individual options
? feature.plugin(Object.assign({}, sharedOpts, features[feature.id])) // if the plugin has individual options
: feature.plugin(Object.assign({}, features[feature.id])) // if the plugin is already initialized
: feature.plugin,
id: feature.id
})); // browsers supported by the configuration
const supportedBrowsers = browserslist(browsers, {
ignoreUnknownVersions: true
}); // features supported by the stage and browsers
const supportedFeatures = stagedFeatures.filter(feature => supportedBrowsers.some(supportedBrowser => browserslist(feature.browsers, {
ignoreUnknownVersions: true
}).some(polyfillBrowser => polyfillBrowser === supportedBrowser)));
return (root, result) => {
// polyfills run in execution order
const polyfills = supportedFeatures.reduce((promise, feature) => promise.then(() => feature.plugin(result.root, result)), Promise.resolve()).then(() => stagedAutoprefixer(result.root, result)).then(() => {
if (Object(opts).exportTo) {
writeToExports(sharedOpts.exportTo, opts.exportTo);
}
});
return polyfills;
};
});
const initializeSharedOpts = opts => {
if ('importFrom' in opts || 'exportTo' in opts || 'preserve' in opts) {
const sharedOpts = {};
if ('importFrom' in opts) {
sharedOpts.importFrom = opts.importFrom;
}
if ('exportTo' in opts) {
sharedOpts.exportTo = {
customMedia: {},
customProperties: {},
customSelectors: {}
};
}
if ('preserve' in opts) {
sharedOpts.preserve = opts.preserve;
}
return sharedOpts;
}
return false;
};
module.exports = postcss;
//# sourceMappingURL=index.js.map

1
web/node_modules/postcss-preset-env/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

475
web/node_modules/postcss-preset-env/index.mjs generated vendored Normal file
View file

@ -0,0 +1,475 @@
import autoprefixer from 'autoprefixer';
import browserslist from 'browserslist';
import cssdb from 'cssdb';
import postcss$1 from 'postcss';
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
import postcssBlankPseudo from 'css-blank-pseudo/postcss';
import postcssColorFunctionalNotation from 'postcss-color-functional-notation';
import postcssColorGray from 'postcss-color-gray';
import postcssColorHexAlpha from 'postcss-color-hex-alpha';
import postcssColorModFunction from 'postcss-color-mod-function';
import postcssColorRebeccapurple from 'postcss-color-rebeccapurple';
import postcssCustomMedia from 'postcss-custom-media';
import postcssCustomProperties from 'postcss-custom-properties';
import postcssCustomSelectors from 'postcss-custom-selectors';
import postcssDirPseudoClass from 'postcss-dir-pseudo-class';
import postcssDoublePositionGradients from 'postcss-double-position-gradients';
import postcssEnvFunction from 'postcss-env-function';
import postcssFocusVisible from 'postcss-focus-visible';
import postcssFocusWithin from 'postcss-focus-within';
import postcssFontVariant from 'postcss-font-variant';
import postcssGapProperties from 'postcss-gap-properties';
import postcssHasPseudo from 'css-has-pseudo/postcss';
import postcssImageSetPolyfill from 'postcss-image-set-function';
import postcssInitial from 'postcss-initial';
import postcssLabFunction from 'postcss-lab-function';
import postcssLogical from 'postcss-logical';
import postcssMediaMinmax from 'postcss-media-minmax';
import postcssNesting from 'postcss-nesting';
import postcssOverflowShorthand from 'postcss-overflow-shorthand';
import postcssPageBreak from 'postcss-page-break';
import postcssPlace from 'postcss-place';
import postcssPrefersColorScheme from 'css-prefers-color-scheme/postcss';
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';
import postcssReplaceOverflowWrap from 'postcss-replace-overflow-wrap';
import postcssSelectorMatches from 'postcss-selector-matches';
import postcssSelectorNot from 'postcss-selector-not';
import { features, feature } from 'caniuse-lite';
import fs from 'fs';
import path from 'path';
var postcssFontFamilySystemUi = postcss$1.plugin('postcss-system-ui-font', () => root => {
root.walkDecls(propertyRegExp, decl => {
decl.value = decl.value.replace(systemUiMatch, systemUiReplace);
});
});
const propertyRegExp = /(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i;
const whitespace = '[\\f\\n\\r\\x09\\x20]';
const systemUiFamily = ['system-ui',
/* macOS 10.11-10.12 */
'-apple-system',
/* Windows 6+ */
'Segoe UI',
/* Android 4+ */
'Roboto',
/* Ubuntu 10.10+ */
'Ubuntu',
/* Gnome 3+ */
'Cantarell',
/* KDE Plasma 5+ */
'Noto Sans',
/* fallback */
'sans-serif'];
const systemUiMatch = new RegExp(`(^|,|${whitespace}+)(?:system-ui${whitespace}*)(?:,${whitespace}*(?:${systemUiFamily.join('|')})${whitespace}*)?(,|$)`, 'i');
const systemUiReplace = `$1${systemUiFamily.join(', ')}$2`;
var plugins = {
'all-property': postcssInitial,
'any-link-pseudo-class': postcssPseudoClassAnyLink,
'blank-pseudo-class': postcssBlankPseudo,
'break-properties': postcssPageBreak,
'case-insensitive-attributes': postcssAttributeCaseInsensitive,
'color-functional-notation': postcssColorFunctionalNotation,
'color-mod-function': postcssColorModFunction,
'custom-media-queries': postcssCustomMedia,
'custom-properties': postcssCustomProperties,
'custom-selectors': postcssCustomSelectors,
'dir-pseudo-class': postcssDirPseudoClass,
'double-position-gradients': postcssDoublePositionGradients,
'environment-variables': postcssEnvFunction,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'gray-function': postcssColorGray,
'has-pseudo-class': postcssHasPseudo,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
'logical-properties-and-values': postcssLogical,
'matches-pseudo-class': postcssSelectorMatches,
'media-query-ranges': postcssMediaMinmax,
'nesting-rules': postcssNesting,
'not-pseudo-class': postcssSelectorNot,
'overflow-property': postcssOverflowShorthand,
'overflow-wrap-property': postcssReplaceOverflowWrap,
'place-properties': postcssPlace,
'prefers-color-scheme-query': postcssPrefersColorScheme,
'rebeccapurple-color': postcssColorRebeccapurple,
'system-ui-font-family': postcssFontFamilySystemUi
};
// return a list of features to be inserted before or after cssdb features
function getTransformedInsertions(insertions, placement) {
return Object.keys(insertions).map(id => [].concat(insertions[id]).map(plugin => ({
[placement]: true,
plugin,
id
}))).reduce((array, feature) => array.concat(feature), []);
}
function getUnsupportedBrowsersByFeature(feature$1) {
const caniuseFeature = features[feature$1]; // if feature support can be determined
if (caniuseFeature) {
const stats = feature(caniuseFeature).stats; // return an array of browsers and versions that do not support the feature
const results = Object.keys(stats).reduce((browsers, browser) => browsers.concat(Object.keys(stats[browser]).filter(version => stats[browser][version].indexOf('y') !== 0).map(version => `${browser} ${version}`)), []);
return results;
} else {
// otherwise, return that the feature does not work in any browser
return ['> 0%'];
}
}
// ids ordered by required execution, then alphabetically
var idsByExecutionOrder = ['custom-media-queries', 'custom-properties', 'environment-variables', // run environment-variables here to access transpiled custom media params and properties
'image-set-function', // run images-set-function before nesting-rules so that it may fix nested media
'media-query-ranges', // run media-query-range and
'prefers-color-scheme-query', // run prefers-color-scheme-query here to prevent duplicate transpilation after nesting-rules
'nesting-rules', 'custom-selectors', // run custom-selectors after nesting-rules to correctly transpile &:--custom-selector
'any-link-pseudo-class', 'case-insensitive-attributes', 'focus-visible-pseudo-class', 'focus-within-pseudo-class', 'matches-pseudo-class', // run matches-pseudo-class and
'not-pseudo-class', // run not-pseudo-class after other selectors have been transpiled
'logical-properties-and-values', // run logical-properties-and-values before dir-pseudo-class
'dir-pseudo-class', 'all-property', // run all-property before other property polyfills
'color-functional-notation', 'double-position-gradients', 'gray-function', 'hexadecimal-alpha-notation', 'lab-function', 'rebeccapurple-color', 'color-mod-function', // run color-mod after other color modifications have finished
'blank-pseudo-class', 'break-properties', 'font-variant-property', 'has-pseudo-class', 'gap-properties', 'overflow-property', 'overflow-wrap-property', 'place-properties', 'system-ui-font-family'];
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
/* Write Exports to CSS File
/* ========================================================================== */
function getCustomMediaAsCss(customMedia) {
const cssContent = Object.keys(customMedia).reduce((cssLines, name) => {
cssLines.push(`@custom-media ${name} ${customMedia[name]};`);
return cssLines;
}, []).join('\n');
const css = `${cssContent}\n`;
return css;
}
function getCustomPropertiesAsCss(customProperties) {
const cssContent = Object.keys(customProperties).reduce((cssLines, name) => {
cssLines.push(`\t${name}: ${customProperties[name]};`);
return cssLines;
}, []).join('\n');
const css = `:root {\n${cssContent}\n}\n`;
return css;
}
function getCustomSelectorsAsCss(customSelectors) {
const cssContent = Object.keys(customSelectors).reduce((cssLines, name) => {
cssLines.push(`@custom-selector ${name} ${customSelectors[name]};`);
return cssLines;
}, []).join('\n');
const css = `${cssContent}\n`;
return css;
}
function writeExportsToCssFile(_x, _x2, _x3, _x4) {
return _writeExportsToCssFile.apply(this, arguments);
}
/* Write Exports to JSON file
/* ========================================================================== */
function _writeExportsToCssFile() {
_writeExportsToCssFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customPropertiesAsCss = getCustomPropertiesAsCss(customProperties);
const customMediaAsCss = getCustomMediaAsCss(customMedia);
const customSelectorsAsCss = getCustomSelectorsAsCss(customSelectors);
const css = `${customMediaAsCss}\n${customSelectorsAsCss}\n${customPropertiesAsCss}`;
yield writeFile(to, css);
});
return _writeExportsToCssFile.apply(this, arguments);
}
function writeExportsToJsonFile(_x5, _x6, _x7, _x8) {
return _writeExportsToJsonFile.apply(this, arguments);
}
/* Write Exports to Common JS file
/* ========================================================================== */
function _writeExportsToJsonFile() {
_writeExportsToJsonFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const jsonContent = JSON.stringify({
'custom-media': customMedia,
'custom-properties': customProperties,
'custom-selectors': customSelectors
}, null, ' ');
const json = `${jsonContent}\n`;
yield writeFile(to, json);
});
return _writeExportsToJsonFile.apply(this, arguments);
}
function getObjectWithKeyAsCjs(key, object) {
const jsContents = Object.keys(object).reduce((jsLines, name) => {
jsLines.push(`\t\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);
return jsLines;
}, []).join(',\n');
const cjs = `\n\t${key}: {\n${jsContents}\n\t}`;
return cjs;
}
function writeExportsToCjsFile(_x9, _x10, _x11, _x12) {
return _writeExportsToCjsFile.apply(this, arguments);
}
/* Write Exports to Module JS file
/* ========================================================================== */
function _writeExportsToCjsFile() {
_writeExportsToCjsFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customMediaAsCjs = getObjectWithKeyAsCjs('customMedia', customMedia);
const customPropertiesAsCjs = getObjectWithKeyAsCjs('customProperties', customProperties);
const customSelectorsAsCjs = getObjectWithKeyAsCjs('customSelectors', customSelectors);
const cjs = `module.exports = {${customMediaAsCjs},${customPropertiesAsCjs},${customSelectorsAsCjs}\n};\n`;
yield writeFile(to, cjs);
});
return _writeExportsToCjsFile.apply(this, arguments);
}
function getObjectWithKeyAsMjs(key, object) {
const mjsContents = Object.keys(object).reduce((mjsLines, name) => {
mjsLines.push(`\t'${escapeForJS(name)}': '${escapeForJS(object[name])}'`);
return mjsLines;
}, []).join(',\n');
const mjs = `export const ${key} = {\n${mjsContents}\n};\n`;
return mjs;
}
function writeExportsToMjsFile(_x13, _x14, _x15, _x16) {
return _writeExportsToMjsFile.apply(this, arguments);
}
/* Write Exports to Exports
/* ========================================================================== */
function _writeExportsToMjsFile() {
_writeExportsToMjsFile = _asyncToGenerator(function* (to, customMedia, customProperties, customSelectors) {
const customMediaAsMjs = getObjectWithKeyAsMjs('customMedia', customMedia);
const customPropertiesAsMjs = getObjectWithKeyAsMjs('customProperties', customProperties);
const customSelectorsAsMjs = getObjectWithKeyAsMjs('customSelectors', customSelectors);
const mjs = `${customMediaAsMjs}\n${customPropertiesAsMjs}\n${customSelectorsAsMjs}`;
yield writeFile(to, mjs);
});
return _writeExportsToMjsFile.apply(this, arguments);
}
function writeToExports(customExports, destinations) {
return Promise.all([].concat(destinations).map(
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(function* (destination) {
if (destination instanceof Function) {
yield destination({
customMedia: getObjectWithStringifiedKeys(customExports.customMedia),
customProperties: getObjectWithStringifiedKeys(customExports.customProperties),
customSelectors: getObjectWithStringifiedKeys(customExports.customSelectors)
});
} else {
// read the destination as an object
const opts = destination === Object(destination) ? destination : {
to: String(destination)
}; // transformer for Exports into a JSON-compatible object
const toJSON = opts.toJSON || getObjectWithStringifiedKeys;
if ('customMedia' in opts || 'customProperties' in opts || 'customSelectors' in opts) {
// write directly to an object as customProperties
opts.customMedia = toJSON(customExports.customMedia);
opts.customProperties = toJSON(customExports.customProperties);
opts.customSelectors = toJSON(customExports.customSelectors);
} else if ('custom-media' in opts || 'custom-properties' in opts || 'custom-selectors' in opts) {
// write directly to an object as custom-properties
opts['custom-media'] = toJSON(customExports.customMedia);
opts['custom-properties'] = toJSON(customExports.customProperties);
opts['custom-selectors'] = toJSON(customExports.customSelectors);
} else {
// destination pathname
const to = String(opts.to || ''); // type of file being written to
const type = (opts.type || path.extname(opts.to).slice(1)).toLowerCase(); // transformed Exports
const customMediaJSON = toJSON(customExports.customMedia);
const customPropertiesJSON = toJSON(customExports.customProperties);
const customSelectorsJSON = toJSON(customExports.customSelectors);
if (type === 'css') {
yield writeExportsToCssFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'js') {
yield writeExportsToCjsFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'json') {
yield writeExportsToJsonFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
if (type === 'mjs') {
yield writeExportsToMjsFile(to, customMediaJSON, customPropertiesJSON, customSelectorsJSON);
}
}
}
});
return function (_x17) {
return _ref.apply(this, arguments);
};
}()));
}
/* Helper utilities
/* ========================================================================== */
function getObjectWithStringifiedKeys(object) {
return Object.keys(object).reduce((objectJSON, key) => {
objectJSON[key] = String(object[key]);
return objectJSON;
}, {});
}
function writeFile(to, text) {
return new Promise((resolve, reject) => {
fs.writeFile(to, text, error => {
if (error) {
reject(error);
} else {
resolve();
}
});
});
}
function escapeForJS(string) {
return string.replace(/\\([\s\S])|(')/g, '\\$1$2').replace(/\n/g, '\\n').replace(/\r/g, '\\r');
}
var postcss = postcss$1.plugin('postcss-preset-env', opts => {
// initialize options
const features = Object(Object(opts).features);
const insertBefore = Object(Object(opts).insertBefore);
const insertAfter = Object(Object(opts).insertAfter);
const browsers = Object(opts).browsers;
const stage = 'stage' in Object(opts) ? opts.stage === false ? 5 : parseInt(opts.stage) || 0 : 2;
const autoprefixerOptions = Object(opts).autoprefixer;
const sharedOpts = initializeSharedOpts(Object(opts));
const stagedAutoprefixer = autoprefixerOptions === false ? () => {} : autoprefixer(Object.assign({
overrideBrowserslist: browsers
}, autoprefixerOptions)); // polyfillable features (those with an available postcss plugin)
const polyfillableFeatures = cssdb.concat( // additional features to be inserted before cssdb features
getTransformedInsertions(insertBefore, 'insertBefore'), // additional features to be inserted after cssdb features
getTransformedInsertions(insertAfter, 'insertAfter')).filter( // inserted features or features with an available postcss plugin
feature => feature.insertBefore || feature.id in plugins).sort( // features sorted by execution order and then insertion order
(a, b) => idsByExecutionOrder.indexOf(a.id) - idsByExecutionOrder.indexOf(b.id) || (a.insertBefore ? -1 : b.insertBefore ? 1 : 0) || (a.insertAfter ? 1 : b.insertAfter ? -1 : 0)).map( // polyfillable features as an object
feature => {
// target browsers for the polyfill
const unsupportedBrowsers = getUnsupportedBrowsersByFeature(feature.caniuse);
return feature.insertBefore || feature.insertAfter ? {
browsers: unsupportedBrowsers,
plugin: feature.plugin,
id: `${feature.insertBefore ? 'before' : 'after'}-${feature.id}`,
stage: 6
} : {
browsers: unsupportedBrowsers,
plugin: plugins[feature.id],
id: feature.id,
stage: feature.stage
};
}); // staged features (those at or above the selected stage)
const stagedFeatures = polyfillableFeatures.filter(feature => feature.id in features ? features[feature.id] : feature.stage >= stage).map(feature => ({
browsers: feature.browsers,
plugin: typeof feature.plugin.process === 'function' ? features[feature.id] === true ? sharedOpts // if the plugin is enabled and has shared options
? feature.plugin(Object.assign({}, sharedOpts)) // otherwise, if the plugin is enabled
: feature.plugin() : sharedOpts // if the plugin has shared options and individual options
? feature.plugin(Object.assign({}, sharedOpts, features[feature.id])) // if the plugin has individual options
: feature.plugin(Object.assign({}, features[feature.id])) // if the plugin is already initialized
: feature.plugin,
id: feature.id
})); // browsers supported by the configuration
const supportedBrowsers = browserslist(browsers, {
ignoreUnknownVersions: true
}); // features supported by the stage and browsers
const supportedFeatures = stagedFeatures.filter(feature => supportedBrowsers.some(supportedBrowser => browserslist(feature.browsers, {
ignoreUnknownVersions: true
}).some(polyfillBrowser => polyfillBrowser === supportedBrowser)));
return (root, result) => {
// polyfills run in execution order
const polyfills = supportedFeatures.reduce((promise, feature) => promise.then(() => feature.plugin(result.root, result)), Promise.resolve()).then(() => stagedAutoprefixer(result.root, result)).then(() => {
if (Object(opts).exportTo) {
writeToExports(sharedOpts.exportTo, opts.exportTo);
}
});
return polyfills;
};
});
const initializeSharedOpts = opts => {
if ('importFrom' in opts || 'exportTo' in opts || 'preserve' in opts) {
const sharedOpts = {};
if ('importFrom' in opts) {
sharedOpts.importFrom = opts.importFrom;
}
if ('exportTo' in opts) {
sharedOpts.exportTo = {
customMedia: {},
customProperties: {},
customSelectors: {}
};
}
if ('preserve' in opts) {
sharedOpts.preserve = opts.preserve;
}
return sharedOpts;
}
return false;
};
export default postcss;
//# sourceMappingURL=index.mjs.map

1
web/node_modules/postcss-preset-env/index.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

98
web/node_modules/postcss-preset-env/package.json generated vendored Normal file
View file

@ -0,0 +1,98 @@
{
"name": "postcss-preset-env",
"version": "6.7.0",
"description": "Convert modern CSS into something browsers understand",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"repository": "csstools/postcss-preset-env",
"homepage": "https://github.com/csstools/postcss-preset-env#readme",
"bugs": "https://github.com/csstools/postcss-preset-env/issues",
"main": "index.js",
"module": "index.mjs",
"files": [
"index.js",
"index.js.map",
"index.mjs",
"index.mjs.map"
],
"scripts": {
"build": "rollup -c .rollup.js --silent",
"prepublishOnly": "npm test",
"pretest:tape": "npm run build",
"test": "npm run test:js && npm run test:tape",
"test:js": "eslint src/*.js src/lib/*.js src/patch/*.js --cache --ignore-path .gitignore --quiet",
"test:tape": "postcss-tape"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"autoprefixer": "^9.6.1",
"browserslist": "^4.6.4",
"caniuse-lite": "^1.0.30000981",
"css-blank-pseudo": "^0.1.4",
"css-has-pseudo": "^0.10.0",
"css-prefers-color-scheme": "^3.1.1",
"cssdb": "^4.4.0",
"postcss": "^7.0.17",
"postcss-attribute-case-insensitive": "^4.0.1",
"postcss-color-functional-notation": "^2.0.1",
"postcss-color-gray": "^5.0.0",
"postcss-color-hex-alpha": "^5.0.3",
"postcss-color-mod-function": "^3.0.3",
"postcss-color-rebeccapurple": "^4.0.1",
"postcss-custom-media": "^7.0.8",
"postcss-custom-properties": "^8.0.11",
"postcss-custom-selectors": "^5.1.2",
"postcss-dir-pseudo-class": "^5.0.0",
"postcss-double-position-gradients": "^1.0.0",
"postcss-env-function": "^2.0.2",
"postcss-focus-visible": "^4.0.0",
"postcss-focus-within": "^3.0.0",
"postcss-font-variant": "^4.0.0",
"postcss-gap-properties": "^2.0.0",
"postcss-image-set-function": "^3.0.1",
"postcss-initial": "^3.0.0",
"postcss-lab-function": "^2.0.1",
"postcss-logical": "^3.0.0",
"postcss-media-minmax": "^4.0.0",
"postcss-nesting": "^7.0.0",
"postcss-overflow-shorthand": "^2.0.0",
"postcss-page-break": "^2.0.0",
"postcss-place": "^4.0.1",
"postcss-pseudo-class-any-link": "^6.0.0",
"postcss-replace-overflow-wrap": "^3.0.0",
"postcss-selector-matches": "^4.0.0",
"postcss-selector-not": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.2",
"babel-eslint": "^10.0.2",
"eslint": "^5.16.0",
"eslint-config-dev": "^2.0.0",
"postcss-simple-vars": "^5.0.2",
"postcss-tape": "^4.0.0",
"pre-commit": "^1.2.2",
"rollup": "^1.16.6",
"rollup-plugin-babel": "^4.3.3"
},
"eslintConfig": {
"extends": "dev",
"parser": "babel-eslint"
},
"keywords": [
"postcss",
"css",
"postcss-plugin",
"specifications",
"specs",
"features",
"lists",
"stages",
"w3c",
"csswg",
"future",
"next"
]
}