///|
pub struct BrandBook {
name : String
tagline : String
voice : Voice
assets : AssetSet
palette : Palette
typography : Typography
components : Array[ComponentSpec]
forbidden : Array[MisuseRule]
metadata : Meta
} derive(Debug, Eq)
///|
pub struct Voice {
tone : String
writing_principles : Array[String]
} derive(Debug, Eq)
///|
pub struct AssetSet {
primary_logo : Logo
alternate_logos : Array[Logo]
imagery_style : String
} derive(Debug, Eq)
///|
pub struct Logo {
name : String
path : String
min_width_px : Int
clear_space : Space
background : BackgroundRule
} derive(Debug, Eq)
///|
pub enum Space {
Pixels(Int)
Multiplier(Double)
} derive(Debug, Eq)
///|
pub enum BackgroundRule {
LightOnly
DarkOnly
LightOrDark
Monochrome
} derive(Debug, Eq)
///|
pub struct Palette {
colors : Array[ColorToken]
gradients : Array[GradientToken]
} derive(Debug, Eq)
///|
pub struct ColorToken {
name : String
value : String
role : String
} derive(Debug, Eq)
///|
pub struct GradientToken {
name : String
stops : Array[String]
angle : Int
usage : String
} derive(Debug, Eq)
///|
pub struct Typography {
families : Array[FontToken]
scale : Array[TypeStep]
} derive(Debug, Eq)
///|
pub struct FontToken {
name : String
fallback : String
usage : String
} derive(Debug, Eq)
///|
pub struct TypeStep {
name : String
size_px : Int
line_height_px : Int
} derive(Debug, Eq)
///|
pub struct ComponentSpec {
name : String
purpose : String
anatomy : Array[String]
tokens : Array[String]
states : Array[String]
} derive(Debug, Eq)
///|
pub struct MisuseRule {
title : String
reason : String
replacement : String
} derive(Debug, Eq)
///|
pub struct Meta {
source : String
maintainer : String
license : String
} derive(Debug, Eq)
///|
pub enum Severity {
Info
Warning
Error
} derive(Debug, Eq)
///|
pub struct Finding {
severity : Severity
path : String
message : String
} derive(Debug, Eq)
///|
pub struct AuditReport {
findings : Array[Finding]
} derive(Debug, Eq)