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 Mermaid Test Page + + + + + +

External Icons Demo

+
+    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 @@
-

AWS Icon Demo

+

External Icons Demo

     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] + diff --git a/docs/config/icons.md b/docs/config/icons.md deleted file mode 100644 index d0a80f2d8..000000000 --- a/docs/config/icons.md +++ /dev/null @@ -1,67 +0,0 @@ -> **Warning** -> -> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. -> -> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/icons.md](../../packages/mermaid/src/docs/config/icons.md). - -# SVG Icons (v???+) - -SVG Icons can be used with supported diagrams. Alongside the icon packs included with Mermaid, 3rd party libraries can be included in the configuration to cover additional use-cases. - -## Supported Diagrams - -| Diagram | Usage | -| ------------ | --------------------------------- | -| Architecture | Icon names are surrounded by `()` | - -## Included Icon Packs - -| Icon Pack | Prefix | -| ------------- | ------ | -| default | N/A | -| Amazon AWS | `aws:` | -| Digital Ocean | `do:` | -| GitHub | `gh:` | - -Note that in order to use non-generic icons that are provided with Mermaid, the packs must be explicitly loaded when on initialization initialized. - -```js -import sampleIconPack from 'sample-icon-pack'; - -mermaid.initialize({ - iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'], -}); -``` - -## Using Custom Icon Packs - -Custom icon packs can be used by including them in the `iconLibraries` array on mermaid initialization. - -```js -import sampleIconPack from 'sample-icon-pack'; - -mermaid.initialize({ - iconLibraries: [sampleIconPack, 'aws:full', ...], -}); -``` - -## Creating Custom Icon Packs - -```js -import { createIcon } from 'mermaid'; -import type { IconLibrary, IconResolver } from 'mermaid'; - -// type IconLibrary = Record; -// createIcon: (icon: string, originalSize: number) => IconResolver -const myIconLibrary: IconLibrary = { - defaultCloudExample: createIcon( - ` - - - `, - 80 - ) -}; - -export default myIconLibrary -``` diff --git a/docs/config/setup/interfaces/mermaid.Mermaid.md b/docs/config/setup/interfaces/mermaid.Mermaid.md index 04f5bcc93..f4e9eb4ec 100644 --- a/docs/config/setup/interfaces/mermaid.Mermaid.md +++ b/docs/config/setup/interfaces/mermaid.Mermaid.md @@ -28,7 +28,7 @@ page. #### Defined in -[packages/mermaid/src/mermaid.ts:441](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L441) +[packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436) --- @@ -59,7 +59,7 @@ A graph definition key #### Defined in -[packages/mermaid/src/mermaid.ts:443](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L443) +[packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438) --- @@ -89,7 +89,7 @@ Use [initialize](mermaid.Mermaid.md#initialize) and [run](mermaid.Mermaid.md#run #### Defined in -[packages/mermaid/src/mermaid.ts:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436) +[packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431) --- @@ -116,7 +116,7 @@ This function should be called before the run function. #### Defined in -[packages/mermaid/src/mermaid.ts:440](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L440) +[packages/mermaid/src/mermaid.ts:435](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L435) --- @@ -130,7 +130,7 @@ Use [parse](mermaid.Mermaid.md#parse) and [render](mermaid.Mermaid.md#render) in #### Defined in -[packages/mermaid/src/mermaid.ts:430](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L430) +[packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425) --- @@ -180,7 +180,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not #### Defined in -[packages/mermaid/src/mermaid.ts:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431) +[packages/mermaid/src/mermaid.ts:426](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L426) --- @@ -190,7 +190,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not #### Defined in -[packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425) +[packages/mermaid/src/mermaid.ts:420](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L420) --- @@ -218,6 +218,30 @@ Used to register external diagram types. #### Defined in +[packages/mermaid/src/mermaid.ts:434](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L434) + +--- + +### registerIconPacks + +• **registerIconPacks**: (`iconLoaders`: `IconLoader`\[]) => `void` + +#### Type declaration + +▸ (`iconLoaders`): `void` + +##### Parameters + +| Name | Type | +| :------------ | :-------------- | +| `iconLoaders` | `IconLoader`\[] | + +##### Returns + +`void` + +#### Defined in + [packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439) --- @@ -242,7 +266,7 @@ Used to register external diagram types. #### Defined in -[packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438) +[packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L433) --- @@ -268,7 +292,7 @@ Used to register external diagram types. #### Defined in -[packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432) +[packages/mermaid/src/mermaid.ts:427](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L427) --- @@ -316,7 +340,7 @@ Renders the mermaid diagrams #### Defined in -[packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437) +[packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432) --- @@ -351,7 +375,7 @@ to it (eg. dart interop wrapper). (Initially there is no parseError member of me #### Defined in -[packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442) +[packages/mermaid/src/mermaid.ts:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437) --- @@ -361,4 +385,4 @@ to it (eg. dart interop wrapper). (Initially there is no parseError member of me #### Defined in -[packages/mermaid/src/mermaid.ts:424](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L424) +[packages/mermaid/src/mermaid.ts:419](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L419) diff --git a/docs/config/setup/interfaces/mermaid.MermaidConfig.md b/docs/config/setup/interfaces/mermaid.MermaidConfig.md index de1c1e66a..ad078653a 100644 --- a/docs/config/setup/interfaces/mermaid.MermaidConfig.md +++ b/docs/config/setup/interfaces/mermaid.MermaidConfig.md @@ -26,7 +26,7 @@ #### Defined in -[packages/mermaid/src/config.type.ts:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203) +[packages/mermaid/src/config.type.ts:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194) --- @@ -49,7 +49,7 @@ This matters if you are using base tag settings. #### Defined in -[packages/mermaid/src/config.type.ts:209](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L209) +[packages/mermaid/src/config.type.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200) --- @@ -59,7 +59,7 @@ This matters if you are using base tag settings. #### Defined in -[packages/mermaid/src/config.type.ts:206](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L206) +[packages/mermaid/src/config.type.ts:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197) --- @@ -69,7 +69,7 @@ This matters if you are using base tag settings. #### Defined in -[packages/mermaid/src/config.type.ts:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196) +[packages/mermaid/src/config.type.ts:187](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L187) --- @@ -93,7 +93,7 @@ You can set this attribute to base the seed on a static string. #### Defined in -[packages/mermaid/src/config.type.ts:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190) +[packages/mermaid/src/config.type.ts:181](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L181) --- @@ -111,7 +111,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:183](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L183) +[packages/mermaid/src/config.type.ts:174](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L174) --- @@ -121,7 +121,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:210](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L210) +[packages/mermaid/src/config.type.ts:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201) --- @@ -149,7 +149,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198) +[packages/mermaid/src/config.type.ts:189](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L189) --- @@ -159,7 +159,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191) +[packages/mermaid/src/config.type.ts:182](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L182) --- @@ -183,7 +183,7 @@ See #### Defined in -[packages/mermaid/src/config.type.ts:212](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L212) +[packages/mermaid/src/config.type.ts:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203) --- @@ -197,7 +197,7 @@ If set to true, ignores legacyMathML. #### Defined in -[packages/mermaid/src/config.type.ts:172](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L172) +[packages/mermaid/src/config.type.ts:163](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L163) --- @@ -207,7 +207,7 @@ If set to true, ignores legacyMathML. #### Defined in -[packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193) +[packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184) --- @@ -217,7 +217,7 @@ If set to true, ignores legacyMathML. #### Defined in -[packages/mermaid/src/config.type.ts:205](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L205) +[packages/mermaid/src/config.type.ts:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196) --- @@ -243,26 +243,13 @@ Defines the seed to be used when using handDrawn look. This is important for the --- -### iconLibraries - -• `Optional` **iconLibraries**: ([`IconLibrary`](../modules/mermaid.md#iconlibrary) | `"aws:common"` | `"aws:full"` | `"github"` | `"digital-ocean"`)\[] - -This option specifies an object contianing a mappig of SVG icon names to a resolver that returns the svg code. -For supported diagrams (i.e., Architecture), their syntax allows refering to key names in this object to display the corresponding SVG icon in the rendered diagram. - -#### Defined in - -[packages/mermaid/src/config.type.ts:162](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L162) - ---- - ### journey • `Optional` **journey**: `JourneyDiagramConfig` #### Defined in -[packages/mermaid/src/config.type.ts:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194) +[packages/mermaid/src/config.type.ts:185](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L185) --- @@ -323,7 +310,7 @@ Defines which main look to use for the diagram. #### Defined in -[packages/mermaid/src/config.type.ts:213](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L213) +[packages/mermaid/src/config.type.ts:204](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L204) --- @@ -357,7 +344,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:204](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L204) +[packages/mermaid/src/config.type.ts:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195) --- @@ -367,7 +354,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:208](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L208) +[packages/mermaid/src/config.type.ts:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199) --- @@ -377,7 +364,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199) +[packages/mermaid/src/config.type.ts:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190) --- @@ -387,7 +374,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200) +[packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191) --- @@ -397,7 +384,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202) +[packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193) --- @@ -407,7 +394,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:207](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L207) +[packages/mermaid/src/config.type.ts:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198) --- @@ -443,7 +430,7 @@ Level of trust for parsed diagram #### Defined in -[packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192) +[packages/mermaid/src/config.type.ts:183](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L183) --- @@ -465,7 +452,7 @@ Dictates whether mermaid starts on Page load #### Defined in -[packages/mermaid/src/config.type.ts:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197) +[packages/mermaid/src/config.type.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L188) --- @@ -478,7 +465,7 @@ This is useful when you want to control how to handle syntax errors in your appl #### Defined in -[packages/mermaid/src/config.type.ts:219](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L219) +[packages/mermaid/src/config.type.ts:210](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L210) --- @@ -521,7 +508,7 @@ You may also use `themeCSS` to override this value. #### Defined in -[packages/mermaid/src/config.type.ts:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195) +[packages/mermaid/src/config.type.ts:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L186) --- @@ -531,7 +518,7 @@ You may also use `themeCSS` to override this value. #### Defined in -[packages/mermaid/src/config.type.ts:211](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L211) +[packages/mermaid/src/config.type.ts:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202) --- @@ -541,4 +528,4 @@ You may also use `themeCSS` to override this value. #### Defined in -[packages/mermaid/src/config.type.ts:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201) +[packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192) diff --git a/docs/config/setup/interfaces/mermaid.RunOptions.md b/docs/config/setup/interfaces/mermaid.RunOptions.md index 6d45d3549..0bcfc2356 100644 --- a/docs/config/setup/interfaces/mermaid.RunOptions.md +++ b/docs/config/setup/interfaces/mermaid.RunOptions.md @@ -18,7 +18,7 @@ The nodes to render. If this is set, `querySelector` will be ignored. #### Defined in -[packages/mermaid/src/mermaid.ts:54](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L54) +[packages/mermaid/src/mermaid.ts:49](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L49) --- @@ -44,7 +44,7 @@ A callback to call after each diagram is rendered. #### Defined in -[packages/mermaid/src/mermaid.ts:58](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L58) +[packages/mermaid/src/mermaid.ts:53](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L53) --- @@ -56,7 +56,7 @@ The query selector to use when finding elements to render. Default: `".mermaid"` #### Defined in -[packages/mermaid/src/mermaid.ts:50](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L50) +[packages/mermaid/src/mermaid.ts:45](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L45) --- @@ -68,4 +68,4 @@ If `true`, errors will be logged to the console, but not thrown. Default: `false #### Defined in -[packages/mermaid/src/mermaid.ts:62](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L62) +[packages/mermaid/src/mermaid.ts:57](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L57) diff --git a/docs/config/setup/modules/mermaid.md b/docs/config/setup/modules/mermaid.md index 8e3b025b7..60c219f2d 100644 --- a/docs/config/setup/modules/mermaid.md +++ b/docs/config/setup/modules/mermaid.md @@ -26,41 +26,6 @@ ## Type Aliases -### IconLibrary - -Ƭ **IconLibrary**: `Record`<`string`, [`IconResolver`](mermaid.md#iconresolver)> - -#### Defined in - -[packages/mermaid/src/rendering-util/svgRegister.ts:7](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/svgRegister.ts#L7) - ---- - -### IconResolver - -Ƭ **IconResolver**: (`parent`: `Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`>, `width?`: `number`) => `Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`> - -#### Type declaration - -▸ (`parent`, `width?`): `Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`> - -##### Parameters - -| Name | Type | -| :------- | :-------------------------------------------------------------------- | -| `parent` | `Selection`<`SVGGElement`, `unknown`, `Element` \| `null`, `unknown`> | -| `width?` | `number` | - -##### Returns - -`Selection`<`SVGGElement`, `unknown`, `Element` | `null`, `unknown`> - -#### Defined in - -[packages/mermaid/src/rendering-util/svgRegister.ts:3](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/svgRegister.ts#L3) - ---- - ### InternalHelpers Ƭ **InternalHelpers**: typeof `internalHelpers` @@ -122,29 +87,4 @@ #### Defined in -[packages/mermaid/src/mermaid.ts:446](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L446) - -## Functions - -### createIcon - -▸ **createIcon**(`icon`, `originalSize`): [`IconResolver`](mermaid.md#iconresolver) - -Converts an SVG Icon passed as a string into a properly formatted IconResolver - -#### Parameters - -| Name | Type | Description | -| :------------- | :------- | :-------------------------------------------------------------------------- | -| `icon` | `string` | html code for the svg icon as a string (the SVG tag should not be included) | -| `originalSize` | `number` | the original size of the SVG Icon in pixels | - -#### Returns - -[`IconResolver`](mermaid.md#iconresolver) - -IconResolver - -#### Defined in - -[packages/mermaid/src/rendering-util/svgRegister.ts:15](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/svgRegister.ts#L15) +[packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 75f20dd1a..a9687359b 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -74,6 +74,7 @@ To add an integration to this list, see the [Integrations - create page](./integ - [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) +- [Microsoft Loop](https://loop.cloud.microsoft) ✅ ### LLM integrations diff --git a/docs/syntax/architecture.md b/docs/syntax/architecture.md index 2d71d84fb..12a7cf409 100644 --- a/docs/syntax/architecture.md +++ b/docs/syntax/architecture.md @@ -4,7 +4,7 @@ > > ## Please edit the corresponding file in [/packages/mermaid/src/docs/syntax/architecture.md](../../packages/mermaid/src/docs/syntax/architecture.md). -# Architecture Diagrams Documentation (v\+) +# Architecture Diagrams Documentation (v11.1.0+) > In the context of mermaid-js, the architecture diagram is used to show the relationship between services and resources commonly found within the Cloud or CI/CD deployments. In an architecture diagram, services (nodes) are connected by edges. Related services can be placed within groups to better illustrate how they are organized. @@ -191,4 +191,85 @@ architecture-beta bottom_gateway:T -- B:junctionRight ``` -## Configuration +## Icons + +By default, architecture diagram supports the following icons: `cloud`, `database`, `disk`, `internet`, `server`. +Users can use any of the 200,000+ icons available in iconify.design, or add their own custom icons, by following the steps below. + +The icon packs available can be found at [icones.js.org](https://icones.js.org/). +We use the name defined when registering the icon pack, to override the prefix field of the iconify pack. This allows the user to use shorter names for the icons. It also allows us to load a particular pack only when it is used in a diagram. + +Using JSON file directly from CDN: + +```js +import mermaid from 'CDN/mermaid.esm.mjs'; +mermaid.registerIconPacks([ + { + name: 'logos', + loader: () => + fetch('https://unpkg.com/@iconify-json/logos/icons.json').then((res) => res.json()), + }, +]); +``` + +Using packages and a bundler: + +```bash +npm install @iconify-json/logos +``` + +With lazy loading + +```js +import mermaid from 'mermaid'; + +mermaid.registerIconPacks([ + { + name: 'logos', + loader: () => import('@iconify-json/logos').then((module) => module.icons), + }, +]); +``` + +Without lazy loading + +```js +import mermaid from 'mermaid'; +import { icons } from '@iconify-json/logos'; +mermaid.registerIconPacks([ + { + name: icons.prefix, // To use the prefix defined in the icon pack + icons, + }, +]); +``` + +After the icons are installed, they can be used in the architecture diagram by using the format "name:icon-name", where name is the value used when registering the icon pack. + +```mermaid-example +architecture-beta + group api(logos:aws-lambda)[API] + + service db(logos:aws-aurora)[Database] in api + service disk1(logos:aws-glacier)[Storage] in api + service disk2(logos:aws-s3)[Storage] in api + service server(logos:aws-ec2)[Server] in api + + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db +``` + +```mermaid +architecture-beta + group api(logos:aws-lambda)[API] + + service db(logos:aws-aurora)[Database] in api + service disk1(logos:aws-glacier)[Storage] in api + service disk2(logos:aws-s3)[Storage] in api + service server(logos:aws-ec2)[Server] in api + + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db +``` diff --git a/docs/syntax/entityRelationshipDiagram.md b/docs/syntax/entityRelationshipDiagram.md index 74b545abf..693cb53c7 100644 --- a/docs/syntax/entityRelationshipDiagram.md +++ b/docs/syntax/entityRelationshipDiagram.md @@ -286,7 +286,7 @@ erDiagram - If you want the relationship label to be more than one word, you must use double quotes around the phrase - If you don't want a label at all on a relationship, you must use an empty double-quoted string -- (v\+) If you want a multi-line label on a relationship, use `
` between the two lines (`"first line
second line"`) +- (v11.1.0+) If you want a multi-line label on a relationship, use `
` between the two lines (`"first line
second line"`) ## Styling diff --git a/package.json b/package.json index 21ae5360c..5683b6ed9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.2.4", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247", + "packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1", "keywords": [ "diagram", "markdown", @@ -88,7 +88,7 @@ "cpy-cli": "^5.0.0", "cross-env": "^7.0.3", "cspell": "^8.6.0", - "cypress": "^13.11.0", + "cypress": "^13.14.1", "cypress-image-snapshot": "^4.0.1", "esbuild": "^0.21.5", "eslint": "^9.4.0", @@ -116,7 +116,6 @@ "markdown-table": "^3.0.3", "nyc": "^15.1.0", "path-browserify": "^1.0.1", - "pnpm": "^8.15.5", "prettier": "^3.2.5", "prettier-plugin-jsdoc": "^1.3.0", "rimraf": "^5.0.5", diff --git a/packages/mermaid-layout-elk/CHANGELOG.md b/packages/mermaid-layout-elk/CHANGELOG.md index e1ec1d2dd..9588e7885 100644 --- a/packages/mermaid-layout-elk/CHANGELOG.md +++ b/packages/mermaid-layout-elk/CHANGELOG.md @@ -1,5 +1,14 @@ # @mermaid-js/layout-elk +## 0.1.3 + +### Patch Changes + +- [#5810](https://github.com/mermaid-js/mermaid/pull/5810) [`33a809f`](https://github.com/mermaid-js/mermaid/commit/33a809f09a9aa1f84ba06201ab550bad81c3ff65) Thanks [@knsv](https://github.com/knsv)! - fix: Updates to the default elk configuration + feat: exposing cycleBreakingStrategy to the configuration so that it can be modified suing the configuration. +- Updated dependencies [[`6ecdf7b`](https://github.com/mermaid-js/mermaid/commit/6ecdf7be688efdc53c52fea3ba891327242bc890), [`28bd07f`](https://github.com/mermaid-js/mermaid/commit/28bd07fdeb4fc981107d21317ec6160b31f80116), [`8e640da`](https://github.com/mermaid-js/mermaid/commit/8e640da5436e8ae013b11b1c1821a9afcc15d0d3), [`256a148`](https://github.com/mermaid-js/mermaid/commit/256a148bbf484fc7db6c19f94dd69d5d268ee048), [`16faef4`](https://github.com/mermaid-js/mermaid/commit/16faef4613b91a7d3a98a1563c25b57f9238acc7)]: + - mermaid@11.1.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/mermaid-layout-elk/package.json b/packages/mermaid-layout-elk/package.json index 5fa491bc8..673702be7 100644 --- a/packages/mermaid-layout-elk/package.json +++ b/packages/mermaid-layout-elk/package.json @@ -1,6 +1,6 @@ { "name": "@mermaid-js/layout-elk", - "version": "0.1.2", + "version": "0.1.3", "description": "ELK layout engine for mermaid", "module": "dist/mermaid-layout-elk.core.mjs", "types": "dist/layouts.d.ts", diff --git a/packages/mermaid/CHANGELOG.md b/packages/mermaid/CHANGELOG.md index 5a34667fa..d7221d232 100644 --- a/packages/mermaid/CHANGELOG.md +++ b/packages/mermaid/CHANGELOG.md @@ -1,5 +1,27 @@ # mermaid +## 11.1.0 + +### Minor Changes + +- [#5793](https://github.com/mermaid-js/mermaid/pull/5793) [`6ecdf7b`](https://github.com/mermaid-js/mermaid/commit/6ecdf7be688efdc53c52fea3ba891327242bc890) Thanks [@sidharthv96](https://github.com/sidharthv96)! - feat: Add support for iconify icons + +- [#5711](https://github.com/mermaid-js/mermaid/pull/5711) [`8e640da`](https://github.com/mermaid-js/mermaid/commit/8e640da5436e8ae013b11b1c1821a9afcc15d0d3) Thanks [@NicolasNewman](https://github.com/NicolasNewman)! - feat(er): allow multi-line relationship labels + +- [#5452](https://github.com/mermaid-js/mermaid/pull/5452) [`256a148`](https://github.com/mermaid-js/mermaid/commit/256a148bbf484fc7db6c19f94dd69d5d268ee048) Thanks [@NicolasNewman](https://github.com/NicolasNewman)! - New Diagram: Architecture + + Adds architecture diagrams which allows users to show relations between services. + +### Patch Changes + +- [#5810](https://github.com/mermaid-js/mermaid/pull/5810) [`28bd07f`](https://github.com/mermaid-js/mermaid/commit/28bd07fdeb4fc981107d21317ec6160b31f80116) Thanks [@knsv](https://github.com/knsv)! - Fix for self loops in cluster + Supporting legacy defaultRenderer directive + +- [#5789](https://github.com/mermaid-js/mermaid/pull/5789) [`16faef4`](https://github.com/mermaid-js/mermaid/commit/16faef4613b91a7d3a98a1563c25b57f9238acc7) Thanks [@sidharthv96](https://github.com/sidharthv96)! - chore: Move icons to architecture, remove full icon sets to reduce bundle size + +- Updated dependencies [[`256a148`](https://github.com/mermaid-js/mermaid/commit/256a148bbf484fc7db6c19f94dd69d5d268ee048), [`7d8143b`](https://github.com/mermaid-js/mermaid/commit/7d8143b917ee3562149a0e0a821ed2d6f29cc05d)]: + - @mermaid-js/parser@0.3.0 + ## 11.0.2 ### Patch Changes diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 3fee53a0d..317150788 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,6 +1,6 @@ { "name": "mermaid", - "version": "11.0.2", + "version": "11.1.0", "description": "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.", "type": "module", "module": "./dist/mermaid.core.mjs", @@ -68,6 +68,7 @@ }, "dependencies": { "@braintree/sanitize-url": "^7.0.1", + "@iconify/utils": "^2.1.32", "@mermaid-js/parser": "workspace:^", "cytoscape": "^3.29.2", "cytoscape-cose-bilkent": "^4.1.0", @@ -88,8 +89,9 @@ }, "devDependencies": { "@adobe/jsonschema2md": "^8.0.0", - "@types/cytoscape-fcose": "^2.2.4", + "@iconify/types": "^2.0.0", "@types/cytoscape": "^3.21.4", + "@types/cytoscape-fcose": "^2.2.4", "@types/d3": "^7.4.3", "@types/d3-sankey": "^0.12.4", "@types/d3-scale": "^4.0.8", diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index 0459faf52..035a158e0 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -154,15 +154,6 @@ export interface MermaidConfig { * */ legacyMathML?: boolean; - /** - * This option specifies an object contianing a mappig of SVG icon names to a resolver that returns the svg code. - * For supported diagrams (i.e., Architecture), their syntax allows refering to key names in this object to display the corresponding SVG icon in the rendered diagram. - * - */ - iconLibraries?: Array< - | import('./rendering-util/svgRegister.js').IconLibrary - | import('./rendering-util/svg/index.js').IconNamespaceKeys - >; /** * This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS * fonts and browser's MathML implementation, this option is recommended if consistent rendering is important. diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts index f019d1eff..93fa71ca3 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureDb.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -1,18 +1,29 @@ -// TODO remove no-console -/* eslint-disable no-console */ -import type { - ArchitectureState, - ArchitectureDB, - ArchitectureService, - ArchitectureGroup, - ArchitectureEdge, - ArchitectureDirectionPairMap, - ArchitectureDirectionPair, - ArchitectureSpatialMap, - ArchitectureNode, - ArchitectureJunction, -} from './architectureTypes.js'; +import type { ArchitectureDiagramConfig } from '../../config.type.js'; +import DEFAULT_CONFIG from '../../defaultConfig.js'; import { getConfig } from '../../diagram-api/diagramAPI.js'; +import type { D3Element } from '../../types.js'; +import { ImperativeState } from '../../utils/imperativeState.js'; +import { + clear as commonClear, + getAccDescription, + getAccTitle, + getDiagramTitle, + setAccDescription, + setAccTitle, + setDiagramTitle, +} from '../common/commonDb.js'; +import type { + ArchitectureDB, + ArchitectureDirectionPair, + ArchitectureDirectionPairMap, + ArchitectureEdge, + ArchitectureGroup, + ArchitectureJunction, + ArchitectureNode, + ArchitectureService, + ArchitectureSpatialMap, + ArchitectureState, +} from './architectureTypes.js'; import { getArchitectureDirectionPair, isArchitectureDirection, @@ -20,19 +31,6 @@ import { isArchitectureService, shiftPositionByArchitectureDirectionPair, } from './architectureTypes.js'; -import { - setAccTitle, - getAccTitle, - setDiagramTitle, - getDiagramTitle, - getAccDescription, - setAccDescription, - clear as commonClear, -} from '../common/commonDb.js'; -import type { ArchitectureDiagramConfig } from '../../config.type.js'; -import DEFAULT_CONFIG from '../../defaultConfig.js'; -import type { D3Element } from '../../types.js'; -import { ImperativeState } from '../../utils/imperativeState.js'; const DEFAULT_ARCHITECTURE_CONFIG: Required = DEFAULT_CONFIG.architecture; @@ -286,7 +284,6 @@ const getDataStructures = () => { adjList, spatialMaps, }; - console.log(state.records.dataStructures); } return state.records.dataStructures; }; diff --git a/packages/mermaid/src/diagrams/architecture/architectureIcons.ts b/packages/mermaid/src/diagrams/architecture/architectureIcons.ts new file mode 100644 index 000000000..dd6c99f9c --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureIcons.ts @@ -0,0 +1,43 @@ +import { unknownIcon } from '$root/rendering-util/icons.js'; +import type { IconifyJSON } from '@iconify/types'; + +const wrapIcon = (icon: string) => { + return `${icon}`; +}; + +export const architectureIcons: IconifyJSON = { + prefix: 'mermaid-architecture', + height: 80, + width: 80, + icons: { + database: { + body: wrapIcon( + '' + ), + }, + server: { + body: wrapIcon( + '' + ), + }, + disk: { + body: wrapIcon( + '' + ), + }, + internet: { + body: wrapIcon( + '' + ), + }, + cloud: { + body: wrapIcon( + '' + ), + }, + unknown: unknownIcon, + blank: { + body: wrapIcon(''), + }, + }, +}; diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index f23c1894b..3abb69b9f 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -1,39 +1,45 @@ -// TODO remove no-console -/* eslint-disable no-console */ +import { registerIconPacks } from '$root/rendering-util/icons.js'; import type { Position } from 'cytoscape'; import cytoscape from 'cytoscape'; -import type { Diagram } from '../../Diagram.js'; import type { FcoseLayoutOptions } from 'cytoscape-fcose'; import fcose from 'cytoscape-fcose'; +import { select } from 'd3'; import type { DrawDefinition, SVG } from '../../diagram-api/types.js'; +import type { Diagram } from '../../Diagram.js'; import { log } from '../../logger.js'; import { selectSvgElement } from '../../rendering-util/selectSvgElement.js'; +import { setupGraphViewbox } from '../../setupGraphViewbox.js'; +import { getConfigField } from './architectureDb.js'; +import { architectureIcons } from './architectureIcons.js'; import type { ArchitectureDataStructures, - ArchitectureSpatialMap, - EdgeSingularData, - EdgeSingular, ArchitectureJunction, + ArchitectureSpatialMap, + EdgeSingular, + EdgeSingularData, NodeSingularData, } from './architectureTypes.js'; import { type ArchitectureDB, type ArchitectureDirection, - type ArchitectureGroup, type ArchitectureEdge, + type ArchitectureGroup, type ArchitectureService, ArchitectureDirectionName, + edgeData, getOppositeArchitectureDirection, isArchitectureDirectionXY, isArchitectureDirectionY, nodeData, - edgeData, } from './architectureTypes.js'; -import { select } from 'd3'; -import { setupGraphViewbox } from '../../setupGraphViewbox.js'; import { drawEdges, drawGroups, drawJunctions, drawServices } from './svgDraw.js'; -import { getConfigField } from './architectureDb.js'; +registerIconPacks([ + { + name: architectureIcons.prefix, + icons: architectureIcons, + }, +]); cytoscape.use(fcose); function addServices(services: ArchitectureService[], cy: cytoscape.Core) { @@ -319,13 +325,6 @@ function layoutArchitecture( // Create the relative constraints for fcose by using an inverse of the spatial map and performing BFS on it const relativePlacementConstraint = getRelativeConstraints(spatialMaps); - console.log(`Horizontal Alignments:`); - console.log(alignmentConstraint.horizontal); - console.log(`Vertical Alignments:`); - console.log(alignmentConstraint.vertical); - console.log(`Relative Alignments:`); - console.log(relativePlacementConstraint); - const layout = cy.layout({ name: 'fcose', quality: 'proof', @@ -440,9 +439,6 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) const groups = db.getGroups(); const edges = db.getEdges(); const ds = db.getDataStructures(); - console.log('Services: ', services); - console.log('Edges: ', edges); - console.log('Groups: ', groups); const svg: SVG = selectSvgElement(id); @@ -465,8 +461,6 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) positionNodes(db, cy); setupGraphViewbox(undefined, svg, getConfigField('padding'), getConfigField('useMaxWidth')); - - console.log('=============================================================='); }; export const renderer = { draw }; diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index cbe385f27..357839394 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -1,26 +1,25 @@ -// TODO remove no-console -/* eslint-disable no-console */ -import type { D3Element } from '../../types.js'; +import { getIconSVG } from '$root/rendering-util/icons.js'; +import type cytoscape from 'cytoscape'; +import { getConfig } from '../../diagram-api/diagramAPI.js'; import { createText } from '../../rendering-util/createText.js'; +import type { D3Element } from '../../types.js'; +import { db, getConfigField } from './architectureDb.js'; +import { architectureIcons } from './architectureIcons.js'; import { ArchitectureDirectionArrow, - type ArchitectureDB, - type ArchitectureService, ArchitectureDirectionArrowShift, - isArchitectureDirectionX, - isArchitectureDirectionY, edgeData, - nodeData, - isArchitectureDirectionXY, getArchitectureDirectionPair, getArchitectureDirectionXYFactors, + isArchitectureDirectionX, + isArchitectureDirectionXY, + isArchitectureDirectionY, isArchitecturePairXY, + nodeData, + type ArchitectureDB, type ArchitectureJunction, + type ArchitectureService, } from './architectureTypes.js'; -import type cytoscape from 'cytoscape'; -import { getIcon } from '../../rendering-util/svgRegister.js'; -import { db, getConfigField } from './architectureDb.js'; -import { getConfig } from '../../diagram-api/diagramAPI.js'; export const drawEdges = async function (edgesEl: D3Element, cy: cytoscape.Core) { const padding = getConfigField('padding'); @@ -198,7 +197,6 @@ export const drawGroups = async function (groupsEl: D3Element, cy: cytoscape.Cor const data = nodeData(node); if (data.type === 'group') { const { h, w, x1, y1 } = node.boundingBox(); - console.log(`Draw group (${data.id}): pos=(${x1}, ${y1}), dim=(${w}, ${h})`); groupsEl .append('rect') @@ -213,7 +211,9 @@ export const drawGroups = async function (groupsEl: D3Element, cy: cytoscape.Cor let shiftedY1 = y1; if (data.icon) { const bkgElem = groupLabelContainer.append('g'); - getIcon(data.icon)?.(bkgElem, groupIconSize); + bkgElem.html( + `${await getIconSVG(data.icon, { height: groupIconSize, width: groupIconSize, fallbackPrefix: architectureIcons.prefix })}` + ); bkgElem.attr( 'transform', 'translate(' + @@ -290,15 +290,19 @@ export const drawServices = async function ( textElem.attr('transform', 'translate(' + iconSize / 2 + ', ' + iconSize + ')'); } - let bkgElem = serviceElem.append('g'); + const bkgElem = serviceElem.append('g'); if (service.icon) { // TODO: should a warning be given to end-users saying which icon names are available? // if (!isIconNameInUse(service.icon)) { // throw new Error(`Invalid SVG Icon name: "${service.icon}"`); // } - bkgElem = getIcon(service.icon)?.(bkgElem, iconSize); + bkgElem.html( + `${await getIconSVG(service.icon, { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}` + ); } else if (service.iconText) { - bkgElem = getIcon('blank')?.(bkgElem, iconSize); + bkgElem.html( + `${await getIconSVG('blank', { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}` + ); const textElemContainer = bkgElem.append('g'); const fo = textElemContainer .append('foreignObject') diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index ebbab35c7..619de961d 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -177,7 +177,6 @@ function sidebarConfig() { { text: 'Directives', link: '/config/directives' }, { text: 'Theming', link: '/config/theming' }, { text: 'Math', link: '/config/math' }, - { text: 'Icons', link: '/config/icons' }, { text: 'Accessibility', link: '/config/accessibility' }, { text: 'Mermaid CLI', link: '/config/mermaidCLI' }, { text: 'FAQ', link: '/config/faq' }, diff --git a/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts b/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts index 47e238692..2357fe384 100644 --- a/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts +++ b/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts @@ -2,6 +2,13 @@ import mermaid, { type MermaidConfig } from 'mermaid'; import zenuml from '../../../../../mermaid-zenuml/dist/mermaid-zenuml.core.mjs'; const init = mermaid.registerExternalDiagrams([zenuml]); +mermaid.registerIconPacks([ + { + name: 'logos', + loader: () => + fetch('https://unpkg.com/@iconify-json/logos/icons.json').then((res) => res.json()), + }, +]); export const render = async (id: string, code: string, config: MermaidConfig): Promise => { await init; diff --git a/packages/mermaid/src/docs/config/icons.md b/packages/mermaid/src/docs/config/icons.md deleted file mode 100644 index 0b9c78d54..000000000 --- a/packages/mermaid/src/docs/config/icons.md +++ /dev/null @@ -1,61 +0,0 @@ -# SVG Icons (v???+) - -SVG Icons can be used with supported diagrams. Alongside the icon packs included with Mermaid, 3rd party libraries can be included in the configuration to cover additional use-cases. - -## Supported Diagrams - -| Diagram | Usage | -| ------------ | --------------------------------- | -| Architecture | Icon names are surrounded by `()` | - -## Included Icon Packs - -| Icon Pack | Prefix | -| ------------- | ------ | -| default | N/A | -| Amazon AWS | `aws:` | -| Digital Ocean | `do:` | -| GitHub | `gh:` | - -Note that in order to use non-generic icons that are provided with Mermaid, the packs must be explicitly loaded when on initialization initialized. - -```js -import sampleIconPack from 'sample-icon-pack'; - -mermaid.initialize({ - iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'], -}); -``` - -## Using Custom Icon Packs - -Custom icon packs can be used by including them in the `iconLibraries` array on mermaid initialization. - -```js -import sampleIconPack from 'sample-icon-pack'; - -mermaid.initialize({ - iconLibraries: [sampleIconPack, 'aws:full', ...], -}); -``` - -## Creating Custom Icon Packs - -```js -import { createIcon } from 'mermaid'; -import type { IconLibrary, IconResolver } from 'mermaid'; - -// type IconLibrary = Record; -// createIcon: (icon: string, originalSize: number) => IconResolver -const myIconLibrary: IconLibrary = { - defaultCloudExample: createIcon( - ` - - - `, - 80 - ) -}; - -export default myIconLibrary -``` diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 81b0386b1..15f802ed5 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -69,6 +69,7 @@ To add an integration to this list, see the [Integrations - create page](./integ - [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) +- [Microsoft Loop](https://loop.cloud.microsoft) ✅ ### LLM integrations diff --git a/packages/mermaid/src/docs/syntax/architecture.md b/packages/mermaid/src/docs/syntax/architecture.md index e74995ce3..476c60532 100644 --- a/packages/mermaid/src/docs/syntax/architecture.md +++ b/packages/mermaid/src/docs/syntax/architecture.md @@ -1,4 +1,4 @@ -# Architecture Diagrams Documentation (v+) +# Architecture Diagrams Documentation (v11.1.0+) > In the context of mermaid-js, the architecture diagram is used to show the relationship between services and resources commonly found within the Cloud or CI/CD deployments. In an architecture diagram, services (nodes) are connected by edges. Related services can be placed within groups to better illustrate how they are organized. @@ -153,4 +153,71 @@ architecture-beta bottom_gateway:T -- B:junctionRight ``` -## Configuration +## Icons + +By default, architecture diagram supports the following icons: `cloud`, `database`, `disk`, `internet`, `server`. +Users can use any of the 200,000+ icons available in iconify.design, or add their own custom icons, by following the steps below. + +The icon packs available can be found at [icones.js.org](https://icones.js.org/). +We use the name defined when registering the icon pack, to override the prefix field of the iconify pack. This allows the user to use shorter names for the icons. It also allows us to load a particular pack only when it is used in a diagram. + +Using JSON file directly from CDN: + +```js +import mermaid from 'CDN/mermaid.esm.mjs'; +mermaid.registerIconPacks([ + { + name: 'logos', + loader: () => + fetch('https://unpkg.com/@iconify-json/logos/icons.json').then((res) => res.json()), + }, +]); +``` + +Using packages and a bundler: + +```bash +npm install @iconify-json/logos +``` + +With lazy loading + +```js +import mermaid from 'mermaid'; + +mermaid.registerIconPacks([ + { + name: 'logos', + loader: () => import('@iconify-json/logos').then((module) => module.icons), + }, +]); +``` + +Without lazy loading + +```js +import mermaid from 'mermaid'; +import { icons } from '@iconify-json/logos'; +mermaid.registerIconPacks([ + { + name: icons.prefix, // To use the prefix defined in the icon pack + icons, + }, +]); +``` + +After the icons are installed, they can be used in the architecture diagram by using the format "name:icon-name", where name is the value used when registering the icon pack. + +```mermaid-example +architecture-beta + group api(logos:aws-lambda)[API] + + service db(logos:aws-aurora)[Database] in api + service disk1(logos:aws-glacier)[Storage] in api + service disk2(logos:aws-s3)[Storage] in api + service server(logos:aws-ec2)[Server] in api + + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db +``` diff --git a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md index 7fed4a527..8c83d2232 100644 --- a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md +++ b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md @@ -192,7 +192,7 @@ erDiagram - If you want the relationship label to be more than one word, you must use double quotes around the phrase - If you don't want a label at all on a relationship, you must use an empty double-quoted string -- (v+) If you want a multi-line label on a relationship, use `
` between the two lines (`"first line
second line"`) +- (v11.1.0+) If you want a multi-line label on a relationship, use `
` between the two lines (`"first line
second line"`) ## Styling diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index 0cc94bcc2..52cca1cfe 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -2,6 +2,7 @@ * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid * functionality and to render the diagrams to svg code! */ +import { registerIconPacks } from '$root/rendering-util/icons.js'; import { dedent } from 'ts-dedent'; import type { MermaidConfig } from './config.type.js'; import { detectType, registerLazyLoadedDiagrams } from './diagram-api/detectType.js'; @@ -19,8 +20,6 @@ import type { LayoutData } from './rendering-util/types.js'; import type { ParseOptions, ParseResult, RenderResult } from './types.js'; import type { DetailedError } from './utils.js'; import utils, { isDetailedError } from './utils.js'; -import type { IconLibrary, IconResolver } from './rendering-util/svgRegister.js'; -import { createIcon } from './rendering-util/svgRegister.js'; export type { DetailedError, @@ -37,12 +36,8 @@ export type { SVG, SVGGroup, UnknownDiagramError, - IconLibrary, - IconResolver, }; -export { createIcon }; - export interface RunOptions { /** * The query selector to use when finding elements to render. Default: `".mermaid"`. @@ -441,6 +436,7 @@ export interface Mermaid { contentLoaded: typeof contentLoaded; setParseErrorHandler: typeof setParseErrorHandler; detectType: typeof detectType; + registerIconPacks: typeof registerIconPacks; } const mermaid: Mermaid = { @@ -457,6 +453,7 @@ const mermaid: Mermaid = { contentLoaded, setParseErrorHandler, detectType, + registerIconPacks, }; export default mermaid; diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index af2fbd04d..3fdd967f1 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -6,29 +6,26 @@ import { select } from 'd3'; import { compile, serialize, stringify } from 'stylis'; // @ts-ignore: TODO Fix ts errors +import DOMPurify from 'dompurify'; +import isEmpty from 'lodash-es/isEmpty.js'; import { version } from '../package.json'; +import { addSVGa11yTitleDescription, setA11yDiagramInfo } from './accessibility.js'; +import assignWithDepth from './assignWithDepth.js'; import * as configApi from './config.js'; +import type { MermaidConfig } from './config.type.js'; import { addDiagrams } from './diagram-api/diagram-orchestration.js'; +import type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js'; import { Diagram } from './Diagram.js'; +import { evaluate } from './diagrams/common/common.js'; import errorRenderer from './diagrams/error/errorRenderer.js'; import { attachFunctions } from './interactionDb.js'; import { log, setLogLevel } from './logger.js'; +import { preprocessDiagram } from './preprocess.js'; import getStyles from './styles.js'; import theme from './themes/index.js'; -import DOMPurify from 'dompurify'; -import type { MermaidConfig } from './config.type.js'; -import { evaluate } from './diagrams/common/common.js'; -import isEmpty from 'lodash-es/isEmpty.js'; -import { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility.js'; -import type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js'; -import { preprocessDiagram } from './preprocess.js'; -import { decodeEntities } from './utils.js'; -import type { IconLibrary } from './rendering-util/svgRegister.js'; -import { registerIcons } from './rendering-util/svgRegister.js'; -import defaultIconLibrary from './rendering-util/svg/index.js'; -import { toBase64 } from './utils/base64.js'; import type { D3Element, ParseOptions, ParseResult, RenderResult } from './types.js'; -import assignWithDepth from './assignWithDepth.js'; +import { decodeEntities } from './utils.js'; +import { toBase64 } from './utils/base64.js'; const MAX_TEXTLENGTH = 50_000; const MAX_TEXTLENGTH_EXCEEDED_MSG = @@ -492,29 +489,6 @@ function initialize(userOptions: MermaidConfig = {}) { // Set default options configApi.saveConfigFromInitialize(options); - registerIcons(defaultIconLibrary); - if (options?.iconLibraries) { - // TODO: find a better way to handle this, assumed to be resolved by the time diagrams are being generated - // eslint-disable-next-line @typescript-eslint/no-misused-promises - options.iconLibraries.forEach(async (library) => { - if (typeof library === 'string') { - let lib: IconLibrary = {}; - if (library === 'aws:common') { - lib = (await import('./rendering-util/svg/aws/awsCommon.js')).default; - } else if (library === 'aws:full') { - lib = (await import('./rendering-util/svg/aws/awsFull.js')).default; - } else if (library === 'digital-ocean') { - lib = (await import('./rendering-util/svg/digital-ocean/digitalOcean.js')).default; - } else if (library === 'github') { - lib = (await import('./rendering-util/svg/github/github.js')).default; - } - registerIcons(lib); - } else { - registerIcons(library); - } - }); - } - if (options?.theme && options.theme in theme) { // Todo merge with user options options.themeVariables = theme[options.theme as keyof typeof theme].getThemeVariables( diff --git a/packages/mermaid/src/rendering-util/icons.ts b/packages/mermaid/src/rendering-util/icons.ts new file mode 100644 index 000000000..27709b822 --- /dev/null +++ b/packages/mermaid/src/rendering-util/icons.ts @@ -0,0 +1,100 @@ +import { log } from '$root/logger.js'; +import type { ExtendedIconifyIcon, IconifyIcon, IconifyJSON } from '@iconify/types'; +import type { IconifyIconCustomisations } from '@iconify/utils'; +import { getIconData, iconToHTML, iconToSVG, replaceIDs, stringToIcon } from '@iconify/utils'; + +interface AsyncIconLoader { + name: string; + loader: () => Promise; +} + +interface SyncIconLoader { + name: string; + icons: IconifyJSON; +} + +export type IconLoader = AsyncIconLoader | SyncIconLoader; + +export const unknownIcon: IconifyIcon = { + body: '?', + height: 80, + width: 80, +}; + +const iconsStore = new Map(); +const loaderStore = new Map(); + +export const registerIconPacks = (iconLoaders: IconLoader[]) => { + for (const iconLoader of iconLoaders) { + if (!iconLoader.name) { + throw new Error( + 'Invalid icon loader. Must have a "name" property with non-empty string value.' + ); + } + log.debug('Registering icon pack:', iconLoader.name); + if ('loader' in iconLoader) { + loaderStore.set(iconLoader.name, iconLoader.loader); + } else if ('icons' in iconLoader) { + iconsStore.set(iconLoader.name, iconLoader.icons); + } else { + log.error('Invalid icon loader:', iconLoader); + throw new Error('Invalid icon loader. Must have either "icons" or "loader" property.'); + } + } +}; + +const getRegisteredIconData = async (iconName: string, fallbackPrefix?: string) => { + const data = stringToIcon(iconName, true, fallbackPrefix !== undefined); + if (!data) { + throw new Error(`Invalid icon name: ${iconName}`); + } + const prefix = data.prefix || fallbackPrefix; + if (!prefix) { + throw new Error(`Icon name must contain a prefix: ${iconName}`); + } + let icons = iconsStore.get(prefix); + if (!icons) { + const loader = loaderStore.get(prefix); + if (!loader) { + throw new Error(`Icon set not found: ${data.prefix}`); + } + try { + const loaded = await loader(); + icons = { ...loaded, prefix }; + iconsStore.set(prefix, icons); + } catch (e) { + log.error(e); + throw new Error(`Failed to load icon set: ${data.prefix}`); + } + } + const iconData = getIconData(icons, data.name); + if (!iconData) { + throw new Error(`Icon not found: ${iconName}`); + } + return iconData; +}; + +export const isIconAvailable = async (iconName: string) => { + try { + await getRegisteredIconData(iconName); + return true; + } catch { + return false; + } +}; + +export const getIconSVG = async ( + iconName: string, + customisations?: IconifyIconCustomisations & { fallbackPrefix?: string } +) => { + let iconData: ExtendedIconifyIcon; + try { + iconData = await getRegisteredIconData(iconName, customisations?.fallbackPrefix); + } catch (e) { + log.error(e); + iconData = unknownIcon; + } + const renderData = iconToSVG(iconData, customisations); + const svg = iconToHTML(replaceIDs(renderData.body), renderData.attributes); + return svg; +}; diff --git a/packages/mermaid/src/rendering-util/svg/aws/awsCommon.ts b/packages/mermaid/src/rendering-util/svg/aws/awsCommon.ts deleted file mode 100644 index 0f3391414..000000000 --- a/packages/mermaid/src/rendering-util/svg/aws/awsCommon.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { createIcon } from '../../svgRegister.js'; -// cSpell:disable -const awsIcons = { - 'aws:amplify': createIcon( - ` - - - - -`, - 80 - ), - 'aws:api-gateway': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:aurora': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloudformation': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloudfront': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloudwatch': createIcon( - ` - - - - -`, - 80 - ), - 'aws:documentdb': createIcon( - ` - - - - -`, - 80 - ), - 'aws:dynamodb': createIcon( - ` - - - - -`, - 80 - ), - 'aws:ec2': createIcon( - ` - - - - -`, - 80 - ), - 'aws:efs': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:elastic-beanstalk': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fargate': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iam': createIcon( - ` - - - - -`, - 80 - ), - 'aws:kms': createIcon( - ` - - - - -`, - 80 - ), - 'aws:kinesis': createIcon( - ` - - - - -`, - 80 - ), - 'aws:lambda': createIcon( - ` - - - - -`, - 80 - ), - 'aws:lightsail': createIcon( - ` - - - - -`, - 80 - ), - 'aws:neptune': createIcon( - ` - - - - -`, - 80 - ), - 'aws:rds': createIcon( - ` - - - - -`, - 80 - ), - 'aws:redshift': createIcon( - ` - - - - -`, - 80 - ), - 'aws:route-53': createIcon( - ` - - - - -`, - 80 - ), - 'aws:secrets-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:s3': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:timestream': createIcon( - ` - - - - -`, - 80 - ), - 'aws:vpc': createIcon( - ` - - - - -`, - 80 - ), -}; - -export default awsIcons; diff --git a/packages/mermaid/src/rendering-util/svg/aws/awsFull.ts b/packages/mermaid/src/rendering-util/svg/aws/awsFull.ts deleted file mode 100644 index cae1de757..000000000 --- a/packages/mermaid/src/rendering-util/svg/aws/awsFull.ts +++ /dev/null @@ -1,2816 +0,0 @@ -import { createIcon } from '../../svgRegister.js'; -// cSpell:disable -const awsIcons = { - 'aws:activate': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:alexa-for-business': createIcon( - ` - - - - -`, - 80 - ), - 'aws:apache-mxnet-on-aws': createIcon( - ` - - - - -`, - 80 - ), - 'aws:app-mesh': createIcon( - ` - - - - -`, - 80 - ), - 'aws:app-runner': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:appconfig': createIcon( - ` - - - - -`, - 80 - ), - 'aws:appfabric': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:appflow': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:application-auto-scaling': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:application-composer': createIcon( - ` - - - - -`, - 80 - ), - 'aws:application-cost-profiler': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:application-discovery-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:application-migration-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:appstream': createIcon( - ` - - - - -`, - 80 - ), - 'aws:appsync': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:artifact': createIcon( - ` - - - - -`, - 80 - ), - 'aws:athena': createIcon( - ` - - - - -`, - 80 - ), - 'aws:audit-manager': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:augmented-ai-a2i': createIcon( - ` - - - - -`, - 80 - ), - 'aws:auto-scaling': createIcon( - ` - - - - -`, - 80 - ), - 'aws:b2b-data-interchange': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:backint-agent': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:backup': createIcon( - ` - - - - -`, - 80 - ), - 'aws:batch': createIcon( - ` - - - - -`, - 80 - ), - 'aws:bedrock': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:billing-conductor': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:bottlerocket': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:braket': createIcon( - ` - - - - -`, - 80 - ), - 'aws:budgets': createIcon( - ` - - - - -`, - 80 - ), - 'aws:certificate-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:chatbot': createIcon( - ` - - - - -`, - 80 - ), - 'aws:chime-sdk': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:chime': createIcon( - ` - - - - -`, - 80 - ), - 'aws:clean-rooms': createIcon( - ` - - - - -`, - 80 - ), - 'aws:client-vpn': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloud-control-api': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:cloud-development-kit': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloud-directory': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:cloud-map': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloud-wan': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloud9': createIcon( - ` - - - - -`, - 80 - ), - - 'aws:cloudhsm': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloudsearch': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cloudshell': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:cloudtrail': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codeartifact': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:codebuild': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codecatalyst': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codecommit': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codedeploy': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codeguru': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codepipeline': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codestar': createIcon( - ` - - - - -`, - 80 - ), - 'aws:codewhisperer': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:cognito': createIcon( - ` - - - - -`, - 80 - ), - 'aws:command-line-interface': createIcon( - ` - - - - -`, - 80 - ), - 'aws:comprehend-medical': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:comprehend': createIcon( - ` - - - - -`, - 80 - ), - 'aws:compute-optimizer': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:config': createIcon( - ` - - - - -`, - 80 - ), - 'aws:connect': createIcon( - ` - - - - -`, - 80 - ), - 'aws:console-mobile-application': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:control-tower': createIcon( - ` - - - - -`, - 80 - ), - 'aws:corretto': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:cost-and-usage-report': createIcon( - ` - - - - -`, - 80 - ), - 'aws:cost-explorer': createIcon( - ` - - - - -`, - 80 - ), - 'aws:data-exchange': createIcon( - ` - - - - -`, - 80 - ), - 'aws:data-pipeline': createIcon( - ` - - - - -`, - 80 - ), - 'aws:database-migration-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:datasync': createIcon( - ` - - - - -`, - 80 - ), - 'aws:datazone': createIcon( - ` - - - - -`, - 80 - ), - 'aws:deep-learning-amis': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:deep-learning-containers': createIcon( - ` - - - - -`, - 80 - ), - 'aws:deepcomposer': createIcon( - ` - - - - -`, - 80 - ), - 'aws:deeplens': createIcon( - ` - - - - -`, - 80 - ), - 'aws:deepracer': createIcon( - ` - - - - -`, - 80 - ), - 'aws:detective': createIcon( - ` - - - - -`, - 80 - ), - 'aws:device-farm': createIcon( - ` - - - - -`, - 80 - ), - 'aws:devops-guru': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:direct-connect': createIcon( - ` - - - - -`, - 80 - ), - 'aws:directory-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:distro-for-opentelemetry': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:ec2-auto-scaling': createIcon( - ` - - - - -`, - 80 - ), - 'aws:ec2-image-builder': createIcon( - ` - - - - -`, - 80 - ), - 'aws:ecs-anywhere': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:eks-anywhere': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:eks-cloud': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:eks-distro': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:elastic-block-store': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-container-registry': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-container-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-disaster-recovery': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-fabric-adapter': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:elastic-inference': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-kubernetes-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-load-balancing': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elastic-transcoder': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elasticache': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-appliances-&-software': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-conductor': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-delta': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-link': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:elemental-live': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-mediaconnect': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-mediaconvert': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-medialive': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-mediapackage': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-mediastore': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-mediatailor': createIcon( - ` - - - - -`, - 80 - ), - 'aws:elemental-server': createIcon( - ` - - - - -`, - 80 - ), - 'aws:emr': createIcon( - ` - - - - -`, - 80 - ), - 'aws:entity-resolution': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:eventbridge': createIcon( - ` - - - - -`, - 80 - ), - 'aws:express-workflows': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fault-injection-simulator': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:file-cache': createIcon( - ` - - - - -`, - 80 - ), - 'aws:finspace': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:firewall-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:forecast': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fraud-detector': createIcon( - ` - - - - -`, - 80 - ), - 'aws:freertos': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fsx-for-lustre': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fsx-for-netapp-ontap': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:fsx-for-openzfs': createIcon( - ` - - - - -`, - 80 - ), - 'aws:fsx-for-wfs': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:fsx': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:gamekit': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:gamelift': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:gamesparks': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:genomics-cli': createIcon( - ` - - - - -`, - 80 - ), - 'aws:global-accelerator': createIcon( - ` - - - - -`, - 80 - ), - 'aws:glue-databrew': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:glue-elastic-views': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:glue': createIcon( - ` - - - - -`, - 80 - ), - 'aws:ground-station': createIcon( - ` - - - - -`, - 80 - ), - 'aws:guardduty': createIcon( - ` - - - - -`, - 80 - ), - 'aws:health-dashboard': createIcon( - ` - - - - -`, - 80 - ), - 'aws:healthimaging': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:healthlake': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:healthomics': createIcon( - ` - - - - -`, - 80 - ), - 'aws:healthscribe': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:honeycode': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iam-identity-center': createIcon( - ` - - - - -`, - 80 - ), - 'aws:inspector': createIcon( - ` - - - - -`, - 80 - ), - 'aws:interactive-video-service': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iot-1-click': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-analytics': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-button': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-core': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-device-defender': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-device-management': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-events': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-expresslink': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iot-fleetwise': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iot-greengrass': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-roborunner': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iot-sitewise': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-things-graph': createIcon( - ` - - - - -`, - 80 - ), - 'aws:iot-twinmaker': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:iq': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:kendra': createIcon( - ` - - - - -`, - 80 - ), - 'aws:keyspaces': createIcon( - ` - - - - -`, - 80 - ), - 'aws:kinesis-data-firehose': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:kinesis-data-streams': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:kinesis-video-streams': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:lake-formation': createIcon( - ` - - - - -`, - 80 - ), - 'aws:launch-wizard': createIcon( - ` - - - - -`, - 80 - ), - 'aws:lex': createIcon( - ` - - - - -`, - 80 - ), - 'aws:license-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:lightsail-for-research': createIcon( - ` - - - - -`, - 80 - ), - 'aws:local-zones': createIcon( - ` - - - - -`, - 80 - ), - 'aws:location-service': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:lookout-for-equipment': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:lookout-for-metrics': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:lookout-for-vision': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:macie': createIcon( - ` - - - - -`, - 80 - ), - 'aws:mainframe-modernization': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:managed-blockchain': createIcon( - ` - - - - -`, - 80 - ), - 'aws:managed-grafana': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:managed-service-for-apache-flink': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:managed-service-for-prometheus': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:managed-services': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:managed-streaming-for-apache-kafka': createIcon( - ` - - - - -`, - 80 - ), - 'aws:managed-workflows-for-apache-airflow': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:management-console': createIcon( - ` - - - - -`, - 80 - ), - 'aws:marketplace_dark': createIcon( - ` - - - - -`, - 80 - ), - 'aws:marketplace_light': createIcon( - ` - - - - -`, - 80 - ), - 'aws:memorydb-for-redis': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:migration-evaluator': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:migration-hub': createIcon( - ` - - - - -`, - 80 - ), - 'aws:monitron': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:mq': createIcon( - ` - - - - -`, - 80 - ), - 'aws:network-firewall': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:neuron': createIcon( - ` - - - - -`, - 80 - ), - 'aws:nice-dcv': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:nice-enginframe': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:nimble-studio': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:nitro-enclaves': createIcon( - ` - - - - -`, - 80 - ), - 'aws:open-3d-engine': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:opensearch-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:opsworks': createIcon( - ` - - - - -`, - 80 - ), - 'aws:organizations': createIcon( - ` - - - - -`, - 80 - ), - 'aws:outposts-family': createIcon( - ` - - - - -`, - 80 - ), - 'aws:outposts-rack': createIcon( - ` - - - - -`, - 80 - ), - 'aws:outposts-servers': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:panorama': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:parallel-cluster': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:payment-cryptography': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:personalize': createIcon( - ` - - - - -`, - 80 - ), - 'aws:pinpoint-apis': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:pinpoint': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:polly': createIcon( - ` - - - - -`, - 80 - ), - 'aws:private-5g': createIcon( - ` - - - - -`, - 80 - ), - 'aws:private-certificate-authority': createIcon( - ` - - - - -`, - 80 - ), - 'aws:privatelink': createIcon( - ` - - - - -`, - 80 - ), - 'aws:professional-services': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:proton': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:q': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:quantum-ledger-database': createIcon( - ` - - - - -`, - 80 - ), - 'aws:quicksight': createIcon( - ` - - - - -`, - 80 - ), - 'aws:rds-on-vmware': createIcon( - ` - - - - -`, - 80 - ), - 'aws:red-hat-openshift-service-on-aws': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:rekognition': createIcon( - ` - - - - -`, - 80 - ), - 'aws:repost-private': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:repost': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:reserved-instance-reporting': createIcon( - ` - - - - -`, - 80 - ), - 'aws:resilience-hub': createIcon( - ` - - - - -`, - 80 - ), - 'aws:resource-access-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:resource-explorer': createIcon( - ` - - - - -`, - 80 - ), - 'aws:robomaker': createIcon( - ` - - - - -`, - 80 - ), - 'aws:s3-on-outposts': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:sagemaker-ground-truth': createIcon( - ` - - - - -`, - 80 - ), - 'aws:sagemaker-studio-lab': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:sagemaker': createIcon( - ` - - - - -`, - 80 - ), - 'aws:savings-plans': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:security-hub': createIcon( - ` - - - - -`, - 80 - ), - 'aws:security-lake': createIcon( - ` - - - - -`, - 80 - ), - 'aws:serverless-application-repository': createIcon( - ` - - - - -`, - 80 - ), - 'aws:service-catalog': createIcon( - ` - - - - -`, - 80 - ), - 'aws:service-management-connector': createIcon( - ` - - - - -`, - 80 - ), - 'aws:shield': createIcon( - ` - - - - -`, - 80 - ), - 'aws:signer': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:simple-email-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:simple-notification-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:simple-queue-service': createIcon( - ` - - - - -`, - 80 - ), - 'aws:simple-storage-service-glacier': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:simspace-weaver': createIcon( - ` - - - - -`, - 80 - ), - 'aws:site-to-site-vpn': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:snowball-edge': createIcon( - ` - - - - -`, - 80 - ), - 'aws:snowball': createIcon( - ` - - - - -`, - 80 - ), - 'aws:snowcone': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:snowmobile': createIcon( - ` - - - - -`, - 80 - ), - 'aws:step-functions': createIcon( - ` - - - - -`, - 80 - ), - 'aws:storage-gateway': createIcon( - ` - - - - -`, - 80 - ), - 'aws:supply-chain': createIcon( - ` - - - - -`, - 80 - ), - 'aws:support': createIcon( - ` - - - - -`, - 80 - ), - 'aws:systems-manager': createIcon( - ` - - - - -`, - 80 - ), - 'aws:telco-network-builder': createIcon( - ` - - - - -`, - 80 - ), - 'aws:tensorflow-on-aws': createIcon( - ` - - - - -`, - 80 - ), - 'aws:textract': createIcon( - ` - - - - -`, - 80 - ), - 'aws:thinkbox-deadline': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:thinkbox-frost': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:thinkbox-krakatoa': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:thinkbox-sequoia': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:thinkbox-stoke': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:thinkbox-xmesh': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:tools-and-sdks': createIcon( - ` - - - - -`, - 80 - ), - 'aws:torchserve': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:training-certification': createIcon( - ` - - - - -`, - 80 - ), - 'aws:transcribe': createIcon( - ` - - - - -`, - 80 - ), - 'aws:transfer-family': createIcon( - ` - - - - -`, - 80 - ), - 'aws:transit-gateway': createIcon( - ` - - - - -`, - 80 - ), - 'aws:translate': createIcon( - ` - - - - -`, - 80 - ), - 'aws:trusted-advisor': createIcon( - ` - - - - -`, - 80 - ), - 'aws:verified-access': createIcon( - ` - - - - -`, - 80 - ), - 'aws:verified-permissions': createIcon( - ` - - - - -`, - 80 - ), - 'aws:vmware-cloud-on-aws': createIcon( - ` - - - - -`, - 80 - ), - 'aws:vpc-lattice': createIcon( - ` - - - - -`, - 80 - ), - 'aws:waf': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:wavelength': createIcon( - ` - - - - -`, - 80 - ), - 'aws:well-architected-tool': createIcon( - ` - - - - -`, - 80 - ), - 'aws:wickr': createIcon( - ` - - - - -`, - 80 - ), - 'aws:workdocs-sdk': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:workdocs': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:worklink': createIcon( - ` - - - - -`, - 80 - ), - 'aws:workmail': createIcon( - ` - - - - -`, - 80 - ), - 'aws:workspaces-family': createIcon( - ` - - - - -`, - 80 - ), - 'aws:workspaces-thin-client': createIcon( - ` - - - - - - -`, - 80 - ), - 'aws:x-ray': createIcon( - ` - - - - -`, - 80 - ), -}; - -export default awsIcons; diff --git a/packages/mermaid/src/rendering-util/svg/default/blank.ts b/packages/mermaid/src/rendering-util/svg/default/blank.ts deleted file mode 100644 index 53bf8b92c..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/blank.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Designer: Nicolas Newman - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/cloud.ts b/packages/mermaid/src/rendering-util/svg/default/cloud.ts deleted file mode 100644 index ad4d860f5..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/cloud.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - - `, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/database.ts b/packages/mermaid/src/rendering-util/svg/default/database.ts deleted file mode 100644 index d0fb31296..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/database.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - - - - - - -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/disk.ts b/packages/mermaid/src/rendering-util/svg/default/disk.ts deleted file mode 100644 index 6e21be9e6..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/disk.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - - - - - - - - -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/internet.ts b/packages/mermaid/src/rendering-util/svg/default/internet.ts deleted file mode 100644 index fd23d2aca..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/internet.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - - - - - - - -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/server.ts b/packages/mermaid/src/rendering-util/svg/default/server.ts deleted file mode 100644 index e73e8c406..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/server.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/default/unknown.ts b/packages/mermaid/src/rendering-util/svg/default/unknown.ts deleted file mode 100644 index c6889be9b..000000000 --- a/packages/mermaid/src/rendering-util/svg/default/unknown.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Designer: Nicolas Newman - * @see https://github.com/NicolasNewman/IconLibrary - */ -import { createIcon } from '../../svgRegister.js'; - -export default createIcon( - ` - - ? -`, - 80 -); diff --git a/packages/mermaid/src/rendering-util/svg/digital-ocean/digitalOcean.ts b/packages/mermaid/src/rendering-util/svg/digital-ocean/digitalOcean.ts deleted file mode 100644 index bf2501dc5..000000000 --- a/packages/mermaid/src/rendering-util/svg/digital-ocean/digitalOcean.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { createIcon } from '../../svgRegister.js'; -// cSpell:disable -const digitalOceanIcons = { - 'do:api': createIcon( - ` - - - - - - - -`, - 41.61 - ), - 'do:cli': createIcon( - ` - - - - - - - - - -`, - 41.61 - ), - 'do:dns': createIcon( - ` - - - - - - - - - - - - -`, - 41.61 - ), - 'do:droplet': createIcon( - ` - - - - - - - - -`, - 41.61 - ), - 'do:kubernetes': createIcon( - ` - - - - - - - -`, - 41.61 - ), - 'do:local-ssd': createIcon( - ` - - - - - - - - -`, - 41.61 - ), - 'do:mysql': createIcon( - ` - - - - - - - - - - - - - - - -`, - 41.61 - ), - 'do:redis-copy': createIcon( - ` - - - - - - - - - - - - - - - - - - - -`, - 41.61 - ), - 'do:redis': createIcon( - ` - - - - - - - - - - - - - - - - -`, - 41.61 - ), - 'do:monitoring': createIcon( - ` - - - - - - - - - - - - -`, - 41.61 - ), - 'do:projects': createIcon( - ` - - - - - - - - - - - - - -`, - 41.61 - ), - 'do:spaces-cdn': createIcon( - ` - - - - - - - - - - - - -`, - 41.61 - ), - 'do:spaces-object-storage': createIcon( - ` - - - - - - - - - - - - -`, - 41.61 - ), - 'do:teams': createIcon( - ` - - - - - - - - - - - - -`, - 41.61 - ), - 'do:terraform-provider': createIcon( - ` - - - - - - - - - - -`, - 41.61 - ), - 'do:volumes-block-storage': createIcon( - ` - - - - - - - - - - - - - - - -`, - 41.61 - ), -}; - -export default digitalOceanIcons; diff --git a/packages/mermaid/src/rendering-util/svg/github/github.ts b/packages/mermaid/src/rendering-util/svg/github/github.ts deleted file mode 100644 index 6b90573eb..000000000 --- a/packages/mermaid/src/rendering-util/svg/github/github.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { createIcon } from '../../svgRegister.js'; - -const githubIcons = { - 'gh:action': createIcon( - ` - - - - - - - -`, - 200 - ), - 'gh:github': createIcon( - ` - -`, - 98 - ), -}; - -export default githubIcons; diff --git a/packages/mermaid/src/rendering-util/svg/index.ts b/packages/mermaid/src/rendering-util/svg/index.ts deleted file mode 100644 index 22a8514a7..000000000 --- a/packages/mermaid/src/rendering-util/svg/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { IconLibrary } from '../svgRegister.js'; -import database from './default/database.js'; -import server from './default/server.js'; -import disk from './default/disk.js'; -import internet from './default/internet.js'; -import cloud from './default/cloud.js'; -import unknown from './default/unknown.js'; -import blank from './default/blank.js'; - -/** Creates a resolver to the path to lazy-load included icon packs */ -const getIconNamespaces = (basePath: string) => ({ - 'aws:common': `${basePath}/aws/awsCommon.js`, - 'aws:full': `${basePath}/aws/awsFull.js`, - github: `${basePath}/github/github.js`, - 'digital-ocean': `${basePath}/digital-ocean/digitalOcean.js`, -}); - -type IconNamespaceKeys = keyof ReturnType; - -const defaultIconLibrary: IconLibrary = { - database: database, - server: server, - disk: disk, - internet: internet, - cloud: cloud, - unknown: unknown, - blank: blank, -}; - -export default defaultIconLibrary; -export { getIconNamespaces }; -export type { IconNamespaceKeys }; diff --git a/packages/mermaid/src/rendering-util/svgRegister.ts b/packages/mermaid/src/rendering-util/svgRegister.ts deleted file mode 100644 index 6a21d5b8b..000000000 --- a/packages/mermaid/src/rendering-util/svgRegister.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { Selection } from 'd3-selection'; - -type IconResolver = ( - parent: Selection, - width?: number -) => Selection; -type IconLibrary = Record; - -/** - * Converts an SVG Icon passed as a string into a properly formatted IconResolver - * @param icon - html code for the svg icon as a string (the SVG tag should not be included) - * @param originalSize - the original size of the SVG Icon in pixels - * @returns IconResolver - */ -const createIcon: (icon: string, originalSize: number) => IconResolver = (icon, originalSize) => { - return ( - parent: Selection, - size: number = originalSize - ) => { - parent.html(`${icon}`); - return parent; - }; -}; - -const icons: IconLibrary = {}; - -const isIconNameInUse = (name: string): boolean => { - return icons[name] !== undefined; -}; - -const registerIcon = (name: string, resolver: IconResolver) => { - if (!isIconNameInUse(name)) { - icons[name] = resolver; - } -}; - -const registerIcons = (library: IconLibrary) => { - Object.entries(library).forEach(([name, resolver]) => { - if (!isIconNameInUse(name)) { - icons[name] = resolver; - } - }); -}; - -const getIcon = (name: string): IconResolver | null => { - if (isIconNameInUse(name)) { - return icons[name]; - } - return icons.unknown; -}; - -export { - registerIcon, - registerIcons, - getIcon, - isIconNameInUse, - createIcon, - IconLibrary, - IconResolver, -}; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index e90285574..a7b3549eb 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -227,11 +227,6 @@ properties: fall back to legacy rendering for KaTeX. type: boolean default: false - iconLibraries: - description: | - This option specifies an object contianing a mappig of SVG icon names to a resolver that returns the svg code. - For supported diagrams (i.e., Architecture), their syntax allows refering to key names in this object to display the corresponding SVG icon in the rendered diagram. - tsType: Array forceLegacyMathML: description: | This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 4b864f523..4cf29b73a 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,5 +1,17 @@ # @mermaid-js/parser +## 0.3.0 + +### Minor Changes + +- [#5452](https://github.com/mermaid-js/mermaid/pull/5452) [`256a148`](https://github.com/mermaid-js/mermaid/commit/256a148bbf484fc7db6c19f94dd69d5d268ee048) Thanks [@NicolasNewman](https://github.com/NicolasNewman)! - New Diagram: Architecture + + Adds architecture diagrams which allows users to show relations between services. + +### Patch Changes + +- [#5793](https://github.com/mermaid-js/mermaid/pull/5793) [`7d8143b`](https://github.com/mermaid-js/mermaid/commit/7d8143b917ee3562149a0e0a821ed2d6f29cc05d) Thanks [@sidharthv96](https://github.com/sidharthv96)! - feat: Support - in architecture icons + ## 0.2.0 ### Minor Changes diff --git a/packages/parser/package.json b/packages/parser/package.json index fc70e844b..a26a2a71e 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@mermaid-js/parser", - "version": "0.2.0", + "version": "0.3.0", "description": "MermaidJS parser", "author": "Yokozuna59", "contributors": [ diff --git a/packages/parser/src/language/architecture/architecture.langium b/packages/parser/src/language/architecture/architecture.langium index 6246b423e..11af26243 100644 --- a/packages/parser/src/language/architecture/architecture.langium +++ b/packages/parser/src/language/architecture/architecture.langium @@ -49,7 +49,7 @@ Edge: terminal ARROW_DIRECTION: 'L' | 'R' | 'T' | 'B'; terminal ARCH_ID: /[\w]+/; terminal ARCH_TEXT_ICON: /\("[^"]+"\)/; -terminal ARCH_ICON: /\([\w:]+\)/; +terminal ARCH_ICON: /\([\w-:]+\)/; terminal ARCH_TITLE: /\[[\w ]+\]/; terminal ARROW_GROUP: /\{group\}/; -terminal ARROW_INTO: /<|>/; \ No newline at end of file +terminal ARROW_INTO: /<|>/; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8e7d0411..7fcdbb5f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 3.44.7(encoding@0.1.13)(typescript@5.4.5) '@argos-ci/cypress': specifier: ^2.1.0 - version: 2.1.2(cypress@13.14.0) + version: 2.1.2(cypress@13.14.1) '@changesets/changelog-github': specifier: ^0.5.0 version: 0.5.0(encoding@0.1.13) @@ -25,7 +25,7 @@ importers: version: 8.13.3(eslint@9.8.0) '@cypress/code-coverage': specifier: ^3.12.30 - version: 3.12.45(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)))(cypress@13.14.0)(webpack@5.93.0(esbuild@0.21.5)) + version: 3.12.45(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)))(cypress@13.14.1)(webpack@5.93.0(esbuild@0.21.5)) '@eslint/js': specifier: ^9.4.0 version: 9.8.0 @@ -87,11 +87,11 @@ importers: specifier: ^8.6.0 version: 8.14.2 cypress: - specifier: ^13.11.0 - version: 13.14.0 + specifier: ^13.14.1 + version: 13.14.1 cypress-image-snapshot: specifier: ^4.0.1 - version: 4.0.1(cypress@13.14.0)(jest@29.7.0(@types/node@20.16.2)) + version: 4.0.1(cypress@13.14.1)(jest@29.7.0(@types/node@20.16.2)) esbuild: specifier: ^0.21.5 version: 0.21.5 @@ -170,9 +170,6 @@ importers: path-browserify: specifier: ^1.0.1 version: 1.0.1 - pnpm: - specifier: ^8.15.5 - version: 8.15.9 prettier: specifier: ^3.2.5 version: 3.3.3 @@ -212,6 +209,9 @@ importers: '@braintree/sanitize-url': specifier: ^7.0.1 version: 7.1.0 + '@iconify/utils': + specifier: ^2.1.32 + version: 2.1.32 '@mermaid-js/parser': specifier: workspace:^ version: link:../parser @@ -267,6 +267,9 @@ importers: '@adobe/jsonschema2md': specifier: ^8.0.0 version: 8.0.2 + '@iconify/types': + specifier: ^2.0.0 + version: 2.0.0 '@types/cytoscape': specifier: ^3.21.4 version: 3.21.5 @@ -500,6 +503,67 @@ importers: specifier: ^7.0.0 version: 7.1.0 + packages/mermaid/src/vitepress: + dependencies: + '@mdi/font': + specifier: ^7.0.0 + version: 7.4.47 + '@vueuse/core': + specifier: ^10.9.0 + version: 10.11.1(vue@3.4.38(typescript@5.4.5)) + font-awesome: + specifier: ^4.7.0 + version: 4.7.0 + jiti: + specifier: ^1.21.0 + version: 1.21.6 + mermaid: + specifier: workspace:^ + version: link:../.. + vue: + specifier: ^3.4.21 + version: 3.4.38(typescript@5.4.5) + devDependencies: + '@iconify-json/carbon': + specifier: ^1.1.31 + version: 1.1.37 + '@unocss/reset': + specifier: ^0.59.0 + version: 0.59.4 + '@vite-pwa/vitepress': + specifier: ^0.4.0 + version: 0.4.0(vite-plugin-pwa@0.19.8(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0)) + '@vitejs/plugin-vue': + specifier: ^5.0.0 + version: 5.1.2(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5)) + fast-glob: + specifier: ^3.3.2 + version: 3.3.2 + https-localhost: + specifier: ^4.7.1 + version: 4.7.1 + pathe: + specifier: ^1.1.2 + version: 1.1.2 + unocss: + specifier: ^0.59.0 + version: 0.59.4(postcss@8.4.41)(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) + unplugin-vue-components: + specifier: ^0.26.0 + version: 0.26.0(@babel/parser@7.25.4)(rollup@4.21.1)(vue@3.4.38(typescript@5.4.5)) + vite: + specifier: ^5.0.0 + version: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + vite-plugin-pwa: + specifier: ^0.19.7 + version: 0.19.8(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0) + vitepress: + specifier: 1.1.4 + version: 1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.1)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5) + workbox-window: + specifier: ^7.0.0 + version: 7.1.0 + packages/parser: dependencies: langium: @@ -612,6 +676,9 @@ packages: '@antfu/install-pkg@0.1.1': resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==} + '@antfu/install-pkg@0.4.1': + resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} + '@antfu/utils@0.7.10': resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} @@ -2175,6 +2242,9 @@ packages: '@iconify/utils@2.1.30': resolution: {integrity: sha512-bY0IO5xLOlbzJBnjWLxknp6Sss3yla03sVY9VeUz9nT6dbc+EGKlLfCt+6uytJnWm5CUvTF/BNotsLWF7kI61A==} + '@iconify/utils@2.1.32': + resolution: {integrity: sha512-LeifFZPPKu28O3AEDpYJNdEbvS4/ojAPyIW+pF/vUpJTYnbTiXUHkCh0bwgFRzKvdpb8H4Fbfd/742++MF4fPQ==} + '@img/sharp-darwin-arm64@0.33.5': resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -4354,8 +4424,8 @@ packages: cypress-wait-until@3.0.2: resolution: {integrity: sha512-iemies796dD5CgjG5kV0MnpEmKSH+s7O83ZoJLVzuVbZmm4lheMsZqAVT73hlMx4QlkwhxbyUzhOBUOZwoOe0w==} - cypress@13.14.0: - resolution: {integrity: sha512-r0+nhd033x883YL6068futewUsl02Q7rWiinyAAIBDW/OOTn+UMILWgNuCiY3vtJjd53efOqq5R9dctQk/rKiw==} + cypress@13.14.1: + resolution: {integrity: sha512-Wo+byPmjps66hACEH5udhXINEiN3qS3jWNGRzJOjrRJF3D0+YrcP2LVB1T7oYaVQM/S+eanqEvBWYc8cf7Vcbg==} engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true @@ -7147,6 +7217,9 @@ packages: package-json-from-dist@1.0.0: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -7325,11 +7398,6 @@ packages: resolution: {integrity: sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==} engines: {node: '>=12.13.0'} - pnpm@8.15.9: - resolution: {integrity: sha512-SZQ0ydj90aJ5Tr9FUrOyXApjOrzuW7Fee13pDzL0e1E6ypjNXP0AHDHw20VLw4BO3M1XhQHkyik6aBYWa72fgQ==} - engines: {node: '>=16.14'} - hasBin: true - points-on-curve@0.2.0: resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==} @@ -8283,6 +8351,9 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinypool@0.8.4: resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} @@ -9281,6 +9352,11 @@ snapshots: execa: 5.1.1 find-up: 5.0.0 + '@antfu/install-pkg@0.4.1': + dependencies: + package-manager-detector: 0.2.0 + tinyexec: 0.3.0 + '@antfu/utils@0.7.10': {} '@apideck/better-ajv-errors@0.3.6(ajv@8.17.1)': @@ -9554,12 +9630,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@argos-ci/cypress@2.1.2(cypress@13.14.0)': + '@argos-ci/cypress@2.1.2(cypress@13.14.1)': dependencies: '@argos-ci/browser': 2.1.3 '@argos-ci/core': 2.5.0 '@argos-ci/util': 2.1.1 - cypress: 13.14.0 + cypress: 13.14.1 cypress-wait-until: 3.0.2 transitivePeerDependencies: - supports-color @@ -10906,14 +10982,14 @@ snapshots: '@cspell/url@8.14.2': {} - '@cypress/code-coverage@3.12.45(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)))(cypress@13.14.0)(webpack@5.93.0(esbuild@0.21.5))': + '@cypress/code-coverage@3.12.45(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)))(cypress@13.14.1)(webpack@5.93.0(esbuild@0.21.5))': dependencies: '@babel/core': 7.25.2 '@babel/preset-env': 7.25.4(@babel/core@7.25.2) '@cypress/webpack-preprocessor': 6.0.2(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)))(webpack@5.93.0(esbuild@0.21.5)) babel-loader: 9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)) chalk: 4.1.2 - cypress: 13.14.0 + cypress: 13.14.1 dayjs: 1.11.12 debug: 4.3.6(supports-color@8.1.1) execa: 4.1.0 @@ -11249,6 +11325,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@iconify/utils@2.1.32': + dependencies: + '@antfu/install-pkg': 0.4.1 + '@antfu/utils': 0.7.10 + '@iconify/types': 2.0.0 + debug: 4.3.6(supports-color@8.1.1) + kolorist: 1.8.0 + local-pkg: 0.5.0 + mlly: 1.7.1 + transitivePeerDependencies: + - supports-color + '@img/sharp-darwin-arm64@0.33.5': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.0.4 @@ -12301,6 +12389,16 @@ snapshots: transitivePeerDependencies: - rollup + '@unocss/astro@0.59.4(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))': + dependencies: + '@unocss/core': 0.59.4 + '@unocss/reset': 0.59.4 + '@unocss/vite': 0.59.4(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) + optionalDependencies: + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + transitivePeerDependencies: + - rollup + '@unocss/cli@0.59.4(rollup@2.79.1)': dependencies: '@ampproject/remapping': 2.3.0 @@ -12319,6 +12417,24 @@ snapshots: transitivePeerDependencies: - rollup + '@unocss/cli@0.59.4(rollup@4.21.1)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.0(rollup@4.21.1) + '@unocss/config': 0.59.4 + '@unocss/core': 0.59.4 + '@unocss/preset-uno': 0.59.4 + cac: 6.7.14 + chokidar: 3.6.0 + colorette: 2.0.20 + consola: 3.2.3 + fast-glob: 3.3.2 + magic-string: 0.30.11 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + transitivePeerDependencies: + - rollup + '@unocss/config@0.59.4': dependencies: '@unocss/core': 0.59.4 @@ -12444,6 +12560,22 @@ snapshots: transitivePeerDependencies: - rollup + '@unocss/vite@0.59.4(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.0(rollup@4.21.1) + '@unocss/config': 0.59.4 + '@unocss/core': 0.59.4 + '@unocss/inspector': 0.59.4 + '@unocss/scope': 0.59.4 + '@unocss/transformer-directives': 0.59.4 + chokidar: 3.6.0 + fast-glob: 3.3.2 + magic-string: 0.30.11 + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + transitivePeerDependencies: + - rollup + '@vite-pwa/vitepress@0.4.0(vite-plugin-pwa@0.19.8(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0))': dependencies: vite-plugin-pwa: 0.19.8(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0) @@ -13873,10 +14005,10 @@ snapshots: cuint@0.2.2: {} - cypress-image-snapshot@4.0.1(cypress@13.14.0)(jest@29.7.0(@types/node@20.16.2)): + cypress-image-snapshot@4.0.1(cypress@13.14.1)(jest@29.7.0(@types/node@20.16.2)): dependencies: chalk: 2.4.2 - cypress: 13.14.0 + cypress: 13.14.1 fs-extra: 7.0.1 glob: 7.2.3 jest-image-snapshot: 4.2.0(jest@29.7.0(@types/node@20.16.2)) @@ -13887,7 +14019,7 @@ snapshots: cypress-wait-until@3.0.2: {} - cypress@13.14.0: + cypress@13.14.1: dependencies: '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) @@ -14923,7 +15055,7 @@ snapshots: proxy-addr: 2.0.7 rfdc: 1.4.1 secure-json-parse: 2.7.0 - semver: 7.6.2 + semver: 7.6.3 tiny-lru: 8.0.2 transitivePeerDependencies: - supports-color @@ -16599,7 +16731,7 @@ snapshots: mdast-util-from-markdown@2.0.1: dependencies: '@types/mdast': 4.0.4 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 decode-named-character-reference: 1.0.2 devlop: 1.1.0 mdast-util-to-string: 4.0.0 @@ -16689,7 +16821,7 @@ snapshots: mdast-util-to-markdown@2.1.0: dependencies: '@types/mdast': 4.0.4 - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 longest-streak: 3.1.0 mdast-util-phrasing: 4.1.0 mdast-util-to-string: 4.0.0 @@ -17290,6 +17422,8 @@ snapshots: package-json-from-dist@1.0.0: {} + package-manager-detector@0.2.0: {} + pako@1.0.11: {} parent-module@1.0.1: @@ -17453,8 +17587,6 @@ snapshots: pngjs@6.0.0: {} - pnpm@8.15.9: {} - points-on-curve@0.2.0: {} points-on-path@0.2.1: @@ -18556,6 +18688,8 @@ snapshots: tinybench@2.9.0: {} + tinyexec@0.3.0: {} + tinypool@0.8.4: {} tinyspy@2.2.1: {} @@ -18795,7 +18929,7 @@ snapshots: unist-util-stringify-position@4.0.0: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-visit-parents@6.0.1: dependencies: @@ -18843,6 +18977,35 @@ snapshots: - rollup - supports-color + unocss@0.59.4(postcss@8.4.41)(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)): + dependencies: + '@unocss/astro': 0.59.4(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) + '@unocss/cli': 0.59.4(rollup@4.21.1) + '@unocss/core': 0.59.4 + '@unocss/extractor-arbitrary-variants': 0.59.4 + '@unocss/postcss': 0.59.4(postcss@8.4.41) + '@unocss/preset-attributify': 0.59.4 + '@unocss/preset-icons': 0.59.4 + '@unocss/preset-mini': 0.59.4 + '@unocss/preset-tagify': 0.59.4 + '@unocss/preset-typography': 0.59.4 + '@unocss/preset-uno': 0.59.4 + '@unocss/preset-web-fonts': 0.59.4 + '@unocss/preset-wind': 0.59.4 + '@unocss/reset': 0.59.4 + '@unocss/transformer-attributify-jsx': 0.59.4 + '@unocss/transformer-attributify-jsx-babel': 0.59.4 + '@unocss/transformer-compile-class': 0.59.4 + '@unocss/transformer-directives': 0.59.4 + '@unocss/transformer-variant-group': 0.59.4 + '@unocss/vite': 0.59.4(rollup@4.21.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) + optionalDependencies: + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + unpipe@1.0.0: {} unplugin-vue-components@0.26.0(@babel/parser@7.25.4)(rollup@2.79.1)(vue@3.4.38(typescript@5.4.5)): @@ -18864,6 +19027,25 @@ snapshots: - rollup - supports-color + unplugin-vue-components@0.26.0(@babel/parser@7.25.4)(rollup@4.21.1)(vue@3.4.38(typescript@5.4.5)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.0(rollup@4.21.1) + chokidar: 3.6.0 + debug: 4.3.6(supports-color@8.1.1) + fast-glob: 3.3.2 + local-pkg: 0.4.3 + magic-string: 0.30.11 + minimatch: 9.0.5 + resolve: 1.22.8 + unplugin: 1.12.0 + vue: 3.4.38(typescript@5.4.5) + optionalDependencies: + '@babel/parser': 7.25.4 + transitivePeerDependencies: + - rollup + - supports-color + unplugin@1.12.0: dependencies: acorn: 8.12.1 @@ -18919,12 +19101,12 @@ snapshots: vfile-message@4.0.2: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 vfile@6.0.2: dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2