@fusion.dev/helix-diagnostics 0.166.0 → 0.168.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/README.md +1 -0
- package/dist/identity.js +2 -0
- package/dist/manifest.d.ts +10 -2
- package/dist/manifest.js +3 -0
- package/dist/report.d.ts +1 -1
- package/dist/report.js +1 -0
- package/dist/rules.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -266,6 +266,7 @@ works on it:
|
|
|
266
266
|
| `dead-part` | error | A `::part()` names a part the element does not publish |
|
|
267
267
|
| `dead-hook` | error | A hook is set where nothing answers it, or a name close to a hook is set that nothing reads |
|
|
268
268
|
| `unknown-attribute` | error | A Helix element carries an attribute it does not take |
|
|
269
|
+
| `unknown-slot` | error | A child names a slot its Helix element does not have, so it is not drawn. Found by `helix scan`, from the templates |
|
|
269
270
|
| `invalid-value` | error | An attribute with a closed set of values carries one outside it, so the element falls back to its default |
|
|
270
271
|
| `unforwarded-part` | warn | The headless tier publishes the part and the styled tier does not forward it, which is a gap in Helix |
|
|
271
272
|
| `unknown-tag` | error | A rule names a tag no manifest lists |
|
package/dist/identity.js
CHANGED
|
@@ -6,6 +6,7 @@ const CATEGORY = {
|
|
|
6
6
|
'manifest-skew': 'integrity',
|
|
7
7
|
'unforwarded-part': 'styling',
|
|
8
8
|
'unknown-attribute': 'markup',
|
|
9
|
+
'unknown-slot': 'markup',
|
|
9
10
|
'unknown-tag': 'integrity',
|
|
10
11
|
};
|
|
11
12
|
const OWNER = {
|
|
@@ -16,6 +17,7 @@ const OWNER = {
|
|
|
16
17
|
'manifest-skew': 'consumer',
|
|
17
18
|
'unforwarded-part': 'helix',
|
|
18
19
|
'unknown-attribute': 'consumer',
|
|
20
|
+
'unknown-slot': 'consumer',
|
|
19
21
|
'unknown-tag': 'consumer',
|
|
20
22
|
};
|
|
21
23
|
export const normalize = (subject) => subject
|
package/dist/manifest.d.ts
CHANGED
|
@@ -47,14 +47,17 @@ export interface ManifestSource {
|
|
|
47
47
|
cssProperties?: Array<{
|
|
48
48
|
name: string;
|
|
49
49
|
}>;
|
|
50
|
+
slots?: Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
}>;
|
|
50
53
|
tagName?: string;
|
|
51
54
|
}>;
|
|
52
55
|
}>;
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
58
|
* What diagnostics reads of one package's manifest, and nothing else: per
|
|
56
|
-
* tag, the parts, the hooks, the attributes with the values each
|
|
57
|
-
* attributes the element writes on itself, and the family.
|
|
59
|
+
* tag, the parts, the hooks, the slots, the attributes with the values each
|
|
60
|
+
* allows, the attributes the element writes on itself, and the family.
|
|
58
61
|
*
|
|
59
62
|
* **About a seventieth of the manifest.** Measured 4 Oct 2026: 124 KB for the
|
|
60
63
|
* styled tier and 103 KB for the headless one, 18 KB and 14 KB compressed,
|
|
@@ -77,6 +80,11 @@ export interface LintTag {
|
|
|
77
80
|
family?: string | undefined;
|
|
78
81
|
hooks: string[];
|
|
79
82
|
parts: string[];
|
|
83
|
+
/**
|
|
84
|
+
* The slots the element has, by name, the default one as `""`. Absent from
|
|
85
|
+
* lint data written before 0.165, which a reader takes as unknown.
|
|
86
|
+
*/
|
|
87
|
+
slots?: string[];
|
|
80
88
|
/** The attributes the element writes on itself: one named for a read-only member. */
|
|
81
89
|
written: string[];
|
|
82
90
|
}
|
package/dist/manifest.js
CHANGED
|
@@ -12,6 +12,7 @@ export const lintOf = (manifest, name) => {
|
|
|
12
12
|
family,
|
|
13
13
|
hooks: [],
|
|
14
14
|
parts: [],
|
|
15
|
+
slots: [],
|
|
15
16
|
written: [],
|
|
16
17
|
};
|
|
17
18
|
tags[tag] = entry;
|
|
@@ -26,12 +27,14 @@ export const lintOf = (manifest, name) => {
|
|
|
26
27
|
}
|
|
27
28
|
entry.parts.push(...(declaration.cssParts ?? []).map((part) => part.name));
|
|
28
29
|
entry.hooks.push(...(declaration.cssProperties ?? []).map((hook) => hook.name));
|
|
30
|
+
entry.slots?.push(...(declaration.slots ?? []).map((slot) => slot.name));
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
for (const entry of Object.values(tags)) {
|
|
32
34
|
entry.written = [...new Set(entry.written)];
|
|
33
35
|
entry.parts = [...new Set(entry.parts)];
|
|
34
36
|
entry.hooks = [...new Set(entry.hooks)];
|
|
37
|
+
entry.slots = [...new Set(entry.slots)];
|
|
35
38
|
}
|
|
36
39
|
return {
|
|
37
40
|
package: manifest.helix?.package ?? name,
|
package/dist/report.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export interface Finding {
|
|
|
97
97
|
tag: string;
|
|
98
98
|
}
|
|
99
99
|
/** Every fault class, stable across versions. */
|
|
100
|
-
export declare const KINDS: readonly ['dead-hook', 'dead-part', 'duplicate-registration', 'invalid-value', 'manifest-skew', 'unforwarded-part', 'unknown-attribute', 'unknown-tag'];
|
|
100
|
+
export declare const KINDS: readonly ['dead-hook', 'dead-part', 'duplicate-registration', 'invalid-value', 'manifest-skew', 'unforwarded-part', 'unknown-attribute', 'unknown-slot', 'unknown-tag'];
|
|
101
101
|
/** A fault class. */
|
|
102
102
|
export type Kind = (typeof KINDS)[number];
|
|
103
103
|
/** How serious a finding is. */
|
package/dist/report.js
CHANGED
package/dist/rules.js
CHANGED
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.168.0';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-diagnostics",
|
|
3
3
|
"description": "Finds the Helix mistakes that are valid CSS: dead parts, misnamed hooks, two copies of the library.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.168.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@fusion.dev/helix-testing": "0.
|
|
36
|
+
"@fusion.dev/helix-testing": "0.168.0",
|
|
37
37
|
"@types/bun": "^1.4.2"
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://fusion.dev",
|