From 03bbfa0b9467ac79d91542760b7bbe624eb4c042 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 11 Mar 2024 13:37:47 -0500 Subject: [PATCH 01/73] build: added cytoscape-fcose --- packages/mermaid/package.json | 2 ++ pnpm-lock.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 3626671ca..ad2a708d2 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -64,6 +64,7 @@ "@types/d3-scale-chromatic": "^3.0.0", "cytoscape": "^3.28.1", "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-fcose": "^2.2.0", "d3": "^7.4.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.10", @@ -83,6 +84,7 @@ "devDependencies": { "@adobe/jsonschema2md": "^7.1.4", "@types/cytoscape": "^3.19.9", + "@types/cytoscape-fcose": "^2.2.4", "@types/d3": "^7.4.0", "@types/d3-sankey": "^0.12.1", "@types/d3-scale": "^4.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index faac50fae..0853a8d39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,6 +214,9 @@ importers: cytoscape-cose-bilkent: specifier: ^4.1.0 version: 4.1.0(cytoscape@3.28.1) + cytoscape-fcose: + specifier: ^2.2.0 + version: 2.2.0(cytoscape@3.28.1) d3: specifier: ^7.4.0 version: 7.8.5 @@ -266,6 +269,9 @@ importers: '@types/cytoscape': specifier: ^3.19.9 version: 3.19.16 + '@types/cytoscape-fcose': + specifier: ^2.2.4 + version: 2.2.4 '@types/d3': specifier: ^7.4.0 version: 7.4.3 @@ -4811,6 +4817,12 @@ packages: '@types/node': 20.11.24 dev: true + /@types/cytoscape-fcose@2.2.4: + resolution: {integrity: sha512-QwWtnT8HI9h+DHhG5krGc1ZY0Ex+cn85MvX96ZNAjSxuXiZDnjIZW/ypVkvvubTjIY4rSdkJY1D/Nsn8NDpmAw==} + dependencies: + '@types/cytoscape': 3.19.16 + dev: true + /@types/cytoscape@3.19.16: resolution: {integrity: sha512-A3zkjaZ6cOGyqEvrVuC1YUgiRSJhDZOj8Qhd1ALH2/+YxH2za1BOmR4RWQsKYHsc+aMP/IWoqg1COuUbZ39t/g==} dev: true @@ -7885,6 +7897,12 @@ packages: layout-base: 1.0.2 dev: false + /cose-base@2.2.0: + resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} + dependencies: + layout-base: 2.0.1 + dev: false + /cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6)(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==} engines: {node: '>=v14.21.3'} @@ -8230,6 +8248,15 @@ packages: cytoscape: 3.28.1(patch_hash=claipxynndhyqyu2csninuoh5e) dev: false + /cytoscape-fcose@2.2.0(cytoscape@3.28.1): + resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==} + peerDependencies: + cytoscape: ^3.2.0 + dependencies: + cose-base: 2.2.0 + cytoscape: 3.28.1(patch_hash=claipxynndhyqyu2csninuoh5e) + dev: false + /cytoscape@3.28.1(patch_hash=claipxynndhyqyu2csninuoh5e): resolution: {integrity: sha512-xyItz4O/4zp9/239wCcH8ZcFuuZooEeF8KHRmzjDfGdXsj3OG9MFSMA0pJE0uX3uCN/ygof6hHf4L7lst+JaDg==} engines: {node: '>=0.10'} @@ -12125,6 +12152,10 @@ packages: resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==} dev: false + /layout-base@2.0.1: + resolution: {integrity: sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==} + dev: false + /lazy-ass@1.6.0: resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==} engines: {node: '> 0.8'} From 5a4d4972e22828de1b6dc630e987b525efdb8ca2 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 11 Mar 2024 13:41:43 -0500 Subject: [PATCH 02/73] feat: added architecture diagram parser --- .../architecture/parser/architecture.jison | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 packages/mermaid/src/diagrams/architecture/parser/architecture.jison diff --git a/packages/mermaid/src/diagrams/architecture/parser/architecture.jison b/packages/mermaid/src/diagrams/architecture/parser/architecture.jison new file mode 100644 index 000000000..d92a1d1db --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/parser/architecture.jison @@ -0,0 +1,119 @@ +%lex +%options case-insensitive + +%x GROUP SERVICE LINE +%% + +\%\%(?!\{)[^\n]* /* skip comments */ +[^\}]\%\%[^\n]* /* skip comments */ +[\n\r]+ { this.popState(); return 'NEWLINE'; } +\%\%[^\n]* /* do nothing */ +[\s]+ /* skip all whitespace */ +"architecture" return 'ARCHITECTURE'; +"service" { this.begin('SERVICE'); return 'SERVICE'; } +"group" { this.begin('GROUP'); return 'GROUP'; } +((?!\n)\s)+ /* skip same-line whitespace */ +"in" return 'IN'; +[\w]+ return 'id'; +\([\w]*\) return 'icon'; +\[[\w ]*\] return 'title'; +[\w]+ { this.begin('LINE'); return 'id'; } +\<[L|R|T|B]"-" return 'ARROW_LEFT_INTO'; +[L|R|T|B]"-" return 'ARROW_LEFT'; +"-"[L|R|T|B]\> return 'ARROW_RIGHT_INTO'; +"-"[L|R|T|B] return 'ARROW_RIGHT'; +[\w]+ return 'id'; +\[[\w ]*\] return 'title'; +<> return 'EOF'; + +/lex + +%start start + +%% + +start + : eol start + | ARCHITECTURE document { return $2; } + ; + +document + : /* empty */ + | document line + ; + +line + : statement eol { $$ = $1 } + ; + +statement + : /* empty */ + | group_statement + | service_statement + | line_statement + ; + +line_statement + : id ARROW_LEFT_INTO ARROW_RIGHT_INTO id + { yy.addLine($1, $2[1], $4, $3[1], {lhs_into: true, rhs_into: true}) } + | id ARROW_LEFT_INTO ARROW_RIGHT id + { yy.addLine($1, $2[1], $4, $3[1], {lhs_into: true}) } + | id ARROW_LEFT ARROW_RIGHT_INTO id + { yy.addLine($1, $2[0], $4, $3[1], {rhs_into: true}) } + | id ARROW_LEFT ARROW_RIGHT id + { yy.addLine($1, $2[0], $4, $3[1]) } + | id ARROW_LEFT_INTO title ARROW_RIGHT_INTO id + { yy.addLine($1, $2[1], $5, $4[1], { title: $3.slice(1,-1), lhs_into: true, rhs_into: true }) } + | id ARROW_LEFT_INTO title ARROW_RIGHT id + { yy.addLine($1, $2[1], $5, $4[1], { title: $3.slice(1,-1), lhs_into: true }) } + | id ARROW_LEFT title ARROW_RIGHT_INTO id + { yy.addLine($1, $2[0], $5, $4[1], { title: $3.slice(1,-1), rhs_into: true }) } + | id ARROW_LEFT title ARROW_RIGHT id + { yy.addLine($1, $2[0], $5, $4[1], { title: $3.slice(1,-1) }) } + ; + +group_statement + : 'GROUP' id + { yy.addGroup($2) } + | 'GROUP' id icon + { yy.addGroup($2, {icon: $3.slice(1,-1)}) } + | 'GROUP' id title + { yy.addGroup($2, {title: $3.slice(1,-1)}) } + | 'GROUP' id icon title + { yy.addGroup($2, {icon: $3.slice(1,-1), title: $4.slice(1,-1)}) } + | 'GROUP' id 'IN' id + { yy.addGroup($2, {in: $4.trim()}) } + | 'GROUP' id icon 'IN' id + { yy.addGroup($2, {icon: $3.slice(1,-1), in: $5.trim()}) } + | 'GROUP' id title 'IN' id + { yy.addGroup($2, {title: $3.slice(1,-1), in: $5.trim()}) } + | 'GROUP' id icon title 'IN' id + { yy.addGroup($2, {icon: $3.slice(1,-1), title: $4.slice(1,-1), in: $6.trim()}) } + ; + +service_statement + : 'SERVICE' id + { yy.addService($2) } + | 'SERVICE' id icon + { yy.addService($2, { icon: $3.slice(1,-1) }) } + | 'SERVICE' id title + { yy.addService($2, { title: $3.slice(1,-1) }) } + | 'SERVICE' id icon title + { yy.addService($2, { icon: $3.slice(1,-1), title: $4.slice(1,-1) }) } + | 'SERVICE' id 'IN' id + { yy.addService($2, { in: $4.trim() }) } + | 'SERVICE' id icon 'IN' id + { yy.addService($2, { icon: $3.slice(1,-1), in: $5.trim() }) } + | 'SERVICE' id title 'IN' id + { yy.addService($2, { title: $3.slice(1,-1), in: $5.trim() }) } + | 'SERVICE' id icon title 'IN' id + { yy.addService($2, { icon: $3.slice(1,-1), title: $4.slice(1,-1), in: $6.trim() }) } + ; + +eol + : NEWLINE + | ';' + | EOF + ; + +%% \ No newline at end of file From 346ae22108c45ee0b204897d153c6929fcedcfb4 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 11 Mar 2024 15:13:05 -0500 Subject: [PATCH 03/73] feat: registered architecture diagram --- .vite/jsonSchemaPlugin.ts | 1 + .../scripts/create-types-from-json-schema.mts | 1 + packages/mermaid/src/config.type.ts | 11 +++++++++ .../src/diagram-api/diagram-orchestration.ts | 4 +++- .../architecture/architectureDetector.ts | 24 +++++++++++++++++++ .../mermaid/src/schemas/config.schema.yaml | 21 ++++++++++++++++ 6 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 packages/mermaid/src/diagrams/architecture/architectureDetector.ts diff --git a/.vite/jsonSchemaPlugin.ts b/.vite/jsonSchemaPlugin.ts index dd9af8cc5..a69f6889b 100644 --- a/.vite/jsonSchemaPlugin.ts +++ b/.vite/jsonSchemaPlugin.ts @@ -26,6 +26,7 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [ 'c4', 'sankey', 'block', + 'architecture' ] as const; /** diff --git a/packages/mermaid/scripts/create-types-from-json-schema.mts b/packages/mermaid/scripts/create-types-from-json-schema.mts index b028fe818..fbd12a37f 100644 --- a/packages/mermaid/scripts/create-types-from-json-schema.mts +++ b/packages/mermaid/scripts/create-types-from-json-schema.mts @@ -54,6 +54,7 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [ 'gitGraph', 'c4', 'sankey', + 'architecture' ]; /** diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index 0ba317868..014ff65e7 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -165,6 +165,7 @@ export interface MermaidConfig { quadrantChart?: QuadrantChartConfig; xyChart?: XYChartConfig; requirement?: RequirementDiagramConfig; + architecture?: ArchitectureDiagramConfig; mindmap?: MindmapDiagramConfig; gitGraph?: GitGraphDiagramConfig; c4?: C4DiagramConfig; @@ -629,6 +630,16 @@ export interface RequirementDiagramConfig extends BaseDiagramConfig { rect_padding?: number; line_height?: number; } +/** + * The object containing configurations specific for architecture diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "ArchitectureDiagramConfig". + */ +export interface ArchitectureDiagramConfig extends BaseDiagramConfig { + padding?: number; + maxNodeWidth?: number; +} /** * The object containing configurations specific for mindmap diagrams * diff --git a/packages/mermaid/src/diagram-api/diagram-orchestration.ts b/packages/mermaid/src/diagram-api/diagram-orchestration.ts index eb123c4a2..84697022c 100644 --- a/packages/mermaid/src/diagram-api/diagram-orchestration.ts +++ b/packages/mermaid/src/diagram-api/diagram-orchestration.ts @@ -21,6 +21,7 @@ import timeline from '../diagrams/timeline/detector.js'; import mindmap from '../diagrams/mindmap/detector.js'; import sankey from '../diagrams/sankey/sankeyDetector.js'; import block from '../diagrams/block/blockDetector.js'; +import architecture from '../diagrams/architecture/architectureDetector.js' import { registerLazyLoadedDiagrams } from './detectType.js'; import { registerDiagram } from './diagramAPI.js'; @@ -89,6 +90,7 @@ export const addDiagrams = () => { quadrantChart, sankey, xychart, - block + block, + architecture ); }; diff --git a/packages/mermaid/src/diagrams/architecture/architectureDetector.ts b/packages/mermaid/src/diagrams/architecture/architectureDetector.ts new file mode 100644 index 000000000..c15b474ab --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureDetector.ts @@ -0,0 +1,24 @@ +import type { + DiagramDetector, + DiagramLoader, + ExternalDiagramDefinition, +} from '../../diagram-api/types.js'; + +const id = 'architecture'; + +const detector: DiagramDetector = (txt) => { + return /^\s*architecture/.test(txt); +}; + +const loader: DiagramLoader = async () => { + const { diagram } = await import('./architectureDiagram.js'); + return { id, diagram }; +}; + +const architecture: ExternalDiagramDefinition = { + id, + detector, + loader, +}; + +export default architecture; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 3e7fd58ec..601939bee 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -45,6 +45,7 @@ required: - quadrantChart - xyChart - requirement + - architecture - mindmap - gitGraph - c4 @@ -217,6 +218,8 @@ properties: $ref: '#/$defs/XYChartConfig' requirement: $ref: '#/$defs/RequirementDiagramConfig' + architecture: + $ref: '#/$defs/ArchitectureDiagramConfig' mindmap: $ref: '#/$defs/MindmapDiagramConfig' gitGraph: @@ -853,6 +856,24 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) type: number default: 20 + ArchitectureDiagramConfig: + title: Architecture Diagram Config + allOf: [{ $ref: '#/$defs/BaseDiagramConfig'}] + description: The object containing configurations specific for architecture diagrams + type: object + unevaluatedProperties: false + required: + - useMaxWidth + - padding + - maxNodeWidth + properties: + padding: + type: number + default: 10 + maxNodeWidth: + type: number + default: 200 + MindmapDiagramConfig: title: Mindmap Diagram Config allOf: [{ $ref: '#/$defs/BaseDiagramConfig' }] From cc22e13e71423491926d413199702a3d85ebff16 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 11 Mar 2024 15:14:21 -0500 Subject: [PATCH 04/73] feat: added architecture DB & types --- .../diagrams/architecture/architectureDb.ts | 115 ++++++++++++++++++ .../architecture/architectureTypes.ts | 64 ++++++++++ 2 files changed, 179 insertions(+) create mode 100644 packages/mermaid/src/diagrams/architecture/architectureDb.ts create mode 100644 packages/mermaid/src/diagrams/architecture/architectureTypes.ts diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts new file mode 100644 index 000000000..5aecba746 --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -0,0 +1,115 @@ +import type { ArchitectureFields, ArchitectureDB, ArchitectureService, ArchitectureGroup, ArchitectureDirection, ArchitectureLine } from "./architectureTypes.js"; +import { isArchitectureDirection } 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 "../../mermaidAPI.js"; + +export const DEFAULT_ARCHITECTURE_CONFIG: Required = DEFAULT_CONFIG.architecture; +export const DEFAULT_ARCHITECTURE_DB: ArchitectureFields = { + services: [], + groups: [], + lines: [], + cnt: 0, + config: DEFAULT_ARCHITECTURE_CONFIG, +} as const; + +let services = DEFAULT_ARCHITECTURE_DB.services; +let groups = DEFAULT_ARCHITECTURE_DB.groups; +let lines = DEFAULT_ARCHITECTURE_DB.lines; +let elements: Record = {}; +let cnt = DEFAULT_ARCHITECTURE_DB.cnt; + +const config: Required = structuredClone(DEFAULT_ARCHITECTURE_CONFIG); + +const getConfig = (): Required => structuredClone(config); + +const clear = (): void => { + services = structuredClone(DEFAULT_ARCHITECTURE_DB.services); + groups = structuredClone(DEFAULT_ARCHITECTURE_DB.groups); + lines = structuredClone(DEFAULT_ARCHITECTURE_DB.lines); + elements = {}; + cnt = 0; + commonClear(); +}; + +const addService = function (id: string, opts: Omit = {}) { + const {icon, in: inside, title} = opts; + services.push({ + id, + icon, + title, + in: inside + }); +} +const getServices = (): ArchitectureService[] => services; + +const addGroup = function (id: string, opts: Omit = {}) { + const {icon, in: inside, title} = opts; + groups.push({ + id, + icon, + title, + in: inside + }); +} +const getGroups = (): ArchitectureGroup[] => groups; + + +const addLine = function (lhs_id: string, lhs_dir: ArchitectureDirection, rhs_id: string, rhs_dir: ArchitectureDirection, opts: Omit = {}) { + const {title, lhs_into, rhs_into} = opts; + + if (!isArchitectureDirection(lhs_dir)) { + throw new Error(`Invalid direction given for left hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${lhs_dir}`) + } + if (!isArchitectureDirection(rhs_dir)) { + throw new Error(`Invalid direction given for right hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${rhs_dir}`) + } + + lines.push({ + lhs_id, + lhs_dir, + rhs_id, + rhs_dir, + title, + lhs_into, + rhs_into + }); +} +const getLines = (): ArchitectureLine[] => lines; + + +const setElementForId = (id: string, element: D3Element) => { + elements[id] = element; +}; +const getElementById = (id: string) => elements[id]; + + + +export const db: ArchitectureDB = { + getConfig, + clear, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + + addService, + getServices, + addGroup, + getGroups, + addLine, + getLines, + setElementForId, + getElementById +}; \ No newline at end of file diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts new file mode 100644 index 000000000..dbc663b73 --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -0,0 +1,64 @@ +import type { DiagramDB } from '../../diagram-api/types.js'; +import type { ArchitectureDiagramConfig } from '../../config.type.js'; +import type { D3Element } from '../../mermaidAPI.js'; + +export type ArchitectureDirection = 'L' | 'R' | 'T' | 'B' +export const isArchitectureDirection = function(x: unknown): x is ArchitectureDirection { + const temp = x as ArchitectureDirection; + return (temp === 'L' || temp === 'R' || temp === 'T' || temp === 'B') +} +export const isArchitectureDirectionX = function(x: ArchitectureDirection): x is Extract { + const temp = x as Extract + return (temp === 'L' || temp === 'R') +} +export const isArchitectureDirectionY = function(x: ArchitectureDirection): x is Extract { + const temp = x as Extract + return (temp === 'T' || temp === 'B') +} + +export interface ArchitectureStyleOptions { + fontFamily: string; +} + +export interface ArchitectureService { + id: string; + icon?: string; + title?: string; + in?: string; +} + +export interface ArchitectureGroup { + id: string; + icon?: string; + title?: string; + in?: string; +} + +export interface ArchitectureLine { + lhs_id: string; + lhs_dir: ArchitectureDirection; + title?: string; + rhs_id: string; + rhs_dir: ArchitectureDirection; + lhs_into?: boolean; + rhs_into?: boolean; +} + +export interface ArchitectureDB extends DiagramDB { + addService: (id: string, opts: Omit) => void + getServices: () => ArchitectureService[] + addGroup: (id: string, opts: Omit) => void + getGroups: () => ArchitectureGroup[] + addLine: (lhs_id: string, lhs_dir: ArchitectureDirection, rhs_id: string, rhs_dir: ArchitectureDirection, opts: Omit) => void + getLines: () => ArchitectureLine[] + setElementForId: (id: string, element: D3Element) => void; + getElementById: (id: string) => D3Element; +} + +export interface ArchitectureFields { + services: ArchitectureService[], + groups: ArchitectureGroup[], + lines: ArchitectureLine[], + cnt: number, + config: ArchitectureDiagramConfig +} \ No newline at end of file From e01acec12b631a1385aeddc354b6db947b37b0ae Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 13 Mar 2024 09:24:04 -0500 Subject: [PATCH 05/73] feat(arch): implemented icon registration --- .../mermaid/src/rendering-util/svgRegister.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/mermaid/src/rendering-util/svgRegister.ts diff --git a/packages/mermaid/src/rendering-util/svgRegister.ts b/packages/mermaid/src/rendering-util/svgRegister.ts new file mode 100644 index 000000000..303c43f57 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svgRegister.ts @@ -0,0 +1,33 @@ +import { Selection } from "d3-selection"; + +type IconResolver = (parent: Selection) => Selection +type IconLibrary = Record + +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 null; // TODO: return default +} + +export { registerIcon, registerIcons, getIcon, isIconNameInUse, IconLibrary } \ No newline at end of file From 6c6ce28f7df4d52891d341051a9219e768accead Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 13 Mar 2024 09:25:20 -0500 Subject: [PATCH 06/73] feat(arch): implemented basic rendering for diagram --- .../architecture/architectureDiagram.ts | 13 ++ .../architecture/architectureRenderer.ts | 216 ++++++++++++++++++ .../architecture/architectureStyles.ts | 73 ++++++ .../src/diagrams/architecture/svgDraw.ts | 120 ++++++++++ 4 files changed, 422 insertions(+) create mode 100644 packages/mermaid/src/diagrams/architecture/architectureDiagram.ts create mode 100644 packages/mermaid/src/diagrams/architecture/architectureRenderer.ts create mode 100644 packages/mermaid/src/diagrams/architecture/architectureStyles.ts create mode 100644 packages/mermaid/src/diagrams/architecture/svgDraw.ts diff --git a/packages/mermaid/src/diagrams/architecture/architectureDiagram.ts b/packages/mermaid/src/diagrams/architecture/architectureDiagram.ts new file mode 100644 index 000000000..614e2a7f3 --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureDiagram.ts @@ -0,0 +1,13 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +// @ts-ignore: JISON doesn't support types +import parser from './parser/architecture.jison'; +import { db } from './architectureDb.js'; +import styles from './architectureStyles.js'; +import { renderer } from './architectureRenderer.js'; + +export const diagram: DiagramDefinition = { + parser, + db, + renderer, + styles, +}; diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts new file mode 100644 index 000000000..a55b23bff --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -0,0 +1,216 @@ +import cytoscape from 'cytoscape'; +import type { Diagram } from '../../Diagram.js'; +import fcose, {FcoseLayoutOptions} from 'cytoscape-fcose'; +import type { MermaidConfig } from '../../config.type.js'; +import { getConfig } from '../../diagram-api/diagramAPI.js'; +import type { DrawDefinition, SVG } from '../../diagram-api/types.js'; +import { log } from '../../logger.js'; +import { selectSvgElement } from '../../rendering-util/selectSvgElement.js'; +import { + isArchitectureDirectionX, + type ArchitectureDB, + type ArchitectureDirection, + type ArchitectureGroup, + type ArchitectureLine, + type ArchitectureService, + isArchitectureDirectionY, +} from './architectureTypes.js'; +import { select } from 'd3'; +import { setupGraphViewbox } from '../../setupGraphViewbox.js'; +import defaultConfig from '../../defaultConfig.js'; +import type { D3Element } from '../../mermaidAPI.js'; +import { drawEdges, drawService, getEdgeThicknessCallback } from './svgDraw.js'; + +cytoscape.use(fcose); + +function addServices(services: ArchitectureService[], cy: cytoscape.Core) { + services.forEach((service) => { + cy.add({ + group: 'nodes', + data: { + id: service.id, + icon: service.icon, + title: service.title, + parent: service.in, + // TODO: dynamic size + width: 80, + height: 80 + }, + }); + }); +} + +function drawServices( + db: ArchitectureDB, + svg: D3Element, + services: ArchitectureService[], + conf: MermaidConfig +) { + services.forEach((service) => drawService(db, svg, service, conf)); +} + +function addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) { + groups.forEach((group) => { + cy.add({ + group: 'nodes', + data: { + id: group.id, + icon: group.icon, + title: group.title, + parent: group.in + }, + }); + }); +} + +function positionServices(db: ArchitectureDB, cy: cytoscape.Core) { + cy.nodes().map((node, id) => { + + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + + const nodeElem = db.getElementById(data.id); + nodeElem.attr('transform', 'translate(' + (data.x || 0) + ',' + (data.y || 0) + ')'); + }); +} + +function addEdges(lines: ArchitectureLine[], cy: cytoscape.Core) { + lines.forEach((line) => { + cy.add({ + group: 'edges', + data: { + id: `${line.lhs_id}-${line.rhs_id}`, + source: line.lhs_id, + sourceDir: line.lhs_dir, + target: line.rhs_id, + targetDir: line.rhs_dir, + }, + }); + }); +} + +function layoutArchitecture( + services: ArchitectureService[], + groups: ArchitectureGroup[], + lines: ArchitectureLine[] +): Promise { + return new Promise((resolve) => { + const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none'); + const cy = cytoscape({ + container: document.getElementById('cy'), + style: [ + { + selector: 'edge', + style: { + 'curve-style': 'straight', + 'source-endpoint': '100% 100%', + 'target-endpoint': '100% 100%', + }, + }, + ], + }); + // Remove element after layout + renderEl.remove(); + + addGroups(groups, cy); + addServices(services, cy); + addEdges(lines, cy); + + // Make cytoscape care about the dimensions of the nodes + cy.nodes().forEach(function (n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + + cy.layout({ + name: 'fcose', + quality: 'proof', + styleEnabled: false, + animate: false, + alignmentConstraint: { + horizontal: cy + .edges() + .filter( + (edge) => + isArchitectureDirectionX(edge.data('sourceDir')) && + isArchitectureDirectionX(edge.data('targetDir')) + ) + .map((edge) => [edge.data('source'), edge.data('target')]), + vertical: cy + .edges() + .filter( + (edge) => + isArchitectureDirectionY(edge.data('sourceDir')) && + isArchitectureDirectionY(edge.data('targetDir')) + ) + .map((edge) => [edge.data('source'), edge.data('target')]), + }, + relativePlacementConstraint: cy.edges().map((edge) => { + const sourceDir = edge.data('sourceDir') as ArchitectureDirection; + const targetDir = edge.data('targetDir') as ArchitectureDirection; + const sourceId = edge.data('source') as ArchitectureDirection; + const targetId = edge.data('target') as ArchitectureDirection; + + if ( + isArchitectureDirectionX(sourceDir) && + isArchitectureDirectionX(targetDir) + ) { + return {left: sourceDir === 'L' ? sourceId : targetId, right: sourceDir === 'R' ? sourceId : targetId, gap: 180} + } else if ( + isArchitectureDirectionY(sourceDir) && + isArchitectureDirectionY(targetDir) + ) { + return {top: sourceDir === 'T' ? sourceId : targetId, bottom: sourceDir === 'B' ? sourceId : targetId, gap: 180} + } + // TODO: fallback case + RB, TL, etc + + }), + } as FcoseLayoutOptions).run(); + cy.ready((e) => { + log.info('Ready', e); + resolve(cy); + }); + }); +} + +export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) => { + const db = diagObj.db as ArchitectureDB; + const conf: MermaidConfig = getConfig(); + + const services = db.getServices(); + const groups = db.getGroups(); + const lines = db.getLines(); + log.info('Services: ', services); + log.info('Lines: ', lines); + + const svg: SVG = selectSvgElement(id); + + const edgesElem = svg.append('g'); + edgesElem.attr('class', 'architecture-edges'); + + const servicesElem = svg.append('g'); + servicesElem.attr('class', 'architecture-services'); + + drawServices(db, servicesElem, services, conf); + const getEdgeThickness = getEdgeThicknessCallback(svg); + + const cy = await layoutArchitecture(services, groups, lines); + + const edgeThickness = getEdgeThickness(); + drawEdges(edgesElem, edgeThickness, cy); + positionServices(db, cy); + + setupGraphViewbox( + undefined, + svg, + conf.architecture?.padding ?? defaultConfig.architecture.padding, + conf.architecture?.useMaxWidth ?? defaultConfig.architecture.useMaxWidth + ); + + +}; + +export const renderer = { draw }; diff --git a/packages/mermaid/src/diagrams/architecture/architectureStyles.ts b/packages/mermaid/src/diagrams/architecture/architectureStyles.ts new file mode 100644 index 000000000..b92d227e6 --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/architectureStyles.ts @@ -0,0 +1,73 @@ +import type { DiagramStylesProvider } from '../../diagram-api/types.js'; +import type { ArchitectureStyleOptions } from './architectureTypes.js'; +// @ts-expect-error Incorrect khroma types +import { darken, lighten, isDark } from 'khroma'; + +const genSections: DiagramStylesProvider = (options) => { + let sections = ''; + + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i]; + if (isDark(options['lineColor' + i])) { + options['lineColor' + i] = lighten(options['lineColor' + i], 20); + } else { + options['lineColor' + i] = darken(options['lineColor' + i], 20); + } + } + + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = '' + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${ + i - 1 + } polygon, .section-${i - 1} path { + fill: ${options['cScale' + i]}; + } + .section-${i - 1} text { + fill: ${options['cScaleLabel' + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options['cScaleLabel' + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options['cScale' + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options['cScaleInv' + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; + +const getStyles: DiagramStylesProvider = (options: ArchitectureStyleOptions) => + ` + .edge { + stroke-width: 3; + stroke: #777; + } + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: #333; + } + .section-root text { + fill:#333; + } + ${genSections(options)} + .edge { + fill: none; + } +`; + +export default getStyles; diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts new file mode 100644 index 000000000..55742ed7f --- /dev/null +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -0,0 +1,120 @@ +import type { D3Element } from '../../mermaidAPI.js'; +import { createText } from '../../rendering-util/createText.js'; +import type { ArchitectureDB, ArchitectureService } from './architectureTypes.js'; +import type { MermaidConfig } from '../../config.type.js'; +import type cytoscape from 'cytoscape'; +import { log } from '../../logger.js'; +import {getIcon, isIconNameInUse} from '../../rendering-util/svgRegister.js'; + +declare module 'cytoscape' { + interface EdgeSingular { + _private: { + bodyBounds: unknown; + rscratch: { + startX: number; + startY: number; + midX: number; + midY: number; + endX: number; + endY: number; + }; + }; + } +} + +/** + * Creates a temporary path which can be used to compute the line thickness. + * @param root root element to add the temporary path to + * @returns callback function which gets the bounding box dimensions and removes the path from root + */ +export const getEdgeThicknessCallback = function (root: D3Element) { + const tempPath = root.insert('path') + .attr( + 'd', + `M 10,10 L 10,20` + ) + .attr('class', 'edge') + .attr('id', 'temp-thickness-edge'); + + return () => { + const dims = tempPath.node().getBBox(); + tempPath.remove(); + return dims.height as number; + } +} + +export const drawEdges = function (edgesEl: D3Element, edgeThickness: number, cy: cytoscape.Core) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + const translateX = bounds.startX === bounds.endX ? ((edgeThickness + 2) / 1.5) : 0; + const translateY = bounds.startY === bounds.endY ? ((edgeThickness + 2) / 1.5) : 0; + + log.trace('Edge: ', id, data); + edgesEl + .insert('path') + .attr( + 'd', + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ) + .attr('class', 'edge') + .attr( + 'transform', + 'translate(' + translateX + ', ' + translateY + ')' + ); + } + }) +} + +export const drawService = function ( + db: ArchitectureDB, + elem: D3Element, + service: ArchitectureService, + conf: MermaidConfig +): number { + const serviceElem = elem.append('g'); + + if (service.title) { + const textElem = serviceElem.append('g'); + createText(textElem, service.title, { + useHtmlLabels: false, + width: 80, + classes: 'architecture-service-label', + }); + textElem + .attr('dy', '1em') + .attr('alignment-baseline', 'middle') + .attr('dominant-baseline', 'middle') + .attr('text-anchor', 'middle'); + + textElem.attr( + 'transform', + 'translate(' + 80 / 2 + ', ' + 80 + ')' + ); + + } + + let bkgElem = serviceElem.append('g'); + if (service.icon) { + if (!isIconNameInUse(service.icon)) { + throw new Error(`Invalid SVG Icon name: "${service.icon}"`) + } + bkgElem = getIcon(service.icon)?.(bkgElem); + } else { + bkgElem.append('path').attr('class', 'node-bkg').attr('id', 'node-' + service.id).attr( + 'd', + `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${ + 80 - 2 * 0 + } q5,0 5,5 v${80 - 0} H0 Z` + ); + } + + serviceElem.attr('class', 'architecture-service'); + + const icon = serviceElem.append('foreignObject').attr('height', '80px').attr('width', '80px'); + icon.append('div').attr('class', 'icon-container').append('i').attr('class', 'service-icon fa fa-phone') + + db.setElementForId(service.id, serviceElem); + return 0; +}; From 84bd20b04b3fca5c948cac068dcbaae420398644 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sun, 17 Mar 2024 15:24:17 -0500 Subject: [PATCH 07/73] feat(arch): improved group rendering --- .../architecture/architectureRenderer.ts | 180 +++++++++++++----- .../architecture/architectureStyles.ts | 7 + .../architecture/architectureTypes.ts | 2 + .../src/diagrams/architecture/svgDraw.ts | 139 +++++++++----- 4 files changed, 228 insertions(+), 100 deletions(-) diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index a55b23bff..f4566e85e 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -1,6 +1,6 @@ import cytoscape from 'cytoscape'; import type { Diagram } from '../../Diagram.js'; -import fcose, {FcoseLayoutOptions} from 'cytoscape-fcose'; +import fcose, { FcoseLayoutOptions } from 'cytoscape-fcose'; import type { MermaidConfig } from '../../config.type.js'; import { getConfig } from '../../diagram-api/diagramAPI.js'; import type { DrawDefinition, SVG } from '../../diagram-api/types.js'; @@ -17,9 +17,9 @@ import { } from './architectureTypes.js'; import { select } from 'd3'; import { setupGraphViewbox } from '../../setupGraphViewbox.js'; -import defaultConfig from '../../defaultConfig.js'; +import defaultConfig from '../../defaultConfig.js'; import type { D3Element } from '../../mermaidAPI.js'; -import { drawEdges, drawService, getEdgeThicknessCallback } from './svgDraw.js'; +import { drawEdges, drawGroups, drawService } from './svgDraw.js'; cytoscape.use(fcose); @@ -28,23 +28,25 @@ function addServices(services: ArchitectureService[], cy: cytoscape.Core) { cy.add({ group: 'nodes', data: { + type: 'service', id: service.id, icon: service.icon, - title: service.title, + label: service.title, parent: service.in, // TODO: dynamic size width: 80, - height: 80 + height: 80, }, + classes: 'node-service' }); }); } function drawServices( - db: ArchitectureDB, - svg: D3Element, - services: ArchitectureService[], - conf: MermaidConfig + db: ArchitectureDB, + svg: D3Element, + services: ArchitectureService[], + conf: MermaidConfig ) { services.forEach((service) => drawService(db, svg, service, conf)); } @@ -54,19 +56,22 @@ function addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) { cy.add({ group: 'nodes', data: { + type: 'group', id: group.id, icon: group.icon, - title: group.title, + label: group.title, parent: group.in }, + classes: 'node-group' }); }); } function positionServices(db: ArchitectureDB, cy: cytoscape.Core) { cy.nodes().map((node, id) => { - + const data = node.data(); + if (data.type === 'group') return; data.x = node.position().x; data.y = node.position().y; @@ -104,10 +109,40 @@ function layoutArchitecture( selector: 'edge', style: { 'curve-style': 'straight', - 'source-endpoint': '100% 100%', - 'target-endpoint': '100% 100%', + 'source-endpoint': '50% 50%', + 'target-endpoint': '50% 50%', }, }, + { + selector: 'node', + style: { + //@ts-ignore + 'compound-sizing-wrt-labels': 'include', + } + }, + { + selector: 'node[label]', + style: { + 'text-valign': 'bottom', + 'text-halign': 'center', + 'font-size': '16px', + } + }, + { + selector: '.node-service', + style: { + 'label': 'data(label)', + 'width': 'data(width)', + 'height': 'data(height)', + } + }, + { + selector: '.node-group', + style: { + //@ts-ignore + "padding": '30px' + } + } ], }); // Remove element after layout @@ -115,55 +150,97 @@ function layoutArchitecture( addGroups(groups, cy); addServices(services, cy); - addEdges(lines, cy); + addEdges(lines, cy); - // Make cytoscape care about the dimensions of the nodes - cy.nodes().forEach(function (n) { - n.layoutDimensions = () => { - const data = n.data(); - return { w: data.width, h: data.height }; - }; - }); + /** + * Merge alignment pairs together if they share a common node. + * + * Example: [["a", "b"], ["b", "c"], ["d", "e"]] -> [["a", "b", "c"], ["d", "e"]] + */ + const mergeAlignments = (orig: string[][]): string[][] => { + console.log('Start: ', orig); + // Mapping of discovered ids to their index in the new alignment array + const map: Record = {}; + const newAlignments: string[][] = [orig[0]]; + map[orig[0][0]] = 0; + map[orig[0][1]] = 0; + orig = orig.slice(1); + while (orig.length > 0) { + const pair = orig[0]; + const pairLHSIdx = map[pair[0]]; + const pairRHSIdx = map[pair[1]]; + console.log(pair); + console.log(map); + console.log(newAlignments); + // If neither id appears in the new array, add the pair to the new array + if (pairLHSIdx === undefined && pairRHSIdx === undefined) { + newAlignments.push(pair); + map[pair[0]] = newAlignments.length - 1; + map[pair[1]] = newAlignments.length - 1; + // If the LHS of the pair doesn't appear in the new array, add the LHS to the existing array it shares an id with + } else if (pairLHSIdx === undefined) { + newAlignments[pairRHSIdx].push(pair[0]); + map[pair[0]] = pairRHSIdx; + // If the RHS of the pair doesn't appear in the new array, add the RHS to the existing array it shares an id with + } else if (pairRHSIdx === undefined) { + newAlignments[pairLHSIdx].push(pair[1]); + map[pair[1]] = pairLHSIdx; + // If both ids already have been added to the new array and their index is different, merge all 3 arrays + } else if (pairLHSIdx != pairRHSIdx) { + console.log('ELSE'); + newAlignments.push(pair); + } + orig = orig.slice(1); + } + + console.log('End: ', newAlignments); + return newAlignments; + } + + const horizontalAlignments = cy + .edges() + .filter( + (edge) => + isArchitectureDirectionX(edge.data('sourceDir')) && + isArchitectureDirectionX(edge.data('targetDir')) + ) + .map((edge) => [edge.data('source'), edge.data('target')]); + + const verticalAlignments = cy + .edges() + .filter( + (edge) => + isArchitectureDirectionY(edge.data('sourceDir')) && + isArchitectureDirectionY(edge.data('targetDir')) + ) + .map((edge) => [edge.data('source'), edge.data('target')]); cy.layout({ name: 'fcose', quality: 'proof', styleEnabled: false, animate: false, + nodeDimensionsIncludeLabels: true, alignmentConstraint: { - horizontal: cy - .edges() - .filter( - (edge) => - isArchitectureDirectionX(edge.data('sourceDir')) && - isArchitectureDirectionX(edge.data('targetDir')) - ) - .map((edge) => [edge.data('source'), edge.data('target')]), - vertical: cy - .edges() - .filter( - (edge) => - isArchitectureDirectionY(edge.data('sourceDir')) && - isArchitectureDirectionY(edge.data('targetDir')) - ) - .map((edge) => [edge.data('source'), edge.data('target')]), + horizontal: mergeAlignments(horizontalAlignments), + vertical: mergeAlignments(verticalAlignments) }, relativePlacementConstraint: cy.edges().map((edge) => { const sourceDir = edge.data('sourceDir') as ArchitectureDirection; const targetDir = edge.data('targetDir') as ArchitectureDirection; - const sourceId = edge.data('source') as ArchitectureDirection; - const targetId = edge.data('target') as ArchitectureDirection; + const sourceId = edge.data('source') as string; + const targetId = edge.data('target') as string; if ( - isArchitectureDirectionX(sourceDir) && - isArchitectureDirectionX(targetDir) + isArchitectureDirectionX(sourceDir) && + isArchitectureDirectionX(targetDir) ) { - return {left: sourceDir === 'L' ? sourceId : targetId, right: sourceDir === 'R' ? sourceId : targetId, gap: 180} + return { left: sourceDir === 'R' ? sourceId : targetId, right: sourceDir === 'L' ? sourceId : targetId, gap: 180 } } else if ( - isArchitectureDirectionY(sourceDir) && - isArchitectureDirectionY(targetDir) + isArchitectureDirectionY(sourceDir) && + isArchitectureDirectionY(targetDir) ) { - return {top: sourceDir === 'T' ? sourceId : targetId, bottom: sourceDir === 'B' ? sourceId : targetId, gap: 180} + return { top: sourceDir === 'B' ? sourceId : targetId, bottom: sourceDir === 'T' ? sourceId : targetId, gap: 180 } } // TODO: fallback case + RB, TL, etc @@ -183,8 +260,9 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) const services = db.getServices(); const groups = db.getGroups(); const lines = db.getLines(); - log.info('Services: ', services); - log.info('Lines: ', lines); + console.log('Services: ', services); + console.log('Lines: ', lines); + console.log('Groups: ', groups); const svg: SVG = selectSvgElement(id); @@ -194,13 +272,15 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) const servicesElem = svg.append('g'); servicesElem.attr('class', 'architecture-services'); + const groupElem = svg.append('g'); + groupElem.attr('class', 'architecture-groups'); + drawServices(db, servicesElem, services, conf); - const getEdgeThickness = getEdgeThicknessCallback(svg); const cy = await layoutArchitecture(services, groups, lines); - const edgeThickness = getEdgeThickness(); - drawEdges(edgesElem, edgeThickness, cy); + drawEdges(edgesElem, cy); + drawGroups(groupElem, cy); positionServices(db, cy); setupGraphViewbox( diff --git a/packages/mermaid/src/diagrams/architecture/architectureStyles.ts b/packages/mermaid/src/diagrams/architecture/architectureStyles.ts index b92d227e6..7cdcbf4ae 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureStyles.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureStyles.ts @@ -68,6 +68,13 @@ const getStyles: DiagramStylesProvider = (options: ArchitectureStyleOptions) => .edge { fill: none; } + + .node-bkg { + fill: none; + stroke: #000; + stroke-width: 2px; + stroke-dasharray: 8; + } `; export default getStyles; diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts index dbc663b73..9cf78443a 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -25,6 +25,8 @@ export interface ArchitectureService { icon?: string; title?: string; in?: string; + width?: number; + height?: number; } export interface ArchitectureGroup { diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index 55742ed7f..b78d2d044 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -1,10 +1,10 @@ import type { D3Element } from '../../mermaidAPI.js'; import { createText } from '../../rendering-util/createText.js'; -import type { ArchitectureDB, ArchitectureService } from './architectureTypes.js'; +import type { ArchitectureDB, ArchitectureGroup, ArchitectureService } from './architectureTypes.js'; import type { MermaidConfig } from '../../config.type.js'; import type cytoscape from 'cytoscape'; import { log } from '../../logger.js'; -import {getIcon, isIconNameInUse} from '../../rendering-util/svgRegister.js'; +import { getIcon, isIconNameInUse } from '../../rendering-util/svgRegister.js'; declare module 'cytoscape' { interface EdgeSingular { @@ -20,48 +20,86 @@ declare module 'cytoscape' { }; }; } -} - -/** - * Creates a temporary path which can be used to compute the line thickness. - * @param root root element to add the temporary path to - * @returns callback function which gets the bounding box dimensions and removes the path from root - */ -export const getEdgeThicknessCallback = function (root: D3Element) { - const tempPath = root.insert('path') - .attr( - 'd', - `M 10,10 L 10,20` - ) - .attr('class', 'edge') - .attr('id', 'temp-thickness-edge'); - - return () => { - const dims = tempPath.node().getBBox(); - tempPath.remove(); - return dims.height as number; + interface NodeSingular { + _private: { + bodyBounds: { + h: number; + w: number; + x1: number; + x2: number; + y1: number; + y2: number; + }; + children: cytoscape.NodeSingular[] + }; + data: () => { + type: 'service', + id: string, + icon?: string, + label?: string, + parent?: string, + width: number, + height: number, + [key: string]: any + } | { + type: 'group', + id: string, + icon?: string, + label?: string, + parent?: string, + [key: string]: any + } } } -export const drawEdges = function (edgesEl: D3Element, edgeThickness: number, cy: cytoscape.Core) { +export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { cy.edges().map((edge, id) => { const data = edge.data(); if (edge[0]._private.bodyBounds) { const bounds = edge[0]._private.rscratch; - const translateX = bounds.startX === bounds.endX ? ((edgeThickness + 2) / 1.5) : 0; - const translateY = bounds.startY === bounds.endY ? ((edgeThickness + 2) / 1.5) : 0; - log.trace('Edge: ', id, data); - edgesEl - .insert('path') - .attr( - 'd', - `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` - ) - .attr('class', 'edge') - .attr( + log.trace('Edge: ', id, data); + edgesEl + .insert('path') + .attr( + 'd', + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ) + .attr('class', 'edge') + } + }) +} + +export const drawGroups = function ( + groupsEl: D3Element, + cy: cytoscape.Core +) { + cy.nodes().map((node, id) => { + const data = node.data(); + if (data.type === 'group') { + const { h, w, x1, x2, y1, y2 } = node.boundingBox(); + let bkgElem = groupsEl.append('rect') + .attr('x', x1 + 40) + .attr('y', y1 + 40) + .attr('width', w) + .attr('height', h) + .attr('class', 'node-bkg'); + + const textElem = groupsEl.append('g'); + createText(textElem, data.title, { + useHtmlLabels: false, + width: w, + classes: 'architecture-service-label', + }); + textElem + .attr('dy', '1em') + .attr('alignment-baseline', 'middle') + .attr('dominant-baseline', 'start') + .attr('text-anchor', 'start'); + + textElem.attr( 'transform', - 'translate(' + translateX + ', ' + translateY + ')' + 'translate(' + (x1 + 44) + ', ' + (y1 + 42) + ')' ); } }) @@ -76,22 +114,23 @@ export const drawService = function ( const serviceElem = elem.append('g'); if (service.title) { - const textElem = serviceElem.append('g'); - createText(textElem, service.title, { - useHtmlLabels: false, - width: 80, - classes: 'architecture-service-label', - }); - textElem + const textElem = serviceElem.append('g'); + createText(textElem, service.title, { + useHtmlLabels: false, + width: 110, + classes: 'architecture-service-label', + }); + textElem .attr('dy', '1em') .attr('alignment-baseline', 'middle') .attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle'); - textElem.attr( - 'transform', - 'translate(' + 80 / 2 + ', ' + 80 + ')' - ); + textElem.attr( + 'transform', + // TODO: dynamic size + 'translate(' + 80 / 2 + ', ' + 80 + ')' + ); } @@ -104,16 +143,16 @@ export const drawService = function ( } else { bkgElem.append('path').attr('class', 'node-bkg').attr('id', 'node-' + service.id).attr( 'd', - `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${ - 80 - 2 * 0 + `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${80 - 2 * 0 } q5,0 5,5 v${80 - 0} H0 Z` ); } serviceElem.attr('class', 'architecture-service'); - const icon = serviceElem.append('foreignObject').attr('height', '80px').attr('width', '80px'); - icon.append('div').attr('class', 'icon-container').append('i').attr('class', 'service-icon fa fa-phone') + const { width, height } = serviceElem._groups[0][0].getBBox(); + service.width = width; + service.height = height; db.setElementForId(service.id, serviceElem); return 0; From 5e214877a421d3d26a1c72d5c5f8b914e152875c Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Tue, 19 Mar 2024 13:57:37 -0500 Subject: [PATCH 08/73] style(arch): prettier formatting --- .vite/jsonSchemaPlugin.ts | 2 +- .../scripts/create-types-from-json-schema.mts | 2 +- .../src/diagram-api/diagram-orchestration.ts | 2 +- .../diagrams/architecture/architectureDb.ts | 64 ++++++----- .../architecture/architectureRenderer.ts | 58 +++++----- .../architecture/architectureTypes.ts | 100 ++++++++++-------- .../src/diagrams/architecture/svgDraw.ts | 79 +++++++------- .../mermaid/src/schemas/config.schema.yaml | 2 +- 8 files changed, 165 insertions(+), 144 deletions(-) diff --git a/.vite/jsonSchemaPlugin.ts b/.vite/jsonSchemaPlugin.ts index a69f6889b..e83acd31f 100644 --- a/.vite/jsonSchemaPlugin.ts +++ b/.vite/jsonSchemaPlugin.ts @@ -26,7 +26,7 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [ 'c4', 'sankey', 'block', - 'architecture' + 'architecture', ] as const; /** diff --git a/packages/mermaid/scripts/create-types-from-json-schema.mts b/packages/mermaid/scripts/create-types-from-json-schema.mts index fbd12a37f..7129cb94e 100644 --- a/packages/mermaid/scripts/create-types-from-json-schema.mts +++ b/packages/mermaid/scripts/create-types-from-json-schema.mts @@ -54,7 +54,7 @@ const MERMAID_CONFIG_DIAGRAM_KEYS = [ 'gitGraph', 'c4', 'sankey', - 'architecture' + 'architecture', ]; /** diff --git a/packages/mermaid/src/diagram-api/diagram-orchestration.ts b/packages/mermaid/src/diagram-api/diagram-orchestration.ts index 84697022c..4259043b1 100644 --- a/packages/mermaid/src/diagram-api/diagram-orchestration.ts +++ b/packages/mermaid/src/diagram-api/diagram-orchestration.ts @@ -21,7 +21,7 @@ import timeline from '../diagrams/timeline/detector.js'; import mindmap from '../diagrams/mindmap/detector.js'; import sankey from '../diagrams/sankey/sankeyDetector.js'; import block from '../diagrams/block/blockDetector.js'; -import architecture from '../diagrams/architecture/architectureDetector.js' +import architecture from '../diagrams/architecture/architectureDetector.js'; import { registerLazyLoadedDiagrams } from './detectType.js'; import { registerDiagram } from './diagramAPI.js'; diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts index 5aecba746..896c342aa 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureDb.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -1,5 +1,12 @@ -import type { ArchitectureFields, ArchitectureDB, ArchitectureService, ArchitectureGroup, ArchitectureDirection, ArchitectureLine } from "./architectureTypes.js"; -import { isArchitectureDirection } from "./architectureTypes.js"; +import type { + ArchitectureFields, + ArchitectureDB, + ArchitectureService, + ArchitectureGroup, + ArchitectureDirection, + ArchitectureLine, +} from './architectureTypes.js'; +import { isArchitectureDirection } from './architectureTypes.js'; import { setAccTitle, getAccTitle, @@ -11,9 +18,10 @@ import { } from '../common/commonDb.js'; import type { ArchitectureDiagramConfig } from '../../config.type.js'; import DEFAULT_CONFIG from '../../defaultConfig.js'; -import type { D3Element } from "../../mermaidAPI.js"; +import type { D3Element } from '../../mermaidAPI.js'; -export const DEFAULT_ARCHITECTURE_CONFIG: Required = DEFAULT_CONFIG.architecture; +export const DEFAULT_ARCHITECTURE_CONFIG: Required = + DEFAULT_CONFIG.architecture; export const DEFAULT_ARCHITECTURE_DB: ArchitectureFields = { services: [], groups: [], @@ -41,37 +49,46 @@ const clear = (): void => { commonClear(); }; -const addService = function (id: string, opts: Omit = {}) { - const {icon, in: inside, title} = opts; +const addService = function (id: string, opts: Omit = {}) { + const { icon, in: inside, title } = opts; services.push({ id, icon, title, - in: inside + in: inside, }); -} +}; const getServices = (): ArchitectureService[] => services; -const addGroup = function (id: string, opts: Omit = {}) { - const {icon, in: inside, title} = opts; +const addGroup = function (id: string, opts: Omit = {}) { + const { icon, in: inside, title } = opts; groups.push({ id, icon, title, - in: inside + in: inside, }); -} +}; const getGroups = (): ArchitectureGroup[] => groups; +const addLine = function ( + lhs_id: string, + lhs_dir: ArchitectureDirection, + rhs_id: string, + rhs_dir: ArchitectureDirection, + opts: Omit = {} +) { + const { title, lhs_into, rhs_into } = opts; -const addLine = function (lhs_id: string, lhs_dir: ArchitectureDirection, rhs_id: string, rhs_dir: ArchitectureDirection, opts: Omit = {}) { - const {title, lhs_into, rhs_into} = opts; - if (!isArchitectureDirection(lhs_dir)) { - throw new Error(`Invalid direction given for left hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${lhs_dir}`) + throw new Error( + `Invalid direction given for left hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${lhs_dir}` + ); } if (!isArchitectureDirection(rhs_dir)) { - throw new Error(`Invalid direction given for right hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${rhs_dir}`) + throw new Error( + `Invalid direction given for right hand side of line ${lhs_id}--${rhs_id}. Expected (L,R,T,B) got ${rhs_dir}` + ); } lines.push({ @@ -81,19 +98,16 @@ const addLine = function (lhs_id: string, lhs_dir: ArchitectureDirection, rhs_id rhs_dir, title, lhs_into, - rhs_into + rhs_into, }); -} +}; const getLines = (): ArchitectureLine[] => lines; - const setElementForId = (id: string, element: D3Element) => { elements[id] = element; }; const getElementById = (id: string) => elements[id]; - - export const db: ArchitectureDB = { getConfig, clear, @@ -103,7 +117,7 @@ export const db: ArchitectureDB = { getAccTitle, setAccDescription, getAccDescription, - + addService, getServices, addGroup, @@ -111,5 +125,5 @@ export const db: ArchitectureDB = { addLine, getLines, setElementForId, - getElementById -}; \ No newline at end of file + getElementById, +}; diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index f4566e85e..3063849c3 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -37,7 +37,7 @@ function addServices(services: ArchitectureService[], cy: cytoscape.Core) { width: 80, height: 80, }, - classes: 'node-service' + classes: 'node-service', }); }); } @@ -60,16 +60,15 @@ function addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) { id: group.id, icon: group.icon, label: group.title, - parent: group.in + parent: group.in, }, - classes: 'node-group' + classes: 'node-group', }); }); } function positionServices(db: ArchitectureDB, cy: cytoscape.Core) { cy.nodes().map((node, id) => { - const data = node.data(); if (data.type === 'group') return; data.x = node.position().x; @@ -118,7 +117,7 @@ function layoutArchitecture( style: { //@ts-ignore 'compound-sizing-wrt-labels': 'include', - } + }, }, { selector: 'node[label]', @@ -126,23 +125,23 @@ function layoutArchitecture( 'text-valign': 'bottom', 'text-halign': 'center', 'font-size': '16px', - } + }, }, { selector: '.node-service', style: { - 'label': 'data(label)', - 'width': 'data(width)', - 'height': 'data(height)', - } + label: 'data(label)', + width: 'data(width)', + height: 'data(height)', + }, }, { selector: '.node-group', style: { //@ts-ignore - "padding": '30px' - } - } + padding: '30px', + }, + }, ], }); // Remove element after layout @@ -150,11 +149,11 @@ function layoutArchitecture( addGroups(groups, cy); addServices(services, cy); - addEdges(lines, cy); + addEdges(lines, cy); /** * Merge alignment pairs together if they share a common node. - * + * * Example: [["a", "b"], ["b", "c"], ["d", "e"]] -> [["a", "b", "c"], ["d", "e"]] */ const mergeAlignments = (orig: string[][]): string[][] => { @@ -195,7 +194,7 @@ function layoutArchitecture( console.log('End: ', newAlignments); return newAlignments; - } + }; const horizontalAlignments = cy .edges() @@ -223,7 +222,7 @@ function layoutArchitecture( nodeDimensionsIncludeLabels: true, alignmentConstraint: { horizontal: mergeAlignments(horizontalAlignments), - vertical: mergeAlignments(verticalAlignments) + vertical: mergeAlignments(verticalAlignments), }, relativePlacementConstraint: cy.edges().map((edge) => { const sourceDir = edge.data('sourceDir') as ArchitectureDirection; @@ -231,19 +230,20 @@ function layoutArchitecture( const sourceId = edge.data('source') as string; const targetId = edge.data('target') as string; - if ( - isArchitectureDirectionX(sourceDir) && - isArchitectureDirectionX(targetDir) - ) { - return { left: sourceDir === 'R' ? sourceId : targetId, right: sourceDir === 'L' ? sourceId : targetId, gap: 180 } - } else if ( - isArchitectureDirectionY(sourceDir) && - isArchitectureDirectionY(targetDir) - ) { - return { top: sourceDir === 'B' ? sourceId : targetId, bottom: sourceDir === 'T' ? sourceId : targetId, gap: 180 } + if (isArchitectureDirectionX(sourceDir) && isArchitectureDirectionX(targetDir)) { + return { + left: sourceDir === 'R' ? sourceId : targetId, + right: sourceDir === 'L' ? sourceId : targetId, + gap: 180, + }; + } else if (isArchitectureDirectionY(sourceDir) && isArchitectureDirectionY(targetDir)) { + return { + top: sourceDir === 'B' ? sourceId : targetId, + bottom: sourceDir === 'T' ? sourceId : targetId, + gap: 180, + }; } // TODO: fallback case + RB, TL, etc - }), } as FcoseLayoutOptions).run(); cy.ready((e) => { @@ -289,8 +289,6 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) conf.architecture?.padding ?? defaultConfig.architecture.padding, conf.architecture?.useMaxWidth ?? defaultConfig.architecture.useMaxWidth ); - - }; export const renderer = { draw }; diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts index 9cf78443a..cb95074e4 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -2,65 +2,75 @@ import type { DiagramDB } from '../../diagram-api/types.js'; import type { ArchitectureDiagramConfig } from '../../config.type.js'; import type { D3Element } from '../../mermaidAPI.js'; -export type ArchitectureDirection = 'L' | 'R' | 'T' | 'B' -export const isArchitectureDirection = function(x: unknown): x is ArchitectureDirection { - const temp = x as ArchitectureDirection; - return (temp === 'L' || temp === 'R' || temp === 'T' || temp === 'B') -} -export const isArchitectureDirectionX = function(x: ArchitectureDirection): x is Extract { - const temp = x as Extract - return (temp === 'L' || temp === 'R') -} -export const isArchitectureDirectionY = function(x: ArchitectureDirection): x is Extract { - const temp = x as Extract - return (temp === 'T' || temp === 'B') -} +export type ArchitectureDirection = 'L' | 'R' | 'T' | 'B'; +export const isArchitectureDirection = function (x: unknown): x is ArchitectureDirection { + const temp = x as ArchitectureDirection; + return temp === 'L' || temp === 'R' || temp === 'T' || temp === 'B'; +}; +export const isArchitectureDirectionX = function ( + x: ArchitectureDirection +): x is Extract { + const temp = x as Extract; + return temp === 'L' || temp === 'R'; +}; +export const isArchitectureDirectionY = function ( + x: ArchitectureDirection +): x is Extract { + const temp = x as Extract; + return temp === 'T' || temp === 'B'; +}; export interface ArchitectureStyleOptions { - fontFamily: string; + fontFamily: string; } export interface ArchitectureService { - id: string; - icon?: string; - title?: string; - in?: string; - width?: number; - height?: number; + id: string; + icon?: string; + title?: string; + in?: string; + width?: number; + height?: number; } export interface ArchitectureGroup { - id: string; - icon?: string; - title?: string; - in?: string; + id: string; + icon?: string; + title?: string; + in?: string; } export interface ArchitectureLine { - lhs_id: string; - lhs_dir: ArchitectureDirection; - title?: string; - rhs_id: string; - rhs_dir: ArchitectureDirection; - lhs_into?: boolean; - rhs_into?: boolean; + lhs_id: string; + lhs_dir: ArchitectureDirection; + title?: string; + rhs_id: string; + rhs_dir: ArchitectureDirection; + lhs_into?: boolean; + rhs_into?: boolean; } export interface ArchitectureDB extends DiagramDB { - addService: (id: string, opts: Omit) => void - getServices: () => ArchitectureService[] - addGroup: (id: string, opts: Omit) => void - getGroups: () => ArchitectureGroup[] - addLine: (lhs_id: string, lhs_dir: ArchitectureDirection, rhs_id: string, rhs_dir: ArchitectureDirection, opts: Omit) => void - getLines: () => ArchitectureLine[] - setElementForId: (id: string, element: D3Element) => void; - getElementById: (id: string) => D3Element; + addService: (id: string, opts: Omit) => void; + getServices: () => ArchitectureService[]; + addGroup: (id: string, opts: Omit) => void; + getGroups: () => ArchitectureGroup[]; + addLine: ( + lhs_id: string, + lhs_dir: ArchitectureDirection, + rhs_id: string, + rhs_dir: ArchitectureDirection, + opts: Omit + ) => void; + getLines: () => ArchitectureLine[]; + setElementForId: (id: string, element: D3Element) => void; + getElementById: (id: string) => D3Element; } export interface ArchitectureFields { - services: ArchitectureService[], - groups: ArchitectureGroup[], - lines: ArchitectureLine[], - cnt: number, - config: ArchitectureDiagramConfig -} \ No newline at end of file + services: ArchitectureService[]; + groups: ArchitectureGroup[]; + lines: ArchitectureLine[]; + cnt: number; + config: ArchitectureDiagramConfig; +} diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index b78d2d044..473bf7407 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -1,6 +1,9 @@ import type { D3Element } from '../../mermaidAPI.js'; import { createText } from '../../rendering-util/createText.js'; -import type { ArchitectureDB, ArchitectureGroup, ArchitectureService } from './architectureTypes.js'; +import type { + ArchitectureDB, + ArchitectureService, +} from './architectureTypes.js'; import type { MermaidConfig } from '../../config.type.js'; import type cytoscape from 'cytoscape'; import { log } from '../../logger.js'; @@ -30,25 +33,27 @@ declare module 'cytoscape' { y1: number; y2: number; }; - children: cytoscape.NodeSingular[] + children: cytoscape.NodeSingular[]; }; - data: () => { - type: 'service', - id: string, - icon?: string, - label?: string, - parent?: string, - width: number, - height: number, - [key: string]: any - } | { - type: 'group', - id: string, - icon?: string, - label?: string, - parent?: string, - [key: string]: any - } + data: () => + | { + type: 'service'; + id: string; + icon?: string; + label?: string; + parent?: string; + width: number; + height: number; + [key: string]: any; + } + | { + type: 'group'; + id: string; + icon?: string; + label?: string; + parent?: string; + [key: string]: any; + }; } } @@ -65,20 +70,18 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { 'd', `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` ) - .attr('class', 'edge') + .attr('class', 'edge'); } - }) -} + }); +}; -export const drawGroups = function ( - groupsEl: D3Element, - cy: cytoscape.Core -) { +export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { cy.nodes().map((node, id) => { const data = node.data(); if (data.type === 'group') { const { h, w, x1, x2, y1, y2 } = node.boundingBox(); - let bkgElem = groupsEl.append('rect') + let bkgElem = groupsEl + .append('rect') .attr('x', x1 + 40) .attr('y', y1 + 40) .attr('width', w) @@ -97,13 +100,10 @@ export const drawGroups = function ( .attr('dominant-baseline', 'start') .attr('text-anchor', 'start'); - textElem.attr( - 'transform', - 'translate(' + (x1 + 44) + ', ' + (y1 + 42) + ')' - ); + textElem.attr('transform', 'translate(' + (x1 + 44) + ', ' + (y1 + 42) + ')'); } - }) -} + }); +}; export const drawService = function ( db: ArchitectureDB, @@ -131,21 +131,20 @@ export const drawService = function ( // TODO: dynamic size 'translate(' + 80 / 2 + ', ' + 80 + ')' ); - } let bkgElem = serviceElem.append('g'); if (service.icon) { if (!isIconNameInUse(service.icon)) { - throw new Error(`Invalid SVG Icon name: "${service.icon}"`) + throw new Error(`Invalid SVG Icon name: "${service.icon}"`); } bkgElem = getIcon(service.icon)?.(bkgElem); } else { - bkgElem.append('path').attr('class', 'node-bkg').attr('id', 'node-' + service.id).attr( - 'd', - `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${80 - 2 * 0 - } q5,0 5,5 v${80 - 0} H0 Z` - ); + bkgElem + .append('path') + .attr('class', 'node-bkg') + .attr('id', 'node-' + service.id) + .attr('d', `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${80 - 2 * 0} q5,0 5,5 v${80 - 0} H0 Z`); } serviceElem.attr('class', 'architecture-service'); diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 601939bee..8723d4ca1 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -858,7 +858,7 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) ArchitectureDiagramConfig: title: Architecture Diagram Config - allOf: [{ $ref: '#/$defs/BaseDiagramConfig'}] + allOf: [{ $ref: '#/$defs/BaseDiagramConfig' }] description: The object containing configurations specific for architecture diagrams type: object unevaluatedProperties: false From a493e2fbb31d141301f717efc0b21fe402161af7 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 25 Mar 2024 14:17:05 -0500 Subject: [PATCH 09/73] feat(arch): dynamic node sizing --- packages/mermaid/src/config.type.ts | 2 +- .../diagrams/architecture/architectureDb.ts | 17 ++++++++++++----- .../architecture/architectureRenderer.ts | 11 +++++------ .../src/diagrams/architecture/svgDraw.ts | 19 ++++++++++++------- .../mermaid/src/schemas/config.schema.yaml | 6 +++--- 5 files changed, 33 insertions(+), 22 deletions(-) diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index 014ff65e7..e57e0d886 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -638,7 +638,7 @@ export interface RequirementDiagramConfig extends BaseDiagramConfig { */ export interface ArchitectureDiagramConfig extends BaseDiagramConfig { padding?: number; - maxNodeWidth?: number; + iconSize?: number; } /** * The object containing configurations specific for mindmap diagrams diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts index 896c342aa..6f00be0d4 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureDb.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -6,6 +6,7 @@ import type { ArchitectureDirection, ArchitectureLine, } from './architectureTypes.js'; +import { getConfig } from '../../diagram-api/diagramAPI.js'; import { isArchitectureDirection } from './architectureTypes.js'; import { setAccTitle, @@ -36,10 +37,6 @@ let lines = DEFAULT_ARCHITECTURE_DB.lines; let elements: Record = {}; let cnt = DEFAULT_ARCHITECTURE_DB.cnt; -const config: Required = structuredClone(DEFAULT_ARCHITECTURE_CONFIG); - -const getConfig = (): Required => structuredClone(config); - const clear = (): void => { services = structuredClone(DEFAULT_ARCHITECTURE_DB.services); groups = structuredClone(DEFAULT_ARCHITECTURE_DB.groups); @@ -109,7 +106,6 @@ const setElementForId = (id: string, element: D3Element) => { const getElementById = (id: string) => elements[id]; export const db: ArchitectureDB = { - getConfig, clear, setDiagramTitle, getDiagramTitle, @@ -127,3 +123,14 @@ export const db: ArchitectureDB = { setElementForId, getElementById, }; + +function getConfigField(field: T): Required[T] { + const arch = getConfig().architecture; + if (arch && arch[field] !== undefined) { + const a = arch[field]; + return arch[field] as Required[T] + } + return DEFAULT_ARCHITECTURE_CONFIG[field] +} + +export { getConfigField } \ No newline at end of file diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index 3063849c3..29b6e4d44 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -17,9 +17,9 @@ import { } from './architectureTypes.js'; import { select } from 'd3'; import { setupGraphViewbox } from '../../setupGraphViewbox.js'; -import defaultConfig from '../../defaultConfig.js'; import type { D3Element } from '../../mermaidAPI.js'; import { drawEdges, drawGroups, drawService } from './svgDraw.js'; +import { getConfigField } from './architectureDb.js'; cytoscape.use(fcose); @@ -33,9 +33,8 @@ function addServices(services: ArchitectureService[], cy: cytoscape.Core) { icon: service.icon, label: service.title, parent: service.in, - // TODO: dynamic size - width: 80, - height: 80, + width: getConfigField('iconSize'), + height: getConfigField('iconSize'), }, classes: 'node-service', }); @@ -286,8 +285,8 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) setupGraphViewbox( undefined, svg, - conf.architecture?.padding ?? defaultConfig.architecture.padding, - conf.architecture?.useMaxWidth ?? defaultConfig.architecture.useMaxWidth + getConfigField('padding'), + getConfigField('useMaxWidth') ); }; diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index 473bf7407..446704af6 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -8,6 +8,7 @@ import type { MermaidConfig } from '../../config.type.js'; import type cytoscape from 'cytoscape'; import { log } from '../../logger.js'; import { getIcon, isIconNameInUse } from '../../rendering-util/svgRegister.js'; +import { getConfigField } from './architectureDb.js'; declare module 'cytoscape' { interface EdgeSingular { @@ -76,20 +77,23 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { }; export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { + const iconSize = getConfigField('iconSize') + const halfIconSize = iconSize / 2 + cy.nodes().map((node, id) => { const data = node.data(); if (data.type === 'group') { const { h, w, x1, x2, y1, y2 } = node.boundingBox(); let bkgElem = groupsEl .append('rect') - .attr('x', x1 + 40) - .attr('y', y1 + 40) + .attr('x', x1 + halfIconSize) + .attr('y', y1 + halfIconSize) .attr('width', w) .attr('height', h) .attr('class', 'node-bkg'); const textElem = groupsEl.append('g'); - createText(textElem, data.title, { + createText(textElem, data.label, { useHtmlLabels: false, width: w, classes: 'architecture-service-label', @@ -100,7 +104,7 @@ export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { .attr('dominant-baseline', 'start') .attr('text-anchor', 'start'); - textElem.attr('transform', 'translate(' + (x1 + 44) + ', ' + (y1 + 42) + ')'); + textElem.attr('transform', 'translate(' + (x1 + halfIconSize + 4) + ', ' + (y1 + halfIconSize + 2) + ')'); } }); }; @@ -112,6 +116,7 @@ export const drawService = function ( conf: MermaidConfig ): number { const serviceElem = elem.append('g'); + const iconSize = getConfigField('iconSize') if (service.title) { const textElem = serviceElem.append('g'); @@ -129,7 +134,7 @@ export const drawService = function ( textElem.attr( 'transform', // TODO: dynamic size - 'translate(' + 80 / 2 + ', ' + 80 + ')' + 'translate(' + (iconSize / 2) + ', ' + iconSize + ')' ); } @@ -138,13 +143,13 @@ export const drawService = function ( if (!isIconNameInUse(service.icon)) { throw new Error(`Invalid SVG Icon name: "${service.icon}"`); } - bkgElem = getIcon(service.icon)?.(bkgElem); + bkgElem = getIcon(service.icon)?.(bkgElem, iconSize); } else { bkgElem .append('path') .attr('class', 'node-bkg') .attr('id', 'node-' + service.id) - .attr('d', `M0 ${80 - 0} v${-80 + 2 * 0} q0,-5 5,-5 h${80 - 2 * 0} q5,0 5,5 v${80 - 0} H0 Z`); + .attr('d', `M0 ${iconSize - 0} v${-iconSize + 2 * 0} q0,-5 5,-5 h${iconSize - 2 * 0} q5,0 5,5 v${iconSize - 0} H0 Z`); } serviceElem.attr('class', 'architecture-service'); diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 8723d4ca1..146237eb8 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -865,14 +865,14 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) required: - useMaxWidth - padding - - maxNodeWidth + - iconSize properties: padding: type: number default: 10 - maxNodeWidth: + iconSize: type: number - default: 200 + default: 80 MindmapDiagramConfig: title: Mindmap Diagram Config From 0ab7a3d8ec0ef5aa6735d91acb3134c4d81c113a Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 27 Mar 2024 09:30:44 -0500 Subject: [PATCH 10/73] feat(arch): added 4 default icons, added config field for icons --- packages/mermaid/src/config.type.ts | 6 +++ packages/mermaid/src/mermaidAPI.ts | 9 ++++ .../src/rendering-util/svg/database.ts | 16 ++++++ .../mermaid/src/rendering-util/svg/disk.ts | 18 +++++++ .../mermaid/src/rendering-util/svg/index.ts | 14 +++++ .../src/rendering-util/svg/internet.ts | 17 +++++++ .../mermaid/src/rendering-util/svg/server.ts | 40 +++++++++++++++ .../mermaid/src/rendering-util/svgRegister.ts | 51 +++++++++++-------- .../mermaid/src/schemas/config.schema.yaml | 6 +++ 9 files changed, 156 insertions(+), 21 deletions(-) create mode 100644 packages/mermaid/src/rendering-util/svg/database.ts create mode 100644 packages/mermaid/src/rendering-util/svg/disk.ts create mode 100644 packages/mermaid/src/rendering-util/svg/index.ts create mode 100644 packages/mermaid/src/rendering-util/svg/internet.ts create mode 100644 packages/mermaid/src/rendering-util/svg/server.ts diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index e57e0d886..1c8862140 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -135,6 +135,12 @@ 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; /** * This option controls if the generated ids of nodes in the SVG are * generated randomly or based on a seed. diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index ad9d7d286..ba580be88 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -31,6 +31,8 @@ import { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility. import type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js'; import { preprocessDiagram } from './preprocess.js'; import { decodeEntities } from './utils.js'; +import { registerIcons } from './rendering-util/svgRegister.js'; +import defaultIconLibrary from './rendering-util/svg/index.js'; const MAX_TEXTLENGTH = 50_000; const MAX_TEXTLENGTH_EXCEEDED_MSG = @@ -502,6 +504,13 @@ function initialize(options: MermaidConfig = {}) { // Set default options configApi.saveConfigFromInitialize(options); + registerIcons(defaultIconLibrary) + if (options?.iconLibraries) { + options.iconLibraries.forEach((library) => { + 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/svg/database.ts b/packages/mermaid/src/rendering-util/svg/database.ts new file mode 100644 index 000000000..697114b31 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/database.ts @@ -0,0 +1,16 @@ +/** + * @author 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/disk.ts b/packages/mermaid/src/rendering-util/svg/disk.ts new file mode 100644 index 000000000..e96d33762 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/disk.ts @@ -0,0 +1,18 @@ +/** + * @author 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/index.ts b/packages/mermaid/src/rendering-util/svg/index.ts new file mode 100644 index 000000000..7a34b78e4 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/index.ts @@ -0,0 +1,14 @@ +import { IconLibrary } from "../svgRegister.js"; +import database from "./database.js"; +import server from "./server.js"; +import disk from "./disk.js"; +import internet from "./internet.js"; + +const defaultIconLibrary: IconLibrary = { + database: database, + server: server, + disk: disk, + internet: internet, +} + +export default defaultIconLibrary \ No newline at end of file diff --git a/packages/mermaid/src/rendering-util/svg/internet.ts b/packages/mermaid/src/rendering-util/svg/internet.ts new file mode 100644 index 000000000..c4edf9b4e --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/internet.ts @@ -0,0 +1,17 @@ +/** + * @author 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/server.ts b/packages/mermaid/src/rendering-util/svg/server.ts new file mode 100644 index 000000000..559148a71 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/server.ts @@ -0,0 +1,40 @@ +/** + * @author 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/svgRegister.ts b/packages/mermaid/src/rendering-util/svgRegister.ts index 303c43f57..4ab15b560 100644 --- a/packages/mermaid/src/rendering-util/svgRegister.ts +++ b/packages/mermaid/src/rendering-util/svgRegister.ts @@ -1,33 +1,42 @@ -import { Selection } from "d3-selection"; +import { Selection } from 'd3-selection'; -type IconResolver = (parent: Selection) => Selection -type IconLibrary = Record +type IconResolver = ( + parent: Selection, width?: number +) => Selection; +type IconLibrary = Record; -const icons: IconLibrary = {} +const icons: IconLibrary = {}; const isIconNameInUse = (name: string): boolean => { - return icons[name] !== undefined; -} + return icons[name] !== undefined; +}; const registerIcon = (name: string, resolver: IconResolver) => { - if(!isIconNameInUse(name)) { - icons[name] = resolver; - } -} + if (!isIconNameInUse(name)) { + icons[name] = resolver; + } +}; const registerIcons = (library: IconLibrary) => { - Object.entries(library).forEach(([name, resolver]) => { - if (!isIconNameInUse(name)) { - icons[name] = resolver; - } - }) -} + 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 null; // TODO: return default + if (isIconNameInUse(name)) { + return icons[name]; + } + return null; // TODO: return default +}; + +const createIcon = (icon: string, originalSize: number): IconResolver => { + return (parent: Selection, size: number = originalSize) => { + parent.html(`${icon}`) + return parent + } } -export { registerIcon, registerIcons, getIcon, isIconNameInUse, IconLibrary } \ No newline at end of file +export { registerIcon, registerIcons, getIcon, isIconNameInUse, createIcon, IconLibrary }; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 146237eb8..349de47f7 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -177,6 +177,12 @@ 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 + # tsType: Record deterministicIds: description: | This option controls if the generated ids of nodes in the SVG are From 10682ef31f10edd67f4db16313ec5f3caf93859b Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 27 Mar 2024 09:31:06 -0500 Subject: [PATCH 11/73] feat(arch): added demo --- demos/architecture.html | 102 ++++++++++++++++++++++++++++++++++++++++ demos/index.html | 3 ++ 2 files changed, 105 insertions(+) create mode 100644 demos/architecture.html diff --git a/demos/architecture.html b/demos/architecture.html new file mode 100644 index 000000000..19fd09d97 --- /dev/null +++ b/demos/architecture.html @@ -0,0 +1,102 @@ + + + + + + Architecture Mermaid Quick Test Page + + + + + +

Architecture diagram demo

+
+      architecture
+        group api[API]
+
+        service db(database)[Database] in api
+        service disk1(disk)[Storage] in api
+        service disk2(disk)[Storage] in api
+        service server(server)[Server] in api
+        service gateway(internet)[Gateway] 
+
+        db L--R server
+        disk1 T--B server
+        disk2 T--B db
+        server T--B gateway
+    
+ + + + diff --git a/demos/index.html b/demos/index.html index efe054b4d..4e35e72a7 100644 --- a/demos/index.html +++ b/demos/index.html @@ -84,6 +84,9 @@
  • Layered Blocks

  • +
  • +

    Architecture

    +
  • From b911bd3e42012d7026744f4c5d2e04aad92fe42c Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sun, 31 Mar 2024 13:51:40 -0500 Subject: [PATCH 12/73] feat(arch): improved error handling --- .../diagrams/architecture/architectureDb.ts | 40 +++++++++++++++++-- .../architecture/architectureTypes.ts | 3 +- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts index 6f00be0d4..e08e71c36 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureDb.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -27,27 +27,44 @@ export const DEFAULT_ARCHITECTURE_DB: ArchitectureFields = { services: [], groups: [], lines: [], - cnt: 0, + registeredIds: {}, config: DEFAULT_ARCHITECTURE_CONFIG, } as const; let services = DEFAULT_ARCHITECTURE_DB.services; let groups = DEFAULT_ARCHITECTURE_DB.groups; let lines = DEFAULT_ARCHITECTURE_DB.lines; +let registeredIds = DEFAULT_ARCHITECTURE_DB.registeredIds; let elements: Record = {}; -let cnt = DEFAULT_ARCHITECTURE_DB.cnt; const clear = (): void => { services = structuredClone(DEFAULT_ARCHITECTURE_DB.services); groups = structuredClone(DEFAULT_ARCHITECTURE_DB.groups); lines = structuredClone(DEFAULT_ARCHITECTURE_DB.lines); + registeredIds = structuredClone(DEFAULT_ARCHITECTURE_DB.registeredIds) elements = {}; - cnt = 0; commonClear(); }; const addService = function (id: string, opts: Omit = {}) { const { icon, in: inside, title } = opts; + if (registeredIds[id] !== undefined) { + throw new Error(`The service id [${id}] is already in use by another ${registeredIds[id]}`) + } + if (inside !== undefined) { + if (id === inside) { + throw new Error(`The service [${id}] cannot be placed within itself`) + } + if (registeredIds[inside] === undefined) { + throw new Error(`The service [${id}]'s parent does not exist. Please make sure the parent is created before this service`) + } + if (registeredIds[inside] === 'service') { + throw new Error(`The service [${id}]'s parent is not a group`); + } + } + + registeredIds[id] = 'service'; + services.push({ id, icon, @@ -59,6 +76,23 @@ const getServices = (): ArchitectureService[] => services; const addGroup = function (id: string, opts: Omit = {}) { const { icon, in: inside, title } = opts; + if (registeredIds[id] !== undefined) { + throw new Error(`The group id [${id}] is already in use by another ${registeredIds[id]}`) + } + if (inside !== undefined) { + if (id === inside) { + throw new Error(`The group [${id}] cannot be placed within itself`) + } + if (registeredIds[inside] === undefined) { + throw new Error(`The group [${id}]'s parent does not exist. Please make sure the parent is created before this group`) + } + if (registeredIds[inside] === 'service') { + throw new Error(`The group [${id}]'s parent is not a group`); + } + } + + registeredIds[id] = 'group'; + groups.push({ id, icon, diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts index cb95074e4..21c620c61 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -51,6 +51,7 @@ export interface ArchitectureLine { } export interface ArchitectureDB extends DiagramDB { + clear: () => void; addService: (id: string, opts: Omit) => void; getServices: () => ArchitectureService[]; addGroup: (id: string, opts: Omit) => void; @@ -71,6 +72,6 @@ export interface ArchitectureFields { services: ArchitectureService[]; groups: ArchitectureGroup[]; lines: ArchitectureLine[]; - cnt: number; + registeredIds: Record; config: ArchitectureDiagramConfig; } From 46a37a6eea72dbb7b3c845e5f94fa9f66dce9878 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sun, 31 Mar 2024 13:52:23 -0500 Subject: [PATCH 13/73] feat(arch): added fallback icon --- packages/mermaid/src/rendering-util/svg/index.ts | 2 ++ .../mermaid/src/rendering-util/svg/unknown.ts | 10 ++++++++++ .../mermaid/src/rendering-util/svgRegister.ts | 16 ++++++++-------- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 packages/mermaid/src/rendering-util/svg/unknown.ts diff --git a/packages/mermaid/src/rendering-util/svg/index.ts b/packages/mermaid/src/rendering-util/svg/index.ts index 7a34b78e4..bc8f1c5ac 100644 --- a/packages/mermaid/src/rendering-util/svg/index.ts +++ b/packages/mermaid/src/rendering-util/svg/index.ts @@ -3,12 +3,14 @@ import database from "./database.js"; import server from "./server.js"; import disk from "./disk.js"; import internet from "./internet.js"; +import unknown from "./unknown.js"; const defaultIconLibrary: IconLibrary = { database: database, server: server, disk: disk, internet: internet, + unknown: unknown, } export default defaultIconLibrary \ No newline at end of file diff --git a/packages/mermaid/src/rendering-util/svg/unknown.ts b/packages/mermaid/src/rendering-util/svg/unknown.ts new file mode 100644 index 000000000..25b1ef5c4 --- /dev/null +++ b/packages/mermaid/src/rendering-util/svg/unknown.ts @@ -0,0 +1,10 @@ +/** + * @author Nicolas Newman + * @see https://github.com/NicolasNewman/IconLibrary + */ +import { createIcon } from "../svgRegister.js"; + +export default createIcon(` + + ? +`, 80) \ No newline at end of file diff --git a/packages/mermaid/src/rendering-util/svgRegister.ts b/packages/mermaid/src/rendering-util/svgRegister.ts index 4ab15b560..b5b4c5e28 100644 --- a/packages/mermaid/src/rendering-util/svgRegister.ts +++ b/packages/mermaid/src/rendering-util/svgRegister.ts @@ -5,6 +5,13 @@ type IconResolver = ( ) => Selection; type IconLibrary = Record; +const createIcon = (icon: string, originalSize: number): IconResolver => { + return (parent: Selection, size: number = originalSize) => { + parent.html(`${icon}`) + return parent + } +} + const icons: IconLibrary = {}; const isIconNameInUse = (name: string): boolean => { @@ -29,14 +36,7 @@ const getIcon = (name: string): IconResolver | null => { if (isIconNameInUse(name)) { return icons[name]; } - return null; // TODO: return default + return icons["unknown"]; }; -const createIcon = (icon: string, originalSize: number): IconResolver => { - return (parent: Selection, size: number = originalSize) => { - parent.html(`${icon}`) - return parent - } -} - export { registerIcon, registerIcons, getIcon, isIconNameInUse, createIcon, IconLibrary }; From 361e25ba34df09e2cc03a239ae0b20b3960202c2 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sun, 31 Mar 2024 13:53:34 -0500 Subject: [PATCH 14/73] fix(arch): fixed compound nodes overlapping --- .../architecture/architectureRenderer.ts | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index 29b6e4d44..e51718356 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -72,6 +72,7 @@ function positionServices(db: ArchitectureDB, cy: cytoscape.Core) { if (data.type === 'group') return; data.x = node.position().x; data.y = node.position().y; + console.log(`Position service (${data.id}): (${data.x}, ${data.y})`) const nodeElem = db.getElementById(data.id); nodeElem.attr('transform', 'translate(' + (data.x || 0) + ',' + (data.y || 0) + ')'); @@ -156,6 +157,8 @@ function layoutArchitecture( * Example: [["a", "b"], ["b", "c"], ["d", "e"]] -> [["a", "b", "c"], ["d", "e"]] */ const mergeAlignments = (orig: string[][]): string[][] => { + if (orig.length < 1) return orig; + console.log('===== mergeAlignments ====='); console.log('Start: ', orig); // Mapping of discovered ids to their index in the new alignment array const map: Record = {}; @@ -192,6 +195,8 @@ function layoutArchitecture( } console.log('End: ', newAlignments); + console.log('==========================='); + return newAlignments; }; @@ -219,6 +224,23 @@ function layoutArchitecture( styleEnabled: false, animate: false, nodeDimensionsIncludeLabels: true, + // Adjust the edge parameters if it passes through the border of a group + // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67 + idealEdgeLength(edge) { + const [nodeA, nodeB] = edge.connectedNodes() + const {parent: parentA} = nodeA.data(); + const {parent: parentB} = nodeB.data(); + const elasticity = parentA === parentB ? 1.25*getConfigField('iconSize') : 0.5*getConfigField('iconSize'); + return elasticity; + }, + edgeElasticity(edge) { + const [nodeA, nodeB] = edge.connectedNodes() + console.log(nodeA.data()); + const {parent: parentA} = nodeA.data(); + const {parent: parentB} = nodeB.data(); + const elasticity = parentA === parentB ? 0.45 : 0.001; + return elasticity + }, alignmentConstraint: { horizontal: mergeAlignments(horizontalAlignments), vertical: mergeAlignments(verticalAlignments), @@ -228,19 +250,23 @@ function layoutArchitecture( const targetDir = edge.data('targetDir') as ArchitectureDirection; const sourceId = edge.data('source') as string; const targetId = edge.data('target') as string; - + + let gap = 1.25*getConfigField('iconSize'); + console.log(`relativeConstraint: ${sourceId} ${sourceDir}--${targetDir} ${targetId} (gap=${gap})`); if (isArchitectureDirectionX(sourceDir) && isArchitectureDirectionX(targetDir)) { return { left: sourceDir === 'R' ? sourceId : targetId, right: sourceDir === 'L' ? sourceId : targetId, - gap: 180, + gap, }; } else if (isArchitectureDirectionY(sourceDir) && isArchitectureDirectionY(targetDir)) { return { top: sourceDir === 'B' ? sourceId : targetId, bottom: sourceDir === 'T' ? sourceId : targetId, - gap: 180, + gap, }; + } else { + console.log('FALLBACK CASE NEEDED') } // TODO: fallback case + RB, TL, etc }), @@ -277,6 +303,7 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) drawServices(db, servicesElem, services, conf); const cy = await layoutArchitecture(services, groups, lines); + console.log(cy.nodes().map(node => ({a: node.data()}))); drawEdges(edgesElem, cy); drawGroups(groupElem, cy); @@ -288,6 +315,8 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) getConfigField('padding'), getConfigField('useMaxWidth') ); + + console.log('==============================================================') }; export const renderer = { draw }; From f47bbee24af2e1223c85abaf2164900a66828bcc Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sun, 31 Mar 2024 13:54:06 -0500 Subject: [PATCH 15/73] feat(arch): added more demos --- demos/architecture.html | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/demos/architecture.html b/demos/architecture.html index 19fd09d97..96a376957 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -15,6 +15,7 @@

    Architecture diagram demo

    +

    Simple diagram with groups

           architecture
             group api[API]
    @@ -31,6 +32,66 @@
             server T--B gateway
         
    +
    +

    Groups within groups

    +
    +      architecture
    +        group api[API]
    +        group public[Public API] in api
    +        group private[Private API] in api
    +
    +
    +        service serv1(server)[Server] in public
    +
    +
    +        service serv2(server)[Server] in private
    +        service db(database)[Database] in private
    +
    +        service gateway(internet)[Gateway] in api
    +
    +        serv1 B--T serv2
    +
    +        serv2 L--R db
    +
    +        serv1 L--R gateway
    +    
    + +
    + +

    Default icon (?) from uknown icon name

    +
    +      architecture
    +        service unknown(iconnamedoesntexist)[Uknown Icon]
    +    
    + +
    + +
    +        architecture
    +            group vpc[Private VPC]
    +            group vpc2[Public VPC]
    +
    +            service s3(s3)[S3 Bucket]
    +            service rds(database)[RDS DB]
    +            service ddb(dynamodb)[DynamoDB]
    +            service ec2(ec2)[EC2 Server] in vpc
    +            service gateway(api_gateway)[API Gateway] in vpc
    +            service docdb(documentdb)[DocumentDB]
    +            service lambda(lambda)[Lambda] in vpc
    +
    +            service serv1(ec2)[Public Server] in vpc2
    +            service serv2(ec2)[Private Server] in vpc2
    +
    +            serv1 L--R serv2
    +
    +            s3 L--R rds
    +            s3 B--T ddb
    +            s3 R--L docdb
    +            gateway L--R ec2
    +            gateway T--B rds
    +            gateway B--T lambda
    +    
    + - - + htmlLabels: true, + }, + gantt: { + useMaxWidth: false, + }, + architecture: { + iconSize: 80, + }, + useMaxWidth: false, + }); + function callback() { + alert('It worked'); + } + mermaid.parseError = function (err, hash) { + console.error('In parse error:'); + console.error(err); + }; + + + + \ No newline at end of file diff --git a/packages/mermaid/src/diagrams/architecture/architectureDb.ts b/packages/mermaid/src/diagrams/architecture/architectureDb.ts index d3338260f..3c30ca1d4 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureDb.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureDb.ts @@ -128,6 +128,8 @@ const addEdge = function ({ rhsDir, lhsInto, rhsInto, + lhsGroup, + rhsGroup, title, }: ArchitectureEdge) { if (!isArchitectureDirection(lhsDir)) { @@ -152,14 +154,29 @@ const addEdge = function ({ ); } + const lhsGroupId = state.records.services[lhsId].in + const rhsGroupId = state.records.services[rhsId].in + if (lhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) { + throw new Error( + `The left-hand id [${lhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.` + ) + } + if (rhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) { + throw new Error( + `The right-hand id [${rhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.` + ) + } + const edge = { lhsId, lhsDir, + lhsInto, + lhsGroup, rhsId, rhsDir, - title, - lhsInto, rhsInto, + rhsGroup, + title, }; state.records.edges.push(edge); diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index dd02c2f3d..af90a58dd 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -84,7 +84,7 @@ function addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) { function addEdges(edges: ArchitectureEdge[], cy: cytoscape.Core) { edges.forEach((parsedEdge) => { - const { lhsId, rhsId, lhsInto, rhsInto, lhsDir, rhsDir, title } = parsedEdge; + const { lhsId, rhsId, lhsInto, lhsGroup, rhsInto, lhsDir, rhsDir, rhsGroup, title } = parsedEdge; const edgeType = isArchitectureDirectionXY(parsedEdge.lhsDir, parsedEdge.rhsDir) ? 'segments' : 'straight'; @@ -94,6 +94,7 @@ function addEdges(edges: ArchitectureEdge[], cy: cytoscape.Core) { source: lhsId, sourceDir: lhsDir, sourceArrow: lhsInto, + sourceGroup: lhsGroup, sourceEndpoint: lhsDir === 'L' ? '0 50%' @@ -105,6 +106,7 @@ function addEdges(edges: ArchitectureEdge[], cy: cytoscape.Core) { target: rhsId, targetDir: rhsDir, targetArrow: rhsInto, + targetGroup: rhsGroup, targetEndpoint: rhsDir === 'L' ? '0 50%' diff --git a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts index 34ea04658..9e043d6d3 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureTypes.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureTypes.ts @@ -199,11 +199,13 @@ export interface ArchitectureGroup { export interface ArchitectureEdge { lhsId: string; lhsDir: ArchitectureDirection; - title?: string; + lhsInto?: boolean; + lhsGroup?: boolean; rhsId: string; rhsDir: ArchitectureDirection; - lhsInto?: boolean; rhsInto?: boolean; + rhsGroup?: boolean; + title?: string; } export interface ArchitectureDB extends DiagramDB { @@ -246,9 +248,11 @@ export type EdgeSingularData = { source: string; sourceDir: ArchitectureDirection; sourceArrow?: boolean; + sourceGroup?: boolean; target: string; targetDir: ArchitectureDirection; targetArrow?: boolean; + targetGroup?: boolean; [key: string]: any; }; @@ -274,23 +278,23 @@ export interface EdgeSingular extends cytoscape.EdgeSingular { export type NodeSingularData = | { - type: 'service'; - id: string; - icon?: string; - label?: string; - parent?: string; - width: number; - height: number; - [key: string]: any; - } + type: 'service'; + id: string; + icon?: string; + label?: string; + parent?: string; + width: number; + height: number; + [key: string]: any; + } | { - type: 'group'; - id: string; - icon?: string; - label?: string; - parent?: string; - [key: string]: any; - }; + type: 'group'; + id: string; + icon?: string; + label?: string; + parent?: string; + [key: string]: any; + }; export const nodeData = (node: cytoscape.NodeSingular) => { return node.data() as NodeSingularData; diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index 5218bf1cc..41b513539 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -22,17 +22,37 @@ import { getConfigField } from './architectureDb.js'; import { getConfig } from '../../diagram-api/diagramAPI.js'; export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { + const padding = getConfigField('padding'); const iconSize = getConfigField('iconSize'); const arrowSize = iconSize / 6; const halfArrowSize = arrowSize / 2; cy.edges().map((edge, id) => { - const { sourceDir, sourceArrow, targetDir, targetArrow, label } = edgeData(edge); - const { x: startX, y: startY } = edge[0].sourceEndpoint(); + const { sourceDir, sourceArrow, sourceGroup, targetDir, targetArrow, targetGroup, label } = edgeData(edge); + let { x: startX, y: startY } = edge[0].sourceEndpoint(); const { x: midX, y: midY } = edge[0].midpoint(); - const { x: endX, y: endY } = edge[0].targetEndpoint(); + let { x: endX, y: endY } = edge[0].targetEndpoint(); + + const groupEdgeShift = padding + 4; + // +18 comes from the service label height that extends the padding on the bottom side of each group + if (sourceGroup) { + if (isArchitectureDirectionX(sourceDir)) { + sourceDir === 'L' ? startX -= groupEdgeShift : startX += groupEdgeShift; + } else { + sourceDir === 'T' ? startY -= groupEdgeShift : startY += (groupEdgeShift + 18); + } + } + + if (targetGroup) { + if (isArchitectureDirectionX(targetDir)) { + targetDir === 'L' ? endX -= groupEdgeShift : endX += groupEdgeShift; + } else { + targetDir === 'T' ? endY -= groupEdgeShift : endY += (groupEdgeShift + 18); + } + } + if (edge[0]._private.rscratch) { - const bounds = edge[0]._private.rscratch; + // const bounds = edge[0]._private.rscratch; const g = edgesEl.insert('g'); @@ -42,11 +62,11 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { if (sourceArrow) { const xShift = isArchitectureDirectionX(sourceDir) - ? ArchitectureDirectionArrowShift[sourceDir](bounds.startX, arrowSize) - : bounds.startX - halfArrowSize; + ? ArchitectureDirectionArrowShift[sourceDir](startX, arrowSize) + : startX - halfArrowSize; const yShift = isArchitectureDirectionY(sourceDir) - ? ArchitectureDirectionArrowShift[sourceDir](bounds.startY, arrowSize) - : bounds.startY - halfArrowSize; + ? ArchitectureDirectionArrowShift[sourceDir](startY, arrowSize) + : startY - halfArrowSize; g.insert('polygon') .attr('points', ArchitectureDirectionArrow[sourceDir](arrowSize)) @@ -55,11 +75,11 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { } if (targetArrow) { const xShift = isArchitectureDirectionX(targetDir) - ? ArchitectureDirectionArrowShift[targetDir](bounds.endX, arrowSize) - : bounds.endX - halfArrowSize; + ? ArchitectureDirectionArrowShift[targetDir](endX, arrowSize) + : endX - halfArrowSize; const yShift = isArchitectureDirectionY(targetDir) - ? ArchitectureDirectionArrowShift[targetDir](bounds.endY, arrowSize) - : bounds.endY - halfArrowSize; + ? ArchitectureDirectionArrowShift[targetDir](endY, arrowSize) + : endY - halfArrowSize; g.insert('polygon') .attr('points', ArchitectureDirectionArrow[targetDir](arrowSize)) @@ -165,10 +185,10 @@ export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { bkgElem.attr( 'transform', 'translate(' + - (shiftedX1 + halfIconSize + 1) + - ', ' + - (shiftedY1 + halfIconSize + 1) + - ')' + (shiftedX1 + halfIconSize + 1) + + ', ' + + (shiftedY1 + halfIconSize + 1) + + ')' ); shiftedX1 += groupIconSize; // TODO: test with more values @@ -196,10 +216,10 @@ export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { textElem.attr( 'transform', 'translate(' + - (shiftedX1 + halfIconSize + 4) + - ', ' + - (shiftedY1 + halfIconSize + 2) + - ')' + (shiftedX1 + halfIconSize + 4) + + ', ' + + (shiftedY1 + halfIconSize + 2) + + ')' ); } } diff --git a/packages/parser/src/language/architecture/architecture.langium b/packages/parser/src/language/architecture/architecture.langium index 101390e84..18a823b35 100644 --- a/packages/parser/src/language/architecture/architecture.langium +++ b/packages/parser/src/language/architecture/architecture.langium @@ -30,7 +30,7 @@ Service: ; Edge: - lhsId=ARCH_ID Arrow rhsId=ARCH_ID EOL + lhsId=ARCH_ID lhsGroup?=ARROW_GROUP? Arrow rhsId=ARCH_ID rhsGroup?=ARROW_GROUP? EOL ; terminal ARROW_DIRECTION: 'L' | 'R' | 'T' | 'B'; @@ -38,4 +38,5 @@ terminal ARCH_ID: /[\w]+/; terminal ARCH_TEXT_ICON: /\("[^"]+"\)/; terminal ARCH_ICON: /\([\w]+\)/; terminal ARCH_TITLE: /\[[\w ]+\]/; +terminal ARROW_GROUP: /\{group\}/; terminal ARROW_INTO: /\(|\)/; \ No newline at end of file From b09dc5db67000ca726cb158eae3d855bc9a4e397 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Fri, 10 May 2024 10:10:19 -0500 Subject: [PATCH 41/73] feat(arch): implemented junction nodes --- demos/architecture.html | 45 +++++++++++++- .../diagrams/architecture/architectureDb.ts | 58 ++++++++++++++----- .../architecture/architectureParser.ts | 3 +- .../architecture/architectureRenderer.ts | 41 +++++++++++-- .../architecture/architectureTypes.ts | 38 +++++++++++- .../src/diagrams/architecture/svgDraw.ts | 50 +++++++++++++++- .../architecture/architecture.langium | 5 ++ 7 files changed, 213 insertions(+), 27 deletions(-) diff --git a/demos/architecture.html b/demos/architecture.html index 2f805547e..32edb6f1d 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -16,7 +16,6 @@

    Architecture diagram demo

    -

    Simple diagram with groups

           architecture
    @@ -182,6 +181,50 @@
         

    +

    Junction Demo

    +
    +      architecture
    +        service left_disk(disk)[Disk]
    +        service top_disk(disk)[Disk]
    +        service bottom_disk(disk)[Disk]
    +        service top_gateway(internet)[Gateway]
    +        service bottom_gateway(internet)[Gateway]
    +        junction juncC
    +        junction juncR
    +
    +        left_disk R--L juncC
    +        top_disk B--T juncC
    +        bottom_disk T--B juncC
    +        juncC R--L juncR
    +        top_gateway B--T juncR
    +        bottom_gateway T--B juncR
    +    
    +
    + +

    Junction Demo Groups

    +
    +      architecture
    +        group left
    +        group right
    +        service left_disk(disk)[Disk] in left
    +        service top_disk(disk)[Disk] in left
    +        service bottom_disk(disk)[Disk] in left
    +        service top_gateway(internet)[Gateway] in right
    +        service bottom_gateway(internet)[Gateway] in right
    +        junction juncC in left
    +        junction juncR in right
    +
    +        left_disk R--L juncC
    +        top_disk B--T juncC
    +        bottom_disk T--B juncC
    +
    +
    +        top_gateway (B--T juncR
    +        bottom_gateway (T--B juncR
    +
    +        juncC{group} R--L) juncR{group}
    +    
    +
    - - - \ No newline at end of file + iconLibraries: ['aws:full'], + }); + function callback() { + alert('It worked'); + } + mermaid.parseError = function (err, hash) { + console.error('In parse error:'); + console.error(err); + }; + + + diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 991c3e42b..954528258 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -140,4 +140,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index 5d1be3e04..0ce02005e 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -102,7 +102,8 @@ function addGroups(groups: ArchitectureGroup[], cy: cytoscape.Core) { function addEdges(edges: ArchitectureEdge[], cy: cytoscape.Core) { edges.forEach((parsedEdge) => { - const { lhsId, rhsId, lhsInto, lhsGroup, rhsInto, lhsDir, rhsDir, rhsGroup, title } = parsedEdge; + const { lhsId, rhsId, lhsInto, lhsGroup, rhsInto, lhsDir, rhsDir, rhsGroup, title } = + parsedEdge; const edgeType = isArchitectureDirectionXY(parsedEdge.lhsDir, parsedEdge.rhsDir) ? 'segments' : 'straight'; From 25609d69c49852772dabf818b9688086fd07187a Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 22 Jul 2024 09:34:36 -0500 Subject: [PATCH 54/73] chore(arch): changed syntax keyword from architecture -> architecture-beta --- demos/architecture.html | 264 +++++++++--------- docs/syntax/architecture.md | 10 +- .../mermaid/src/docs/syntax/architecture.md | 6 +- .../architecture/architecture.langium | 2 +- 4 files changed, 141 insertions(+), 141 deletions(-) diff --git a/demos/architecture.html b/demos/architecture.html index 3855d6d0a..02f7c0a11 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -1,24 +1,23 @@ + + + + Architecture Mermaid Quick Test Page + + + - - - - Architecture Mermaid Quick Test Page - - - - - -

    Architecture diagram demo

    -

    Simple diagram with groups

    -
    -      architecture
    +  
    +    

    Architecture diagram demo

    +

    Simple diagram with groups

    +
    +      architecture-beta
             group api(cloud)[API]
     
             service db(database)[Database] in api
    @@ -32,11 +31,11 @@
             disk2 T--B db
             server T--B gateway
         
    -
    +
    -

    Groups within groups

    -
    -      architecture
    +    

    Groups within groups

    +
    +      architecture-beta
             group api[API]
             group public[Public API] in api
             group private[Private API] in api
    @@ -56,18 +55,18 @@
     
             serv1 L--R gateway
         
    -
    +
    -

    Default icon (?) from unknown icon name

    -
    -      architecture
    +    

    Default icon (?) from unknown icon name

    +
    +      architecture-beta
             service unknown(iconnamedoesntexist)[Unknown Icon]
         
    -
    +
    -

    Split Direction

    -
    -      architecture
    +    

    Split Direction

    +
    +      architecture-beta
             service db(database)[Database]
             service s3(disk)[Storage]
             service serv1(server)[Server 1]
    @@ -79,11 +78,11 @@
             serv2 L--B s3
             serv1 T--B disk
         
    -
    +
    -

    Arrow Tests

    -
    -      architecture
    +    

    Arrow Tests

    +
    +      architecture-beta
             service servC(server)[Server 1]
             service servL(server)[Server 2]
             service servR(server)[Server 3]
    @@ -100,8 +99,8 @@
             servR (T--R) servT
             servR (B--R) servB
         
    -
    -      architecture
    +    
    +      architecture-beta
             service servC(server)[Server 1]
             service servL(server)[Server 2]
             service servR(server)[Server 3]
    @@ -118,11 +117,11 @@
             servT (R--T) servR
             servB (R--B) servR
         
    -
    +
    -

    Group Edges

    -
    -      architecture
    +    

    Group Edges

    +
    +      architecture-beta
             group left_group(cloud)[Left]
             group right_group(cloud)[Right]
             group top_group(cloud)[Top]
    @@ -139,12 +138,13 @@
             right_disk{group} (L--R) center_disk{group}
             top_disk{group} (B--T) center_disk{group}
             bottom_disk{group} (T--B) center_disk{group}
    -  
    -
    +
    +
    -

    Edge Label Test

    -
    -      architecture
    +    

    Edge Label Test

    +
    +      architecture-beta
             service servC(server)[Server 1]
             service servL(server)[Server 2]
             service servR(server)[Server 3]
    @@ -161,8 +161,8 @@
             servR T-[Label]-R servT
             servR B-[Label]-R servB
         
    -
    -      architecture
    +    
    +      architecture-beta
             service servC(server)[Server 1]
             service servL(server)[Server 2]
             service servR(server)[Server 3]
    @@ -180,10 +180,10 @@
             servR B-[Label that is Long]-R servB
         
    -
    -

    Junction Demo

    -
    -      architecture
    +    
    +

    Junction Demo

    +
    +      architecture-beta
             service left_disk(disk)[Disk]
             service top_disk(disk)[Disk]
             service bottom_disk(disk)[Disk]
    @@ -199,11 +199,11 @@
             top_gateway B--T juncR
             bottom_gateway T--B juncR
         
    -
    +
    -

    Junction Demo Groups

    -
    -      architecture
    +    

    Junction Demo Groups

    +
    +      architecture-beta
             group left
             group right
             service left_disk(disk)[Disk] in left
    @@ -224,87 +224,87 @@
     
             juncC{group} R--L) juncR{group}
         
    -
    +
    -

    AWS Icon Demo

    -
    -    architecture
    -      service s3(s3)[Cloud Store]
    -      service ec2(ec2)[Server]
    -      service wave(wavelength)[Wave]
    +    

    AWS Icon Demo

    +
    +    architecture-beta
    +      service s3(aws:s3)[Cloud Store]
    +      service ec2(aws:ec2)[Server]
    +      service wave(aws:wavelength)[Wave]
     
           s3 L--R ec2
           s3 T--B wave
    -  
    +
    - - - - \ No newline at end of file + iconLibraries: ['aws:full'], + }); + function callback() { + alert('It worked'); + } + mermaid.parseError = function (err, hash) { + console.error('In parse error:'); + console.error(err); + }; + + + diff --git a/docs/syntax/architecture.md b/docs/syntax/architecture.md index 30b3bd581..361e84aa8 100644 --- a/docs/syntax/architecture.md +++ b/docs/syntax/architecture.md @@ -11,7 +11,7 @@ ## Example ```mermaid-example -architecture +architecture-beta group api(cloud)[API] service db(database)[Database] in api @@ -25,7 +25,7 @@ architecture ``` ```mermaid -architecture +architecture-beta group api(cloud)[API] service db(database)[Database] in api @@ -44,7 +44,7 @@ The building blocks of an architecture are `groups`, `services`, `edges`, and `j For supporting components, icons are declared by surrounding the icon name with `()`, while labels are declared by surrounding the text with `[]`. -To begin an architecture diagram, use the keyword `architecture`, followed by your groups, services, edges, and junctions. While each of the 3 building blocks can be declared in any order, care must be taken to ensure the identifier was previously declared by another component. +To begin an architecture diagram, use the keyword `architecture-beta`, followed by your groups, services, edges, and junctions. While each of the 3 building blocks can be declared in any order, care must be taken to ensure the identifier was previously declared by another component. ### Groups @@ -156,7 +156,7 @@ junction {junction id} (in {parent id})? ``` ```mermaid-example -architecture +architecture-beta service left_disk(disk)[Disk] service top_disk(disk)[Disk] service bottom_disk(disk)[Disk] @@ -174,7 +174,7 @@ architecture ``` ```mermaid -architecture +architecture-beta service left_disk(disk)[Disk] service top_disk(disk)[Disk] service bottom_disk(disk)[Disk] diff --git a/packages/mermaid/src/docs/syntax/architecture.md b/packages/mermaid/src/docs/syntax/architecture.md index 8be375522..336269048 100644 --- a/packages/mermaid/src/docs/syntax/architecture.md +++ b/packages/mermaid/src/docs/syntax/architecture.md @@ -5,7 +5,7 @@ ## Example ```mermaid-example -architecture +architecture-beta group api(cloud)[API] service db(database)[Database] in api @@ -24,7 +24,7 @@ The building blocks of an architecture are `groups`, `services`, `edges`, and `j For supporting components, icons are declared by surrounding the icon name with `()`, while labels are declared by surrounding the text with `[]`. -To begin an architecture diagram, use the keyword `architecture`, followed by your groups, services, edges, and junctions. While each of the 3 building blocks can be declared in any order, care must be taken to ensure the identifier was previously declared by another component. +To begin an architecture diagram, use the keyword `architecture-beta`, followed by your groups, services, edges, and junctions. While each of the 3 building blocks can be declared in any order, care must be taken to ensure the identifier was previously declared by another component. ### Groups @@ -136,7 +136,7 @@ junction {junction id} (in {parent id})? ``` ```mermaid-example -architecture +architecture-beta service left_disk(disk)[Disk] service top_disk(disk)[Disk] service bottom_disk(disk)[Disk] diff --git a/packages/parser/src/language/architecture/architecture.langium b/packages/parser/src/language/architecture/architecture.langium index 31eeaa7d0..79a3899e8 100644 --- a/packages/parser/src/language/architecture/architecture.langium +++ b/packages/parser/src/language/architecture/architecture.langium @@ -3,7 +3,7 @@ import "../common/common"; entry Architecture: NEWLINE* - "architecture" + "architecture-beta" ( NEWLINE* TitleAndAccessibilities | NEWLINE* Statement* From 880c4d4ed696a2c36e59cb3d16173d2de68c0d7e Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Tue, 23 Jul 2024 15:31:11 -0500 Subject: [PATCH 55/73] feat(arch): updated syntax & demos/docs to reflect changes --- demos/architecture.html | 122 +++++++++--------- docs/syntax/architecture.md | 50 +++---- .../mermaid/src/docs/syntax/architecture.md | 32 ++--- .../architecture/architecture.langium | 12 +- 4 files changed, 112 insertions(+), 104 deletions(-) diff --git a/demos/architecture.html b/demos/architecture.html index 02f7c0a11..deacbc242 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -26,10 +26,10 @@ service server(server)[Server] in api service gateway(internet)[Gateway] - db L--R server - disk1 T--B server - disk2 T--B db - server T--B gateway + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db + server:T -- B:gateway

    @@ -49,11 +49,11 @@ service gateway(internet)[Gateway] in api - serv1 B--T serv2 + serv1:B -- T:serv2 - serv2 L--R db + serv2:L -- R:db - serv1 L--R gateway + serv1:L -- R:gateway

    @@ -73,10 +73,10 @@ service serv2(server)[Server 2] service disk(disk)[Disk] - db L--R s3 - serv1 L--T s3 - serv2 L--B s3 - serv1 T--B disk + db:L -- R:s3 + serv1:L -- T:s3 + serv2:L -- B:s3 + serv1:T -- B:disk

    @@ -89,15 +89,15 @@ service servT(server)[Server 4] service servB(server)[Server 5] - servC (L--R) servL - servC (R--L) servR - servC (T--B) servT - servC (B--T) servB + servC:L <--> R:servL + servC:R <--> L:servR + servC:T <--> B:servT + servC:B <--> T:servB - servL (T--L) servT - servL (B--L) servB - servR (T--R) servT - servR (B--R) servB + servL:T <--> L:servT + servL:B <--> L:servB + servR:T <--> R:servT + servR:B <--> R:servB
           architecture-beta
    @@ -107,15 +107,15 @@
             service servT(server)[Server 4]
             service servB(server)[Server 5]
     
    -        servC (L--R) servL
    -        servC (R--L) servR
    -        servC (T--B) servT
    -        servC (B--T) servB
    +        servC:L <--> R:servL
    +        servC:R <--> L:servR
    +        servC:T <--> B:servT
    +        servC:B <--> T:servB
     
    -        servT (L--T) servL
    -        servB (L--B) servL
    -        servT (R--T) servR
    -        servB (R--B) servR
    +        servT:L <--> T:servL
    +        servB:L <--> B:servL
    +        servT:R <--> T:servR
    +        servB:R <--> B:servR
         

    @@ -134,10 +134,10 @@ service bottom_disk(disk)[Disk] in bottom_group service center_disk(disk)[Disk] in center_group - left_disk{group} (R--L) center_disk{group} - right_disk{group} (L--R) center_disk{group} - top_disk{group} (B--T) center_disk{group} - bottom_disk{group} (T--B) center_disk{group} + left_disk{group}:R <--> L:center_disk{group} + right_disk{group}:L <--> R:center_disk{group} + top_disk{group}:B <--> T:center_disk{group} + bottom_disk{group}:T <--> B:center_disk{group}

    @@ -151,15 +151,15 @@ service servT(server)[Server 4] service servB(server)[Server 5] - servC L-[Label]-R servL - servC R-[Label]-L servR - servC T-[Label]-B servT - servC B-[Label]-T servB + servC:L -[Label]- R:servL + servC:R -[Label]- L:servR + servC:T -[Label]- B:servT + servC:B -[Label]- T:servB - servL T-[Label]-L servT - servL B-[Label]-L servB - servR T-[Label]-R servT - servR B-[Label]-R servB + servL:T -[Label]- L:servT + servL:B -[Label]- L:servB + servR:T -[Label]- R:servT + servR:B -[Label]- R:servB
           architecture-beta
    @@ -169,15 +169,15 @@
             service servT(server)[Server 4]
             service servB(server)[Server 5]
     
    -        servC L-[Label that is Long]-R servL
    -        servC R-[Label that is Long]-L servR
    -        servC T-[Label that is Long]-B servT
    -        servC B-[Label that is Long]-T servB
    +        servC:L -[Label that is Long]- R:servL
    +        servC:R -[Label that is Long]- L:servR
    +        servC:T -[Label that is Long]- B:servT
    +        servC:B -[Label that is Long]- T:servB
     
    -        servL T-[Label that is Long]-L servT
    -        servL B-[Label that is Long]-L servB
    -        servR T-[Label that is Long]-R servT
    -        servR B-[Label that is Long]-R servB
    +        servL:T -[Label that is Long]- L:servT
    +        servL:B -[Label that is Long]- L:servB
    +        servR:T -[Label that is Long]- R:servT
    +        servR:B -[Label that is Long]- R:servB
         

    @@ -192,12 +192,12 @@ junction juncC junction juncR - left_disk R--L juncC - top_disk B--T juncC - bottom_disk T--B juncC - juncC R--L juncR - top_gateway B--T juncR - bottom_gateway T--B juncR + left_disk:R -- L:juncC + top_disk:B -- T:juncC + bottom_disk:T -- B:juncC + juncC:R -- L:juncR + top_gateway:B -- T:juncR + bottom_gateway:T -- B:juncR

    @@ -214,15 +214,15 @@ junction juncC in left junction juncR in right - left_disk R--L juncC - top_disk B--T juncC - bottom_disk T--B juncC + left_disk:R -- L:juncC + top_disk:B -- T:juncC + bottom_disk:T -- B:juncC - top_gateway (B--T juncR - bottom_gateway (T--B juncR + top_gateway:B <-- T:juncR + bottom_gateway:T <-- B:juncR - juncC{group} R--L) juncR{group} + juncC{group}:R --> L:juncR{group}

    @@ -233,8 +233,8 @@ service ec2(aws:ec2)[Server] service wave(aws:wavelength)[Wave] - s3 L--R ec2 - s3 T--B wave + s3:L -- R:ec2 + s3:T -- B:wave
    diff --git a/docs/syntax/architecture.md b/docs/syntax/architecture.md index 361e84aa8..2d71d84fb 100644 --- a/docs/syntax/architecture.md +++ b/docs/syntax/architecture.md @@ -19,9 +19,9 @@ architecture-beta service disk2(disk)[Storage] in api service server(server)[Server] in api - db L--R server - disk1 T--B server - disk2 T--B db + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db ``` ```mermaid @@ -33,9 +33,9 @@ architecture-beta service disk2(disk)[Storage] in api service server(server)[Server] in api - db L--R server - disk1 T--B server - disk2 T--B db + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db ``` ## Syntax @@ -95,35 +95,35 @@ service database(db)[Database] in private_api The syntax for declaring an edge is: ``` -{serviceId}{{group}}? {(}?{T|B|L|R}--{T|B|L|R}{)}? {serviceId}{{group}}? +{serviceId}{{group}}?:{T|B|L|R} {<}?--{>}? {T|B|L|R}:{serviceId}{{group}}? ``` #### Edge Direction -The side of the service the edge comes out of is specified by adding `L|R|T|B` to each end of `--`. +The side of the service the edge comes out of is specified by adding a colon (`:`) to the side of the service connecting to the arrow and adding `L|R|T|B` For example: ``` -db R--L server +db:R -- L:server ``` creates an edge between the services `db` and `server`, with the edge coming out of the right of `db` and the left of `server`. ``` -db T--L server +db:T -- L:server ``` creates a 90 degree edge between the services `db` and `server`, with the edge coming out of the top of `db` and the left of `server`. #### Arrows -Arrows can be added to each side of an edge by adding `(` before the direction on the left, and/or `)` after the direction on the right. +Arrows can be added to each side of an edge by adding `<` before the direction on the left, and/or `>` after the direction on the right. For example: ``` -subnet R--L) gateway +subnet:R --> L:gateway ``` creates an edge with the arrow going into the `gateway` service @@ -138,7 +138,7 @@ For example: service server[Server] in groupOne service subnet[Subnet] in groupTwo -server{group} B--T) subnet{group} +server{group}:B --> T:subnet{group} ``` creates an edge going out of `groupOne`, adjacent to `server`, and into `groupTwo`, adjacent to `subnet`. @@ -165,12 +165,12 @@ architecture-beta junction junctionCenter junction junctionRight - left_disk R--L junctionCenter - top_disk B--T junctionCenter - bottom_disk T--B junctionCenter - junctionCenter R--L junctionRight - top_gateway B--T junctionRight - bottom_gateway T--B junctionRight + left_disk:R -- L:junctionCenter + top_disk:B -- T:junctionCenter + bottom_disk:T -- B:junctionCenter + junctionCenter:R -- L:junctionRight + top_gateway:B -- T:junctionRight + bottom_gateway:T -- B:junctionRight ``` ```mermaid @@ -183,12 +183,12 @@ architecture-beta junction junctionCenter junction junctionRight - left_disk R--L junctionCenter - top_disk B--T junctionCenter - bottom_disk T--B junctionCenter - junctionCenter R--L junctionRight - top_gateway B--T junctionRight - bottom_gateway T--B junctionRight + left_disk:R -- L:junctionCenter + top_disk:B -- T:junctionCenter + bottom_disk:T -- B:junctionCenter + junctionCenter:R -- L:junctionRight + top_gateway:B -- T:junctionRight + bottom_gateway:T -- B:junctionRight ``` ## Configuration diff --git a/packages/mermaid/src/docs/syntax/architecture.md b/packages/mermaid/src/docs/syntax/architecture.md index 336269048..e74995ce3 100644 --- a/packages/mermaid/src/docs/syntax/architecture.md +++ b/packages/mermaid/src/docs/syntax/architecture.md @@ -13,9 +13,9 @@ architecture-beta service disk2(disk)[Storage] in api service server(server)[Server] in api - db L--R server - disk1 T--B server - disk2 T--B db + db:L -- R:server + disk1:T -- B:server + disk2:T -- B:db ``` ## Syntax @@ -75,35 +75,35 @@ service database(db)[Database] in private_api The syntax for declaring an edge is: ``` -{serviceId}{{group}}? {(}?{T|B|L|R}--{T|B|L|R}{)}? {serviceId}{{group}}? +{serviceId}{{group}}?:{T|B|L|R} {<}?--{>}? {T|B|L|R}:{serviceId}{{group}}? ``` #### Edge Direction -The side of the service the edge comes out of is specified by adding `L|R|T|B` to each end of `--`. +The side of the service the edge comes out of is specified by adding a colon (`:`) to the side of the service connecting to the arrow and adding `L|R|T|B` For example: ``` -db R--L server +db:R -- L:server ``` creates an edge between the services `db` and `server`, with the edge coming out of the right of `db` and the left of `server`. ``` -db T--L server +db:T -- L:server ``` creates a 90 degree edge between the services `db` and `server`, with the edge coming out of the top of `db` and the left of `server`. #### Arrows -Arrows can be added to each side of an edge by adding `(` before the direction on the left, and/or `)` after the direction on the right. +Arrows can be added to each side of an edge by adding `<` before the direction on the left, and/or `>` after the direction on the right. For example: ``` -subnet R--L) gateway +subnet:R --> L:gateway ``` creates an edge with the arrow going into the `gateway` service @@ -118,7 +118,7 @@ For example: service server[Server] in groupOne service subnet[Subnet] in groupTwo -server{group} B--T) subnet{group} +server{group}:B --> T:subnet{group} ``` creates an edge going out of `groupOne`, adjacent to `server`, and into `groupTwo`, adjacent to `subnet`. @@ -145,12 +145,12 @@ architecture-beta junction junctionCenter junction junctionRight - left_disk R--L junctionCenter - top_disk B--T junctionCenter - bottom_disk T--B junctionCenter - junctionCenter R--L junctionRight - top_gateway B--T junctionRight - bottom_gateway T--B junctionRight + left_disk:R -- L:junctionCenter + top_disk:B -- T:junctionCenter + bottom_disk:T -- B:junctionCenter + junctionCenter:R -- L:junctionRight + top_gateway:B -- T:junctionRight + bottom_gateway:T -- B:junctionRight ``` ## Configuration diff --git a/packages/parser/src/language/architecture/architecture.langium b/packages/parser/src/language/architecture/architecture.langium index 79a3899e8..6246b423e 100644 --- a/packages/parser/src/language/architecture/architecture.langium +++ b/packages/parser/src/language/architecture/architecture.langium @@ -18,8 +18,16 @@ fragment Statement: | edges+=Edge ; +fragment LeftPort: + ':'lhsDir=ARROW_DIRECTION +; + +fragment RightPort: + rhsDir=ARROW_DIRECTION':' +; + fragment Arrow: - lhsInto?=ARROW_INTO? lhsDir=ARROW_DIRECTION ('--' | '-' title=ARCH_TITLE '-') rhsDir=ARROW_DIRECTION rhsInto?=ARROW_INTO? + LeftPort lhsInto?=ARROW_INTO? ('--' | '-' title=ARCH_TITLE '-') rhsInto?=ARROW_INTO? RightPort ; Group: @@ -44,4 +52,4 @@ terminal ARCH_TEXT_ICON: /\("[^"]+"\)/; terminal ARCH_ICON: /\([\w:]+\)/; terminal ARCH_TITLE: /\[[\w ]+\]/; terminal ARROW_GROUP: /\{group\}/; -terminal ARROW_INTO: /\(|\)/; \ No newline at end of file +terminal ARROW_INTO: /<|>/; \ No newline at end of file From 1df90b4a05a9976f3880cc3f39f70b826ebddb54 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 14 Aug 2024 10:11:56 -0500 Subject: [PATCH 56/73] build(arch): pnpm-lock update --- pnpm-lock.yaml | 104 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 23 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c2fe726e..c0663f9c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -212,6 +212,9 @@ importers: cytoscape-cose-bilkent: specifier: ^4.1.0 version: 4.1.0(cytoscape@3.30.1) + cytoscape-fcose: + specifier: ^2.2.0 + version: 2.2.0(cytoscape@3.30.1) d3: specifier: ^7.9.0 version: 7.9.0 @@ -258,6 +261,9 @@ importers: '@types/cytoscape': specifier: ^3.21.4 version: 3.21.5 + '@types/cytoscape-fcose': + specifier: ^2.2.4 + version: 2.2.4 '@types/d3': specifier: ^7.4.3 version: 7.4.3 @@ -516,7 +522,7 @@ importers: version: 7.4.47 '@vueuse/core': specifier: ^10.9.0 - version: 10.9.0(vue@3.4.31(typescript@5.4.5)) + version: 10.11.0(vue@3.4.35(typescript@5.4.5)) font-awesome: specifier: ^4.7.0 version: 4.7.0 @@ -528,20 +534,20 @@ importers: version: link:../.. vue: specifier: ^3.4.21 - version: 3.4.31(typescript@5.4.5) + version: 3.4.35(typescript@5.4.5) devDependencies: '@iconify-json/carbon': specifier: ^1.1.31 - version: 1.1.36 + 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.2.13(@types/node@20.14.7)(terser@5.31.1))(workbox-build@7.1.0(@types/babel__core@7.20.5))(workbox-window@7.1.0)) + version: 0.4.0(vite-plugin-pwa@0.19.8(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(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.0.5(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1))(vue@3.4.31(typescript@5.4.5)) + version: 5.1.2(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(vue@3.4.35(typescript@5.4.5)) fast-glob: specifier: ^3.3.2 version: 3.3.2 @@ -553,19 +559,19 @@ importers: version: 1.1.2 unocss: specifier: ^0.59.0 - version: 0.59.4(postcss@8.4.39)(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1)) + version: 0.59.4(postcss@8.4.40)(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) unplugin-vue-components: specifier: ^0.26.0 - version: 0.26.0(@babel/parser@7.24.7)(rollup@4.18.0)(vue@3.4.31(typescript@5.4.5)) + version: 0.26.0(@babel/parser@7.25.3)(rollup@4.20.0)(vue@3.4.35(typescript@5.4.5)) vite: specifier: ^5.0.0 - version: 5.2.13(@types/node@20.14.7)(terser@5.31.1) + version: 5.3.5(@types/node@20.14.14)(terser@5.31.3) vite-plugin-pwa: specifier: ^0.19.7 - version: 0.19.8(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1))(workbox-build@7.1.0(@types/babel__core@7.20.5))(workbox-window@7.1.0) + version: 0.19.8(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(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.23.3)(@types/node@20.14.7)(axios@1.7.2)(postcss@8.4.39)(search-insights@2.13.0)(terser@5.31.1)(typescript@5.4.5) + version: 1.1.4(@algolia/client-search@4.24.0)(@types/node@20.14.14)(axios@1.7.3)(postcss@8.4.40)(search-insights@2.15.0)(terser@5.31.3)(typescript@5.4.5) workbox-window: specifier: ^7.0.0 version: 7.1.0 @@ -2415,6 +2421,9 @@ packages: '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} + '@types/cytoscape-fcose@2.2.4': + resolution: {integrity: sha512-QwWtnT8HI9h+DHhG5krGc1ZY0Ex+cn85MvX96ZNAjSxuXiZDnjIZW/ypVkvvubTjIY4rSdkJY1D/Nsn8NDpmAw==} + '@types/cytoscape@3.21.5': resolution: {integrity: sha512-fzYT3vqY5J4gxVXDOsCgDpm0ZdU8bQq+wCv0ucS0MSTtvQdjs3lcb2VetJiUSAd4WBgouqizI+JT1f8Yc6eY7Q==} @@ -3987,6 +3996,11 @@ packages: peerDependencies: cytoscape: ^3.2.0 + cytoscape-fcose@2.2.0: + resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==} + peerDependencies: + cytoscape: ^3.2.0 + cytoscape@3.30.1: resolution: {integrity: sha512-TRJc3HbBPkHd50u9YfJh2FxD1lDLZ+JXnJoyBn5LkncoeuT7fapO/Hq/Ed8TdFclaKshzInge2i30bg7VKeoPQ==} engines: {node: '>=0.10'} @@ -10123,7 +10137,7 @@ snapshots: '@babel/preset-env': 7.25.3(@babel/core@7.25.2) babel-loader: 9.1.3(@babel/core@7.25.2)(webpack@5.93.0(esbuild@0.21.5)) bluebird: 3.7.1 - debug: 4.3.5 + debug: 4.3.6(supports-color@8.1.1) lodash: 4.17.21 webpack: 5.93.0(esbuild@0.21.5) transitivePeerDependencies: @@ -10880,6 +10894,10 @@ snapshots: dependencies: '@types/node': 20.14.14 + '@types/cytoscape-fcose@2.2.4': + dependencies: + '@types/cytoscape': 3.21.5 + '@types/cytoscape@3.21.5': {} '@types/d3-array@3.2.1': {} @@ -11328,13 +11346,13 @@ snapshots: transitivePeerDependencies: - rollup - '@unocss/astro@0.59.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1))': + '@unocss/astro@0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))': dependencies: '@unocss/core': 0.59.4 '@unocss/reset': 0.59.4 - '@unocss/vite': 0.59.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1)) + '@unocss/vite': 0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) optionalDependencies: - vite: 5.2.13(@types/node@20.14.7)(terser@5.31.1) + vite: 5.3.5(@types/node@20.14.14)(terser@5.31.3) transitivePeerDependencies: - rollup @@ -11356,10 +11374,10 @@ snapshots: transitivePeerDependencies: - rollup - '@unocss/cli@0.59.4(rollup@4.18.0)': + '@unocss/cli@0.59.4(rollup@4.20.0)': dependencies: '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.20.0) '@unocss/config': 0.59.4 '@unocss/core': 0.59.4 '@unocss/preset-uno': 0.59.4 @@ -11368,7 +11386,7 @@ snapshots: colorette: 2.0.20 consola: 3.2.3 fast-glob: 3.3.2 - magic-string: 0.30.10 + magic-string: 0.30.11 pathe: 1.1.2 perfect-debounce: 1.0.0 transitivePeerDependencies: @@ -11499,6 +11517,22 @@ snapshots: transitivePeerDependencies: - rollup + '@unocss/vite@0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@rollup/pluginutils': 5.1.0(rollup@4.20.0) + '@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.3.5(@types/node@20.14.14)(terser@5.31.3) + transitivePeerDependencies: + - rollup + '@vite-pwa/vitepress@0.4.0(vite-plugin-pwa@0.19.8(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(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.3.5(@types/node@20.14.14)(terser@5.31.3))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0) @@ -12876,6 +12910,11 @@ snapshots: cose-base: 1.0.3 cytoscape: 3.30.1 + cytoscape-fcose@2.2.0(cytoscape@3.30.1): + dependencies: + cose-base: 2.2.0 + cytoscape: 3.30.1 + cytoscape@3.30.1: {} d3-array@2.12.1: @@ -17643,13 +17682,13 @@ snapshots: - rollup - supports-color - unocss@0.59.4(postcss@8.4.39)(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1)): + unocss@0.59.4(postcss@8.4.40)(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)): dependencies: - '@unocss/astro': 0.59.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1)) - '@unocss/cli': 0.59.4(rollup@4.18.0) + '@unocss/astro': 0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) + '@unocss/cli': 0.59.4(rollup@4.20.0) '@unocss/core': 0.59.4 '@unocss/extractor-arbitrary-variants': 0.59.4 - '@unocss/postcss': 0.59.4(postcss@8.4.39) + '@unocss/postcss': 0.59.4(postcss@8.4.40) '@unocss/preset-attributify': 0.59.4 '@unocss/preset-icons': 0.59.4 '@unocss/preset-mini': 0.59.4 @@ -17664,9 +17703,9 @@ snapshots: '@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.18.0)(vite@5.2.13(@types/node@20.14.7)(terser@5.31.1)) + '@unocss/vite': 0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) optionalDependencies: - vite: 5.2.13(@types/node@20.14.7)(terser@5.31.1) + vite: 5.3.5(@types/node@20.14.14)(terser@5.31.3) transitivePeerDependencies: - postcss - rollup @@ -17693,6 +17732,25 @@ snapshots: - rollup - supports-color + unplugin-vue-components@0.26.0(@babel/parser@7.25.3)(rollup@4.20.0)(vue@3.4.35(typescript@5.4.5)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.0(rollup@4.20.0) + 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.35(typescript@5.4.5) + optionalDependencies: + '@babel/parser': 7.25.3 + transitivePeerDependencies: + - rollup + - supports-color + unplugin@1.12.0: dependencies: acorn: 8.12.1 From d36522648f375199d446618730eb9196cc8fa9c8 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Wed, 14 Aug 2024 10:32:56 -0500 Subject: [PATCH 57/73] fix(arch): async/await fixes for drawText changes --- .../architecture/architectureRenderer.ts | 6 +- .../src/diagrams/architecture/svgDraw.ts | 408 +++++++++--------- 2 files changed, 209 insertions(+), 205 deletions(-) diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index 0ce02005e..f23c1894b 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -455,13 +455,13 @@ export const draw: DrawDefinition = async (text, id, _version, diagObj: Diagram) const groupElem = svg.append('g'); groupElem.attr('class', 'architecture-groups'); - drawServices(db, servicesElem, services); + await drawServices(db, servicesElem, services); drawJunctions(db, servicesElem, junctions); const cy = await layoutArchitecture(services, junctions, groups, edges, ds); - drawEdges(edgesElem, cy); - drawGroups(groupElem, cy); + await drawEdges(edgesElem, cy); + await drawGroups(groupElem, cy); positionNodes(db, cy); setupGraphViewbox(undefined, svg, getConfigField('padding'), getConfigField('useMaxWidth')); diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index e8e651ebd..cbe385f27 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -22,167 +22,169 @@ import { getIcon } from '../../rendering-util/svgRegister.js'; import { db, getConfigField } from './architectureDb.js'; import { getConfig } from '../../diagram-api/diagramAPI.js'; -export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { +export const drawEdges = async function (edgesEl: D3Element, cy: cytoscape.Core) { const padding = getConfigField('padding'); const iconSize = getConfigField('iconSize'); const halfIconSize = iconSize / 2; const arrowSize = iconSize / 6; const halfArrowSize = arrowSize / 2; - cy.edges().map((edge) => { - const { - source, - sourceDir, - sourceArrow, - sourceGroup, - target, - targetDir, - targetArrow, - targetGroup, - label, - } = edgeData(edge); - let { x: startX, y: startY } = edge[0].sourceEndpoint(); - const { x: midX, y: midY } = edge[0].midpoint(); - let { x: endX, y: endY } = edge[0].targetEndpoint(); + await Promise.all( + cy.edges().map(async (edge) => { + const { + source, + sourceDir, + sourceArrow, + sourceGroup, + target, + targetDir, + targetArrow, + targetGroup, + label, + } = edgeData(edge); + let { x: startX, y: startY } = edge[0].sourceEndpoint(); + const { x: midX, y: midY } = edge[0].midpoint(); + let { x: endX, y: endY } = edge[0].targetEndpoint(); - // Adjust the edge distance if it has the {group} modifier - const groupEdgeShift = padding + 4; - // +18 comes from the service label height that extends the padding on the bottom side of each group - if (sourceGroup) { - if (isArchitectureDirectionX(sourceDir)) { - startX += sourceDir === 'L' ? -groupEdgeShift : groupEdgeShift; - } else { - startY += sourceDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; - } - } - - if (targetGroup) { - if (isArchitectureDirectionX(targetDir)) { - endX += targetDir === 'L' ? -groupEdgeShift : groupEdgeShift; - } else { - endY += targetDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; - } - } - - // Adjust the edge distance if it doesn't have the {group} modifier and the endpoint is a junction node - if (!sourceGroup && db.getNode(source)?.type === 'junction') { - if (isArchitectureDirectionX(sourceDir)) { - startX += sourceDir === 'L' ? halfIconSize : -halfIconSize; - } else { - startY += sourceDir === 'T' ? halfIconSize : -halfIconSize; - } - } - if (!targetGroup && db.getNode(target)?.type === 'junction') { - if (isArchitectureDirectionX(targetDir)) { - endX += targetDir === 'L' ? halfIconSize : -halfIconSize; - } else { - endY += targetDir === 'T' ? halfIconSize : -halfIconSize; - } - } - - if (edge[0]._private.rscratch) { - // const bounds = edge[0]._private.rscratch; - - const g = edgesEl.insert('g'); - - g.insert('path') - .attr('d', `M ${startX},${startY} L ${midX},${midY} L${endX},${endY} `) - .attr('class', 'edge'); - - if (sourceArrow) { - const xShift = isArchitectureDirectionX(sourceDir) - ? ArchitectureDirectionArrowShift[sourceDir](startX, arrowSize) - : startX - halfArrowSize; - const yShift = isArchitectureDirectionY(sourceDir) - ? ArchitectureDirectionArrowShift[sourceDir](startY, arrowSize) - : startY - halfArrowSize; - - g.insert('polygon') - .attr('points', ArchitectureDirectionArrow[sourceDir](arrowSize)) - .attr('transform', `translate(${xShift},${yShift})`) - .attr('class', 'arrow'); - } - if (targetArrow) { - const xShift = isArchitectureDirectionX(targetDir) - ? ArchitectureDirectionArrowShift[targetDir](endX, arrowSize) - : endX - halfArrowSize; - const yShift = isArchitectureDirectionY(targetDir) - ? ArchitectureDirectionArrowShift[targetDir](endY, arrowSize) - : endY - halfArrowSize; - - g.insert('polygon') - .attr('points', ArchitectureDirectionArrow[targetDir](arrowSize)) - .attr('transform', `translate(${xShift},${yShift})`) - .attr('class', 'arrow'); - } - - if (label) { - const axis = !isArchitectureDirectionXY(sourceDir, targetDir) - ? isArchitectureDirectionX(sourceDir) - ? 'X' - : 'Y' - : 'XY'; - - let width = 0; - if (axis === 'X') { - width = Math.abs(startX - endX); - } else if (axis === 'Y') { - // Reduce width by a factor of 1.5 to avoid overlapping service labels - width = Math.abs(startY - endY) / 1.5; + // Adjust the edge distance if it has the {group} modifier + const groupEdgeShift = padding + 4; + // +18 comes from the service label height that extends the padding on the bottom side of each group + if (sourceGroup) { + if (isArchitectureDirectionX(sourceDir)) { + startX += sourceDir === 'L' ? -groupEdgeShift : groupEdgeShift; } else { - width = Math.abs(startX - endX) / 2; + startY += sourceDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; + } + } + + if (targetGroup) { + if (isArchitectureDirectionX(targetDir)) { + endX += targetDir === 'L' ? -groupEdgeShift : groupEdgeShift; + } else { + endY += targetDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; + } + } + + // Adjust the edge distance if it doesn't have the {group} modifier and the endpoint is a junction node + if (!sourceGroup && db.getNode(source)?.type === 'junction') { + if (isArchitectureDirectionX(sourceDir)) { + startX += sourceDir === 'L' ? halfIconSize : -halfIconSize; + } else { + startY += sourceDir === 'T' ? halfIconSize : -halfIconSize; + } + } + if (!targetGroup && db.getNode(target)?.type === 'junction') { + if (isArchitectureDirectionX(targetDir)) { + endX += targetDir === 'L' ? halfIconSize : -halfIconSize; + } else { + endY += targetDir === 'T' ? halfIconSize : -halfIconSize; + } + } + + if (edge[0]._private.rscratch) { + // const bounds = edge[0]._private.rscratch; + + const g = edgesEl.insert('g'); + + g.insert('path') + .attr('d', `M ${startX},${startY} L ${midX},${midY} L${endX},${endY} `) + .attr('class', 'edge'); + + if (sourceArrow) { + const xShift = isArchitectureDirectionX(sourceDir) + ? ArchitectureDirectionArrowShift[sourceDir](startX, arrowSize) + : startX - halfArrowSize; + const yShift = isArchitectureDirectionY(sourceDir) + ? ArchitectureDirectionArrowShift[sourceDir](startY, arrowSize) + : startY - halfArrowSize; + + g.insert('polygon') + .attr('points', ArchitectureDirectionArrow[sourceDir](arrowSize)) + .attr('transform', `translate(${xShift},${yShift})`) + .attr('class', 'arrow'); + } + if (targetArrow) { + const xShift = isArchitectureDirectionX(targetDir) + ? ArchitectureDirectionArrowShift[targetDir](endX, arrowSize) + : endX - halfArrowSize; + const yShift = isArchitectureDirectionY(targetDir) + ? ArchitectureDirectionArrowShift[targetDir](endY, arrowSize) + : endY - halfArrowSize; + + g.insert('polygon') + .attr('points', ArchitectureDirectionArrow[targetDir](arrowSize)) + .attr('transform', `translate(${xShift},${yShift})`) + .attr('class', 'arrow'); } - const textElem = g.append('g'); - createText( - textElem, - label, - { - useHtmlLabels: false, - width, - classes: 'architecture-service-label', - }, - getConfig() - ); + if (label) { + const axis = !isArchitectureDirectionXY(sourceDir, targetDir) + ? isArchitectureDirectionX(sourceDir) + ? 'X' + : 'Y' + : 'XY'; - textElem - .attr('dy', '1em') - .attr('alignment-baseline', 'middle') - .attr('dominant-baseline', 'middle') - .attr('text-anchor', 'middle'); + let width = 0; + if (axis === 'X') { + width = Math.abs(startX - endX); + } else if (axis === 'Y') { + // Reduce width by a factor of 1.5 to avoid overlapping service labels + width = Math.abs(startY - endY) / 1.5; + } else { + width = Math.abs(startX - endX) / 2; + } - if (axis === 'X') { - textElem.attr('transform', 'translate(' + midX + ', ' + midY + ')'); - } else if (axis === 'Y') { - textElem.attr('transform', 'translate(' + midX + ', ' + midY + ') rotate(-90)'); - } else if (axis === 'XY') { - const pair = getArchitectureDirectionPair(sourceDir, targetDir); - if (pair && isArchitecturePairXY(pair)) { - const bboxOrig = textElem.node().getBoundingClientRect(); - const [x, y] = getArchitectureDirectionXYFactors(pair); + const textElem = g.append('g'); + await createText( + textElem, + label, + { + useHtmlLabels: false, + width, + classes: 'architecture-service-label', + }, + getConfig() + ); - textElem - .attr('dominant-baseline', 'auto') - .attr('transform', `rotate(${-1 * x * y * 45})`); + textElem + .attr('dy', '1em') + .attr('alignment-baseline', 'middle') + .attr('dominant-baseline', 'middle') + .attr('text-anchor', 'middle'); - // Calculate the new width/height with the rotation applied, and transform to the proper position - const bboxNew = textElem.node().getBoundingClientRect(); - textElem.attr( - 'transform', - ` + if (axis === 'X') { + textElem.attr('transform', 'translate(' + midX + ', ' + midY + ')'); + } else if (axis === 'Y') { + textElem.attr('transform', 'translate(' + midX + ', ' + midY + ') rotate(-90)'); + } else if (axis === 'XY') { + const pair = getArchitectureDirectionPair(sourceDir, targetDir); + if (pair && isArchitecturePairXY(pair)) { + const bboxOrig = textElem.node().getBoundingClientRect(); + const [x, y] = getArchitectureDirectionXYFactors(pair); + + textElem + .attr('dominant-baseline', 'auto') + .attr('transform', `rotate(${-1 * x * y * 45})`); + + // Calculate the new width/height with the rotation applied, and transform to the proper position + const bboxNew = textElem.node().getBoundingClientRect(); + textElem.attr( + 'transform', + ` translate(${midX}, ${midY - bboxOrig.height / 2}) translate(${(x * bboxNew.width) / 2}, ${(y * bboxNew.height) / 2}) rotate(${-1 * x * y * 45}, 0, ${bboxOrig.height / 2}) ` - ); + ); + } } } } - } - }); + }) + ); }; -export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { +export const drawGroups = async function (groupsEl: D3Element, cy: cytoscape.Core) { const padding = getConfigField('padding'); const groupIconSize = padding * 0.75; @@ -191,82 +193,84 @@ export const drawGroups = function (groupsEl: D3Element, cy: cytoscape.Core) { const iconSize = getConfigField('iconSize'); const halfIconSize = iconSize / 2; - cy.nodes().map((node) => { - 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})`); + await Promise.all( + cy.nodes().map(async (node) => { + 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') - .attr('x', x1 + halfIconSize) - .attr('y', y1 + halfIconSize) - .attr('width', w) - .attr('height', h) - .attr('class', 'node-bkg'); + groupsEl + .append('rect') + .attr('x', x1 + halfIconSize) + .attr('y', y1 + halfIconSize) + .attr('width', w) + .attr('height', h) + .attr('class', 'node-bkg'); - const groupLabelContainer = groupsEl.append('g'); - let shiftedX1 = x1; - let shiftedY1 = y1; - if (data.icon) { - const bkgElem = groupLabelContainer.append('g'); - getIcon(data.icon)?.(bkgElem, groupIconSize); - bkgElem.attr( - 'transform', - 'translate(' + - (shiftedX1 + halfIconSize + 1) + - ', ' + - (shiftedY1 + halfIconSize + 1) + - ')' - ); - shiftedX1 += groupIconSize; - // TODO: test with more values - // - 1 - 2 comes from the Y axis transform of the icon and label - shiftedY1 += fontSize / 2 - 1 - 2; + const groupLabelContainer = groupsEl.append('g'); + let shiftedX1 = x1; + let shiftedY1 = y1; + if (data.icon) { + const bkgElem = groupLabelContainer.append('g'); + getIcon(data.icon)?.(bkgElem, groupIconSize); + bkgElem.attr( + 'transform', + 'translate(' + + (shiftedX1 + halfIconSize + 1) + + ', ' + + (shiftedY1 + halfIconSize + 1) + + ')' + ); + shiftedX1 += groupIconSize; + // TODO: test with more values + // - 1 - 2 comes from the Y axis transform of the icon and label + shiftedY1 += fontSize / 2 - 1 - 2; + } + if (data.label) { + const textElem = groupLabelContainer.append('g'); + await createText( + textElem, + data.label, + { + useHtmlLabels: false, + width: w, + classes: 'architecture-service-label', + }, + getConfig() + ); + textElem + .attr('dy', '1em') + .attr('alignment-baseline', 'middle') + .attr('dominant-baseline', 'start') + .attr('text-anchor', 'start'); + + textElem.attr( + 'transform', + 'translate(' + + (shiftedX1 + halfIconSize + 4) + + ', ' + + (shiftedY1 + halfIconSize + 2) + + ')' + ); + } } - if (data.label) { - const textElem = groupLabelContainer.append('g'); - createText( - textElem, - data.label, - { - useHtmlLabels: false, - width: w, - classes: 'architecture-service-label', - }, - getConfig() - ); - textElem - .attr('dy', '1em') - .attr('alignment-baseline', 'middle') - .attr('dominant-baseline', 'start') - .attr('text-anchor', 'start'); - - textElem.attr( - 'transform', - 'translate(' + - (shiftedX1 + halfIconSize + 4) + - ', ' + - (shiftedY1 + halfIconSize + 2) + - ')' - ); - } - } - }); + }) + ); }; -export const drawServices = function ( +export const drawServices = async function ( db: ArchitectureDB, elem: D3Element, services: ArchitectureService[] -): number { - services.forEach((service) => { +): Promise { + for (const service of services) { const serviceElem = elem.append('g'); const iconSize = getConfigField('iconSize'); if (service.title) { const textElem = serviceElem.append('g'); - createText( + await createText( textElem, service.title, { @@ -331,7 +335,7 @@ export const drawServices = function ( service.width = width; service.height = height; db.setElementForId(service.id, serviceElem); - }); + } return 0; }; From 95c483934dd473a90746efa0e6a97bca1398523f Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Mon, 19 Aug 2024 17:40:12 -0500 Subject: [PATCH 58/73] feat(arch): all non-generic icon packs are now lazy loaded --- demos/architecture.html | 7 +-- docs/config/icons.md | 12 +++- .../setup/interfaces/mermaid.MermaidConfig.md | 56 +++++++++---------- packages/mermaid/src/config.type.ts | 5 +- packages/mermaid/src/docs/config/icons.md | 12 +++- packages/mermaid/src/mermaidAPI.ts | 14 ++++- .../digitalOcean.ts | 0 .../mermaid/src/rendering-util/svg/index.ts | 18 ++++-- .../mermaid/src/schemas/config.schema.yaml | 2 +- 9 files changed, 77 insertions(+), 49 deletions(-) rename packages/mermaid/src/rendering-util/svg/{digitial-ocean => digital-ocean}/digitalOcean.ts (100%) diff --git a/demos/architecture.html b/demos/architecture.html index deacbc242..fc65b6beb 100644 --- a/demos/architecture.html +++ b/demos/architecture.html @@ -232,9 +232,8 @@ service s3(aws:s3)[Cloud Store] service ec2(aws:ec2)[Server] service wave(aws:wavelength)[Wave] - - s3:L -- R:ec2 - s3:T -- B:wave + service droplet(do:droplet)[Droplet] + service repo(gh:github)[Repository]
    @@ -296,7 +295,7 @@ iconSize: 80, }, useMaxWidth: false, - iconLibraries: ['aws:full'], + iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'], }); function callback() { alert('It worked'); diff --git a/docs/config/icons.md b/docs/config/icons.md index 58487acbb..d0a80f2d8 100644 --- a/docs/config/icons.md +++ b/docs/config/icons.md @@ -23,9 +23,15 @@ SVG Icons can be used with supported diagrams. Alongside the icon packs included | Digital Ocean | `do:` | | GitHub | `gh:` | -### Extended AWS Icons +Note that in order to use non-generic icons that are provided with Mermaid, the packs must be explicitly loaded when on initialization initialized. -Due to the large number of icons available to represent AWS services, only the most important ones are enabled by default. For full access, add `'aws:full'` to the `iconLibraries` field when initializing mermaid. +```js +import sampleIconPack from 'sample-icon-pack'; + +mermaid.initialize({ + iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'], +}); +``` ## Using Custom Icon Packs @@ -35,7 +41,7 @@ Custom icon packs can be used by including them in the `iconLibraries` array on import sampleIconPack from 'sample-icon-pack'; mermaid.initialize({ - iconLibraries: [sampleIconPack, 'aws:full'], + iconLibraries: [sampleIconPack, 'aws:full', ...], }); ``` diff --git a/docs/config/setup/interfaces/mermaid.MermaidConfig.md b/docs/config/setup/interfaces/mermaid.MermaidConfig.md index d0f689ce0..c7ac33dde 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:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190) +[packages/mermaid/src/config.type.ts:193](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L193) --- @@ -49,7 +49,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:199](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L199) --- @@ -59,7 +59,7 @@ This matters if you are using base tag settings. #### 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:196](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L196) --- @@ -69,7 +69,7 @@ This matters if you are using base tag settings. #### 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:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L186) --- @@ -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:177](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L177) +[packages/mermaid/src/config.type.ts:180](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L180) --- @@ -111,7 +111,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:170](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L170) +[packages/mermaid/src/config.type.ts:173](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L173) --- @@ -121,7 +121,7 @@ should not change unless content is changed. #### 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:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L200) --- @@ -148,7 +148,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:185](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L185) +[packages/mermaid/src/config.type.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L188) --- @@ -158,7 +158,7 @@ should not change unless content is changed. #### Defined in -[packages/mermaid/src/config.type.ts:178](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L178) +[packages/mermaid/src/config.type.ts:181](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L181) --- @@ -182,7 +182,7 @@ See #### 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:202](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L202) --- @@ -196,7 +196,7 @@ If set to true, ignores legacyMathML. #### Defined in -[packages/mermaid/src/config.type.ts:159](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L159) +[packages/mermaid/src/config.type.ts:162](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L162) --- @@ -206,7 +206,7 @@ If set to true, ignores legacyMathML. #### Defined in -[packages/mermaid/src/config.type.ts:180](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L180) +[packages/mermaid/src/config.type.ts:183](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L183) --- @@ -216,7 +216,7 @@ If set to true, ignores legacyMathML. #### 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:195](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L195) --- @@ -244,7 +244,7 @@ Defines the seed to be used when using handDrawn look. This is important for the ### iconLibraries -• `Optional` **iconLibraries**: ([`IconLibrary`](../modules/mermaid.md#iconlibrary) | `"aws:full"`)\[] +• `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. @@ -261,7 +261,7 @@ For supported diagrams (i.e., Architecture), their syntax allows refering to key #### Defined in -[packages/mermaid/src/config.type.ts:181](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L181) +[packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184) --- @@ -322,7 +322,7 @@ Defines which main look to use for the 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:203](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L203) --- @@ -356,7 +356,7 @@ The maximum allowed size of the users text diagram #### 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:194](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L194) --- @@ -366,7 +366,7 @@ The maximum allowed size of the users text diagram #### 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:198](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L198) --- @@ -376,7 +376,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L186) +[packages/mermaid/src/config.type.ts:189](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L189) --- @@ -386,7 +386,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:187](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L187) +[packages/mermaid/src/config.type.ts:190](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L190) --- @@ -396,7 +396,7 @@ The maximum allowed size of the users text diagram #### Defined in -[packages/mermaid/src/config.type.ts:189](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L189) +[packages/mermaid/src/config.type.ts:192](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L192) --- @@ -406,7 +406,7 @@ The maximum allowed size of the users text diagram #### 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:197](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L197) --- @@ -442,7 +442,7 @@ Level of trust for parsed diagram #### Defined in -[packages/mermaid/src/config.type.ts:179](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L179) +[packages/mermaid/src/config.type.ts:182](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L182) --- @@ -464,7 +464,7 @@ Dictates whether mermaid starts on Page load #### Defined in -[packages/mermaid/src/config.type.ts:184](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L184) +[packages/mermaid/src/config.type.ts:187](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L187) --- @@ -477,7 +477,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:206](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L206) +[packages/mermaid/src/config.type.ts:209](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L209) --- @@ -520,7 +520,7 @@ You may also use `themeCSS` to override this value. #### Defined in -[packages/mermaid/src/config.type.ts:182](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L182) +[packages/mermaid/src/config.type.ts:185](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L185) --- @@ -530,7 +530,7 @@ You may also use `themeCSS` to override this value. #### 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:201](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L201) --- @@ -540,4 +540,4 @@ You may also use `themeCSS` to override this value. #### Defined in -[packages/mermaid/src/config.type.ts:188](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L188) +[packages/mermaid/src/config.type.ts:191](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts#L191) diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index 3f8144f23..7c2eccefd 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -149,7 +149,10 @@ export interface MermaidConfig { * 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; + 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/docs/config/icons.md b/packages/mermaid/src/docs/config/icons.md index 285037182..0b9c78d54 100644 --- a/packages/mermaid/src/docs/config/icons.md +++ b/packages/mermaid/src/docs/config/icons.md @@ -17,9 +17,15 @@ SVG Icons can be used with supported diagrams. Alongside the icon packs included | Digital Ocean | `do:` | | GitHub | `gh:` | -### Extended AWS Icons +Note that in order to use non-generic icons that are provided with Mermaid, the packs must be explicitly loaded when on initialization initialized. -Due to the large number of icons available to represent AWS services, only the most important ones are enabled by default. For full access, add `'aws:full'` to the `iconLibraries` field when initializing mermaid. +```js +import sampleIconPack from 'sample-icon-pack'; + +mermaid.initialize({ + iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'], +}); +``` ## Using Custom Icon Packs @@ -29,7 +35,7 @@ Custom icon packs can be used by including them in the `iconLibraries` array on import sampleIconPack from 'sample-icon-pack'; mermaid.initialize({ - iconLibraries: [sampleIconPack, 'aws:full'], + iconLibraries: [sampleIconPack, 'aws:full', ...], }); ``` diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index 861d115ff..7fb8b8401 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -23,6 +23,7 @@ import { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility. 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'; @@ -495,10 +496,17 @@ function initialize(options: MermaidConfig = {}) { // eslint-disable-next-line @typescript-eslint/no-misused-promises options.iconLibraries.forEach(async (library) => { if (typeof library === 'string') { - if (library === 'aws:full') { - const { default: awsFull } = await import('./rendering-util/svg/aws/awsFull.js'); - registerIcons(awsFull); + 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); } diff --git a/packages/mermaid/src/rendering-util/svg/digitial-ocean/digitalOcean.ts b/packages/mermaid/src/rendering-util/svg/digital-ocean/digitalOcean.ts similarity index 100% rename from packages/mermaid/src/rendering-util/svg/digitial-ocean/digitalOcean.ts rename to packages/mermaid/src/rendering-util/svg/digital-ocean/digitalOcean.ts diff --git a/packages/mermaid/src/rendering-util/svg/index.ts b/packages/mermaid/src/rendering-util/svg/index.ts index 01329bac5..22a8514a7 100644 --- a/packages/mermaid/src/rendering-util/svg/index.ts +++ b/packages/mermaid/src/rendering-util/svg/index.ts @@ -6,9 +6,16 @@ import internet from './default/internet.js'; import cloud from './default/cloud.js'; import unknown from './default/unknown.js'; import blank from './default/blank.js'; -import awsCommon from './aws/awsCommon.js'; -import digitalOcean from './digitial-ocean/digitalOcean.js'; -import github from './github/github.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, @@ -18,9 +25,8 @@ const defaultIconLibrary: IconLibrary = { cloud: cloud, unknown: unknown, blank: blank, - ...awsCommon, - ...digitalOcean, - ...github, }; export default defaultIconLibrary; +export { getIconNamespaces }; +export type { IconNamespaceKeys }; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index fddd4a6fa..017060756 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -220,7 +220,7 @@ properties: 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 + tsType: Array forceLegacyMathML: description: | This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS From 792a62438fb3c995ed2765146c72808773a6bb54 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:35:41 +0000 Subject: [PATCH 59/73] [autofix.ci] apply automated fixes --- .../setup/interfaces/mermaid.Mermaid.md | 26 +++++++++---------- .../setup/interfaces/mermaid.RunOptions.md | 8 +++--- docs/config/setup/modules/mermaid.md | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/config/setup/interfaces/mermaid.Mermaid.md b/docs/config/setup/interfaces/mermaid.Mermaid.md index 485bc77eb..04f5bcc93 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:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442) +[packages/mermaid/src/mermaid.ts:441](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L441) --- @@ -59,7 +59,7 @@ A graph definition key #### Defined in -[packages/mermaid/src/mermaid.ts:444](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L444) +[packages/mermaid/src/mermaid.ts:443](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L443) --- @@ -89,7 +89,7 @@ Use [initialize](mermaid.Mermaid.md#initialize) and [run](mermaid.Mermaid.md#run #### 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:436](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L436) --- @@ -116,7 +116,7 @@ This function should be called before the run function. #### 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:440](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L440) --- @@ -130,7 +130,7 @@ Use [parse](mermaid.Mermaid.md#parse) and [render](mermaid.Mermaid.md#render) in #### 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:430](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L430) --- @@ -180,7 +180,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not #### 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:431](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L431) --- @@ -190,7 +190,7 @@ Error if the diagram is invalid and parseOptions.suppressErrors is false or not #### Defined in -[packages/mermaid/src/mermaid.ts:426](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L426) +[packages/mermaid/src/mermaid.ts:425](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L425) --- @@ -218,7 +218,7 @@ Used to register external diagram types. #### 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:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439) --- @@ -242,7 +242,7 @@ Used to register external diagram types. #### Defined in -[packages/mermaid/src/mermaid.ts:439](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L439) +[packages/mermaid/src/mermaid.ts:438](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L438) --- @@ -268,7 +268,7 @@ Used to register external diagram types. #### Defined in -[packages/mermaid/src/mermaid.ts:433](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L433) +[packages/mermaid/src/mermaid.ts:432](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L432) --- @@ -316,7 +316,7 @@ Renders the mermaid diagrams #### 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:437](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L437) --- @@ -351,7 +351,7 @@ to it (eg. dart interop wrapper). (Initially there is no parseError member of me #### 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:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442) --- @@ -361,4 +361,4 @@ to it (eg. dart interop wrapper). (Initially there is no parseError member of me #### 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:424](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L424) diff --git a/docs/config/setup/interfaces/mermaid.RunOptions.md b/docs/config/setup/interfaces/mermaid.RunOptions.md index 8d38080bf..6d45d3549 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:55](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L55) +[packages/mermaid/src/mermaid.ts:54](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L54) --- @@ -44,7 +44,7 @@ A callback to call after each diagram is rendered. #### Defined in -[packages/mermaid/src/mermaid.ts:59](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L59) +[packages/mermaid/src/mermaid.ts:58](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L58) --- @@ -56,7 +56,7 @@ The query selector to use when finding elements to render. Default: `".mermaid"` #### Defined in -[packages/mermaid/src/mermaid.ts:51](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L51) +[packages/mermaid/src/mermaid.ts:50](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L50) --- @@ -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:63](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L63) +[packages/mermaid/src/mermaid.ts:62](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L62) diff --git a/docs/config/setup/modules/mermaid.md b/docs/config/setup/modules/mermaid.md index a4361298e..8e3b025b7 100644 --- a/docs/config/setup/modules/mermaid.md +++ b/docs/config/setup/modules/mermaid.md @@ -122,7 +122,7 @@ #### Defined in -[packages/mermaid/src/mermaid.ts:447](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L447) +[packages/mermaid/src/mermaid.ts:446](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L446) ## Functions From 5d1b50cb653ec59d03888d1204f12a8b71dc0105 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 25 Aug 2024 01:47:48 +0530 Subject: [PATCH 60/73] docs: Add argos in readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d5eebfeb..1788901ee 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Try Live Editor previews of future releases: @@ -82,6 +82,10 @@ You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include- For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](https://mermaid.js.org/intro/getting-started.html), [Usage](https://mermaid.js.org/config/usage.html) and [Tutorials](https://mermaid.js.org/ecosystem/tutorials.html). +Our PR Visual Regression Testing is powered by [Argos](https://argos-ci.com/?utm_source=mermaid&utm_campaign=oss) with their generous Open Source plan. It makes the process of reviewing PRs with visual changes a breeze. + +[![Covered by Argos Visual Testing](https://argos-ci.com/badge-large.svg)](https://argos-ci.com?utm_source=mermaid&utm_campaign=oss) + In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests. From 755394ac9a9db07bdc96bbaacce408d53941cec4 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 25 Aug 2024 09:36:50 +0530 Subject: [PATCH 61/73] docs: Add argos in intro --- docs/intro/index.md | 4 ++++ packages/mermaid/src/docs/intro/index.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/intro/index.md b/docs/intro/index.md index fda36f1da..5a71b45a4 100644 --- a/docs/intro/index.md +++ b/docs/intro/index.md @@ -55,6 +55,10 @@ For a more detailed introduction to Mermaid and some of its more basic uses, loo **Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project 🙏** +Our PR Visual Regression Testing is powered by [Argos](https://argos-ci.com/?utm_source=mermaid&utm_campaign=oss) with their generous Open Source plan. It makes the process of reviewing PRs with visual changes a breeze. + +[![Covered by Argos Visual Testing](https://argos-ci.com/badge-large.svg)](https://argos-ci.com?utm_source=mermaid&utm_campaign=oss) + In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests. diff --git a/packages/mermaid/src/docs/intro/index.md b/packages/mermaid/src/docs/intro/index.md index ed2df32dc..627efdaa1 100644 --- a/packages/mermaid/src/docs/intro/index.md +++ b/packages/mermaid/src/docs/intro/index.md @@ -50,6 +50,10 @@ For a more detailed introduction to Mermaid and some of its more basic uses, loo **Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project 🙏** +Our PR Visual Regression Testing is powered by [Argos](https://argos-ci.com/?utm_source=mermaid&utm_campaign=oss) with their generous Open Source plan. It makes the process of reviewing PRs with visual changes a breeze. + +[![Covered by Argos Visual Testing](https://argos-ci.com/badge-large.svg)](https://argos-ci.com?utm_source=mermaid&utm_campaign=oss) + In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests. From c2c65b4df2deb1052b1ceba04ae6ec30eb585e9e Mon Sep 17 00:00:00 2001 From: saurabhg772244 Date: Tue, 27 Aug 2024 18:44:36 +0530 Subject: [PATCH 62/73] Update filledCircle shape --- .../rendering-util/rendering-elements/shapes/filledCircle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/filledCircle.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/filledCircle.ts index 5a2888ebe..9e7f56c84 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/filledCircle.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/filledCircle.ts @@ -13,7 +13,7 @@ export const filledCircle = async (parent: SVGAElement, node: Node) => { node.label = ''; node.labelStyle = labelStyles; const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node)); - const radius = 4; + const radius = 7; const { cssStyles } = node; // @ts-ignore - rough is not typed From b0f7abb3a98430c4378f627eb42f1a21817443a0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 04:56:58 +0000 Subject: [PATCH 63/73] chore(deps): update all minor dependencies --- pnpm-lock.yaml | 1278 +++++++++++++++++++++++++++++++----------------- 1 file changed, 838 insertions(+), 440 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ed0e6c23..d851e9d90 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.13.3) + version: 2.1.2(cypress@13.14.0) '@changesets/changelog-github': specifier: ^0.5.0 version: 0.5.0(encoding@0.1.13) @@ -25,13 +25,13 @@ 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.13.3)(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.0)(webpack@5.93.0(esbuild@0.21.5)) '@eslint/js': specifier: ^9.4.0 version: 9.8.0 '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.20.0)(tslib@2.7.0)(typescript@5.4.5) + version: 11.1.6(rollup@4.21.1)(tslib@2.7.0)(typescript@5.4.5) '@types/cors': specifier: ^2.8.17 version: 2.8.17 @@ -52,13 +52,13 @@ importers: version: 4.0.4 '@types/node': specifier: ^20.11.30 - version: 20.14.15 + version: 20.16.2 '@types/rollup-plugin-visualizer': specifier: ^4.2.4 version: 4.2.4 '@vitest/coverage-v8': specifier: ^1.4.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6)) + version: 1.6.0(vitest@1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6)) '@vitest/spy': specifier: ^1.4.0 version: 1.6.0 @@ -85,13 +85,13 @@ importers: version: 7.0.3 cspell: specifier: ^8.6.0 - version: 8.13.3 + version: 8.14.2 cypress: specifier: ^13.11.0 - version: 13.13.3 + version: 13.14.0 cypress-image-snapshot: specifier: ^4.0.1 - version: 4.0.1(cypress@13.13.3)(jest@29.7.0(@types/node@20.14.15)) + version: 4.0.1(cypress@13.14.0)(jest@29.7.0(@types/node@20.16.2)) esbuild: specifier: ^0.21.5 version: 0.21.5 @@ -109,7 +109,7 @@ importers: version: 8.1.1 eslint-plugin-jest: specifier: ^28.6.0 - version: 28.7.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(jest@29.7.0(@types/node@20.14.15))(typescript@5.4.5) + version: 28.7.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(jest@29.7.0(@types/node@20.16.2))(typescript@5.4.5) eslint-plugin-jsdoc: specifier: ^48.2.9 version: 48.11.0(eslint@9.8.0) @@ -145,7 +145,7 @@ importers: version: 9.1.5 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.15) + version: 29.7.0(@types/node@20.16.2) jison: specifier: ^0.4.18 version: 0.4.18 @@ -184,13 +184,13 @@ importers: version: 5.0.10 rollup-plugin-visualizer: specifier: ^5.12.0 - version: 5.12.0(rollup@4.20.0) + version: 5.12.0(rollup@4.21.1) start-server-and-test: specifier: ^2.0.3 version: 2.0.5 tsx: specifier: ^4.7.1 - version: 4.16.5 + version: 4.19.0 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -199,13 +199,13 @@ importers: version: 8.0.1(eslint@9.8.0)(typescript@5.4.5) vite: specifier: ^5.2.3 - version: 5.3.5(@types/node@20.14.15)(terser@5.31.6) + version: 5.4.2(@types/node@20.16.2)(terser@5.31.6) vite-plugin-istanbul: specifier: ^6.0.0 - version: 6.0.2(vite@5.3.5(@types/node@20.14.15)(terser@5.31.6)) + version: 6.0.2(vite@5.4.2(@types/node@20.16.2)(terser@5.31.6)) vitest: specifier: ^1.4.0 - version: 1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) + version: 1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) packages/mermaid: dependencies: @@ -362,7 +362,7 @@ importers: version: 2.0.5 type-fest: specifier: ^4.13.1 - version: 4.23.0 + version: 4.25.0 typedoc: specifier: ^0.25.12 version: 0.25.13(typescript@5.4.5) @@ -380,10 +380,10 @@ importers: version: 5.0.0 vitepress: specifier: ^1.0.1 - version: 1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5) + version: 1.3.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) vitepress-plugin-search: specifier: 1.0.4-alpha.22 - version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5))(vue@3.4.35(typescript@5.4.5)) + version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.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))(vue@3.4.38(typescript@5.4.5)) packages/mermaid-example-diagram: dependencies: @@ -462,10 +462,10 @@ importers: version: 0.59.4 '@vite-pwa/vitepress': specifier: ^0.4.0 - version: 0.4.0(vite-plugin-pwa@0.19.8(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.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.3.5(@types/node@22.5.0)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5)) + 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 @@ -477,19 +477,19 @@ importers: version: 1.1.2 unocss: specifier: ^0.59.0 - version: 0.59.4(postcss@8.4.41)(rollup@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6)) + version: 0.59.4(postcss@8.4.41)(rollup@2.79.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@2.79.1)(vue@3.4.38(typescript@5.4.5)) vite: specifier: ^5.0.0 - version: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + 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.3.5(@types/node@22.5.0)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0) + 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.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5) + version: 1.3.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 @@ -1478,41 +1478,70 @@ packages: resolution: {integrity: sha512-OfCxUBMyayxKyeDaUZG3LQpiyH8MFUbg9nbIZCGh2x8U6N0fHaP9uR6R+gPzdi/bJp32Kr+RC/Yebojd+AQCGA==} engines: {node: '>=18'} - '@cspell/cspell-json-reporter@8.13.3': - resolution: {integrity: sha512-QrHxWkm0cfD+rTjFOxm5lpE4+wBANDzMIM8NOeQC6v8Dc1L8PUkm6hF6CsEv2tKmuwvdVr+jy6GilDMkPXalCg==} + '@cspell/cspell-bundled-dicts@8.14.2': + resolution: {integrity: sha512-Kv2Utj/RTSxfufGXkkoTZ/3ErCsYWpCijtDFr/FwSsM7mC0PzLpdlcD9xjtgrJO5Kwp7T47iTG21U4Mwddyi8Q==} + engines: {node: '>=18'} + + '@cspell/cspell-json-reporter@8.14.2': + resolution: {integrity: sha512-TZavcnNIZKX1xC/GNj80RgFVKHCT4pHT0qm9jCsQFH2QJfyCrUlkEvotKGSQ04lAyCwWg6Enq95qhouF8YbKUQ==} engines: {node: '>=18'} '@cspell/cspell-pipe@8.13.3': resolution: {integrity: sha512-6a9Zd+fDltgXoJ0fosWqEMx0UdXBXZ7iakhslMNPRmv7GhVAoHBoIXzMVilOE4kYT2Mh/9NM/QW/NbNEpneZIQ==} engines: {node: '>=18'} + '@cspell/cspell-pipe@8.14.2': + resolution: {integrity: sha512-aWMoXZAXEre0/M9AYWOW33YyOJZ06i4vvsEpWBDWpHpWQEmsR/7cMMgld8Pp3wlEjIUclUAKTYmrZ61PFWU/og==} + engines: {node: '>=18'} + '@cspell/cspell-resolver@8.13.3': resolution: {integrity: sha512-vlwtMTEWsPPtWfktzT75eGQ0n+0M+9kN+89eSvUUYdCfvY9XAS6z+bTmhS2ULJgntgWtX6gUjABQK0PYYVedOg==} engines: {node: '>=18'} + '@cspell/cspell-resolver@8.14.2': + resolution: {integrity: sha512-pSyBsAvslaN0dx0pHdvECJEuFDDBJGAD6G8U4BVbIyj2OPk0Ox0HrZIj6csYxxoJERAgNO/q7yCPwa4j9NNFXg==} + engines: {node: '>=18'} + '@cspell/cspell-service-bus@8.13.3': resolution: {integrity: sha512-mFkeWXwGQSDxRiN6Kez77GaMNGNgG7T6o9UE42jyXEgf/bLJTpefbUy4fY5pU3p2mA0eoMzmnJX8l+TC5YJpbA==} engines: {node: '>=18'} + '@cspell/cspell-service-bus@8.14.2': + resolution: {integrity: sha512-WUF7xf3YgXYIqjmBwLcVugYIrYL4WfXchgSo9rmbbnOcAArzsK+HKfzb4AniZAJ1unxcIQ0JnVlRmnCAKPjjLg==} + engines: {node: '>=18'} + '@cspell/cspell-types@8.13.3': resolution: {integrity: sha512-lA5GbhLOL6FlKCWNMbooRFgNGfTsM6NJnHz60+EEN7XD9OgpFc7w+MBcK4aHsVCxcrIvnejIc8xQDqPnrdmN3w==} engines: {node: '>=18'} + '@cspell/cspell-types@8.14.2': + resolution: {integrity: sha512-MRY8MjBNOKGMDSkxAKueYAgVL43miO+lDcLCBBP+7cNXqHiUFMIZteONcGp3kJT0dWS04dN6lKAXvaNF0aWcng==} + engines: {node: '>=18'} + '@cspell/dict-ada@4.0.2': resolution: {integrity: sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==} '@cspell/dict-aws@4.0.3': resolution: {integrity: sha512-0C0RQ4EM29fH0tIYv+EgDQEum0QI6OrmjENC9u98pB8UcnYxGG/SqinuPxo+TgcEuInj0Q73MsBpJ1l5xUnrsw==} + '@cspell/dict-aws@4.0.4': + resolution: {integrity: sha512-6AWI/Kkf+RcX/J81VX8+GKLeTgHWEr/OMhGk3dHQzWK66RaqDJCGDqi7494ghZKcBB7dGa3U5jcKw2FZHL/u3w==} + '@cspell/dict-bash@4.1.3': resolution: {integrity: sha512-tOdI3QVJDbQSwPjUkOiQFhYcu2eedmX/PtEpVWg0aFps/r6AyjUQINtTgpqMYnYuq8O1QUIQqnpx21aovcgZCw==} + '@cspell/dict-bash@4.1.4': + resolution: {integrity: sha512-W/AHoQcJYn3Vn/tUiXX2+6D/bhfzdDshwcbQWv9TdiNlXP9P6UJjDKWbxyA5ogJCsR2D0X9Kx11oV8E58siGKQ==} + '@cspell/dict-companies@3.1.4': resolution: {integrity: sha512-y9e0amzEK36EiiKx3VAA+SHQJPpf2Qv5cCt5eTUSggpTkiFkCh6gRKQ97rVlrKh5GJrqinDwYIJtTsxuh2vy2Q==} '@cspell/dict-cpp@5.1.15': resolution: {integrity: sha512-5X8SouN/qIUrBTcDEevnKU6G3cRSm3Vm7dQEcjHaptIWp+/2YMknIfYbnhKeR1G9V/sbQaY4CVsVAKEaehY+7Q==} + '@cspell/dict-cpp@5.1.16': + resolution: {integrity: sha512-32fU5RkuOM55IRcxjByiSoKbjr+C4danDfYjHaQNRWdvjzJzci3fLDGA2wTXiclkgDODxGiV8LCTUwCz+3TNWA==} + '@cspell/dict-cryptocurrencies@5.0.0': resolution: {integrity: sha512-Z4ARIw5+bvmShL+4ZrhDzGhnc9znaAGHOEMaB/GURdS/jdoreEDY34wdN0NtdLHDO5KO7GduZnZyqGdRoiSmYA==} @@ -1537,6 +1566,9 @@ packages: '@cspell/dict-dotnet@5.0.4': resolution: {integrity: sha512-FCjeagwME0f5pg7AjhqidsenKnskFN2S6JMaMu5TZn2w+wPVpLnsqmcl0dtW6K/mDrutTYwC/gQFlLbDzoRw4g==} + '@cspell/dict-dotnet@5.0.5': + resolution: {integrity: sha512-gjg0L97ee146wX47dnA698cHm85e7EOpf9mVrJD8DmEaqoo/k1oPy2g7c7LgKxK9XnqwoXxhLNnngPrwXOoEtQ==} + '@cspell/dict-elixir@4.0.3': resolution: {integrity: sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==} @@ -1570,6 +1602,9 @@ packages: '@cspell/dict-golang@6.0.11': resolution: {integrity: sha512-BMFIDGh1HaFUe1cYBT1dotqyIQG2j3VkNntGQTBa/7i0aBnC5PBJDiAXnUeBHi0AVrz0hyAc7xtcK5KyKCEzwg==} + '@cspell/dict-golang@6.0.12': + resolution: {integrity: sha512-LEPeoqd+4O+vceHF73S7D7+LYfrAjOvp4Dqzh4MT30ruzlQ77yHRSuYOJtrFN1GK5ntAt/ILSVOKg9sgsz1Llg==} + '@cspell/dict-google@1.0.1': resolution: {integrity: sha512-dQr4M3n95uOhtloNSgB9tYYGXGGEGEykkFyRtfcp5pFuEecYUa0BSgtlGKx9RXVtJtKgR+yFT/a5uQSlt8WjqQ==} @@ -1612,18 +1647,30 @@ packages: '@cspell/dict-npm@5.0.18': resolution: {integrity: sha512-weMTyxWpzz19q4wv9n183BtFvdD5fCjtze+bFKpl+4rO/YlPhHL2cXLAeexJz/VDSBecwX4ybTZYoknd1h2J4w==} + '@cspell/dict-npm@5.1.0': + resolution: {integrity: sha512-731gE9lO8hWb4gUytUk4kycEkAmSf0p8YejB4ZWoyQRvdNcu8p4U5S/yMS+uBPohHtxhSDq0K/vi/QaPm5HYFA==} + + '@cspell/dict-php@4.0.10': + resolution: {integrity: sha512-NfTZdp6kcZDF1PvgQ6cY0zE4FUO5rSwNmBH/iwCBuaLfJAFQ97rgjxo+D2bic4CFwNjyHutnHPtjJBRANO5XQw==} + '@cspell/dict-php@4.0.9': resolution: {integrity: sha512-Rg6+hc8zexiMyT5sXzYdkgr5irYCxl8Rn/OKgUOy7rMN7eD010VefGm62RG6jIBpUIUYFM00Qpc5RA+H4L0KyQ==} '@cspell/dict-powershell@5.0.5': resolution: {integrity: sha512-3JVyvMoDJesAATYGOxcUWPbQPUvpZmkinV3m8HL1w1RrjeMVXXuK7U1jhopSneBtLhkU+9HKFwgh9l9xL9mY2Q==} + '@cspell/dict-powershell@5.0.6': + resolution: {integrity: sha512-BSi9tmnT7jgNsH5SaHSg70aw+4YwTjkkZBfhHtin0r6AMV2RaiLzsBPvzZGXOcm0yTvl975HYoKMqflXIlk2RA==} + '@cspell/dict-public-licenses@2.0.8': resolution: {integrity: sha512-Sup+tFS7cDV0fgpoKtUqEZ6+fA/H+XUgBiqQ/Fbs6vUE3WCjJHOIVsP+udHuyMH7iBfJ4UFYOYeORcY4EaKdMg==} '@cspell/dict-python@4.2.4': resolution: {integrity: sha512-sCtLBqMreb+8zRW2bXvFsfSnRUVU6IFm4mT6Dc4xbz0YajprbaPPh/kOUTw5IJRP8Uh+FFb7Xp2iH03CNWRq/A==} + '@cspell/dict-python@4.2.6': + resolution: {integrity: sha512-Hkz399qDGEbfXi9GYa2hDl7GahglI86JmS2F1KP8sfjLXofUgtnknyC5NWc86nzHcP38pZiPqPbTigyDYw5y8A==} + '@cspell/dict-r@2.0.1': resolution: {integrity: sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==} @@ -1639,6 +1686,9 @@ packages: '@cspell/dict-software-terms@4.0.11': resolution: {integrity: sha512-L4qtowZEnPGFz1BXIDwcdgF/Dgr4oMKO0HT98NqXafxZ8KGSHe/QBfisnHd/flceNHaw7Sd7iRW0ICJtXiWfLA==} + '@cspell/dict-software-terms@4.1.1': + resolution: {integrity: sha512-JkXkULoOWYwtdsQ+/6dPtGi2pcrjDQ0NYsTkKt1uFCiITDb+QZkQhAG0kOP69jK6vhSQwUAH3z7jiYWqoK5TKw==} + '@cspell/dict-sql@2.1.5': resolution: {integrity: sha512-FmxanytHXss7GAWAXmgaxl3icTCW7YxlimyOSPNfm+njqeUDjw3kEv4mFNDDObBJv8Ec5AWCbUDkWIpkE3IpKg==} @@ -1651,6 +1701,9 @@ packages: '@cspell/dict-terraform@1.0.0': resolution: {integrity: sha512-Ak+vy4HP/bOgzf06BAMC30+ZvL9mzv21xLM2XtfnBLTDJGdxlk/nK0U6QT8VfFLqJ0ZZSpyOxGsUebWDCTr/zQ==} + '@cspell/dict-terraform@1.0.1': + resolution: {integrity: sha512-29lmUUnZgPh+ieZ5hunick8hzNIpNRtiJh9vAusNskPCrig3RTW6u7F+GG1a8uyslbzSw+Irjf40PTOan1OJJA==} + '@cspell/dict-typescript@3.1.6': resolution: {integrity: sha512-1beC6O4P/j23VuxX+i0+F7XqPVc3hhiAzGJHEKqnWf5cWAXQtg0xz3xQJ5MvYx2a7iLaSa+lu7+05vG9UHyu9Q==} @@ -1661,20 +1714,36 @@ packages: resolution: {integrity: sha512-YN83CFWnMkt9B0q0RBadfEoptUaDRqBikh8b91MOQ0haEnUo6t57j4jAaLnbIEP4ynzMhgruWFKpIC/QaEtCuA==} engines: {node: '>=18.0'} + '@cspell/dynamic-import@8.14.2': + resolution: {integrity: sha512-5MbqtIligU7yPwHWU/5yFCgMvur4i1bRAF1Cy8y2dDtHsa204S/w/SaXs+51EFLp2eNbCiBisCBrwJFT7R1RxA==} + engines: {node: '>=18.0'} + '@cspell/eslint-plugin@8.13.3': resolution: {integrity: sha512-wb4+WoirtqP4ijcLhCXWbgfE94ggU9D+ENMjTldBNABjcoDse1UyPIR1gSM/oNAAOLaSLtXbeOx7tnWuurjVaQ==} engines: {node: '>=18'} peerDependencies: eslint: ^7 || ^8 || ^9 + '@cspell/filetypes@8.14.2': + resolution: {integrity: sha512-ZevArA0mWeVTTqHicxCPZIAeCibpY3NwWK/x6d1Lgu7RPk/daoGAM546Q2SLChFu+r10tIH7pRG212A6Q9ihPA==} + engines: {node: '>=18'} + '@cspell/strong-weak-map@8.13.3': resolution: {integrity: sha512-/QYUEthesPuDarOHa6kcWKJmVq0HIotjPrmAWQ5QpH+dDik1Qin4G/9QdnWX75ueR4DC4WFjBNBU14C4TVSwHQ==} engines: {node: '>=18'} + '@cspell/strong-weak-map@8.14.2': + resolution: {integrity: sha512-7sRzJc392CQYNNrtdPEfOHJdRqsqf6nASCtbS5A9hL2UrdWQ4uN7r/D+Y1HpuizwY9eOkZvarcFfsYt5wE0Pug==} + engines: {node: '>=18'} + '@cspell/url@8.13.3': resolution: {integrity: sha512-hsxoTnZHwtdR2x9QEE6yfDBB1LUwAj67o1GyKTvI8A2OE/AfzAttirZs+9sxgOGWoBdTOxM9sMLtqB3SxtDB3A==} engines: {node: '>=18.0'} + '@cspell/url@8.14.2': + resolution: {integrity: sha512-YmWW+B/2XQcCynLpiAQF77Bitm5Cynw3/BICZkbdveKjJkUzEmXB+U2qWuwXOyU8xUYuwkP63YM8McnI567rUA==} + engines: {node: '>=18.0'} + '@cypress/code-coverage@3.12.45': resolution: {integrity: sha512-QRvdc9Zmner/CxQ1F5jcNVZR8P8VrRTyE8THcisxnB6D3AMIKKSmjYUGH6OnWBDF/vi3CqimuMSbrUfzmPzmhw==} peerDependencies: @@ -1739,138 +1808,282 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2266,91 +2479,91 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.20.0': - resolution: {integrity: sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==} + '@rollup/rollup-android-arm-eabi@4.21.1': + resolution: {integrity: sha512-2thheikVEuU7ZxFXubPDOtspKn1x0yqaYQwvALVtEcvFhMifPADBrgRPyHV0TF3b+9BgvgjgagVyvA/UqPZHmg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.20.0': - resolution: {integrity: sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==} + '@rollup/rollup-android-arm64@4.21.1': + resolution: {integrity: sha512-t1lLYn4V9WgnIFHXy1d2Di/7gyzBWS8G5pQSXdZqfrdCGTwi1VasRMSS81DTYb+avDs/Zz4A6dzERki5oRYz1g==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.20.0': - resolution: {integrity: sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==} + '@rollup/rollup-darwin-arm64@4.21.1': + resolution: {integrity: sha512-AH/wNWSEEHvs6t4iJ3RANxW5ZCK3fUnmf0gyMxWCesY1AlUj8jY7GC+rQE4wd3gwmZ9XDOpL0kcFnCjtN7FXlA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.20.0': - resolution: {integrity: sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==} + '@rollup/rollup-darwin-x64@4.21.1': + resolution: {integrity: sha512-dO0BIz/+5ZdkLZrVgQrDdW7m2RkrLwYTh2YMFG9IpBtlC1x1NPNSXkfczhZieOlOLEqgXOFH3wYHB7PmBtf+Bg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.20.0': - resolution: {integrity: sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.1': + resolution: {integrity: sha512-sWWgdQ1fq+XKrlda8PsMCfut8caFwZBmhYeoehJ05FdI0YZXk6ZyUjWLrIgbR/VgiGycrFKMMgp7eJ69HOF2pQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.20.0': - resolution: {integrity: sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==} + '@rollup/rollup-linux-arm-musleabihf@4.21.1': + resolution: {integrity: sha512-9OIiSuj5EsYQlmwhmFRA0LRO0dRRjdCVZA3hnmZe1rEwRk11Jy3ECGGq3a7RrVEZ0/pCsYWx8jG3IvcrJ6RCew==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.20.0': - resolution: {integrity: sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==} + '@rollup/rollup-linux-arm64-gnu@4.21.1': + resolution: {integrity: sha512-0kuAkRK4MeIUbzQYu63NrJmfoUVicajoRAL1bpwdYIYRcs57iyIV9NLcuyDyDXE2GiZCL4uhKSYAnyWpjZkWow==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.20.0': - resolution: {integrity: sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==} + '@rollup/rollup-linux-arm64-musl@4.21.1': + resolution: {integrity: sha512-/6dYC9fZtfEY0vozpc5bx1RP4VrtEOhNQGb0HwvYNwXD1BBbwQ5cKIbUVVU7G2d5WRE90NfB922elN8ASXAJEA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': - resolution: {integrity: sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.1': + resolution: {integrity: sha512-ltUWy+sHeAh3YZ91NUsV4Xg3uBXAlscQe8ZOXRCVAKLsivGuJsrkawYPUEyCV3DYa9urgJugMLn8Z3Z/6CeyRQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.20.0': - resolution: {integrity: sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==} + '@rollup/rollup-linux-riscv64-gnu@4.21.1': + resolution: {integrity: sha512-BggMndzI7Tlv4/abrgLwa/dxNEMn2gC61DCLrTzw8LkpSKel4o+O+gtjbnkevZ18SKkeN3ihRGPuBxjaetWzWg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.20.0': - resolution: {integrity: sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==} + '@rollup/rollup-linux-s390x-gnu@4.21.1': + resolution: {integrity: sha512-z/9rtlGd/OMv+gb1mNSjElasMf9yXusAxnRDrBaYB+eS1shFm6/4/xDH1SAISO5729fFKUkJ88TkGPRUh8WSAA==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.20.0': - resolution: {integrity: sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==} + '@rollup/rollup-linux-x64-gnu@4.21.1': + resolution: {integrity: sha512-kXQVcWqDcDKw0S2E0TmhlTLlUgAmMVqPrJZR+KpH/1ZaZhLSl23GZpQVmawBQGVhyP5WXIsIQ/zqbDBBYmxm5w==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.20.0': - resolution: {integrity: sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==} + '@rollup/rollup-linux-x64-musl@4.21.1': + resolution: {integrity: sha512-CbFv/WMQsSdl+bpX6rVbzR4kAjSSBuDgCqb1l4J68UYsQNalz5wOqLGYj4ZI0thGpyX5kc+LLZ9CL+kpqDovZA==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.20.0': - resolution: {integrity: sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==} + '@rollup/rollup-win32-arm64-msvc@4.21.1': + resolution: {integrity: sha512-3Q3brDgA86gHXWHklrwdREKIrIbxC0ZgU8lwpj0eEKGBQH+31uPqr0P2v11pn0tSIxHvcdOWxa4j+YvLNx1i6g==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.20.0': - resolution: {integrity: sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==} + '@rollup/rollup-win32-ia32-msvc@4.21.1': + resolution: {integrity: sha512-tNg+jJcKR3Uwe4L0/wY3Ro0H+u3nrb04+tcq1GSYzBEmKLeOQF2emk1whxlzNqb6MMrQ2JOcQEpuuiPLyRcSIw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.20.0': - resolution: {integrity: sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==} + '@rollup/rollup-win32-x64-msvc@4.21.1': + resolution: {integrity: sha512-xGiIH95H1zU7naUyTKEyOA/I0aexNMUdO9qRv0bLKN3qu25bBdrxZHqA3PTJ24YNN/GdMzG4xkDcd/GvjuhfLg==} cpu: [x64] os: [win32] - '@shikijs/core@1.12.1': - resolution: {integrity: sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA==} + '@shikijs/core@1.14.1': + resolution: {integrity: sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw==} - '@shikijs/transformers@1.12.1': - resolution: {integrity: sha512-zOpj/S2thBvnJV4Ty3EE8aRs/VqCbV+lgtEYeBRkPxTW22uLADEIZq0qjt5W2Rfy2KSu29e73nRyzp4PefjUTg==} + '@shikijs/transformers@1.14.1': + resolution: {integrity: sha512-JJqL8QBVCJh3L61jqqEXgFq1cTycwjcGj7aSmqOEsbxnETM9hRlaB74QuXvY/fVJNjbNt8nvWo0VwAXKvMSLRg==} '@sideway/address@4.1.5': resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} @@ -2655,17 +2868,17 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@18.19.45': - resolution: {integrity: sha512-VZxPKNNhjKmaC1SUYowuXSRSMGyQGmQjvvA1xE4QZ0xce2kLtEhPDS+kqpCPBZYgqblCLQ2DAjSzmgCM5auvhA==} + '@types/node@18.19.47': + resolution: {integrity: sha512-1f7dB3BL/bpd9tnDJrrHb66Y+cVrhxSOTGorRNdHwYTUlTay3HuTDPKo9a/4vX9pMQkhYBcAbL4jQdNlhCFP9A==} '@types/node@20.14.14': resolution: {integrity: sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==} - '@types/node@20.14.15': - resolution: {integrity: sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==} + '@types/node@20.16.2': + resolution: {integrity: sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ==} - '@types/node@22.5.0': - resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==} + '@types/node@22.5.1': + resolution: {integrity: sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -2737,6 +2950,9 @@ packages: '@types/unist@3.0.2': resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/uuid@9.0.8': resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} @@ -2974,97 +3190,68 @@ packages: peerDependencies: vue: 3.4.38 - '@vue/compiler-core@3.4.35': - resolution: {integrity: sha512-gKp0zGoLnMYtw4uS/SJRRO7rsVggLjvot3mcctlMXunYNsX+aRJDqqw/lV5/gHK91nvaAAlWFgdVl020AW1Prg==} - '@vue/compiler-core@3.4.38': resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} - '@vue/compiler-dom@3.4.35': - resolution: {integrity: sha512-pWIZRL76/oE/VMhdv/ovZfmuooEni6JPG1BFe7oLk5DZRo/ImydXijoZl/4kh2406boRQ7lxTYzbZEEXEhj9NQ==} - '@vue/compiler-dom@3.4.38': resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} - '@vue/compiler-sfc@3.4.35': - resolution: {integrity: sha512-xacnRS/h/FCsjsMfxBkzjoNxyxEyKyZfBch/P4vkLRvYJwe5ChXmZZrj8Dsed/752H2Q3JE8kYu9Uyha9J6PgA==} - '@vue/compiler-sfc@3.4.38': resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} - '@vue/compiler-ssr@3.4.35': - resolution: {integrity: sha512-7iynB+0KB1AAJKk/biENTV5cRGHRdbdaD7Mx3nWcm1W8bVD6QmnH3B4AHhQQ1qZHhqFwzEzMwiytXm3PX1e60A==} - '@vue/compiler-ssr@3.4.38': resolution: {integrity: sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==} '@vue/devtools-api@6.6.3': resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==} - '@vue/devtools-api@7.3.7': - resolution: {integrity: sha512-kvjQ6nmsqTp7SrmpwI2G0MgbC4ys0bPsgQirHXJM8y1m7siQ5RnWQUHJVfyUrHNguCySW1cevAdIw87zrPTl9g==} + '@vue/devtools-api@7.3.9': + resolution: {integrity: sha512-D+GTYtFg68bqSu66EugQUydsOqaDlPLNmYw5oYk8k81uBu9/bVTUrqlAJrAA9Am7MXhKz2gWdDkopY6sOBf/Bg==} - '@vue/devtools-kit@7.3.7': - resolution: {integrity: sha512-ktHhhjI4CoUrwdSUF5b/MFfjrtAtK8r4vhOkFyRN5Yp9kdXTwsRBYcwarHuP+wFPKf4/KM7DVBj2ELO8SBwdsw==} + '@vue/devtools-kit@7.3.9': + resolution: {integrity: sha512-Gr17nA+DaQzqyhNx1DUJr1CJRzTRfbIuuC80ZgU8MD/qNO302tv9la+ROi+Uaw+ULVwU9T71GnwLy4n8m9Lspg==} - '@vue/devtools-shared@7.3.7': - resolution: {integrity: sha512-M9EU1/bWi5GNS/+IZrAhwGOVZmUTN4MH22Hvh35nUZZg9AZP2R2OhfCb+MG4EtAsrUEYlu3R43/SIj3G7EZYtQ==} - - '@vue/reactivity@3.4.35': - resolution: {integrity: sha512-Ggtz7ZZHakriKioveJtPlStYardwQH6VCs9V13/4qjHSQb/teE30LVJNrbBVs4+aoYGtTQKJbTe4CWGxVZrvEw==} + '@vue/devtools-shared@7.3.9': + resolution: {integrity: sha512-CdfMRZKXyI8vw+hqOcQIiLihB6Hbbi7WNZGp7LsuH1Qe4aYAFmTaKjSciRZ301oTnwmU/knC/s5OGuV6UNiNoA==} '@vue/reactivity@3.4.38': resolution: {integrity: sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==} - '@vue/runtime-core@3.4.35': - resolution: {integrity: sha512-D+BAjFoWwT5wtITpSxwqfWZiBClhBbR+bm0VQlWYFOadUUXFo+5wbe9ErXhLvwguPiLZdEF13QAWi2vP3ZD5tA==} - '@vue/runtime-core@3.4.38': resolution: {integrity: sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==} - '@vue/runtime-dom@3.4.35': - resolution: {integrity: sha512-yGOlbos+MVhlS5NWBF2HDNgblG8e2MY3+GigHEyR/dREAluvI5tuUUgie3/9XeqhPE4LF0i2wjlduh5thnfOqw==} - '@vue/runtime-dom@3.4.38': resolution: {integrity: sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==} - '@vue/server-renderer@3.4.35': - resolution: {integrity: sha512-iZ0e/u9mRE4T8tNhlo0tbA+gzVkgv8r5BX6s1kRbOZqfpq14qoIvCZ5gIgraOmYkMYrSEZgkkojFPr+Nyq/Mnw==} - peerDependencies: - vue: 3.4.35 - '@vue/server-renderer@3.4.38': resolution: {integrity: sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==} peerDependencies: vue: 3.4.38 - '@vue/shared@3.4.35': - resolution: {integrity: sha512-hvuhBYYDe+b1G8KHxsQ0diDqDMA8D9laxWZhNAjE83VZb5UDaXl9Xnz7cGdDSyiHM90qqI/CyGMcpBpiDy6VVQ==} - '@vue/shared@3.4.38': resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} - '@vueuse/core@10.11.0': - resolution: {integrity: sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==} - '@vueuse/core@10.11.1': resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} - '@vueuse/integrations@10.11.0': - resolution: {integrity: sha512-Pp6MtWEIr+NDOccWd8j59Kpjy5YDXogXI61Kb1JxvSfVBO8NzFQkmrKmSZz47i+ZqHnIzxaT38L358yDHTncZg==} + '@vueuse/core@11.0.3': + resolution: {integrity: sha512-RENlh64+SYA9XMExmmH1a3TPqeIuJBNNB/63GT35MZI+zpru3oMRUA6cEFr9HmGqEgUisurwGwnIieF6qu3aXw==} + + '@vueuse/integrations@11.0.3': + resolution: {integrity: sha512-w6CDisaxs19S5Fd+NPPLFaA3GoX5gxuxrbTTBu0EYap7oH13w75L6C/+7e9mcoF9akhcR6GyYajwVMQEjdapJg==} peerDependencies: async-validator: ^4 axios: ^1 - change-case: ^4 - drauu: ^0.3 + change-case: ^5 + drauu: ^0.4 focus-trap: ^7 - fuse.js: ^6 + fuse.js: ^7 idb-keyval: ^6 - jwt-decode: ^3 + jwt-decode: ^4 nprogress: ^0.2 qrcode: ^1.5 sortablejs: ^1 - universal-cookie: ^6 + universal-cookie: ^7 peerDependenciesMeta: async-validator: optional: true @@ -3091,18 +3278,18 @@ packages: universal-cookie: optional: true - '@vueuse/metadata@10.11.0': - resolution: {integrity: sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==} - '@vueuse/metadata@10.11.1': resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==} - '@vueuse/shared@10.11.0': - resolution: {integrity: sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==} + '@vueuse/metadata@11.0.3': + resolution: {integrity: sha512-+FtbO4SD5WpsOcQTcC0hAhNlOid6QNLzqedtquTtQ+CRNBoAt9GuV07c6KNHK1wCmlq8DFPwgiLF2rXwgSHX5Q==} '@vueuse/shared@10.11.1': resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} + '@vueuse/shared@11.0.3': + resolution: {integrity: sha512-0rY2m6HS5t27n/Vp5cTDsKTlNnimCqsbh/fmT2LgE+aaU42EMfXo8+bNX91W9I7DDmxfuACXMmrd7d79JxkqWA==} + '@wdio/config@7.31.1': resolution: {integrity: sha512-WAfswbCatwiaDVqy6kfF/5T8/WS/US/SRhBGUFrfBuGMIe+RRoHgy7jURFWSvUIE7CNHj8yvs46fLUcxhXjzcQ==} engines: {node: '>=12.0.0'} @@ -4017,12 +4204,20 @@ packages: resolution: {integrity: sha512-dzVdar8Kenwxho0PnUxOxwjUvyFYn6Q9mQAMHcQNXQrvo32bdpoF+oNtWC/5FfrQgUgyl19CVQ607bRigYWoOQ==} engines: {node: '>=18'} + cspell-config-lib@8.14.2: + resolution: {integrity: sha512-yHP1BdcH5dbjb8qiZr6+bxEnJ+rxTULQ00wBz3eBPWCghJywEAYYvMWoYuxVtPpndlkKYC1wJAHsyNkweQyepA==} + engines: {node: '>=18'} + cspell-dictionary@8.13.3: resolution: {integrity: sha512-DQ3Tee7LIoy+9Mu52ht32O/MNBZ6i4iUeSTY2sMDDwogno3361BLRyfEjyiYNo3Fqf0Pcnt5MqY2DqIhrF/H/Q==} engines: {node: '>=18'} - cspell-gitignore@8.13.3: - resolution: {integrity: sha512-0OZXuP33CXV4P95ySHGNqhq3VR5RaLwpyo0nGvLHOjPm3mCsQSjURLBKHvyQ3r2M7LWsGV1Xc81FfTx30FBZLg==} + cspell-dictionary@8.14.2: + resolution: {integrity: sha512-gWuAvf6queGGUvGbfAxxUq55cZ0OevWPbjnCrSB0PpJ4tqdFd8dLcvVrIKzoE2sBXKPw2NDkmoEngs6iGavC0w==} + engines: {node: '>=18'} + + cspell-gitignore@8.14.2: + resolution: {integrity: sha512-lrO/49NaKBpkR7vFxv4OOY+oHmsG5+gNQejrBBWD9Nv9vvjJtz/G36X/rcN6M6tFcQQMWwa01kf04nxz8Ejuhg==} engines: {node: '>=18'} hasBin: true @@ -4030,25 +4225,46 @@ packages: resolution: {integrity: sha512-+jGIMYyKDLmoOJIxNPXRdI7utcvw+9FMSmj1ApIdEff5dCkehi0gtzK4H7orXGYEvRdKQvfaXiyduVi79rXsZQ==} engines: {node: '>=18'} + cspell-glob@8.14.2: + resolution: {integrity: sha512-9Q1Kgoo1ev3fKTpp9y5n8M4RLxd8B0f5o4y5FQe4dBU0j/bt+/YDrLZNWDm77JViV606XQ6fimG1FTTq6pT9/g==} + engines: {node: '>=18'} + cspell-grammar@8.13.3: resolution: {integrity: sha512-xPSgKk9HY5EsI8lkMPC9hiZCeAUs+RY/IVliUBW1xEicAJhP4RZIGRdIwtDNNJGwKfNXazjqYhcS4LS0q7xPAQ==} engines: {node: '>=18'} hasBin: true + cspell-grammar@8.14.2: + resolution: {integrity: sha512-eYwceVP80FGYVJenE42ALnvEKOXaXjq4yVbb1Ni1umO/9qamLWNCQ1RP6rRACy5e/cXviAbhrQ5Mtw6n+pyPEQ==} + engines: {node: '>=18'} + hasBin: true + cspell-io@8.13.3: resolution: {integrity: sha512-AeMIkz7+4VuJaPKO/v1pUpyUSOOTyLOAfzeTRRAXEt+KRKOUe36MyUmBMza6gzNcX2yD04VgJukRL408TY9ntw==} engines: {node: '>=18'} + cspell-io@8.14.2: + resolution: {integrity: sha512-uaKpHiY3DAgfdzgKMQml6U8F8o9udMuYxGqYa5FVfN7D5Ap7B2edQzSLTUYwxrFEn4skSfp6XY73+nzJvxzH4Q==} + engines: {node: '>=18'} + cspell-lib@8.13.3: resolution: {integrity: sha512-aEqxIILeqDtNoCa47/oSl5c926b50ue3PobYs4usn0Ymf0434RopCP+DCGsF7BPtog4j4XWnEmvkcJs57DYWDg==} engines: {node: '>=18'} + cspell-lib@8.14.2: + resolution: {integrity: sha512-d2oiIXHXnADmnhIuFLOdNE63L7OUfzgpLbYaqAWbkImCUDkevfGrOgnX8TJ03fUgZID4nvQ+3kgu/n2j4eLZjQ==} + engines: {node: '>=18'} + cspell-trie-lib@8.13.3: resolution: {integrity: sha512-Z0iLGi9HI+Vf+WhVVeru6dYgQdtaYCKWRlc1SayLfAZhw9BcjrXL8KTXDfAfv/lUgnRu6xwP1isLlDNZECsKVQ==} engines: {node: '>=18'} - cspell@8.13.3: - resolution: {integrity: sha512-2wv4Eby7g8wDB553fI8IoZjyitoKrD2kmtdeoYUN2EjVs3RMpIOver3fL+0VaFAaN0uLfAoeAAIB5xJEakvZYQ==} + cspell-trie-lib@8.14.2: + resolution: {integrity: sha512-rZMbaEBGoyy4/zxKECaMyVyGLbuUxYmZ5jlEgiA3xPtEdWwJ4iWRTo5G6dWbQsXoxPYdAXXZ0/q0GQ2y6Jt0kw==} + engines: {node: '>=18'} + + cspell@8.14.2: + resolution: {integrity: sha512-ii/W7fwO4chNQVYl1C/8k7RW8EXzLb69rvg08p8mSJx8B2UasVJ9tuJpTH2Spo1jX6N3H0dKPWUbd1fAmdAhPg==} engines: {node: '>=18'} hasBin: true @@ -4085,8 +4301,8 @@ packages: cypress-wait-until@3.0.2: resolution: {integrity: sha512-iemies796dD5CgjG5kV0MnpEmKSH+s7O83ZoJLVzuVbZmm4lheMsZqAVT73hlMx4QlkwhxbyUzhOBUOZwoOe0w==} - cypress@13.13.3: - resolution: {integrity: sha512-hUxPrdbJXhUOTzuML+y9Av7CKoYznbD83pt8g3klgpioEha0emfx4WNIuVRx0C76r0xV2MIwAW9WYiXfVJYFQw==} + cypress@13.14.0: + resolution: {integrity: sha512-r0+nhd033x883YL6068futewUsl02Q7rWiinyAAIBDW/OOTn+UMILWgNuCiY3vtJjd53efOqq5R9dctQk/rKiw==} engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true @@ -4608,6 +4824,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -4940,8 +5161,8 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - file-entry-cache@9.0.0: - resolution: {integrity: sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==} + file-entry-cache@9.1.0: + resolution: {integrity: sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==} engines: {node: '>=18'} file-saver@2.0.5: @@ -6549,8 +6770,8 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - minisearch@6.3.0: - resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==} + minisearch@7.1.0: + resolution: {integrity: sha512-tv7c/uefWdEhcu6hvrfTihflgeEi2tN6VV7HJnCjK6VxM75QQJh4t9FwJCsA2EsRS8LCnu3W87CuGPWMocOLCA==} mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -7092,16 +7313,12 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.4.40: - resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==} - engines: {node: ^10 || ^12 || >=14} - postcss@8.4.41: resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} engines: {node: ^10 || ^12 || >=14} - preact@10.23.1: - resolution: {integrity: sha512-O5UdRsNh4vdZaTieWe3XOgSpdMAmkIYBCT3VhQDlKrzyCm8lUYsk0fmVEvoQQifoOjFRTaHZO69ylrzTW2BH+A==} + preact@10.23.2: + resolution: {integrity: sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==} preferred-pm@3.1.4: resolution: {integrity: sha512-lEHd+yEm22jXdCphDrkvIJQU66EuLojPPtvZkpKIkiD+l0DMThF/niqZKJSoU8Vl7iuvtmzyMhir9LdVy5WMnA==} @@ -7427,8 +7644,8 @@ packages: engines: {node: '>=10.0.0'} hasBin: true - rollup@4.20.0: - resolution: {integrity: sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==} + rollup@4.21.1: + resolution: {integrity: sha512-ZnYyKvscThhgd3M5+Qt3pmhO4jIRR5RGzaSovB6Q7rGNrK5cUncrtLmcTTJVSdcKXyZjW8X8MB0JMSuH9bcAJg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7585,8 +7802,8 @@ packages: shiki@0.14.7: resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} - shiki@1.12.1: - resolution: {integrity: sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg==} + shiki@1.14.1: + resolution: {integrity: sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -8083,8 +8300,8 @@ packages: tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - tsx@4.16.5: - resolution: {integrity: sha512-ArsiAQHEW2iGaqZ8fTA1nX0a+lN5mNTyuGRRO6OW3H/Yno1y9/t1f9YOI1Cfoqz63VAthn++ZYcbDP7jPflc+A==} + tsx@4.19.0: + resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==} engines: {node: '>=18.0.0'} hasBin: true @@ -8126,8 +8343,8 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} - type-fest@4.23.0: - resolution: {integrity: sha512-ZiBujro2ohr5+Z/hZWHESLz3g08BBdrdLMieYFULJO+tWc437sn8kQsWLJoZErY8alNhxre9K4p3GURAG11n+w==} + type-fest@4.25.0: + resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} engines: {node: '>=16'} type-is@1.6.18: @@ -8382,8 +8599,8 @@ packages: '@vite-pwa/assets-generator': optional: true - vite@5.3.5: - resolution: {integrity: sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==} + vite@5.4.2: + resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -8391,6 +8608,7 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -8403,6 +8621,8 @@ packages: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -8418,8 +8638,8 @@ packages: vitepress: ^1.0.0-rc.35 vue: '3' - vitepress@1.1.4: - resolution: {integrity: sha512-bWIzFZXpPB6NIDBuWnS20aMADH+FcFKDfQNYFvbOWij03PR29eImTceQHIzCKordjXYBhM/TjE5VKFTUJ3EheA==} + vitepress@1.3.4: + resolution: {integrity: sha512-I1/F6OW1xl3kW4PaIMC6snxjWgf3qfziq2aqsDoFc/Gt41WbcRv++z8zjw8qGRIJ+I4bUW7ZcKFDHHN/jkH9DQ==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4 @@ -8498,14 +8718,6 @@ packages: '@vue/composition-api': optional: true - vue@3.4.35: - resolution: {integrity: sha512-+fl/GLmI4GPileHftVlCdB7fUL4aziPcqTudpTGXCT8s+iZWuOCeNEB5haX6Uz2IpRrbEXOgIFbe+XciCuGbNQ==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - vue@3.4.38: resolution: {integrity: sha512-f0ZgN+mZ5KFgVv9wz0f4OgVKukoXtS3nwET4c2vLBGQR50aI8G0cqbFtLlX9Yiyg3LFGBitruPHt2PxwTduJEw==} peerDependencies: @@ -9266,12 +9478,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@argos-ci/cypress@2.1.2(cypress@13.13.3)': + '@argos-ci/cypress@2.1.2(cypress@13.14.0)': dependencies: '@argos-ci/browser': 2.1.3 '@argos-ci/core': 2.5.0 '@argos-ci/util': 2.1.1 - cypress: 13.13.3 + cypress: 13.14.0 cypress-wait-until: 3.0.2 transitivePeerDependencies: - supports-color @@ -10381,30 +10593,101 @@ snapshots: '@cspell/dict-typescript': 3.1.6 '@cspell/dict-vue': 3.0.0 - '@cspell/cspell-json-reporter@8.13.3': + '@cspell/cspell-bundled-dicts@8.14.2': dependencies: - '@cspell/cspell-types': 8.13.3 + '@cspell/dict-ada': 4.0.2 + '@cspell/dict-aws': 4.0.4 + '@cspell/dict-bash': 4.1.4 + '@cspell/dict-companies': 3.1.4 + '@cspell/dict-cpp': 5.1.16 + '@cspell/dict-cryptocurrencies': 5.0.0 + '@cspell/dict-csharp': 4.0.2 + '@cspell/dict-css': 4.0.13 + '@cspell/dict-dart': 2.0.3 + '@cspell/dict-django': 4.1.0 + '@cspell/dict-docker': 1.1.7 + '@cspell/dict-dotnet': 5.0.5 + '@cspell/dict-elixir': 4.0.3 + '@cspell/dict-en-common-misspellings': 2.0.4 + '@cspell/dict-en-gb': 1.1.33 + '@cspell/dict-en_us': 4.3.23 + '@cspell/dict-filetypes': 3.0.4 + '@cspell/dict-fonts': 4.0.0 + '@cspell/dict-fsharp': 1.0.1 + '@cspell/dict-fullstack': 3.2.0 + '@cspell/dict-gaming-terms': 1.0.5 + '@cspell/dict-git': 3.0.0 + '@cspell/dict-golang': 6.0.12 + '@cspell/dict-google': 1.0.1 + '@cspell/dict-haskell': 4.0.1 + '@cspell/dict-html': 4.0.5 + '@cspell/dict-html-symbol-entities': 4.0.0 + '@cspell/dict-java': 5.0.7 + '@cspell/dict-julia': 1.0.1 + '@cspell/dict-k8s': 1.0.6 + '@cspell/dict-latex': 4.0.0 + '@cspell/dict-lorem-ipsum': 4.0.0 + '@cspell/dict-lua': 4.0.3 + '@cspell/dict-makefile': 1.0.0 + '@cspell/dict-monkeyc': 1.0.6 + '@cspell/dict-node': 5.0.1 + '@cspell/dict-npm': 5.1.0 + '@cspell/dict-php': 4.0.10 + '@cspell/dict-powershell': 5.0.6 + '@cspell/dict-public-licenses': 2.0.8 + '@cspell/dict-python': 4.2.6 + '@cspell/dict-r': 2.0.1 + '@cspell/dict-ruby': 5.0.3 + '@cspell/dict-rust': 4.0.5 + '@cspell/dict-scala': 5.0.3 + '@cspell/dict-software-terms': 4.1.1 + '@cspell/dict-sql': 2.1.5 + '@cspell/dict-svelte': 1.0.2 + '@cspell/dict-swift': 2.0.1 + '@cspell/dict-terraform': 1.0.1 + '@cspell/dict-typescript': 3.1.6 + '@cspell/dict-vue': 3.0.0 + + '@cspell/cspell-json-reporter@8.14.2': + dependencies: + '@cspell/cspell-types': 8.14.2 '@cspell/cspell-pipe@8.13.3': {} + '@cspell/cspell-pipe@8.14.2': {} + '@cspell/cspell-resolver@8.13.3': dependencies: global-directory: 4.0.1 + '@cspell/cspell-resolver@8.14.2': + dependencies: + global-directory: 4.0.1 + '@cspell/cspell-service-bus@8.13.3': {} + '@cspell/cspell-service-bus@8.14.2': {} + '@cspell/cspell-types@8.13.3': {} + '@cspell/cspell-types@8.14.2': {} + '@cspell/dict-ada@4.0.2': {} '@cspell/dict-aws@4.0.3': {} + '@cspell/dict-aws@4.0.4': {} + '@cspell/dict-bash@4.1.3': {} + '@cspell/dict-bash@4.1.4': {} + '@cspell/dict-companies@3.1.4': {} '@cspell/dict-cpp@5.1.15': {} + '@cspell/dict-cpp@5.1.16': {} + '@cspell/dict-cryptocurrencies@5.0.0': {} '@cspell/dict-csharp@4.0.2': {} @@ -10421,6 +10704,8 @@ snapshots: '@cspell/dict-dotnet@5.0.4': {} + '@cspell/dict-dotnet@5.0.5': {} + '@cspell/dict-elixir@4.0.3': {} '@cspell/dict-en-common-misspellings@2.0.4': {} @@ -10443,6 +10728,8 @@ snapshots: '@cspell/dict-golang@6.0.11': {} + '@cspell/dict-golang@6.0.12': {} + '@cspell/dict-google@1.0.1': {} '@cspell/dict-haskell@4.0.1': {} @@ -10471,16 +10758,26 @@ snapshots: '@cspell/dict-npm@5.0.18': {} + '@cspell/dict-npm@5.1.0': {} + + '@cspell/dict-php@4.0.10': {} + '@cspell/dict-php@4.0.9': {} '@cspell/dict-powershell@5.0.5': {} + '@cspell/dict-powershell@5.0.6': {} + '@cspell/dict-public-licenses@2.0.8': {} '@cspell/dict-python@4.2.4': dependencies: '@cspell/dict-data-science': 2.0.1 + '@cspell/dict-python@4.2.6': + dependencies: + '@cspell/dict-data-science': 2.0.1 + '@cspell/dict-r@2.0.1': {} '@cspell/dict-ruby@5.0.3': {} @@ -10491,6 +10788,8 @@ snapshots: '@cspell/dict-software-terms@4.0.11': {} + '@cspell/dict-software-terms@4.1.1': {} + '@cspell/dict-sql@2.1.5': {} '@cspell/dict-svelte@1.0.2': {} @@ -10499,6 +10798,8 @@ snapshots: '@cspell/dict-terraform@1.0.0': {} + '@cspell/dict-terraform@1.0.1': {} + '@cspell/dict-typescript@3.1.6': {} '@cspell/dict-vue@3.0.0': {} @@ -10507,6 +10808,10 @@ snapshots: dependencies: import-meta-resolve: 4.1.0 + '@cspell/dynamic-import@8.14.2': + dependencies: + import-meta-resolve: 4.1.0 + '@cspell/eslint-plugin@8.13.3(eslint@9.8.0)': dependencies: '@cspell/cspell-types': 8.13.3 @@ -10515,18 +10820,24 @@ snapshots: eslint: 9.8.0 synckit: 0.9.1 + '@cspell/filetypes@8.14.2': {} + '@cspell/strong-weak-map@8.13.3': {} + '@cspell/strong-weak-map@8.14.2': {} + '@cspell/url@8.13.3': {} - '@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.13.3)(webpack@5.93.0(esbuild@0.21.5))': + '@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))': 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.13.3 + cypress: 13.14.0 dayjs: 1.11.12 debug: 4.3.6(supports-color@8.1.1) execa: 4.1.0 @@ -10585,7 +10896,7 @@ snapshots: '@docsearch/js@3.6.1(@algolia/client-search@4.24.0)(search-insights@2.15.0)': dependencies: '@docsearch/react': 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.15.0) - preact: 10.23.1 + preact: 10.23.2 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -10618,72 +10929,144 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true + '@esbuild/aix-ppc64@0.23.1': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true + '@esbuild/android-arm64@0.23.1': + optional: true + '@esbuild/android-arm@0.21.5': optional: true + '@esbuild/android-arm@0.23.1': + optional: true + '@esbuild/android-x64@0.21.5': optional: true + '@esbuild/android-x64@0.23.1': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true + '@esbuild/darwin-arm64@0.23.1': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true + '@esbuild/darwin-x64@0.23.1': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true + '@esbuild/freebsd-arm64@0.23.1': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true + '@esbuild/freebsd-x64@0.23.1': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true + '@esbuild/linux-arm64@0.23.1': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true + '@esbuild/linux-arm@0.23.1': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true + '@esbuild/linux-ia32@0.23.1': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true + '@esbuild/linux-loong64@0.23.1': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true + '@esbuild/linux-mips64el@0.23.1': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true + '@esbuild/linux-ppc64@0.23.1': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true + '@esbuild/linux-riscv64@0.23.1': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true + '@esbuild/linux-s390x@0.23.1': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true + '@esbuild/linux-x64@0.23.1': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true + '@esbuild/openbsd-x64@0.23.1': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true + '@esbuild/sunos-x64@0.23.1': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true + '@esbuild/win32-arm64@0.23.1': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true + '@esbuild/win32-ia32@0.23.1': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true + '@esbuild/win32-x64@0.23.1': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@9.8.0)': dependencies: eslint: 9.8.0 @@ -10887,7 +11270,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -10900,14 +11283,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.15) + jest-config: 29.7.0(@types/node@20.16.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -10932,7 +11315,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -10950,7 +11333,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.14.15 + '@types/node': 20.16.2 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -10972,7 +11355,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -11042,7 +11425,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -11154,13 +11537,13 @@ snapshots: optionalDependencies: rollup: 2.79.1 - '@rollup/plugin-typescript@11.1.6(rollup@4.20.0)(tslib@2.7.0)(typescript@5.4.5)': + '@rollup/plugin-typescript@11.1.6(rollup@4.21.1)(tslib@2.7.0)(typescript@5.4.5)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.20.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.1) resolve: 1.22.8 typescript: 5.4.5 optionalDependencies: - rollup: 4.20.0 + rollup: 4.21.1 tslib: 2.7.0 '@rollup/pluginutils@3.1.0(rollup@2.79.1)': @@ -11178,69 +11561,69 @@ snapshots: optionalDependencies: rollup: 2.79.1 - '@rollup/pluginutils@5.1.0(rollup@4.20.0)': + '@rollup/pluginutils@5.1.0(rollup@4.21.1)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.20.0 + rollup: 4.21.1 - '@rollup/rollup-android-arm-eabi@4.20.0': + '@rollup/rollup-android-arm-eabi@4.21.1': optional: true - '@rollup/rollup-android-arm64@4.20.0': + '@rollup/rollup-android-arm64@4.21.1': optional: true - '@rollup/rollup-darwin-arm64@4.20.0': + '@rollup/rollup-darwin-arm64@4.21.1': optional: true - '@rollup/rollup-darwin-x64@4.20.0': + '@rollup/rollup-darwin-x64@4.21.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.20.0': + '@rollup/rollup-linux-arm-gnueabihf@4.21.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.20.0': + '@rollup/rollup-linux-arm-musleabihf@4.21.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.20.0': + '@rollup/rollup-linux-arm64-gnu@4.21.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.20.0': + '@rollup/rollup-linux-arm64-musl@4.21.1': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.20.0': + '@rollup/rollup-linux-riscv64-gnu@4.21.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.20.0': + '@rollup/rollup-linux-s390x-gnu@4.21.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.20.0': + '@rollup/rollup-linux-x64-gnu@4.21.1': optional: true - '@rollup/rollup-linux-x64-musl@4.20.0': + '@rollup/rollup-linux-x64-musl@4.21.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.20.0': + '@rollup/rollup-win32-arm64-msvc@4.21.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.20.0': + '@rollup/rollup-win32-ia32-msvc@4.21.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.20.0': + '@rollup/rollup-win32-x64-msvc@4.21.1': optional: true - '@shikijs/core@1.12.1': + '@shikijs/core@1.14.1': dependencies: '@types/hast': 3.0.4 - '@shikijs/transformers@1.12.1': + '@shikijs/transformers@1.14.1': dependencies: - shiki: 1.12.1 + shiki: 1.14.1 '@sideway/address@4.1.5': dependencies: @@ -11310,11 +11693,11 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/braces@3.0.4': {} @@ -11322,21 +11705,21 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/responselike': 1.0.3 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 4.19.5 - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/connect@3.4.38': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/cors@2.8.17': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/cytoscape@3.21.7': {} @@ -11491,7 +11874,7 @@ snapshots: '@types/express-serve-static-core@4.19.5': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/qs': 6.9.15 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -11510,20 +11893,20 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/hast@3.0.4': dependencies: - '@types/unist': 3.0.2 + '@types/unist': 3.0.3 '@types/http-cache-semantics@4.0.4': {} @@ -11531,7 +11914,7 @@ snapshots: '@types/http-proxy@1.17.14': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/istanbul-lib-coverage@2.0.6': {} @@ -11557,7 +11940,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/linkify-it@5.0.0': {} @@ -11599,11 +11982,11 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/node@12.20.55': {} - '@types/node@18.19.45': + '@types/node@18.19.47': dependencies: undici-types: 5.26.5 @@ -11611,11 +11994,11 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.14.15': + '@types/node@20.16.2': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.8 - '@types/node@22.5.0': + '@types/node@22.5.1': dependencies: undici-types: 6.19.8 @@ -11639,7 +12022,7 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/retry@0.12.0': {} @@ -11652,7 +12035,7 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/serve-index@1.9.4': dependencies: @@ -11661,7 +12044,7 @@ snapshots: '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/send': 0.17.4 '@types/sinonjs__fake-timers@8.1.1': {} @@ -11670,7 +12053,7 @@ snapshots: '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/stack-utils@2.0.3': {} @@ -11684,17 +12067,19 @@ snapshots: '@types/unist@3.0.2': {} + '@types/unist@3.0.3': {} + '@types/uuid@9.0.8': {} '@types/web-bluetooth@0.0.20': {} '@types/ws@8.5.12': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 '@types/ws@8.5.5': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@types/yargs-parser@21.0.3': {} @@ -11704,7 +12089,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 optional: true '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5)': @@ -11826,13 +12211,13 @@ snapshots: '@typescript-eslint/types': 8.0.1 eslint-visitor-keys: 3.4.3 - '@unocss/astro@0.59.4(rollup@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))': + '@unocss/astro@0.59.4(rollup@2.79.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@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6)) + '@unocss/vite': 0.59.4(rollup@2.79.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) optionalDependencies: - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) transitivePeerDependencies: - rollup @@ -11963,7 +12348,7 @@ snapshots: dependencies: '@unocss/core': 0.59.4 - '@unocss/vite@0.59.4(rollup@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))': + '@unocss/vite@0.59.4(rollup@2.79.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@2.79.1) @@ -11975,25 +12360,20 @@ snapshots: chokidar: 3.6.0 fast-glob: 3.3.2 magic-string: 0.30.11 - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + 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.3.5(@types/node@22.5.0)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0))': + '@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.3.5(@types/node@22.5.0)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.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@5.1.2(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))(vue@3.4.35(typescript@5.4.5))': + '@vitejs/plugin-vue@5.1.2(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5))': dependencies: - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) - vue: 3.4.35(typescript@5.4.5) - - '@vitejs/plugin-vue@5.1.2(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5))': - dependencies: - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) vue: 3.4.38(typescript@5.4.5) - '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6))': + '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -12008,7 +12388,7 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) + vitest: 1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) transitivePeerDependencies: - supports-color @@ -12043,7 +12423,7 @@ snapshots: pathe: 1.1.2 picocolors: 1.0.1 sirv: 2.0.4 - vitest: 1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) + vitest: 1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6) '@vitest/utils@1.6.0': dependencies: @@ -12059,14 +12439,6 @@ snapshots: source-map-js: 1.2.0 vue: 3.4.38(typescript@5.4.5) - '@vue/compiler-core@3.4.35': - dependencies: - '@babel/parser': 7.25.4 - '@vue/shared': 3.4.35 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.0 - '@vue/compiler-core@3.4.38': dependencies: '@babel/parser': 7.25.4 @@ -12075,28 +12447,11 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-dom@3.4.35': - dependencies: - '@vue/compiler-core': 3.4.35 - '@vue/shared': 3.4.35 - '@vue/compiler-dom@3.4.38': dependencies: '@vue/compiler-core': 3.4.38 '@vue/shared': 3.4.38 - '@vue/compiler-sfc@3.4.35': - dependencies: - '@babel/parser': 7.25.3 - '@vue/compiler-core': 3.4.35 - '@vue/compiler-dom': 3.4.35 - '@vue/compiler-ssr': 3.4.35 - '@vue/shared': 3.4.35 - estree-walker: 2.0.2 - magic-string: 0.30.11 - postcss: 8.4.41 - source-map-js: 1.2.0 - '@vue/compiler-sfc@3.4.38': dependencies: '@babel/parser': 7.25.4 @@ -12109,11 +12464,6 @@ snapshots: postcss: 8.4.41 source-map-js: 1.2.0 - '@vue/compiler-ssr@3.4.35': - dependencies: - '@vue/compiler-dom': 3.4.35 - '@vue/shared': 3.4.35 - '@vue/compiler-ssr@3.4.38': dependencies: '@vue/compiler-dom': 3.4.38 @@ -12121,13 +12471,13 @@ snapshots: '@vue/devtools-api@6.6.3': {} - '@vue/devtools-api@7.3.7': + '@vue/devtools-api@7.3.9': dependencies: - '@vue/devtools-kit': 7.3.7 + '@vue/devtools-kit': 7.3.9 - '@vue/devtools-kit@7.3.7': + '@vue/devtools-kit@7.3.9': dependencies: - '@vue/devtools-shared': 7.3.7 + '@vue/devtools-shared': 7.3.9 birpc: 0.2.17 hookable: 5.5.3 mitt: 3.0.1 @@ -12135,35 +12485,19 @@ snapshots: speakingurl: 14.0.1 superjson: 2.2.1 - '@vue/devtools-shared@7.3.7': + '@vue/devtools-shared@7.3.9': dependencies: rfdc: 1.4.1 - '@vue/reactivity@3.4.35': - dependencies: - '@vue/shared': 3.4.35 - '@vue/reactivity@3.4.38': dependencies: '@vue/shared': 3.4.38 - '@vue/runtime-core@3.4.35': - dependencies: - '@vue/reactivity': 3.4.35 - '@vue/shared': 3.4.35 - '@vue/runtime-core@3.4.38': dependencies: '@vue/reactivity': 3.4.38 '@vue/shared': 3.4.38 - '@vue/runtime-dom@3.4.35': - dependencies: - '@vue/reactivity': 3.4.35 - '@vue/runtime-core': 3.4.35 - '@vue/shared': 3.4.35 - csstype: 3.1.3 - '@vue/runtime-dom@3.4.38': dependencies: '@vue/reactivity': 3.4.38 @@ -12171,32 +12505,14 @@ snapshots: '@vue/shared': 3.4.38 csstype: 3.1.3 - '@vue/server-renderer@3.4.35(vue@3.4.35(typescript@5.4.5))': - dependencies: - '@vue/compiler-ssr': 3.4.35 - '@vue/shared': 3.4.35 - vue: 3.4.35(typescript@5.4.5) - '@vue/server-renderer@3.4.38(vue@3.4.38(typescript@5.4.5))': dependencies: '@vue/compiler-ssr': 3.4.38 '@vue/shared': 3.4.38 vue: 3.4.38(typescript@5.4.5) - '@vue/shared@3.4.35': {} - '@vue/shared@3.4.38': {} - '@vueuse/core@10.11.0(vue@3.4.35(typescript@5.4.5))': - dependencies: - '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 10.11.0 - '@vueuse/shared': 10.11.0(vue@3.4.35(typescript@5.4.5)) - vue-demi: 0.14.10(vue@3.4.35(typescript@5.4.5)) - transitivePeerDependencies: - - '@vue/composition-api' - - vue - '@vueuse/core@10.11.1(vue@3.4.38(typescript@5.4.5))': dependencies: '@types/web-bluetooth': 0.0.20 @@ -12207,11 +12523,21 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/integrations@10.11.0(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.35(typescript@5.4.5))': + '@vueuse/core@11.0.3(vue@3.4.38(typescript@5.4.5))': dependencies: - '@vueuse/core': 10.11.0(vue@3.4.35(typescript@5.4.5)) - '@vueuse/shared': 10.11.0(vue@3.4.35(typescript@5.4.5)) - vue-demi: 0.14.10(vue@3.4.35(typescript@5.4.5)) + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 11.0.3 + '@vueuse/shared': 11.0.3(vue@3.4.38(typescript@5.4.5)) + vue-demi: 0.14.10(vue@3.4.38(typescript@5.4.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/integrations@11.0.3(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.38(typescript@5.4.5))': + dependencies: + '@vueuse/core': 11.0.3(vue@3.4.38(typescript@5.4.5)) + '@vueuse/shared': 11.0.3(vue@3.4.38(typescript@5.4.5)) + vue-demi: 0.14.10(vue@3.4.38(typescript@5.4.5)) optionalDependencies: axios: 1.7.5(debug@4.3.6) focus-trap: 7.5.4 @@ -12219,18 +12545,18 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/metadata@10.11.0': {} - '@vueuse/metadata@10.11.1': {} - '@vueuse/shared@10.11.0(vue@3.4.35(typescript@5.4.5))': + '@vueuse/metadata@11.0.3': {} + + '@vueuse/shared@10.11.1(vue@3.4.38(typescript@5.4.5))': dependencies: - vue-demi: 0.14.10(vue@3.4.35(typescript@5.4.5)) + vue-demi: 0.14.10(vue@3.4.38(typescript@5.4.5)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/shared@10.11.1(vue@3.4.38(typescript@5.4.5))': + '@vueuse/shared@11.0.3(vue@3.4.38(typescript@5.4.5))': dependencies: vue-demi: 0.14.10(vue@3.4.38(typescript@5.4.5)) transitivePeerDependencies: @@ -12259,7 +12585,7 @@ snapshots: '@wdio/types@7.30.2(typescript@5.4.5)': dependencies: - '@types/node': 18.19.45 + '@types/node': 18.19.47 got: 11.8.6 optionalDependencies: typescript: 5.4.5 @@ -13239,13 +13565,13 @@ snapshots: p-filter: 3.0.0 p-map: 6.0.0 - create-jest@29.7.0(@types/node@20.14.15): + create-jest@29.7.0(@types/node@20.16.2): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.15) + jest-config: 29.7.0(@types/node@20.16.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -13286,6 +13612,12 @@ snapshots: comment-json: 4.2.5 yaml: 2.5.0 + cspell-config-lib@8.14.2: + dependencies: + '@cspell/cspell-types': 8.14.2 + comment-json: 4.2.5 + yaml: 2.5.0 + cspell-dictionary@8.13.3: dependencies: '@cspell/cspell-pipe': 8.13.3 @@ -13293,11 +13625,18 @@ snapshots: cspell-trie-lib: 8.13.3 fast-equals: 5.0.1 - cspell-gitignore@8.13.3: + cspell-dictionary@8.14.2: dependencies: - '@cspell/url': 8.13.3 - cspell-glob: 8.13.3 - cspell-io: 8.13.3 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + cspell-trie-lib: 8.14.2 + fast-equals: 5.0.1 + + cspell-gitignore@8.14.2: + dependencies: + '@cspell/url': 8.14.2 + cspell-glob: 8.14.2 + cspell-io: 8.14.2 find-up-simple: 1.0.0 cspell-glob@8.13.3: @@ -13305,16 +13644,31 @@ snapshots: '@cspell/url': 8.13.3 micromatch: 4.0.8 + cspell-glob@8.14.2: + dependencies: + '@cspell/url': 8.14.2 + micromatch: 4.0.8 + cspell-grammar@8.13.3: dependencies: '@cspell/cspell-pipe': 8.13.3 '@cspell/cspell-types': 8.13.3 + cspell-grammar@8.14.2: + dependencies: + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + cspell-io@8.13.3: dependencies: '@cspell/cspell-service-bus': 8.13.3 '@cspell/url': 8.13.3 + cspell-io@8.14.2: + dependencies: + '@cspell/cspell-service-bus': 8.14.2 + '@cspell/url': 8.14.2 + cspell-lib@8.13.3: dependencies: '@cspell/cspell-bundled-dicts': 8.13.3 @@ -13341,30 +13695,63 @@ snapshots: vscode-uri: 3.0.8 xdg-basedir: 5.1.0 + cspell-lib@8.14.2: + dependencies: + '@cspell/cspell-bundled-dicts': 8.14.2 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-resolver': 8.14.2 + '@cspell/cspell-types': 8.14.2 + '@cspell/dynamic-import': 8.14.2 + '@cspell/filetypes': 8.14.2 + '@cspell/strong-weak-map': 8.14.2 + '@cspell/url': 8.14.2 + clear-module: 4.1.2 + comment-json: 4.2.5 + cspell-config-lib: 8.14.2 + cspell-dictionary: 8.14.2 + cspell-glob: 8.14.2 + cspell-grammar: 8.14.2 + cspell-io: 8.14.2 + cspell-trie-lib: 8.14.2 + env-paths: 3.0.0 + fast-equals: 5.0.1 + gensequence: 7.0.0 + import-fresh: 3.3.0 + resolve-from: 5.0.0 + vscode-languageserver-textdocument: 1.0.12 + vscode-uri: 3.0.8 + xdg-basedir: 5.1.0 + cspell-trie-lib@8.13.3: dependencies: '@cspell/cspell-pipe': 8.13.3 '@cspell/cspell-types': 8.13.3 gensequence: 7.0.0 - cspell@8.13.3: + cspell-trie-lib@8.14.2: dependencies: - '@cspell/cspell-json-reporter': 8.13.3 - '@cspell/cspell-pipe': 8.13.3 - '@cspell/cspell-types': 8.13.3 - '@cspell/dynamic-import': 8.13.3 - '@cspell/url': 8.13.3 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + gensequence: 7.0.0 + + cspell@8.14.2: + dependencies: + '@cspell/cspell-json-reporter': 8.14.2 + '@cspell/cspell-pipe': 8.14.2 + '@cspell/cspell-types': 8.14.2 + '@cspell/dynamic-import': 8.14.2 + '@cspell/url': 8.14.2 chalk: 5.3.0 chalk-template: 1.1.0 commander: 12.1.0 - cspell-dictionary: 8.13.3 - cspell-gitignore: 8.13.3 - cspell-glob: 8.13.3 - cspell-io: 8.13.3 - cspell-lib: 8.13.3 + cspell-dictionary: 8.14.2 + cspell-gitignore: 8.14.2 + cspell-glob: 8.14.2 + cspell-io: 8.14.2 + cspell-lib: 8.14.2 fast-glob: 3.3.2 fast-json-stable-stringify: 2.1.0 - file-entry-cache: 9.0.0 + file-entry-cache: 9.1.0 get-stdin: 9.0.0 semver: 7.6.3 strip-ansi: 7.1.0 @@ -13390,13 +13777,13 @@ snapshots: cuint@0.2.2: {} - cypress-image-snapshot@4.0.1(cypress@13.13.3)(jest@29.7.0(@types/node@20.14.15)): + cypress-image-snapshot@4.0.1(cypress@13.14.0)(jest@29.7.0(@types/node@20.16.2)): dependencies: chalk: 2.4.2 - cypress: 13.13.3 + cypress: 13.14.0 fs-extra: 7.0.1 glob: 7.2.3 - jest-image-snapshot: 4.2.0(jest@29.7.0(@types/node@20.14.15)) + jest-image-snapshot: 4.2.0(jest@29.7.0(@types/node@20.16.2)) pkg-dir: 3.0.0 term-img: 4.1.0 transitivePeerDependencies: @@ -13404,7 +13791,7 @@ snapshots: cypress-wait-until@3.0.2: {} - cypress@13.13.3: + cypress@13.14.0: dependencies: '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) @@ -14003,6 +14390,33 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + escalade@3.1.2: {} escape-html@1.0.3: {} @@ -14036,13 +14450,13 @@ snapshots: dependencies: htmlparser2: 9.1.0 - eslint-plugin-jest@28.7.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(jest@29.7.0(@types/node@20.14.15))(typescript@5.4.5): + eslint-plugin-jest@28.7.0(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(jest@29.7.0(@types/node@20.16.2))(typescript@5.4.5): dependencies: '@typescript-eslint/utils': 8.0.0(eslint@9.8.0)(typescript@5.4.5) eslint: 9.8.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0)(typescript@5.4.5))(eslint@9.8.0)(typescript@5.4.5) - jest: 29.7.0(@types/node@20.14.15) + jest: 29.7.0(@types/node@20.16.2) transitivePeerDependencies: - supports-color - typescript @@ -14454,7 +14868,7 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-entry-cache@9.0.0: + file-entry-cache@9.1.0: dependencies: flat-cache: 5.0.0 @@ -15338,7 +15752,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -15358,16 +15772,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.14.15): + jest-cli@29.7.0(@types/node@20.16.2): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.14.15) + create-jest: 29.7.0(@types/node@20.16.2) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.14.15) + jest-config: 29.7.0(@types/node@20.16.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -15377,7 +15791,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.14.15): + jest-config@29.7.0(@types/node@20.16.2): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 @@ -15402,7 +15816,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -15431,7 +15845,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -15441,7 +15855,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.14.15 + '@types/node': 20.16.2 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -15453,12 +15867,12 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - jest-image-snapshot@4.2.0(jest@29.7.0(@types/node@20.14.15)): + jest-image-snapshot@4.2.0(jest@29.7.0(@types/node@20.16.2)): dependencies: chalk: 1.1.3 get-stdin: 5.0.1 glur: 1.1.2 - jest: 29.7.0(@types/node@20.14.15) + jest: 29.7.0(@types/node@20.16.2) lodash: 4.17.21 mkdirp: 0.5.6 pixelmatch: 5.3.0 @@ -15493,7 +15907,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -15528,7 +15942,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -15556,7 +15970,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -15602,7 +16016,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -15621,7 +16035,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.15 + '@types/node': 20.16.2 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -15630,23 +16044,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.14.15): + jest@29.7.0(@types/node@20.16.2): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.14.15) + jest-cli: 29.7.0(@types/node@20.16.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -16469,7 +16883,7 @@ snapshots: minipass@7.1.2: {} - minisearch@6.3.0: {} + minisearch@7.1.0: {} mitt@3.0.1: {} @@ -16976,19 +17390,13 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss@8.4.40: - dependencies: - nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 - postcss@8.4.41: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 source-map-js: 1.2.0 - preact@10.23.1: {} + preact@10.23.2: {} preferred-pm@3.1.4: dependencies: @@ -17314,39 +17722,39 @@ snapshots: robust-predicates@3.0.2: {} - rollup-plugin-visualizer@5.12.0(rollup@4.20.0): + rollup-plugin-visualizer@5.12.0(rollup@4.21.1): dependencies: open: 8.4.2 picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.2 optionalDependencies: - rollup: 4.20.0 + rollup: 4.21.1 rollup@2.79.1: optionalDependencies: fsevents: 2.3.3 - rollup@4.20.0: + rollup@4.21.1: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.20.0 - '@rollup/rollup-android-arm64': 4.20.0 - '@rollup/rollup-darwin-arm64': 4.20.0 - '@rollup/rollup-darwin-x64': 4.20.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.20.0 - '@rollup/rollup-linux-arm-musleabihf': 4.20.0 - '@rollup/rollup-linux-arm64-gnu': 4.20.0 - '@rollup/rollup-linux-arm64-musl': 4.20.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.20.0 - '@rollup/rollup-linux-riscv64-gnu': 4.20.0 - '@rollup/rollup-linux-s390x-gnu': 4.20.0 - '@rollup/rollup-linux-x64-gnu': 4.20.0 - '@rollup/rollup-linux-x64-musl': 4.20.0 - '@rollup/rollup-win32-arm64-msvc': 4.20.0 - '@rollup/rollup-win32-ia32-msvc': 4.20.0 - '@rollup/rollup-win32-x64-msvc': 4.20.0 + '@rollup/rollup-android-arm-eabi': 4.21.1 + '@rollup/rollup-android-arm64': 4.21.1 + '@rollup/rollup-darwin-arm64': 4.21.1 + '@rollup/rollup-darwin-x64': 4.21.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.1 + '@rollup/rollup-linux-arm-musleabihf': 4.21.1 + '@rollup/rollup-linux-arm64-gnu': 4.21.1 + '@rollup/rollup-linux-arm64-musl': 4.21.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.1 + '@rollup/rollup-linux-riscv64-gnu': 4.21.1 + '@rollup/rollup-linux-s390x-gnu': 4.21.1 + '@rollup/rollup-linux-x64-gnu': 4.21.1 + '@rollup/rollup-linux-x64-musl': 4.21.1 + '@rollup/rollup-win32-arm64-msvc': 4.21.1 + '@rollup/rollup-win32-ia32-msvc': 4.21.1 + '@rollup/rollup-win32-x64-msvc': 4.21.1 fsevents: 2.3.3 roughjs@4.6.6: @@ -17551,9 +17959,9 @@ snapshots: vscode-oniguruma: 1.7.0 vscode-textmate: 8.0.0 - shiki@1.12.1: + shiki@1.14.1: dependencies: - '@shikijs/core': 1.12.1 + '@shikijs/core': 1.14.1 '@types/hast': 3.0.4 side-channel@1.0.6: @@ -18102,9 +18510,9 @@ snapshots: tslib@2.7.0: {} - tsx@4.16.5: + tsx@4.19.0: dependencies: - esbuild: 0.21.5 + esbuild: 0.23.1 get-tsconfig: 4.7.6 optionalDependencies: fsevents: 2.3.3 @@ -18133,7 +18541,7 @@ snapshots: type-fest@0.8.1: {} - type-fest@4.23.0: {} + type-fest@4.25.0: {} type-is@1.6.18: dependencies: @@ -18301,9 +18709,9 @@ snapshots: universalify@2.0.1: {} - unocss@0.59.4(postcss@8.4.41)(rollup@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6)): + unocss@0.59.4(postcss@8.4.41)(rollup@2.79.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)): dependencies: - '@unocss/astro': 0.59.4(rollup@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6)) + '@unocss/astro': 0.59.4(rollup@2.79.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) '@unocss/cli': 0.59.4(rollup@2.79.1) '@unocss/core': 0.59.4 '@unocss/extractor-arbitrary-variants': 0.59.4 @@ -18322,9 +18730,9 @@ snapshots: '@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@2.79.1)(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6)) + '@unocss/vite': 0.59.4(rollup@2.79.1)(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6)) optionalDependencies: - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) transitivePeerDependencies: - postcss - rollup @@ -18415,24 +18823,25 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-node@1.6.0(@types/node@20.14.15)(terser@5.31.6): + vite-node@1.6.0(@types/node@20.16.2)(terser@5.31.6): dependencies: cac: 6.7.14 debug: 4.3.6(supports-color@8.1.1) pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.5(@types/node@20.14.15)(terser@5.31.6) + vite: 5.4.2(@types/node@20.16.2)(terser@5.31.6) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-plugin-istanbul@6.0.2(vite@5.3.5(@types/node@20.14.15)(terser@5.31.6)): + vite-plugin-istanbul@6.0.2(vite@5.4.2(@types/node@20.16.2)(terser@5.31.6)): dependencies: '@istanbuljs/load-nyc-config': 1.1.0 espree: 10.1.0 @@ -18440,68 +18849,69 @@ snapshots: picocolors: 1.0.1 source-map: 0.7.4 test-exclude: 6.0.0 - vite: 5.3.5(@types/node@20.14.15)(terser@5.31.6) + vite: 5.4.2(@types/node@20.16.2)(terser@5.31.6) transitivePeerDependencies: - supports-color - vite-plugin-pwa@0.19.8(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.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: debug: 4.3.6(supports-color@8.1.1) fast-glob: 3.3.2 pretty-bytes: 6.1.1 - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) + 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 transitivePeerDependencies: - supports-color - vite@5.3.5(@types/node@20.14.15)(terser@5.31.6): + vite@5.4.2(@types/node@20.16.2)(terser@5.31.6): dependencies: esbuild: 0.21.5 - postcss: 8.4.40 - rollup: 4.20.0 + postcss: 8.4.41 + rollup: 4.21.1 optionalDependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 fsevents: 2.3.3 terser: 5.31.6 - vite@5.3.5(@types/node@22.5.0)(terser@5.31.6): + vite@5.4.2(@types/node@22.5.1)(terser@5.31.6): dependencies: esbuild: 0.21.5 - postcss: 8.4.40 - rollup: 4.20.0 + postcss: 8.4.41 + rollup: 4.21.1 optionalDependencies: - '@types/node': 22.5.0 + '@types/node': 22.5.1 fsevents: 2.3.3 terser: 5.31.6 - vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5))(vue@3.4.35(typescript@5.4.5)): + vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.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))(vue@3.4.38(typescript@5.4.5)): dependencies: '@types/flexsearch': 0.7.6 '@types/markdown-it': 12.2.3 flexsearch: 0.7.43 glob-to-regexp: 0.4.1 markdown-it: 13.0.2 - vitepress: 1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5) - vue: 3.4.35(typescript@5.4.5) + vitepress: 1.3.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) + vue: 3.4.38(typescript@5.4.5) - vitepress@1.1.4(@algolia/client-search@4.24.0)(@types/node@22.5.0)(axios@1.7.5)(postcss@8.4.41)(search-insights@2.15.0)(terser@5.31.6)(typescript@5.4.5): + vitepress@1.3.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): dependencies: '@docsearch/css': 3.6.1 '@docsearch/js': 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.15.0) - '@shikijs/core': 1.12.1 - '@shikijs/transformers': 1.12.1 + '@shikijs/core': 1.14.1 + '@shikijs/transformers': 1.14.1 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.1.2(vite@5.3.5(@types/node@22.5.0)(terser@5.31.6))(vue@3.4.35(typescript@5.4.5)) - '@vue/devtools-api': 7.3.7 - '@vueuse/core': 10.11.0(vue@3.4.35(typescript@5.4.5)) - '@vueuse/integrations': 10.11.0(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.35(typescript@5.4.5)) + '@vitejs/plugin-vue': 5.1.2(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5)) + '@vue/devtools-api': 7.3.9 + '@vue/shared': 3.4.38 + '@vueuse/core': 11.0.3(vue@3.4.38(typescript@5.4.5)) + '@vueuse/integrations': 11.0.3(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.38(typescript@5.4.5)) focus-trap: 7.5.4 mark.js: 8.11.1 - minisearch: 6.3.0 - shiki: 1.12.1 - vite: 5.3.5(@types/node@22.5.0)(terser@5.31.6) - vue: 3.4.35(typescript@5.4.5) + minisearch: 7.1.0 + shiki: 1.14.1 + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + vue: 3.4.38(typescript@5.4.5) optionalDependencies: postcss: 8.4.41 transitivePeerDependencies: @@ -18523,6 +18933,7 @@ snapshots: - react - react-dom - sass + - sass-embedded - search-insights - sortablejs - stylus @@ -18531,7 +18942,7 @@ snapshots: - typescript - universal-cookie - vitest@1.6.0(@types/node@20.14.15)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6): + vitest@1.6.0(@types/node@20.16.2)(@vitest/ui@1.6.0)(jsdom@24.1.3)(terser@5.31.6): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -18550,17 +18961,18 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.9.0 tinypool: 0.8.4 - vite: 5.3.5(@types/node@20.14.15)(terser@5.31.6) - vite-node: 1.6.0(@types/node@20.14.15)(terser@5.31.6) + vite: 5.4.2(@types/node@20.16.2)(terser@5.31.6) + vite-node: 1.6.0(@types/node@20.16.2)(terser@5.31.6) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.14.15 + '@types/node': 20.16.2 '@vitest/ui': 1.6.0(vitest@1.6.0) jsdom: 24.1.3 transitivePeerDependencies: - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color @@ -18597,24 +19009,10 @@ snapshots: vscode-uri@3.0.8: {} - vue-demi@0.14.10(vue@3.4.35(typescript@5.4.5)): - dependencies: - vue: 3.4.35(typescript@5.4.5) - vue-demi@0.14.10(vue@3.4.38(typescript@5.4.5)): dependencies: vue: 3.4.38(typescript@5.4.5) - vue@3.4.35(typescript@5.4.5): - dependencies: - '@vue/compiler-dom': 3.4.35 - '@vue/compiler-sfc': 3.4.35 - '@vue/runtime-dom': 3.4.35 - '@vue/server-renderer': 3.4.35(vue@3.4.35(typescript@5.4.5)) - '@vue/shared': 3.4.35 - optionalDependencies: - typescript: 5.4.5 - vue@3.4.38(typescript@5.4.5): dependencies: '@vue/compiler-dom': 3.4.38 @@ -18661,7 +19059,7 @@ snapshots: webdriver@7.31.1(typescript@5.4.5): dependencies: - '@types/node': 18.19.45 + '@types/node': 18.19.47 '@wdio/config': 7.31.1(typescript@5.4.5) '@wdio/logger': 7.26.0 '@wdio/protocols': 7.27.0 From c9c821da5c8b21c1ee095ffd03c562786c381148 Mon Sep 17 00:00:00 2001 From: omkarht Date: Wed, 28 Aug 2024 15:27:10 +0530 Subject: [PATCH 64/73] updated crossced Circle Shape --- .../rendering-elements/shapes/crossedCircle.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/crossedCircle.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/crossedCircle.ts index 93a69d16f..cb4533daa 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/crossedCircle.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/crossedCircle.ts @@ -25,8 +25,9 @@ function createLine(r: number) { export const crossedCircle = async (parent: SVGAElement, node: Node) => { const { labelStyles, nodeStyles } = styles2String(node); node.labelStyle = labelStyles; - const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node)); - const radius = Math.max(bbox.width, bbox.height) / 2 + halfPadding; + node.label = ''; + const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node)); + const radius = Math.max(30, node?.width ?? 0); const { cssStyles } = node; // @ts-ignore - rough is not typed From 011c036350a9763ffcb77c9bdf37506b188e2e88 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 13:07:11 +0200 Subject: [PATCH 65/73] #5782 fix: adding backwards compatability for defaultRenderer directive --- .../mermaid/src/diagrams/flowchart/flowDetector-v2.ts | 9 +++++---- .../src/rendering-util/layout-algorithms/dagre/index.js | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/mermaid/src/diagrams/flowchart/flowDetector-v2.ts b/packages/mermaid/src/diagrams/flowchart/flowDetector-v2.ts index b66afe4bf..df3f57e47 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDetector-v2.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDetector-v2.ts @@ -7,13 +7,14 @@ import type { const id = 'flowchart-v2'; const detector: DiagramDetector = (txt, config) => { - if ( - config?.flowchart?.defaultRenderer === 'dagre-d3' || - config?.flowchart?.defaultRenderer === 'elk' - ) { + if (config?.flowchart?.defaultRenderer === 'dagre-d3') { return false; } + if (config?.flowchart?.defaultRenderer === 'elk') { + config.layout = 'elk'; + } + // If we have configured to use dagre-wrapper then we should return true in this function for graph code thus making it use the new flowchart diagram if (/^\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === 'dagre-wrapper') { return true; diff --git a/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js b/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js index c9c1926da..307242675 100644 --- a/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js +++ b/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js @@ -111,7 +111,7 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit if (graph.children(v).length > 0) { // This is a cluster but not to be rendered recursively // Render as before - log.info( + log.trace( 'Cluster - the non recursive path XBX', v, node.id, @@ -120,11 +120,11 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit 'Graph:', graph ); - log.info(findNonClusterChild(node.id, graph)); + log.trace(findNonClusterChild(node.id, graph)); clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node }); // insertCluster(clusters, graph.node(v)); } else { - log.warn('Node - the non recursive path XAX', v, nodes, graph.node(v), dir); + log.trace('Node - the non recursive path XAX', v, nodes, graph.node(v), dir); await insertNode(nodes, graph.node(v), dir); } } From 06310faa32da9bda791b660dc957a91c2af55344 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 13:29:09 +0200 Subject: [PATCH 66/73] Removing default config overriding default value from schema --- packages/mermaid/src/defaultConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/defaultConfig.ts b/packages/mermaid/src/defaultConfig.ts index 97f3e0bb1..aa6aa0608 100644 --- a/packages/mermaid/src/defaultConfig.ts +++ b/packages/mermaid/src/defaultConfig.ts @@ -21,8 +21,8 @@ const config: RequiredDeep = { // TODO: Should we replace these with `null` so that they can go in the JSON Schema? deterministicIDSeed: undefined, elk: { + // mergeEdges is needed here to be considered mergeEdges: false, - nodePlacementStrategy: 'SIMPLE', }, themeCSS: undefined, From 63e9194c5d79cf700d6f2a2be102c1c4ca1fbf1a Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 13:35:51 +0200 Subject: [PATCH 67/73] Add BRANDES_KOEPF node placement strategy default value --- docs/config/setup/modules/defaultConfig.md | 2 +- packages/mermaid/src/defaultConfig.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/config/setup/modules/defaultConfig.md b/docs/config/setup/modules/defaultConfig.md index 0a3e15855..68486467c 100644 --- a/docs/config/setup/modules/defaultConfig.md +++ b/docs/config/setup/modules/defaultConfig.md @@ -14,7 +14,7 @@ #### Defined in -[packages/mermaid/src/defaultConfig.ts:266](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L266) +[packages/mermaid/src/defaultConfig.ts:267](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L267) --- diff --git a/packages/mermaid/src/defaultConfig.ts b/packages/mermaid/src/defaultConfig.ts index aa6aa0608..feae37f52 100644 --- a/packages/mermaid/src/defaultConfig.ts +++ b/packages/mermaid/src/defaultConfig.ts @@ -23,6 +23,7 @@ const config: RequiredDeep = { elk: { // mergeEdges is needed here to be considered mergeEdges: false, + nodePlacementStrategy: 'BRANDES_KOEPF', }, themeCSS: undefined, From 256a148bbf484fc7db6c19f94dd69d5d268ee048 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 13:52:51 +0200 Subject: [PATCH 68/73] Adding changeset for acrhitecture diagrams --- .changeset/nice-flowers-yawn.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/nice-flowers-yawn.md diff --git a/.changeset/nice-flowers-yawn.md b/.changeset/nice-flowers-yawn.md new file mode 100644 index 000000000..31c0e81af --- /dev/null +++ b/.changeset/nice-flowers-yawn.md @@ -0,0 +1,8 @@ +--- +"mermaid": minor +"@mermaid-js/docs": patch +--- + +New Diagram: Architecture + +Adds architecture diagrams which allows users to show relations between services. From 8fa1fed8b538d2cfb26d508cf3e3f602f6b3c38a Mon Sep 17 00:00:00 2001 From: omkarht Date: Wed, 28 Aug 2024 17:26:07 +0530 Subject: [PATCH 69/73] added padding in waveRectangle Shape --- .../shapes/waveRectangle.ts | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/waveRectangle.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/waveRectangle.ts index 08e531798..d66f354cb 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/waveRectangle.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/waveRectangle.ts @@ -17,10 +17,29 @@ export const waveRectangle = async (parent: SVGAElement, node: Node) => { const { labelStyles, nodeStyles } = styles2String(node); node.labelStyle = labelStyles; const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node)); - const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0); - const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0); - const waveAmplitude = h / 4; - const finalH = h + waveAmplitude; + + const minWidth = 100; // Minimum width + const minHeight = 50; // Minimum height + + const baseWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0); + const baseHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0); + + const aspectRatio = baseWidth / baseHeight; + + let w = baseWidth; + let h = baseHeight; + + if (w > h * aspectRatio) { + h = w / aspectRatio; + } else { + w = h * aspectRatio; + } + + w = Math.max(w, minWidth); + h = Math.max(h, minHeight); + + const waveAmplitude = Math.min(h * 0.2, h / 4); + const finalH = h + waveAmplitude * 2; const { cssStyles } = node; // @ts-ignore - rough is not typed From 28bd07fdeb4fc981107d21317ec6160b31f80116 Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Wed, 28 Aug 2024 14:07:29 +0200 Subject: [PATCH 70/73] added changeset for recent PR --- .changeset/famous-bananas-join.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/famous-bananas-join.md diff --git a/.changeset/famous-bananas-join.md b/.changeset/famous-bananas-join.md new file mode 100644 index 000000000..48c29a8ad --- /dev/null +++ b/.changeset/famous-bananas-join.md @@ -0,0 +1,6 @@ +--- +'mermaid': patch +--- + +Fix for self loops in cluster +Supporting legacy defaultRenderer directive From 33a809f09a9aa1f84ba06201ab550bad81c3ff65 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 14:10:36 +0200 Subject: [PATCH 71/73] Change set for PR yesterday --- .changeset/pants-things-go.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/pants-things-go.md diff --git a/.changeset/pants-things-go.md b/.changeset/pants-things-go.md new file mode 100644 index 000000000..559e572d1 --- /dev/null +++ b/.changeset/pants-things-go.md @@ -0,0 +1,6 @@ +--- +'@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. From fda092bbe9f5be9052831d9b7f6c343e290d25b9 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 14:24:00 +0200 Subject: [PATCH 72/73] Fix for merge realted error in pnpm-lock and langium-config --- packages/parser/langium-config.json | 24 ++- pnpm-lock.yaml | 280 ++++++++++++---------------- 2 files changed, 142 insertions(+), 162 deletions(-) diff --git a/packages/parser/langium-config.json b/packages/parser/langium-config.json index b1ecf01f7..2246a203d 100644 --- a/packages/parser/langium-config.json +++ b/packages/parser/langium-config.json @@ -4,26 +4,42 @@ { "id": "info", "grammar": "src/language/info/info.langium", - "fileExtensions": [".mmd", ".mermaid"] + "fileExtensions": [ + ".mmd", + ".mermaid" + ] }, { "id": "packet", "grammar": "src/language/packet/packet.langium", - "fileExtensions": [".mmd", ".mermaid"] + "fileExtensions": [ + ".mmd", + ".mermaid" + ] }, { "id": "pie", "grammar": "src/language/pie/pie.langium", - "fileExtensions": [".mmd", ".mermaid"] + "fileExtensions": [ + ".mmd", + ".mermaid" + ] }, { "id": "architecture", "grammar": "src/language/architecture/architecture.langium", + "fileExtensions": [ + ".mmd", + ".mermaid" + ] }, { "id": "gitGraph", "grammar": "src/language/gitGraph/gitGraph.langium", - "fileExtensions": [".mmd", ".mermaid"] + "fileExtensions": [ + ".mmd", + ".mermaid" + ] } ], "mode": "production", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfb898260..c8e7d0411 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,7 +217,7 @@ importers: version: link:../parser cytoscape: specifier: ^3.29.2 - version: 3.30.2 + version: 3.30.1 cytoscape-cose-bilkent: specifier: ^4.1.0 version: 4.1.0(cytoscape@3.30.1) @@ -495,68 +495,7 @@ importers: 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.3.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/mermaid/src/vitepress: - dependencies: - '@mdi/font': - specifier: ^7.0.0 - version: 7.4.47 - '@vueuse/core': - specifier: ^10.9.0 - version: 10.11.0(vue@3.4.35(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.35(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.3.5(@types/node@20.14.14)(terser@5.31.3))(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.3.5(@types/node@20.14.14)(terser@5.31.3))(vue@3.4.35(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.40)(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) - unplugin-vue-components: - specifier: ^0.26.0 - version: 0.26.0(@babel/parser@7.25.3)(rollup@4.20.0)(vue@3.4.35(typescript@5.4.5)) - vite: - specifier: ^5.0.0 - version: 5.3.5(@types/node@20.14.14)(terser@5.31.3) - vite-plugin-pwa: - specifier: ^0.19.7 - version: 0.19.8(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(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@20.14.14)(axios@1.7.3)(postcss@8.4.40)(search-insights@2.15.0)(terser@5.31.3)(typescript@5.4.5) + 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 @@ -3307,6 +3246,47 @@ packages: '@vueuse/core@11.0.3': resolution: {integrity: sha512-RENlh64+SYA9XMExmmH1a3TPqeIuJBNNB/63GT35MZI+zpru3oMRUA6cEFr9HmGqEgUisurwGwnIieF6qu3aXw==} + '@vueuse/integrations@10.11.1': + resolution: {integrity: sha512-Y5hCGBguN+vuVYTZmdd/IMXLOdfS60zAmDmFYc4BKBcMUPZH1n4tdyDECCPjXm0bNT3ZRUy1xzTLGaUje8Xyaw==} + peerDependencies: + async-validator: ^4 + axios: ^1 + change-case: ^4 + drauu: ^0.3 + focus-trap: ^7 + fuse.js: ^6 + idb-keyval: ^6 + jwt-decode: ^3 + nprogress: ^0.2 + qrcode: ^1.5 + sortablejs: ^1 + universal-cookie: ^6 + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + '@vueuse/integrations@11.0.3': resolution: {integrity: sha512-w6CDisaxs19S5Fd+NPPLFaA3GoX5gxuxrbTTBu0EYap7oH13w75L6C/+7e9mcoF9akhcR6GyYajwVMQEjdapJg==} peerDependencies: @@ -6851,6 +6831,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + minisearch@6.3.0: + resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==} + minisearch@7.1.0: resolution: {integrity: sha512-tv7c/uefWdEhcu6hvrfTihflgeEi2tN6VV7HJnCjK6VxM75QQJh4t9FwJCsA2EsRS8LCnu3W87CuGPWMocOLCA==} @@ -8719,6 +8702,18 @@ packages: vitepress: ^1.0.0-rc.35 vue: '3' + vitepress@1.1.4: + resolution: {integrity: sha512-bWIzFZXpPB6NIDBuWnS20aMADH+FcFKDfQNYFvbOWij03PR29eImTceQHIzCKordjXYBhM/TjE5VKFTUJ3EheA==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4 + postcss: ^8 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + vitepress@1.3.4: resolution: {integrity: sha512-I1/F6OW1xl3kW4PaIMC6snxjWgf3qfziq2aqsDoFc/Gt41WbcRv++z8zjw8qGRIJ+I4bUW7ZcKFDHHN/jkH9DQ==} hasBin: true @@ -12306,16 +12301,6 @@ snapshots: transitivePeerDependencies: - rollup - '@unocss/astro@0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))': - dependencies: - '@unocss/core': 0.59.4 - '@unocss/reset': 0.59.4 - '@unocss/vite': 0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) - optionalDependencies: - vite: 5.3.5(@types/node@20.14.14)(terser@5.31.3) - transitivePeerDependencies: - - rollup - '@unocss/cli@0.59.4(rollup@2.79.1)': dependencies: '@ampproject/remapping': 2.3.0 @@ -12334,24 +12319,6 @@ snapshots: transitivePeerDependencies: - rollup - '@unocss/cli@0.59.4(rollup@4.20.0)': - dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.20.0) - '@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 @@ -12477,23 +12444,7 @@ snapshots: transitivePeerDependencies: - rollup - '@unocss/vite@0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))': - dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.20.0) - '@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.3.5(@types/node@20.14.14)(terser@5.31.3) - transitivePeerDependencies: - - rollup - - '@vite-pwa/vitepress@0.4.0(vite-plugin-pwa@0.19.8(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0))': + '@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) @@ -12662,6 +12613,18 @@ snapshots: - '@vue/composition-api' - vue + '@vueuse/integrations@10.11.1(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.38(typescript@5.4.5))': + dependencies: + '@vueuse/core': 10.11.1(vue@3.4.38(typescript@5.4.5)) + '@vueuse/shared': 10.11.1(vue@3.4.38(typescript@5.4.5)) + vue-demi: 0.14.10(vue@3.4.38(typescript@5.4.5)) + optionalDependencies: + axios: 1.7.5(debug@4.3.6) + focus-trap: 7.5.4 + transitivePeerDependencies: + - '@vue/composition-api' + - vue + '@vueuse/integrations@11.0.3(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.38(typescript@5.4.5))': dependencies: '@vueuse/core': 11.0.3(vue@3.4.38(typescript@5.4.5)) @@ -13969,10 +13932,10 @@ snapshots: untildify: 4.0.0 yauzl: 2.10.0 - cytoscape-cose-bilkent@4.1.0(cytoscape@3.30.2): + cytoscape-cose-bilkent@4.1.0(cytoscape@3.30.1): dependencies: cose-base: 1.0.3 - cytoscape: 3.30.2 + cytoscape: 3.30.1 cytoscape-fcose@2.2.0(cytoscape@3.30.1): dependencies: @@ -17023,6 +16986,8 @@ snapshots: minipass@7.1.2: {} + minisearch@6.3.0: {} + minisearch@7.1.0: {} mitt@3.0.1: {} @@ -18878,35 +18843,6 @@ snapshots: - rollup - supports-color - unocss@0.59.4(postcss@8.4.40)(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)): - dependencies: - '@unocss/astro': 0.59.4(rollup@4.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) - '@unocss/cli': 0.59.4(rollup@4.20.0) - '@unocss/core': 0.59.4 - '@unocss/extractor-arbitrary-variants': 0.59.4 - '@unocss/postcss': 0.59.4(postcss@8.4.40) - '@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.20.0)(vite@5.3.5(@types/node@20.14.14)(terser@5.31.3)) - optionalDependencies: - vite: 5.3.5(@types/node@20.14.14)(terser@5.31.3) - 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)): @@ -18928,25 +18864,6 @@ snapshots: - rollup - supports-color - unplugin-vue-components@0.26.0(@babel/parser@7.25.3)(rollup@4.20.0)(vue@3.4.35(typescript@5.4.5)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.0(rollup@4.20.0) - 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.35(typescript@5.4.5) - optionalDependencies: - '@babel/parser': 7.25.3 - transitivePeerDependencies: - - rollup - - supports-color - unplugin@1.12.0: dependencies: acorn: 8.12.1 @@ -19082,6 +18999,53 @@ snapshots: vitepress: 1.3.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) vue: 3.4.38(typescript@5.4.5) + vitepress@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): + dependencies: + '@docsearch/css': 3.6.1 + '@docsearch/js': 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.15.0) + '@shikijs/core': 1.14.1 + '@shikijs/transformers': 1.14.1 + '@types/markdown-it': 14.1.2 + '@vitejs/plugin-vue': 5.1.2(vite@5.4.2(@types/node@22.5.1)(terser@5.31.6))(vue@3.4.38(typescript@5.4.5)) + '@vue/devtools-api': 7.3.9 + '@vueuse/core': 10.11.1(vue@3.4.38(typescript@5.4.5)) + '@vueuse/integrations': 10.11.1(axios@1.7.5)(focus-trap@7.5.4)(vue@3.4.38(typescript@5.4.5)) + focus-trap: 7.5.4 + mark.js: 8.11.1 + minisearch: 6.3.0 + shiki: 1.14.1 + vite: 5.4.2(@types/node@22.5.1)(terser@5.31.6) + vue: 3.4.38(typescript@5.4.5) + optionalDependencies: + postcss: 8.4.41 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' + - '@types/react' + - '@vue/composition-api' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode + - less + - lightningcss + - nprogress + - qrcode + - react + - react-dom + - sass + - sass-embedded + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - typescript + - universal-cookie + vitepress@1.3.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): dependencies: '@docsearch/css': 3.6.1 From 904410f7f78f3a27b488d3c0c106ab994a2feaaa Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 28 Aug 2024 14:26:11 +0200 Subject: [PATCH 73/73] Updated changeset for parser package from the new architecture diagram --- .changeset/nice-flowers-yawn.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/nice-flowers-yawn.md b/.changeset/nice-flowers-yawn.md index 31c0e81af..b3c00cfb4 100644 --- a/.changeset/nice-flowers-yawn.md +++ b/.changeset/nice-flowers-yawn.md @@ -1,6 +1,7 @@ --- -"mermaid": minor -"@mermaid-js/docs": patch +'mermaid': minor +'@mermaid-js/docs': patch +'@mermaid-js/parser': minor --- New Diagram: Architecture