package.dist.chunks.mermaid.core.classDiagram-v2-SPY6V32O.mjs.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
{
"version": 3,
"sources": ["../../../src/diagrams/class/classRenderer-v2.ts", "../../../src/dagre-wrapper/index.js", "../../../src/dagre-wrapper/mermaid-graphlib.js", "../../../src/dagre-wrapper/clusters.js", "../../../src/diagrams/class/classDiagram-v2.ts"],
"sourcesContent": ["// @ts-nocheck - don't check until handle it\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils, { getEdgeId } from '../../utils.js';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport common from '../common/common.js';\nimport type { ClassRelation, ClassNote, ClassMap, NamespaceMap } from './classTypes.js';\nimport type { EdgeData } from '../../types.js';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\ninterface RectParameters {\n id: string;\n shape: 'rect';\n labelStyle: string;\n domId: string;\n labelText: string;\n padding: number | undefined;\n style?: string;\n}\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param namespaces - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addNamespaces = function (\n namespaces: NamespaceMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n log.info('keys:', [...namespaces.keys()]);\n log.info(namespaces);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n namespaces.forEach(function (vertex) {\n // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]\n const shape = 'rect';\n\n const node: RectParameters = {\n shape: shape,\n id: vertex.id,\n domId: vertex.domId,\n labelText: sanitizeText(vertex.id),\n labelStyle: '',\n style: 'fill: none; stroke: black',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n\n g.setNode(vertex.id, node);\n addClasses(vertex.classes, g, _id, diagObj, vertex.id);\n\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n * @param parent - id of the parent namespace, if it exists\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any,\n parent?: string\n) {\n log.info('keys:', [...classes.keys()]);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n [...classes.values()]\n .filter((vertex) => vertex.parent === parent)\n .forEach(function (vertex) {\n /**\n * Variable for storing the classes for the vertex\n */\n const cssClassStr = vertex.cssClasses.join(' ');\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id, parent) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n\n if (parent) {\n g.setParent(vertex.id, parent);\n }\n\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n notes.forEach(function (note, i) {\n const vertex = note;\n\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !classes.has(vertex.class)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none',\n style: 'fill:none',\n labelStyle: '',\n curve: interpolateToCurve(conf.curve, curveLinear),\n };\n\n // Add the edge to the graph\n g.setEdge(vertex.id, vertex.class, edgeData, edgeId);\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param relations -\n * @param g - The graph object\n */\nexport const addRelations = function (relations: ClassRelation[], g: graphlib.Graph) {\n const conf = getConfig().flowchart;\n let cnt = 0;\n\n relations.forEach(function (edge) {\n cnt++;\n const edgeData: EdgeData = {\n //Set relationship style and line type\n classes: 'relation',\n pattern: edge.relation.lineType == 1 ? 'dashed' : 'solid',\n id: getEdgeId(edge.id1, edge.id2, {\n prefix: 'id',\n counter: cnt,\n }),\n // Set link type for rendering\n arrowhead: edge.type === 'arrow_open' ? 'none' : 'normal',\n //Set edge extra labels\n startLabelRight: edge.relationTitle1 === 'none' ? '' : edge.relationTitle1,\n endLabelLeft: edge.relationTitle2 === 'none' ? '' : edge.relationTitle2,\n //Set relation arrow types\n arrowTypeStart: getArrowMarker(edge.relation.type1),\n arrowTypeEnd: getArrowMarker(edge.relation.type2),\n style: 'fill:none',\n labelStyle: '',\n curve: interpolateToCurve(conf?.curve, curveLinear),\n };\n\n log.info(edgeData, edge);\n\n if (edge.style !== undefined) {\n const styles = getStylesFromArray(edge.style);\n edgeData.style = styles.style;\n edgeData.labelStyle = styles.labelStyle;\n }\n\n edge.text = edge.title;\n if (edge.text === undefined) {\n if (edge.style !== undefined) {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n if (getConfig().flowchart?.htmlLabels ?? getConfig().htmlLabels) {\n edgeData.labelType = 'html';\n edgeData.label = '' + edge.text + '';\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (edge.style === undefined) {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n // Add the edge to the graph\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n};\n\n/**\n * Merges the value of `conf` with the passed `cnf`\n *\n * @param cnf - Config to merge\n */\nexport const setConf = function (cnf: any) {\n conf = {\n ...conf,\n ...cnf,\n };\n};\n\n/**\n * Draws a class diagram in the tag with id: id based on the definition in text.\n *\n * @param text -\n * @param id -\n * @param _version -\n * @param diagObj -\n */\nexport const draw = async function (text: string, id: string, _version: string, diagObj: any) {\n log.info('Drawing class - ', id);\n\n // TODO V10: Why flowchart? Might be a mistake when copying.\n const conf = getConfig().flowchart ?? getConfig().class;\n const securityLevel = getConfig().securityLevel;\n log.info('config:', conf);\n const nodeSpacing = conf?.nodeSpacing ?? 50;\n const rankSpacing = conf?.rankSpacing ?? 50;\n\n // Create the input mermaid.graph\n const g: graphlib.Graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: diagObj.db.getDirection(),\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const namespaces: NamespaceMap = diagObj.db.getNamespaces();\n const classes: ClassMap = diagObj.db.getClasses();\n const relations: ClassRelation[] = diagObj.db.getRelations();\n const notes: ClassNote[] = diagObj.db.getNotes();\n log.info(relations);\n addNamespaces(namespaces, g, id, diagObj);\n addClasses(classes, g, id, diagObj);\n addRelations(relations, g);\n addNotes(notes, g, relations.length + 1, classes);\n\n // Set up an SVG group so that we can translate the final graph.\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0]!.contentDocument.body)\n : select('body');\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n await render(\n element,\n g,\n ['aggregation', 'extension', 'composition', 'dependency', 'lollipop'],\n 'classDiagram',\n id\n );\n\n utils.insertTitle(svg, 'classTitleText', conf?.titleTopMargin ?? 5, diagObj.db.getDiagramTitle());\n\n setupGraphViewbox(g, svg, conf?.diagramPadding, conf?.useMaxWidth);\n\n // Add label rects for non html labels\n if (!conf?.htmlLabels) {\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0]!.contentDocument : document;\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (const label of labels) {\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n};\n\n/**\n * Gets the arrow marker for a type index\n *\n * @param type - The type to look for\n * @returns The arrow marker\n */\nfunction getArrowMarker(type: number) {\n let marker;\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n case 1:\n marker = 'extension';\n break;\n case 2:\n marker = 'composition';\n break;\n case 3:\n marker = 'dependency';\n break;\n case 4:\n marker = 'lollipop';\n break;\n default:\n marker = 'none';\n }\n return marker;\n}\n\nexport default {\n setConf,\n draw,\n};\n", "import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport insertMarkers from './markers.js';\nimport { updateNodeBounds } from './shapes/util.js';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib.js';\nimport { insertNode, positionNode, clear as clearNodes, setNodeElem } from './nodes.js';\nimport { insertCluster, clear as clearClusters } from './clusters.js';\nimport { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges.js';\nimport { log } from '../logger.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\n\nconst recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.trace('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n await Promise.all(\n graph.nodes().map(async function (v) {\n const node = graph.node(v);\n if (parentCluster !== undefined) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified', v, node.width, graph.node(v));\n // `node.graph.setGraph` applies the graph configurations such as nodeSpacing to subgraphs as without this the default values would be used\n // We override only the `ranksep` and `nodesep` configurations to allow for setting subgraph spacing while avoiding overriding other properties\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep,\n nodesep,\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info('Node bounds (abc123)', v, node, node.width, node.x, node.y);\n setNodeElem(newEl, node);\n\n log.warn('Recursive render complete ', newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n log.info(findNonClusterChild(node.id, graph));\n clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };\n // insertCluster(clusters, graph.node(v));\n } else {\n log.info('Node - the non recursive path', v, node.id, node);\n await insertNode(nodes, graph.node(v), dir);\n }\n }\n })\n );\n\n // Insert labels, this will insert them into the dom so that the width can be calculated\n // Also figure out which edges point to/from clusters and adjust them accordingly\n // Edges from/to clusters really points to the first child in the cluster.\n // TODO: pick optimal child in the cluster to us as link anchor\n graph.edges().forEach(async function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info('Fix', clusterDb, 'ids:', e.v, e.w, 'Translating: ', clusterDb[e.v], clusterDb[e.w]);\n await insertEdgeLabel(edgeLabels, edge);\n });\n\n graph.edges().forEach(function (e) {\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n });\n log.info('Graph before layout:', JSON.stringify(graphlibJson.write(graph)));\n log.info('#############################################');\n log.info('### Layout ###');\n log.info('#############################################');\n log.info(graph);\n dagreLayout(graph);\n log.info('Graph after layout:', JSON.stringify(graphlibJson.write(graph)));\n // Move the nodes to the correct place\n let diff = 0;\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n sortNodesByHierarchy(graph).forEach(function (v) {\n const node = graph.node(v);\n log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n log.info(\n 'Position ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node?.clusterNode) {\n // clusterDb[node.id].node = node;\n node.y += subGraphTitleTotalMargin;\n positionNode(node);\n } else {\n // Non cluster node\n if (graph.children(v).length > 0) {\n // A cluster in the non-recursive way\n // positionCluster(node);\n node.height += subGraphTitleTotalMargin;\n insertCluster(clusters, node);\n clusterDb[node.id].node = node;\n } else {\n node.y += subGraphTitleTotalMargin / 2;\n positionNode(node);\n }\n }\n });\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n edge.points.forEach((point) => (point.y += subGraphTitleTotalMargin / 2));\n const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramType, graph, id);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.type === 'group') {\n diff = n.diff;\n }\n });\n return { elem, diff };\n};\n\nexport const render = async (elem, graph, markers, diagramType, id) => {\n insertMarkers(elem, markers, diagramType, id);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n log.warn('Graph at first:', JSON.stringify(graphlibJson.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', JSON.stringify(graphlibJson.write(graph)));\n // log.warn('Graph ever after:', graphlibJson.write(graph.node('A').graph));\n const siteConfig = getConfig();\n await recursiveRender(elem, graph, diagramType, id, undefined, siteConfig);\n};\n\n// const shapeDefinitions = {};\n// export const addShape = ({ shapeType: fun }) => {\n// shapeDefinitions[shapeType] = fun;\n// };\n\n// const arrowDefinitions = {};\n// export const addArrow = ({ arrowType: fun }) => {\n// arrowDefinitions[arrowType] = fun;\n// };\n", "/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '../logger.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\n\nexport let clusterDb = {};\nlet descendants = {};\nlet parents = {};\n\nexport const clear = () => {\n descendants = {};\n parents = {};\n clusterDb = {};\n};\n\nconst isDescendant = (id, ancestorId) => {\n // if (id === ancestorId) return true;\n\n log.trace('In isDescendant', ancestorId, ' ', id, ' = ', descendants[ancestorId].includes(id));\n if (descendants[ancestorId].includes(id)) {\n return true;\n }\n\n return false;\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n log.info('Descendants of ', clusterId, ' is ', descendants[clusterId]);\n log.info('Edge is ', edge);\n // Edges to/from the cluster is not in the cluster, they are in the parent\n if (edge.v === clusterId) {\n return false;\n }\n if (edge.w === clusterId) {\n return false;\n }\n\n if (!descendants[clusterId]) {\n log.debug('Tilt, ', clusterId, ',not in descendants');\n return false;\n }\n return (\n descendants[clusterId].includes(edge.v) ||\n isDescendant(edge.v, clusterId) ||\n isDescendant(edge.w, clusterId) ||\n descendants[clusterId].includes(edge.w)\n );\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n // Include cluster node if it is not the root\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n // Do not copy edges in and out of the root cluster, they belong to the parent graph\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\nexport const extractDescendants = (id, graph) => {\n // log.debug('Extracting ', id);\n const children = graph.children(id);\n let res = [...children];\n\n for (const child of children) {\n parents[child] = id;\n res = [...res, ...extractDescendants(child, graph)];\n }\n\n return res;\n};\n\n/**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n *\n * @param graph\n */\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (const edge of edges) {\n if (graph.children(edge.v).length > 0) {\n log.trace('The node ', edge.v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edge.w).length > 0) {\n log.trace('The node ', edge.w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\n/**\n * Finds a child that is not a cluster. When faking an edge between a node and a cluster.\n *\n * @param id\n * @param {any} graph\n */\nexport const findNonClusterChild = (id, graph) => {\n // const node = graph.node(id);\n log.trace('Searching', id);\n // const children = graph.children(id).reverse();\n const children = graph.children(id); //.reverse();\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n log.trace('This is a valid node', id);\n return id;\n }\n for (const child of children) {\n const _id = findNonClusterChild(child, graph);\n if (_id) {\n log.trace('Found replacement for', id, ' => ', _id);\n return _id;\n }\n }\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb[id]) {\n return id;\n }\n // If the cluster has no external connections\n if (!clusterDb[id].externalConnections) {\n return id;\n }\n\n // Return the replacement node\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n // Go through the nodes and for each cluster found, save a replacement node, this can be used when\n // faking a link to a cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph)\n );\n descendants[id] = extractDescendants(id, graph);\n clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };\n }\n });\n\n // Check incoming and outgoing edges for each cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, descendants);\n edges.forEach((edge) => {\n // log.debug('Edge, descendants: ', edge, descendants[id]);\n\n // Check if any edge leaves the cluster (not the actual cluster, that's a link from the box)\n if (edge.v !== id && edge.w !== id) {\n // Any edge where either the one of the nodes is descending to the cluster but not the other\n // if (descendants[id].indexOf(edge.v) < 0 && descendants[id].indexOf(edge.w) < 0) {\n\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n\n // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Descendants of XXX ', id, ': ', descendants[id]);\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n log.debug('Not a cluster ', id, descendants);\n }\n });\n\n for (let id of Object.keys(clusterDb)) {\n const nonClusterChild = clusterDb[id].id;\n const parent = graph.parent(nonClusterChild);\n\n // Change replacement node of id to parent of current replacement node if valid\n if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) {\n clusterDb[id].id = parent;\n }\n }\n\n // For clusters with incoming and/or outgoing edges translate those edges to a real node\n // in the cluster in order to fake the edge\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n // Check if link is either from or to a cluster\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb[e.v],\n ' --- ',\n clusterDb[e.w]\n );\n if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {\n // cspell:ignore trixing\n log.warn('Fixing and trixing link to self - removing XXX', e.v, e.w, e.name);\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId = e.w + '---' + e.v;\n graph.setNode(specialId, {\n domId: specialId,\n id: specialId,\n labelStyle: '',\n labelText: edge.label,\n padding: 0,\n shape: 'labelRect',\n style: '',\n });\n const edge1 = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge2.label = '';\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n\n graph.setEdge(v, specialId, edge1, e.name + '-cyclic-special');\n graph.setEdge(specialId, w, edge2, e.name + '-cyclic-special');\n } else if (clusterDb[e.v] || clusterDb[e.w]) {\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb[parent].externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb[parent].externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlibJson.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach(edge => {\n // if (isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n // For clusters without incoming and/or outgoing edges, create a new cluster-node\n // containing the nodes and edges in the custer in a new graph\n // for (let i = 0;)\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n // const clusters = Object.keys(clusterDb);\n // clusters.forEach(clusterId => {\n log.debug('Nodes = ', nodes, depth);\n for (const node of nodes) {\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb[node] && !clusterDb[node].externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n // Note that the node might have been removed after the Object.keys call so better check\n // that it still is in the game\n if (!clusterDb[node]) {\n // Skip if the node is not a cluster\n log.debug('Not a cluster', node, depth);\n // break;\n } else if (\n !clusterDb[node].externalConnections &&\n // !graph.parent(node) &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb[node]?.clusterData?.dir) {\n dir = clusterDb[node].clusterData.dir;\n log.warn('Fixing dir', clusterDb[node].clusterData.dir, dir);\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir, // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb[node].clusterData,\n labelText: clusterDb[node].labelText,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));\n log.debug('Old graph after copy', graphlibJson.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb[node].externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign(nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n", "import intersectRect from './intersect/intersect-rect.js';\nimport { log } from '../logger.js';\nimport createLabel from './createLabel.js';\nimport { createText } from '../rendering-util/createText.js';\nimport { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\n\nconst rect = (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n // const text = label\n // .node()\n // .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n const text =\n node.labelType === 'markdown'\n ? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }, siteConfig)\n : label.node().appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n if (node.width <= bbox.width + padding) {\n node.diff = (bbox.width - node.width) / 2 - node.padding / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - width / 2)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width)\n .attr('height', node.height + padding);\n\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n if (useHtmlLabels) {\n label.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n } else {\n label.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n const siteConfig = getConfig();\n\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n // Center the label\n label.attr(\n 'transform',\n `translate(${node.x - bbox.width / 2}, ${\n node.y -\n node.height / 2 -\n node.padding / 3 +\n (evaluate(siteConfig.flowchart.htmlLabels) ? 5 : 3) +\n subGraphTitleTopMargin\n })`\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.diff = -node.padding / 2;\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = (node) => {\n log.info('Position cluster (' + node.id + ', ' + node.x + ', ' + node.y + ')');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/classDiagram.jison';\nimport db from './classDb.js';\nimport styles from './styles.js';\nimport renderer from './classRenderer-v2.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,UAAAA,SAAQ,mBAAmB;AACpC,YAAYC,eAAc;;;ACF1B,SAAS,UAAU,mBAAmB;AACtC,YAAYC,mBAAkB;;;ACC9B,YAAY,kBAAkB;AAC9B,YAAY,cAAc;AAEnB,IAAI,YAAY,CAAC;AACxB,IAAI,cAAc,CAAC;AACnB,IAAI,UAAU,CAAC;AAER,IAAMC,SAAQ,6BAAM;AACzB,gBAAc,CAAC;AACf,YAAU,CAAC;AACX,cAAY,CAAC;AACf,GAJqB;AAMrB,IAAM,eAAe,wBAAC,IAAI,eAAe;AAGvC,MAAI,MAAM,mBAAmB,YAAY,KAAK,IAAI,OAAO,YAAY,UAAU,EAAE,SAAS,EAAE,CAAC;AAC7F,MAAI,YAAY,UAAU,EAAE,SAAS,EAAE,GAAG;AACxC,WAAO;AAAA,EACT;AAEA,SAAO;AACT,GATqB;AAWrB,IAAM,gBAAgB,wBAAC,MAAM,cAAc;AACzC,MAAI,KAAK,mBAAmB,WAAW,QAAQ,YAAY,SAAS,CAAC;AACrE,MAAI,KAAK,YAAY,IAAI;AAEzB,MAAI,KAAK,MAAM,WAAW;AACxB,WAAO;AAAA,EACT;AACA,MAAI,KAAK,MAAM,WAAW;AACxB,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,YAAY,SAAS,GAAG;AAC3B,QAAI,MAAM,UAAU,WAAW,qBAAqB;AACpD,WAAO;AAAA,EACT;AACA,SACE,YAAY,SAAS,EAAE,SAAS,KAAK,CAAC,KACtC,aAAa,KAAK,GAAG,SAAS,KAC9B,aAAa,KAAK,GAAG,SAAS,KAC9B,YAAY,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AAK,aAAa,UAAU,IAAI,MAAM;AAEtC,YAAM,aAAaA,OAAM,MAAM,UAAU;AAAA,IAC3C;AAAA,EACF;AACF,GA/EoB;AAuFpB,SAAS,eAAe,MAAc;AACpC,MAAI;AACJ,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,eAAS;AACT;AAAA,IACF,KAAK;AACH,eAAS;AACT;AAAA,IACF,KAAK;AACH,eAAS;AACT;AAAA,IACF,KAAK;AACH,eAAS;AACT;AAAA,IACF,KAAK;AACH,eAAS;AACT;AAAA,IACF;AACE,eAAS;AAAA,EACb;AACA,SAAO;AACT;AAtBS;AAwBT,IAAO,2BAAQ;AAAA,EACb;AAAA,EACA;AACF;;;AIxZO,IAAM,UAA6B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM,wBAAC,QAAQ;AACb,QAAI,CAAC,IAAI,OAAO;AACd,UAAI,QAAQ,CAAC;AAAA,IACf;AACA,QAAI,MAAM,sBAAsB,IAAI;AACpC,oBAAG,MAAM;AAAA,EACX,GANM;AAOR;",
"names": ["select", "graphlib", "graphlibJson", "clear", "data", "rect", "clear", "clear", "conf", "select", "rect"]
}