diff --git a/tests/note/color/.gitignore b/tests/note/color/.gitignore new file mode 100644 index 0000000..40223be --- /dev/null +++ b/tests/note/color/.gitignore @@ -0,0 +1,4 @@ +# generated by tytanic, do not edit + +diff/** +out/** diff --git a/tests/note/color/ref/1.png b/tests/note/color/ref/1.png new file mode 100644 index 0000000..b9d0ed4 Binary files /dev/null and b/tests/note/color/ref/1.png differ diff --git a/tests/note/color/test.typ b/tests/note/color/test.typ new file mode 100644 index 0000000..bf051c5 --- /dev/null +++ b/tests/note/color/test.typ @@ -0,0 +1,13 @@ +#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")) +}) \ No newline at end of file diff --git a/tests/note/position/.gitignore b/tests/note/position/.gitignore new file mode 100644 index 0000000..40223be --- /dev/null +++ b/tests/note/position/.gitignore @@ -0,0 +1,4 @@ +# generated by tytanic, do not edit + +diff/** +out/** diff --git a/tests/note/position/ref/1.png b/tests/note/position/ref/1.png new file mode 100644 index 0000000..4ac364d Binary files /dev/null and b/tests/note/position/ref/1.png differ diff --git a/tests/note/position/ref/2.png b/tests/note/position/ref/2.png new file mode 100644 index 0000000..fb6618c Binary files /dev/null and b/tests/note/position/ref/2.png differ diff --git a/tests/note/position/ref/3.png b/tests/note/position/ref/3.png new file mode 100644 index 0000000..06d4a60 Binary files /dev/null and b/tests/note/position/ref/3.png differ diff --git a/tests/note/position/test.typ b/tests/note/position/test.typ new file mode 100644 index 0000000..4fef1cd --- /dev/null +++ b/tests/note/position/test.typ @@ -0,0 +1,49 @@ +#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")) +}) \ No newline at end of file diff --git a/tests/note/shape/.gitignore b/tests/note/shape/.gitignore new file mode 100644 index 0000000..40223be --- /dev/null +++ b/tests/note/shape/.gitignore @@ -0,0 +1,4 @@ +# generated by tytanic, do not edit + +diff/** +out/** diff --git a/tests/note/shape/ref/1.png b/tests/note/shape/ref/1.png new file mode 100644 index 0000000..e9bff45 Binary files /dev/null and b/tests/note/shape/ref/1.png differ diff --git a/tests/note/shape/test.typ b/tests/note/shape/test.typ new file mode 100644 index 0000000..c14131d --- /dev/null +++ b/tests/note/shape/test.typ @@ -0,0 +1,14 @@ +#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") +}) \ No newline at end of file diff --git a/tests/note/styled-body/.gitignore b/tests/note/styled-body/.gitignore new file mode 100644 index 0000000..40223be --- /dev/null +++ b/tests/note/styled-body/.gitignore @@ -0,0 +1,4 @@ +# generated by tytanic, do not edit + +diff/** +out/** diff --git a/tests/note/styled-body/ref/1.png b/tests/note/styled-body/ref/1.png new file mode 100644 index 0000000..49b7d78 Binary files /dev/null and b/tests/note/styled-body/ref/1.png differ diff --git a/tests/note/styled-body/test.typ b/tests/note/styled-body/test.typ new file mode 100644 index 0000000..419a36c --- /dev/null +++ b/tests/note/styled-body/test.typ @@ -0,0 +1,33 @@ +#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")) +}) \ No newline at end of file diff --git a/tests/participant/shapes/ferris.png b/tests/participant/shapes/ferris.png deleted file mode 100644 index e7b9578..0000000 Binary files a/tests/participant/shapes/ferris.png and /dev/null differ diff --git a/tests/participant/shapes/gitea.png b/tests/participant/shapes/gitea.png deleted file mode 100644 index 7d2874c..0000000 Binary files a/tests/participant/shapes/gitea.png and /dev/null differ diff --git a/tests/participant/shapes/me.jpg b/tests/participant/shapes/me.jpg deleted file mode 100644 index ccf8d07..0000000 Binary files a/tests/participant/shapes/me.jpg and /dev/null differ diff --git a/tests/participant/shapes/test.typ b/tests/participant/shapes/test.typ index 0515acf..c130cdf 100644 --- a/tests/participant/shapes/test.typ +++ b/tests/participant/shapes/test.typ @@ -2,9 +2,9 @@ #import "/src/lib.typ": * -#let TYPST = image("typst.png", width: 1.5cm, height: 1.5cm, fit: "contain") -#let FERRIS = image("ferris.png", width: 1.5cm, height: 1.5cm, fit: "contain") -#let ME = image("me.jpg", width: 1.5cm, height: 1.5cm, fit: "contain") +#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") diff --git a/tests/participant/shapes/typst.png b/tests/participant/shapes/typst.png deleted file mode 100644 index 40613e7..0000000 Binary files a/tests/participant/shapes/typst.png and /dev/null differ