@eslint/css-tree 3.5.0 → 3.5.2

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/dist/data.cjs CHANGED
@@ -526,7 +526,8 @@ module.exports = {
526
526
  "inset-area": "[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",
527
527
  "font-variant-css2": "normal|small-caps",
528
528
  "font-width-css3": "normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",
529
- "system-family-name": "caption|icon|menu|message-box|small-caption|status-bar"
529
+ "system-family-name": "caption|icon|menu|message-box|small-caption|status-bar",
530
+ "parentheses-block": "( <any-value>* )"
530
531
  },
531
532
  "properties": {
532
533
  "--*": "<declaration-value>",
package/dist/data.js CHANGED
@@ -526,7 +526,8 @@ export default {
526
526
  "inset-area": "[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",
527
527
  "font-variant-css2": "normal|small-caps",
528
528
  "font-width-css3": "normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",
529
- "system-family-name": "caption|icon|menu|message-box|small-caption|status-bar"
529
+ "system-family-name": "caption|icon|menu|message-box|small-caption|status-bar",
530
+ "parentheses-block": "( <any-value>* )"
530
531
  },
531
532
  "properties": {
532
533
  "--*": "<declaration-value>",
package/dist/version.cjs CHANGED
@@ -1 +1 @@
1
- module.exports = "3.5.0";
1
+ module.exports = "3.5.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = "3.5.0";
1
+ export const version = "3.5.2";
package/lib/data.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @fileoverview Type definitions for @eslint/css-tree/definition-syntax-data
3
+ * @author Nicholas C. Zakas
4
+ */
5
+
6
+ import type { SyntaxConfig } from "./index.js";
7
+
8
+ export type DefaultSyntaxConfig = Pick<SyntaxConfig, "atrules" | "types" | "properties">;
9
+
10
+ declare const defaultConfig: DefaultSyntaxConfig;
11
+ export default defaultConfig;
package/lib/index.d.ts CHANGED
@@ -522,7 +522,7 @@ export class List<TData> {
522
522
 
523
523
  export interface CssNodeCommon {
524
524
  type: string;
525
- loc?: CssLocationRange | undefined;
525
+ loc?: CssLocationRange | null;
526
526
  }
527
527
 
528
528
  export interface AnPlusB extends CssNodeCommon {
@@ -2697,7 +2697,7 @@ type StructureValue = string | Function | null;
2697
2697
  type StructureDescriptor = StructureValue | Array<StructureValue> | Array<Array<StructureValue>>;
2698
2698
 
2699
2699
  interface StructureDefinition {
2700
- children?: Array<string>;
2700
+ children?: Array<Array<string>>;
2701
2701
 
2702
2702
  [key: string]: StructureDescriptor | undefined;
2703
2703
  }
@@ -2705,14 +2705,14 @@ interface StructureDefinition {
2705
2705
  interface NodeSyntaxConfig<T extends CssNodeCommon = CssNodeCommon> {
2706
2706
  name: string;
2707
2707
  structure: StructureDefinition;
2708
- parse(this: ParserContext): T;
2708
+ parse(this: ParserContext, ...args:Array<unknown>): T;
2709
2709
  generate(this: ParserContext, node: T): void;
2710
2710
  walkContext?: string;
2711
2711
  }
2712
2712
 
2713
2713
  interface AtruleSyntax {
2714
2714
  prelude: string | null;
2715
- descriptors: Record<string, string> | null;
2715
+ descriptors?: Record<string, string> | null;
2716
2716
  }
2717
2717
 
2718
2718
  // https://github.com/csstree/csstree/blob/9de5189fadd6fb4e3a149eec0e80d6ed0d0541e5/lib/syntax/config/parser.js#L7-L28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint/css-tree",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations",
5
5
  "author": "Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",
6
6
  "license": "MIT",
@@ -67,7 +67,8 @@
67
67
  },
68
68
  "./definition-syntax-data": {
69
69
  "import": "./lib/data.js",
70
- "require": "./cjs/data.cjs"
70
+ "require": "./cjs/data.cjs",
71
+ "types": "./lib/data.d.ts"
71
72
  },
72
73
  "./definition-syntax-data-patch": {
73
74
  "import": "./lib/data-patch.js",