Sign in

    This version of the module is deprecated: Moved; use moonbit-community/mermaid (0.2.0 and later) instead.

    bobzhang/mermaid/theme does not have a README file

    Theme

    pub struct Theme {
    // private fields
    }

    The variables of a mermaid theme: colors, fonts and sizes that diagram stylesheets and renderers read by name (primaryColor, pie1, ...).
    impl ToJson for Theme

    Theme::flag

    fn Theme::flag(self : Theme, name : String) -> Bool

    Whether name is set to a truthy value.

    Theme::from_variables

    fn Theme::from_variables(variables : Map[String, Json]) -> Theme

    Rebuild a theme from variables previously exported with to_json, without recomputing derived colors.

    Theme::get

    fn Theme::get(self : Theme, name : String) -> Json

    The value of name, or Json::null() when the theme does not define it.

    Theme::names

    fn Theme::names(self : Theme) -> Array[String]

    The names of all variables, in definition order.

    Theme::nested

    fn Theme::nested(self : Theme, name : String, key : String) -> Json

    A field of an object-valued variable such as xyChart or radar.

    Theme::new

    fn Theme::new(name : String, overrides? : Map[String, Json]) -> Theme? raise
    ColorError

    Build the variables of the theme called name, applying overrides (the user's themeVariables) both before and after derived colors are computed. Returns None for an unknown theme name.

    Theme::number

    fn Theme::number(self : Theme, name : String) -> Double?

    The value of name when it is a number.

    Theme::text

    fn Theme::text(self : Theme, name : String) -> String

    The value of name as text, converted the way a JavaScript template literal would: a missing variable reads undefined.

    is_theme_name

    fn is_theme_name(name : String) -> Bool

    Whether name is one of theme_names.

    theme_names

    let theme_names : Array[String]

    The names accepted by Theme::new.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io