Skip to content

Releases: ajalt/mordant

3.0.1

02 Nov 17:25
Compare
Choose a tag to compare

Fixed

  • Fixed terminal size detection in the mordant-jvm-ffm module on macOS (#238)
  • Fixed proguard filename duplication (#232)

3.0.0

08 Sep 17:47
Compare
Choose a tag to compare

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, and shouldAutoUpdateSize.
  • 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 and nonInteractiveHeight to Terminal 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 and height to Terminal.size.width and height.
  • Breaking Change TerminalInterface.info is now a method with parameters instead of a property.
  • Breaking Change Moved Markdown widget to separate mordant-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 using ColumnWidth.Custom, you should now use the ColumnWidth constructor.
  • Breaking Change The following Terminal methods are now extensions: prompt(), info(), danger(), warning(), success(), muted()
  • Breaking Change Renamed TerminalInfo.crClearsLine to supportsAnsiCursor
  • In raw mode on POSIX systems, pressing the escape key once will now immediately return an Escape event. (#193)
  • Renamed Terminal.info property to Terminal.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

28 Jul 19:57
Compare
Choose a tag to compare

2.7.2

Fixed

  • Fixed raw mode on macOS for JVM and native not using the correct termios constants. (#180)
  • Raw mode on macOS and Linux will now report the ESC ESC sequence as an Escape key event.
  • Fixed raw mode on GraalVM native image not compiling with musl libc. Contributed by @hubvd (#189)

2.7.2

14 Jul 17:59
Compare
Choose a tag to compare

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

29 Jun 19:21
Compare
Choose a tag to compare

select_list

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, and InteractiveSelectListBuilder 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

17 May 17:29
Compare
Choose a tag to compare

Added

  • Publish iosArm64 and iosX64 targets.
  • Added MultiplatformSystem that provides multiplatform implementations of some non-terminal functionality that commonly used for command line apps: readEnvironmentVariable, exitProcess, and readFileAsUtf8.

2.5.0

24 Apr 21:30
Compare
Choose a tag to compare

This release adds support for linuxArm64 and wasmJs targets.

2.4.0

13 Mar 20:01
Compare
Choose a tag to compare

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 to timeRemaining 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 to completed 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 to TextAlign.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

30 Jan 17:57
Compare
Choose a tag to compare

Added

  • Vararg constructors for UnorderedList and OrderedList
  • UnorderedList and OrderedList 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

02 Oct 18:12
Compare
Choose a tag to compare

Added

  • Added ColumnWidth.Custom that allows more control over column width behavior in tables. (#109)
  • Added showPulse parameter to ProgressLayout.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)

Changed

  • Update Kotlin to 1.9
  • Use the native C API when building a native image on GraalVM, which reduces binary size and removes the need to reflection. Thanks to @hubvd for the contribution (#119)