use lievisual::Color;
use lievisual::text::{TextAlign, TextBaseline, TextStyle};
pub const BACKGROUND: Color = Color::new(255, 255, 255, 255);
pub const FONT_FAMILY: &str = "'trebuchet ms', verdana, arial, sans-serif";
pub const FONT_SIZE: f64 = 16.0;
pub const LINE_HEIGHT: f64 = 1.5;
pub const NODE_RADIUS: f64 = 5.0;
pub const STADIUM_RADIUS: f64 = 5.0;
pub const NODE_PAD_X: f64 = 30.0;
pub const NODE_PAD_Y: f64 = 15.0;
pub const NODE_MIN_W: f64 = 16.0;
pub const NODE_MIN_H: f64 = 16.0;
pub const EDGE_COLOR: Color = Color::new(51, 51, 51, 255); pub const EDGE_WIDTH: f64 = 1.0;
pub const EDGE_WIDTH_THICK: f64 = 3.5;
pub const TEXT_COLOR: Color = Color::new(19, 19, 0, 255);
pub fn text_style(color: Color, size: f64, align: TextAlign, baseline: TextBaseline) -> TextStyle {
TextStyle::new(color, size, FONT_FAMILY)
.with_align(align)
.with_baseline(baseline)
.with_line_height(size * LINE_HEIGHT)
}
pub mod flowchart {
use super::Color;
pub const FILL: Color = Color::new(236, 236, 255, 255); pub const STROKE: Color = Color::new(147, 112, 219, 255); pub const TEXT: Color = super::TEXT_COLOR;
pub const EDGE: Color = super::EDGE_COLOR; pub const SUBGRAPH_STROKE: Color = Color::new(170, 170, 51, 255); pub const SUBGRAPH_FILL: Color = Color::new(255, 255, 222, 255); pub const SUBGRAPH_TITLE: Color = Color::new(51, 51, 51, 255); }
pub mod state {
use super::Color;
pub const FILL: Color = Color::new(236, 236, 255, 255); pub const STROKE: Color = Color::new(147, 112, 219, 255); pub const TEXT: Color = super::TEXT_COLOR;
pub const EDGE: Color = super::EDGE_COLOR;
pub const START_FILL: Color = Color::new(236, 236, 255, 255); pub const END_STROKE: Color = Color::new(147, 112, 219, 255); pub const SPECIAL: Color = Color::new(51, 51, 51, 255); }
pub mod class {
use super::Color;
pub const FILL: Color = Color::new(236, 236, 255, 255); pub const HEADER_FILL: Color = Color::new(236, 236, 255, 255); pub const STROKE: Color = Color::new(147, 112, 219, 255); pub const TEXT: Color = Color::new(19, 19, 0, 255); pub const EDGE: Color = super::EDGE_COLOR;
pub const SEPARATOR: Color = Color::new(147, 112, 219, 255); pub const DIAMOND_FILL: Color = Color::new(147, 112, 219, 255); pub const MEMBER_FONT_SIZE: f64 = 16.0;
}
pub mod sequence {
use super::Color;
pub const ACTOR_FILL: Color = Color::new(234, 234, 234, 255); pub const ACTOR_STROKE: Color = Color::new(102, 102, 102, 255); pub const ACTOR_RADIUS: f64 = 3.0;
pub const FILL: Color = Color::new(236, 236, 255, 255); pub const STROKE: Color = Color::new(147, 112, 219, 255); pub const TEXT: Color = Color::new(51, 51, 51, 255); pub const ACTOR_TEXT: Color = Color::new(0, 0, 0, 255); pub const EDGE: Color = super::EDGE_COLOR;
pub const LIFELINE: Color = Color::new(153, 153, 153, 255); pub const LIFELINE_WIDTH: f64 = 0.5;
pub const MESSAGE_WIDTH: f64 = 2.0;
pub const MESSAGE_DASH: [f64; 2] = [3.0, 3.0];
pub const ACTIVATION_FILL: Color = Color::new(237, 242, 174, 255); pub const ACTIVATION_STROKE: Color = Color::new(102, 102, 102, 255); pub const ACTIVATION_WIDTH: f64 = 10.0;
pub const NOTE_FILL: Color = Color::new(237, 242, 174, 255); pub const NOTE_STROKE: Color = Color::new(102, 102, 102, 255); pub const BLOCK_FILL: Color = Color::new(236, 236, 255, 255); pub const BLOCK_STROKE: Color = Color::new(147, 112, 219, 255); pub const BLOCK_TEXT: Color = Color::new(51, 51, 51, 255); }
pub mod er {
use super::Color;
pub const FILL: Color = Color::new(236, 236, 255, 255); pub const HEADER_FILL: Color = Color::new(236, 236, 255, 255); pub const STROKE: Color = Color::new(147, 112, 219, 255); pub const TEXT: Color = super::TEXT_COLOR;
pub const EDGE: Color = super::EDGE_COLOR;
}
pub mod timeline {
use super::Color;
pub const LINE: Color = Color::new(51, 51, 51, 255); pub const DOT: Color = Color::new(51, 51, 51, 255); pub const BLOCK_STROKE: Color = Color::new(51, 51, 51, 255); pub const BLOCK_TEXT: Color = Color::new(51, 51, 51, 255); pub const TEXT: Color = super::TEXT_COLOR;
pub const TITLE: Color = Color::new(51, 51, 51, 255);
pub const BLOCK_COLORS: [Color; 9] = [
Color::new(147, 112, 219, 255), Color::new(255, 243, 176, 255), Color::new(144, 238, 144, 255), Color::new(173, 216, 230, 255), Color::new(255, 218, 185, 255), Color::new(221, 160, 221, 255), Color::new(240, 255, 240, 255), Color::new(255, 228, 196, 255), Color::new(230, 230, 250, 255), ];
pub const BLOCK_W: f64 = 100.0;
pub const BLOCK_H: f64 = 44.0;
pub const BLOCK_RX: f64 = 6.0;
pub const DOT_R: f64 = 7.0;
pub const TITLE_Y: f64 = 25.0; pub const LINE_Y: f64 = 130.0; pub const SECTION_DY: f64 = 60.0; pub const TASK_DY: f64 = 85.0; pub const EVENT_DY: f64 = 107.0; pub const EVENT_GAP: f64 = 15.0; pub const LINE_WIDTH: f64 = 2.5;
pub const BLOCK_STROKE_W: f64 = 1.5;
pub const CONNECTOR_W: f64 = 1.5;
pub const ARROW_SIZE: f64 = 8.0;
pub const LEFT_MARGIN: f64 = 60.0;
pub const RIGHT_MARGIN: f64 = 60.0;
}
pub mod gitgraph {
use super::Color;
pub const BRANCH_COLORS: [Color; 8] = [
Color::new(0, 0, 204, 255), Color::new(255, 200, 0, 255), Color::new(34, 139, 34, 255), Color::new(220, 20, 60, 255), Color::new(148, 0, 211, 255), Color::new(30, 144, 255, 255), Color::new(255, 140, 0, 255), Color::new(50, 205, 50, 255), ];
pub const TEXT: Color = super::TEXT_COLOR;
pub const COMMIT_STROKE: Color = Color::new(255, 255, 255, 255);
pub const COMMIT_RADIUS: f64 = 10.0; pub const BRANCH_SPACING: f64 = 60.0; pub const COMMIT_SPACING: f64 = 70.0; pub const LABEL_OFFSET: f64 = 20.0; pub const LEFT_MARGIN: f64 = 120.0; pub const TOP_MARGIN: f64 = 35.0; pub const LINE_WIDTH: f64 = 4.0;
pub const LABEL_FONT: f64 = 10.0; pub const COMMIT_LABEL_FILL: Color = Color::new(0, 0, 33, 255); pub const COMMIT_LABEL_BKG: Color = Color::new(255, 255, 222, 128); pub const TAG_LABEL_FILL: Color = Color::new(19, 19, 0, 255); pub const TAG_BKG: Color = Color::new(224, 224, 224, 255); pub const TAG_BKG_STROKE: Color = Color::new(184, 184, 184, 255); pub const HIGHLIGHT_OUTER: Color = Color::new(19, 19, 0, 255); pub const MERGE_INNER: Color = Color::new(236, 236, 255, 255); }
pub mod pie {
use super::Color;
pub const RADIUS: f64 = 185.0;
pub const OUTER_RADIUS: f64 = 186.0;
pub const OUTER_STROKE: Color = Color::new(0, 0, 0, 255); pub const OUTER_STROKE_WIDTH: f64 = 2.0;
pub const LABEL_RADIUS_RATIO: f64 = 0.75;
pub const LEGEND_SWATCH: f64 = 18.0;
pub const LEGEND_TEXT_DX: f64 = 22.0;
pub const LEGEND_ROW_H: f64 = 22.0;
pub const LEGEND_DX: f64 = 31.0;
pub const TITLE_DY: f64 = 200.0;
pub const TITLE_FONT: f64 = 24.0;
pub const LABEL_FONT: f64 = 16.0;
pub const COLORS: [Color; 12] = [
Color::new(236, 236, 255, 255), Color::new(255, 255, 222, 255), Color::new(185, 255, 32, 255), Color::new(185, 185, 255, 255), Color::new(255, 255, 69, 255), Color::new(217, 255, 134, 255), Color::new(255, 134, 255, 255), Color::new(32, 255, 255, 255), Color::new(255, 32, 32, 255), Color::new(255, 32, 255, 255), Color::new(32, 255, 144, 255), Color::new(255, 83, 83, 255), ];
}