@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.
- package/dist/atrules/index.d.ts +1 -1
- package/dist/atrules/index.js +1 -1
- package/dist/{atrules-CskmpIdJ.js → atrules-Bnb0wvNR.js} +19 -19
- package/dist/atrules-CXLSfmpu.d.ts +16 -0
- package/dist/browserhacks-BtVwVqdU.js +347 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +114 -196
- package/dist/selectors/index.d.ts +1 -1
- package/dist/selectors/index.js +1 -2
- package/dist/{specificity-BKdu6JZr.js → specificity-DKo9lvB5.js} +33 -37
- package/dist/{utils-DJb_IpTO.d.ts → utils-yIUD7vGy.d.ts} +2 -2
- package/dist/values/index.d.ts +26 -4
- package/dist/values/index.js +2 -3
- package/dist/{values-B5nDaGc_.d.ts → values-DgD2lJqZ.d.ts} +2 -2
- package/package.json +35 -35
- package/readme.md +285 -285
- package/dist/atrules-C8lZ1H_5.d.ts +0 -16
- package/dist/browserhacks-Ckz2JiOQ.js +0 -222
package/dist/values/index.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
import {
|
|
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:
|
|
5
|
+
declare function isIe9Hack(node: Value): boolean;
|
|
6
6
|
//#endregion
|
|
7
|
-
|
|
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 };
|
package/dist/values/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
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 {
|
|
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(
|
|
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
|
-
"
|
|
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.
|
|
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.
|
|
75
|
-
"knip": "^6.0
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"publint": "^0.3.
|
|
79
|
-
"tsdown": "^0.21.
|
|
80
|
-
"typescript": "^
|
|
81
|
-
"vitest": "^4.
|
|
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
|
}
|