All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.chunks.mermaid.esm.min.stateDiagram-S3XGF733.mjs.map Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

There is a newer version: 11.4.0
Show newest version
{
  "version": 3,
  "sources": ["../../../src/diagrams/state/id-cache.js", "../../../src/diagrams/state/shapes.js", "../../../src/diagrams/state/stateRenderer.js", "../../../src/diagrams/state/stateDiagram.ts"],
  "sourcesContent": ["const idCache = {};\n\nexport const set = (key, val) => {\n  idCache[key] = val;\n};\n\nexport const get = (k) => idCache[k];\nexport const keys = () => Object.keys(idCache);\nexport const size = () => keys().length;\n\nexport default {\n  get,\n  set,\n  keys,\n  size,\n};\n", "import { line, curveBasis } from 'd3';\nimport idCache from './id-cache.js';\nimport stateDb from './stateDb.js';\nimport utils from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawStartState = (g) =>\n  g\n    .append('circle')\n    // .style('stroke', 'black')\n    // .style('fill', 'black')\n    .attr('class', 'start-state')\n    .attr('r', getConfig().state.sizeUnit)\n    .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit)\n    .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit);\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawDivider = (g) =>\n  g\n    .append('line')\n    .style('stroke', 'grey')\n    .style('stroke-dasharray', '3')\n    .attr('x1', getConfig().state.textHeight)\n    .attr('class', 'divider')\n    .attr('x2', getConfig().state.textHeight * 2)\n    .attr('y1', 0)\n    .attr('y2', 0);\n\n/**\n * Draws a an end state as a black circle\n *\n * @param {any} g\n * @param {any} stateDef\n */\nexport const drawSimpleState = (g, stateDef) => {\n  const state = g\n    .append('text')\n    .attr('x', 2 * getConfig().state.padding)\n    .attr('y', getConfig().state.textHeight + 2 * getConfig().state.padding)\n    .attr('font-size', getConfig().state.fontSize)\n    .attr('class', 'state-title')\n    .text(stateDef.id);\n\n  const classBox = state.node().getBBox();\n  g.insert('rect', ':first-child')\n    .attr('x', getConfig().state.padding)\n    .attr('y', getConfig().state.padding)\n    .attr('width', classBox.width + 2 * getConfig().state.padding)\n    .attr('height', classBox.height + 2 * getConfig().state.padding)\n    .attr('rx', getConfig().state.radius);\n\n  return state;\n};\n\n/**\n * Draws a state with descriptions\n *\n * @param {any} g The d3 svg object to add the state to\n * @param {any} stateDef\n * @returns {any} The d3 svg state\n */\nexport const drawDescrState = (g, stateDef) => {\n  const addTspan = function (textEl, txt, isFirst) {\n    const tSpan = textEl\n      .append('tspan')\n      .attr('x', 2 * getConfig().state.padding)\n      .text(txt);\n    if (!isFirst) {\n      tSpan.attr('dy', getConfig().state.textHeight);\n    }\n  };\n  const title = g\n    .append('text')\n    .attr('x', 2 * getConfig().state.padding)\n    .attr('y', getConfig().state.textHeight + 1.3 * getConfig().state.padding)\n    .attr('font-size', getConfig().state.fontSize)\n    .attr('class', 'state-title')\n    .text(stateDef.descriptions[0]);\n\n  const titleBox = title.node().getBBox();\n  const titleHeight = titleBox.height;\n\n  const description = g\n    .append('text') // text label for the x axis\n    .attr('x', getConfig().state.padding)\n    .attr(\n      'y',\n      titleHeight +\n        getConfig().state.padding * 0.4 +\n        getConfig().state.dividerMargin +\n        getConfig().state.textHeight\n    )\n    .attr('class', 'state-description');\n\n  let isFirst = true;\n  let isSecond = true;\n  stateDef.descriptions.forEach(function (descr) {\n    if (!isFirst) {\n      addTspan(description, descr, isSecond);\n      isSecond = false;\n    }\n    isFirst = false;\n  });\n\n  const descrLine = g\n    .append('line') // text label for the x axis\n    .attr('x1', getConfig().state.padding)\n    .attr('y1', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n    .attr('y2', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n    .attr('class', 'descr-divider');\n  const descrBox = description.node().getBBox();\n  const width = Math.max(descrBox.width, titleBox.width);\n\n  descrLine.attr('x2', width + 3 * getConfig().state.padding);\n  // const classBox = title.node().getBBox();\n\n  g.insert('rect', ':first-child')\n    .attr('x', getConfig().state.padding)\n    .attr('y', getConfig().state.padding)\n    .attr('width', width + 2 * getConfig().state.padding)\n    .attr('height', descrBox.height + titleHeight + 2 * getConfig().state.padding)\n    .attr('rx', getConfig().state.radius);\n\n  return g;\n};\n\n/** Adds the creates a box around the existing content and adds a panel for the id on top of the content. */\n/**\n * Function that creates an title row and a frame around a substate for a composite state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n *\n * @param {any} g The d3 svg object for the substate to framed\n * @param {any} stateDef The info about the\n * @param {any} altBkg\n */\nexport const addTitleAndBox = (g, stateDef, altBkg) => {\n  const pad = getConfig().state.padding;\n  const dblPad = 2 * getConfig().state.padding;\n  const orgBox = g.node().getBBox();\n  const orgWidth = orgBox.width;\n  const orgX = orgBox.x;\n\n  const title = g\n    .append('text')\n    .attr('x', 0)\n    .attr('y', getConfig().state.titleShift)\n    .attr('font-size', getConfig().state.fontSize)\n    .attr('class', 'state-title')\n    .text(stateDef.id);\n\n  const titleBox = title.node().getBBox();\n  const titleWidth = titleBox.width + dblPad;\n  let width = Math.max(titleWidth, orgWidth); // + dblPad;\n  if (width === orgWidth) {\n    width = width + dblPad;\n  }\n  let startX;\n  // const lineY = 1 - getConfig().state.textHeight;\n  // const descrLine = g\n  //   .append('line') // text label for the x axis\n  //   .attr('x1', 0)\n  //   .attr('y1', lineY)\n  //   .attr('y2', lineY)\n  //   .attr('class', 'descr-divider');\n\n  const graphBox = g.node().getBBox();\n  // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n  if (stateDef.doc) {\n    // console.warn(\n    //   stateDef.id,\n    //   'orgX: ',\n    //   orgX,\n    //   'width: ',\n    //   width,\n    //   'titleWidth: ',\n    //   titleWidth,\n    //   'orgWidth: ',\n    //   orgWidth,\n    //   'width',\n    //   width\n    // );\n  }\n\n  startX = orgX - pad;\n  if (titleWidth > orgWidth) {\n    startX = (orgWidth - width) / 2 + pad;\n  }\n  if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n    startX = orgX - (titleWidth - orgWidth) / 2;\n  }\n\n  const lineY = 1 - getConfig().state.textHeight;\n  // White color\n  g.insert('rect', ':first-child')\n    .attr('x', startX)\n    .attr('y', lineY)\n    .attr('class', altBkg ? 'alt-composit' : 'composit') // cspell:disable-line\n    .attr('width', width)\n    .attr(\n      'height',\n      graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n    )\n    .attr('rx', '0');\n\n  title.attr('x', startX + pad);\n  if (titleWidth <= orgWidth) {\n    title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n  }\n\n  // Title background\n  g.insert('rect', ':first-child')\n    .attr('x', startX)\n    .attr(\n      'y',\n      getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n    )\n    .attr('width', width)\n    // Just needs to be higher then the descr line, will be clipped by the white color box\n    .attr('height', getConfig().state.textHeight * 3)\n    .attr('rx', getConfig().state.radius);\n\n  // Full background\n  g.insert('rect', ':first-child')\n    .attr('x', startX)\n    .attr(\n      'y',\n      getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n    )\n    .attr('width', width)\n    .attr('height', graphBox.height + 3 + 2 * getConfig().state.textHeight)\n    .attr('rx', getConfig().state.radius);\n\n  return g;\n};\n\nconst drawEndState = (g) => {\n  g.append('circle')\n    // .style('stroke', 'black')\n    // .style('fill', 'white')\n    .attr('class', 'end-state-outer')\n    .attr('r', getConfig().state.sizeUnit + getConfig().state.miniPadding)\n    .attr(\n      'cx',\n      getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n    )\n    .attr(\n      'cy',\n      getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n    );\n\n  return (\n    g\n      .append('circle')\n      // .style('stroke', 'black')\n      // .style('fill', 'black')\n      .attr('class', 'end-state-inner')\n      .attr('r', getConfig().state.sizeUnit)\n      .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n      .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n  );\n};\nconst drawForkJoinState = (g, stateDef) => {\n  let width = getConfig().state.forkWidth;\n  let height = getConfig().state.forkHeight;\n\n  if (stateDef.parentId) {\n    let tmp = width;\n    width = height;\n    height = tmp;\n  }\n  return g\n    .append('rect')\n    .style('stroke', 'black')\n    .style('fill', 'black')\n    .attr('width', width)\n    .attr('height', height)\n    .attr('x', getConfig().state.padding)\n    .attr('y', getConfig().state.padding);\n};\n\nexport const drawText = function (elem, textData) {\n  // Remove and ignore br:s\n  const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n  const textElem = elem.append('text');\n  textElem.attr('x', textData.x);\n  textElem.attr('y', textData.y);\n  textElem.style('text-anchor', textData.anchor);\n  textElem.attr('fill', textData.fill);\n  if (textData.class !== undefined) {\n    textElem.attr('class', textData.class);\n  }\n\n  const span = textElem.append('tspan');\n  span.attr('x', textData.x + textData.textMargin * 2);\n  span.attr('fill', textData.fill);\n  span.text(nText);\n\n  return textElem;\n};\n\nconst _drawLongText = (_text, x, y, g) => {\n  let textHeight = 0;\n\n  const textElem = g.append('text');\n  textElem.style('text-anchor', 'start');\n  textElem.attr('class', 'noteText');\n\n  let text = _text.replace(/\\r\\n/g, '
');\n text = text.replace(/\\n/g, '
');\n const lines = text.split(common.lineBreakRegex);\n\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line of lines) {\n const txt = line.trim();\n\n if (txt.length > 0) {\n const span = textElem.append('tspan');\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr('x', x + getConfig().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n};\n\n/**\n * Draws a note to the diagram\n *\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\nexport const drawNote = (text, g) => {\n g.attr('class', 'state-note');\n const note = g.append('rect').attr('x', 0).attr('y', getConfig().state.padding);\n const rectElem = g.append('g');\n\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr('height', textHeight + 2 * getConfig().state.noteMargin);\n note.attr('width', textWidth + getConfig().state.noteMargin * 2);\n\n return note;\n};\n\n/**\n * Starting point for drawing a state. The function finds out the specifics about the state and\n * renders with appropriate function.\n *\n * @param {any} elem\n * @param {any} stateDef\n */\n\nexport const drawState = function (elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0,\n };\n\n const g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n\n if (stateDef.type === 'start') {\n drawStartState(g);\n }\n if (stateDef.type === 'end') {\n drawEndState(g);\n }\n if (stateDef.type === 'fork' || stateDef.type === 'join') {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === 'note') {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === 'divider') {\n drawDivider(g);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n\n idCache.set(id, stateInfo);\n // stateCnt++;\n return stateInfo;\n};\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation) {\n const getRelationType = function (type) {\n switch (type) {\n case stateDb.relationType.AGGREGATION:\n return 'aggregation';\n case stateDb.relationType.EXTENSION:\n return 'extension';\n case stateDb.relationType.COMPOSITION:\n return 'composition';\n case stateDb.relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'transition');\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(stateDb.relationType.DEPENDENCY) + 'End' + ')'\n );\n\n if (relation.title !== undefined) {\n const label = elem.append('g').attr('class', 'stateLabel');\n\n const { x, y } = utils.calcLabelPosition(path.points);\n\n const rows = common.getRows(relation.title);\n\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n\n for (let i = 0; i <= rows.length; i++) {\n const title = label\n .append('text')\n .attr('text-anchor', 'middle')\n .text(rows[i])\n .attr('x', x)\n .attr('y', y + titleHeight);\n\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n\n log.info(boundsTmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info('Title height', titleHeight, y);\n }\n titleRows.push(title);\n }\n\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n\n titleRows.forEach((title, i) => title.attr('y', y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n\n const bounds = label.node().getBBox();\n\n label\n .insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', x - maxWidth / 2 - getConfig().state.padding / 2)\n .attr('y', y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5)\n .attr('width', maxWidth + getConfig().state.padding)\n .attr('height', boxHeight + getConfig().state.padding);\n\n log.info(bounds);\n\n //label.attr('transform', '0 -' + (bounds.y / 2));\n\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n }\n\n edgeCount++;\n};\n", "import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { drawState, addTitleAndBox, drawEdge } from './shapes.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n// TODO Move conf object to main conf in mermaidAPI\nlet conf;\n\nconst transformationLog = {};\n\nexport const setConf = function () {\n //no-op\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\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 doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n log.debug('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram, undefined, false, root, doc, diagObj);\n\n const padding = conf.padding;\n const bounds = diagram.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // zoom in a bit\n const svgWidth = width * 1.75;\n configureSvgSize(diagram, height, svgWidth, conf.useMaxWidth);\n\n diagram.attr(\n 'viewBox',\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n );\n};\nconst getLabelWidth = (text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nconst renderDoc = (doc, diagram, parentId, altBkg, root, domDocument, diagObj) => {\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true,\n });\n\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n }\n\n // Set an object for the graph label\n if (parentId) {\n graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true,\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true,\n });\n }\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n\n const keys = Object.keys(states);\n\n let first = true;\n\n for (const key of keys) {\n const stateDef = states[key];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n let node;\n if (stateDef.doc) {\n let sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n\n if (first) {\n // first = false;\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = drawState(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n const noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note',\n };\n const note = drawState(diagram, noteDef, graph);\n\n // graph.setNode(node.id, node);\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n }\n // graph.setNode(node.id);\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n log.debug('Count=', graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function (relation) {\n cnt++;\n log.debug('Setting edge', relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common.getRows(relation.title).length,\n labelpos: 'c',\n },\n 'id' + cnt\n );\n });\n\n dagreLayout(graph);\n\n log.debug('Graph after layout', graph.nodes());\n const svgElem = diagram.node();\n\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n log.warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y +\n (transformationLog[v] ? transformationLog[v].y : 0) -\n graph.node(v).height / 2) +\n ' )'\n );\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n log.debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n\n let stateBox = svgElem.getBBox();\n\n graph.edges().forEach(function (e) {\n if (e !== undefined && graph.edge(e) !== undefined) {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n drawEdge(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n\n stateBox = svgElem.getBBox();\n\n const stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0,\n };\n\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n log.debug('Doc rendered', stateInfo, graph);\n return stateInfo;\n};\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/stateDiagram.jison';\nimport db from './stateDb.js';\nimport styles from './styles.js';\nimport renderer from './stateRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n"], "mappings": "8kBAAA,IAAMA,EAAU,CAAC,EAEJC,EAAMC,EAAA,CAACC,EAAKC,IAAQ,CAC/BJ,EAAQG,CAAG,EAAIC,CACjB,EAFmB,OAINC,EAAMH,EAACI,GAAMN,EAAQM,CAAC,EAAhB,OACNC,EAAOL,EAAA,IAAM,OAAO,KAAKF,CAAO,EAAzB,QACPQ,EAAON,EAAA,IAAMK,EAAK,EAAE,OAAb,QAEbE,EAAQ,CACb,IAAAJ,EACA,IAAAJ,EACA,KAAAM,EACA,KAAAC,CACF,ECFO,IAAME,EAAiBC,EAACC,GAC7BA,EACG,OAAO,QAAQ,EAGf,KAAK,QAAS,aAAa,EAC3B,KAAK,IAAKC,EAAU,EAAE,MAAM,QAAQ,EACpC,KAAK,KAAMA,EAAU,EAAE,MAAM,QAAUA,EAAU,EAAE,MAAM,QAAQ,EACjE,KAAK,KAAMA,EAAU,EAAE,MAAM,QAAUA,EAAU,EAAE,MAAM,QAAQ,EARxC,kBAejBC,EAAcH,EAACC,GAC1BA,EACG,OAAO,MAAM,EACb,MAAM,SAAU,MAAM,EACtB,MAAM,mBAAoB,GAAG,EAC7B,KAAK,KAAMC,EAAU,EAAE,MAAM,UAAU,EACvC,KAAK,QAAS,SAAS,EACvB,KAAK,KAAMA,EAAU,EAAE,MAAM,WAAa,CAAC,EAC3C,KAAK,KAAM,CAAC,EACZ,KAAK,KAAM,CAAC,EATU,eAiBdE,GAAkBJ,EAAA,CAACC,EAAGI,IAAa,CAC9C,IAAMC,EAAQL,EACX,OAAO,MAA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M,KAAK4B,CAAC,IAAM,SACvC1C,EAAI,MAAM,QAAU0C,EAAE,EAAI,OAASA,EAAE,EAAI,KAAO,KAAK,UAAU5B,EAAM,KAAK4B,CAAC,CAAC,CAAC,EAC7EC,EAAS1C,EAASa,EAAM,KAAK4B,CAAC,EAAG5B,EAAM,KAAK4B,CAAC,EAAE,QAAQ,EAE3D,CAAC,EAEDD,EAAWN,EAAQ,QAAQ,EAE3B,IAAMS,EAAY,CAChB,GAAIjC,GAAsB,OAC1B,MAAOA,GAAsB,OAC7B,MAAO,EACP,OAAQ,CACV,EAEA,OAAAiC,EAAU,MAAQH,EAAS,MAAQ,EAAI1D,EAAK,QAC5C6D,EAAU,OAASH,EAAS,OAAS,EAAI1D,EAAK,QAE9CiB,EAAI,MAAM,eAAgB4C,EAAW9B,CAAK,EACnC8B,CACT,EA5MkB,aA8MXC,EAAQ,CACb,QAAA5D,GACA,KAAAI,EACF,ECjSO,IAAMyD,GAA6B,CACxC,OAAAC,EACA,GAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAMC,EAACC,GAAQ,CACRA,EAAI,QACPA,EAAI,MAAQ,CAAC,GAEfA,EAAI,MAAM,oBAAsBA,EAAI,oBACpCJ,EAAG,MAAM,CACX,EANM,OAOR", "names": ["idCache", "set", "__name", "key", "val", "get", "k", "keys", "size", "id_cache_default", "drawStartState", "__name", "g", "getConfig", "drawDivider", "drawSimpleState", "stateDef", "state", "classBox", "drawDescrState", "addTspan", "textEl", "txt", "isFirst", "tSpan", "titleBox", "titleHeight", "description", "isSecond", "descr", "descrLine", "descrBox", "width", "addTitleAndBox", "altBkg", "pad", "dblPad", "orgBox", "orgWidth", "orgX", "title", "titleWidth", "startX", "graphBox", "lineY", "drawEndState", "drawForkJoinState", "height", "tmp", "_drawLongText", "__name", "_text", "x", "y", "g", "textHeight", "textElem", "text", "lines", "common_default", "tHeight", "getConfig", "line", "txt", "span", "textBounds", "drawNote", "note", "rectElem", "textWidth", "drawState", "elem", "stateDef", "id", "stateInfo", "drawStartState", "drawEndState", "drawForkJoinState", "drawDivider", "drawSimpleState", "drawDescrState", "stateBox", "id_cache_default", "edgeCount", "drawEdge", "path", "relation", "getRelationType", "type", "stateDb_default", "p", "lineData", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "label", "utils_default", "rows", "titleHeight", "titleRows", "maxWidth", "minX", "i", "title", "boundsTmp", "log", "boxHeight", "heightAdj", "bounds", "conf", "transformationLog", "setConf", "__name", "insertMarkers", "elem", "draw", "text", "id", "_version", "diagObj", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "doc", "log", "diagram", "rootDoc", "renderDoc", "padding", "bounds", "width", "height", "svgWidth", "configureSvgSize", "getLabelWidth", "parentId", "altBkg", "domDocument", "graph", "Graph", "i", "edgeFreeDoc", "states", "relations", "keys", "first", "key", "stateDef", "node", "sub", "addTitleAndBox", "boxBounds", "drawState", "noteDef", "note", "cnt", "relation", "common_default", "layout", "svgElem", "v", "divider", "parent", "pWidth", "pShift", "stateBox", "e", "drawEdge", "stateInfo", "stateRenderer_default", "diagram", "stateDiagram_default", "stateDb_default", "stateRenderer_default", "styles_default", "__name", "cnf"] }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy