diff --git a/README.md b/README.md
index 08ce598..1a0a031 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ This package lets you render sequence diagrams directly in Typst. The following
```typst
-#import "@preview/chronos:0.2.1"
+#import "@preview/chronos:0.2.2"
#chronos.diagram({
import chronos: *
_par("Alice")
diff --git a/docs/participants.typ b/docs/participants.typ
index 30db854..6610c0d 100644
--- a/docs/participants.typ
+++ b/docs/participants.typ
@@ -34,6 +34,7 @@
/// - invisible (bool): If set to true, the participant will not be shown
/// - shape (str): The shape of the participant. Possible values in @@SHAPES
/// - color (color): The participant's color
+/// - line-stroke (stroke): The participant's line style (defaults to a light gray dashed line)
/// - custom-image (none, image): If shape is 'custom', sets the custom image to display
/// - show-bottom (bool): Whether to display the bottom shape
/// - show-top (bool): Whether to display the top shape
@@ -45,6 +46,11 @@
invisible: false,
shape: "participant",
color: rgb("#E2E2F0"),
+ line-stroke: (
+ dash: "dashed",
+ paint: gray.darken(40%),
+ thickness: .5pt
+ ),
custom-image: none,
show-bottom: true,
show-top: true,
diff --git a/manual.pdf b/manual.pdf
index b3a1bf0..2875d03 100644
Binary files a/manual.pdf and b/manual.pdf differ
diff --git a/manual.typ b/manual.typ
index 65dc6e5..2876163 100644
--- a/manual.typ
+++ b/manual.typ
@@ -71,7 +71,7 @@ $import
= Examples
-You can find the following examples and more in the #link("https://git.kb28.ch/HEL/circuiteria/src/branch/main/gallery")[gallery] directory
+You can find the following examples and more in the #link("https://git.kb28.ch/HEL/chronos/src/branch/main/gallery")[gallery] directory
== Some groups and sequences
diff --git a/src/cetz.typ b/src/cetz.typ
new file mode 100644
index 0000000..980a619
--- /dev/null
+++ b/src/cetz.typ
@@ -0,0 +1 @@
+#import "@preview/cetz:0.3.4": *
\ No newline at end of file
diff --git a/src/lib.typ b/src/lib.typ
index 2575674..ccae827 100644
--- a/src/lib.typ
+++ b/src/lib.typ
@@ -1,4 +1,4 @@
-#let version = version(0, 2, 1)
+#let version = version(0, 2, 2)
#import "diagram.typ": diagram, from-plantuml, _gap, _evt, _col
#import "sequence.typ": _seq, _ret
diff --git a/src/participant.typ b/src/participant.typ
index a9e5572..aa38c37 100644
--- a/src/participant.typ
+++ b/src/participant.typ
@@ -22,6 +22,11 @@
invisible: false,
shape: "participant",
color: DEFAULT-COLOR,
+ line-stroke: (
+ dash: "dashed",
+ paint: gray.darken(40%),
+ thickness: .5pt
+ ),
custom-image: none,
show-bottom: true,
show-top: true,
@@ -37,6 +42,7 @@
invisible: invisible,
shape: shape,
color: color,
+ line-stroke: line-stroke,
custom-image: custom-image,
show-bottom: show-bottom,
show-top: show-top
diff --git a/src/renderer.typ b/src/renderer.typ
index 4f70d02..205ca58 100644
--- a/src/renderer.typ
+++ b/src/renderer.typ
@@ -432,11 +432,7 @@
draw.line(
(x, last-y),
(x, line.at(1)),
- stroke: (
- dash: "dashed",
- paint: gray.darken(40%),
- thickness: .5pt
- )
+ stroke: p.line-stroke
)
}
lines.push(line)
@@ -462,11 +458,7 @@
draw.line(
(x, last-y),
(x, line.at(1)),
- stroke: (
- dash: "dashed",
- paint: gray.darken(40%),
- thickness: .5pt
- )
+ stroke: p.line-stroke
)
last-y = line.at(1)
} else if event == "delay-end" {
@@ -486,11 +478,7 @@
draw.line(
(x, last-y),
(x, y),
- stroke: (
- dash: "dashed",
- paint: gray.darken(40%),
- thickness: .5pt
- )
+ stroke: p.line-stroke
)
// Draw lifeline rectangles (reverse for bottom to top)
diff --git a/typst.toml b/typst.toml
index 54d8602..efb749b 100644
--- a/typst.toml
+++ b/typst.toml
@@ -1,6 +1,6 @@
[package]
name = "chronos"
-version = "0.2.1"
+version = "0.2.2"
compiler = "0.13.1"
repository = "https://git.kb28.ch/HEL/chronos"
entrypoint = "src/lib.typ"
|