postcss-color-functional-notation 6.0.10 → 6.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -12
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
# Changes to PostCSS Color Functional Notation
|
|
2
2
|
|
|
3
|
-
### 6.0.
|
|
3
|
+
### 6.0.12
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
_June 29, 2024_
|
|
6
6
|
|
|
7
|
-
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.3.
|
|
8
|
-
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.
|
|
9
|
-
- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.
|
|
7
|
+
- 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)
|
|
8
|
+
- 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)
|
|
9
|
+
- 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)
|
|
10
10
|
|
|
11
|
-
### 6.0.
|
|
11
|
+
### 6.0.11
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
_May 4, 2024_
|
|
14
14
|
|
|
15
|
-
- Updated [`@csstools/css-
|
|
15
|
+
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#231) (patch)
|
|
16
|
+
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.6.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#263) (patch)
|
|
17
|
+
- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#202) (patch)
|
|
16
18
|
|
|
17
|
-
### 6.0.
|
|
19
|
+
### 6.0.10
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
_May 4, 2024_
|
|
20
22
|
|
|
21
|
-
- Updated [`@csstools/
|
|
22
|
-
- Updated [`@csstools/css-
|
|
23
|
+
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#230) (minor)
|
|
24
|
+
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.6.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#262) (patch)
|
|
25
|
+
- Updated [`@csstools/css-color-parser`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser) to [`2.0.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-color-parser/CHANGELOG.md#201) (patch)
|
|
23
26
|
|
|
24
27
|
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation/CHANGELOG.md)
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=require("@csstools/postcss-progressive-custom-properties"),e=require("@csstools/css-color-parser"),t=require("@csstools/utilities"),o=require("@csstools/css-parser-algorithms"),a=require("@csstools/css-tokenizer");const r=/^(?:rgb|hsl)a?$/i,n=/\b(?:rgb|hsl)a?\(/i,basePlugin=s=>({postcssPlugin:"postcss-color-functional-notation",Declaration(l){const i=l.value;if(!n.test(i))return;if(t.hasFallback(l))return;if(t.hasSupportsAtRuleAncestor(l,n))return;const c=o.replaceComponentValues(o.parseCommaSeparatedListOfComponentValues(a.tokenize({css:i})),(s=>{if(!o.isFunctionNode(s)||!r.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)||(t.syntaxFlags.has(e.SyntaxFlag.LegacyRGB)||t.syntaxFlags.has(e.SyntaxFlag.LegacyHSL))&&!t.syntaxFlags.has(e.SyntaxFlag.HasPercentageAlpha)?void 0:
|
|
1
|
+
"use strict";var s=require("@csstools/postcss-progressive-custom-properties"),e=require("@csstools/css-color-parser"),t=require("@csstools/utilities"),o=require("@csstools/css-parser-algorithms"),a=require("@csstools/css-tokenizer");const r=/^(?:rgb|hsl)a?$/i,n=/\b(?:rgb|hsl)a?\(/i,basePlugin=s=>({postcssPlugin:"postcss-color-functional-notation",Declaration(l){const i=l.value;if(!n.test(i))return;if(t.hasFallback(l))return;if(t.hasSupportsAtRuleAncestor(l,n))return;const c=o.replaceComponentValues(o.parseCommaSeparatedListOfComponentValues(a.tokenize({css:i})),(s=>{if(!o.isFunctionNode(s)||!r.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)||(t.syntaxFlags.has(e.SyntaxFlag.LegacyRGB)||t.syntaxFlags.has(e.SyntaxFlag.LegacyHSL))&&!t.syntaxFlags.has(e.SyntaxFlag.HasPercentageAlpha)?void 0:t.colorNotation===e.ColorNotation.HSL?e.serializeHSL(t):e.serializeRGB(t)})),u=o.stringify(c);u!==i&&(l.cloneBefore({value:u}),s?.preserve||l.remove())}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-color-functional-notation",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0,module.exports=postcssPlugin;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"@csstools/postcss-progressive-custom-properties";import{color as o,SyntaxFlag as t,
|
|
1
|
+
import s from"@csstools/postcss-progressive-custom-properties";import{color as o,SyntaxFlag as t,ColorNotation as e,serializeHSL as r,serializeRGB as a}from"@csstools/css-color-parser";import{hasFallback as n,hasSupportsAtRuleAncestor as c}from"@csstools/utilities";import{replaceComponentValues as i,parseCommaSeparatedListOfComponentValues as l,isFunctionNode as p,stringify as g}from"@csstools/css-parser-algorithms";import{tokenize as u}from"@csstools/css-tokenizer";const m=/^(?:rgb|hsl)a?$/i,f=/\b(?:rgb|hsl)a?\(/i,basePlugin=s=>({postcssPlugin:"postcss-color-functional-notation",Declaration(v){const h=v.value;if(!f.test(h))return;if(n(v))return;if(c(v,f))return;const y=i(l(u({css:h})),(s=>{if(!p(s)||!m.test(s.getName()))return;const n=o(s);return!n||n.syntaxFlags.has(t.Experimental)||n.syntaxFlags.has(t.HasNoneKeywords)||n.syntaxFlags.has(t.RelativeColorSyntax)||(n.syntaxFlags.has(t.LegacyRGB)||n.syntaxFlags.has(t.LegacyHSL))&&!n.syntaxFlags.has(t.HasPercentageAlpha)?void 0:n.colorNotation===e.HSL?r(n):a(n)})),x=g(y);x!==h&&(v.cloneBefore({value:x}),s?.preserve||v.remove())}});basePlugin.postcss=!0;const postcssPlugin=o=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},o);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-color-functional-notation",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-color-functional-notation",
|
|
3
3
|
"description": "Use space and slash separated color notation in CSS",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.12",
|
|
5
5
|
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
|
|
6
6
|
"license": "MIT-0",
|
|
7
7
|
"funding": [
|
|
@@ -38,15 +38,16 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@csstools/css-color-parser": "^2.0.
|
|
42
|
-
"@csstools/css-parser-algorithms": "^2.
|
|
43
|
-
"@csstools/css-tokenizer": "^2.3.
|
|
41
|
+
"@csstools/css-color-parser": "^2.0.3",
|
|
42
|
+
"@csstools/css-parser-algorithms": "^2.7.0",
|
|
43
|
+
"@csstools/css-tokenizer": "^2.3.2",
|
|
44
44
|
"@csstools/postcss-progressive-custom-properties": "^3.2.0",
|
|
45
45
|
"@csstools/utilities": "^1.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"postcss": "^8.4"
|
|
49
49
|
},
|
|
50
|
+
"scripts": {},
|
|
50
51
|
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation#readme",
|
|
51
52
|
"repository": {
|
|
52
53
|
"type": "git",
|