Documentation

TermColor.Terminal.UI

TermColor.Terminal.UI #

Small typed composition primitives for terminal applications. Views stay pure; the terminal runtime owns IO, while applications own model state and message handling.

A one-based rectangle in terminal coordinates.

Instances For
    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              def TermColor.Terminal.Rect.move (rect : Rect) (top left : Nat) :
              Equations
              • rect.move top left = { top := top, left := left, width := rect.width, height := rect.height }
              Instances For
                def TermColor.Terminal.Rect.inset (rect : Rect) (rows columns : Nat) :
                Equations
                Instances For

                  Pure information supplied to every view.

                  Instances For
                    Equations
                    Instances For
                      Equations
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          The pure result of rendering one component.

                          Instances For
                            Equations
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Equations
                                  Instances For
                                    Equations
                                    Instances For
                                      Equations
                                      Instances For
                                        Equations
                                        Instances For
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

                                                Ordered focus state for a composed rendered tree.

                                                Instances For
                                                  Equations
                                                  Instances For
                                                    Equations
                                                    Instances For
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          Equations
                                                          Instances For
                                                            Equations
                                                            Instances For

                                                              The component id receiving a terminal event after hit-testing/focus selection.

                                                              Equations
                                                              Instances For

                                                                Width allocation used by row composition.

                                                                Instances For
                                                                  Equations
                                                                  Instances For
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For

                                                                        A pure view. The runtime decides how the resulting frame reaches the terminal.

                                                                        Instances For
                                                                          Equations
                                                                          Instances For
                                                                            def TermColor.Terminal.View.column (gap : Nat) (children : List View) :
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              def TermColor.Terminal.View.column.go (gap : Nat) (context : ViewContext) (offset : Nat) :
                                                                              Equations
                                                                              Instances For
                                                                                def TermColor.Terminal.View.rowWith (constraints : List Constraint) (gap : Nat) (children : List View) :
                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  def TermColor.Terminal.View.rowWith.go (gap : Nat) (context : ViewContext) (offset : Nat) :
                                                                                  Equations
                                                                                  Instances For
                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      Equations
                                                                                      Instances For

                                                                                        A command produced by a component update. Effects remain explicit and typed.

                                                                                        Instances For
                                                                                          def TermColor.Terminal.Command.run {Msg : Type} (send : Msg → IO Unit) (command : Command Msg) :

                                                                                          Execute a command tree with a caller-owned message sink.

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            structure TermColor.Terminal.Component (Model Msg : Type) :

                                                                                            Typed state/update/view contract for reusable application components.

                                                                                            Instances For
                                                                                              def TermColor.Terminal.Component.mapMsg {Model ChildMsg ParentMsg : Type} (inject : ChildMsg → ParentMsg) (project : ParentMsg → Option ChildMsg) (component : Component Model ChildMsg) :
                                                                                              Component Model ParentMsg
                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For