Skip to content

MohnDoe/pi-tui-extras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pi.dev component and utility library.

Coverage TypeScript Bun License

Customizable, well-tested and easy to use components and utilities for pi.dev extensions development.

Install

bun add @mohndoe/pi-tui-extras
npm install @mohndoe/pi-tui-extras
pnpm add @mohndoe/pi-tui-extras
yarn add @mohndoe/pi-tui-extras

Components

  • BorderBox -- Bordered container with configurable style, titles, footers, and padding.
  • Table (coming soon)
  • FlexLayout (coming soon)
  • Scrollbar (coming soon)

See all components here.

Core utilities

  • truncate -- Fit string to a maximum visible width, appending "…".
  • padLine -- Right-pad a string with spaces to reach a target width.
  • alignInWidth -- Left, center, or right-align text within a fixed width.
  • alignInWidthLR -- Position two strings at opposite ends of a fixed width.

See all all utilities here.

Project status

Early development. BorderBox is stable and tested. More components coming, including: tables, flex layout, scrollbar, etc.

Contributing

This project follows the conventions in CONTEXT.md and AGENTS.md. Tests are co-located (*.test.ts next to source) and use vitest.

  1. Branch from main into a feat/ or fix/ prefix
  2. Write tests before implementation (TDD)
  3. Run bun test before opening a PR
  4. Open a PR

License

MIT — see LICENSE.

About

Out of the box components for pi.dev extensions.

Topics

Resources

License

Stars

Watchers

Forks

Contributors