Releases: ajalt/mordant
Releases · ajalt/mordant
3.0.1
3.0.0
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)
2.7.2
2.7.2
Added
- Added support for raw mode for Linux and Macos on GraalVM native Image. Contributed by @hubvd (#186)
Fixed
- Fix markdown rendering not supporting math blocks (#182)
- Fix exception thrown when using
readEvent
in raw mode when some windows terminals lose focus (#185) - Fix
MultiplatformSystem.readFileAsUtf8
not supporting special files on JVM on Linux (clikt#527)
2.7.0
Added
- Added raw mode support for reading keyboard and mouse events. See the docs for details. This feature is currently supported on all targets except JS, wasmJS, macOS arm64, and Graal Native Image.
- Added
Terminal.interactiveSelectList
,Terminal.interactiveMultiSelectList
, andInteractiveSelectListBuilder
that let you pick one or more items from a list using the arrow keys.
Changed
- Update Kotlin to 2.0.0
Fixed
- Fix animations to correctly clear the last frame when animating a non-rectangular widget that changes size.
- Fix closing bold and dim styles when one is nested in the other.
- Fix
NoClassDefFoundError
in terminal detection on some platforms.
2.6.0
2.5.0
2.4.0
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.
Added
- New implementation of progress bars with a number of improvements:
- Support for animating multiple progress bars at the same time.
- New
mordant-coroutines
modules with extensions for animating with coroutines instead of threads. - Any widget can be added to a progress layout, not just the built-in cell types
- Added
compact
style totimeRemaining
cells. - Added
marquee
cell that can scroll text that is larger than a fixed width. - Added
timeElapsed
cell that shows the time elapsed since the start of the animation.
- Added
Viewport
widget that can crop or pad another widget to a fixed size, and scroll it within that size. - Added
precision
parameter tocompleted
progress cell that controls the number of decimal places shown. - Animations now automatically handle the terminal resizing, although on some terminals partially drawn frames may be visible. Due to a bug in JNI, the terminal size isn't automatically updated on JVM on macOS.
- Added
TableBuilder.addPaddingWidthToFixedWidth
option to control how padding is added to fixed width columns.
Changed
- Animations now never add a trailing newline while they're running. They always add one once the animation is stopped. The
trailingLinebreak
parameter is deprecated. This allows full screen animations without a blank line at the bottom.
Fixed
- Vertical layout now correctly pads non-text cells when
align
is set toTextAlign.LEFT
- Fixed exception when hiding the cursor on browsers on JS target.
- Update internal code generation to be compatible with the latest versions of R8 (#161)
2.3.0
Added
- Vararg constructors for
UnorderedList
andOrderedList
UnorderedList
andOrderedList
now support being empty- Added optional terminal frame to
TerminalRecorder.outputAsHtml
Changed
- When setting conflicting styles on a
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).
Fixed
- Updated bundled proguard rules (#130)
2.2.0
Added
- Added
ColumnWidth.Custom
that allows more control over column width behavior in tables. (#109) - Added
showPulse
parameter toProgressLayout.progressBar
, allowing you to disable the pulse animation for a bar. - Added support for detecting terminal capabilities on mintty. Thanks to @sschuberth for the contribution. (#127)