sayoi7799/moon_excalidraw/model does not have a README file

    ParseError

    pub suberror ParseError {
    InvalidJson(String)
    NotAScene(String)
    InvalidElement(String, String)
    } derive(
    Debug
    )

    impl Show for ParseError

    BoundElement

    pub(all) struct BoundElement {
    id : String
    kind : String
    }

    Crop

    pub(all) struct Crop {
    x : Double
    y : Double
    width : Double
    height : Double
    natural_width : Double
    natural_height : Double
    }

    Element

    pub(all) struct Element {
    id : String
    kind : Kind
    x : Double
    y : Double
    width : Double
    height : Double
    angle : Double
    stroke_color : String
    background_color : String
    fill_style : String
    stroke_width : Double
    stroke_style : String
    roughness : Double
    opacity : Double
    seed : Int
    roundness : Roundness?
    bound_elements : Array[BoundElement]
    frame_id : String?
    link : String?
    is_deleted : Bool
    }

    FileData

    pub(all) struct FileData {
    id : String
    mime_type : String
    data_url : String
    }

    FreeDraw

    pub(all) struct FreeDraw {
    points : Array[(Double, Double)]
    pressures : Array[Double]
    simulate_pressure : Bool
    }

    ImageData

    pub(all) struct ImageData {
    file_id : String?
    scale : (Double, Double)
    crop : Crop?
    }

    Kind

    pub(all) enum Kind {
    Rectangle
    Diamond
    Ellipse
    Line(Linear)
    Arrow(Linear)
    Freedraw(FreeDraw)
    Text(TextData)
    Image(ImageData)
    Frame(String?)
    MagicFrame(String?)
    Unsupported(String)
    }

    Linear

    pub(all) struct Linear {
    points : Array[(Double, Double)]
    start_arrowhead : String?
    end_arrowhead : String?
    elbowed : Bool
    }

    Roundness

    pub(all) struct Roundness {
    kind : Int
    value : Double?
    }

    Scene

    pub(all) struct Scene {
    version : Double?
    elements : Array[Element]
    export_background : Bool
    view_background_color : String
    files : Map[String, FileData]
    }

    TextData

    pub(all) struct TextData {
    text : String
    original_text : String
    font_size : Double
    font_family : Int
    text_align : String
    vertical_align : String
    container_id : String?
    line_height : Double
    }

    js_trim

    fn js_trim(s : String) -> String

    String.prototype.trim.
    fn normalize_link(link : String) -> String

    normalizeLink(link): what the official export writes as the href.

    parse_scene

    fn parse_scene(text : StringView) -> Scene raise ParseError

    Reads a .excalidraw file. Elements marked isDeleted are dropped here, as the official editor does before it calls exportToSvg.