Vibe.Terminal.Theme (vibe v0.2.2)

Copy Markdown View Source

Semantic ANSI theme for Vibe's terminal UI.

Renderers use semantic keys instead of hardcoded colors so the same keys can later map to Phoenix/CSS variables.

Summary

Types

color()

@type color() :: atom() | {byte(), byte(), byte()} | nil

t()

@type t() :: %Vibe.Terminal.Theme{
  bg: %{required(atom()) => color()},
  fg: %{required(atom()) => color()},
  name: String.t(),
  symbols: %{required(atom()) => IO.chardata()}
}

Functions

auto()

@spec auto() :: t()

bg(theme, key, text)

@spec bg(t(), atom(), iodata()) :: IO.chardata()

bg_start(theme, key)

@spec bg_start(t(), atom()) :: IO.chardata()

bold(text)

@spec bold(iodata()) :: IO.chardata()

dark()

@spec dark() :: t()

default()

@spec default() :: t()

fg(theme, key, text)

@spec fg(t(), atom(), iodata()) :: IO.chardata()

italic(text)

@spec italic(iodata()) :: IO.chardata()

light()

@spec light() :: t()

named(arg1)

@spec named(atom() | String.t() | nil) :: t()

reset()

@spec reset() :: String.t()

Intentional facade for the public Vibe API boundary.

strip(text)

@spec strip(IO.chardata()) :: String.t()

symbol(theme, key)

@spec symbol(t(), atom()) :: IO.chardata()