Compare commits
1 Commits
feat/10-pa
...
v0.2.1
Author | SHA1 | Date | |
---|---|---|---|
6bf98ebcb8 |
@ -15,7 +15,7 @@ This package lets you render sequence diagrams directly in Typst. The following
|
||||
<td>
|
||||
|
||||
```typst
|
||||
#import "@preview/chronos:0.2.2"
|
||||
#import "@preview/chronos:0.2.1"
|
||||
#chronos.diagram({
|
||||
import chronos: *
|
||||
_par("Alice")
|
||||
|
@ -34,7 +34,6 @@
|
||||
/// - 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
|
||||
@ -46,11 +45,6 @@
|
||||
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,
|
||||
|
BIN
manual.pdf
BIN
manual.pdf
Binary file not shown.
@ -71,7 +71,7 @@ $import
|
||||
|
||||
= Examples
|
||||
|
||||
You can find the following examples and more in the #link("https://git.kb28.ch/HEL/chronos/src/branch/main/gallery")[gallery] directory
|
||||
You can find the following examples and more in the #link("https://git.kb28.ch/HEL/circuiteria/src/branch/main/gallery")[gallery] directory
|
||||
|
||||
== Some groups and sequences
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
#import "@preview/cetz:0.3.4": *
|
@ -1,4 +1,4 @@
|
||||
#let version = version(0, 2, 2)
|
||||
#let version = version(0, 2, 1)
|
||||
#import "diagram.typ": diagram, from-plantuml, _gap, _evt, _col
|
||||
|
||||
#import "sequence.typ": _seq, _ret
|
||||
|
@ -22,11 +22,6 @@
|
||||
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,
|
||||
@ -42,7 +37,6 @@
|
||||
invisible: invisible,
|
||||
shape: shape,
|
||||
color: color,
|
||||
line-stroke: line-stroke,
|
||||
custom-image: custom-image,
|
||||
show-bottom: show-bottom,
|
||||
show-top: show-top
|
||||
|
@ -432,7 +432,11 @@
|
||||
draw.line(
|
||||
(x, last-y),
|
||||
(x, line.at(1)),
|
||||
stroke: p.line-stroke
|
||||
stroke: (
|
||||
dash: "dashed",
|
||||
paint: gray.darken(40%),
|
||||
thickness: .5pt
|
||||
)
|
||||
)
|
||||
}
|
||||
lines.push(line)
|
||||
@ -458,7 +462,11 @@
|
||||
draw.line(
|
||||
(x, last-y),
|
||||
(x, line.at(1)),
|
||||
stroke: p.line-stroke
|
||||
stroke: (
|
||||
dash: "dashed",
|
||||
paint: gray.darken(40%),
|
||||
thickness: .5pt
|
||||
)
|
||||
)
|
||||
last-y = line.at(1)
|
||||
} else if event == "delay-end" {
|
||||
@ -478,7 +486,11 @@
|
||||
draw.line(
|
||||
(x, last-y),
|
||||
(x, y),
|
||||
stroke: p.line-stroke
|
||||
stroke: (
|
||||
dash: "dashed",
|
||||
paint: gray.darken(40%),
|
||||
thickness: .5pt
|
||||
)
|
||||
)
|
||||
|
||||
// Draw lifeline rectangles (reverse for bottom to top)
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "chronos"
|
||||
version = "0.2.2"
|
||||
version = "0.2.1"
|
||||
compiler = "0.13.1"
|
||||
repository = "https://git.kb28.ch/HEL/chronos"
|
||||
entrypoint = "src/lib.typ"
|
||||
|
Reference in New Issue
Block a user