Multiplatform text styling for Kotlin command-line applications
This release adds support for linuxArm64
and wasmJs
targets.
This release includes a complete rewrite of the progress bar system. The new system is more performant and flexible, and allows for more complex progress animations. The old progress bar APIs are deprecated, but will continue to work.
See the documentation website for more information.
mordant-coroutines
modules with extensions for animating with coroutines instead of threads.compact
style to timeRemaining
cells.marquee
cell that can scroll text that is larger than a fixed width.timeElapsed
cell that shows the time elapsed since the start of the animation.Viewport
widget that can crop or pad another widget to a fixed size, and scroll it within that size.precision
parameter to completed
progress cell that controls the number of decimal places shown.TableBuilder.addPaddingWidthToFixedWidth
option to control how padding is added to fixed width columns.trailingLinebreak
parameter is deprecated. This allows full screen animations without a blank line at the bottom.align
is set to TextAlign.LEFT
UnorderedList
and OrderedList
UnorderedList
and OrderedList
now support being emptyTerminalRecorder.outputAsHtml
Table
or its cells, the innermost style now takes precedence (i.e. if you set different styles on the whole table and a cell, the style applied to the cell will be used).ColumnWidth.Custom
that allows more control over column width behavior in tables. (#109)
showPulse
parameter to ProgressLayout.progressBar
, allowing you to disable the pulse animation for a bar.stop
is called when running in the IntelliJ console. (#105)
Terminal.rawPrint
which allows you to print ANSI codes manually. (#91)
Terminal.print
, println
, and rawPrint
now accept a stderr
parameter that will print to stderr (if available).Borders.TOM_BOTTOM
to Borders.TOP_BOTTOM
. (#100)
progressAnimation
is running.TerminalRecorder.currentContent
. Use stdout()
, stderr()
or output()
instead.Terminal.forStdErr()
and TerminalInterface.forStdErr()
. Use Terminal.println(stderr=true)
instead.Animation.stop()
to stop an animation without clearing it. (#95)
stop
or clear
. (#94)
TextStyles.reset
, TextStyles.resetForeground
, and TextStyles.resetBackground
to clear existing styles.TerminalInfo.interactive
not including outputInteractive
TextStyle
are now nullable. A null field indicates no change to the previous value when adding or nesting styles.verticalLayout{}
now defaults TextAlign.NONE
, meaning it won't add any trailing whitespace to lines. You can return to the old behavior with align = TextAlign.LEFT
.red(blue("x")) == red("x")
)