wccerty/moonbit-artboard/src/scenegraph does not have a README file

    ArtboardData

    pub(all) struct ArtboardData {
    width : Double
    height : Double
    background :
    RGBA

    } derive(Eq,
    Debug
    )

    ArtboardDocument

    pub(all) struct ArtboardDocument {
    title : String
    nodes : Map[String, Node]
    root_ids : Array[NodeID]
    width : Double
    height : Double
    } derive(
    Debug
    )

    ArtboardDocument::add_node

    fn ArtboardDocument::add_node(self : ArtboardDocument, node : Node, parent_id : NodeID?) -> Unit

    ArtboardDocument::added_since

    fn ArtboardDocument::added_since(self : ArtboardDocument, baseline : ArtboardDocument) -> Array[NodeID]

    ArtboardDocument::ancestors

    fn ArtboardDocument::ancestors(self : ArtboardDocument, id : NodeID) -> Array[NodeID]

    ArtboardDocument::count_locked

    fn ArtboardDocument::count_locked(self : ArtboardDocument) -> Int

    ArtboardDocument::count_visible

    fn ArtboardDocument::count_visible(self : ArtboardDocument) -> Int

    ArtboardDocument::depth_of

    fn ArtboardDocument::depth_of(self : ArtboardDocument, id : NodeID) -> Int

    ArtboardDocument::descendants

    fn ArtboardDocument::descendants(self : ArtboardDocument, id : NodeID) -> Array[NodeID]

    ArtboardDocument::diff

    ArtboardDocument::find_by_name

    fn ArtboardDocument::find_by_name(self : ArtboardDocument, name : String) -> Array[NodeID]

    ArtboardDocument::find_name_contains

    fn ArtboardDocument::find_name_contains(self : ArtboardDocument, fragment : String) -> Array[NodeID]

    ArtboardDocument::get_node

    fn ArtboardDocument::get_node(self : ArtboardDocument, id : NodeID) -> Node?

    ArtboardDocument::get_world_bounds

    ArtboardDocument::get_world_matrix

    ArtboardDocument::group_nodes

    fn ArtboardDocument::group_nodes(self : ArtboardDocument, node_ids : Array[NodeID]) -> NodeID?

    ArtboardDocument::is_ancestor

    fn ArtboardDocument::is_ancestor(self : ArtboardDocument, ancestor : NodeID, descendant : NodeID) -> Bool

    ArtboardDocument::leaf_node_ids

    fn ArtboardDocument::leaf_node_ids(self : ArtboardDocument) -> Array[NodeID]

    ArtboardDocument::metrics

    ArtboardDocument::modified_since

    fn ArtboardDocument::modified_since(self : ArtboardDocument, baseline : ArtboardDocument) -> Array[NodeID]

    ArtboardDocument::new

    fn ArtboardDocument::new(title : String, w : Double, h : Double) -> ArtboardDocument

    ArtboardDocument::node_type_name

    fn ArtboardDocument::node_type_name(self : ArtboardDocument, id : NodeID) -> String?

    ArtboardDocument::nodes_intersecting

    ArtboardDocument::ordered_node_ids

    fn ArtboardDocument::ordered_node_ids(self : ArtboardDocument) -> Array[NodeID]

    ArtboardDocument::remove_node

    fn ArtboardDocument::remove_node(self : ArtboardDocument, id : NodeID) -> Bool

    ArtboardDocument::removed_since

    fn ArtboardDocument::removed_since(self : ArtboardDocument, baseline : ArtboardDocument) -> Array[NodeID]

    ArtboardDocument::same_content

    fn ArtboardDocument::same_content(self : ArtboardDocument, other : ArtboardDocument) -> Bool

    ArtboardDocument::traverse

    ArtboardDocument::ungroup_node

    fn ArtboardDocument::ungroup_node(self : ArtboardDocument, group_id : NodeID) -> Array[NodeID]

    ArtboardDocument::update_node

    fn ArtboardDocument::update_node(self : ArtboardDocument, node : Node) -> Unit

    ArtboardDocument::validate

    ArtboardDocument::visible_bounds

    AutoLayoutConfig

    pub(all) struct AutoLayoutConfig {
    direction : LayoutDirection
    alignment : LayoutAlignment
    gap : Double
    padding : Padding
    } derive(Eq,
    Debug
    )

    ComponentInstance

    pub(all) struct ComponentInstance {
    id : NodeID
    master_id : NodeID
    name_override : String?
    opacity_override : Double?
    } derive(Eq,
    Debug
    )

    ComponentMaster

    pub(all) struct ComponentMaster {
    id : NodeID
    name : String
    root_node_id : NodeID
    } derive(Eq,
    Debug
    )

    DocumentDiff

    pub(all) struct DocumentDiff {
    added : Array[NodeID]
    removed : Array[NodeID]
    modified : Array[NodeID]
    metadata_changed : Bool
    } derive(Eq,
    Debug
    )

    DocumentDiff::changed_count

    fn DocumentDiff::changed_count(self : DocumentDiff) -> Int

    DocumentDiff::contains

    fn DocumentDiff::contains(self : DocumentDiff, id : NodeID) -> Bool

    DocumentDiff::empty

    fn DocumentDiff::empty() -> DocumentDiff

    DocumentDiff::has_changes

    fn DocumentDiff::has_changes(self : DocumentDiff) -> Bool

    DocumentMetrics

    pub(all) struct DocumentMetrics {
    node_count : Int
    root_count : Int
    leaf_count : Int
    group_count : Int
    shape_count : Int
    text_count : Int
    image_count : Int
    artboard_count : Int
    visible_count : Int
    locked_count : Int
    max_depth : Int
    total_bounds :
    Rect2D

    total_area : Double
    } derive(Eq,
    Debug
    )

    DocumentValidationReport

    pub(all) struct DocumentValidationReport {
    valid : Bool
    issues : Array[ValidationIssue]
    } derive(Eq,
    Debug
    )

    GridPlacement

    pub(all) struct GridPlacement {
    node_id : NodeID
    position :
    Vec2

    } derive(Eq,
    Debug
    )

    HorizontalConstraint

    pub(all) enum HorizontalConstraint {
    Left
    Right
    Center
    Scale
    LeftRight
    } derive(Eq,
    Debug
    )

    ImageData

    pub(all) struct ImageData {
    src : String
    width : Double
    height : Double
    } derive(Eq,
    Debug
    )

    Layer

    pub(all) struct Layer {
    id : NodeID
    name : String
    visible : Bool
    locked : Bool
    children : Array[NodeID]
    } derive(Eq,
    Debug
    )

    Layer::add_node

    fn Layer::add_node(self : Layer, node_id : NodeID) -> Unit

    Layer::move_down

    fn Layer::move_down(self : Layer, node_id : NodeID) -> Bool

    Layer::move_up

    fn Layer::move_up(self : Layer, node_id : NodeID) -> Bool

    Layer::new

    fn Layer::new(id : NodeID, name : String) -> Layer

    Layer::remove_node

    fn Layer::remove_node(self : Layer, node_id : NodeID) -> Bool

    LayoutAlignment

    pub(all) enum LayoutAlignment {
    Start
    Center
    End
    SpaceBetween
    } derive(Eq,
    Debug
    )

    LayoutConstraint

    pub(all) struct LayoutConstraint {
    horizontal : HorizontalConstraint
    vertical : VerticalConstraint
    } derive(Eq,
    Debug
    )

    LayoutDirection

    pub(all) enum LayoutDirection {
    Horizontal
    Vertical
    } derive(Eq,
    Debug
    )

    Node

    pub(all) struct Node {
    id : NodeID
    name : String
    node_type : NodeType
    transform :
    Matrix2D

    parent_id : NodeID?
    visible : Bool
    locked : Bool
    opacity : Double
    z_index : Int
    } derive(Eq,
    Debug
    )

    Node::create_artboard

    fn Node::create_artboard(id : NodeID, name : String, w : Double, h : Double, bg :
    RGBA
    ) -> Node

    Node::create_group

    fn Node::create_group(id : NodeID, name : String, children : Array[NodeID]) -> Node

    Node::create_image

    fn Node::create_image(id : NodeID, name : String, src : String, w : Double, h : Double) -> Node

    Node::create_text

    fn Node::create_text(id : NodeID, name : String, text : String, font_size : Double, font_family : String, style :
    Style
    ) -> Node

    Node::local_bounds

    NodeID

    pub(all) struct NodeID {
    value : String
    } derive(Eq, Hash,
    Debug
    )

    impl Show for NodeID

    NodeID::generate

    fn NodeID::generate(prefix : String) -> NodeID

    NodeID::new

    fn NodeID::new(val : String) -> NodeID

    NodeType

    pub(all) enum NodeType {
    ArtboardNode(ArtboardData)
    GroupNode(Array[NodeID])
    ShapeNode(ShapeNodeData)
    TextNode(TextData)
    ImageNode(ImageData)
    } derive(Eq,
    Debug
    )

    Padding

    pub(all) struct Padding {
    top : Double
    right : Double
    bottom : Double
    left : Double
    } derive(Eq,
    Debug
    )

    Padding::all

    fn Padding::all(v : Double) -> Padding

    Padding::symmetric

    fn Padding::symmetric(h : Double, v : Double) -> Padding

    SnapGrid

    pub(all) struct SnapGrid {
    spacing : Double
    origin :
    Vec2

    }

    SnapGrid::new

    fn SnapGrid::new(spacing : Double, origin :
    Vec2
    ) -> SnapGrid

    SnapGrid::snap_value

    fn SnapGrid::snap_value(self : SnapGrid, value : Double) -> Double

    TextData

    pub(all) struct TextData {
    text : String
    font_size : Double
    font_family : String
    align : String
    style :
    Style

    } derive(Eq,
    Debug
    )

    TraversalEntry

    pub(all) struct TraversalEntry {
    id : NodeID
    parent_id : NodeID?
    world_transform :
    Matrix2D

    world_bounds :
    Rect2D

    depth : Int
    inherited_opacity : Double
    } derive(
    Debug
    )

    ValidationIssue

    pub(all) enum ValidationIssue {
    DuplicateNodeId(String)
    MissingParent(NodeID)
    MissingChild(NodeID, NodeID)
    ParentCycle(NodeID)
    OrphanNode(NodeID)
    InvalidDimension(NodeID)
    RootMismatch(NodeID)
    } derive(Eq,
    Debug
    )

    VerticalConstraint

    pub(all) enum VerticalConstraint {
    Top
    Bottom
    Center
    Scale
    TopBottom
    } derive(Eq,
    Debug
    )

    apply_auto_layout

    fn apply_auto_layout(doc : ArtboardDocument, frame_id : NodeID, config : AutoLayoutConfig) -> Unit

    instantiate_component

    fn instantiate_component(doc : ArtboardDocument, master : ComponentMaster, instance_id : NodeID) -> NodeID?

    layout_grid

    fn layout_grid(document : ArtboardDocument, group_id : NodeID, columns : Int, gap : Double, origin :
    Vec2
    ) -> Array[GridPlacement]