Releases: dahlia-lib/dahlia
Releases · dahlia-lib/dahlia
Dahlia 3.0.0
This release follows the Dahlia Specification v1.0.0.
Added
- Automatic color depth detection (as a consequence,
Dahlia
'sdepth
parameter can now beNone
) - Style-specific reset codes
- The
&_
escape code - The
clean_ansi
function should now handle way more ANSI escape codes - The package can now be executed with
python -m dahlia
to show the current terminal emulator's capabilities - Various performance improvements:
- String conversions are now approximately ~70% faster
- A comprehensive benchmark showed an overall library speedup of 20%
Changed
- The "Blink" style code was changed from
&p
to&k
- The custom color syntax was changed from
&[#ffaff3]
to&#ffaff3;
and now supports shorthand 3-digit codes - The
Dahlia.depth
property now returns aDepth | None
instead of anint
- The full reset code is now
&R
instead of&r
- The "Hide" style code was changed from
&k
to&h
- The
no_reset
parameter and property was renamed toauto_reset
and now defaults toTrue
Fixed
- Type checkers no longer complain about non-lowercase depth strings
Removed
Dahlia.reset
Dahlia.test
- Dahlia's
no_color
parameter - The CLI tool
- The
&g
code - The legacy
dahlia
,dprint
, anddinput
functions - The
quantize_ansi
utility function
Dahlia 2.3.2
Fixed
- Dahlia objects with different markers are no longer considered equal
Dahlia 2.3.1
Fixed
- Python 3.8 compatibility
Dahlia 2.3.0
Added
quantize_ansi
by @Lunarmagpie
Dahlia 2.2.2
Added
- Legacy
dinput
function
Fixed
- Corrected legacy
dahlia
anddinput
function typehints
Dahlia 2.2.1
Changed
- Minor CLI improvements
Fixed
- Changed the default depth in the Dahlia CLI to 4
Dahlia 2.2.0
Added
- New format codes:
i
- invertj
- dimk
- hidep
- blink
- String and integer literals can now be used to specify the depth, e.g.
dprint("&3hi", depth="tty")
orDahlia(depth=24)
no_color
kwarg (has priority over theNO_COLOR
environment variable)
Changed
- Changed the default depth to LOW (4-bit)
Fixed
- Fixed encoding background colors for lower color depths
Dahlia 2.1.3
Fixed
- Added depth 4 as a valid option in the Dahlia CLI
- Fixed Python 3.8 compatibility
- Fixed non-HIGH depths failing during conversion
Dahlia 2.1.2
Added
py.typed
file by @Lunarmagpie
Changed
__main__.py:main
now usessys.exit
instead ofexit
- Improved project structure
Fixed
- Fixed 4-bit colors being entirely unused by the
__get_ansi
function
Also thanks to @Sigmanificient for minor improvements!
Dahlia 2.1.1
Fixed
- Included
dahlia
anddprint
functions in the module's__all__