Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Changelogs can change! If you spot something is wrong or missing, please consider opening an issue or a pull request to fix it.
[Unreleased]
[v5.4.0] - 2025-11-01
Added
- [lustre/attribute] Added the
as_attribute for specifying the type of a<link>element. - [lustre/attribute] Added the
blockingattribute for controlling whether a<link>or<script>element is blocking or non-blocking. - [lustre/attribute] Added the
default_checkedattribute for specifying the default checked state of checkboxes and radio buttons. - [lustre/attribute] Added the
default_selectedattribute for specifying the default selected state of options. - [lustre/attribute] Added the
integrityattribute for specifying Subresource Integrity hashes. - [lustre/attribute] Added the
openattribute for controlling whether details elements are open or closed.
Changed
- [lustre/element]
element.advancedcorrectly respects theself_closingandvoidoptions when generating HTML strings. - [lustre/event] Fixed a bug where debounced events inside components decoded using the wrong event data.
- [lustre/runtime] Fixed a bug where nested compoents would sometimes render one animation frame later.
- [lustre/runtime] Fixed a bug where providing the same context multiple times would re-render all subscribed components.
[v5.3.5] - 2025-09-03
Changed
- [lustre/event] Correctly document the unit used for
debounceandthrottle. - [lustre/runtime] Fix a bug where holding a
WeakRefto a context subscription function would cause it to GC unpredictably. - [lustre/server_component] Fixed a bug where listening to attribute changes would crash the JavaScript server component runtime.
[v5.3.4] - 2025-08-23
Changed
- [lustre/server_component] Fixed even more bugs in the JavaScript server component runtime.
[v5.3.3] - 2025-08-22
Changed
- [lustre/runtime] Fixed a bug where form submitter was not included when constructing form data for decoding.
- [lustre/server_component] Fixed numerous bugs in the JavaScript server component runtime.
[v5.3.2] - 2025-08-09
Changed
- [lustre/runtime] Fixed a bug where the server component runtime was actually an outdated bundle.
[v5.3.1] - 2025-08-09
Changed
- [lustre/runtime] Fixed a bug where using
element.unsafe_raw_htmlwould not correctly create the DOM node.
[v5.3.0] - 2025-08-08
Added
- [lustre/component] Added a
delegates_focusconfig option to control how focus is handled in components. - [lustre/component] Added a
on_context_changeconfig option to listen for changes in a parent’s provided context. - [lustre/component] Added a
partsattribute for toggling independent CSS parts in component elements. - [lustre/effect] Added a
provideeffect for providing context values to components. - [lustre/element/svg] Add the
svg.namespaceconstant. - [lustre/element/svg] Add missing
svg.filter, andsvg.viewelements.
Changed
- [lustre] Fixed a bug where the internal
isLustreNodefunction would incorrectly identify nodes as Lustre nodes when they were not in some cases. - [lustre/component] Fixed a bug where removing an attribute a component was listening to would cause a runtime error.
- [lustre/component] Fixed a bug where a component’s Shadow Root was incorrectly closed by default.
- [lustre/element] Fixed a bug where a top-level fragment would not be hydrated correctly.
- [lustre/element/keyed] Fixed a bug where keyed elements were not virtualised correctly.
- [lustre/event] Fixed a bug where debounced events of child elements would still fire after the node was removed.
- [lustre/event] Fixed a bug where events would not fire correctly after elements where added to or removed from a preceeding fragment.
- [lustre/runtime] Lustre is now more resilient against other scripts or browser plugins modifying the DOM.
- [lustre/server_component] Fixed a bug where empty
valueattributes would result in a value ofundefined - [lustre/server_component] Fixed a bug where events inside fragments would not work.
[v5.2.1] - 2025-06-23
Changed
- [lustre/server_component] Fixed a bug where WebSocket connections were initialised twice when the component was mounted.
- [lustre/server_component] Fixed a bug where the event paths sent by the client erroneously included the shadowRoot itself.
[v5.2.0] - 2025-06-23
Added
- [lustre/dev/query] Added a
matchesfunction to check if an element matches a given selector. - [lustre/dev/query] Added a
hasfunction to check if an element or its descendants match a given selector. - [lustre/event] Added an
advancedfunction to create event listeners that can conditionally prevent default actions and stop propagation. - [lustre/event] Added a
handlerfunction to create event handlers to be used withadvanced.
Changed
- [lustre] Lustre now requires
gleam_erlangversion>= 1.0.0 and < 2.0.0. - [lustre] Lustre now requires
gleam_otpversion>= 1.0.0 and < 2.0.0. - [lustre] Fix a bug where events can not send the correct message if the browser or external Javascript moved the element.
- [lustre] Fixed a bug where changing the object passed down as a property would not correctly update the property on the DOM element.
[v5.1.1] - 2025-06-06
Changed
- [lustre/event] Fixed a bug where setting
prevent_defaulton an existing event listener would not remove the passive flag. - [lustre/event] Fixed a bug where
throttlewould only work when used in combination withdebounce. - [lustre/event] Fixed a bug where
throttlewould incorrectly call.preventDefaulton all discarded events. - [lustre/element] Fixed a bug where nested fragments would sometimes not be properly replaced
[v5.1.0] - 2025-05-18
Added
- [lustre/attribute] Added a
attribute.default_valuefunction to set thedefaultValueproperty of an input. - [lustre/attribute] Added multple attributes for working with HTML tables:
attribute.abbr,attribute.colspan,attribute.headers,attribute.rowspan,attribute.span,attribute.scope. - [lustre/dev/query] Created a module for querying a view for test purposes.
- [lustre/dev/simulate] Created a module for simulating a running application for test purposes.
- [lustre/event] Added support for
debounceandthrottleon the same event, at the same time.
Changed
- [lustre] Change
gleam_stdlibconstraint to>= 0.60.0 and < 2.0.0. - [lustre/event] Fixed a bug where updating the delay for
debounceorthrottlewould have no effect. - [lustre/runtime] Fixed a bug where keyed elements where no fully virtualised.
[5.0.3] - 2025-05-09
Changed
- [lustre/attribute] The
widthandheightfunctions now set the respective attributes instead of properties. - [lustre/element] Fixed a bug in
element.mapwhere the mapper functions were composed in reversed order. - [lustre/element/html] Fixed a bug where
html.textareawould not always update when thecontentchanges. - [lustre/server_component] Fixed a bug where
server_component.scriptcontained invalid characters.
[5.0.2] - 2025-04-20
Changed
- [lustre/runtime] Fixed a bug where stale app state was used to compute patches, leading to empty diffs.
[5.0.1] - 2025-04-19
Changed
- [lustre/event] Fixed a bug with some internal decoders incorrectly using
decode.fieldinstead ofdecode.subfield.
[5.0.0] - 2025-04-19
Added
- [lustre] Added a
sendfunction for sending messages to an app’s runtime. - [lustre] Defines new
RuntimeandRuntimeMessagetypes to model communication with running apps. - [lustre/attribute] Added many many attributes to
lustre/attribute. - [lustre/attribute] Added
styleas an alternative way tostylesto set a single CSS property. - [lustre/component] Added a
lustre/componentmodule with attributes and effects to access Custom Element features such as slots, parts, and CSS custom states. - [lustre/component] Component’s can be notified of browser autofill requests using the
on_form_autofillconfiguration option. - [lustre/component] Component’s can be notified of browser restore requests using the
on_form_restoreconfiguration option. - [lustre/component] Component’s can be notified of form reset events using the
on_form_resetconfiguration option. - [lustre/component] Component’s can listen to attribute value changes using the
on_attribute_changeconfiguration option. - [lustre/component] Component’s can listen to property value changes using the
on_property_changeconfiguration option. - [lustre/component] Component’s can now be made form-associated custom elements using the
form_associatedconfiguration option. - [lustre/component] Component’s can now control whether their shadow dom is open or closed using the
open_shadow_rootconfiguration option. - [lustre/effect] A new
after_painteffect allows you to run an effect after the browser paints. - [lustre/effect] A new
before_painteffect allows you to run an effect before the browser paints. - [lustre/element] Added a new
unsafe_raw_htmlfunction allows you to render raw unescaped HTML. - [lustre/element/keyed] Added a
lustre/element/keyedmodule with convenience functions for common keyed elements. - [lustre/server_component] Defines a new
ClientMessagetype to model messages sent from the server to the client. - [lustre/server_component] Added a
TransportMethodtype andmethodattribute to choose between websocket, sse, and http methods for server component clients. - [lustre/server_component] Adds an
elementfunction to more-conveniently create the<lustre-server-component>HTML element. - [lustre/server_component] Adds a
subjectfunction to recover theprocess.Subjectof a server component’s runtime. - [lustre/server_component] Adds a
pidfunction to recover theprocess.Pidof a server component’s runtime. - [lustre/server_component] Adds
register_subjectandderegister_subjectfunctions for Erlang-based server components. - [lustre/server_component] Adds
register_callbackandderegister_callbackfunctions for JavaScript-based server components.
Changed
- [lustre] App constructors such as
simpleandapplicationnow have labelled arguments. - [lustre]
componentno longer takes aDictof attribute change callbacks and now takes a list of configuration options. - [lustre]
startandstart_server_componentnow return the newRuntimetype. - [lustre/attribute]
propertynow requires aJsonvalue instead of anydynamic.Dynamicvalue. - [lustre/attribute]
stylehas been renamed tostyles. - [lustre/element]
fragmentno longer renders a wrapper div around its children. - [lustre/element]
to_string_builderandto_document_string_builderhave been renamed toto_string_treeandto_document_string_treerespectively. - [lustre/event] Event handlers written using
onnow use the newgleam/dynamic/decodeAPI. - [lustre/event] The
submitevent now includes a list for form data entries for processing. - [lustre/event]
prevent_defaultandstop_propagationare now modifiers of the event attribute itself. - [lustre/server_component]
decode_actionhas been replaced withruntime_message_decoder. - [lustre/server_component]
encode_patchhas been replaced withclient_message_to_json.
Removed
- [lustre] The
Action,ClientSpa,Patch, andServerComponenttypes have been removed from thelustremodule. - [lustre]
start_actorhas been removed in favour of a unifiedstart_server_componentfor both targets. - [lustre/attribute] The
onfunction has been removed in favour of theevent.onfunction. - [lustre/element] The
keyedfunction has been removed and replaced by a dedicatedlustre/element/keyedmodule. - [lustre/event] The
checked,mouse_position, andvaluedecoders have been removed. - [lustre/server_component] The deprecated
set_selectoreffect has been removed. - [lustre/server_component]
subscribeandunsubscribehave been removed. - [lustre/server_component] The
dataattribute has been removed.