@projectwallace/css-analyzer 7.6.2 → 8.0.0
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/css-analyzer.js +2298 -715
- package/dist/index.d.ts +10 -7
- package/package.json +64 -60
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { calculate as calculateSpecificity } from './selectors/specificity.js';
|
|
1
2
|
import { CollectionCount } from './collection.js';
|
|
2
3
|
import { colorFunctions } from './values/colors.js';
|
|
3
4
|
import { colorKeywords } from './values/colors.js';
|
|
@@ -10,6 +11,7 @@ import { isPrefixed as isSelectorPrefixed } from './selectors/utils.js';
|
|
|
10
11
|
import { isSupportsBrowserhack } from './atrules/atrules.js';
|
|
11
12
|
import { isValuePrefixed } from './values/vendor-prefix.js';
|
|
12
13
|
import { KeywordSet } from './keyword-set.js';
|
|
14
|
+
import { Location as Location_2 } from './collection.js';
|
|
13
15
|
import { namedColors } from './values/colors.js';
|
|
14
16
|
import { getComplexity as selectorComplexity } from './selectors/utils.js';
|
|
15
17
|
import { systemColors } from './values/colors.js';
|
|
@@ -46,12 +48,7 @@ declare function analyzeInternal<T extends boolean>(css: string, options: Option
|
|
|
46
48
|
[k: string]: {
|
|
47
49
|
size: number;
|
|
48
50
|
count: number;
|
|
49
|
-
uniqueWithLocations?:
|
|
50
|
-
offset: number;
|
|
51
|
-
line: number;
|
|
52
|
-
column: number;
|
|
53
|
-
length: number;
|
|
54
|
-
}[];
|
|
51
|
+
uniqueWithLocations?: Location_2[];
|
|
55
52
|
};
|
|
56
53
|
};
|
|
57
54
|
};
|
|
@@ -540,6 +537,8 @@ declare function analyzeInternal<T extends boolean>(css: string, options: Option
|
|
|
540
537
|
};
|
|
541
538
|
};
|
|
542
539
|
|
|
540
|
+
export { calculateSpecificity }
|
|
541
|
+
|
|
543
542
|
export { colorFunctions }
|
|
544
543
|
|
|
545
544
|
export { colorKeywords }
|
|
@@ -568,6 +567,8 @@ export { isValuePrefixed }
|
|
|
568
567
|
|
|
569
568
|
export { KeywordSet }
|
|
570
569
|
|
|
570
|
+
export { Location_2 as Location }
|
|
571
|
+
|
|
571
572
|
export { namedColors }
|
|
572
573
|
|
|
573
574
|
export declare type Options = {
|
|
@@ -577,8 +578,10 @@ export declare type Options = {
|
|
|
577
578
|
|
|
578
579
|
export { selectorComplexity }
|
|
579
580
|
|
|
580
|
-
declare type Specificity = [number, number, number];
|
|
581
|
+
export declare type Specificity = [number, number, number];
|
|
581
582
|
|
|
582
583
|
export { systemColors }
|
|
583
584
|
|
|
585
|
+
export { UniqueWithLocations }
|
|
586
|
+
|
|
584
587
|
export { }
|
package/package.json
CHANGED
|
@@ -1,62 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
2
|
+
"name": "@projectwallace/css-analyzer",
|
|
3
|
+
"description": "The best CSS analyzer out there. Check design tokens, complexity, specificity, performance and more.",
|
|
4
|
+
"version": "8.0.0",
|
|
5
|
+
"author": "Bart Veneman",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/projectwallace/css-analyzer.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/projectwallace/css-analyzer",
|
|
11
|
+
"issues": "https://github.com/projectwallace/css-analyzer/issues",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"main": "./dist/css-analyzer.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/css-analyzer.js"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"lint": "oxlint --config .oxlintrc.json",
|
|
28
|
+
"lint-package": "publint",
|
|
29
|
+
"test": "vitest",
|
|
30
|
+
"check": "tsc --noEmit",
|
|
31
|
+
"build": "vite build",
|
|
32
|
+
"knip": "knip"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"projectwallace",
|
|
36
|
+
"wallace",
|
|
37
|
+
"css",
|
|
38
|
+
"stylesheet",
|
|
39
|
+
"stats",
|
|
40
|
+
"statistics",
|
|
41
|
+
"analytics",
|
|
42
|
+
"performance",
|
|
43
|
+
"styleguide",
|
|
44
|
+
"metrics",
|
|
45
|
+
"designsystem",
|
|
46
|
+
"fonts",
|
|
47
|
+
"colors",
|
|
48
|
+
"quality",
|
|
49
|
+
"code"
|
|
50
|
+
],
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@projectwallace/css-parser": "^0.12.2"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@codecov/vite-plugin": "^1.9.1",
|
|
56
|
+
"c8": "^10.1.3",
|
|
57
|
+
"knip": "^5.68.0",
|
|
58
|
+
"oxlint": "^1.26.0",
|
|
59
|
+
"prettier": "^3.6.2",
|
|
60
|
+
"publint": "^0.3.15",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"vite": "^6.3.4",
|
|
63
|
+
"vite-plugin-dts": "^4.5.4",
|
|
64
|
+
"vitest": "^4.0.8"
|
|
65
|
+
}
|
|
62
66
|
}
|