Vibe.Terminal.Layout (vibe v0.2.3)

Copy Markdown View Source

Terminal text layout helpers.

Summary

Types

line()

@type line() :: IO.chardata()

Functions

background_line(content, width, theme, bg_key, opts \\ [])

@spec background_line(
  IO.chardata(),
  pos_integer(),
  Vibe.Terminal.Theme.t(),
  atom(),
  keyword()
) ::
  line()

fit_line(line, width)

@spec fit_line(IO.chardata(), pos_integer()) :: line()

fit_line(line, width, opts)

@spec fit_line(IO.chardata(), pos_integer(), keyword()) :: line()

join_sides(left, right, width)

@spec join_sides(IO.chardata(), IO.chardata(), pos_integer()) :: line()

pad_line(line, width)

@spec pad_line(IO.chardata(), non_neg_integer()) :: line()

repeat(content, count)

@spec repeat(IO.chardata(), integer()) :: IO.chardata()

spaces(count)

@spec spaces(integer()) :: String.t()

wrap(content, width)

@spec wrap(IO.chardata(), pos_integer()) :: [line()]