Documentation
¶
Overview ¶
Package progress provides shared helpers around bubbles progress bars and programs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClampPercent ¶
ClampPercent limits the percent value to the valid range [0, 1].
func GetResponsiveBarWidth ¶
func GetResponsiveBarWidth() int
GetResponsiveBarWidth calculates the optimal progress bar width based on terminal size. It uses widthRatio of terminal width, clamped between minWidth and maxWidth.
func GetTerminalWidth ¶
func GetTerminalWidth() int
GetTerminalWidth returns the current terminal width, or defaultWidth if detection fails.
func NewBar ¶
NewBar returns a progress.Model with a consistent style and width. If width <= 0, it automatically calculates an appropriate width based on terminal size. In NO_COLOR mode, uses default monochrome style without gradient.
func StartProgram ¶
StartProgram starts a bubbletea program unless progress output is suppressed. It returns the program (nil when suppressed) and a done channel that closes after Run completes.
Types ¶
This section is empty.