Class: CssDocIndex
Defined in: packages/index/src/index.ts:242
A queryable view over the parsed records.
Constructors
Constructor
new CssDocIndex(
records,
file?,
matcher?,
customPropertyValues?,
globalPrecedence?): CssDocIndex;Defined in: packages/index/src/index.ts:254
Parameters
records
file?
string
matcher?
customPropertyValues?
ReadonlyMap<string, string> = ...
globalPrecedence?
"global" | "base"
Returns
CssDocIndex
Properties
customPropertyValues
readonly customPropertyValues: ReadonlyMap<string, string>;Defined in: packages/index/src/index.ts:248
Every custom property's effective value (--x: value declarations and @property initial-values).
file?
readonly optional file?: string;Defined in: packages/index/src/index.ts:243
globalPrecedence
readonly globalPrecedence: "global" | "base";Defined in: packages/index/src/index.ts:250
The precedence model when multiple records define the same modifier.
matcher
readonly matcher: ModifierMatcher;Defined in: packages/index/src/index.ts:246
The modifier matcher for this index's convention — how members are matched and rendered.
records
readonly records: readonly RecordInfo[];Defined in: packages/index/src/index.ts:244
Accessors
entries
Get Signature
get entries(): CssDocEntry[];Defined in: packages/index/src/index.ts:285
Every documented record's model entry.
Returns
Methods
aliasOf()
aliasOf(base, modifier):
| {
canonical?: string;
note?: string;
}
| undefined;Defined in: packages/index/src/index.ts:393
The alias mapping of a modifier on base, if documented as an alias. Checks both base-specific and global modifiers (applying globalPrecedence logic).
Parameters
base
string
modifier
string
Returns
| { canonical?: string; note?: string; } | undefined
allCustomProperties()
allCustomProperties(): object[];Defined in: packages/index/src/index.ts:419
Every declared custom property, paired with the record that declares it (for var(...) completion).
Returns
object[]
allFunctions()
allFunctions(): object[];Defined in: packages/index/src/index.ts:426
Every custom function, paired with its record.
Returns
object[]
animationsFor()
animationsFor(name): CssAnimation[];Defined in: packages/index/src/index.ts:327
Parameters
name
string
Returns
componentForClass()
componentForClass(className): CssDocEntry | undefined;Defined in: packages/index/src/index.ts:290
The record whose base class matches className (with or without a leading dot).
Parameters
className
string
Returns
CssDocEntry | undefined
conditionsFor()
conditionsFor(name): CssCondition[];Defined in: packages/index/src/index.ts:323
Parameters
name
string
Returns
customPropertiesFor()
customPropertiesFor(name): CssPropertyDeclared[];Defined in: packages/index/src/index.ts:311
Parameters
name
string
Returns
deprecationOf()
deprecationOf(base, modifier):
| {
canonical?: string;
note?: string;
}
| undefined;Defined in: packages/index/src/index.ts:364
The deprecation of a modifier on base, if it is deprecated (including via a * family). Checks both base-specific and global modifiers (applying globalPrecedence logic).
Parameters
base
string
modifier
string
Returns
| { canonical?: string; note?: string; } | undefined
functionsFor()
functionsFor(name): CssFunction[];Defined in: packages/index/src/index.ts:315
Parameters
name
string
Returns
isModifier()
isModifier(base, modifier): boolean;Defined in: packages/index/src/index.ts:342
Whether modifier (a class token or attribute expression) is a documented modifier of base — an exact match, or an instance of a documented * family (-icon-arrow → -icon-*). Checks both base-specific modifiers and global modifiers (applying globalPrecedence logic).
Parameters
base
string
modifier
string
Returns
boolean
location()
location(name, key?): Location | undefined;Defined in: packages/index/src/index.ts:433
The definition location of a record member (or the record itself), if a span is known.
Parameters
name
string
key?
string = "record"
Returns
Location | undefined
modifiersFor()
modifiersFor(name): CssModifier[];Defined in: packages/index/src/index.ts:299
Parameters
name
string
Returns
partsFor()
partsFor(name): CssPart[];Defined in: packages/index/src/index.ts:303
Parameters
name
string
Returns
CssPart[]
recordInfo()
recordInfo(name): RecordInfo | undefined;Defined in: packages/index/src/index.ts:295
The full RecordInfo for a record name.
Parameters
name
string
Returns
RecordInfo | undefined
resolveCustomProperty()
resolveCustomProperty(name): object;Defined in: packages/index/src/index.ts:277
A custom property's declared value and its fully resolved value — following var() references through the index to a terminal literal, the way browser dev tools do. resolved is omitted when nothing was followed (no var(), or the chain couldn't be resolved further).
Parameters
name
string
Returns
object
declared?
optional declared?: string;resolved?
optional resolved?: string;shadowPartsFor()
shadowPartsFor(name): CssPart[];Defined in: packages/index/src/index.ts:307
Parameters
name
string
Returns
CssPart[]
statesFor()
statesFor(name): CssState[];Defined in: packages/index/src/index.ts:319
Parameters
name
string
Returns
CssState[]
structureFor()
structureFor(name): StructureNode[] | undefined;Defined in: packages/index/src/index.ts:331
Parameters
name
string
Returns
StructureNode[] | undefined
structureVariantsFor()
structureVariantsFor(name):
| StructureVariant[]
| undefined;Defined in: packages/index/src/index.ts:335
Parameters
name
string
Returns
| StructureVariant[] | undefined
toManifest()
toManifest(): CssDocManifest;Defined in: packages/index/src/index.ts:441
A stable, serializable snapshot.