Std.Ui.Terminal
Std.Ui.Terminal — an interactive terminal element bound to a PTY process
Types
type Terminal
type alias State = { id : String , proc : Maybe Process , gen : Int , cols : Int , rows : Int , exit : Maybe ExitStatus }
type Msg
Values
attach : (Msg -> msg) -> Process -> Terminal -> ( Terminal, Cmd msg )
Show `proc` in the terminal (a process spawned with `Process.withPty`).
exitStatus : Terminal -> Maybe ExitStatus
How the attached process ended, once it has.
init : String -> Terminal
A terminal element with this id (unique on the page) and no process yet.
process : Terminal -> Maybe Process
The process shown in the terminal, if one is attached.
update : (Msg -> msg) -> Msg -> Terminal -> ( Terminal, Cmd msg )
Handle a terminal message.
view : (Msg -> msg) -> Terminal -> List (Attribute msg) -> Element msg
The terminal element. It fills the width of its parent and is 360 px