mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 18:39:41 +02:00
MC-1278 Removing tagging of footer participants
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mermaid-chart/mermaid",
|
"name": "@mermaid-chart/mermaid",
|
||||||
"version": "10.8.0-b.4",
|
"version": "10.8.0-b.6",
|
||||||
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "./dist/mermaid.core.mjs",
|
"module": "./dist/mermaid.core.mjs",
|
||||||
@@ -49,14 +49,8 @@
|
|||||||
"author": "Knut Sveidqvist",
|
"author": "Knut Sveidqvist",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": [
|
"ignore": ["**/parser/*.js", "dist/**/*.js", "cypress/**/*.js"],
|
||||||
"**/parser/*.js",
|
"globals": ["page"]
|
||||||
"dist/**/*.js",
|
|
||||||
"cypress/**/*.js"
|
|
||||||
],
|
|
||||||
"globals": [
|
|
||||||
"page"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braintree/sanitize-url": "^6.0.1",
|
"@braintree/sanitize-url": "^6.0.1",
|
||||||
@@ -124,9 +118,6 @@
|
|||||||
"vitepress": "^1.0.0-rc.40",
|
"vitepress": "^1.0.0-rc.40",
|
||||||
"vitepress-plugin-search": "^1.0.4-alpha.22"
|
"vitepress-plugin-search": "^1.0.4-alpha.22"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["dist/", "README.md"],
|
||||||
"dist/",
|
|
||||||
"README.md"
|
|
||||||
],
|
|
||||||
"sideEffects": false
|
"sideEffects": false
|
||||||
}
|
}
|
||||||
|
@@ -347,8 +347,10 @@ const drawActorTypeParticipant = function (elem, actor, conf, isFooter) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g.attr('data-et', 'participant');
|
if (!isFooter) {
|
||||||
g.attr('data-id', actor.name);
|
g.attr('data-et', 'participant');
|
||||||
|
g.attr('data-id', actor.name);
|
||||||
|
}
|
||||||
|
|
||||||
_drawTextCandidateFunc(conf)(
|
_drawTextCandidateFunc(conf)(
|
||||||
actor.description,
|
actor.description,
|
||||||
@@ -405,7 +407,9 @@ const drawActorTypeActor = function (elem, actor, conf, isFooter) {
|
|||||||
}
|
}
|
||||||
actElem.attr('class', cssClass);
|
actElem.attr('class', cssClass);
|
||||||
|
|
||||||
actElem.attr('data-et', 'participant').attr('data-id', actor.name);
|
if (isFooter) {
|
||||||
|
actElem.attr('data-et', 'participant').attr('data-id', actor.name);
|
||||||
|
}
|
||||||
|
|
||||||
const rect = svgDrawCommon.getNoteRect();
|
const rect = svgDrawCommon.getNoteRect();
|
||||||
rect.x = actor.x;
|
rect.x = actor.x;
|
||||||
|
@@ -16,6 +16,7 @@ import { isDetailedError } from './utils.js';
|
|||||||
import type { DetailedError } from './utils.js';
|
import type { DetailedError } from './utils.js';
|
||||||
import type { ExternalDiagramDefinition } from './diagram-api/types.js';
|
import type { ExternalDiagramDefinition } from './diagram-api/types.js';
|
||||||
import type { UnknownDiagramError } from './errors.js';
|
import type { UnknownDiagramError } from './errors.js';
|
||||||
|
// import { defaultConfig } from './config';
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
MermaidConfig,
|
MermaidConfig,
|
||||||
@@ -309,6 +310,10 @@ const executeQueue = async () => {
|
|||||||
executionQueueRunning = false;
|
executionQueueRunning = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
interface ConfigTuple {
|
||||||
|
defaultConfig: MermaidConfig;
|
||||||
|
config: MermaidConfig;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Parse the text and validate the syntax.
|
* Parse the text and validate the syntax.
|
||||||
* @param text - The mermaid diagram definition.
|
* @param text - The mermaid diagram definition.
|
||||||
@@ -319,7 +324,7 @@ const executeQueue = async () => {
|
|||||||
const parse = async (
|
const parse = async (
|
||||||
text: string,
|
text: string,
|
||||||
parseOptions?: ParseOptions
|
parseOptions?: ParseOptions
|
||||||
): Promise<boolean | void | Diagram> => {
|
): Promise<boolean | void | (Diagram & ConfigTuple)> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// This promise will resolve when the render call is done.
|
// This promise will resolve when the render call is done.
|
||||||
// It will be queued first and will be executed when it is first in line
|
// It will be queued first and will be executed when it is first in line
|
||||||
@@ -327,10 +332,13 @@ const parse = async (
|
|||||||
new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
mermaidAPI.parse(text, parseOptions).then(
|
mermaidAPI.parse(text, parseOptions).then(
|
||||||
(r) => {
|
(r) => {
|
||||||
|
const result = r as Diagram & ConfigTuple;
|
||||||
|
result.defaultConfig = mermaidAPI.defaultConfig;
|
||||||
|
result.config = mermaidAPI.getConfig();
|
||||||
// This resolves for the promise for the queue handling
|
// This resolves for the promise for the queue handling
|
||||||
res(r);
|
res(result);
|
||||||
// This fulfills the promise sent to the value back to the original caller
|
// This fulfills the promise sent to the value back to the original caller
|
||||||
resolve(r);
|
resolve(result);
|
||||||
},
|
},
|
||||||
(e) => {
|
(e) => {
|
||||||
log.error('Error parsing', e);
|
log.error('Error parsing', e);
|
||||||
|
Reference in New Issue
Block a user