@cluesurf/show
v1.0.6
Published
<br/> <br/> <br/> <br/> <br/> <br/>
Readme
Features
Standard logger component using chalk and ora for styled console output with optional loading spinners.
Basic Usage
import { show, text } from '@cluesurf/show'
// Simple logging
show('Hello world')
// Styled text with options
const halt = show(
text('Processing...', {
tone: 'magenta',
bold: true,
background: { tone: 'white' },
line: true,
}),
{
nest: 2,
wait: true,
},
)
// Stop spinner when done
halt()Text Styling Options
- tone: Color from predefined set or hex string
- Predefined:
black,red,green,yellow,blue,magenta,cyan,white - Bright variants:
blackBright,redBright,greenBright, etc. - Custom: Any hex color string
- Predefined:
- bold: Bold text formatting
- background: Background color with
toneproperty - line: Underline text decoration
Show Options
- nest: Indentation depth level (2 spaces per level)
- wait: Creates loading spinner using ora package
Return Values
- Without
wait: true: Returnsvoid, logs message immediately - With
wait: true: Returns halt function to stop spinner
Implementation
Built on top of:
@cluesurf/tint-textpackage for styled text rendering via chalkorapackage for loading spinners- Console logging for immediate output
License
MIT
ClueSurf
Made by ClueSurf, meditating on the universe ¤. Follow the work on YouTube, X, Instagram, Substack, Facebook, and LinkedIn, and browse more of our open-source work here on GitHub.
