diff options
Diffstat (limited to 'node_modules/postcss-double-position-gradients')
7 files changed, 0 insertions, 255 deletions
diff --git a/node_modules/postcss-double-position-gradients/CHANGELOG.md b/node_modules/postcss-double-position-gradients/CHANGELOG.md deleted file mode 100644 index aa02c441..00000000 --- a/node_modules/postcss-double-position-gradients/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changes to PostCSS Double Position Gradients - -### 5.0.7 - -_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) - -### 5.0.6 - -_March 31, 2024_ - -- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.2.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#320) (minor) - -### 5.0.5 - -_March 13, 2024_ - -- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.1.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#311) (patch) - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients/CHANGELOG.md) diff --git a/node_modules/postcss-double-position-gradients/LICENSE.md b/node_modules/postcss-double-position-gradients/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/postcss-double-position-gradients/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-double-position-gradients/README.md b/node_modules/postcss-double-position-gradients/README.md deleted file mode 100644 index 78e30278..00000000 --- a/node_modules/postcss-double-position-gradients/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# PostCSS Double Position Gradients [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss] - -[<img alt="NPM Version" src="https://img.shields.io/npm/v/postcss-double-position-gradients.svg" height="20">][npm-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/double-position-gradients.svg" height="20">][css-url] -[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/double-position-gradients.svg" height="20">][css-url] - -[PostCSS Double Position Gradients] lets you use double-position gradients in -CSS, following the [CSS Image Values and Replaced Content] specification. - -```pcss -.linear-gradient { - background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%); -} - -.conic-gradient { - background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg); -} - -/* becomes */ - -.linear-gradient { - background-image: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%); - background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%); -} - -.conic-gradient { - background-image: conic-gradient(yellowgreen 40%, gold 0deg, gold 75%, #f06 0deg); - background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg); -} -``` - -## Usage - -Add [PostCSS Double Position Gradients] to your project: - -```bash -npm install postcss-double-position-gradients --save-dev -``` - -Use [PostCSS Double Position Gradients] to process your CSS: - -```js -const postcssDoublePositionGradients = require('postcss-double-position-gradients'); - -postcssDoublePositionGradients.process(YOUR_CSS /*, processOptions, pluginOptions */); -``` - -Or use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssDoublePositionGradients = require('postcss-double-position-gradients'); - -postcss([ - postcssDoublePositionGradients(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Double Position Gradients] 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 double-position gradients -should be preserved. By default, double-position gradients are preserved. - -```js -postcssDoublePositionGradients({ preserve: false }) -``` - -```css -.linear-gradient { - background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%); -} - -.conic-gradient { - background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg); -} - -/* becomes */ - -.linear-gradient { - background-image: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%); -} - -.conic-gradient { - background-image: conic-gradient(yellowgreen 40%, gold 0deg, gold 75%, #f06 0deg); -} -``` - -### 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 -postcssDoublePositionGradients({ enableProgressiveCustomProperties: false }) -``` - -```pcss -:root { - --a-gradient: linear-gradient(90deg, black 25% 50%, blue 50% 75%); -} - -/* becomes */ - -:root { - --a-gradient: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%); /* will never be used, not even in older browser */ - --a-gradient: linear-gradient(90deg, black 25% 50%, blue 50% 75%); -} -``` - -[css-url]: https://cssdb.org/#double-position-gradients -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/postcss-double-position-gradients - -[CSS Image Values and Replaced Content]: https://www.w3.org/TR/css-images-4/#color-stop-syntax -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Double Position Gradients]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients diff --git a/node_modules/postcss-double-position-gradients/dist/index.cjs b/node_modules/postcss-double-position-gradients/dist/index.cjs deleted file mode 100644 index 219c4ce2..00000000 --- a/node_modules/postcss-double-position-gradients/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e=require("@csstools/postcss-progressive-custom-properties"),t=require("postcss-value-parser"),s=require("@csstools/utilities");const r=/(?:repeating-)?(?:conic|linear|radial)-gradient\(/i,o=/^(?:repeating-)?(?:conic|linear|radial)-gradient$/i,i=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function isPunctuationCommaNode(e){return!!e&&"div"===e.type&&","===e.value}function isNumericNode(e){if(!e)return!1;try{return!1!==t.unit(e.value)}catch{return!1}}const basePlugin=e=>({postcssPlugin:"postcss-double-position-gradients",Declaration(n,{result:a}){if(!r.test(n.value))return;if(s.hasFallback(n))return;if(s.hasSupportsAtRuleAncestor(n,r))return;let u;try{u=t(n.value)}catch{n.warn(a,`Failed to parse value '${n.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===u)return;u.walk((e=>{if("function"!==e.type||!o.test(e.value))return;const t=e.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));let s=!1;t.forEach(((t,r,o)=>{if("word"===t.type&&i.includes(t.value.toLowerCase())&&(s=!0),"div"===t.type&&","===t.value&&(s=!1),s)return;const n=o[r-1],a=o[r-2],u=o[r+1];if(a&&a.type&&isNumericNode(n)&&isNumericNode(t)){const s=a,r={type:"div",value:",",before:isPunctuationCommaNode(u)?u.before:"",after:isPunctuationCommaNode(u)?"":" ",sourceIndex:0,sourceEndIndex:0};e.nodes.splice(e.nodes.indexOf(t)-1,0,r,s)}}))}));const c=u.toString();c!==n.value&&(n.cloneBefore({value:c}),e?.preserve||n.remove())}});basePlugin.postcss=!0;const postcssPlugin=t=>{const s=Object.assign({enableProgressiveCustomProperties:!0,preserve:!0},t);return s.enableProgressiveCustomProperties&&s.preserve?{postcssPlugin:"postcss-double-position-gradients",plugins:[e(),basePlugin(s)]}:basePlugin(s)};postcssPlugin.postcss=!0,module.exports=postcssPlugin; diff --git a/node_modules/postcss-double-position-gradients/dist/index.d.ts b/node_modules/postcss-double-position-gradients/dist/index.d.ts deleted file mode 100644 index b002dc64..00000000 --- a/node_modules/postcss-double-position-gradients/dist/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -/** postcss-double-position-gradients plugin options */ -export declare type pluginOptions = { - /** Preserve the original notation. default: true */ - preserve?: boolean; - /** Enable "@csstools/postcss-progressive-custom-properties". default: true */ - enableProgressiveCustomProperties?: boolean; -}; - -declare const postcssPlugin: PluginCreator<pluginOptions>; -export default postcssPlugin; - -export { } diff --git a/node_modules/postcss-double-position-gradients/dist/index.mjs b/node_modules/postcss-double-position-gradients/dist/index.mjs deleted file mode 100644 index 33183024..00000000 --- a/node_modules/postcss-double-position-gradients/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import e from"@csstools/postcss-progressive-custom-properties";import t from"postcss-value-parser";import{hasFallback as r,hasSupportsAtRuleAncestor as s}from"@csstools/utilities";const o=/(?:repeating-)?(?:conic|linear|radial)-gradient\(/i,i=/^(?:repeating-)?(?:conic|linear|radial)-gradient$/i,n=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"];function isPunctuationCommaNode(e){return!!e&&"div"===e.type&&","===e.value}function isNumericNode(e){if(!e)return!1;try{return!1!==t.unit(e.value)}catch{return!1}}const basePlugin=e=>({postcssPlugin:"postcss-double-position-gradients",Declaration(a,{result:c}){if(!o.test(a.value))return;if(r(a))return;if(s(a,o))return;let u;try{u=t(a.value)}catch{a.warn(c,`Failed to parse value '${a.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===u)return;u.walk((e=>{if("function"!==e.type||!i.test(e.value))return;const t=e.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));let r=!1;t.forEach(((t,s,o)=>{if("word"===t.type&&n.includes(t.value.toLowerCase())&&(r=!0),"div"===t.type&&","===t.value&&(r=!1),r)return;const i=o[s-1],a=o[s-2],c=o[s+1];if(a&&a.type&&isNumericNode(i)&&isNumericNode(t)){const r=a,s={type:"div",value:",",before:isPunctuationCommaNode(c)?c.before:"",after:isPunctuationCommaNode(c)?"":" ",sourceIndex:0,sourceEndIndex:0};e.nodes.splice(e.nodes.indexOf(t)-1,0,s,r)}}))}));const l=u.toString();l!==a.value&&(a.cloneBefore({value:l}),e?.preserve||a.remove())}});basePlugin.postcss=!0;const postcssPlugin=t=>{const r=Object.assign({enableProgressiveCustomProperties:!0,preserve:!0},t);return r.enableProgressiveCustomProperties&&r.preserve?{postcssPlugin:"postcss-double-position-gradients",plugins:[e(),basePlugin(r)]}:basePlugin(r)};postcssPlugin.postcss=!0;export{postcssPlugin as default}; diff --git a/node_modules/postcss-double-position-gradients/package.json b/node_modules/postcss-double-position-gradients/package.json deleted file mode 100644 index 20dfc636..00000000 --- a/node_modules/postcss-double-position-gradients/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "postcss-double-position-gradients", - "description": "Use double-position gradients in CSS", - "version": "5.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" - }, - "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/postcss-progressive-custom-properties": "^3.3.0", - "@csstools/utilities": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "scripts": {}, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients#readme", - "repository": { - "type": "git", - "url": "git+https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-double-position-gradients" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "color", - "conic", - "css", - "double", - "gradients", - "linear", - "position", - "postcss", - "postcss-plugin", - "radial", - "repeating", - "stop", - "syntax" - ] -} |
