diffler 0.16.1

Standalone magit-style git TUI and code reviewer, on its own or with your coding agent
Documentation
//! A navigable orthogonal node-graph component for ratatui, plus the host glue
//! mapping the app theme onto its palette. The component is IO-free (no terminal
//! setup, event loop, or network); the host builds a [`Model`] (from CI, …),
//! pushes it into a [`GraphView`], renders it, and reacts to [`GraphAction`]s.

mod callstack;
mod drawing;
mod engine;
pub mod mermaid;
mod model;
mod sequence;
mod text_figure;
mod theme;
mod view;

pub use drawing::{Drawing, FenceKind, FigureResult, figure, validate_fence};
pub use engine::{GraphEngine, Layered, Zoom};
pub use mermaid::{Figure, MermaidError};
pub use model::{Edge, Model, Node, NodeId, NodeStatus, RankDir, Subgraph};
pub use theme::GraphTheme;
pub use view::{Dir, Fit, GraphAction, GraphView};

use crate::theme::Theme;

/// Map the app theme onto the component's palette.
pub fn graph_theme(theme: &Theme) -> GraphTheme {
    GraphTheme {
        bg: theme.bg,
        fg: theme.fg,
        dim: theme.dim,
        ok: theme.added,
        failed: theme.error_fg,
        running: theme.warn_fg,
        queued: theme.dim,
        panel: theme.panel,
        search: theme.search,
    }
}