From 77999f0b37c02def3deebcb46e94f243924c30b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Issue=E5=93=A5?= Date: Mon, 10 Apr 2023 18:24:53 +0800 Subject: [PATCH 001/316] fix: adjust piechart viewbox for mobile devices with small width --- .../mermaid/src/diagrams/pie/pieRenderer.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/mermaid/src/diagrams/pie/pieRenderer.js b/packages/mermaid/src/diagrams/pie/pieRenderer.js index 1ee34e192a..5c420d3311 100644 --- a/packages/mermaid/src/diagrams/pie/pieRenderer.js +++ b/packages/mermaid/src/diagrams/pie/pieRenderer.js @@ -6,6 +6,12 @@ import * as configApi from '../../config.js'; import { parseFontSize } from '../../utils.js'; let conf = configApi.getConfig(); +// https://stackoverflow.com/a/35373030/3469145 +const getTextWidth = (function () { + const canvas = document.createElement('canvas') + const context = canvas.getContext('2d') + return text => context.measureText(text).width * window.devicePixelRatio +})(); /** * Draws a Pie Chart with the data given in text. @@ -73,6 +79,18 @@ export const draw = (txt, id, _version, diagObj) => { sum += data[key]; }); + const legendShowData = diagObj.db.getShowData() || conf.showData || conf.pie.showData; + const legendTexts = Object.keys(data).map(key => { + if (!legendShowData) { + return key; + } + return key + ' [' + data[key] + ']'; + }) + const legendTextWidths = legendTexts.map(v => getTextWidth(v)).sort((a, b) => a - b); + const longestTextWidth = parseInt(legendTextWidths.pop()); + const newWidth = width + margin + legendRectSize + legendSpacing + longestTextWidth; + elem.setAttribute("viewBox", "0 0 " + newWidth + " " + height); + const themeVariables = conf.themeVariables; var myGeneratedColors = [ themeVariables.pie1, From f211ed686c6deb63481cf3a2a57850fa00ab4fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Issue=E5=93=A5?= Date: Tue, 27 Jun 2023 21:56:38 +0800 Subject: [PATCH 002/316] fix: apply suggested changes for PR #4288 --- packages/mermaid/src/diagrams/pie/pieRenderer.js | 14 ++++---------- .../mermaid/src/rendering-util/getTextWidth.js | 7 +++++++ 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 packages/mermaid/src/rendering-util/getTextWidth.js diff --git a/packages/mermaid/src/diagrams/pie/pieRenderer.js b/packages/mermaid/src/diagrams/pie/pieRenderer.js index 5c420d3311..06ed541749 100644 --- a/packages/mermaid/src/diagrams/pie/pieRenderer.js +++ b/packages/mermaid/src/diagrams/pie/pieRenderer.js @@ -4,14 +4,9 @@ import { log } from '../../logger.js'; import { configureSvgSize } from '../../setupGraphViewbox.js'; import * as configApi from '../../config.js'; import { parseFontSize } from '../../utils.js'; +import { getTextWidth } from '../../rendering-util/getTextWidth.js'; let conf = configApi.getConfig(); -// https://stackoverflow.com/a/35373030/3469145 -const getTextWidth = (function () { - const canvas = document.createElement('canvas') - const context = canvas.getContext('2d') - return text => context.measureText(text).width * window.devicePixelRatio -})(); /** * Draws a Pie Chart with the data given in text. @@ -79,15 +74,14 @@ export const draw = (txt, id, _version, diagObj) => { sum += data[key]; }); - const legendShowData = diagObj.db.getShowData() || conf.showData || conf.pie.showData; + const legendShowData = diagObj.db.getShowData() || conf.showData || conf.pie.showData || false; const legendTexts = Object.keys(data).map(key => { if (!legendShowData) { return key; } - return key + ' [' + data[key] + ']'; + return `${key} [${data[key]}]`; }) - const legendTextWidths = legendTexts.map(v => getTextWidth(v)).sort((a, b) => a - b); - const longestTextWidth = parseInt(legendTextWidths.pop()); + const longestTextWidth = Math.max(...(legendTexts.map(v => getTextWidth(v)))); const newWidth = width + margin + legendRectSize + legendSpacing + longestTextWidth; elem.setAttribute("viewBox", "0 0 " + newWidth + " " + height); diff --git a/packages/mermaid/src/rendering-util/getTextWidth.js b/packages/mermaid/src/rendering-util/getTextWidth.js new file mode 100644 index 0000000000..f2976a852a --- /dev/null +++ b/packages/mermaid/src/rendering-util/getTextWidth.js @@ -0,0 +1,7 @@ +// https://stackoverflow.com/a/35373030/3469145 +const canvas = document.createElement('canvas'); +const context = canvas.getContext('2d'); + +const getTextWidth = (text) => context.measureText(text).width * window.devicePixelRatio; + +export { getTextWidth }; From a2d1fb5e5468fcb5a51ba081ea90ee999889d60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Issue=E5=93=A5?= Date: Fri, 7 Jul 2023 15:42:40 +0800 Subject: [PATCH 003/316] use computeWidthOfText --- packages/mermaid/src/diagrams/pie/pieRenderer.js | 10 ++++++---- packages/mermaid/src/rendering-util/createText.js | 2 +- packages/mermaid/src/rendering-util/getTextWidth.js | 7 ------- 3 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 packages/mermaid/src/rendering-util/getTextWidth.js diff --git a/packages/mermaid/src/diagrams/pie/pieRenderer.js b/packages/mermaid/src/diagrams/pie/pieRenderer.js index 06ed541749..0a36af3c57 100644 --- a/packages/mermaid/src/diagrams/pie/pieRenderer.js +++ b/packages/mermaid/src/diagrams/pie/pieRenderer.js @@ -4,7 +4,7 @@ import { log } from '../../logger.js'; import { configureSvgSize } from '../../setupGraphViewbox.js'; import * as configApi from '../../config.js'; import { parseFontSize } from '../../utils.js'; -import { getTextWidth } from '../../rendering-util/getTextWidth.js'; +import { computeWidthOfText } from '../../rendering-util/createText.js'; let conf = configApi.getConfig(); @@ -74,16 +74,18 @@ export const draw = (txt, id, _version, diagObj) => { sum += data[key]; }); - const legendShowData = diagObj.db.getShowData() || conf.showData || conf.pie.showData || false; + const legendShowData = diagObj.db.getShowData(); const legendTexts = Object.keys(data).map(key => { if (!legendShowData) { return key; } return `${key} [${data[key]}]`; }) - const longestTextWidth = Math.max(...(legendTexts.map(v => getTextWidth(v)))); + const longestTextWidth = Math.max(...(legendTexts.map(text => { + return computeWidthOfText(svg, 1, text) + }))); const newWidth = width + margin + legendRectSize + legendSpacing + longestTextWidth; - elem.setAttribute("viewBox", "0 0 " + newWidth + " " + height); + elem.setAttribute("viewBox", `0 0 ${newWidth} ${height}`); const themeVariables = conf.themeVariables; var myGeneratedColors = [ diff --git a/packages/mermaid/src/rendering-util/createText.js b/packages/mermaid/src/rendering-util/createText.js index 871f3425e2..25a7b0c1a5 100644 --- a/packages/mermaid/src/rendering-util/createText.js +++ b/packages/mermaid/src/rendering-util/createText.js @@ -85,7 +85,7 @@ function createTspan(textElement, lineIndex, lineHeight) { * @param {string} text * @returns {number} */ -function computeWidthOfText(parentNode, lineHeight, text) { +export function computeWidthOfText(parentNode, lineHeight, text) { const testElement = parentNode.append('text'); const testSpan = createTspan(testElement, 1, lineHeight); updateTextContentAndStyles(testSpan, [{ content: text, type: 'normal' }]); diff --git a/packages/mermaid/src/rendering-util/getTextWidth.js b/packages/mermaid/src/rendering-util/getTextWidth.js deleted file mode 100644 index f2976a852a..0000000000 --- a/packages/mermaid/src/rendering-util/getTextWidth.js +++ /dev/null @@ -1,7 +0,0 @@ -// https://stackoverflow.com/a/35373030/3469145 -const canvas = document.createElement('canvas'); -const context = canvas.getContext('2d'); - -const getTextWidth = (text) => context.measureText(text).width * window.devicePixelRatio; - -export { getTextWidth }; From 29e5e664816f47feccab11cf9cf841afc61e5a0a Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 14 Sep 2023 15:20:21 +0530 Subject: [PATCH 004/316] refactor: Unify the edgeMarker adding logic --- .../src/dagre-wrapper/edgeMarker.spec.ts | 67 +++++++++++ .../mermaid/src/dagre-wrapper/edgeMarker.ts | 41 +++++++ packages/mermaid/src/dagre-wrapper/edges.js | 106 +----------------- .../flowchart/elk/flowRenderer-elk.js | 105 +---------------- 4 files changed, 115 insertions(+), 204 deletions(-) create mode 100644 packages/mermaid/src/dagre-wrapper/edgeMarker.spec.ts create mode 100644 packages/mermaid/src/dagre-wrapper/edgeMarker.ts diff --git a/packages/mermaid/src/dagre-wrapper/edgeMarker.spec.ts b/packages/mermaid/src/dagre-wrapper/edgeMarker.spec.ts new file mode 100644 index 0000000000..7a19c29518 --- /dev/null +++ b/packages/mermaid/src/dagre-wrapper/edgeMarker.spec.ts @@ -0,0 +1,67 @@ +import type { SVG } from '../diagram-api/types.js'; +import { addEdgeMarkers } from './edgeMarker.js'; + +describe('addEdgeMarker', () => { + const svgPath = { + attr: vitest.fn(), + } as unknown as SVG; + const url = 'http://example.com'; + const id = 'test'; + const diagramType = 'test'; + + it('should add markers for arrow_cross:arrow_point', () => { + const arrowTypeStart = 'arrow_cross'; + const arrowTypeEnd = 'arrow_point'; + addEdgeMarkers(svgPath, { arrowTypeStart, arrowTypeEnd }, url, id, diagramType); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-start', + `url(${url}#${id}_${diagramType}-crossStart)` + ); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-end', + `url(${url}#${id}_${diagramType}-pointEnd)` + ); + }); + + it('should add markers for aggregation:arrow_point', () => { + const arrowTypeStart = 'aggregation'; + const arrowTypeEnd = 'arrow_point'; + addEdgeMarkers(svgPath, { arrowTypeStart, arrowTypeEnd }, url, id, diagramType); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-start', + `url(${url}#${id}_${diagramType}-aggregationStart)` + ); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-end', + `url(${url}#${id}_${diagramType}-pointEnd)` + ); + }); + + it('should add markers for arrow_point:aggregation', () => { + const arrowTypeStart = 'arrow_point'; + const arrowTypeEnd = 'aggregation'; + addEdgeMarkers(svgPath, { arrowTypeStart, arrowTypeEnd }, url, id, diagramType); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-start', + `url(${url}#${id}_${diagramType}-pointStart)` + ); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-end', + `url(${url}#${id}_${diagramType}-aggregationEnd)` + ); + }); + + it('should add markers for aggregation:composition', () => { + const arrowTypeStart = 'aggregation'; + const arrowTypeEnd = 'composition'; + addEdgeMarkers(svgPath, { arrowTypeStart, arrowTypeEnd }, url, id, diagramType); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-start', + `url(${url}#${id}_${diagramType}-aggregationStart)` + ); + expect(svgPath.attr).toHaveBeenCalledWith( + 'marker-end', + `url(${url}#${id}_${diagramType}-compositionEnd)` + ); + }); +}); diff --git a/packages/mermaid/src/dagre-wrapper/edgeMarker.ts b/packages/mermaid/src/dagre-wrapper/edgeMarker.ts new file mode 100644 index 0000000000..afce245d53 --- /dev/null +++ b/packages/mermaid/src/dagre-wrapper/edgeMarker.ts @@ -0,0 +1,41 @@ +import type { SVG } from '../diagram-api/types.js'; +import type { EdgeData } from '../types.js'; +/** + * Adds SVG markers to a path element based on the arrow types specified in the edge. + * + * @param svgPath - The SVG path element to add markers to. + * @param edge - The edge data object containing the arrow types. + * @param url - The URL of the SVG marker definitions. + * @param id - The ID prefix for the SVG marker definitions. + * @param diagramType - The type of diagram being rendered. + */ +export const addEdgeMarkers = ( + svgPath: SVG, + edge: Pick, + url: string, + id: string, + diagramType: string +) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType); + } +}; + +const addEdgeMarker = ( + svgPath: SVG, + position: 'start' | 'end', + arrowType: string, + url: string, + id: string, + diagramType: string +) => { + if (arrowType.startsWith('arrow_')) { + arrowType = arrowType.replace('arrow_', ''); + } + + const suffix = position === 'start' ? 'Start' : 'End'; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${arrowType}${suffix})`); +}; diff --git a/packages/mermaid/src/dagre-wrapper/edges.js b/packages/mermaid/src/dagre-wrapper/edges.js index 1b3e172c01..8ef30a5ada 100644 --- a/packages/mermaid/src/dagre-wrapper/edges.js +++ b/packages/mermaid/src/dagre-wrapper/edges.js @@ -6,6 +6,7 @@ import { getConfig } from '../config.js'; import utils from '../utils.js'; import { evaluate } from '../diagrams/common/common.js'; import { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js'; +import { addEdgeMarker } from './edgeMarker.js'; let edgeLabels = {}; let terminalLabels = {}; @@ -506,108 +507,9 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph log.info('arrowTypeStart', edge.arrowTypeStart); log.info('arrowTypeEnd', edge.arrowTypeEnd); - switch (edge.arrowTypeStart) { - case 'arrow_cross': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-crossStart' + ')' - ); - break; - case 'arrow_point': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-pointStart' + ')' - ); - break; - case 'arrow_barb': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-barbStart' + ')' - ); - break; - case 'arrow_circle': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-circleStart' + ')' - ); - break; - case 'aggregation': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-aggregationStart' + ')' - ); - break; - case 'extension': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-extensionStart' + ')' - ); - break; - case 'composition': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-compositionStart' + ')' - ); - break; - case 'dependency': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-dependencyStart' + ')' - ); - break; - case 'lollipop': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-lollipopStart' + ')' - ); - break; - default: - } - switch (edge.arrowTypeEnd) { - case 'arrow_cross': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-crossEnd' + ')'); - break; - case 'arrow_point': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-pointEnd' + ')'); - break; - case 'arrow_barb': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-barbEnd' + ')'); - break; - case 'arrow_circle': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-circleEnd' + ')'); - break; - case 'aggregation': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-aggregationEnd' + ')' - ); - break; - case 'extension': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-extensionEnd' + ')' - ); - break; - case 'composition': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-compositionEnd' + ')' - ); - break; - case 'dependency': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-dependencyEnd' + ')' - ); - break; - case 'lollipop': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-lollipopEnd' + ')' - ); - break; - default: - } + addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType); + addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType); + let paths = {}; if (pointsHasChanged) { paths.updatedPath = points; diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js index 737b492fb3..56fad15492 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js +++ b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js @@ -11,6 +11,7 @@ import common from '../../common/common.js'; import { interpolateToCurve, getStylesFromArray } from '../../../utils.js'; import ELK from 'elkjs/lib/elk.bundled.js'; import { getLineFunctionsWithOffset } from '../../../utils/lineWithOffset.js'; +import { addEdgeMarker } from '../../../dagre-wrapper/edgeMarker.js'; const elk = new ELK(); @@ -586,108 +587,8 @@ const addMarkersToEdge = function (svgPath, edgeData, diagramType, arrowMarkerAb } // look in edge data and decide which marker to use - switch (edgeData.arrowTypeStart) { - case 'arrow_cross': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-crossStart' + ')' - ); - break; - case 'arrow_point': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-pointStart' + ')' - ); - break; - case 'arrow_barb': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-barbStart' + ')' - ); - break; - case 'arrow_circle': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-circleStart' + ')' - ); - break; - case 'aggregation': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-aggregationStart' + ')' - ); - break; - case 'extension': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-extensionStart' + ')' - ); - break; - case 'composition': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-compositionStart' + ')' - ); - break; - case 'dependency': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-dependencyStart' + ')' - ); - break; - case 'lollipop': - svgPath.attr( - 'marker-start', - 'url(' + url + '#' + id + '_' + diagramType + '-lollipopStart' + ')' - ); - break; - default: - } - switch (edgeData.arrowTypeEnd) { - case 'arrow_cross': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-crossEnd' + ')'); - break; - case 'arrow_point': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-pointEnd' + ')'); - break; - case 'arrow_barb': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-barbEnd' + ')'); - break; - case 'arrow_circle': - svgPath.attr('marker-end', 'url(' + url + '#' + id + '_' + diagramType + '-circleEnd' + ')'); - break; - case 'aggregation': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-aggregationEnd' + ')' - ); - break; - case 'extension': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-extensionEnd' + ')' - ); - break; - case 'composition': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-compositionEnd' + ')' - ); - break; - case 'dependency': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-dependencyEnd' + ')' - ); - break; - case 'lollipop': - svgPath.attr( - 'marker-end', - 'url(' + url + '#' + id + '_' + diagramType + '-lollipopEnd' + ')' - ); - break; - default: - } + addEdgeMarker(svgPath, 'start', edgeData.arrowTypeStart, url, id, diagramType); + addEdgeMarker(svgPath, 'end', edgeData.arrowTypeEnd, url, id, diagramType); }; /** From faa1fda7ba13f8571348f5bb60c812e3cda89f48 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 14 Sep 2023 15:25:52 +0530 Subject: [PATCH 005/316] refactor: Unify the edgeMarker adding logic --- packages/mermaid/src/dagre-wrapper/edges.js | 5 ++--- .../mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/dagre-wrapper/edges.js b/packages/mermaid/src/dagre-wrapper/edges.js index 8ef30a5ada..3f4412fb73 100644 --- a/packages/mermaid/src/dagre-wrapper/edges.js +++ b/packages/mermaid/src/dagre-wrapper/edges.js @@ -6,7 +6,7 @@ import { getConfig } from '../config.js'; import utils from '../utils.js'; import { evaluate } from '../diagrams/common/common.js'; import { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js'; -import { addEdgeMarker } from './edgeMarker.js'; +import { addEdgeMarkers } from './edgeMarker.js'; let edgeLabels = {}; let terminalLabels = {}; @@ -507,8 +507,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph log.info('arrowTypeStart', edge.arrowTypeStart); log.info('arrowTypeEnd', edge.arrowTypeEnd); - addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType); - addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType); + addEdgeMarkers(svgPath, edge, url, id, diagramType); let paths = {}; if (pointsHasChanged) { diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js index 56fad15492..844264a5fc 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js +++ b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js @@ -11,7 +11,7 @@ import common from '../../common/common.js'; import { interpolateToCurve, getStylesFromArray } from '../../../utils.js'; import ELK from 'elkjs/lib/elk.bundled.js'; import { getLineFunctionsWithOffset } from '../../../utils/lineWithOffset.js'; -import { addEdgeMarker } from '../../../dagre-wrapper/edgeMarker.js'; +import { addEdgeMarkers } from '../../../dagre-wrapper/edgeMarker.js'; const elk = new ELK(); @@ -587,8 +587,7 @@ const addMarkersToEdge = function (svgPath, edgeData, diagramType, arrowMarkerAb } // look in edge data and decide which marker to use - addEdgeMarker(svgPath, 'start', edgeData.arrowTypeStart, url, id, diagramType); - addEdgeMarker(svgPath, 'end', edgeData.arrowTypeEnd, url, id, diagramType); + addEdgeMarkers(svgPath, edgeData, url, id, diagramType); }; /** From 41c7b08c9959f701f8f8d0570dd7c7eef51faac3 Mon Sep 17 00:00:00 2001 From: Martin Pedersen Date: Thu, 5 Oct 2023 16:52:15 +0200 Subject: [PATCH 006/316] prevent-inherited-lineheights-on-edgeterminal-4083 --- packages/mermaid/src/diagrams/class/styles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mermaid/src/diagrams/class/styles.js b/packages/mermaid/src/diagrams/class/styles.js index f12f609f91..a81aa03a82 100644 --- a/packages/mermaid/src/diagrams/class/styles.js +++ b/packages/mermaid/src/diagrams/class/styles.js @@ -146,6 +146,7 @@ g.classGroup line { .edgeTerminals { font-size: 11px; + line-height: initial; } .classTitleText { From 13d85b6ee5d3569b4e2d675c04ba7d7e8c4a8543 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Thu, 12 Oct 2023 02:35:43 +0530 Subject: [PATCH 007/316] Parser and Logic For Parent Commit Added --- .../mermaid/src/diagrams/git/gitGraphAst.js | 46 +++++++++++++------ .../src/diagrams/git/parser/gitGraph.jison | 10 +++- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index abad68b22b..15e8a3e381 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -256,7 +256,7 @@ export const merge = function (otherBranch, custom_id, override_type, custom_tag log.debug('in mergeBranch'); }; -export const cherryPick = function (sourceId, targetId, tag) { +export const cherryPick = function (sourceId, targetId, tag, parentCommit) { log.debug('Entering cherryPick:', sourceId, targetId, tag); sourceId = common.sanitizeText(sourceId, configApi.getConfig()); targetId = common.sanitizeText(targetId, configApi.getConfig()); @@ -275,21 +275,35 @@ export const cherryPick = function (sourceId, targetId, tag) { }; throw error; } - let sourceCommit = commits[sourceId]; let sourceCommitBranch = sourceCommit.branch; if (sourceCommit.type === commitType.MERGE) { - let error = new Error( - 'Incorrect usage of "cherryPick". Source commit should not be a merge commit' - ); - error.hash = { - text: 'cherryPick ' + sourceId + ' ' + targetId, - token: 'cherryPick ' + sourceId + ' ' + targetId, - line: '1', - loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['cherry-pick abc'], - }; - throw error; + if (!parentCommit) { + let error = new Error( + 'Incorrect usage of cherryPick: If the source commit is a merge commit, an immediate parent commit must be specified.' + ); + error.hash = { + text: 'cherryPick ' + sourceId + ' ' + targetId, + token: 'cherryPick ' + sourceId + ' ' + targetId, + line: '1', + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['cherry-pick abc'], + }; + throw error; + } + if (!(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommit))) { + let error = new Error( + 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.' + ); + error.hash = { + text: 'cherryPick ' + sourceId + ' ' + targetId, + token: 'cherryPick ' + sourceId + ' ' + targetId, + line: '1', + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['cherry-pick abc'], + }; + throw error; + } } if (!targetId || commits[targetId] === undefined) { // cherry-pick source commit to current branch @@ -328,7 +342,11 @@ export const cherryPick = function (sourceId, targetId, tag) { parents: [head == null ? null : head.id, sourceCommit.id], branch: curBranch, type: commitType.CHERRY_PICK, - tag: tag ?? 'cherry-pick:' + sourceCommit.id, + tag: tag + ? `${tag}${sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommit}` : ''}` + : `cherry-pick: ${sourceCommit.id}${ + sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommit}` : '' + }`, }; head = commit; commits[commit.id] = commit; diff --git a/packages/mermaid/src/diagrams/git/parser/gitGraph.jison b/packages/mermaid/src/diagrams/git/parser/gitGraph.jison index 2297db17cd..1e4ca026ed 100644 --- a/packages/mermaid/src/diagrams/git/parser/gitGraph.jison +++ b/packages/mermaid/src/diagrams/git/parser/gitGraph.jison @@ -39,6 +39,7 @@ branch(?=\s|$) return 'BRANCH'; "order:" return 'ORDER'; merge(?=\s|$) return 'MERGE'; cherry\-pick(?=\s|$) return 'CHERRY_PICK'; +"parent:" return 'PARENT_COMMIT' // "reset" return 'RESET'; checkout(?=\s|$) return 'CHECKOUT'; "LR" return 'DIR'; @@ -109,10 +110,15 @@ branchStatement cherryPickStatement : CHERRY_PICK COMMIT_ID STR {yy.cherryPick($3, '', undefined)} + | CHERRY_PICK COMMIT_ID STR PARENT_COMMIT STR {yy.cherryPick($3, '', undefined,$5)} | CHERRY_PICK COMMIT_ID STR COMMIT_TAG STR {yy.cherryPick($3, '', $5)} + | CHERRY_PICK COMMIT_ID STR PARENT_COMMIT STR COMMIT_TAG STR {yy.cherryPick($3, '', $7,$5)} + | CHERRY_PICK COMMIT_ID STR COMMIT_TAG STR PARENT_COMMIT STR {yy.cherryPick($3, '', $5,$7)} | CHERRY_PICK COMMIT_ID STR COMMIT_TAG EMPTYSTR {yy.cherryPick($3, '', '')} - | CHERRY_PICK COMMIT_TAG STR COMMIT_ID STR {yy.cherryPick($5, '', $3)} - | CHERRY_PICK COMMIT_TAG EMPTYSTR COMMIT_ID STR {yy.cherryPick($3, '', '')} + | CHERRY_PICK COMMIT_ID STR PARENT_COMMIT STR COMMIT_TAG EMPTYSTR {yy.cherryPick($3, '', '',$5)} + | CHERRY_PICK COMMIT_ID STR COMMIT_TAG EMPTYSTR PARENT_COMMIT STR {yy.cherryPick($3, '', '',$7)} + | CHERRY_PICK COMMIT_TAG STR COMMIT_ID STR PARENT_COMMIT STR {yy.cherryPick($5, '', $3,$7)} + | CHERRY_PICK COMMIT_TAG EMPTYSTR COMMIT_ID STR PARENT_COMMIT STR{yy.cherryPick($5, '', '',$7)} ; mergeStatement From b4f444869e6b3f996e5f1d58d83a6c94f6caff0d Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Thu, 12 Oct 2023 16:39:31 +0300 Subject: [PATCH 008/316] fix: add imperativeState and replace sequenceDb global variables with it --- .npmrc | 1 + .../src/diagrams/sequence/sequenceDb.js | 158 +++++++++--------- .../mermaid/src/utils/imperativeState.spec.ts | 78 +++++++++ packages/mermaid/src/utils/imperativeState.ts | 37 ++++ 4 files changed, 198 insertions(+), 76 deletions(-) create mode 100644 packages/mermaid/src/utils/imperativeState.spec.ts create mode 100644 packages/mermaid/src/utils/imperativeState.ts diff --git a/.npmrc b/.npmrc index 4c2f52b3be..e72930ead1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ +registry=https://registry.npmjs.org auto-install-peers=true strict-peer-dependencies=false diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDb.js b/packages/mermaid/src/diagrams/sequence/sequenceDb.js index 6c3f1f64df..dbe8fdde5a 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDb.js +++ b/packages/mermaid/src/diagrams/sequence/sequenceDb.js @@ -2,57 +2,60 @@ import * as configApi from '../../config.js'; import { log } from '../../logger.js'; import { sanitizeText } from '../common/common.js'; import { - setAccTitle, + clear as commonClear, + getAccDescription, getAccTitle, - setDiagramTitle, getDiagramTitle, - getAccDescription, setAccDescription, - clear as commonClear, + setAccTitle, + setDiagramTitle, } from '../common/commonDb.js'; - -let prevActor = undefined; -let actors = {}; -let createdActors = {}; -let destroyedActors = {}; -let boxes = []; -let messages = []; -const notes = []; -let sequenceNumbersEnabled = false; -let wrapEnabled; -let currentBox = undefined; -let lastCreated = undefined; -let lastDestroyed = undefined; +import { createImperativeState } from '../../utils/imperativeState.js'; + +const state = createImperativeState(() => ({ + prevActor: undefined, + actors: {}, + createdActors: {}, + destroyedActors: {}, + boxes: [], + messages: [], + notes: [], + sequenceNumbersEnabled: false, + wrapEnabled: undefined, + currentBox: undefined, + lastCreated: undefined, + lastDestroyed: undefined, +})); export const addBox = function (data) { - boxes.push({ + state.records.boxes.push({ name: data.text, wrap: (data.wrap === undefined && autoWrap()) || !!data.wrap, fill: data.color, actorKeys: [], }); - currentBox = boxes.slice(-1)[0]; + state.records.currentBox = state.records.boxes.slice(-1)[0]; }; export const addActor = function (id, name, description, type) { - let assignedBox = currentBox; - const old = actors[id]; + let assignedBox = state.records.currentBox; + const old = state.records.actors[id]; if (old) { // If already set and trying to set to a new one throw error - if (currentBox && old.box && currentBox !== old.box) { + if (state.records.currentBox && old.box && state.records.currentBox !== old.box) { throw new Error( 'A same participant should only be defined in one Box: ' + old.name + " can't be in '" + old.box.name + "' and in '" + - currentBox.name + + state.records.currentBox.name + "' at the same time." ); } // Don't change the box if already - assignedBox = old.box ? old.box : currentBox; + assignedBox = old.box ? old.box : state.records.currentBox; old.box = assignedBox; // Don't allow description nulling @@ -69,36 +72,42 @@ export const addActor = function (id, name, description, type) { description = { text: name, wrap: null, type }; } - actors[id] = { + state.records.actors[id] = { box: assignedBox, name: name, description: description.text, wrap: (description.wrap === undefined && autoWrap()) || !!description.wrap, - prevActor: prevActor, + prevActor: state.records.prevActor, links: {}, properties: {}, actorCnt: null, rectData: null, type: type || 'participant', }; - if (prevActor && actors[prevActor]) { - actors[prevActor].nextActor = id; + if (state.records.prevActor && state.records.actors[state.records.prevActor]) { + state.records.actors[state.records.prevActor].nextActor = id; } - if (currentBox) { - currentBox.actorKeys.push(id); + if (state.records.currentBox) { + state.records.currentBox.actorKeys.push(id); } - prevActor = id; + state.records.prevActor = id; }; const activationCount = (part) => { let i; let count = 0; - for (i = 0; i < messages.length; i++) { - if (messages[i].type === LINETYPE.ACTIVE_START && messages[i].from.actor === part) { + for (i = 0; i < state.records.messages.length; i++) { + if ( + state.records.messages[i].type === LINETYPE.ACTIVE_START && + state.records.messages[i].from.actor === part + ) { count++; } - if (messages[i].type === LINETYPE.ACTIVE_END && messages[i].from.actor === part) { + if ( + state.records.messages[i].type === LINETYPE.ACTIVE_END && + state.records.messages[i].from.actor === part + ) { count--; } } @@ -106,7 +115,7 @@ const activationCount = (part) => { }; export const addMessage = function (idFrom, idTo, message, answer) { - messages.push({ + state.records.messages.push({ from: idFrom, to: idTo, message: message.text, @@ -137,7 +146,7 @@ export const addSignal = function ( throw error; } } - messages.push({ + state.records.messages.push({ from: idFrom, to: idTo, message: message.text, @@ -149,63 +158,58 @@ export const addSignal = function ( }; export const hasAtLeastOneBox = function () { - return boxes.length > 0; + return state.records.boxes.length > 0; }; export const hasAtLeastOneBoxWithTitle = function () { - return boxes.some((b) => b.name); + return state.records.boxes.some((b) => b.name); }; export const getMessages = function () { - return messages; + return state.records.messages; }; export const getBoxes = function () { - return boxes; + return state.records.boxes; }; export const getActors = function () { - return actors; + return state.records.actors; }; export const getCreatedActors = function () { - return createdActors; + return state.records.createdActors; }; export const getDestroyedActors = function () { - return destroyedActors; + return state.records.destroyedActors; }; export const getActor = function (id) { - return actors[id]; + return state.records.actors[id]; }; export const getActorKeys = function () { - return Object.keys(actors); + return Object.keys(state.records.actors); }; export const enableSequenceNumbers = function () { - sequenceNumbersEnabled = true; + state.records.sequenceNumbersEnabled = true; }; export const disableSequenceNumbers = function () { - sequenceNumbersEnabled = false; + state.records.sequenceNumbersEnabled = false; }; -export const showSequenceNumbers = () => sequenceNumbersEnabled; +export const showSequenceNumbers = () => state.records.sequenceNumbersEnabled; export const setWrap = function (wrapSetting) { - wrapEnabled = wrapSetting; + state.records.wrapEnabled = wrapSetting; }; export const autoWrap = () => { // if setWrap has been called, use that value, otherwise use the value from the config // TODO: refactor, always use the config value let setWrap update the config value - if (wrapEnabled !== undefined) { - return wrapEnabled; + if (state.records.wrapEnabled !== undefined) { + return state.records.wrapEnabled; } return configApi.getConfig().sequence.wrap; }; export const clear = function () { - actors = {}; - createdActors = {}; - destroyedActors = {}; - boxes = []; - messages = []; - sequenceNumbersEnabled = false; + state.reset(); commonClear(); }; @@ -247,7 +251,7 @@ export const parseBoxData = function (str) { } } - const boxData = { + return { color: color, text: title !== undefined @@ -262,7 +266,6 @@ export const parseBoxData = function (str) { : undefined : undefined, }; - return boxData; }; export const LINETYPE = { @@ -321,8 +324,8 @@ export const addNote = function (actor, placement, message) { // eslint-disable-next-line unicorn/prefer-spread const actors = [].concat(actor, actor); - notes.push(note); - messages.push({ + state.records.notes.push(note); + state.records.messages.push({ from: actors[0], to: actors[1], message: message.text, @@ -414,7 +417,7 @@ function insertProperties(actor, properties) { * */ function boxEnd() { - currentBox = undefined; + state.records.currentBox = undefined; } export const addDetails = function (actorId, text) { @@ -468,7 +471,7 @@ export const apply = function (param) { } else { switch (param.type) { case 'sequenceIndex': - messages.push({ + state.records.messages.push({ from: undefined, to: undefined, message: { @@ -484,18 +487,18 @@ export const apply = function (param) { addActor(param.actor, param.actor, param.description, param.draw); break; case 'createParticipant': - if (actors[param.actor]) { + if (state.records.actors[param.actor]) { throw new Error( "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" ); } - lastCreated = param.actor; + state.records.lastCreated = param.actor; addActor(param.actor, param.actor, param.description, param.draw); - createdActors[param.actor] = messages.length; + state.records.createdActors[param.actor] = state.records.messages.length; break; case 'destroyParticipant': - lastDestroyed = param.actor; - destroyedActors[param.actor] = messages.length; + state.records.lastDestroyed = param.actor; + state.records.destroyedActors[param.actor] = state.records.messages.length; break; case 'activeStart': addSignal(param.actor, undefined, undefined, param.signalType); @@ -519,25 +522,28 @@ export const apply = function (param) { addDetails(param.actor, param.text); break; case 'addMessage': - if (lastCreated) { - if (param.to !== lastCreated) { + if (state.records.lastCreated) { + if (param.to !== state.records.lastCreated) { throw new Error( 'The created participant ' + - lastCreated + + state.records.lastCreated + ' does not have an associated creating message after its declaration. Please check the sequence diagram.' ); } else { - lastCreated = undefined; + state.records.lastCreated = undefined; } - } else if (lastDestroyed) { - if (param.to !== lastDestroyed && param.from !== lastDestroyed) { + } else if (state.records.lastDestroyed) { + if ( + param.to !== state.records.lastDestroyed && + param.from !== state.records.lastDestroyed + ) { throw new Error( 'The destroyed participant ' + - lastDestroyed + + state.records.lastDestroyed + ' does not have an associated destroying message after its declaration. Please check the sequence diagram.' ); } else { - lastDestroyed = undefined; + state.records.lastDestroyed = undefined; } } addSignal(param.from, param.to, param.msg, param.signalType, param.activate); diff --git a/packages/mermaid/src/utils/imperativeState.spec.ts b/packages/mermaid/src/utils/imperativeState.spec.ts new file mode 100644 index 0000000000..e78a7d4955 --- /dev/null +++ b/packages/mermaid/src/utils/imperativeState.spec.ts @@ -0,0 +1,78 @@ +import { createImperativeState, domain } from './imperativeState.js'; + +describe('domain.optional', () => { + it('should set undefined without args', () => { + expect(domain.optional()).toBeUndefined(); + }); + + it('should set identity with args', () => { + const value = {}; + expect(domain.optional(value)).toEqual(value); + }); +}); + +describe('domain.identity', () => { + it('should set identity', () => { + const value = {}; + expect(domain.identity(value)).toEqual(value); + }); +}); + +describe('createImperativeState', () => { + it('should create state with values from initializer', () => { + const baz = { + flag: false, + }; + + const state = createImperativeState(() => ({ + foo: domain.optional(), + bar: domain.identity([]), + baz, + })); + + expect(state.records.foo).toBeUndefined(); + expect(state.records.bar).toEqual([]); + expect(state.records.baz).toBe(baz); + }); + + it('should update records', () => { + const state = createImperativeState(() => ({ + foo: domain.optional(), + bar: domain.identity([]), + baz: { + flag: false, + }, + })); + + state.records.foo = 5; + state.records.bar = ['hello']; + state.records.baz.flag = true; + + expect(state.records.foo).toEqual(5); + expect(state.records.bar).toEqual(['hello']); + expect(state.records.baz).toEqual({ + flag: true, + }); + }); + + it('should reset records', () => { + const state = createImperativeState(() => ({ + foo: domain.optional(), + bar: domain.identity([]), + baz: { + flag: false, + }, + })); + + state.records.foo = 5; + state.records.bar = ['hello']; + state.records.baz.flag = true; + state.reset(); + + expect(state.records.foo).toBeUndefined(); + expect(state.records.bar).toEqual([]); + expect(state.records.baz).toEqual({ + flag: false, + }); + }); +}); diff --git a/packages/mermaid/src/utils/imperativeState.ts b/packages/mermaid/src/utils/imperativeState.ts new file mode 100644 index 0000000000..bc63844b1a --- /dev/null +++ b/packages/mermaid/src/utils/imperativeState.ts @@ -0,0 +1,37 @@ +export const createImperativeState = >(init: () => S) => { + const state = init(); + + return { + get records() { + return state; + }, + reset: () => { + Object.keys(state).forEach((key) => { + delete state[key]; + }); + Object.entries(init()).forEach(([key, value]: [keyof S, any]) => { + state[key] = value; + }); + }, + }; +}; + +export const domain = { + optional: (value?: V) => value, + identity: (value: V) => value, +} as const; + +/* +const state = createImperativeState(() => ({ + foo: domain.optional(), + bar: domain.identity([]), + baz: domain.optional(1), +})); + +typeof state.records: +{ + foo: string | undefined, // actual: undefined + bar: number[], // actual: [] + baz: number | undefined, // actual: 1 +} +*/ From 18ea27ac58afb342a78167fd59bae1db97a80f09 Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Fri, 13 Oct 2023 00:02:46 +0300 Subject: [PATCH 009/316] chore: add e2e test that shows db cleanup problem --- cypress/helpers/util.ts | 6 ++-- .../rendering/sequencediagram.spec.js | 28 +++++++++++++++++ .../platform/render-diagram-after-error.html | 31 +++++++++++++++++++ 3 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 cypress/platform/render-diagram-after-error.html diff --git a/cypress/helpers/util.ts b/cypress/helpers/util.ts index c656f638da..aed5d7973c 100644 --- a/cypress/helpers/util.ts +++ b/cypress/helpers/util.ts @@ -10,7 +10,7 @@ interface CypressConfig { type CypressMermaidConfig = MermaidConfig & CypressConfig; interface CodeObject { - code: string; + code: string | string[]; mermaid: CypressMermaidConfig; } @@ -25,7 +25,7 @@ const batchId: string = : Cypress.env('CYPRESS_COMMIT') || Date.now().toString()); export const mermaidUrl = ( - graphStr: string, + graphStr: string | string[], options: CypressMermaidConfig, api: boolean ): string => { @@ -82,7 +82,7 @@ export const urlSnapshotTest = ( }; export const renderGraph = ( - graphStr: string, + graphStr: string | string[], options: CypressMermaidConfig = {}, api = false ): void => { diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index 7659138241..ca53986e80 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -930,4 +930,32 @@ context('Sequence diagram', () => { }); }); }); + context('db clear', () => { + it('should render diagram after fixing destroy participant error', () => { + renderGraph([ + `sequenceDiagram + Alice->>Bob: Hello Bob, how are you ? + Bob->>Alice: Fine, thank you. And you? + create participant Carl + Alice->>Carl: Hi Carl! + create actor D as Donald + Carl->>D: Hi! + destroy Carl + Alice-xCarl: We are too many + destroy Bo + Bob->>Alice: I agree`, + `sequenceDiagram + Alice->>Bob: Hello Bob, how are you ? + Bob->>Alice: Fine, thank you. And you? + create participant Carl + Alice->>Carl: Hi Carl! + create actor D as Donald + Carl->>D: Hi! + destroy Carl + Alice-xCarl: We are too many + destroy Bob + Bob->>Alice: I agree`, + ]); + }); + }); }); diff --git a/cypress/platform/render-diagram-after-error.html b/cypress/platform/render-diagram-after-error.html new file mode 100644 index 0000000000..0adbba0526 --- /dev/null +++ b/cypress/platform/render-diagram-after-error.html @@ -0,0 +1,31 @@ + + + + + + Mermaid Quick Test Page + + + +
+ + + + From 985eda2deeb180972f2b25ff20c53156c1eccb4b Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Fri, 13 Oct 2023 00:43:48 +0300 Subject: [PATCH 010/316] chore: add e2e test that shows db cleanup problem --- cypress/integration/rendering/sequencediagram.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index ca53986e80..fa1db3ab23 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -932,6 +932,10 @@ context('Sequence diagram', () => { }); context('db clear', () => { it('should render diagram after fixing destroy participant error', () => { + cy.on('uncaught:exception', (err) => { + return false; + }); + renderGraph([ `sequenceDiagram Alice->>Bob: Hello Bob, how are you ? From 6eae46b927e1568a072b14eb1da0202c465db661 Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Fri, 13 Oct 2023 00:48:05 +0300 Subject: [PATCH 011/316] chore: remove unused e2e tests file --- .../platform/render-diagram-after-error.html | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 cypress/platform/render-diagram-after-error.html diff --git a/cypress/platform/render-diagram-after-error.html b/cypress/platform/render-diagram-after-error.html deleted file mode 100644 index 0adbba0526..0000000000 --- a/cypress/platform/render-diagram-after-error.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Mermaid Quick Test Page - - - -
- - - - From fc0ade29851bf403fcc1740d6d0bc91933d375a7 Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Fri, 13 Oct 2023 12:07:36 +0300 Subject: [PATCH 012/316] chore(sequence): update doc for actors/participant creation/deletion fix --- cypress/integration/rendering/sequencediagram.spec.js | 2 +- docs/syntax/sequenceDiagram.md | 8 ++++++++ packages/mermaid/src/docs/syntax/sequenceDiagram.md | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index fa1db3ab23..27e03da9c0 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -930,7 +930,7 @@ context('Sequence diagram', () => { }); }); }); - context('db clear', () => { + context('render after error', () => { it('should render diagram after fixing destroy participant error', () => { cy.on('uncaught:exception', (err) => { return false; diff --git a/docs/syntax/sequenceDiagram.md b/docs/syntax/sequenceDiagram.md index fbfa59d139..1172e2994b 100644 --- a/docs/syntax/sequenceDiagram.md +++ b/docs/syntax/sequenceDiagram.md @@ -131,6 +131,14 @@ sequenceDiagram Bob->>Alice: I agree ``` +#### Unfixable actor/participant creation/deletion error (v\+) + +If an error of the following type occurs when creating or deleting an actor/participant: + +> The destroyed participant **participant-name** does not have an associated destroying message after its declaration. Please check the sequence diagram. + +And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version. + ### Grouping / Box The actor(s) can be grouped in vertical boxes. You can define a color (if not, it will be transparent) and/or a descriptive label using the following notation: diff --git a/packages/mermaid/src/docs/syntax/sequenceDiagram.md b/packages/mermaid/src/docs/syntax/sequenceDiagram.md index cdcdaffeba..5f312fee5c 100644 --- a/packages/mermaid/src/docs/syntax/sequenceDiagram.md +++ b/packages/mermaid/src/docs/syntax/sequenceDiagram.md @@ -83,6 +83,14 @@ sequenceDiagram Bob->>Alice: I agree ``` +#### Unfixable actor/participant creation/deletion error (v+) + +If an error of the following type occurs when creating or deleting an actor/participant: + +> The destroyed participant **participant-name** does not have an associated destroying message after its declaration. Please check the sequence diagram. + +And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version. + ### Grouping / Box The actor(s) can be grouped in vertical boxes. You can define a color (if not, it will be transparent) and/or a descriptive label using the following notation: From 3118c7c532a1128f495a527f4d88b34f9abd2a86 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Fri, 13 Oct 2023 23:49:01 +0530 Subject: [PATCH 013/316] Unit Test Cases Added --- .../mermaid/src/diagrams/git/gitGraphAst.js | 19 +-- .../src/diagrams/git/gitGraphParserV2.spec.js | 139 ++++++++++++++++++ 2 files changed, 149 insertions(+), 9 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index 15e8a3e381..2efb263a90 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -256,11 +256,12 @@ export const merge = function (otherBranch, custom_id, override_type, custom_tag log.debug('in mergeBranch'); }; -export const cherryPick = function (sourceId, targetId, tag, parentCommit) { +export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { log.debug('Entering cherryPick:', sourceId, targetId, tag); sourceId = common.sanitizeText(sourceId, configApi.getConfig()); targetId = common.sanitizeText(targetId, configApi.getConfig()); tag = common.sanitizeText(tag, configApi.getConfig()); + parentCommitId = common.sanitizeText(parentCommitId, configApi.getConfig()); if (!sourceId || commits[sourceId] === undefined) { let error = new Error( @@ -278,9 +279,9 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommit) { let sourceCommit = commits[sourceId]; let sourceCommitBranch = sourceCommit.branch; if (sourceCommit.type === commitType.MERGE) { - if (!parentCommit) { + if (!parentCommitId) { let error = new Error( - 'Incorrect usage of cherryPick: If the source commit is a merge commit, an immediate parent commit must be specified.' + 'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.' ); error.hash = { text: 'cherryPick ' + sourceId + ' ' + targetId, @@ -291,7 +292,7 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommit) { }; throw error; } - if (!(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommit))) { + if (!(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) { let error = new Error( 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.' ); @@ -342,11 +343,11 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommit) { parents: [head == null ? null : head.id, sourceCommit.id], branch: curBranch, type: commitType.CHERRY_PICK, - tag: tag - ? `${tag}${sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommit}` : ''}` - : `cherry-pick: ${sourceCommit.id}${ - sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommit}` : '' - }`, + tag: + tag ?? + `cherry-pick: ${sourceCommit.id}${ + sourceCommit.type === commitType.MERGE && ` | parent: ${parentCommitId}` + }`, }; head = commit; commits[commit.id] = commit; diff --git a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js index df20a5eb5a..f9abec4b25 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js +++ b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js @@ -673,6 +673,145 @@ describe('when parsing a gitGraph', function () { expect(commits[cherryPickCommitID].branch).toBe('main'); }); + it('should support cherry-picking of merge commits', function () { + const str = `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + cherry-pick id: "M" parent:"B" + `; + + parser.parse(str); + const commits = parser.yy.getCommits(); + const cherryPickCommitID = Object.keys(commits)[4]; + expect(commits[cherryPickCommitID].tag).toBe('cherry-pick: M | parent: B'); + expect(commits[cherryPickCommitID].branch).toBe('release'); + }); + + it('should support cherry-picking of merge commits with tag', function () { + const str = `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + cherry-pick id: "M" parent:"ZERO" tag: "v1.0" + `; + + parser.parse(str); + const commits = parser.yy.getCommits(); + const cherryPickCommitID = Object.keys(commits)[4]; + expect(commits[cherryPickCommitID].tag).toBe('v1.0'); + expect(commits[cherryPickCommitID].branch).toBe('release'); + }); + + it('should support cherry-picking of merge commits with additional commit', function () { + const str = `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + commit id: "C" + cherry-pick id: "M" tag: "v2.1:ZERO" parent:"ZERO" + commit id: "D" + `; + + parser.parse(str); + const commits = parser.yy.getCommits(); + const cherryPickCommitID = Object.keys(commits)[5]; + expect(commits[cherryPickCommitID].tag).toBe('v2.1:ZERO'); + expect(commits[cherryPickCommitID].branch).toBe('release'); + }); + + it('should support cherry-picking of merge commits with empty tag', function () { + const str = `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + commit id: "C" + cherry-pick id:"M" parent: "ZERO" tag:"" + commit id: "D" + cherry-pick id:"M" tag:"" parent: "B" + `; + + parser.parse(str); + const commits = parser.yy.getCommits(); + const cherryPickCommitID = Object.keys(commits)[5]; + const cherryPickCommitID2 = Object.keys(commits)[7]; + expect(commits[cherryPickCommitID].tag).toBe(''); + expect(commits[cherryPickCommitID2].tag).toBe(''); + expect(commits[cherryPickCommitID].branch).toBe('release'); + }); + + it('should fail cherry-picking of merge commits if the parent of merge commits is not specified', function () { + expect(() => + parser + .parse( + `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + commit id: "C" + cherry-pick id:"M" + ` + ) + .toThrow( + 'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.' + ) + ); + }); + + it('should fail cherry-picking of merge commits when the parent provided is not an immediate parent of cherry picked commit', function () { + expect(() => + parser + .parse( + `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + commit id: "C" + cherry-pick id:"M" parent: "A" + ` + ) + .toThrow( + 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.' + ) + ); + }); + it('should throw error when try to branch existing branch: main', function () { const str = `gitGraph commit From 6e5cd2b3c2336835a6a896b80d9bbb2ef10ecfa4 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Sat, 14 Oct 2023 05:49:51 +0530 Subject: [PATCH 014/316] All Unit Tests Passing --- packages/mermaid/src/diagrams/git/gitGraphAst.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index 2efb263a90..f93ffc44dd 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -346,7 +346,7 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { tag: tag ?? `cherry-pick: ${sourceCommit.id}${ - sourceCommit.type === commitType.MERGE && ` | parent: ${parentCommitId}` + sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommitId}` : '' }`, }; head = commit; From 4051b42b5a74083d750ee43b38ec7bdc77f2f1fa Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Sat, 14 Oct 2023 07:26:23 +0530 Subject: [PATCH 015/316] documentation added, Tests Fixed --- docs/syntax/gitgraph.md | 60 +++++++++++-------- .../mermaid/src/diagrams/git/gitGraphAst.js | 4 +- .../src/diagrams/git/gitGraphParserV2.spec.js | 2 +- packages/mermaid/src/docs/syntax/gitgraph.md | 31 ++++++---- 4 files changed, 55 insertions(+), 42 deletions(-) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index 8d39ddbcbd..c6a397a982 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -366,41 +366,49 @@ A few important rules to note here are: 1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above. 2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch. 3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw. +4. When cherry-picking a merge commit, providing a parent commit ID is mandatory. If the parent attribute is omitted or an invalid parent commit ID is provided, an error will be thrown. +5. The specified parent commit must be an immediate parent of the merge commit being cherry-picked. Let see an example: ```mermaid-example gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" + commit id: "ZERO" + branch develop + branch release + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + merge develop id:"MERGE" + commit id:"TWO" + checkout release + cherry-pick id:"MERGE" parent:"B" + commit id:"THREE" + checkout develop + commit id:"C" ``` ```mermaid gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" + commit id: "ZERO" + branch develop + branch release + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + merge develop id:"MERGE" + commit id:"TWO" + checkout release + cherry-pick id:"MERGE" parent:"B" + commit id:"THREE" + checkout develop + commit id:"C" ``` ## Gitgraph specific configuration options diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index f93ffc44dd..34cf91b51f 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -345,8 +345,8 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { type: commitType.CHERRY_PICK, tag: tag ?? - `cherry-pick: ${sourceCommit.id}${ - sourceCommit.type === commitType.MERGE ? ` | parent: ${parentCommitId}` : '' + `cherry-pick:${sourceCommit.id}${ + sourceCommit.type === commitType.MERGE ? `|parent:${parentCommitId}` : '' }`, }; head = commit; diff --git a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js index f9abec4b25..3b56ee2542 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js +++ b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js @@ -690,7 +690,7 @@ describe('when parsing a gitGraph', function () { parser.parse(str); const commits = parser.yy.getCommits(); const cherryPickCommitID = Object.keys(commits)[4]; - expect(commits[cherryPickCommitID].tag).toBe('cherry-pick: M | parent: B'); + expect(commits[cherryPickCommitID].tag).toBe('cherry-pick:M|parent:B'); expect(commits[cherryPickCommitID].branch).toBe('release'); }); diff --git a/packages/mermaid/src/docs/syntax/gitgraph.md b/packages/mermaid/src/docs/syntax/gitgraph.md index 5fa09cb225..3f7e42d436 100644 --- a/packages/mermaid/src/docs/syntax/gitgraph.md +++ b/packages/mermaid/src/docs/syntax/gitgraph.md @@ -244,24 +244,29 @@ A few important rules to note here are: 1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above. 2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch. 3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw. +4. When cherry-picking a merge commit, providing a parent commit ID is mandatory. If the parent attribute is omitted or an invalid parent commit ID is provided, an error will be thrown. +5. The specified parent commit must be an immediate parent of the merge commit being cherry-picked. Let see an example: ```mermaid-example gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" + commit id: "ZERO" + branch develop + branch release + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + merge develop id:"MERGE" + commit id:"TWO" + checkout release + cherry-pick id:"MERGE" parent:"B" + commit id:"THREE" + checkout develop + commit id:"C" ``` ## Gitgraph specific configuration options From 3128ba73a0be2dc06122ca8c0b4bae884a884958 Mon Sep 17 00:00:00 2001 From: Faris Date: Mon, 16 Oct 2023 19:36:44 +0300 Subject: [PATCH 016/316] chore(sequence): Update packages/mermaid/src/docs/syntax/sequenceDiagram.md Co-authored-by: Sidharth Vinod --- packages/mermaid/src/docs/syntax/sequenceDiagram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/docs/syntax/sequenceDiagram.md b/packages/mermaid/src/docs/syntax/sequenceDiagram.md index 5f312fee5c..e7df5d8c95 100644 --- a/packages/mermaid/src/docs/syntax/sequenceDiagram.md +++ b/packages/mermaid/src/docs/syntax/sequenceDiagram.md @@ -83,13 +83,13 @@ sequenceDiagram Bob->>Alice: I agree ``` -#### Unfixable actor/participant creation/deletion error (v+) +#### Unfixable actor/participant creation/deletion error If an error of the following type occurs when creating or deleting an actor/participant: > The destroyed participant **participant-name** does not have an associated destroying message after its declaration. Please check the sequence diagram. -And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version. +And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version to (v+). ### Grouping / Box From 3b5f5c78430640cfe048e947ac42e9994efd3cd2 Mon Sep 17 00:00:00 2001 From: Faris Nabiev Date: Mon, 16 Oct 2023 19:47:58 +0300 Subject: [PATCH 017/316] chore: fix autogen docs --- docs/syntax/sequenceDiagram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/syntax/sequenceDiagram.md b/docs/syntax/sequenceDiagram.md index 1172e2994b..2dff973e41 100644 --- a/docs/syntax/sequenceDiagram.md +++ b/docs/syntax/sequenceDiagram.md @@ -131,13 +131,13 @@ sequenceDiagram Bob->>Alice: I agree ``` -#### Unfixable actor/participant creation/deletion error (v\+) +#### Unfixable actor/participant creation/deletion error If an error of the following type occurs when creating or deleting an actor/participant: > The destroyed participant **participant-name** does not have an associated destroying message after its declaration. Please check the sequence diagram. -And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version. +And fixing diagram code does not get rid of this error and rendering of all other diagrams results in the same error, then you need to update the mermaid version to (v\+). ### Grouping / Box From d8500f9e0833062467c39ed52b7763c5fc346a06 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Wed, 18 Oct 2023 20:59:55 +0530 Subject: [PATCH 018/316] Suggested Changes FOR PR DONE --- packages/mermaid/src/diagrams/git/gitGraphAst.js | 10 ++++------ .../mermaid/src/diagrams/git/parser/gitGraph.jison | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index 34cf91b51f..fde3d9af95 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -284,11 +284,10 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { 'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.' ); error.hash = { - text: 'cherryPick ' + sourceId + ' ' + targetId, - token: 'cherryPick ' + sourceId + ' ' + targetId, + text: `cherryPick ${sourceId} ${targetId}`, + token: `cherryPick ${sourceId} ${targetId}`, line: '1', loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['cherry-pick abc'], }; throw error; } @@ -297,11 +296,10 @@ export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.' ); error.hash = { - text: 'cherryPick ' + sourceId + ' ' + targetId, - token: 'cherryPick ' + sourceId + ' ' + targetId, + text: `cherryPick ${sourceId} ${targetId}`, + token: `cherryPick ${sourceId} ${targetId}`, line: '1', loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, - expected: ['cherry-pick abc'], }; throw error; } diff --git a/packages/mermaid/src/diagrams/git/parser/gitGraph.jison b/packages/mermaid/src/diagrams/git/parser/gitGraph.jison index 1e4ca026ed..40fab8b590 100644 --- a/packages/mermaid/src/diagrams/git/parser/gitGraph.jison +++ b/packages/mermaid/src/diagrams/git/parser/gitGraph.jison @@ -114,6 +114,8 @@ cherryPickStatement | CHERRY_PICK COMMIT_ID STR COMMIT_TAG STR {yy.cherryPick($3, '', $5)} | CHERRY_PICK COMMIT_ID STR PARENT_COMMIT STR COMMIT_TAG STR {yy.cherryPick($3, '', $7,$5)} | CHERRY_PICK COMMIT_ID STR COMMIT_TAG STR PARENT_COMMIT STR {yy.cherryPick($3, '', $5,$7)} + | CHERRY_PICK COMMIT_TAG STR COMMIT_ID STR {yy.cherryPick($5, '', $3)} + | CHERRY_PICK COMMIT_TAG EMPTYSTR COMMIT_ID STR {yy.cherryPick($5, '', '')} | CHERRY_PICK COMMIT_ID STR COMMIT_TAG EMPTYSTR {yy.cherryPick($3, '', '')} | CHERRY_PICK COMMIT_ID STR PARENT_COMMIT STR COMMIT_TAG EMPTYSTR {yy.cherryPick($3, '', '',$5)} | CHERRY_PICK COMMIT_ID STR COMMIT_TAG EMPTYSTR PARENT_COMMIT STR {yy.cherryPick($3, '', '',$7)} From 827808dca39962fdb216646a2d1ffc8b90c49e24 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Thu, 19 Oct 2023 10:33:32 +0530 Subject: [PATCH 019/316] Merge Conflict Resolved --- packages/mermaid/src/diagrams/git/gitGraphAst.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.js b/packages/mermaid/src/diagrams/git/gitGraphAst.js index ae8351d83f..da7f4151e7 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.js +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.js @@ -257,10 +257,10 @@ export const merge = function (otherBranch, custom_id, override_type, custom_tag export const cherryPick = function (sourceId, targetId, tag, parentCommitId) { log.debug('Entering cherryPick:', sourceId, targetId, tag); - sourceId = common.sanitizeText(sourceId, configApi.getConfig()); - targetId = common.sanitizeText(targetId, configApi.getConfig()); - tag = common.sanitizeText(tag, configApi.getConfig()); - parentCommitId = common.sanitizeText(parentCommitId, configApi.getConfig()); + sourceId = common.sanitizeText(sourceId, getConfig()); + targetId = common.sanitizeText(targetId, getConfig()); + tag = common.sanitizeText(tag, getConfig()); + parentCommitId = common.sanitizeText(parentCommitId, getConfig()); if (!sourceId || commits[sourceId] === undefined) { let error = new Error( From 87675e687e18ce2a29f21a7c5d8c5eac1b717934 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:36:46 -0700 Subject: [PATCH 020/316] add latest blog post --- docs/news/announcements.md | 16 ++++------------ docs/news/blog.md | 6 ++++++ packages/mermaid/src/docs/news/announcements.md | 16 ++++------------ packages/mermaid/src/docs/news/blog.md | 6 ++++++ 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/docs/news/announcements.md b/docs/news/announcements.md index 98ca64421e..f80bef6f86 100644 --- a/docs/news/announcements.md +++ b/docs/news/announcements.md @@ -6,18 +6,10 @@ # Announcements -
+Check out our latest blog post below. -Mermaid Chart - A smarter way to create diagrams | Product Hunt +## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) -## Calling all fans of Mermaid and Mermaid Chart! 🎉 +12 October 2023 · 4 mins -We’ve officially made our Product Hunt debut, and would love any and all support from the community! - -[Click here](https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart) to check out our Product Hunt launch. - -Feel free to drop us a comment and let us know what you think. All new sign ups will receive a 30-day free trial of our Pro subscription, plus 25% off your first year. - -We’re on a mission to make text-based diagramming fun again. And we need your help to make that happen. - -Your support means the world to us. Thank you for being part of the diagramming movement. +Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. diff --git a/docs/news/blog.md b/docs/news/blog.md index cc34b9f5c5..105c0056be 100644 --- a/docs/news/blog.md +++ b/docs/news/blog.md @@ -6,6 +6,12 @@ # Blog +## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) + +12 October 2023 · 4 mins + +Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. + ## [How to Make a Git Graph with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-git-graph-with-mermaid-chart/) 22 September 2023 · 7 mins diff --git a/packages/mermaid/src/docs/news/announcements.md b/packages/mermaid/src/docs/news/announcements.md index f14aab785c..5ce10cf21c 100644 --- a/packages/mermaid/src/docs/news/announcements.md +++ b/packages/mermaid/src/docs/news/announcements.md @@ -1,17 +1,9 @@ # Announcements -
+Check out our latest blog post below. -Mermaid Chart - A smarter way to create diagrams | Product Hunt +## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) -## Calling all fans of Mermaid and Mermaid Chart! 🎉 +12 October 2023 · 4 mins -We’ve officially made our Product Hunt debut, and would love any and all support from the community! - -[Click here](https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart) to check out our Product Hunt launch. - -Feel free to drop us a comment and let us know what you think. All new sign ups will receive a 30-day free trial of our Pro subscription, plus 25% off your first year. - -We’re on a mission to make text-based diagramming fun again. And we need your help to make that happen. - -Your support means the world to us. Thank you for being part of the diagramming movement. +Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. diff --git a/packages/mermaid/src/docs/news/blog.md b/packages/mermaid/src/docs/news/blog.md index fa581349f1..6edf00aca8 100644 --- a/packages/mermaid/src/docs/news/blog.md +++ b/packages/mermaid/src/docs/news/blog.md @@ -1,5 +1,11 @@ # Blog +## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) + +12 October 2023 · 4 mins + +Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. + ## [How to Make a Git Graph with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-git-graph-with-mermaid-chart/) 22 September 2023 · 7 mins From 58e9e5658b87c6ce92c7ef1a9d6ab09fa976af85 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Sun, 22 Oct 2023 21:12:04 +0530 Subject: [PATCH 021/316] e2e test case added --- cypress/integration/rendering/gitGraph.spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js index 9f040a36f0..a328ae32f5 100644 --- a/cypress/integration/rendering/gitGraph.spec.js +++ b/cypress/integration/rendering/gitGraph.spec.js @@ -701,4 +701,21 @@ gitGraph TB: {} ); }); + it('34: should render a simple gitgraph with cherry pick merge commit', () => { + imgSnapshotTest( + `gitGraph + commit id: "ZERO" + branch feature + branch release + checkout feature + commit id: "A" + commit id: "B" + checkout main + merge feature id: "M" + checkout release + cherry-pick id: "M" parent:"B" + `, + {} + ); + }); }); From b0cfdcc22f704b628cff186aabd78e3751ad5d49 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Mon, 23 Oct 2023 20:34:54 +0530 Subject: [PATCH 022/316] Documentation Modified New Ex Added --- docs/syntax/gitgraph.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index c6a397a982..7453f2d0ea 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -371,6 +371,42 @@ A few important rules to note here are: Let see an example: +```mermaid-example + gitGraph + commit id: "ZERO" + branch develop + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + commit id:"TWO" + cherry-pick id:"A" + commit id:"THREE" + checkout develop + commit id:"C" +``` + +```mermaid + gitGraph + commit id: "ZERO" + branch develop + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + commit id:"TWO" + cherry-pick id:"A" + commit id:"THREE" + checkout develop + commit id:"C" +``` + +Cherry Picking Merge Commit: + ```mermaid-example gitGraph commit id: "ZERO" From ca96c0f45fbd2e14bea27b2ee12d2c43af793e0e Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Mon, 23 Oct 2023 21:06:51 +0530 Subject: [PATCH 023/316] Linting Issue Fixed --- docs/syntax/gitgraph.md | 74 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index 7453f2d0ea..89a95f68d3 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -405,6 +405,40 @@ Let see an example: commit id:"C" ``` +```mermaid-example + gitGraph + commit id: "ZERO" + branch develop + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + commit id:"TWO" + cherry-pick id:"A" + commit id:"THREE" + checkout develop + commit id:"C" +``` + +```mermaid + gitGraph + commit id: "ZERO" + branch develop + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + commit id:"TWO" + cherry-pick id:"A" + commit id:"THREE" + checkout develop + commit id:"C" +``` + Cherry Picking Merge Commit: ```mermaid-example @@ -447,6 +481,46 @@ Cherry Picking Merge Commit: commit id:"C" ``` +```mermaid-example + gitGraph + commit id: "ZERO" + branch develop + branch release + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + merge develop id:"MERGE" + commit id:"TWO" + checkout release + cherry-pick id:"MERGE" parent:"B" + commit id:"THREE" + checkout develop + commit id:"C" +``` + +```mermaid + gitGraph + commit id: "ZERO" + branch develop + branch release + commit id:"A" + checkout main + commit id:"ONE" + checkout develop + commit id:"B" + checkout main + merge develop id:"MERGE" + commit id:"TWO" + checkout release + cherry-pick id:"MERGE" parent:"B" + commit id:"THREE" + checkout develop + commit id:"C" +``` + ## Gitgraph specific configuration options In Mermaid, you have the option to configure the gitgraph diagram. You can configure the following options: From 7f1e0ab4225596feb6f7e82ad4565b894659c33e Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Mon, 23 Oct 2023 21:14:38 +0530 Subject: [PATCH 024/316] Updated gitgraph.md --- docs/syntax/gitgraph.md | 74 ----------------------------------------- 1 file changed, 74 deletions(-) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index 89a95f68d3..7453f2d0ea 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -405,40 +405,6 @@ Let see an example: commit id:"C" ``` -```mermaid-example - gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" -``` - -```mermaid - gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" -``` - Cherry Picking Merge Commit: ```mermaid-example @@ -481,46 +447,6 @@ Cherry Picking Merge Commit: commit id:"C" ``` -```mermaid-example - gitGraph - commit id: "ZERO" - branch develop - branch release - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - merge develop id:"MERGE" - commit id:"TWO" - checkout release - cherry-pick id:"MERGE" parent:"B" - commit id:"THREE" - checkout develop - commit id:"C" -``` - -```mermaid - gitGraph - commit id: "ZERO" - branch develop - branch release - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - merge develop id:"MERGE" - commit id:"TWO" - checkout release - cherry-pick id:"MERGE" parent:"B" - commit id:"THREE" - checkout develop - commit id:"C" -``` - ## Gitgraph specific configuration options In Mermaid, you have the option to configure the gitgraph diagram. You can configure the following options: From 5834818ebee0c158628dbf2a8d6c78229433c454 Mon Sep 17 00:00:00 2001 From: RounakJoshi09 Date: Mon, 23 Oct 2023 21:57:38 +0530 Subject: [PATCH 025/316] Linting Issue Fixed --- docs/syntax/gitgraph.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/docs/syntax/gitgraph.md b/docs/syntax/gitgraph.md index 7453f2d0ea..c6a397a982 100644 --- a/docs/syntax/gitgraph.md +++ b/docs/syntax/gitgraph.md @@ -371,42 +371,6 @@ A few important rules to note here are: Let see an example: -```mermaid-example - gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" -``` - -```mermaid - gitGraph - commit id: "ZERO" - branch develop - commit id:"A" - checkout main - commit id:"ONE" - checkout develop - commit id:"B" - checkout main - commit id:"TWO" - cherry-pick id:"A" - commit id:"THREE" - checkout develop - commit id:"C" -``` - -Cherry Picking Merge Commit: - ```mermaid-example gitGraph commit id: "ZERO" From f42cec282a2d1ba865894ee0276bf110878b022c Mon Sep 17 00:00:00 2001 From: Guy Pursey Date: Fri, 6 Oct 2023 20:16:09 +0100 Subject: [PATCH 026/316] GitGraph: Add check for direction of merge arrow to determine colour. --- packages/mermaid/src/diagrams/git/gitGraphRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index 2b88cfe7ef..fa490e75e8 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -410,7 +410,7 @@ const drawArrow = (svg, commit1, commit2, allCommits) => { radius = 10; offset = 10; // Figure out the color of the arrow,arrows going down take the color from the destination branch - colorClassNum = branchPos[commit2.branch].index; + colorClassNum = branchPos[(p1.y > p2.y ? commit1 : commit2).branch].index; const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); From d9daf19055c3e464b383989a8a4770d257cb24e7 Mon Sep 17 00:00:00 2001 From: Guy Pursey Date: Sat, 7 Oct 2023 18:15:29 +0100 Subject: [PATCH 027/316] GitGraph: Correct commit variable in overlap check. Originally, the function was checking if any commits were on the same branch as `commit2`, the destination commit. However, in order to avoid a conflict, we should only need to check whether any commits are on the same branch as `commit 1`. Updated and moved commenting as well. --- packages/mermaid/src/diagrams/git/gitGraphRenderer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index fa490e75e8..8ce05c22b0 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -347,11 +347,13 @@ const drawCommits = (svg, commits, modifyGraph) => { * @returns {boolean} If there are commits between commit1's x-position and commit2's x-position */ const hasOverlappingCommits = (commit1, commit2, allCommits) => { - // Find commits on the same branch as commit2 const keys = Object.keys(allCommits); const overlappingComits = keys.filter((key) => { return ( - allCommits[key].branch === commit2.branch && + // Find commits on the same branch as commit1, + // after commit1 but before commit2 + // to avoid collision + allCommits[key].branch === commit1.branch && allCommits[key].seq > commit1.seq && allCommits[key].seq < commit2.seq ); From 839645f161c50866af5c35ecc48619e2143dd70f Mon Sep 17 00:00:00 2001 From: Guy Pursey Date: Sat, 7 Oct 2023 18:43:16 +0100 Subject: [PATCH 028/316] GitGraph: Add more example diagrams to test with. --- demos/git.html | 80 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/demos/git.html b/demos/git.html index f24217711e..37fa8a461f 100644 --- a/demos/git.html +++ b/demos/git.html @@ -17,26 +17,88 @@

Git diagram demo

     ---
-    title: Simple Git diagram
+    title: Simple "branch and merge"
     ---
     gitGraph:
-    options
-    {
-    "nodeSpacing": 50,
-    "nodeRadius": 5
-    }
-    end
-    branch master
     commit
     branch newbranch
     checkout newbranch
     commit
+    checkout main
+    merge newbranch
+    
+ +
+    ---
+    title: Continuous development
+    ---
+    gitGraph:
+    commit
+    branch develop
+    checkout develop
+    commit
+    checkout main
+    merge develop
+    checkout develop
+    commit
+    checkout main
+    merge develop
+    
+
+    ---
+    title: Two-way merges
+    ---
+    gitGraph:
+    commit
+    branch develop
+    checkout develop
+    commit
+    checkout main
+    merge develop
+    commit
+    checkout develop
+    merge main
     commit
-    checkout master
+    checkout main
+    merge develop
+    
+
+    ---
+    title: Cherry-pick
+    ---
+    gitGraph:
     commit
+    branch newbranch
+    checkout newbranch
+    commit id: "Pick me"
+    checkout main
+    commit
+    checkout newbranch
     commit
+    checkout main
+    cherry-pick id: "Pick me"
     merge newbranch
     
+
+    ---
+    title: Three branches
+    ---
+    gitGraph:
+    commit
+    branch develop
+    checkout develop
+    commit
+    branch feature
+    checkout feature
+    commit
+    checkout main
+    merge feature id:"Direct to main"
+    checkout develop
+    merge feature
+    commit
+    checkout main
+    merge develop
+    
+ + diff --git a/package.json b/package.json index 51645c6a2b..28d4f9592a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "build:esbuild": "pnpm run -r clean && ts-node-esm --transpileOnly .esbuild/build.ts", "build:mermaid": "pnpm build:esbuild --mermaid", "build:viz": "pnpm build:esbuild --visualize", - "build:types": "tsc -p ./packages/parser/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-zenuml/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-example-diagram/tsconfig.json --emitDeclarationOnly", + "build:types": "tsc -p ./packages/parser/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-zenuml/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-example-diagram/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-flowchart-elk/tsconfig.json --emitDeclarationOnly", "build:types:watch": "tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly --watch", "dev": "ts-node-esm --transpileOnly .esbuild/server.ts", "dev:vite": "ts-node-esm --transpileOnly .vite/server.ts", diff --git a/packages/mermaid-flowchart-elk/package.json b/packages/mermaid-flowchart-elk/package.json new file mode 100644 index 0000000000..8a68891aa7 --- /dev/null +++ b/packages/mermaid-flowchart-elk/package.json @@ -0,0 +1,55 @@ +{ + "name": "@mermaid-js/flowchart-elk", + "version": "1.0.0", + "description": "Flowchart plugin for mermaid with ELK layout", + "module": "dist/mermaid-flowchart-elk.core.mjs", + "types": "dist/packages/mermaid-flowchart-elk/src/detector.d.ts", + "type": "module", + "exports": { + ".": { + "import": "./dist/mermaid-flowchart-elk.core.mjs", + "types": "./dist/packages/mermaid-flowchart-elk/src/detector.d.ts" + }, + "./*": "./*" + }, + "keywords": [ + "diagram", + "markdown", + "flowchart", + "elk", + "mermaid" + ], + "scripts": { + "prepublishOnly": "pnpm -w run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/mermaid-js/mermaid" + }, + "author": "Knut Sveidqvist", + "license": "MIT", + "standard": { + "ignore": [ + "**/parser/*.js", + "dist/**/*.js", + "cypress/**/*.js" + ], + "globals": [ + "page" + ] + }, + "dependencies": { + "d3": "^7.4.0", + "dagre-d3-es": "7.0.10", + "khroma": "^2.0.0", + "elkjs": "^0.8.2" + }, + "devDependencies": { + "concurrently": "^8.0.0", + "rimraf": "^5.0.0", + "mermaid": "workspace:*" + }, + "files": [ + "dist" + ] +} diff --git a/packages/mermaid/src/diagrams/flowchart/elk/detector.spec.ts b/packages/mermaid-flowchart-elk/src/detector.spec.ts similarity index 100% rename from packages/mermaid/src/diagrams/flowchart/elk/detector.spec.ts rename to packages/mermaid-flowchart-elk/src/detector.spec.ts diff --git a/packages/mermaid-flowchart-elk/src/detector.ts b/packages/mermaid-flowchart-elk/src/detector.ts new file mode 100644 index 0000000000..52fb355a55 --- /dev/null +++ b/packages/mermaid-flowchart-elk/src/detector.ts @@ -0,0 +1,32 @@ +import type { + ExternalDiagramDefinition, + DiagramDetector, + DiagramLoader, +} from '../../mermaid/src/diagram-api/types.js'; + +const id = 'flowchart-elk'; + +const detector: DiagramDetector = (txt, config): boolean => { + if ( + // If diagram explicitly states flowchart-elk + /^\s*flowchart-elk/.test(txt) || + // If a flowchart/graph diagram has their default renderer set to elk + (/^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk') + ) { + return true; + } + return false; +}; + +const loader: DiagramLoader = async () => { + const { diagram } = await import('./diagram-definition.js'); + return { id, diagram }; +}; + +const plugin: ExternalDiagramDefinition = { + id, + detector, + loader, +}; + +export default plugin; diff --git a/packages/mermaid-flowchart-elk/src/diagram-definition.ts b/packages/mermaid-flowchart-elk/src/diagram-definition.ts new file mode 100644 index 0000000000..a4e678dcc3 --- /dev/null +++ b/packages/mermaid-flowchart-elk/src/diagram-definition.ts @@ -0,0 +1,12 @@ +// @ts-ignore: JISON typing missing +import parser from '../../mermaid/src/diagrams/flowchart/parser/flow.jison'; +import * as db from '../../mermaid/src/diagrams/flowchart/flowDb.js'; +import styles from '../../mermaid/src/diagrams/flowchart/styles.js'; +import renderer from './flowRenderer-elk.js'; + +export const diagram = { + db, + renderer, + parser, + styles, +}; diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js b/packages/mermaid-flowchart-elk/src/flowRenderer-elk.js similarity index 97% rename from packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js rename to packages/mermaid-flowchart-elk/src/flowRenderer-elk.js index e45739524e..da4f339d5c 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js +++ b/packages/mermaid-flowchart-elk/src/flowRenderer-elk.js @@ -1,16 +1,16 @@ import { select, line, curveLinear } from 'd3'; -import { insertNode } from '../../../dagre-wrapper/nodes.js'; -import insertMarkers from '../../../dagre-wrapper/markers.js'; -import { insertEdgeLabel } from '../../../dagre-wrapper/edges.js'; +import { insertNode } from '../../mermaid/src/dagre-wrapper/nodes.js'; +import insertMarkers from '../../mermaid/src/dagre-wrapper/markers.js'; +import { insertEdgeLabel } from '../../mermaid/src/dagre-wrapper/edges.js'; import { findCommonAncestor } from './render-utils.js'; -import { labelHelper } from '../../../dagre-wrapper/shapes/util.js'; -import { getConfig } from '../../../config.js'; -import { log } from '../../../logger.js'; -import { setupGraphViewbox } from '../../../setupGraphViewbox.js'; -import common from '../../common/common.js'; -import { interpolateToCurve, getStylesFromArray } from '../../../utils.js'; +import { labelHelper } from '../../mermaid/src/dagre-wrapper/shapes/util.js'; +import { getConfig } from '../../mermaid/src/config.js'; +import { log } from '../../mermaid/src/logger.js'; +import { setupGraphViewbox } from '../../mermaid/src/setupGraphViewbox.js'; +import common from '../../mermaid/src/diagrams/common/common.js'; +import { interpolateToCurve, getStylesFromArray } from '../../mermaid/src/utils.js'; import ELK from 'elkjs/lib/elk.bundled.js'; -import { getLineFunctionsWithOffset } from '../../../utils/lineWithOffset.js'; +import { getLineFunctionsWithOffset } from '../../mermaid/src/utils/lineWithOffset.js'; const elk = new ELK(); @@ -695,7 +695,7 @@ const addMarkersToEdge = function (svgPath, edgeData, diagramType, arrowMarkerAb * * @param text * @param diagObj - * @returns {Record} ClassDef styles + * @returns {Record} ClassDef styles */ export const getClasses = function (text, diagObj) { log.info('Extracting classes'); diff --git a/packages/mermaid/src/diagrams/flowchart/elk/render-utils.spec.ts b/packages/mermaid-flowchart-elk/src/render-utils.spec.ts similarity index 100% rename from packages/mermaid/src/diagrams/flowchart/elk/render-utils.spec.ts rename to packages/mermaid-flowchart-elk/src/render-utils.spec.ts diff --git a/packages/mermaid/src/diagrams/flowchart/elk/render-utils.ts b/packages/mermaid-flowchart-elk/src/render-utils.ts similarity index 100% rename from packages/mermaid/src/diagrams/flowchart/elk/render-utils.ts rename to packages/mermaid-flowchart-elk/src/render-utils.ts diff --git a/packages/mermaid/src/diagrams/flowchart/elk/styles.ts b/packages/mermaid-flowchart-elk/src/styles.ts similarity index 100% rename from packages/mermaid/src/diagrams/flowchart/elk/styles.ts rename to packages/mermaid-flowchart-elk/src/styles.ts diff --git a/packages/mermaid-flowchart-elk/tsconfig.json b/packages/mermaid-flowchart-elk/tsconfig.json new file mode 100644 index 0000000000..e7ca78fe48 --- /dev/null +++ b/packages/mermaid-flowchart-elk/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "../..", + "outDir": "./dist" + }, + "include": ["./src/**/*.ts"], + "typeRoots": ["./src/types"] +} diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 4ac0b70464..eaf2f0c70b 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -68,7 +68,6 @@ "dagre-d3-es": "7.0.10", "dayjs": "^1.11.7", "dompurify": "^3.0.5", - "elkjs": "^0.8.2", "khroma": "^2.0.0", "lodash-es": "^4.17.21", "mdast-util-from-markdown": "^1.3.0", diff --git a/packages/mermaid/src/diagrams/flowchart/elk/detector.ts b/packages/mermaid/src/diagrams/flowchart/elk/detector.ts index 6cfcf26194..b476ff11ba 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/detector.ts +++ b/packages/mermaid/src/diagrams/flowchart/elk/detector.ts @@ -3,6 +3,7 @@ import type { DiagramDetector, DiagramLoader, } from '../../../diagram-api/types.js'; +import { log } from '../../../logger.js'; const id = 'flowchart-elk'; @@ -13,13 +14,21 @@ const detector: DiagramDetector = (txt, config): boolean => { // If a flowchart/graph diagram has their default renderer set to elk (/^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk') ) { + // This will log at the end, hopefully. + setTimeout( + () => + log.warn( + 'flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](link) for more details. This diagram will be rendered using `dagre` layout as a fallback.' + ), + 500 + ); return true; } return false; }; const loader: DiagramLoader = async () => { - const { diagram } = await import('./flowchart-elk-definition.js'); + const { diagram } = await import('../flowDiagram-v2.js'); return { id, diagram }; }; diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowchart-elk-definition.ts b/packages/mermaid/src/diagrams/flowchart/elk/flowchart-elk-definition.ts deleted file mode 100644 index 9855c73899..0000000000 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowchart-elk-definition.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-ignore: JISON typing missing -import parser from '../parser/flow.jison'; - -import * as db from '../flowDb.js'; -import renderer from './flowRenderer-elk.js'; -import styles from './styles.js'; - -export const diagram = { - db, - renderer, - parser, - styles, -}; diff --git a/packages/mermaid/src/styles.spec.ts b/packages/mermaid/src/styles.spec.ts index 420ee9757b..d22b0f2ee3 100644 --- a/packages/mermaid/src/styles.spec.ts +++ b/packages/mermaid/src/styles.spec.ts @@ -17,7 +17,6 @@ import theme from './themes/index.js'; import c4 from './diagrams/c4/styles.js'; import classDiagram from './diagrams/class/styles.js'; import flowchart from './diagrams/flowchart/styles.js'; -import flowchartElk from './diagrams/flowchart/elk/styles.js'; import er from './diagrams/er/styles.js'; import git from './diagrams/git/styles.js'; import gantt from './diagrams/gantt/styles.js'; @@ -86,7 +85,6 @@ describe('styles', () => { classDiagram, er, flowchart, - flowchartElk, gantt, git, journey, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e5d16f4cc..c67f93f25a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -224,9 +224,6 @@ importers: dompurify: specifier: ^3.0.5 version: 3.0.5 - elkjs: - specifier: ^0.8.2 - version: 0.8.2 khroma: specifier: ^2.0.0 version: 2.0.0 @@ -416,6 +413,31 @@ importers: specifier: ^5.0.0 version: 5.0.0 + packages/mermaid-flowchart-elk: + dependencies: + d3: + specifier: ^7.4.0 + version: 7.8.5 + dagre-d3-es: + specifier: 7.0.10 + version: 7.0.10 + elkjs: + specifier: ^0.8.2 + version: 0.8.2 + khroma: + specifier: ^2.0.0 + version: 2.0.0 + devDependencies: + concurrently: + specifier: ^8.0.0 + version: 8.0.1 + mermaid: + specifier: workspace:* + version: link:../mermaid + rimraf: + specifier: ^5.0.0 + version: 5.0.0 + packages/mermaid-zenuml: dependencies: '@zenuml/core': @@ -500,8 +522,8 @@ importers: specifier: ^1.1.16 version: 1.1.16 '@unocss/reset': - specifier: ^0.55.2 - version: 0.55.7 + specifier: ^0.57.0 + version: 0.57.1 '@vite-pwa/vitepress': specifier: ^0.2.0 version: 0.2.0(vite-plugin-pwa@0.16.0) @@ -518,8 +540,8 @@ importers: specifier: ^1.1.0 version: 1.1.1 unocss: - specifier: ^0.55.2 - version: 0.55.7(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0) + specifier: ^0.57.0 + version: 0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0) unplugin-vue-components: specifier: ^0.25.0 version: 0.25.0(rollup@2.79.1)(vue@3.3.7) @@ -530,8 +552,8 @@ importers: specifier: ^0.16.0 version: 0.16.0(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: - specifier: 1.0.0-rc.12 - version: 1.0.0-rc.12(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0)(typescript@5.1.6) + specifier: 1.0.0-rc.25 + version: 1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -5059,23 +5081,23 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@unocss/astro@0.55.7(rollup@2.79.1)(vite@4.5.0): - resolution: {integrity: sha512-mw8r14ArxUQBVCCisAJlF/WsZb650iBsduD/lXMk56N/nQ3MMArCcn62kcAxgZSb5tfIOQGQu/tbR8hEcD8y2g==} + /@unocss/astro@0.57.1(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-KNaqN/SGM/uz1QitajIkzNEw0jy9Zx9Wp8fl4GhfGYEMAN2+M4cuvBZRmlb6cLctSXmSAJQDG91ivbD1JijGnw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 peerDependenciesMeta: vite: optional: true dependencies: - '@unocss/core': 0.55.7 - '@unocss/reset': 0.55.7 - '@unocss/vite': 0.55.7(rollup@2.79.1)(vite@4.5.0) - vite: 4.5.0(@types/node@18.17.5) + '@unocss/core': 0.57.1 + '@unocss/reset': 0.57.1 + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.4.9) + vite: 4.4.9(@types/node@18.17.5) transitivePeerDependencies: - rollup dev: true - /@unocss/astro@0.57.1(rollup@2.79.1)(vite@4.4.9): + /@unocss/astro@0.57.1(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-KNaqN/SGM/uz1QitajIkzNEw0jy9Zx9Wp8fl4GhfGYEMAN2+M4cuvBZRmlb6cLctSXmSAJQDG91ivbD1JijGnw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 @@ -5085,30 +5107,8 @@ packages: dependencies: '@unocss/core': 0.57.1 '@unocss/reset': 0.57.1 - '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.4.9) - vite: 4.4.9(@types/node@18.17.5) - transitivePeerDependencies: - - rollup - dev: true - - /@unocss/cli@0.55.7(rollup@2.79.1): - resolution: {integrity: sha512-ZHX2SR2WQbKfcmgOOHjBLB3V57Ct76Zb76YULzBj2EVX43lX/YDCVG87n6ePDY7rOcjCAthjrFQYCLV5KVLKHg==} - engines: {node: '>=14'} - hasBin: true - dependencies: - '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.0.5(rollup@2.79.1) - '@unocss/config': 0.55.7 - '@unocss/core': 0.55.7 - '@unocss/preset-uno': 0.55.7 - cac: 6.7.14 - chokidar: 3.5.3 - colorette: 2.0.20 - consola: 3.2.3 - fast-glob: 3.3.1 - magic-string: 0.30.5 - pathe: 1.1.1 - perfect-debounce: 1.0.0 + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.5.0) + vite: 4.5.0(@types/node@18.17.5) transitivePeerDependencies: - rollup dev: true @@ -5135,14 +5135,6 @@ packages: - rollup dev: true - /@unocss/config@0.55.7: - resolution: {integrity: sha512-+X6rPScyFEWbkZyCyM+HfoJhJNN+CEl2n2izWkm0kuDj3w9fY9B3f/0dsk+jmx/gJEI5Y797q9zspNMNDib1AA==} - engines: {node: '>=14'} - dependencies: - '@unocss/core': 0.55.7 - unconfig: 0.3.11 - dev: true - /@unocss/config@0.57.1: resolution: {integrity: sha512-mbuVO0mH1PX7rEkViMNWb3jG1ji7TUydo2DdnMHhJE+dOrGtnQzhzXGlAd4qqel1fnt/VWuOyZKwJA3QO6VCtg==} engines: {node: '>=14'} @@ -5151,33 +5143,16 @@ packages: unconfig: 0.3.11 dev: true - /@unocss/core@0.55.7: - resolution: {integrity: sha512-c+bWe844Xjlwc1EPwHj0+n3LpntJG7ELPbEOOxNIG+CQdcEX0l1G0rkM8+nKstJ9WJmgpf1HdJQLVMF62HXvhw==} - dev: true - /@unocss/core@0.57.1: resolution: {integrity: sha512-cqQW/4gCuk+bFMPg9lBanuRNQ9Lx1l4PpMN/6uKxI5WROpq7ce/Xb4uGvAxKLh3ITtFSpXs2cLfsy7QD6cVD/Q==} dev: true - /@unocss/extractor-arbitrary-variants@0.55.7: - resolution: {integrity: sha512-imK2g/frlo5Ag0uVB+C/Psyo5+9AnqhoRAgYa6gyrQ/TJnrnwf+M3jFngU9evIMHw92vig1DGfPa2ZId901DwQ==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/extractor-arbitrary-variants@0.57.1: resolution: {integrity: sha512-9s+azHhBnwjxm46TsD1RY0krDAwOR8tcw58Vtl3emd6C0VQsAOdoprt7UHE7GEXMvDVq7nMf8lAT0BM0LteW3w==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/inspector@0.55.7: - resolution: {integrity: sha512-N0mjZozDDyqx8Mh6C/ZlMTlDzGiq22sXY/hPRX55Cf44WZI4W/ZWajqAAp42B+lw2MN0k1FYEMIAwn9n+xgq/g==} - dependencies: - gzip-size: 6.0.0 - sirv: 2.0.3 - dev: true - /@unocss/inspector@0.57.1: resolution: {integrity: sha512-qV7ta7iHGX2EpZJ4IWY/05kgyhKFeWlvVJbrOnGsaH8gVt33T/43YAhB/8K5GIXBXIwkhwk13iB13nlg2gSheg==} dependencies: @@ -5186,20 +5161,6 @@ packages: sirv: 2.0.3 dev: true - /@unocss/postcss@0.55.7(postcss@8.4.31): - resolution: {integrity: sha512-53Z/yv/CNdlTqKZQ9gpYRoLZSuzQ28J0SDrGCdzwjLcvHG/FD7/x1S7yxE7cUp/4sjvLL15HSzkWq8vNy6SkwQ==} - engines: {node: '>=14'} - peerDependencies: - postcss: ^8.4.21 - dependencies: - '@unocss/config': 0.55.7 - '@unocss/core': 0.55.7 - css-tree: 2.3.1 - fast-glob: 3.3.1 - magic-string: 0.30.5 - postcss: 8.4.31 - dev: true - /@unocss/postcss@0.57.1(postcss@8.4.31): resolution: {integrity: sha512-DexrV+v/qkVh6t660rXigNr2Y6lON8jxD1z2KVk2bjHKhFflF6q6seps6d/MquyLJI1mXF2uANTeFAeL2q6evw==} engines: {node: '>=14'} @@ -5215,28 +5176,12 @@ packages: postcss: 8.4.31 dev: true - /@unocss/preset-attributify@0.55.7: - resolution: {integrity: sha512-L1sNw3DyM4mymIm4DBTTTOllk8LmhYlWMgDlaAW2MYWygjqDCsp99wRKT2175Ya5xHYBA6XetMoBryZD23qJYQ==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/preset-attributify@0.57.1: resolution: {integrity: sha512-pvGQHaqBlB0jQysWhNbcKLOGrkj8b53k0sAa9LYxQjD1fa8t/dwbuMpZv4twX+gysF0vBhxRoWBPLH1/S6zRZg==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/preset-icons@0.55.7: - resolution: {integrity: sha512-JXLOHkyEKKAjLTqjAxYfhwln05WXilGg3jctkZWKpMNawPaonrGt3kZT12YMuMmOryxk7UcyKB0dtYc+p3QYvw==} - dependencies: - '@iconify/utils': 2.1.11 - '@unocss/core': 0.55.7 - ofetch: 1.3.3 - transitivePeerDependencies: - - supports-color - dev: true - /@unocss/preset-icons@0.57.1: resolution: {integrity: sha512-ve4jC6yREfS0mv97DCld9xLjMuiSCcsQPKucdtpUfCjLMqtGd1ZGGdFv02Q+92NkW7HDfgj+izEw1SKh9695Ow==} dependencies: @@ -5247,13 +5192,6 @@ packages: - supports-color dev: true - /@unocss/preset-mini@0.55.7: - resolution: {integrity: sha512-ZCskE2uprjGkpQezEPM6KPMf84rIZEUNc1p2DxWVHaFUPRV24/JSNsO4PsKrQgNIb2dLQxzPNlMzQJI7ssdBXQ==} - dependencies: - '@unocss/core': 0.55.7 - '@unocss/extractor-arbitrary-variants': 0.55.7 - dev: true - /@unocss/preset-mini@0.57.1: resolution: {integrity: sha512-v9ZsIUGDfZNXbIrOc7zrBp+RFbFFGSQN/vKIf761js4fJ31j6lan4pPQPGcY17xHConkI1HJT/+yb/UVJaAcHw==} dependencies: @@ -5262,25 +5200,12 @@ packages: '@unocss/rule-utils': 0.57.1 dev: true - /@unocss/preset-tagify@0.55.7: - resolution: {integrity: sha512-aDsuN3a/ZirbCDKpFsue9tc8MHs3l0Rl81n2ZOdIrJoZW4YWyydMVl++cz/HERZW81ZySK8EJKwGBaMJMgsnHA==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/preset-tagify@0.57.1: resolution: {integrity: sha512-GV8knxnsOVH/XiG2KB+mVZeEJqr0PZvvkSTPftGPbjttoKVZ+28Y5q9/qezH7p4W6RYVAAK+3qHHy5wWZosiMw==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/preset-typography@0.55.7: - resolution: {integrity: sha512-hLV4nsgsDIk66pt7Ej4NYUmaGtI2EfGb1h2yl5FmBtdtACrgPq+Skr2Br9Iq+Bj1QFhbsMOWLDdbojFQwBdH6A==} - dependencies: - '@unocss/core': 0.55.7 - '@unocss/preset-mini': 0.55.7 - dev: true - /@unocss/preset-typography@0.57.1: resolution: {integrity: sha512-C4cqCiGW0OSoSXsVQKgfLulYxY5C8M40f+a8VtBlAaEaN6eSlEt+catXb0chF9T2mvz/b87b0PahPvPwJdDf1Q==} dependencies: @@ -5288,14 +5213,6 @@ packages: '@unocss/preset-mini': 0.57.1 dev: true - /@unocss/preset-uno@0.55.7: - resolution: {integrity: sha512-z4pCxOv/OU1ARo++cvbijWNW2zy/EVTMqJXa+SEep9b99wFXPQE3gaPvLdURp/e5f1PoxVyPZ6JiBknbClSDuA==} - dependencies: - '@unocss/core': 0.55.7 - '@unocss/preset-mini': 0.55.7 - '@unocss/preset-wind': 0.55.7 - dev: true - /@unocss/preset-uno@0.57.1: resolution: {integrity: sha512-0+DKZiowYjYzq2swJzQA2dhqDvLJdm0Y437ITzc2GzZMKGUUuNi+w2v3/SzwkpkRd9zTB9/YaOIJVfdrx6ZOXQ==} dependencies: @@ -5305,13 +5222,6 @@ packages: '@unocss/rule-utils': 0.57.1 dev: true - /@unocss/preset-web-fonts@0.55.7: - resolution: {integrity: sha512-ygAz0540kdBapErW2BcObWfQT/6g0SpVUPYg92PPiZD57CZAvuNXiYTfFMRXd88QrBL1zIrZ6NrzY0NZ645H+w==} - dependencies: - '@unocss/core': 0.55.7 - ofetch: 1.3.3 - dev: true - /@unocss/preset-web-fonts@0.57.1: resolution: {integrity: sha512-9DCIMlBRaGrljLmeciH4WqP+uRx2z2nLxvrvEmGbpJJpMn2H4higR5Zu5tDyKYGr9QBl9vXdWgib+43OSswkqA==} dependencies: @@ -5319,13 +5229,6 @@ packages: ofetch: 1.3.3 dev: true - /@unocss/preset-wind@0.55.7: - resolution: {integrity: sha512-vLi0mtYDnvx3uYtBR4fSCR52T59drTUp3XVAAqQTbhvRctnSWm65MWE4G+gqdt2qQ9fM4SVCsxLLaXuJkI2eqw==} - dependencies: - '@unocss/core': 0.55.7 - '@unocss/preset-mini': 0.55.7 - dev: true - /@unocss/preset-wind@0.57.1: resolution: {integrity: sha512-5UairNahUXNDe9AggPtTCodyPjl6NgPCsiEB22LVgN20UjBXjaqzN5wUe1OgtpLoAUaSk0KI7eLWhnWbTbST3A==} dependencies: @@ -5334,10 +5237,6 @@ packages: '@unocss/rule-utils': 0.57.1 dev: true - /@unocss/reset@0.55.7: - resolution: {integrity: sha512-yvmLhxqUNgf6wue7IvhV/FdrQW9H9LF1Bmmhwwaiz2aV0E74aN4pbuYPZwNq3YafsQvNQ0UdtuXjddY4QMRCPw==} - dev: true - /@unocss/reset@0.57.1: resolution: {integrity: sha512-f/ofoudjFN/HMtv1XV5phP58pOmNruBhr0GbVdBNylyieMQkFHowA7iSemChnC/fTbCcY6oSOAcFl4n9AefjdA==} dev: true @@ -5350,57 +5249,28 @@ packages: magic-string: 0.30.5 dev: true - /@unocss/scope@0.55.7: - resolution: {integrity: sha512-r0CaS1aSpcC37ztqOJ3qaWIzM6zwdlX8r0rib2vTvWTckw1J0ocVhjNkWRBM9kRWte006JhecdiZzXNHA40akg==} - dev: true - /@unocss/scope@0.57.1: resolution: {integrity: sha512-ZAzg6lLGwKNQGCvJXEie3TvGztkAyajEFqygu0mjtHb+CmDql4iAjoygs+3dnRI5hSDwfMYFrJ2azX26+2CsoA==} dev: true - /@unocss/transformer-attributify-jsx-babel@0.55.7: - resolution: {integrity: sha512-xl5K/Zg7tLyI6Oee+xHgvBm0gSEviYdBDwaGC4O6cP9VXTBm6waz9NUU6CmmVYKh4dSeLQ1PKNboMeg2nFuJMw==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/transformer-attributify-jsx-babel@0.57.1: resolution: {integrity: sha512-EOCPB8OGmhroAuFU0i0W5p6GmJpx6mAkP4KmsqVLd4QMgw+8aXkG7SKyLnxQZnekM0/dSo0TcpVGeGrZaUNgvQ==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/transformer-attributify-jsx@0.55.7: - resolution: {integrity: sha512-ZyUBc0wguBhd+nbIlcrSYpmzKtqBi+8BII8SK4lIB/Ol1wBboByPTjBENsQkxRyffp5K9VTuZZ/LamFgPGOWDg==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/transformer-attributify-jsx@0.57.1: resolution: {integrity: sha512-ohgSEwm2j98ltPWl1zRPvZhRjQPpd7qZtgoROTQh6n2W7wEO1SlnYjgBBz+pGuo2dkfBN5NjuZJ93AEjS10Ysw==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/transformer-compile-class@0.55.7: - resolution: {integrity: sha512-tiYiT9EG4ucSBvMo+9Hv43GY0YvXQjfQCXDhDm3tcJyreMg6BRMO412eir54RBS+JAdNU0DUoITVYu+PkF7hLg==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/transformer-compile-class@0.57.1: resolution: {integrity: sha512-z0WZN6hbgpyBm2xqIrojqEjpQMhiyzHRbaBjWzI/6ieHWoFo5ajIwnReaFUEfJRNruLTd7/9hFDZdRXRPhttFw==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/transformer-directives@0.55.7: - resolution: {integrity: sha512-xNmR40FssHWYJSmJv/9TQC2IdTyZPV8U3Iv/PIuke1zndMwMciclghEFiw0wSeRmhoRI7iFZck5EI/Bokyo7CQ==} - dependencies: - '@unocss/core': 0.55.7 - css-tree: 2.3.1 - dev: true - /@unocss/transformer-directives@0.57.1: resolution: {integrity: sha512-rIk3XEU2NywEJUOkngBSmJfvS3IVgxkkqgMvuIqz8ZDbwWhepuMxsiI0QR3ypkipGr/eKK5DJ7eK0OVlo6FPFA==} dependencies: @@ -5409,39 +5279,33 @@ packages: css-tree: 2.3.1 dev: true - /@unocss/transformer-variant-group@0.55.7: - resolution: {integrity: sha512-uLyZ08XXVriUDenZCTGA3xGgMD3B9GVr6mSz002pDlLpQDi8FcMQTOGg8X4ViCGzS3l03S/+r+JY7kJTpMFa9w==} - dependencies: - '@unocss/core': 0.55.7 - dev: true - /@unocss/transformer-variant-group@0.57.1: resolution: {integrity: sha512-qwydzn2Lqz/8zW6UUXdORaUl8humsG8ll74LN/z8cjEsqtXZkVdkV0l6Brpp9Xp/XPbKwO+II+KH3/1LGwXSzQ==} dependencies: '@unocss/core': 0.57.1 dev: true - /@unocss/vite@0.55.7(rollup@2.79.1)(vite@4.5.0): - resolution: {integrity: sha512-xmdyDnt9Ag4o7DGl22/P6MaB+HSjWOQw9qYYzIefSv3SVUvn3cEhIX/PCWqFp8Kts2HyvAoJLbZmygSf1XdZNQ==} + /@unocss/vite@0.57.1(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-kEBDvGgQNkX2n87S6Ao5seyFb1kuWZ5p96dGOS7VFpD7HvR5xholkJXaVhUK9/exCldjLExbo5UtVlbxFLUFYg==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.0.5(rollup@2.79.1) - '@unocss/config': 0.55.7 - '@unocss/core': 0.55.7 - '@unocss/inspector': 0.55.7 - '@unocss/scope': 0.55.7 - '@unocss/transformer-directives': 0.55.7 + '@unocss/config': 0.57.1 + '@unocss/core': 0.57.1 + '@unocss/inspector': 0.57.1 + '@unocss/scope': 0.57.1 + '@unocss/transformer-directives': 0.57.1 chokidar: 3.5.3 fast-glob: 3.3.1 magic-string: 0.30.5 - vite: 4.5.0(@types/node@18.17.5) + vite: 4.4.9(@types/node@18.17.5) transitivePeerDependencies: - rollup dev: true - /@unocss/vite@0.57.1(rollup@2.79.1)(vite@4.4.9): + /@unocss/vite@0.57.1(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-kEBDvGgQNkX2n87S6Ao5seyFb1kuWZ5p96dGOS7VFpD7HvR5xholkJXaVhUK9/exCldjLExbo5UtVlbxFLUFYg==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 @@ -5456,7 +5320,7 @@ packages: chokidar: 3.5.3 fast-glob: 3.3.1 magic-string: 0.30.5 - vite: 4.4.9(@types/node@18.17.5) + vite: 4.5.0(@types/node@18.17.5) transitivePeerDependencies: - rollup dev: true @@ -15784,11 +15648,11 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unocss@0.55.7(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0): - resolution: {integrity: sha512-3W9P7vj2EhSk/4oPCHBS0VgrwSf5zZL6Az1/XARVOpBnRJtCM2szFInYxHkMgt9pkZTsW8SFCuk/g+QIJ6A8tg==} + /unocss@0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.9): + resolution: {integrity: sha512-xLsyJ8+T1/Ux93yrqOvuQy268wF5rSzydlsbqZ5EVfi01PxYyydez3nycPqbyPZientkJ0Yohzd5aBqmZgku3A==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 0.55.7 + '@unocss/webpack': 0.57.1 vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 peerDependenciesMeta: '@unocss/webpack': @@ -15796,34 +15660,34 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.55.7(rollup@2.79.1)(vite@4.5.0) - '@unocss/cli': 0.55.7(rollup@2.79.1) - '@unocss/core': 0.55.7 - '@unocss/extractor-arbitrary-variants': 0.55.7 - '@unocss/postcss': 0.55.7(postcss@8.4.31) - '@unocss/preset-attributify': 0.55.7 - '@unocss/preset-icons': 0.55.7 - '@unocss/preset-mini': 0.55.7 - '@unocss/preset-tagify': 0.55.7 - '@unocss/preset-typography': 0.55.7 - '@unocss/preset-uno': 0.55.7 - '@unocss/preset-web-fonts': 0.55.7 - '@unocss/preset-wind': 0.55.7 - '@unocss/reset': 0.55.7 - '@unocss/transformer-attributify-jsx': 0.55.7 - '@unocss/transformer-attributify-jsx-babel': 0.55.7 - '@unocss/transformer-compile-class': 0.55.7 - '@unocss/transformer-directives': 0.55.7 - '@unocss/transformer-variant-group': 0.55.7 - '@unocss/vite': 0.55.7(rollup@2.79.1)(vite@4.5.0) - vite: 4.5.0(@types/node@18.17.5) + '@unocss/astro': 0.57.1(rollup@2.79.1)(vite@4.4.9) + '@unocss/cli': 0.57.1(rollup@2.79.1) + '@unocss/core': 0.57.1 + '@unocss/extractor-arbitrary-variants': 0.57.1 + '@unocss/postcss': 0.57.1(postcss@8.4.31) + '@unocss/preset-attributify': 0.57.1 + '@unocss/preset-icons': 0.57.1 + '@unocss/preset-mini': 0.57.1 + '@unocss/preset-tagify': 0.57.1 + '@unocss/preset-typography': 0.57.1 + '@unocss/preset-uno': 0.57.1 + '@unocss/preset-web-fonts': 0.57.1 + '@unocss/preset-wind': 0.57.1 + '@unocss/reset': 0.57.1 + '@unocss/transformer-attributify-jsx': 0.57.1 + '@unocss/transformer-attributify-jsx-babel': 0.57.1 + '@unocss/transformer-compile-class': 0.57.1 + '@unocss/transformer-directives': 0.57.1 + '@unocss/transformer-variant-group': 0.57.1 + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.4.9) + vite: 4.4.9(@types/node@18.17.5) transitivePeerDependencies: - postcss - rollup - supports-color dev: true - /unocss@0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.9): + /unocss@0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-xLsyJ8+T1/Ux93yrqOvuQy268wF5rSzydlsbqZ5EVfi01PxYyydez3nycPqbyPZientkJ0Yohzd5aBqmZgku3A==} engines: {node: '>=14'} peerDependencies: @@ -15835,7 +15699,7 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.57.1(rollup@2.79.1)(vite@4.4.9) + '@unocss/astro': 0.57.1(rollup@2.79.1)(vite@4.5.0) '@unocss/cli': 0.57.1(rollup@2.79.1) '@unocss/core': 0.57.1 '@unocss/extractor-arbitrary-variants': 0.57.1 @@ -15854,8 +15718,8 @@ packages: '@unocss/transformer-compile-class': 0.57.1 '@unocss/transformer-directives': 0.57.1 '@unocss/transformer-variant-group': 0.57.1 - '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.4.9) - vite: 4.4.9(@types/node@18.17.5) + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.5.0) + vite: 4.5.0(@types/node@18.17.5) transitivePeerDependencies: - postcss - rollup @@ -16237,49 +16101,6 @@ packages: - terser dev: true - /vitepress@1.0.0-rc.12(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0)(typescript@5.1.6): - resolution: {integrity: sha512-mZknN5l9lgbBjXwumwdOQQDM+gPivswFEykEQeenY0tv7eocS+bb801IpFZT3mFV6YRhSddmbutHlFgPPADjEg==} - hasBin: true - dependencies: - '@docsearch/css': 3.5.2 - '@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0) - '@vue/devtools-api': 6.5.1 - '@vueuse/core': 10.5.0(vue@3.3.7) - '@vueuse/integrations': 10.5.0(focus-trap@7.5.4)(vue@3.3.7) - focus-trap: 7.5.4 - mark.js: 8.11.1 - minisearch: 6.1.0 - shiki: 0.14.5 - vite: 4.5.0(@types/node@18.17.5) - vue: 3.3.7(typescript@5.1.6) - 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 - - search-insights - - sortablejs - - stylus - - sugarss - - terser - - typescript - - universal-cookie - dev: true - /vitepress@1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): resolution: {integrity: sha512-1dqWiHNThNrVZ08ixmfEDBEH+764KOgnev9oXga/x6cN++Vb9pnuu8p3K6DQP+KZrYcG+WiX7jxal0iSNpAWuQ==} hasBin: true From 38b3a2080b836872c067842cd6f3b5449112a1bb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 20 Nov 2023 00:29:13 +0530 Subject: [PATCH 071/316] 5043 Allow registered diagrams to be overridden. --- .../mermaid/src/diagram-api/detectType.ts | 5 +- .../mermaid/src/diagram-api/diagramAPI.ts | 2 +- packages/mermaid/src/diagram.spec.ts | 56 ++++++++++++------- packages/mermaid/src/mermaid.ts | 2 + 4 files changed, 42 insertions(+), 23 deletions(-) diff --git a/packages/mermaid/src/diagram-api/detectType.ts b/packages/mermaid/src/diagram-api/detectType.ts index ba78dbe55e..aed8ca964e 100644 --- a/packages/mermaid/src/diagram-api/detectType.ts +++ b/packages/mermaid/src/diagram-api/detectType.ts @@ -71,10 +71,9 @@ export const registerLazyLoadedDiagrams = (...diagrams: ExternalDiagramDefinitio export const addDetector = (key: string, detector: DiagramDetector, loader?: DiagramLoader) => { if (detectors[key]) { - log.error(`Detector with key ${key} already exists`); - } else { - detectors[key] = { detector, loader }; + log.warn(`Detector with key ${key} already exists. Overwriting.`); } + detectors[key] = { detector, loader }; log.debug(`Detector with key ${key} added${loader ? ' with loader' : ''}`); }; diff --git a/packages/mermaid/src/diagram-api/diagramAPI.ts b/packages/mermaid/src/diagram-api/diagramAPI.ts index 7ca9d58043..5ea3825ef5 100644 --- a/packages/mermaid/src/diagram-api/diagramAPI.ts +++ b/packages/mermaid/src/diagram-api/diagramAPI.ts @@ -49,7 +49,7 @@ export const registerDiagram = ( detector?: DiagramDetector ) => { if (diagrams[id]) { - throw new Error(`Diagram ${id} already registered.`); + log.warn(`Diagram with id ${id} already registered. Overwriting.`); } diagrams[id] = diagram; if (detector) { diff --git a/packages/mermaid/src/diagram.spec.ts b/packages/mermaid/src/diagram.spec.ts index d116399ac1..c73fb0a3b0 100644 --- a/packages/mermaid/src/diagram.spec.ts +++ b/packages/mermaid/src/diagram.spec.ts @@ -2,9 +2,32 @@ import { describe, test, expect } from 'vitest'; import { Diagram, getDiagramFromText } from './Diagram.js'; import { addDetector } from './diagram-api/detectType.js'; import { addDiagrams } from './diagram-api/diagram-orchestration.js'; +import type { DiagramLoader } from './diagram-api/types.js'; addDiagrams(); +const getDummyDiagram = (id: string, title?: string): Awaited> => { + return { + id, + diagram: { + db: { + getDiagramTitle: () => title ?? id, + }, + parser: { + parse: () => { + // no-op + }, + }, + renderer: { + draw: () => { + // no-op + }, + }, + styles: {}, + }, + }; +}; + describe('diagram detection', () => { test('should detect inbuilt diagrams', async () => { const graph = (await getDiagramFromText('graph TD; A-->B')) as Diagram; @@ -21,30 +44,25 @@ describe('diagram detection', () => { addDetector( 'loki', (str) => str.startsWith('loki'), - () => - Promise.resolve({ - id: 'loki', - diagram: { - db: {}, - parser: { - parse: () => { - // no-op - }, - }, - renderer: { - draw: () => { - // no-op - }, - }, - styles: {}, - }, - }) + () => Promise.resolve(getDummyDiagram('loki')) ); - const diagram = (await getDiagramFromText('loki TD; A-->B')) as Diagram; + const diagram = await getDiagramFromText('loki TD; A-->B'); expect(diagram).toBeInstanceOf(Diagram); expect(diagram.type).toBe('loki'); }); + test('should allow external diagrams to override internal ones with same ID', async () => { + const title = 'overridden'; + addDetector( + 'flowchart-elk', + (str) => str.startsWith('flowchart-elk'), + () => Promise.resolve(getDummyDiagram('flowchart-elk', title)) + ); + const diagram = await getDiagramFromText('flowchart-elk TD; A-->B'); + expect(diagram).toBeInstanceOf(Diagram); + expect(diagram.db.getDiagramTitle?.()).toBe(title); + }); + test('should throw the right error for incorrect diagram', async () => { await expect(getDiagramFromText('graph TD; A-->')).rejects.toThrowErrorMatchingInlineSnapshot(` "Parse error on line 2: diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index a6d4954714..99c3b7491b 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -15,6 +15,7 @@ import { isDetailedError } from './utils.js'; import type { DetailedError } from './utils.js'; import type { ExternalDiagramDefinition } from './diagram-api/types.js'; import type { UnknownDiagramError } from './errors.js'; +import { addDiagrams } from './diagram-api/diagram-orchestration.js'; export type { MermaidConfig, @@ -243,6 +244,7 @@ const registerExternalDiagrams = async ( lazyLoad?: boolean; } = {} ) => { + addDiagrams(); registerLazyLoadedDiagrams(...diagrams); if (lazyLoad === false) { await loadRegisteredDiagrams(); From a1c0761ef93728b6c32474deb72665315ab86f87 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 01:43:47 +0000 Subject: [PATCH 072/316] Update all minor dependencies --- packages/mermaid/src/docs/package.json | 4 +-- pnpm-lock.yaml | 35 +++++++++++++++++--------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/packages/mermaid/src/docs/package.json b/packages/mermaid/src/docs/package.json index 87777eb9fe..af7f69b2e0 100644 --- a/packages/mermaid/src/docs/package.json +++ b/packages/mermaid/src/docs/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@iconify-json/carbon": "^1.1.16", "@unocss/reset": "^0.57.0", - "@vite-pwa/vitepress": "^0.2.0", + "@vite-pwa/vitepress": "^0.3.0", "@vitejs/plugin-vue": "^4.2.1", "fast-glob": "^3.2.12", "https-localhost": "^4.7.1", @@ -31,7 +31,7 @@ "unocss": "^0.57.0", "unplugin-vue-components": "^0.25.0", "vite": "^4.3.9", - "vite-plugin-pwa": "^0.16.0", + "vite-plugin-pwa": "^0.17.0", "vitepress": "1.0.0-rc.25", "workbox-window": "^7.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1106439c89..22dc07b7c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -448,8 +448,8 @@ importers: specifier: ^0.57.0 version: 0.57.1 '@vite-pwa/vitepress': - specifier: ^0.2.0 - version: 0.2.0(vite-plugin-pwa@0.16.0) + specifier: ^0.3.0 + version: 0.3.0(vite-plugin-pwa@0.17.0) '@vitejs/plugin-vue': specifier: ^4.2.1 version: 4.2.1(vite@4.4.9)(vue@3.3.4) @@ -472,8 +472,8 @@ importers: specifier: ^4.3.9 version: 4.4.9(@types/node@18.17.5) vite-plugin-pwa: - specifier: ^0.16.0 - version: 0.16.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0) + specifier: ^0.17.0 + version: 0.17.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: specifier: 1.0.0-rc.25 version: 1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) @@ -5178,12 +5178,12 @@ packages: - rollup dev: true - /@vite-pwa/vitepress@0.2.0(vite-plugin-pwa@0.16.0): - resolution: {integrity: sha512-dVQVaP6NB9woCFe4UASUqRp7uwBQJOVXlJlqK4krqXcbb3NuXIXIWOnU7HLpJnHqZj5U/81gKtLN6gs5gJBwiQ==} + /@vite-pwa/vitepress@0.3.0(vite-plugin-pwa@0.17.0): + resolution: {integrity: sha512-7akiTt0laHJRSJ7lxPttGHYBoC2J+FgWJr0TGYQd2jPe/8nou+YSDwBGpOV+/qeobX2uzff8kew02n/07JRe9Q==} peerDependencies: - vite-plugin-pwa: '>=0.16.3 <1' + vite-plugin-pwa: '>=0.17.0 <1' dependencies: - vite-plugin-pwa: 0.16.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0) + vite-plugin-pwa: 0.17.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0) dev: true /@vitejs/plugin-vue@4.2.1(vite@4.4.9)(vue@3.3.4): @@ -9189,6 +9189,17 @@ packages: merge2: 1.4.1 micromatch: 4.0.5 + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true @@ -15693,16 +15704,16 @@ packages: - supports-color dev: true - /vite-plugin-pwa@0.16.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0): - resolution: {integrity: sha512-E+AQRzHxqNU4ZhEeR8X37/foZB+ezJEhXauE/mcf1UITY6k2Pa1dtlFl+BQu57fTdiVlWim5S0Qy44Yap93Dkg==} + /vite-plugin-pwa@0.17.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0): + resolution: {integrity: sha512-cOyEG8EEc7JHmyMapTnjK2j0g2BIC3ErlmOHyGzVu8hqjyF9Jt6yWMmVNFtpA6v/NNyzP28ARf3vwzIAzR1kaw==} engines: {node: '>=16.0.0'} peerDependencies: - vite: ^3.1.0 || ^4.0.0 + vite: ^3.1.0 || ^4.0.0 || ^5.0.0 workbox-build: ^7.0.0 workbox-window: ^7.0.0 dependencies: debug: 4.3.4(supports-color@8.1.1) - fast-glob: 3.2.12 + fast-glob: 3.3.2 pretty-bytes: 6.1.1 vite: 4.4.9(@types/node@18.17.5) workbox-build: 7.0.0 From 8405454a1ae5bf449a55d81c2aca9e12dafb9f5d Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Sun, 19 Nov 2023 20:32:20 -0800 Subject: [PATCH 073/316] add latest blog post --- docs/news/announcements.md | 14 ++++---------- docs/news/blog.md | 6 ++++++ packages/mermaid/src/docs/news/announcements.md | 14 ++++---------- packages/mermaid/src/docs/news/blog.md | 6 ++++++ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/news/announcements.md b/docs/news/announcements.md index fc9c5c9316..79e32f2f01 100644 --- a/docs/news/announcements.md +++ b/docs/news/announcements.md @@ -6,16 +6,10 @@ # Announcements -Check out our latest blog posts below. +Check out our latest blog posts below. See more blog posts [here](blog.md). -## [How to Use Mermaid Chart as an AI Diagram Generator](https://www.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator/) +## [5 Reasons You Should Be Using Mermaid Chart As Your Diagram Generator](https://www.mermaidchart.com/blog/posts/5-reasons-you-should-be-using-mermaid-chart-as-your-diagram-generator/) -1 November 2023 · 5 mins +14 November 2023 · 5 mins -Would an AI diagram generator make your life easier? - -## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) - -12 October 2023 · 4 mins - -Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. +Mermaid Chart, a user-friendly, code-based diagram generator with AI integrations, templates, collaborative tools, and plugins for developers, streamlines the process of creating and sharing diagrams, enhancing both creativity and collaboration. diff --git a/docs/news/blog.md b/docs/news/blog.md index 7c36901293..da20ed1bb6 100644 --- a/docs/news/blog.md +++ b/docs/news/blog.md @@ -6,6 +6,12 @@ # Blog +## [5 Reasons You Should Be Using Mermaid Chart As Your Diagram Generator](https://www.mermaidchart.com/blog/posts/5-reasons-you-should-be-using-mermaid-chart-as-your-diagram-generator/) + +14 November 2023 · 5 mins + +Mermaid Chart, a user-friendly, code-based diagram generator with AI integrations, templates, collaborative tools, and plugins for developers, streamlines the process of creating and sharing diagrams, enhancing both creativity and collaboration. + ## [How to Use Mermaid Chart as an AI Diagram Generator](https://www.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator/) 1 November 2023 · 5 mins diff --git a/packages/mermaid/src/docs/news/announcements.md b/packages/mermaid/src/docs/news/announcements.md index 980d69eb06..7093d6fba0 100644 --- a/packages/mermaid/src/docs/news/announcements.md +++ b/packages/mermaid/src/docs/news/announcements.md @@ -1,15 +1,9 @@ # Announcements -Check out our latest blog posts below. +Check out our latest blog posts below. See more blog posts [here](blog.md). -## [How to Use Mermaid Chart as an AI Diagram Generator](https://www.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator/) +## [5 Reasons You Should Be Using Mermaid Chart As Your Diagram Generator](https://www.mermaidchart.com/blog/posts/5-reasons-you-should-be-using-mermaid-chart-as-your-diagram-generator/) -1 November 2023 · 5 mins +14 November 2023 · 5 mins -Would an AI diagram generator make your life easier? - -## [Diagrams, Made Even Easier: Introducing “Code Snippets” in the Mermaid Chart Editor](https://www.mermaidchart.com/blog/posts/easier-diagram-editing-with-code-snippets/) - -12 October 2023 · 4 mins - -Mermaid Chart introduces Code Snippets in its editor, streamlining the diagramming process for developers and professionals. +Mermaid Chart, a user-friendly, code-based diagram generator with AI integrations, templates, collaborative tools, and plugins for developers, streamlines the process of creating and sharing diagrams, enhancing both creativity and collaboration. diff --git a/packages/mermaid/src/docs/news/blog.md b/packages/mermaid/src/docs/news/blog.md index 881cbb7d13..d9bf6a8b72 100644 --- a/packages/mermaid/src/docs/news/blog.md +++ b/packages/mermaid/src/docs/news/blog.md @@ -1,5 +1,11 @@ # Blog +## [5 Reasons You Should Be Using Mermaid Chart As Your Diagram Generator](https://www.mermaidchart.com/blog/posts/5-reasons-you-should-be-using-mermaid-chart-as-your-diagram-generator/) + +14 November 2023 · 5 mins + +Mermaid Chart, a user-friendly, code-based diagram generator with AI integrations, templates, collaborative tools, and plugins for developers, streamlines the process of creating and sharing diagrams, enhancing both creativity and collaboration. + ## [How to Use Mermaid Chart as an AI Diagram Generator](https://www.mermaidchart.com/blog/posts/how-to-use-mermaid-chart-as-an-ai-diagram-generator/) 1 November 2023 · 5 mins From cbc97dacdf9adc6f8c7d493341a27fce3768e7f0 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Sun, 19 Nov 2023 20:39:18 -0800 Subject: [PATCH 074/316] fix broken link --- docs/ecosystem/integrations-community.md | 2 +- packages/mermaid/src/docs/ecosystem/integrations-community.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 4d79ce244e..00d482fee9 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -171,7 +171,7 @@ Communication tools and platforms ### Document Generation - [Docusaurus](https://docusaurus.io/docs/markdown-features/diagrams) ✅ -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/Features/diagrams-and-charts) +- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) - [Sphinx](https://www.sphinx-doc.org/en/master/) - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) - [remark](https://remark.js.org/) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index da53f363fc..6ad8945d32 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -169,7 +169,7 @@ Communication tools and platforms ### Document Generation - [Docusaurus](https://docusaurus.io/docs/markdown-features/diagrams) ✅ -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/Features/diagrams-and-charts) +- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) - [Sphinx](https://www.sphinx-doc.org/en/master/) - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) - [remark](https://remark.js.org/) From 3ba0fee40670e65e3ddea5c95d60afd6ac8a245b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 09:56:45 +0000 Subject: [PATCH 075/316] Update all patch dependencies --- package.json | 2 +- packages/mermaid/src/docs/package.json | 2 +- pnpm-lock.yaml | 566 +++++++++++++++++++++++-- 3 files changed, 523 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index d2ca53ce02..1b8a120f5d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.2.4", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@8.10.4", + "packageManager": "pnpm@8.10.5", "keywords": [ "diagram", "markdown", diff --git a/packages/mermaid/src/docs/package.json b/packages/mermaid/src/docs/package.json index af7f69b2e0..c95a8aeda4 100644 --- a/packages/mermaid/src/docs/package.json +++ b/packages/mermaid/src/docs/package.json @@ -32,7 +32,7 @@ "unplugin-vue-components": "^0.25.0", "vite": "^4.3.9", "vite-plugin-pwa": "^0.17.0", - "vitepress": "1.0.0-rc.25", + "vitepress": "1.0.0-rc.29", "workbox-window": "^7.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22dc07b7c7..b0bc7c2849 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -475,8 +475,8 @@ importers: specifier: ^0.17.0 version: 0.17.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: - specifier: 1.0.0-rc.25 - version: 1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) + specifier: 1.0.0-rc.29 + version: 1.0.0-rc.29(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -3029,6 +3029,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.19.6: + resolution: {integrity: sha512-KQ/hbe9SJvIJ4sR+2PcZ41IBV+LPJyYp6V1K1P1xcMRup9iYsBoQn4MzE3mhMLOld27Au2eDcLlIREeKGUXpHQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.18.20: resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} @@ -3047,6 +3056,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.19.6: + resolution: {integrity: sha512-muPzBqXJKCbMYoNbb1JpZh/ynl0xS6/+pLjrofcR3Nad82SbsCogYzUE6Aq9QT3cLP0jR/IVK/NHC9b90mSHtg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.18.20: resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -3065,6 +3083,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.19.6: + resolution: {integrity: sha512-VVJVZQ7p5BBOKoNxd0Ly3xUM78Y4DyOoFKdkdAe2m11jbh0LEU4bPles4e/72EMl4tapko8o915UalN/5zhspg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.18.20: resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -3083,6 +3110,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.19.6: + resolution: {integrity: sha512-91LoRp/uZAKx6ESNspL3I46ypwzdqyDLXZH7x2QYCLgtnaU08+AXEbabY2yExIz03/am0DivsTtbdxzGejfXpA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.18.20: resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -3101,6 +3137,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.19.6: + resolution: {integrity: sha512-QCGHw770ubjBU1J3ZkFJh671MFajGTYMZumPs9E/rqU52md6lIil97BR0CbPq6U+vTh3xnTNDHKRdR8ggHnmxQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.18.20: resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -3119,6 +3164,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.19.6: + resolution: {integrity: sha512-J53d0jGsDcLzWk9d9SPmlyF+wzVxjXpOH7jVW5ae7PvrDst4kiAz6sX+E8btz0GB6oH12zC+aHRD945jdjF2Vg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.18.20: resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -3137,6 +3191,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.19.6: + resolution: {integrity: sha512-hn9qvkjHSIB5Z9JgCCjED6YYVGCNpqB7dEGavBdG6EjBD8S/UcNUIlGcB35NCkMETkdYwfZSvD9VoDJX6VeUVA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.18.20: resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -3155,6 +3218,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.19.6: + resolution: {integrity: sha512-HQCOrk9XlH3KngASLaBfHpcoYEGUt829A9MyxaI8RMkfRA8SakG6YQEITAuwmtzFdEu5GU4eyhKcpv27dFaOBg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.18.20: resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -3173,6 +3245,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.19.6: + resolution: {integrity: sha512-G8IR5zFgpXad/Zp7gr7ZyTKyqZuThU6z1JjmRyN1vSF8j0bOlGzUwFSMTbctLAdd7QHpeyu0cRiuKrqK1ZTwvQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.18.20: resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -3191,6 +3272,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.19.6: + resolution: {integrity: sha512-22eOR08zL/OXkmEhxOfshfOGo8P69k8oKHkwkDrUlcB12S/sw/+COM4PhAPT0cAYW/gpqY2uXp3TpjQVJitz7w==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.18.20: resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -3209,6 +3299,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.19.6: + resolution: {integrity: sha512-82RvaYAh/SUJyjWA8jDpyZCHQjmEggL//sC7F3VKYcBMumQjUL3C5WDl/tJpEiKtt7XrWmgjaLkrk205zfvwTA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.18.20: resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -3227,6 +3326,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.19.6: + resolution: {integrity: sha512-8tvnwyYJpR618vboIv2l8tK2SuK/RqUIGMfMENkeDGo3hsEIrpGldMGYFcWxWeEILe5Fi72zoXLmhZ7PR23oQA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.18.20: resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -3245,6 +3353,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.19.6: + resolution: {integrity: sha512-Qt+D7xiPajxVNk5tQiEJwhmarNnLPdjXAoA5uWMpbfStZB0+YU6a3CtbWYSy+sgAsnyx4IGZjWsTzBzrvg/fMA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.18.20: resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -3263,6 +3380,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.19.6: + resolution: {integrity: sha512-lxRdk0iJ9CWYDH1Wpnnnc640ajF4RmQ+w6oHFZmAIYu577meE9Ka/DCtpOrwr9McMY11ocbp4jirgGgCi7Ls/g==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.18.20: resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -3281,6 +3407,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.19.6: + resolution: {integrity: sha512-MopyYV39vnfuykHanRWHGRcRC3AwU7b0QY4TI8ISLfAGfK+tMkXyFuyT1epw/lM0pflQlS53JoD22yN83DHZgA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.18.20: resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -3299,6 +3434,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.19.6: + resolution: {integrity: sha512-UWcieaBzsN8WYbzFF5Jq7QULETPcQvlX7KL4xWGIB54OknXJjBO37sPqk7N82WU13JGWvmDzFBi1weVBajPovg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.18.20: resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -3317,6 +3461,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.19.6: + resolution: {integrity: sha512-EpWiLX0fzvZn1wxtLxZrEW+oQED9Pwpnh+w4Ffv8ZLuMhUoqR9q9rL4+qHW8F4Mg5oQEKxAoT0G+8JYNqCiR6g==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.18.20: resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -3335,6 +3488,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.19.6: + resolution: {integrity: sha512-fFqTVEktM1PGs2sLKH4M5mhAVEzGpeZJuasAMRnvDZNCV0Cjvm1Hu35moL2vC0DOrAQjNTvj4zWrol/lwQ8Deg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.18.20: resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -3353,6 +3515,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.19.6: + resolution: {integrity: sha512-M+XIAnBpaNvaVAhbe3uBXtgWyWynSdlww/JNZws0FlMPSBy+EpatPXNIlKAdtbFVII9OpX91ZfMb17TU3JKTBA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.18.20: resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -3371,6 +3542,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.19.6: + resolution: {integrity: sha512-2DchFXn7vp/B6Tc2eKdTsLzE0ygqKkNUhUBCNtMx2Llk4POIVMUq5rUYjdcedFlGLeRe1uLCpVvCmE+G8XYybA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.18.20: resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} @@ -3389,6 +3569,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.19.6: + resolution: {integrity: sha512-PBo/HPDQllyWdjwAVX+Gl2hH0dfBydL97BAH/grHKC8fubqp02aL4S63otZ25q3sBdINtOBbz1qTZQfXbP4VBg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.18.20: resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -3407,6 +3596,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.19.6: + resolution: {integrity: sha512-OE7yIdbDif2kKfrGa+V0vx/B3FJv2L4KnIiLlvtibPyO9UkgO3rzYE0HhpREo2vmJ1Ixq1zwm9/0er+3VOSZJA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.47.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3955,6 +4153,102 @@ packages: rollup: 2.79.1 dev: true + /@rollup/rollup-android-arm-eabi@4.5.0: + resolution: {integrity: sha512-OINaBGY+Wc++U0rdr7BLuFClxcoWaVW3vQYqmQq6B3bqQ/2olkaoz+K8+af/Mmka/C2yN5j+L9scBkv4BtKsDA==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.5.0: + resolution: {integrity: sha512-UdMf1pOQc4ZmUA/NTmKhgJTBimbSKnhPS2zJqucqFyBRFPnPDtwA8MzrGNTjDeQbIAWfpJVAlxejw+/lQyBK/w==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.5.0: + resolution: {integrity: sha512-L0/CA5p/idVKI+c9PcAPGorH6CwXn6+J0Ys7Gg1axCbTPgI8MeMlhA6fLM9fK+ssFhqogMHFC8HDvZuetOii7w==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.5.0: + resolution: {integrity: sha512-QZCbVqU26mNlLn8zi/XDDquNmvcr4ON5FYAHQQsyhrHx8q+sQi/6xduoznYXwk/KmKIXG5dLfR0CvY+NAWpFYQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.5.0: + resolution: {integrity: sha512-VpSQ+xm93AeV33QbYslgf44wc5eJGYfYitlQzAi3OObu9iwrGXEnmu5S3ilkqE3Pr/FkgOiJKV/2p0ewf4Hrtg==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.5.0: + resolution: {integrity: sha512-OrEyIfpxSsMal44JpEVx9AEcGpdBQG1ZuWISAanaQTSMeStBW+oHWwOkoqR54bw3x8heP8gBOyoJiGg+fLY8qQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.5.0: + resolution: {integrity: sha512-1H7wBbQuE6igQdxMSTjtFfD+DGAudcYWhp106z/9zBA8OQhsJRnemO4XGavdzHpGhRtRxbgmUGdO3YQgrWf2RA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.5.0: + resolution: {integrity: sha512-FVyFI13tXw5aE65sZdBpNjPVIi4Q5mARnL/39UIkxvSgRAIqCo5sCpCELk0JtXHGee2owZz5aNLbWNfBHzr71Q==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.5.0: + resolution: {integrity: sha512-eBPYl2sLpH/o8qbSz6vPwWlDyThnQjJfcDOGFbNjmjb44XKC1F5dQfakOsADRVrXCNzM6ZsSIPDG5dc6HHLNFg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.5.0: + resolution: {integrity: sha512-xaOHIfLOZypoQ5U2I6rEaugS4IYtTgP030xzvrBf5js7p9WI9wik07iHmsKaej8Z83ZDxN5GyypfoyKV5O5TJA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.5.0: + resolution: {integrity: sha512-Al6quztQUrHwcOoU2TuFblUQ5L+/AmPBXFR6dUvyo4nRj2yQRK0WIUaGMF/uwKulvRcXkpHe3k9A8Vf93VDktA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.5.0: + resolution: {integrity: sha512-8kdW+brNhI/NzJ4fxDufuJUjepzINqJKLGHuxyAtpPG9bMbn8P5mtaCcbOm0EzLJ+atg+kF9dwg8jpclkVqx5w==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@sideway/address@4.1.4: resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} dependencies: @@ -4452,8 +4746,8 @@ packages: '@types/mdurl': 1.0.2 dev: true - /@types/markdown-it@13.0.5: - resolution: {integrity: sha512-QhJP7hkq3FCrFNx0szMNCT/79CXfcEgUIA3jc5GBfeXqoKsk3R8JZm2wRXJ2DiyjbPE4VMFOSDemLFcUTZmHEQ==} + /@types/markdown-it@13.0.6: + resolution: {integrity: sha512-0VqpvusJn1/lwRegCxcHVdmLfF+wIsprsKMC9xW8UPcTxhFcQtoN/fBU1zMe8pH7D/RuueMh2CaBaNv+GrLqTw==} dependencies: '@types/linkify-it': 3.0.2 '@types/mdurl': 1.0.2 @@ -4619,8 +4913,8 @@ packages: resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==} dev: true - /@types/web-bluetooth@0.0.18: - resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==} + /@types/web-bluetooth@0.0.20: + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: true /@types/ws@8.5.5: @@ -5208,15 +5502,15 @@ packages: vue: 3.3.4 dev: true - /@vitejs/plugin-vue@4.3.1(vite@4.5.0)(vue@3.3.7): - resolution: {integrity: sha512-tUBEtWcF7wFtII7ayNiLNDTCE1X1afySEo+XNVMNkFXaThENyCowIEX095QqbJZGTgoOcSVDJGlnde2NG4jtbQ==} + /@vitejs/plugin-vue@4.5.0(vite@5.0.0)(vue@3.3.8): + resolution: {integrity: sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^4.0.0 + vite: ^4.0.0 || ^5.0.0 vue: ^3.2.25 dependencies: - vite: 4.5.0(@types/node@18.17.5) - vue: 3.3.7(typescript@5.1.6) + vite: 5.0.0(@types/node@18.17.5) + vue: 3.3.8(typescript@5.1.6) dev: true /@vitest/coverage-v8@0.34.0(vitest@0.34.0): @@ -5321,6 +5615,15 @@ packages: source-map-js: 1.0.2 dev: true + /@vue/compiler-core@3.3.8: + resolution: {integrity: sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/shared': 3.3.8 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-dom@3.3.4: resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} dependencies: @@ -5334,6 +5637,13 @@ packages: '@vue/shared': 3.3.7 dev: true + /@vue/compiler-dom@3.3.8: + resolution: {integrity: sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==} + dependencies: + '@vue/compiler-core': 3.3.8 + '@vue/shared': 3.3.8 + dev: true + /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: @@ -5363,6 +5673,21 @@ packages: source-map-js: 1.0.2 dev: true + /@vue/compiler-sfc@3.3.8: + resolution: {integrity: sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/compiler-core': 3.3.8 + '@vue/compiler-dom': 3.3.8 + '@vue/compiler-ssr': 3.3.8 + '@vue/reactivity-transform': 3.3.8 + '@vue/shared': 3.3.8 + estree-walker: 2.0.2 + magic-string: 0.30.5 + postcss: 8.4.31 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-ssr@3.3.4: resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} dependencies: @@ -5376,6 +5701,13 @@ packages: '@vue/shared': 3.3.7 dev: true + /@vue/compiler-ssr@3.3.8: + resolution: {integrity: sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==} + dependencies: + '@vue/compiler-dom': 3.3.8 + '@vue/shared': 3.3.8 + dev: true + /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} dev: true @@ -5402,6 +5734,16 @@ packages: magic-string: 0.30.5 dev: true + /@vue/reactivity-transform@3.3.8: + resolution: {integrity: sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/compiler-core': 3.3.8 + '@vue/shared': 3.3.8 + estree-walker: 2.0.2 + magic-string: 0.30.5 + dev: true + /@vue/reactivity@3.3.4: resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} dependencies: @@ -5413,6 +5755,12 @@ packages: '@vue/shared': 3.3.7 dev: true + /@vue/reactivity@3.3.8: + resolution: {integrity: sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==} + dependencies: + '@vue/shared': 3.3.8 + dev: true + /@vue/runtime-core@3.3.4: resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} dependencies: @@ -5426,6 +5774,13 @@ packages: '@vue/shared': 3.3.7 dev: true + /@vue/runtime-core@3.3.8: + resolution: {integrity: sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==} + dependencies: + '@vue/reactivity': 3.3.8 + '@vue/shared': 3.3.8 + dev: true + /@vue/runtime-dom@3.3.4: resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==} dependencies: @@ -5441,6 +5796,14 @@ packages: csstype: 3.1.2 dev: true + /@vue/runtime-dom@3.3.8: + resolution: {integrity: sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==} + dependencies: + '@vue/runtime-core': 3.3.8 + '@vue/shared': 3.3.8 + csstype: 3.1.2 + dev: true + /@vue/server-renderer@3.3.4(vue@3.3.4): resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==} peerDependencies: @@ -5460,6 +5823,16 @@ packages: vue: 3.3.7(typescript@5.0.4) dev: true + /@vue/server-renderer@3.3.8(vue@3.3.8): + resolution: {integrity: sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==} + peerDependencies: + vue: 3.3.8 + dependencies: + '@vue/compiler-ssr': 3.3.8 + '@vue/shared': 3.3.8 + vue: 3.3.8(typescript@5.1.6) + dev: true + /@vue/shared@3.3.4: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} @@ -5467,6 +5840,10 @@ packages: resolution: {integrity: sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==} dev: true + /@vue/shared@3.3.8: + resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} + dev: true + /@vueuse/core@10.1.0(vue@3.3.4): resolution: {integrity: sha512-3Znoa5m5RO+z4/C9w6DRaKTR3wCVJvD5rav8HTDGsr+7rOZRHtcgFJ8NcCs0ZvIpmev2kExTa311ns5j2RbzDQ==} dependencies: @@ -5491,20 +5868,20 @@ packages: - vue dev: true - /@vueuse/core@10.5.0(vue@3.3.7): - resolution: {integrity: sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A==} + /@vueuse/core@10.6.1(vue@3.3.8): + resolution: {integrity: sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==} dependencies: - '@types/web-bluetooth': 0.0.18 - '@vueuse/metadata': 10.5.0 - '@vueuse/shared': 10.5.0(vue@3.3.7) - vue-demi: 0.14.6(vue@3.3.7) + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.6.1 + '@vueuse/shared': 10.6.1(vue@3.3.8) + vue-demi: 0.14.6(vue@3.3.8) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/integrations@10.5.0(focus-trap@7.5.4)(vue@3.3.7): - resolution: {integrity: sha512-fm5sXLCK0Ww3rRnzqnCQRmfjDURaI4xMsx+T+cec0ngQqHx/JgUtm8G0vRjwtonIeTBsH1Q8L3SucE+7K7upJQ==} + /@vueuse/integrations@10.6.1(focus-trap@7.5.4)(vue@3.3.8): + resolution: {integrity: sha512-mPDupuofMJ4DPmtX/FfP1MajmWRzYDv8WSaTCo8LQ5kFznjWgmUQ16ApjYqgMquqffNY6+IRMdMgosLDRZOSZA==} peerDependencies: async-validator: '*' axios: '*' @@ -5544,10 +5921,10 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.5.0(vue@3.3.7) - '@vueuse/shared': 10.5.0(vue@3.3.7) + '@vueuse/core': 10.6.1(vue@3.3.8) + '@vueuse/shared': 10.6.1(vue@3.3.8) focus-trap: 7.5.4 - vue-demi: 0.14.6(vue@3.3.7) + vue-demi: 0.14.6(vue@3.3.8) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -5561,8 +5938,8 @@ packages: resolution: {integrity: sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==} dev: true - /@vueuse/metadata@10.5.0: - resolution: {integrity: sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw==} + /@vueuse/metadata@10.6.1: + resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==} dev: true /@vueuse/shared@10.1.0(vue@3.3.4): @@ -5583,10 +5960,10 @@ packages: - vue dev: true - /@vueuse/shared@10.5.0(vue@3.3.7): - resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==} + /@vueuse/shared@10.6.1(vue@3.3.8): + resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==} dependencies: - vue-demi: 0.14.6(vue@3.3.7) + vue-demi: 0.14.6(vue@3.3.8) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -8636,6 +9013,36 @@ packages: '@esbuild/win32-x64': 0.19.0 dev: true + /esbuild@0.19.6: + resolution: {integrity: sha512-Xl7dntjA2OEIvpr9j0DVxxnog2fyTGnyVoQXAMQI6eR3mf9zCQds7VIKUDCotDgE/p4ncTgeRqgX8t5d6oP4Gw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.19.6 + '@esbuild/android-arm64': 0.19.6 + '@esbuild/android-x64': 0.19.6 + '@esbuild/darwin-arm64': 0.19.6 + '@esbuild/darwin-x64': 0.19.6 + '@esbuild/freebsd-arm64': 0.19.6 + '@esbuild/freebsd-x64': 0.19.6 + '@esbuild/linux-arm': 0.19.6 + '@esbuild/linux-arm64': 0.19.6 + '@esbuild/linux-ia32': 0.19.6 + '@esbuild/linux-loong64': 0.19.6 + '@esbuild/linux-mips64el': 0.19.6 + '@esbuild/linux-ppc64': 0.19.6 + '@esbuild/linux-riscv64': 0.19.6 + '@esbuild/linux-s390x': 0.19.6 + '@esbuild/linux-x64': 0.19.6 + '@esbuild/netbsd-x64': 0.19.6 + '@esbuild/openbsd-x64': 0.19.6 + '@esbuild/sunos-x64': 0.19.6 + '@esbuild/win32-arm64': 0.19.6 + '@esbuild/win32-ia32': 0.19.6 + '@esbuild/win32-x64': 0.19.6 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -9589,6 +9996,14 @@ packages: requiresBuild: true optional: true + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} @@ -12465,6 +12880,10 @@ packages: resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==} dev: true + /minisearch@6.2.0: + resolution: {integrity: sha512-BECkorDF1TY2rGKt9XHdSeP9TP29yUbrAaCh/C03wpyf1vx3uYcP/+8XlMcpTkgoU0rBVnHMAOaP83Rc9Tm+TQ==} + dev: true + /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -13954,6 +14373,26 @@ packages: fsevents: 2.3.2 dev: true + /rollup@4.5.0: + resolution: {integrity: sha512-41xsWhzxqjMDASCxH5ibw1mXk+3c4TNI2UjKbLxe6iEzrSQnqOzmmK8/3mufCPbzHNJ2e04Fc1ddI35hHy+8zg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.5.0 + '@rollup/rollup-android-arm64': 4.5.0 + '@rollup/rollup-darwin-arm64': 4.5.0 + '@rollup/rollup-darwin-x64': 4.5.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.5.0 + '@rollup/rollup-linux-arm64-gnu': 4.5.0 + '@rollup/rollup-linux-arm64-musl': 4.5.0 + '@rollup/rollup-linux-x64-gnu': 4.5.0 + '@rollup/rollup-linux-x64-musl': 4.5.0 + '@rollup/rollup-win32-arm64-msvc': 4.5.0 + '@rollup/rollup-win32-ia32-msvc': 4.5.0 + '@rollup/rollup-win32-x64-msvc': 4.5.0 + fsevents: 2.3.3 + dev: true + /rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} dev: true @@ -15794,6 +16233,42 @@ packages: fsevents: 2.3.2 dev: true + /vite@5.0.0(@types/node@18.17.5): + resolution: {integrity: sha512-ESJVM59mdyGpsiNAeHQOR/0fqNoOyWPYesFto8FFZugfmhdHx8Fzd8sF3Q/xkVhZsyOxHfdM7ieiVAorI9RjFw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 18.17.5 + esbuild: 0.19.6 + postcss: 8.4.31 + rollup: 4.5.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.7): resolution: {integrity: sha512-zG+ev9pw1Mg7htABlFCNXb8XwnKN+qfTKw+vU0Ers6RIrABx+45EAAFBoaL1mEpl1FRFn1o/dQ7F4b8GP6HdGQ==} engines: {node: ^14.13.1 || ^16.7.0 || >=18} @@ -15842,8 +16317,8 @@ packages: - terser dev: true - /vitepress@1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): - resolution: {integrity: sha512-1dqWiHNThNrVZ08ixmfEDBEH+764KOgnev9oXga/x6cN++Vb9pnuu8p3K6DQP+KZrYcG+WiX7jxal0iSNpAWuQ==} + /vitepress@1.0.0-rc.29(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): + resolution: {integrity: sha512-6sKmyEvH16SgMqkHzRwwadt9Uju13AOIqouzOVEg3Rk6X9mds6jLsq2GxnAJvg0s6bl/0Qs/cw+f8SNki82ltw==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4.3.2 @@ -15856,18 +16331,19 @@ packages: dependencies: '@docsearch/css': 3.5.2 '@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0) - '@types/markdown-it': 13.0.5 - '@vitejs/plugin-vue': 4.3.1(vite@4.5.0)(vue@3.3.7) + '@types/markdown-it': 13.0.6 + '@vitejs/plugin-vue': 4.5.0(vite@5.0.0)(vue@3.3.8) '@vue/devtools-api': 6.5.1 - '@vueuse/core': 10.5.0(vue@3.3.7) - '@vueuse/integrations': 10.5.0(focus-trap@7.5.4)(vue@3.3.7) + '@vueuse/core': 10.6.1(vue@3.3.8) + '@vueuse/integrations': 10.6.1(focus-trap@7.5.4)(vue@3.3.8) focus-trap: 7.5.4 mark.js: 8.11.1 - minisearch: 6.1.0 + minisearch: 6.2.0 + mrmime: 1.0.1 postcss: 8.4.31 shiki: 0.14.5 - vite: 4.5.0(@types/node@18.17.5) - vue: 3.3.7(typescript@5.1.6) + vite: 5.0.0(@types/node@18.17.5) + vue: 3.3.8(typescript@5.1.6) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -16027,7 +16503,7 @@ packages: vue: 3.3.4 dev: true - /vue-demi@0.14.6(vue@3.3.7): + /vue-demi@0.14.6(vue@3.3.8): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} engines: {node: '>=12'} hasBin: true @@ -16039,7 +16515,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.3.7(typescript@5.1.6) + vue: 3.3.8(typescript@5.1.6) dev: true /vue@3.3.4: @@ -16067,19 +16543,19 @@ packages: typescript: 5.0.4 dev: true - /vue@3.3.7(typescript@5.1.6): - resolution: {integrity: sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==} + /vue@3.3.8(typescript@5.1.6): + resolution: {integrity: sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.3.7 - '@vue/compiler-sfc': 3.3.7 - '@vue/runtime-dom': 3.3.7 - '@vue/server-renderer': 3.3.7(vue@3.3.7) - '@vue/shared': 3.3.7 + '@vue/compiler-dom': 3.3.8 + '@vue/compiler-sfc': 3.3.8 + '@vue/runtime-dom': 3.3.8 + '@vue/server-renderer': 3.3.8(vue@3.3.8) + '@vue/shared': 3.3.8 typescript: 5.1.6 dev: true From ad6c76116dbe4a9a4d40f69bba3a54ce556dfb53 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 19:13:34 -0300 Subject: [PATCH 076/316] Modify getSubGraphTitleMargins to use null coalescing operator --- packages/mermaid/src/utils/getSubGraphTitleMargins.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/utils/getSubGraphTitleMargins.ts b/packages/mermaid/src/utils/getSubGraphTitleMargins.ts index 35dcaee95a..64d2e18509 100644 --- a/packages/mermaid/src/utils/getSubGraphTitleMargins.ts +++ b/packages/mermaid/src/utils/getSubGraphTitleMargins.ts @@ -5,8 +5,9 @@ export const getSubGraphTitleMargins = (): { subGraphTitleBottomMargin: number; subGraphTitleTotalMargin: number; } => { - const subGraphTitleTopMargin = getConfig().flowchart?.subGraphTitleMargin?.top || 0; - const subGraphTitleBottomMargin = getConfig().flowchart?.subGraphTitleMargin?.bottom || 0; + const { flowchart } = getConfig(); + const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0; + const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0; const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; return { From c0a43f5d5a13350b1c2bf20747b6cc5d5920156a Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 20:40:30 -0300 Subject: [PATCH 077/316] Change getSubGraphTitleMargins to accept config object as parameter --- packages/mermaid/src/dagre-wrapper/clusters.js | 4 ++-- packages/mermaid/src/dagre-wrapper/index.js | 4 ++-- packages/mermaid/src/utils.spec.ts | 2 +- packages/mermaid/src/utils/getSubGraphTitleMargins.ts | 9 ++++++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/mermaid/src/dagre-wrapper/clusters.js b/packages/mermaid/src/dagre-wrapper/clusters.js index 0786b35e05..1095c483bd 100644 --- a/packages/mermaid/src/dagre-wrapper/clusters.js +++ b/packages/mermaid/src/dagre-wrapper/clusters.js @@ -64,7 +64,7 @@ const rect = (parent, node) => { .attr('width', width) .attr('height', node.height + padding); - const { subGraphTitleTopMargin } = getSubGraphTitleMargins(); + const { subGraphTitleTopMargin } = getSubGraphTitleMargins(getConfig()); if (useHtmlLabels) { label.attr( 'transform', @@ -181,7 +181,7 @@ const roundedWithTitle = (parent, node) => { .attr('width', width + padding) .attr('height', node.height + padding - bbox.height - 3); - const { subGraphTitleTopMargin } = getSubGraphTitleMargins(); + const { subGraphTitleTopMargin } = getSubGraphTitleMargins(getConfig()); // Center the label label.attr( 'transform', diff --git a/packages/mermaid/src/dagre-wrapper/index.js b/packages/mermaid/src/dagre-wrapper/index.js index bb14b91da5..24daafe03d 100644 --- a/packages/mermaid/src/dagre-wrapper/index.js +++ b/packages/mermaid/src/dagre-wrapper/index.js @@ -14,8 +14,7 @@ import { insertCluster, clear as clearClusters } from './clusters.js'; import { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges.js'; import { log } from '../logger.js'; import { getSubGraphTitleMargins } from '../utils/getSubGraphTitleMargins.js'; - -const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(); +import { getConfig } from '../diagram-api/diagramAPI.js'; const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => { log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster); @@ -104,6 +103,7 @@ const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => log.info('Graph after layout:', graphlibJson.write(graph)); // Move the nodes to the correct place let diff = 0; + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(getConfig()); sortNodesByHierarchy(graph).forEach(function (v) { const node = graph.node(v); log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v))); diff --git a/packages/mermaid/src/utils.spec.ts b/packages/mermaid/src/utils.spec.ts index 2442e97b36..854ce2ef1d 100644 --- a/packages/mermaid/src/utils.spec.ts +++ b/packages/mermaid/src/utils.spec.ts @@ -609,7 +609,7 @@ describe('getSubGraphTitleMargins', () => { }; configApi.setSiteConfig(config_0); - expect(getSubGraphTitleMargins()).toEqual({ + expect(getSubGraphTitleMargins(config_0)).toEqual({ subGraphTitleTopMargin: 10, subGraphTitleBottomMargin: 5, subGraphTitleTotalMargin: 15, diff --git a/packages/mermaid/src/utils/getSubGraphTitleMargins.ts b/packages/mermaid/src/utils/getSubGraphTitleMargins.ts index 64d2e18509..af07a6c961 100644 --- a/packages/mermaid/src/utils/getSubGraphTitleMargins.ts +++ b/packages/mermaid/src/utils/getSubGraphTitleMargins.ts @@ -1,11 +1,14 @@ -import { getConfig } from '../diagram-api/diagramAPI.js'; +import { FlowchartDiagramConfig } from '../config.type.js'; -export const getSubGraphTitleMargins = (): { +export const getSubGraphTitleMargins = ({ + flowchart, +}: { + flowchart: FlowchartDiagramConfig; +}): { subGraphTitleTopMargin: number; subGraphTitleBottomMargin: number; subGraphTitleTotalMargin: number; } => { - const { flowchart } = getConfig(); const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0; const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0; const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; From 63c2d36232f549012a7b7bfa3e4cf5610029e38b Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 20:49:00 -0300 Subject: [PATCH 078/316] Rename file and update imports --- packages/mermaid/src/dagre-wrapper/clusters.js | 2 +- packages/mermaid/src/dagre-wrapper/index.js | 2 +- packages/mermaid/src/utils.spec.ts | 2 +- .../{getSubGraphTitleMargins.ts => subGraphTitleMargins.ts} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename packages/mermaid/src/utils/{getSubGraphTitleMargins.ts => subGraphTitleMargins.ts} (100%) diff --git a/packages/mermaid/src/dagre-wrapper/clusters.js b/packages/mermaid/src/dagre-wrapper/clusters.js index 1095c483bd..93c9f93870 100644 --- a/packages/mermaid/src/dagre-wrapper/clusters.js +++ b/packages/mermaid/src/dagre-wrapper/clusters.js @@ -5,7 +5,7 @@ import { createText } from '../rendering-util/createText.js'; import { select } from 'd3'; import { getConfig } from '../diagram-api/diagramAPI.js'; import { evaluate } from '../diagrams/common/common.js'; -import { getSubGraphTitleMargins } from '../utils/getSubGraphTitleMargins.js'; +import { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js'; const rect = (parent, node) => { log.info('Creating subgraph rect for ', node.id, node); diff --git a/packages/mermaid/src/dagre-wrapper/index.js b/packages/mermaid/src/dagre-wrapper/index.js index 24daafe03d..0ebd9beed4 100644 --- a/packages/mermaid/src/dagre-wrapper/index.js +++ b/packages/mermaid/src/dagre-wrapper/index.js @@ -13,7 +13,7 @@ import { insertNode, positionNode, clear as clearNodes, setNodeElem } from './no import { insertCluster, clear as clearClusters } from './clusters.js'; import { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges.js'; import { log } from '../logger.js'; -import { getSubGraphTitleMargins } from '../utils/getSubGraphTitleMargins.js'; +import { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js'; import { getConfig } from '../diagram-api/diagramAPI.js'; const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => { diff --git a/packages/mermaid/src/utils.spec.ts b/packages/mermaid/src/utils.spec.ts index 854ce2ef1d..60055fe44e 100644 --- a/packages/mermaid/src/utils.spec.ts +++ b/packages/mermaid/src/utils.spec.ts @@ -1,6 +1,6 @@ import { vi } from 'vitest'; import utils, { calculatePoint, cleanAndMerge, detectDirective } from './utils.js'; -import { getSubGraphTitleMargins } from './utils/getSubGraphTitleMargins.js'; +import { getSubGraphTitleMargins } from './utils/subGraphTitleMargins.js'; import * as configApi from './config.js'; import assignWithDepth from './assignWithDepth.js'; import { detectType } from './diagram-api/detectType.js'; diff --git a/packages/mermaid/src/utils/getSubGraphTitleMargins.ts b/packages/mermaid/src/utils/subGraphTitleMargins.ts similarity index 100% rename from packages/mermaid/src/utils/getSubGraphTitleMargins.ts rename to packages/mermaid/src/utils/subGraphTitleMargins.ts From fc3018e977970788ea6d513b397c503dbf1f1922 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 20:55:43 -0300 Subject: [PATCH 079/316] Move subgraph title margin tests to independent file --- packages/mermaid/src/utils.spec.ts | 22 ------------------- .../src/utils/subGraphTitleMargins.spec.ts | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 packages/mermaid/src/utils/subGraphTitleMargins.spec.ts diff --git a/packages/mermaid/src/utils.spec.ts b/packages/mermaid/src/utils.spec.ts index 60055fe44e..8ccf5b2107 100644 --- a/packages/mermaid/src/utils.spec.ts +++ b/packages/mermaid/src/utils.spec.ts @@ -1,7 +1,5 @@ import { vi } from 'vitest'; import utils, { calculatePoint, cleanAndMerge, detectDirective } from './utils.js'; -import { getSubGraphTitleMargins } from './utils/subGraphTitleMargins.js'; -import * as configApi from './config.js'; import assignWithDepth from './assignWithDepth.js'; import { detectType } from './diagram-api/detectType.js'; import { addDiagrams } from './diagram-api/diagram-orchestration.js'; @@ -596,23 +594,3 @@ describe('calculatePoint', () => { ); }); }); - -describe('getSubGraphTitleMargins', () => { - it('should get subgraph title margins after config has been set', () => { - const config_0 = { - flowchart: { - subGraphTitleMargin: { - top: 10, - bottom: 5, - }, - }, - }; - - configApi.setSiteConfig(config_0); - expect(getSubGraphTitleMargins(config_0)).toEqual({ - subGraphTitleTopMargin: 10, - subGraphTitleBottomMargin: 5, - subGraphTitleTotalMargin: 15, - }); - }); -}); diff --git a/packages/mermaid/src/utils/subGraphTitleMargins.spec.ts b/packages/mermaid/src/utils/subGraphTitleMargins.spec.ts new file mode 100644 index 0000000000..c607f8bce7 --- /dev/null +++ b/packages/mermaid/src/utils/subGraphTitleMargins.spec.ts @@ -0,0 +1,22 @@ +import { getSubGraphTitleMargins } from './subGraphTitleMargins.js'; +import * as configApi from '../config.js'; + +describe('getSubGraphTitleMargins', () => { + it('should get subgraph title margins after config has been set', () => { + const config_0 = { + flowchart: { + subGraphTitleMargin: { + top: 10, + bottom: 5, + }, + }, + }; + + configApi.setSiteConfig(config_0); + expect(getSubGraphTitleMargins(config_0)).toEqual({ + subGraphTitleTopMargin: 10, + subGraphTitleBottomMargin: 5, + subGraphTitleTotalMargin: 15, + }); + }); +}); From d61bfde16768e0806db24d87347e6807b4fa7109 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 21:06:38 -0300 Subject: [PATCH 080/316] Replace string concat with string templates --- packages/mermaid/src/dagre-wrapper/clusters.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/dagre-wrapper/clusters.js b/packages/mermaid/src/dagre-wrapper/clusters.js index 93c9f93870..11fcecfc31 100644 --- a/packages/mermaid/src/dagre-wrapper/clusters.js +++ b/packages/mermaid/src/dagre-wrapper/clusters.js @@ -69,17 +69,13 @@ const rect = (parent, node) => { label.attr( 'transform', // This puts the labal on top of the box instead of inside it - 'translate(' + - (node.x - bbox.width / 2) + - ', ' + - (node.y - node.height / 2 + subGraphTitleTopMargin) + - ')' + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` ); } else { label.attr( 'transform', // This puts the labal on top of the box instead of inside it - 'translate(' + node.x + ', ' + (node.y - node.height / 2 + subGraphTitleTopMargin) + ')' + `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` ); } // Center the label From d79671e04a4c9e2703052aff09d0ae5dca00ee88 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 20 Nov 2023 21:16:10 -0300 Subject: [PATCH 081/316] Resolve lint issue --- packages/mermaid/src/utils/subGraphTitleMargins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/utils/subGraphTitleMargins.ts b/packages/mermaid/src/utils/subGraphTitleMargins.ts index af07a6c961..426f4770d6 100644 --- a/packages/mermaid/src/utils/subGraphTitleMargins.ts +++ b/packages/mermaid/src/utils/subGraphTitleMargins.ts @@ -1,4 +1,4 @@ -import { FlowchartDiagramConfig } from '../config.type.js'; +import type { FlowchartDiagramConfig } from '../config.type.js'; export const getSubGraphTitleMargins = ({ flowchart, From fd208ddcaf26612208d6306a16b0f2ddab2a3e95 Mon Sep 17 00:00:00 2001 From: Omer Priel Date: Tue, 21 Nov 2023 13:53:05 +0200 Subject: [PATCH 082/316] update testTimeout from 5 seconds to 10 seconds --- vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vite.config.ts b/vite.config.ts index 080ff981f5..635c525c4e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,7 @@ export default defineConfig({ reportsDirectory: './coverage/vitest', exclude: ['**/node_modules/**', '**/tests/**', '**/__mocks__/**'], }, + testTimeout: 10000, }, build: { /** If you set esmExternals to true, this plugins assumes that From 9ae00ebcdb7541cbb039c06af175a5c00e96cb83 Mon Sep 17 00:00:00 2001 From: Omer Priel Date: Thu, 23 Nov 2023 14:55:09 +0200 Subject: [PATCH 083/316] reset the testTimeout to 5 seconds and change it directly in the test --- packages/mermaid/src/mermaid.spec.ts | 2 +- vite.config.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/mermaid/src/mermaid.spec.ts b/packages/mermaid/src/mermaid.spec.ts index 645b5b39cb..87756dc4db 100644 --- a/packages/mermaid/src/mermaid.spec.ts +++ b/packages/mermaid/src/mermaid.spec.ts @@ -89,7 +89,7 @@ describe('when using mermaid and ', () => { ).resolves.not.toThrow(); // should still render, even if lazyLoadedDiagrams fails expect(mermaidAPI.render).toHaveBeenCalled(); - }); + }, 20_000); it('should defer diagram load based on parameter', async () => { let loaded = false; diff --git a/vite.config.ts b/vite.config.ts index 635c525c4e..080ff981f5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,7 +24,6 @@ export default defineConfig({ reportsDirectory: './coverage/vitest', exclude: ['**/node_modules/**', '**/tests/**', '**/__mocks__/**'], }, - testTimeout: 10000, }, build: { /** If you set esmExternals to true, this plugins assumes that From ac99eb59d22bdf26eb91851417078d256f7b6939 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:15:04 +0530 Subject: [PATCH 084/316] Cleanup package.json Co-authored-by: Alois Klink --- packages/mermaid-flowchart-elk/package.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/mermaid-flowchart-elk/package.json b/packages/mermaid-flowchart-elk/package.json index 8a68891aa7..e02dba8970 100644 --- a/packages/mermaid-flowchart-elk/package.json +++ b/packages/mermaid-flowchart-elk/package.json @@ -28,16 +28,6 @@ }, "author": "Knut Sveidqvist", "license": "MIT", - "standard": { - "ignore": [ - "**/parser/*.js", - "dist/**/*.js", - "cypress/**/*.js" - ], - "globals": [ - "page" - ] - }, "dependencies": { "d3": "^7.4.0", "dagre-d3-es": "7.0.10", @@ -47,7 +37,7 @@ "devDependencies": { "concurrently": "^8.0.0", "rimraf": "^5.0.0", - "mermaid": "workspace:*" + "mermaid": "workspace:^" }, "files": [ "dist" From 4ec57836d8cca4327f4d54955444f8c1ed01af89 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:31:11 +0530 Subject: [PATCH 085/316] chore: Optimize build:types --- .build/types.ts | 16 ++++++++++++++++ package.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .build/types.ts diff --git a/.build/types.ts b/.build/types.ts new file mode 100644 index 0000000000..d9f10d21ae --- /dev/null +++ b/.build/types.ts @@ -0,0 +1,16 @@ +import { packageOptions } from './common.js'; +import { execSync } from 'child_process'; + +const buildType = (packageName: string) => { + console.log(`Building types for ${packageName}`); + try { + const out = execSync(`tsc -p ./packages/${packageName}/tsconfig.json --emitDeclarationOnly`); + out.length > 0 && console.log(out.toString()); + } catch (e) { + console.error(e); + } +}; + +for (const { packageName } of Object.values(packageOptions)) { + buildType(packageName); +} diff --git a/package.json b/package.json index 28d4f9592a..b53231ee35 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "build:esbuild": "pnpm run -r clean && ts-node-esm --transpileOnly .esbuild/build.ts", "build:mermaid": "pnpm build:esbuild --mermaid", "build:viz": "pnpm build:esbuild --visualize", - "build:types": "tsc -p ./packages/parser/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-zenuml/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-example-diagram/tsconfig.json --emitDeclarationOnly && tsc -p ./packages/mermaid-flowchart-elk/tsconfig.json --emitDeclarationOnly", + "build:types": "ts-node-esm --transpileOnly .build/types.ts", "build:types:watch": "tsc -p ./packages/mermaid/tsconfig.json --emitDeclarationOnly --watch", "dev": "ts-node-esm --transpileOnly .esbuild/server.ts", "dev:vite": "ts-node-esm --transpileOnly .vite/server.ts", From 30fe363b571d544fcd66a83513184519de80f4ce Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:32:32 +0530 Subject: [PATCH 086/316] chore: Update pnpm-lock --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c67f93f25a..b0c734b2a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -432,7 +432,7 @@ importers: specifier: ^8.0.0 version: 8.0.1 mermaid: - specifier: workspace:* + specifier: workspace:^ version: link:../mermaid rimraf: specifier: ^5.0.0 From c294a0a9acdeae3f3377a6b98eaa01e35b5db9f9 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:41:22 +0530 Subject: [PATCH 087/316] test: Add flowchart-elk overriding test --- .../integration/other/flowchart-elk.spec.js | 14 +++++++++++ cypress/platform/flow-elk.html | 23 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 cypress/integration/other/flowchart-elk.spec.js create mode 100644 cypress/platform/flow-elk.html diff --git a/cypress/integration/other/flowchart-elk.spec.js b/cypress/integration/other/flowchart-elk.spec.js new file mode 100644 index 0000000000..22a6efc0f5 --- /dev/null +++ b/cypress/integration/other/flowchart-elk.spec.js @@ -0,0 +1,14 @@ +import { urlSnapshotTest, openURLAndVerifyRendering } from '../../helpers/util.ts'; + +describe('Flowchart elk', () => { + it('should use dagre as fallback', () => { + urlSnapshotTest('http://localhost:9000/flow-elk.html', { + name: 'flow-elk fallback to dagre', + }); + }); + it('should allow overriding with external package', () => { + urlSnapshotTest('http://localhost:9000/flow-elk.html?elk=true', { + name: 'flow-elk overriding dagre with elk', + }); + }); +}); diff --git a/cypress/platform/flow-elk.html b/cypress/platform/flow-elk.html new file mode 100644 index 0000000000..149e939519 --- /dev/null +++ b/cypress/platform/flow-elk.html @@ -0,0 +1,23 @@ + + +
+      flowchart-elk
+      a[hello] --> b[world]
+      b --> c{test}
+      c --> one
+      c --> two
+      c --> three
+    
+ + + + From fe7da97c5c2d14f3c2a94a98a001b14bd77c6da4 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:51:08 +0530 Subject: [PATCH 088/316] fix flow elk test --- cypress/platform/flow-elk.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cypress/platform/flow-elk.html b/cypress/platform/flow-elk.html index 149e939519..4c3dea3352 100644 --- a/cypress/platform/flow-elk.html +++ b/cypress/platform/flow-elk.html @@ -17,7 +17,12 @@ } mermaid.initialize({ logLevel: 3, + startOnLoad: false, }); + await mermaid.run(); + if (window.Cypress) { + window.rendered = true; + } From 78e118c876172c970f678b3adff8987167fbed5f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 09:42:21 +0530 Subject: [PATCH 089/316] fix: #5064 Handle case when line has only one point --- cypress/integration/rendering/flowchart-v2.spec.js | 12 ++++++++++++ packages/mermaid/src/utils/lineWithOffset.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index aac4a31b17..b7583ccf19 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -729,6 +729,18 @@ A ~~~ B {} ); }); + + it('5064: Should render when subgraph child has links to outside node and subgraph', () => { + imgSnapshotTest( + `flowchart TB + Out --> In + subgraph Sub + In + end + Sub --> In` + ); + }); + describe('Markdown strings flowchart (#4220)', () => { describe('html labels', () => { it('With styling and classes', () => { diff --git a/packages/mermaid/src/utils/lineWithOffset.ts b/packages/mermaid/src/utils/lineWithOffset.ts index f348d3eb35..a90eb78358 100644 --- a/packages/mermaid/src/utils/lineWithOffset.ts +++ b/packages/mermaid/src/utils/lineWithOffset.ts @@ -24,6 +24,9 @@ function calculateDeltaAndAngle( ): { angle: number; deltaX: number; deltaY: number } { point1 = pointTransformer(point1); point2 = pointTransformer(point2); + if (point1 === undefined || point2 === undefined) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } const [x1, y1] = [point1.x, point1.y]; const [x2, y2] = [point2.x, point2.y]; const deltaX = x2 - x1; From 3e098ab73b320626e0b48b542e420ad6311cc427 Mon Sep 17 00:00:00 2001 From: Ronid1 Date: Wed, 22 Nov 2023 18:27:47 -0800 Subject: [PATCH 090/316] sort links alphabetically --- docs/ecosystem/integrations-community.md | 182 +++++++++--------- .../docs/ecosystem/integrations-community.md | 182 +++++++++--------- 2 files changed, 182 insertions(+), 182 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 846ec51ac6..d74918e613 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -18,48 +18,48 @@ Below are a list of community plugins and integrations created with Mermaid. ✅ = Native support +- [Atlassian Products](https://www.atlassian.com) + - [Mermaid for Confluence](https://marketplace.atlassian.com/apps/1224722/mermaid-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) + - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) + - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) + - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) + - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) + - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) + - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) +- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ +- [Deepdwn](https://billiam.itch.io/deepdwn) ✅ +- [GitBook](https://gitbook.com) + - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) + - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) + - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) +- [Gitea](https://gitea.io) ✅ - [GitHub](https://github.com) ✅ - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitHub Writer](https://github.com/ckeditor/github-writer) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ -- [Gitea](https://gitea.io) ✅ -- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ +- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) +- [Joplin](https://joplinapp.org) ✅ +- [LiveBook](https://livebook.dev) ✅ - [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ -- [Deepdwn](https://billiam.itch.io/deepdwn) ✅ -- [Joplin](https://joplinapp.org) ✅ +- [mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ - [Swimm](https://swimm.io) ✅ +- [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ -- [NotesHub](https://noteshub.app) ✅ -- [GitBook](https://gitbook.com) - - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) - - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) -- [LiveBook](https://livebook.dev) ✅ -- [Atlassian Products](https://www.atlassian.com) - - [Mermaid for Confluence](https://marketplace.atlassian.com/apps/1224722/mermaid-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) - - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) - - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) - - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) - - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) - - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) -- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) -- [mermerd](https://github.com/KarnerTh/mermerd) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) ### CRM/ERP @@ -72,27 +72,27 @@ Customer Relationship Management/Enterprise Resource Planning Blogging frameworks and platforms -- [WordPress](https://wordpress.org) - - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) - - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) - [Hexo](https://hexo.io) - [hexo-filter-mermaid-diagrams](https://github.com/webappdevelp/hexo-filter-mermaid-diagrams) - [hexo-tag-mermaid](https://github.com/JameChou/hexo-tag-mermaid) - [hexo-mermaid-diagrams](https://github.com/mslxl/hexo-mermaid-diagrams) - [Nextra](https://nextra.site/) - [Mermaid](https://nextra.site/docs/guide/mermaid) +- [WordPress](https://wordpress.org) + - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) + - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) ### CMS/ECM Content Management Systems/Enterprise Content Management +- [Grav CMS](https://getgrav.org/) + - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) + - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) - [VitePress](https://vitepress.vuejs.org/) - [Plugin for Mermaid.js](https://emersonbottero.github.io/vitepress-plugin-mermaid/) - [VuePress](https://vuepress.vuejs.org/) - [Plugin for Mermaid.js](https://github.com/eFrane/vuepress-plugin-mermaidjs) -- [Grav CMS](https://getgrav.org/) - - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) ### Communication @@ -102,105 +102,105 @@ Communication tools and platforms - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid), [And](https://github.com/unfoldingWord-dev/discourse-mermaid) - [Mattermost](https://mattermost.com/) - [Mermaid Plugin](https://github.com/SpikeTings/Mermaid) -- [phpBB](https://phpbb.com) - - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [NodeBB](https://nodebb.org) - [Mermaid Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) +- [phpBB](https://phpbb.com) + - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [Slack](https://slack.com) - [Mermaid for Slack](https://github.com/JackuB/mermaid-for-slack) ### Wikis +- [DokuWiki](https://dokuwiki.org) + - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) + - [ComboStrap](https://combostrap.com/mermaid) +- [Foswiki](https://foswiki.org) + - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [MediaWiki](https://www.mediawiki.org) - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) -- [Foswiki](https://foswiki.org) - - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) -- [DokuWiki](https://dokuwiki.org) - - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - - [ComboStrap](https://combostrap.com/mermaid) - [TiddlyWiki](https://tiddlywiki.com/) - [mermaid-tw5: full js library](https://github.com/efurlanm/mermaid-tw5) - [tw5-mermaid: wrapper for Mermaid Live](https://github.com/jasonmhoule/tw5-mermaid) ### Editor Plugins -- [VS Code](https://code.visualstudio.com/) - - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) - - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) - - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) - - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) - - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) - - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) - - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) -- [Markdown-It](https://github.com/markdown-it/markdown-it) - - [Textual UML Parser](https://github.com/manastalukdar/markdown-it-textual-uml) - - [Mermaid Plugin](https://github.com/tylingsoft/markdown-it-mermaid) - - [md-it-mermaid](https://github.com/iamcco/md-it-mermaid) - - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) - - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - Atom _(Atom has been [archived.](https://github.blog/2022-06-08-sunsetting-atom/))_ - [Markdown Preview Enhanced](https://github.com/shd101wyy/markdown-preview-enhanced) - [Atom Mermaid](https://github.com/y-takey/atom-mermaid) - [Language Mermaid Syntax Highlighter](https://github.com/ytisf/language-mermaid) -- [Sublime Text 3](https://sublimetext.com) - - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [Astah](https://astah.net) - [Export to Mermaid](https://github.com/Avens666/Astah_Jude_UML_export_to_Markdown-mermaid-Plantuml-) -- [Light Table](http://lighttable.com/) - - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) +- [Brackets](https://brackets.io/) + - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) +- [CKEditor](https://github.com/ckeditor/ckeditor5) + - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) - [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) -- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) -- [Vim](https://www.vim.org) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) - - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) - [GNU Emacs](https://www.gnu.org/software/emacs/) - [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode) - [Org-Mode integration](https://github.com/arnm/ob-mermaid) -- [Brackets](https://brackets.io/) - - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) -- [Iodide](https://github.com/iodide-project/iodide) - - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [GNU Nano](https://www.nano-editor.org/) + - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) - [Google docs](https://docs.google.com/) - [Mermaid plugin for google docs](https://workspace.google.com/marketplace/app/mermaid/636321283856) +- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) +- [Iodide](https://github.com/iodide-project/iodide) + - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [Light Table](http://lighttable.com/) + - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) +- [Markdown-It](https://github.com/markdown-it/markdown-it) + - [Textual UML Parser](https://github.com/manastalukdar/markdown-it-textual-uml) + - [Mermaid Plugin](https://github.com/tylingsoft/markdown-it-mermaid) + - [md-it-mermaid](https://github.com/iamcco/md-it-mermaid) + - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) + - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - [Podlite](https://github.com/zag/podlite-desktop) - [Named block =Diagram](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) -- [GNU Nano](https://www.nano-editor.org/) - - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) -- [CKEditor](https://github.com/ckeditor/ckeditor5) - - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) - [Standard Notes](https://standardnotes.com/) - [sn-mermaid](https://github.com/nienow/sn-mermaid) +- [Sublime Text 3](https://sublimetext.com) + - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) +- [VS Code](https://code.visualstudio.com/) + - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) + - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) + - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) + - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) + - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) + - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) + - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) + - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) + - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) +- [Vim](https://www.vim.org) + - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) + - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) ### Document Generation +- [Codedoc](https://codedoc.cc/) + - [codedoc-mermaid-plugin](https://www.npmjs.com/package/codedoc-mermaid-plugin) +- [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (native support in theme) - [Docusaurus](https://docusaurus.io/docs/markdown-features/diagrams) ✅ -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) -- [Sphinx](https://www.sphinx-doc.org/en/master/) - - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) -- [remark](https://remark.js.org/) - - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) -- [rehype](https://github.com/rehypejs/rehype) - - [rehype-mermaid](https://github.com/remcohaszing/rehype-mermaid) - [Gatsby](https://www.gatsbyjs.com/) - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) - [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) +- [mdbook](https://rust-lang.github.io/mdBook/index.html) + - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) - [mkdocs-material](https://github.com/squidfunk/mkdocs-material), check the [docs](https://squidfunk.github.io/mkdocs-material/reference/diagrams/) + - [Quarto](https://quarto.org/) +- [rehype](https://github.com/rehypejs/rehype) + - [rehype-mermaid](https://github.com/remcohaszing/rehype-mermaid) +- [remark](https://remark.js.org/) + - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) +- [Sphinx](https://www.sphinx-doc.org/en/master/) + - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) +- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) -- [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (native support in theme) -- [Codedoc](https://codedoc.cc/) - - [codedoc-mermaid-plugin](https://www.npmjs.com/package/codedoc-mermaid-plugin) -- [mdbook](https://rust-lang.github.io/mdBook/index.html) - - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) -- [Quarto](https://quarto.org/) - [Typora](https://typora.io/) ([native support](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid)) ### Browser Extensions @@ -220,19 +220,19 @@ Communication tools and platforms ### Other +- [Bisheng](https://www.npmjs.com/package/bisheng) + - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) +- [ExDoc](https://github.com/elixir-lang/ex_doc) + - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) - [Jekyll](https://jekyllrb.com/) - [jekyll-mermaid](https://rubygems.org/gems/jekyll-mermaid) - [jekyll-mermaid-diagrams](https://github.com/fuzhibo/jekyll-mermaid-diagrams) -- [Reveal.js](https://github.com/hakimel/reveal.js) - - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) -- [Bisheng](https://www.npmjs.com/package/bisheng) - - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) -- [Reveal CK](https://github.com/jedcn/reveal-ck) - - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) -- [ExDoc](https://github.com/elixir-lang/ex_doc) - - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [ui.markdown(..., extras=\['mermaid'\])](https://nicegui.io/reference#markdown_element) +- [Reveal.js](https://github.com/hakimel/reveal.js) + - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) +- [Reveal CK](https://github.com/jedcn/reveal-ck) + - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index b3f7213046..b48746bc41 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -16,48 +16,48 @@ Below are a list of community plugins and integrations created with Mermaid. ✅ = Native support +- [Atlassian Products](https://www.atlassian.com) + - [Mermaid for Confluence](https://marketplace.atlassian.com/apps/1224722/mermaid-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) + - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) + - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) + - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) + - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) + - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) + - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) +- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ +- [Deepdwn](https://billiam.itch.io/deepdwn) ✅ +- [GitBook](https://gitbook.com) + - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) + - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) + - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) +- [Gitea](https://gitea.io) ✅ - [GitHub](https://github.com) ✅ - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitHub Writer](https://github.com/ckeditor/github-writer) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ -- [Gitea](https://gitea.io) ✅ -- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ +- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) +- [Joplin](https://joplinapp.org) ✅ +- [LiveBook](https://livebook.dev) ✅ - [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ -- [Deepdwn](https://billiam.itch.io/deepdwn) ✅ -- [Joplin](https://joplinapp.org) ✅ +- [mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ - [Swimm](https://swimm.io) ✅ +- [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ -- [NotesHub](https://noteshub.app) ✅ -- [GitBook](https://gitbook.com) - - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) - - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) -- [LiveBook](https://livebook.dev) ✅ -- [Atlassian Products](https://www.atlassian.com) - - [Mermaid for Confluence](https://marketplace.atlassian.com/apps/1224722/mermaid-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) - - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) - - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) - - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) - - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) - - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) -- [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) -- [mermerd](https://github.com/KarnerTh/mermerd) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) ### CRM/ERP @@ -70,27 +70,27 @@ Customer Relationship Management/Enterprise Resource Planning Blogging frameworks and platforms -- [WordPress](https://wordpress.org) - - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) - - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) - [Hexo](https://hexo.io) - [hexo-filter-mermaid-diagrams](https://github.com/webappdevelp/hexo-filter-mermaid-diagrams) - [hexo-tag-mermaid](https://github.com/JameChou/hexo-tag-mermaid) - [hexo-mermaid-diagrams](https://github.com/mslxl/hexo-mermaid-diagrams) - [Nextra](https://nextra.site/) - [Mermaid](https://nextra.site/docs/guide/mermaid) +- [WordPress](https://wordpress.org) + - [WordPress Markdown Editor](https://wordpress.org/plugins/wp-githuber-md) + - [WP-ReliableMD](https://wordpress.org/plugins/wp-reliablemd/) ### CMS/ECM Content Management Systems/Enterprise Content Management +- [Grav CMS](https://getgrav.org/) + - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) + - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) - [VitePress](https://vitepress.vuejs.org/) - [Plugin for Mermaid.js](https://emersonbottero.github.io/vitepress-plugin-mermaid/) - [VuePress](https://vuepress.vuejs.org/) - [Plugin for Mermaid.js](https://github.com/eFrane/vuepress-plugin-mermaidjs) -- [Grav CMS](https://getgrav.org/) - - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) ### Communication @@ -100,105 +100,105 @@ Communication tools and platforms - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid), [And](https://github.com/unfoldingWord-dev/discourse-mermaid) - [Mattermost](https://mattermost.com/) - [Mermaid Plugin](https://github.com/SpikeTings/Mermaid) -- [phpBB](https://phpbb.com) - - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [NodeBB](https://nodebb.org) - [Mermaid Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) +- [phpBB](https://phpbb.com) + - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [Slack](https://slack.com) - [Mermaid for Slack](https://github.com/JackuB/mermaid-for-slack) ### Wikis +- [DokuWiki](https://dokuwiki.org) + - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) + - [ComboStrap](https://combostrap.com/mermaid) +- [Foswiki](https://foswiki.org) + - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [MediaWiki](https://www.mediawiki.org) - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) -- [Foswiki](https://foswiki.org) - - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) -- [DokuWiki](https://dokuwiki.org) - - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - - [ComboStrap](https://combostrap.com/mermaid) - [TiddlyWiki](https://tiddlywiki.com/) - [mermaid-tw5: full js library](https://github.com/efurlanm/mermaid-tw5) - [tw5-mermaid: wrapper for Mermaid Live](https://github.com/jasonmhoule/tw5-mermaid) ### Editor Plugins -- [VS Code](https://code.visualstudio.com/) - - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) - - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) - - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) - - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) - - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) - - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) - - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) -- [Markdown-It](https://github.com/markdown-it/markdown-it) - - [Textual UML Parser](https://github.com/manastalukdar/markdown-it-textual-uml) - - [Mermaid Plugin](https://github.com/tylingsoft/markdown-it-mermaid) - - [md-it-mermaid](https://github.com/iamcco/md-it-mermaid) - - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) - - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - Atom _(Atom has been [archived.](https://github.blog/2022-06-08-sunsetting-atom/))_ - [Markdown Preview Enhanced](https://github.com/shd101wyy/markdown-preview-enhanced) - [Atom Mermaid](https://github.com/y-takey/atom-mermaid) - [Language Mermaid Syntax Highlighter](https://github.com/ytisf/language-mermaid) -- [Sublime Text 3](https://sublimetext.com) - - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [Astah](https://astah.net) - [Export to Mermaid](https://github.com/Avens666/Astah_Jude_UML_export_to_Markdown-mermaid-Plantuml-) -- [Light Table](http://lighttable.com/) - - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) +- [Brackets](https://brackets.io/) + - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) +- [CKEditor](https://github.com/ckeditor/ckeditor5) + - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) - [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) -- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) -- [Vim](https://www.vim.org) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) - - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) - [GNU Emacs](https://www.gnu.org/software/emacs/) - [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode) - [Org-Mode integration](https://github.com/arnm/ob-mermaid) -- [Brackets](https://brackets.io/) - - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) -- [Iodide](https://github.com/iodide-project/iodide) - - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [GNU Nano](https://www.nano-editor.org/) + - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) - [Google docs](https://docs.google.com/) - [Mermaid plugin for google docs](https://workspace.google.com/marketplace/app/mermaid/636321283856) +- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) +- [Iodide](https://github.com/iodide-project/iodide) + - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [Light Table](http://lighttable.com/) + - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) +- [Markdown-It](https://github.com/markdown-it/markdown-it) + - [Textual UML Parser](https://github.com/manastalukdar/markdown-it-textual-uml) + - [Mermaid Plugin](https://github.com/tylingsoft/markdown-it-mermaid) + - [md-it-mermaid](https://github.com/iamcco/md-it-mermaid) + - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) + - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - [Podlite](https://github.com/zag/podlite-desktop) - [Named block =Diagram](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) -- [GNU Nano](https://www.nano-editor.org/) - - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) -- [CKEditor](https://github.com/ckeditor/ckeditor5) - - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) - [Standard Notes](https://standardnotes.com/) - [sn-mermaid](https://github.com/nienow/sn-mermaid) +- [Sublime Text 3](https://sublimetext.com) + - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) +- [VS Code](https://code.visualstudio.com/) + - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) + - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) + - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) + - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) + - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) + - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) + - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) + - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) + - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) +- [Vim](https://www.vim.org) + - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) + - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) ### Document Generation +- [Codedoc](https://codedoc.cc/) + - [codedoc-mermaid-plugin](https://www.npmjs.com/package/codedoc-mermaid-plugin) +- [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (native support in theme) - [Docusaurus](https://docusaurus.io/docs/markdown-features/diagrams) ✅ -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) -- [Sphinx](https://www.sphinx-doc.org/en/master/) - - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) -- [remark](https://remark.js.org/) - - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) -- [rehype](https://github.com/rehypejs/rehype) - - [rehype-mermaid](https://github.com/remcohaszing/rehype-mermaid) - [Gatsby](https://www.gatsbyjs.com/) - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) - [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) +- [mdbook](https://rust-lang.github.io/mdBook/index.html) + - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) - [mkdocs-material](https://github.com/squidfunk/mkdocs-material), check the [docs](https://squidfunk.github.io/mkdocs-material/reference/diagrams/) + - [Quarto](https://quarto.org/) +- [rehype](https://github.com/rehypejs/rehype) + - [rehype-mermaid](https://github.com/remcohaszing/rehype-mermaid) +- [remark](https://remark.js.org/) + - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) +- [Sphinx](https://www.sphinx-doc.org/en/master/) + - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) +- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) -- [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (native support in theme) -- [Codedoc](https://codedoc.cc/) - - [codedoc-mermaid-plugin](https://www.npmjs.com/package/codedoc-mermaid-plugin) -- [mdbook](https://rust-lang.github.io/mdBook/index.html) - - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) -- [Quarto](https://quarto.org/) - [Typora](https://typora.io/) ([native support](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid)) ### Browser Extensions @@ -218,19 +218,19 @@ Communication tools and platforms ### Other +- [Bisheng](https://www.npmjs.com/package/bisheng) + - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) +- [ExDoc](https://github.com/elixir-lang/ex_doc) + - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) - [Jekyll](https://jekyllrb.com/) - [jekyll-mermaid](https://rubygems.org/gems/jekyll-mermaid) - [jekyll-mermaid-diagrams](https://github.com/fuzhibo/jekyll-mermaid-diagrams) -- [Reveal.js](https://github.com/hakimel/reveal.js) - - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) -- [Bisheng](https://www.npmjs.com/package/bisheng) - - [bisheng-plugin-mermaid](https://github.com/yct21/bisheng-plugin-mermaid) -- [Reveal CK](https://github.com/jedcn/reveal-ck) - - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) -- [ExDoc](https://github.com/elixir-lang/ex_doc) - - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [ui.markdown(..., extras=['mermaid'])](https://nicegui.io/reference#markdown_element) +- [Reveal.js](https://github.com/hakimel/reveal.js) + - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) +- [Reveal CK](https://github.com/jedcn/reveal-ck) + - [reveal-ck-mermaid-plugin](https://github.com/tmtm/reveal-ck-mermaid-plugin) From 783becebf626d165d78a053f127a5fee0f2a1712 Mon Sep 17 00:00:00 2001 From: Ronid1 Date: Wed, 22 Nov 2023 18:48:52 -0800 Subject: [PATCH 091/316] alphabetically order sub categories --- docs/ecosystem/integrations-community.md | 26 +++++++++---------- .../docs/ecosystem/integrations-community.md | 26 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index d74918e613..0b560cc912 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -23,26 +23,26 @@ Below are a list of community plugins and integrations created with Mermaid. - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) + - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) - [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ - [Deepdwn](https://billiam.itch.io/deepdwn) ✅ - [GitBook](https://gitbook.com) - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) - - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) + - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - [Gitea](https://gitea.io) ✅ - [GitHub](https://github.com) ✅ - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitHub Writer](https://github.com/ckeditor/github-writer) + - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ - [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) - [Joplin](https://joplinapp.org) ✅ @@ -58,8 +58,8 @@ Below are a list of community plugins and integrations created with Mermaid. - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) + - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) ### CRM/ERP @@ -112,13 +112,13 @@ Communication tools and platforms ### Wikis - [DokuWiki](https://dokuwiki.org) - - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - [ComboStrap](https://combostrap.com/mermaid) + - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - [Foswiki](https://foswiki.org) - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [MediaWiki](https://www.mediawiki.org) - - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) + - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) - [TiddlyWiki](https://tiddlywiki.com/) @@ -163,18 +163,18 @@ Communication tools and platforms - [Sublime Text 3](https://sublimetext.com) - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [VS Code](https://code.visualstudio.com/) - - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) - - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) - - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) + - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) + - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) + - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) + - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Vim](https://www.vim.org) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) + - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) ### Document Generation @@ -230,8 +230,8 @@ Communication tools and platforms - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [ui.markdown(..., extras=\['mermaid'\])](https://nicegui.io/reference#markdown_element) + - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [Reveal.js](https://github.com/hakimel/reveal.js) - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) - [Reveal CK](https://github.com/jedcn/reveal-ck) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index b48746bc41..d64f06875d 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -21,26 +21,26 @@ Below are a list of community plugins and integrations created with Mermaid. - [Mermaid Integration for Confluence](https://marketplace.atlassian.com/apps/1222792/mermaid-integration-for-confluence?hosting=cloud&tab=overview) - [Mermaid Charts & Diagrams for Confluence](https://marketplace.atlassian.com/apps/1222572/) - [Mermaid Diagrams for Confluence](https://marketplace.atlassian.com/apps/1226945/mermaid-diagrams-for-confluence?hosting=cloud&tab=overview) - - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - [Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview) + - [Mermaid Macro for Confluence](https://marketplace.atlassian.com/apps/1231150/mermaid-macro-for-confluence?hosting=cloud&tab=overview) - [Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview) - [EliteSoft Mermaid Charts and Diagrams](https://marketplace.atlassian.com/apps/1227286/elitesoft-mermaid-charts-and-diagrams?hosting=cloud&tab=overview) - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) + - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) - [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ - [Deepdwn](https://billiam.itch.io/deepdwn) ✅ - [GitBook](https://gitbook.com) - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) - - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - [Mermaid plugin for GitBook](https://github.com/wwformat/gitbook-plugin-mermaid-pdf) + - [Markdown with Mermaid CLI](https://github.com/miao1007/gitbook-plugin-mermaid-cli) - [Gitea](https://gitea.io) ✅ - [GitHub](https://github.com) ✅ - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitHub Writer](https://github.com/ckeditor/github-writer) + - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ - [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) - [Joplin](https://joplinapp.org) ✅ @@ -56,8 +56,8 @@ Below are a list of community plugins and integrations created with Mermaid. - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) + - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) ### CRM/ERP @@ -110,13 +110,13 @@ Communication tools and platforms ### Wikis - [DokuWiki](https://dokuwiki.org) - - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - [ComboStrap](https://combostrap.com/mermaid) + - [Mermaid Plugin](https://www.dokuwiki.org/plugin:mermaid) - [Foswiki](https://foswiki.org) - [Mermaid Plugin](https://foswiki.org/Extensions/MermaidPlugin) - [MediaWiki](https://www.mediawiki.org) - - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Flex Diagrams Extension](https://www.mediawiki.org/wiki/Extension:Flex_Diagrams) + - [Mermaid Extension](https://www.mediawiki.org/wiki/Extension:Mermaid) - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) - [TiddlyWiki](https://tiddlywiki.com/) @@ -161,18 +161,18 @@ Communication tools and platforms - [Sublime Text 3](https://sublimetext.com) - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [VS Code](https://code.visualstudio.com/) - - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) - - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) - - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) - [Mermaid Export](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.mermaid-export) - [Markdown PDF](https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf) + - [Markdown Preview Mermaid Support](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid) + - [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced) + - [Mermaid Preview](https://marketplace.visualstudio.com/items?itemName=vstirbu.vscode-mermaid-preview) - [Preview](https://marketplace.visualstudio.com/items?itemName=searKing.preview-vscode) - [Preview Sequence Diagrams](https://marketplace.visualstudio.com/items?itemName=arichika.previewseqdiag-vscode) + - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Vim](https://www.vim.org) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) + - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) ### Document Generation @@ -228,8 +228,8 @@ Communication tools and platforms - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [ui.markdown(..., extras=['mermaid'])](https://nicegui.io/reference#markdown_element) + - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) - [Reveal.js](https://github.com/hakimel/reveal.js) - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) - [Reveal CK](https://github.com/jedcn/reveal-ck) From aaf9fd5f03d55d7389d4a1afbeb978dafeeeecb8 Mon Sep 17 00:00:00 2001 From: Ronid1 Date: Thu, 23 Nov 2023 16:21:12 -0800 Subject: [PATCH 092/316] update and verify links --- docs/ecosystem/integrations-community.md | 47 +++++++++--------- .../docs/ecosystem/integrations-community.md | 48 +++++++++---------- 2 files changed, 46 insertions(+), 49 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 0b560cc912..2db6b00e1e 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -30,8 +30,8 @@ Below are a list of community plugins and integrations created with Mermaid. - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) -- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ + - [CloudScript.io Mermaid Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) +- [Azure Devops](https://learn.microsoft.com/en-us/azure/devops/project/wiki/markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ - [Deepdwn](https://billiam.itch.io/deepdwn) ✅ - [GitBook](https://gitbook.com) - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) @@ -42,23 +42,23 @@ Below are a list of community plugins and integrations created with Mermaid. - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - [GitHub Writer](https://github.com/ckeditor/github-writer) - - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) + - [SVG diagram generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ - [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) - [Joplin](https://joplinapp.org) ✅ - [LiveBook](https://livebook.dev) ✅ - [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ -- [mermerd](https://github.com/KarnerTh/mermerd) +- [Mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ -- [Swimm](https://swimm.io) ✅ +- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts) ✅ - [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) + - [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) @@ -87,7 +87,7 @@ Blogging frameworks and platforms Content Management Systems/Enterprise Content Management - [Grav CMS](https://getgrav.org/) - - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) + - [Mermaid Diagrams Plugin](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) - [VitePress](https://vitepress.vuejs.org/) - [Plugin for Mermaid.js](https://emersonbottero.github.io/vitepress-plugin-mermaid/) @@ -99,15 +99,15 @@ Content Management Systems/Enterprise Content Management Communication tools and platforms - [Discourse](https://discourse.org) - - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid), [And](https://github.com/unfoldingWord-dev/discourse-mermaid) + - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid) - [Mattermost](https://mattermost.com/) - [Mermaid Plugin](https://github.com/SpikeTings/Mermaid) - [NodeBB](https://nodebb.org) - - [Mermaid Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) + - [Mermaid Parser Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) - [phpBB](https://phpbb.com) - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [Slack](https://slack.com) - - [Mermaid for Slack](https://github.com/JackuB/mermaid-for-slack) + - [Mermaid Preview](https://github.com/JackuB/mermaid-for-slack) ### Wikis @@ -122,8 +122,8 @@ Communication tools and platforms - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) - [TiddlyWiki](https://tiddlywiki.com/) - - [mermaid-tw5: full js library](https://github.com/efurlanm/mermaid-tw5) - - [tw5-mermaid: wrapper for Mermaid Live](https://github.com/jasonmhoule/tw5-mermaid) + - [mermaid-tw5: wrapper for Mermaid Live](https://github.com/efurlanm/mermaid-tw5) + - [tw5-mermaid: plugin for managing Mermaid.js tiddlers](https://github.com/jasonmhoule/tw5-mermaid) ### Editor Plugins @@ -137,7 +137,8 @@ Communication tools and platforms - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) - [CKEditor](https://github.com/ckeditor/ckeditor5) - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) -- [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) +- [Draw.io](https://draw.io) + - [Mermaid Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) - [GNU Emacs](https://www.gnu.org/software/emacs/) - [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode) - [Org-Mode integration](https://github.com/arnm/ob-mermaid) @@ -145,9 +146,8 @@ Communication tools and platforms - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) - [Google docs](https://docs.google.com/) - [Mermaid plugin for google docs](https://workspace.google.com/marketplace/app/mermaid/636321283856) -- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) -- [Iodide](https://github.com/iodide-project/iodide) - - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [Inkdrop](https://www.inkdrop.app) + - [Mermaid Plugin](https://github.com/inkdropapp/inkdrop-mermaid) - [Light Table](http://lighttable.com/) - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) - [Markdown-It](https://github.com/markdown-it/markdown-it) @@ -157,9 +157,9 @@ Communication tools and platforms - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - [Podlite](https://github.com/zag/podlite-desktop) - - [Named block =Diagram](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) + - [=Diagram block](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) - [Standard Notes](https://standardnotes.com/) - - [sn-mermaid](https://github.com/nienow/sn-mermaid) + - [Mermaid Extension](https://github.com/nienow/sn-mermaid) - [Sublime Text 3](https://sublimetext.com) - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [VS Code](https://code.visualstudio.com/) @@ -174,7 +174,7 @@ Communication tools and platforms - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Vim](https://www.vim.org) - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) + - [Official Vim Syntax and ft plugin](https://github.com/craigmac/vim-mermaid) ### Document Generation @@ -186,7 +186,7 @@ Communication tools and platforms - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) - [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) -- [mdbook](https://rust-lang.github.io/mdBook/index.html) +- [mdBook](https://rust-lang.github.io/mdBook/index.html) - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) @@ -201,7 +201,7 @@ Communication tools and platforms - [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) -- [Typora](https://typora.io/) ([native support](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid)) +- [Typora](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid) ✅ ### Browser Extensions @@ -212,7 +212,7 @@ Communication tools and platforms | Diagram Tab | - | - | - | - | [🐙🔗](https://github.com/khafast/diagramtab) | | Markdown Diagrams | [🎡🔗](https://chrome.google.com/webstore/detail/markdown-diagrams/pmoglnmodacnbbofbgcagndelmgaclel/) | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-diagrams/) | [🔴🔗](https://addons.opera.com/en/extensions/details/markdown-diagrams/) | [🌀🔗](https://microsoftedge.microsoft.com/addons/detail/markdown-diagrams/hceenoomhhdkjjijnmlclkpenkapfihe) | [🐙🔗](https://github.com/marcozaccari/markdown-diagrams-browser-extension/tree/master/doc/examples) | | Markdown Viewer | - | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/) | - | - | [🐙🔗](https://github.com/simov/markdown-viewer) | -| Extensions for Mermaid | - | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/) | [🔴🔗](https://addons.opera.com/en/extensions/details/extensions-for-mermaid/) | - | [🐙🔗](https://github.com/Stefan-S/mermaid-extension) | +| Extensions for Mermaid | - | - | [🔴🔗](https://addons.opera.com/en/extensions/details/extensions-for-mermaid/) | - | [🐙🔗](https://github.com/Stefan-S/mermaid-extension) | | Chrome Diagrammer | [🎡🔗](https://chrome.google.com/webstore/detail/chrome-diagrammer/bkpbgjmkomfoakfklcjeoegkklgjnnpk) | - | - | - | - | | Mermaid Diagrams | [🎡🔗](https://chrome.google.com/webstore/detail/mermaid-diagrams/phfcghedmopjadpojhmmaffjmfiakfil) | - | - | - | - | | Monkeys | [🎡🔗](https://chrome.google.com/webstore/detail/monkeys-mermaid-for-githu/cplfdpoajbclbgphaphphcldamfkjlgi) | - | - | - | - | @@ -230,8 +230,7 @@ Communication tools and platforms - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - - [ui.markdown(..., extras=\['mermaid'\])](https://nicegui.io/reference#markdown_element) - - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) + - [ui.mermaid(...)](https://nicegui.io/documentation/mermaid) - [Reveal.js](https://github.com/hakimel/reveal.js) - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) - [Reveal CK](https://github.com/jedcn/reveal-ck) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index d64f06875d..8fab1daa8b 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -28,8 +28,8 @@ Below are a list of community plugins and integrations created with Mermaid. - [Auto convert diagrams in Jira](https://github.com/coddingtonbear/jirafs-mermaid) - [Mermaid Charts & Diagrams for Jira](https://marketplace.atlassian.com/apps/1224537/) - [Mermaid for Jira Cloud - Draw UML diagrams easily](https://marketplace.atlassian.com/apps/1223053/mermaid-for-jira-cloud-draw-uml-diagrams-easily?hosting=cloud&tab=overview) - - [CloudScript.io Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) -- [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/project/wiki/wiki-markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ + - [CloudScript.io Mermaid Addon](https://marketplace.atlassian.com/apps/1219878/cloudscript-io-mermaid-addon?hosting=cloud&tab=overview) +- [Azure Devops](https://learn.microsoft.com/en-us/azure/devops/project/wiki/markdown-guidance?view=azure-devops#add-mermaid-diagrams-to-a-wiki-page) ✅ - [Deepdwn](https://billiam.itch.io/deepdwn) ✅ - [GitBook](https://gitbook.com) - [Mermaid Plugin](https://github.com/JozoVilcek/gitbook-plugin-mermaid) @@ -40,23 +40,23 @@ Below are a list of community plugins and integrations created with Mermaid. - [Using code blocks](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) ✅ - [GitHub action: Compile mermaid to image](https://github.com/neenjaw/compile-mermaid-markdown-action) - [GitHub Writer](https://github.com/ckeditor/github-writer) - - [svg-generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) + - [SVG diagram generator](https://github.com/SimonKenyonShepard/mermaidjs-github-svg-generator) - [GitLab](https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts) ✅ - [Mermaid Plugin for JetBrains IDEs](https://plugins.jetbrains.com/plugin/20146-mermaid) - [Joplin](https://joplinapp.org) ✅ - [LiveBook](https://livebook.dev) ✅ - [Tuleap](https://docs.tuleap.org/user-guide/writing-in-tuleap.html#graphs) ✅ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ -- [mermerd](https://github.com/KarnerTh/mermerd) +- [Mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ -- [Swimm](https://swimm.io) ✅ +- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) ✅ - [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ - [Obsidian](https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram) ✅ - [Redmine](https://redmine.org) - [Mermaid Macro](https://www.redmine.org/plugins/redmine_mermaid_macro) - - [markdown-for-mermaid-plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) + - [Markdown for mermaid plugin](https://github.com/jamieh-mongolian/markdown-for-mermaid-plugin) - [redmine-mermaid](https://github.com/styz/redmine_mermaid) - Visual Studio Code [Polyglot Interactive Notebooks](https://github.com/dotnet/interactive#net-interactive) @@ -85,7 +85,7 @@ Blogging frameworks and platforms Content Management Systems/Enterprise Content Management - [Grav CMS](https://getgrav.org/) - - [Mermaid Diagrams](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) + - [Mermaid Diagrams Plugin](https://github.com/DanielFlaum/grav-plugin-mermaid-diagrams) - [GitLab Markdown Adapter](https://github.com/Goutte/grav-plugin-gitlab-markdown-adapter) - [VitePress](https://vitepress.vuejs.org/) - [Plugin for Mermaid.js](https://emersonbottero.github.io/vitepress-plugin-mermaid/) @@ -97,15 +97,15 @@ Content Management Systems/Enterprise Content Management Communication tools and platforms - [Discourse](https://discourse.org) - - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid), [And](https://github.com/unfoldingWord-dev/discourse-mermaid) + - [Mermaid Plugin](https://github.com/pnewell/discourse-mermaid) - [Mattermost](https://mattermost.com/) - [Mermaid Plugin](https://github.com/SpikeTings/Mermaid) - [NodeBB](https://nodebb.org) - - [Mermaid Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) + - [Mermaid Parser Plugin](https://www.npmjs.com/package/nodebb-plugin-mermaid) - [phpBB](https://phpbb.com) - [phpbb-ext-mermaid](https://github.com/AlfredoRamos/phpbb-ext-mermaid) - [Slack](https://slack.com) - - [Mermaid for Slack](https://github.com/JackuB/mermaid-for-slack) + - [Mermaid Preview](https://github.com/JackuB/mermaid-for-slack) ### Wikis @@ -120,8 +120,8 @@ Communication tools and platforms - [Semantic Media Wiki](https://semantic-mediawiki.org) - [Mermaid Plugin](https://github.com/SemanticMediaWiki/Mermaid) - [TiddlyWiki](https://tiddlywiki.com/) - - [mermaid-tw5: full js library](https://github.com/efurlanm/mermaid-tw5) - - [tw5-mermaid: wrapper for Mermaid Live](https://github.com/jasonmhoule/tw5-mermaid) + - [mermaid-tw5: wrapper for Mermaid Live](https://github.com/efurlanm/mermaid-tw5) + - [tw5-mermaid: plugin for managing Mermaid.js tiddlers](https://github.com/jasonmhoule/tw5-mermaid) ### Editor Plugins @@ -135,7 +135,8 @@ Communication tools and platforms - [Mermaid Preview](https://github.com/AlanHohn/mermaid-preview) - [CKEditor](https://github.com/ckeditor/ckeditor5) - [CKEditor 5 Mermaid plugin](https://github.com/ckeditor/ckeditor5-mermaid) -- [Draw.io](https://draw.io) - [Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) +- [Draw.io](https://draw.io) + - [Mermaid Plugin](https://github.com/nopeslide/drawio_mermaid_plugin) - [GNU Emacs](https://www.gnu.org/software/emacs/) - [Major mode for .mmd files](https://github.com/abrochard/mermaid-mode) - [Org-Mode integration](https://github.com/arnm/ob-mermaid) @@ -143,9 +144,8 @@ Communication tools and platforms - [Nano Mermaid](https://github.com/Yash-Singh1/nano-mermaid) - [Google docs](https://docs.google.com/) - [Mermaid plugin for google docs](https://workspace.google.com/marketplace/app/mermaid/636321283856) -- [Inkdrop](https://www.inkdrop.app) - [Plugin](https://github.com/inkdropapp/inkdrop-mermaid) -- [Iodide](https://github.com/iodide-project/iodide) - - [iodide-mermaid-plugin](https://github.com/iodide-project/iodide-mermaid-plugin) +- [Inkdrop](https://www.inkdrop.app) + - [Mermaid Plugin](https://github.com/inkdropapp/inkdrop-mermaid) - [Light Table](http://lighttable.com/) - [Mermaid Plugin](https://github.com/cldwalker/Mermaid) - [Markdown-It](https://github.com/markdown-it/markdown-it) @@ -155,9 +155,9 @@ Communication tools and platforms - [markdown-it-mermaid-fence-new](https://github.com/Revomatico/markdown-it-mermaid-fence-new) - [markdown-it-mermaid-less](https://github.com/searKing/markdown-it-mermaid-less) - [Podlite](https://github.com/zag/podlite-desktop) - - [Named block =Diagram](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) + - [=Diagram block](https://github.com/zag/podlite/tree/main/packages/podlite-diagrams) - [Standard Notes](https://standardnotes.com/) - - [sn-mermaid](https://github.com/nienow/sn-mermaid) + - [Mermaid Extension](https://github.com/nienow/sn-mermaid) - [Sublime Text 3](https://sublimetext.com) - [Mermaid Package](https://packagecontrol.io/packages/Mermaid) - [VS Code](https://code.visualstudio.com/) @@ -172,7 +172,7 @@ Communication tools and platforms - [Mermaid Markdown Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=bpruitt-goddard.mermaid-markdown-syntax-highlighting) - [Vim](https://www.vim.org) - [Vim Diagram Syntax](https://github.com/zhaozg/vim-diagram) - - [Official Vim Syntax and ftplugin](https://github.com/craigmac/vim-mermaid) + - [Official Vim Syntax and ft plugin](https://github.com/craigmac/vim-mermaid) ### Document Generation @@ -184,7 +184,7 @@ Communication tools and platforms - [gatsby-remark-mermaid](https://github.com/remcohaszing/gatsby-remark-mermaid) - [JSDoc](https://jsdoc.app/) - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) -- [mdbook](https://rust-lang.github.io/mdBook/index.html) +- [mdBook](https://rust-lang.github.io/mdBook/index.html) - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) - [MkDocs](https://www.mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) @@ -196,10 +196,9 @@ Communication tools and platforms - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) - [Sphinx](https://www.sphinx-doc.org/en/master/) - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) -- [Typora](https://typora.io/) ([native support](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid)) +- [Typora](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid) ✅ ### Browser Extensions @@ -210,7 +209,7 @@ Communication tools and platforms | Diagram Tab | - | - | - | - | [🐙🔗](https://github.com/khafast/diagramtab) | | Markdown Diagrams | [🎡🔗](https://chrome.google.com/webstore/detail/markdown-diagrams/pmoglnmodacnbbofbgcagndelmgaclel/) | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-diagrams/) | [🔴🔗](https://addons.opera.com/en/extensions/details/markdown-diagrams/) | [🌀🔗](https://microsoftedge.microsoft.com/addons/detail/markdown-diagrams/hceenoomhhdkjjijnmlclkpenkapfihe) | [🐙🔗](https://github.com/marcozaccari/markdown-diagrams-browser-extension/tree/master/doc/examples) | | Markdown Viewer | - | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/) | - | - | [🐙🔗](https://github.com/simov/markdown-viewer) | -| Extensions for Mermaid | - | [🦊🔗](https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/) | [🔴🔗](https://addons.opera.com/en/extensions/details/extensions-for-mermaid/) | - | [🐙🔗](https://github.com/Stefan-S/mermaid-extension) | +| Extensions for Mermaid | - | - | [🔴🔗](https://addons.opera.com/en/extensions/details/extensions-for-mermaid/) | - | [🐙🔗](https://github.com/Stefan-S/mermaid-extension) | | Chrome Diagrammer | [🎡🔗](https://chrome.google.com/webstore/detail/chrome-diagrammer/bkpbgjmkomfoakfklcjeoegkklgjnnpk) | - | - | - | - | | Mermaid Diagrams | [🎡🔗](https://chrome.google.com/webstore/detail/mermaid-diagrams/phfcghedmopjadpojhmmaffjmfiakfil) | - | - | - | - | | Monkeys | [🎡🔗](https://chrome.google.com/webstore/detail/monkeys-mermaid-for-githu/cplfdpoajbclbgphaphphcldamfkjlgi) | - | - | - | - | @@ -228,8 +227,7 @@ Communication tools and platforms - [mermaid-isomorphic](https://github.com/remcohaszing/mermaid-isomorphic) - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [NiceGUI: Let any browser be the frontend of your Python code](https://nicegui.io) - - [ui.markdown(..., extras=['mermaid'])](https://nicegui.io/reference#markdown_element) - - [ui.mermaid(...)](https://nicegui.io/reference#mermaid_diagrams) + - [ui.mermaid(...)](https://nicegui.io/documentation/mermaid) - [Reveal.js](https://github.com/hakimel/reveal.js) - [reveal.js-mermaid-plugin](https://github.com/ludwick/reveal.js-mermaid-plugin) - [Reveal CK](https://github.com/jedcn/reveal-ck) From 55ce05fc751fee46c16cbe834aef887cbf534285 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 10:25:50 +0530 Subject: [PATCH 093/316] chore: Add tests for calculateDeltaAndAngle --- .vite/build.ts | 3 ++ packages/mermaid/src/mermaid.spec.ts | 2 +- packages/mermaid/src/utils/lineWithOffset.ts | 49 ++++++++++++++++++-- packages/mermaid/tsconfig.json | 3 +- vite.config.ts | 4 ++ 5 files changed, 55 insertions(+), 6 deletions(-) diff --git a/.vite/build.ts b/.vite/build.ts index b89df9e310..bacc6bc6c6 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -117,6 +117,9 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions) output, }, }, + define: { + 'import.meta.vitest': 'undefined', + }, resolve: { extensions: [], }, diff --git a/packages/mermaid/src/mermaid.spec.ts b/packages/mermaid/src/mermaid.spec.ts index 87756dc4db..390ee74ef0 100644 --- a/packages/mermaid/src/mermaid.spec.ts +++ b/packages/mermaid/src/mermaid.spec.ts @@ -2,7 +2,7 @@ import mermaid from './mermaid.js'; import { mermaidAPI } from './mermaidAPI.js'; import './diagram-api/diagram-orchestration.js'; import { addDiagrams } from './diagram-api/diagram-orchestration.js'; -import { beforeAll, describe, it, expect, vi } from 'vitest'; +import { beforeAll, describe, it, expect, vi, afterEach } from 'vitest'; import type { DiagramDefinition } from './diagram-api/types.js'; beforeAll(async () => { diff --git a/packages/mermaid/src/utils/lineWithOffset.ts b/packages/mermaid/src/utils/lineWithOffset.ts index a90eb78358..af0cd3b46e 100644 --- a/packages/mermaid/src/utils/lineWithOffset.ts +++ b/packages/mermaid/src/utils/lineWithOffset.ts @@ -19,14 +19,14 @@ const markerOffsets = { * @returns The angle, deltaX and deltaY */ function calculateDeltaAndAngle( - point1: Point | [number, number], - point2: Point | [number, number] + point1?: Point | [number, number], + point2?: Point | [number, number] ): { angle: number; deltaX: number; deltaY: number } { - point1 = pointTransformer(point1); - point2 = pointTransformer(point2); if (point1 === undefined || point2 === undefined) { return { angle: 0, deltaX: 0, deltaY: 0 }; } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); const [x1, y1] = [point1.x, point1.y]; const [x2, y2] = [point2.x, point2.y]; const deltaX = x2 - x1; @@ -93,3 +93,44 @@ export const getLineFunctionsWithOffset = ( }, }; }; + +if (import.meta.vitest) { + const { it, expect, describe } = import.meta.vitest; + describe('calculateDeltaAndAngle', () => { + it('should calculate the angle and deltas between two points', () => { + expect(calculateDeltaAndAngle([0, 0], [0, 1])).toStrictEqual({ + angle: 1.5707963267948966, + deltaX: 0, + deltaY: 1, + }); + expect(calculateDeltaAndAngle([1, 0], [0, -1])).toStrictEqual({ + angle: 0.7853981633974483, + deltaX: -1, + deltaY: -1, + }); + expect(calculateDeltaAndAngle({ x: 1, y: 0 }, [0, -1])).toStrictEqual({ + angle: 0.7853981633974483, + deltaX: -1, + deltaY: -1, + }); + expect(calculateDeltaAndAngle({ x: 1, y: 0 }, { x: 1, y: 0 })).toStrictEqual({ + angle: NaN, + deltaX: 0, + deltaY: 0, + }); + }); + + it('should calculate the angle and deltas if one point in undefined', () => { + expect(calculateDeltaAndAngle(undefined, [0, 1])).toStrictEqual({ + angle: 0, + deltaX: 0, + deltaY: 0, + }); + expect(calculateDeltaAndAngle([0, 1], undefined)).toStrictEqual({ + angle: 0, + deltaX: 0, + deltaY: 0, + }); + }); + }); +} diff --git a/packages/mermaid/tsconfig.json b/packages/mermaid/tsconfig.json index c49ba69b0f..b32425399d 100644 --- a/packages/mermaid/tsconfig.json +++ b/packages/mermaid/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist" + "outDir": "./dist", + "types": ["vitest/importMeta"] }, "include": ["./src/**/*.ts", "./package.json"] } diff --git a/vite.config.ts b/vite.config.ts index 080ff981f5..8da356117f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,6 +24,7 @@ export default defineConfig({ reportsDirectory: './coverage/vitest', exclude: ['**/node_modules/**', '**/tests/**', '**/__mocks__/**'], }, + includeSource: ['packages/*/src/**/*.{js,ts}'], }, build: { /** If you set esmExternals to true, this plugins assumes that @@ -33,4 +34,7 @@ export default defineConfig({ esmExternals: true, }, }, + define: { + 'import.meta.vitest': 'undefined', + }, }); From 201016ccc5bfa73e13577702369caffef6fb56a1 Mon Sep 17 00:00:00 2001 From: Ronid1 Date: Thu, 23 Nov 2023 20:57:43 -0800 Subject: [PATCH 094/316] update build docs --- docs/ecosystem/integrations-community.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index 2db6b00e1e..8046417666 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -51,7 +51,7 @@ Below are a list of community plugins and integrations created with Mermaid. - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ - [Mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ -- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts) ✅ +- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) ✅ - [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ @@ -198,7 +198,6 @@ Communication tools and platforms - [remark-mermaidjs](https://github.com/remcohaszing/remark-mermaidjs) - [Sphinx](https://www.sphinx-doc.org/en/master/) - [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) -- [Swimm - Up-to-date diagrams with Swimm, the knowledge management tool for code](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) - [Typora](https://support.typora.io/Draw-Diagrams-With-Markdown/#mermaid) ✅ From cbcd2cce9bffbddd8e80f6b6370e91c5cdd602cf Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 10:38:32 +0530 Subject: [PATCH 095/316] chore: Optimize dev server --- .esbuild/server.ts | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/.esbuild/server.ts b/.esbuild/server.ts index fb3f236e2d..9102c7de83 100644 --- a/.esbuild/server.ts +++ b/.esbuild/server.ts @@ -7,37 +7,23 @@ import chokidar from 'chokidar'; import { generateLangium } from '../.build/generateLangium.js'; import { packageOptions } from '../.build/common.js'; -const parserCtx = await context( - getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: 'parser' }) +const configs = Object.values(packageOptions).map(({ packageName }) => + getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: packageName }) ); -const mermaidCtx = await context( - getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: 'mermaid' }) -); -const mermaidIIFECtx = await context( - getBuildConfig({ - ...defaultOptions, - minify: false, - core: false, - entryName: 'mermaid', - format: 'iife', - }) -); -const externalCtx = await context( - getBuildConfig({ - ...defaultOptions, - minify: false, - core: false, - entryName: 'mermaid-example-diagram', - }) -); -const zenumlCtx = await context( - getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: 'mermaid-zenuml' }) -); -const contexts = [parserCtx, mermaidCtx, mermaidIIFECtx, externalCtx, zenumlCtx]; +const mermaidIIFEConfig = getBuildConfig({ + ...defaultOptions, + minify: false, + core: false, + entryName: 'mermaid', + format: 'iife', +}); +configs.push(mermaidIIFEConfig); + +const contexts = await Promise.all(configs.map((config) => context(config))); const rebuildAll = async () => { console.time('Rebuild time'); - await Promise.all(contexts.map((ctx) => ctx.rebuild())); + await Promise.all(contexts.map((ctx) => ctx.rebuild())).catch((e) => console.error(e)); console.timeEnd('Rebuild time'); }; From 26df81816e51b5fe29bdd2cf4f2fcfd836be5cee Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 10:41:26 +0530 Subject: [PATCH 096/316] chore: Update pnpm-lock --- pnpm-lock.yaml | 456 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 299 insertions(+), 157 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b0bc7c2849..5434d0e5e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -377,7 +377,7 @@ importers: version: 1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0) vitepress-plugin-search: specifier: ^1.0.4-alpha.20 - version: 1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.7) + version: 1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.8) packages/mermaid-example-diagram: dependencies: @@ -481,6 +481,61 @@ importers: specifier: ^7.0.0 version: 7.0.0 + packages/mermaid/src/vitepress: + dependencies: + '@vueuse/core': + specifier: ^10.1.0 + version: 10.6.1(vue@3.3.8) + jiti: + specifier: ^1.18.2 + version: 1.21.0 + mermaid: + specifier: workspace:^ + version: link:../.. + vue: + specifier: ^3.3 + version: 3.3.8(typescript@5.1.6) + devDependencies: + '@iconify-json/carbon': + specifier: ^1.1.16 + version: 1.1.16 + '@unocss/reset': + specifier: ^0.57.0 + version: 0.57.1 + '@vite-pwa/vitepress': + specifier: ^0.2.0 + version: 0.2.3(vite-plugin-pwa@0.16.7) + '@vitejs/plugin-vue': + specifier: ^4.2.1 + version: 4.5.0(vite@4.5.0)(vue@3.3.8) + fast-glob: + specifier: ^3.2.12 + version: 3.3.2 + https-localhost: + specifier: ^4.7.1 + version: 4.7.1 + pathe: + specifier: ^1.1.0 + version: 1.1.1 + unocss: + specifier: ^0.57.0 + version: 0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0) + unplugin-vue-components: + specifier: ^0.25.0 + version: 0.25.0(rollup@2.79.1)(vue@3.3.8) + vite: + specifier: ^4.3.9 + version: 4.5.0(@types/node@18.17.5) + vite-plugin-pwa: + specifier: ^0.16.0 + version: 0.16.7(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0) + vitepress: + specifier: 1.0.0-rc.25 + version: 1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) + workbox-window: + specifier: ^7.0.0 + version: 7.0.0 + tests/webpack: dependencies: '@mermaid-js/mermaid-example-diagram': @@ -698,10 +753,6 @@ packages: find-up: 5.0.0 dev: true - /@antfu/utils@0.7.5: - resolution: {integrity: sha512-dlR6LdS+0SzOAPx/TPRhnoi7hE251OVeT2Snw0RguNbBSbjUHdWr0l3vcUUDg26rEysT89kCbtw1lVorBXLLCg==} - dev: true - /@antfu/utils@0.7.6: resolution: {integrity: sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w==} dev: true @@ -3696,7 +3747,7 @@ packages: resolution: {integrity: sha512-M/w3PkN8zQYXi8N6qK/KhnYMfEbbb6Sk8RZVn8g+Pmmu5ybw177RpsaGwpziyHeUsu4etrexYSWq3rwnIqzYCg==} dependencies: '@antfu/install-pkg': 0.1.1 - '@antfu/utils': 0.7.5 + '@antfu/utils': 0.7.6 '@iconify/types': 2.0.0 debug: 4.3.4(supports-color@8.1.1) kolorist: 1.8.0 @@ -4036,7 +4087,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dependencies: cross-spawn: 7.0.3 - fast-glob: 3.3.1 + fast-glob: 3.3.2 is-glob: 4.0.3 open: 9.1.0 picocolors: 1.0.0 @@ -4106,7 +4157,7 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.0.3(rollup@2.79.1) + '@rollup/pluginutils': 5.0.3 resolve: 1.22.4 typescript: 5.1.6 dev: true @@ -4123,7 +4174,7 @@ packages: rollup: 2.79.1 dev: true - /@rollup/pluginutils@5.0.3(rollup@2.79.1): + /@rollup/pluginutils@5.0.3: resolution: {integrity: sha512-hfllNN4a80rwNQ9QCxhxuHCGHMAvabXqxNdaChUSSadMre7t4iEUI6fFAhBOn/eIYTgYVhBv7vCLsAJ4u3lf3g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -4135,7 +4186,6 @@ packages: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 2.79.1 dev: true /@rollup/pluginutils@5.0.5(rollup@2.79.1): @@ -4915,7 +4965,6 @@ packages: /@types/web-bluetooth@0.0.20: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} - dev: true /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} @@ -5280,6 +5329,22 @@ packages: - rollup dev: true + /@unocss/astro@0.57.1(rollup@2.79.1)(vite@4.5.0): + resolution: {integrity: sha512-KNaqN/SGM/uz1QitajIkzNEw0jy9Zx9Wp8fl4GhfGYEMAN2+M4cuvBZRmlb6cLctSXmSAJQDG91ivbD1JijGnw==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@unocss/core': 0.57.1 + '@unocss/reset': 0.57.1 + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.5.0) + vite: 4.5.0(@types/node@18.17.5) + transitivePeerDependencies: + - rollup + dev: true + /@unocss/cli@0.57.1(rollup@2.79.1): resolution: {integrity: sha512-wKuOaygrPNzDm5L7+2SfHsIi3knJrAQ8nH6OasVqB+bGDz6ybDlULV7wvUco6Os72ydh7YbWC2/WpqFii8U/3w==} engines: {node: '>=14'} @@ -5294,7 +5359,7 @@ packages: chokidar: 3.5.3 colorette: 2.0.20 consola: 3.2.3 - fast-glob: 3.3.1 + fast-glob: 3.3.2 magic-string: 0.30.5 pathe: 1.1.1 perfect-debounce: 1.0.0 @@ -5338,7 +5403,7 @@ packages: '@unocss/core': 0.57.1 '@unocss/rule-utils': 0.57.1 css-tree: 2.3.1 - fast-glob: 3.3.1 + fast-glob: 3.3.2 magic-string: 0.30.5 postcss: 8.4.31 dev: true @@ -5465,13 +5530,41 @@ packages: '@unocss/scope': 0.57.1 '@unocss/transformer-directives': 0.57.1 chokidar: 3.5.3 - fast-glob: 3.3.1 + fast-glob: 3.3.2 magic-string: 0.30.5 vite: 4.4.9(@types/node@18.17.5) transitivePeerDependencies: - rollup dev: true + /@unocss/vite@0.57.1(rollup@2.79.1)(vite@4.5.0): + resolution: {integrity: sha512-kEBDvGgQNkX2n87S6Ao5seyFb1kuWZ5p96dGOS7VFpD7HvR5xholkJXaVhUK9/exCldjLExbo5UtVlbxFLUFYg==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 + dependencies: + '@ampproject/remapping': 2.2.1 + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + '@unocss/config': 0.57.1 + '@unocss/core': 0.57.1 + '@unocss/inspector': 0.57.1 + '@unocss/scope': 0.57.1 + '@unocss/transformer-directives': 0.57.1 + chokidar: 3.5.3 + fast-glob: 3.3.2 + magic-string: 0.30.5 + vite: 4.5.0(@types/node@18.17.5) + transitivePeerDependencies: + - rollup + dev: true + + /@vite-pwa/vitepress@0.2.3(vite-plugin-pwa@0.16.7): + resolution: {integrity: sha512-6k9151CmILbSJQ88hLEMLL+MOQZDURKg2c4Wo5UcaEaOWU0jv7S+mo8nqyg86sM6ry8Jlnp6Zfv6AE0FqnfEyQ==} + peerDependencies: + vite-plugin-pwa: '>=0.16.5 <1' + dependencies: + vite-plugin-pwa: 0.16.7(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0) + dev: true + /@vite-pwa/vitepress@0.3.0(vite-plugin-pwa@0.17.0): resolution: {integrity: sha512-7akiTt0laHJRSJ7lxPttGHYBoC2J+FgWJr0TGYQd2jPe/8nou+YSDwBGpOV+/qeobX2uzff8kew02n/07JRe9Q==} peerDependencies: @@ -5502,6 +5595,28 @@ packages: vue: 3.3.4 dev: true + /@vitejs/plugin-vue@4.3.1(vite@4.5.0)(vue@3.3.8): + resolution: {integrity: sha512-tUBEtWcF7wFtII7ayNiLNDTCE1X1afySEo+XNVMNkFXaThENyCowIEX095QqbJZGTgoOcSVDJGlnde2NG4jtbQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.0.0 + vue: ^3.2.25 + dependencies: + vite: 4.5.0(@types/node@18.17.5) + vue: 3.3.8(typescript@5.1.6) + dev: true + + /@vitejs/plugin-vue@4.5.0(vite@4.5.0)(vue@3.3.8): + resolution: {integrity: sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.0.0 || ^5.0.0 + vue: ^3.2.25 + dependencies: + vite: 4.5.0(@types/node@18.17.5) + vue: 3.3.8(typescript@5.1.6) + dev: true + /@vitejs/plugin-vue@4.5.0(vite@5.0.0)(vue@3.3.8): resolution: {integrity: sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -5570,7 +5685,7 @@ packages: vitest: '>=0.30.1 <1' dependencies: '@vitest/utils': 0.34.0 - fast-glob: 3.3.1 + fast-glob: 3.3.2 fflate: 0.8.0 flatted: 3.2.7 pathe: 1.1.1 @@ -5600,20 +5715,11 @@ packages: /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} - dependencies: - '@babel/parser': 7.22.10 - '@vue/shared': 3.3.4 - estree-walker: 2.0.2 - source-map-js: 1.0.2 - - /@vue/compiler-core@3.3.7: - resolution: {integrity: sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==} dependencies: '@babel/parser': 7.23.0 - '@vue/shared': 3.3.7 + '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 - dev: true /@vue/compiler-core@3.3.8: resolution: {integrity: sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==} @@ -5622,7 +5728,6 @@ packages: '@vue/shared': 3.3.8 estree-walker: 2.0.2 source-map-js: 1.0.2 - dev: true /@vue/compiler-dom@3.3.4: resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} @@ -5630,19 +5735,11 @@ packages: '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 - /@vue/compiler-dom@3.3.7: - resolution: {integrity: sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==} - dependencies: - '@vue/compiler-core': 3.3.7 - '@vue/shared': 3.3.7 - dev: true - /@vue/compiler-dom@3.3.8: resolution: {integrity: sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==} dependencies: '@vue/compiler-core': 3.3.8 '@vue/shared': 3.3.8 - dev: true /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} @@ -5654,24 +5751,9 @@ packages: '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.2 - postcss: 8.4.27 - source-map-js: 1.0.2 - - /@vue/compiler-sfc@3.3.7: - resolution: {integrity: sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==} - dependencies: - '@babel/parser': 7.23.0 - '@vue/compiler-core': 3.3.7 - '@vue/compiler-dom': 3.3.7 - '@vue/compiler-ssr': 3.3.7 - '@vue/reactivity-transform': 3.3.7 - '@vue/shared': 3.3.7 - estree-walker: 2.0.2 magic-string: 0.30.5 postcss: 8.4.31 source-map-js: 1.0.2 - dev: true /@vue/compiler-sfc@3.3.8: resolution: {integrity: sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==} @@ -5686,7 +5768,6 @@ packages: magic-string: 0.30.5 postcss: 8.4.31 source-map-js: 1.0.2 - dev: true /@vue/compiler-ssr@3.3.4: resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} @@ -5694,19 +5775,11 @@ packages: '@vue/compiler-dom': 3.3.4 '@vue/shared': 3.3.4 - /@vue/compiler-ssr@3.3.7: - resolution: {integrity: sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==} - dependencies: - '@vue/compiler-dom': 3.3.7 - '@vue/shared': 3.3.7 - dev: true - /@vue/compiler-ssr@3.3.8: resolution: {integrity: sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==} dependencies: '@vue/compiler-dom': 3.3.8 '@vue/shared': 3.3.8 - dev: true /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} @@ -5724,16 +5797,6 @@ packages: estree-walker: 2.0.2 magic-string: 0.30.5 - /@vue/reactivity-transform@3.3.7: - resolution: {integrity: sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==} - dependencies: - '@babel/parser': 7.23.0 - '@vue/compiler-core': 3.3.7 - '@vue/shared': 3.3.7 - estree-walker: 2.0.2 - magic-string: 0.30.5 - dev: true - /@vue/reactivity-transform@3.3.8: resolution: {integrity: sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==} dependencies: @@ -5742,24 +5805,16 @@ packages: '@vue/shared': 3.3.8 estree-walker: 2.0.2 magic-string: 0.30.5 - dev: true /@vue/reactivity@3.3.4: resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} dependencies: '@vue/shared': 3.3.4 - /@vue/reactivity@3.3.7: - resolution: {integrity: sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==} - dependencies: - '@vue/shared': 3.3.7 - dev: true - /@vue/reactivity@3.3.8: resolution: {integrity: sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==} dependencies: '@vue/shared': 3.3.8 - dev: true /@vue/runtime-core@3.3.4: resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} @@ -5767,19 +5822,11 @@ packages: '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 - /@vue/runtime-core@3.3.7: - resolution: {integrity: sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==} - dependencies: - '@vue/reactivity': 3.3.7 - '@vue/shared': 3.3.7 - dev: true - /@vue/runtime-core@3.3.8: resolution: {integrity: sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==} dependencies: '@vue/reactivity': 3.3.8 '@vue/shared': 3.3.8 - dev: true /@vue/runtime-dom@3.3.4: resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==} @@ -5788,21 +5835,12 @@ packages: '@vue/shared': 3.3.4 csstype: 3.1.2 - /@vue/runtime-dom@3.3.7: - resolution: {integrity: sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==} - dependencies: - '@vue/runtime-core': 3.3.7 - '@vue/shared': 3.3.7 - csstype: 3.1.2 - dev: true - /@vue/runtime-dom@3.3.8: resolution: {integrity: sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==} dependencies: '@vue/runtime-core': 3.3.8 '@vue/shared': 3.3.8 csstype: 3.1.2 - dev: true /@vue/server-renderer@3.3.4(vue@3.3.4): resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==} @@ -5813,16 +5851,6 @@ packages: '@vue/shared': 3.3.4 vue: 3.3.4 - /@vue/server-renderer@3.3.7(vue@3.3.7): - resolution: {integrity: sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==} - peerDependencies: - vue: 3.3.7 - dependencies: - '@vue/compiler-ssr': 3.3.7 - '@vue/shared': 3.3.7 - vue: 3.3.7(typescript@5.0.4) - dev: true - /@vue/server-renderer@3.3.8(vue@3.3.8): resolution: {integrity: sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==} peerDependencies: @@ -5830,19 +5858,13 @@ packages: dependencies: '@vue/compiler-ssr': 3.3.8 '@vue/shared': 3.3.8 - vue: 3.3.8(typescript@5.1.6) - dev: true + vue: 3.3.8(typescript@5.0.4) /@vue/shared@3.3.4: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} - /@vue/shared@3.3.7: - resolution: {integrity: sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==} - dev: true - /@vue/shared@3.3.8: resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} - dev: true /@vueuse/core@10.1.0(vue@3.3.4): resolution: {integrity: sha512-3Znoa5m5RO+z4/C9w6DRaKTR3wCVJvD5rav8HTDGsr+7rOZRHtcgFJ8NcCs0ZvIpmev2kExTa311ns5j2RbzDQ==} @@ -5878,7 +5900,6 @@ packages: transitivePeerDependencies: - '@vue/composition-api' - vue - dev: true /@vueuse/integrations@10.6.1(focus-trap@7.5.4)(vue@3.3.8): resolution: {integrity: sha512-mPDupuofMJ4DPmtX/FfP1MajmWRzYDv8WSaTCo8LQ5kFznjWgmUQ16ApjYqgMquqffNY6+IRMdMgosLDRZOSZA==} @@ -5940,7 +5961,6 @@ packages: /@vueuse/metadata@10.6.1: resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==} - dev: true /@vueuse/shared@10.1.0(vue@3.3.4): resolution: {integrity: sha512-2X52ogu12i9DkKOQ01yeb/BKg9UO87RNnpm5sXkQvyORlbq8ONS5l39MYkjkeVWWjdT0teJru7a2S41dmHmqjQ==} @@ -5967,7 +5987,6 @@ packages: transitivePeerDependencies: - '@vue/composition-api' - vue - dev: true /@wdio/config@7.30.0(typescript@5.1.6): resolution: {integrity: sha512-/38rol9WCfFTMtXyd/C856/aexxIZnfVvXg7Fw2WXpqZ9qadLA+R4N35S2703n/RByjK/5XAYtHoljtvh3727w==} @@ -7168,7 +7187,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} @@ -9595,6 +9614,7 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 + dev: true /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} @@ -9605,7 +9625,6 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 - dev: true /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -9989,19 +10008,11 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - optional: true - /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: true optional: true /function-bind@1.1.1: @@ -10233,7 +10244,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.1 + fast-glob: 3.3.2 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -10245,7 +10256,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.1 + fast-glob: 3.3.2 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -10267,7 +10278,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.3.1 + fast-glob: 3.3.2 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 @@ -11318,7 +11329,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /jest-image-snapshot@4.2.0(jest@29.6.2): @@ -11626,15 +11637,9 @@ packages: hasBin: true dev: false - /jiti@1.19.1: - resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==} - hasBin: true - dev: false - /jiti@1.21.0: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true - dev: true /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -12220,6 +12225,7 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + dev: true /magic-string@0.30.5: resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} @@ -14362,7 +14368,7 @@ packages: engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rollup@3.28.0: @@ -14370,7 +14376,7 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rollup@4.5.0: @@ -15219,10 +15225,10 @@ packages: chokidar: 3.5.3 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.3.1 + fast-glob: 3.3.2 glob-parent: 6.0.2 is-glob: 4.0.3 - jiti: 1.19.1 + jiti: 1.21.0 lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 @@ -15768,7 +15774,6 @@ packages: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true - dev: true /typescript@5.1.6: resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} @@ -15953,6 +15958,45 @@ packages: - supports-color dev: true + /unocss@0.57.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0): + resolution: {integrity: sha512-xLsyJ8+T1/Ux93yrqOvuQy268wF5rSzydlsbqZ5EVfi01PxYyydez3nycPqbyPZientkJ0Yohzd5aBqmZgku3A==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 0.57.1 + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + vite: + optional: true + dependencies: + '@unocss/astro': 0.57.1(rollup@2.79.1)(vite@4.5.0) + '@unocss/cli': 0.57.1(rollup@2.79.1) + '@unocss/core': 0.57.1 + '@unocss/extractor-arbitrary-variants': 0.57.1 + '@unocss/postcss': 0.57.1(postcss@8.4.31) + '@unocss/preset-attributify': 0.57.1 + '@unocss/preset-icons': 0.57.1 + '@unocss/preset-mini': 0.57.1 + '@unocss/preset-tagify': 0.57.1 + '@unocss/preset-typography': 0.57.1 + '@unocss/preset-uno': 0.57.1 + '@unocss/preset-web-fonts': 0.57.1 + '@unocss/preset-wind': 0.57.1 + '@unocss/reset': 0.57.1 + '@unocss/transformer-attributify-jsx': 0.57.1 + '@unocss/transformer-attributify-jsx-babel': 0.57.1 + '@unocss/transformer-compile-class': 0.57.1 + '@unocss/transformer-directives': 0.57.1 + '@unocss/transformer-variant-group': 0.57.1 + '@unocss/vite': 0.57.1(rollup@2.79.1)(vite@4.5.0) + vite: 4.5.0(@types/node@18.17.5) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + dev: true + /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} @@ -15971,13 +16015,13 @@ packages: '@nuxt/kit': optional: true dependencies: - '@antfu/utils': 0.7.5 - '@rollup/pluginutils': 5.0.3(rollup@2.79.1) + '@antfu/utils': 0.7.6 + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) chokidar: 3.5.3 debug: 4.3.4(supports-color@8.1.1) - fast-glob: 3.2.12 + fast-glob: 3.3.2 local-pkg: 0.4.3 - magic-string: 0.30.2 + magic-string: 0.30.5 minimatch: 9.0.3 resolve: 1.22.4 unplugin: 1.4.0 @@ -15987,6 +16031,35 @@ packages: - supports-color dev: true + /unplugin-vue-components@0.25.0(rollup@2.79.1)(vue@3.3.8): + resolution: {integrity: sha512-HxrQ4GMSS1RwVww2av3a42cABo/v5AmTRN9iARv6e/xwkrfTyHhLh84kFwXxKkXK61vxDHxaryn694mQmkiVBg==} + engines: {node: '>=14'} + peerDependencies: + '@babel/parser': ^7.15.8 + '@nuxt/kit': ^3.2.2 + vue: 2 || 3 + peerDependenciesMeta: + '@babel/parser': + optional: true + '@nuxt/kit': + optional: true + dependencies: + '@antfu/utils': 0.7.6 + '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + chokidar: 3.5.3 + debug: 4.3.4(supports-color@8.1.1) + fast-glob: 3.3.2 + local-pkg: 0.4.3 + magic-string: 0.30.5 + minimatch: 9.0.3 + resolve: 1.22.4 + unplugin: 1.4.0 + vue: 3.3.8(typescript@5.1.6) + transitivePeerDependencies: + - rollup + - supports-color + dev: true + /unplugin@1.4.0: resolution: {integrity: sha512-5x4eIEL6WgbzqGtF9UV8VEC/ehKptPXDS6L2b0mv4FRMkJxRtjaJfOWDd6a8+kYbqsjklix7yWP0N3SUepjXcg==} dependencies: @@ -16143,6 +16216,24 @@ packages: - supports-color dev: true + /vite-plugin-pwa@0.16.7(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0): + resolution: {integrity: sha512-4WMA5unuKlHs+koNoykeuCfTcqEGbiTRr8sVYUQMhc6tWxZpSRnv9Ojk4LKmqVhoPGHfBVCdGaMo8t9Qidkc1Q==} + engines: {node: '>=16.0.0'} + peerDependencies: + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + workbox-build: ^7.0.0 + workbox-window: ^7.0.0 + dependencies: + debug: 4.3.4(supports-color@8.1.1) + fast-glob: 3.3.2 + pretty-bytes: 6.1.1 + vite: 4.5.0(@types/node@18.17.5) + workbox-build: 7.0.0 + workbox-window: 7.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-pwa@0.17.0(vite@4.4.9)(workbox-build@7.0.0)(workbox-window@7.0.0): resolution: {integrity: sha512-cOyEG8EEc7JHmyMapTnjK2j0g2BIC3ErlmOHyGzVu8hqjyF9Jt6yWMmVNFtpA6v/NNyzP28ARf3vwzIAzR1kaw==} engines: {node: '>=16.0.0'} @@ -16194,7 +16285,7 @@ packages: postcss: 8.4.27 rollup: 3.28.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /vite@4.5.0(@types/node@18.17.5): @@ -16230,7 +16321,7 @@ packages: postcss: 8.4.31 rollup: 3.28.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /vite@5.0.0(@types/node@18.17.5): @@ -16269,7 +16360,7 @@ packages: fsevents: 2.3.3 dev: true - /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.7): + /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.8): resolution: {integrity: sha512-zG+ev9pw1Mg7htABlFCNXb8XwnKN+qfTKw+vU0Ers6RIrABx+45EAAFBoaL1mEpl1FRFn1o/dQ7F4b8GP6HdGQ==} engines: {node: ^14.13.1 || ^16.7.0 || >=18} peerDependencies: @@ -16283,7 +16374,7 @@ packages: glob-to-regexp: 0.4.1 markdown-it: 13.0.1 vitepress: 1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0) - vue: 3.3.7(typescript@5.0.4) + vue: 3.3.8(typescript@5.0.4) dev: true /vitepress@1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0): @@ -16317,6 +16408,60 @@ packages: - terser dev: true + /vitepress@1.0.0-rc.25(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): + resolution: {integrity: sha512-1dqWiHNThNrVZ08ixmfEDBEH+764KOgnev9oXga/x6cN++Vb9pnuu8p3K6DQP+KZrYcG+WiX7jxal0iSNpAWuQ==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4.3.2 + postcss: ^8.4.31 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + dependencies: + '@docsearch/css': 3.5.2 + '@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0) + '@types/markdown-it': 13.0.6 + '@vitejs/plugin-vue': 4.3.1(vite@4.5.0)(vue@3.3.8) + '@vue/devtools-api': 6.5.1 + '@vueuse/core': 10.6.1(vue@3.3.8) + '@vueuse/integrations': 10.6.1(focus-trap@7.5.4)(vue@3.3.8) + focus-trap: 7.5.4 + mark.js: 8.11.1 + minisearch: 6.2.0 + postcss: 8.4.31 + shiki: 0.14.5 + vite: 4.5.0(@types/node@18.17.5) + vue: 3.3.8(typescript@5.1.6) + 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 + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - typescript + - universal-cookie + dev: true + /vitepress@1.0.0-rc.29(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): resolution: {integrity: sha512-6sKmyEvH16SgMqkHzRwwadt9Uju13AOIqouzOVEg3Rk6X9mds6jLsq2GxnAJvg0s6bl/0Qs/cw+f8SNki82ltw==} hasBin: true @@ -16426,7 +16571,7 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.7.0 - vite: 4.4.9(@types/node@18.17.5) + vite: 4.5.0(@types/node@18.17.5) vite-node: 0.34.0(@types/node@18.17.5) why-is-node-running: 2.2.2 transitivePeerDependencies: @@ -16516,7 +16661,6 @@ packages: optional: true dependencies: vue: 3.3.8(typescript@5.1.6) - dev: true /vue@3.3.4: resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} @@ -16527,21 +16671,20 @@ packages: '@vue/server-renderer': 3.3.4(vue@3.3.4) '@vue/shared': 3.3.4 - /vue@3.3.7(typescript@5.0.4): - resolution: {integrity: sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==} + /vue@3.3.8(typescript@5.0.4): + resolution: {integrity: sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.3.7 - '@vue/compiler-sfc': 3.3.7 - '@vue/runtime-dom': 3.3.7 - '@vue/server-renderer': 3.3.7(vue@3.3.7) - '@vue/shared': 3.3.7 + '@vue/compiler-dom': 3.3.8 + '@vue/compiler-sfc': 3.3.8 + '@vue/runtime-dom': 3.3.8 + '@vue/server-renderer': 3.3.8(vue@3.3.8) + '@vue/shared': 3.3.8 typescript: 5.0.4 - dev: true /vue@3.3.8(typescript@5.1.6): resolution: {integrity: sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==} @@ -16557,7 +16700,6 @@ packages: '@vue/server-renderer': 3.3.8(vue@3.3.8) '@vue/shared': 3.3.8 typescript: 5.1.6 - dev: true /vuex@4.1.0(vue@3.3.4): resolution: {integrity: sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==} From 7b0f6c1c7498eba78b8d749281d0e7952289086f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 10:44:18 +0530 Subject: [PATCH 097/316] fix Types --- packages/mermaid/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/tsconfig.json b/packages/mermaid/tsconfig.json index b32425399d..78e3cf2de5 100644 --- a/packages/mermaid/tsconfig.json +++ b/packages/mermaid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "types": ["vitest/importMeta"] + "types": ["vitest/importMeta", "vitest/globals"] }, "include": ["./src/**/*.ts", "./package.json"] } From bcdd1c56bff86f81843143583b8db0300c386410 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 24 Nov 2023 10:54:43 +0530 Subject: [PATCH 098/316] chore: Optimize dev server --- .vite/server.ts | 8 ++++---- cypress/platform/flow-elk.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.vite/server.ts b/.vite/server.ts index 838d711910..99d16f6f24 100644 --- a/.vite/server.ts +++ b/.vite/server.ts @@ -1,6 +1,7 @@ import express from 'express'; import cors from 'cors'; import { createServer as createViteServer } from 'vite'; +import { packageOptions } from '../.build/common.js'; async function createServer() { const app = express(); @@ -14,10 +15,9 @@ async function createServer() { }); app.use(cors()); - app.use(express.static('./packages/parser/dist')); - app.use(express.static('./packages/mermaid/dist')); - app.use(express.static('./packages/mermaid-zenuml/dist')); - app.use(express.static('./packages/mermaid-example-diagram/dist')); + for (const { packageName } of Object.values(packageOptions)) { + app.use(express.static(`./packages/${packageName}/dist`)); + } app.use(vite.middlewares); app.use(express.static('demos')); app.use(express.static('cypress/platform')); diff --git a/cypress/platform/flow-elk.html b/cypress/platform/flow-elk.html index 4c3dea3352..f319f62e28 100644 --- a/cypress/platform/flow-elk.html +++ b/cypress/platform/flow-elk.html @@ -11,7 +11,7 @@ +``` + ## Graph declarations with spaces between vertices and link and without semicolon - In graph declarations, the statements also can now end without a semicolon. After release 0.2.16, ending a graph statement with semicolon is just optional. So the below graph declaration is also valid along with the old declarations of the graph. diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index e4be8d81a2..6c6b0760b3 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -778,6 +778,18 @@ flowchart TD Mermaid is compatible with Font Awesome up to version 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free). +You can use this method to add mermaid including the fontawesome icon to a web page: + +```html + + +``` + ## Graph declarations with spaces between vertices and link and without semicolon - In graph declarations, the statements also can now end without a semicolon. After release 0.2.16, ending a graph statement with semicolon is just optional. So the below graph declaration is also valid along with the old declarations of the graph. From be8faae68c043481fd834b59d1c359cdf0965e41 Mon Sep 17 00:00:00 2001 From: arukiidou Date: Fri, 19 Jan 2024 08:49:12 +0900 Subject: [PATCH 273/316] Update packages/mermaid/src/docs/syntax/flowchart.md Co-authored-by: Sidharth Vinod --- packages/mermaid/src/docs/syntax/flowchart.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index 6c6b0760b3..00242b4072 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -776,18 +776,17 @@ flowchart TD B-->E(A fa:fa-camera-retro perhaps?) ``` -Mermaid is compatible with Font Awesome up to version 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free). +Mermaid supports Font Awesome if the CSS is included on the website. +Mermaid does not have any restriction on the version of Font Awesome that can be used. -You can use this method to add mermaid including the fontawesome icon to a web page: +Please refer the [Official Font Awesome Documentation](https://fontawesome.com/start) on how to include it in your website. +Adding this snippet in the `` would add support for Font Awesome v6.5.1 ```html - ``` ## Graph declarations with spaces between vertices and link and without semicolon From 7918f96f9400232db1f8c02d47b33f2f5abb572e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 09:19:36 +0530 Subject: [PATCH 274/316] Update docs --- docs/syntax/flowchart.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/syntax/flowchart.md b/docs/syntax/flowchart.md index 4fa0f6c4f2..2f4a9aeb9e 100644 --- a/docs/syntax/flowchart.md +++ b/docs/syntax/flowchart.md @@ -1134,18 +1134,18 @@ flowchart TD B-->E(A fa:fa-camera-retro perhaps?) ``` -Mermaid is compatible with Font Awesome up to version 5, Free icons only. Check that the icons you use are from the [supported set of icons](https://fontawesome.com/v5/search?o=r&m=free). +Mermaid supports Font Awesome if the CSS is included on the website. +Mermaid does not have any restriction on the version of Font Awesome that can be used. -You can use this method to add mermaid including the fontawesome icon to a web page: +Please refer the [Official Font Awesome Documentation](https://fontawesome.com/start) on how to include it in your website. + +Adding this snippet in the `` would add support for Font Awesome v6.5.1 ```html - ``` ## Graph declarations with spaces between vertices and link and without semicolon From e0ee9b1bc0470e08a32d0db03ece4dba839b8c07 Mon Sep 17 00:00:00 2001 From: "Soren L. Hansen" Date: Sat, 13 Jan 2024 14:17:12 +0100 Subject: [PATCH 275/316] Add more detailed docs for Gantt tasks --- docs/syntax/gantt.html | 179939 +++++++++++++++++++ docs/syntax/gantt.md | 25 +- packages/mermaid/src/docs/syntax/gantt.md | 25 +- 3 files changed, 179987 insertions(+), 2 deletions(-) create mode 100644 docs/syntax/gantt.html diff --git a/docs/syntax/gantt.html b/docs/syntax/gantt.html new file mode 100644 index 0000000000..4a3156ac77 --- /dev/null +++ b/docs/syntax/gantt.html @@ -0,0 +1,179939 @@ + + + + + Gantt diagrams + + + + + + + + + +
+
+ +

Gantt diagrams

+
+

+ A Gantt chart is a type of bar chart, first developed by Karol Adamiecki in 1896, and + independently by Henry Gantt in the 1910s, that illustrates a project schedule and the + amount of time it would take for any one project to finish. Gantt charts illustrate + number of days between the start and finish dates of the terminal elements and summary + elements of a project. +

+
+

A note to users

+

+ Gantt Charts will record each scheduled task as one continuous bar that extends from the + left to the right. The x axis represents time and the y records the different tasks and + the order in which they are to be completed. +

+

+ It is important to remember that when a date, day, or collection of dates specific to a + task are "excluded", the Gantt Chart will accommodate those changes by extending an equal + number of days, towards the right, not by creating a gap inside the task. As shown here + +

+

+ However, if the excluded dates are between two tasks that are set to start consecutively, + the excluded dates will be skipped graphically and left blank, and the following task will + begin after the end of the excluded dates. As shown here + +

+

+ A Gantt chart is useful for tracking the amount of time it would take before a project is + finished, but it can also be used to graphically represent "non-working days", with a few + tweaks. +

+

+ Mermaid can render Gantt diagrams as SVG, PNG or a MarkDown link that can be pasted into + docs. +

+
gantt + title A Gantt Diagram + dateFormat YYYY-MM-DD + section Section + A task :a1, 2014-01-01, 30d + Another task :after a1, 20d + section Another + Task in Another :2014-01-12, 12d + another task :24d
+

Syntax

+
gantt + dateFormat YYYY-MM-DD + title Adding GANTT diagram functionality to mermaid + excludes weekends + %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".) + + section A section + Completed task :done, des1, 2014-01-06,2014-01-08 + Active task :active, des2, 2014-01-09, 3d + Future task : des3, after des2, 5d + Future task2 : des4, after des3, 5d + + section Critical tasks + Completed task in the critical line :crit, done, 2014-01-06,24h + Implement parser and jison :crit, done, after des1, 2d + Create tests for parser :crit, active, 3d + Future task in critical line :crit, 5d + Create tests for renderer :2d + Add to mermaid :1d + Functionality added :milestone, 2014-01-25, 0d + + section Documentation + Describe gantt syntax :active, a1, after des1, 3d + Add gantt diagram to demo page :after a1 , 20h + Add another diagram to demo page :doc1, after a1 , 48h + + section Last section + Describe gantt syntax :after doc1, 3d + Add gantt diagram to demo page :20h + Add another diagram to demo page :48h
+

+ Tasks are by default sequential. A task start date defaults to the end date of the + preceding task. +

+

+ A colon, :, separates the task title from its metadata. Metadata items are + separated by a comma, ,. Valid tags are active, + done, crit, and milestone. Tags are optional, but + if used, they must be specified first. After processing the tags, the remaining metadata + items are interpreted as follows: +

+
    +
  1. + If a single item is specified, it determines when the task ends. It can either be a + specific date/time or a duration. If a duration is specified, it is added to the start + date of the task to determine the end date of the task, taking into account any + exclusions. +
  2. +
  3. + If two items are specified, the last item is interpreted as in the previous case. The + first item can either specify an explicit start date/time (in the format specified by + dateFormat) or reference another task using + after <otherTaskID> [[otherTaskID2 [otherTaskID3]]...]. In the latter + case, the start date of the task will be set according to the latest end date of any + referenced task. +
  4. +
  5. + If three items are specified, the last two will be interpreted as in the previous case. + The first item will denote the ID of the task, which can be referenced using the + later <taskID> syntax. +
  6. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Metadata syntaxStart dateEnd dateID
<taskID>, <startDate>, <endDate>startdate as interpreted using dateformatendDate as interpreted using dateformattaskID
<taskID>, <startDate>, <length>startdate as interpreted using dateformatStart date + lengthtaskID
<taskID>, after <otherTaskId>, <endDate>End date of previously specified task otherTaskIDendDate as interpreted using dateformattaskID
<taskID>, after <otherTaskId>, <length>End date of previously specified task otherTaskIDStart date + lengthtaskID
<startDate>, <endDate>startdate as interpreted using dateformatenddate as interpreted using dateformatn/a
<startDate>, <length>startdate as interpreted using dateformatStart date + lengthn/a
after <otherTaskID>, <endDate>End date of previously specified task otherTaskIDenddate as interpreted using dateformatn/a
after <otherTaskID>, <length>End date of previously specified task otherTaskIDStart date + lengthn/a
<endDate>End date of preceding taskenddate as interpreted using dateformatn/a
<length>End date of preceding taskStart date + lengthn/a
+

+ For simplicity, the table does not show the use of multiple tasks listed with the + after keyword. Here is an example of how to use it and how it's interpreted: +

+
gantt + apple :a, 2017-07-20, 1w + banana :crit, b, 2017-07-23, 1d + cherry :active, c, after b a, 1d
+

Title

+

+ The title is an optional string to be displayed at the top of the + Gantt chart to describe the chart as a whole. +

+

Section statements

+

+ You can divide the chart into various sections, for example to separate different parts of + a project like development and documentation. +

+

+ To do so, start a line with the section keyword and give it a name. (Note + that unlike with the title for the entire chart, this name is + required. +

+

Milestones

+

+ You can add milestones to the diagrams. Milestones differ from tasks as they represent a + single instant in time and are identified by the keyword milestone. Below is + an example on how to use milestones. As you may notice, the exact location of the + milestone is determined by the initial date for the milestone and the "duration" of the + task this way: initial date+duration/2. +

+
gantt + dateFormat HH:mm + axisFormat %H:%M + Initial milestone : milestone, m1, 17:49, 2m + Task A : 10m + Task B : 5m + Final milestone : milestone, m2, 18:08, 4m
+

Setting dates

+

+ dateFormat defines the format of the date input of your + gantt elements. How these dates are represented in the rendered chart + output are defined by axisFormat. +

+

Input date format

+

+ The default input date format is YYYY-MM-DD. You can define your custom + dateFormat. +

+
dateFormat YYYY-MM-DD
+
+

The following formatting options are supported:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
InputExampleDescription
YYYY20144 digit year
YY142 digit year
Q1..4Quarter of year. Sets month to first month in quarter.
M MM1..12Month number
MMM MMMMJanuary..DecMonth name in locale set by dayjs.locale()
D DD1..31Day of month
Do1st..31stDay of month with ordinal
DDD DDDD1..365Day of year
X1410715640.579Unix timestamp
x1410715640579Unix ms timestamp
H HH0..2324 hour time
h hh1..1212 hour time used with a A.
a Aam pmPost or ante meridiem
m mm0..59Minutes
s ss0..59Seconds
S0..9Tenths of a second
SS0..99Hundreds of a second
SSS0..999Thousandths of a second
Z ZZ+12:00Offset from UTC as +-HH:mm, +-HHmm, or Z
+

+ More info in: + https://day.js.org/docs/en/parse/string-format/ +

+

Output date format on the axis

+

+ The default output date format is YYYY-MM-DD. You can define your custom + axisFormat, like 2020-Q1 for the first quarter of the year 2020. +

+
axisFormat %Y-%m-%d
+
+

The following formatting strings are supported:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FormatDefinition
%aabbreviated weekday name
%Afull weekday name
%babbreviated month name
%Bfull month name
%cdate and time, as "%a %b %e %H:%M:%S %Y"
%dzero-padded day of the month as a decimal number [01,31]
%espace-padded day of the month as a decimal number [ 1,31]; equivalent to %_d
%Hhour (24-hour clock) as a decimal number [00,23]
%Ihour (12-hour clock) as a decimal number [01,12]
%jday of the year as a decimal number [001,366]
%mmonth as a decimal number [01,12]
%Mminute as a decimal number [00,59]
%Lmilliseconds as a decimal number [000, 999]
%peither AM or PM
%Ssecond as a decimal number [00,61]
%U + week number of the year (Sunday as the first day of the week) as a decimal number + [00,53] +
%wweekday as a decimal number [0(Sunday),6]
%W + week number of the year (Monday as the first day of the week) as a decimal number + [00,53] +
%xdate, as "%m/%d/%Y"
%Xtime, as "%H:%M:%S"
%yyear without century as a decimal number [00,99]
%Yyear with century as a decimal number
%Ztime zone offset, such as "-0700"
%%a literal "%" character
+

+ More info in: + https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format +

+

Axis ticks (v10.3.0+)

+

+ The default output ticks are auto. You can custom your tickInterval, like + 1day or 1week. +

+
tickInterval 1day
+
+

The pattern is:

+
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/;
+
+

+ More info in: + https://github.com/d3/d3-time#interval_every +

+

+ Week-based tickIntervals start the week on sunday by default. If you wish to + specify another weekday on which the tickInterval should start, use the + weekday option: +

+
gantt + tickInterval 1week + weekday monday
+
`millisecond` and `second` support was added in vMERMAID_RELEASE_VERSION
+
+

Output in compact mode

+

+ The compact mode allows you to display multiple tasks in the same row. Compact mode can be + enabled for a gantt chart by setting the display mode of the graph via preceeding YAML + settings. +

+
--- +displayMode: compact +--- +gantt + title A Gantt Diagram + dateFormat YYYY-MM-DD + + section Section + A task :a1, 2014-01-01, 30d + Another task :a2, 2014-01-20, 25d + Another one :a3, 2014-02-10, 20d
+

Comments

+

+ Comments can be entered within a gantt chart, which will be ignored by the parser. + Comments need to be on their own line and must be prefaced with %% (double + percent signs). Any text after the start of the comment to the next newline will be + treated as a comment, including any diagram syntax. +

+
gantt + title A Gantt Diagram + %% This is a comment + dateFormat YYYY-MM-DD + section Section + A task :a1, 2014-01-01, 30d + Another task :after a1, 20d + section Another + Task in Another :2014-01-12, 12d + another task :24d
+

Styling

+

+ Styling of the Gantt diagram is done by defining a number of CSS classes. During + rendering, these classes are extracted from the file located at + src/diagrams/gantt/styles.js +

+

Classes used

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassDescription
grid.tickStyling for the Grid Lines
grid.pathStyling for the Grid's borders
.taskTextTask Text Styling
.taskTextOutsideRightStyling for Task Text that exceeds the activity bar towards the right.
.taskTextOutsideLeftStyling for Task Text that exceeds the activity bar, towards the left.
todayMarkerToggle and Styling for the "Today Marker"
+

Sample stylesheet

+
.grid .tick {
+  stroke: lightgrey;
+  opacity: 0.3;
+  shape-rendering: crispEdges;
+}
+.grid path {
+  stroke-width: 0;
+}
+
+#tag {
+  color: white;
+  background: #fa283d;
+  width: 150px;
+  position: absolute;
+  display: none;
+  padding: 3px 6px;
+  margin-left: -80px;
+  font-size: 11px;
+}
+
+#tag:before {
+  border: solid transparent;
+  content: ' ';
+  height: 0;
+  left: 50%;
+  margin-left: -5px;
+  position: absolute;
+  width: 0;
+  border-width: 10px;
+  border-bottom-color: #fa283d;
+  top: -20px;
+}
+.taskText {
+  fill: white;
+  text-anchor: middle;
+}
+.taskTextOutsideRight {
+  fill: black;
+  text-anchor: start;
+}
+.taskTextOutsideLeft {
+  fill: black;
+  text-anchor: end;
+}
+
+

Today marker

+

+ You can style or hide the marker for the current date. To style it, add a value for the + todayMarker key. +

+
todayMarker stroke-width:5px,stroke:#0f0,opacity:0.5
+
+

To hide the marker, set todayMarker to off.

+
todayMarker off
+
+

Configuration

+

It is possible to adjust the margins for rendering the gantt diagram.

+

+ This is done by defining the ganttConfig part of the configuration object. + How to use the CLI is described in the + mermaidCLI page. +

+

+ mermaid.ganttConfig can be set to a JSON string with config parameters or the + corresponding object. +

+
mermaid.ganttConfig = {
+  titleTopMargin: 25,
+  barHeight: 20,
+  barGap: 4,
+  topPadding: 75,
+  sidePadding: 75,
+};
+
+

Possible configuration params:

+ + + + + + + + + + + + + + + + + + + + +
ParamDescriptionDefault value
mirrorActorTurns on/off the rendering of actors below the diagram as well as above itfalse
bottomMarginAdj + Adjusts how far down the graph ended. Wide borders styles with css could generate + unwanted clipping which is why this config param exists. + 1
+

Interaction

+

+ It is possible to bind a click event to a task. The click can lead to either a javascript + callback or to a link which will be opened in the current browser tab. + Note: This functionality is disabled when using + securityLevel='strict' and enabled when using + securityLevel='loose'. +

+
click taskId call callback(arguments)
+click taskId href URL
+
+
    +
  • taskId is the id of the task
  • +
  • + callback is the name of a javascript function defined on the page displaying the graph, + the function will be called with the taskId as the parameter if no other arguments are + specified. +
  • +
+

Beginner's tip—a full example using interactive links in an html context:

+
<body>
+  <pre class="mermaid">
+    gantt
+      dateFormat  YYYY-MM-DD
+
+      section Clickable
+      Visit mermaidjs         :active, cl1, 2014-01-07, 3d
+      Print arguments         :cl2, after cl1, 3d
+      Print task              :cl3, after cl2, 3d
+
+      click cl1 href "https://mermaidjs.github.io/"
+      click cl2 call printArguments("test1", "test2", test3)
+      click cl3 call printTask()
+  </pre>
+
+  <script>
+    const printArguments = function (arg1, arg2, arg3) {
+      alert('printArguments called with arguments: ' + arg1 + ', ' + arg2 + ', ' + arg3);
+    };
+    const printTask = function (taskId) {
+      alert('taskId: ' + taskId);
+    };
+    const config = {
+      startOnLoad: true,
+      securityLevel: 'loose',
+    };
+    mermaid.initialize(config);
+  </script>
+</body>
+
+

Examples

+

Bar chart (using gantt chart)

+
gantt + title Git Issues - days since last update + dateFormat X + axisFormat %s + section Issue19062 + 71 : 0, 71 + section Issue19401 + 36 : 0, 36 + section Issue193 + 34 : 0, 34 + section Issue7441 + 9 : 0, 9 + section Issue1300 + 5 : 0, 5
+
+
+ + + + + diff --git a/docs/syntax/gantt.md b/docs/syntax/gantt.md index 33c2740e51..071cb0ec02 100644 --- a/docs/syntax/gantt.md +++ b/docs/syntax/gantt.md @@ -114,7 +114,30 @@ gantt Add another diagram to demo page :48h ``` -It is possible to set multiple dependencies separated by space: +Tasks are by default sequential. A task start date defaults to the end date of the preceding task. + +A colon, `:`, separates the task title from its metadata. +Metadata items are separated by a comma, `,`. Valid tags are `active`, `done`, `crit`, and `milestone`. Tags are optional, but if used, they must be specified first. +After processing the tags, the remaining metadata items are interpreted as follows: + +1. If a single item is specified, it determines when the task ends. It can either be a specific date/time or a duration. If a duration is specified, it is added to the start date of the task to determine the end date of the task, taking into account any exclusions. +2. If two items are specified, the last item is interpreted as in the previous case. The first item can either specify an explicit start date/time (in the format specified by `dateFormat`) or reference another task using `after [[otherTaskID2 [otherTaskID3]]...]`. In the latter case, the start date of the task will be set according to the latest end date of any referenced task. +3. If three items are specified, the last two will be interpreted as in the previous case. The first item will denote the ID of the task, which can be referenced using the `later ` syntax. + +| Metadata syntax | Start date | End date | ID | +| ------------------------------------------ | --------------------------------------------------- | ------------------------------------------- | -------- | +| `, , ` | `startdate` as interpreted using `dateformat` | `endDate` as interpreted using `dateformat` | `taskID` | +| `, , ` | `startdate` as interpreted using `dateformat` | Start date + `length` | `taskID` | +| `, after , ` | End date of previously specified task `otherTaskID` | `endDate` as interpreted using `dateformat` | `taskID` | +| `, after , ` | End date of previously specified task `otherTaskID` | Start date + `length` | `taskID` | +| `, ` | `startdate` as interpreted using `dateformat` | `enddate` as interpreted using `dateformat` | n/a | +| `, ` | `startdate` as interpreted using `dateformat` | Start date + `length` | n/a | +| `after , ` | End date of previously specified task `otherTaskID` | `enddate` as interpreted using `dateformat` | n/a | +| `after , ` | End date of previously specified task `otherTaskID` | Start date + `length` | n/a | +| `` | End date of preceding task | `enddate` as interpreted using `dateformat` | n/a | +| `` | End date of preceding task | Start date + `length` | n/a | + +For simplicity, the table does not show the use of multiple tasks listed with the `after` keyword. Here is an example of how to use it and how it's interpreted: ```mermaid-example gantt diff --git a/packages/mermaid/src/docs/syntax/gantt.md b/packages/mermaid/src/docs/syntax/gantt.md index a0cebc560d..56fdc75a71 100644 --- a/packages/mermaid/src/docs/syntax/gantt.md +++ b/packages/mermaid/src/docs/syntax/gantt.md @@ -63,7 +63,30 @@ gantt Add another diagram to demo page :48h ``` -It is possible to set multiple dependencies separated by space: +Tasks are by default sequential. A task start date defaults to the end date of the preceding task. + +A colon, `:`, separates the task title from its metadata. +Metadata items are separated by a comma, `,`. Valid tags are `active`, `done`, `crit`, and `milestone`. Tags are optional, but if used, they must be specified first. +After processing the tags, the remaining metadata items are interpreted as follows: + +1. If a single item is specified, it determines when the task ends. It can either be a specific date/time or a duration. If a duration is specified, it is added to the start date of the task to determine the end date of the task, taking into account any exclusions. +2. If two items are specified, the last item is interpreted as in the previous case. The first item can either specify an explicit start date/time (in the format specified by `dateFormat`) or reference another task using `after [[otherTaskID2 [otherTaskID3]]...]`. In the latter case, the start date of the task will be set according to the latest end date of any referenced task. +3. If three items are specified, the last two will be interpreted as in the previous case. The first item will denote the ID of the task, which can be referenced using the `later ` syntax. + +| Metadata syntax | Start date | End date | ID | +| ------------------------------------------ | --------------------------------------------------- | ------------------------------------------- | -------- | +| `, , ` | `startdate` as interpreted using `dateformat` | `endDate` as interpreted using `dateformat` | `taskID` | +| `, , ` | `startdate` as interpreted using `dateformat` | Start date + `length` | `taskID` | +| `, after , ` | End date of previously specified task `otherTaskID` | `endDate` as interpreted using `dateformat` | `taskID` | +| `, after , ` | End date of previously specified task `otherTaskID` | Start date + `length` | `taskID` | +| `, ` | `startdate` as interpreted using `dateformat` | `enddate` as interpreted using `dateformat` | n/a | +| `, ` | `startdate` as interpreted using `dateformat` | Start date + `length` | n/a | +| `after , ` | End date of previously specified task `otherTaskID` | `enddate` as interpreted using `dateformat` | n/a | +| `after , ` | End date of previously specified task `otherTaskID` | Start date + `length` | n/a | +| `` | End date of preceding task | `enddate` as interpreted using `dateformat` | n/a | +| `` | End date of preceding task | Start date + `length` | n/a | + +For simplicity, the table does not show the use of multiple tasks listed with the `after` keyword. Here is an example of how to use it and how it's interpreted: ```mermaid-example gantt From bf55d940b68b8aacbcb352be1a7834d0c731b751 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 18 Jan 2024 22:34:20 +0530 Subject: [PATCH 276/316] Delete docs/syntax/gantt.html --- docs/syntax/gantt.html | 179939 -------------------------------------- 1 file changed, 179939 deletions(-) delete mode 100644 docs/syntax/gantt.html diff --git a/docs/syntax/gantt.html b/docs/syntax/gantt.html deleted file mode 100644 index 4a3156ac77..0000000000 --- a/docs/syntax/gantt.html +++ /dev/null @@ -1,179939 +0,0 @@ - - - - - Gantt diagrams - - - - - - - - - -
-
- -

Gantt diagrams

-
-

- A Gantt chart is a type of bar chart, first developed by Karol Adamiecki in 1896, and - independently by Henry Gantt in the 1910s, that illustrates a project schedule and the - amount of time it would take for any one project to finish. Gantt charts illustrate - number of days between the start and finish dates of the terminal elements and summary - elements of a project. -

-
-

A note to users

-

- Gantt Charts will record each scheduled task as one continuous bar that extends from the - left to the right. The x axis represents time and the y records the different tasks and - the order in which they are to be completed. -

-

- It is important to remember that when a date, day, or collection of dates specific to a - task are "excluded", the Gantt Chart will accommodate those changes by extending an equal - number of days, towards the right, not by creating a gap inside the task. As shown here - -

-

- However, if the excluded dates are between two tasks that are set to start consecutively, - the excluded dates will be skipped graphically and left blank, and the following task will - begin after the end of the excluded dates. As shown here - -

-

- A Gantt chart is useful for tracking the amount of time it would take before a project is - finished, but it can also be used to graphically represent "non-working days", with a few - tweaks. -

-

- Mermaid can render Gantt diagrams as SVG, PNG or a MarkDown link that can be pasted into - docs. -

-
gantt - title A Gantt Diagram - dateFormat YYYY-MM-DD - section Section - A task :a1, 2014-01-01, 30d - Another task :after a1, 20d - section Another - Task in Another :2014-01-12, 12d - another task :24d
-

Syntax

-
gantt - dateFormat YYYY-MM-DD - title Adding GANTT diagram functionality to mermaid - excludes weekends - %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".) - - section A section - Completed task :done, des1, 2014-01-06,2014-01-08 - Active task :active, des2, 2014-01-09, 3d - Future task : des3, after des2, 5d - Future task2 : des4, after des3, 5d - - section Critical tasks - Completed task in the critical line :crit, done, 2014-01-06,24h - Implement parser and jison :crit, done, after des1, 2d - Create tests for parser :crit, active, 3d - Future task in critical line :crit, 5d - Create tests for renderer :2d - Add to mermaid :1d - Functionality added :milestone, 2014-01-25, 0d - - section Documentation - Describe gantt syntax :active, a1, after des1, 3d - Add gantt diagram to demo page :after a1 , 20h - Add another diagram to demo page :doc1, after a1 , 48h - - section Last section - Describe gantt syntax :after doc1, 3d - Add gantt diagram to demo page :20h - Add another diagram to demo page :48h
-

- Tasks are by default sequential. A task start date defaults to the end date of the - preceding task. -

-

- A colon, :, separates the task title from its metadata. Metadata items are - separated by a comma, ,. Valid tags are active, - done, crit, and milestone. Tags are optional, but - if used, they must be specified first. After processing the tags, the remaining metadata - items are interpreted as follows: -

-
    -
  1. - If a single item is specified, it determines when the task ends. It can either be a - specific date/time or a duration. If a duration is specified, it is added to the start - date of the task to determine the end date of the task, taking into account any - exclusions. -
  2. -
  3. - If two items are specified, the last item is interpreted as in the previous case. The - first item can either specify an explicit start date/time (in the format specified by - dateFormat) or reference another task using - after <otherTaskID> [[otherTaskID2 [otherTaskID3]]...]. In the latter - case, the start date of the task will be set according to the latest end date of any - referenced task. -
  4. -
  5. - If three items are specified, the last two will be interpreted as in the previous case. - The first item will denote the ID of the task, which can be referenced using the - later <taskID> syntax. -
  6. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metadata syntaxStart dateEnd dateID
<taskID>, <startDate>, <endDate>startdate as interpreted using dateformatendDate as interpreted using dateformattaskID
<taskID>, <startDate>, <length>startdate as interpreted using dateformatStart date + lengthtaskID
<taskID>, after <otherTaskId>, <endDate>End date of previously specified task otherTaskIDendDate as interpreted using dateformattaskID
<taskID>, after <otherTaskId>, <length>End date of previously specified task otherTaskIDStart date + lengthtaskID
<startDate>, <endDate>startdate as interpreted using dateformatenddate as interpreted using dateformatn/a
<startDate>, <length>startdate as interpreted using dateformatStart date + lengthn/a
after <otherTaskID>, <endDate>End date of previously specified task otherTaskIDenddate as interpreted using dateformatn/a
after <otherTaskID>, <length>End date of previously specified task otherTaskIDStart date + lengthn/a
<endDate>End date of preceding taskenddate as interpreted using dateformatn/a
<length>End date of preceding taskStart date + lengthn/a
-

- For simplicity, the table does not show the use of multiple tasks listed with the - after keyword. Here is an example of how to use it and how it's interpreted: -

-
gantt - apple :a, 2017-07-20, 1w - banana :crit, b, 2017-07-23, 1d - cherry :active, c, after b a, 1d
-

Title

-

- The title is an optional string to be displayed at the top of the - Gantt chart to describe the chart as a whole. -

-

Section statements

-

- You can divide the chart into various sections, for example to separate different parts of - a project like development and documentation. -

-

- To do so, start a line with the section keyword and give it a name. (Note - that unlike with the title for the entire chart, this name is - required. -

-

Milestones

-

- You can add milestones to the diagrams. Milestones differ from tasks as they represent a - single instant in time and are identified by the keyword milestone. Below is - an example on how to use milestones. As you may notice, the exact location of the - milestone is determined by the initial date for the milestone and the "duration" of the - task this way: initial date+duration/2. -

-
gantt - dateFormat HH:mm - axisFormat %H:%M - Initial milestone : milestone, m1, 17:49, 2m - Task A : 10m - Task B : 5m - Final milestone : milestone, m2, 18:08, 4m
-

Setting dates

-

- dateFormat defines the format of the date input of your - gantt elements. How these dates are represented in the rendered chart - output are defined by axisFormat. -

-

Input date format

-

- The default input date format is YYYY-MM-DD. You can define your custom - dateFormat. -

-
dateFormat YYYY-MM-DD
-
-

The following formatting options are supported:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
InputExampleDescription
YYYY20144 digit year
YY142 digit year
Q1..4Quarter of year. Sets month to first month in quarter.
M MM1..12Month number
MMM MMMMJanuary..DecMonth name in locale set by dayjs.locale()
D DD1..31Day of month
Do1st..31stDay of month with ordinal
DDD DDDD1..365Day of year
X1410715640.579Unix timestamp
x1410715640579Unix ms timestamp
H HH0..2324 hour time
h hh1..1212 hour time used with a A.
a Aam pmPost or ante meridiem
m mm0..59Minutes
s ss0..59Seconds
S0..9Tenths of a second
SS0..99Hundreds of a second
SSS0..999Thousandths of a second
Z ZZ+12:00Offset from UTC as +-HH:mm, +-HHmm, or Z
-

- More info in: - https://day.js.org/docs/en/parse/string-format/ -

-

Output date format on the axis

-

- The default output date format is YYYY-MM-DD. You can define your custom - axisFormat, like 2020-Q1 for the first quarter of the year 2020. -

-
axisFormat %Y-%m-%d
-
-

The following formatting strings are supported:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FormatDefinition
%aabbreviated weekday name
%Afull weekday name
%babbreviated month name
%Bfull month name
%cdate and time, as "%a %b %e %H:%M:%S %Y"
%dzero-padded day of the month as a decimal number [01,31]
%espace-padded day of the month as a decimal number [ 1,31]; equivalent to %_d
%Hhour (24-hour clock) as a decimal number [00,23]
%Ihour (12-hour clock) as a decimal number [01,12]
%jday of the year as a decimal number [001,366]
%mmonth as a decimal number [01,12]
%Mminute as a decimal number [00,59]
%Lmilliseconds as a decimal number [000, 999]
%peither AM or PM
%Ssecond as a decimal number [00,61]
%U - week number of the year (Sunday as the first day of the week) as a decimal number - [00,53] -
%wweekday as a decimal number [0(Sunday),6]
%W - week number of the year (Monday as the first day of the week) as a decimal number - [00,53] -
%xdate, as "%m/%d/%Y"
%Xtime, as "%H:%M:%S"
%yyear without century as a decimal number [00,99]
%Yyear with century as a decimal number
%Ztime zone offset, such as "-0700"
%%a literal "%" character
-

- More info in: - https://github.com/d3/d3-time-format/tree/v4.0.0#locale_format -

-

Axis ticks (v10.3.0+)

-

- The default output ticks are auto. You can custom your tickInterval, like - 1day or 1week. -

-
tickInterval 1day
-
-

The pattern is:

-
/^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/;
-
-

- More info in: - https://github.com/d3/d3-time#interval_every -

-

- Week-based tickIntervals start the week on sunday by default. If you wish to - specify another weekday on which the tickInterval should start, use the - weekday option: -

-
gantt - tickInterval 1week - weekday monday
-
`millisecond` and `second` support was added in vMERMAID_RELEASE_VERSION
-
-

Output in compact mode

-

- The compact mode allows you to display multiple tasks in the same row. Compact mode can be - enabled for a gantt chart by setting the display mode of the graph via preceeding YAML - settings. -

-
--- -displayMode: compact ---- -gantt - title A Gantt Diagram - dateFormat YYYY-MM-DD - - section Section - A task :a1, 2014-01-01, 30d - Another task :a2, 2014-01-20, 25d - Another one :a3, 2014-02-10, 20d
-

Comments

-

- Comments can be entered within a gantt chart, which will be ignored by the parser. - Comments need to be on their own line and must be prefaced with %% (double - percent signs). Any text after the start of the comment to the next newline will be - treated as a comment, including any diagram syntax. -

-
gantt - title A Gantt Diagram - %% This is a comment - dateFormat YYYY-MM-DD - section Section - A task :a1, 2014-01-01, 30d - Another task :after a1, 20d - section Another - Task in Another :2014-01-12, 12d - another task :24d
-

Styling

-

- Styling of the Gantt diagram is done by defining a number of CSS classes. During - rendering, these classes are extracted from the file located at - src/diagrams/gantt/styles.js -

-

Classes used

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClassDescription
grid.tickStyling for the Grid Lines
grid.pathStyling for the Grid's borders
.taskTextTask Text Styling
.taskTextOutsideRightStyling for Task Text that exceeds the activity bar towards the right.
.taskTextOutsideLeftStyling for Task Text that exceeds the activity bar, towards the left.
todayMarkerToggle and Styling for the "Today Marker"
-

Sample stylesheet

-
.grid .tick {
-  stroke: lightgrey;
-  opacity: 0.3;
-  shape-rendering: crispEdges;
-}
-.grid path {
-  stroke-width: 0;
-}
-
-#tag {
-  color: white;
-  background: #fa283d;
-  width: 150px;
-  position: absolute;
-  display: none;
-  padding: 3px 6px;
-  margin-left: -80px;
-  font-size: 11px;
-}
-
-#tag:before {
-  border: solid transparent;
-  content: ' ';
-  height: 0;
-  left: 50%;
-  margin-left: -5px;
-  position: absolute;
-  width: 0;
-  border-width: 10px;
-  border-bottom-color: #fa283d;
-  top: -20px;
-}
-.taskText {
-  fill: white;
-  text-anchor: middle;
-}
-.taskTextOutsideRight {
-  fill: black;
-  text-anchor: start;
-}
-.taskTextOutsideLeft {
-  fill: black;
-  text-anchor: end;
-}
-
-

Today marker

-

- You can style or hide the marker for the current date. To style it, add a value for the - todayMarker key. -

-
todayMarker stroke-width:5px,stroke:#0f0,opacity:0.5
-
-

To hide the marker, set todayMarker to off.

-
todayMarker off
-
-

Configuration

-

It is possible to adjust the margins for rendering the gantt diagram.

-

- This is done by defining the ganttConfig part of the configuration object. - How to use the CLI is described in the - mermaidCLI page. -

-

- mermaid.ganttConfig can be set to a JSON string with config parameters or the - corresponding object. -

-
mermaid.ganttConfig = {
-  titleTopMargin: 25,
-  barHeight: 20,
-  barGap: 4,
-  topPadding: 75,
-  sidePadding: 75,
-};
-
-

Possible configuration params:

- - - - - - - - - - - - - - - - - - - - -
ParamDescriptionDefault value
mirrorActorTurns on/off the rendering of actors below the diagram as well as above itfalse
bottomMarginAdj - Adjusts how far down the graph ended. Wide borders styles with css could generate - unwanted clipping which is why this config param exists. - 1
-

Interaction

-

- It is possible to bind a click event to a task. The click can lead to either a javascript - callback or to a link which will be opened in the current browser tab. - Note: This functionality is disabled when using - securityLevel='strict' and enabled when using - securityLevel='loose'. -

-
click taskId call callback(arguments)
-click taskId href URL
-
-
    -
  • taskId is the id of the task
  • -
  • - callback is the name of a javascript function defined on the page displaying the graph, - the function will be called with the taskId as the parameter if no other arguments are - specified. -
  • -
-

Beginner's tip—a full example using interactive links in an html context:

-
<body>
-  <pre class="mermaid">
-    gantt
-      dateFormat  YYYY-MM-DD
-
-      section Clickable
-      Visit mermaidjs         :active, cl1, 2014-01-07, 3d
-      Print arguments         :cl2, after cl1, 3d
-      Print task              :cl3, after cl2, 3d
-
-      click cl1 href "https://mermaidjs.github.io/"
-      click cl2 call printArguments("test1", "test2", test3)
-      click cl3 call printTask()
-  </pre>
-
-  <script>
-    const printArguments = function (arg1, arg2, arg3) {
-      alert('printArguments called with arguments: ' + arg1 + ', ' + arg2 + ', ' + arg3);
-    };
-    const printTask = function (taskId) {
-      alert('taskId: ' + taskId);
-    };
-    const config = {
-      startOnLoad: true,
-      securityLevel: 'loose',
-    };
-    mermaid.initialize(config);
-  </script>
-</body>
-
-

Examples

-

Bar chart (using gantt chart)

-
gantt - title Git Issues - days since last update - dateFormat X - axisFormat %s - section Issue19062 - 71 : 0, 71 - section Issue19401 - 36 : 0, 36 - section Issue193 - 34 : 0, 34 - section Issue7441 - 9 : 0, 9 - section Issue1300 - 5 : 0, 5
-
-
- - - - - From d2c82c18022957f8743d656b0e6017be05ba0b53 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 12:06:53 +0530 Subject: [PATCH 277/316] Use cache to store snapshots --- .github/workflows/e2e.yml | 49 +++++++++++++++++++ cSpell.json | 1 + cypress.config.cjs | 11 ++++- .../integration/other/configuration.spec.js | 1 - cypress/integration/other/rerender.spec.js | 2 - cypress/integration/rendering/gantt.spec.js | 13 +++-- cypress/support/commands.js | 12 +++-- 7 files changed, 77 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 71806a9c46..09e8546ff7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -9,8 +9,44 @@ permissions: contents: read jobs: + cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + + - name: Cache snapshots + id: cache-snapshot + uses: actions/cache@v4 + with: + save-always: true + path: ./cypress/snapshots + key: ${{ runner.os }}-snapshots + + - name: Switch to base branch + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} + uses: actions/checkout@v4 + with: + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base.sha || 'develop' }} + + - name: Cypress run + uses: cypress-io/github-action@v4 + id: cypress-snapshot-gen + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} + with: + start: pnpm run dev + wait-on: 'http://localhost:9000' + browser: chrome + spec: | + cypress/integration/rendering/flowchart-v2.spec.js + e2e: runs-on: ubuntu-latest + needs: cache strategy: fail-fast: false matrix: @@ -27,6 +63,13 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Cache snapshots + id: cache-snapshot + uses: actions/cache/restore@v3 + with: + path: ./cypress/snapshots + key: ${{ runner.os }}-snapshots + # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run @@ -38,14 +81,19 @@ jobs: with: start: pnpm run dev:coverage wait-on: 'http://localhost:9000' + browser: chrome # Disable recording if we don't have an API key # e.g. if this action was run from a fork record: ${{ secrets.CYPRESS_RECORD_KEY != '' }} parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }} + # TODO: Remove + spec: | + cypress/integration/rendering/flowchart-v2.spec.js env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true CYPRESS_COMMIT: ${{ github.sha }} + - name: Upload Coverage to Codecov uses: codecov/codecov-action@v3 # Run step only pushes to develop and pull_requests @@ -57,6 +105,7 @@ jobs: fail_ci_if_error: false verbose: true token: 6845cc80-77ee-4e17-85a1-026cd95e0766 + - name: Upload Artifacts uses: actions/upload-artifact@v3 if: ${{ failure() && steps.cypress.conclusion == 'failure' }} diff --git a/cSpell.json b/cSpell.json index 3ea9594f75..82c1c81c41 100644 --- a/cSpell.json +++ b/cSpell.json @@ -124,6 +124,7 @@ "sidharth", "sidharthv", "sphinxcontrib", + "ssim", "startx", "starty", "statediagram", diff --git a/cypress.config.cjs b/cypress.config.cjs index 30076c56ef..c754b465f9 100644 --- a/cypress.config.cjs +++ b/cypress.config.cjs @@ -4,12 +4,21 @@ const { defineConfig } = require('cypress'); const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); const coverage = require('@cypress/code-coverage/task'); + module.exports = defineConfig({ projectId: 'n2sma2', + viewportWidth: 1440, + viewportHeight: 1024, e2e: { - specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx}', + specPattern: 'cypress/integration/**/*.{js,ts}', setupNodeEvents(on, config) { coverage(on, config); + on('before:browser:launch', (browser = {}, launchOptions) => { + if (browser.name === 'chrome' && browser.isHeadless) { + launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); + } + return launchOptions; + }); addMatchImageSnapshotPlugin(on, config); // copy any needed variables from process.env to config.env config.env.useAppli = process.env.USE_APPLI ? true : false; diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js index 7cbc5d1059..23338271f5 100644 --- a/cypress/integration/other/configuration.spec.js +++ b/cypress/integration/other/configuration.spec.js @@ -117,7 +117,6 @@ describe('Configuration', () => { }); it('should not taint the initial configuration when using multiple directives', () => { const url = 'http://localhost:9000/regression/issue-1874.html'; - cy.viewport(1440, 1024); cy.visit(url); cy.get('svg'); diff --git a/cypress/integration/other/rerender.spec.js b/cypress/integration/other/rerender.spec.js index f160a2e273..d14c6257e0 100644 --- a/cypress/integration/other/rerender.spec.js +++ b/cypress/integration/other/rerender.spec.js @@ -1,14 +1,12 @@ describe('Rerendering', () => { it('should be able to render after an error has occurred', () => { const url = 'http://localhost:9000/render-after-error.html'; - cy.viewport(1440, 1024); cy.visit(url); cy.get('#graphDiv').should('exist'); }); it('should be able to render and rerender a graph via API', () => { const url = 'http://localhost:9000/rerender.html'; - cy.viewport(1440, 1024); cy.visit(url); cy.get('#graph [id^=flowchart-A]').should('have.text', 'XMas'); diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index 998a092c24..73ff4ee005 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -245,7 +245,10 @@ describe('Gantt diagram', () => { const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); - expect(maxWidthValue).to.be.within(984 * 0.95, 984 * 1.05); + expect(maxWidthValue).to.be.within( + Cypress.config().viewportWidth * 0.95, + Cypress.config().viewportWidth * 1.05 + ); }); }); @@ -285,11 +288,11 @@ describe('Gantt diagram', () => { { gantt: { useMaxWidth: false } } ); cy.get('svg').should((svg) => { - // const height = parseFloat(svg.attr('height')); const width = parseFloat(svg.attr('width')); - // use within because the absolute value can be slightly different depending on the environment ±5% - // expect(height).to.be.within(484 * 0.95, 484 * 1.05); - expect(width).to.be.within(984 * 0.95, 984 * 1.05); + expect(width).to.be.within( + Cypress.config().viewportWidth * 0.95, + Cypress.config().viewportWidth * 1.05 + ); expect(svg).to.not.have.attr('style'); }); }); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 3589640d98..7a77b3ba61 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -24,8 +24,14 @@ // -- This is will overwrite an existing command -- // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) -// import '@percy/cypress'; - import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; -addMatchImageSnapshotCommand(); +addMatchImageSnapshotCommand({ + comparisonMethod: 'ssim', + failureThreshold: 0.01, + failureThresholdType: 'percent', + customDiffConfig: { + ssim: 'fast', + }, + blur: 1, +}); From 76dacf8e90388042cf6171b5aa5aac704d34c7e3 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 12:10:39 +0530 Subject: [PATCH 278/316] E2E test --- cypress/integration/rendering/flowchart-v2.spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index e23820ffa3..fa625159d2 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -6,7 +6,6 @@ describe('Flowchart v2', () => { `flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} - C -->|One| D[Laptop] C -->|Two| E[iPhone] C -->|Three| F[fa:fa-car Car] `, From 7805e054957b019efa138ba2bece6889ac62ecf3 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 12:15:01 +0530 Subject: [PATCH 279/316] Update lockfile --- pnpm-lock.yaml | 121 ++++++++----------------------------------------- 1 file changed, 19 insertions(+), 102 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9c49e0a09..2484f63123 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -377,7 +377,7 @@ importers: version: 1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0) vitepress-plugin-search: specifier: ^1.0.4-alpha.20 - version: 1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.8) + version: 1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.4.15) packages/mermaid-example-diagram: dependencies: @@ -464,7 +464,7 @@ importers: version: 1.1.0 unocss: specifier: ^0.58.0 - version: 0.58.0(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0) + version: 0.58.0(postcss@8.4.33)(rollup@2.79.1)(vite@4.5.0) unplugin-vue-components: specifier: ^0.26.0 version: 0.26.0(rollup@2.79.1)(vue@3.3.4) @@ -476,7 +476,7 @@ importers: version: 0.17.0(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: specifier: 1.0.0-rc.39 - version: 1.0.0-rc.39(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) + version: 1.0.0-rc.39(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.33)(search-insights@2.7.0)(typescript@5.1.6) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -5593,7 +5593,7 @@ packages: sirv: 2.0.3 dev: true - /@unocss/postcss@0.58.0(postcss@8.4.31): + /@unocss/postcss@0.58.0(postcss@8.4.33): resolution: {integrity: sha512-2hAwLbfUFqysi8FN1cn3xkHy5GhLMlYy6W4NrAZ2ws7F2MKpsCT2xCj7dT5cI2tW8ulD2YoVbKH15dBhNsMNUA==} engines: {node: '>=14'} peerDependencies: @@ -5605,7 +5605,7 @@ packages: css-tree: 2.3.1 fast-glob: 3.3.2 magic-string: 0.30.5 - postcss: 8.4.31 + postcss: 8.4.33 dev: true /@unocss/preset-attributify@0.58.0: @@ -5876,15 +5876,6 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 - /@vue/compiler-core@3.3.8: - resolution: {integrity: sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==} - dependencies: - '@babel/parser': 7.23.5 - '@vue/shared': 3.3.8 - estree-walker: 2.0.2 - source-map-js: 1.0.2 - dev: true - /@vue/compiler-core@3.4.15: resolution: {integrity: sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==} dependencies: @@ -5901,13 +5892,6 @@ packages: '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 - /@vue/compiler-dom@3.3.8: - resolution: {integrity: sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==} - dependencies: - '@vue/compiler-core': 3.3.8 - '@vue/shared': 3.3.8 - dev: true - /@vue/compiler-dom@3.4.15: resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==} dependencies: @@ -5929,21 +5913,6 @@ packages: postcss: 8.4.31 source-map-js: 1.0.2 - /@vue/compiler-sfc@3.3.8: - resolution: {integrity: sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==} - dependencies: - '@babel/parser': 7.23.5 - '@vue/compiler-core': 3.3.8 - '@vue/compiler-dom': 3.3.8 - '@vue/compiler-ssr': 3.3.8 - '@vue/reactivity-transform': 3.3.8 - '@vue/shared': 3.3.8 - estree-walker: 2.0.2 - magic-string: 0.30.5 - postcss: 8.4.31 - source-map-js: 1.0.2 - dev: true - /@vue/compiler-sfc@3.4.15: resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==} dependencies: @@ -5964,13 +5933,6 @@ packages: '@vue/compiler-dom': 3.3.4 '@vue/shared': 3.3.4 - /@vue/compiler-ssr@3.3.8: - resolution: {integrity: sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==} - dependencies: - '@vue/compiler-dom': 3.3.8 - '@vue/shared': 3.3.8 - dev: true - /@vue/compiler-ssr@3.4.15: resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==} dependencies: @@ -5994,27 +5956,11 @@ packages: estree-walker: 2.0.2 magic-string: 0.30.5 - /@vue/reactivity-transform@3.3.8: - resolution: {integrity: sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==} - dependencies: - '@babel/parser': 7.23.5 - '@vue/compiler-core': 3.3.8 - '@vue/shared': 3.3.8 - estree-walker: 2.0.2 - magic-string: 0.30.5 - dev: true - /@vue/reactivity@3.3.4: resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} dependencies: '@vue/shared': 3.3.4 - /@vue/reactivity@3.3.8: - resolution: {integrity: sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==} - dependencies: - '@vue/shared': 3.3.8 - dev: true - /@vue/reactivity@3.4.15: resolution: {integrity: sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==} dependencies: @@ -6027,13 +5973,6 @@ packages: '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 - /@vue/runtime-core@3.3.8: - resolution: {integrity: sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==} - dependencies: - '@vue/reactivity': 3.3.8 - '@vue/shared': 3.3.8 - dev: true - /@vue/runtime-core@3.4.15: resolution: {integrity: sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==} dependencies: @@ -6048,14 +5987,6 @@ packages: '@vue/shared': 3.3.4 csstype: 3.1.2 - /@vue/runtime-dom@3.3.8: - resolution: {integrity: sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==} - dependencies: - '@vue/runtime-core': 3.3.8 - '@vue/shared': 3.3.8 - csstype: 3.1.2 - dev: true - /@vue/runtime-dom@3.4.15: resolution: {integrity: sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==} dependencies: @@ -6073,16 +6004,6 @@ packages: '@vue/shared': 3.3.4 vue: 3.3.4 - /@vue/server-renderer@3.3.8(vue@3.3.8): - resolution: {integrity: sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==} - peerDependencies: - vue: 3.3.8 - dependencies: - '@vue/compiler-ssr': 3.3.8 - '@vue/shared': 3.3.8 - vue: 3.3.8(typescript@5.0.4) - dev: true - /@vue/server-renderer@3.4.15(vue@3.4.15): resolution: {integrity: sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==} peerDependencies: @@ -6090,16 +6011,12 @@ packages: dependencies: '@vue/compiler-ssr': 3.4.15 '@vue/shared': 3.4.15 - vue: 3.4.15(typescript@5.1.6) + vue: 3.4.15(typescript@5.0.4) dev: true /@vue/shared@3.3.4: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} - /@vue/shared@3.3.8: - resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} - dev: true - /@vue/shared@3.4.15: resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} dev: true @@ -16175,7 +16092,7 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unocss@0.58.0(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0): + /unocss@0.58.0(postcss@8.4.33)(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} engines: {node: '>=14'} peerDependencies: @@ -16191,7 +16108,7 @@ packages: '@unocss/cli': 0.58.0(rollup@2.79.1) '@unocss/core': 0.58.0 '@unocss/extractor-arbitrary-variants': 0.58.0 - '@unocss/postcss': 0.58.0(postcss@8.4.31) + '@unocss/postcss': 0.58.0(postcss@8.4.33) '@unocss/preset-attributify': 0.58.0 '@unocss/preset-icons': 0.58.0 '@unocss/preset-mini': 0.58.0 @@ -16530,7 +16447,7 @@ packages: fsevents: 2.3.3 dev: true - /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.8): + /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.4.15): resolution: {integrity: sha512-zG+ev9pw1Mg7htABlFCNXb8XwnKN+qfTKw+vU0Ers6RIrABx+45EAAFBoaL1mEpl1FRFn1o/dQ7F4b8GP6HdGQ==} engines: {node: ^14.13.1 || ^16.7.0 || >=18} peerDependencies: @@ -16544,7 +16461,7 @@ packages: glob-to-regexp: 0.4.1 markdown-it: 13.0.1 vitepress: 1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0) - vue: 3.3.8(typescript@5.0.4) + vue: 3.4.15(typescript@5.0.4) dev: true /vitepress@1.0.0-alpha.72(@algolia/client-search@4.19.1)(@types/node@18.17.5)(search-insights@2.7.0): @@ -16578,7 +16495,7 @@ packages: - terser dev: true - /vitepress@1.0.0-rc.39(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6): + /vitepress@1.0.0-rc.39(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.33)(search-insights@2.7.0)(typescript@5.1.6): resolution: {integrity: sha512-EcgoRlAAp37WOxUOYv45oxyhLrcy3Upey+mKpqW3ldsg6Ol4trPndRBk2GO0QiSvEKlb9BMerk49D/bFICN6kg==} hasBin: true peerDependencies: @@ -16600,7 +16517,7 @@ packages: focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 6.3.0 - postcss: 8.4.31 + postcss: 8.4.33 shikiji: 0.9.19 shikiji-core: 0.9.19 shikiji-transformers: 0.9.19 @@ -16788,19 +16705,19 @@ packages: '@vue/server-renderer': 3.3.4(vue@3.3.4) '@vue/shared': 3.3.4 - /vue@3.3.8(typescript@5.0.4): - resolution: {integrity: sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==} + /vue@3.4.15(typescript@5.0.4): + resolution: {integrity: sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.3.8 - '@vue/compiler-sfc': 3.3.8 - '@vue/runtime-dom': 3.3.8 - '@vue/server-renderer': 3.3.8(vue@3.3.8) - '@vue/shared': 3.3.8 + '@vue/compiler-dom': 3.4.15 + '@vue/compiler-sfc': 3.4.15 + '@vue/runtime-dom': 3.4.15 + '@vue/server-renderer': 3.4.15(vue@3.4.15) + '@vue/shared': 3.4.15 typescript: 5.0.4 dev: true From 448756ab54480e5e82b5290c00ec3350c6f34879 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 12:17:20 +0530 Subject: [PATCH 280/316] Fix lint --- .github/workflows/e2e.yml | 4 ++-- cypress.config.cjs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 09e8546ff7..a357c1c995 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base.sha || 'develop' }} - + - name: Cypress run uses: cypress-io/github-action@v4 id: cypress-snapshot-gen @@ -43,7 +43,7 @@ jobs: browser: chrome spec: | cypress/integration/rendering/flowchart-v2.spec.js - + e2e: runs-on: ubuntu-latest needs: cache diff --git a/cypress.config.cjs b/cypress.config.cjs index c754b465f9..33633920ac 100644 --- a/cypress.config.cjs +++ b/cypress.config.cjs @@ -4,7 +4,6 @@ const { defineConfig } = require('cypress'); const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); const coverage = require('@cypress/code-coverage/task'); - module.exports = defineConfig({ projectId: 'n2sma2', viewportWidth: 1440, From d6e738ac4cf2e208326b0ca3a8702d940cb846ec Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 12:21:51 +0530 Subject: [PATCH 281/316] Run all tests --- .github/workflows/e2e.yml | 5 ----- cypress/integration/rendering/flowchart-v2.spec.js | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a357c1c995..996fc6673e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -41,8 +41,6 @@ jobs: start: pnpm run dev wait-on: 'http://localhost:9000' browser: chrome - spec: | - cypress/integration/rendering/flowchart-v2.spec.js e2e: runs-on: ubuntu-latest @@ -86,9 +84,6 @@ jobs: # e.g. if this action was run from a fork record: ${{ secrets.CYPRESS_RECORD_KEY != '' }} parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }} - # TODO: Remove - spec: | - cypress/integration/rendering/flowchart-v2.spec.js env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index fa625159d2..e23820ffa3 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -6,6 +6,7 @@ describe('Flowchart v2', () => { `flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} + C -->|One| D[Laptop] C -->|Two| E[iPhone] C -->|Three| F[fa:fa-car Car] `, From cb0ee5aa419849427b4de5b553ef734d22840cae Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 13:17:14 +0530 Subject: [PATCH 282/316] Use pixelmatch for image comparison --- cSpell.json | 1 + cypress/support/commands.js | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cSpell.json b/cSpell.json index 82c1c81c41..4b8772347e 100644 --- a/cSpell.json +++ b/cSpell.json @@ -102,6 +102,7 @@ "pathe", "pbrolin", "phpbb", + "pixelmatch", "plantuml", "playfair", "pnpm", diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 7a77b3ba61..6fc1fe17db 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -26,12 +26,16 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'; -addMatchImageSnapshotCommand({ - comparisonMethod: 'ssim', - failureThreshold: 0.01, - failureThresholdType: 'percent', - customDiffConfig: { - ssim: 'fast', - }, - blur: 1, -}); +// The SSIM comparison method can be used if the pixelmatch is throwing lots of false positives. +// SSIM actually does not catch minute changes in the image, so it is not as accurate as pixelmatch. +// addMatchImageSnapshotCommand({ +// comparisonMethod: 'ssim', +// failureThreshold: 0.01, +// failureThresholdType: 'percent', +// customDiffConfig: { +// ssim: 'fast', +// }, +// blur: 1, +// }); + +addMatchImageSnapshotCommand(); From c11093fa71bc8d1623ac86ed540a17ce00e86666 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 13:49:10 +0530 Subject: [PATCH 283/316] Update packages/mermaid/src/diagrams/flowchart/flowDb.ts Co-authored-by: Alois Klink --- packages/mermaid/src/diagrams/flowchart/flowDb.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index 54152c7acc..8a596209e7 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -270,7 +270,7 @@ export const setClass = function (ids: string, className: string) { }; const setTooltip = function (ids: string, tooltip: string) { - if (!tooltip) { + if (tooltip === undefined) { return; } tooltip = sanitizeText(tooltip); From e8f655439d4fb527c6b5faa25bda3734b815f685 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 13:59:53 +0530 Subject: [PATCH 284/316] Fix merge error --- packages/mermaid/src/diagrams/flowchart/flowDb.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index 8a596209e7..f7ee54ab1f 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -141,11 +141,9 @@ export const addSingleLink = function (_start: string, _end: string, type: any) edge.stroke = type.stroke; edge.length = type.length > 10 ? 10 : type.length; } - if (edge?.length && edge.length > 10) { - edge.length = 10; - } + if (edges.length < (config.maxEdges ?? 500)) { - log.info('abc78 pushing edge...'); + log.info('Pushing edge...'); edges.push(edge); } else { throw new Error( @@ -156,9 +154,6 @@ You cannot set this config via configuration inside the diagram as it is a secur You have to call mermaid.initialize.` ); } - - log.info('Pushing edge...'); - edges.push(edge); }; export const addLink = function (_start: string[], _end: string[], type: unknown) { From 658af081ee2781cc159dbc2826857def3765f281 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 14:42:51 +0530 Subject: [PATCH 285/316] Flatten uploaded images --- .github/workflows/e2e.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 996fc6673e..436624968c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -102,8 +102,30 @@ jobs: token: 6845cc80-77ee-4e17-85a1-026cd95e0766 - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ failure() && steps.cypress.conclusion == 'failure' }} with: - name: error-snapshots + name: error-snapshots-${{ matrix.containers }} + retention-days: 1 path: cypress/snapshots/**/__diff_output__/* + + combineArtifacts: + needs: e2e + runs-on: ubuntu-latest + steps: + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: snapshots + pattern: error-snapshots-* + merge-multiple: true + - run: | + mkdir errors + cd snapshots + find . -mindepth 2 -type f -print -exec mv {} ../errors/ \; + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: error-snapshots + retention-days: 10 + path: errors/ \ No newline at end of file From 4ce5d071250ec7b281ad9009e557551bc68ceeca Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 14:46:21 +0530 Subject: [PATCH 286/316] Flatten uploaded images --- .github/workflows/e2e.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 436624968c..29bd6eab56 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -113,19 +113,19 @@ jobs: needs: e2e runs-on: ubuntu-latest steps: - - name: Download All Artifacts - uses: actions/download-artifact@v4 - with: - path: snapshots - pattern: error-snapshots-* - merge-multiple: true - - run: | - mkdir errors - cd snapshots - find . -mindepth 2 -type f -print -exec mv {} ../errors/ \; - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: error-snapshots - retention-days: 10 - path: errors/ \ No newline at end of file + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: snapshots + pattern: error-snapshots-* + merge-multiple: true + - run: | + mkdir errors + cd snapshots + find . -mindepth 2 -type f -print -exec mv {} ../errors/ \; + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: error-snapshots + retention-days: 10 + path: errors/ From f58a86d747ab5a773fddf905e23176ebf8581c5e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 15:30:18 +0530 Subject: [PATCH 287/316] Notify users --- .github/workflows/e2e.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 29bd6eab56..cfc8a45d2c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -111,6 +111,7 @@ jobs: combineArtifacts: needs: e2e + if: ${{ failure() }} runs-on: ubuntu-latest steps: - name: Download All Artifacts @@ -125,7 +126,12 @@ jobs: find . -mindepth 2 -type f -print -exec mv {} ../errors/ \; - name: Upload Artifacts uses: actions/upload-artifact@v4 + id: upload-artifacts with: name: error-snapshots retention-days: 10 path: errors/ + - name: Notify Users + run: | + echo "::error,title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}" + From a9a8a208a6dc011db8c737cbee4c0eb228af2abb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 15:50:40 +0530 Subject: [PATCH 288/316] Update cache key --- .github/workflows/e2e.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cfc8a45d2c..3b983589d8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -8,6 +8,9 @@ on: permissions: contents: read +env: + targetHash: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base.sha || github.event.before }} + jobs: cache: runs-on: ubuntu-latest @@ -25,13 +28,13 @@ jobs: with: save-always: true path: ./cypress/snapshots - key: ${{ runner.os }}-snapshots + key: ${{ runner.os }}-snapshots-${{ env.targetHash }} - name: Switch to base branch if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} uses: actions/checkout@v4 with: - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base.sha || 'develop' }} + ref: ${{ env.targetHash }} - name: Cypress run uses: cypress-io/github-action@v4 @@ -66,7 +69,7 @@ jobs: uses: actions/cache/restore@v3 with: path: ./cypress/snapshots - key: ${{ runner.os }}-snapshots + key: ${{ runner.os }}-snapshots-${{ env.targetHash }} # Install NPM dependencies, cache them correctly # and run all Cypress tests @@ -109,6 +112,14 @@ jobs: retention-days: 1 path: cypress/snapshots/**/__diff_output__/* + - name: Save snapshots cache + id: cache-upload + if: ${{ github.event_name == 'push' }} + uses: actions/cache/save@v3 + with: + path: ./cypress/snapshots + key: ${{ runner.os }}-snapshots-${{ github.event.after }} + combineArtifacts: needs: e2e if: ${{ failure() }} From be4721b24db004317f451ac406bb094379ce0f59 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 16:18:07 +0530 Subject: [PATCH 289/316] Fix cache save --- .github/workflows/e2e.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3b983589d8..9f4fd86b2f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -108,34 +108,38 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ failure() && steps.cypress.conclusion == 'failure' }} with: - name: error-snapshots-${{ matrix.containers }} + name: snapshots-${{ matrix.containers }} retention-days: 1 - path: cypress/snapshots/**/__diff_output__/* - - - name: Save snapshots cache - id: cache-upload - if: ${{ github.event_name == 'push' }} - uses: actions/cache/save@v3 - with: path: ./cypress/snapshots - key: ${{ runner.os }}-snapshots-${{ github.event.after }} combineArtifacts: needs: e2e - if: ${{ failure() }} runs-on: ubuntu-latest steps: - name: Download All Artifacts uses: actions/download-artifact@v4 with: path: snapshots - pattern: error-snapshots-* + pattern: snapshots-* merge-multiple: true - - run: | + + - name: Save snapshots cache + id: cache-upload + if: ${{ github.event_name == 'push' }} + uses: actions/cache/save@v3 + with: + path: | + ./cypress/snapshots + !./**/__diff_output__/* + key: ${{ runner.os }}-snapshots-${{ github.event.after }} + + - if: ${{ failure() }} + run: | mkdir errors cd snapshots - find . -mindepth 2 -type f -print -exec mv {} ../errors/ \; - - name: Upload Artifacts + find . -mindepth 2 -type d -name "*__diff_output__*" -exec sh -c 'mv "$0"/*.png ../errors/' {} \; + - name: Upload Error snapshots + if: ${{ failure() }} uses: actions/upload-artifact@v4 id: upload-artifacts with: @@ -143,6 +147,7 @@ jobs: retention-days: 10 path: errors/ - name: Notify Users + if: ${{ failure() }} run: | echo "::error,title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}" From 35b3192c2bf69cd3d15e35cb4422ab5c5f7afbd5 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 16:23:26 +0530 Subject: [PATCH 290/316] Fix error message --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9f4fd86b2f..5326cb4575 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -149,5 +149,5 @@ jobs: - name: Notify Users if: ${{ failure() }} run: | - echo "::error,title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}" + echo "::error title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}" From 6f205f89b22d82af5d56fb1613307e2b7b50db69 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 16:24:42 +0530 Subject: [PATCH 291/316] Always run combineArtifacts --- .github/workflows/e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5326cb4575..754f9ada13 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -115,6 +115,7 @@ jobs: combineArtifacts: needs: e2e runs-on: ubuntu-latest + if: ${{ always() }} steps: - name: Download All Artifacts uses: actions/download-artifact@v4 From a964af67ec5f1954342cd0b2711b97ee26a7c963 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:04:25 +0530 Subject: [PATCH 292/316] Handle edge cases in E2E --- .github/workflows/e2e.yml | 38 +++++++++++++++------ cypress/integration/rendering/debug.spec.js | 12 ------- 2 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 cypress/integration/rendering/debug.spec.js diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 754f9ada13..90769858e0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,3 +1,9 @@ +# We use github cache to save snapshots between runs. +# For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. +# If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots. +# These are then downloaded before running the E2E, providing the reference snapshots. +# If there are any errors, the diff image is uploaded to artifacts, and the user is notified. + name: E2E on: @@ -9,7 +15,8 @@ permissions: contents: read env: - targetHash: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base.sha || github.event.before }} + # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. + targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }} jobs: cache: @@ -30,6 +37,7 @@ jobs: path: ./cypress/snapshots key: ${{ runner.os }}-snapshots-${{ env.targetHash }} + # If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots. - name: Switch to base branch if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} uses: actions/checkout@v4 @@ -44,6 +52,8 @@ jobs: start: pnpm run dev wait-on: 'http://localhost:9000' browser: chrome + spec: + cypress/integration/rendering/sequencediagram.spec.js e2e: runs-on: ubuntu-latest @@ -64,6 +74,7 @@ jobs: with: node-version: ${{ matrix.node-version }} + # These cached snapshots are downloaded, providing the reference snapshots. - name: Cache snapshots id: cache-snapshot uses: actions/cache/restore@v3 @@ -87,6 +98,8 @@ jobs: # e.g. if this action was run from a fork record: ${{ secrets.CYPRESS_RECORD_KEY != '' }} parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }} + spec: + cypress/integration/rendering/sequencediagram.spec.js env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true @@ -104,9 +117,10 @@ jobs: verbose: true token: 6845cc80-77ee-4e17-85a1-026cd95e0766 + # We upload the artifacts into numbered archives to prevent overwriting - name: Upload Artifacts uses: actions/upload-artifact@v4 - if: ${{ failure() && steps.cypress.conclusion == 'failure' }} + if: ${{ always() }} with: name: snapshots-${{ matrix.containers }} retention-days: 1 @@ -117,38 +131,40 @@ jobs: runs-on: ubuntu-latest if: ${{ always() }} steps: + # Download all snapshot artifacts and merge them into a single folder - name: Download All Artifacts uses: actions/download-artifact@v4 with: path: snapshots pattern: snapshots-* merge-multiple: true - + + # For successful push events, we save the snapshots cache - name: Save snapshots cache id: cache-upload - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && needs.e2e.result != 'failure' }} uses: actions/cache/save@v3 with: - path: | - ./cypress/snapshots - !./**/__diff_output__/* + path: ./snapshots key: ${{ runner.os }}-snapshots-${{ github.event.after }} - - if: ${{ failure() }} + - name: Flatten images to a folder + if: ${{ needs.e2e.result == 'failure' }} run: | mkdir errors cd snapshots find . -mindepth 2 -type d -name "*__diff_output__*" -exec sh -c 'mv "$0"/*.png ../errors/' {} \; + - name: Upload Error snapshots - if: ${{ failure() }} + if: ${{ needs.e2e.result == 'failure' }} uses: actions/upload-artifact@v4 id: upload-artifacts with: name: error-snapshots retention-days: 10 path: errors/ + - name: Notify Users - if: ${{ failure() }} + if: ${{ needs.e2e.result == 'failure' }} run: | echo "::error title=Visual tests failed::You can view images that failed by downloading the error-snapshots artifact: ${{ steps.upload-artifacts.outputs.artifact-url }}" - diff --git a/cypress/integration/rendering/debug.spec.js b/cypress/integration/rendering/debug.spec.js deleted file mode 100644 index 56ad0f15f8..0000000000 --- a/cypress/integration/rendering/debug.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -import { imgSnapshotTest } from '../../helpers/util.ts'; - -describe('Flowchart', () => { - it('34: testing the label width in percy', () => { - imgSnapshotTest( - `graph TD - A[Christmas] - `, - { theme: 'forest', fontFamily: '"Noto Sans SC", sans-serif' } - ); - }); -}); From a871a68f3c8bce5419bcd6f04deaeddd0defa473 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:05:06 +0530 Subject: [PATCH 293/316] Remove spec selector --- .github/workflows/e2e.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 90769858e0..817635cbf6 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -52,8 +52,6 @@ jobs: start: pnpm run dev wait-on: 'http://localhost:9000' browser: chrome - spec: - cypress/integration/rendering/sequencediagram.spec.js e2e: runs-on: ubuntu-latest @@ -98,8 +96,6 @@ jobs: # e.g. if this action was run from a fork record: ${{ secrets.CYPRESS_RECORD_KEY != '' }} parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }} - spec: - cypress/integration/rendering/sequencediagram.spec.js env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true From f1fc874da8d4bdef88add516c7e6c046fdb9b755 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:20:39 +0530 Subject: [PATCH 294/316] Debug --- .github/workflows/e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 817635cbf6..56bdd30a01 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,12 +16,13 @@ permissions: env: # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. - targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }} + targetHash: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base_sha || github.event.before }} jobs: cache: runs-on: ubuntu-latest steps: + - run: echo "${{ github.event }}" - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From 279e31bc559caade5d63ce0712273f02a77f244d Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:23:13 +0530 Subject: [PATCH 295/316] Debug --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 56bdd30a01..674f276727 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,7 @@ jobs: cache: runs-on: ubuntu-latest steps: - - run: echo "${{ github.event }}" + - run: echo "${{ toJSON(github) }}" - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From f5dd24bce4488cb636f384b949c0ea5583eda860 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:29:45 +0530 Subject: [PATCH 296/316] Remove :: --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 674f276727..30c25cb914 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,7 @@ jobs: cache: runs-on: ubuntu-latest steps: - - run: echo "${{ toJSON(github) }}" + - run: echo "${{ toJSON(github) }}" | sed 's/::/:/g' - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From 3935f6b389e715382c0701c499ca6825fe34b299 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:31:25 +0530 Subject: [PATCH 297/316] Remove :: --- .github/workflows/e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 30c25cb914..7d3bd3628f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,8 @@ jobs: cache: runs-on: ubuntu-latest steps: - - run: echo "${{ toJSON(github) }}" | sed 's/::/:/g' + - run: | + echo "${{ toJSON(github) }}" | sed 's/::/:/g' - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From 8bfb269b373611d3b4884177c47f1c9ed71289ce Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:33:59 +0530 Subject: [PATCH 298/316] Remove :: --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7d3bd3628f..aab0e1facd 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - echo "${{ toJSON(github) }}" | sed 's/::/:/g' + echo '${{ toJSON(github) }}' | sed 's/::/:/g' - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From aadf32ab3edfc48ba48445e828349cb7b74f3be8 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:45:55 +0530 Subject: [PATCH 299/316] Ignore push events on merge queue --- .github/workflows/e2e.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index aab0e1facd..36ec672a28 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -8,6 +8,8 @@ name: E2E on: push: + branches-ignore: + - 'gh-readonly-queue/**' pull_request: merge_group: @@ -16,7 +18,7 @@ permissions: env: # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. - targetHash: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'merge_group' && github.event.merge_group.base_sha || github.event.before }} + targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }} jobs: cache: From d0224b23b0e112c37debff62d685510117e226a5 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 19:47:42 +0530 Subject: [PATCH 300/316] Cleanup e2e.yml --- .github/workflows/e2e.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 36ec672a28..c23dc88baf 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,8 +24,6 @@ jobs: cache: runs-on: ubuntu-latest steps: - - run: | - echo '${{ toJSON(github) }}' | sed 's/::/:/g' - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Setup Node.js From 1f37b6c91bc410c25968f7b7bda87debf966f38a Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 23:28:43 +0530 Subject: [PATCH 301/316] Fix lint --- packages/mermaid/src/docs/ecosystem/integrations-community.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 5587253661..73c4b9ef0a 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -245,4 +245,3 @@ Communication tools and platforms - [mermaid-server: Generate diagrams using a HTTP request](https://github.com/TomWright/mermaid-server) - [ExDoc](https://github.com/elixir-lang/ex_doc) - [Rendering Mermaid graphs](https://github.com/elixir-lang/ex_doc#rendering-mermaid-graphs) - From 1e70b3817e3c3fcb414af8c217196d916b0564b7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 23:38:27 +0530 Subject: [PATCH 302/316] Use pnpm/action-setup@v2 --- .github/workflows/update-browserlist.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-browserlist.yml b/.github/workflows/update-browserlist.yml index 463160256d..7c376e3bdf 100644 --- a/.github/workflows/update-browserlist.yml +++ b/.github/workflows/update-browserlist.yml @@ -9,7 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm install pnpm -g && npx update-browserslist-db@latest + - uses: pnpm/action-setup@v2 + - run: npx update-browserslist-db@latest - name: Commit changes uses: EndBug/add-and-commit@v9 with: From 84a18a1858a47f547022922fb30252328f4a77ee Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 19 Jan 2024 23:47:07 +0530 Subject: [PATCH 303/316] Fix Update Browserslist --- .github/workflows/update-browserlist.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-browserlist.yml b/.github/workflows/update-browserlist.yml index 0a83df795d..f4fa2a982f 100644 --- a/.github/workflows/update-browserlist.yml +++ b/.github/workflows/update-browserlist.yml @@ -9,10 +9,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npx browserslist@latest --update-db + - uses: pnpm/action-setup@v2 + - run: npx update-browserslist-db@latest - name: Commit changes uses: EndBug/add-and-commit@v9 with: author_name: ${{ github.actor }} author_email: ${{ github.actor }}@users.noreply.github.com message: 'chore: update browsers list' + push: false + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + branch: update-browserslist + title: Update Browserslist From 2bbdd15031722cf4689526f48015b36ae1c7e594 Mon Sep 17 00:00:00 2001 From: Reda Al Sulais Date: Sat, 20 Jan 2024 13:30:49 +0300 Subject: [PATCH 304/316] docs: fix swimm link --- docs/ecosystem/integrations-community.md | 2 +- packages/mermaid/src/docs/ecosystem/integrations-community.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index a9174d8aa9..6ad02f6b69 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -60,7 +60,7 @@ To add an integration to this list, see the [Integrations - create page](./integ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ - [Mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ -- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) ✅ +- [Swimm](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) ✅ - [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 73c4b9ef0a..a567e67888 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -55,7 +55,7 @@ To add an integration to this list, see the [Integrations - create page](./integ - [Mermaid Flow Visual Editor](https://www.mermaidflow.app) ✅ - [Mermerd](https://github.com/KarnerTh/mermerd) - [Slab](https://slab.com) ✅ -- [Swimm](https://docs.swimm.io/Features/diagrams-and-charts#mermaid--swimm--up-to-date-diagrams-) ✅ +- [Swimm](https://docs.swimm.io/features/diagrams-and-charts/#mermaid--swimm--up-to-date-diagrams-) ✅ - [NotesHub](https://noteshub.app) ✅ - [Notion](https://notion.so) ✅ - [Observable](https://observablehq.com/@observablehq/mermaid) ✅ From 4f60a2747256f11902b5dc3bf19d55654205c772 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Sat, 20 Jan 2024 20:57:58 -0300 Subject: [PATCH 305/316] Change repetitive values into consts --- .../src/diagrams/git/gitGraphRenderer.js | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index 4790949b57..6124d72c68 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -112,8 +112,11 @@ const drawCommits = (svg, commits, modifyGraph) => { }); const isParallelCommits = gitGraphConfig.parallelCommits; + const layoutOffset = 10; + const commitStep = 40; sortedKeys.forEach((key) => { const commit = commits[key]; + const posWithOffset = pos + layoutOffset; if (isParallelCommits) { if (!commit.parents.length) { @@ -123,12 +126,15 @@ const drawCommits = (svg, commits, modifyGraph) => { } } else { const closestParent = findClosestParent(commit.parents); - pos = dir === 'TB' ? commitPos[closestParent].y + 40 : commitPos[closestParent].x + 40; + pos = + dir === 'TB' + ? commitPos[closestParent].y + commitStep + : commitPos[closestParent].x + commitStep; } } - const y = dir === 'TB' ? pos + 10 : branchPos[commit.branch].pos; - const x = dir === 'TB' ? branchPos[commit.branch].pos : pos + 10; + const y = dir === 'TB' ? posWithOffset : branchPos[commit.branch].pos; + const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset; // Don't draw the commits now but calculate the positioning which is used by the branch lines etc. if (modifyGraph) { @@ -253,9 +259,9 @@ const drawCommits = (svg, commits, modifyGraph) => { } } if (dir === 'TB') { - commitPos[commit.id] = { x: x, y: pos + 10 }; + commitPos[commit.id] = { x: x, y: posWithOffset }; } else { - commitPos[commit.id] = { x: pos + 10, y: y }; + commitPos[commit.id] = { x: posWithOffset, y: y }; } // The first iteration over the commits are for positioning purposes, this @@ -284,7 +290,7 @@ const drawCommits = (svg, commits, modifyGraph) => { // Now we have the label, lets position the background labelBkg - .attr('x', pos + 10 - bbox.width / 2 - py) + .attr('x', posWithOffset - bbox.width / 2 - py) .attr('y', y + 13.5) .attr('width', bbox.width + 2 * py) .attr('height', bbox.height + 2 * py); @@ -295,7 +301,7 @@ const drawCommits = (svg, commits, modifyGraph) => { } if (dir !== 'TB') { - text.attr('x', pos + 10 - bbox.width / 2); + text.attr('x', posWithOffset - bbox.width / 2); } if (gitGraphConfig.rotateCommitLabel) { if (dir === 'TB') { @@ -321,7 +327,7 @@ const drawCommits = (svg, commits, modifyGraph) => { .attr('class', 'tag-label') .text(commit.tag); let tagBbox = tag.node().getBBox(); - tag.attr('x', pos + 10 - tagBbox.width / 2); + tag.attr('x', posWithOffset - tagBbox.width / 2); const h2 = tagBbox.height / 2; const ly = y - 19.2; @@ -330,10 +336,10 @@ const drawCommits = (svg, commits, modifyGraph) => { ` ${pos - tagBbox.width / 2 - px / 2},${ly + py} ${pos - tagBbox.width / 2 - px / 2},${ly - py} - ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py} - ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py} - ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py} - ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}` + ${posWithOffset - tagBbox.width / 2 - px},${ly - h2 - py} + ${posWithOffset + tagBbox.width / 2 + px},${ly - h2 - py} + ${posWithOffset + tagBbox.width / 2 + px},${ly + h2 + py} + ${posWithOffset - tagBbox.width / 2 - px},${ly + h2 + py}` ); hole @@ -350,10 +356,10 @@ const drawCommits = (svg, commits, modifyGraph) => { ` ${x},${pos + py} ${x},${pos - py} - ${x + 10},${pos - h2 - py} - ${x + 10 + tagBbox.width + px},${pos - h2 - py} - ${x + 10 + tagBbox.width + px},${pos + h2 + py} - ${x + 10},${pos + h2 + py}` + ${x + layoutOffset},${pos - h2 - py} + ${x + layoutOffset + tagBbox.width + px},${pos - h2 - py} + ${x + layoutOffset + tagBbox.width + px},${pos + h2 + py} + ${x + layoutOffset},${pos + h2 + py}` ) .attr('transform', 'translate(12,12) rotate(45, ' + x + ',' + pos + ')'); hole @@ -367,7 +373,7 @@ const drawCommits = (svg, commits, modifyGraph) => { } } } - pos += 50; + pos += commitStep + layoutOffset; if (pos > maxPos) { maxPos = pos; } From e668698b5c5510c2f1ff9a6cc875d0dbdf413de2 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 22 Jan 2024 19:56:25 -0300 Subject: [PATCH 306/316] Reposition const declaration to ideal place --- packages/mermaid/src/diagrams/git/gitGraphRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index 6124d72c68..cefbe89c14 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -116,7 +116,6 @@ const drawCommits = (svg, commits, modifyGraph) => { const commitStep = 40; sortedKeys.forEach((key) => { const commit = commits[key]; - const posWithOffset = pos + layoutOffset; if (isParallelCommits) { if (!commit.parents.length) { @@ -133,6 +132,7 @@ const drawCommits = (svg, commits, modifyGraph) => { } } + const posWithOffset = pos + layoutOffset; const y = dir === 'TB' ? posWithOffset : branchPos[commit.branch].pos; const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset; From 81825f22f508eee53a9ab809361935d52bc3caf0 Mon Sep 17 00:00:00 2001 From: Matheus B Date: Mon, 22 Jan 2024 20:09:20 -0300 Subject: [PATCH 307/316] Swap condition blocks to avoid using negation --- .../mermaid/src/diagrams/git/gitGraphRenderer.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js index cefbe89c14..84b8f41a16 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphRenderer.js +++ b/packages/mermaid/src/diagrams/git/gitGraphRenderer.js @@ -118,17 +118,17 @@ const drawCommits = (svg, commits, modifyGraph) => { const commit = commits[key]; if (isParallelCommits) { - if (!commit.parents.length) { - pos = 0; - if (dir === 'TB') { - pos = 30; - } - } else { + if (commit.parents.length) { const closestParent = findClosestParent(commit.parents); pos = dir === 'TB' ? commitPos[closestParent].y + commitStep : commitPos[closestParent].x + commitStep; + } else { + pos = 0; + if (dir === 'TB') { + pos = 30; + } } } From 8fad1f55e25cf4e8ce1d893a268a6ea2fcf0b778 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Tue, 23 Jan 2024 10:56:44 +0300 Subject: [PATCH 308/316] docs: move community to Discord --- .github/ISSUE_TEMPLATE/config.yml | 6 +++--- .github/lychee.toml | 4 ++-- README.md | 4 ++-- README.zh-CN.md | 4 ++-- docs/community/security.md | 2 +- docs/ecosystem/integrations-create.md | 4 ++-- docs/intro/index.md | 2 +- .../mermaid/src/docs/.vitepress/components/HomePage.vue | 2 +- packages/mermaid/src/docs/.vitepress/config.ts | 4 ++-- packages/mermaid/src/docs/community/security.md | 2 +- packages/mermaid/src/docs/ecosystem/integrations-create.md | 4 ++-- packages/mermaid/src/docs/intro/index.md | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7e0c78ff1e..fa15f39e1c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,9 +3,9 @@ contact_links: - name: GitHub Discussions url: https://github.com/mermaid-js/mermaid/discussions about: Ask the Community questions or share your own graphs in our discussions. - - name: Slack - url: https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE - about: Join our Community on Slack for Help and a casual chat. + - name: Discord + url: https://discord.gg/wwtabKgp8y + about: Join our Community on Discord for Help and a casual chat. - name: Documentation url: https://mermaid.js.org about: Read our documentation for all that Mermaid.js can offer. diff --git a/.github/lychee.toml b/.github/lychee.toml index b13e536161..4af304a990 100644 --- a/.github/lychee.toml +++ b/.github/lychee.toml @@ -34,8 +34,8 @@ exclude = [ # Don't check files that are generated during the build via `pnpm docs:code` 'packages/mermaid/src/docs/config/setup/*', -# Ignore slack invite -"https://join.slack.com/" +# Ignore Discord invite +"https://discord.gg" ] # Exclude all private IPs from checking. diff --git a/README.md b/README.md index cf21fdb8e6..f1661e27ff 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Generate diagrams from markdown-like text. Live Editor!

- 📖 Documentation | 🚀 Getting Started | 🌐 CDN | 🙌 Join Us + 📖 Documentation | 🚀 Getting Started | 🌐 CDN | 🙌 Join Us

简体中文 @@ -33,7 +33,7 @@ Try Live Editor previews of future releases: diff --git a/README.zh-CN.md b/README.zh-CN.md index 98975ea331..c9d558393b 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,7 +15,7 @@ Mermaid 实时编辑器!

- 📖 文档 | 🚀 入门 | 🌐 CDN | 🙌 加入我们 + 📖 文档 | 🚀 入门 | 🌐 CDN | 🙌 加入我们

English @@ -34,7 +34,7 @@ Mermaid [![Coverage Status](https://codecov.io/github/mermaid-js/mermaid/branch/develop/graph/badge.svg)](https://app.codecov.io/github/mermaid-js/mermaid/tree/develop) [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid) [![NPM Downloads](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid) -[![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) +[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/wwtabKgp8y) [![Twitter Follow](https://img.shields.io/badge/Social-mermaidjs__-blue?style=social&logo=X)](https://twitter.com/mermaidjs_) diff --git a/docs/community/security.md b/docs/community/security.md index 07adbfbf8b..e456adcd76 100644 --- a/docs/community/security.md +++ b/docs/community/security.md @@ -16,7 +16,7 @@ We aim to reply within three working days, probably much sooner. You should expect a close collaboration as we work to resolve the issue you have reported. Please reach out to again if you do not receive prompt attention and regular updates. -You may also reach out to the team via our public Slack chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk. +You may also reach out to the team via our public Discord chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk. ## Best practices diff --git a/docs/ecosystem/integrations-create.md b/docs/ecosystem/integrations-create.md index 3dba1dafba..7643c88989 100644 --- a/docs/ecosystem/integrations-create.md +++ b/docs/ecosystem/integrations-create.md @@ -22,9 +22,9 @@ Currently pending [IANA](https://www.iana.org/) recognition. ## Showcase -### Mermaid Slack workspace +### Mermaid Discord workspace -We would love to see what you create with Mermaid. Please share your creations with us in our [Slack](https://join.slack.com/t/mermaid-talk/shared_invite/zt-22p2r8p9y-qiyP1H38GjFQ6S6jbBkOxQ) workspace [#community-showcase](https://mermaid-talk.slack.com/archives/C05NK37LT40) channel. +We would love to see what you create with Mermaid. Please share your creations with us in our [Discord](https://discord.gg/wwtabKgp8y) server [#showcase](https://discord.com/channels/1079455296289788015/1079502635054399649) channel. ### Add to Mermaid Ecosystem diff --git a/docs/intro/index.md b/docs/intro/index.md index 5a77fa5874..d038cde534 100644 --- a/docs/intro/index.md +++ b/docs/intro/index.md @@ -22,7 +22,7 @@ It is a JavaScript based diagramming and charting tool that renders Markdown-ins [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid) [![NPM](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid) -[![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) +[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/wwtabKgp8y) [![Twitter Follow](https://img.shields.io/twitter/follow/mermaidjs_?style=social)](https://twitter.com/mermaidjs_) diff --git a/packages/mermaid/src/docs/.vitepress/components/HomePage.vue b/packages/mermaid/src/docs/.vitepress/components/HomePage.vue index b6998f2499..9bc47ba0ce 100644 --- a/packages/mermaid/src/docs/.vitepress/components/HomePage.vue +++ b/packages/mermaid/src/docs/.vitepress/components/HomePage.vue @@ -17,7 +17,7 @@ import { teamMembers } from '../contributors';
Join the community diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index f5647e3c37..7ce9124a87 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -52,8 +52,8 @@ export default defineConfig({ socialLinks: [ { icon: 'github', link: 'https://github.com/mermaid-js/mermaid' }, { - icon: 'slack', - link: 'https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE', + icon: 'discord', + link: 'https://discord.gg/wwtabKgp8y', }, { icon: { diff --git a/packages/mermaid/src/docs/community/security.md b/packages/mermaid/src/docs/community/security.md index e7a0db6edb..a84a106ab3 100644 --- a/packages/mermaid/src/docs/community/security.md +++ b/packages/mermaid/src/docs/community/security.md @@ -10,7 +10,7 @@ We aim to reply within three working days, probably much sooner. You should expect a close collaboration as we work to resolve the issue you have reported. Please reach out to again if you do not receive prompt attention and regular updates. -You may also reach out to the team via our public Slack chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk. +You may also reach out to the team via our public Discord chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk. ## Best practices diff --git a/packages/mermaid/src/docs/ecosystem/integrations-create.md b/packages/mermaid/src/docs/ecosystem/integrations-create.md index 421240729c..c47ba30da4 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-create.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-create.md @@ -20,9 +20,9 @@ Currently pending [IANA](https://www.iana.org/) recognition. ## Showcase -### Mermaid Slack workspace +### Mermaid Discord workspace -We would love to see what you create with Mermaid. Please share your creations with us in our [Slack](https://join.slack.com/t/mermaid-talk/shared_invite/zt-22p2r8p9y-qiyP1H38GjFQ6S6jbBkOxQ) workspace [#community-showcase](https://mermaid-talk.slack.com/archives/C05NK37LT40) channel. +We would love to see what you create with Mermaid. Please share your creations with us in our [Discord](https://discord.gg/wwtabKgp8y) server [#showcase](https://discord.com/channels/1079455296289788015/1079502635054399649) channel. ### Add to Mermaid Ecosystem diff --git a/packages/mermaid/src/docs/intro/index.md b/packages/mermaid/src/docs/intro/index.md index 535ee3a3dc..bf5866755b 100644 --- a/packages/mermaid/src/docs/intro/index.md +++ b/packages/mermaid/src/docs/intro/index.md @@ -16,7 +16,7 @@ It is a JavaScript based diagramming and charting tool that renders Markdown-ins [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid) [![NPM](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid) -[![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) +[![Join our Discord!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=discord&label=discord)](https://discord.gg/wwtabKgp8y) [![Twitter Follow](https://img.shields.io/twitter/follow/mermaidjs_?style=social)](https://twitter.com/mermaidjs_) From 427bcaa3f6d517d476cc1a22e3de950a25e3d1a2 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Tue, 23 Jan 2024 12:20:56 +0300 Subject: [PATCH 309/316] docs: fix lint --- .../mermaid/src/docs/.vitepress/components/HomePage.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/components/HomePage.vue b/packages/mermaid/src/docs/.vitepress/components/HomePage.vue index 9bc47ba0ce..c493ee30a5 100644 --- a/packages/mermaid/src/docs/.vitepress/components/HomePage.vue +++ b/packages/mermaid/src/docs/.vitepress/components/HomePage.vue @@ -16,11 +16,7 @@ import { teamMembers } from '../contributors';


- Join the community + Join the community and get involved!

From 31e19a04346bff441f5b66422ca4c35891b15f99 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 20:28:11 +0530 Subject: [PATCH 310/316] Fix applitools --- applitools.config.js | 19 ------------------- cypress.config.cjs | 32 -------------------------------- cypress.config.ts | 30 ++++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 51 deletions(-) delete mode 100644 applitools.config.js delete mode 100644 cypress.config.cjs create mode 100644 cypress.config.ts diff --git a/applitools.config.js b/applitools.config.js deleted file mode 100644 index 4cf02220ac..0000000000 --- a/applitools.config.js +++ /dev/null @@ -1,19 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { defineConfig } = require('cypress'); - -module.exports = defineConfig({ - testConcurrency: 1, - browser: [ - // Add browsers with different viewports - // { width: 800, height: 600, name: 'chrome' }, - // { width: 700, height: 500, name: 'firefox' }, - // { width: 1600, height: 1200, name: 'ie11' }, - // { width: 1024, height: 768, name: 'edgechromium' }, - // { width: 800, height: 600, name: 'safari' }, - // // Add mobile emulation devices in Portrait mode - // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, - // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, - ], - // set batch name to the configuration - // batchName: `Mermaid ${process.env.APPLI_BRANCH ?? "'no APPLI_BRANCH set'"}`, -}); diff --git a/cypress.config.cjs b/cypress.config.cjs deleted file mode 100644 index 33633920ac..0000000000 --- a/cypress.config.cjs +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ - -const { defineConfig } = require('cypress'); -const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -const coverage = require('@cypress/code-coverage/task'); - -module.exports = defineConfig({ - projectId: 'n2sma2', - viewportWidth: 1440, - viewportHeight: 1024, - e2e: { - specPattern: 'cypress/integration/**/*.{js,ts}', - setupNodeEvents(on, config) { - coverage(on, config); - on('before:browser:launch', (browser = {}, launchOptions) => { - if (browser.name === 'chrome' && browser.isHeadless) { - launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); - } - return launchOptions; - }); - addMatchImageSnapshotPlugin(on, config); - // copy any needed variables from process.env to config.env - config.env.useAppli = process.env.USE_APPLI ? true : false; - - // do not forget to return the changed config object! - return config; - }, - }, - video: false, -}); - -require('@applitools/eyes-cypress')(module); diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000000..4182d92a87 --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,30 @@ +import { defineConfig } from 'cypress'; +import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin'; +import coverage from '@cypress/code-coverage/task'; +import eyesPlugin from '@applitools/eyes-cypress'; +export default eyesPlugin( + defineConfig({ + projectId: 'n2sma2', + viewportWidth: 1440, + viewportHeight: 1024, + e2e: { + specPattern: 'cypress/integration/**/*.{js,ts}', + setupNodeEvents(on, config) { + coverage(on, config); + on('before:browser:launch', (browser, launchOptions) => { + if (browser.name === 'chrome' && browser.isHeadless) { + launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); + } + return launchOptions; + }); + addMatchImageSnapshotPlugin(on, config); + // copy any needed variables from process.env to config.env + config.env.useAppli = process.env.USE_APPLI ? true : false; + + // do not forget to return the changed config object! + return config; + }, + }, + video: false, + }) +); From 493f238319ffcebc10570a390d2bbacc121eb715 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 20:28:11 +0530 Subject: [PATCH 311/316] Fix applitools --- applitools.config.js | 19 ------------------- cypress.config.cjs | 32 -------------------------------- cypress.config.ts | 30 ++++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 51 deletions(-) delete mode 100644 applitools.config.js delete mode 100644 cypress.config.cjs create mode 100644 cypress.config.ts diff --git a/applitools.config.js b/applitools.config.js deleted file mode 100644 index 4cf02220ac..0000000000 --- a/applitools.config.js +++ /dev/null @@ -1,19 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { defineConfig } = require('cypress'); - -module.exports = defineConfig({ - testConcurrency: 1, - browser: [ - // Add browsers with different viewports - // { width: 800, height: 600, name: 'chrome' }, - // { width: 700, height: 500, name: 'firefox' }, - // { width: 1600, height: 1200, name: 'ie11' }, - // { width: 1024, height: 768, name: 'edgechromium' }, - // { width: 800, height: 600, name: 'safari' }, - // // Add mobile emulation devices in Portrait mode - // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, - // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, - ], - // set batch name to the configuration - // batchName: `Mermaid ${process.env.APPLI_BRANCH ?? "'no APPLI_BRANCH set'"}`, -}); diff --git a/cypress.config.cjs b/cypress.config.cjs deleted file mode 100644 index 33633920ac..0000000000 --- a/cypress.config.cjs +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ - -const { defineConfig } = require('cypress'); -const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -const coverage = require('@cypress/code-coverage/task'); - -module.exports = defineConfig({ - projectId: 'n2sma2', - viewportWidth: 1440, - viewportHeight: 1024, - e2e: { - specPattern: 'cypress/integration/**/*.{js,ts}', - setupNodeEvents(on, config) { - coverage(on, config); - on('before:browser:launch', (browser = {}, launchOptions) => { - if (browser.name === 'chrome' && browser.isHeadless) { - launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); - } - return launchOptions; - }); - addMatchImageSnapshotPlugin(on, config); - // copy any needed variables from process.env to config.env - config.env.useAppli = process.env.USE_APPLI ? true : false; - - // do not forget to return the changed config object! - return config; - }, - }, - video: false, -}); - -require('@applitools/eyes-cypress')(module); diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000000..4182d92a87 --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,30 @@ +import { defineConfig } from 'cypress'; +import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin'; +import coverage from '@cypress/code-coverage/task'; +import eyesPlugin from '@applitools/eyes-cypress'; +export default eyesPlugin( + defineConfig({ + projectId: 'n2sma2', + viewportWidth: 1440, + viewportHeight: 1024, + e2e: { + specPattern: 'cypress/integration/**/*.{js,ts}', + setupNodeEvents(on, config) { + coverage(on, config); + on('before:browser:launch', (browser, launchOptions) => { + if (browser.name === 'chrome' && browser.isHeadless) { + launchOptions.args.push('--window-size=1440,1024', '--force-device-scale-factor=1'); + } + return launchOptions; + }); + addMatchImageSnapshotPlugin(on, config); + // copy any needed variables from process.env to config.env + config.env.useAppli = process.env.USE_APPLI ? true : false; + + // do not forget to return the changed config object! + return config; + }, + }, + video: false, + }) +); From 5c6c8d113562ea99e3d8445310a42fc3134610c7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 20:36:29 +0530 Subject: [PATCH 312/316] Update cypress --- package.json | 6 +- pnpm-lock.yaml | 501 +++++++++++++++++-------------------------------- 2 files changed, 170 insertions(+), 337 deletions(-) diff --git a/package.json b/package.json index a60f6f67f0..441484218d 100644 --- a/package.json +++ b/package.json @@ -61,11 +61,11 @@ ] }, "devDependencies": { - "@applitools/eyes-cypress": "^3.33.1", + "@applitools/eyes-cypress": "^3.40.6", "@commitlint/cli": "^17.6.1", "@commitlint/config-conventional": "^17.6.1", "@cspell/eslint-plugin": "^6.31.1", - "@cypress/code-coverage": "^3.10.7", + "@cypress/code-coverage": "^3.12.18", "@rollup/plugin-typescript": "^11.1.1", "@types/cors": "^2.8.13", "@types/eslint": "^8.37.0", @@ -85,7 +85,7 @@ "ajv": "^8.12.0", "concurrently": "^8.0.1", "cors": "^2.8.5", - "cypress": "^12.10.0", + "cypress": "^12.17.4", "cypress-image-snapshot": "^4.0.1", "esbuild": "^0.19.0", "eslint": "^8.47.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2484f63123..5d950edefc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: devDependencies: '@applitools/eyes-cypress': - specifier: ^3.33.1 - version: 3.36.2(typescript@5.1.6) + specifier: ^3.40.6 + version: 3.40.6(typescript@5.1.6) '@commitlint/cli': specifier: ^17.6.1 version: 17.7.1 @@ -21,8 +21,8 @@ importers: specifier: ^6.31.1 version: 6.31.3 '@cypress/code-coverage': - specifier: ^3.10.7 - version: 3.11.0(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(cypress@12.17.3)(webpack@5.88.2) + specifier: ^3.12.18 + version: 3.12.18(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2) '@rollup/plugin-typescript': specifier: ^11.1.1 version: 11.1.2(typescript@5.1.6) @@ -81,11 +81,11 @@ importers: specifier: ^2.8.5 version: 2.8.5 cypress: - specifier: ^12.10.0 - version: 12.17.3 + specifier: ^12.17.4 + version: 12.17.4 cypress-image-snapshot: specifier: ^4.0.1 - version: 4.0.1(cypress@12.17.3)(jest@29.6.2) + version: 4.0.1(cypress@12.17.4)(jest@29.6.2) esbuild: specifier: ^0.19.0 version: 0.19.0 @@ -714,110 +714,105 @@ packages: leven: 3.1.0 dev: true - /@applitools/core-base@1.5.0: - resolution: {integrity: sha512-fYK8a4GH0oTmdYYGx8rYCWjl6VH6Mt4iAukhOU6l502rBYAF8mChmwyTxXu8t6oh6ejX3YQ2I+WcAf2q9XIYvg==} + /@applitools/core-base@1.9.0: + resolution: {integrity: sha512-vicerOYUzDycn0Bf41FmLvGPBwuiTHP5EW7LqQowa38DAgXZLljoLo0IS68HV22HlMHHbzoRglMK3CPAGuNaqA==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/image': 1.1.2 - '@applitools/logger': 2.0.7 - '@applitools/req': 1.5.2 - '@applitools/utils': 1.5.0 + '@applitools/image': 1.1.9 + '@applitools/logger': 2.0.14 + '@applitools/req': 1.6.4 + '@applitools/utils': 1.7.0 abort-controller: 3.0.0 throat: 6.0.2 transitivePeerDependencies: - supports-color dev: true - /@applitools/core@3.9.0(typescript@5.1.6): - resolution: {integrity: sha512-fKea8ew6iyLhZskUtngcyCdlJ59Nrb+8R9fU6Y6fXT0xMBQESkU1r9Z+Dt3XUL/CzRE9NW4DWenhd52EFApxYg==} + /@applitools/core@4.6.0(typescript@5.1.6): + resolution: {integrity: sha512-YLxg4TnIEdYPTOQpeqCbjUKfJBDfjKqwieMVnLKp7Loxwvfh16C4SvsCzLSLHyqfPgsE+zRdt6uoIK0uVWM94g==} engines: {node: '>=12.13.0'} hasBin: true dependencies: - '@applitools/core-base': 1.5.0 - '@applitools/dom-capture': 11.2.2 - '@applitools/dom-snapshot': 4.7.10 - '@applitools/driver': 1.13.4 - '@applitools/ec-client': 1.7.4(typescript@5.1.6) - '@applitools/logger': 2.0.7 - '@applitools/nml-client': 1.5.7 - '@applitools/req': 1.5.2 - '@applitools/screenshoter': 3.8.7 - '@applitools/snippets': 2.4.22 - '@applitools/socket': 1.1.7 - '@applitools/spec-driver-webdriver': 1.0.41(webdriver@7.30.0) - '@applitools/ufg-client': 1.7.0 - '@applitools/utils': 1.5.0 + '@applitools/core-base': 1.9.0 + '@applitools/dom-capture': 11.2.5 + '@applitools/dom-snapshot': 4.7.16 + '@applitools/driver': 1.16.1 + '@applitools/ec-client': 1.7.22(typescript@5.1.6) + '@applitools/logger': 2.0.14 + '@applitools/nml-client': 1.6.4 + '@applitools/req': 1.6.4 + '@applitools/screenshoter': 3.8.20 + '@applitools/snippets': 2.4.24 + '@applitools/socket': 1.1.14 + '@applitools/spec-driver-webdriver': 1.0.54(webdriver@7.31.1) + '@applitools/ufg-client': 1.9.9 + '@applitools/utils': 1.7.0 '@types/ws': 8.5.5 abort-controller: 3.0.0 chalk: 4.1.2 node-fetch: 2.6.7 - webdriver: 7.30.0(typescript@5.1.6) + semver: 7.5.4 + webdriver: 7.31.1(typescript@5.1.6) ws: 8.13.0 yargs: 17.7.2 transitivePeerDependencies: - bufferutil - - canvas - encoding - supports-color - typescript - utf-8-validate dev: true - /@applitools/dom-capture@11.2.2: - resolution: {integrity: sha512-omSH+c8+ij/mUPKVwRp7ulCOz33EHMnG8Q3s7XuwaB9m04onEAg82/25otOrntqMKmO2doGWN3E97qUstZJiPQ==} - engines: {node: '>=8.9.0'} + /@applitools/dom-capture@11.2.5: + resolution: {integrity: sha512-bjVduGCBOdDyGSkXs8sH47wRpuwBt6f1FvzbATumIFp0V6xGAB1ehpO+j3Ss1SajwlDl8WQkyS6/85nTFyW3eA==} + engines: {node: '>=12.13.0'} dependencies: - '@applitools/dom-shared': 1.0.5 + '@applitools/dom-shared': 1.0.12 '@applitools/functional-commons': 1.6.0 dev: true - /@applitools/dom-shared@1.0.10: - resolution: {integrity: sha512-1k0CUQRm+38n6aTg/8IIppndYPDJLc/dU8Regbi/miP3xZmOG4Wwd5fBiu/MI5lgQm6RZU+at18lpCLFwU+Nng==} - engines: {node: '>=8.9.0'} - dev: true - - /@applitools/dom-shared@1.0.5: - resolution: {integrity: sha512-O2zgnnqVi3/Atq7EQjURLa73XNaDFJCj8wHht6WQtxIv1EWYnPutNTmnJSKwK7FnbJAg65OVjZylcz4EezyYZA==} - engines: {node: '>=8.9.0'} + /@applitools/dom-shared@1.0.12: + resolution: {integrity: sha512-GFyVHOUFjaS2WhUPjaELn1yBAK9hmRqv031RRQjYkf+3aD9GfzKHj/ZUVcSsZydid+0VAtHVQFwZGH79bGhd7w==} + engines: {node: '>=12.13.0'} dev: true - /@applitools/dom-snapshot@4.7.10: - resolution: {integrity: sha512-QhX0p6irvQE48eeauNHIfEm76L8QY8mDO8Tk4YOzzBRKcGpKphQUR/5GRCR9S3jx5wwJAwjF/aMW/W7Cwdaztw==} - engines: {node: '>=8.9.0'} + /@applitools/dom-snapshot@4.7.16: + resolution: {integrity: sha512-GXWrMOkpHlnpo0tonhxfmDFOiCaT//ZDexB9vGKLgBBF0QDFpdy9BgvasLvy8I0PuVegXsgJbZS3gS053N7SHQ==} + engines: {node: '>=12.13.0'} dependencies: - '@applitools/dom-shared': 1.0.10 + '@applitools/dom-shared': 1.0.12 '@applitools/functional-commons': 1.6.0 css-tree: 2.3.1 pako: 1.0.11 dev: true - /@applitools/driver@1.13.4: - resolution: {integrity: sha512-LdATkjMoTZKUDHmuIfV0uh0ZiRe+yNNIehTqmjV6LnQrNvm73ddzF2Tn+LM8Vg/CflwFhw+TVKPaywTmi35wUg==} + /@applitools/driver@1.16.1: + resolution: {integrity: sha512-DfSbcKopOIPl1Wfet3Uib2bDSl64Wh51772MPM7A/xrwJrLOY5NvfT71PqMIQd4eZAd6k5hRg5gbGL5zTzktLQ==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/logger': 2.0.7 - '@applitools/snippets': 2.4.22 - '@applitools/utils': 1.5.0 + '@applitools/logger': 2.0.14 + '@applitools/snippets': 2.4.24 + '@applitools/utils': 1.7.0 semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true - /@applitools/ec-client@1.7.4(typescript@5.1.6): - resolution: {integrity: sha512-vFY5O9WXQ905hUcw4ot1BuKAAFq6F+hyQfX/obsQsUPUvJXqHhiFjMiI/x3cyrPr40EVLQM8edZCa71m4k2WyQ==} + /@applitools/ec-client@1.7.22(typescript@5.1.6): + resolution: {integrity: sha512-zhkYIW8bUpwc+TmvQyxL12kIt2TnAwB30XHke1ApmcPxGk9P8lfjm/AzwnKHqDBJxN2V/TSUfuRvseZq5b4TRA==} engines: {node: '>=12.13.0'} hasBin: true dependencies: - '@applitools/core-base': 1.5.0 - '@applitools/driver': 1.13.4 - '@applitools/logger': 2.0.7 - '@applitools/req': 1.5.2 - '@applitools/socket': 1.1.7 - '@applitools/spec-driver-webdriver': 1.0.41(webdriver@7.30.0) - '@applitools/tunnel-client': 1.1.3 - '@applitools/utils': 1.5.0 + '@applitools/core-base': 1.9.0 + '@applitools/driver': 1.16.1 + '@applitools/logger': 2.0.14 + '@applitools/req': 1.6.4 + '@applitools/socket': 1.1.14 + '@applitools/spec-driver-webdriver': 1.0.54(webdriver@7.31.1) + '@applitools/tunnel-client': 1.4.0 + '@applitools/utils': 1.7.0 abort-controller: 3.0.0 - webdriver: 7.30.0(typescript@5.1.6) + webdriver: 7.31.1(typescript@5.1.6) yargs: 17.7.2 transitivePeerDependencies: - supports-color @@ -859,40 +854,38 @@ packages: - supports-color dev: true - /@applitools/eyes-cypress@3.36.2(typescript@5.1.6): - resolution: {integrity: sha512-GA1KP7i3Zr7sbc8yscw7fay1XbQ46LxEAH4dLqjJhOmvvpZuDlmgRyVMuvTmobDXKKHtdVpfoXtJQURrxs7fvA==} + /@applitools/eyes-cypress@3.40.6(typescript@5.1.6): + resolution: {integrity: sha512-Klqt3y2U9pl+btLKQJB6e6UtzOv4wdAKxD9V6VCjLF8DqQeBukinAG3kBgpDRQVEVCYMeQXdQZrRTRJvZOkpIg==} engines: {node: '>=12.13.0'} hasBin: true dependencies: - '@applitools/core': 3.9.0(typescript@5.1.6) - '@applitools/eyes': 1.7.2(typescript@5.1.6) + '@applitools/core': 4.6.0(typescript@5.1.6) + '@applitools/eyes': 1.13.5(typescript@5.1.6) '@applitools/functional-commons': 1.6.0 - '@applitools/logger': 2.0.7 - '@applitools/utils': 1.5.0 + '@applitools/logger': 2.0.14 + '@applitools/utils': 1.7.0 boxen: 5.1.2 chalk: 3.0.0 - semver: 7.3.8 + semver: 7.5.4 uuid: 8.3.2 ws: 8.5.0 transitivePeerDependencies: - bufferutil - - canvas - encoding - supports-color - typescript - utf-8-validate dev: true - /@applitools/eyes@1.7.2(typescript@5.1.6): - resolution: {integrity: sha512-RNwPMp19xmQ+oEEZH66wGbnBbOqsrHaLBwnCZ9qJ9294aN4DuYHJNXdzHtLFSwjHNc8UmyDRU2Enn4825hqV6w==} + /@applitools/eyes@1.13.5(typescript@5.1.6): + resolution: {integrity: sha512-FXFH5D78UMcqG0No5FgvISlfGM9DrXTCnRsEXhEw+dbQneG7siKRY6BQci3QDgrh0sI0yfVaZbZrpXIKuDF1ug==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/core': 3.9.0(typescript@5.1.6) - '@applitools/logger': 2.0.7 - '@applitools/utils': 1.5.0 + '@applitools/core': 4.6.0(typescript@5.1.6) + '@applitools/logger': 2.0.14 + '@applitools/utils': 1.7.0 transitivePeerDependencies: - bufferutil - - canvas - encoding - supports-color - typescript @@ -904,11 +897,11 @@ packages: engines: {node: '>=8.0.0'} dev: true - /@applitools/image@1.1.2: - resolution: {integrity: sha512-Cy1oKCB2vIpHT47Y1tictsRS2RLBVI4XzxYWvKnXx+ZsbL364IiDzwWxYKgvA7/6t1Ako648n4+BWKoUi5Ewbg==} + /@applitools/image@1.1.9: + resolution: {integrity: sha512-R86re+yofXSBamTuzSLwFB57fzaf7aiKvyx675uw8e/XfqQy3vhGbp8Bh23lUZX9y7ngf2ldrpnQ7nQrvmtJuA==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/utils': 1.5.0 + '@applitools/utils': 1.7.0 bmpimagejs: 1.0.4 jpeg-js: 0.4.4 omggif: 1.0.10 @@ -926,33 +919,33 @@ packages: - supports-color dev: true - /@applitools/logger@2.0.7: - resolution: {integrity: sha512-dmX2nWWixMYsOdhl1MANv7wr8cKzYUOaHxQp9CdokVbJy+NGwWAzK6qVeKjogn7D6eXHzgn3R3OzplYSq/fK/g==} + /@applitools/logger@2.0.14: + resolution: {integrity: sha512-oq/RPjs/3BjR3EdLohHhzzVufBYEMMhOUmZlCnvgmCJIhUsa3ceq8Ta2E99TUzSny9xkl962JoRDfLQg/vS+Ww==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/utils': 1.5.0 + '@applitools/utils': 1.7.0 chalk: 4.1.2 debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: true - /@applitools/nml-client@1.5.7: - resolution: {integrity: sha512-jAG2/4JSqX7FSrdyIyjdXcPy2l2/t8KRlw554nL1ABgtqTV8yCI3DxVUk7RCNi39f1uY5pA2pfiZVGFImnSFKg==} + /@applitools/nml-client@1.6.4: + resolution: {integrity: sha512-mbLnwpXbM2MkB+bP9+Hluywi4OAFWDr+FvjHkk/9TcvcM9EYbmD8deGuTC5kFt5WDDS568WQDRj+G2tT1JfLEA==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/logger': 2.0.7 - '@applitools/req': 1.5.2 - '@applitools/utils': 1.5.0 + '@applitools/logger': 2.0.14 + '@applitools/req': 1.6.4 + '@applitools/utils': 1.7.0 transitivePeerDependencies: - supports-color dev: true - /@applitools/req@1.5.2: - resolution: {integrity: sha512-evuikeiCYudhxSQ2kisO7DdywPqshaaN+BiDu4P3eTz5R9VmqhXwWP9bS88G8bzzz0FeNQMY9a7TjQ7d5jMRrA==} - engines: {node: '>=12.13.0'} + /@applitools/req@1.6.4: + resolution: {integrity: sha512-yKTga1QHzIk7ECHgC8JEgYxV91PdIHWRa02ZpsK2FAk6GjTefPK6WZsj1vGKeVi/dGxHuZT8sjvtJHc275osug==} + engines: {node: '>=16.13.0'} dependencies: - '@applitools/utils': 1.5.0 + '@applitools/utils': 1.7.0 abort-controller: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -961,81 +954,78 @@ packages: - supports-color dev: true - /@applitools/screenshoter@3.8.7: - resolution: {integrity: sha512-G576fLyTTAJEnhFZBeD57+1JDXGTDcTlrg0n32ujtYTFswUAf5XnXmeO6s2WqeHKQl74e2xwhBmdtU/CrVOkig==} + /@applitools/screenshoter@3.8.20: + resolution: {integrity: sha512-k7t4cdJ5vpgYvsLLrenSvPNkUZ25uUs7Q54X0tGtkgQ/C+pQ8GLaIXQQwyVaEYbnF6WuAnrjTXMpdPJ2uUvpAg==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/image': 1.1.2 - '@applitools/logger': 2.0.7 - '@applitools/snippets': 2.4.22 - '@applitools/utils': 1.5.0 + '@applitools/image': 1.1.9 + '@applitools/logger': 2.0.14 + '@applitools/snippets': 2.4.24 + '@applitools/utils': 1.7.0 transitivePeerDependencies: - supports-color dev: true - /@applitools/snippets@2.4.22: - resolution: {integrity: sha512-bv4GzMf6k4mAyMxo3PVR3HKEPkf4h0O6+xNo6UO78cw+MpkT4Sr7JDk3mLq8H/WRDKk7x4VKpJeoDHd5dBxT3g==} + /@applitools/snippets@2.4.24: + resolution: {integrity: sha512-T/cfYA15K+gR2Xc/cEnn2hR7XBJ9vCcH/Jcp7Hoor14j7nzldR+u69HaQe/sa4ChDU4eZyTiTggek52+MqX7FQ==} engines: {node: '>=12.13.0'} dev: true - /@applitools/socket@1.1.7: - resolution: {integrity: sha512-SpP+Zw5B9VJ3K+xW+wSYDwfrOQ1U9/95h5G3rszKaVleX2FTUW0JgmASuSlwgr7veU3qlcNzt3vas/tQM3/z/g==} + /@applitools/socket@1.1.14: + resolution: {integrity: sha512-o43hNnD/PN5T5MFR3cZ5OC+b5PpkV/PeTk8z844sNtGyziS9GEpO0vYfG2XLq/mZg0YQurrXtYupUMndV+0wDg==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/logger': 2.0.7 - '@applitools/utils': 1.5.0 + '@applitools/logger': 2.0.14 + '@applitools/utils': 1.7.0 transitivePeerDependencies: - supports-color dev: true - /@applitools/spec-driver-webdriver@1.0.41(webdriver@7.30.0): - resolution: {integrity: sha512-0kUHiFmr3FiOlfTnfS1k8pvJXgnEM8bP36teiDJvmAJnk8aJG5nmqaQj1KkeLUVVZ1wfYlg/+iDtGUdP4a4Zxw==} + /@applitools/spec-driver-webdriver@1.0.54(webdriver@7.31.1): + resolution: {integrity: sha512-ZpwUBWu5kUil5E+r+NdhdB8SzWwGv56+sZSGyPlgN0w2krmIudeyBKuJKYMfqdXSu0lATSgKJSCJXmkb/q4DNQ==} engines: {node: '>=12.13.0'} peerDependencies: - webdriver: '>=7.27.0' + webdriver: '>=6.0.0' dependencies: - '@applitools/driver': 1.13.4 - '@applitools/utils': 1.5.0 + '@applitools/driver': 1.16.1 + '@applitools/utils': 1.7.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 - webdriver: 7.30.0(typescript@5.1.6) + webdriver: 7.31.1(typescript@5.1.6) transitivePeerDependencies: - supports-color dev: true - /@applitools/tunnel-client@1.1.3: - resolution: {integrity: sha512-xe0HqznqnuhsZYIY//NnjszEkIcYgdZkwVR4GOwzVCOCcxIGoi+kMpDUuC2Xcd8+UiVbfZfZTeo7rXITlzzqAw==} + /@applitools/tunnel-client@1.4.0: + resolution: {integrity: sha512-vgQoEN81Mhqjf74+9JAUvGK8t8Dzm0p8nNrqsqeHekuTva6Jh92sNK40j96z7jrMoSo+JHOeb/7mIOicU9o/0A==} engines: {node: '>=12.13.0'} hasBin: true dependencies: '@applitools/execution-grid-tunnel': 2.1.8 - '@applitools/logger': 2.0.7 - '@applitools/req': 1.5.2 - '@applitools/socket': 1.1.7 - '@applitools/utils': 1.5.0 + '@applitools/logger': 2.0.14 + '@applitools/req': 1.6.4 + '@applitools/socket': 1.1.14 + '@applitools/utils': 1.7.0 abort-controller: 3.0.0 yargs: 17.7.2 transitivePeerDependencies: - supports-color dev: true - /@applitools/ufg-client@1.7.0: - resolution: {integrity: sha512-BMFLuWGq8YVs0/z5VBl8CAKzOMXbagHFxyR4oGdg31nDsuKgKfhlnbGji5qek243ex8vEbEqFwsH2K0ZXYGIeQ==} + /@applitools/ufg-client@1.9.9: + resolution: {integrity: sha512-J/k6C1JYPr4ohcE64AvVHIeTMZ83bXnhuIryxvOWJDSyr6Yh4hvtrbCviUyYMaKj7WCMYeDEESt6auiyBMxVGw==} engines: {node: '>=12.13.0'} dependencies: - '@applitools/image': 1.1.2 - '@applitools/logger': 2.0.7 - '@applitools/req': 1.5.2 - '@applitools/utils': 1.5.0 + '@applitools/image': 1.1.9 + '@applitools/logger': 2.0.14 + '@applitools/req': 1.6.4 + '@applitools/utils': 1.7.0 + '@xmldom/xmldom': 0.8.10 abort-controller: 3.0.0 css-tree: 2.3.1 - jsdom: 19.0.0 throat: 6.0.2 transitivePeerDependencies: - - bufferutil - - canvas - supports-color - - utf-8-validate dev: true /@applitools/utils@1.3.36: @@ -1043,8 +1033,8 @@ packages: engines: {node: '>=12.13.0'} dev: true - /@applitools/utils@1.5.0: - resolution: {integrity: sha512-BZk8YolP0G+/Srjkhf+pFp4zY7bU41L63hDN9gtwrD1xZOfWXJbOCD3gFQAGRB2qsozHMkPNTt+xw7RJjIjGQg==} + /@applitools/utils@1.7.0: + resolution: {integrity: sha512-CvBxdfPZ3ss1hOD8Yr9y2SzVfqLKBA/0N3gfQd5qafMrBhI0wuCycQmiclpAQNEVNkbhqn8/t6dOeeYgapjyDw==} engines: {node: '>=12.13.0'} dev: true @@ -3104,27 +3094,31 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.9 - /@cypress/code-coverage@3.11.0(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(cypress@12.17.3)(webpack@5.88.2): - resolution: {integrity: sha512-ihSO1s03gmLRE224oIjrbdG1ey63vw/UY+VSqQ5m/TKkAvyz6GIiniq6juk3AV/+0vQC1Eb4UWFu8ndtji4M1g==} + /@cypress/code-coverage@3.12.18(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(cypress@12.17.4)(webpack@5.88.2): + resolution: {integrity: sha512-RTOyCVr5CWaJ7cW1gOvlXSLDr0HNXZ7xSVfLSZEGsTODbaxeUV01Z1k93spnbVT7ri9UkxCEffPcsZsZi1oDng==} peerDependencies: + '@babel/core': ^7.0.1 + '@babel/preset-env': ^7.0.0 + babel-loader: ^8.3 || ^9 cypress: '*' + webpack: ^4 || ^5 dependencies: - '@cypress/webpack-preprocessor': 5.17.1(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(webpack@5.88.2) + '@babel/core': 7.23.5 + '@babel/preset-env': 7.22.10(@babel/core@7.23.5) + '@cypress/webpack-preprocessor': 6.0.1(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(webpack@5.88.2) + babel-loader: 9.1.3(@babel/core@7.23.5)(webpack@5.88.2) chalk: 4.1.2 - cypress: 12.17.3 - dayjs: 1.11.9 + cypress: 12.17.4 + dayjs: 1.11.10 debug: 4.3.4(supports-color@8.1.1) execa: 4.1.0 - globby: 11.0.4 - istanbul-lib-coverage: 3.0.0 + globby: 11.1.0 + istanbul-lib-coverage: 3.2.0 js-yaml: 4.1.0 nyc: 15.1.0 + webpack: 5.88.2(esbuild@0.19.0)(webpack-cli@4.10.0) transitivePeerDependencies: - - '@babel/core' - - '@babel/preset-env' - - babel-loader - supports-color - - webpack dev: true /@cypress/request@2.88.12: @@ -3151,12 +3145,12 @@ packages: uuid: 8.3.2 dev: true - /@cypress/webpack-preprocessor@5.17.1(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(webpack@5.88.2): - resolution: {integrity: sha512-FE/e8ikPc8z4EVopJCaior3RGy0jd2q9Xcp5NtiwNG4XnLfEnUFTZlAGwXe75sEh4fNMPrBJW1KIz77PX5vGAw==} + /@cypress/webpack-preprocessor@6.0.1(@babel/core@7.23.5)(@babel/preset-env@7.22.10)(babel-loader@9.1.3)(webpack@5.88.2): + resolution: {integrity: sha512-WVNeFVSnFKxE3WZNRIriduTgqJRpevaiJIPlfqYTTzfXRD7X1Pv4woDE+G4caPV9bJqVKmVFiwzrXMRNeJxpxA==} peerDependencies: '@babel/core': ^7.0.1 '@babel/preset-env': ^7.0.0 - babel-loader: ^8.0.2 || ^9 + babel-loader: ^8.3 || ^9 webpack: ^4 || ^5 dependencies: '@babel/core': 7.23.5 @@ -4931,6 +4925,13 @@ packages: '@types/node': 18.17.5 dev: true + /@types/glob@8.1.0: + resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} + dependencies: + '@types/minimatch': 5.1.2 + '@types/node': 18.17.5 + dev: true + /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: @@ -6146,13 +6147,14 @@ packages: - vue dev: true - /@wdio/config@7.30.0(typescript@5.1.6): - resolution: {integrity: sha512-/38rol9WCfFTMtXyd/C856/aexxIZnfVvXg7Fw2WXpqZ9qadLA+R4N35S2703n/RByjK/5XAYtHoljtvh3727w==} + /@wdio/config@7.31.1(typescript@5.1.6): + resolution: {integrity: sha512-WAfswbCatwiaDVqy6kfF/5T8/WS/US/SRhBGUFrfBuGMIe+RRoHgy7jURFWSvUIE7CNHj8yvs46fLUcxhXjzcQ==} engines: {node: '>=12.0.0'} dependencies: + '@types/glob': 8.1.0 '@wdio/logger': 7.26.0 - '@wdio/types': 7.26.0(typescript@5.1.6) - '@wdio/utils': 7.26.0(typescript@5.1.6) + '@wdio/types': 7.30.2(typescript@5.1.6) + '@wdio/utils': 7.30.2(typescript@5.1.6) deepmerge: 4.3.1 glob: 8.1.0 transitivePeerDependencies: @@ -6174,8 +6176,8 @@ packages: engines: {node: '>=12.0.0'} dev: true - /@wdio/types@7.26.0(typescript@5.1.6): - resolution: {integrity: sha512-mOTfWAGQ+iT58iaZhJMwlUkdEn3XEWE4jthysMLXFnSuZ2eaODVAiK31SmlS/eUqgSIaupeGqYUrtCuSNbLefg==} + /@wdio/types@7.30.2(typescript@5.1.6): + resolution: {integrity: sha512-uZ8o7FX8RyBsaXiOWa59UKTCHTtADNvOArYTcHNEIzt+rh4JdB/uwqfc8y4TCNA2kYm7PWaQpUFwpStLeg0H1Q==} engines: {node: '>=12.0.0'} peerDependencies: typescript: ^4.6.2 @@ -6188,12 +6190,12 @@ packages: typescript: 5.1.6 dev: true - /@wdio/utils@7.26.0(typescript@5.1.6): - resolution: {integrity: sha512-pVq2MPXZAYLkKGKIIHktHejnHqg4TYKoNYSi2EDv+I3GlT8VZKXHazKhci82ov0tD+GdF27+s4DWNDCfGYfBdQ==} + /@wdio/utils@7.30.2(typescript@5.1.6): + resolution: {integrity: sha512-np7I+smszFUennbQKdzbMN/zUL3s3EZq9pCCUcTRjjs9TE4tnn0wfmGdoz2o7REYu6kn9NfFFJyVIM2VtBbKEA==} engines: {node: '>=12.0.0'} dependencies: '@wdio/logger': 7.26.0 - '@wdio/types': 7.26.0(typescript@5.1.6) + '@wdio/types': 7.30.2(typescript@5.1.6) p-iteration: 1.1.8 transitivePeerDependencies: - typescript @@ -6414,13 +6416,6 @@ packages: negotiator: 0.6.3 dev: true - /acorn-globals@6.0.0: - resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} - dependencies: - acorn: 7.4.1 - acorn-walk: 7.2.0 - dev: true - /acorn-import-assertions@1.9.0(acorn@8.10.0): resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: @@ -6437,21 +6432,10 @@ packages: acorn: 8.10.0 dev: true - /acorn-walk@7.2.0: - resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} - engines: {node: '>=0.4.0'} - dev: true - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - /acorn@7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} @@ -7070,10 +7054,6 @@ packages: dependencies: fill-range: 7.0.1 - /browser-process-hrtime@1.0.0: - resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} - dev: true - /browserslist@4.21.10: resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -8059,21 +8039,6 @@ packages: hasBin: true dev: false - /cssom@0.3.8: - resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - dev: true - - /cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - dev: true - - /cssstyle@2.3.0: - resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} - engines: {node: '>=8'} - dependencies: - cssom: 0.3.8 - dev: true - /cssstyle@3.0.0: resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} engines: {node: '>=14'} @@ -8102,14 +8067,14 @@ packages: resolution: {integrity: sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw==} dev: true - /cypress-image-snapshot@4.0.1(cypress@12.17.3)(jest@29.6.2): + /cypress-image-snapshot@4.0.1(cypress@12.17.4)(jest@29.6.2): resolution: {integrity: sha512-PBpnhX/XItlx3/DAk5ozsXQHUi72exybBNH5Mpqj1DVmjq+S5Jd9WE5CRa4q5q0zuMZb2V2VpXHth6MjFpgj9Q==} engines: {node: '>=8'} peerDependencies: cypress: ^4.5.0 dependencies: chalk: 2.4.2 - cypress: 12.17.3 + cypress: 12.17.4 fs-extra: 7.0.1 glob: 7.2.3 jest-image-snapshot: 4.2.0(jest@29.6.2) @@ -8119,8 +8084,8 @@ packages: - jest dev: true - /cypress@12.17.3: - resolution: {integrity: sha512-/R4+xdIDjUSLYkiQfwJd630S81KIgicmQOLXotFxVXkl+eTeVO+3bHXxdi5KBh/OgC33HWN33kHX+0tQR/ZWpg==} + /cypress@12.17.4: + resolution: {integrity: sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==} engines: {node: ^14.0.0 || ^16.0.0 || >=18.0.0} hasBin: true requiresBuild: true @@ -8160,6 +8125,7 @@ packages: minimist: 1.2.8 ospath: 1.2.2 pretty-bytes: 5.6.0 + process: 0.11.10 proxy-from-env: 1.0.0 request-progress: 3.0.0 semver: 7.5.4 @@ -8576,15 +8542,6 @@ packages: engines: {node: '>= 12'} dev: true - /data-urls@3.0.2: - resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} - engines: {node: '>=12'} - dependencies: - abab: 2.0.6 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - dev: true - /data-urls@4.0.0: resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} engines: {node: '>=14'} @@ -8601,6 +8558,10 @@ packages: '@babel/runtime': 7.22.10 dev: true + /dayjs@1.11.10: + resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} + dev: true + /dayjs@1.11.7: resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==} dev: false @@ -9265,18 +9226,6 @@ packages: source-map: 0.1.43 dev: true - /escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - dev: true - /eslint-config-prettier@8.10.0(eslint@8.47.0): resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true @@ -10416,18 +10365,6 @@ packages: define-properties: 1.2.0 dev: true - /globby@11.0.4: - resolution: {integrity: sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -11229,11 +11166,6 @@ packages: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true - /istanbul-lib-coverage@3.0.0: - resolution: {integrity: sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==} - engines: {node: '>=8'} - dev: true - /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -11869,48 +11801,6 @@ packages: engines: {node: '>=12.0.0'} dev: true - /jsdom@19.0.0: - resolution: {integrity: sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==} - engines: {node: '>=12'} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - abab: 2.0.6 - acorn: 8.10.0 - acorn-globals: 6.0.0 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 - decimal.js: 10.4.3 - domexception: 4.0.0 - escodegen: 2.1.0 - form-data: 4.0.0 - html-encoding-sniffer: 3.0.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.7 - parse5: 6.0.1 - saxes: 5.0.1 - symbol-tree: 3.2.4 - tough-cookie: 4.1.3 - w3c-hr-time: 1.0.2 - w3c-xmlserializer: 3.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 2.0.0 - whatwg-mimetype: 3.0.0 - whatwg-url: 10.0.0 - ws: 8.13.0 - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /jsdom@22.0.0: resolution: {integrity: sha512-p5ZTEb5h+O+iU02t0GfEjAnkdYPrQSkfuTSMkMYyIoMvUNEHsbG0bHHbfXIcfTqD2UfvjQX7mmgiFsyRwGscVw==} engines: {node: '>=16'} @@ -13615,10 +13505,6 @@ packages: lines-and-columns: 1.2.4 dev: true - /parse5@6.0.1: - resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - dev: true - /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: @@ -14026,7 +13912,6 @@ packages: /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - dev: false /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -14665,13 +14550,6 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /saxes@5.0.1: - resolution: {integrity: sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==} - engines: {node: '>=10'} - dependencies: - xmlchars: 2.2.0 - dev: true - /saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -14732,14 +14610,6 @@ packages: hasBin: true dev: true - /semver@7.3.8: - resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -15657,13 +15527,6 @@ packages: punycode: 2.3.0 dev: true - /tr46@3.0.0: - resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} - engines: {node: '>=12'} - dependencies: - punycode: 2.3.0 - dev: true - /tr46@4.1.1: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} @@ -16746,20 +16609,6 @@ packages: vue: 3.3.4 dev: false - /w3c-hr-time@1.0.2: - resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} - deprecated: Use your platform's native performance.now() and performance.timeOrigin. - dependencies: - browser-process-hrtime: 1.0.0 - dev: true - - /w3c-xmlserializer@3.0.0: - resolution: {integrity: sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==} - engines: {node: '>=12'} - dependencies: - xml-name-validator: 4.0.0 - dev: true - /w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -16810,16 +16659,16 @@ packages: resolution: {integrity: sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==} dev: false - /webdriver@7.30.0(typescript@5.1.6): - resolution: {integrity: sha512-bQE4oVgjjg5sb3VkCD+Eb8mscEvf3TioP0mnEZK0f5OJUNI045gMCJgpX8X4J8ScGyEhzlhn1KvlAn3yzxjxog==} + /webdriver@7.31.1(typescript@5.1.6): + resolution: {integrity: sha512-nCdJLxRnYvOMFqTEX7sqQtF/hV/Jgov0Y6ICeOm1DMTlZSRRDaUsBMlEAPkEwif9uBJYdM0znv8qzfX358AGqQ==} engines: {node: '>=12.0.0'} dependencies: '@types/node': 18.17.5 - '@wdio/config': 7.30.0(typescript@5.1.6) + '@wdio/config': 7.31.1(typescript@5.1.6) '@wdio/logger': 7.26.0 '@wdio/protocols': 7.27.0 - '@wdio/types': 7.26.0(typescript@5.1.6) - '@wdio/utils': 7.26.0(typescript@5.1.6) + '@wdio/types': 7.30.2(typescript@5.1.6) + '@wdio/utils': 7.30.2(typescript@5.1.6) got: 11.8.6 ky: 0.30.0 lodash.merge: 4.6.2 @@ -17023,22 +16872,6 @@ packages: engines: {node: '>=12'} dev: true - /whatwg-url@10.0.0: - resolution: {integrity: sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==} - engines: {node: '>=12'} - dependencies: - tr46: 3.0.0 - webidl-conversions: 7.0.0 - dev: true - - /whatwg-url@11.0.0: - resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} - engines: {node: '>=12'} - dependencies: - tr46: 3.0.0 - webidl-conversions: 7.0.0 - dev: true - /whatwg-url@12.0.1: resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} engines: {node: '>=14'} From a01be16d27ffd38e50a2c55f9dfef3f43c18e7da Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 23:38:21 +0530 Subject: [PATCH 313/316] Echo event --- .github/workflows/e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c23dc88baf..a4087cd196 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -30,7 +30,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: 18.x - + - run: | + echo '${{ toJson(github.event) }}' - name: Cache snapshots id: cache-snapshot uses: actions/cache@v4 From 42ad1f4fe458c8ac79daf1c98bb5b9ae7760316f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 23:49:52 +0530 Subject: [PATCH 314/316] RefTest --- .github/workflows/e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a4087cd196..3b3b849bc8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,7 +18,7 @@ permissions: env: # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. - targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }} + targetHash: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || (github.event.before == '0000000000000000000000000000000000000000' && 'develop' || github.event.before) }} jobs: cache: @@ -31,6 +31,7 @@ jobs: with: node-version: 18.x - run: | + echo '${{ env.targetHash }}' echo '${{ toJson(github.event) }}' - name: Cache snapshots id: cache-snapshot From de03a017db5895679e2a781781ce58592524b7bf Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 23:51:48 +0530 Subject: [PATCH 315/316] Remove echo --- .github/workflows/e2e.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3b3b849bc8..b8232b8c0e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -30,9 +30,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: 18.x - - run: | - echo '${{ env.targetHash }}' - echo '${{ toJson(github.event) }}' - name: Cache snapshots id: cache-snapshot uses: actions/cache@v4 From ec79ac200c7714276a374988741dc58375c47f04 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 23 Jan 2024 23:53:48 +0530 Subject: [PATCH 316/316] Lint --- packages/mermaid/src/docs/syntax/flowchart.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index 95cc962c7d..540f820f77 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -775,12 +775,13 @@ flowchart TD B-->E(A fa:fa-camera-retro perhaps?) ``` -Mermaid supports Font Awesome if the CSS is included on the website. -Mermaid does not have any restriction on the version of Font Awesome that can be used. +Mermaid supports Font Awesome if the CSS is included on the website. +Mermaid does not have any restriction on the version of Font Awesome that can be used. Please refer the [Official Font Awesome Documentation](https://fontawesome.com/start) on how to include it in your website. Adding this snippet in the `` would add support for Font Awesome v6.5.1 + ```html