Skip to content

update dependencies #1515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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};
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};
372 changes: 191 additions & 181 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^12.1.1",
"@stryker-mutator/core": "^8.6.0",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"globals": "^15.12.0",
"knip": "^5.36.5",
"rollup": "^4.25.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-parser-algorithms/dist/index.mjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/css-syntax-patches-for-csstree/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes to CSS Syntax Patches For CSSTree

### Unreleased (patch)

- Update `@webref/css` to [`v6.17.2`](https://github.com/w3c/webref/releases/tag/%40webref%2Fraw-css%406.17.2)

### 1.0.3

_November 5, 2024_
Expand Down
11 changes: 7 additions & 4 deletions packages/css-syntax-patches-for-csstree/dist/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"block-ellipsis": "none | auto | <string>",
"block-step": "<'block-step-size'> || <'block-step-insert'> || <'block-step-align'> || <'block-step-round'>",
"block-step-align": "auto | center | start | end",
"block-step-insert": "margin | padding",
"block-step-insert": "margin-box | padding-box | content-box",
"block-step-round": "up | down | nearest",
"block-step-size": "none | <length [0,∞]>",
"bookmark-label": "<content-list>",
Expand Down Expand Up @@ -339,7 +339,7 @@
"scroll-padding-left": "auto | <length-percentage [0,∞]>",
"scroll-padding-right": "auto | <length-percentage [0,∞]>",
"scroll-padding-top": "auto | <length-percentage [0,∞]>",
"scroll-start-target": "[ none | auto ]",
"scroll-start-target": "none | auto",
"scroll-timeline": "[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#",
"shape-image-threshold": "<opacity-value>",
"shape-inside": "auto | outside-shape | [ <basic-shape> || shape-box ] | <image> | display",
Expand Down Expand Up @@ -437,7 +437,9 @@
"arc-size": "large | small",
"arc-sweep": "cw | ccw",
"attr-name": "[ [ <ident-token> '|' ]? <ident-token> ]",
"attr()": "attr( <attr-name> <syntax>? , <declaration-value>? )",
"attr-type": "type( <syntax> ) | string | <attr-unit>",
"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",
"attr()": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
"autospace": "no-autospace | [ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ]",
"axis": "block | inline | x | y",
"baseline-position": "[ first | last ]? && baseline",
Expand Down Expand Up @@ -471,7 +473,7 @@
"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",
"conic-gradient-syntax": "[ [ [ from <angle> ]? [ at <position> ]? ] || <color-interpolation-method> ]? , <angular-color-stop-list>",
"conic-gradient()": "conic-gradient( [ <conic-gradient-syntax> ] )",
"container-condition": "[ <container-name> ]? <container-query>",
"container-condition": "[ <container-name>? <container-query>? ]!",
"container-progress()": "container-progress( <mf-name> [ of <container-name> ]? , <calc-sum> , <calc-sum> )",
"container-query": "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]",
"content-level": "element | content | text | <attr()> | <counter>",
Expand Down Expand Up @@ -615,6 +617,7 @@
"right": "<length-percentage> | auto",
"round()": "round( <rounding-strategy>? , <calc-sum> , <calc-sum>? )",
"running()": "running( <custom-ident> )",
"scroll-button-direction": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
"scroll-state-feature": "<ident> : <ident>",
"scroll-state-in-parens": "( <scroll-state-query> ) | ( <scroll-state-feature> ) | <general-enclosed>",
"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>",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-syntax-patches-for-csstree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"postcss": "^8.4"
},
"devDependencies": {
"@webref/css": "^6.17.1",
"@webref/css": "^6.17.2",
"css-tree": "^2.3.1",
"css-tree-3": "npm:css-tree@^3.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@
"tests": {
"passing": [
{
"value": "auto margin up 10px"
"value": "auto margin-box up 10px"
},
{
"value": "margin center 10rem up"
"value": "margin-box center 10rem up"
},
{
"value": "15px auto"
Expand Down Expand Up @@ -450,15 +450,27 @@
"type": "added",
"comment": "",
"syntax-b": "",
"syntax-a": "margin | padding",
"syntax-m": "margin | padding",
"syntax-a": "margin-box | padding-box | content-box",
"syntax-m": "margin-box | padding-box | content-box",
"tests": {
"passing": [
{
"value": "margin"
"value": "margin-box"
},
{
"value": "padding-box"
},
{
"value": "content-box"
}
],
"failing": [
{
"value": "padding"
},
{
"value": "box"
},
{
"value": "foo"
}
Expand Down Expand Up @@ -3889,8 +3901,8 @@
"type": "added",
"comment": "",
"syntax-b": "",
"syntax-a": "[ none | auto ]",
"syntax-m": "[ none | auto ]",
"syntax-a": "none | auto",
"syntax-m": "none | auto",
"tests": {
"passing": [],
"failing": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,34 @@
]
}
},
"attr-type": {
"type": "added",
"comment": "",
"syntax-b": "",
"syntax-a": "type( <syntax> ) | string | <attr-unit>",
"syntax-m": "type( <syntax> ) | string | <attr-unit>",
"tests": {
"passing": [],
"failing": []
}
},
"attr-unit": {
"type": "added",
"comment": "",
"syntax-b": "",
"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",
"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",
"tests": {
"passing": [],
"failing": []
}
},
"attr()": {
"type": "modified",
"comment": "",
"syntax-b": "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )",
"syntax-a": "attr( <attr-name> <syntax>? , <declaration-value>? )",
"syntax-m": "attr( <attr-name> <syntax>? , <declaration-value>? )",
"syntax-a": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
"syntax-m": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
"tests": {
"passing": [
{
Expand All @@ -275,17 +297,21 @@
},
{
"property": "content",
"value": "attr(value <string>)"
"value": "attr(value type(<string>))"
},
{
"property": "content",
"value": "attr(value string)"
},
{
"property": "content",
"value": "attr(value foo)"
"value": "attr(value px)"
}
],
"failing": [
{
"property": "content",
"value": "attr(value ><)"
"value": "attr(value <string>)"
},
{
"property": "content",
Expand Down Expand Up @@ -828,8 +854,8 @@
"type": "modified",
"comment": "",
"syntax-b": "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]",
"syntax-a": "[ <container-name> ]? <container-query>",
"syntax-m": "[ <container-name> ]? <container-query>",
"syntax-a": "[ <container-name>? <container-query>? ]!",
"syntax-m": "[ <container-name>? <container-query>? ]!",
"tests": {
"passing": [],
"failing": []
Expand Down Expand Up @@ -3285,6 +3311,17 @@
"failing": []
}
},
"scroll-button-direction": {
"type": "added",
"comment": "",
"syntax-b": "",
"syntax-a": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
"syntax-m": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
"tests": {
"passing": [],
"failing": []
}
},
"scroll-state-feature": {
"type": "added",
"comment": "",
Expand Down
39 changes: 39 additions & 0 deletions packages/css-syntax-patches-for-csstree/raw-data/units.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
"'%'",

"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"
]
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"block-step-insert": {
"type": "added",
"syntax-b": "",
"syntax-a": "margin | padding",
"syntax-a": "margin-box | padding-box | content-box",
"comment": ""
},
"block-step-round": {
Expand Down Expand Up @@ -1718,7 +1718,7 @@
"scroll-start-target": {
"type": "added",
"syntax-b": "",
"syntax-a": "[ none | auto ]",
"syntax-a": "none | auto",
"comment": ""
},
"scroll-timeline": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,22 @@
"syntax-a": "[ <ident-token> '|' ]? <ident-token>",
"comment": ""
},
"attr-type": {
"type": "added",
"syntax-b": "",
"syntax-a": "type( <syntax> ) | string | <attr-unit>",
"comment": ""
},
"attr-unit": {
"type": "added",
"syntax-b": "",
"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",
"comment": ""
},
"attr()": {
"type": "modified",
"syntax-b": "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )",
"syntax-a": "attr( <attr-name> <syntax>? , <declaration-value>? )",
"syntax-a": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
"comment": ""
},
"autospace": {
Expand Down Expand Up @@ -272,7 +284,7 @@
"container-condition": {
"type": "modified",
"syntax-b": "not <query-in-parens> | <query-in-parens> [ [ and <query-in-parens> ]* | [ or <query-in-parens> ]* ]",
"syntax-a": "[ <container-name> ]? <container-query>",
"syntax-a": "[ <container-name>? <container-query>? ]!",
"comment": ""
},
"container-progress()": {
Expand Down Expand Up @@ -1181,6 +1193,12 @@
"syntax-a": "running( <custom-ident> )",
"comment": ""
},
"scroll-button-direction": {
"type": "added",
"syntax-b": "",
"syntax-a": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next",
"comment": ""
},
"scroll-state-feature": {
"type": "added",
"syntax-b": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"syntax": "auto | center | start | end"
},
"block-step-insert": {
"syntax": "margin | padding"
"syntax": "margin-box | padding-box | content-box"
},
"block-step-round": {
"syntax": "up | down | nearest"
Expand Down Expand Up @@ -1866,7 +1866,7 @@
"syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>"
},
"scroll-start-target": {
"syntax": "[ none | auto ]"
"syntax": "none | auto"
},
"scroll-timeline": {
"syntax": "[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#"
Expand Down
13 changes: 11 additions & 2 deletions packages/css-syntax-patches-for-csstree/raw-data/webref-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,14 @@
"attr-name": {
"syntax": "[ <ident-token> '|' ]? <ident-token>"
},
"attr-type": {
"syntax": "type( <syntax> ) | string | <attr-unit>"
},
"attr-unit": {
"syntax": "'%' | 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"
},
"attr()": {
"syntax": "attr( <attr-name> <syntax>? , <declaration-value>? )"
"syntax": "attr( <attr-name> <attr-type>? , <declaration-value>? )"
},
"attribute-selector": {
"syntax": "'[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'"
Expand Down Expand Up @@ -300,7 +306,7 @@
"syntax": "conic-gradient( [ <conic-gradient-syntax> ] )"
},
"container-condition": {
"syntax": "[ <container-name> ]? <container-query>"
"syntax": "[ <container-name>? <container-query>? ]!"
},
"container-name": {
"syntax": "<custom-ident>"
Expand Down Expand Up @@ -1307,6 +1313,9 @@
"scope-start": {
"syntax": "<forgiving-selector-list>"
},
"scroll-button-direction": {
"syntax": "up | down | left | right | block-start | block-end | inline-start | inline-end | prev | next"
},
"scroll-state-feature": {
"syntax": "<ident> : <ident>"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ export async function generate_webref_sets() {

// Set missing definitions
{
values['attr-unit'] = JSON.parse(await fs.readFile(path.join('raw-data', 'units.json'))).join(' | ');

values['intrinsic-size-keyword'] = JSON.parse(await fs.readFile(path.join('raw-data', 'intrinsic-size-keywords.json'))).join(' | ');

// https://github.com/w3c/csswg-drafts/issues/11127
Expand Down
2 changes: 1 addition & 1 deletion packages/media-query-list-parser/dist/index.mjs

Large diffs are not rendered by default.

Loading