cadrumo.entrypoints.tui.components.host module

A minimal application that carries one screen for a standalone run.

An area’s entry surface is a screen so a root shell can navigate to it. Some callers still open one surface as a whole process – the development harness, and the line-mode entry points that hand control to a single full-screen task – and this host is what those use. It holds no behaviour of its own beyond mounting the screen and reporting its dismissal as the process result, so a surface behaves identically whether it is navigated to or opened alone.

class ScreenHostApp(screen)[source]

Bases: App[ResultT | None], Generic

Run exactly one screen as its own process.

Parameters:

screen (Screen[ResultT | None])

CSS: ClassVar[str]

Inline CSS, useful for quick scripts. This is loaded after CSS_PATH, and therefore takes priority in the event of a specificity clash.

property hosted_screen: Screen[ResultT | None]

The screen under this host, for a caller that addresses it directly.

async on_mount()[source]

Mount the screen and exit when it dismisses.

Awaited rather than fired and forgotten: a caller that starts this host and immediately addresses a control would otherwise race the push and find only the host’s own empty default screen.

Return type:

None