How widgets work in promkit
mainWidgets in promkit-widgets are responsible for managing state and projecting that state into renderable content (styled graphemes and layout hints).
Crucially, widgets do not own event loops or key bindings. Instead:
- Input and focus behavior is defined by your application's
Promptimplementations. - Terminal layout and drawing is handled by
promkit-core.
This separation allows widgets to remain reusable state machines that focus purely on UI projection.