module

Prostore::TUI::Style

Application-level visual styling — prostore-domain colours and ornaments built on top of tui.cr's generic ANSI/Cell primitives.

tui.cr's TypeStyle knows generic SQL-type coloring. Style knows about prostore concepts (portable types beyond what TypeStyle covers, FKs, validation errors, soft-wrap).

Class methods

bool_badge(raw : String) : String

Render a raw bool value ("true"/"false"/"1"/"0"/…) as a coloured badge — background colour rather than foreground so it reads as a status chip, not plain text.

Source
error(s : String) : String

Validation error — bright red.

Source
fk_ref(s : String) : String

Foreign-key reference — regular cyan, distinct from all the bright-* data-type colours so FK values read as "linkable".

Source
value(portable_type : String | Nil, type_text : String, s : String) : String

Colour a value by data type. Delegates to tui.cr's TypeStyle for the generic SQL types it covers (ints, floats, bool, time, bytes); for prostore-only categories it doesn't know about (uuid, json, native enums), falls back to prostore's own colour choices so those types don't silently lose their colouring.

Source
wrap_cont

Soft-wrap continuation marker: dim magenta backslash. Signals that the logical value continues on the next display line.

Source