diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/postcss-lab-function | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/postcss-lab-function')
| -rw-r--r-- | node_modules/postcss-lab-function/CHANGELOG.md | 25 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/LICENSE.md | 18 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/README.md | 156 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/dist/index.cjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/dist/index.d.ts | 19 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/dist/index.mjs | 1 | ||||
| -rw-r--r-- | node_modules/postcss-lab-function/package.json | 74 |
7 files changed, 0 insertions, 294 deletions
diff --git a/node_modules/postcss-lab-function/CHANGELOG.md b/node_modules/postcss-lab-function/CHANGELOG.md deleted file mode 100644 index aeae0bbd..00000000 --- a/node_modules/postcss-lab-function/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# Changes to PostCSS Lab Function - -### 6.0.19 - -_July 7, 2024_ - -- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.3.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#330) (minor) - -### 6.0.18 - -_July 6, 2024_ - -- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.4.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#241) (patch) -- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.7.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#271) (patch) -- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#204) (patch) - -### 6.0.17 - -_June 29, 2024_ - -- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#232) (patch) -- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.7.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#270) (minor) -- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#203) (patch) - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function/CHANGELOG.md) diff --git a/node_modules/postcss-lab-function/LICENSE.md b/node_modules/postcss-lab-function/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/postcss-lab-function/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index b9a2d4d4..00000000 --- a/node_modules/postcss-lab-function/README.md +++ /dev/null @@ -1,156 +0,0 @@ -# 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="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] -<br><br> -[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/lab-function.svg" height="20">][css-url] -[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/lab-function.svg" height="20">][css-url] - -[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. - -> [!NOTE] -> 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/index.cjs b/node_modules/postcss-lab-function/dist/index.cjs deleted file mode 100644 index ffba0495..00000000 --- a/node_modules/postcss-lab-function/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var s=require("@csstools/postcss-progressive-custom-properties"),e=require("@csstools/css-color-parser"),t=require("@csstools/utilities"),a=require("@csstools/css-parser-algorithms"),r=require("@csstools/css-tokenizer");const o=/\b(?:lab|lch)\(/i,l=/^(?:lab|lch)$/i,basePlugin=s=>({postcssPlugin:"postcss-lab-function",Declaration(n){const i=n.value;if(!o.test(i))return;if(t.hasFallback(n))return;if(t.hasSupportsAtRuleAncestor(n,o))return;const u=r.tokenize({css:i}),c=a.replaceComponentValues(a.parseCommaSeparatedListOfComponentValues(u),(s=>{if(!a.isFunctionNode(s)||!l.test(s.getName()))return;const t=e.color(s);return t&&!(t.syntaxFlags.has(e.SyntaxFlag.Experimental)||t.syntaxFlags.has(e.SyntaxFlag.HasNoneKeywords)||t.syntaxFlags.has(e.SyntaxFlag.RelativeColorSyntax))?e.serializeRGB(t):void 0})),p=a.stringify(c);if(p===i)return;let g=p;s?.subFeatures.displayP3&&(g=a.stringify(a.replaceComponentValues(a.parseCommaSeparatedListOfComponentValues(u),(s=>{if(!a.isFunctionNode(s)||!l.test(s.getName()))return;const t=e.color(s);return t&&!(t.syntaxFlags.has(e.SyntaxFlag.Experimental)||t.syntaxFlags.has(e.SyntaxFlag.HasNoneKeywords)||t.syntaxFlags.has(e.SyntaxFlag.RelativeColorSyntax))?e.colorDataFitsRGB_Gamut(t)?e.serializeRGB(t):e.serializeP3(t):void 0})))),n.cloneBefore({value:p}),s?.subFeatures.displayP3&&g!==p&&n.cloneBefore({value:g}),s?.preserve||n.remove()}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({enableProgressiveCustomProperties:!0,preserve:!1,subFeatures:{displayP3:!0}},e);return t.subFeatures=Object.assign({displayP3:!0},t.subFeatures),t.enableProgressiveCustomProperties&&(t.preserve||t.subFeatures.displayP3)?{postcssPlugin:"postcss-lab-function",plugins:[s(),basePlugin(t)]}:basePlugin(t)};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 deleted file mode 100644 index c0535251..00000000 --- a/node_modules/postcss-lab-function/dist/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -/** postcss-lab-function plugin options */ -export declare 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; - -export { } diff --git a/node_modules/postcss-lab-function/dist/index.mjs b/node_modules/postcss-lab-function/dist/index.mjs deleted file mode 100644 index cd9739dc..00000000 --- a/node_modules/postcss-lab-function/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import s from"@csstools/postcss-progressive-custom-properties";import{color as e,SyntaxFlag as t,serializeRGB as r,colorDataFitsRGB_Gamut as o,serializeP3 as a}from"@csstools/css-color-parser";import{hasFallback as l,hasSupportsAtRuleAncestor as i}from"@csstools/utilities";import{replaceComponentValues as n,parseCommaSeparatedListOfComponentValues as c,isFunctionNode as u,stringify as p}from"@csstools/css-parser-algorithms";import{tokenize as m}from"@csstools/css-tokenizer";const g=/\b(?:lab|lch)\(/i,f=/^(?:lab|lch)$/i,basePlugin=s=>({postcssPlugin:"postcss-lab-function",Declaration(b){const y=b.value;if(!g.test(y))return;if(l(b))return;if(i(b,g))return;const v=m({css:y}),F=n(c(v),(s=>{if(!u(s)||!f.test(s.getName()))return;const o=e(s);return o&&!(o.syntaxFlags.has(t.Experimental)||o.syntaxFlags.has(t.HasNoneKeywords)||o.syntaxFlags.has(t.RelativeColorSyntax))?r(o):void 0})),x=p(F);if(x===y)return;let P=x;s?.subFeatures.displayP3&&(P=p(n(c(v),(s=>{if(!u(s)||!f.test(s.getName()))return;const l=e(s);return l&&!(l.syntaxFlags.has(t.Experimental)||l.syntaxFlags.has(t.HasNoneKeywords)||l.syntaxFlags.has(t.RelativeColorSyntax))?o(l)?r(l):a(l):void 0})))),b.cloneBefore({value:x}),s?.subFeatures.displayP3&&P!==x&&b.cloneBefore({value:P}),s?.preserve||b.remove()}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({enableProgressiveCustomProperties:!0,preserve:!1,subFeatures:{displayP3:!0}},e);return t.subFeatures=Object.assign({displayP3:!0},t.subFeatures),t.enableProgressiveCustomProperties&&(t.preserve||t.subFeatures.displayP3)?{postcssPlugin:"postcss-lab-function",plugins:[s(),basePlugin(t)]}:basePlugin(t)};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 deleted file mode 100644 index f09c4754..00000000 --- a/node_modules/postcss-lab-function/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "postcss-lab-function", - "description": "Use lab() and lch() color functions in CSS", - "version": "6.0.19", - "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" - }, - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "default": "./dist/index.cjs" - } - } - }, - "files": [ - "CHANGELOG.md", - "LICENSE.md", - "README.md", - "dist" - ], - "dependencies": { - "@csstools/css-color-parser": "^2.0.4", - "@csstools/css-parser-algorithms": "^2.7.1", - "@csstools/css-tokenizer": "^2.4.1", - "@csstools/postcss-progressive-custom-properties": "^3.3.0", - "@csstools/utilities": "^1.0.0" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "scripts": {}, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#readme", - "repository": { - "type": "git", - "url": "git+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" - ] -} |
