tui-lipan 0.1.0

Opinionated, component-based TUI framework for Rust - declarative components, reconciliation, layout engine, focus, overlays, and rich widgets on top of ratatui.
Documentation
use crate::core::node::{NodeId, NodeKind, NodeTree};
use crate::layout::reconcile::{SimpleLeafReconcile, reconcile_simple_leaf};
use crate::style::{LayoutConstraints, Rect};

use super::{Spacer, SpacerNode, measure_spacer};

pub fn reconcile_spacer(
    tree: &mut NodeTree,
    id: NodeId,
    spacer: &Spacer,
    rect: Rect,
    constraints: &LayoutConstraints,
) -> NodeId {
    reconcile_simple_leaf(
        tree,
        SimpleLeafReconcile {
            id,
            rect,
            constraints,
            width: spacer.width,
            height: spacer.height,
            measured: measure_spacer(spacer),
        },
        || NodeKind::Spacer(SpacerNode),
    )
}