M0: WIT package, MoonBit components, JS host, docs, CI (#1)
CI / test (push) Successful in 19s

This commit was merged in pull request #1.
This commit is contained in:
nandi committed 2026-11-24 23:51:26 +00:00
1 parent e5548fc067
commit 880ecd4102
141 files changed
+9681 -1

No files matched your search

@@ -0,0 +1,44 @@
// Generated by `wit-bindgen` 0.63.0. DO NOT EDIT!
///|
pub(all) enum Edge {
START; END
} derive()
///|
pub fn Edge::ordinal(self : Edge) -> Int {
match self {
START => 0
END => 1
}
}
///|
pub fn Edge::from(self : Int) -> Edge {
match self {
0 => START
1 => END
_ => panic()
}
}
///|
pub(all) struct Slot {
id : String; preferred : @types.Size; min_width : UInt; stretch : Bool; align : Edge
}
///|
pub(all) struct Placement {
id : String; rect : @types.Rect
}
///|
pub(all) struct Layout {
panel : @types.Rect; placements : Array[Placement]
}
///|
/// Decide where the panel sits and where each widget goes.
declare pub fn compute_layout(screen : @types.Size, slots : Array[Slot]) -> Layout
///|
/// Panel background/frame (drawn beneath the widgets), in screen coords.
declare pub fn render_panel(screen : @types.Size, panel : @types.Rect) -> Array[@types.DrawOp]
///|
/// Place a popup of `popup` size for the widget at `anchor`.
declare pub fn popup_position(screen : @types.Size, panel : @types.Rect, anchor : @types.Rect, popup : @types.Size) -> @types.Rect