mizchi/moonlight/core does not have a README file
pub(all) struct AnchorDragState {
source_element_id : String
source_anchor_type : AnchorType
source_x : Double
source_y : Double
current_x : Double
current_y : Double
}pub(all) enum AnchorType {
Top
Bottom
Left
Right
Center
LineStart
LineEnd
}pub struct EditorState {
width : Int
height : Int
canvas_width : Signal[Int]
canvas_height : Signal[Int]
doc_width : Signal[Double]
doc_height : Signal[Double]
elements : Signal[Array[Element]]
selected_ids : Signal[Array[String]]
drag_state : Signal[DragState?]
multi_drag_state : Signal[MultiDragState?]
resize_state : Signal[ResizeState?]
box_select : Signal[BoxSelectState?]
context_menu : Signal[ContextMenu?]
viewport : Signal[Viewport]
grid_enabled : Signal[Bool]
grid_size : Signal[Int]
is_panning : Signal[Bool]
pan_start : Signal[(Double, Double)?]
text_edit : Signal[TextEditState?]
pending_connection : Signal[PendingConnection?]
placement_state : Signal[PlacementState?]
mouse_scene_pos : Signal[Point]
mouse_in_canvas : Signal[Bool]
preview_bg : Signal[String]
embed_bg : Signal[String]
theme_mode : Signal[ThemeMode]
is_mobile : Signal[Bool]
panel_visible : Signal[Bool]
mode : EditorMode
modal_open : Signal[Bool]
has_focus : Signal[Bool]
is_readonly : Signal[Bool]
show_toolbar : Signal[Bool]
anchor_drag_state : Signal[AnchorDragState?]
svg_el : Signal[Any]
container_el : Signal[Any]
tool_mode : Signal[ToolMode]
free_draw_state : Signal[FreeDrawState?]
free_draw_options : Signal[FreeDrawOptions]
last_placement_pos : Signal[Point?]
pinch_state : Signal[PinchState?]
validation_result : Signal[ValidationResult?]
plain_svg_ids : Signal[Array[String]]
}fn EditorState::find_nearest_connection_point(self : EditorState, point : Point, exclude_ids : Array[String], threshold : Double) -> (Element, Anchor, Point)?fn EditorState::get_element_capability(self : EditorState, element_id : String) -> ElementCapabilityfn EditorState::move_element(self : EditorState, id : String, new_x : Double, new_y : Double) -> Unitfn EditorState::show_context_menu(self : EditorState, x : Double, y : Double, scene_x : Double, scene_y : Double, target_id : String?) -> Unitfn EditorState::start_drag(self : EditorState, element_id : String, mouse_x : Double, mouse_y : Double) -> Unitfn EditorState::start_pinch(self : EditorState, pointer1_id : Int, pointer2_id : Int, p1 : Point, p2 : Point) -> Unitfn EditorState::start_placement(self : EditorState, element_id : String, anchor_element_id : String, anchor : Anchor, anchor_point : Point, is_line : Bool, is_arrow? : Bool) -> Unitfn EditorState::start_resize(self : EditorState, element_id : String, handle : HandlePosition, mouse_x : Double, mouse_y : Double) -> Unitfn EditorState::start_text_edit(self : EditorState, parent_id : String, x : Double, y : Double) -> Unitfn EditorState::start_text_edit_existing(self : EditorState, text_id : String, parent_id : String, x : Double, y : Double, initial_text : String, font_size : Double?) -> Unitfn EditorState::update_connected_lines_except(self : EditorState, element_id : String, except_line_id : String) -> Unitfn EditorState::update_element(self : EditorState, id : String, updater : (Element) -> Element) -> Unitfn EditorState::update_element_by_id(self : EditorState, id : String, updater : (Element) -> Element) -> Unitfn EditorState::update_line_connection(self : EditorState, line_id : String, connections : LineConnections) -> Unitfn EditorState::zoom_at(self : EditorState, screen_x : Double, screen_y : Double, zoom_in : Bool) -> Unitpub(all) struct FreeDrawOptions {
resample_dist : Double
epsilon : Double
max_error : Double
}pub(all) enum ToolMode {
Select
FreeDraw
}Lightweight SVG editor by mizchi/luna, like Excalidraw
Dependencies