diff --git a/.changeset/famous-bananas-join.md b/.changeset/famous-bananas-join.md deleted file mode 100644 index 48c29a8ad..000000000 --- a/.changeset/famous-bananas-join.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'mermaid': patch ---- - -Fix for self loops in cluster -Supporting legacy defaultRenderer directive diff --git a/.changeset/khaki-items-leave.md b/.changeset/khaki-items-leave.md deleted file mode 100644 index d84776eb2..000000000 --- a/.changeset/khaki-items-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'mermaid': minor ---- - -feat(er): allow multi-line relationship labels diff --git a/.changeset/nice-flowers-yawn.md b/.changeset/nice-flowers-yawn.md deleted file mode 100644 index b3c00cfb4..000000000 --- a/.changeset/nice-flowers-yawn.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'mermaid': minor -'@mermaid-js/docs': patch -'@mermaid-js/parser': minor ---- - -New Diagram: Architecture - -Adds architecture diagrams which allows users to show relations between services. diff --git a/.changeset/pants-things-go.md b/.changeset/pants-things-go.md deleted file mode 100644 index 559e572d1..000000000 --- a/.changeset/pants-things-go.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@mermaid-js/layout-elk': patch ---- - -fix: Updates to the default elk configuration -feat: exposing cycleBreakingStrategy to the configuration so that it can be modified suing the configuration. diff --git a/.cspell/libraries.txt b/.cspell/libraries.txt index ad0e3e701..73a2dceeb 100644 --- a/.cspell/libraries.txt +++ b/.cspell/libraries.txt @@ -30,6 +30,7 @@ Foswiki Gitea graphlib Grav +icones iconify Inkdrop jiti diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91153084e..3db5f6f37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,11 @@ permissions: # added using https://github.com/step-security/secure-repo jobs: release: + if: github.repository == 'mermaid-js/mermaid' permissions: - contents: write # for changesets/action to push to the repo - pull-requests: write # for changesets/action to create PRs + contents: write # to create release (changesets/action) + id-token: write # OpenID Connect token needed for provenance + pull-requests: write # to create pull request (changesets/action) name: Release runs-on: ubuntu-latest steps: diff --git a/cypress/helpers/util.ts b/cypress/helpers/util.ts index 133a35032..74b17cf05 100644 --- a/cypress/helpers/util.ts +++ b/cypress/helpers/util.ts @@ -73,7 +73,7 @@ export const imgSnapshotTest = ( export const urlSnapshotTest = ( url: string, - options: CypressMermaidConfig, + options: CypressMermaidConfig = {}, _api = false, validation?: any ): void => { diff --git a/cypress/integration/rendering/architecture.spec.ts b/cypress/integration/rendering/architecture.spec.ts index 459931979..1deb1f7da 100644 --- a/cypress/integration/rendering/architecture.spec.ts +++ b/cypress/integration/rendering/architecture.spec.ts @@ -1,9 +1,9 @@ -import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts'; +import { imgSnapshotTest, urlSnapshotTest } from '../../helpers/util.ts'; -describe('architecture diagram', () => { +describe.skip('architecture diagram', () => { it('should render a simple architecture diagram with groups', () => { imgSnapshotTest( - `architecture + `architecture-beta group api(cloud)[API] service db(database)[Database] in api @@ -21,7 +21,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with groups within groups', () => { imgSnapshotTest( - `architecture + `architecture-beta group api[API] group public[Public API] in api group private[Private API] in api @@ -41,14 +41,14 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with the fallback icon', () => { imgSnapshotTest( - `architecture + `architecture-beta service unknown(iconnamedoesntexist)[Unknown Icon] ` ); }); it('should render an architecture diagram with split directioning', () => { imgSnapshotTest( - `architecture + `architecture-beta service db(database)[Database] service s3(disk)[Storage] service serv1(server)[Server 1] @@ -64,7 +64,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with directional arrows', () => { imgSnapshotTest( - `architecture + `architecture-beta service servC(server)[Server 1] service servL(server)[Server 2] service servR(server)[Server 3] @@ -85,7 +85,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with group edges', () => { imgSnapshotTest( - `architecture + `architecture-beta group left_group(cloud)[Left] group right_group(cloud)[Right] group top_group(cloud)[Top] @@ -107,7 +107,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with edge labels', () => { imgSnapshotTest( - `architecture + `architecture-beta service servC(server)[Server 1] service servL(server)[Server 2] service servR(server)[Server 3] @@ -128,7 +128,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with simple junction edges', () => { imgSnapshotTest( - `architecture + `architecture-beta service left_disk(disk)[Disk] service top_disk(disk)[Disk] service bottom_disk(disk)[Disk] @@ -148,7 +148,7 @@ describe('architecture diagram', () => { }); it('should render an architecture diagram with complex junction edges', () => { imgSnapshotTest( - `architecture + `architecture-beta group left group right service left_disk(disk)[Disk] in left @@ -172,3 +172,9 @@ describe('architecture diagram', () => { ); }); }); + +describe('architecture - external', () => { + it('should allow adding external icons', () => { + urlSnapshotTest('http://localhost:9000/architecture-external.html'); + }); +}); diff --git a/cypress/platform/architecture-external.html b/cypress/platform/architecture-external.html new file mode 100644 index 000000000..71770425d --- /dev/null +++ b/cypress/platform/architecture-external.html @@ -0,0 +1,52 @@ + + +
+ + ++ architecture-beta + service s3(logos:aws-s3)[Cloud Store] + service ec2(logos:aws-ec2)[Server] + service api(logos:aws-api-gateway)[Api Gateway] + service fa(fa:image)[Font Awesome Icon] ++ + + + diff --git a/demos/architecture.html b/demos/architecture.html index fc65b6beb..6d978d952 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -226,84 +226,31 @@
architecture-beta - service s3(aws:s3)[Cloud Store] - service ec2(aws:ec2)[Server] - service wave(aws:wavelength)[Wave] - service droplet(do:droplet)[Droplet] - service repo(gh:github)[Repository] -+ service s3(logos:aws-s3)[Cloud Store] + service ec2(logos:aws-ec2)[Server] + service api(logos:aws-api-gateway)[Api Gateway] + service fa(fa:image)[Font Awesome Icon] +