pub const DOTS: [&str; 10] = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
pub const DOTS2: [&str; 8] = ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"];
pub const DOTS3: [&str; 10] = ["⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"];
pub const LINE: [&str; 4] = ["-", "\\", "|", "/"];
pub const PIPE: [&str; 8] = ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"];
pub const STAR: [&str; 6] = ["✶", "✸", "✹", "✺", "✹", "✷"];
pub const BOUNCE: [&str; 4] = ["⠁", "⠂", "⠄", "⠂"];
pub const ARROWS: [&str; 8] = ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"];
pub const CLOCK: [&str; 12] = [
"🕛", "🕐", "🕑", "🕒", "🕓", "🕔", "🕕", "🕖", "🕗", "🕘", "🕙", "🕚",
];
pub const EARTH: [&str; 3] = ["🌍", "🌎", "🌏"];
pub const MOON: [&str; 8] = ["🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"];
pub const RUNNER: [&str; 2] = ["🚶", "🏃"];
pub const PONG: [&str; 8] = [
"▐⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂ ▌",
"▐ ⠂▌",
];
pub const SHARK: [&str; 6] = [
"▐|\\____________▌",
"▐_|\\___________▌",
"▐__|\\__________▌",
"▐___|\\_________▌",
"▐____|\\________▌",
"▐_____|\\_______▌",
];
pub const WEATHER: [&str; 7] = ["☀️", "⛅", "🌤", "🌧", "⛈", "🌩", "🌨"];
pub const CHRISTMAS: [&str; 2] = ["🌲", "🎄"];
pub const TOGGLE: [&str; 2] = ["■", "□"];
pub const SQUARE_CORNERS: [&str; 4] = ["◰", "◳", "◲", "◱"];
pub const BINARY: [&str; 4] = ["0", "1", "10", "11"];
pub const METER: [&str; 4] = ["▱▱▱", "▰▱▱", "▰▰▱", "▰▰▰"];
pub const QUADRANTS: [&str; 4] = ["◐", "◓", "◑", "◒"];
pub const TRIANGLES: [&str; 4] = ["◢", "◣", "◤", "◥"];
pub const CIRCLE: [&str; 5] = ["○", "◔", "◐", "◕", "●"];
pub const BOX_BOUNCE: [&str; 5] = ["■ ", " ■ ", " ■ ", " ■ ", " ■"];
pub const PULSE: [&str; 4] = [".", "..", "...", ".."];
pub const HEART: [&str; 2] = ["♡", "♥"];
pub const PROGRESS_BLOCKS: [&str; 8] = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
pub const ALL_PRESETS: &[(&str, &[&str])] = &[
("dots", &DOTS),
("dots2", &DOTS2),
("dots3", &DOTS3),
("line", &LINE),
("pipe", &PIPE),
("star", &STAR),
("bounce", &BOUNCE),
("arrows", &ARROWS),
("clock", &CLOCK),
("earth", &EARTH),
("moon", &MOON),
("runner", &RUNNER),
("pong", &PONG),
("shark", &SHARK),
("weather", &WEATHER),
("christmas", &CHRISTMAS),
("toggle", &TOGGLE),
("square_corners", &SQUARE_CORNERS),
("binary", &BINARY),
("meter", &METER),
("quadrants", &QUADRANTS),
("triangles", &TRIANGLES),
("circle", &CIRCLE),
("box_bounce", &BOX_BOUNCE),
("pulse", &PULSE),
("heart", &HEART),
("progress_blocks", &PROGRESS_BLOCKS),
];
#[cfg(test)]
mod tests {
use super::*;
use std::collections::HashSet;
#[test]
fn test_all_presets_nonempty() {
for (_, frames) in ALL_PRESETS {
assert!(!frames.is_empty());
}
}
#[test]
fn test_all_presets_names_unique() {
let names: HashSet<&str> = ALL_PRESETS.iter().map(|(name, _)| *name).collect();
assert_eq!(names.len(), ALL_PRESETS.len());
}
#[test]
fn test_dots_frame_count() {
assert_eq!(DOTS.len(), 10);
}
#[test]
fn test_extended_presets_present() {
let names: HashSet<&str> = ALL_PRESETS.iter().map(|(name, _)| *name).collect();
assert!(names.contains("binary"));
assert!(names.contains("progress_blocks"));
assert!(ALL_PRESETS.len() >= 27);
}
}