Add comprehensive documentation for terminal-ui

- Introduced new documentation files: `Components.md`, `Examples.md`, `Home.md`, `Install.md`, and `index.md`.
- Provided detailed guides on usage, examples, installation, and API components.
- Linked GitHub Pages and repository resources for easy navigation.
This commit is contained in:
!verity
2026-03-14 10:09:33 +01:00
parent 34b683aacf
commit 97a43d9850
5 changed files with 405 additions and 0 deletions

63
docs/Components.md Normal file
View File

@@ -0,0 +1,63 @@
# Components
Overview of what terminal-ui provides. All entry points are on `Terminal.*`.
## Output & text
| API | Description |
|-----|-------------|
| `Terminal.print(String)` | Styled text (chain `.color()`, `.bold()`, `.println()`) |
| `Terminal.rule()` | Horizontal rule (e.g. `====`) |
| `Terminal.keyValue()` | Key-value pairs |
| `Terminal.box()` | Box around content |
## Tables & layout
| API | Description |
|-----|-------------|
| `Terminal.table()` | Tables with header/rows |
| `Terminal.tree()` | Tree structure |
| `Terminal.columns()` | Multi-column layout |
| `Terminal.steps()` | Step indicator |
| `Terminal.breadcrumb()` | Breadcrumb trail |
| `Terminal.toc()` | Table of contents |
## Interactive
| API | Description |
|-----|-------------|
| `Terminal.prompt(String)` | Text input (`.ask()`, `.masked().ask()`) |
| `Terminal.confirm(String)` | Y/n confirmation |
| `Terminal.menu()` | Numbered menu (`.option()`, `.select()`) |
| `Terminal.selectList()` | List with arrow keys + Enter |
| `Terminal.pager()` | Paged output (Enter/arrows/q) |
## Live / progress
| API | Description |
|-----|-------------|
| `Terminal.progressBar()` | Progress bar (`.total()`, `.build()`) |
| `Terminal.spinner()` | Spinning indicator (`.message()`, `.start()`) |
| `Terminal.dashboard()` | Refreshing widget panel |
## Data & visuals
| API | Description |
|-----|-------------|
| `Terminal.diff()` | Diff view |
| `Terminal.log()` | Log-style output |
| `Terminal.timeline()` | Timeline |
| `Terminal.heatmap()` | Heatmap |
| `Terminal.chart()` | Charts |
## Other
| API | Description |
|-----|-------------|
| `Terminal.badge(String, Color)` | Colored badge |
| `Terminal.notify(String, Type)` | Notification (info/success/warning/error) |
| `Terminal.code(String)` | Code block with language |
| `Terminal.sysinfo()` | System info (OS, Java, etc.) |
| `Terminal.markdown(String)` | Render markdown to terminal |
Use the fluent API from `Terminal.*`. For tests or to disable ANSI, inject a custom `TerminalSupport`.