Compare commits
	
		
			1 Commits
		
	
	
		
			2a46612bfb
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 6bf98ebcb8 | 
| @@ -15,7 +15,7 @@ This package lets you render sequence diagrams directly in Typst. The following | |||||||
| <td> | <td> | ||||||
|  |  | ||||||
| ```typst | ```typst | ||||||
| #import "@preview/chronos:0.2.2" | #import "@preview/chronos:0.2.1" | ||||||
| #chronos.diagram({ | #chronos.diagram({ | ||||||
|   import chronos: * |   import chronos: * | ||||||
|   _par("Alice") |   _par("Alice") | ||||||
|   | |||||||
| @@ -34,7 +34,6 @@ | |||||||
| /// - invisible (bool): If set to true, the participant will not be shown | /// - invisible (bool): If set to true, the participant will not be shown | ||||||
| /// - shape (str): The shape of the participant. Possible values in @@SHAPES | /// - shape (str): The shape of the participant. Possible values in @@SHAPES | ||||||
| /// - color (color): The participant's color | /// - 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 | /// - custom-image (none, image): If shape is 'custom', sets the custom image to display | ||||||
| /// - show-bottom (bool): Whether to display the bottom shape | /// - show-bottom (bool): Whether to display the bottom shape | ||||||
| /// - show-top (bool): Whether to display the top shape | /// - show-top (bool): Whether to display the top shape | ||||||
| @@ -46,11 +45,6 @@ | |||||||
|   invisible: false, |   invisible: false, | ||||||
|   shape: "participant", |   shape: "participant", | ||||||
|   color: rgb("#E2E2F0"), |   color: rgb("#E2E2F0"), | ||||||
|   line-stroke: ( |  | ||||||
|     dash: "dashed", |  | ||||||
|     paint: gray.darken(40%), |  | ||||||
|     thickness: .5pt |  | ||||||
|   ), |  | ||||||
|   custom-image: none, |   custom-image: none, | ||||||
|   show-bottom: true, |   show-bottom: true, | ||||||
|   show-top: true, |   show-top: true, | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								justfile
									
									
									
									
									
								
							
							
						
						| @@ -9,10 +9,4 @@ manual: | |||||||
|  |  | ||||||
| gallery: | gallery: | ||||||
|   for f in "{{gallery_dir}}"/*.typ; do typst c --root . "$f" "${f%typ}pdf"; done |   for f in "{{gallery_dir}}"/*.typ; do typst c --root . "$f" "${f%typ}pdf"; done | ||||||
|   for f in "{{gallery_dir}}"/readme/*.typ; do typst c --root . "$f" "${f%typ}png"; done |   for f in "{{gallery_dir}}"/readme/*.typ; do typst c --root . "$f" "${f%typ}png"; done | ||||||
|  |  | ||||||
| test *filter: |  | ||||||
|   tt run {{filter}} |  | ||||||
|  |  | ||||||
| update-test *filter: |  | ||||||
|   tt update {{filter}} |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								manual.pdf
									
									
									
									
									
								
							
							
						
						| @@ -71,7 +71,7 @@ $import | |||||||
|  |  | ||||||
| = Examples | = 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 | == 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 "diagram.typ": diagram, from-plantuml, _gap, _evt, _col | ||||||
|  |  | ||||||
| #import "sequence.typ": _seq, _ret | #import "sequence.typ": _seq, _ret | ||||||
|   | |||||||
| @@ -22,11 +22,6 @@ | |||||||
|   invisible: false, |   invisible: false, | ||||||
|   shape: "participant", |   shape: "participant", | ||||||
|   color: DEFAULT-COLOR, |   color: DEFAULT-COLOR, | ||||||
|   line-stroke: ( |  | ||||||
|     dash: "dashed", |  | ||||||
|     paint: gray.darken(40%), |  | ||||||
|     thickness: .5pt |  | ||||||
|   ), |  | ||||||
|   custom-image: none, |   custom-image: none, | ||||||
|   show-bottom: true, |   show-bottom: true, | ||||||
|   show-top: true, |   show-top: true, | ||||||
| @@ -42,7 +37,6 @@ | |||||||
|     invisible: invisible, |     invisible: invisible, | ||||||
|     shape: shape, |     shape: shape, | ||||||
|     color: color, |     color: color, | ||||||
|     line-stroke: line-stroke, |  | ||||||
|     custom-image: custom-image, |     custom-image: custom-image, | ||||||
|     show-bottom: show-bottom, |     show-bottom: show-bottom, | ||||||
|     show-top: show-top |     show-top: show-top | ||||||
|   | |||||||
| @@ -432,7 +432,11 @@ | |||||||
|             draw.line( |             draw.line( | ||||||
|               (x, last-y), |               (x, last-y), | ||||||
|               (x, line.at(1)), |               (x, line.at(1)), | ||||||
|               stroke: p.line-stroke |               stroke: ( | ||||||
|  |                 dash: "dashed", | ||||||
|  |                 paint: gray.darken(40%), | ||||||
|  |                 thickness: .5pt | ||||||
|  |               ) | ||||||
|             ) |             ) | ||||||
|           } |           } | ||||||
|           lines.push(line) |           lines.push(line) | ||||||
| @@ -458,7 +462,11 @@ | |||||||
|           draw.line( |           draw.line( | ||||||
|             (x, last-y), |             (x, last-y), | ||||||
|             (x, line.at(1)), |             (x, line.at(1)), | ||||||
|             stroke: p.line-stroke |             stroke: ( | ||||||
|  |               dash: "dashed", | ||||||
|  |               paint: gray.darken(40%), | ||||||
|  |               thickness: .5pt | ||||||
|  |             ) | ||||||
|           ) |           ) | ||||||
|           last-y = line.at(1) |           last-y = line.at(1) | ||||||
|         } else if event == "delay-end" { |         } else if event == "delay-end" { | ||||||
| @@ -478,7 +486,11 @@ | |||||||
|       draw.line( |       draw.line( | ||||||
|         (x, last-y), |         (x, last-y), | ||||||
|         (x, y), |         (x, y), | ||||||
|         stroke: p.line-stroke |         stroke: ( | ||||||
|  |           dash: "dashed", | ||||||
|  |           paint: gray.darken(40%), | ||||||
|  |           thickness: .5pt | ||||||
|  |         ) | ||||||
|       ) |       ) | ||||||
|  |  | ||||||
|       // Draw lifeline rectangles (reverse for bottom to top) |       // Draw lifeline rectangles (reverse for bottom to top) | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								tests/empty/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 105 B | 
| @@ -1,6 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({}) |  | ||||||
|  |  | ||||||
| #diagram(()) |  | ||||||
							
								
								
									
										4
									
								
								tests/note/color/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 33 KiB | 
| @@ -1,13 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _note("left", [This is displayed\ left of Alice.], pos: "a", color: rgb("#00FFFF")) |  | ||||||
|   _note("right", [This is displayed right of Alice.], pos: "a") |  | ||||||
|   _note("over", [This is displayed over Alice.], pos: "a") |  | ||||||
|   _note("over", [This is displayed\ over Bob and Alice.], pos: ("a", "b"), color: rgb("#FFAAAA")) |  | ||||||
|   _note("over", [This is yet another\ example of\ a long note.], pos: ("a", "b")) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/note/position/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 23 KiB | 
| Before Width: | Height: | Size: 13 KiB | 
| Before Width: | Height: | Size: 35 KiB | 
| @@ -1,49 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _seq("a", "b", comment: [hello]) |  | ||||||
|   _note("left", [this is a first note]) |  | ||||||
|  |  | ||||||
|   _seq("b", "a", comment: [ok]) |  | ||||||
|   _note("right", [this is another note]) |  | ||||||
|  |  | ||||||
|   _seq("b", "b", comment: [I am thinking]) |  | ||||||
|   _note("left", [a note\ can also be defined\ on several lines]) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| #pagebreak() |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _note("over", [initial state of Alice], pos: "a") |  | ||||||
|   _note("over", [initial state of Bob], pos: "b") |  | ||||||
|   _seq("b", "a", comment: [hello]) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| #pagebreak() |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|   _par("c", display-name: "Charlie") |  | ||||||
|   _par("d", display-name: "Donald") |  | ||||||
|   _par("e", display-name: "Eddie") |  | ||||||
|  |  | ||||||
|   _note("across", [This note float above all participants]) |  | ||||||
|  |  | ||||||
|   _note("over", [initial state of Alice], pos: "a") |  | ||||||
|   _note("over", [initial state of Bob the builder], pos: "b", aligned: true) |  | ||||||
|  |  | ||||||
|   _note("over", [Note 1], pos: "a") |  | ||||||
|   _note("over", [Note 2], pos: "b", aligned: true) |  | ||||||
|   _note("over", [Note 3], pos: "c", aligned: true) |  | ||||||
|  |  | ||||||
|   _seq("a", "d") |  | ||||||
|   _note("over", [this is an extremely long note], pos: ("d", "e")) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/note/shape/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 25 KiB | 
| @@ -1,14 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("caller") |  | ||||||
|   _par("server") |  | ||||||
|  |  | ||||||
|   _seq("caller", "server", comment: [conReq]) |  | ||||||
|   _note("over", [idle], pos: "caller", shape: "hex") |  | ||||||
|   _seq("server", "caller", comment: [conConf]) |  | ||||||
|   _note("over", ["r" as rectangle\ "h" as hexagon], pos: "server", shape: "rect") |  | ||||||
|   _note("over", [this is\ on several\ lines], pos: "server", shape: "rect") |  | ||||||
|   _note("over", [this is\ on several\ lines], pos: "caller", shape: "hex") |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/note/styled-body/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 50 KiB | 
| @@ -1,33 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: [Alice]) |  | ||||||
|   _par("b", display-name: [The *Famous* Bob]) |  | ||||||
|  |  | ||||||
|   _seq("a", "b", comment: [hello #strike([there])]) |  | ||||||
|  |  | ||||||
|   _gap() |  | ||||||
|   _seq("b", "a", comment: [ok]) |  | ||||||
|   _note("left", [ |  | ||||||
|     This is *bold*\ |  | ||||||
|     This is _italics_\ |  | ||||||
|     This is `monospaced`\ |  | ||||||
|     This is #strike([stroked])\ |  | ||||||
|     This is #underline([underlined])\ |  | ||||||
|     This is #underline([waved])\ |  | ||||||
|   ]) |  | ||||||
|  |  | ||||||
|   _seq("a", "b", comment: [A _well formatted_ message]) |  | ||||||
|   _note("right", [ |  | ||||||
|     This is #box(text([displayed], size: 18pt), fill: rgb("#5F9EA0"))\ |  | ||||||
|     #underline([left of]) Alice. |  | ||||||
|   ], pos: "a") |  | ||||||
|   _note("left", [ |  | ||||||
|     #underline([This], stroke: red) is #text([displayed], fill: rgb("#118888"))\ |  | ||||||
|     *#text([left of], fill: rgb("#800080")) #strike([Alice], stroke: red) Bob.* |  | ||||||
|   ], pos: "b") |  | ||||||
|   _note("over", [ |  | ||||||
|     #underline([This is hosted], stroke: rgb("#FF33FF")) by #box(baseline: 50%, image("/gallery/gitea.png", width: 1cm, height: 1cm, fit: "contain")) |  | ||||||
|   ], pos: ("a", "b")) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/participant/shapes/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 102 KiB | 
| @@ -1,21 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
|  |  | ||||||
| #let TYPST = image("/gallery/typst.png", width: 1.5cm, height: 1.5cm, fit: "contain") |  | ||||||
| #let FERRIS = image("/gallery/ferris.png", width: 1.5cm, height: 1.5cm, fit: "contain") |  | ||||||
| #let ME = image("/gallery/me.jpg", width: 1.5cm, height: 1.5cm, fit: "contain") |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("Foo", display-name: "Participant", shape: "participant") |  | ||||||
|   _par("Foo1", display-name: "Actor", shape: "actor") |  | ||||||
|   _par("Foo2", display-name: "Boundary", shape: "boundary") |  | ||||||
|   _par("Foo3", display-name: "Control", shape: "control") |  | ||||||
|   _par("Foo4", display-name: "Entity", shape: "entity") |  | ||||||
|   _par("Foo5", display-name: "Database", shape: "database") |  | ||||||
|   _par("Foo6", display-name: "Collections", shape: "collections") |  | ||||||
|   _par("Foo7", display-name: "Queue", shape: "queue") |  | ||||||
|   _par("Foo8", display-name: "Typst", shape: "custom", custom-image: TYPST) |  | ||||||
|   _par("Foo9", display-name: "Ferris", shape: "custom", custom-image: FERRIS) |  | ||||||
|   _par("Foo10", display-name: "Baryhobal", shape: "custom", custom-image: ME) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/sequence/comment-align/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 57 KiB | 
| Before Width: | Height: | Size: 28 KiB | 
| @@ -1,57 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("alice", display-name: "Alice") |  | ||||||
|   _par("bob", display-name: "Bob") |  | ||||||
|   _seq("alice", "bob", comment: "This is a very long comment") |  | ||||||
|  |  | ||||||
|   // Left to right |  | ||||||
|   _seq("alice", "bob", comment: "Start aligned", comment-align: "start") |  | ||||||
|   _seq("alice", "bob", comment: "End aligned", comment-align: "end") |  | ||||||
|   _seq("alice", "bob", comment: "Left aligned", comment-align: "left") |  | ||||||
|   _seq("alice", "bob", comment: "Right aligned", comment-align: "right") |  | ||||||
|   _seq("alice", "bob", comment: "Centered", comment-align: "center") |  | ||||||
|   _gap() |  | ||||||
|  |  | ||||||
|   // Right to left |  | ||||||
|   _seq("bob", "alice", comment: "Start aligned", comment-align: "start") |  | ||||||
|   _seq("bob", "alice", comment: "End aligned", comment-align: "end") |  | ||||||
|   _seq("bob", "alice", comment: "Left aligned", comment-align: "left") |  | ||||||
|   _seq("bob", "alice", comment: "Right aligned", comment-align: "right") |  | ||||||
|   _seq("bob", "alice", comment: "Centered", comment-align: "center") |  | ||||||
|   _gap() |  | ||||||
|  |  | ||||||
|   // Slant left to right |  | ||||||
|   _seq("alice", "bob", comment: "Start aligned", comment-align: "start", slant: 10) |  | ||||||
|   _seq("alice", "bob", comment: "End aligned", comment-align: "end", slant: 10) |  | ||||||
|   _seq("alice", "bob", comment: "Left aligned", comment-align: "left", slant: 10) |  | ||||||
|   _seq("alice", "bob", comment: "Right aligned", comment-align: "right", slant: 10) |  | ||||||
|   _seq("alice", "bob", comment: "Centered", comment-align: "center", slant: 10) |  | ||||||
|   _gap() |  | ||||||
|  |  | ||||||
|   // Slant right to left |  | ||||||
|   _seq("bob", "alice", comment: "Start aligned", comment-align: "start", slant: 10) |  | ||||||
|   _seq("bob", "alice", comment: "End aligned", comment-align: "end", slant: 10) |  | ||||||
|   _seq("bob", "alice", comment: "Left aligned", comment-align: "left", slant: 10) |  | ||||||
|   _seq("bob", "alice", comment: "Right aligned", comment-align: "right", slant: 10) |  | ||||||
|   _seq("bob", "alice", comment: "Centered", comment-align: "center", slant: 10) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| #pagebreak() |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("alice", display-name: "Alice") |  | ||||||
|  |  | ||||||
|   _seq("alice", "alice", comment: "Start aligned", comment-align: "start") |  | ||||||
|   _seq("alice", "alice", comment: "End aligned", comment-align: "end") |  | ||||||
|   _seq("alice", "alice", comment: "Left aligned", comment-align: "left") |  | ||||||
|   _seq("alice", "alice", comment: "Right aligned", comment-align: "right") |  | ||||||
|   _seq("alice", "alice", comment: "Centered", comment-align: "center") |  | ||||||
|  |  | ||||||
|   _seq("alice", "alice", comment: "Start aligned", comment-align: "start", flip: true) |  | ||||||
|   _seq("alice", "alice", comment: "End aligned", comment-align: "end", flip: true) |  | ||||||
|   _seq("alice", "alice", comment: "Left aligned", comment-align: "left", flip: true) |  | ||||||
|   _seq("alice", "alice", comment: "Right aligned", comment-align: "right", flip: true) |  | ||||||
|   _seq("alice", "alice", comment: "Centered", comment-align: "center", flip: true) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/sequence/special-par/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 29 KiB | 
| @@ -1,12 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _seq("?", "Alice", comment: [?->\ *short* to actor1]) |  | ||||||
|   _seq("[", "Alice", comment: [\[->\ *from start* to actor1]) |  | ||||||
|   _seq("[", "Bob", comment: [\[->\ *from start* to actor2]) |  | ||||||
|   _seq("?", "Bob", comment: [?->\ *short* to actor2]) |  | ||||||
|   _seq("Alice", "]", comment: [->\]\ from actor1 *to end*]) |  | ||||||
|   _seq("Alice", "?", comment: [->?\ *short* from actor1]) |  | ||||||
|   _seq("Alice", "Bob", comment: [->\ from actor1 to actor2]) |  | ||||||
| }) |  | ||||||
							
								
								
									
										4
									
								
								tests/sequence/tips/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,4 +0,0 @@ | |||||||
| # generated by tytanic, do not edit |  | ||||||
|  |  | ||||||
| diff/** |  | ||||||
| out/** |  | ||||||
| Before Width: | Height: | Size: 24 KiB | 
| Before Width: | Height: | Size: 24 KiB | 
| Before Width: | Height: | Size: 26 KiB | 
| @@ -1,84 +0,0 @@ | |||||||
| #set page(width: auto, height: auto) |  | ||||||
| #import "/src/lib.typ": * |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _seq("a", "b", end-tip: ">", comment: `->`) |  | ||||||
|   _seq("a", "b", end-tip: ">>", comment: `->>`) |  | ||||||
|   _seq("a", "b", end-tip: "\\", comment: `-\`) |  | ||||||
|   _seq("a", "b", end-tip: "\\\\", comment: `-\\`) |  | ||||||
|   _seq("a", "b", end-tip: "/", comment: `-/`) |  | ||||||
|   _seq("a", "b", end-tip: "//", comment: `-//`) |  | ||||||
|   _seq("a", "b", end-tip: "x", comment: `->x`) |  | ||||||
|   _seq("a", "b", start-tip: "x", comment: `x->`) |  | ||||||
|   _seq("a", "b", start-tip: "o", comment: `o->`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", ">"), comment: `->o`) |  | ||||||
|   _seq("a", "b", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`) |  | ||||||
|   _seq("a", "b", start-tip: ">", end-tip: ">", comment: `<->`) |  | ||||||
|   _seq("a", "b", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`) |  | ||||||
|   _seq("a", "b", start-tip: "x", end-tip: "x", comment: `x<->x`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", ">>"), comment: `->>o`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", "\\"), comment: `-\o`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", "\\\\"), comment: `-\\o`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", "/"), comment: `-/o`) |  | ||||||
|   _seq("a", "b", end-tip: ("o", "//"), comment: `-//o`) |  | ||||||
|   _seq("a", "b", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| #pagebreak() |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _seq("b", "a", end-tip: ">", comment: `->`) |  | ||||||
|   _seq("b", "a", end-tip: ">>", comment: `->>`) |  | ||||||
|   _seq("b", "a", end-tip: "\\", comment: `-\`) |  | ||||||
|   _seq("b", "a", end-tip: "\\\\", comment: `-\\`) |  | ||||||
|   _seq("b", "a", end-tip: "/", comment: `-/`) |  | ||||||
|   _seq("b", "a", end-tip: "//", comment: `-//`) |  | ||||||
|   _seq("b", "a", end-tip: "x", comment: `->x`) |  | ||||||
|   _seq("b", "a", start-tip: "x", comment: `x->`) |  | ||||||
|   _seq("b", "a", start-tip: "o", comment: `o->`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", ">"), comment: `->o`) |  | ||||||
|   _seq("b", "a", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`) |  | ||||||
|   _seq("b", "a", start-tip: ">", end-tip: ">", comment: `<->`) |  | ||||||
|   _seq("b", "a", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`) |  | ||||||
|   _seq("b", "a", start-tip: "x", end-tip: "x", comment: `x<->x`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", ">>"), comment: `->>o`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", "\\"), comment: `-\o`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", "\\\\"), comment: `-\\o`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", "/"), comment: `-/o`) |  | ||||||
|   _seq("b", "a", end-tip: ("o", "//"), comment: `-//o`) |  | ||||||
|   _seq("b", "a", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| #pagebreak() |  | ||||||
|  |  | ||||||
| #diagram({ |  | ||||||
|   _par("a", display-name: "Alice") |  | ||||||
|   _par("b", display-name: "Bob") |  | ||||||
|  |  | ||||||
|   _seq("a", "a", end-tip: ">", comment: `->`) |  | ||||||
|   _seq("a", "a", end-tip: ">>", comment: `->>`) |  | ||||||
|   _seq("a", "a", end-tip: "\\", comment: `-\`) |  | ||||||
|   _seq("a", "a", end-tip: "\\\\", comment: `-\\`) |  | ||||||
|   _seq("a", "a", end-tip: "/", comment: `-/`) |  | ||||||
|   _seq("a", "a", end-tip: "//", comment: `-//`) |  | ||||||
|   _seq("a", "a", end-tip: "x", comment: `->x`) |  | ||||||
|   _seq("a", "a", start-tip: "x", comment: `x->`) |  | ||||||
|   _seq("a", "a", start-tip: "o", comment: `o->`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", ">"), comment: `->o`) |  | ||||||
|   _seq("a", "a", start-tip: "o", end-tip: ("o", ">"), comment: `o->o`) |  | ||||||
|   _seq("a", "a", start-tip: ">", end-tip: ">", comment: `<->`) |  | ||||||
|   _seq("a", "a", start-tip: ("o", ">"), end-tip: ("o", ">"), comment: `o<->o`) |  | ||||||
|   _seq("a", "a", start-tip: "x", end-tip: "x", comment: `x<->x`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", ">>"), comment: `->>o`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", "\\"), comment: `-\o`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", "\\\\"), comment: `-\\o`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", "/"), comment: `-/o`) |  | ||||||
|   _seq("a", "a", end-tip: ("o", "//"), comment: `-//o`) |  | ||||||
|   _seq("a", "a", start-tip: "x", end-tip: ("o", ">"), comment: `x->o`) |  | ||||||
| }) |  | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| [package] | [package] | ||||||
| name = "chronos" | name = "chronos" | ||||||
| version = "0.2.2" | version = "0.2.1" | ||||||
| compiler = "0.13.1" | compiler = "0.13.1" | ||||||
| repository = "https://git.kb28.ch/HEL/chronos" | repository = "https://git.kb28.ch/HEL/chronos" | ||||||
| entrypoint = "src/lib.typ" | entrypoint = "src/lib.typ" | ||||||
|   | |||||||