@cssdoc/index 0.4.2 → 0.5.1
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.d.mts +3 -2
- package/dist/index.mjs +5 -4
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -102,9 +102,10 @@ declare class CssDocIndex {
|
|
|
102
102
|
conditionsFor(name: string): CssCondition[];
|
|
103
103
|
animationsFor(name: string): CssAnimation[];
|
|
104
104
|
structureFor(name: string): StructureNode[] | undefined;
|
|
105
|
-
/** Whether `modifier` (a class token or attribute expression) is a documented modifier of `base
|
|
105
|
+
/** Whether `modifier` (a class token or attribute expression) is a documented modifier of `base` —
|
|
106
|
+
* an exact match, or an instance of a documented `*` family (`-icon-arrow` → `-icon-*`). */
|
|
106
107
|
isModifier(base: string, modifier: string): boolean;
|
|
107
|
-
/** The deprecation of a modifier on `base`, if it is deprecated. */
|
|
108
|
+
/** The deprecation of a modifier on `base`, if it is deprecated (including via a `*` family). */
|
|
108
109
|
deprecationOf(base: string, modifier: string): {
|
|
109
110
|
canonical?: string;
|
|
110
111
|
note?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -90,15 +90,16 @@ var CssDocIndex = class {
|
|
|
90
90
|
structureFor(name) {
|
|
91
91
|
return this.byName.get(name)?.entry.structure;
|
|
92
92
|
}
|
|
93
|
-
/** Whether `modifier` (a class token or attribute expression) is a documented modifier of `base
|
|
93
|
+
/** Whether `modifier` (a class token or attribute expression) is a documented modifier of `base` —
|
|
94
|
+
* an exact match, or an instance of a documented `*` family (`-icon-arrow` → `-icon-*`). */
|
|
94
95
|
isModifier(base, modifier) {
|
|
95
96
|
const wanted = this.matcher.normalizeMember(modifier);
|
|
96
|
-
return this.byClass.get(stripDot(base))?.entry.modifiers.some((m) => m.name
|
|
97
|
+
return this.byClass.get(stripDot(base))?.entry.modifiers.some((m) => this.matcher.matchesModifier(m.name, wanted)) ?? false;
|
|
97
98
|
}
|
|
98
|
-
/** The deprecation of a modifier on `base`, if it is deprecated. */
|
|
99
|
+
/** The deprecation of a modifier on `base`, if it is deprecated (including via a `*` family). */
|
|
99
100
|
deprecationOf(base, modifier) {
|
|
100
101
|
const wanted = this.matcher.normalizeMember(modifier);
|
|
101
|
-
return this.byClass.get(stripDot(base))?.entry.modifiers.find((m) => m.name
|
|
102
|
+
return this.byClass.get(stripDot(base))?.entry.modifiers.find((m) => this.matcher.matchesModifier(m.name, wanted))?.deprecated;
|
|
102
103
|
}
|
|
103
104
|
/** Every declared custom property, paired with the record that declares it (for `var(...)` completion). */
|
|
104
105
|
allCustomProperties() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cssdoc/index",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A queryable semantic index over the @cssdoc/core model, plus a host-agnostic Usage abstraction and source spans — the shared data layer for cssdoc's linters and language server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"postcss": "^8.5.17",
|
|
32
32
|
"postcss-value-parser": "^4.2.0",
|
|
33
|
-
"@cssdoc/core": "0.
|
|
33
|
+
"@cssdoc/core": "0.5.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^24.13.3",
|