Skip to content

Releases: thomasborgen/hypermedia

3.0.0

05 Aug 08:13
bfc4499
Compare
Choose a tag to compare

Breaking

  • Rename htmx.py to fastapi.py. The decorators were only for fastAPI. If we support django or flask, then they should get their own versions. This change facilitates for that so we don't have to have a breaking change further down the line.
  • Don't expose @htmx and @full decorators directly from hypermedia, but require them to be imported from hypermedia.fastapi.

Housekeeping

  • Readme file: Add features section, improve examples

Full Changelog: 2.2.0...3.0.0

2.2.0 - String escaping and composed_text

28 Jun 08:08
800b5b4
Compare
Choose a tag to compare

Version 2.2.0

Features

  • Escape all text by default.
  • Add composed_text property that takes a list of strings or Elements and dumps that. This can be used to render strings with inline elements like <br>, <i> or <b>. used like: composed_text=["regular", Italic(text="italic"), Bold(text="bold"), "regular"].

Internal

  • Test elements with custom dump override like Docstring and Comment for string escaping.
  • Add tests to composed_text.

2.1.2 - Ignore None valued attributes

25 Jun 18:14
d523f25
Compare
Choose a tag to compare

Version 2.1.2

  • Expose models directly in __init__ file for typing/extension purposes.
  • #11 Ignore None valued attributes. This makes for easier programming.
  • Properly Type attributes (an elements kwargs) str | bool | None.
  • Improve test coverage.

2.1.1

13 Jun 18:45
Compare
Choose a tag to compare

Version 2.1.1

Fix

  • Expose Path, Rect, Rectangle, Circle, Ellipse, Line, Polyline and Polygon Elements directly in init file.

2.1.0 - Better SVG support

13 Jun 18:35
Compare
Choose a tag to compare

Version 2.1.0

Features

  • Added Path, Rect, Rectangle, Circle, Ellipse, Line, Polyline and Polygon Elements for when constructing and manipulating an SVG.

2.0.1

26 Apr 17:52
b9fcabc
Compare
Choose a tag to compare

Version 2.0.1

Fix

  • Now return partial render if full is not available. Consider if we should raise an exception instead.
  • Protocol Typing for the FastAPI Request did not work as expected. Fall back to Any for now.

Version 2.0.0 - Single quotes!

17 Apr 19:24
Compare
Choose a tag to compare

We need to support hx-vals which expects a double quoted json string. To do this we are now wrapping all html attributes in single quotes.

Breaking

  • rename base_models.py -> models.py
  • Use single quotes for attribute values.

Feature

  • Using single quotes for attributes lets us support hx-vals, since it expects a doubled quoted json string.

Fix

  • Rename hr->Hr, add alias HorizontalRule and export both in __init__.py