A frame as the inside of a <pre>: escaped text, and for a coloured frame
a <span style="color:..."> a run of one colour. A run whose colour is
nil (in no coloured part, see Ascii.Parts) is plain text, in the
page's own; one in a CSS variable (see Ascii.Ink) takes the page's
value for it.
Spaces join whatever run they fall in, so a logo is a few dozen spans and
a full scene a few thousand. That is fine for a still or a logo; to play a
piece live, Ascii.Phoenix.PlayerLive sends only what changes.
Phoenix is not needed: the result is plain iodata, already escaped. Put it
in a <pre> whose style is style/1.
Summary
Functions
HTML-escapes text (as iodata).
@spec render(frame :: Ascii.Frame.t()) :: iodata()
The <pre>'s contents, escaped: rows/1 joined by newlines.
@spec row(frame :: Ascii.Frame.t(), y :: non_neg_integer()) :: iodata()
Row y's HTML, as in rows/1.
@spec rows(frame :: Ascii.Frame.t()) :: [iodata()]
Each row's HTML, escaped, without newlines.
@spec style(frame :: Ascii.Frame.t()) :: String.t() | nil
The <pre>'s style: the piece's ground behind a coloured frame, else nil.