diff --git a/gallery/example1.pdf b/gallery/example1.pdf index 1042c9a..a6dabb5 100644 Binary files a/gallery/example1.pdf and b/gallery/example1.pdf differ diff --git a/gallery/example2.pdf b/gallery/example2.pdf index 69a5943..7237a62 100644 Binary files a/gallery/example2.pdf and b/gallery/example2.pdf differ diff --git a/gallery/example3.pdf b/gallery/example3.pdf new file mode 100644 index 0000000..b2864d8 Binary files /dev/null and b/gallery/example3.pdf differ diff --git a/gallery/example3.typ b/gallery/example3.typ new file mode 100644 index 0000000..65014ff --- /dev/null +++ b/gallery/example3.typ @@ -0,0 +1,108 @@ +#import "/src/lib.typ" as chronos + +#set page(width: auto, height: auto) + +#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") + +#chronos.diagram({ + import chronos: * + _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) + + _seq("Foo", "Foo1", comment: "To actor") + _seq("Foo", "Foo2", comment: "To boundary") + _seq("Foo", "Foo3", comment: "To control") + _seq("Foo", "Foo4", comment: "To entity") + _seq("Foo", "Foo5", comment: "To database") + _seq("Foo", "Foo6", comment: "To collections") + _seq("Foo", "Foo7", comment: "To queue") + _seq("Foo", "Foo8", comment: "To Typst") + _seq("Foo", "Foo9", comment: "To ferris") + _seq("Foo", "Foo10", comment: "To Baryhobal") +}) + +#pagebreak() +#chronos.diagram({ + import chronos: * + _par("me", display-name: "Me", shape: "custom", custom-image: ME) + _par("typst", display-name: "Typst", shape: "custom", custom-image: TYPST) + _par("rust", display-name: "Rust", shape: "custom", custom-image: FERRIS) + + _seq("me", "typst", comment: "opens document", enable-dst: true) + _seq("me", "typst", comment: "types document") + _seq("typst", "rust", comment: "compiles content", enable-dst: true) + _seq("rust", "typst", comment: "renders document", disable-src: true) + _seq("typst", "me", comment: "displays document") + _evt("typst", "disable") +}) + +#pagebreak() + +#stack(dir: ltr, spacing: 1em, +chronos.diagram({ + import chronos: * + + _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`) +}), + +chronos.diagram({ + import chronos: * + + _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`) +}) +) \ No newline at end of file diff --git a/gallery/ferris.png b/gallery/ferris.png new file mode 100644 index 0000000..e7b9578 Binary files /dev/null and b/gallery/ferris.png differ diff --git a/gallery/me.jpg b/gallery/me.jpg new file mode 100644 index 0000000..ccf8d07 Binary files /dev/null and b/gallery/me.jpg differ diff --git a/gallery/typst.png b/gallery/typst.png new file mode 100644 index 0000000..40613e7 Binary files /dev/null and b/gallery/typst.png differ