pub struct RenderOpts {
pub cols: u16,
pub rows: u16,
pub color_level: u8,
pub include_plain_output: Option<bool>,
}Expand description
Per-render geometry (render_frame’s opts arg). cols is the terminal
width handed to the core layout; rows is the viewport height fed to
write_frame’s fullscreen/clear decisions.
Fields§
§cols: u16§rows: u16§color_level: u8Detected terminal color level (chalk’s chalk.level, 0–3). The JS drop-in
reads the GLOBAL chalk.level — exactly what ink uses and what the
conformance harness forces to 3 — and threads it here. Core colorize emits
SGR at this level for the core-colorize call sites (borders;
Box backgroundColor fill). <Text> color is colorized JS-side by chalk
(already level-aware) and arrives pre-styled. 0 → no SGR (non-color
terminal); 1/2 → downgraded codes; 3 → truecolor (the prior behavior).
include_plain_output: Option<bool>Whether to include plain_output in the FrameResult. When
explicitly false, the result’s plain_output is an empty string — the
render_styled computation still runs (its output is the transport
input), but the string is not marshaled back across the FFI boundary.
None (absent from JS) or true returns the full string, preserving
backward compatibility for callers that do not set it (e.g. the test
harness).