XenoAtom.Terminal.UI
repository·main·Indexed 42 days ago
https://github.com/xenoatom/xenoatom.terminal.uiA reactive, retained-mode terminal user interface framework for .NET 10 (C# 14). It enables the creation of inline terminal widgets and complex fullscreen applications using a binding-first UI model. Features include a rich set of over 60 built-in controls (such as DataGridControl, CodeEditor, and various layout stacks), support for Nerd Font glyphs, and a Brush API for linear gradients. Built on top of XenoAtom.Terminal for ANSI/markup output and input events.
What's inside XenoAtom.Terminal.UI
- XenoAtom.Terminal.UI is a modern, reactive retained-mode terminal UI framework for .NET. It allows developers to compose visuals and bind them to state, while the framework handles layout and efficient rendering automatically.
Overview of XenoAtom.Terminal.UI.Text
mainThe
XenoAtom.Terminal.UI.Textmodule provides the core text model and editing infrastructure required for text-oriented controls in the terminal. It is designed to handle complex text editing scenarios by providing abstractions for:- Document management: Representing the text content.
- Snapshots: Capturing states of the text.
- Selection: Managing text ranges and cursors.
- Undo/Redo: Providing history management for text edits.
- Parsing: Helpers for interpreting text structures.
Overview of the XenoAtom.Terminal.UI core namespace
mainThe
XenoAtom.Terminal.UInamespace is the core of the retained-mode terminal UI framework. It provides the fundamental primitives required to build terminal interfaces, including:- Visuals: The base primitives for rendering and layout.
- Bindings: Mechanisms for connecting data to the UI.
- App Loop: The central execution loop that manages the application lifecycle.
- Integration Entry Points: Methods and classes used to host the UI within an application.
Overview of XenoAtom.Terminal.UI.Templating
mainTheXenoAtom.Terminal.UI.Templatinginfrastructure provides the tools necessary to build terminal-based visuals from bound data. It allows developers to define how data structures should be rendered into the UI using a combination of template delegates, context objects, and role-aware item templating.Overview of XenoAtom.Terminal
mainXenoAtom.Terminalserves as the core terminal abstraction layer for the ecosystem. It provides the fundamental host-facing primitives required for managing I/O, detecting terminal capabilities, handling input events, and performing atomic output operations. This layer acts as the foundation upon whichXenoAtom.Terminal.UIis built.Overview of XenoAtom.Terminal.UI.Extensions.Markdown
mainThe
XenoAtom.Terminal.UI.Extensions.Markdownpackage provides a markdown integration layer forXenoAtom.Terminal.UI. It enables the parsing of Markdown content and its conversion into the terminal UI's internal document-flow model.Key capabilities include:
- Parsing: Converting Markdown text into structured data.
- Document-flow conversion: Mapping Markdown elements to
DocumentFlow,Paragraph, and other terminal UI controls. - Markup conversion: Providing helpers to transform markup into renderable terminal components.
The extension is built on top of the Markdig library and supports CommonMark along with selected extensions, optimized for efficient rendering within a terminal environment.
Overview of the XenoAtom.Terminal.UI Styling System
mainThe
XenoAtom.Terminal.UI.Stylingsystem provides a framework for customizing the visual appearance of terminal controls. It is built around three core pillars:- Themes: Composable sets of visual rules that define the overall look and feel of the UI.
- Style Keys: Named identifiers used to reference specific visual configurations across different controls.
- Visual Effects: Support for advanced terminal rendering including Brushes (solid colors/patterns) and Gradients.
Overview of XenoAtom.Terminal.UI
mainXenoAtom.Terminal.UI is a modern retained-mode terminal UI framework built on top of
XenoAtom.Terminal. It provides two primary modes of operation:- Inline Widgets: Rendered as part of normal terminal output using
Terminal.WriteorTerminal.Live. - Fullscreen Applications: Utilizes the alternate screen, supporting focus navigation with configurable tab stops, routed input, dialogs, and complex controls like
DataGridControlandTabControl.
- Inline Widgets: Rendered as part of normal terminal output using
Overview of XenoAtom.Terminal.UI.Controls
mainThe
XenoAtom.Terminal.UI.Controlsnamespace provides the built-in library of controls and visual components used to compose terminal user interfaces. It offers a range of components from low-level layout containers to high-level interactive widgets.Available component categories include:
- Layout Containers: For structuring the UI hierarchy.
- Input Controls: For capturing user input.
- Overlays: For displaying transient information or modal states.
- Charts: For data visualization within the terminal.
- Interactive Widgets: Higher-level, ready-to-use UI elements.
Use XenoAtom.Terminal.UI.Figlet for text banner rendering
mainTheXenoAtom.Terminal.UI.Figletextension provides support for FIGlet font parsing, metadata management, and text rendering. It is primarily used to provide predefined fonts and utilities for large text banner controls within the terminal UI ecosystem.Use high-level prompt abstractions for terminal interaction
mainThe
XenoAtom.Terminal.UI.Promptslibrary provides high-level, reusable prompt abstractions built on top of standard terminal UI controls. Instead of manually managing low-level controls, you can use these specialized prompt types to handle common user interaction patterns:- Confirmations: For yes/no or boolean decisions.
- Selection: For choosing from a list of options.
- Text Input: For capturing string data from the user.
- Numeric Entry: For capturing integer or decimal values.
These prompts are designed to be integrated into terminal applications to provide a consistent and intuitive user experience.
Browse available terminal UI controls
mainThe
xenoatom.terminal.uilibrary provides a comprehensive set of controls categorized by their functional purpose. You can find detailed specifications for each control in the documentation to understand their behavior, properties, and usage patterns.Control Categories
- Text input: Controls for capturing and validating user text (e.g.,
TextBox,TextArea,MaskedInput,NumberBox,ColorPicker). - Buttons & toggles: Action-oriented controls (e.g.,
Button,CheckBox,RadioButton,Switch,Link). - Lists & selection: Controls for selecting items from a collection (e.g.,
ListBox,TreeView,Select,Slider). - Layout & containers: Structural components for organizing the UI (e.g.,
VStack,HStack,Grid,DockLayout,Border,Group). - Scrolling: Mechanisms for handling content overflow (e.g.,
ScrollViewer,ScrollBar). - Navigation & chrome: High-level UI framework components (e.g.,
TabControl,MenuBar,CommandPalette,StatusBar). - Data display: Components for presenting information (e.g.,
Table,DataGridControl,TextBlock,MarkdownControl,ProgressBar,Charts). - Overlays: Transient UI elements (e.g.,
Popup,Dialog,Tooltip,Toast). - Shared subsystems: Integrated systems like the
Menu System(combiningMenuBarand context menus).
- Text input: Controls for capturing and validating user text (e.g.,