Repository navigation
fix(sequence): allow Link as a participant ID - #8282
Conversation
🦋 Changeset detectedLatest commit: b6d952d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe sequence parser now accepts ChangesSequence participant identifiers
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8282 +/- ##
===========================================
- Coverage 80.73% 78.60% -2.14%
===========================================
Files 619 619
Lines 84970 84970
Branches 18596 16011 -2585
===========================================
- Hits 68601 66787 -1814
- Misses 15350 17285 +1935
+ Partials 1019 898 -121
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
knsv-bot
left a comment
There was a problem hiding this comment.
[sisyphus-bot]
Thanks for this fix, @belomaxorka — and for the unusually thorough PR description and the linked issue's reproduction table. This is a small, surgical change and it is exactly the right shape: the link token is accepted in the actor production, the lexer and the link/links command productions are untouched, and Jison confirms zero grammar conflicts.
I applied the diff locally and verified: all 157 sequence unit tests pass, pnpm lint:jison is clean, and Link now works in every position that goes through actor — messages, the +/- activation shorthand, Note over A,Link, activate/deactivate/destroy, and link/links menu targets. Regular actor menus on other participants still work.
What's working well
- 🎉 [praise] Minimal blast radius. Adding one alternative to
actor(sequenceDiagram.jison:380-383) fixes every downstream production at once without touching the lexer, so there is no risk to existinglink A: Label @ urldiagrams. - 🎉 [praise] The tests are well chosen:
it.eachoverLink/link/LINKcovers the case-insensitive lexer, the alias case asserts thedescriptionsurvives, the implicit-endpoint case coversLinkat the start of a line, and the actor-menu case proves the keyword and the actor id coexist on the same line (link Link: ...). - 🎉 [praise] Changeset is present, correctly scoped as
patch, and clearly worded.
Things to consider (none blocking)
- 💡 [suggestion] The sibling keywords have the identical problem.
participant Links/A->>Links: mfails withExpecting 'link', '+', '-', '()', 'ACTOR', got 'links', and the same holds forPropertiesandDetails. I tried adding'links','properties'and'details'as further alternatives toactorlocally: Jison still reports zero conflicts and the full sequence spec passes. If you are up for it, extending the fix in this PR (with the sameit.eachpattern) would close the whole family; if you would rather keep this PR scoped to #8280 as filed, that is completely fine and a follow-up issue would be welcome instead. - 🟢 [nit] Now that
linkis reachable as an actor id from the initial lexer state, a single negative test asserting thatlink link: X @ javascript:alert(1)still ends up neutralised bysanitizeUrlwould pin that guarantee. Optional — the sanitization path is unchanged by this PR (see below).
Security
No XSS or injection issues identified. The new alternative passes the token's yytext, which for the "link" lexer rule can only be link/Link/LINK — strictly narrower than what ACTOR already accepts, so no new characters reach addParticipant. Actor-menu labels and URLs still go through sanitizeText in sequenceDb.ts and sanitizeUrl before being set as xlink:href in svgDraw.js; actor labels are rendered via .text(), not .html(). No DOMPurify configuration is touched.
Verdict
Approving. This is ready to merge as-is; the suggestion above is purely optional.
|
@belomaxorka, Thank you for the contribution! |
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
Upstream release: https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.1.0 Release notes: ### Minor Changes - [#8303](mermaid-js/mermaid#8303) [`9140716`](mermaid-js/mermaid@9140716) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8250) [`fd4f5f2`](mermaid-js/mermaid@fd4f5f2) Thanks [@kartben](https://github.com/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](mermaid-js/mermaid#8330) [`50c9e55`](mermaid-js/mermaid@50c9e55) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade chevrotain to 13 so mermaid no longer pulls in vulnerable `lodash-es@4.17.23` - [#8259](mermaid-js/mermaid#8259) [`4c90f5c`](mermaid-js/mermaid@4c90f5c) Thanks [@afonsojanu](https://github.com/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](mermaid-js/mermaid#8339) [`c7fa1a5`](mermaid-js/mermaid@c7fa1a5) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: keep ELK class-diagram cardinalities off namespace frames - [#8334](mermaid-js/mermaid#8334) [`d67331d`](mermaid-js/mermaid@d67331d) Thanks [@ashishjain0512](https://github.com/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](mermaid-js/mermaid#8344) [`99a050b`](mermaid-js/mermaid@99a050b) Thanks [@pbrolin47](https://github.com/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](mermaid-js/mermaid#8276) [`3101c7d`](mermaid-js/mermaid@3101c7d) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8296) [`aa29345`](mermaid-js/mermaid@aa29345) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: preserve explicit source relations on event modeling reset frames - [#8297](mermaid-js/mermaid#8297) [`967bbde`](mermaid-js/mermaid@967bbde) Thanks [@pentaoa](https://github.com/pentaoa)! - fix: reject duplicate event modeling frame IDs before rendering - [#8337](mermaid-js/mermaid#8337) [`147f343`](mermaid-js/mermaid@147f343) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8203) [`40ef7b4`](mermaid-js/mermaid@40ef7b4) Thanks [@MFA-G](https://github.com/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](mermaid-js/mermaid#8254) [`351d7d2`](mermaid-js/mermaid@351d7d2) Thanks [@galshir](https://github.com/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](mermaid-js/mermaid#8249) [`b657a2c`](mermaid-js/mermaid@b657a2c) Thanks [@mir-ashiq](https://github.com/mir-ashiq)! - fix(sequence): allow hyphenated actor and participant names when a config object is attached - [#8300](mermaid-js/mermaid#8300) [`c38a565`](mermaid-js/mermaid@c38a565) Thanks [@filipsajdak](https://github.com/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](mermaid-js/mermaid#8333) [`8afd83c`](mermaid-js/mermaid@8afd83c) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: upgrade the parser to langium 4.4 / chevrotain 13 so bundles no longer include `lodash-es@4.17.23` - [#8285](mermaid-js/mermaid#8285) [`859f1f8`](mermaid-js/mermaid@859f1f8) Thanks [@mir-ashiq](https://github.com/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](mermaid-js/mermaid#8282) [`b6d952d`](mermaid-js/mermaid@b6d952d) Thanks [@belomaxorka](https://github.com/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](mermaid-js/mermaid#8345) [`7917c1a`](mermaid-js/mermaid@7917c1a) Thanks [@knsv-bot](https://github.com/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](mermaid-js/mermaid#8338) [`4a722fb`](mermaid-js/mermaid@4a722fb) Thanks [@ashishjain0512](https://github.com/ashishjain0512)! - fix: Centre the xychart title over the plot area instead of the whole chart - Updated dependencies \[[`8afd83c`](mermaid-js/mermaid@8afd83c)]: - @mermaid-js/parser@2.0.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: give me a 98K <240642031+inhuman-0@users.noreply.github.com>
📑 Summary
participant Link as Channelparses, butA->>Link: messagefails withgot 'link'. AllowLink,link, andLINKas message endpoints and actor-menu targets, preserving their spelling and display aliases.Resolves #8280
📏 Design Decisions
Accept the existing
linktoken in theactorproduction. The lexer and thelink/linkscommand productions stay intact, so ordinary actor menus still work. Jison reports no grammar conflicts.Nine regression cases fail with the original grammar and pass with the fix. Local validation: 6521 unit tests with coverage, all 231 sequence tests,
pnpm lint, andpnpm build. All 44 existing sequence Chromium scenarios passed, including four rerun after dev-server startup failures/timeouts; 12 additional checks rendered the affected IDs in classic and neo looks.The out-of-tree tarball/TypeScript check also passed. Windows validation used four Vitest workers, LF shebangs, and an external CLI adapter that runs the original parser prepack once through Node. No unrelated source changes are included.
📋 Tasks
fix:patch changeset formermaid.Summary
Fixes sequence diagrams so participant IDs named
Link,link, orLINKcan be used as message endpoints and actor-menu targets.Changes
linktoken in theactorproduction.linkandlinksactor-menu commands unchanged.mermaid.Validation
The PR reports successful unit, sequence, lint, build, Chromium, TypeScript, and Windows validation.
No documentation changes were added.