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
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.