Skip to content

v0.5.0

Latest

Choose a tag to compare

@Karnaukhov-kh Karnaukhov-kh released this 25 Jun 14:56

πŸŽ‰ Features

Design Token Usage Audit

New tool report-audit-token-usage β€” audits design-token usage across style files in two modes. validate: checks var() token references against the token dataset, flags unknown tokens, and suggests the closest match via edit-distance ("did you mean…?"), plus brand-specific availability warnings. overrides: detects token re-declarations in consumer files, broken down by mechanism and classification. Runs both by default (modes: ["all"]); supports excludePatterns, brandName, componentName, tokenPrefix, and saveAsFile.

Token Dataset Infrastructure

New configuration ds.generatedStylesRoot + ds.tokens.* loads a design-token dataset from your generated CSS (the engine behind the audit tool). Configurable discovery and modeling: filePattern (token CSS globs, default **/semantic.css), propertyPrefix (restrict extraction by prefix), scopeStrategy (flat or brand-theme β€” maps a {brand}/{theme}/ layout to scope metadata), and categoryInference (by-prefix, by-value, or none).

Storybook Story Parser

New tool get-ds-story-data β€” parses a DS component's Storybook .stories.ts into structured data: imports, argTypes, meta args, slots, selector style, form integration, and story definitions. Supports format (markdown/json), descriptionLength (short/full), and excludeTags (defaults to filtering docs-template showcase stories).

πŸ› Bug Fixes

Multi-Prefix Validation β€” token validation now handles datasets using multiple prefixes (e.g. --semantic- and --ds-) instead of a single fixed prefix.

!important Detection β€” token overrides declared with !important are now correctly detected and reported.

Unknown Mechanism Fallback β€” overrides using an unrecognized mechanism no longer drop from the report; they fall back to a safe classification.