diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lustre/element/html.gleam | 2 | ||||
-rw-r--r-- | src/lustre/element/svg.gleam | 2 | ||||
-rw-r--r-- | src/lustre/internals/patch.gleam | 13 | ||||
-rw-r--r-- | src/lustre/server_component.gleam | 2 |
4 files changed, 7 insertions, 12 deletions
diff --git a/src/lustre/element/html.gleam b/src/lustre/element/html.gleam index e616c59..93d8689 100644 --- a/src/lustre/element/html.gleam +++ b/src/lustre/element/html.gleam @@ -1,7 +1,7 @@ // IMPORTS --------------------------------------------------------------------- -import lustre/element.{type Element, element, namespaced} import lustre/attribute.{type Attribute} +import lustre/element.{type Element, element, namespaced} // HTML ELEMENTS: MAIN ROOT ---------------------------------------------------- diff --git a/src/lustre/element/svg.gleam b/src/lustre/element/svg.gleam index 1979c2a..9f741b5 100644 --- a/src/lustre/element/svg.gleam +++ b/src/lustre/element/svg.gleam @@ -1,7 +1,7 @@ // IMPORTS --------------------------------------------------------------------- -import lustre/element.{type Element, namespaced, text as inline_text} import lustre/attribute.{type Attribute} +import lustre/element.{type Element, namespaced, text as inline_text} // CONSTANTS ------------------------------------------------------------------- diff --git a/src/lustre/internals/patch.gleam b/src/lustre/internals/patch.gleam index ecf9a89..5b05429 100644 --- a/src/lustre/internals/patch.gleam +++ b/src/lustre/internals/patch.gleam @@ -96,15 +96,10 @@ fn do_elements( // for both their namespaces and their tags to be the same. If that is // the case, we can dif their attributes to see what (if anything) has // changed, and then recursively diff their children. - Element(_, old_ns, old_tag, old_attrs, old_children, _, _), Element( - _, - new_ns, - new_tag, - new_attrs, - new_children, - _, - _, - ) if old_ns == new_ns && old_tag == new_tag -> { + Element(_, old_ns, old_tag, old_attrs, old_children, _, _), + Element(_, new_ns, new_tag, new_attrs, new_children, _, _) if old_ns + == new_ns + && old_tag == new_tag -> { let attribute_diff = attributes(old_attrs, new_attrs) let handlers = { use handlers, name, handler <- dict.fold( diff --git a/src/lustre/server_component.gleam b/src/lustre/server_component.gleam index d078f6d..7d8f9bf 100644 --- a/src/lustre/server_component.gleam +++ b/src/lustre/server_component.gleam @@ -84,11 +84,11 @@ import lustre/attribute.{type Attribute, attribute} import lustre/effect.{type Effect} import lustre/element.{type Element, element} import lustre/internals/constants +import lustre/internals/patch @target(erlang) import lustre/internals/runtime.{type Action, Attrs, Event, SetSelector} @target(javascript) import lustre/internals/runtime.{type Action, Attrs, Event} -import lustre/internals/patch // ELEMENTS -------------------------------------------------------------------- |