jekyll-ham 1.0.4 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/_layouts/default.html +6 -0
- data/_layouts/page.html +1 -1
- data/assets/mermaid/Diagram.d.ts +33 -0
- data/assets/mermaid/Tableau10-31042135.js +10 -0
- data/assets/mermaid/Tableau10-558cc280.js +9 -0
- data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
- data/assets/mermaid/accessibility.d.ts +27 -0
- data/assets/mermaid/accessibility.spec.d.ts +1 -0
- data/assets/mermaid/arc-c0f908ab.js +148 -0
- data/assets/mermaid/arc-d1f6357e.js +86 -0
- data/assets/mermaid/array-2ff2c7a6.js +6 -0
- data/assets/mermaid/array-b7dcf730.js +6 -0
- data/assets/mermaid/assignWithDepth.d.ts +30 -0
- data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
- data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
- data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
- data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
- data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
- data/assets/mermaid/c4Diagram-af207393.js +2463 -0
- data/assets/mermaid/channel-ebbc4130.js +5 -0
- data/assets/mermaid/channel-f9001828.js +8 -0
- data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
- data/assets/mermaid/classDiagram-f52caa06.js +220 -0
- data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
- data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
- data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
- data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
- data/assets/mermaid/clone-9ea6bfeb.js +8 -0
- data/assets/mermaid/clone-afc2f047.js +8 -0
- data/assets/mermaid/config.d.ts +98 -0
- data/assets/mermaid/config.spec.d.ts +1 -0
- data/assets/mermaid/config.type.d.ts +1534 -0
- data/assets/mermaid/createText-03b82060.js +2966 -0
- data/assets/mermaid/createText-b70fe78a.js +4929 -0
- data/assets/mermaid/createText-ca0c5216.js +251 -0
- data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
- data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
- data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
- data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
- data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
- data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
- data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
- data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
- data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
- data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
- data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
- data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
- data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
- data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
- data/assets/mermaid/defaultConfig.d.ts +12 -0
- data/assets/mermaid/diagram-api/comments.d.ts +6 -0
- data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
- data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
- data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
- data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
- data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
- data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
- data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
- data/assets/mermaid/diagram-api/types.d.ts +84 -0
- data/assets/mermaid/diagram.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
- data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
- data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
- data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
- data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
- data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
- data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
- data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
- data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
- data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
- data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
- data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
- data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
- data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
- data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
- data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
- data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
- data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
- data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
- data/assets/mermaid/diagrams/common/common.d.ts +110 -0
- data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
- data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
- data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
- data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
- data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
- data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
- data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
- data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
- data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
- data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
- data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
- data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
- data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
- data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
- data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
- data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
- data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
- data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
- data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
- data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
- data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
- data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
- data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
- data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
- data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
- data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
- data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
- data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
- data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
- data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
- data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
- data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
- data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
- data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
- data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
- data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
- data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
- data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
- data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
- data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
- data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
- data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
- data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
- data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
- data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
- data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
- data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
- data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
- data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
- data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
- data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
- data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
- data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
- data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
- data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
- data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
- data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
- data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
- data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
- data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
- data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
- data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
- data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
- data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
- data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
- data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
- data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
- data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
- data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
- data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
- data/assets/mermaid/docs/vite.config.d.ts +2 -0
- data/assets/mermaid/edges-066a5561.js +1840 -0
- data/assets/mermaid/edges-16357fde.js +1083 -0
- data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
- data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
- data/assets/mermaid/erDiagram-543717f2.js +1321 -0
- data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
- data/assets/mermaid/errors.d.ts +3 -0
- data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
- data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
- data/assets/mermaid/flowDb-c1833063.js +1714 -0
- data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
- data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
- data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
- data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
- data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
- data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
- data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
- data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
- data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
- data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
- data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
- data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
- data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
- data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
- data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
- data/assets/mermaid/graph-0ee63739.js +881 -0
- data/assets/mermaid/graph-fe24fab6.js +1285 -0
- data/assets/mermaid/index-01f381cb.js +622 -0
- data/assets/mermaid/index-bb6d8841.js +373 -0
- data/assets/mermaid/index-fc479858.js +663 -0
- data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
- data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
- data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
- data/assets/mermaid/init-cc95ec8e.js +16 -0
- data/assets/mermaid/init-f9637058.js +16 -0
- data/assets/mermaid/interactionDb.d.ts +2 -0
- data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
- data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
- data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
- data/assets/mermaid/katex-d90b6d29.js +11624 -0
- data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
- data/assets/mermaid/layout-163b9689.js +2314 -0
- data/assets/mermaid/layout-fd473db2.js +1536 -0
- data/assets/mermaid/line-24d93f1b.js +34 -0
- data/assets/mermaid/line-87f517ef.js +50 -0
- data/assets/mermaid/linear-0ad15847.js +595 -0
- data/assets/mermaid/linear-9bcf74c4.js +447 -0
- data/assets/mermaid/logger.d.ts +9 -0
- data/assets/mermaid/mermaid-6dc72991.js +6461 -0
- data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
- data/assets/mermaid/mermaid-dcacb631.js +12793 -0
- data/assets/mermaid/mermaid.core.mjs +14 -0
- data/assets/mermaid/mermaid.d.ts +146 -0
- data/assets/mermaid/mermaid.esm.min.mjs +4 -0
- data/assets/mermaid/mermaid.esm.mjs +4 -0
- data/assets/mermaid/mermaid.js +195755 -0
- data/assets/mermaid/mermaid.min.js +2029 -0
- data/assets/mermaid/mermaid.spec.d.ts +1 -0
- data/assets/mermaid/mermaidAPI.d.ts +170 -0
- data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
- data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
- data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
- data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
- data/assets/mermaid/ordinal-475e0c0c.js +82 -0
- data/assets/mermaid/ordinal-5695958c.js +65 -0
- data/assets/mermaid/path-39bad7e2.js +118 -0
- data/assets/mermaid/path-428ebac9.js +91 -0
- data/assets/mermaid/pieDiagram-828dae43.js +502 -0
- data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
- data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
- data/assets/mermaid/preprocess.d.ts +10 -0
- data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
- data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
- data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
- data/assets/mermaid/rendering-util/createText.d.ts +11 -0
- data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
- data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
- data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
- data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
- data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
- data/assets/mermaid/rendering-util/uid.d.ts +8 -0
- data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
- data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
- data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
- data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
- data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
- data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
- data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
- data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
- data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
- data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
- data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
- data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
- data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
- data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
- data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
- data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
- data/assets/mermaid/styles-0784dbeb.js +1363 -0
- data/assets/mermaid/styles-11e81fdd.js +1089 -0
- data/assets/mermaid/styles-36a1a2e8.js +1483 -0
- data/assets/mermaid/styles-483fbfea.js +509 -0
- data/assets/mermaid/styles-727cdd61.js +571 -0
- data/assets/mermaid/styles-b83b31c9.js +1484 -0
- data/assets/mermaid/styles-cacbff60.js +960 -0
- data/assets/mermaid/styles-e75131e4.js +433 -0
- data/assets/mermaid/styles-f80da881.js +1363 -0
- data/assets/mermaid/styles.d.ts +12 -0
- data/assets/mermaid/styles.spec.d.ts +1 -0
- data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
- data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
- data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
- data/assets/mermaid/tests/MockedD3.d.ts +45 -0
- data/assets/mermaid/tests/setup.d.ts +1 -0
- data/assets/mermaid/tests/util.d.ts +3 -0
- data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
- data/assets/mermaid/themes/index.d.ts +24 -0
- data/assets/mermaid/themes/theme-base.d.ts +189 -0
- data/assets/mermaid/themes/theme-dark.d.ts +177 -0
- data/assets/mermaid/themes/theme-default.d.ts +188 -0
- data/assets/mermaid/themes/theme-forest.d.ts +185 -0
- data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
- data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
- data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
- data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
- data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
- data/assets/mermaid/types.d.ts +31 -0
- data/assets/mermaid/utils/imperativeState.d.ts +32 -0
- data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
- data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
- data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
- data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
- data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
- data/assets/mermaid/utils.d.ts +286 -0
- data/assets/mermaid/utils.spec.d.ts +1 -0
- data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
- data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
- data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
- data/assets/tables.css +23 -0
- data/assets/toURI.js +142 -0
- metadata +363 -2
@@ -0,0 +1,467 @@
|
|
1
|
+
import { d as db, p as parser, s as styles } from "./styles-f80da881.js";
|
2
|
+
import { c as getConfig, F as curveBasis, A as utils, f as common, l as log, j as d3select, k as configureSvgSize } from "./mermaid-dcacb631.js";
|
3
|
+
import { G as Graph } from "./graph-fe24fab6.js";
|
4
|
+
import { l as layout } from "./layout-163b9689.js";
|
5
|
+
import { l as line } from "./line-87f517ef.js";
|
6
|
+
import "./array-b7dcf730.js";
|
7
|
+
import "./path-39bad7e2.js";
|
8
|
+
const idCache = {};
|
9
|
+
const set = (key, val) => {
|
10
|
+
idCache[key] = val;
|
11
|
+
};
|
12
|
+
const get = (k) => idCache[k];
|
13
|
+
const keys = () => Object.keys(idCache);
|
14
|
+
const size = () => keys().length;
|
15
|
+
const idCache$1 = {
|
16
|
+
get,
|
17
|
+
set,
|
18
|
+
keys,
|
19
|
+
size
|
20
|
+
};
|
21
|
+
const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit);
|
22
|
+
const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig().state.textHeight).attr("class", "divider").attr("x2", getConfig().state.textHeight * 2).attr("y1", 0).attr("y2", 0);
|
23
|
+
const drawSimpleState = (g, stateDef) => {
|
24
|
+
const state = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 2 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id);
|
25
|
+
const classBox = state.node().getBBox();
|
26
|
+
g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", classBox.width + 2 * getConfig().state.padding).attr("height", classBox.height + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius);
|
27
|
+
return state;
|
28
|
+
};
|
29
|
+
const drawDescrState = (g, stateDef) => {
|
30
|
+
const addTspan = function(textEl, txt, isFirst2) {
|
31
|
+
const tSpan = textEl.append("tspan").attr("x", 2 * getConfig().state.padding).text(txt);
|
32
|
+
if (!isFirst2) {
|
33
|
+
tSpan.attr("dy", getConfig().state.textHeight);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
const title = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 1.3 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]);
|
37
|
+
const titleBox = title.node().getBBox();
|
38
|
+
const titleHeight = titleBox.height;
|
39
|
+
const description = g.append("text").attr("x", getConfig().state.padding).attr(
|
40
|
+
"y",
|
41
|
+
titleHeight + getConfig().state.padding * 0.4 + getConfig().state.dividerMargin + getConfig().state.textHeight
|
42
|
+
).attr("class", "state-description");
|
43
|
+
let isFirst = true;
|
44
|
+
let isSecond = true;
|
45
|
+
stateDef.descriptions.forEach(function(descr) {
|
46
|
+
if (!isFirst) {
|
47
|
+
addTspan(description, descr, isSecond);
|
48
|
+
isSecond = false;
|
49
|
+
}
|
50
|
+
isFirst = false;
|
51
|
+
});
|
52
|
+
const descrLine = g.append("line").attr("x1", getConfig().state.padding).attr("y1", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("y2", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("class", "descr-divider");
|
53
|
+
const descrBox = description.node().getBBox();
|
54
|
+
const width = Math.max(descrBox.width, titleBox.width);
|
55
|
+
descrLine.attr("x2", width + 3 * getConfig().state.padding);
|
56
|
+
g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", width + 2 * getConfig().state.padding).attr("height", descrBox.height + titleHeight + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius);
|
57
|
+
return g;
|
58
|
+
};
|
59
|
+
const addTitleAndBox = (g, stateDef, altBkg) => {
|
60
|
+
const pad = getConfig().state.padding;
|
61
|
+
const dblPad = 2 * getConfig().state.padding;
|
62
|
+
const orgBox = g.node().getBBox();
|
63
|
+
const orgWidth = orgBox.width;
|
64
|
+
const orgX = orgBox.x;
|
65
|
+
const title = g.append("text").attr("x", 0).attr("y", getConfig().state.titleShift).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id);
|
66
|
+
const titleBox = title.node().getBBox();
|
67
|
+
const titleWidth = titleBox.width + dblPad;
|
68
|
+
let width = Math.max(titleWidth, orgWidth);
|
69
|
+
if (width === orgWidth) {
|
70
|
+
width = width + dblPad;
|
71
|
+
}
|
72
|
+
let startX;
|
73
|
+
const graphBox = g.node().getBBox();
|
74
|
+
if (stateDef.doc)
|
75
|
+
;
|
76
|
+
startX = orgX - pad;
|
77
|
+
if (titleWidth > orgWidth) {
|
78
|
+
startX = (orgWidth - width) / 2 + pad;
|
79
|
+
}
|
80
|
+
if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {
|
81
|
+
startX = orgX - (titleWidth - orgWidth) / 2;
|
82
|
+
}
|
83
|
+
const lineY = 1 - getConfig().state.textHeight;
|
84
|
+
g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr(
|
85
|
+
"height",
|
86
|
+
graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1
|
87
|
+
).attr("rx", "0");
|
88
|
+
title.attr("x", startX + pad);
|
89
|
+
if (titleWidth <= orgWidth) {
|
90
|
+
title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);
|
91
|
+
}
|
92
|
+
g.insert("rect", ":first-child").attr("x", startX).attr(
|
93
|
+
"y",
|
94
|
+
getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding
|
95
|
+
).attr("width", width).attr("height", getConfig().state.textHeight * 3).attr("rx", getConfig().state.radius);
|
96
|
+
g.insert("rect", ":first-child").attr("x", startX).attr(
|
97
|
+
"y",
|
98
|
+
getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding
|
99
|
+
).attr("width", width).attr("height", graphBox.height + 3 + 2 * getConfig().state.textHeight).attr("rx", getConfig().state.radius);
|
100
|
+
return g;
|
101
|
+
};
|
102
|
+
const drawEndState = (g) => {
|
103
|
+
g.append("circle").attr("class", "end-state-outer").attr("r", getConfig().state.sizeUnit + getConfig().state.miniPadding).attr(
|
104
|
+
"cx",
|
105
|
+
getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding
|
106
|
+
).attr(
|
107
|
+
"cy",
|
108
|
+
getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding
|
109
|
+
);
|
110
|
+
return g.append("circle").attr("class", "end-state-inner").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit + 2).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit + 2);
|
111
|
+
};
|
112
|
+
const drawForkJoinState = (g, stateDef) => {
|
113
|
+
let width = getConfig().state.forkWidth;
|
114
|
+
let height = getConfig().state.forkHeight;
|
115
|
+
if (stateDef.parentId) {
|
116
|
+
let tmp = width;
|
117
|
+
width = height;
|
118
|
+
height = tmp;
|
119
|
+
}
|
120
|
+
return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", getConfig().state.padding).attr("y", getConfig().state.padding);
|
121
|
+
};
|
122
|
+
const _drawLongText = (_text, x, y, g) => {
|
123
|
+
let textHeight = 0;
|
124
|
+
const textElem = g.append("text");
|
125
|
+
textElem.style("text-anchor", "start");
|
126
|
+
textElem.attr("class", "noteText");
|
127
|
+
let text = _text.replace(/\r\n/g, "<br/>");
|
128
|
+
text = text.replace(/\n/g, "<br/>");
|
129
|
+
const lines = text.split(common.lineBreakRegex);
|
130
|
+
let tHeight = 1.25 * getConfig().state.noteMargin;
|
131
|
+
for (const line2 of lines) {
|
132
|
+
const txt = line2.trim();
|
133
|
+
if (txt.length > 0) {
|
134
|
+
const span = textElem.append("tspan");
|
135
|
+
span.text(txt);
|
136
|
+
if (tHeight === 0) {
|
137
|
+
const textBounds = span.node().getBBox();
|
138
|
+
tHeight += textBounds.height;
|
139
|
+
}
|
140
|
+
textHeight += tHeight;
|
141
|
+
span.attr("x", x + getConfig().state.noteMargin);
|
142
|
+
span.attr("y", y + textHeight + 1.25 * getConfig().state.noteMargin);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
return { textWidth: textElem.node().getBBox().width, textHeight };
|
146
|
+
};
|
147
|
+
const drawNote = (text, g) => {
|
148
|
+
g.attr("class", "state-note");
|
149
|
+
const note = g.append("rect").attr("x", 0).attr("y", getConfig().state.padding);
|
150
|
+
const rectElem = g.append("g");
|
151
|
+
const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);
|
152
|
+
note.attr("height", textHeight + 2 * getConfig().state.noteMargin);
|
153
|
+
note.attr("width", textWidth + getConfig().state.noteMargin * 2);
|
154
|
+
return note;
|
155
|
+
};
|
156
|
+
const drawState = function(elem, stateDef) {
|
157
|
+
const id = stateDef.id;
|
158
|
+
const stateInfo = {
|
159
|
+
id,
|
160
|
+
label: stateDef.id,
|
161
|
+
width: 0,
|
162
|
+
height: 0
|
163
|
+
};
|
164
|
+
const g = elem.append("g").attr("id", id).attr("class", "stateGroup");
|
165
|
+
if (stateDef.type === "start") {
|
166
|
+
drawStartState(g);
|
167
|
+
}
|
168
|
+
if (stateDef.type === "end") {
|
169
|
+
drawEndState(g);
|
170
|
+
}
|
171
|
+
if (stateDef.type === "fork" || stateDef.type === "join") {
|
172
|
+
drawForkJoinState(g, stateDef);
|
173
|
+
}
|
174
|
+
if (stateDef.type === "note") {
|
175
|
+
drawNote(stateDef.note.text, g);
|
176
|
+
}
|
177
|
+
if (stateDef.type === "divider") {
|
178
|
+
drawDivider(g);
|
179
|
+
}
|
180
|
+
if (stateDef.type === "default" && stateDef.descriptions.length === 0) {
|
181
|
+
drawSimpleState(g, stateDef);
|
182
|
+
}
|
183
|
+
if (stateDef.type === "default" && stateDef.descriptions.length > 0) {
|
184
|
+
drawDescrState(g, stateDef);
|
185
|
+
}
|
186
|
+
const stateBox = g.node().getBBox();
|
187
|
+
stateInfo.width = stateBox.width + 2 * getConfig().state.padding;
|
188
|
+
stateInfo.height = stateBox.height + 2 * getConfig().state.padding;
|
189
|
+
idCache$1.set(id, stateInfo);
|
190
|
+
return stateInfo;
|
191
|
+
};
|
192
|
+
let edgeCount = 0;
|
193
|
+
const drawEdge = function(elem, path, relation) {
|
194
|
+
const getRelationType = function(type) {
|
195
|
+
switch (type) {
|
196
|
+
case db.relationType.AGGREGATION:
|
197
|
+
return "aggregation";
|
198
|
+
case db.relationType.EXTENSION:
|
199
|
+
return "extension";
|
200
|
+
case db.relationType.COMPOSITION:
|
201
|
+
return "composition";
|
202
|
+
case db.relationType.DEPENDENCY:
|
203
|
+
return "dependency";
|
204
|
+
}
|
205
|
+
};
|
206
|
+
path.points = path.points.filter((p) => !Number.isNaN(p.y));
|
207
|
+
const lineData = path.points;
|
208
|
+
const lineFunction = line().x(function(d) {
|
209
|
+
return d.x;
|
210
|
+
}).y(function(d) {
|
211
|
+
return d.y;
|
212
|
+
}).curve(curveBasis);
|
213
|
+
const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition");
|
214
|
+
let url = "";
|
215
|
+
if (getConfig().state.arrowMarkerAbsolute) {
|
216
|
+
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
|
217
|
+
url = url.replace(/\(/g, "\\(");
|
218
|
+
url = url.replace(/\)/g, "\\)");
|
219
|
+
}
|
220
|
+
svgPath.attr(
|
221
|
+
"marker-end",
|
222
|
+
"url(" + url + "#" + getRelationType(db.relationType.DEPENDENCY) + "End)"
|
223
|
+
);
|
224
|
+
if (relation.title !== void 0) {
|
225
|
+
const label = elem.append("g").attr("class", "stateLabel");
|
226
|
+
const { x, y } = utils.calcLabelPosition(path.points);
|
227
|
+
const rows = common.getRows(relation.title);
|
228
|
+
let titleHeight = 0;
|
229
|
+
const titleRows = [];
|
230
|
+
let maxWidth = 0;
|
231
|
+
let minX = 0;
|
232
|
+
for (let i = 0; i <= rows.length; i++) {
|
233
|
+
const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight);
|
234
|
+
const boundsTmp = title.node().getBBox();
|
235
|
+
maxWidth = Math.max(maxWidth, boundsTmp.width);
|
236
|
+
minX = Math.min(minX, boundsTmp.x);
|
237
|
+
log.info(boundsTmp.x, x, y + titleHeight);
|
238
|
+
if (titleHeight === 0) {
|
239
|
+
const titleBox = title.node().getBBox();
|
240
|
+
titleHeight = titleBox.height;
|
241
|
+
log.info("Title height", titleHeight, y);
|
242
|
+
}
|
243
|
+
titleRows.push(title);
|
244
|
+
}
|
245
|
+
let boxHeight = titleHeight * rows.length;
|
246
|
+
if (rows.length > 1) {
|
247
|
+
const heightAdj = (rows.length - 1) * titleHeight * 0.5;
|
248
|
+
titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj));
|
249
|
+
boxHeight = titleHeight * rows.length;
|
250
|
+
}
|
251
|
+
const bounds = label.node().getBBox();
|
252
|
+
label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - getConfig().state.padding / 2).attr("y", y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5).attr("width", maxWidth + getConfig().state.padding).attr("height", boxHeight + getConfig().state.padding);
|
253
|
+
log.info(bounds);
|
254
|
+
}
|
255
|
+
edgeCount++;
|
256
|
+
};
|
257
|
+
let conf;
|
258
|
+
const transformationLog = {};
|
259
|
+
const setConf = function() {
|
260
|
+
};
|
261
|
+
const insertMarkers = function(elem) {
|
262
|
+
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
263
|
+
};
|
264
|
+
const draw = function(text, id, _version, diagObj) {
|
265
|
+
conf = getConfig().state;
|
266
|
+
const securityLevel = getConfig().securityLevel;
|
267
|
+
let sandboxElement;
|
268
|
+
if (securityLevel === "sandbox") {
|
269
|
+
sandboxElement = d3select("#i" + id);
|
270
|
+
}
|
271
|
+
const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
|
272
|
+
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
|
273
|
+
log.debug("Rendering diagram " + text);
|
274
|
+
const diagram2 = root.select(`[id='${id}']`);
|
275
|
+
insertMarkers(diagram2);
|
276
|
+
const rootDoc = diagObj.db.getRootDoc();
|
277
|
+
renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj);
|
278
|
+
const padding = conf.padding;
|
279
|
+
const bounds = diagram2.node().getBBox();
|
280
|
+
const width = bounds.width + padding * 2;
|
281
|
+
const height = bounds.height + padding * 2;
|
282
|
+
const svgWidth = width * 1.75;
|
283
|
+
configureSvgSize(diagram2, height, svgWidth, conf.useMaxWidth);
|
284
|
+
diagram2.attr(
|
285
|
+
"viewBox",
|
286
|
+
`${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height
|
287
|
+
);
|
288
|
+
};
|
289
|
+
const getLabelWidth = (text) => {
|
290
|
+
return text ? text.length * conf.fontSizeFactor : 1;
|
291
|
+
};
|
292
|
+
const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => {
|
293
|
+
const graph = new Graph({
|
294
|
+
compound: true,
|
295
|
+
multigraph: true
|
296
|
+
});
|
297
|
+
let i;
|
298
|
+
let edgeFreeDoc = true;
|
299
|
+
for (i = 0; i < doc.length; i++) {
|
300
|
+
if (doc[i].stmt === "relation") {
|
301
|
+
edgeFreeDoc = false;
|
302
|
+
break;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
if (parentId) {
|
306
|
+
graph.setGraph({
|
307
|
+
rankdir: "LR",
|
308
|
+
multigraph: true,
|
309
|
+
compound: true,
|
310
|
+
// acyclicer: 'greedy',
|
311
|
+
ranker: "tight-tree",
|
312
|
+
ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
|
313
|
+
nodeSep: edgeFreeDoc ? 1 : 50,
|
314
|
+
isMultiGraph: true
|
315
|
+
// ranksep: 5,
|
316
|
+
// nodesep: 1
|
317
|
+
});
|
318
|
+
} else {
|
319
|
+
graph.setGraph({
|
320
|
+
rankdir: "TB",
|
321
|
+
multigraph: true,
|
322
|
+
compound: true,
|
323
|
+
// isCompound: true,
|
324
|
+
// acyclicer: 'greedy',
|
325
|
+
// ranker: 'longest-path'
|
326
|
+
ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
|
327
|
+
nodeSep: edgeFreeDoc ? 1 : 50,
|
328
|
+
ranker: "tight-tree",
|
329
|
+
// ranker: 'network-simplex'
|
330
|
+
isMultiGraph: true
|
331
|
+
});
|
332
|
+
}
|
333
|
+
graph.setDefaultEdgeLabel(function() {
|
334
|
+
return {};
|
335
|
+
});
|
336
|
+
diagObj.db.extract(doc);
|
337
|
+
const states = diagObj.db.getStates();
|
338
|
+
const relations = diagObj.db.getRelations();
|
339
|
+
const keys2 = Object.keys(states);
|
340
|
+
for (const key of keys2) {
|
341
|
+
const stateDef = states[key];
|
342
|
+
if (parentId) {
|
343
|
+
stateDef.parentId = parentId;
|
344
|
+
}
|
345
|
+
let node;
|
346
|
+
if (stateDef.doc) {
|
347
|
+
let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup");
|
348
|
+
node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);
|
349
|
+
{
|
350
|
+
sub = addTitleAndBox(sub, stateDef, altBkg);
|
351
|
+
let boxBounds = sub.node().getBBox();
|
352
|
+
node.width = boxBounds.width;
|
353
|
+
node.height = boxBounds.height + conf.padding / 2;
|
354
|
+
transformationLog[stateDef.id] = { y: conf.compositTitleSize };
|
355
|
+
}
|
356
|
+
} else {
|
357
|
+
node = drawState(diagram2, stateDef);
|
358
|
+
}
|
359
|
+
if (stateDef.note) {
|
360
|
+
const noteDef = {
|
361
|
+
descriptions: [],
|
362
|
+
id: stateDef.id + "-note",
|
363
|
+
note: stateDef.note,
|
364
|
+
type: "note"
|
365
|
+
};
|
366
|
+
const note = drawState(diagram2, noteDef);
|
367
|
+
if (stateDef.note.position === "left of") {
|
368
|
+
graph.setNode(node.id + "-note", note);
|
369
|
+
graph.setNode(node.id, node);
|
370
|
+
} else {
|
371
|
+
graph.setNode(node.id, node);
|
372
|
+
graph.setNode(node.id + "-note", note);
|
373
|
+
}
|
374
|
+
graph.setParent(node.id, node.id + "-group");
|
375
|
+
graph.setParent(node.id + "-note", node.id + "-group");
|
376
|
+
} else {
|
377
|
+
graph.setNode(node.id, node);
|
378
|
+
}
|
379
|
+
}
|
380
|
+
log.debug("Count=", graph.nodeCount(), graph);
|
381
|
+
let cnt = 0;
|
382
|
+
relations.forEach(function(relation) {
|
383
|
+
cnt++;
|
384
|
+
log.debug("Setting edge", relation);
|
385
|
+
graph.setEdge(
|
386
|
+
relation.id1,
|
387
|
+
relation.id2,
|
388
|
+
{
|
389
|
+
relation,
|
390
|
+
width: getLabelWidth(relation.title),
|
391
|
+
height: conf.labelHeight * common.getRows(relation.title).length,
|
392
|
+
labelpos: "c"
|
393
|
+
},
|
394
|
+
"id" + cnt
|
395
|
+
);
|
396
|
+
});
|
397
|
+
layout(graph);
|
398
|
+
log.debug("Graph after layout", graph.nodes());
|
399
|
+
const svgElem = diagram2.node();
|
400
|
+
graph.nodes().forEach(function(v) {
|
401
|
+
if (v !== void 0 && graph.node(v) !== void 0) {
|
402
|
+
log.warn("Node " + v + ": " + JSON.stringify(graph.node(v)));
|
403
|
+
root.select("#" + svgElem.id + " #" + v).attr(
|
404
|
+
"transform",
|
405
|
+
"translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )"
|
406
|
+
);
|
407
|
+
root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2);
|
408
|
+
const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider");
|
409
|
+
dividers.forEach((divider) => {
|
410
|
+
const parent = divider.parentElement;
|
411
|
+
let pWidth = 0;
|
412
|
+
let pShift = 0;
|
413
|
+
if (parent) {
|
414
|
+
if (parent.parentElement) {
|
415
|
+
pWidth = parent.parentElement.getBBox().width;
|
416
|
+
}
|
417
|
+
pShift = parseInt(parent.getAttribute("data-x-shift"), 10);
|
418
|
+
if (Number.isNaN(pShift)) {
|
419
|
+
pShift = 0;
|
420
|
+
}
|
421
|
+
}
|
422
|
+
divider.setAttribute("x1", 0 - pShift + 8);
|
423
|
+
divider.setAttribute("x2", pWidth - pShift - 8);
|
424
|
+
});
|
425
|
+
} else {
|
426
|
+
log.debug("No Node " + v + ": " + JSON.stringify(graph.node(v)));
|
427
|
+
}
|
428
|
+
});
|
429
|
+
let stateBox = svgElem.getBBox();
|
430
|
+
graph.edges().forEach(function(e) {
|
431
|
+
if (e !== void 0 && graph.edge(e) !== void 0) {
|
432
|
+
log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e)));
|
433
|
+
drawEdge(diagram2, graph.edge(e), graph.edge(e).relation);
|
434
|
+
}
|
435
|
+
});
|
436
|
+
stateBox = svgElem.getBBox();
|
437
|
+
const stateInfo = {
|
438
|
+
id: parentId ? parentId : "root",
|
439
|
+
label: parentId ? parentId : "root",
|
440
|
+
width: 0,
|
441
|
+
height: 0
|
442
|
+
};
|
443
|
+
stateInfo.width = stateBox.width + 2 * conf.padding;
|
444
|
+
stateInfo.height = stateBox.height + 2 * conf.padding;
|
445
|
+
log.debug("Doc rendered", stateInfo, graph);
|
446
|
+
return stateInfo;
|
447
|
+
};
|
448
|
+
const renderer = {
|
449
|
+
setConf,
|
450
|
+
draw
|
451
|
+
};
|
452
|
+
const diagram = {
|
453
|
+
parser,
|
454
|
+
db,
|
455
|
+
renderer,
|
456
|
+
styles,
|
457
|
+
init: (cnf) => {
|
458
|
+
if (!cnf.state) {
|
459
|
+
cnf.state = {};
|
460
|
+
}
|
461
|
+
cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
462
|
+
db.clear();
|
463
|
+
}
|
464
|
+
};
|
465
|
+
export {
|
466
|
+
diagram
|
467
|
+
};
|