A library for constructing type-safe and (mostly) spec-compliant HTML.
This library is in active development; the API is not yet stable.
- 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 render tests once SVG is ready for prime time.
- Add support for MathML. Add render tests once MathML is ready for prime time.
- 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 render tests once XML is ready for prime time.
- 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. - Audit all tags in both renders for self-closing correctness. HXML uses
strict XML, so elements with no children must render as
<tag/>, never<tag></tag>. Several tags currently usebuildClosingOrContentTagincorrectly. - Add render tests for HXML elements and attributes (analogous to
test/HTML/Render/Elements.hsandtest/HTML/Render/Attributes.hs).
- Parallel rendering for DOMs branches with more than 3 children.