summaryrefslogtreecommitdiff
path: root/node_modules/postcss-double-position-gradients
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
commit06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch)
tree4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/postcss-double-position-gradients
parent1368909b3cd552dbb0d12d5863c597f5be46177d (diff)
updated node_modules
Diffstat (limited to 'node_modules/postcss-double-position-gradients')
-rw-r--r--node_modules/postcss-double-position-gradients/CHANGELOG.md21
-rw-r--r--node_modules/postcss-double-position-gradients/README.md7
-rw-r--r--node_modules/postcss-double-position-gradients/dist/index.cjs2
-rw-r--r--node_modules/postcss-double-position-gradients/dist/index.mjs2
-rw-r--r--node_modules/postcss-double-position-gradients/package.json7
5 files changed, 21 insertions, 18 deletions
diff --git a/node_modules/postcss-double-position-gradients/CHANGELOG.md b/node_modules/postcss-double-position-gradients/CHANGELOG.md
index 6a471fde..acec67eb 100644
--- a/node_modules/postcss-double-position-gradients/CHANGELOG.md
+++ b/node_modules/postcss-double-position-gradients/CHANGELOG.md
@@ -1,23 +1,22 @@
# Changes to PostCSS Double Position Gradients
-### 5.0.3
+### 5.0.6
-_December 15, 2023_
+_March 31, 2024_
-- Fix type definitions
-- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.0.3`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#303) (patch)
+- 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.2
+### 5.0.5
-_October 9, 2023_
+_March 13, 2024_
-- 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)
+- 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)
-### 5.0.1
+### 5.0.4
-_September 18, 2023_
+_February 19, 2024_
-- Improve performance
-- 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)
+- Reuse code with `@csstools/utilities`
+- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.1.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#310) (minor)
[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/README.md b/node_modules/postcss-double-position-gradients/README.md
index efcc1d1a..78e30278 100644
--- a/node_modules/postcss-double-position-gradients/README.md
+++ b/node_modules/postcss-double-position-gradients/README.md
@@ -1,8 +1,10 @@
# 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="CSS Standard Status" src="https://cssdb.org/images/badges/double-position-gradients.svg" height="20">][css-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.
@@ -98,7 +100,8 @@ The `enableProgressiveCustomProperties` option determines whether the original n
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).
+> 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 })
diff --git a/node_modules/postcss-double-position-gradients/dist/index.cjs b/node_modules/postcss-double-position-gradients/dist/index.cjs
index d5a656fb..c77f6760 100644
--- a/node_modules/postcss-double-position-gradients/dist/index.cjs
+++ b/node_modules/postcss-double-position-gradients/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("@csstools/postcss-progressive-custom-properties"),t=require("postcss-value-parser");function hasFallback(e){const t=e.parent;if(!t)return!1;const r=e.prop.toLowerCase(),s=t.index(e);for(let e=0;e<s;e++){const s=t.nodes[e];if("decl"===s.type&&s.prop.toLowerCase()===r)return!0}return!1}const r=/(?:repeating-)?(?:conic|linear|radial)-gradient\(/i,s=/^(?:repeating-)?(?:conic|linear|radial)-gradient$/i;function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&r.test(t.params))return!0;t=t.parent}else t=t.parent;return!1}const o=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"],isPunctuationCommaNode=e=>"div"===e.type&&","===e.value;function isNumericNode(e){try{return!1!==t.unit(e?.value)}catch(e){return!1}}const basePlugin=e=>({postcssPlugin:"postcss-double-position-gradients",Declaration(n,{result:i}){if(!r.test(n.value))return;if(hasFallback(n))return;if(hasSupportsAtRuleAncestor(n))return;let a;try{a=t(n.value)}catch(e){n.warn(i,`Failed to parse value '${n.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===a)return;a.walk((e=>{if("function"!==e.type||!s.test(e.value))return;const t=e.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));let r=!1;t.forEach(((t,s,n)=>{if("word"===t.type&&o.includes(t.value.toLowerCase())&&(r=!0),"div"===t.type&&","===t.value&&(r=!1),r)return;const i=Object(n[s-1]),a=Object(n[s-2]),c=Object(n[s+1]);if(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 c=a.toString();c!==n.value&&(n.cloneBefore({value:c}),e?.preserve||n.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,module.exports=postcssPlugin;
+"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"],isPunctuationCommaNode=e=>"div"===e.type&&","===e.value;function isNumericNode(e){try{return!1!==t.unit(e?.value)}catch(e){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 c;try{c=t(n.value)}catch(e){n.warn(a,`Failed to parse value '${n.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===c)return;c.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=Object(o[r-1]),a=Object(o[r-2]),c=Object(o[r+1]);if(a.type&&isNumericNode(n)&&isNumericNode(t)){const s=a,r={type:"div",value:",",before:isPunctuationCommaNode(c)?c.before:"",after:isPunctuationCommaNode(c)?"":" ",sourceIndex:0,sourceEndIndex:0};e.nodes.splice(e.nodes.indexOf(t)-1,0,r,s)}}))}));const l=c.toString();l!==n.value&&(n.cloneBefore({value:l}),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.mjs b/node_modules/postcss-double-position-gradients/dist/index.mjs
index ed1d2c2e..24bc8467 100644
--- a/node_modules/postcss-double-position-gradients/dist/index.mjs
+++ b/node_modules/postcss-double-position-gradients/dist/index.mjs
@@ -1 +1 @@
-import e from"@csstools/postcss-progressive-custom-properties";import t from"postcss-value-parser";function hasFallback(e){const t=e.parent;if(!t)return!1;const r=e.prop.toLowerCase(),s=t.index(e);for(let e=0;e<s;e++){const s=t.nodes[e];if("decl"===s.type&&s.prop.toLowerCase()===r)return!0}return!1}const r=/(?:repeating-)?(?:conic|linear|radial)-gradient\(/i,s=/^(?:repeating-)?(?:conic|linear|radial)-gradient$/i;function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&r.test(t.params))return!0;t=t.parent}else t=t.parent;return!1}const o=["at","bottom","center","circle","closest-corner","closest-side","ellipse","farthest-corner","farthest-side","from","in","left","right","to","top"],isPunctuationCommaNode=e=>"div"===e.type&&","===e.value;function isNumericNode(e){try{return!1!==t.unit(e?.value)}catch(e){return!1}}const basePlugin=e=>({postcssPlugin:"postcss-double-position-gradients",Declaration(n,{result:i}){if(!r.test(n.value))return;if(hasFallback(n))return;if(hasSupportsAtRuleAncestor(n))return;let a;try{a=t(n.value)}catch(e){n.warn(i,`Failed to parse value '${n.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===a)return;a.walk((e=>{if("function"!==e.type||!s.test(e.value))return;const t=e.nodes.filter((e=>"comment"!==e.type&&"space"!==e.type));let r=!1;t.forEach(((t,s,n)=>{if("word"===t.type&&o.includes(t.value.toLowerCase())&&(r=!0),"div"===t.type&&","===t.value&&(r=!1),r)return;const i=Object(n[s-1]),a=Object(n[s-2]),c=Object(n[s+1]);if(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 c=a.toString();c!==n.value&&(n.cloneBefore({value:c}),e?.preserve||n.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};
+import e from"@csstools/postcss-progressive-custom-properties";import t from"postcss-value-parser";import{hasFallback as s,hasSupportsAtRuleAncestor as r}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"],isPunctuationCommaNode=e=>"div"===e.type&&","===e.value;function isNumericNode(e){try{return!1!==t.unit(e?.value)}catch(e){return!1}}const basePlugin=e=>({postcssPlugin:"postcss-double-position-gradients",Declaration(a,{result:c}){if(!o.test(a.value))return;if(s(a))return;if(r(a,o))return;let l;try{l=t(a.value)}catch(e){a.warn(c,`Failed to parse value '${a.value}' as a CSS gradient. Leaving the original value intact.`)}if(void 0===l)return;l.walk((e=>{if("function"!==e.type||!i.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&&n.includes(t.value.toLowerCase())&&(s=!0),"div"===t.type&&","===t.value&&(s=!1),s)return;const i=Object(o[r-1]),a=Object(o[r-2]),c=Object(o[r+1]);if(a.type&&isNumericNode(i)&&isNumericNode(t)){const s=a,r={type:"div",value:",",before:isPunctuationCommaNode(c)?c.before:"",after:isPunctuationCommaNode(c)?"":" ",sourceIndex:0,sourceEndIndex:0};e.nodes.splice(e.nodes.indexOf(t)-1,0,r,s)}}))}));const u=l.toString();u!==a.value&&(a.cloneBefore({value:u}),e?.preserve||a.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;export{postcssPlugin as default};
diff --git a/node_modules/postcss-double-position-gradients/package.json b/node_modules/postcss-double-position-gradients/package.json
index dcb64659..e829ac09 100644
--- a/node_modules/postcss-double-position-gradients/package.json
+++ b/node_modules/postcss-double-position-gradients/package.json
@@ -1,7 +1,7 @@
{
"name": "postcss-double-position-gradients",
"description": "Use double-position gradients in CSS",
- "version": "5.0.3",
+ "version": "5.0.6",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "MIT-0",
"funding": [
@@ -38,7 +38,8 @@
"dist"
],
"dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^3.0.3",
+ "@csstools/postcss-progressive-custom-properties": "^3.2.0",
+ "@csstools/utilities": "^1.0.0",
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {
@@ -47,7 +48,7 @@
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients#readme",
"repository": {
"type": "git",
- "url": "https://github.com/csstools/postcss-plugins.git",
+ "url": "git+https://github.com/csstools/postcss-plugins.git",
"directory": "plugins/postcss-double-position-gradients"
},
"bugs": "https://github.com/csstools/postcss-plugins/issues",