Omochice/pele/types does not have a README file

    Config

    type Config = Map[String,
    Json
    ]

    Diagram configuration from front matter and directives, keyed as in Mermaid's config.

    IconResolver

    type IconResolver = (String) -> String?

    The SVG fragment the host draws for an icon name, or None when it has no such icon.

    Diagram

    pub(all) struct Diagram {
    kind : String
    section : String?
    keep_comments : Bool
    math : Bool
    parse : (String, Map[String,
    Json
    ], String?, Int, ParseLimits) -> Parsed raise
    PeleError

    }

    What a diagram type provides, as pele's Diagram. parse is given text that has been through preprocessing and entity encoding and ends with a newline, the config, the front matter title, and the number of front matter lines.

    LinkInfo

    pub(all) struct LinkInfo {
    id : String
    href : String
    internal : Bool
    }

    A link a diagram draws, as pele's LinkInfo.

    ParseLimits

    pub(all) struct ParseLimits {
    max_edges : Int
    }

    Limits set by the host. A diagram's own configuration cannot change them.

    Parsed

    A diagram that has been read and can be drawn.

    RenderOptions

    pub(all) struct RenderOptions {
    font_family : String?
    font_family_mono : String?
    monospace : Array[String]?
    font_size : Double?
    id_prefix : String?
    responsive : Bool?
    max_width : Double?
    auto_direction : Bool?
    direction_breakpoint : Double?
    padding : Double?
    limit : Double?
    output_limit : Double?
    max_edges : Double?
    links : Bool?
    images : Bool?
    link_rel : String?
    link_schemes : Array[String]?
    image_schemes : Array[String]?
    config : Map[String,
    Json
    ]?
    now : Double?
    measurer :
    TextMeasurer
    ?
    icons : (String) -> String??
    math : (String, Double) ->
    Json
    ??
    }

    The subset of pele's RenderOptions that the port takes. None selects pele's default.

    RenderOptions::default

    fn RenderOptions::default() -> RenderOptions

    Options with every field unset.

    RenderOptions::monospaces

    fn RenderOptions::monospaces(self : RenderOptions, part : String) -> Bool

    Whether monospace lists part, so that the part is measured and drawn in the monospace font.

    RenderOptions::text_measurer

    The measurer labels are laid out with, as pele's options.measurer ?? defaultMeasurer(fontFamily). pele's default falls back to its Arial table where no canvas exists, as in a plugin, so the font family never changes a width.

    RenderResult

    pub(all) struct RenderResult {
    kind : String
    mermaid_type : String
    svg : String
    width : Double
    height : Double
    links : Array[LinkInfo]
    }

    A drawn diagram with the type it was detected as.

    Rendered

    pub(all) struct Rendered {
    svg : String
    width : Double
    height : Double
    links : Array[LinkInfo]
    }

    A drawn diagram. Dimensions are in pixels.