Compare commits

..

1 Commits
dev ... main

Author SHA1 Message Date
19c60c5ecf Release 0.2.0
Reviewed-on: #5
2024-11-09 14:00:05 +00:00
5 changed files with 21 additions and 89 deletions

View File

@ -1,18 +1,5 @@
#import "example.typ": example #import "example.typ": example
#let seq-return = example(```
_seq(
"Bob", "Alice",
comment: [hello],
enable-dst: true
)
_seq(
"Alice", "Alice",
comment: [some action]
)
_ret(comment: [bye])
```)
#let seq-comm-align = example(``` #let seq-comm-align = example(```
_par("p1", display-name: "Start participant") _par("p1", display-name: "Start participant")
_par("p2", display-name: "End participant") _par("p2", display-name: "End participant")
@ -134,58 +121,15 @@ _sync({
}) })
```) ```)
#let gaps = example(``` #let gaps-seps = example(```
_par("a", display-name: "Alice") _par("alice", display-name: "Alice")
_par("b", display-name: "Bob") _par("bob", display-name: "Bob")
_seq("a", "b", comment: [message 1]) _seq("alice", "bob", comment: "Hello")
_seq("b", "a", comment: [ok], dashed: true) _gap(size: 10)
_gap() _seq("bob", "alice", comment: "Hi")
_seq("a", "b", comment: [message 2]) _sep("Another day")
_seq("b", "a", comment: [ok], dashed: true) _seq("alice", "bob", comment: "Hello again")
_gap(size: 40)
_seq("a", "b", comment: [message 3])
_seq("b", "a", comment: [ok], dashed: true)
```)
#let seps = example(```
_par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_sep[Initialization]
_seq("a", "b", comment: [Request 1])
_seq(
"b", "a",
comment: [Response 1],
dashed: true
)
_sep[Repetition]
_seq("a", "b", comment: [Request 2])
_seq(
"b", "a",
comment: [Response 2],
dashed: true
)
```)
#let delays = example(```
_par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_seq("a", "b", comment: [Auth Request])
_delay()
_seq(
"b", "a",
comment: [Auth Response],
dashed: true
)
_delay(name: [5 minutes later])
_seq(
"b", "a",
comment: [Good Bye !],
dashed: true
)
```) ```)
#let notes-shapes = example(``` #let notes-shapes = example(```

View File

@ -1,15 +1,8 @@
/// Creates a separator before the next element
/// #examples.seps
/// - name (content): Name to display in the middle of the separator
#let _sep(name) = {}
/// Creates a delay before the next element
/// #examples.delays
/// - name (content, none): Name to display in the middle of the delay area
/// - size (int): Size of the delay
#let _delay(name: none, size: 30) = {}
/// Creates a gap before the next element /// Creates a gap before the next element
/// #examples.gaps
/// - size (int): Size of the gap /// - size (int): Size of the gap
#let _gap(size: 20) = {} #let _gap(size: 20) = {}
/// Creates a separator before the next element
/// #examples.gaps-seps
/// - name (content): Name to display in the middle of the separator
#let _sep(name) = {}

View File

@ -42,17 +42,6 @@
slant: none slant: none
) = {} ) = {}
/// Creates a return sequence
/// #examples.seq-return
/// - comment (none, content): Optional comment to display along the arrow
#let _ret(comment: none) = {}
/// Accepted values for `comment-align` argument of @@_seq()
/// #examples.seq-comm-align
#let comment-align = (
"start", "end", "left", "center", "right"
)
/// Accepted values for `event` argument of @@_evt() /// Accepted values for `event` argument of @@_evt()
/// ///
/// `EVENTS = ("create", "destroy", "enable", "disable")` /// `EVENTS = ("create", "destroy", "enable", "disable")`
@ -63,3 +52,9 @@
#let tips = ( #let tips = (
"", ">", ">>", "\\", "\\\\", "/", "//", "x", "o", "", ">", ">>", "\\", "\\\\", "/", "//", "x", "o",
) )
/// Accepted values for `comment-align` argument of @@_seq()
/// #examples.seq-comm-align
#let comment-align = (
"start", "end", "left", "center", "right"
)

Binary file not shown.

View File

@ -197,7 +197,7 @@ chronos.diagram({
examples: examples examples: examples
) )
) )
#tidy.show-module(gap-sep-docs, show-outline: false, sort-functions: none) #tidy.show-module(gap-sep-docs, show-outline: false)
#pagebreak(weak: true) #pagebreak(weak: true)