mizchi/moonlight/model does not have a README file
pub(all) enum Anchor {
Center
Top
Bottom
Left
Right
TopLeft
TopRight
BottomLeft
BottomRight
LineStart
LineEnd
}pub(all) enum ArrowType {
NoArrow
Arrow
}pub(all) struct BoundingBox {
x : Double
y : Double
width : Double
height : Double
}impl Eq for BoundingBoximpl Show for BoundingBoxpub(all) struct BoxSelectState {
start_x : Double
start_y : Double
current_x : Double
current_y : Double
}impl Eq for BoxSelectStateimpl Show for BoxSelectStatepub(all) struct ChildMoveResult {
child_id : String
new_x : Double
new_y : Double
}impl Eq for ChildMoveResultimpl Show for ChildMoveResultpub(all) struct ConnectedLineUpdate {
line_id : String
new_x : Double
new_y : Double
new_x2 : Double
new_y2 : Double
}impl Eq for ConnectedLineUpdateimpl Show for ConnectedLineUpdateimpl Eq for Connectionimpl Show for Connectionimpl Show for ConnectionGraphfn ConnectionGraph::are_directly_connected(self : ConnectionGraph, id1 : String, id2 : String) -> Boolfn ConnectionGraph::connection_distance(self : ConnectionGraph, from_id : String, to_id : String) -> Intfn ConnectionGraph::distance_map_from(self : ConnectionGraph, start_id : String) -> Map[String, Int]fn ConnectionGraph::find_all_paths(self : ConnectionGraph, from_id : String, to_id : String, elements : Array[Element], max_paths : Int) -> Array[Path]fn ConnectionGraph::find_shortest_path(self : ConnectionGraph, from_id : String, to_id : String, elements : Array[Element]) -> Path?fn ConnectionGraph::get_connected_component(self : ConnectionGraph, start_id : String) -> Array[String]fn ConnectionGraph::get_connected_lines(self : ConnectionGraph, element_id : String) -> Array[String]fn ConnectionGraph::get_stats(self : ConnectionGraph, all_element_ids : Array[String]) -> GraphStatspub(all) struct ContextMenu {
x : Double
y : Double
scene_x : Double
scene_y : Double
target_id : String?
}impl Eq for ContextMenuimpl Show for ContextMenupub(all) struct DragState {
element_id : String
start_x : Double
start_y : Double
offset_x : Double
offset_y : Double
start_shape : ShapeType?
start_connections : LineConnections?
connected_start_positions : Array[(String, Double, Double)]
}pub(all) struct Element {
id : String
x : Double
y : Double
shape : ShapeType
style : Style
transform : String?
parent_id : String?
connections : LineConnections?
}pub(all) struct ElementCapability {
can_move : Bool
can_resize : Bool
can_edit : Bool
can_delete : Bool
can_connect : Bool
can_add_child : Bool
}impl Eq for ElementCapabilityimpl Show for ElementCapabilitypub(all) struct EllipseResizeResult {
cx : Double
cy : Double
rx : Double
ry : Double
}impl Eq for EllipseResizeResultimpl Show for EllipseResizeResultpub(all) struct GraphStats {
node_count : Int
edge_count : Int
component_count : Int
hub_count : Int
leaf_count : Int
isolated_count : Int
}pub(all) enum HandlePosition {
NW
NE
SW
SE
LineStart
LineEnd
}impl Eq for HandlePositionimpl Show for HandlePositionpub(all) struct KeyBinding {
key : String
ctrl : Bool
shift : Bool
meta : Bool
action : String
label : String
category : String
}impl Eq for LineConnectionsimpl Show for LineConnectionspub(all) struct LineCoords {
id : String
x : Double
y : Double
x2 : Double
y2 : Double
}pub(all) struct LineResizeResult {
x1 : Double
y1 : Double
x2 : Double
y2 : Double
}impl Eq for LineResizeResultimpl Show for LineResizeResultpub(all) struct MoveTarget {
id : String
new_x : Double
new_y : Double
}impl Eq for MultiDragStateimpl Show for MultiDragStateimpl Eq for NearestConnectionResultimpl Show for NearestConnectionResultpub(all) struct Point {
x : Double
y : Double
}pub(all) struct PresetColor {
name : String
light : String
dark : String
}pub(all) struct RecalculationResult {
element_updates : Array[MoveTarget]
line_updates : Array[LineCoords]
}impl Eq for RecalculationResultimpl Show for RecalculationResultpub(all) struct RectResizeResult {
x : Double
y : Double
width : Double
height : Double
}impl Eq for RectResizeResultimpl Show for RectResizeResultpub(all) enum RepairAction {
RemoveConnection(String, String)
RemoveParent(String)
DeleteElement(String)
RegenerateId(String, String)
}pub(all) struct ResizeState {
element_id : String
handle : HandlePosition
start_x : Double
start_y : Double
start_shape : ShapeType
mouse_start_x : Double
mouse_start_y : Double
}pub(all) struct TextEditState {
parent_id : String
x : Double
y : Double
editing_id : String?
initial_text : String
font_size : Double?
}impl Eq for TextEditStateimpl Show for TextEditStatepub(all) struct TextResizeResult {
font_size : Double
}impl Eq for TextResizeResultimpl Show for TextResizeResultpub(all) struct Theme {
background : String
stroke : String
fill : String
text : String
ui_bg : String
ui_bg_hover : String
ui_bg_muted : String
ui_border : String
ui_text : String
ui_text_muted : String
ui_accent : String
}pub(all) enum ThemeMode {
Light
Dark
}pub(all) struct ValidationIssue {
level : ValidationLevel
element_id : String?
code : String
message : String
}impl Eq for ValidationIssueimpl Show for ValidationIssuepub(all) enum ValidationLevel {
Error
Warning
Info
}impl Eq for ValidationLevelimpl Show for ValidationLevelpub(all) struct ValidationResult {
is_valid : Bool
issues : Array[ValidationIssue]
capabilities : Map[String, ElementCapability]
}impl Show for ValidationResultpub(all) struct Viewport {
scroll_x : Double
scroll_y : Double
zoom : Double
}fn calc_bring_forward(current_idx : Int, length : Int) -> Int?fn calc_bring_to_front(current_idx : Int, length : Int) -> Int?fn calc_child_positions(parent_id : String, dx : Double, dy : Double, elements : Array[Element]) -> Array[ChildMoveResult]fn calc_circle_resize(start_r : Double, dx : Double, dy : Double, handle : HandlePosition, min_r : Double) -> Doublefn calc_distance(x1 : Double, y1 : Double, x2 : Double, y2 : Double) -> Doublefn calc_drag_position(offset_x : Double, offset_y : Double, mouse_x : Double, mouse_y : Double) -> Pointfn calc_ellipse_resize(cx : Double, cy : Double, start_rx : Double, start_ry : Double, dx : Double, dy : Double, handle : HandlePosition, min_r : Double) -> EllipseResizeResultfn calc_line_resize(start_x : Double, start_y : Double, start_x2 : Double, start_y2 : Double, dx : Double, dy : Double, handle : HandlePosition) -> LineResizeResultfn calc_rect_resize(start_x : Double, start_y : Double, start_w : Double, start_h : Double, dx : Double, dy : Double, handle : HandlePosition, min_size : Double) -> RectResizeResultfn calc_send_backward(current_idx : Int, length : Int) -> Int?fn calc_send_to_back(current_idx : Int, length : Int) -> Int?fn calc_text_hit_area(content : String, font_size : Double) -> (Double, Double)fn calc_text_resize(start_font_size : Double, dx : Double, dy : Double, handle : HandlePosition, min_size : Double) -> TextResizeResultfn can_add_element(new_element : Element, existing_elements : Array[Element]) -> (Bool, Array[ValidationIssue])fn can_delete_element(element_id : String, all_elements : Array[Element]) -> (Bool, Array[ValidationIssue])let category_navigation : Stringfn compute_line_move_topology(elements : Array[Element], moved_line_id : String, new_x : Double, new_y : Double, dx : Double, dy : Double) -> Array[LineCoords]fn find_nearest_connection(elements : Array[Element], point : Point, exclude_ids : Array[String], threshold : Double) -> NearestConnectionResult?fn point_in_circle(px : Double, py : Double, cx : Double, cy : Double, radius : Double) -> Boolfn point_in_rect(px : Double, py : Double, rx : Double, ry : Double, width : Double, height : Double) -> Boolfn point_to_line_distance(px : Double, py : Double, x1 : Double, y1 : Double, x2 : Double, y2 : Double) -> Doublefn recalculate_on_partial_move(moved_targets : Array[MoveTarget], elements : Array[Element]) -> RecalculationResultfn snap_to_grid(x : Double, y : Double, grid_size : Int, enabled : Bool) -> (Double, Double)fn test_make_connected_line(id : String, x1 : Double, y1 : Double, x2 : Double, y2 : Double, start_conn : Connection?, end_conn : Connection?) -> ElementLightweight SVG editor by mizchi/luna, like Excalidraw
Dependencies