badass terminal graphics library
This release adds a BezierCurve
type and a coroutine move_along_path
that will move a gadget along a sequence of curves. move_along_path
also accepts different easings to control movement. Additional changes include:
VideoPlayer
and BrailleVideoPlayer
renamed Video
and BrailleVideo
, respectively.clear()
method added to Text
and Graphics
and shift()
method added to Text
.on_progress
parameter of tween()
method of Gadget
now accepts a callable with a single argument (the argument is the current progress of the tween).Introducing the new canvas data type, Cell! Major changes:
colors
ndarray of Text and _Root gadgets removed.Additional changes:
Gadget
type. Pane also alpha composites.alpha
parameter/attribute has been added to several gadgets to use new
compositing.render()
method is now private, renamed _render()
.Changes in v0.31.1
_pos
attribute from _Root
. This caused errors when getting top
, left
, right
, bottom
attributes.Markdown gadget added! Render markdown in the terminal with graphics, links, tables, lists and task lists! See it in action.
add_text
funcion and add_str
, and set_text
methods can now accept batgrl-flavored inline markdown if markdown=True
.near
, mcgugan_tall
, mcgugan_wide
.New in v0.29.0
GadgetBase
. This removes background_char
and background_color_pair
from many gadgets where these attributes/parameters did nothing.StackLayout
added. Stack layouts position their children horizontally or
vertically and resize them to use all available space. Child height or widthproportions
attribute.add_syntax_highlight
added to text gadgets. Pygments
added as a dependency.Additional Changes
ColorTheme
is now a dataclass (instead of a NamedTuple
).ScrollView
is themable (again)Text.default_char
or
Gadget.background_char
can now be set with styled Char
.GadgetBase
and have a
scroll view.Char
, style_char
, and coerce_char
into text_tools
.New in v0.28.0:
nurses_2
is now formatted with Black and isort, and linted with ruff!Sparkline
widget added.BarChart
widget added.ScrollView
smooth(er) scrolling with fractional block characters.LinePlot
.ProgressBar
's progress
attribute can be set to None
for an infinite loading animation.TextPad
and Textbox
correctly take into account full-width characters as cursor moves or text is added and deleted.TextPad
and Textbox
now have move-across-word keybinds.ShadowCaster
types simplified.GrabbableBehavior
is now Grabbable
GrabMoveBehavior
is now Movable
GrabResizeBehavior
is now Resizable
FocusBehavior
is now Focusable
ScatterBehavior
is now MovableChildren
TextAnimation
's color pair can now be set with the animation_color_pair
attribute.Anchor
is now Literal["bottom", "bottom-left", "bottom-right", "center", "left", "right", "top", "top-left", "top-right"]
Interpolation
is now Literal["nearest", "linear", "cubic", "area", "lanczos"]
GridLayout.Orientation
is now Literal["lr-tb", "lr-bt", "rl-tb", "rl-bt", "tb-lr", "tb-rl", "bt-lr", "bt-rl"]
Border
is now Literal["light", "heavy", "double", "curved", "ascii", "outer", "inner", "thick"]
Easing
is now a literal type.SelectItems
and Alignment
removed; parameters using these types now use literal types.NDArray[np.uint8]
.TabbedWidget
bug fixes:
New in v0.20.1:
TextAnimation
and spinnersTabbedWidget
DataTable
Create ascii art banners from FIGfont files. Banners are created as arrays that they can be copied into TextWidget
canvas arrays.