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,251 @@
|
|
1
|
+
import { l as log, M as decodeEntities } from "./mermaid-6dc72991.js";
|
2
|
+
import { fromMarkdown } from "mdast-util-from-markdown";
|
3
|
+
import { dedent } from "ts-dedent";
|
4
|
+
function preprocessMarkdown(markdown) {
|
5
|
+
const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n");
|
6
|
+
const withoutExtraSpaces = dedent(withoutMultipleNewlines);
|
7
|
+
return withoutExtraSpaces;
|
8
|
+
}
|
9
|
+
function markdownToLines(markdown) {
|
10
|
+
const preprocessedMarkdown = preprocessMarkdown(markdown);
|
11
|
+
const { children } = fromMarkdown(preprocessedMarkdown);
|
12
|
+
const lines = [[]];
|
13
|
+
let currentLine = 0;
|
14
|
+
function processNode(node, parentType = "normal") {
|
15
|
+
if (node.type === "text") {
|
16
|
+
const textLines = node.value.split("\n");
|
17
|
+
textLines.forEach((textLine, index) => {
|
18
|
+
if (index !== 0) {
|
19
|
+
currentLine++;
|
20
|
+
lines.push([]);
|
21
|
+
}
|
22
|
+
textLine.split(" ").forEach((word) => {
|
23
|
+
if (word) {
|
24
|
+
lines[currentLine].push({ content: word, type: parentType });
|
25
|
+
}
|
26
|
+
});
|
27
|
+
});
|
28
|
+
} else if (node.type === "strong" || node.type === "emphasis") {
|
29
|
+
node.children.forEach((contentNode) => {
|
30
|
+
processNode(contentNode, node.type);
|
31
|
+
});
|
32
|
+
}
|
33
|
+
}
|
34
|
+
children.forEach((treeNode) => {
|
35
|
+
if (treeNode.type === "paragraph") {
|
36
|
+
treeNode.children.forEach((contentNode) => {
|
37
|
+
processNode(contentNode);
|
38
|
+
});
|
39
|
+
}
|
40
|
+
});
|
41
|
+
return lines;
|
42
|
+
}
|
43
|
+
function markdownToHTML(markdown) {
|
44
|
+
const { children } = fromMarkdown(markdown);
|
45
|
+
function output(node) {
|
46
|
+
if (node.type === "text") {
|
47
|
+
return node.value.replace(/\n/g, "<br/>");
|
48
|
+
} else if (node.type === "strong") {
|
49
|
+
return `<strong>${node.children.map(output).join("")}</strong>`;
|
50
|
+
} else if (node.type === "emphasis") {
|
51
|
+
return `<em>${node.children.map(output).join("")}</em>`;
|
52
|
+
} else if (node.type === "paragraph") {
|
53
|
+
return `<p>${node.children.map(output).join("")}</p>`;
|
54
|
+
}
|
55
|
+
return `Unsupported markdown: ${node.type}`;
|
56
|
+
}
|
57
|
+
return children.map(output).join("");
|
58
|
+
}
|
59
|
+
function splitTextToChars(text) {
|
60
|
+
if (Intl.Segmenter) {
|
61
|
+
return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);
|
62
|
+
}
|
63
|
+
return [...text];
|
64
|
+
}
|
65
|
+
function splitWordToFitWidth(checkFit, word) {
|
66
|
+
const characters = splitTextToChars(word.content);
|
67
|
+
return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);
|
68
|
+
}
|
69
|
+
function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) {
|
70
|
+
if (remainingChars.length === 0) {
|
71
|
+
return [
|
72
|
+
{ content: usedChars.join(""), type },
|
73
|
+
{ content: "", type }
|
74
|
+
];
|
75
|
+
}
|
76
|
+
const [nextChar, ...rest] = remainingChars;
|
77
|
+
const newWord = [...usedChars, nextChar];
|
78
|
+
if (checkFit([{ content: newWord.join(""), type }])) {
|
79
|
+
return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);
|
80
|
+
}
|
81
|
+
if (usedChars.length === 0 && nextChar) {
|
82
|
+
usedChars.push(nextChar);
|
83
|
+
remainingChars.shift();
|
84
|
+
}
|
85
|
+
return [
|
86
|
+
{ content: usedChars.join(""), type },
|
87
|
+
{ content: remainingChars.join(""), type }
|
88
|
+
];
|
89
|
+
}
|
90
|
+
function splitLineToFitWidth(line, checkFit) {
|
91
|
+
if (line.some(({ content }) => content.includes("\n"))) {
|
92
|
+
throw new Error("splitLineToFitWidth does not support newlines in the line");
|
93
|
+
}
|
94
|
+
return splitLineToFitWidthRecursion(line, checkFit);
|
95
|
+
}
|
96
|
+
function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) {
|
97
|
+
if (words.length === 0) {
|
98
|
+
if (newLine.length > 0) {
|
99
|
+
lines.push(newLine);
|
100
|
+
}
|
101
|
+
return lines.length > 0 ? lines : [];
|
102
|
+
}
|
103
|
+
let joiner = "";
|
104
|
+
if (words[0].content === " ") {
|
105
|
+
joiner = " ";
|
106
|
+
words.shift();
|
107
|
+
}
|
108
|
+
const nextWord = words.shift() ?? { content: " ", type: "normal" };
|
109
|
+
const lineWithNextWord = [...newLine];
|
110
|
+
if (joiner !== "") {
|
111
|
+
lineWithNextWord.push({ content: joiner, type: "normal" });
|
112
|
+
}
|
113
|
+
lineWithNextWord.push(nextWord);
|
114
|
+
if (checkFit(lineWithNextWord)) {
|
115
|
+
return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);
|
116
|
+
}
|
117
|
+
if (newLine.length > 0) {
|
118
|
+
lines.push(newLine);
|
119
|
+
words.unshift(nextWord);
|
120
|
+
} else if (nextWord.content) {
|
121
|
+
const [line, rest] = splitWordToFitWidth(checkFit, nextWord);
|
122
|
+
lines.push([line]);
|
123
|
+
if (rest.content) {
|
124
|
+
words.unshift(rest);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
return splitLineToFitWidthRecursion(words, checkFit, lines);
|
128
|
+
}
|
129
|
+
function applyStyle(dom, styleFn) {
|
130
|
+
if (styleFn) {
|
131
|
+
dom.attr("style", styleFn);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
function addHtmlSpan(element, node, width, classes, addBackground = false) {
|
135
|
+
const fo = element.append("foreignObject");
|
136
|
+
const div = fo.append("xhtml:div");
|
137
|
+
const label = node.label;
|
138
|
+
const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
|
139
|
+
div.html(
|
140
|
+
`
|
141
|
+
<span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>"
|
142
|
+
);
|
143
|
+
applyStyle(div, node.labelStyle);
|
144
|
+
div.style("display", "table-cell");
|
145
|
+
div.style("white-space", "nowrap");
|
146
|
+
div.style("max-width", width + "px");
|
147
|
+
div.attr("xmlns", "http://www.w3.org/1999/xhtml");
|
148
|
+
if (addBackground) {
|
149
|
+
div.attr("class", "labelBkg");
|
150
|
+
}
|
151
|
+
let bbox = div.node().getBoundingClientRect();
|
152
|
+
if (bbox.width === width) {
|
153
|
+
div.style("display", "table");
|
154
|
+
div.style("white-space", "break-spaces");
|
155
|
+
div.style("width", width + "px");
|
156
|
+
bbox = div.node().getBoundingClientRect();
|
157
|
+
}
|
158
|
+
fo.style("width", bbox.width);
|
159
|
+
fo.style("height", bbox.height);
|
160
|
+
return fo.node();
|
161
|
+
}
|
162
|
+
function createTspan(textElement, lineIndex, lineHeight) {
|
163
|
+
return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em");
|
164
|
+
}
|
165
|
+
function computeWidthOfText(parentNode, lineHeight, line) {
|
166
|
+
const testElement = parentNode.append("text");
|
167
|
+
const testSpan = createTspan(testElement, 1, lineHeight);
|
168
|
+
updateTextContentAndStyles(testSpan, line);
|
169
|
+
const textLength = testSpan.node().getComputedTextLength();
|
170
|
+
testElement.remove();
|
171
|
+
return textLength;
|
172
|
+
}
|
173
|
+
function computeDimensionOfText(parentNode, lineHeight, text) {
|
174
|
+
var _a;
|
175
|
+
const testElement = parentNode.append("text");
|
176
|
+
const testSpan = createTspan(testElement, 1, lineHeight);
|
177
|
+
updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]);
|
178
|
+
const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect();
|
179
|
+
if (textDimension) {
|
180
|
+
testElement.remove();
|
181
|
+
}
|
182
|
+
return textDimension;
|
183
|
+
}
|
184
|
+
function createFormattedText(width, g, structuredText, addBackground = false) {
|
185
|
+
const lineHeight = 1.1;
|
186
|
+
const labelGroup = g.append("g");
|
187
|
+
const bkg = labelGroup.insert("rect").attr("class", "background");
|
188
|
+
const textElement = labelGroup.append("text").attr("y", "-10.1");
|
189
|
+
let lineIndex = 0;
|
190
|
+
for (const line of structuredText) {
|
191
|
+
const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width;
|
192
|
+
const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);
|
193
|
+
for (const preparedLine of linesUnderWidth) {
|
194
|
+
const tspan = createTspan(textElement, lineIndex, lineHeight);
|
195
|
+
updateTextContentAndStyles(tspan, preparedLine);
|
196
|
+
lineIndex++;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
if (addBackground) {
|
200
|
+
const bbox = textElement.node().getBBox();
|
201
|
+
const padding = 2;
|
202
|
+
bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding);
|
203
|
+
return labelGroup.node();
|
204
|
+
} else {
|
205
|
+
return textElement.node();
|
206
|
+
}
|
207
|
+
}
|
208
|
+
function updateTextContentAndStyles(tspan, wrappedLine) {
|
209
|
+
tspan.text("");
|
210
|
+
wrappedLine.forEach((word, index) => {
|
211
|
+
const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal");
|
212
|
+
if (index === 0) {
|
213
|
+
innerTspan.text(word.content);
|
214
|
+
} else {
|
215
|
+
innerTspan.text(" " + word.content);
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
const createText = (el, text = "", {
|
220
|
+
style = "",
|
221
|
+
isTitle = false,
|
222
|
+
classes = "",
|
223
|
+
useHtmlLabels = true,
|
224
|
+
isNode = true,
|
225
|
+
width = 200,
|
226
|
+
addSvgBackground = false
|
227
|
+
} = {}) => {
|
228
|
+
log.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground);
|
229
|
+
if (useHtmlLabels) {
|
230
|
+
const htmlText = markdownToHTML(text);
|
231
|
+
const node = {
|
232
|
+
isNode,
|
233
|
+
label: decodeEntities(htmlText).replace(
|
234
|
+
/fa[blrs]?:fa-[\w-]+/g,
|
235
|
+
// cspell: disable-line
|
236
|
+
(s) => `<i class='${s.replace(":", " ")}'></i>`
|
237
|
+
),
|
238
|
+
labelStyle: style.replace("fill:", "color:")
|
239
|
+
};
|
240
|
+
const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground);
|
241
|
+
return vertexNode;
|
242
|
+
} else {
|
243
|
+
const structuredText = markdownToLines(text);
|
244
|
+
const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground);
|
245
|
+
return svgLabel;
|
246
|
+
}
|
247
|
+
};
|
248
|
+
export {
|
249
|
+
createText as a,
|
250
|
+
computeDimensionOfText as c
|
251
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export default createLabel;
|
2
|
+
/**
|
3
|
+
* @param _vertexText
|
4
|
+
* @param style
|
5
|
+
* @param isTitle
|
6
|
+
* @param isNode
|
7
|
+
* @deprecated svg-util/createText instead
|
8
|
+
*/
|
9
|
+
declare function createLabel(_vertexText: any, style: any, isTitle: any, isNode: any): SVGTextElement | SVGForeignObjectElement;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { SVG } from '../diagram-api/types.js';
|
2
|
+
import type { EdgeData } from '../types.js';
|
3
|
+
/**
|
4
|
+
* Adds SVG markers to a path element based on the arrow types specified in the edge.
|
5
|
+
*
|
6
|
+
* @param svgPath - The SVG path element to add markers to.
|
7
|
+
* @param edge - The edge data object containing the arrow types.
|
8
|
+
* @param url - The URL of the SVG marker definitions.
|
9
|
+
* @param id - The ID prefix for the SVG marker definitions.
|
10
|
+
* @param diagramType - The type of diagram being rendered.
|
11
|
+
*/
|
12
|
+
export declare const addEdgeMarkers: (svgPath: SVG, edge: Pick<EdgeData, 'arrowTypeStart' | 'arrowTypeEnd'>, url: string, id: string, diagramType: string) => void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export function clear(): void;
|
2
|
+
export function insertEdgeLabel(elem: any, edge: any): any;
|
3
|
+
export function positionEdgeLabel(edge: any, paths: any): void;
|
4
|
+
export function intersection(node: any, outsidePoint: any, insidePoint: any): {
|
5
|
+
x: any;
|
6
|
+
y: number;
|
7
|
+
} | {
|
8
|
+
x: number;
|
9
|
+
y: any;
|
10
|
+
};
|
11
|
+
export function insertEdge(elem: any, e: any, edge: any, clusterDb: any, diagramType: any, graph: any, id: any): {
|
12
|
+
updatedPath: any;
|
13
|
+
originalPath: any;
|
14
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export function render(elem: any, graph: any, markers: any, diagramType: any, id: any): Promise<void>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export { node };
|
3
|
+
export { circle };
|
4
|
+
export { ellipse };
|
5
|
+
export { polygon };
|
6
|
+
export { rect };
|
7
|
+
}
|
8
|
+
export default _default;
|
9
|
+
import node from './intersect-node.js';
|
10
|
+
import circle from './intersect-circle.js';
|
11
|
+
import ellipse from './intersect-ellipse.js';
|
12
|
+
import polygon from './intersect-polygon.js';
|
13
|
+
import rect from './intersect-rect.js';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export default intersectLine;
|
2
|
+
/**
|
3
|
+
* Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.
|
4
|
+
*
|
5
|
+
* @param p1
|
6
|
+
* @param p2
|
7
|
+
* @param q1
|
8
|
+
* @param q2
|
9
|
+
*/
|
10
|
+
declare function intersectLine(p1: any, p2: any, q1: any, q2: any): {
|
11
|
+
x: number;
|
12
|
+
y: number;
|
13
|
+
} | undefined;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export default intersectPolygon;
|
2
|
+
/**
|
3
|
+
* Returns the point ({x, y}) at which the point argument intersects with the node argument assuming
|
4
|
+
* that it has the shape specified by polygon.
|
5
|
+
*
|
6
|
+
* @param node
|
7
|
+
* @param polyPoints
|
8
|
+
* @param point
|
9
|
+
*/
|
10
|
+
declare function intersectPolygon(node: any, polyPoints: any, point: any): any;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export let clusterDb: {};
|
2
|
+
export function clear(): void;
|
3
|
+
export function extractDescendants(id: any, graph: any): any[];
|
4
|
+
export function validate(graph: any): boolean;
|
5
|
+
export function findNonClusterChild(id: any, graph: any): any;
|
6
|
+
export function adjustClustersAndEdges(graph: any, depth: any): void;
|
7
|
+
export function extractor(graph: any, depth: any): void;
|
8
|
+
export function sortNodesByHierarchy(graph: any): any;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* @param parent
|
3
|
+
* @param w
|
4
|
+
* @param h
|
5
|
+
* @param points
|
6
|
+
*/
|
7
|
+
export function insertPolygonShape(parent: any, w: any, h: any, points: any): any;
|
8
|
+
export function labelHelper(parent: any, node: any, _classes: any, isNode: any): Promise<{
|
9
|
+
shapeSvg: any;
|
10
|
+
bbox: any;
|
11
|
+
halfPadding: number;
|
12
|
+
label: any;
|
13
|
+
}>;
|
14
|
+
export function updateNodeBounds(node: any, element: any): void;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { RequiredDeep } from 'type-fest';
|
2
|
+
import type { MermaidConfig } from './config.type.js';
|
3
|
+
/**
|
4
|
+
* Default mermaid configuration options.
|
5
|
+
*
|
6
|
+
* Please see the Mermaid config JSON Schema for the default JSON values.
|
7
|
+
* Non-JSON JS default values are listed in this file, e.g. functions, or
|
8
|
+
* `undefined` (explicitly set so that `configKeys` finds them).
|
9
|
+
*/
|
10
|
+
declare const config: RequiredDeep<MermaidConfig>;
|
11
|
+
export declare const configKeys: Set<string>;
|
12
|
+
export default config;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import type { MermaidConfig } from '../config.type.js';
|
2
|
+
import type { DetectorRecord, DiagramDetector, DiagramLoader, ExternalDiagramDefinition } from './types.js';
|
3
|
+
export declare const detectors: Record<string, DetectorRecord>;
|
4
|
+
/**
|
5
|
+
* Detects the type of the graph text.
|
6
|
+
*
|
7
|
+
* Takes into consideration the possible existence of an `%%init` directive
|
8
|
+
*
|
9
|
+
* @param text - The text defining the graph. For example:
|
10
|
+
*
|
11
|
+
* ```mermaid
|
12
|
+
* %%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%%
|
13
|
+
* graph LR
|
14
|
+
* a-->b
|
15
|
+
* b-->c
|
16
|
+
* c-->d
|
17
|
+
* d-->e
|
18
|
+
* e-->f
|
19
|
+
* f-->g
|
20
|
+
* g-->h
|
21
|
+
* ```
|
22
|
+
*
|
23
|
+
* @param config - The mermaid config.
|
24
|
+
* @returns A graph definition key
|
25
|
+
*/
|
26
|
+
export declare const detectType: (text: string, config?: MermaidConfig) => string;
|
27
|
+
/**
|
28
|
+
* Registers lazy-loaded diagrams to Mermaid.
|
29
|
+
*
|
30
|
+
* The diagram function is loaded asynchronously, so that diagrams are only loaded
|
31
|
+
* if the diagram is detected.
|
32
|
+
*
|
33
|
+
* @remarks
|
34
|
+
* Please note that the order of diagram detectors is important.
|
35
|
+
* The first detector to return `true` is the diagram that will be loaded
|
36
|
+
* and used, so put more specific detectors at the beginning!
|
37
|
+
*
|
38
|
+
* @param diagrams - Diagrams to lazy load, and their detectors, in order of importance.
|
39
|
+
*/
|
40
|
+
export declare const registerLazyLoadedDiagrams: (...diagrams: ExternalDiagramDefinition[]) => void;
|
41
|
+
export declare const addDetector: (key: string, detector: DiagramDetector, loader?: DiagramLoader) => void;
|
42
|
+
export declare const getDiagramLoader: (key: string) => DiagramLoader | undefined;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const addDiagrams: () => void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { DiagramDefinition, DiagramDetector } from './types.js';
|
2
|
+
import * as _commonDb from '../diagrams/common/commonDb.js';
|
3
|
+
export declare const log: Record<import("../logger.js").LogLevel, {
|
4
|
+
(...data: any[]): void;
|
5
|
+
(message?: any, ...optionalParams: any[]): void;
|
6
|
+
}>;
|
7
|
+
export declare const setLogLevel: (level?: string | number) => void;
|
8
|
+
export declare const getConfig: () => import("../config.type.js").MermaidConfig;
|
9
|
+
export declare const setConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
|
10
|
+
export declare const defaultConfig: import("../config.type.js").MermaidConfig;
|
11
|
+
export declare const setSiteConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
|
12
|
+
export declare const sanitizeText: (text: string) => string;
|
13
|
+
export declare const setupGraphViewbox: (graph: any, svgElem: any, padding: any, useMaxWidth: any) => void;
|
14
|
+
export declare const getCommonDb: () => typeof _commonDb;
|
15
|
+
export interface Detectors {
|
16
|
+
[key: string]: DiagramDetector;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Registers the given diagram with Mermaid.
|
20
|
+
*
|
21
|
+
* Can be used for third-party custom diagrams.
|
22
|
+
*
|
23
|
+
* @param id - A unique ID for the given diagram.
|
24
|
+
* @param diagram - The diagram definition.
|
25
|
+
* @param detector - Function that returns `true` if a given mermaid text is this diagram definition.
|
26
|
+
*/
|
27
|
+
export declare const registerDiagram: (id: string, diagram: DiagramDefinition, detector?: DiagramDetector) => void;
|
28
|
+
export declare const getDiagram: (name: string) => DiagramDefinition;
|
29
|
+
export declare class DiagramNotFoundError extends Error {
|
30
|
+
constructor(name: string);
|
31
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { MermaidConfig } from '../config.type.js';
|
2
|
+
interface FrontMatterMetadata {
|
3
|
+
title?: string;
|
4
|
+
displayMode?: string;
|
5
|
+
config?: MermaidConfig;
|
6
|
+
}
|
7
|
+
export interface FrontMatterResult {
|
8
|
+
text: string;
|
9
|
+
metadata: FrontMatterMetadata;
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* Extract and parse frontmatter from text, if present, and sets appropriate
|
13
|
+
* properties in the provided db.
|
14
|
+
* @param text - The text that may have a YAML frontmatter.
|
15
|
+
* @returns text with frontmatter stripped out
|
16
|
+
*/
|
17
|
+
export declare function extractFrontMatter(text: string): FrontMatterResult;
|
18
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const loadRegisteredDiagrams: () => Promise<void>;
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import type { Diagram } from '../Diagram.js';
|
2
|
+
import type { BaseDiagramConfig, MermaidConfig } from '../config.type.js';
|
3
|
+
import type * as d3 from 'd3';
|
4
|
+
export interface DiagramMetadata {
|
5
|
+
title?: string;
|
6
|
+
config?: MermaidConfig;
|
7
|
+
}
|
8
|
+
export interface InjectUtils {
|
9
|
+
_log: any;
|
10
|
+
_setLogLevel: any;
|
11
|
+
_getConfig: any;
|
12
|
+
_sanitizeText: any;
|
13
|
+
_setupGraphViewbox: any;
|
14
|
+
_commonDb: any;
|
15
|
+
/** @deprecated as directives will be pre-processed since https://github.com/mermaid-js/mermaid/pull/4759 */
|
16
|
+
_parseDirective: any;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Generic Diagram DB that may apply to any diagram type.
|
20
|
+
*/
|
21
|
+
export interface DiagramDB {
|
22
|
+
getConfig?: () => BaseDiagramConfig | undefined;
|
23
|
+
clear?: () => void;
|
24
|
+
setDiagramTitle?: (title: string) => void;
|
25
|
+
getDiagramTitle?: () => string;
|
26
|
+
setAccTitle?: (title: string) => void;
|
27
|
+
getAccTitle?: () => string;
|
28
|
+
setAccDescription?: (description: string) => void;
|
29
|
+
getAccDescription?: () => string;
|
30
|
+
setDisplayMode?: (title: string) => void;
|
31
|
+
bindFunctions?: (element: Element) => void;
|
32
|
+
}
|
33
|
+
export interface DiagramStyleClassDef {
|
34
|
+
id: string;
|
35
|
+
styles?: string[];
|
36
|
+
textStyles?: string[];
|
37
|
+
}
|
38
|
+
export interface DiagramRenderer {
|
39
|
+
draw: DrawDefinition;
|
40
|
+
getClasses?: (text: string, diagram: Pick<DiagramDefinition, 'db'>) => Record<string, DiagramStyleClassDef>;
|
41
|
+
}
|
42
|
+
export interface DiagramDefinition {
|
43
|
+
db: DiagramDB;
|
44
|
+
renderer: DiagramRenderer;
|
45
|
+
parser: ParserDefinition;
|
46
|
+
styles?: any;
|
47
|
+
init?: (config: MermaidConfig) => void;
|
48
|
+
injectUtils?: (_log: InjectUtils['_log'], _setLogLevel: InjectUtils['_setLogLevel'], _getConfig: InjectUtils['_getConfig'], _sanitizeText: InjectUtils['_sanitizeText'], _setupGraphViewbox: InjectUtils['_setupGraphViewbox'], _commonDb: InjectUtils['_commonDb'],
|
49
|
+
/** @deprecated as directives will be pre-processed since https://github.com/mermaid-js/mermaid/pull/4759 */
|
50
|
+
_parseDirective: InjectUtils['_parseDirective']) => void;
|
51
|
+
}
|
52
|
+
export interface DetectorRecord {
|
53
|
+
detector: DiagramDetector;
|
54
|
+
loader?: DiagramLoader;
|
55
|
+
}
|
56
|
+
export interface ExternalDiagramDefinition {
|
57
|
+
id: string;
|
58
|
+
detector: DiagramDetector;
|
59
|
+
loader: DiagramLoader;
|
60
|
+
}
|
61
|
+
export type DiagramDetector = (text: string, config?: MermaidConfig) => boolean;
|
62
|
+
export type DiagramLoader = () => Promise<{
|
63
|
+
id: string;
|
64
|
+
diagram: DiagramDefinition;
|
65
|
+
}>;
|
66
|
+
/**
|
67
|
+
* Type for function draws diagram in the tag with id: id based on the graph definition in text.
|
68
|
+
*
|
69
|
+
* @param text - The text of the diagram.
|
70
|
+
* @param id - The id of the diagram which will be used as a DOM element id.
|
71
|
+
* @param version - MermaidJS version from package.json.
|
72
|
+
* @param diagramObject - A standard diagram containing the DB and the text and type etc of the diagram.
|
73
|
+
*/
|
74
|
+
export type DrawDefinition = (text: string, id: string, version: string, diagramObject: Diagram) => void | Promise<void>;
|
75
|
+
export interface ParserDefinition {
|
76
|
+
parse: (text: string) => void;
|
77
|
+
parser: {
|
78
|
+
yy: DiagramDB;
|
79
|
+
};
|
80
|
+
}
|
81
|
+
export type HTML = d3.Selection<HTMLIFrameElement, unknown, Element | null, unknown>;
|
82
|
+
export type SVG = d3.Selection<SVGSVGElement, unknown, Element | null, unknown>;
|
83
|
+
export type Group = d3.Selection<SVGGElement, unknown, Element | null, unknown>;
|
84
|
+
export type DiagramStylesProvider = (options?: any) => string;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|