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