Skip to content

Commit 3e9b807

Browse files
committed
update dependencies
1 parent 89479fc commit 3e9b807

11 files changed

Lines changed: 624 additions & 667 deletions

File tree

e2e/package-lock.json

Lines changed: 101 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 400 additions & 453 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/css-color-parser/dist/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/css-color-parser/src/functions/color-mix.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export function colorMix(colorMixNode: FunctionNode, colorParser: ColorParser):
106106
}
107107

108108
if (
109-
colorSpace &&
110109
hueInterpolationMethod &&
111110
hueKeyword &&
112111
polarColorSpaces.has(colorSpace) &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import o from"@csstools/postcss-progressive-custom-properties";import{hasFallback as e,hasSupportsAtRuleAncestor as t}from"@csstools/utilities";import{WhitespaceNode as r,TokenNode as i,FunctionNode as n,isCommentNode as s,isWhitespaceNode as l,isTokenNode as a,stringify as c,replaceComponentValues as u,parseCommaSeparatedListOfComponentValues as p,isFunctionNode as v}from"@csstools/css-parser-algorithms";import{TokenType as f,isTokenComma as h,isTokenIdent as m,tokenize as d}from"@csstools/css-tokenizer";import{serializeP3 as g,color as w,colorDataFitsRGB_Gamut as D,serializeRGB as C,SyntaxFlag as b}from"@csstools/css-color-parser";const x=/(?:repeating-)?(?:linear|radial|conic)-gradient\(/i,W=/\bin\b/i,P={test:o=>x.test(o)&&W.test(o)},A=/^(repeating-)?(linear|radial|conic)-gradient$/i;function interpolateColorsInColorStopsList(o,e,t,s=!1){const l=[],a=[];for(let s=0;s<o.length-1;s++){const l=o[s],c=o[s+1];if(a.push(l),t||g(l.colorData,!1).toString()!==g(c.colorData,!1).toString()&&l.position.toString()!==c.position.toString())for(let o=1;o<=9;o++){const s=10*o;let u=[];t&&(u=[new r([[f.Whitespace," ",-1,-1,void 0]]),t,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Ident,"hue",-1,-1,{value:"hue"}])]);const p=new n([f.Function,"color-mix(",-1,-1,{value:"color-mix"}],[f.CloseParen,")",-1,-1,void 0],[new i([f.Ident,"in",-1,-1,{value:"in"}]),new r([[f.Whitespace," ",-1,-1,void 0]]),e,...u,new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]),l.color,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Percentage,100-s+"%",-1,-1,{value:100-s}]),new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]),c.color,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Percentage,`${s}%`,-1,-1,{value:s}])]),v=w(p);if(!v)return!1;a.push({colorData:v})}s===o.length-2&&a.push(c)}for(let o=0;o<a.length;o++)s&&!D(a[o].colorData)?a[o].color=g(a[o].colorData,!1):a[o].color=C(a[o].colorData,!1);for(let o=0;o<a.length;o++){const e=a[o];e.position?l.push(e.color,new r([[f.Whitespace," ",-1,-1,void 0]]),e.position):l.push(e.color),o!==a.length-1&&l.push(new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]))}return l}function parseColorStops(o){const e=[];let t={};for(let r=0;r<o.length;r++){const i=o[r];if(s(i)||l(i))continue;if(a(i)&&h(i.value)){if(t.color&&t.colorData&&t.positionA){e.push({color:t.color,colorData:t.colorData,position:t.positionA}),t.positionB&&e.push({color:t.color,colorData:t.colorData,position:t.positionB}),t={};continue}return!1}const n=w(i);if(n){if(t.color)return!1;if(n.syntaxFlags.has(b.Experimental))return!1;t.color=i,t.colorData=n}else{if(!t.color)return!1;if(t.positionA){if(!t.positionA||t.positionB)return!1;t.positionB=i}else t.positionA=i}}return!(!t.color||!t.positionA)&&(t.color&&t.colorData&&t.positionA&&(e.push({color:t.color,colorData:t.colorData,position:t.positionA}),t.positionB&&e.push({color:t.color,colorData:t.colorData,position:t.positionB})),!(e.length<2)&&e)}const B=/^(?:srgb|srgb-linear|lab|oklab|xyz|xyz-d50|xyz-d65|hsl|hwb|lch|oklch)$/i,S=/^(?:hsl|hwb|lch|oklch)$/i,y=/^(?:shorter|longer|increasing|decreasing)$/i,$=/^in$/i,k=/^hue$/i;function modifyGradientFunctionComponentValues(o,e=!1){const t=o.getName();if(!A.test(t))return!1;let n,c,u,p="srgb",v=null,d=null,g=null;{let e=0,t=o.value[e];for(;t&&!(a(t)&&m(t.value)&&$.test(t.value[4].value));){if(a(t)&&h(t.value))return!1;e++,t=o.value[e]}for(n=t,e++,t=o.value[e];s(t)||l(t);)e++,t=o.value[e];if(a(t)&&m(t.value)&&B.test(t.value[4].value)){if(v)return!1;v=t,p=t.value[4].value,e++,t=o.value[e]}for(;s(t)||l(t);)e++,t=o.value[e];if(a(t)&&m(t.value)&&y.test(t.value[4].value)&&S.test(p)){if(d||!v)return!1;d=t,e++,t=o.value[e]}for(;s(t)||l(t);)e++,t=o.value[e];if(a(t)&&m(t.value)&&k.test(t.value[4].value)){if(g||!v||!d)return!1;g=t,e++,t=o.value[e]}for(;t&&(!a(t)||!h(t.value));)e++,t=o.value[e];if(c=t,!c)return!1;u=o.value.slice(e+1)}if(!v)return!1;if(d&&!g)return!1;if(g&&!d)return!1;const w=parseColorStops(u);if(!w)return!1;const D=interpolateColorsInColorStopsList(w,v,d,e);if(!D)return!1;const C=trim([...o.value.slice(0,o.value.indexOf(n)),...o.value.slice(o.value.indexOf(g||v)+1,o.value.indexOf(c))]);return C.length>0&&C.some(o=>!s(o))&&C.push(new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]])),trim([...C,...trim(D)])}function trim(o){let e=0,t=o.length-1;for(let t=0;t<o.length;t++)if(!l(o[t])){e=t;break}for(let e=o.length-1;e>=0;e--)if(!l(o[e])){t=e;break}return o.slice(e,t+1)}const basePlugin=o=>({postcssPlugin:"postcss-gradients-interpolation-method",Declaration(r){if(!P.test(r.value))return;if(e(r))return;if(t(r,P))return;const i=d({css:r.value}),n=c(u(p(i),o=>{if(!v(o))return;const e=modifyGradientFunctionComponentValues(o);e&&(o.value=e)}));if(n===r.value)return;const s=c(u(p(i),o=>{if(!v(o))return;const e=modifyGradientFunctionComponentValues(o,!0);e&&(o.value=e)}));r.cloneBefore({value:n}),n!==s&&r.cloneBefore({value:s}),o?.preserve||r.remove()}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({enableProgressiveCustomProperties:!0,preserve:!0},e);return t.enableProgressiveCustomProperties?{postcssPlugin:"postcss-gradients-interpolation-method",plugins:[o(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default,postcssPlugin as"module.exports"};
1+
import o from"@csstools/postcss-progressive-custom-properties";import{hasFallback as e,hasSupportsAtRuleAncestor as t}from"@csstools/utilities";import{WhitespaceNode as r,TokenNode as i,FunctionNode as n,isCommentNode as s,isWhitespaceNode as l,isTokenNode as a,stringify as c,replaceComponentValues as u,parseCommaSeparatedListOfComponentValues as p,isFunctionNode as v}from"@csstools/css-parser-algorithms";import{TokenType as f,isTokenComma as h,isTokenIdent as m,tokenize as d}from"@csstools/css-tokenizer";import{serializeP3 as g,color as w,colorDataFitsRGB_Gamut as D,serializeRGB as C,SyntaxFlag as b}from"@csstools/css-color-parser";const x=/(?:repeating-)?(?:linear|radial|conic)-gradient\(/i,W=/\bin\b/i,P={test:o=>x.test(o)&&W.test(o)},A=/^(repeating-)?(linear|radial|conic)-gradient$/i;function interpolateColorsInColorStopsList(o,e,t,s=!1){const l=[],a=[];for(let s=0;s<o.length-1;s++){const l=o[s],c=o[s+1];if(a.push(l),t||g(l.colorData,!1).toString()!==g(c.colorData,!1).toString()&&l.position.toString()!==c.position.toString())for(let o=1;o<=9;o++){const s=10*o;let u=[];t&&(u=[new r([[f.Whitespace," ",-1,-1,void 0]]),t,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Ident,"hue",-1,-1,{value:"hue"}])]);const p=new n([f.Function,"color-mix(",-1,-1,{value:"color-mix"}],[f.CloseParen,")",-1,-1,void 0],[new i([f.Ident,"in",-1,-1,{value:"in"}]),new r([[f.Whitespace," ",-1,-1,void 0]]),e,...u,new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]),l.color,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Percentage,100-s+"%",-1,-1,{value:100-s}]),new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]),c.color,new r([[f.Whitespace," ",-1,-1,void 0]]),new i([f.Percentage,`${s}%`,-1,-1,{value:s}])]),v=w(p);if(!v)return!1;a.push({colorData:v})}s===o.length-2&&a.push(c)}for(let o=0;o<a.length;o++)s&&!D(a[o].colorData)?a[o].color=g(a[o].colorData,!1):a[o].color=C(a[o].colorData,!1);for(let o=0;o<a.length;o++){const e=a[o];e.position?l.push(e.color,new r([[f.Whitespace," ",-1,-1,void 0]]),e.position):l.push(e.color),o!==a.length-1&&l.push(new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]]))}return l}function parseColorStops(o){const e=[];let t={};for(let r=0;r<o.length;r++){const i=o[r];if(s(i)||l(i))continue;if(a(i)&&h(i.value)){if(t.color&&t.colorData&&t.positionA){e.push({color:t.color,colorData:t.colorData,position:t.positionA}),t.positionB&&e.push({color:t.color,colorData:t.colorData,position:t.positionB}),t={};continue}return!1}const n=w(i);if(n){if(t.color)return!1;if(n.syntaxFlags.has(b.Experimental))return!1;t.color=i,t.colorData=n}else{if(!t.color)return!1;if(t.positionA){if(!t.positionA||t.positionB)return!1;t.positionB=i}else t.positionA=i}}return!(!t.color||!t.positionA)&&(t.color&&t.colorData&&t.positionA&&(e.push({color:t.color,colorData:t.colorData,position:t.positionA}),t.positionB&&e.push({color:t.color,colorData:t.colorData,position:t.positionB})),!(e.length<2)&&e)}const B=/^(?:srgb|srgb-linear|lab|oklab|xyz|xyz-d50|xyz-d65|hsl|hwb|lch|oklch)$/i,S=/^(?:hsl|hwb|lch|oklch)$/i,y=/^(?:shorter|longer|increasing|decreasing)$/i,$=/^in$/i,k=/^hue$/i;function modifyGradientFunctionComponentValues(o,e=!1){const t=o.getName();if(!A.test(t))return!1;let n,c,u,p="srgb",v=null,d=null,g=null;{let e=0,t=o.value[e];for(;t&&!(a(t)&&m(t.value)&&$.test(t.value[4].value));){if(a(t)&&h(t.value))return!1;e++,t=o.value[e]}for(n=t,e++,t=o.value[e];s(t)||l(t);)e++,t=o.value[e];for(a(t)&&m(t.value)&&B.test(t.value[4].value)&&(v=t,p=t.value[4].value,e++,t=o.value[e]);s(t)||l(t);)e++,t=o.value[e];if(a(t)&&m(t.value)&&y.test(t.value[4].value)&&S.test(p)){if(!v)return!1;d=t,e++,t=o.value[e]}for(;s(t)||l(t);)e++,t=o.value[e];if(a(t)&&m(t.value)&&k.test(t.value[4].value)){if(!v||!d)return!1;g=t,e++,t=o.value[e]}for(;t&&(!a(t)||!h(t.value));)e++,t=o.value[e];if(c=t,!c)return!1;u=o.value.slice(e+1)}if(!v)return!1;if(d&&!g)return!1;if(g&&!d)return!1;const w=parseColorStops(u);if(!w)return!1;const D=interpolateColorsInColorStopsList(w,v,d,e);if(!D)return!1;const C=trim([...o.value.slice(0,o.value.indexOf(n)),...o.value.slice(o.value.indexOf(g||v)+1,o.value.indexOf(c))]);return C.length>0&&C.some(o=>!s(o))&&C.push(new i([f.Comma,",",-1,-1,void 0]),new r([[f.Whitespace," ",-1,-1,void 0]])),trim([...C,...trim(D)])}function trim(o){let e=0,t=o.length-1;for(let t=0;t<o.length;t++)if(!l(o[t])){e=t;break}for(let e=o.length-1;e>=0;e--)if(!l(o[e])){t=e;break}return o.slice(e,t+1)}const basePlugin=o=>({postcssPlugin:"postcss-gradients-interpolation-method",Declaration(r){if(!P.test(r.value))return;if(e(r))return;if(t(r,P))return;const i=d({css:r.value}),n=c(u(p(i),o=>{if(!v(o))return;const e=modifyGradientFunctionComponentValues(o);e&&(o.value=e)}));if(n===r.value)return;const s=c(u(p(i),o=>{if(!v(o))return;const e=modifyGradientFunctionComponentValues(o,!0);e&&(o.value=e)}));r.cloneBefore({value:n}),n!==s&&r.cloneBefore({value:s}),o?.preserve||r.remove()}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({enableProgressiveCustomProperties:!0,preserve:!0},e);return t.enableProgressiveCustomProperties?{postcssPlugin:"postcss-gradients-interpolation-method",plugins:[o(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default,postcssPlugin as"module.exports"};

plugins/postcss-gradients-interpolation-method/src/modify-gradient-component-values.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ export function modifyGradientFunctionComponentValues(gradientFunction: Function
5959
isTokenIdent(node.value) &&
6060
COLOR_SPACE_REGEX.test(node.value[4].value)
6161
) {
62-
if (colorSpace) {
63-
return false;
64-
}
65-
6662
colorSpace = node;
6763
colorSpaceName = node.value[4].value;
6864

@@ -82,7 +78,7 @@ export function modifyGradientFunctionComponentValues(gradientFunction: Function
8278
HUE_INTERPOLATION_METHOD_REGEX.test(node.value[4].value) &&
8379
POLAR_COLOR_SPACE_REGEX.test(colorSpaceName)
8480
) {
85-
if (hueInterpolationMethod || !colorSpace) {
81+
if (!colorSpace) {
8682
return false;
8783
}
8884

@@ -103,7 +99,7 @@ export function modifyGradientFunctionComponentValues(gradientFunction: Function
10399
isTokenIdent(node.value) &&
104100
HUE_KEYWORD_REGEX.test(node.value[4].value)
105101
) {
106-
if (hueKeyword || !colorSpace || !hueInterpolationMethod) {
102+
if (!colorSpace || !hueInterpolationMethod) {
107103
return false;
108104
}
109105

plugins/postcss-nesting/src/editions/2021/lib/nest-rule-within-rule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function transformNestRuleWithinRule(node: AtRule, parent: Rule,
1212
try {
1313
selectors = mergeSelectors(parent.selectors, comma(node.params), opts);
1414
} catch (err) {
15-
node.warn(result, `Failed to parse selectors : "${parent.selector}" / "${node.params}" with message: "${(err instanceof Error) ? err.message: err}"`);
15+
node.warn(result, `Failed to parse selectors : "${parent.selector}" / "${node.params}" with message: "${(err instanceof Error) ? err.message : err}"`);
1616
return;
1717
}
1818

plugins/postcss-nesting/src/editions/2021/lib/rule-within-rule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function transformRuleWithinRule(node: Rule, parent: Rule, result
1212
try {
1313
selectors = mergeSelectors(parent.selectors, node.selectors, opts);
1414
} catch (err) {
15-
node.warn(result, `Failed to parse selectors : "${parent.selector}" / "${node.selector}" with message: "${(err instanceof Error) ? err.message: err}"`);
15+
node.warn(result, `Failed to parse selectors : "${parent.selector}" / "${node.selector}" with message: "${(err instanceof Error) ? err.message : err}"`);
1616
return;
1717
}
1818

plugins/postcss-nesting/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const creator: PluginCreator<pluginOptions> = (opts?: pluginOptions) => {
2828
case '2021':
2929
return plugin2021(opts);
3030
case '2024-02':
31-
return plugin2024_02(opts);
31+
return plugin2024_02();
3232
default:
3333
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
3434
throw new Error(`Invalid edition: ${options.edition}`);

plugins/postcss-rebase-url/test/unit/basic.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { rebase } from '../../src/rebase.mjs';
77
'foo.png',
88
'/assets/css',
99
'/assets/css',
10-
'/assets/css',
1110
),
1211
'foo.png',
1312
);
@@ -19,7 +18,6 @@ import { rebase } from '../../src/rebase.mjs';
1918
'foo.png',
2019
'/assets/css/components',
2120
'/assets/css',
22-
'/assets/css',
2321
),
2422
'components/foo.png',
2523
);

0 commit comments

Comments
 (0)