Releases: davesnx/html_of_jsx
Releases · davesnx/html_of_jsx
0.0.9
CHANGES:
- Fix
data-attributesbeing rendered asdata_-attributes(@davesnx) - Add
JSX.ppfor pretty-printing HTML with indentation, powered bypretty_expressive(@davesnx) - Add
JSX.stringffor escapedPrintf-style text formatting and teach the PPX to optimize literal-onlystringfcalls at compile time (@davesnx) - Improve runtime render speed in
JSX.writeby replacing iterator-heavy paths with direct recursion and indexed array traversal (@davesnx) - Reduce default render buffer sizes (
1024 -> 256) and improve PPX-generated buffer capacity estimation for dynamic/optional attribute code paths (@davesnx) - Add a compile-time fast path for static HTML escaping in
ppx/static_analysis.mlto avoid buffer work when no escaping is required (@davesnx) - Extend static optimization coverage for dynamic attributes: elements with dynamic attrs and dynamic string/mixed children now generate buffer-based optimized code instead of falling back to
JSX.node(@davesnx)
0.0.8
CHANGES
- Remove temporal string on each JSX.escape, and make escape faster (#9c64ba4)
- Skip escape for Int/Float attribute values (#8e8cf26)
- Adds JSX.array (#3154012)
- Add
Polyvariantattribute type for type-safe enumerated HTML attributes (e.g.target,loading,dir,role, ARIA attributes, SVG attributes) - Add polyvariant validation test suite (keyword escaping, identifier validity, consistency checks)
Before (any string accepted, typos slip through silently):
<a href="/" target="blanked" />
<img src="cat.png" loading="lzy" />After (only valid values compile):
<a href="/" target=`_blank />
<img src="cat.png" loading=`lazy_ />
<a href="/" target=`_bogus /> (* compile error! *)Error: This expression has type [> `_bogus ]
but an expression was expected of type
[ `_blank | `_parent | `_self | `_top ]
The second variant type does not allow tag(s) `_bogus
- Create
html_of_jsx.htmxlibrary with script and extension support
<head>
<Htmx version="2.0.4" />
<Htmx.Extensions.SSE version="2.2.2" />
<Htmx.Extensions.WS version="2.2.0" />
</head>
0.0.7
CHANGES:
- Static HTML optimization: elements with static content are now pre-rendered at compile time for ~10x faster rendering (@davesnx)
- Add
-disable-static-optflag to disable static HTML optimization (useJSX.nodefor all elements) (@davesnx) - [BREAKING] Remove
JSX.Debugmodule (the opaqueJSX.elementtype is no longer inspectable) (@davesnx)
0.0.6
0.0.5
- Make tests run in FreeBSD (#22) (@davesnx)
- Fix: prefix with Stdlib all ppx generated code (#23) (@tjdevries)
- Allow react attributes as props (via -react flag) (https://github.com/davesnx/html_of_jsx/pull#26) (@davesnx)
- Documentation: pushed old "features" document into the main index as seen https://davesnx.github.io/html_of_jsx/html_of_jsx/index.html
0.0.4
- [BREAKING] Handle HTML encoding for
'(@davesnx) - Handle HTML encoding for
"(from"to") (@davesnx) - Improved performance of
JSX.render(@davesnx) - [BREAKING] Remove
Fragmentin favor ofJSX.list(@davesnx) - Remove unused
Component (unit -> element)since it isn't needed (@davesnx) - [BREAKING] Change attributes representation (@andreypopp)
- [BREAKING] Remove melange dependency (@andreypopp)
- [BREAKING] Lower the OCaml bound to 4.14 (@davesnx)
- Make lib wrapped (@andreypopp)
0.0.3
- [BREAKING]
Html_of_jsx.renderlives underJSX.render(removing theHtml_of_jsxmodule entirely) - [BREAKING] Module
Jsxis turned intoJSX - [BREAKING] dune's library is now
html_of_jsxinstead of (html_of_jsx.lib) - [BREAKING]
JSX.elementis opaque (can't see the type from outside), but we have aJSX.Debugmodule to inspect and re-constructJSX.element(cc @leostera) - Improved performance of
JSX.render
0.0.2
0.0.1
- First working version of the ppx and library
- Supports most of features from JSX (uppercase components, fragments, optional attributes, punning)
- but with a few improvements (lowercase components, no need to add annotations)
- No React idioms (no
className, nohtmlFor, noonChange, etc...) - Type-safe, validates attributes and their types (it can be better thought)
- Minimal
Html_of_jsx.renderto render an element to HTMLJsx.*to construct DOM Elements and DOM nodes (Jsx.text,Jsx.int,Jsx.null,Jsx.list)
- Works with Reason and mlx
- Supports some htmx under the ppx (
html_of_jsx.ppx -htmx)