use ratatui::style::Style;
use ratatui::text::Line;
pub(super) struct MermaidStyles {
pub(super) border: Style,
pub(super) node_text: Style,
pub(super) edge: Style,
pub(super) edge_label: Style,
}
pub(super) struct MermaidArt {
pub(super) styled_lines: Vec<Line<'static>>,
pub(super) plain_lines: Vec<String>,
}
pub(super) const MAX_LABEL: usize = 28;
pub(super) const PAD: usize = 1;
pub(super) const GAP_X: usize = 3;
pub(super) const GAP_Y: usize = 2;
pub(super) const WRAP_WIDTH: usize = 24;
pub(super) const MAX_LINES: usize = 256;
pub(super) const LABEL_BREAK_CHARS: [char; 4] = ['_', '-', '.', '/'];
pub(super) const CONT: char = '\u{0}';
pub(super) const MAX_CANVAS_CELLS: usize = 2_000_000;
pub(super) fn char_width(c: char) -> usize {
unicode_width::UnicodeWidthChar::width(c).unwrap_or(0)
}
#[derive(Clone, Copy)]
pub(super) enum Oversize {
Width,
Cells,
}