@projectwallace/css-design-tokens 0.11.3 → 0.11.4
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/index.js +4 -5
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -452,15 +452,14 @@ function analysis_to_tokens(analysis) {
|
|
|
452
452
|
let unique = get_unique(analysis.values.fontFamilies);
|
|
453
453
|
for (let font_family in unique) {
|
|
454
454
|
let parsed = destructure_font_family(font_family);
|
|
455
|
-
|
|
455
|
+
if (!parsed) continue;
|
|
456
|
+
let [main] = parsed;
|
|
457
|
+
let name = `fontFamily-${hash(main)}`;
|
|
456
458
|
let extensions = {
|
|
457
459
|
[EXTENSION_AUTHORED_AS]: font_family,
|
|
458
460
|
[EXTENSION_USAGE_COUNT]: get_count(unique[font_family])
|
|
459
461
|
};
|
|
460
|
-
if (
|
|
461
|
-
$value: font_family,
|
|
462
|
-
$extensions: extensions
|
|
463
|
-
};
|
|
462
|
+
if (families[name]) families[name].$extensions[EXTENSION_USAGE_COUNT] += extensions[EXTENSION_USAGE_COUNT];
|
|
464
463
|
else families[name] = {
|
|
465
464
|
$type: "fontFamily",
|
|
466
465
|
$value: parsed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectwallace/css-design-tokens",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Generate spec-compliant Design Tokens from CSS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"color",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"lint": "oxlint; oxfmt --check"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@projectwallace/css-analyzer": "^9.6.
|
|
38
|
-
"@projectwallace/css-parser": "^0.14.
|
|
39
|
-
"color-sorter": "^
|
|
37
|
+
"@projectwallace/css-analyzer": "^9.6.3",
|
|
38
|
+
"@projectwallace/css-parser": "^0.14.10",
|
|
39
|
+
"color-sorter": "^8.0.0",
|
|
40
40
|
"colorjs.io": "^0.6.1",
|
|
41
41
|
"css-time-sort": "^3.0.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@codecov/rollup-plugin": "^
|
|
45
|
-
"@vitest/coverage-v8": "^4.1.
|
|
46
|
-
"oxfmt": "^0.
|
|
47
|
-
"oxlint": "^1.
|
|
44
|
+
"@codecov/rollup-plugin": "^2.0.1",
|
|
45
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
46
|
+
"oxfmt": "^0.46.0",
|
|
47
|
+
"oxlint": "^1.61.0",
|
|
48
48
|
"publint": "^0.3.18",
|
|
49
|
-
"tsdown": "^0.21.
|
|
50
|
-
"typescript": "^6.0.
|
|
51
|
-
"vitest": "^4.1.
|
|
49
|
+
"tsdown": "^0.21.9",
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"vitest": "^4.1.4"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|