forge-ui is the client-side UI layer every screen is built on. It manages WebUI views (HTML/CSS/JS
pages), routes messages between Lua and the page, owns an input-mode stack so screens cooperate over
mouse/keyboard capture, and provides toasts and a HUD mount.
UI is client-side. You call these exports from your package’s client scripts.
Views
A view is a WebUI page you create, show, message, and destroy.Lua array-tables serialize to JS as objects (
{"1":...}). In page JS, normalize with a
toArray() helper before calling .forEach.Input modes
Screens push an input mode while open and pop it when closed, so capture is well-behaved when several UIs overlap.Notifications & HUD
Testing pattern
UI logic that can be unit-tested lives in pureshared/ modules (input stack, notify formatting,
form-schema validation) and is covered by forge-tests; the WebUI rendering itself is verified in
Play-In-Editor.