@projectwallace/css-analyzer 9.6.0 → 9.6.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.
@@ -1,7 +1,29 @@
1
- import { a as namedColors, i as colorKeywords, n as keywords, o as systemColors, r as colorFunctions, t as isValueReset } from "../values-B5nDaGc_.js";
2
- import { CSSNode } from "@projectwallace/css-parser";
1
+ import { a as namedColors, i as colorKeywords, n as keywords, o as systemColors, r as colorFunctions, t as isValueReset } from "../values-DgD2lJqZ.js";
2
+ import { Value } from "@projectwallace/css-parser";
3
3
 
4
4
  //#region src/values/browserhacks.d.ts
5
- declare function isIe9Hack(node: CSSNode): boolean;
5
+ declare function isIe9Hack(node: Value): boolean;
6
6
  //#endregion
7
- export { colorFunctions, colorKeywords, isIe9Hack, isValueReset, keywords, namedColors, systemColors };
7
+ //#region src/values/destructure-font-shorthand.d.ts
8
+ /**
9
+ * Parse the CSS `font` shorthand value and extract its structural components.
10
+ *
11
+ * Grammar:
12
+ * font: [<font-style> || <font-variant> || <font-weight> || <font-stretch>]?
13
+ * <font-size>[/<line-height>]? <font-family>
14
+ *
15
+ * Does NOT handle system fonts (caption, icon, menu, …) — the caller should
16
+ * check SYSTEM_FONTS before calling this function.
17
+ *
18
+ * Returns null when the value is a single var() and can't be decomposed.
19
+ *
20
+ * @param value - The VALUE CSSNode for a `font` declaration
21
+ * @param cb - Called for every global CSS keyword found in the value (e.g. inherit)
22
+ */
23
+ declare function destructure(value: Value, cb: (keyword: string) => void): {
24
+ font_size?: string;
25
+ line_height?: string;
26
+ font_family?: string | null;
27
+ } | null;
28
+ //#endregion
29
+ export { colorFunctions, colorKeywords, destructure as destructureFontShorthand, isIe9Hack, isValueReset, keywords, namedColors, systemColors };
@@ -1,3 +1,2 @@
1
- import "../string-utils-C97yyuqE.js";
2
- import { a as colorKeywords, i as colorFunctions, n as isValueReset, o as namedColors, r as keywords, s as systemColors, t as isIe9Hack } from "../browserhacks-Ckz2JiOQ.js";
3
- export { colorFunctions, colorKeywords, isIe9Hack, isValueReset, keywords, namedColors, systemColors };
1
+ import { a as keywords, c as namedColors, i as isValueReset, l as systemColors, o as colorFunctions, r as destructure, s as colorKeywords, t as isIe9Hack } from "../browserhacks-BtVwVqdU.js";
2
+ export { colorFunctions, colorKeywords, destructure as destructureFontShorthand, isIe9Hack, isValueReset, keywords, namedColors, systemColors };
@@ -1,5 +1,5 @@
1
1
  import { t as KeywordSet } from "./keyword-set-BXSoLQ6m.js";
2
- import { CSSNode } from "@projectwallace/css-parser";
2
+ import { Value } from "@projectwallace/css-parser";
3
3
 
4
4
  //#region src/values/colors.d.ts
5
5
  declare const namedColors: KeywordSet;
@@ -12,6 +12,6 @@ declare const keywords: KeywordSet;
12
12
  /**
13
13
  * Test whether a value is a reset (0, 0px, -0.0e0 etc.)
14
14
  */
15
- declare function isValueReset(node: CSSNode): boolean;
15
+ declare function isValueReset(value: Value): boolean;
16
16
  //#endregion
17
17
  export { namedColors as a, colorKeywords as i, keywords as n, systemColors as o, colorFunctions as r, isValueReset as t };
package/package.json CHANGED
@@ -1,19 +1,36 @@
1
1
  {
2
2
  "name": "@projectwallace/css-analyzer",
3
+ "version": "9.6.2",
3
4
  "description": "The best CSS analyzer out there. Check design tokens, complexity, specificity, performance and more.",
4
- "version": "9.6.0",
5
+ "keywords": [
6
+ "analytics",
7
+ "code",
8
+ "colors",
9
+ "css",
10
+ "designsystem",
11
+ "fonts",
12
+ "metrics",
13
+ "performance",
14
+ "projectwallace",
15
+ "quality",
16
+ "statistics",
17
+ "stats",
18
+ "styleguide",
19
+ "stylesheet",
20
+ "wallace"
21
+ ],
22
+ "homepage": "https://github.com/projectwallace/css-analyzer",
23
+ "bugs": "https://github.com/projectwallace/css-analyzer/issues",
24
+ "license": "MIT",
5
25
  "author": "Bart Veneman",
6
26
  "repository": {
7
27
  "type": "git",
8
28
  "url": "git+https://github.com/projectwallace/css-analyzer.git"
9
29
  },
10
- "homepage": "https://github.com/projectwallace/css-analyzer",
11
- "issues": "https://github.com/projectwallace/css-analyzer/issues",
12
- "license": "MIT",
13
- "type": "module",
14
30
  "files": [
15
31
  "dist"
16
32
  ],
33
+ "type": "module",
17
34
  "main": "./dist/index.js",
18
35
  "types": "./dist/index.d.ts",
19
36
  "exports": {
@@ -38,46 +55,29 @@
38
55
  "default": "./dist/properties/index.js"
39
56
  }
40
57
  },
41
- "engines": {
42
- "node": ">=18.0.0"
43
- },
44
58
  "scripts": {
45
- "lint": "oxlint --config .oxlintrc.json",
59
+ "lint": "oxlint --config .oxlintrc.json; oxfmt --check",
46
60
  "lint-package": "publint",
47
61
  "test": "vitest --coverage",
48
62
  "check": "tsc --noEmit",
49
63
  "build": "tsdown",
50
64
  "knip": "knip"
51
65
  },
52
- "keywords": [
53
- "projectwallace",
54
- "wallace",
55
- "css",
56
- "stylesheet",
57
- "stats",
58
- "statistics",
59
- "analytics",
60
- "performance",
61
- "styleguide",
62
- "metrics",
63
- "designsystem",
64
- "fonts",
65
- "colors",
66
- "quality",
67
- "code"
68
- ],
69
66
  "dependencies": {
70
- "@projectwallace/css-parser": "^0.13.8"
67
+ "@projectwallace/css-parser": "^0.14.8"
71
68
  },
72
69
  "devDependencies": {
73
70
  "@codecov/rollup-plugin": "^1.9.1",
74
- "@vitest/coverage-v8": "^4.0.18",
75
- "knip": "^6.0.4",
76
- "oxlint": "^1.43.0",
77
- "prettier": "^3.6.2",
78
- "publint": "^0.3.17",
79
- "tsdown": "^0.21.0",
80
- "typescript": "^5.9.3",
81
- "vitest": "^4.0.18"
71
+ "@vitest/coverage-v8": "^4.1.2",
72
+ "knip": "^6.3.0",
73
+ "oxfmt": "^0.43.0",
74
+ "oxlint": "^1.58.0",
75
+ "publint": "^0.3.18",
76
+ "tsdown": "^0.21.7",
77
+ "typescript": "^6.0.2",
78
+ "vitest": "^4.1.2"
79
+ },
80
+ "engines": {
81
+ "node": ">=18.0.0"
82
82
  }
83
83
  }