Builtin Library
README.md
edui.shell (module)
The editor dock shell on the CSS-parity ui.* surface. One edui app owns a
ui.* native dockArea whose children are a dockPanel per registered edui
panel — real egui_dock tabs, splits and drag, with the arrangement persisting
across rebuilds because the dockArea and each dockPanel carry a stable id.
Why a separate registry
The shell keeps its own panel registry (addPanel / removePanel /
panelsSorted), distinct from the deprecated zui editor.registry. That keeps
the zui editor completely untouched while panels migrate to edui one at a time:
the zui dock renders the zui-framework panels it always has, and the edui shell
renders the edui panels registered here. The two registries fold into one at
cutover, when the zui dock is retired.
One app, one reactive loop
App.rebuild sets the shell as the building app before it calls buildShell,
so a panel's build() — which uses edui.current() to register its closures —
wires every callback onto the ONE shell app. All interaction for every panel
flows through the shell's single callback env, and a click anywhere rebuilds the
whole dockArea. That is why the shell needs no per-tab scheduler (unlike zui's
dockApp): the edui App is the scheduler.
Usage
local edui = require("@builtin::modules.edui")
edui.shell.addPanel{
id = "entities", title = "Entities", order = 10,
build = function()
return edui.panel{ title = "Entities", body = edui.tree{ ... } }
end,
}
edui.shell.mount() -- registers the screen on the EditorUI layer
-- each editor-update frame:
edui.shell.update(dt) -- liveness rebuild every `refresh` seconds
mount(opts?) takes { refresh? } (seconds between liveness rebuilds, default
0.5). refresh() forces an immediate rebuild; unmount() tears the screen down
but keeps the panel registrations for a later mount.