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,1177 @@
|
|
1
|
+
import { l as log, c as getConfig, B as defaultConfig, d as sanitizeText, D as parseFontSize, A as selectSvgElement, o as setupGraphViewbox } from "./mermaid-6dc72991.js";
|
2
|
+
import cytoscape from "cytoscape";
|
3
|
+
import coseBilkent from "cytoscape-cose-bilkent";
|
4
|
+
import { select } from "d3";
|
5
|
+
import { a as createText } from "./createText-ca0c5216.js";
|
6
|
+
import { isDark, lighten, darken } from "khroma";
|
7
|
+
import "ts-dedent";
|
8
|
+
import "dayjs";
|
9
|
+
import "@braintree/sanitize-url";
|
10
|
+
import "dompurify";
|
11
|
+
import "lodash-es/memoize.js";
|
12
|
+
import "lodash-es/merge.js";
|
13
|
+
import "stylis";
|
14
|
+
import "lodash-es/isEmpty.js";
|
15
|
+
import "mdast-util-from-markdown";
|
16
|
+
var parser = function() {
|
17
|
+
var o = function(k, v, o2, l) {
|
18
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
19
|
+
;
|
20
|
+
return o2;
|
21
|
+
}, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22];
|
22
|
+
var parser2 = {
|
23
|
+
trace: function trace() {
|
24
|
+
},
|
25
|
+
yy: {},
|
26
|
+
symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 },
|
27
|
+
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
28
|
+
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
29
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
30
|
+
var $0 = $$.length - 1;
|
31
|
+
switch (yystate) {
|
32
|
+
case 6:
|
33
|
+
case 7:
|
34
|
+
return yy;
|
35
|
+
case 8:
|
36
|
+
yy.getLogger().trace("Stop NL ");
|
37
|
+
break;
|
38
|
+
case 9:
|
39
|
+
yy.getLogger().trace("Stop EOF ");
|
40
|
+
break;
|
41
|
+
case 11:
|
42
|
+
yy.getLogger().trace("Stop NL2 ");
|
43
|
+
break;
|
44
|
+
case 12:
|
45
|
+
yy.getLogger().trace("Stop EOF2 ");
|
46
|
+
break;
|
47
|
+
case 15:
|
48
|
+
yy.getLogger().info("Node: ", $$[$0].id);
|
49
|
+
yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
|
50
|
+
break;
|
51
|
+
case 16:
|
52
|
+
yy.getLogger().trace("Icon: ", $$[$0]);
|
53
|
+
yy.decorateNode({ icon: $$[$0] });
|
54
|
+
break;
|
55
|
+
case 17:
|
56
|
+
case 21:
|
57
|
+
yy.decorateNode({ class: $$[$0] });
|
58
|
+
break;
|
59
|
+
case 18:
|
60
|
+
yy.getLogger().trace("SPACELIST");
|
61
|
+
break;
|
62
|
+
case 19:
|
63
|
+
yy.getLogger().trace("Node: ", $$[$0].id);
|
64
|
+
yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
|
65
|
+
break;
|
66
|
+
case 20:
|
67
|
+
yy.decorateNode({ icon: $$[$0] });
|
68
|
+
break;
|
69
|
+
case 25:
|
70
|
+
yy.getLogger().trace("node found ..", $$[$0 - 2]);
|
71
|
+
this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
72
|
+
break;
|
73
|
+
case 26:
|
74
|
+
this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT };
|
75
|
+
break;
|
76
|
+
case 27:
|
77
|
+
yy.getLogger().trace("node found ..", $$[$0 - 3]);
|
78
|
+
this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
},
|
82
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])],
|
83
|
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
84
|
+
parseError: function parseError(str, hash) {
|
85
|
+
if (hash.recoverable) {
|
86
|
+
this.trace(str);
|
87
|
+
} else {
|
88
|
+
var error = new Error(str);
|
89
|
+
error.hash = hash;
|
90
|
+
throw error;
|
91
|
+
}
|
92
|
+
},
|
93
|
+
parse: function parse(input) {
|
94
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
95
|
+
var args = lstack.slice.call(arguments, 1);
|
96
|
+
var lexer2 = Object.create(this.lexer);
|
97
|
+
var sharedState = { yy: {} };
|
98
|
+
for (var k in this.yy) {
|
99
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
100
|
+
sharedState.yy[k] = this.yy[k];
|
101
|
+
}
|
102
|
+
}
|
103
|
+
lexer2.setInput(input, sharedState.yy);
|
104
|
+
sharedState.yy.lexer = lexer2;
|
105
|
+
sharedState.yy.parser = this;
|
106
|
+
if (typeof lexer2.yylloc == "undefined") {
|
107
|
+
lexer2.yylloc = {};
|
108
|
+
}
|
109
|
+
var yyloc = lexer2.yylloc;
|
110
|
+
lstack.push(yyloc);
|
111
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
112
|
+
if (typeof sharedState.yy.parseError === "function") {
|
113
|
+
this.parseError = sharedState.yy.parseError;
|
114
|
+
} else {
|
115
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
116
|
+
}
|
117
|
+
function lex() {
|
118
|
+
var token;
|
119
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
120
|
+
if (typeof token !== "number") {
|
121
|
+
if (token instanceof Array) {
|
122
|
+
tstack = token;
|
123
|
+
token = tstack.pop();
|
124
|
+
}
|
125
|
+
token = self.symbols_[token] || token;
|
126
|
+
}
|
127
|
+
return token;
|
128
|
+
}
|
129
|
+
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
130
|
+
while (true) {
|
131
|
+
state = stack[stack.length - 1];
|
132
|
+
if (this.defaultActions[state]) {
|
133
|
+
action = this.defaultActions[state];
|
134
|
+
} else {
|
135
|
+
if (symbol === null || typeof symbol == "undefined") {
|
136
|
+
symbol = lex();
|
137
|
+
}
|
138
|
+
action = table[state] && table[state][symbol];
|
139
|
+
}
|
140
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
141
|
+
var errStr = "";
|
142
|
+
expected = [];
|
143
|
+
for (p in table[state]) {
|
144
|
+
if (this.terminals_[p] && p > TERROR) {
|
145
|
+
expected.push("'" + this.terminals_[p] + "'");
|
146
|
+
}
|
147
|
+
}
|
148
|
+
if (lexer2.showPosition) {
|
149
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
150
|
+
} else {
|
151
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
152
|
+
}
|
153
|
+
this.parseError(errStr, {
|
154
|
+
text: lexer2.match,
|
155
|
+
token: this.terminals_[symbol] || symbol,
|
156
|
+
line: lexer2.yylineno,
|
157
|
+
loc: yyloc,
|
158
|
+
expected
|
159
|
+
});
|
160
|
+
}
|
161
|
+
if (action[0] instanceof Array && action.length > 1) {
|
162
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
163
|
+
}
|
164
|
+
switch (action[0]) {
|
165
|
+
case 1:
|
166
|
+
stack.push(symbol);
|
167
|
+
vstack.push(lexer2.yytext);
|
168
|
+
lstack.push(lexer2.yylloc);
|
169
|
+
stack.push(action[1]);
|
170
|
+
symbol = null;
|
171
|
+
{
|
172
|
+
yyleng = lexer2.yyleng;
|
173
|
+
yytext = lexer2.yytext;
|
174
|
+
yylineno = lexer2.yylineno;
|
175
|
+
yyloc = lexer2.yylloc;
|
176
|
+
}
|
177
|
+
break;
|
178
|
+
case 2:
|
179
|
+
len = this.productions_[action[1]][1];
|
180
|
+
yyval.$ = vstack[vstack.length - len];
|
181
|
+
yyval._$ = {
|
182
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
183
|
+
last_line: lstack[lstack.length - 1].last_line,
|
184
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
185
|
+
last_column: lstack[lstack.length - 1].last_column
|
186
|
+
};
|
187
|
+
if (ranges) {
|
188
|
+
yyval._$.range = [
|
189
|
+
lstack[lstack.length - (len || 1)].range[0],
|
190
|
+
lstack[lstack.length - 1].range[1]
|
191
|
+
];
|
192
|
+
}
|
193
|
+
r = this.performAction.apply(yyval, [
|
194
|
+
yytext,
|
195
|
+
yyleng,
|
196
|
+
yylineno,
|
197
|
+
sharedState.yy,
|
198
|
+
action[1],
|
199
|
+
vstack,
|
200
|
+
lstack
|
201
|
+
].concat(args));
|
202
|
+
if (typeof r !== "undefined") {
|
203
|
+
return r;
|
204
|
+
}
|
205
|
+
if (len) {
|
206
|
+
stack = stack.slice(0, -1 * len * 2);
|
207
|
+
vstack = vstack.slice(0, -1 * len);
|
208
|
+
lstack = lstack.slice(0, -1 * len);
|
209
|
+
}
|
210
|
+
stack.push(this.productions_[action[1]][0]);
|
211
|
+
vstack.push(yyval.$);
|
212
|
+
lstack.push(yyval._$);
|
213
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
214
|
+
stack.push(newState);
|
215
|
+
break;
|
216
|
+
case 3:
|
217
|
+
return true;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
return true;
|
221
|
+
}
|
222
|
+
};
|
223
|
+
var lexer = function() {
|
224
|
+
var lexer2 = {
|
225
|
+
EOF: 1,
|
226
|
+
parseError: function parseError(str, hash) {
|
227
|
+
if (this.yy.parser) {
|
228
|
+
this.yy.parser.parseError(str, hash);
|
229
|
+
} else {
|
230
|
+
throw new Error(str);
|
231
|
+
}
|
232
|
+
},
|
233
|
+
// resets the lexer, sets new input
|
234
|
+
setInput: function(input, yy) {
|
235
|
+
this.yy = yy || this.yy || {};
|
236
|
+
this._input = input;
|
237
|
+
this._more = this._backtrack = this.done = false;
|
238
|
+
this.yylineno = this.yyleng = 0;
|
239
|
+
this.yytext = this.matched = this.match = "";
|
240
|
+
this.conditionStack = ["INITIAL"];
|
241
|
+
this.yylloc = {
|
242
|
+
first_line: 1,
|
243
|
+
first_column: 0,
|
244
|
+
last_line: 1,
|
245
|
+
last_column: 0
|
246
|
+
};
|
247
|
+
if (this.options.ranges) {
|
248
|
+
this.yylloc.range = [0, 0];
|
249
|
+
}
|
250
|
+
this.offset = 0;
|
251
|
+
return this;
|
252
|
+
},
|
253
|
+
// consumes and returns one char from the input
|
254
|
+
input: function() {
|
255
|
+
var ch = this._input[0];
|
256
|
+
this.yytext += ch;
|
257
|
+
this.yyleng++;
|
258
|
+
this.offset++;
|
259
|
+
this.match += ch;
|
260
|
+
this.matched += ch;
|
261
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
262
|
+
if (lines) {
|
263
|
+
this.yylineno++;
|
264
|
+
this.yylloc.last_line++;
|
265
|
+
} else {
|
266
|
+
this.yylloc.last_column++;
|
267
|
+
}
|
268
|
+
if (this.options.ranges) {
|
269
|
+
this.yylloc.range[1]++;
|
270
|
+
}
|
271
|
+
this._input = this._input.slice(1);
|
272
|
+
return ch;
|
273
|
+
},
|
274
|
+
// unshifts one char (or a string) into the input
|
275
|
+
unput: function(ch) {
|
276
|
+
var len = ch.length;
|
277
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
278
|
+
this._input = ch + this._input;
|
279
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
280
|
+
this.offset -= len;
|
281
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
282
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
283
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
284
|
+
if (lines.length - 1) {
|
285
|
+
this.yylineno -= lines.length - 1;
|
286
|
+
}
|
287
|
+
var r = this.yylloc.range;
|
288
|
+
this.yylloc = {
|
289
|
+
first_line: this.yylloc.first_line,
|
290
|
+
last_line: this.yylineno + 1,
|
291
|
+
first_column: this.yylloc.first_column,
|
292
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
293
|
+
};
|
294
|
+
if (this.options.ranges) {
|
295
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
296
|
+
}
|
297
|
+
this.yyleng = this.yytext.length;
|
298
|
+
return this;
|
299
|
+
},
|
300
|
+
// When called from action, caches matched text and appends it on next action
|
301
|
+
more: function() {
|
302
|
+
this._more = true;
|
303
|
+
return this;
|
304
|
+
},
|
305
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
306
|
+
reject: function() {
|
307
|
+
if (this.options.backtrack_lexer) {
|
308
|
+
this._backtrack = true;
|
309
|
+
} else {
|
310
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
311
|
+
text: "",
|
312
|
+
token: null,
|
313
|
+
line: this.yylineno
|
314
|
+
});
|
315
|
+
}
|
316
|
+
return this;
|
317
|
+
},
|
318
|
+
// retain first n characters of the match
|
319
|
+
less: function(n) {
|
320
|
+
this.unput(this.match.slice(n));
|
321
|
+
},
|
322
|
+
// displays already matched input, i.e. for error messages
|
323
|
+
pastInput: function() {
|
324
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
325
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
326
|
+
},
|
327
|
+
// displays upcoming input, i.e. for error messages
|
328
|
+
upcomingInput: function() {
|
329
|
+
var next = this.match;
|
330
|
+
if (next.length < 20) {
|
331
|
+
next += this._input.substr(0, 20 - next.length);
|
332
|
+
}
|
333
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
334
|
+
},
|
335
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
336
|
+
showPosition: function() {
|
337
|
+
var pre = this.pastInput();
|
338
|
+
var c = new Array(pre.length + 1).join("-");
|
339
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
340
|
+
},
|
341
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
342
|
+
test_match: function(match, indexed_rule) {
|
343
|
+
var token, lines, backup;
|
344
|
+
if (this.options.backtrack_lexer) {
|
345
|
+
backup = {
|
346
|
+
yylineno: this.yylineno,
|
347
|
+
yylloc: {
|
348
|
+
first_line: this.yylloc.first_line,
|
349
|
+
last_line: this.last_line,
|
350
|
+
first_column: this.yylloc.first_column,
|
351
|
+
last_column: this.yylloc.last_column
|
352
|
+
},
|
353
|
+
yytext: this.yytext,
|
354
|
+
match: this.match,
|
355
|
+
matches: this.matches,
|
356
|
+
matched: this.matched,
|
357
|
+
yyleng: this.yyleng,
|
358
|
+
offset: this.offset,
|
359
|
+
_more: this._more,
|
360
|
+
_input: this._input,
|
361
|
+
yy: this.yy,
|
362
|
+
conditionStack: this.conditionStack.slice(0),
|
363
|
+
done: this.done
|
364
|
+
};
|
365
|
+
if (this.options.ranges) {
|
366
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
367
|
+
}
|
368
|
+
}
|
369
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
370
|
+
if (lines) {
|
371
|
+
this.yylineno += lines.length;
|
372
|
+
}
|
373
|
+
this.yylloc = {
|
374
|
+
first_line: this.yylloc.last_line,
|
375
|
+
last_line: this.yylineno + 1,
|
376
|
+
first_column: this.yylloc.last_column,
|
377
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
378
|
+
};
|
379
|
+
this.yytext += match[0];
|
380
|
+
this.match += match[0];
|
381
|
+
this.matches = match;
|
382
|
+
this.yyleng = this.yytext.length;
|
383
|
+
if (this.options.ranges) {
|
384
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
385
|
+
}
|
386
|
+
this._more = false;
|
387
|
+
this._backtrack = false;
|
388
|
+
this._input = this._input.slice(match[0].length);
|
389
|
+
this.matched += match[0];
|
390
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
391
|
+
if (this.done && this._input) {
|
392
|
+
this.done = false;
|
393
|
+
}
|
394
|
+
if (token) {
|
395
|
+
return token;
|
396
|
+
} else if (this._backtrack) {
|
397
|
+
for (var k in backup) {
|
398
|
+
this[k] = backup[k];
|
399
|
+
}
|
400
|
+
return false;
|
401
|
+
}
|
402
|
+
return false;
|
403
|
+
},
|
404
|
+
// return next match in input
|
405
|
+
next: function() {
|
406
|
+
if (this.done) {
|
407
|
+
return this.EOF;
|
408
|
+
}
|
409
|
+
if (!this._input) {
|
410
|
+
this.done = true;
|
411
|
+
}
|
412
|
+
var token, match, tempMatch, index;
|
413
|
+
if (!this._more) {
|
414
|
+
this.yytext = "";
|
415
|
+
this.match = "";
|
416
|
+
}
|
417
|
+
var rules = this._currentRules();
|
418
|
+
for (var i = 0; i < rules.length; i++) {
|
419
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
420
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
421
|
+
match = tempMatch;
|
422
|
+
index = i;
|
423
|
+
if (this.options.backtrack_lexer) {
|
424
|
+
token = this.test_match(tempMatch, rules[i]);
|
425
|
+
if (token !== false) {
|
426
|
+
return token;
|
427
|
+
} else if (this._backtrack) {
|
428
|
+
match = false;
|
429
|
+
continue;
|
430
|
+
} else {
|
431
|
+
return false;
|
432
|
+
}
|
433
|
+
} else if (!this.options.flex) {
|
434
|
+
break;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
}
|
438
|
+
if (match) {
|
439
|
+
token = this.test_match(match, rules[index]);
|
440
|
+
if (token !== false) {
|
441
|
+
return token;
|
442
|
+
}
|
443
|
+
return false;
|
444
|
+
}
|
445
|
+
if (this._input === "") {
|
446
|
+
return this.EOF;
|
447
|
+
} else {
|
448
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
449
|
+
text: "",
|
450
|
+
token: null,
|
451
|
+
line: this.yylineno
|
452
|
+
});
|
453
|
+
}
|
454
|
+
},
|
455
|
+
// return next match that has a token
|
456
|
+
lex: function lex() {
|
457
|
+
var r = this.next();
|
458
|
+
if (r) {
|
459
|
+
return r;
|
460
|
+
} else {
|
461
|
+
return this.lex();
|
462
|
+
}
|
463
|
+
},
|
464
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
465
|
+
begin: function begin(condition) {
|
466
|
+
this.conditionStack.push(condition);
|
467
|
+
},
|
468
|
+
// pop the previously active lexer condition state off the condition stack
|
469
|
+
popState: function popState() {
|
470
|
+
var n = this.conditionStack.length - 1;
|
471
|
+
if (n > 0) {
|
472
|
+
return this.conditionStack.pop();
|
473
|
+
} else {
|
474
|
+
return this.conditionStack[0];
|
475
|
+
}
|
476
|
+
},
|
477
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
478
|
+
_currentRules: function _currentRules() {
|
479
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
480
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
481
|
+
} else {
|
482
|
+
return this.conditions["INITIAL"].rules;
|
483
|
+
}
|
484
|
+
},
|
485
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
486
|
+
topState: function topState(n) {
|
487
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
488
|
+
if (n >= 0) {
|
489
|
+
return this.conditionStack[n];
|
490
|
+
} else {
|
491
|
+
return "INITIAL";
|
492
|
+
}
|
493
|
+
},
|
494
|
+
// alias for begin(condition)
|
495
|
+
pushState: function pushState(condition) {
|
496
|
+
this.begin(condition);
|
497
|
+
},
|
498
|
+
// return the number of states currently on the stack
|
499
|
+
stateStackSize: function stateStackSize() {
|
500
|
+
return this.conditionStack.length;
|
501
|
+
},
|
502
|
+
options: { "case-insensitive": true },
|
503
|
+
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
504
|
+
switch ($avoiding_name_collisions) {
|
505
|
+
case 0:
|
506
|
+
yy.getLogger().trace("Found comment", yy_.yytext);
|
507
|
+
return 6;
|
508
|
+
case 1:
|
509
|
+
return 8;
|
510
|
+
case 2:
|
511
|
+
this.begin("CLASS");
|
512
|
+
break;
|
513
|
+
case 3:
|
514
|
+
this.popState();
|
515
|
+
return 16;
|
516
|
+
case 4:
|
517
|
+
this.popState();
|
518
|
+
break;
|
519
|
+
case 5:
|
520
|
+
yy.getLogger().trace("Begin icon");
|
521
|
+
this.begin("ICON");
|
522
|
+
break;
|
523
|
+
case 6:
|
524
|
+
yy.getLogger().trace("SPACELINE");
|
525
|
+
return 6;
|
526
|
+
case 7:
|
527
|
+
return 7;
|
528
|
+
case 8:
|
529
|
+
return 15;
|
530
|
+
case 9:
|
531
|
+
yy.getLogger().trace("end icon");
|
532
|
+
this.popState();
|
533
|
+
break;
|
534
|
+
case 10:
|
535
|
+
yy.getLogger().trace("Exploding node");
|
536
|
+
this.begin("NODE");
|
537
|
+
return 19;
|
538
|
+
case 11:
|
539
|
+
yy.getLogger().trace("Cloud");
|
540
|
+
this.begin("NODE");
|
541
|
+
return 19;
|
542
|
+
case 12:
|
543
|
+
yy.getLogger().trace("Explosion Bang");
|
544
|
+
this.begin("NODE");
|
545
|
+
return 19;
|
546
|
+
case 13:
|
547
|
+
yy.getLogger().trace("Cloud Bang");
|
548
|
+
this.begin("NODE");
|
549
|
+
return 19;
|
550
|
+
case 14:
|
551
|
+
this.begin("NODE");
|
552
|
+
return 19;
|
553
|
+
case 15:
|
554
|
+
this.begin("NODE");
|
555
|
+
return 19;
|
556
|
+
case 16:
|
557
|
+
this.begin("NODE");
|
558
|
+
return 19;
|
559
|
+
case 17:
|
560
|
+
this.begin("NODE");
|
561
|
+
return 19;
|
562
|
+
case 18:
|
563
|
+
return 13;
|
564
|
+
case 19:
|
565
|
+
return 22;
|
566
|
+
case 20:
|
567
|
+
return 11;
|
568
|
+
case 21:
|
569
|
+
this.begin("NSTR2");
|
570
|
+
break;
|
571
|
+
case 22:
|
572
|
+
return "NODE_DESCR";
|
573
|
+
case 23:
|
574
|
+
this.popState();
|
575
|
+
break;
|
576
|
+
case 24:
|
577
|
+
yy.getLogger().trace("Starting NSTR");
|
578
|
+
this.begin("NSTR");
|
579
|
+
break;
|
580
|
+
case 25:
|
581
|
+
yy.getLogger().trace("description:", yy_.yytext);
|
582
|
+
return "NODE_DESCR";
|
583
|
+
case 26:
|
584
|
+
this.popState();
|
585
|
+
break;
|
586
|
+
case 27:
|
587
|
+
this.popState();
|
588
|
+
yy.getLogger().trace("node end ))");
|
589
|
+
return "NODE_DEND";
|
590
|
+
case 28:
|
591
|
+
this.popState();
|
592
|
+
yy.getLogger().trace("node end )");
|
593
|
+
return "NODE_DEND";
|
594
|
+
case 29:
|
595
|
+
this.popState();
|
596
|
+
yy.getLogger().trace("node end ...", yy_.yytext);
|
597
|
+
return "NODE_DEND";
|
598
|
+
case 30:
|
599
|
+
this.popState();
|
600
|
+
yy.getLogger().trace("node end ((");
|
601
|
+
return "NODE_DEND";
|
602
|
+
case 31:
|
603
|
+
this.popState();
|
604
|
+
yy.getLogger().trace("node end (-");
|
605
|
+
return "NODE_DEND";
|
606
|
+
case 32:
|
607
|
+
this.popState();
|
608
|
+
yy.getLogger().trace("node end (-");
|
609
|
+
return "NODE_DEND";
|
610
|
+
case 33:
|
611
|
+
this.popState();
|
612
|
+
yy.getLogger().trace("node end ((");
|
613
|
+
return "NODE_DEND";
|
614
|
+
case 34:
|
615
|
+
this.popState();
|
616
|
+
yy.getLogger().trace("node end ((");
|
617
|
+
return "NODE_DEND";
|
618
|
+
case 35:
|
619
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
620
|
+
return 20;
|
621
|
+
case 36:
|
622
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
623
|
+
return 20;
|
624
|
+
}
|
625
|
+
},
|
626
|
+
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
627
|
+
conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } }
|
628
|
+
};
|
629
|
+
return lexer2;
|
630
|
+
}();
|
631
|
+
parser2.lexer = lexer;
|
632
|
+
function Parser() {
|
633
|
+
this.yy = {};
|
634
|
+
}
|
635
|
+
Parser.prototype = parser2;
|
636
|
+
parser2.Parser = Parser;
|
637
|
+
return new Parser();
|
638
|
+
}();
|
639
|
+
parser.parser = parser;
|
640
|
+
const parser$1 = parser;
|
641
|
+
let nodes = [];
|
642
|
+
let cnt = 0;
|
643
|
+
let elements = {};
|
644
|
+
const clear = () => {
|
645
|
+
nodes = [];
|
646
|
+
cnt = 0;
|
647
|
+
elements = {};
|
648
|
+
};
|
649
|
+
const getParent = function(level) {
|
650
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
651
|
+
if (nodes[i].level < level) {
|
652
|
+
return nodes[i];
|
653
|
+
}
|
654
|
+
}
|
655
|
+
return null;
|
656
|
+
};
|
657
|
+
const getMindmap = () => {
|
658
|
+
return nodes.length > 0 ? nodes[0] : null;
|
659
|
+
};
|
660
|
+
const addNode = (level, id, descr, type) => {
|
661
|
+
var _a, _b;
|
662
|
+
log.info("addNode", level, id, descr, type);
|
663
|
+
const conf = getConfig();
|
664
|
+
let padding = ((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? defaultConfig.mindmap.padding;
|
665
|
+
switch (type) {
|
666
|
+
case nodeType.ROUNDED_RECT:
|
667
|
+
case nodeType.RECT:
|
668
|
+
case nodeType.HEXAGON:
|
669
|
+
padding *= 2;
|
670
|
+
}
|
671
|
+
const node = {
|
672
|
+
id: cnt++,
|
673
|
+
nodeId: sanitizeText(id, conf),
|
674
|
+
level,
|
675
|
+
descr: sanitizeText(descr, conf),
|
676
|
+
type,
|
677
|
+
children: [],
|
678
|
+
width: ((_b = conf.mindmap) == null ? void 0 : _b.maxNodeWidth) ?? defaultConfig.mindmap.maxNodeWidth,
|
679
|
+
padding
|
680
|
+
};
|
681
|
+
const parent = getParent(level);
|
682
|
+
if (parent) {
|
683
|
+
parent.children.push(node);
|
684
|
+
nodes.push(node);
|
685
|
+
} else {
|
686
|
+
if (nodes.length === 0) {
|
687
|
+
nodes.push(node);
|
688
|
+
} else {
|
689
|
+
throw new Error(
|
690
|
+
'There can be only one root. No parent could be found for ("' + node.descr + '")'
|
691
|
+
);
|
692
|
+
}
|
693
|
+
}
|
694
|
+
};
|
695
|
+
const nodeType = {
|
696
|
+
DEFAULT: 0,
|
697
|
+
NO_BORDER: 0,
|
698
|
+
ROUNDED_RECT: 1,
|
699
|
+
RECT: 2,
|
700
|
+
CIRCLE: 3,
|
701
|
+
CLOUD: 4,
|
702
|
+
BANG: 5,
|
703
|
+
HEXAGON: 6
|
704
|
+
};
|
705
|
+
const getType = (startStr, endStr) => {
|
706
|
+
log.debug("In get type", startStr, endStr);
|
707
|
+
switch (startStr) {
|
708
|
+
case "[":
|
709
|
+
return nodeType.RECT;
|
710
|
+
case "(":
|
711
|
+
return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD;
|
712
|
+
case "((":
|
713
|
+
return nodeType.CIRCLE;
|
714
|
+
case ")":
|
715
|
+
return nodeType.CLOUD;
|
716
|
+
case "))":
|
717
|
+
return nodeType.BANG;
|
718
|
+
case "{{":
|
719
|
+
return nodeType.HEXAGON;
|
720
|
+
default:
|
721
|
+
return nodeType.DEFAULT;
|
722
|
+
}
|
723
|
+
};
|
724
|
+
const setElementForId = (id, element) => {
|
725
|
+
elements[id] = element;
|
726
|
+
};
|
727
|
+
const decorateNode = (decoration) => {
|
728
|
+
if (!decoration) {
|
729
|
+
return;
|
730
|
+
}
|
731
|
+
const config = getConfig();
|
732
|
+
const node = nodes[nodes.length - 1];
|
733
|
+
if (decoration.icon) {
|
734
|
+
node.icon = sanitizeText(decoration.icon, config);
|
735
|
+
}
|
736
|
+
if (decoration.class) {
|
737
|
+
node.class = sanitizeText(decoration.class, config);
|
738
|
+
}
|
739
|
+
};
|
740
|
+
const type2Str = (type) => {
|
741
|
+
switch (type) {
|
742
|
+
case nodeType.DEFAULT:
|
743
|
+
return "no-border";
|
744
|
+
case nodeType.RECT:
|
745
|
+
return "rect";
|
746
|
+
case nodeType.ROUNDED_RECT:
|
747
|
+
return "rounded-rect";
|
748
|
+
case nodeType.CIRCLE:
|
749
|
+
return "circle";
|
750
|
+
case nodeType.CLOUD:
|
751
|
+
return "cloud";
|
752
|
+
case nodeType.BANG:
|
753
|
+
return "bang";
|
754
|
+
case nodeType.HEXAGON:
|
755
|
+
return "hexgon";
|
756
|
+
default:
|
757
|
+
return "no-border";
|
758
|
+
}
|
759
|
+
};
|
760
|
+
const getLogger = () => log;
|
761
|
+
const getElementById = (id) => elements[id];
|
762
|
+
const db = {
|
763
|
+
clear,
|
764
|
+
addNode,
|
765
|
+
getMindmap,
|
766
|
+
nodeType,
|
767
|
+
getType,
|
768
|
+
setElementForId,
|
769
|
+
decorateNode,
|
770
|
+
type2Str,
|
771
|
+
getLogger,
|
772
|
+
getElementById
|
773
|
+
};
|
774
|
+
const db$1 = db;
|
775
|
+
const MAX_SECTIONS = 12;
|
776
|
+
const defaultBkg = function(db2, elem, node, section) {
|
777
|
+
const rd = 5;
|
778
|
+
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
779
|
+
"d",
|
780
|
+
`M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
|
781
|
+
);
|
782
|
+
elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
|
783
|
+
};
|
784
|
+
const rectBkg = function(db2, elem, node) {
|
785
|
+
elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("width", node.width);
|
786
|
+
};
|
787
|
+
const cloudBkg = function(db2, elem, node) {
|
788
|
+
const w = node.width;
|
789
|
+
const h = node.height;
|
790
|
+
const r1 = 0.15 * w;
|
791
|
+
const r2 = 0.25 * w;
|
792
|
+
const r3 = 0.35 * w;
|
793
|
+
const r4 = 0.2 * w;
|
794
|
+
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
795
|
+
"d",
|
796
|
+
`M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}
|
797
|
+
a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}
|
798
|
+
a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}
|
799
|
+
|
800
|
+
a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}
|
801
|
+
a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}
|
802
|
+
|
803
|
+
a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}
|
804
|
+
a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}
|
805
|
+
a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}
|
806
|
+
|
807
|
+
a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}
|
808
|
+
a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}
|
809
|
+
|
810
|
+
H0 V0 Z`
|
811
|
+
);
|
812
|
+
};
|
813
|
+
const bangBkg = function(db2, elem, node) {
|
814
|
+
const w = node.width;
|
815
|
+
const h = node.height;
|
816
|
+
const r = 0.15 * w;
|
817
|
+
elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr(
|
818
|
+
"d",
|
819
|
+
`M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}
|
820
|
+
a${r},${r} 1 0,0 ${w * 0.25},${0}
|
821
|
+
a${r},${r} 1 0,0 ${w * 0.25},${0}
|
822
|
+
a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}
|
823
|
+
|
824
|
+
a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}
|
825
|
+
a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}
|
826
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}
|
827
|
+
|
828
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}
|
829
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
|
830
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}
|
831
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}
|
832
|
+
|
833
|
+
a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}
|
834
|
+
a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}
|
835
|
+
a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}
|
836
|
+
|
837
|
+
H0 V0 Z`
|
838
|
+
);
|
839
|
+
};
|
840
|
+
const circleBkg = function(db2, elem, node) {
|
841
|
+
elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("r", node.width / 2);
|
842
|
+
};
|
843
|
+
function insertPolygonShape(parent, w, h, points, node) {
|
844
|
+
return parent.insert("polygon", ":first-child").attr(
|
845
|
+
"points",
|
846
|
+
points.map(function(d) {
|
847
|
+
return d.x + "," + d.y;
|
848
|
+
}).join(" ")
|
849
|
+
).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")");
|
850
|
+
}
|
851
|
+
const hexagonBkg = function(_db, elem, node) {
|
852
|
+
const h = node.height;
|
853
|
+
const f = 4;
|
854
|
+
const m = h / f;
|
855
|
+
const w = node.width - node.padding + 2 * m;
|
856
|
+
const points = [
|
857
|
+
{ x: m, y: 0 },
|
858
|
+
{ x: w - m, y: 0 },
|
859
|
+
{ x: w, y: -h / 2 },
|
860
|
+
{ x: w - m, y: -h },
|
861
|
+
{ x: m, y: -h },
|
862
|
+
{ x: 0, y: -h / 2 }
|
863
|
+
];
|
864
|
+
insertPolygonShape(elem, w, h, points, node);
|
865
|
+
};
|
866
|
+
const roundedRectBkg = function(db2, elem, node) {
|
867
|
+
elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width);
|
868
|
+
};
|
869
|
+
const drawNode = function(db2, elem, node, fullSection, conf) {
|
870
|
+
const htmlLabels = conf.htmlLabels;
|
871
|
+
const section = fullSection % (MAX_SECTIONS - 1);
|
872
|
+
const nodeElem = elem.append("g");
|
873
|
+
node.section = section;
|
874
|
+
let sectionClass = "section-" + section;
|
875
|
+
if (section < 0) {
|
876
|
+
sectionClass += " section-root";
|
877
|
+
}
|
878
|
+
nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass);
|
879
|
+
const bkgElem = nodeElem.append("g");
|
880
|
+
const textElem = nodeElem.append("g");
|
881
|
+
const description = node.descr.replace(/(<br\/*>)/g, "\n");
|
882
|
+
createText(textElem, description, {
|
883
|
+
useHtmlLabels: htmlLabels,
|
884
|
+
width: node.width,
|
885
|
+
classes: "mindmap-node-label"
|
886
|
+
});
|
887
|
+
if (!htmlLabels) {
|
888
|
+
textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
|
889
|
+
}
|
890
|
+
const bbox = textElem.node().getBBox();
|
891
|
+
const [fontSize] = parseFontSize(conf.fontSize);
|
892
|
+
node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
|
893
|
+
node.width = bbox.width + 2 * node.padding;
|
894
|
+
if (node.icon) {
|
895
|
+
if (node.type === db2.nodeType.CIRCLE) {
|
896
|
+
node.height += 50;
|
897
|
+
node.width += 50;
|
898
|
+
const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;");
|
899
|
+
icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
|
900
|
+
textElem.attr(
|
901
|
+
"transform",
|
902
|
+
"translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")"
|
903
|
+
);
|
904
|
+
} else {
|
905
|
+
node.width += 50;
|
906
|
+
const orgHeight = node.height;
|
907
|
+
node.height = Math.max(orgHeight, 60);
|
908
|
+
const heightDiff = Math.abs(node.height - orgHeight);
|
909
|
+
const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;");
|
910
|
+
icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon);
|
911
|
+
textElem.attr(
|
912
|
+
"transform",
|
913
|
+
"translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")"
|
914
|
+
);
|
915
|
+
}
|
916
|
+
} else {
|
917
|
+
if (!htmlLabels) {
|
918
|
+
const dx = node.width / 2;
|
919
|
+
const dy = node.padding / 2;
|
920
|
+
textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
|
921
|
+
} else {
|
922
|
+
const dx = (node.width - bbox.width) / 2;
|
923
|
+
const dy = (node.height - bbox.height) / 2;
|
924
|
+
textElem.attr("transform", "translate(" + dx + ", " + dy + ")");
|
925
|
+
}
|
926
|
+
}
|
927
|
+
switch (node.type) {
|
928
|
+
case db2.nodeType.DEFAULT:
|
929
|
+
defaultBkg(db2, bkgElem, node, section);
|
930
|
+
break;
|
931
|
+
case db2.nodeType.ROUNDED_RECT:
|
932
|
+
roundedRectBkg(db2, bkgElem, node);
|
933
|
+
break;
|
934
|
+
case db2.nodeType.RECT:
|
935
|
+
rectBkg(db2, bkgElem, node);
|
936
|
+
break;
|
937
|
+
case db2.nodeType.CIRCLE:
|
938
|
+
bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")");
|
939
|
+
circleBkg(db2, bkgElem, node);
|
940
|
+
break;
|
941
|
+
case db2.nodeType.CLOUD:
|
942
|
+
cloudBkg(db2, bkgElem, node);
|
943
|
+
break;
|
944
|
+
case db2.nodeType.BANG:
|
945
|
+
bangBkg(db2, bkgElem, node);
|
946
|
+
break;
|
947
|
+
case db2.nodeType.HEXAGON:
|
948
|
+
hexagonBkg(db2, bkgElem, node);
|
949
|
+
break;
|
950
|
+
}
|
951
|
+
db2.setElementForId(node.id, nodeElem);
|
952
|
+
return node.height;
|
953
|
+
};
|
954
|
+
const positionNode = function(db2, node) {
|
955
|
+
const nodeElem = db2.getElementById(node.id);
|
956
|
+
const x = node.x || 0;
|
957
|
+
const y = node.y || 0;
|
958
|
+
nodeElem.attr("transform", "translate(" + x + "," + y + ")");
|
959
|
+
};
|
960
|
+
cytoscape.use(coseBilkent);
|
961
|
+
function drawNodes(db2, svg, mindmap, section, conf) {
|
962
|
+
drawNode(db2, svg, mindmap, section, conf);
|
963
|
+
if (mindmap.children) {
|
964
|
+
mindmap.children.forEach((child, index) => {
|
965
|
+
drawNodes(db2, svg, child, section < 0 ? index : section, conf);
|
966
|
+
});
|
967
|
+
}
|
968
|
+
}
|
969
|
+
function drawEdges(edgesEl, cy) {
|
970
|
+
cy.edges().map((edge, id) => {
|
971
|
+
const data = edge.data();
|
972
|
+
if (edge[0]._private.bodyBounds) {
|
973
|
+
const bounds = edge[0]._private.rscratch;
|
974
|
+
log.trace("Edge: ", id, data);
|
975
|
+
edgesEl.insert("path").attr(
|
976
|
+
"d",
|
977
|
+
`M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `
|
978
|
+
).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth);
|
979
|
+
}
|
980
|
+
});
|
981
|
+
}
|
982
|
+
function addNodes(mindmap, cy, conf, level) {
|
983
|
+
cy.add({
|
984
|
+
group: "nodes",
|
985
|
+
data: {
|
986
|
+
id: mindmap.id.toString(),
|
987
|
+
labelText: mindmap.descr,
|
988
|
+
height: mindmap.height,
|
989
|
+
width: mindmap.width,
|
990
|
+
level,
|
991
|
+
nodeId: mindmap.id,
|
992
|
+
padding: mindmap.padding,
|
993
|
+
type: mindmap.type
|
994
|
+
},
|
995
|
+
position: {
|
996
|
+
x: mindmap.x,
|
997
|
+
y: mindmap.y
|
998
|
+
}
|
999
|
+
});
|
1000
|
+
if (mindmap.children) {
|
1001
|
+
mindmap.children.forEach((child) => {
|
1002
|
+
addNodes(child, cy, conf, level + 1);
|
1003
|
+
cy.add({
|
1004
|
+
group: "edges",
|
1005
|
+
data: {
|
1006
|
+
id: `${mindmap.id}_${child.id}`,
|
1007
|
+
source: mindmap.id,
|
1008
|
+
target: child.id,
|
1009
|
+
depth: level,
|
1010
|
+
section: child.section
|
1011
|
+
}
|
1012
|
+
});
|
1013
|
+
});
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
function layoutMindmap(node, conf) {
|
1017
|
+
return new Promise((resolve) => {
|
1018
|
+
const renderEl = select("body").append("div").attr("id", "cy").attr("style", "display:none");
|
1019
|
+
const cy = cytoscape({
|
1020
|
+
container: document.getElementById("cy"),
|
1021
|
+
// container to render in
|
1022
|
+
style: [
|
1023
|
+
{
|
1024
|
+
selector: "edge",
|
1025
|
+
style: {
|
1026
|
+
"curve-style": "bezier"
|
1027
|
+
}
|
1028
|
+
}
|
1029
|
+
]
|
1030
|
+
});
|
1031
|
+
renderEl.remove();
|
1032
|
+
addNodes(node, cy, conf, 0);
|
1033
|
+
cy.nodes().forEach(function(n) {
|
1034
|
+
n.layoutDimensions = () => {
|
1035
|
+
const data = n.data();
|
1036
|
+
return { w: data.width, h: data.height };
|
1037
|
+
};
|
1038
|
+
});
|
1039
|
+
cy.layout({
|
1040
|
+
name: "cose-bilkent",
|
1041
|
+
// @ts-ignore Types for cose-bilkent are not correct?
|
1042
|
+
quality: "proof",
|
1043
|
+
styleEnabled: false,
|
1044
|
+
animate: false
|
1045
|
+
}).run();
|
1046
|
+
cy.ready((e) => {
|
1047
|
+
log.info("Ready", e);
|
1048
|
+
resolve(cy);
|
1049
|
+
});
|
1050
|
+
});
|
1051
|
+
}
|
1052
|
+
function positionNodes(db2, cy) {
|
1053
|
+
cy.nodes().map((node, id) => {
|
1054
|
+
const data = node.data();
|
1055
|
+
data.x = node.position().x;
|
1056
|
+
data.y = node.position().y;
|
1057
|
+
positionNode(db2, data);
|
1058
|
+
const el = db2.getElementById(data.nodeId);
|
1059
|
+
log.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data);
|
1060
|
+
el.attr(
|
1061
|
+
"transform",
|
1062
|
+
`translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`
|
1063
|
+
);
|
1064
|
+
el.attr("attr", `apa-${id})`);
|
1065
|
+
});
|
1066
|
+
}
|
1067
|
+
const draw = async (text, id, _version, diagObj) => {
|
1068
|
+
var _a, _b;
|
1069
|
+
log.debug("Rendering mindmap diagram\n" + text);
|
1070
|
+
const db2 = diagObj.db;
|
1071
|
+
const mm = db2.getMindmap();
|
1072
|
+
if (!mm) {
|
1073
|
+
return;
|
1074
|
+
}
|
1075
|
+
const conf = getConfig();
|
1076
|
+
conf.htmlLabels = false;
|
1077
|
+
const svg = selectSvgElement(id);
|
1078
|
+
const edgesElem = svg.append("g");
|
1079
|
+
edgesElem.attr("class", "mindmap-edges");
|
1080
|
+
const nodesElem = svg.append("g");
|
1081
|
+
nodesElem.attr("class", "mindmap-nodes");
|
1082
|
+
drawNodes(db2, nodesElem, mm, -1, conf);
|
1083
|
+
const cy = await layoutMindmap(mm, conf);
|
1084
|
+
drawEdges(edgesElem, cy);
|
1085
|
+
positionNodes(db2, cy);
|
1086
|
+
setupGraphViewbox(
|
1087
|
+
void 0,
|
1088
|
+
svg,
|
1089
|
+
((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? defaultConfig.mindmap.padding,
|
1090
|
+
((_b = conf.mindmap) == null ? void 0 : _b.useMaxWidth) ?? defaultConfig.mindmap.useMaxWidth
|
1091
|
+
);
|
1092
|
+
};
|
1093
|
+
const renderer = {
|
1094
|
+
draw
|
1095
|
+
};
|
1096
|
+
const genSections = (options) => {
|
1097
|
+
let sections = "";
|
1098
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
1099
|
+
options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
|
1100
|
+
if (isDark(options["lineColor" + i])) {
|
1101
|
+
options["lineColor" + i] = lighten(options["lineColor" + i], 20);
|
1102
|
+
} else {
|
1103
|
+
options["lineColor" + i] = darken(options["lineColor" + i], 20);
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
1107
|
+
const sw = "" + (17 - 3 * i);
|
1108
|
+
sections += `
|
1109
|
+
.section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
|
1110
|
+
fill: ${options["cScale" + i]};
|
1111
|
+
}
|
1112
|
+
.section-${i - 1} text {
|
1113
|
+
fill: ${options["cScaleLabel" + i]};
|
1114
|
+
}
|
1115
|
+
.node-icon-${i - 1} {
|
1116
|
+
font-size: 40px;
|
1117
|
+
color: ${options["cScaleLabel" + i]};
|
1118
|
+
}
|
1119
|
+
.section-edge-${i - 1}{
|
1120
|
+
stroke: ${options["cScale" + i]};
|
1121
|
+
}
|
1122
|
+
.edge-depth-${i - 1}{
|
1123
|
+
stroke-width: ${sw};
|
1124
|
+
}
|
1125
|
+
.section-${i - 1} line {
|
1126
|
+
stroke: ${options["cScaleInv" + i]} ;
|
1127
|
+
stroke-width: 3;
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
.disabled, .disabled circle, .disabled text {
|
1131
|
+
fill: lightgray;
|
1132
|
+
}
|
1133
|
+
.disabled text {
|
1134
|
+
fill: #efefef;
|
1135
|
+
}
|
1136
|
+
`;
|
1137
|
+
}
|
1138
|
+
return sections;
|
1139
|
+
};
|
1140
|
+
const getStyles = (options) => `
|
1141
|
+
.edge {
|
1142
|
+
stroke-width: 3;
|
1143
|
+
}
|
1144
|
+
${genSections(options)}
|
1145
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
1146
|
+
fill: ${options.git0};
|
1147
|
+
}
|
1148
|
+
.section-root text {
|
1149
|
+
fill: ${options.gitBranchLabel0};
|
1150
|
+
}
|
1151
|
+
.icon-container {
|
1152
|
+
height:100%;
|
1153
|
+
display: flex;
|
1154
|
+
justify-content: center;
|
1155
|
+
align-items: center;
|
1156
|
+
}
|
1157
|
+
.edge {
|
1158
|
+
fill: none;
|
1159
|
+
}
|
1160
|
+
.mindmap-node-label {
|
1161
|
+
dy: 1em;
|
1162
|
+
alignment-baseline: middle;
|
1163
|
+
text-anchor: middle;
|
1164
|
+
dominant-baseline: middle;
|
1165
|
+
text-align: center;
|
1166
|
+
}
|
1167
|
+
`;
|
1168
|
+
const styles = getStyles;
|
1169
|
+
const diagram = {
|
1170
|
+
db: db$1,
|
1171
|
+
renderer,
|
1172
|
+
parser: parser$1,
|
1173
|
+
styles
|
1174
|
+
};
|
1175
|
+
export {
|
1176
|
+
diagram
|
1177
|
+
};
|