Jesus sucks
This commit is contained in:
108
backend/frontend/node_modules/postcss-preset-env/LICENSE.md
generated
vendored
Normal file
108
backend/frontend/node_modules/postcss-preset-env/LICENSE.md
generated
vendored
Normal 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 person’s 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 Affirmer’s 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 Affirmer’s 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 Affirmer’s 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
|
||||
Affirmer’s 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 Affirmer’s 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 Affirmer’s 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 person’s 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
backend/frontend/node_modules/postcss-preset-env/README.md
generated
vendored
Normal file
381
backend/frontend/node_modules/postcss-preset-env/README.md
generated
vendored
Normal 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/
|
||||
459
backend/frontend/node_modules/postcss-preset-env/index.js
generated
vendored
Normal file
459
backend/frontend/node_modules/postcss-preset-env/index.js
generated
vendored
Normal file
@@ -0,0 +1,459 @@
|
||||
'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`;
|
||||
|
||||
// postcss plugins ordered by id
|
||||
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), []);
|
||||
}
|
||||
|
||||
// return a list of browsers that do not support the 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
backend/frontend/node_modules/postcss-preset-env/index.js.map
generated
vendored
Normal file
1
backend/frontend/node_modules/postcss-preset-env/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
455
backend/frontend/node_modules/postcss-preset-env/index.mjs
generated
vendored
Normal file
455
backend/frontend/node_modules/postcss-preset-env/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,455 @@
|
||||
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`;
|
||||
|
||||
// postcss plugins ordered by id
|
||||
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), []);
|
||||
}
|
||||
|
||||
// return a list of browsers that do not support the 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
backend/frontend/node_modules/postcss-preset-env/index.mjs.map
generated
vendored
Normal file
1
backend/frontend/node_modules/postcss-preset-env/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
backend/frontend/node_modules/postcss-preset-env/node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
1
backend/frontend/node_modules/postcss-preset-env/node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../autoprefixer/bin/autoprefixer
|
||||
20
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
20
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||
|
||||
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.
|
||||
73
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/README.md
generated
vendored
Normal file
73
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/README.md
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
# Autoprefixer [![Cult Of Martians][cult-img]][cult]
|
||||
|
||||
<img align="right" width="94" height="71"
|
||||
src="http://postcss.github.io/autoprefixer/logo.svg"
|
||||
title="Autoprefixer logo by Anton Lovchikov">
|
||||
|
||||
[PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values
|
||||
from [Can I Use]. It is [recommended] by Google and used in Twitter and Alibaba.
|
||||
|
||||
Write your CSS rules without vendor prefixes (in fact, forget about them
|
||||
entirely):
|
||||
|
||||
```css
|
||||
::placeholder {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.image {
|
||||
background-image: url(image@1x.png);
|
||||
}
|
||||
@media (min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Autoprefixer will use the data based on current browser popularity and property
|
||||
support to apply prefixes for you. You can try the [interactive demo]
|
||||
of Autoprefixer.
|
||||
|
||||
```css
|
||||
::-moz-placeholder {
|
||||
color: gray;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
color: gray;
|
||||
}
|
||||
::-ms-input-placeholder {
|
||||
color: gray;
|
||||
}
|
||||
::placeholder {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.image {
|
||||
background-image: url(image@1x.png);
|
||||
}
|
||||
@media (-webkit-min-device-pixel-ratio: 2),
|
||||
(min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Twitter account for news and releases: [@autoprefixer].
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=autoprefixer">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
[interactive demo]: https://autoprefixer.github.io/
|
||||
[@autoprefixer]: https://twitter.com/autoprefixer
|
||||
[recommended]: https://developers.google.com/web/tools/setup/setup-buildtools#dont_trip_up_with_vendor_prefixes
|
||||
[Can I Use]: https://caniuse.com/
|
||||
[cult-img]: http://cultofmartians.com/assets/badges/badge.svg
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
[cult]: http://cultofmartians.com/tasks/autoprefixer-grid.html
|
||||
|
||||
|
||||
## Docs
|
||||
Read **[full docs](https://github.com/postcss/autoprefixer#readme)** on GitHub.
|
||||
714
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
714
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,714 @@
|
||||
"use strict";
|
||||
|
||||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
var unpack = require('caniuse-lite').feature;
|
||||
|
||||
function browsersSort(a, b) {
|
||||
a = a.split(' ');
|
||||
b = b.split(' ');
|
||||
|
||||
if (a[0] > b[0]) {
|
||||
return 1;
|
||||
} else if (a[0] < b[0]) {
|
||||
return -1;
|
||||
} else {
|
||||
return Math.sign(parseFloat(a[1]) - parseFloat(b[1]));
|
||||
}
|
||||
} // Convert Can I Use data
|
||||
|
||||
|
||||
function f(data, opts, callback) {
|
||||
data = unpack(data);
|
||||
|
||||
if (!callback) {
|
||||
var _ref = [opts, {}];
|
||||
callback = _ref[0];
|
||||
opts = _ref[1];
|
||||
}
|
||||
|
||||
var match = opts.match || /\sx($|\s)/;
|
||||
var need = [];
|
||||
|
||||
for (var browser in data.stats) {
|
||||
var versions = data.stats[browser];
|
||||
|
||||
for (var version in versions) {
|
||||
var support = versions[version];
|
||||
|
||||
if (support.match(match)) {
|
||||
need.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
callback(need.sort(browsersSort));
|
||||
} // Add data for all properties
|
||||
|
||||
|
||||
var result = {};
|
||||
|
||||
function prefix(names, data) {
|
||||
for (var _iterator = _createForOfIteratorHelperLoose(names), _step; !(_step = _iterator()).done;) {
|
||||
var name = _step.value;
|
||||
result[name] = Object.assign({}, data);
|
||||
}
|
||||
}
|
||||
|
||||
function add(names, data) {
|
||||
for (var _iterator2 = _createForOfIteratorHelperLoose(names), _step2; !(_step2 = _iterator2()).done;) {
|
||||
var name = _step2.value;
|
||||
result[name].browsers = result[name].browsers.concat(data.browsers).sort(browsersSort);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = result; // Border Radius
|
||||
|
||||
f(require('caniuse-lite/data/features/border-radius'), function (browsers) {
|
||||
return prefix(['border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'], {
|
||||
mistakes: ['-khtml-', '-ms-', '-o-'],
|
||||
feature: 'border-radius',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Box Shadow
|
||||
|
||||
f(require('caniuse-lite/data/features/css-boxshadow'), function (browsers) {
|
||||
return prefix(['box-shadow'], {
|
||||
mistakes: ['-khtml-'],
|
||||
feature: 'css-boxshadow',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Animation
|
||||
|
||||
f(require('caniuse-lite/data/features/css-animation'), function (browsers) {
|
||||
return prefix(['animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes'], {
|
||||
mistakes: ['-khtml-', '-ms-'],
|
||||
feature: 'css-animation',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Transition
|
||||
|
||||
f(require('caniuse-lite/data/features/css-transitions'), function (browsers) {
|
||||
return prefix(['transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function'], {
|
||||
mistakes: ['-khtml-', '-ms-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-transitions'
|
||||
});
|
||||
}); // Transform 2D
|
||||
|
||||
f(require('caniuse-lite/data/features/transforms2d'), function (browsers) {
|
||||
return prefix(['transform', 'transform-origin'], {
|
||||
feature: 'transforms2d',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Transform 3D
|
||||
|
||||
var transforms3d = require('caniuse-lite/data/features/transforms3d');
|
||||
|
||||
f(transforms3d, function (browsers) {
|
||||
prefix(['perspective', 'perspective-origin'], {
|
||||
feature: 'transforms3d',
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix(['transform-style'], {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
browsers: browsers,
|
||||
feature: 'transforms3d'
|
||||
});
|
||||
});
|
||||
f(transforms3d, {
|
||||
match: /y\sx|y\s#2/
|
||||
}, function (browsers) {
|
||||
return prefix(['backface-visibility'], {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
feature: 'transforms3d',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Gradients
|
||||
|
||||
var gradients = require('caniuse-lite/data/features/css-gradients');
|
||||
|
||||
f(gradients, {
|
||||
match: /y\sx/
|
||||
}, function (browsers) {
|
||||
return prefix(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
mistakes: ['-ms-'],
|
||||
feature: 'css-gradients',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(gradients, {
|
||||
match: /a\sx/
|
||||
}, function (browsers) {
|
||||
browsers = browsers.map(function (i) {
|
||||
if (/firefox|op/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " old";
|
||||
}
|
||||
});
|
||||
return add(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
|
||||
feature: 'css-gradients',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Box sizing
|
||||
|
||||
f(require('caniuse-lite/data/features/css3-boxsizing'), function (browsers) {
|
||||
return prefix(['box-sizing'], {
|
||||
feature: 'css3-boxsizing',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Filter Effects
|
||||
|
||||
f(require('caniuse-lite/data/features/css-filters'), function (browsers) {
|
||||
return prefix(['filter'], {
|
||||
feature: 'css-filters',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // filter() function
|
||||
|
||||
f(require('caniuse-lite/data/features/css-filter-function'), function (browsers) {
|
||||
return prefix(['filter-function'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-filter-function',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Backdrop-filter
|
||||
|
||||
var backdrop = require('caniuse-lite/data/features/css-backdrop-filter');
|
||||
|
||||
f(backdrop, {
|
||||
match: /y\sx|y\s#2/
|
||||
}, function (browsers) {
|
||||
return prefix(['backdrop-filter'], {
|
||||
feature: 'css-backdrop-filter',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // element() function
|
||||
|
||||
f(require('caniuse-lite/data/features/css-element-function'), function (browsers) {
|
||||
return prefix(['element'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-element-function',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Multicolumns
|
||||
|
||||
f(require('caniuse-lite/data/features/multicolumn'), function (browsers) {
|
||||
prefix(['columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-count', 'column-rule-style', 'column-span', 'column-fill'], {
|
||||
feature: 'multicolumn',
|
||||
browsers: browsers
|
||||
});
|
||||
var noff = browsers.filter(function (i) {
|
||||
return !/firefox/.test(i);
|
||||
});
|
||||
prefix(['break-before', 'break-after', 'break-inside'], {
|
||||
feature: 'multicolumn',
|
||||
browsers: noff
|
||||
});
|
||||
}); // User select
|
||||
|
||||
f(require('caniuse-lite/data/features/user-select-none'), function (browsers) {
|
||||
return prefix(['user-select'], {
|
||||
mistakes: ['-khtml-'],
|
||||
feature: 'user-select-none',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Flexible Box Layout
|
||||
|
||||
var flexbox = require('caniuse-lite/data/features/flexbox');
|
||||
|
||||
f(flexbox, {
|
||||
match: /a\sx/
|
||||
}, function (browsers) {
|
||||
browsers = browsers.map(function (i) {
|
||||
if (/ie|firefox/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " 2009";
|
||||
}
|
||||
});
|
||||
prefix(['display-flex', 'inline-flex'], {
|
||||
props: ['display'],
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(flexbox, {
|
||||
match: /y\sx/
|
||||
}, function (browsers) {
|
||||
add(['display-flex', 'inline-flex'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
add(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // calc() unit
|
||||
|
||||
f(require('caniuse-lite/data/features/calc'), function (browsers) {
|
||||
return prefix(['calc'], {
|
||||
props: ['*'],
|
||||
feature: 'calc',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Background options
|
||||
|
||||
f(require('caniuse-lite/data/features/background-img-opts'), function (browsers) {
|
||||
return prefix(['background-origin', 'background-size'], {
|
||||
feature: 'background-img-opts',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // background-clip: text
|
||||
|
||||
f(require('caniuse-lite/data/features/background-clip-text'), function (browsers) {
|
||||
return prefix(['background-clip'], {
|
||||
feature: 'background-clip-text',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Font feature settings
|
||||
|
||||
f(require('caniuse-lite/data/features/font-feature'), function (browsers) {
|
||||
return prefix(['font-feature-settings', 'font-variant-ligatures', 'font-language-override'], {
|
||||
feature: 'font-feature',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS font-kerning property
|
||||
|
||||
f(require('caniuse-lite/data/features/font-kerning'), function (browsers) {
|
||||
return prefix(['font-kerning'], {
|
||||
feature: 'font-kerning',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Border image
|
||||
|
||||
f(require('caniuse-lite/data/features/border-image'), function (browsers) {
|
||||
return prefix(['border-image'], {
|
||||
feature: 'border-image',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Selection selector
|
||||
|
||||
f(require('caniuse-lite/data/features/css-selection'), function (browsers) {
|
||||
return prefix(['::selection'], {
|
||||
selector: true,
|
||||
feature: 'css-selection',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Placeholder selector
|
||||
|
||||
f(require('caniuse-lite/data/features/css-placeholder'), function (browsers) {
|
||||
prefix(['::placeholder'], {
|
||||
selector: true,
|
||||
feature: 'css-placeholder',
|
||||
browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old'])
|
||||
});
|
||||
}); // Placeholder-shown selector
|
||||
|
||||
f(require('caniuse-lite/data/features/css-placeholder-shown'), function (browsers) {
|
||||
prefix([':placeholder-shown'], {
|
||||
selector: true,
|
||||
feature: 'css-placeholder-shown',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Hyphenation
|
||||
|
||||
f(require('caniuse-lite/data/features/css-hyphens'), function (browsers) {
|
||||
return prefix(['hyphens'], {
|
||||
feature: 'css-hyphens',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Fullscreen selector
|
||||
|
||||
var fullscreen = require('caniuse-lite/data/features/fullscreen');
|
||||
|
||||
f(fullscreen, function (browsers) {
|
||||
return prefix([':fullscreen'], {
|
||||
selector: true,
|
||||
feature: 'fullscreen',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(fullscreen, {
|
||||
match: /x(\s#2|$)/
|
||||
}, function (browsers) {
|
||||
return prefix(['::backdrop'], {
|
||||
selector: true,
|
||||
feature: 'fullscreen',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Tab size
|
||||
|
||||
f(require('caniuse-lite/data/features/css3-tabsize'), function (browsers) {
|
||||
return prefix(['tab-size'], {
|
||||
feature: 'css3-tabsize',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Intrinsic & extrinsic sizing
|
||||
|
||||
var intrinsic = require('caniuse-lite/data/features/intrinsic-width');
|
||||
|
||||
var sizeProps = ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'];
|
||||
f(intrinsic, function (browsers) {
|
||||
return prefix(['max-content', 'min-content'], {
|
||||
props: sizeProps,
|
||||
feature: 'intrinsic-width',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(intrinsic, {
|
||||
match: /x|\s#4/
|
||||
}, function (browsers) {
|
||||
return prefix(['fill', 'fill-available', 'stretch'], {
|
||||
props: sizeProps,
|
||||
feature: 'intrinsic-width',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(intrinsic, {
|
||||
match: /x|\s#5/
|
||||
}, function (browsers) {
|
||||
return prefix(['fit-content'], {
|
||||
props: sizeProps,
|
||||
feature: 'intrinsic-width',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Zoom cursors
|
||||
|
||||
f(require('caniuse-lite/data/features/css3-cursors-newer'), function (browsers) {
|
||||
return prefix(['zoom-in', 'zoom-out'], {
|
||||
props: ['cursor'],
|
||||
feature: 'css3-cursors-newer',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Grab cursors
|
||||
|
||||
f(require('caniuse-lite/data/features/css3-cursors-grab'), function (browsers) {
|
||||
return prefix(['grab', 'grabbing'], {
|
||||
props: ['cursor'],
|
||||
feature: 'css3-cursors-grab',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Sticky position
|
||||
|
||||
f(require('caniuse-lite/data/features/css-sticky'), function (browsers) {
|
||||
return prefix(['sticky'], {
|
||||
props: ['position'],
|
||||
feature: 'css-sticky',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Pointer Events
|
||||
|
||||
f(require('caniuse-lite/data/features/pointer'), function (browsers) {
|
||||
return prefix(['touch-action'], {
|
||||
feature: 'pointer',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Text decoration
|
||||
|
||||
var decoration = require('caniuse-lite/data/features/text-decoration');
|
||||
|
||||
f(decoration, function (browsers) {
|
||||
return prefix(['text-decoration-style', 'text-decoration-color', 'text-decoration-line', 'text-decoration'], {
|
||||
feature: 'text-decoration',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(decoration, {
|
||||
match: /x.*#[235]/
|
||||
}, function (browsers) {
|
||||
return prefix(['text-decoration-skip', 'text-decoration-skip-ink'], {
|
||||
feature: 'text-decoration',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Text Size Adjust
|
||||
|
||||
f(require('caniuse-lite/data/features/text-size-adjust'), function (browsers) {
|
||||
return prefix(['text-size-adjust'], {
|
||||
feature: 'text-size-adjust',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS Masks
|
||||
|
||||
f(require('caniuse-lite/data/features/css-masks'), function (browsers) {
|
||||
prefix(['mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source'], {
|
||||
feature: 'css-masks',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice'], {
|
||||
feature: 'css-masks',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS clip-path property
|
||||
|
||||
f(require('caniuse-lite/data/features/css-clip-path'), function (browsers) {
|
||||
return prefix(['clip-path'], {
|
||||
feature: 'css-clip-path',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Fragmented Borders and Backgrounds
|
||||
|
||||
f(require('caniuse-lite/data/features/css-boxdecorationbreak'), function (browsers) {
|
||||
return prefix(['box-decoration-break'], {
|
||||
feature: 'css-boxdecorationbreak',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS3 object-fit/object-position
|
||||
|
||||
f(require('caniuse-lite/data/features/object-fit'), function (browsers) {
|
||||
return prefix(['object-fit', 'object-position'], {
|
||||
feature: 'object-fit',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS Shapes
|
||||
|
||||
f(require('caniuse-lite/data/features/css-shapes'), function (browsers) {
|
||||
return prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], {
|
||||
feature: 'css-shapes',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS3 text-overflow
|
||||
|
||||
f(require('caniuse-lite/data/features/text-overflow'), function (browsers) {
|
||||
return prefix(['text-overflow'], {
|
||||
feature: 'text-overflow',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Viewport at-rule
|
||||
|
||||
f(require('caniuse-lite/data/features/css-deviceadaptation'), function (browsers) {
|
||||
return prefix(['@viewport'], {
|
||||
feature: 'css-deviceadaptation',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Resolution Media Queries
|
||||
|
||||
var resolut = require('caniuse-lite/data/features/css-media-resolution');
|
||||
|
||||
f(resolut, {
|
||||
match: /( x($| )|a #2)/
|
||||
}, function (browsers) {
|
||||
return prefix(['@resolution'], {
|
||||
feature: 'css-media-resolution',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS text-align-last
|
||||
|
||||
f(require('caniuse-lite/data/features/css-text-align-last'), function (browsers) {
|
||||
return prefix(['text-align-last'], {
|
||||
feature: 'css-text-align-last',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Crisp Edges Image Rendering Algorithm
|
||||
|
||||
var crispedges = require('caniuse-lite/data/features/css-crisp-edges');
|
||||
|
||||
f(crispedges, {
|
||||
match: /y x|a x #1/
|
||||
}, function (browsers) {
|
||||
return prefix(['pixelated'], {
|
||||
props: ['image-rendering'],
|
||||
feature: 'css-crisp-edges',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(crispedges, {
|
||||
match: /a x #2/
|
||||
}, function (browsers) {
|
||||
return prefix(['image-rendering'], {
|
||||
feature: 'css-crisp-edges',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Logical Properties
|
||||
|
||||
var logicalProps = require('caniuse-lite/data/features/css-logical-props');
|
||||
|
||||
f(logicalProps, function (browsers) {
|
||||
return prefix(['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end'], {
|
||||
feature: 'css-logical-props',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(logicalProps, {
|
||||
match: /x\s#2/
|
||||
}, function (browsers) {
|
||||
return prefix(['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end'], {
|
||||
feature: 'css-logical-props',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS appearance
|
||||
|
||||
var appearance = require('caniuse-lite/data/features/css-appearance');
|
||||
|
||||
f(appearance, {
|
||||
match: /#2|x/
|
||||
}, function (browsers) {
|
||||
return prefix(['appearance'], {
|
||||
feature: 'css-appearance',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS Scroll snap points
|
||||
|
||||
f(require('caniuse-lite/data/features/css-snappoints'), function (browsers) {
|
||||
return prefix(['scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y'], {
|
||||
feature: 'css-snappoints',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS Regions
|
||||
|
||||
f(require('caniuse-lite/data/features/css-regions'), function (browsers) {
|
||||
return prefix(['flow-into', 'flow-from', 'region-fragment'], {
|
||||
feature: 'css-regions',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS image-set
|
||||
|
||||
f(require('caniuse-lite/data/features/css-image-set'), function (browsers) {
|
||||
return prefix(['image-set'], {
|
||||
props: ['background', 'background-image', 'border-image', 'cursor', 'mask', 'mask-image', 'list-style', 'list-style-image', 'content'],
|
||||
feature: 'css-image-set',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Writing Mode
|
||||
|
||||
var writingMode = require('caniuse-lite/data/features/css-writing-mode');
|
||||
|
||||
f(writingMode, {
|
||||
match: /a|x/
|
||||
}, function (browsers) {
|
||||
return prefix(['writing-mode'], {
|
||||
feature: 'css-writing-mode',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Cross-Fade Function
|
||||
|
||||
f(require('caniuse-lite/data/features/css-cross-fade'), function (browsers) {
|
||||
return prefix(['cross-fade'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-cross-fade',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Read Only selector
|
||||
|
||||
f(require('caniuse-lite/data/features/css-read-only-write'), function (browsers) {
|
||||
return prefix([':read-only', ':read-write'], {
|
||||
selector: true,
|
||||
feature: 'css-read-only-write',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // Text Emphasize
|
||||
|
||||
f(require('caniuse-lite/data/features/text-emphasis'), function (browsers) {
|
||||
return prefix(['text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color'], {
|
||||
feature: 'text-emphasis',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS Grid Layout
|
||||
|
||||
var grid = require('caniuse-lite/data/features/css-grid');
|
||||
|
||||
f(grid, function (browsers) {
|
||||
prefix(['display-grid', 'inline-grid'], {
|
||||
props: ['display'],
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas', 'place-self'], {
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(grid, {
|
||||
match: /a x/
|
||||
}, function (browsers) {
|
||||
return prefix(['grid-column-align', 'grid-row-align'], {
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // CSS text-spacing
|
||||
|
||||
f(require('caniuse-lite/data/features/css-text-spacing'), function (browsers) {
|
||||
return prefix(['text-spacing'], {
|
||||
feature: 'css-text-spacing',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // :any-link selector
|
||||
|
||||
f(require('caniuse-lite/data/features/css-any-link'), function (browsers) {
|
||||
return prefix([':any-link'], {
|
||||
selector: true,
|
||||
feature: 'css-any-link',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // unicode-bidi
|
||||
|
||||
var bidi = require('caniuse-lite/data/features/css-unicode-bidi');
|
||||
|
||||
f(bidi, function (browsers) {
|
||||
return prefix(['isolate'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(bidi, {
|
||||
match: /y x|a x #2/
|
||||
}, function (browsers) {
|
||||
return prefix(['plaintext'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
f(bidi, {
|
||||
match: /y x/
|
||||
}, function (browsers) {
|
||||
return prefix(['isolate-override'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // overscroll-behavior selector
|
||||
|
||||
var over = require('caniuse-lite/data/features/css-overscroll-behavior');
|
||||
|
||||
f(over, {
|
||||
match: /a #1/
|
||||
}, function (browsers) {
|
||||
return prefix(['overscroll-behavior'], {
|
||||
feature: 'css-overscroll-behavior',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // color-adjust
|
||||
|
||||
f(require('caniuse-lite/data/features/css-color-adjust'), function (browsers) {
|
||||
return prefix(['color-adjust'], {
|
||||
feature: 'css-color-adjust',
|
||||
browsers: browsers
|
||||
});
|
||||
}); // text-orientation
|
||||
|
||||
f(require('caniuse-lite/data/features/css-text-orientation'), function (browsers) {
|
||||
return prefix(['text-orientation'], {
|
||||
feature: 'css-text-orientation',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
30
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/package.json
generated
vendored
Normal file
30
backend/frontend/node_modules/postcss-preset-env/node_modules/autoprefixer/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "autoprefixer",
|
||||
"version": "9.8.8",
|
||||
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
||||
"keywords": [
|
||||
"autoprefixer",
|
||||
"css",
|
||||
"prefix",
|
||||
"postcss",
|
||||
"postcss-plugin"
|
||||
],
|
||||
"bin": "./bin/autoprefixer",
|
||||
"funding": {
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
|
||||
},
|
||||
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
||||
"license": "MIT",
|
||||
"repository": "postcss/autoprefixer",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.12.0",
|
||||
"caniuse-lite": "^1.0.30001109",
|
||||
"normalize-range": "^0.1.2",
|
||||
"num2fraction": "^1.2.2",
|
||||
"picocolors": "^0.2.1",
|
||||
"postcss": "^7.0.32",
|
||||
"postcss-value-parser": "^4.1.0"
|
||||
},
|
||||
"main": "lib/autoprefixer"
|
||||
}
|
||||
15
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/LICENSE
generated
vendored
Normal file
15
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
23
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/README.md
generated
vendored
Normal file
23
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/README.md
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# picocolors
|
||||
|
||||
npm install picocolors
|
||||
|
||||
A tinier and faster alternative to [nanocolors](https://github.com/ai/nanocolors). Andrey, are you even trying?
|
||||
|
||||
```javascript
|
||||
import pc from "picocolors";
|
||||
|
||||
console.log(pc.green(`How are ${pc.italic(`you`)} doing?`));
|
||||
```
|
||||
|
||||
- Up to [2x faster and 2x smaller](#benchmarks) than alternatives
|
||||
- 3x faster and 10x smaller than `chalk`
|
||||
- [TypeScript](https://www.typescriptlang.org/) support
|
||||
- [`NO_COLOR`](https://no-color.org/) friendly
|
||||
- Node.js v6+ & browsers support
|
||||
- The same API, but faster, much faster
|
||||
- No `String.prototype` modifications (anyone still doing it?)
|
||||
- No dependencies and the smallest `node_modules` footprint
|
||||
|
||||
## Docs
|
||||
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
|
||||
25
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/package.json
generated
vendored
Normal file
25
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/package.json
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "picocolors",
|
||||
"version": "0.2.1",
|
||||
"main": "./picocolors.js",
|
||||
"types": "./picocolors.d.ts",
|
||||
"browser": {
|
||||
"./picocolors.js": "./picocolors.browser.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"description": "The tiniest and the fastest coloring library ever",
|
||||
"files": [
|
||||
"picocolors.*",
|
||||
"types.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"terminal",
|
||||
"colors",
|
||||
"formatting",
|
||||
"cli",
|
||||
"console"
|
||||
],
|
||||
"author": "Alexey Raspopov",
|
||||
"repository": "alexeyraspopov/picocolors",
|
||||
"license": "ISC"
|
||||
}
|
||||
4
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.browser.js
generated
vendored
Normal file
4
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.browser.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
var x=String;
|
||||
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};
|
||||
module.exports=create();
|
||||
module.exports.createColors = create;
|
||||
5
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.d.ts
generated
vendored
Normal file
5
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Colors } from "./types"
|
||||
|
||||
declare const picocolors: Colors & { createColors: (enabled: boolean) => Colors }
|
||||
|
||||
export = picocolors
|
||||
60
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.js
generated
vendored
Normal file
60
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/picocolors.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
let tty = require("tty")
|
||||
|
||||
let isColorSupported =
|
||||
!("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
|
||||
("FORCE_COLOR" in process.env ||
|
||||
process.argv.includes("--color") ||
|
||||
process.platform === "win32" ||
|
||||
(tty.isatty(1) && process.env.TERM !== "dumb") ||
|
||||
"CI" in process.env)
|
||||
|
||||
function formatter(open, close, replace = open) {
|
||||
return (input) => {
|
||||
let string = "" + input
|
||||
let index = string.indexOf(close, open.length)
|
||||
return !~index
|
||||
? open + string + close
|
||||
: open + replaceClose(string, close, replace, index) + close
|
||||
}
|
||||
}
|
||||
|
||||
function replaceClose(string, close, replace, index) {
|
||||
let start = string.substring(0, index) + replace
|
||||
let end = string.substring(index + close.length)
|
||||
let nextIndex = end.indexOf(close)
|
||||
return !~nextIndex ? start + end : start + replaceClose(end, close, replace, nextIndex)
|
||||
}
|
||||
|
||||
function createColors(enabled = isColorSupported) {
|
||||
return {
|
||||
isColorSupported: enabled,
|
||||
reset: enabled ? (s) => `\x1b[0m${s}\x1b[0m` : String,
|
||||
bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
|
||||
dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
|
||||
italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
|
||||
underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
|
||||
inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
|
||||
hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
|
||||
strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
|
||||
black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
|
||||
red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
|
||||
green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
|
||||
yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
|
||||
blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
|
||||
magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
|
||||
cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
|
||||
white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
|
||||
gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
|
||||
bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
|
||||
bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
|
||||
bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
|
||||
bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
|
||||
bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
|
||||
bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
|
||||
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
|
||||
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = createColors()
|
||||
module.exports.createColors = createColors
|
||||
30
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/types.ts
generated
vendored
Normal file
30
backend/frontend/node_modules/postcss-preset-env/node_modules/picocolors/types.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
export type Formatter = (input: string | number | null | undefined) => string
|
||||
|
||||
export interface Colors {
|
||||
isColorSupported: boolean
|
||||
reset: Formatter
|
||||
bold: Formatter
|
||||
dim: Formatter
|
||||
italic: Formatter
|
||||
underline: Formatter
|
||||
inverse: Formatter
|
||||
hidden: Formatter
|
||||
strikethrough: Formatter
|
||||
black: Formatter
|
||||
red: Formatter
|
||||
green: Formatter
|
||||
yellow: Formatter
|
||||
blue: Formatter
|
||||
magenta: Formatter
|
||||
cyan: Formatter
|
||||
white: Formatter
|
||||
gray: Formatter
|
||||
bgBlack: Formatter
|
||||
bgRed: Formatter
|
||||
bgGreen: Formatter
|
||||
bgYellow: Formatter
|
||||
bgBlue: Formatter
|
||||
bgMagenta: Formatter
|
||||
bgCyan: Formatter
|
||||
bgWhite: Formatter
|
||||
}
|
||||
128
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/CHANGELOG.md
generated
vendored
Normal file
128
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
# Changes to PostCSS Nesting
|
||||
|
||||
### 7.0.1 (July 29, 2018)
|
||||
|
||||
- Fixed: Non-breaking issue with rules being unnecessarily split
|
||||
|
||||
### 7.0.0 (September 17, 2018)
|
||||
|
||||
- Updated: Support for PostCSS v7+
|
||||
- Updated: Support for Node v6+
|
||||
|
||||
In a comment, a CSSWG member expressed interest in handling nested `@media`
|
||||
while handling selector nesting. Since the specification has yet to be added
|
||||
to the official CSSWG repository, nested at-rule deprecation is further delayed.
|
||||
|
||||
### 6.0.0 (June 9, 2018)
|
||||
|
||||
- Deprecated: Nested at-rules like `@media` will no longer work in 7.0.0
|
||||
- Refactored code to improve efficiency
|
||||
|
||||
### 5.0.0 (March 24, 2018)
|
||||
|
||||
- Refactored code to use Imports babel-transformed for Node v4 compatibility
|
||||
|
||||
### 4.2.1 (September 19, 2017)
|
||||
|
||||
- Updated: Exposing the transform function as its own for postcss-extend
|
||||
|
||||
### 4.2.0 (September 18, 2017)
|
||||
|
||||
- Added: Reduced splitting of rules
|
||||
|
||||
### 4.1.0 (August 19, 2017)
|
||||
|
||||
- Added: Mutation-safe walk method
|
||||
- Improved: Complex selector validity testing
|
||||
- Thanks: A special thanks to @JLHwung for these improvements
|
||||
|
||||
### 4.0.1 (May 22, 2017)
|
||||
|
||||
- Improved: Selector validity testing
|
||||
|
||||
### 4.0.0 (May 20, 2017)
|
||||
|
||||
- Changed: Transform only compliant nesting
|
||||
- Added: Preserve more raws formatting
|
||||
|
||||
### 3.0.0 (May 8, 2017)
|
||||
|
||||
- Added: Node 4.x support
|
||||
- Added: PostCSS 6 support
|
||||
- Added: Preserved ordering
|
||||
- Removed: Node 0.12 support
|
||||
|
||||
### 2.3.1 (March 16, 2016)
|
||||
|
||||
- Updated: Allow any direct nesting that follows the syntactic constraints
|
||||
- Updated: PostCSS 5.0.6
|
||||
- Updated: Tests
|
||||
- Updated: Dependencies
|
||||
- Updated: Project configuration
|
||||
|
||||
### 2.3.0 (February 20, 2016)
|
||||
|
||||
- Updated: JavaScript formatting, linting, tests, and documentation
|
||||
- Updated: Properly concatenate at-rules with or expressions
|
||||
- Updated: Update internal plugin name to postcss-nesting
|
||||
|
||||
### 2.2.0 (January 30, 2016)
|
||||
|
||||
- Added: Nesting of all at-rules
|
||||
- Updated: Direct nesting order maintains order
|
||||
- Updated: Tests and documentation
|
||||
|
||||
### 2.1.1 (January 3, 2016)
|
||||
|
||||
- Updated: Project conventions
|
||||
|
||||
### 2.1.0 (January 3, 2016)
|
||||
|
||||
- Added: Support for valid direct nesting
|
||||
|
||||
### 2.0.6 (October 15, 2015)
|
||||
|
||||
- Fixed: Issue with new PostCSS rules
|
||||
|
||||
### 2.0.5 (October 12, 2015)
|
||||
|
||||
- Updated: Nested rules source map to the parent rule
|
||||
- Updated: PostCSS 5.0.9
|
||||
- Updated: Tests and documentation
|
||||
- Updated: Project configuration
|
||||
|
||||
### 2.0.4 (September 23, 2015)
|
||||
|
||||
- Updated: Map source raws
|
||||
|
||||
### 2.0.3 (September 22, 2015)
|
||||
|
||||
- Updated: Refactored plugin
|
||||
- Updated: Tests
|
||||
- Updated: PostCSS 5.0.6
|
||||
|
||||
### 2.0.2 (September 16, 2015)
|
||||
|
||||
- Fixed: Issue where the new rule’s children were not mapped to the parent internally
|
||||
|
||||
### 2.0.1 (September 16, 2015)
|
||||
|
||||
- Fixed: Issue where a `@nest` rule followed by another bubbling at-rule would not bubble
|
||||
- Added: CONTRIBUTING.md
|
||||
|
||||
### 2.0.0 (September 16, 2015)
|
||||
|
||||
- Added: Requirement of `&` per the specification
|
||||
- Added: New prefix option
|
||||
- Added: `@document` and `@supports` as bubbles
|
||||
- Updated: Documentation
|
||||
|
||||
### 1.0.0 (September 15, 2015)
|
||||
|
||||
- Added: New `@nest` at-rule syntax
|
||||
- Updated: PostCSS 5
|
||||
- Removed: Old inner bracket syntax
|
||||
|
||||
### 0.1.0 (June 17, 2015)
|
||||
|
||||
- Added: Initial release
|
||||
108
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/LICENSE.md
generated
vendored
Normal file
108
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/LICENSE.md
generated
vendored
Normal 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 person’s 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 Affirmer’s 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 Affirmer’s 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 Affirmer’s 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
|
||||
Affirmer’s 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 Affirmer’s 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 Affirmer’s 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 person’s 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/.
|
||||
79
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/README.md
generated
vendored
Normal file
79
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/README.md
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
# PostCSS Nesting [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
|
||||
|
||||
[![NPM Version][npm-img]][npm-url]
|
||||
[![CSS Standard Status][css-img]][css-url]
|
||||
[![Build Status][cli-img]][cli-url]
|
||||
[![Support Chat][git-img]][git-url]
|
||||
|
||||
[PostCSS Nesting] lets you nest style rules inside each other, following the
|
||||
[CSS Nesting] specification.
|
||||
|
||||
```pcss
|
||||
a, b {
|
||||
color: red;
|
||||
|
||||
& c, & d {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
/* becomes */
|
||||
|
||||
a, b {
|
||||
color: red;
|
||||
}
|
||||
|
||||
a c, a d, b c, b d {
|
||||
color: white;
|
||||
}
|
||||
```
|
||||
|
||||
**NOTICE**: In a future version of this project, nesting at-rules like `@media`
|
||||
may be deprecated, as they are not part of the nesting proposal. In a comment,
|
||||
a CSSWG member expressed interest in handling nested `@media` while handling
|
||||
selector nesting. So deprecating nested at-rules has been temporarily delayed.
|
||||
|
||||
## Usage
|
||||
|
||||
Add [PostCSS Nesting] to your project:
|
||||
|
||||
```bash
|
||||
npm install postcss-nesting --save-dev
|
||||
```
|
||||
|
||||
Use [PostCSS Nesting] to process your CSS:
|
||||
|
||||
```js
|
||||
import postcssNesting from 'postcss-nesting';
|
||||
|
||||
postcssNesting.process(YOUR_CSS /*, processOptions, pluginOptions */);
|
||||
```
|
||||
|
||||
Or use it as a [PostCSS] plugin:
|
||||
|
||||
```js
|
||||
import postcss from 'postcss';
|
||||
import postcssNesting from 'postcss-nesting';
|
||||
|
||||
postcss([
|
||||
postcssNesting(/* pluginOptions */)
|
||||
]).process(YOUR_CSS /*, processOptions */);
|
||||
```
|
||||
|
||||
[PostCSS Nesting] runs in all Node environments, with special instructions for:
|
||||
|
||||
| [Node](INSTALL.md#node) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
|
||||
| --- | --- | --- | --- | --- |
|
||||
|
||||
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-nesting.svg
|
||||
[cli-url]: https://travis-ci.org/jonathantneal/postcss-nesting
|
||||
[css-img]: https://cssdb.org/badge/nesting-rules.svg
|
||||
[css-url]: https://cssdb.org/#nesting-rules
|
||||
[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-nesting.svg
|
||||
[npm-url]: https://www.npmjs.com/package/postcss-nesting
|
||||
|
||||
[CSS Nesting]: https://drafts.csswg.org/css-nesting-1/
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
[PostCSS Nesting]: https://github.com/jonathantneal/postcss-nesting
|
||||
134
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/index.cjs.js
generated
vendored
Normal file
134
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/index.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
'use strict';
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var postcss = require('postcss');
|
||||
var postcss__default = _interopDefault(postcss);
|
||||
|
||||
function shiftNodesBeforeParent(node) {
|
||||
const parent = node.parent;
|
||||
const index = parent.index(node); // conditionally move previous siblings into a clone of the parent
|
||||
|
||||
if (index) {
|
||||
parent.cloneBefore().removeAll().append(parent.nodes.slice(0, index));
|
||||
} // move the current node before the parent (and after the conditional clone)
|
||||
|
||||
|
||||
parent.before(node);
|
||||
return parent;
|
||||
}
|
||||
|
||||
function cleanupParent(parent) {
|
||||
if (!parent.nodes.length) {
|
||||
parent.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// a valid selector is an ampersand followed by a non-word character or nothing
|
||||
var validSelector = /&(?:[^\w-|]|$)/;
|
||||
const replaceable = /&/g;
|
||||
|
||||
function mergeSelectors(fromSelectors, toSelectors) {
|
||||
return fromSelectors.reduce((selectors, fromSelector) => selectors.concat(toSelectors.map(toSelector => toSelector.replace(replaceable, fromSelector))), []);
|
||||
}
|
||||
|
||||
function transformRuleWithinRule(node) {
|
||||
// move previous siblings and the node to before the parent
|
||||
const parent = shiftNodesBeforeParent(node); // update the selectors of the node to be merged with the parent
|
||||
|
||||
node.selectors = mergeSelectors(parent.selectors, node.selectors); // merge similar rules back together
|
||||
// eslint-disable-next-line no-extra-parens
|
||||
|
||||
const areSameRule = node.type === 'rule' && parent.type === 'rule' && node.selector === parent.selector || node.type === 'atrule' && parent.type === 'atrule' && node.params === parent.params;
|
||||
|
||||
if (areSameRule) {
|
||||
node.append(...parent.nodes);
|
||||
} // conditionally cleanup an empty parent rule
|
||||
|
||||
|
||||
cleanupParent(parent);
|
||||
}
|
||||
const isRuleWithinRule = node => node.type === 'rule' && Object(node.parent).type === 'rule' && node.selectors.every(selector => selector.trim().lastIndexOf('&') === 0 && validSelector.test(selector));
|
||||
|
||||
const comma = postcss.list.comma;
|
||||
function transformNestRuleWithinRule(node) {
|
||||
// move previous siblings and the node to before the parent
|
||||
const parent = shiftNodesBeforeParent(node); // clone the parent as a new rule with children appended to it
|
||||
|
||||
const rule = parent.clone().removeAll().append(node.nodes); // replace the node with the new rule
|
||||
|
||||
node.replaceWith(rule); // update the selectors of the node to be merged with the parent
|
||||
|
||||
rule.selectors = mergeSelectors(parent.selectors, comma(node.params)); // conditionally cleanup an empty parent rule
|
||||
|
||||
cleanupParent(parent); // walk the children of the new rule
|
||||
|
||||
walk(rule);
|
||||
}
|
||||
const isNestRuleWithinRule = node => node.type === 'atrule' && node.name === 'nest' && Object(node.parent).type === 'rule' && comma(node.params).every(selector => selector.split('&').length === 2 && validSelector.test(selector));
|
||||
|
||||
var validAtrules = ['document', 'media', 'supports'];
|
||||
|
||||
/*
|
||||
* DEPRECATED: In v7.0.0 these features will be removed as they are not part of
|
||||
* the nesting proposal.
|
||||
*/
|
||||
|
||||
function atruleWithinRule(node) {
|
||||
// move previous siblings and the node to before the parent
|
||||
const parent = shiftNodesBeforeParent(node); // clone the parent as a new rule with children appended to it
|
||||
|
||||
const rule = parent.clone().removeAll().append(node.nodes); // append the new rule to the node
|
||||
|
||||
node.append(rule); // conditionally cleanup an empty parent rule
|
||||
|
||||
cleanupParent(parent); // walk the children of the new rule
|
||||
|
||||
walk(rule);
|
||||
}
|
||||
const isAtruleWithinRule = node => node.type === 'atrule' && validAtrules.indexOf(node.name) !== -1 && Object(node.parent).type === 'rule';
|
||||
|
||||
const comma$1 = postcss.list.comma;
|
||||
function mergeParams(fromParams, toParams) {
|
||||
return comma$1(fromParams).map(params1 => comma$1(toParams).map(params2 => `${params1} and ${params2}`).join(', ')).join(', ');
|
||||
}
|
||||
|
||||
/*
|
||||
* DEPRECATED: In v7.0.0 these features will be removed as they are not part of
|
||||
* the nesting proposal.
|
||||
*/
|
||||
|
||||
function transformAtruleWithinAtrule(node) {
|
||||
// move previous siblings and the node to before the parent
|
||||
const parent = shiftNodesBeforeParent(node); // update the params of the node to be merged with the parent
|
||||
|
||||
node.params = mergeParams(parent.params, node.params); // conditionally cleanup an empty parent rule
|
||||
|
||||
cleanupParent(parent);
|
||||
}
|
||||
const isAtruleWithinAtrule = node => node.type === 'atrule' && validAtrules.indexOf(node.name) !== -1 && Object(node.parent).type === 'atrule' && node.name === node.parent.name;
|
||||
|
||||
function walk(node) {
|
||||
node.nodes.slice(0).forEach(child => {
|
||||
if (child.parent === node) {
|
||||
if (isRuleWithinRule(child)) {
|
||||
transformRuleWithinRule(child);
|
||||
} else if (isNestRuleWithinRule(child)) {
|
||||
transformNestRuleWithinRule(child);
|
||||
} else if (isAtruleWithinRule(child)) {
|
||||
atruleWithinRule(child);
|
||||
} else if (isAtruleWithinAtrule(child)) {
|
||||
transformAtruleWithinAtrule(child);
|
||||
}
|
||||
|
||||
if (Object(child.nodes).length) {
|
||||
walk(child);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var index = postcss__default.plugin('postcss-nesting', () => walk);
|
||||
|
||||
module.exports = index;
|
||||
//# sourceMappingURL=index.cjs.js.map
|
||||
63
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/package.json
generated
vendored
Normal file
63
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss-nesting/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "postcss-nesting",
|
||||
"version": "7.0.1",
|
||||
"description": "Nest style rules inside each other",
|
||||
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
|
||||
"license": "CC0-1.0",
|
||||
"repository": "jonathantneal/postcss-nesting",
|
||||
"homepage": "https://github.com/jonathantneal/postcss-nesting#readme",
|
||||
"bugs": "https://github.com/jonathantneal/postcss-nesting/issues",
|
||||
"main": "index.cjs.js",
|
||||
"module": "index.es.js",
|
||||
"files": [
|
||||
"index.cjs.js",
|
||||
"index.es.js"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm test",
|
||||
"pretest": "rollup -c .rollup.js --silent",
|
||||
"test": "echo 'Running tests...'; npm run test:js && npm run test:tape",
|
||||
"test:js": "eslint *.js lib/*.js --cache --ignore-path .gitignore --quiet",
|
||||
"test:tape": "postcss-tape"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss": "^7.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/preset-env": "^7.0.0",
|
||||
"babel-eslint": "^9.0.0",
|
||||
"babel-plugin-array-includes": "^2.0.3",
|
||||
"eslint": "^5.6.0",
|
||||
"eslint-config-dev": "^2.0.0",
|
||||
"postcss-tape": "^2.2.0",
|
||||
"pre-commit": "^1.2.2",
|
||||
"rollup": "^0.66.0",
|
||||
"rollup-plugin-babel": "^4.0.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "dev",
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"css",
|
||||
"postcss-plugin",
|
||||
"atrules",
|
||||
"child",
|
||||
"children",
|
||||
"cssnext",
|
||||
"nested",
|
||||
"nestings",
|
||||
"rules",
|
||||
"selectors",
|
||||
"syntax",
|
||||
"specifications",
|
||||
"specs",
|
||||
"w3c",
|
||||
"csswg"
|
||||
]
|
||||
}
|
||||
20
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/LICENSE
generated
vendored
Normal file
20
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||
|
||||
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.
|
||||
43
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/README.md
generated
vendored
Normal file
43
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/README.md
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# PostCSS [![Gitter][chat-img]][chat]
|
||||
|
||||
<img align="right" width="95" height="95"
|
||||
alt="Philosopher’s stone, logo of PostCSS"
|
||||
src="http://postcss.github.io/postcss/logo.svg">
|
||||
|
||||
[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg
|
||||
[chat]: https://gitter.im/postcss/postcss
|
||||
|
||||
PostCSS is a tool for transforming styles with JS plugins.
|
||||
These plugins can lint your CSS, support variables and mixins,
|
||||
transpile future CSS syntax, inline images, and more.
|
||||
|
||||
PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba,
|
||||
and JetBrains. The [Autoprefixer] PostCSS plugin is one of the most popular
|
||||
CSS processors.
|
||||
|
||||
PostCSS takes a CSS file and provides an API to analyze and modify its rules
|
||||
(by transforming them into an [Abstract Syntax Tree]).
|
||||
This API can then be used by [plugins] to do a lot of useful things,
|
||||
e.g. to find errors automatically insert vendor prefixes.
|
||||
|
||||
**Support / Discussion:** [Gitter](https://gitter.im/postcss/postcss)<br>
|
||||
**Twitter account:** [@postcss](https://twitter.com/postcss)<br>
|
||||
**VK.com page:** [postcss](https://vk.com/postcss)<br>
|
||||
**中文翻译**: [`README-cn.md`](./README-cn.md)
|
||||
|
||||
For PostCSS commercial support (consulting, improving the front-end culture
|
||||
of your company, PostCSS plugins), contact [Evil Martians]
|
||||
at <surrender@evilmartians.com>.
|
||||
|
||||
[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
|
||||
[Evil Martians]: https://evilmartians.com/?utm_source=postcss
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
[plugins]: https://github.com/postcss/postcss#plugins
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=postcss">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
||||
alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
## Docs
|
||||
Read **[full docs](https://github.com/postcss/postcss#readme)** on GitHub.
|
||||
37
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/package.json
generated
vendored
Normal file
37
backend/frontend/node_modules/postcss-preset-env/node_modules/postcss/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "postcss",
|
||||
"version": "7.0.39",
|
||||
"description": "Tool for transforming styles with JS plugins",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"postcss",
|
||||
"rework",
|
||||
"preprocessor",
|
||||
"parser",
|
||||
"source map",
|
||||
"transform",
|
||||
"manipulation",
|
||||
"transpiler"
|
||||
],
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://postcss.org/",
|
||||
"repository": "postcss/postcss",
|
||||
"dependencies": {
|
||||
"picocolors": "^0.2.1",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"main": "lib/postcss",
|
||||
"types": "lib/postcss.d.ts",
|
||||
"browser": {
|
||||
"./lib/terminal-highlight": false,
|
||||
"fs": false
|
||||
}
|
||||
}
|
||||
301
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/CHANGELOG.md
generated
vendored
Normal file
301
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,301 @@
|
||||
# Change Log
|
||||
|
||||
## 0.5.6
|
||||
|
||||
* Fix for regression when people were using numbers as names in source maps. See
|
||||
#236.
|
||||
|
||||
## 0.5.5
|
||||
|
||||
* Fix "regression" of unsupported, implementation behavior that half the world
|
||||
happens to have come to depend on. See #235.
|
||||
|
||||
* Fix regression involving function hoisting in SpiderMonkey. See #233.
|
||||
|
||||
## 0.5.4
|
||||
|
||||
* Large performance improvements to source-map serialization. See #228 and #229.
|
||||
|
||||
## 0.5.3
|
||||
|
||||
* Do not include unnecessary distribution files. See
|
||||
commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86.
|
||||
|
||||
## 0.5.2
|
||||
|
||||
* Include browser distributions of the library in package.json's `files`. See
|
||||
issue #212.
|
||||
|
||||
## 0.5.1
|
||||
|
||||
* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See
|
||||
ff05274becc9e6e1295ed60f3ea090d31d843379.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
* Node 0.8 is no longer supported.
|
||||
|
||||
* Use webpack instead of dryice for bundling.
|
||||
|
||||
* Big speedups serializing source maps. See pull request #203.
|
||||
|
||||
* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that
|
||||
explicitly start with the source root. See issue #199.
|
||||
|
||||
## 0.4.4
|
||||
|
||||
* Fix an issue where using a `SourceMapGenerator` after having created a
|
||||
`SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See
|
||||
issue #191.
|
||||
|
||||
* Fix an issue with where `SourceMapGenerator` would mistakenly consider
|
||||
different mappings as duplicates of each other and avoid generating them. See
|
||||
issue #192.
|
||||
|
||||
## 0.4.3
|
||||
|
||||
* A very large number of performance improvements, particularly when parsing
|
||||
source maps. Collectively about 75% of time shaved off of the source map
|
||||
parsing benchmark!
|
||||
|
||||
* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy
|
||||
searching in the presence of a column option. See issue #177.
|
||||
|
||||
* Fix a bug with joining a source and its source root when the source is above
|
||||
the root. See issue #182.
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to
|
||||
determine when all sources' contents are inlined into the source map. See
|
||||
issue #190.
|
||||
|
||||
## 0.4.2
|
||||
|
||||
* Add an `.npmignore` file so that the benchmarks aren't pulled down by
|
||||
dependent projects. Issue #169.
|
||||
|
||||
* Add an optional `column` argument to
|
||||
`SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines
|
||||
with no mappings. Issues #172 and #173.
|
||||
|
||||
## 0.4.1
|
||||
|
||||
* Fix accidentally defining a global variable. #170.
|
||||
|
||||
## 0.4.0
|
||||
|
||||
* The default direction for fuzzy searching was changed back to its original
|
||||
direction. See #164.
|
||||
|
||||
* There is now a `bias` option you can supply to `SourceMapConsumer` to control
|
||||
the fuzzy searching direction. See #167.
|
||||
|
||||
* About an 8% speed up in parsing source maps. See #159.
|
||||
|
||||
* Added a benchmark for parsing and generating source maps.
|
||||
|
||||
## 0.3.0
|
||||
|
||||
* Change the default direction that searching for positions fuzzes when there is
|
||||
not an exact match. See #154.
|
||||
|
||||
* Support for environments using json2.js for JSON serialization. See #156.
|
||||
|
||||
## 0.2.0
|
||||
|
||||
* Support for consuming "indexed" source maps which do not have any remote
|
||||
sections. See pull request #127. This introduces a minor backwards
|
||||
incompatibility if you are monkey patching `SourceMapConsumer.prototype`
|
||||
methods.
|
||||
|
||||
## 0.1.43
|
||||
|
||||
* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue
|
||||
#148 for some discussion and issues #150, #151, and #152 for implementations.
|
||||
|
||||
## 0.1.42
|
||||
|
||||
* Fix an issue where `SourceNode`s from different versions of the source-map
|
||||
library couldn't be used in conjunction with each other. See issue #142.
|
||||
|
||||
## 0.1.41
|
||||
|
||||
* Fix a bug with getting the source content of relative sources with a "./"
|
||||
prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768).
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the
|
||||
column span of each mapping.
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find
|
||||
all generated positions associated with a given original source and line.
|
||||
|
||||
## 0.1.40
|
||||
|
||||
* Performance improvements for parsing source maps in SourceMapConsumer.
|
||||
|
||||
## 0.1.39
|
||||
|
||||
* Fix a bug where setting a source's contents to null before any source content
|
||||
had been set before threw a TypeError. See issue #131.
|
||||
|
||||
## 0.1.38
|
||||
|
||||
* Fix a bug where finding relative paths from an empty path were creating
|
||||
absolute paths. See issue #129.
|
||||
|
||||
## 0.1.37
|
||||
|
||||
* Fix a bug where if the source root was an empty string, relative source paths
|
||||
would turn into absolute source paths. Issue #124.
|
||||
|
||||
## 0.1.36
|
||||
|
||||
* Allow the `names` mapping property to be an empty string. Issue #121.
|
||||
|
||||
## 0.1.35
|
||||
|
||||
* A third optional parameter was added to `SourceNode.fromStringWithSourceMap`
|
||||
to specify a path that relative sources in the second parameter should be
|
||||
relative to. Issue #105.
|
||||
|
||||
* If no file property is given to a `SourceMapGenerator`, then the resulting
|
||||
source map will no longer have a `null` file property. The property will
|
||||
simply not exist. Issue #104.
|
||||
|
||||
* Fixed a bug where consecutive newlines were ignored in `SourceNode`s.
|
||||
Issue #116.
|
||||
|
||||
## 0.1.34
|
||||
|
||||
* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103.
|
||||
|
||||
* Fix bug involving source contents and the
|
||||
`SourceMapGenerator.prototype.applySourceMap`. Issue #100.
|
||||
|
||||
## 0.1.33
|
||||
|
||||
* Fix some edge cases surrounding path joining and URL resolution.
|
||||
|
||||
* Add a third parameter for relative path to
|
||||
`SourceMapGenerator.prototype.applySourceMap`.
|
||||
|
||||
* Fix issues with mappings and EOLs.
|
||||
|
||||
## 0.1.32
|
||||
|
||||
* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns
|
||||
(issue 92).
|
||||
|
||||
* Fixed test runner to actually report number of failed tests as its process
|
||||
exit code.
|
||||
|
||||
* Fixed a typo when reporting bad mappings (issue 87).
|
||||
|
||||
## 0.1.31
|
||||
|
||||
* Delay parsing the mappings in SourceMapConsumer until queried for a source
|
||||
location.
|
||||
|
||||
* Support Sass source maps (which at the time of writing deviate from the spec
|
||||
in small ways) in SourceMapConsumer.
|
||||
|
||||
## 0.1.30
|
||||
|
||||
* Do not join source root with a source, when the source is a data URI.
|
||||
|
||||
* Extend the test runner to allow running single specific test files at a time.
|
||||
|
||||
* Performance improvements in `SourceNode.prototype.walk` and
|
||||
`SourceMapConsumer.prototype.eachMapping`.
|
||||
|
||||
* Source map browser builds will now work inside Workers.
|
||||
|
||||
* Better error messages when attempting to add an invalid mapping to a
|
||||
`SourceMapGenerator`.
|
||||
|
||||
## 0.1.29
|
||||
|
||||
* Allow duplicate entries in the `names` and `sources` arrays of source maps
|
||||
(usually from TypeScript) we are parsing. Fixes github issue 72.
|
||||
|
||||
## 0.1.28
|
||||
|
||||
* Skip duplicate mappings when creating source maps from SourceNode; github
|
||||
issue 75.
|
||||
|
||||
## 0.1.27
|
||||
|
||||
* Don't throw an error when the `file` property is missing in SourceMapConsumer,
|
||||
we don't use it anyway.
|
||||
|
||||
## 0.1.26
|
||||
|
||||
* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70.
|
||||
|
||||
## 0.1.25
|
||||
|
||||
* Make compatible with browserify
|
||||
|
||||
## 0.1.24
|
||||
|
||||
* Fix issue with absolute paths and `file://` URIs. See
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=885597
|
||||
|
||||
## 0.1.23
|
||||
|
||||
* Fix issue with absolute paths and sourcesContent, github issue 64.
|
||||
|
||||
## 0.1.22
|
||||
|
||||
* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21.
|
||||
|
||||
## 0.1.21
|
||||
|
||||
* Fixed handling of sources that start with a slash so that they are relative to
|
||||
the source root's host.
|
||||
|
||||
## 0.1.20
|
||||
|
||||
* Fixed github issue #43: absolute URLs aren't joined with the source root
|
||||
anymore.
|
||||
|
||||
## 0.1.19
|
||||
|
||||
* Using Travis CI to run tests.
|
||||
|
||||
## 0.1.18
|
||||
|
||||
* Fixed a bug in the handling of sourceRoot.
|
||||
|
||||
## 0.1.17
|
||||
|
||||
* Added SourceNode.fromStringWithSourceMap.
|
||||
|
||||
## 0.1.16
|
||||
|
||||
* Added missing documentation.
|
||||
|
||||
* Fixed the generating of empty mappings in SourceNode.
|
||||
|
||||
## 0.1.15
|
||||
|
||||
* Added SourceMapGenerator.applySourceMap.
|
||||
|
||||
## 0.1.14
|
||||
|
||||
* The sourceRoot is now handled consistently.
|
||||
|
||||
## 0.1.13
|
||||
|
||||
* Added SourceMapGenerator.fromSourceMap.
|
||||
|
||||
## 0.1.12
|
||||
|
||||
* SourceNode now generates empty mappings too.
|
||||
|
||||
## 0.1.11
|
||||
|
||||
* Added name support to SourceNode.
|
||||
|
||||
## 0.1.10
|
||||
|
||||
* Added sourcesContent support to the customer and generator.
|
||||
28
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/LICENSE
generated
vendored
Normal file
28
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of the Mozilla Foundation nor the names of project
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
742
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/README.md
generated
vendored
Normal file
742
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/README.md
generated
vendored
Normal file
@@ -0,0 +1,742 @@
|
||||
# Source Map
|
||||
|
||||
[](https://travis-ci.org/mozilla/source-map)
|
||||
|
||||
[](https://www.npmjs.com/package/source-map)
|
||||
|
||||
This is a library to generate and consume the source map format
|
||||
[described here][format].
|
||||
|
||||
[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
|
||||
|
||||
## Use with Node
|
||||
|
||||
$ npm install source-map
|
||||
|
||||
## Use on the Web
|
||||
|
||||
<script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
<!-- `npm run toc` to regenerate the Table of Contents -->
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of Contents
|
||||
|
||||
- [Examples](#examples)
|
||||
- [Consuming a source map](#consuming-a-source-map)
|
||||
- [Generating a source map](#generating-a-source-map)
|
||||
- [With SourceNode (high level API)](#with-sourcenode-high-level-api)
|
||||
- [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
|
||||
- [API](#api)
|
||||
- [SourceMapConsumer](#sourcemapconsumer)
|
||||
- [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
|
||||
- [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
|
||||
- [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
|
||||
- [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
|
||||
- [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
|
||||
- [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
|
||||
- [SourceMapGenerator](#sourcemapgenerator)
|
||||
- [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
|
||||
- [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
|
||||
- [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
|
||||
- [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
|
||||
- [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
|
||||
- [SourceNode](#sourcenode)
|
||||
- [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
|
||||
- [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
|
||||
- [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
|
||||
- [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
|
||||
- [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
|
||||
- [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
|
||||
- [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
|
||||
- [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
|
||||
- [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
|
||||
- [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Examples
|
||||
|
||||
### Consuming a source map
|
||||
|
||||
```js
|
||||
var rawSourceMap = {
|
||||
version: 3,
|
||||
file: 'min.js',
|
||||
names: ['bar', 'baz', 'n'],
|
||||
sources: ['one.js', 'two.js'],
|
||||
sourceRoot: 'http://example.com/www/js/',
|
||||
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
||||
};
|
||||
|
||||
var smc = new SourceMapConsumer(rawSourceMap);
|
||||
|
||||
console.log(smc.sources);
|
||||
// [ 'http://example.com/www/js/one.js',
|
||||
// 'http://example.com/www/js/two.js' ]
|
||||
|
||||
console.log(smc.originalPositionFor({
|
||||
line: 2,
|
||||
column: 28
|
||||
}));
|
||||
// { source: 'http://example.com/www/js/two.js',
|
||||
// line: 2,
|
||||
// column: 10,
|
||||
// name: 'n' }
|
||||
|
||||
console.log(smc.generatedPositionFor({
|
||||
source: 'http://example.com/www/js/two.js',
|
||||
line: 2,
|
||||
column: 10
|
||||
}));
|
||||
// { line: 2, column: 28 }
|
||||
|
||||
smc.eachMapping(function (m) {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
### Generating a source map
|
||||
|
||||
In depth guide:
|
||||
[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
|
||||
|
||||
#### With SourceNode (high level API)
|
||||
|
||||
```js
|
||||
function compile(ast) {
|
||||
switch (ast.type) {
|
||||
case 'BinaryExpression':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
[compile(ast.left), " + ", compile(ast.right)]
|
||||
);
|
||||
case 'Literal':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
String(ast.value)
|
||||
);
|
||||
// ...
|
||||
default:
|
||||
throw new Error("Bad AST");
|
||||
}
|
||||
}
|
||||
|
||||
var ast = parse("40 + 2", "add.js");
|
||||
console.log(compile(ast).toStringWithSourceMap({
|
||||
file: 'add.js'
|
||||
}));
|
||||
// { code: '40 + 2',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
|
||||
#### With SourceMapGenerator (low level API)
|
||||
|
||||
```js
|
||||
var map = new SourceMapGenerator({
|
||||
file: "source-mapped.js"
|
||||
});
|
||||
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: 10,
|
||||
column: 35
|
||||
},
|
||||
source: "foo.js",
|
||||
original: {
|
||||
line: 33,
|
||||
column: 2
|
||||
},
|
||||
name: "christopher"
|
||||
});
|
||||
|
||||
console.log(map.toString());
|
||||
// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Get a reference to the module:
|
||||
|
||||
```js
|
||||
// Node.js
|
||||
var sourceMap = require('source-map');
|
||||
|
||||
// Browser builds
|
||||
var sourceMap = window.sourceMap;
|
||||
|
||||
// Inside Firefox
|
||||
const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
|
||||
```
|
||||
|
||||
### SourceMapConsumer
|
||||
|
||||
A SourceMapConsumer instance represents a parsed source map which we can query
|
||||
for information about the original file positions by giving it a file position
|
||||
in the generated source.
|
||||
|
||||
#### new SourceMapConsumer(rawSourceMap)
|
||||
|
||||
The only parameter is the raw source map (either as a string which can be
|
||||
`JSON.parse`'d, or an object). According to the spec, source maps have the
|
||||
following attributes:
|
||||
|
||||
* `version`: Which version of the source map spec this map is following.
|
||||
|
||||
* `sources`: An array of URLs to the original source files.
|
||||
|
||||
* `names`: An array of identifiers which can be referenced by individual
|
||||
mappings.
|
||||
|
||||
* `sourceRoot`: Optional. The URL root from which all sources are relative.
|
||||
|
||||
* `sourcesContent`: Optional. An array of contents of the original source files.
|
||||
|
||||
* `mappings`: A string of base64 VLQs which contain the actual mappings.
|
||||
|
||||
* `file`: Optional. The generated filename this source map is associated with.
|
||||
|
||||
```js
|
||||
var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.computeColumnSpans()
|
||||
|
||||
Compute the last column for each generated mapping. The last column is
|
||||
inclusive.
|
||||
|
||||
```js
|
||||
// Before:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
|
||||
consumer.computeColumnSpans();
|
||||
|
||||
// After:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1,
|
||||
// lastColumn: 9 },
|
||||
// { line: 2,
|
||||
// column: 10,
|
||||
// lastColumn: 19 },
|
||||
// { line: 2,
|
||||
// column: 20,
|
||||
// lastColumn: Infinity } ]
|
||||
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
|
||||
|
||||
Returns the original source, line, and column information for the generated
|
||||
source's line and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `line`: The line number in the generated source. Line numbers in
|
||||
this library are 1-based (note that the underlying source map
|
||||
specification uses 0-based line numbers -- this library handles the
|
||||
translation).
|
||||
|
||||
* `column`: The column number in the generated source. Column numbers
|
||||
in this library are 0-based.
|
||||
|
||||
* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
|
||||
`SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
|
||||
element that is smaller than or greater than the one we are searching for,
|
||||
respectively, if the exact element cannot be found. Defaults to
|
||||
`SourceMapConsumer.GREATEST_LOWER_BOUND`.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `source`: The original source file, or null if this information is not
|
||||
available.
|
||||
|
||||
* `line`: The line number in the original source, or null if this information is
|
||||
not available. The line number is 1-based.
|
||||
|
||||
* `column`: The column number in the original source, or null if this
|
||||
information is not available. The column number is 0-based.
|
||||
|
||||
* `name`: The original identifier, or null if this information is not available.
|
||||
|
||||
```js
|
||||
consumer.originalPositionFor({ line: 2, column: 10 })
|
||||
// { source: 'foo.coffee',
|
||||
// line: 2,
|
||||
// column: 2,
|
||||
// name: null }
|
||||
|
||||
consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
|
||||
// { source: null,
|
||||
// line: null,
|
||||
// column: null,
|
||||
// name: null }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
|
||||
|
||||
Returns the generated line and column information for the original source,
|
||||
line, and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source. The line number is
|
||||
1-based.
|
||||
|
||||
* `column`: The column number in the original source. The column
|
||||
number is 0-based.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null. The line
|
||||
number is 1-based.
|
||||
|
||||
* `column`: The column number in the generated source, or null. The
|
||||
column number is 0-based.
|
||||
|
||||
```js
|
||||
consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
|
||||
// { line: 1,
|
||||
// column: 56 }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
|
||||
|
||||
Returns all generated line and column information for the original source, line,
|
||||
and column provided. If no column is provided, returns all mappings
|
||||
corresponding to a either the line we are searching for or the next closest line
|
||||
that has any mappings. Otherwise, returns all mappings corresponding to the
|
||||
given line and either the column we are searching for or the next closest column
|
||||
that has any offsets.
|
||||
|
||||
The only argument is an object with the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source. The line number is
|
||||
1-based.
|
||||
|
||||
* `column`: Optional. The column number in the original source. The
|
||||
column number is 0-based.
|
||||
|
||||
and an array of objects is returned, each with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null. The line
|
||||
number is 1-based.
|
||||
|
||||
* `column`: The column number in the generated source, or null. The
|
||||
column number is 0-based.
|
||||
|
||||
```js
|
||||
consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
|
||||
|
||||
Return true if we have the embedded source content for every source listed in
|
||||
the source map, false otherwise.
|
||||
|
||||
In other words, if this method returns `true`, then
|
||||
`consumer.sourceContentFor(s)` will succeed for every source `s` in
|
||||
`consumer.sources`.
|
||||
|
||||
```js
|
||||
// ...
|
||||
if (consumer.hasContentsOfAllSources()) {
|
||||
consumerReadyCallback(consumer);
|
||||
} else {
|
||||
fetchSources(consumer, consumerReadyCallback);
|
||||
}
|
||||
// ...
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
|
||||
|
||||
Returns the original source content for the source provided. The only
|
||||
argument is the URL of the original source file.
|
||||
|
||||
If the source content for the given source is not found, then an error is
|
||||
thrown. Optionally, pass `true` as the second param to have `null` returned
|
||||
instead.
|
||||
|
||||
```js
|
||||
consumer.sources
|
||||
// [ "my-cool-lib.clj" ]
|
||||
|
||||
consumer.sourceContentFor("my-cool-lib.clj")
|
||||
// "..."
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map");
|
||||
// Error: "this is not in the source map" is not in the source map
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map", true);
|
||||
// null
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
|
||||
|
||||
Iterate over each mapping between an original source/line/column and a
|
||||
generated line/column in this source map.
|
||||
|
||||
* `callback`: The function that is called with each mapping. Mappings have the
|
||||
form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
|
||||
name }`
|
||||
|
||||
* `context`: Optional. If specified, this object will be the value of `this`
|
||||
every time that `callback` is called.
|
||||
|
||||
* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
|
||||
`SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
|
||||
the mappings sorted by the generated file's line/column order or the
|
||||
original's source/line/column order, respectively. Defaults to
|
||||
`SourceMapConsumer.GENERATED_ORDER`.
|
||||
|
||||
```js
|
||||
consumer.eachMapping(function (m) { console.log(m); })
|
||||
// ...
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 1,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 1,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 2,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 2,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// ...
|
||||
```
|
||||
### SourceMapGenerator
|
||||
|
||||
An instance of the SourceMapGenerator represents a source map which is being
|
||||
built incrementally.
|
||||
|
||||
#### new SourceMapGenerator([startOfSourceMap])
|
||||
|
||||
You may pass an object with the following properties:
|
||||
|
||||
* `file`: The filename of the generated source that this source map is
|
||||
associated with.
|
||||
|
||||
* `sourceRoot`: A root for all relative URLs in this source map.
|
||||
|
||||
* `skipValidation`: Optional. When `true`, disables validation of mappings as
|
||||
they are added. This can improve performance but should be used with
|
||||
discretion, as a last resort. Even then, one should avoid using this flag when
|
||||
running tests, if possible.
|
||||
|
||||
```js
|
||||
var generator = new sourceMap.SourceMapGenerator({
|
||||
file: "my-generated-javascript-file.js",
|
||||
sourceRoot: "http://example.com/app/js/"
|
||||
});
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
|
||||
|
||||
Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
|
||||
|
||||
* `sourceMapConsumer` The SourceMap.
|
||||
|
||||
```js
|
||||
var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.addMapping(mapping)
|
||||
|
||||
Add a single mapping from original source line and column to the generated
|
||||
source's line and column for this source map being created. The mapping object
|
||||
should have the following properties:
|
||||
|
||||
* `generated`: An object with the generated line and column positions.
|
||||
|
||||
* `original`: An object with the original line and column positions.
|
||||
|
||||
* `source`: The original source file (relative to the sourceRoot).
|
||||
|
||||
* `name`: An optional original token name for this mapping.
|
||||
|
||||
```js
|
||||
generator.addMapping({
|
||||
source: "module-one.scm",
|
||||
original: { line: 128, column: 0 },
|
||||
generated: { line: 3, column: 456 }
|
||||
})
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for an original source file.
|
||||
|
||||
* `sourceFile` the URL of the original source file.
|
||||
|
||||
* `sourceContent` the content of the source file.
|
||||
|
||||
```js
|
||||
generator.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
|
||||
|
||||
Applies a SourceMap for a source file to the SourceMap.
|
||||
Each mapping to the supplied source file is rewritten using the
|
||||
supplied SourceMap. Note: The resolution for the resulting mappings
|
||||
is the minimum of this map and the supplied map.
|
||||
|
||||
* `sourceMapConsumer`: The SourceMap to be applied.
|
||||
|
||||
* `sourceFile`: Optional. The filename of the source file.
|
||||
If omitted, sourceMapConsumer.file will be used, if it exists.
|
||||
Otherwise an error will be thrown.
|
||||
|
||||
* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
|
||||
to be applied. If relative, it is relative to the SourceMap.
|
||||
|
||||
This parameter is needed when the two SourceMaps aren't in the same
|
||||
directory, and the SourceMap to be applied contains relative source
|
||||
paths. If so, those relative source paths need to be rewritten
|
||||
relative to the SourceMap.
|
||||
|
||||
If omitted, it is assumed that both SourceMaps are in the same directory,
|
||||
thus not needing any rewriting. (Supplying `'.'` has the same effect.)
|
||||
|
||||
#### SourceMapGenerator.prototype.toString()
|
||||
|
||||
Renders the source map being generated to a string.
|
||||
|
||||
```js
|
||||
generator.toString()
|
||||
// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
|
||||
```
|
||||
|
||||
### SourceNode
|
||||
|
||||
SourceNodes provide a way to abstract over interpolating and/or concatenating
|
||||
snippets of generated JavaScript source code, while maintaining the line and
|
||||
column information associated between those snippets and the original source
|
||||
code. This is useful as the final intermediate representation a compiler might
|
||||
use before outputting the generated JS and source map.
|
||||
|
||||
#### new SourceNode([line, column, source[, chunk[, name]]])
|
||||
|
||||
* `line`: The original line number associated with this source node, or null if
|
||||
it isn't associated with an original line. The line number is 1-based.
|
||||
|
||||
* `column`: The original column number associated with this source node, or null
|
||||
if it isn't associated with an original column. The column number
|
||||
is 0-based.
|
||||
|
||||
* `source`: The original source's filename; null if no filename is provided.
|
||||
|
||||
* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
|
||||
below.
|
||||
|
||||
* `name`: Optional. The original identifier.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.cpp", [
|
||||
new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
|
||||
new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
|
||||
new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
|
||||
]);
|
||||
```
|
||||
|
||||
#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
|
||||
|
||||
Creates a SourceNode from generated code and a SourceMapConsumer.
|
||||
|
||||
* `code`: The generated code
|
||||
|
||||
* `sourceMapConsumer` The SourceMap for the generated code
|
||||
|
||||
* `relativePath` The optional path that relative sources in `sourceMapConsumer`
|
||||
should be relative to.
|
||||
|
||||
```js
|
||||
var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
|
||||
var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
|
||||
consumer);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.add(chunk)
|
||||
|
||||
Add a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.add(" + ");
|
||||
node.add(otherNode);
|
||||
node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.prepend(chunk)
|
||||
|
||||
Prepend a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.prepend("/** Build Id: f783haef86324gf **/\n\n");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for a source file. This will be added to the
|
||||
`SourceMap` in the `sourcesContent` field.
|
||||
|
||||
* `sourceFile`: The filename of the source file
|
||||
|
||||
* `sourceContent`: The content of the source file
|
||||
|
||||
```js
|
||||
node.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walk(fn)
|
||||
|
||||
Walk over the tree of JS snippets in this node and its children. The walking
|
||||
function is called once for each snippet of JS and is passed that snippet and
|
||||
the its original associated source's line/column location.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.walk(function (code, loc) { console.log("WALK:", code, loc); })
|
||||
// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
|
||||
// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walkSourceContents(fn)
|
||||
|
||||
Walk over the tree of SourceNodes. The walking function is called for each
|
||||
source file content and is passed the filename and source content.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var a = new SourceNode(1, 2, "a.js", "generated from a");
|
||||
a.setSourceContent("a.js", "original a");
|
||||
var b = new SourceNode(1, 2, "b.js", "generated from b");
|
||||
b.setSourceContent("b.js", "original b");
|
||||
var c = new SourceNode(1, 2, "c.js", "generated from c");
|
||||
c.setSourceContent("c.js", "original c");
|
||||
|
||||
var node = new SourceNode(null, null, null, [a, b, c]);
|
||||
node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
|
||||
// WALK: a.js : original a
|
||||
// WALK: b.js : original b
|
||||
// WALK: c.js : original c
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.join(sep)
|
||||
|
||||
Like `Array.prototype.join` except for SourceNodes. Inserts the separator
|
||||
between each of this source node's children.
|
||||
|
||||
* `sep`: The separator.
|
||||
|
||||
```js
|
||||
var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
|
||||
var operand = new SourceNode(3, 4, "a.rs", "=");
|
||||
var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
|
||||
|
||||
var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
|
||||
var joinedNode = node.join(" ");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.replaceRight(pattern, replacement)
|
||||
|
||||
Call `String.prototype.replace` on the very right-most source snippet. Useful
|
||||
for trimming white space from the end of a source node, etc.
|
||||
|
||||
* `pattern`: The pattern to replace.
|
||||
|
||||
* `replacement`: The thing to replace the pattern with.
|
||||
|
||||
```js
|
||||
// Trim trailing white space.
|
||||
node.replaceRight(/\s*$/, "");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toString()
|
||||
|
||||
Return the string representation of this source node. Walks over the tree and
|
||||
concatenates all the various snippets together to one string.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toString()
|
||||
// 'unodostresquatro'
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
|
||||
|
||||
Returns the string representation of this tree of source nodes, plus a
|
||||
SourceMapGenerator which contains all the mappings between the generated and
|
||||
original sources.
|
||||
|
||||
The arguments are the same as those to `new SourceMapGenerator`.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toStringWithSourceMap({ file: "my-output-file.js" })
|
||||
// { code: 'unodostresquatro',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
73
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/package.json
generated
vendored
Normal file
73
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/package.json
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "source-map",
|
||||
"description": "Generates and consumes source maps",
|
||||
"version": "0.6.1",
|
||||
"homepage": "https://github.com/mozilla/source-map",
|
||||
"author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",
|
||||
"contributors": [
|
||||
"Tobias Koppers <tobias.koppers@googlemail.com>",
|
||||
"Duncan Beevers <duncan@dweebd.com>",
|
||||
"Stephen Crane <scrane@mozilla.com>",
|
||||
"Ryan Seddon <seddon.ryan@gmail.com>",
|
||||
"Miles Elam <miles.elam@deem.com>",
|
||||
"Mihai Bazon <mihai.bazon@gmail.com>",
|
||||
"Michael Ficarra <github.public.email@michael.ficarra.me>",
|
||||
"Todd Wolfson <todd@twolfson.com>",
|
||||
"Alexander Solovyov <alexander@solovyov.net>",
|
||||
"Felix Gnass <fgnass@gmail.com>",
|
||||
"Conrad Irwin <conrad.irwin@gmail.com>",
|
||||
"usrbincc <usrbincc@yahoo.com>",
|
||||
"David Glasser <glasser@davidglasser.net>",
|
||||
"Chase Douglas <chase@newrelic.com>",
|
||||
"Evan Wallace <evan.exe@gmail.com>",
|
||||
"Heather Arthur <fayearthur@gmail.com>",
|
||||
"Hugh Kennedy <hughskennedy@gmail.com>",
|
||||
"David Glasser <glasser@davidglasser.net>",
|
||||
"Simon Lydell <simon.lydell@gmail.com>",
|
||||
"Jmeas Smith <jellyes2@gmail.com>",
|
||||
"Michael Z Goddard <mzgoddard@gmail.com>",
|
||||
"azu <azu@users.noreply.github.com>",
|
||||
"John Gozde <john@gozde.ca>",
|
||||
"Adam Kirkton <akirkton@truefitinnovation.com>",
|
||||
"Chris Montgomery <christopher.montgomery@dowjones.com>",
|
||||
"J. Ryan Stinnett <jryans@gmail.com>",
|
||||
"Jack Herrington <jherrington@walmartlabs.com>",
|
||||
"Chris Truter <jeffpalentine@gmail.com>",
|
||||
"Daniel Espeset <daniel@danielespeset.com>",
|
||||
"Jamie Wong <jamie.lf.wong@gmail.com>",
|
||||
"Eddy Bruël <ejpbruel@mozilla.com>",
|
||||
"Hawken Rives <hawkrives@gmail.com>",
|
||||
"Gilad Peleg <giladp007@gmail.com>",
|
||||
"djchie <djchie.dev@gmail.com>",
|
||||
"Gary Ye <garysye@gmail.com>",
|
||||
"Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/mozilla/source-map.git"
|
||||
},
|
||||
"main": "./source-map.js",
|
||||
"files": [
|
||||
"source-map.js",
|
||||
"source-map.d.ts",
|
||||
"lib/",
|
||||
"dist/source-map.debug.js",
|
||||
"dist/source-map.js",
|
||||
"dist/source-map.min.js",
|
||||
"dist/source-map.min.js.map"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"license": "BSD-3-Clause",
|
||||
"scripts": {
|
||||
"test": "npm run build && node test/run-tests.js",
|
||||
"build": "webpack --color",
|
||||
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
|
||||
},
|
||||
"devDependencies": {
|
||||
"doctoc": "^0.15.0",
|
||||
"webpack": "^1.12.0"
|
||||
},
|
||||
"typings": "source-map"
|
||||
}
|
||||
98
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/source-map.d.ts
generated
vendored
Normal file
98
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/source-map.d.ts
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
export interface StartOfSourceMap {
|
||||
file?: string;
|
||||
sourceRoot?: string;
|
||||
}
|
||||
|
||||
export interface RawSourceMap extends StartOfSourceMap {
|
||||
version: string;
|
||||
sources: string[];
|
||||
names: string[];
|
||||
sourcesContent?: string[];
|
||||
mappings: string;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface LineRange extends Position {
|
||||
lastColumn: number;
|
||||
}
|
||||
|
||||
export interface FindPosition extends Position {
|
||||
// SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND
|
||||
bias?: number;
|
||||
}
|
||||
|
||||
export interface SourceFindPosition extends FindPosition {
|
||||
source: string;
|
||||
}
|
||||
|
||||
export interface MappedPosition extends Position {
|
||||
source: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface MappingItem {
|
||||
source: string;
|
||||
generatedLine: number;
|
||||
generatedColumn: number;
|
||||
originalLine: number;
|
||||
originalColumn: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export class SourceMapConsumer {
|
||||
static GENERATED_ORDER: number;
|
||||
static ORIGINAL_ORDER: number;
|
||||
|
||||
static GREATEST_LOWER_BOUND: number;
|
||||
static LEAST_UPPER_BOUND: number;
|
||||
|
||||
constructor(rawSourceMap: RawSourceMap);
|
||||
computeColumnSpans(): void;
|
||||
originalPositionFor(generatedPosition: FindPosition): MappedPosition;
|
||||
generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
|
||||
allGeneratedPositionsFor(originalPosition: MappedPosition): Position[];
|
||||
hasContentsOfAllSources(): boolean;
|
||||
sourceContentFor(source: string, returnNullOnMissing?: boolean): string;
|
||||
eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void;
|
||||
}
|
||||
|
||||
export interface Mapping {
|
||||
generated: Position;
|
||||
original: Position;
|
||||
source: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export class SourceMapGenerator {
|
||||
constructor(startOfSourceMap?: StartOfSourceMap);
|
||||
static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator;
|
||||
addMapping(mapping: Mapping): void;
|
||||
setSourceContent(sourceFile: string, sourceContent: string): void;
|
||||
applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export interface CodeWithSourceMap {
|
||||
code: string;
|
||||
map: SourceMapGenerator;
|
||||
}
|
||||
|
||||
export class SourceNode {
|
||||
constructor();
|
||||
constructor(line: number, column: number, source: string);
|
||||
constructor(line: number, column: number, source: string, chunk?: string, name?: string);
|
||||
static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode;
|
||||
add(chunk: string): void;
|
||||
prepend(chunk: string): void;
|
||||
setSourceContent(sourceFile: string, sourceContent: string): void;
|
||||
walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
|
||||
walkSourceContents(fn: (file: string, content: string) => void): void;
|
||||
join(sep: string): SourceNode;
|
||||
replaceRight(pattern: string, replacement: string): SourceNode;
|
||||
toString(): string;
|
||||
toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
|
||||
}
|
||||
8
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/source-map.js
generated
vendored
Normal file
8
backend/frontend/node_modules/postcss-preset-env/node_modules/source-map/source-map.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2009-2011 Mozilla Foundation and contributors
|
||||
* Licensed under the New BSD license. See LICENSE.txt or:
|
||||
* http://opensource.org/licenses/BSD-3-Clause
|
||||
*/
|
||||
exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
|
||||
exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
|
||||
exports.SourceNode = require('./lib/source-node').SourceNode;
|
||||
98
backend/frontend/node_modules/postcss-preset-env/package.json
generated
vendored
Normal file
98
backend/frontend/node_modules/postcss-preset-env/package.json
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"name": "postcss-preset-env",
|
||||
"version": "6.7.2",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user