2815 Commits

Author SHA1 Message Date
kimulaco 91b9f01e8f docs(wardley): fix component label offset order in "Complete Example" (#7769)
Fixes: https://github.com/mermaid-js/mermaid/pull/7769
Fixes: https://github.com/mermaid-js/mermaid/issues/7768
2026-05-23 03:19:46 +09:00
Sualeh Fatehi 47245613bb docs: Add SchemaCrawler integration for Mermaid diagrams (#7660)
Fixes: https://github.com/mermaid-js/mermaid/pull/7660
2026-05-23 02:49:16 +09:00
pbrolin47 46e8044f20 Merge pull request #7708 from txmxthy/feature/6817_architecture-align-directive-pr2
feat(architecture): add 'align row|column' directive for declarative layout
2026-05-21 11:20:14 +00:00
Sidharth Vinod ba9a9a868e docs: Remove dead links from ecosystem pages
Both URLs return 404:
- gitbook-plugin-mermaid-pdf (GitBook integrations list)
- databutton.com demo link in the Elle Neal tutorial entry

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 01:23:49 +05:30
Knut Sveidqvist 98a494da48 Merge pull request #7672 from sjackson0109/fix/4648-directions
fix(flowchart): respect per-subgraph direction keyword in Dagre layout
2026-05-19 13:30:00 +00:00
Aashlesha Jadhav cb6df173a4 Merge pull request #7749 from Aashleshaj/patch-1
Fix wardley.md map examples in docs
2026-05-18 19:43:11 +09:00
Timothy d6b5acfdee docs: pick the natural axis for the 3-feeds-1 case (column for R/L edges, row for T/B)
`align row` for three databases that all connect `R --> L:mcp` linearises them into
a chain pointing into MCP rather than producing the intended fan-in. The natural
fit for "three things feeding one downstream node" depends on the port pair:

- column when the edges share a horizontal port pair (e.g. R --> L) — siblings
  stack vertically with parallel horizontal arrows reaching the downstream node.
- row when the edges share a vertical port pair (e.g. B --> T) — siblings sit
  in a horizontal row with parallel vertical arrows fanning down.

Updated the docs example and the Cypress test to match this guidance.

Verified visually: arch-verify-column-row.png shows DB1/DB2/DB3 in a clean
vertical stack with three parallel arrows into MCP, and Source 1/2/3 in a clean
horizontal row with three parallel arrows fanning down into Processor.
2026-05-18 12:28:47 +12:00
Timothy 097ca049a8 docs: regenerate /docs after src/docs changes 2026-05-18 12:28:47 +12:00
Simon Jackson d619b19305 Merge branch 'develop' into fix/4648-directions 2026-05-12 17:25:42 +01:00
Ashish Jain ffa6c8574a Merge remote-tracking branch 'origin/develop' into bug/7729_architecture-seed
# Conflicts:
#	cypress/helpers/util.ts
2026-05-12 11:08:37 +00:00
Ashish Jain 633c261dad fix(architecture): make fcose layout deterministic via architecture.seed
The cytoscape-fcose layout calls Math.random() internally in its
constraint solver regardless of randomize:false, so the visual test
'should render a deterministic layout for a complex deeply-nested
diagram' failed on every CI run (and was disabled in #7728 pending
this fix).

Adds an `architecture.seed` config field (default 1) that temporarily
swaps Math.random for a mulberry32 seeded generator around the two
layout.run() invocations and restores it in a finally block. The
non-zero default makes every architecture diagram render with the same
layout on every render; setting `architecture.seed: 0` opts out of the
swap and restores the pre-fix non-deterministic behavior for callers
who want layout variety.

Re-enables the previously skipped cypress test, injects
`architecture.seed = 1` from the test helper alongside handDrawnSeed=1,
and adds a new test that exercises an explicit seed override.

Resolves #7729
2026-05-12 11:02:25 +00:00
Ashish Jain d2194c8423 fix(cynefin): make boundary waviness deterministic via cynefin.seed
The renderer seeded its mulberry32 PRNG from hashString(id) where the
SVG element id varies per render, so each render produced a different
wavy boundary and Argos visual tests failed on every run.

Adds a `cynefin.seed` config field (default 0 → existing per-id hashing
behavior; any non-zero value locks the waviness across renders).
Extracts a `resolveSeed(configuredSeed, id)` helper alongside the
existing PRNG primitives, hardened against non-finite inputs. The
cypress helper now injects `cynefin.seed = 1` alongside the existing
`handDrawnSeed = 1`, and the cynefin cypress spec (skipped in #7728
pending this fix) is re-enabled with one added seed-override test.

Resolves #7727
2026-05-12 09:32:32 +00:00
Ashish Jain df2c093219 Merge pull request #7721 from notionparallax/feature/treeview-box-drawing-input
feat: add box-drawing character input for treeView diagrams
2026-05-12 09:41:00 +02:00
pbrolin47 a9990da19f Merge pull request #7740 from mermaid-js/master
Merge back v11.15.0 to develop
2026-05-11 12:05:33 +00:00
Alois Klink 2671f5c44a docs: fix v11.15.0 release
Fixes abfb563e1 (Version Packages, 2026-05-11).

I'm not 100% sure why, but the automated changeset PR didn't run
`pnpm --filter mermaid run docs:release-version && pnpm --filter mermaid run docs:build`
correctly. I've run it again, and this one seems to have worked.

Fixes: abfb563e1d
2026-05-11 20:05:49 +09:00
github-actions[bot] abfb563e1d Version Packages 2026-05-11 10:42:50 +00:00
Simon Jackson e3a3344d24 Merge branch 'develop' into fix/4648-directions 2026-05-07 17:50:43 +01:00
autofix-ci[bot] 4f05e821b0 [autofix.ci] apply automated fixes 2026-05-07 12:27:15 +00:00
Alois Klink 883d4dca9f Merge commit from fork
fix: create CSS styles using the CSSOM
2026-05-07 21:26:17 +09:00
autofix-ci[bot] 8c3f4594f6 [autofix.ci] apply automated fixes 2026-05-07 09:22:06 +00:00
ydah 33941a8c1d Fix Langium type narrowing in railroad parser and update docs
Add explicit type assertions for RailroadPrimary/RailroadPostfix
subtypes since Langium-generated base interfaces do not include
subtype-specific properties. Also remove the orientation limitation
note from docs since the config option has been removed.
2026-05-07 17:30:10 +09:00
ydah b9d9bf6951 Document railroad limitations and drop generated docs 2026-05-07 17:27:46 +09:00
ydah 373a5e3a1f Add railroad diagram documentation and fix formatting issues 2026-05-07 17:25:49 +09:00
autofix-ci[bot] 914c96abff [autofix.ci] apply automated fixes 2026-05-07 01:27:03 +00:00
Knut Sveidqvist 98b3155bd1 Merge pull request #7707 from txmxthy/feature/6024_architecture-fcose-config
feat(architecture): expose fcose layout knobs via config
2026-05-06 09:01:51 +00:00
Leo Mata 48d65d0a47 Merge branch 'develop' into feature/cynefin-diagram 2026-05-05 12:28:51 -06:00
Timothy 959207961c refactor: drop misleading 3-DB→MCP knob snapshots; rewrite docs example
The 3-DB → MCP repro from #6120 cannot be fixed by any combination of these knobs
(measured: DB1 and DB3 land at identical screen coordinates regardless of
nodeSeparation / idealEdgeLengthMultiplier / edgeElasticity / numIter values),
because the BFS spatial map collapses sibling nodes onto the same logical position
before fcose ever runs. Including those snapshots in the test suite would ship
visibly-broken renders as 'passing' and overstate what this PR fixes.

Replaced with a 3-node chain that demonstrates idealEdgeLengthMultiplier visibly
stretching same-group edge length — an honest demonstration of one knob's effect.
Other knobs are covered by unit tests for config plumbing.

Updated the docs example to use the same chain diagram and added an explicit
note that the knobs do not fix #6120-style sibling collapse — that needs the
declarative align row|column directive in the companion PR.
2026-05-05 14:19:21 +12:00
Timothy 9f93d10119 docs: tidy redundant 'options expose options' phrasing 2026-05-05 13:53:25 +12:00
autofix-ci[bot] 793799eeff [autofix.ci] apply automated fixes 2026-05-05 01:49:08 +00:00
Ashish Jain eeb585dac4 Merge pull request #7527 from notionparallax/feature/treeview-filetree-enhancements
feat(treeView): enhance treeView-beta with icons, bare labels, annotations & highlights
2026-05-04 12:48:35 +02:00
autofix-ci[bot] d20bf50e7f [autofix.ci] apply automated fixes 2026-05-02 03:46:11 +00:00
Knut Sveidqvist 7871c55bac Merge branch 'develop' into feature/cynefin-diagram 2026-04-29 07:54:18 +02:00
Ashish Jain 0c7df290a1 Merge pull request #7642 from tractorjuice/fix/wardley-hyphenated-names
fix(wardley): allow hyphens in unquoted component names
2026-04-28 10:20:37 +02:00
ragelink 0323b90522 refactor(cynefin): rename registered id and config key to 'cynefin'
Aligns Cynefin with the radar diagram convention so that the diagram's
internal identity matches the rest of the codebase. Previously cynefin
diverged: the registered detector id and config key were 'cynefin-beta',
which forced bracket-access (DEFAULT_CONFIG['cynefin-beta']) — the only
such case in defaultConfig.ts. Radar by contrast uses id 'radar' / config
key 'radar' with the '-beta' marker living only in the syntax keyword.

Changes:
- Detector id: 'cynefin-beta' -> 'cynefin'
- Config schema key (cynefin-beta -> cynefin) in config.schema.yaml,
  defaultConfig.ts, .build/jsonSchema.ts, and the regenerated
  config.type.ts
- Example id back to 'cynefin' (matches the registered diagram id)
- Test/spec config-object keys updated (multi-diagram uniqueness spec,
  cypress cynefin spec)
- Docs source updates for the config-key references; generated docs
  regenerated via pnpm --filter mermaid docs:build

Unchanged: the syntax keyword 'cynefin-beta' remains the trigger token
in the Langium grammar, parser tokenBuilder, detector regex, and all
diagram code examples — exactly mirroring radar-beta.
2026-04-27 10:11:48 -06:00
ragelink ff84234067 Merge branch 'develop' of https://github.com/mermaid-js/mermaid into feature/cynefin-diagram 2026-04-27 09:57:45 -06:00
autofix-ci[bot] 99123625d8 [autofix.ci] apply automated fixes 2026-04-21 16:41:36 +00:00
tractorjuice 7cca91caab fix(wardley): allow hyphens in unquoted component names
Widens NAME_WITH_SPACES to permit `-` when not followed by `>`, so
multi-word names like `real-time processing` and `end-user` parse
without quoting while `A->B` still tokenises as an arrow. Brings the
parser in line with OnlineWardleyMaps (OWM) convention.

- Grammar: add -(?!>) negative lookahead to both char-class groups in
  NAME_WITH_SPACES
- Tests: hyphenated component/anchor/pipeline names, hyphenated link
  endpoints, plus A->B and foo-bar->baz regression guards (18 total)
- Docs: note allowed and example under Components section

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 16:22:17 +00:00
ragelink 98d6993b13 Merge branch 'develop' into feature/cynefin-diagram 2026-04-21 08:42:55 -06:00
Knut Sveidqvist 04aab2c90d Merge remote-tracking branch 'origin/develop' into pr-7527-conflict-fix 2026-04-21 09:06:04 +00:00
Knut Sveidqvist 5969033dff Merge pull request #7619 from mermaid-js/chore/7593_run-scoped-e2e-tests
feat(ci): diagram-scoped e2e test selection
2026-04-21 08:36:47 +00:00
pbrolin47 868b9e42a3 Merge pull request #7520 from RodrigojndSantos/fix7090
fix(stateDiagram): enforce strict comment syntax
2026-04-21 08:28:55 +00:00
Per Brolin ab1ce31d01 Merge remote-tracking branch 'origin/develop' into chore/7593_run-scoped-e2e-tests 2026-04-21 10:01:47 +02:00
Ben 0f997349a6 Merge branch 'develop' into feature/treeview-filetree-enhancements 2026-04-20 21:13:02 +10:00
autofix-ci[bot] 8019a0a57b [autofix.ci] apply automated fixes 2026-04-20 10:20:10 +00:00
Rodrigo Santos 326eb2bc42 fix(stateDiagram): allow inline comments and fix single % parsing
Addresses feedback from the review:
- Updates lexer to allow '%%' comments both at start-of-line
and inline;
- Treats a single '%' as normal text instead of a comment;
- Updates stateDiagram.md documentation to clarify the new
comment syntax;
- Adds unit tests for inline comments and single '%' scenarios.

Fixes #7090
2026-04-19 23:06:52 +01:00
Mac Carter 444730fc45 merge: resolve conflict with upstream/develop
Keep both our nested namespace + compact mode tests and upstream's
self-referential class diagram test (#7560).

Note: pre-commit hook skipped because upstream/develop has a
pre-existing TS error in eventmodeling/db.ts (commit 32c257e42).

Co-Authored-By: Claude Opus 4.6 (prompted with care by @M-a-c)
2026-04-17 23:10:08 -05:00
Mac Carter 700a6925c0 feat: add hierarchicalNamespaces config option for compact rendering
When set to false, only user-declared namespaces render as flat boxes
using their full qualified name; auto-created intermediate ancestors
are elided and their children moved to the nearest explicit ancestor.
Defaults to true (existing nested behavior).

Adds explicit field to NamespaceNode, updates both v2 and v3
renderers, demos, docs, unit tests, and Cypress E2E snapshots.

Co-Authored-By: Claude Opus 4.6 (prompted with care by @M-a-c)
2026-04-17 13:39:40 -05:00
Leo Mata 6bdff824c8 Merge branch 'develop' into feature/cynefin-diagram 2026-04-17 10:32:37 -06:00
ragelink dfa88d769b fix(cynefin): address round 3 review feedback
- Honor `useMaxWidth` config in renderer (match radar reference pattern)
- Rename config/detector/schema key to `cynefin-beta` to match keyword
  and align with the `wardley-beta` convention
- Simplify transition control-point math into a single coordinate space
- Document the expectation that quadrant item counts stay small
2026-04-17 10:03:18 -06:00
Per Brolin 671a5247c7 Merge remote-tracking branch 'origin/develop' into chore/7593_run-scoped-e2e-tests 2026-04-17 14:50:51 +02:00