Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:52
8a1e987

Added

  • sirene ascii FILE.md prints each diagram block of a Markdown file, with diagnostics at
    positions in the file, instead of reading the whole file as one Mermaid diagram.
  • Mermaid class diagrams: link A "url", click A href "url", callback A "fn", and
    click A call fn(args) set the class's link or callback, with an optional tooltip.
  • Release tarballs are signed with zipsign (cargo xtask sign, cargo xtask gen-key --out DIR).

Changed

  • sirene update checks the release archive's signature against a key built into sirene,
    instead of running gh attestation verify when gh is installed. An unsigned or badly signed
    archive is refused. Releases still carry build provenance attestations.
  • The guide and specs document theme palettes, CLI limits, signing setup and key rotation,
    the pinned toolchain and workspace crates, and sequence numbering while it is off.

Fixed

  • cargo xtask sign uses an exclusively created temporary file, preserving existing files and
    symlink targets beside the archive and retaining the archive's permissions. The release
    workflow decodes its signing key with owner-only permissions.
  • CLI: images, -o files, and --link rewrites are written to an exclusively created temporary
    file and renamed into place, so a failed write keeps the old file and an existing temporary
    file is left alone; a symlinked output is replaced, not written through. Inputs and stdin
    over 64 MiB are refused.
  • The install script stages the binary before replacing it, so a failed copy keeps the old
    binary and a symlink's target is left alone. A directory at the install path is refused.
  • PlantUML YAML: escaped double quotes and doubled single quotes keep #, commas, and colons
    inside the quoted value instead of reading them as comments or separators. An apostrophe in
    plain text (don't) no longer hides a comment or merges flow-array items.
  • Markdown: replacing an unclosed block at the end of a text with empty code no longer panics.
  • PlantUML timing: at most 100 clocks, the rest left out with an error; each state label is
    measured once. Cynefin: many quoted items on one line are read in linear time.
  • Flowchart: at most 100000 edges; a & product past that is left out with one error. Long
    labels, runs of < or &, and many classDef, class and style lines are read in near
    linear time.
  • ASCII output: a wide character written over part of another clears the rest of it, one that
    does not fit is left out, and title and git label widths match the canvas.
  • Block diagrams: space cells past 100000 are left out with one error; unclosed strings and
    classDef lines are read in linear time. Mindmaps: unclosed markdown strings and @{ on many
    lines do not each rescan the rest. Git graphs: branches are looked up by name in constant time,
    and an order too large for a number is an error.
  • C4: boundaries are placed and UpdateRelStyle finds its relations in linear time. ER and
    requirement diagrams: classDef lines are read in linear time. ER: tabs around to and
    optionally to read the same as spaces.
  • SVG output: control characters XML does not allow are written as U+FFFD, and a NaN or infinite
    number as 0, so the file stays well-formed.
  • Layout: rank tightening visits only items next to one that moved and has a work cap, instead
    of sweeping every item until nothing moves; a min_len over 100 counts as 100.
  • Mermaid state diagrams: an unclosed << or [[ ends with its line instead of taking the
    lines up to a later >>.
  • Mermaid sequence, state, and class diagrams: participant, classDef, namespace, and region
    lookups no longer take quadratic time.
  • Desktop app: an export is written to a temporary file and renamed over the target; a file over
    64 MiB is not opened; a settings file that cannot be read is no longer overwritten with
    defaults; a NaN zoom is ignored.
  • PlantUML regex diagrams: a class nested in a class, as in [[:alpha:]], is read as one class,
    and { 2 } with spaces is literal text instead of a repeat, as in Java. Runs of unmatched
    literal { are read in linear time.
  • Mermaid ZenUML: else, catch, and finally may start the line after a branch's }; long
    diagrams no longer lower in quadratic time.
  • Mermaid use case diagrams: a JSON \u surrogate pair is one character, \u takes exactly four
    hex digits, and a JSON table whose rows would hold more than 16 MiB is an error.
  • Mermaid event modeling: a data block line indented with a no-break space keeps its text, and
    the ASCII relation arrows no longer take quadratic time per relation.
  • Mermaid venn diagrams: a union of more than 8 sets, and a size over 1e100, are errors instead
    of a slow layout or NaN geometry.
  • Mermaid Wardley maps: a stage @position outside 0 to 1 or out of order is an error instead
    of overflowing the ASCII drawing; a size outside 100 to 20000 keeps the default; a pipeline
    or evolve declared again keeps its place.
  • Mermaid kanban boards: a long ticket or assignee is cut short with ... instead of
    overlapping the other and the card's edge; in ASCII, a long word is broken to fit the card.
  • Mermaid railroad diagrams: a non-breaking or other Unicode space before an EBNF operator no
    longer panics, and more than 64 operators on one element are an error instead of a stack
    overflow.
  • Mermaid tree views: a huge rowIndent, paddingX, paddingY, or lineThickness is capped
    at 1000 instead of drawing at infinite size.
  • --link: a path with spaces or parentheses is linked as <...>, the link is indented as the
    fence (so it stays in a list item), and a link from an earlier run is replaced when a new block
    shifts the numbering instead of a second link being added. #, ?, %, and : in filenames
    are percent-encoded so the link reaches the image file.
  • Mermaid XY charts: values past the last category no longer stretch the value axis, and on a
    numeric x-axis each series spans the whole range by its own length, as in Mermaid.
  • Mermaid sankey diagrams: a value may have an exponent (1e3); a value over 1e30 is an error
    instead of drawing the chart with NaN geometry.
  • Markdown: diagram blocks inside blockquotes and list items (nested, ordered, or opened on the
    item's line) are found, and an info string may name the language in any case or in braces
    ({.mermaid}, {mermaid}, mermaid{...}). The editor writes a quoted block back with its
    > markers.
  • -o - writes the SVG or PNG to stdout instead of to a file named -.
  • Reading UTF-16 or other non-UTF-8 input fails with a message naming the problem instead of
    stream did not contain valid UTF-8.
  • A missing short file name such as pdf is no longer refused as a mistyped command.
  • Mermaid quadrant charts: x-axis Low --> with no high label draws Low ⟶, as in Mermaid.
  • Mermaid gantt charts: a huge duration is an error instead of overflowing, and excludes is
    not walked over a task longer than 1,000,000 days.
  • Mermaid timelines: a line starting with # is a comment, as in Mermaid, instead of a period.
  • Mermaid radar charts: radar-beta: is a header; options may share a line separated by ,;
    axis and curve ids may hold - and start with a digit; labels may use single quotes and \
    escapes; a title runs past # and ;.
  • Mermaid packet diagrams: labels may use single quotes and \ escapes; a title runs past #
    and ;.
  • Mermaid treemaps: a valueFormat width over 1000 is a warning instead of padding the value
    with that many characters.
  • Mermaid class diagrams: a class belongs to the namespace that declares it with class, even
    if mentioned earlier; relations and A : member lines inside a namespace are warnings and no
    longer pull classes into it.
  • Mermaid sequence diagrams: a box holds only participant/actor declarations, and
    declaring a participant in a second box is an error, as in Mermaid.
  • Mermaid git graphs: commit "message" (without msg:) is read as the message instead of
    dropping the commit.
  • Mermaid user journeys: # comment after a title, section, or task is skipped instead of an
    error.
  • Mermaid pie charts: a slice under 1% is left out and the others fill the circle, as in
    Mermaid, instead of leaving an empty gap.
  • C4 diagrams: UpdateRelStyle finds a Rel_Back by its from and to as written; a
    boundary's { may start the next line, as in Mermaid.
  • Mermaid requirement diagrams: a second definition of a name is a warning and skipped, as
    Mermaid keeps the first, instead of adding its fields to the first.
  • Mermaid architecture diagrams: when two items want the same side of a node, the second is
    placed beside the first instead of beyond it, and an edge turns in the gap between items
    instead of running through one.
  • Editor: a subgraph direction added in a CRLF file keeps CRLF line endings.
  • Mermaid state diagrams: a %% comment may follow a statement or a closing };
    state X:::class (with or without {) sets the class; [[fork]], [[join]] and
    [[choice]] work like <<fork>>, and both forms ignore case. A trailing %% comment is
    also accepted in the other line-based Mermaid diagrams.
  • Mermaid sequence diagrams: non-ASCII text after note left, after participant metadata, or
    in a box title no longer panics; autonumber OFF ignores case.
  • Mermaid ER diagrams: non-ASCII text where a relationship may start no longer panics.
  • Mermaid class diagrams: a member's leading ~ (package visibility) is kept instead of read
    as a generic; a label from class A["Label"] is kept when a later mention has generics.
  • DOT: a repeated edge in a strict graph no longer takes the current edge [...] defaults
    over the first edge's own attributes; \G in a cluster label is the cluster's name;
    style=rounded on a cluster warns as it is not drawn; an edge to a reopened named
    subgraph reaches all its nodes; \\ before a line break and CRLF in a quoted string are
    read correctly; digraph "a" + "b" { is detected as DOT.
  • PlantUML sequence messages from a sender named like a participant keyword (Database --> Server), notes closed by end hnote or end rnote, and autoactivate on with return
    are read instead of erroring; frame and else labels drop leading #color words with a
    warning.
  • PlantUML unnamed containers (cloud {) and lollipop () link ends are read, and a quoted
    name with parentheses in a message ("Web (Chrome)" -> Server) no longer makes the
    document a use case diagram.
  • PlantUML activity if (c) is (red) then and elseif put the is label on the branch, and
    nodes before the first |Lane| join that lane.
  • PlantUML class bodies that open with a separator (.. getters ..) have no empty first
    compartment.
  • --charset ascii writes stereotypes as <<interface>> and <<include>> instead of
    «interface» in class, requirement, use case, and PlantUML diagrams.
  • PlantUML component interface sockets and balls ([A] -( I, I )- [A], -(0-) are read
    as links with a warning instead of errors, and a quoted element name may run over several
    lines up to its closing ".
  • sirene svg FILE.md -o DIR --link links images from the Markdown file's directory
    (../img/a-1.svg), not from the working directory.
  • sirene svg DIR and sirene png DIR find diagram files whatever the case of their extension
    (A.MMD), as single files already were.
  • --help, the crate descriptions, and the messages for Markdown files name PlantUML and DOT
    diagrams, not only Mermaid ones; a Markdown file with none prints no diagram blocks.
  • The editor's Save As of a PlantUML or DOT diagram to a Markdown file, and the block it adds
    to a Markdown file with none, use a plantuml or dot fence instead of mermaid.
  • The guide's introduction, quickstart, landing page, and the sirene:render skill describe
    PlantUML and DOT, and list every Mermaid kind drawn.
  • Editing a Markdown file's diagram in the editor: a fence typed in the code makes the block's
    fences longer instead of ending the block early, and the block added to a file ending in an
    open code block closes that block first, so later edits no longer add another block each.
  • The editor's Save As keeps the document's file when the write fails, asks before dropping a
    Markdown file's unsaved edits to save one block, and reads the diagram as the new file's
    language.
  • Diagnostic columns in Markdown blocks count each line's own indent when it is indented less
    than the fence.
  • --watch on a missing Markdown file reports it; --link keeps CRLF line endings; a
    directory named x.md is rendered as a directory; sirene check on a Markdown file with no
    diagram blocks says so.
  • Mermaid class diagrams read a relation with no space before the second class
    (Duck-->Egg, A --|>B), lollipop interfaces (A --() B, A ()-- B), class names in
    backticks, and nested generics (List~List~int~~ is List<List<int>>).
  • Mermaid sequence diagrams end a statement at ; (A->>B: hi; B->>A: yo), and read
    A->> +B as an activation of B.
  • Mermaid Gantt excludes and includes dates match as YYYY-MM-DD as well as in
    dateFormat, so they apply when the format holds a time.
  • Mermaid ER diagrams read o{, |{, and o| on the left of a relationship and }o, }|,
    and |o on the right.
  • A flowchart or state subgraph that an edge links to directly keeps its direction; only an
    edge to a node inside it drops the direction, as in Mermaid.
  • A flowchart or state edge between a subgraph or composite state and a node inside it warns
    that it is not drawn, instead of vanishing silently.
  • Flowchart labels decode all HTML 4 named entities (#copy;, &hearts;, &mdash;), draw
    <b>/<strong> and <i>/<em> as bold and italic, and drop other HTML tags such as <span>.
  • A flowchart @{ ... } body over several lines is read as Mermaid reads it, a YAML block
    mapping: commas are text (label: Hello, world), and | and > take the indented lines
    after them.
  • The guide says animate, animation, curve, and interpolate are parsed but not drawn,
    fa: icons stay as text, and shows rgb(255\,0\,0) with an escaped comma in style.
  • A flowchart edge label on an & product counts once per edge toward a 16 MiB budget, and
    classDef, class, and linkStyle lines naming many targets count toward a 64 MiB one;
    past them the rest is left out with a warning.
  • A flowchart element keeps at most 256 @{ ... } metadata keys, and subgraphs that list one
    another as members nest at most 65 deep, each with a warning.
  • Lines that open a directive, string, metadata body, or accDescr { without closing it no
    longer each rescan the rest of the source, in flowcharts and the other Mermaid parsers.
  • ASCII edges far outside the canvas are clipped to it before they are drawn.
  • Block diagram groups nest at most 8 deep (was 12), since each level doubles the sizing work.
  • sirene update compares versions by semver precedence, so build metadata no longer makes a
    release look newer, and --to refuses a version with +.
  • sirene update --check on a package-manager install names the update command also when the
    running build is newer than the latest release.
  • Rendering a directory on macOS or Windows no longer overwrites an output when two inputs
    differ only in case (A.mmd and a.mmd); the second is skipped with an error.
  • Release workflow: xtask is built before the signing key is decoded, and a re-run by hand
    refuses when main is no longer at the release's tag.
  • Mermaid flowcharts: shape data may follow a space (A @{ shape: circle },
    e1 @{ animate: true }); edge ids take any character Mermaid allows (A e:1@--> B); and
    id@{ ... } goes to a subgraph before an edge with the same id, as in Mermaid.
  • PlantUML state diagrams: [*] -up-> A draws a start state and A -left-> [*] an end state,
    instead of the other way around.
  • Mermaid sequence diagrams: autonumber keeps counting messages while numbering is off, and
    a bare autonumber continues from the current number and step instead of restarting at 1,
    as in Mermaid.
  • Mermaid class diagrams: a method's return type is drawn after : (+getAge() : int), as
    in Mermaid.
  • Mermaid ER diagrams: cardinality words, to, optionally to, and PK/FK/UK keys match
    in any case.
  • Mermaid gantt charts: an x or X timestamp out of range is an invalid date instead of
    overflowing.