github mermaid-js/mermaid mermaid@12.1.0

latest releases: @mermaid-js/tiny@12.1.0, @mermaid-js/parser@2.0.1, @mermaid-js/layout-elk@1.0.1...
4 hours ago

Minor Changes

  • #8303 9140716 Thanks @filipsajdak! - feat: add the elk.orientFeedbackEdges option, enabled by default. With the ELK layout, an edge from a node that a subgraph feeds back into that subgraph is now routed downstream instead of around the subgraph. This changes the layout of existing ELK diagrams that contain such edges; set elk.orientFeedbackEdges: false to keep the previous routing.

  • #8250 fd4f5f2 Thanks @kartben! - feat: add a bitOrder option to packet diagrams. It defaults to ascending, which is the current
    behaviour, and descending mirrors every row so it reads from that row's highest bit down to its
    lowest. Fields are still declared lowest bit first and keep their width, so switching a diagram
    between the two conventions only means changing bitOrder.

Patch Changes

  • #8330 50c9e55 Thanks @ashishjain0512! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable lodash-es@4.17.23

  • #8259 4c90f5c Thanks @afonsojanu! - fix(sequence): allow whitespace between an actor name and its @{ ... } config object

    participant Bob@{ "type" : "database" } parsed fine, but adding a single space before the
    config object (participant Bob @{ "type" : "database" }) failed with a confusing parse error,
    even though the plain form without a config object tolerates trailing whitespace just fine.

  • #8339 c7fa1a5 Thanks @ashishjain0512! - fix: keep ELK class-diagram cardinalities off namespace frames

  • #8334 d67331d Thanks @ashishjain0512! - fix(class): place cardinality labels beside their relation ends on dagre's sides with ELK, centre dagre's end labels, and stop clipping their text

  • #8344 99a050b Thanks @pbrolin47! - fix: with the ELK layout, an edge label could sit up to 16px beside its edge instead of centred on it, when the edge's terminal jog was straightened after the label's position was computed. The label is now re-projected onto the straightened route

  • #8276 3101c7d Thanks @mir-ashiq! - fix(error): show the actual error message in the error diagram

    When a diagram fails to parse, the error diagram now draws the real error message below the
    "Syntax error in text" headline, wrapped to at most four lines. Hosts that only show the SVG
    (GitHub, GitLab, Obsidian, exported images) no longer hide what actually went wrong, e.g. that the
    flowchart edge limit was exceeded and maxEdges needs raising via mermaid.initialize.

  • #8296 aa29345 Thanks @pentaoa! - fix: preserve explicit source relations on event modeling reset frames

  • #8297 967bbde Thanks @pentaoa! - fix: reject duplicate event modeling frame IDs before rendering

  • #8337 147f343 Thanks @knsv-bot! - fix: a flowchart that declares the same subgraph id more than once now renders as one merged subgraph with the ELK layout instead of producing NaN geometry. Classes and view: collapsed set on a repeated subgraph now apply to it, whichever declaration they follow.

  • #8203 40ef7b4 Thanks @MFA-G! - perf(frontmatter): replace the quadratic front matter regex on hot paths

    frontMatterRegex backtracks polynomially on whitespace-heavy input, so a
    diagram well inside the default maxTextSize could stall parsing for over a
    second. detectType and extractFrontMatter now use a linear scanner that
    matches the regex result exactly, leaving no document stripped differently.

  • #8254 351d7d2 Thanks @galshir! - fix: warn when a gantt task references an unknown after/until task id, or when its end value is neither a valid date nor a valid duration

  • #8249 b657a2c Thanks @mir-ashiq! - fix(sequence): allow hyphenated actor and participant names when a config object is attached

  • #8300 c38a565 Thanks @filipsajdak! - fix: A partial override of an object-valued theme variable such as xyChart, radar or cynefin keeps the values the theme generates for the keys it leaves out

  • #8333 8afd83c Thanks @ashishjain0512! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include lodash-es@4.17.23

  • #8285 859f1f8 Thanks @mir-ashiq! - fix(sequence): allow actor-menu keywords as participant ids in messages

    A participant declared as Link (or Links, Properties, Details) could not be used as a
    message endpoint: the lexer matched the name as the link statement keyword and the parse failed.
    The link, links, properties and details keywords are now only recognized when an actor
    follows them on the same line, so participant ids that happen to spell these words work in
    messages, while the statements themselves keep parsing as before.

  • #8282 b6d952d Thanks @belomaxorka! - fix(sequence): allow Link as a participant ID in messages and actor menus

    Preserve the ID's case and alias while keeping the link and links menu commands supported.

  • #8345 7917c1a Thanks @knsv-bot! - fix: xychart measures text in SVG units so legends no longer clip on wide charts scaled to fit their container, and the chart title is dropped instead of overflowing when the chart is too short for it

  • #8338 4a722fb Thanks @ashishjain0512! - fix: Centre the xychart title over the plot area instead of the whole chart

  • Updated dependencies [8afd83c]:

    • @mermaid-js/parser@2.0.1

Don't miss a new mermaid release

NewReleases is sending notifications on new releases.