0.2.0 - Mid migration

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

View file

@ -0,0 +1,72 @@
# Changes to PostCSS color-mod() Function
### 3.0.3 (September 23, 2018)
- Fixed an issue with certain colors not being tranformed from variables
### 3.0.2 (September 23, 2018)
- Fixed an incompatibility with other `importFrom` plugins
### 3.0.1 (September 18, 2018)
- Fixed an issue with using the `transparent` color keyword
- Updated to PostCSS Values Parser 2
### 3.0.0 (August 30, 2018)
- Added `importFrom` option which allows you to import Custom Properties from
CSS, JS, and JSON files, and directly passed objects
- Fixed an issue where multiple variables could not be used in `color-mod()`
- Updated to support Node v6+
### 2.4.3 (July 21, 2018)
- Fixed issue with color-mod not being converted within function
### 2.4.2 (February 27, 2018)
- Fixed issue with converting colorspaces
### 2.4.1 (February 21, 2018)
- Fixed issue with spacing around `color-mod` (credit: [@leesdolphin])
### 2.4.0 (February 16, 2018)
- Added build-time support for Custom Properties and Variables
- Updated `@csstools/convert-colors` to 1.4 (minor update)
- Updated tests to reflect variable support
### 2.3.0 (January 25, 2018)
- Updated `@csstools/convert-colors` to 1.3 (minor update)
- Updated tests to reflect more accurate color conversions
### 2.2.0 (January 22, 2018)
- Added `@csstools/convert-colors` to convert between color spaces
### 2.1.0 (January 20, 2018)
- Added support for legacy (comma-separated) `hsl()` colors
- Added support for all `<hue>` units
- Added use of legacy (comma-separated) `hsl()` colors when appropriate
- Improved color conversions
- Improved support for all `rgb()` colors
- Removed external math and color dependencies
### 2.0.0 (January 17, 2018)
- Reverse blend/blenda percentage calculations (breaking change)
- Other improvements (see 4e4de6e)
### 1.1.0 (January 17, 2018)
- Round stringified color values
### 1.0.0 (January 16, 2018)
- Initial version
[@leesdolphin]: https://github.com/leesdolphin

108
web/node_modules/postcss-color-mod-function/LICENSE.md generated vendored Normal file
View file

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

206
web/node_modules/postcss-color-mod-function/README.md generated vendored Normal file
View file

@ -0,0 +1,206 @@
# PostCSS color-mod() Function [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" 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 color-mod() Function] lets you modify colors using the `color-mod()`
function in CSS, following the [CSS Color Module Level 4] specification.
**`color-mod()` has been removed from the Color Module Level 4 specification.**
```pcss
:root {
--brand-red: color-mod(yellow blend(red 50%));
--brand-red-hsl: color-mod(yellow blend(red 50% hsl));
--brand-red-hwb: color-mod(yellow blend(red 50% hwb));
--brand-red-dark: color-mod(red blackness(20%));
}
/* becomes */
:root {
--brand-red: rgb(255, 127.5, 0);
--brand-red-hsl: rgb(255, 127.5, 255);
--brand-red-hwb: rgb(255, 127.5, 0);
--brand-red-dark: rgb(204, 0, 0);
}
/* or, using stringifier(color) { return color.toString() } */
:root {
--brand-red: rgb(100% 50% 0% / 100%);
--brand-red-hsl: hsl(30 100% 50% / 100%);
--brand-red-hwb: hwb(30 0% 0% / 100%);
--brand-red-dark: hwb(0 0% 20% / 100%);
}
```
### Supported Colors
The `color-mod()` function accepts `rgb()`, legacy comma-separated `rgb()`,
`rgba()`, `hsl()`, legacy comma-separated `hsl()`, `hsla()`, `hwb()`, and
`color-mod()` colors, as well as 3, 4, 6, and 8 digit hex colors, and named
colors without the need for additional plugins.
Implemention details are available in
[the specification](https://drafts.csswg.org/css-color/#funcdef-color-mod).
### Supported Color Adjusters
The `color-mod()` function accepts `red()`, `green()`, `blue()`, `a()` /
`alpha()`, `rgb()`, `h()` / `hue()`, `s()` / `saturation()`, `l()` /
`lightness()`, `w()` / `whiteness()`, `b()` / `blackness()`, `tint()`,
`shade()`, `blend()`, `blenda()`, and `contrast()` color adjusters.
Implemention details are available in
[the specification](https://drafts.csswg.org/css-color/#typedef-color-adjuster).
### Supported Variables
By default, `var()` variables will be used if their corresponding Custom
Properties are found in a `:root` rule, or if a fallback value is specified.
## Usage
Add [PostCSS color-mod() Function] to your project:
```bash
npm install postcss-color-mod-function --save-dev
```
Use [PostCSS color-mod() Function] to process your CSS:
```js
const postcssColorMod = require('postcss-color-mod-function');
postcssColorMod.process(YOUR_CSS /*, processOptions, pluginOptions */);
```
Or use it as a [PostCSS] plugin:
```js
const postcss = require('postcss');
const postcssColorMod = require('postcss-color-mod-function');
postcss([
postcssColorMod(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```
[PostCSS color-mod() Function] 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
### stringifier
The `stringifier` option defines how transformed colors will be produced in CSS.
By default, legacy `rbg()` and `rgba()` colors are produced, but this can be
easily updated to support [CSS Color Module Level 4 colors] colors.
```js
import postcssColorMod from 'postcss-color-mod-function';
postcssColorMod({
stringifier(color) {
return color.toString(); // use CSS Color Module Level 4 colors (rgb, hsl, hwb)
}
});
```
Future major releases of [PostCSS color-mod() Function] may reverse this
functionality so that CSS Color Module Level 4 colors are produced by default.
### unresolved
The `unresolved` option defines how unresolved functions and arguments should
be handled. The available options are `throw`, `warn`, and `ignore`. The
default option is to `throw`.
If `ignore` is used, the `color-mod()` function will remain unchanged.
```js
import postcssColorMod from 'postcss-color-mod-function';
postcssColorMod({
unresolved: 'ignore' // ignore unresolved color-mod() functions
});
```
### transformVars
The `transformVars` option defines whether `var()` variables used within
`color-mod()` should be transformed into their corresponding Custom Properties
available in `:root`, or their fallback value if it is specified. By default,
`var()` variables will be transformed.
However, because these transformations occur at build time, they cannot be
considered accurate. Accurately resolving cascading variables relies on
knowledge of the living DOM tree.
### importFrom
The `importFrom` option allows you to import variables from other sources,
which might be CSS, JS, and JSON files, and directly passed objects.
```js
postcssColorMod({
importFrom: 'path/to/file.css' // :root { --brand-dark: blue; --brand-main: var(--brand-dark); }
});
```
```pcss
.brand-faded {
color: color-mod(var(--brand-main) a(50%));
}
/* becomes */
.brand-faded {
color: rgba(0, 0, 255, .5);
}
```
Multiple files can be passed into this option, and they will be parsed in the
order they were received. JavaScript files, JSON files, and objects will need
to namespace custom properties under a `customProperties` or
`custom-properties` key.
```js
postcssColorMod({
importFrom: [
'path/to/file.css', // :root { --brand-dark: blue; --brand-main: var(--brand-dark); }
'and/then/this.js', // module.exports = { customProperties: { '--brand-dark': 'blue', '--brand-main': 'var(--brand-dark)' } }
'and/then/that.json', // { "custom-properties": { "--brand-dark": "blue", "--brand-main": "var(--brand-dark)" } }
{
customProperties: {
'--brand-dark': 'blue',
'--brand-main': 'var(--brand-dark)'
}
}
]
});
```
Variables may reference other variables, and this plugin will attempt to
resolve them. If `transformVars` is set to `false` then `importFrom` will not
be used.
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-color-mod-function.svg
[cli-url]: https://travis-ci.org/jonathantneal/postcss-color-mod-function
[css-img]: https://cssdb.org/badge/color-mod-function.svg
[css-url]: https://preset-env.cssdb.org/features#color-mod-function
[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-color-mod-function.svg
[npm-url]: https://www.npmjs.com/package/postcss-color-mod-function
[CSS Color Module Level 4]: https://www.w3.org/TR/css-color-4/#funcdef-color-mod
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[PostCSS color-mod() Function]: https://github.com/jonathantneal/postcss-color-mod-function

1785
web/node_modules/postcss-color-mod-function/index.cjs.js generated vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

1781
web/node_modules/postcss-color-mod-function/index.es.mjs generated vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,84 @@
{
"name": "postcss-color-mod-function",
"version": "3.0.3",
"description": "Modify colors using the color-mod() function in CSS",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"repository": "jonathantneal/postcss-color-mod-function",
"homepage": "https://github.com/jonathantneal/postcss-color-mod-function#readme",
"bugs": "https://github.com/jonathantneal/postcss-color-mod-function/issues",
"main": "index.cjs.js",
"module": "index.es.mjs",
"files": [
"index.cjs.js",
"index.cjs.js.map",
"index.es.mjs",
"index.es.mjs.map"
],
"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": {
"@csstools/convert-colors": "^1.4.0",
"postcss": "^7.0.2",
"postcss-values-parser": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.1.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"babel-eslint": "^9.0.0",
"eslint": "^5.6.0",
"eslint-config-dev": "^2.0.0",
"postcss-tape": "^2.2.0",
"pre-commit": "^1.2.2",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^4.0.3"
},
"eslintConfig": {
"extends": "dev",
"parser": "babel-eslint",
"rules": {
"max-params": [
2,
5
]
}
},
"keywords": [
"postcss",
"css",
"postcss-plugin",
"colors",
"colours",
"modifications",
"mods",
"adjusters",
"adjustments",
"csswg",
"rgba",
"hsla",
"white",
"black",
"red",
"green",
"blue",
"alpha",
"hue",
"saturation",
"lightness",
"whiteness",
"blackness",
"tint",
"shade",
"blenda",
"contrast"
]
}