panes-ratatui 0.2.0

Ratatui adapter for the panes layout engine
Documentation

crates.io docs.rs license

You computed layout rectangles with float precision. Now you need them as ratatui::layout::Rect without gaps between adjacent panels.

panes-ratatui converts panes layouts into ratatui rects with pixel-perfect edge rounding.

Install

cargo add panes panes-ratatui

Usage

use panes::Layout;

let resolved = Layout::master_stack(["editor", "chat", "status"])
    .resolve(80.0, 24.0)?;

let rects = panes_ratatui::convert(&resolved);

for (pid, rect) in &rects {
    // rect is ratatui::layout::Rect { x, y, width, height } — all u16
    frame.render_widget(my_widget, *rect);
}

Adjacent panels sharing a float boundary produce matching integer edges. No gaps, no overlaps.

License

MIT or Apache 2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.