Skip to content

Commit a2ea856

Browse files
committed
sketch_redraw_v3.1.1
1 parent 8512c33 commit a2ea856

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

sketch_redraw/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## v3.1.0 - 2025-09-0
1+
## v3.1.1 - 2025-09-02
2+
3+
- Correctly handle void elements.
4+
5+
## v3.1.0 - 2025-09-01
26

37
- Exposes `initialise_cache` to provide a way to modify the Sketch stylesheet
48
before insertion in the provider.

sketch_redraw/gleam.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "sketch_redraw"
22
target = "javascript"
3-
version = "3.1.0"
3+
version = "3.1.1"
44

55
description = "A Sketch runtime package, made to work with Redraw!"
66
internal_modules = ["sketch/redraw/internals", "sketch/redraw/internals/*"]

sketch_redraw/src/sketch/redraw.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pub fn styled(
153153
tag: String,
154154
styles: Class,
155155
props: List(Attribute),
156-
children: List(Component),
156+
children: a,
157157
) -> Component {
158158
let as_ = a.attribute("as", tag)
159159
let styles = a.attribute("styles", styles)

sketch_redraw/src/sketch/redraw/dom/html.gleam

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import redraw.{type Component} as _
88
import redraw/dom/attribute.{type Attribute}
99
import redraw/dom/html
10-
import redraw/internals/unsafe.{coerce}
1110
import sketch/css.{type Class}
1211
import sketch/redraw.{styled}
1312

@@ -38,7 +37,7 @@ pub fn html(
3837
///
3938
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/base)
4039
pub fn base(class: Class, attributes: List(Attribute)) -> Component {
41-
styled("base", class, attributes, coerce(Nil))
40+
styled("base", class, attributes, Nil)
4241
}
4342

4443
/// The `<head>` HTML element contains machine-readable information (metadata)
@@ -70,7 +69,7 @@ pub fn head(
7069
///
7170
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/link)
7271
pub fn link(class: Class, attributes: List(Attribute)) -> Component {
73-
styled("link", class, attributes, [])
72+
styled("link", class, attributes, Nil)
7473
}
7574

7675
/// The `<meta>` HTML element represents metadata that cannot be represented
@@ -93,7 +92,7 @@ pub fn link(class: Class, attributes: List(Attribute)) -> Component {
9392
///
9493
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
9594
pub fn meta(class: Class, attributes: List(Attribute)) -> Component {
96-
styled("meta", class, attributes, [])
95+
styled("meta", class, attributes, Nil)
9796
}
9897

9998
/// The `<style>` HTML element contains style information for a document, or
@@ -216,7 +215,7 @@ pub fn address(
216215
///
217216
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/area)
218217
pub fn area(class: Class, attributes: List(Attribute)) -> Component {
219-
styled("area", class, attributes, [])
218+
styled("area", class, attributes, Nil)
220219
}
221220

222221
/// The `<article>` HTML element represents a self-contained composition in a
@@ -360,7 +359,7 @@ pub fn body(
360359
///
361360
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/br)
362361
pub fn br(class: Class, attributes: List(Attribute)) -> Component {
363-
styled("br", class, attributes, [])
362+
styled("br", class, attributes, Nil)
364363
}
365364

366365
/// The `<button>` HTML element is an interactive element activated by a user
@@ -451,7 +450,7 @@ pub fn code(
451450
///
452451
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/col)
453452
pub fn col(class: Class, attributes: List(Attribute)) -> Component {
454-
styled("col", class, attributes, [])
453+
styled("col", class, attributes, Nil)
455454
}
456455

457456
/// The `<colgroup>` HTML element defines a group of columns within a table.
@@ -677,7 +676,7 @@ pub fn em(
677676
///
678677
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/embed)
679678
pub fn embed(class: Class, attributes: List(Attribute)) -> Component {
680-
styled("embed", class, attributes, [])
679+
styled("embed", class, attributes, Nil)
681680
}
682681

683682
/// The `<fieldset>` HTML element is used to group several controls as well as
@@ -893,7 +892,7 @@ pub fn hgroup(
893892
///
894893
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/hr)
895894
pub fn hr(class: Class, attributes: List(Attribute)) -> Component {
896-
styled("hr", class, attributes, [])
895+
styled("hr", class, attributes, Nil)
897896
}
898897

899898
/// The `<i>` HTML element represents a range of text that is set off from the
@@ -933,7 +932,7 @@ pub fn iframe(
933932
///
934933
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/img)
935934
pub fn img(class: Class, attributes: List(Attribute)) -> Component {
936-
styled("img", class, attributes, [])
935+
styled("img", class, attributes, Nil)
937936
}
938937

939938
/// The `<input>` HTML element is used to create interactive controls for
@@ -947,7 +946,7 @@ pub fn img(class: Class, attributes: List(Attribute)) -> Component {
947946
///
948947
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/input)
949948
pub fn input(class: Class, attributes: List(Attribute)) -> Component {
950-
styled("input", class, attributes, [])
949+
styled("input", class, attributes, Nil)
951950
}
952951

953952
/// The `<ins>` HTML element represents a range of text that has been added to
@@ -1531,7 +1530,7 @@ pub fn small(
15311530
///
15321531
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/source)
15331532
pub fn source(class: Class, attributes: List(Attribute)) -> Component {
1534-
styled("source", class, attributes, [])
1533+
styled("source", class, attributes, Nil)
15351534
}
15361535

15371536
/// The `<span>` HTML element is a generic inline container for phrasing content,
@@ -1789,7 +1788,7 @@ pub fn tr(
17891788
///
17901789
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/track)
17911790
pub fn track(class: Class, attributes: List(Attribute)) -> Component {
1792-
styled("track", class, attributes, [])
1791+
styled("track", class, attributes, Nil)
17931792
}
17941793

17951794
/// The `<u>` HTML element represents a span of inline text which should be
@@ -1866,5 +1865,5 @@ pub fn video(
18661865
///
18671866
/// [MDN Reference](https://developer.mozilla.org/docs/Web/HTML/Element/wbr)
18681867
pub fn wbr(class: Class, attributes: List(Attribute)) -> Component {
1869-
styled("wbr", class, attributes, [])
1868+
styled("wbr", class, attributes, Nil)
18701869
}

0 commit comments

Comments
 (0)