Added
- New
TerminalDetection
object that can be used to detect terminal capabilities without creating a terminal instance. - Added new optional methods to
TerminalInterface
to control raw mode:getTerminalSize
,readInputEvent
,enterRawMode
, andshouldAutoUpdateSize
. - Added new terminal implementation that uses the Foreign Function and Memory (FFM) API added in JDK 22.
- Split the library up into modules, so you can produce smaller JVM artifacts by only using the parts you need.
- Added support for raw mode and input events to JS and wasmJS targets when running on node.js.
- Added tvOS and watchOS native targets to all modules except the new
mordant-markdown
module. - Added ability to control raw mode with the
TerminalRecorder
. - Added support for unicode input in raw mode.
- Added
nonInteractiveWidth
andnonInteractiveHeight
toTerminal
terminal constructor to set a different width when the terminal is not interactive (e.g. when redirecting output to a file) (#140)
Changed
- Breaking Change Moved
Terminal.info.width
andheight
toTerminal.size.width
andheight
. - Breaking Change
TerminalInterface.info
is now a method with parameters instead of a property. - Breaking Change Moved
Markdown
widget to separatemordant-markdown
module, which is not included by default. If you use markdown rendering, you need to add that module to you dependencies. - Breaking Change Combined all
ColumnWidth
subclasses into a single class with factory methods. If you were usingColumnWidth.Custom
, you should now use theColumnWidth
constructor. - Breaking Change The following
Terminal
methods are now extensions:prompt()
,info()
,danger()
,warning()
,success()
,muted()
- Breaking Change Renamed
TerminalInfo.crClearsLine
tosupportsAnsiCursor
- In raw mode on POSIX systems, pressing the escape key once will now immediately return an
Escape
event. (#193) - Renamed
Terminal.info
property toTerminal.terminalInfo
. The old name is deprecated.
Removed
- Removed constructor overloads for
Terminal
. There is now one constructor with all default parameters. - Removed
Terminal.colors
. All colors rendered with the terminal are now automatically downsampled. - Removed previously deprecated methods.
Fixed
- Fixed ConcurrentModificationException from progress bars when updated under very high concurrency (#204)
- Improved performance of progress bars under high concurrency. (#207)
- Fixed
NoClassDefFoundError
when running with certain gradle plugins (#217) - Fixed whitespace of aligned table captions on narrow terminals (#216)