Malachi. UI. TokenGen. Emit
(malachi v0.22.7)
View Source
Renders the four generated files from a Malachi.UI.TokenGen.Model.
Every renderer reads the model and nothing else, writes tokens in the token file's order, and
carries no timestamp, so the same token file always produces the same bytes and the --check gate
can compare them.
css/1,assets/src/styles/tokens.css: every web token on:root, the themed colors again for dark, one class per density mode, the reduced motion overrides, and the Tailwind v4@theme inlinemapping of every color.rust/1,tui/src/theme/generated.rs: aPaletteper color tier and theme over the terminal tokens, and theSurfacethattheme_backgroundpaints.elixir/1,lib/malachi/ui/tokens.ex:Malachi.UI.Tokens, every value resolved.snapshot/1,docs/design/tokens.snapshot.json: the flat, language neutral view the contract tests compare the other three against.
Summary
Functions
Renders tokens.css.
Renders tokens.ex, formatted the way mix format leaves it.
Renders generated.rs.
Renders tokens.snapshot.json.
Functions
@spec css(Malachi.UI.TokenGen.Model.t()) :: String.t()
Renders tokens.css.
@spec elixir(Malachi.UI.TokenGen.Model.t()) :: String.t()
Renders tokens.ex, formatted the way mix format leaves it.
@spec rust(Malachi.UI.TokenGen.Model.t()) :: String.t()
Renders generated.rs.
@spec snapshot(Malachi.UI.TokenGen.Model.t()) :: String.t()
Renders tokens.snapshot.json.