Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/angelmunoz/hox
Async HTML rendering and a simplistic but extensible DSL based on css selectors.
https://github.com/angelmunoz/hox
async-rendering dotnet dsl fsharp html html-dsl library stream-html webserver
Last synced: about 1 month ago
JSON representation
Async HTML rendering and a simplistic but extensible DSL based on css selectors.
- Host: GitHub
- URL: https://github.com/angelmunoz/hox
- Owner: AngelMunoz
- License: mit
- Created: 2024-01-19T03:35:25.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-12T17:43:44.000Z (9 months ago)
- Last Synced: 2024-10-12T21:03:15.714Z (about 1 month ago)
- Topics: async-rendering, dotnet, dsl, fsharp, html, html-dsl, library, stream-html, webserver
- Language: F#
- Homepage: https://hox.tunaxor.me/
- Size: 294 KB
- Stars: 17
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Hox
> Check the documentation at [hox's website'](https://hox.tunaxor.me) for more details.
Hox is an extensible HTML rendering library, it provides a set of functions to work with **Nodes** and compose them together as well as a couple of async rendering functions that support cancellation.
The core features are:
- A single core `Node` type that drives the whole rendering mechanism.
- Side-by-side Asynchronous Nodes, you can add sync or async nodes into sync/async parents/sibling nodes.
- Cancellable sync/async Rendering process that leverages ValueTasks.
- Render to a single string or `IAsyncEnumerable`.
- A simplistic core DSL based on css selector parsing to generate nodes.A couple of opt-in extra supported features are:
- Declarative Shadow DOM support for built-in html elements (e.g. div, article, nav, etc.)
- Templating functions for Declarative Shadow DOM custom elements.
- C# and VB.NET compatibility out of the box for the core constructs.
- Feliz-like API thanks to Feliz.Engine for an F# flavored style.The core bits are somewhat low level building blocks to enable these kinds of features and possibly more in the future.
Feel free to chime in if you have a use case that could be solved by this library!