fix(site): review cleanup for API reference pages (#685)

- Remove unused BasicUsage demos for time-slider and volume-slider
- Strip leading `--` from CSS var names in CSSVarRow ids
- Fix dead anchor links in MDX styling sections
- Add comments on usesDataAttrs heuristic and type stripping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Darius Cepulis
2026-03-03 17:48:27 -06:00
co-authored by Claude Opus 4.6
parent 8ab596ea30
commit 286243746e
18 changed files with 6 additions and 270 deletions
@@ -309,6 +309,7 @@ function instantiatesCore(filePath: string): boolean {
}
}
/** String search heuristic — a comment containing `stateAttrMap` would also match. */
function usesDataAttrs(filePath: string): boolean {
try {
return fs.readFileSync(filePath, 'utf-8').includes('stateAttrMap');
@@ -94,6 +94,7 @@ export function extractSubPartProps(filePath: string, program: ts.Program, local
if (name === 'children' || !member.type) continue;
let typeStr = checker.typeToString(checker.getTypeFromTypeNode(member.type));
// Only strips trailing ` | undefined`; other orderings (e.g., `undefined | string`) pass through.
if (member.questionToken) typeStr = typeStr.replace(/ \| undefined$/, '');
const propDef: PropDef = { type: typeStr };