Skip to content

Commit 73006ca

Browse files
authored
update dependencies (#1515)
1 parent ee5b49d commit 73006ca

File tree

20 files changed

+350
-216
lines changed

20 files changed

+350
-216
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import{stringify as e,replaceComponentValues as n,parseCommaSeparatedListOfComponentValues as t,isFunctionNode as a,isTokenNode as r,isCommentNode as s,TokenNode as o,FunctionNode as i,WhitespaceNode as c}from"@csstools/css-parser-algorithms";import{calcFromComponentValues as l}from"@csstools/css-calc";import{tokenize as u,isTokenDelim as v,TokenType as m,NumberType as f,isTokenNumeric as d}from"@csstools/css-tokenizer";const p=/(?:repeating-)?(?:linear|radial|conic)-gradient\(/i,g=/^(?:repeating-)?(?:linear|radial|conic)-gradient$/i,h=/^(?:abs|acos|asin|atan|atan2|calc|clamp|cos|exp|hypot|log|max|min|mod|pow|rem|round|sign|sin|sqrt|tan)$/i,creator=i=>{const c=Object.assign({preserve:!1},i);return{postcssPlugin:"postcss-gradient-stop-increments",Declaration(i){if(!p.test(i.value))return;const l=u({css:i.value});if(!l.find((e=>v(e)&&"+"===e[4].value)))return;const d=e(n(t(l),(e=>{if(!a(e))return;const n=e.getName();if(!g.test(n))return;let t=null;for(let n=0;n<e.value.length;n++){const i=e.value[n];if(r(i)&&v(i.value)&&"+"===i.value[4].value){const a=i,r=n;for(;s(e.value[n+1]);)n++;if(n++,isZeroOrNegative(e.value[n])){const t=new o([m.Number,"0",-1,-1,{value:0,type:f.Integer}]);e.value.splice(r,n-r+1,t),n=e.value.indexOf(t);continue}const c=incrementLengthNode(t,a,e.value[n]);e.value.splice(r,n-r+1,c),t=c,n=e.value.indexOf(c)}else(isNumericLargerThanZero(i)||a(i)&&h.test(i.getName()))&&(t=maxOfLastAndCurrentLengthNode(t,i))}})));d!==i.value&&(i.cloneBefore({value:d}),c?.preserve||i.remove())}}};function isNumericLargerThanZero(e){return!!(r(e)&&d(e.value)&&e.value[4].value>0)}function isZeroOrNegative(e){return!!(r(e)&&d(e.value)&&e.value[4].value<=0)}function incrementLengthNode(e,n,t){if(!e)return t;const a=new i([m.Function,"calc(",-1,-1,{value:"calc"}],[m.CloseParen,")",-1,-1,void 0],[e,new c([[m.Whitespace," ",-1,-1,void 0]]),n,new c([[m.Whitespace," ",-1,-1,void 0]]),t]),[[r]]=l([[a]]);return r}function maxOfLastAndCurrentLengthNode(e,n){if(!e)return n;const t=new i([m.Function,"max(",-1,-1,{value:"max"}],[m.CloseParen,")",-1,-1,void 0],[e,new o([m.Comma,",",-1,-1,void 0]),new c([[m.Whitespace," ",-1,-1,void 0]]),n]),[[a]]=l([[t]]);return a}creator.postcss=!0;export{creator as default};
1+
import{stringify as e,replaceComponentValues as n,parseCommaSeparatedListOfComponentValues as t,isFunctionNode as a,isTokenNode as r,isCommentNode as s,TokenNode as o,FunctionNode as i,WhitespaceNode as c}from"@csstools/css-parser-algorithms";import{calcFromComponentValues as l}from"@csstools/css-calc";import{tokenize as u,isTokenDelim as v,isTokenNumeric as m,TokenType as f,NumberType as d}from"@csstools/css-tokenizer";const p=/(?:repeating-)?(?:linear|radial|conic)-gradient\(/i,g=/^(?:repeating-)?(?:linear|radial|conic)-gradient$/i,h=/^(?:abs|acos|asin|atan|atan2|calc|clamp|cos|exp|hypot|log|max|min|mod|pow|rem|round|sign|sin|sqrt|tan)$/i,creator=i=>{const c=Object.assign({preserve:!1},i);return{postcssPlugin:"postcss-gradient-stop-increments",Declaration(i){if(!p.test(i.value))return;const l=u({css:i.value});if(!l.find((e=>v(e)&&"+"===e[4].value)))return;const m=e(n(t(l),(e=>{if(!a(e))return;const n=e.getName();if(!g.test(n))return;let t=null;for(let n=0;n<e.value.length;n++){const i=e.value[n];if(r(i)&&v(i.value)&&"+"===i.value[4].value){const a=i,r=n;for(;s(e.value[n+1]);)n++;if(n++,isZeroOrNegative(e.value[n])){const t=new o([f.Number,"0",-1,-1,{value:0,type:d.Integer}]);e.value.splice(r,n-r+1,t),n=e.value.indexOf(t);continue}const c=incrementLengthNode(t,a,e.value[n]);e.value.splice(r,n-r+1,c),t=c,n=e.value.indexOf(c)}else(isNumericLargerThanZero(i)||a(i)&&h.test(i.getName()))&&(t=maxOfLastAndCurrentLengthNode(t,i))}})));m!==i.value&&(i.cloneBefore({value:m}),c?.preserve||i.remove())}}};function isNumericLargerThanZero(e){return!!(r(e)&&m(e.value)&&e.value[4].value>0)}function isZeroOrNegative(e){return!!(r(e)&&m(e.value)&&e.value[4].value<=0)}function incrementLengthNode(e,n,t){if(!e)return t;const a=new i([f.Function,"calc(",-1,-1,{value:"calc"}],[f.CloseParen,")",-1,-1,void 0],[e,new c([[f.Whitespace," ",-1,-1,void 0]]),n,new c([[f.Whitespace," ",-1,-1,void 0]]),t]),[[r]]=l([[a]]);return r}function maxOfLastAndCurrentLengthNode(e,n){if(!e)return n;const t=new i([f.Function,"max(",-1,-1,{value:"max"}],[f.CloseParen,")",-1,-1,void 0],[e,new o([f.Comma,",",-1,-1,void 0]),new c([[f.Whitespace," ",-1,-1,void 0]]),n]),[[a]]=l([[t]]);return a}creator.postcss=!0;export{creator as default};

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@rollup/plugin-terser": "^0.4.3",
3838
"@rollup/plugin-typescript": "^12.1.1",
3939
"@stryker-mutator/core": "^8.6.0",
40-
"eslint": "^9.13.0",
40+
"eslint": "^9.14.0",
4141
"globals": "^15.12.0",
4242
"knip": "^5.36.5",
4343
"rollup": "^4.25.0",

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

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

packages/css-syntax-patches-for-csstree/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes to CSS Syntax Patches For CSSTree
22

3+
### Unreleased (patch)
4+
5+
- Update `@webref/css` to [`v6.17.2`](https://github.com/w3c/webref/releases/tag/%40webref%2Fraw-css%406.17.2)
6+
37
### 1.0.3
48

59
_November 5, 2024_

packages/css-syntax-patches-for-csstree/dist/index.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"block-ellipsis": "none | auto | <string>",
8989
"block-step": "<'block-step-size'> || <'block-step-insert'> || <'block-step-align'> || <'block-step-round'>",
9090
"block-step-align": "auto | center | start | end",
91-
"block-step-insert": "margin | padding",
91+
"block-step-insert": "margin-box | padding-box | content-box",
9292
"block-step-round": "up | down | nearest",
9393
"block-step-size": "none | <length [0,∞]>",
9494
"bookmark-label": "<content-list>",
@@ -339,7 +339,7 @@
339339
"scroll-padding-left": "auto | <length-percentage [0,∞]>",
340340
"scroll-padding-right": "auto | <length-percentage [0,∞]>",
341341
"scroll-padding-top": "auto | <length-percentage [0,∞]>",
342-
"scroll-start-target": "[ none | auto ]",
342+
"scroll-start-target": "none | auto",
343343
"scroll-timeline": "[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#",
344344
"shape-image-threshold": "<opacity-value>",
345345
"shape-inside": "auto | outside-shape | [ <basic-shape> || shape-box ] | <image> | display",
@@ -437,7 +437,9 @@
437437
"arc-size": "large | small",
438438
"arc-sweep": "cw | ccw",
439439
"attr-name": "[ [ <ident-token> '|' ]? <ident-token> ]",
440-
"attr()": "attr( <attr-name> <syntax>? , <declaration-value>? )",
440+
"attr-type": "type( <syntax> ) | string | <attr-unit>",
441+
"attr-unit": "'%' | em | ex | cap | ch | ic | rem | lh | rlh | vw | vh | vi | vb | vmin | vmax | cm | mm | q | in | pc | pt | px | deg | grad | rad | turn | s | ms | hz | khz | fr",
442+
"attr()": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
441443
"autospace": "no-autospace | [ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ]",
442444
"axis": "block | inline | x | y",
443445
"baseline-position": "[ first | last ]? && baseline",
@@ -471,7 +473,7 @@
471473
"composite-mode": "clear | copy | source-over | destination-over | source-in | destination-in | source-out | destination-out | source-atop | destination-atop | xor | lighter | plus-darker | plus-lighter",
472474
"conic-gradient-syntax": "[ [ [ from <angle> ]? [ at <position> ]? ] || <color-interpolation-method> ]? , <angular-color-stop-list>",
473475
"conic-gradient()": "conic-gradient( [ <conic-gradient-syntax> ] )",
474-
"container-condition": "[ <container-name> ]? <container-query>",
476+
"container-condition": "[ <container-name>? <container-query>? ]!",
475477
"container-progress()": "container-progress( <mf-name> [ of <container-name> ]? , <calc-sum> , <calc-sum> )",
476478
"container-query": "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]",
477479
"content-level": "element | content | text | <attr()> | <counter>",
@@ -615,6 +617,7 @@
615617
"right": "<length-percentage> | auto",
616618
"round()": "round( <rounding-strategy>? , <calc-sum> , <calc-sum>? )",
617619
"running()": "running( <custom-ident> )",
620+
"scroll-button-direction": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
618621
"scroll-state-feature": "<ident> : <ident>",
619622
"scroll-state-in-parens": "( <scroll-state-query> ) | ( <scroll-state-feature> ) | <general-enclosed>",
620623
"scroll-state-query": "not <scroll-state-in-parens> | <scroll-state-in-parens> [ [ and <scroll-state-in-parens> ]* | [ or <scroll-state-in-parens> ]* ] | <scroll-state-feature>",

packages/css-syntax-patches-for-csstree/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"postcss": "^8.4"
4040
},
4141
"devDependencies": {
42-
"@webref/css": "^6.17.1",
42+
"@webref/css": "^6.17.2",
4343
"css-tree": "^2.3.1",
4444
"css-tree-3": "npm:css-tree@^3.0.1"
4545
},

packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-properties.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,10 @@
408408
"tests": {
409409
"passing": [
410410
{
411-
"value": "auto margin up 10px"
411+
"value": "auto margin-box up 10px"
412412
},
413413
{
414-
"value": "margin center 10rem up"
414+
"value": "margin-box center 10rem up"
415415
},
416416
{
417417
"value": "15px auto"
@@ -450,15 +450,27 @@
450450
"type": "added",
451451
"comment": "",
452452
"syntax-b": "",
453-
"syntax-a": "margin | padding",
454-
"syntax-m": "margin | padding",
453+
"syntax-a": "margin-box | padding-box | content-box",
454+
"syntax-m": "margin-box | padding-box | content-box",
455455
"tests": {
456456
"passing": [
457457
{
458-
"value": "margin"
458+
"value": "margin-box"
459+
},
460+
{
461+
"value": "padding-box"
462+
},
463+
{
464+
"value": "content-box"
459465
}
460466
],
461467
"failing": [
468+
{
469+
"value": "padding"
470+
},
471+
{
472+
"value": "box"
473+
},
462474
{
463475
"value": "foo"
464476
}
@@ -3889,8 +3901,8 @@
38893901
"type": "added",
38903902
"comment": "",
38913903
"syntax-b": "",
3892-
"syntax-a": "[ none | auto ]",
3893-
"syntax-m": "[ none | auto ]",
3904+
"syntax-a": "none | auto",
3905+
"syntax-m": "none | auto",
38943906
"tests": {
38953907
"passing": [],
38963908
"failing": []

packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,34 @@
261261
]
262262
}
263263
},
264+
"attr-type": {
265+
"type": "added",
266+
"comment": "",
267+
"syntax-b": "",
268+
"syntax-a": "type( <syntax> ) | string | <attr-unit>",
269+
"syntax-m": "type( <syntax> ) | string | <attr-unit>",
270+
"tests": {
271+
"passing": [],
272+
"failing": []
273+
}
274+
},
275+
"attr-unit": {
276+
"type": "added",
277+
"comment": "",
278+
"syntax-b": "",
279+
"syntax-a": "'%' | em | ex | cap | ch | ic | rem | lh | rlh | vw | vh | vi | vb | vmin | vmax | cm | mm | q | in | pc | pt | px | deg | grad | rad | turn | s | ms | hz | khz | fr",
280+
"syntax-m": "'%' | em | ex | cap | ch | ic | rem | lh | rlh | vw | vh | vi | vb | vmin | vmax | cm | mm | q | in | pc | pt | px | deg | grad | rad | turn | s | ms | hz | khz | fr",
281+
"tests": {
282+
"passing": [],
283+
"failing": []
284+
}
285+
},
264286
"attr()": {
265287
"type": "modified",
266288
"comment": "",
267289
"syntax-b": "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )",
268-
"syntax-a": "attr( <attr-name> <syntax>? , <declaration-value>? )",
269-
"syntax-m": "attr( <attr-name> <syntax>? , <declaration-value>? )",
290+
"syntax-a": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
291+
"syntax-m": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
270292
"tests": {
271293
"passing": [
272294
{
@@ -275,17 +297,21 @@
275297
},
276298
{
277299
"property": "content",
278-
"value": "attr(value <string>)"
300+
"value": "attr(value type(<string>))"
301+
},
302+
{
303+
"property": "content",
304+
"value": "attr(value string)"
279305
},
280306
{
281307
"property": "content",
282-
"value": "attr(value foo)"
308+
"value": "attr(value px)"
283309
}
284310
],
285311
"failing": [
286312
{
287313
"property": "content",
288-
"value": "attr(value ><)"
314+
"value": "attr(value <string>)"
289315
},
290316
{
291317
"property": "content",
@@ -828,8 +854,8 @@
828854
"type": "modified",
829855
"comment": "",
830856
"syntax-b": "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]",
831-
"syntax-a": "[ <container-name> ]? <container-query>",
832-
"syntax-m": "[ <container-name> ]? <container-query>",
857+
"syntax-a": "[ <container-name>? <container-query>? ]!",
858+
"syntax-m": "[ <container-name>? <container-query>? ]!",
833859
"tests": {
834860
"passing": [],
835861
"failing": []
@@ -3285,6 +3311,17 @@
32853311
"failing": []
32863312
}
32873313
},
3314+
"scroll-button-direction": {
3315+
"type": "added",
3316+
"comment": "",
3317+
"syntax-b": "",
3318+
"syntax-a": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
3319+
"syntax-m": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
3320+
"tests": {
3321+
"passing": [],
3322+
"failing": []
3323+
}
3324+
},
32883325
"scroll-state-feature": {
32893326
"type": "added",
32903327
"comment": "",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[
2+
"'%'",
3+
4+
"em",
5+
"ex",
6+
"cap",
7+
"ch",
8+
"ic",
9+
"rem",
10+
"lh",
11+
"rlh",
12+
"vw",
13+
"vh",
14+
"vi",
15+
"vb",
16+
"vmin",
17+
"vmax",
18+
19+
"cm",
20+
"mm",
21+
"q",
22+
"in",
23+
"pc",
24+
"pt",
25+
"px",
26+
27+
"deg",
28+
"grad",
29+
"rad",
30+
"turn",
31+
32+
"s",
33+
"ms",
34+
35+
"hz",
36+
"khz",
37+
38+
"fr"
39+
]

0 commit comments

Comments
 (0)