Skip to content

Releases: salt-die/batgrl

Markdown gadget!

29 Nov 22:56
Compare
Choose a tag to compare

Markdown gadget added! Render markdown in the terminal with graphics, links, tables, lists and task lists! See it in action.

Changes for v0.31.0

  • Markdown gadget added/mistletoe added as a dependency.
  • add_text funcion and add_str, and set_text methods can now accept batgrl-flavored inline markdown if markdown=True.
  • Multi-line paste for console gadget.
  • Doc strings now conform to pydocstyle.
  • Raycaster refactored.
  • Three new Text borders added: near, mcgugan_tall, mcgugan_wide.
  • Cursor save/restore during rendering re-added.
  • VideoPlayer and BrailleVideoPlayer raise FileNotFound if file doesn't exist to prevent cv2 from eating the errors.
  • Render lock is now re-entrant. Gadgets must acquire render lock to resize or reposition.

GadgetBase and Stack Layout.

20 Oct 05:12
Compare
Choose a tag to compare

New in v0.29.0

  • Gadget, Text, and Graphics (and a few other gadgets) now inherit from
    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 width
    proportions can be set with the proportions 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)
  • Character attributes of gadgets, such as Text.default_char or
    Gadget.background_char can now be set with styled Char.
  • Gadget size and position are locked during rendering for thread safety.
  • Gadgets that inherited scroll view now inherit GadgetBase and have a
    scroll view.
  • Updated description of transparency for Gadget.
  • Fix several occurrences of improper escapes in strings.
  • Moved Char, style_char, and coerce_char into text_tools.
  • All layouts (except split layout) remove hints from children.

Console Gadget!

14 Oct 20:17
Compare
Choose a tag to compare

New in v0.28.0:

  • Console gadget added.
  • Select all and select word key-binds added to text input gadgets.
  • Method signatures added to method stubs in doc strings.
  • Several bug fixes.

Renamed project to `batgrl`. Rendering now uses regions.

07 Oct 12:52
Compare
Choose a tag to compare

New in v0.27.0

  • Renamed project to batgrl. Badass terminal graphics library. Widgets are now gadgets for flavor.
  • Rendering now uses regions by default, but painter's algorithm can still be used by passing the rendering mode to an App.

Sparklines and Barcharts!

21 Sep 04:04
Compare
Choose a tag to compare

New in v0.25.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.
  • Box drawing option for 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.
  • Widget behaviors now follow an "-able" naming convention. Several behaviors have been renamed:
    • 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.
  • Several enum parameters are now literal types.
    • 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.
    • Data table SelectItems and Alignment removed; parameters using these types now use literal types.
  • Datatype of NDArray types now added to type hints, e.g., NDArray[np.uint8].
  • TabbedWidget bug fixes:
    • Previous active tab content now disabled correctly when a new tab is added.
    • Animated underline height fixed.
  • A few minor bug fixes.

Data tables and tabbed widgets!

08 Sep 12:09
Compare
Choose a tag to compare

New in v0.20.1:

  • TextAnimation and spinners
  • TabbedWidget
  • DataTable
  • Transparent text widgets don't paint their background color (background colors behind them are visible).

Create text banners from FIGfonts!

28 Mar 15:41
Compare
Choose a tag to compare

Create ascii art banners from FIGfont files. Banners are created as arrays that they can be copied into TextWidget canvas arrays.

Text input widgets no longer use terminal cursor.

07 Feb 17:27
Compare
Choose a tag to compare

Text input widgets no longer use terminal cursor. Instead they draw a "virtual cursor".

Structured canvas arrays.

06 Feb 20:05
Compare
Choose a tag to compare

Before, TextWidget canvas arrays had dtype object. Now canvas arrays have dtype ("char", "U1"), ("bold", "?"), ("italic", "?"), ("underline", "?"), ("strikethrough", "?").

Additional changes:

  • add_text method of TextWidget is now add_str and add_text is now a function that adds multiline text to arbitrary views of a canvas array.
  • Color theming is completely revamped.
  • CanvasView removed.
  • Animated toggle buttons added.

TextPanel added.

06 Feb 21:40
Compare
Choose a tag to compare

TextPanel added for multiline static text.