A library for constructing type-safe and (mostly) spec-compliant HTML.
This library is in active development; the API is not yet stable.
- Create benchmarks for Brigid HTML generation. Compare against Blaze and Lucid.
- Change HTML entities to an ADT. Change the
ChildHTMLconstructor to accept this, and add useToTextandToBytes. Decide between either anentitycombinator and the ADT exposed, or combinator functions that do this.
- For each of
global,HTMX, event listeners, arias, andscopedattributes:- Make constructors for
AttributeGADT. - Make render functions.
- Modify
ValidElementsFor. - Modify the attribute selector functions in
HTML.Types.QuerySelectorto take their appropriate types.
- Make constructors for
- Add relevant type class instances (Bounded, Enum, Eq, Ord, Show, etc) and from/to text functions to applicable types.
- Consider a
contenteditable/inputmodedual attribute type for theSafemodule. - Add safe builder functions for any HTML elements with complex conditions for
its permitted content, such as what was done with
Brigid.HTML.Elements.Safe.Table. Go through the entire list of elements again to determine what qualifies for this. - Add support for the SVG tag.
- Add support for MathML.
- Look into safely constructing Shadow DOM elements.
- Consider
Defaulttype class that returns the default value for a given type or attribute. - Review common classes (
Id,Class,Name, etc) and maybe make smart constructors that prevent users from creating them with invalid characters, rather than escaping them after the fact. - Consider writing Aeson instances for common types.
- Give
ChildHTMLandAttributeanNFDatainstance - this seems to be required for benchmarking. - Make type synonyms for Shrubbery union member constraints.
Maybe memberfor members of Shrubbery union member constraints causes compile issues whenNothingis passed, because it can't determine what the union member should be. These unions should includeNoneas an option, and that can be used forNothinginstead.
- Add support for XML.
- Add function to produce an XML WSDL from a provided Brigid XML structure?
- For each attribute:
- Make constructors for
AttributeGADT. - Make render functions.
- Modify
ValidElementsFor.
- Make constructors for
- Add safe builder functions for any HXML elements with complex conditions for its permitted content. Go through the entire list of elements again to determine what qualifies for this.
- Consider
Defaulttype class that returns the default value for a given type or attribute.
- Change all
ToTextandToBytesfunctions to use builders? Export them for use in render, but not fromBrigid.HTML.Types. - Switch to strict types for element combinators.
- Inline newtypes.
- Interpolate hard-coded string types everywhere.
- Parallel rendering for DOMs branches with more than 3 children.
- Replace
nubOrdOn attributeTextin element combinators with a custom fold in rendering that dedupes as it folds. - Switch to using
text-builder-linearfor all building functions.