pub fn detect_from(
vars: &impl Fn(&str) -> Option<String>,
platform: TerminalPlatform,
) -> TerminalCapsExpand description
Detects terminal graphics capabilities from an injectable environment.
This testable core models an interactive standard output; detect uses
the real stdout TTY state for pi-tui’s fallback-protocol gate. Empty strings
have the same meaning as absent variables, matching JavaScript truthiness.