summaryrefslogtreecommitdiff
path: root/node_modules/postcss-lab-function
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:05:55 +0800
commitc06f7ee0a40255214c477e13d9b956a7e07c2900 (patch)
treef5982a568ef8fab865d0142e71c7494fea3e4c1b /node_modules/postcss-lab-function
parent3fd9400d4dccc25aa29b5702216732e0b7542073 (diff)
postcss,(plugins): nanocss, postcss-preset-env
Diffstat (limited to 'node_modules/postcss-lab-function')
-rw-r--r--node_modules/postcss-lab-function/CHANGELOG.md280
-rw-r--r--node_modules/postcss-lab-function/LICENSE.md18
-rw-r--r--node_modules/postcss-lab-function/README.md153
-rw-r--r--node_modules/postcss-lab-function/dist/has-fallback-decl.d.ts2
-rw-r--r--node_modules/postcss-lab-function/dist/has-supports-at-rule-ancestor.d.ts2
-rw-r--r--node_modules/postcss-lab-function/dist/index.cjs1
-rw-r--r--node_modules/postcss-lab-function/dist/index.d.ts15
-rw-r--r--node_modules/postcss-lab-function/dist/index.mjs1
-rw-r--r--node_modules/postcss-lab-function/package.json88
9 files changed, 560 insertions, 0 deletions
diff --git a/node_modules/postcss-lab-function/CHANGELOG.md b/node_modules/postcss-lab-function/CHANGELOG.md
new file mode 100644
index 00000000..09bc64f8
--- /dev/null
+++ b/node_modules/postcss-lab-function/CHANGELOG.md
@@ -0,0 +1,280 @@
+# Changes to PostCSS Lab Function
+
+### 6.0.7
+
+_October 9, 2023_
+
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.4.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#140) (minor)
+- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.0.2`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#302) (patch)
+
+### 6.0.6
+
+_October 2, 2023_
+
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.3.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#133) (patch)
+
+### 6.0.5
+
+_September 24, 2023_
+
+- Small performance improvements
+- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#221) (patch)
+- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#232) (patch)
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#132) (patch)
+
+### 6.0.4
+
+_September 18, 2023_
+
+- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#301) (patch)
+
+### 6.0.3
+
+_September 2, 2023_
+
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#131) (patch)
+
+### 6.0.2
+
+_August 28, 2023_
+
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#130) (minor)
+
+### 6.0.1
+
+_July 24, 2023_
+
+- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#220) (minor)
+- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#231) (patch)
+
+### 6.0.0
+
+_July 3, 2023_
+
+- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/))
+- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#230) (minor)
+- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#300) (major)
+- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`1.2.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#122) (patch)
+
+### 5.2.3
+
+_June 1, 2023_
+
+- Updated `@csstools/postcss-progressive-custom-properties` to `2.3.0` (minor)
+
+### 5.2.2
+
+_May 19, 2023_
+
+- Ignore relative color syntax
+- Updated `@csstools/postcss-progressive-custom-properties` to `2.2.0` (minor)
+- Updated `@csstools/css-color-parser` to `1.2.0` (minor)
+
+### 5.2.1
+
+_April 10, 2023_
+
+- Updated `@csstools/css-tokenizer` to `2.1.1` (patch)
+- Updated `@csstools/css-parser-algorithms` to `2.1.1` (patch)
+- Updated `@csstools/css-color-parser` to `1.1.2` (patch)
+
+### 5.2.0
+
+_March 25, 2023_
+
+- Add `@csstools/css-color-parser` dependency for all color value transformations.
+- Add support for `calc` expressions in color components.
+- Skip `color(display-p3 0 0 0)` fallbacks when the color is already in the `srgb` gamut.
+
+### 5.1.0
+
+_February 6, 2023_
+
+- Add: `@csstools/color-helpers` dependency for all color value transformations.
+
+### 5.0.1
+
+_January 28, 2023_
+
+- Improve `types` declaration in `package.json`
+
+### 5.0.0
+
+_January 24, 2023_
+
+- Updated: Support for Node v14+ (major).
+
+### 4.2.1
+
+_July 8, 2022_
+
+- Fix case insensitive matching.
+
+### 4.2.0
+
+_April 4, 2022_
+
+- Allow percentage and number units in more color components.
+
+```css
+.percentages {
+ color-1: lab(40% 35% 30%);
+ color-2: lch(40% 50% 39);
+
+ /* becomes */
+
+ color-1: rgb(163, 57, 35);
+ color-1: color(display-p3 0.59266 0.25309 0.17075);
+ color-2: rgb(181, 30, 19);
+ color-2: color(display-p3 0.65205 0.18193 0.12753);
+}
+
+.numbers {
+ color-1: lab(40 35 30);
+ color-2: lch(40 50 39);
+
+ /* becomes */
+
+ color-1: rgb(152, 68, 47);
+ color-1: color(display-p3 0.55453 0.28432 0.20788);
+ color-2: rgb(157, 63, 45);
+ color-2: color(display-p3 0.57072 0.27138 0.20109);
+}
+```
+
+### 4.1.2
+
+_March 8, 2022_
+
+- Fix gamut mapping giving overly unsaturated colors.
+- Implement powerless color components in gamut mapping.
+
+### 4.1.1
+
+_February 15, 2022_
+
+- Fix plugin name
+
+### 4.1.0
+
+_February 12, 2022_
+
+- Add gamut mapping for out of gamut colors.
+- Add conversion to `display-p3` as a wider gamut fallback.
+
+[Read more about out of gamut colors](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-lab-function/README.md#out-of-gamut-colors)
+
+[Read more about `color(display-p3 0 0 0)`](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color())
+
+```css
+.color-lab {
+ color: lab(40% 56.6 39);
+}
+
+/* with a display-p3 fallback : */
+.color {
+ color: rgb(179, 35, 35);
+ color: color(display-p3 0.64331 0.19245 0.16771);
+}
+```
+
+### 4.0.4
+
+_February 5, 2022_
+
+- Improved `es module` and `commonjs` compatibility
+
+### 4.0.3
+
+_January 2, 2022_
+
+- Removed Sourcemaps from package tarball.
+- Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
+
+### 4.0.2
+
+_December 13, 2021_
+
+- Changed: now uses `postcss-value-parser` for parsing.
+- Updated: documentation
+- Added: support for CSS variables with `preserve: true` option.
+- Fixed: Hue values with units in `lch` functions are now correctly handled.
+- Fixed: Rounding of values to match current browser behavior.
+
+### 4.0.1
+
+_November 18, 2021_
+
+- Added: Safeguards against postcss-values-parser potentially throwing an error.
+- Updated: postcss-value-parser to 6.0.1 (patch)
+
+### 4.0.0
+
+_September 17, 2021_
+
+- Updated: Support for PostCS 8+ (major).
+- Updated: Support for Node 12+ (major).
+
+### 3.1.2
+
+_April 25, 2020_
+
+- Updated: Publish
+
+### 3.1.1
+
+_April 25, 2020_
+
+- Updated: Using `walkType` to evade walker bug in `postcss-values-parser`
+
+### 3.1.0
+
+_April 25, 2020_
+
+- Updated: `postcss-values-parser` to 3.2.0 (minor).
+
+### 3.0.1
+
+_April 12, 2020_
+
+- Updated: Ownership moved to CSSTools.
+
+### 3.0.0
+
+_April 12, 2020_
+
+- Updated: `postcss-values-parser` to 3.1.1 (major).
+- Updated: Node support to 10.0.0 (major).
+- Updated: Feature to use new percentage syntax.
+- Removed: Support for the removed `gray()` function.
+
+### 2.0.1
+
+_September 18, 2018_
+
+- Updated: PostCSS Values Parser 2.0.0
+
+### 2.0.0
+
+_September 17, 2018_
+
+- Updated: Support for PostCSS 7+
+- Updated: Support for Node 6+
+
+### 1.1.0
+
+_July 24, 2018_
+
+- Added: Support for `gray(a / b)` as `lab(a 0 0 / b)`
+
+### 1.0.1
+
+_May 11, 2018_
+
+- Fixed: Values beyond the acceptable 0-255 RGB range
+
+### 1.0.0
+
+_May 11, 2018_
+
+- Initial version
diff --git a/node_modules/postcss-lab-function/LICENSE.md b/node_modules/postcss-lab-function/LICENSE.md
new file mode 100644
index 00000000..e8ae93b9
--- /dev/null
+++ b/node_modules/postcss-lab-function/LICENSE.md
@@ -0,0 +1,18 @@
+MIT No Attribution (MIT-0)
+
+Copyright © CSSTools Contributors
+
+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.
+
+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.
diff --git a/node_modules/postcss-lab-function/README.md b/node_modules/postcss-lab-function/README.md
new file mode 100644
index 00000000..a5e21ec9
--- /dev/null
+++ b/node_modules/postcss-lab-function/README.md
@@ -0,0 +1,153 @@
+# PostCSS Lab Function [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
+
+[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-lab-function.svg" height="20">][npm-url]
+[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/lab-function.svg" height="20">][css-url]
+[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
+[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
+
+
+[PostCSS Lab Function] lets you use `lab` and `lch` color functions in
+CSS, following the [CSS Color] specification.
+
+```pcss
+.color-lab {
+ color: lab(40% 56.6 39);
+}
+
+.color-lch {
+ color: lch(40% 68.735435 34.568626);
+}
+
+/* becomes */
+
+.color {
+ color: rgb(179, 35, 35);
+ color: color(display-p3 0.64331 0.19245 0.16771);
+}
+
+.color-lch {
+ color: rgb(179, 35, 35);
+ color: color(display-p3 0.64331 0.19245 0.16771);
+}
+```
+
+## Usage
+
+Add [PostCSS Lab Function] to your project:
+
+```bash
+npm install postcss postcss-lab-function --save-dev
+```
+
+Use it as a [PostCSS] plugin:
+
+```js
+const postcss = require('postcss');
+const postcssLabFunction = require('postcss-lab-function');
+
+postcss([
+ postcssLabFunction(/* pluginOptions */)
+]).process(YOUR_CSS /*, processOptions */);
+```
+
+[PostCSS Lab Function] runs in all Node environments, with special
+instructions for:
+
+| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
+| --- | --- | --- | --- | --- |
+
+## Options
+
+### preserve
+
+The `preserve` option determines whether the original functional color notation
+is preserved. By default, it is not preserved.
+
+```js
+postcssLabFunction({ preserve: true })
+```
+
+```pcss
+.color {
+ color: lab(40% 56.6 39);
+}
+
+/* becomes */
+
+.color {
+ color: rgb(179, 35, 35);
+ color: color(display-p3 0.64331 0.19245 0.16771);
+ color: lab(40% 56.6 39);
+}
+```
+
+### enableProgressiveCustomProperties
+
+The `enableProgressiveCustomProperties` option determines whether the original notation
+is wrapped with `@supports` when used in Custom Properties. By default, it is enabled.
+
+⚠️ We only recommend disabling this when you set `preserve` to `false` or if you bring your own fix for Custom Properties. See what the plugin does in its [README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties#readme).
+
+```js
+postcssLabFunction({ enableProgressiveCustomProperties: false })
+```
+
+```pcss
+:root {
+ --firebrick: lab(40% 56.6 39);
+}
+
+/* becomes */
+
+:root {
+ --firebrick: rgb(178, 34, 34); /* will never be used, not even in older browser */
+ --firebrick: color(display-p3 0.64331 0.19245 0.16771); /* will never be used, not even in older browser */
+ --firebrick: lab(40% 56.6 39);
+}
+```
+
+### subFeatures
+
+#### displayP3
+
+The `subFeatures.displayP3` option determines if `color(display-p3 ...)` is used as a fallback.<br>
+By default, it is enabled.
+
+`display-p3` can display wider gamut colors than `rgb` on some devices.
+
+```js
+postcssOKLabFunction({
+ subFeatures: {
+ displayP3: false
+ }
+})
+```
+
+```pcss
+.color {
+ color: lab(40% 56.6 39);
+}
+
+/* becomes */
+
+.color {
+ color: rgb(179, 35, 35);
+ color: lab(40% 56.6 39);
+}
+```
+
+## Copyright : color conversions
+
+This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/tree/main/css-color-4. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
+
+[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
+[css-url]: https://cssdb.org/#lab-function
+[discord]: https://discord.gg/bUadyRwkJS
+[npm-url]: https://www.npmjs.com/package/postcss-lab-function
+
+[CSS Color]: https://drafts.csswg.org/css-color/#specifying-lab-lch
+[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
+[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
+[PostCSS]: https://github.com/postcss/postcss
+[PostCSS Loader]: https://github.com/postcss/postcss-loader
+[PostCSS Lab Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function
diff --git a/node_modules/postcss-lab-function/dist/has-fallback-decl.d.ts b/node_modules/postcss-lab-function/dist/has-fallback-decl.d.ts
new file mode 100644
index 00000000..d7ae8d89
--- /dev/null
+++ b/node_modules/postcss-lab-function/dist/has-fallback-decl.d.ts
@@ -0,0 +1,2 @@
+import type { Declaration } from 'postcss';
+export declare function hasFallback(node: Declaration): boolean;
diff --git a/node_modules/postcss-lab-function/dist/has-supports-at-rule-ancestor.d.ts b/node_modules/postcss-lab-function/dist/has-supports-at-rule-ancestor.d.ts
new file mode 100644
index 00000000..a46009ec
--- /dev/null
+++ b/node_modules/postcss-lab-function/dist/has-supports-at-rule-ancestor.d.ts
@@ -0,0 +1,2 @@
+import type { Node } from 'postcss';
+export declare function hasSupportsAtRuleAncestor(node: Node): boolean;
diff --git a/node_modules/postcss-lab-function/dist/index.cjs b/node_modules/postcss-lab-function/dist/index.cjs
new file mode 100644
index 00000000..2259a5d0
--- /dev/null
+++ b/node_modules/postcss-lab-function/dist/index.cjs
@@ -0,0 +1 @@
+"use strict";var e=require("@csstools/postcss-progressive-custom-properties"),s=require("@csstools/css-tokenizer"),r=require("@csstools/css-color-parser"),t=require("@csstools/css-parser-algorithms");function hasFallback(e){const s=e.parent;if(!s)return!1;const r=e.prop.toLowerCase(),t=s.index(e);for(let e=0;e<t;e++){const t=s.nodes[e];if("decl"===t.type&&t.prop.toLowerCase()===r)return!0}return!1}function hasSupportsAtRuleAncestor(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()){if(-1!==s.params.toLowerCase().indexOf("lab("))return!0;if(-1!==s.params.toLowerCase().indexOf("lch("))return!0}s=s.parent}else s=s.parent;return!1}const a=/(lab|lch)\(/i,o=/^(lab|lch)$/i,basePlugin=e=>({postcssPlugin:"postcss-lab-function",Declaration:n=>{const l=n.value;if(!a.test(l))return;if(hasFallback(n))return;if(hasSupportsAtRuleAncestor(n))return;const i=s.tokenize({css:l}),u=t.replaceComponentValues(t.parseCommaSeparatedListOfComponentValues(i),(e=>{if(t.isFunctionNode(e)&&o.test(e.getName())){const s=r.color(e);if(!s)return;if(s.syntaxFlags.has(r.SyntaxFlag.HasNoneKeywords))return;if(s.syntaxFlags.has(r.SyntaxFlag.RelativeColorSyntax))return;return r.serializeRGB(s)}})),c=t.stringify(u);if(c===l)return;let p=c;null!=e&&e.subFeatures.displayP3&&(p=t.stringify(t.replaceComponentValues(t.parseCommaSeparatedListOfComponentValues(i),(e=>{if(t.isFunctionNode(e)&&o.test(e.getName())){const s=r.color(e);if(!s)return;if(s.syntaxFlags.has(r.SyntaxFlag.HasNoneKeywords))return;if(s.syntaxFlags.has(r.SyntaxFlag.RelativeColorSyntax))return;return r.colorDataFitsRGB_Gamut(s)?r.serializeRGB(s):r.serializeP3(s)}})))),n.cloneBefore({value:c}),null!=e&&e.subFeatures.displayP3&&p!==c&&n.cloneBefore({value:p}),null!=e&&e.preserve||n.remove()}});basePlugin.postcss=!0;const postcssPlugin=s=>{const r=Object.assign({enableProgressiveCustomProperties:!0,preserve:!1,subFeatures:{displayP3:!0}},s);return r.subFeatures=Object.assign({displayP3:!0},r.subFeatures),r.enableProgressiveCustomProperties&&(r.preserve||r.subFeatures.displayP3)?{postcssPlugin:"postcss-lab-function",plugins:[e(),basePlugin(r)]}:basePlugin(r)};postcssPlugin.postcss=!0,module.exports=postcssPlugin;
diff --git a/node_modules/postcss-lab-function/dist/index.d.ts b/node_modules/postcss-lab-function/dist/index.d.ts
new file mode 100644
index 00000000..e94b09fe
--- /dev/null
+++ b/node_modules/postcss-lab-function/dist/index.d.ts
@@ -0,0 +1,15 @@
+import type { PluginCreator } from 'postcss';
+/** postcss-lab-function plugin options */
+export type pluginOptions = {
+ /** Preserve the original notation. default: false */
+ preserve?: boolean;
+ /** Enable "@csstools/postcss-progressive-custom-properties". default: true */
+ enableProgressiveCustomProperties?: boolean;
+ /** Toggle sub features. default: { displayP3: true } */
+ subFeatures?: {
+ /** Enable displayP3 fallbacks. default: true */
+ displayP3?: boolean;
+ };
+};
+declare const postcssPlugin: PluginCreator<pluginOptions>;
+export default postcssPlugin;
diff --git a/node_modules/postcss-lab-function/dist/index.mjs b/node_modules/postcss-lab-function/dist/index.mjs
new file mode 100644
index 00000000..42a57148
--- /dev/null
+++ b/node_modules/postcss-lab-function/dist/index.mjs
@@ -0,0 +1 @@
+import s from"@csstools/postcss-progressive-custom-properties";import{tokenize as e}from"@csstools/css-tokenizer";import{color as r,SyntaxFlag as t,serializeRGB as o,colorDataFitsRGB_Gamut as a,serializeP3 as n}from"@csstools/css-color-parser";import{replaceComponentValues as l,parseCommaSeparatedListOfComponentValues as u,isFunctionNode as i,stringify as p}from"@csstools/css-parser-algorithms";function hasFallback(s){const e=s.parent;if(!e)return!1;const r=s.prop.toLowerCase(),t=e.index(s);for(let s=0;s<t;s++){const t=e.nodes[s];if("decl"===t.type&&t.prop.toLowerCase()===r)return!0}return!1}function hasSupportsAtRuleAncestor(s){let e=s.parent;for(;e;)if("atrule"===e.type){if("supports"===e.name.toLowerCase()){if(-1!==e.params.toLowerCase().indexOf("lab("))return!0;if(-1!==e.params.toLowerCase().indexOf("lch("))return!0}e=e.parent}else e=e.parent;return!1}const c=/(lab|lch)\(/i,f=/^(lab|lch)$/i,basePlugin=s=>({postcssPlugin:"postcss-lab-function",Declaration:m=>{const b=m.value;if(!c.test(b))return;if(hasFallback(m))return;if(hasSupportsAtRuleAncestor(m))return;const g=e({css:b}),y=l(u(g),(s=>{if(i(s)&&f.test(s.getName())){const e=r(s);if(!e)return;if(e.syntaxFlags.has(t.HasNoneKeywords))return;if(e.syntaxFlags.has(t.RelativeColorSyntax))return;return o(e)}})),d=p(y);if(d===b)return;let h=d;null!=s&&s.subFeatures.displayP3&&(h=p(l(u(g),(s=>{if(i(s)&&f.test(s.getName())){const e=r(s);if(!e)return;if(e.syntaxFlags.has(t.HasNoneKeywords))return;if(e.syntaxFlags.has(t.RelativeColorSyntax))return;return a(e)?o(e):n(e)}})))),m.cloneBefore({value:d}),null!=s&&s.subFeatures.displayP3&&h!==d&&m.cloneBefore({value:h}),null!=s&&s.preserve||m.remove()}});basePlugin.postcss=!0;const postcssPlugin=e=>{const r=Object.assign({enableProgressiveCustomProperties:!0,preserve:!1,subFeatures:{displayP3:!0}},e);return r.subFeatures=Object.assign({displayP3:!0},r.subFeatures),r.enableProgressiveCustomProperties&&(r.preserve||r.subFeatures.displayP3)?{postcssPlugin:"postcss-lab-function",plugins:[s(),basePlugin(r)]}:basePlugin(r)};postcssPlugin.postcss=!0;export{postcssPlugin as default};
diff --git a/node_modules/postcss-lab-function/package.json b/node_modules/postcss-lab-function/package.json
new file mode 100644
index 00000000..4ec71f7c
--- /dev/null
+++ b/node_modules/postcss-lab-function/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "postcss-lab-function",
+ "description": "Use lab() and lch() color functions in CSS",
+ "version": "6.0.7",
+ "author": "Jonathan Neal <jonathantneal@hotmail.com>",
+ "license": "MIT-0",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": "^14 || ^16 || >=18"
+ },
+ "main": "dist/index.cjs",
+ "module": "dist/index.mjs",
+ "types": "./dist/index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.cjs",
+ "default": "./dist/index.mjs"
+ }
+ },
+ "files": [
+ "CHANGELOG.md",
+ "LICENSE.md",
+ "README.md",
+ "dist"
+ ],
+ "dependencies": {
+ "@csstools/css-color-parser": "^1.4.0",
+ "@csstools/css-parser-algorithms": "^2.3.2",
+ "@csstools/css-tokenizer": "^2.2.1",
+ "@csstools/postcss-progressive-custom-properties": "^3.0.2"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4"
+ },
+ "devDependencies": {
+ "@csstools/postcss-tape": "*"
+ },
+ "scripts": {
+ "build": "rollup -c ../../rollup/default.mjs",
+ "docs": "node ../../.github/bin/generate-docs/install.mjs",
+ "lint": "node ../../.github/bin/format-package-json.mjs",
+ "prepublishOnly": "npm run build && npm run test",
+ "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs",
+ "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
+ },
+ "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#readme",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/csstools/postcss-plugins.git",
+ "directory": "plugins/postcss-lab-function"
+ },
+ "bugs": "https://github.com/csstools/postcss-plugins/issues",
+ "keywords": [
+ "color",
+ "comma",
+ "css",
+ "design",
+ "functional",
+ "lab",
+ "lch",
+ "notation",
+ "postcss",
+ "postcss-plugin",
+ "rgb",
+ "rgba",
+ "space",
+ "syntax"
+ ],
+ "csstools": {
+ "cssdb": "lab-function",
+ "exportName": "postcssLabFunction",
+ "humanReadableName": "PostCSS Lab Function"
+ },
+ "volta": {
+ "extends": "../../package.json"
+ }
+}