nostalgiaui

v0.1.3
io.github.sylvesterworks/nostalgiaui Checked 1 day ago Published 1 month ago

Design tokens, component source and WCAG checks for rendering any UI in a past design era.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_eras

List the design eras NostalgiaUI can render. An era controls shape and feel: radius, borders, bevels, shadows, typography, density and motion. It never controls colour.

list_palettes

List the colour palettes, each drawn from a VS Code theme, with its light or dark appearance and source licence. A palette controls colour only and works in every era.

get_tokens

Design tokens for one era and palette pairing. css returns the CSS custom properties scoped to data-era and data-palette attributes. tailwind returns a preset mapping utilities onto those variables. dtcg returns W3C Design Tokens JSON.

ParameterTypeDescription
era *stringEra id, from list_eras
format *stringcss, tailwind or dtcg
palette *stringPalette id, from list_palettes

get_component

Source for one component styled for one era: the import lines, the TSX wrapper, the stylesheet rules that apply everywhere, the rules scoped to that era, and notes on what is easy to get wrong. The CSS is a filtered view of the stylesheet, not a verbatim copy: rules for other eras and section-divider comments are removed, while comments inside rules are kept. Components must render inside NostalgiaRoot.

ParameterTypeDescription
era *stringEra id, from list_eras
name *stringComponent name: NostalgiaRoot, Button, Input, Card, Tabs or Dialog

import_vscode_theme

Turn a VS Code colour theme JSON into a NostalgiaUI palette. Returns the palette primitives, a provenance report saying which values came straight from the theme and which had to be inferred, and the resulting CSS variables.

ParameterTypeDescription
theme *The theme JSON, either as an object or as a JSON string

check_contrast

Audit WCAG 2.1 contrast for one era and palette pairing. Returns every checked pairing with its ratio and the threshold it must meet, and lists any failures. Colours are derived per pairing, so contrast cannot be known from either axis alone.

ParameterTypeDescription
era *stringEra id, from list_eras
palette *stringPalette id, from list_palettes