mermaid.sequence

index · mermaid

Overview

A sequence diagram, from its statements to a frame: the parser, then the layout.

Submodules

ModuleDescription
mermaid.sequence.layoutThe sequence diagram layout: a script in, a frame out.
mermaid.sequence.parserThe sequence diagram parser: statements in, a script out.

Functions

NameSignature
parseparse(statements, header) -> script, err
layoutlayout(script, compact) -> frame

parse(statements, header) -> script, err

Parse a sequence diagram's statements into a script

statements is what mermaid.source.statements returns; header is not read. The script is mermaid.sequence.parser.parse's, and layout takes it.

layout(script, compact) -> frame

Lay a sequence diagram out into a frame

script is what parse returns. With compact the participants stand closer and the texts wrap narrower.

The layout writes its sizes into the script's participants and events. Each layout writes every one anew, so a script may be laid out again.