@eslint/css-tree 3.6.8 → 3.6.9

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/README.md CHANGED
@@ -201,10 +201,10 @@ The following companies, organizations, and individuals support ESLint's ongoing
201
201
  to get your logo on our READMEs and [website](https://eslint.org/sponsors).
202
202
 
203
203
  <h3>Platinum Sponsors</h3>
204
- <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
204
+ <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a></p><h3>Gold Sponsors</h3>
205
205
  <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
206
- <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
207
- <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
206
+ <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/d472863/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
207
+ <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://www.crawljobs.com/"><img src="https://images.opencollective.com/crawljobs-poland/fa43a17/logo.png" alt="CrawlJobs" height="32"></a> <a href="https://depot.dev"><img src="https://images.opencollective.com/depot/39125a1/logo.png" alt="Depot" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="TestMu AI Open Source Office (Formerly LambdaTest)" height="32"></a></p>
208
208
  <h3>Technology Sponsors</h3>
209
209
  Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
210
210
  <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
@@ -7,8 +7,8 @@ const layer = {
7
7
  this.LayerList()
8
8
  );
9
9
  },
10
- block() {
11
- return this.Block(false);
10
+ block(nested = false, { allowNestedRules = false } = {}) {
11
+ return this.Block(nested, { allowNestedRules });
12
12
  }
13
13
  }
14
14
  };
@@ -48,10 +48,50 @@ function isElementSelectorStart() {
48
48
 
49
49
  const nextTokenType = this.lookupTypeNonSC(1);
50
50
 
51
+ // If next token is not colon, semicolon, or right curly bracket, it's likely a selector
51
52
  if (nextTokenType !== types.Colon && nextTokenType !== types.Semicolon && nextTokenType !== types.RightCurlyBracket) {
52
53
  return true;
53
54
  }
54
55
 
56
+ // If next token is colon, we need to look further ahead to distinguish
57
+ // between property declarations (p: value) and pseudo-class selectors (p:hover)
58
+ if (nextTokenType === types.Colon) {
59
+ // Look for the token after the colon (skipping whitespace)
60
+ const tokenAfterColon = this.lookupTypeNonSC(2);
61
+
62
+ // If it's an identifier (like 'hover', 'first-of-type') or function (like 'nth-child()', 'not()'),
63
+ // this could be a pseudo-class
64
+ if (tokenAfterColon === types.Ident || tokenAfterColon === types.Function) {
65
+ // Look further ahead to see if there's a left curly bracket
66
+ // which would indicate this is a selector with a block
67
+ let offset = 3;
68
+ let tokenType;
69
+
70
+ // Skip whitespace and look for either a left curly bracket or other tokens
71
+ while (offset <= 15) { // Increased limit to handle function pseudo-classes
72
+ tokenType = this.lookupType(offset);
73
+
74
+ if (tokenType === types.LeftCurlyBracket) {
75
+ // Found opening brace, this is definitely a selector
76
+ return true;
77
+ } else if (tokenType === types.Semicolon || tokenType === types.RightCurlyBracket) {
78
+ // Found semicolon or closing brace before opening brace, likely a property
79
+ return false;
80
+ } else if (tokenType === types.WhiteSpace || tokenType === types.Comment) {
81
+ // Skip whitespace and comments
82
+ offset++;
83
+ continue;
84
+ } else {
85
+ // Other tokens might indicate more complex selectors, continue looking
86
+ offset++;
87
+ }
88
+ }
89
+ }
90
+
91
+ // If we can't determine conclusively, default to property behavior
92
+ return false;
93
+ }
94
+
55
95
  return false;
56
96
  }
57
97
 
package/data/patch.json CHANGED
@@ -649,6 +649,9 @@
649
649
  "cmyk-component": {
650
650
  "syntax": "<number> | <percentage> | none"
651
651
  },
652
+ "color-function": {
653
+ "syntax": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <alpha()> | <color()>"
654
+ },
652
655
  "color-mix()": {
653
656
  "syntax": "color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#{2} )"
654
657
  },
@@ -866,6 +869,9 @@
866
869
  "oklch()": {
867
870
  "syntax": "<legacy-oklch-syntax> | <modern-oklch-syntax>"
868
871
  },
872
+ "alpha()": {
873
+ "syntax": "alpha( [ from <color> ] [ / [ <alpha-value> | none ] ]? )"
874
+ },
869
875
  "colorspace-params": {
870
876
  "syntax": "[ <predefined-rgb-params> | <xyz-params>]"
871
877
  },