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,325 @@
|
|
1
|
+
import { D as DEFAULT_STATE_TYPE, a as DIVIDER_TYPE, S as STMT_RELATION, b as STMT_STATE, c as DEFAULT_NESTED_DOC_DIR, p as parser, d as db, s as styles } from "./styles-f80da881.js";
|
2
|
+
import { G as Graph } from "./graph-fe24fab6.js";
|
3
|
+
import { l as log, c as getConfig, j as d3select, A as utils, k as configureSvgSize, f as common } from "./mermaid-dcacb631.js";
|
4
|
+
import { r as render } from "./index-fc479858.js";
|
5
|
+
import "./layout-163b9689.js";
|
6
|
+
import "./clone-9ea6bfeb.js";
|
7
|
+
import "./edges-ce5cfb7c.js";
|
8
|
+
import "./createText-b70fe78a.js";
|
9
|
+
import "./line-87f517ef.js";
|
10
|
+
import "./array-b7dcf730.js";
|
11
|
+
import "./path-39bad7e2.js";
|
12
|
+
const SHAPE_STATE = "rect";
|
13
|
+
const SHAPE_STATE_WITH_DESC = "rectWithTitle";
|
14
|
+
const SHAPE_START = "start";
|
15
|
+
const SHAPE_END = "end";
|
16
|
+
const SHAPE_DIVIDER = "divider";
|
17
|
+
const SHAPE_GROUP = "roundedWithTitle";
|
18
|
+
const SHAPE_NOTE = "note";
|
19
|
+
const SHAPE_NOTEGROUP = "noteGroup";
|
20
|
+
const CSS_DIAGRAM = "statediagram";
|
21
|
+
const CSS_STATE = "state";
|
22
|
+
const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;
|
23
|
+
const CSS_EDGE = "transition";
|
24
|
+
const CSS_NOTE = "note";
|
25
|
+
const CSS_NOTE_EDGE = "note-edge";
|
26
|
+
const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;
|
27
|
+
const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;
|
28
|
+
const CSS_CLUSTER = "cluster";
|
29
|
+
const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;
|
30
|
+
const CSS_CLUSTER_ALT = "cluster-alt";
|
31
|
+
const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;
|
32
|
+
const PARENT = "parent";
|
33
|
+
const NOTE = "note";
|
34
|
+
const DOMID_STATE = "state";
|
35
|
+
const DOMID_TYPE_SPACER = "----";
|
36
|
+
const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;
|
37
|
+
const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;
|
38
|
+
const G_EDGE_STYLE = "fill:none";
|
39
|
+
const G_EDGE_ARROWHEADSTYLE = "fill: #333";
|
40
|
+
const G_EDGE_LABELPOS = "c";
|
41
|
+
const G_EDGE_LABELTYPE = "text";
|
42
|
+
const G_EDGE_THICKNESS = "normal";
|
43
|
+
let nodeDb = {};
|
44
|
+
let graphItemCount = 0;
|
45
|
+
const setConf = function(cnf) {
|
46
|
+
const keys = Object.keys(cnf);
|
47
|
+
for (const key of keys) {
|
48
|
+
cnf[key];
|
49
|
+
}
|
50
|
+
};
|
51
|
+
const getClasses = function(text, diagramObj) {
|
52
|
+
diagramObj.db.extract(diagramObj.db.getRootDocV2());
|
53
|
+
return diagramObj.db.getClasses();
|
54
|
+
};
|
55
|
+
function getClassesFromDbInfo(dbInfoItem) {
|
56
|
+
if (dbInfoItem === void 0 || dbInfoItem === null) {
|
57
|
+
return "";
|
58
|
+
} else {
|
59
|
+
if (dbInfoItem.classes) {
|
60
|
+
return dbInfoItem.classes.join(" ");
|
61
|
+
} else {
|
62
|
+
return "";
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) {
|
67
|
+
const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : "";
|
68
|
+
return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;
|
69
|
+
}
|
70
|
+
const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => {
|
71
|
+
const itemId = parsedItem.id;
|
72
|
+
const classStr = getClassesFromDbInfo(diagramStates[itemId]);
|
73
|
+
if (itemId !== "root") {
|
74
|
+
let shape = SHAPE_STATE;
|
75
|
+
if (parsedItem.start === true) {
|
76
|
+
shape = SHAPE_START;
|
77
|
+
}
|
78
|
+
if (parsedItem.start === false) {
|
79
|
+
shape = SHAPE_END;
|
80
|
+
}
|
81
|
+
if (parsedItem.type !== DEFAULT_STATE_TYPE) {
|
82
|
+
shape = parsedItem.type;
|
83
|
+
}
|
84
|
+
if (!nodeDb[itemId]) {
|
85
|
+
nodeDb[itemId] = {
|
86
|
+
id: itemId,
|
87
|
+
shape,
|
88
|
+
description: common.sanitizeText(itemId, getConfig()),
|
89
|
+
classes: `${classStr} ${CSS_DIAGRAM_STATE}`
|
90
|
+
};
|
91
|
+
}
|
92
|
+
const newNode = nodeDb[itemId];
|
93
|
+
if (parsedItem.description) {
|
94
|
+
if (Array.isArray(newNode.description)) {
|
95
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
96
|
+
newNode.description.push(parsedItem.description);
|
97
|
+
} else {
|
98
|
+
if (newNode.description.length > 0) {
|
99
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
100
|
+
if (newNode.description === itemId) {
|
101
|
+
newNode.description = [parsedItem.description];
|
102
|
+
} else {
|
103
|
+
newNode.description = [newNode.description, parsedItem.description];
|
104
|
+
}
|
105
|
+
} else {
|
106
|
+
newNode.shape = SHAPE_STATE;
|
107
|
+
newNode.description = parsedItem.description;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig());
|
111
|
+
}
|
112
|
+
if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {
|
113
|
+
newNode.shape = SHAPE_STATE;
|
114
|
+
}
|
115
|
+
if (!newNode.type && parsedItem.doc) {
|
116
|
+
log.info("Setting cluster for ", itemId, getDir(parsedItem));
|
117
|
+
newNode.type = "group";
|
118
|
+
newNode.dir = getDir(parsedItem);
|
119
|
+
newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;
|
120
|
+
newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : "");
|
121
|
+
}
|
122
|
+
const nodeData = {
|
123
|
+
labelStyle: "",
|
124
|
+
shape: newNode.shape,
|
125
|
+
labelText: newNode.description,
|
126
|
+
// typeof newNode.description === 'object'
|
127
|
+
// ? newNode.description[0]
|
128
|
+
// : newNode.description,
|
129
|
+
classes: newNode.classes,
|
130
|
+
style: "",
|
131
|
+
//styles.style,
|
132
|
+
id: itemId,
|
133
|
+
dir: newNode.dir,
|
134
|
+
domId: stateDomId(itemId, graphItemCount),
|
135
|
+
type: newNode.type,
|
136
|
+
padding: 15
|
137
|
+
//getConfig().flowchart.padding
|
138
|
+
};
|
139
|
+
nodeData.centerLabel = true;
|
140
|
+
if (parsedItem.note) {
|
141
|
+
const noteData = {
|
142
|
+
labelStyle: "",
|
143
|
+
shape: SHAPE_NOTE,
|
144
|
+
labelText: parsedItem.note.text,
|
145
|
+
classes: CSS_DIAGRAM_NOTE,
|
146
|
+
// useHtmlLabels: false,
|
147
|
+
style: "",
|
148
|
+
// styles.style,
|
149
|
+
id: itemId + NOTE_ID + "-" + graphItemCount,
|
150
|
+
domId: stateDomId(itemId, graphItemCount, NOTE),
|
151
|
+
type: newNode.type,
|
152
|
+
padding: 15
|
153
|
+
//getConfig().flowchart.padding
|
154
|
+
};
|
155
|
+
const groupData = {
|
156
|
+
labelStyle: "",
|
157
|
+
shape: SHAPE_NOTEGROUP,
|
158
|
+
labelText: parsedItem.note.text,
|
159
|
+
classes: newNode.classes,
|
160
|
+
style: "",
|
161
|
+
// styles.style,
|
162
|
+
id: itemId + PARENT_ID,
|
163
|
+
domId: stateDomId(itemId, graphItemCount, PARENT),
|
164
|
+
type: "group",
|
165
|
+
padding: 0
|
166
|
+
//getConfig().flowchart.padding
|
167
|
+
};
|
168
|
+
graphItemCount++;
|
169
|
+
const parentNodeId = itemId + PARENT_ID;
|
170
|
+
g.setNode(parentNodeId, groupData);
|
171
|
+
g.setNode(noteData.id, noteData);
|
172
|
+
g.setNode(itemId, nodeData);
|
173
|
+
g.setParent(itemId, parentNodeId);
|
174
|
+
g.setParent(noteData.id, parentNodeId);
|
175
|
+
let from = itemId;
|
176
|
+
let to = noteData.id;
|
177
|
+
if (parsedItem.note.position === "left of") {
|
178
|
+
from = noteData.id;
|
179
|
+
to = itemId;
|
180
|
+
}
|
181
|
+
g.setEdge(from, to, {
|
182
|
+
arrowhead: "none",
|
183
|
+
arrowType: "",
|
184
|
+
style: G_EDGE_STYLE,
|
185
|
+
labelStyle: "",
|
186
|
+
classes: CSS_EDGE_NOTE_EDGE,
|
187
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
188
|
+
labelpos: G_EDGE_LABELPOS,
|
189
|
+
labelType: G_EDGE_LABELTYPE,
|
190
|
+
thickness: G_EDGE_THICKNESS
|
191
|
+
});
|
192
|
+
} else {
|
193
|
+
g.setNode(itemId, nodeData);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
if (parent && parent.id !== "root") {
|
197
|
+
log.trace("Setting node ", itemId, " to be child of its parent ", parent.id);
|
198
|
+
g.setParent(itemId, parent.id);
|
199
|
+
}
|
200
|
+
if (parsedItem.doc) {
|
201
|
+
log.trace("Adding nodes children ");
|
202
|
+
setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag);
|
203
|
+
}
|
204
|
+
};
|
205
|
+
const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => {
|
206
|
+
log.trace("items", doc);
|
207
|
+
doc.forEach((item) => {
|
208
|
+
switch (item.stmt) {
|
209
|
+
case STMT_STATE:
|
210
|
+
setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);
|
211
|
+
break;
|
212
|
+
case DEFAULT_STATE_TYPE:
|
213
|
+
setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);
|
214
|
+
break;
|
215
|
+
case STMT_RELATION:
|
216
|
+
{
|
217
|
+
setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag);
|
218
|
+
setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag);
|
219
|
+
const edgeData = {
|
220
|
+
id: "edge" + graphItemCount,
|
221
|
+
arrowhead: "normal",
|
222
|
+
arrowTypeEnd: "arrow_barb",
|
223
|
+
style: G_EDGE_STYLE,
|
224
|
+
labelStyle: "",
|
225
|
+
label: common.sanitizeText(item.description, getConfig()),
|
226
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
227
|
+
labelpos: G_EDGE_LABELPOS,
|
228
|
+
labelType: G_EDGE_LABELTYPE,
|
229
|
+
thickness: G_EDGE_THICKNESS,
|
230
|
+
classes: CSS_EDGE
|
231
|
+
};
|
232
|
+
g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount);
|
233
|
+
graphItemCount++;
|
234
|
+
}
|
235
|
+
break;
|
236
|
+
}
|
237
|
+
});
|
238
|
+
};
|
239
|
+
const getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
240
|
+
let dir = defaultDir;
|
241
|
+
if (parsedItem.doc) {
|
242
|
+
for (let i = 0; i < parsedItem.doc.length; i++) {
|
243
|
+
const parsedItemDoc = parsedItem.doc[i];
|
244
|
+
if (parsedItemDoc.stmt === "dir") {
|
245
|
+
dir = parsedItemDoc.value;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
return dir;
|
250
|
+
};
|
251
|
+
const draw = async function(text, id, _version, diag) {
|
252
|
+
log.info("Drawing state diagram (v2)", id);
|
253
|
+
nodeDb = {};
|
254
|
+
diag.db.getDirection();
|
255
|
+
const { securityLevel, state: conf } = getConfig();
|
256
|
+
const nodeSpacing = conf.nodeSpacing || 50;
|
257
|
+
const rankSpacing = conf.rankSpacing || 50;
|
258
|
+
log.info(diag.db.getRootDocV2());
|
259
|
+
diag.db.extract(diag.db.getRootDocV2());
|
260
|
+
log.info(diag.db.getRootDocV2());
|
261
|
+
const diagramStates = diag.db.getStates();
|
262
|
+
const g = new Graph({
|
263
|
+
multigraph: true,
|
264
|
+
compound: true
|
265
|
+
}).setGraph({
|
266
|
+
rankdir: getDir(diag.db.getRootDocV2()),
|
267
|
+
nodesep: nodeSpacing,
|
268
|
+
ranksep: rankSpacing,
|
269
|
+
marginx: 8,
|
270
|
+
marginy: 8
|
271
|
+
}).setDefaultEdgeLabel(function() {
|
272
|
+
return {};
|
273
|
+
});
|
274
|
+
setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true);
|
275
|
+
let sandboxElement;
|
276
|
+
if (securityLevel === "sandbox") {
|
277
|
+
sandboxElement = d3select("#i" + id);
|
278
|
+
}
|
279
|
+
const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
|
280
|
+
const svg = root.select(`[id="${id}"]`);
|
281
|
+
const element = root.select("#" + id + " g");
|
282
|
+
await render(element, g, ["barb"], CSS_DIAGRAM, id);
|
283
|
+
const padding = 8;
|
284
|
+
utils.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle());
|
285
|
+
const bounds = svg.node().getBBox();
|
286
|
+
const width = bounds.width + padding * 2;
|
287
|
+
const height = bounds.height + padding * 2;
|
288
|
+
svg.attr("class", CSS_DIAGRAM);
|
289
|
+
const svgBounds = svg.node().getBBox();
|
290
|
+
configureSvgSize(svg, height, width, conf.useMaxWidth);
|
291
|
+
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
|
292
|
+
log.debug(`viewBox ${vBox}`);
|
293
|
+
svg.attr("viewBox", vBox);
|
294
|
+
const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
|
295
|
+
for (const label of labels) {
|
296
|
+
const dim = label.getBBox();
|
297
|
+
const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE);
|
298
|
+
rect.setAttribute("rx", 0);
|
299
|
+
rect.setAttribute("ry", 0);
|
300
|
+
rect.setAttribute("width", dim.width);
|
301
|
+
rect.setAttribute("height", dim.height);
|
302
|
+
label.insertBefore(rect, label.firstChild);
|
303
|
+
}
|
304
|
+
};
|
305
|
+
const renderer = {
|
306
|
+
setConf,
|
307
|
+
getClasses,
|
308
|
+
draw
|
309
|
+
};
|
310
|
+
const diagram = {
|
311
|
+
parser,
|
312
|
+
db,
|
313
|
+
renderer,
|
314
|
+
styles,
|
315
|
+
init: (cnf) => {
|
316
|
+
if (!cnf.state) {
|
317
|
+
cnf.state = {};
|
318
|
+
}
|
319
|
+
cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
320
|
+
db.clear();
|
321
|
+
}
|
322
|
+
};
|
323
|
+
export {
|
324
|
+
diagram
|
325
|
+
};
|
@@ -0,0 +1,190 @@
|
|
1
|
+
import { D as H, a as J, S as Q, b as X, c as Z, p as F, d as M, s as I } from "./styles-cacbff60.js";
|
2
|
+
import { G as tt } from "./graph-0ee63739.js";
|
3
|
+
import { l as E, c as g, j as $, A as et, k as ot, f as w } from "./mermaid-9f2aa176.js";
|
4
|
+
import { r as st } from "./index-bb6d8841.js";
|
5
|
+
import "./layout-fd473db2.js";
|
6
|
+
import "./clone-afc2f047.js";
|
7
|
+
import "./edges-16357fde.js";
|
8
|
+
import "./createText-03b82060.js";
|
9
|
+
import "./line-24d93f1b.js";
|
10
|
+
import "./array-2ff2c7a6.js";
|
11
|
+
import "./path-428ebac9.js";
|
12
|
+
const h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", ft = `${_}-${ut}`, Dt = "cluster-alt", bt = `${_}-${Dt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, v = `${N}${V}`, W = "fill:none", m = "fill: #333", z = "c", j = "text", q = "normal";
|
13
|
+
let y = {}, d = 0;
|
14
|
+
const yt = function(t) {
|
15
|
+
const n = Object.keys(t);
|
16
|
+
for (const e of n)
|
17
|
+
t[e];
|
18
|
+
}, gt = function(t, n) {
|
19
|
+
return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
|
20
|
+
};
|
21
|
+
function xt(t) {
|
22
|
+
return t == null ? "" : t.classes ? t.classes.join(" ") : "";
|
23
|
+
}
|
24
|
+
function R(t = "", n = 0, e = "", c = N) {
|
25
|
+
const i = e !== null && e.length > 0 ? `${c}${e}` : "";
|
26
|
+
return `${At}-${t}${i}-${n}`;
|
27
|
+
}
|
28
|
+
const A = (t, n, e, c, i, r) => {
|
29
|
+
const o = e.id, u = xt(c[o]);
|
30
|
+
if (o !== "root") {
|
31
|
+
let T = h;
|
32
|
+
e.start === !0 && (T = nt), e.start === !1 && (T = ct), e.type !== H && (T = e.type), y[o] || (y[o] = {
|
33
|
+
id: o,
|
34
|
+
shape: T,
|
35
|
+
description: w.sanitizeText(o, g()),
|
36
|
+
classes: `${u} ${Et}`
|
37
|
+
});
|
38
|
+
const s = y[o];
|
39
|
+
e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [e.description] : s.description = [s.description, e.description]) : (s.shape = h, s.description = e.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && e.doc && (E.info("Setting cluster for ", o, G(e)), s.type = "group", s.dir = G(e), s.shape = e.type === J ? it : rt, s.classes = s.classes + " " + ft + " " + (r ? bt : ""));
|
40
|
+
const p = {
|
41
|
+
labelStyle: "",
|
42
|
+
shape: s.shape,
|
43
|
+
labelText: s.description,
|
44
|
+
// typeof newNode.description === 'object'
|
45
|
+
// ? newNode.description[0]
|
46
|
+
// : newNode.description,
|
47
|
+
classes: s.classes,
|
48
|
+
style: "",
|
49
|
+
//styles.style,
|
50
|
+
id: o,
|
51
|
+
dir: s.dir,
|
52
|
+
domId: R(o, d),
|
53
|
+
type: s.type,
|
54
|
+
padding: 15
|
55
|
+
//getConfig().flowchart.padding
|
56
|
+
};
|
57
|
+
if (p.centerLabel = !0, e.note) {
|
58
|
+
const l = {
|
59
|
+
labelStyle: "",
|
60
|
+
shape: lt,
|
61
|
+
labelText: e.note.text,
|
62
|
+
classes: _t,
|
63
|
+
// useHtmlLabels: false,
|
64
|
+
style: "",
|
65
|
+
// styles.style,
|
66
|
+
id: o + ht + "-" + d,
|
67
|
+
domId: R(o, d, Y),
|
68
|
+
type: s.type,
|
69
|
+
padding: 15
|
70
|
+
//getConfig().flowchart.padding
|
71
|
+
}, a = {
|
72
|
+
labelStyle: "",
|
73
|
+
shape: at,
|
74
|
+
labelText: e.note.text,
|
75
|
+
classes: s.classes,
|
76
|
+
style: "",
|
77
|
+
// styles.style,
|
78
|
+
id: o + v,
|
79
|
+
domId: R(o, d, V),
|
80
|
+
type: "group",
|
81
|
+
padding: 0
|
82
|
+
//getConfig().flowchart.padding
|
83
|
+
};
|
84
|
+
d++;
|
85
|
+
const f = o + v;
|
86
|
+
t.setNode(f, a), t.setNode(l.id, l), t.setNode(o, p), t.setParent(o, f), t.setParent(l.id, f);
|
87
|
+
let S = o, D = l.id;
|
88
|
+
e.note.position === "left of" && (S = l.id, D = o), t.setEdge(S, D, {
|
89
|
+
arrowhead: "none",
|
90
|
+
arrowType: "",
|
91
|
+
style: W,
|
92
|
+
labelStyle: "",
|
93
|
+
classes: pt,
|
94
|
+
arrowheadStyle: m,
|
95
|
+
labelpos: z,
|
96
|
+
labelType: j,
|
97
|
+
thickness: q
|
98
|
+
});
|
99
|
+
} else
|
100
|
+
t.setNode(o, p);
|
101
|
+
}
|
102
|
+
n && n.id !== "root" && (E.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (E.trace("Adding nodes children "), $t(t, e, e.doc, c, i, !r));
|
103
|
+
}, $t = (t, n, e, c, i, r) => {
|
104
|
+
E.trace("items", e), e.forEach((o) => {
|
105
|
+
switch (o.stmt) {
|
106
|
+
case X:
|
107
|
+
A(t, n, o, c, i, r);
|
108
|
+
break;
|
109
|
+
case H:
|
110
|
+
A(t, n, o, c, i, r);
|
111
|
+
break;
|
112
|
+
case Q:
|
113
|
+
{
|
114
|
+
A(t, n, o.state1, c, i, r), A(t, n, o.state2, c, i, r);
|
115
|
+
const u = {
|
116
|
+
id: "edge" + d,
|
117
|
+
arrowhead: "normal",
|
118
|
+
arrowTypeEnd: "arrow_barb",
|
119
|
+
style: W,
|
120
|
+
labelStyle: "",
|
121
|
+
label: w.sanitizeText(o.description, g()),
|
122
|
+
arrowheadStyle: m,
|
123
|
+
labelpos: z,
|
124
|
+
labelType: j,
|
125
|
+
thickness: q,
|
126
|
+
classes: U
|
127
|
+
};
|
128
|
+
t.setEdge(o.state1.id, o.state2.id, u, d), d++;
|
129
|
+
}
|
130
|
+
break;
|
131
|
+
}
|
132
|
+
});
|
133
|
+
}, G = (t, n = Z) => {
|
134
|
+
let e = n;
|
135
|
+
if (t.doc)
|
136
|
+
for (let c = 0; c < t.doc.length; c++) {
|
137
|
+
const i = t.doc[c];
|
138
|
+
i.stmt === "dir" && (e = i.value);
|
139
|
+
}
|
140
|
+
return e;
|
141
|
+
}, Ct = async function(t, n, e, c) {
|
142
|
+
E.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
|
143
|
+
const { securityLevel: i, state: r } = g(), o = r.nodeSpacing || 50, u = r.rankSpacing || 50;
|
144
|
+
E.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), E.info(c.db.getRootDocV2());
|
145
|
+
const T = c.db.getStates(), s = new tt({
|
146
|
+
multigraph: !0,
|
147
|
+
compound: !0
|
148
|
+
}).setGraph({
|
149
|
+
rankdir: G(c.db.getRootDocV2()),
|
150
|
+
nodesep: o,
|
151
|
+
ranksep: u,
|
152
|
+
marginx: 8,
|
153
|
+
marginy: 8
|
154
|
+
}).setDefaultEdgeLabel(function() {
|
155
|
+
return {};
|
156
|
+
});
|
157
|
+
A(s, void 0, c.db.getRootDocV2(), T, c.db, !0);
|
158
|
+
let p;
|
159
|
+
i === "sandbox" && (p = $("#i" + n));
|
160
|
+
const l = i === "sandbox" ? $(p.nodes()[0].contentDocument.body) : $("body"), a = l.select(`[id="${n}"]`), f = l.select("#" + n + " g");
|
161
|
+
await st(f, s, ["barb"], _, n);
|
162
|
+
const S = 8;
|
163
|
+
et.insertTitle(a, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
|
164
|
+
const D = a.node().getBBox(), L = D.width + S * 2, P = D.height + S * 2;
|
165
|
+
a.attr("class", _);
|
166
|
+
const O = a.node().getBBox();
|
167
|
+
ot(a, P, L, r.useMaxWidth);
|
168
|
+
const k = `${O.x - S} ${O.y - S} ${L} ${P}`;
|
169
|
+
E.debug(`viewBox ${k}`), a.attr("viewBox", k);
|
170
|
+
const K = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
|
171
|
+
for (const x of K) {
|
172
|
+
const B = x.getBBox(), b = document.createElementNS("http://www.w3.org/2000/svg", h);
|
173
|
+
b.setAttribute("rx", 0), b.setAttribute("ry", 0), b.setAttribute("width", B.width), b.setAttribute("height", B.height), x.insertBefore(b, x.firstChild);
|
174
|
+
}
|
175
|
+
}, Rt = {
|
176
|
+
setConf: yt,
|
177
|
+
getClasses: gt,
|
178
|
+
draw: Ct
|
179
|
+
}, Ut = {
|
180
|
+
parser: F,
|
181
|
+
db: M,
|
182
|
+
renderer: Rt,
|
183
|
+
styles: I,
|
184
|
+
init: (t) => {
|
185
|
+
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, M.clear();
|
186
|
+
}
|
187
|
+
};
|
188
|
+
export {
|
189
|
+
Ut as diagram
|
190
|
+
};
|