- Added
showPulse
parameter toProgressLayout.progressBar
, allowing you to disable the pulse animation for a bar.
- Update Kotlin to 1.9
- Fixed exception thrown in environments that are missing required shared native libraries.
- Fixed animations clearing too much space when the animation changes size while running. (#110)
- Improved terminal capability detection for Xterm terminals. (#113)
- Added
ConfirmationPrompt
that asks the user to enter the same value twice, which is commonly used for password inputs.
- Include metadata in JVM jars to support GraalVM native-image.
- Fix animations printing an extra frame after
stop
is called when running in the IntelliJ console. (#105)
- Deprecated
TerminalColors
is favor ofTextColors
andTerminal.theme
Terminal.rawPrint
which allows you to print ANSI codes manually. (#91)- Option to disable trailing line breaks on animations.
Terminal.print
,println
, andrawPrint
now accept astderr
parameter that will print to stderr (if available).
- Fix typo in enum name: renamed
Borders.TOM_BOTTOM
toBorders.TOP_BOTTOM
. (#100) - The terminal cursor will now be hidden when
progressAnimation
is running.
- Removed
TerminalRecorder.currentContent
. Usestdout()
,stderr()
oroutput()
instead. - Removed
Terminal.forStdErr()
andTerminalInterface.forStdErr()
. UseTerminal.println(stderr=true)
instead.
- Add
Animation.stop()
to stop an animation without clearing it. (#95) - Animations now support resuming after a call to
stop
orclear
. (#94) TextStyles.reset
,TextStyles.resetForeground
, andTextStyles.resetBackground
to clear existing styles.
- Fix
TerminalInfo.interactive
not includingoutputInteractive
- Fix prompts on JS targets that were broken by KT-55817
- Source-incompatible change: All boolean fields on
TextStyle
are now nullable. A null field indicates no change to the previous value when adding or nesting styles. verticalLayout{}
now defaultsTextAlign.NONE
, meaning it won't add any trailing whitespace to lines. You can return to the old behavior withalign = TextAlign.LEFT
.- When nesting styles, the outer style will now override inner styles at the start of a string. (e.g.
red(blue("x")) == red("x")
) - Definition List terms and entries can now be empty
- Switch back to calling
stty
fordetectTerminalSize
on macOS. (#86) OverflowWrap
is now properly ignored when using a non-wrappingWhitespace
value.
- Tables and other layouts can now be completely empty (#82)
- Update Kotlin to 1.8.0
- Removed JS/Legacy publication. The JS target only publishes artifacts built with the IR compiler.
- JVM: terminal detection now uses JNA to call kernel functions directly.
- Interactive state of stdin and stdout are now detected separately.
- Terminal size detection is now fast since it does not need a subprocess.
- Detect terminal correctly when running in the IntelliJ terminal tab, but not through a run action. (#76)
timeoutMs
parameter toTerminalDetection.updateTerminalSize
. This function is now fast on all platforms.
- Stop stripping trailing newline from text when using
Whitespace.PRE
(#75)
- Implemented
hideInput
for prompts on native targets (#63) - Improve cell-width calculation for emoji sequences like skin tone modifiers (#64)
- Added
Theme.plus
to combine two themes - Added
Padding.plus
to combine two padding values
- Replaced most of the
Padding
constructor andWidget.withPadding
overloads with a unified builder interface - Renamed the top level
row
andcolumn
builders tohorizonalLayout
andverticalLayout
, respectively - Update Kotlin to 1.7.20
- Kotlin/Native: use new default memory manager. Objects are no longer frozen.
- Removed
buildWidget
. UsehorizonalLayout
andverticalLayout
instead.
- Terminal detection would sometimes incorrectly identify the process as running in IntelliJ (#72)
updateTerminalSize
would sometimes fail to find thestty
command (#66)
- Functionality for reading user input:
Terminal.readLineOrNull
,Terminal.prompt
and variousPrompt
classes TerminalRecorder
that saves output to memory rather than printing it.TerminalRecorder.outputAsHtml()
that can render recorded output as an html file.
- When building tables,
borders
has been renamedcellBorders
, andouterBorder: Boolean
has been replaced withtableBorders: Borders?
, which allows more control over the table's outside borders. (#58) - Update Kotlin to 1.7.0
- Avoid clobbering output when using
Terminal.forStdErr
while an animation is running. (#54)
- Deprecated the
VirtualTerminalInterface
. UseTerminalRecorder
instead.
- Update Kotlin to 1.6.20
- Publish JS target with the IR format in addition to LEGACY
- Fix race condition when using ProgressAnimation and adding interceptors in JVM (#55)
- Progress bars and other single-line animations are now supported in the IntelliJ console (#49)
- Added
bottomTitle
toPanel
Terminal.forStdErr
for printing to stderr rather than stdout- Add
macosArm64
target for native M1 macs
- Update Kotlin to 1.6.10
- Breaking change: Renamed
Table
andPanel
'sborderStyle
property toborderType
andborderTextStyle
toborderStyle
- Breaking change: Renamed
TerminalInfo
'sstdinInteractive
andstdoutInteractive
toinputInteractive
andoutputInteractive
, respectively
- Fix regression in clearing animations (#48)
Spinner
widget that displays a looping animationEmptyEidget
widget that can be used as a placeholder in layoutsrow{}
andcolumn{}
widget layouts that create a single row/column of widgets
- Reduced flickering on high frame rate animations
- Update Kotlin to 1.5.31
- Update Colormath to 3.0. If you use and colormath colors directly, you may need to update your imports.
- Fixed exception thrown when parsing markdown tables with empty cells
- Fixed rendering of markdown image reference links and link content
- Published artifacts for macOS
- Update Kotlin to 1.5.10
- All text instances and print functions now default to preformatted whitespace, meaning that spaces and newlines will be preserved. You can explicitly pass
Whitespace.NORMAL
to restore the previous behavior.
Table.contentToCsv
to render a table's cells to csv format- Added support for JavaScript and linux native targets
- Getter properties for standard theme styles
- Update Kotlin to 1.4.31
- Improve terminal capabilities detection
Terminal.progressAnimation
builder to create a customizable progress bar animation- Improved cursor APIs and added ability to produce cursor ANSI codes as a string
- Add ability to override detected terminal interactivity separately from the ANSI capabilities (#7)
- Rework theming system to simplify customization
Mordant 2.0 is a rewrite that retains the simple APIs of Mordant 1.0, and adds support for rendering complex widgets.
- Added renderable widgets, including tables, panels, and lists
- Added markdown rendering
- Added a theme system to customize text styles on an entire terminal instance
- Added animations that automatically clear the previous frame when redrawing
- Improved terminal capability detection
- ANSI colors and styles can now be applied through the
TextColors
andTextStyles
top-level objects, andTerminal.print
will downsample th resulting strings based on the detected terminal capabilities.
- Improve support for color detection in IntelliJ and VS Code terminals
- Add functions for generating ANSI cursor movement
- Add ability to generate ANSI color codes from any colormath color object
- Update colormath to 1.2.0
- Add support for XYZ and LAB color spaces
- Initial Release