Releases: thomasborgen/hypermedia
Releases · thomasborgen/hypermedia
3.0.0
Breaking
- Rename
htmx.py
tofastapi.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 fromhypermedia
, but require them to be imported fromhypermedia.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
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
andComment
for string escaping. - Add tests to composed_text.
2.1.2 - Ignore None valued attributes
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
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
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
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!
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 aliasHorizontalRule
and export both in__init__.py