Current section

Files

Jump to
shiny src shiny.erl
Raw

src/shiny.erl

-module(shiny).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/shiny.gleam").
-export([new/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-file("src/shiny.gleam", 31).
?DOC(
" Shiny: a tiny TUI toolkit for Gleam.\n"
"\n"
" Import `shiny` to access the most common building blocks re-exported\n"
" from submodules: types, box drawing, prompts, animations, and utils.\n"
"\n"
" ```gleam\n"
" import shiny\n"
"\n"
" pub fn main() {\n"
" shiny.clear_screen()\n"
" shiny.draw_box(2, 2, 20, 5, shiny.single)\n"
" }\n"
" ```\n"
" Construct a fresh TUI state.\n"
"\n"
" ```gleam\n"
" let state = shiny.new()\n"
" ```\n"
).
-spec new() -> types@state:tui_state().
new() ->
{tui_state, <<""/utf8>>, []}.