prographs 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +6 -4
  3. package/dist/AutoGraph-PDPEAIXL.cjs +145 -0
  4. package/dist/GraphType.js +19 -0
  5. package/dist/autograph/chartIndex.js +521 -0
  6. package/dist/autograph/chartModules.js +2 -1
  7. package/dist/autograph/index.cjs +98 -93
  8. package/dist/catalog-DI4XZ46L.cjs +142 -0
  9. package/dist/catalog.js +2 -1
  10. package/dist/charts/biologycharts/BiologySamples.js +59 -0
  11. package/dist/charts/biologycharts/PunnettSquare.js +342 -0
  12. package/dist/charts/biologycharts/biologyEnums.js +22 -1
  13. package/dist/charts/biologycharts/index.js +5 -3
  14. package/dist/charts/doecharts/DoeSamples.js +78 -0
  15. package/dist/charts/doecharts/SipocDiagram.js +453 -0
  16. package/dist/charts/doecharts/index.js +4 -2
  17. package/dist/charts/fieldcharts/SpeciesAccumulationCurve.js +350 -0
  18. package/dist/charts/fieldcharts/fieldEnums.js +8 -1
  19. package/dist/charts/fieldcharts/index.js +5 -3
  20. package/dist/charts/signals/AntennaPatternChart.js +492 -0
  21. package/dist/charts/signals/SignalSamples.js +17 -0
  22. package/dist/charts/signals/index.js +5 -3
  23. package/dist/charts/softwarediagrams/ComponentDiagram.js +504 -0
  24. package/dist/charts/softwarediagrams/DeploymentDiagram.js +419 -0
  25. package/dist/charts/softwarediagrams/SoftwareSamples.js +283 -1
  26. package/dist/charts/softwarediagrams/index.js +7 -3
  27. package/dist/charts/softwarediagrams/softwareEnums.js +45 -1
  28. package/dist/charts/sportscharts/PowerDurationCurve.js +301 -0
  29. package/dist/charts/sportscharts/SportsSamples.js +102 -0
  30. package/dist/charts/sportscharts/TrainingLoadChart.js +325 -0
  31. package/dist/charts/sportscharts/index.js +6 -2
  32. package/dist/charts/strategycharts/BassDiffusionChart.js +362 -0
  33. package/dist/charts/strategycharts/BassModel.js +96 -0
  34. package/dist/charts/strategycharts/BurnRunwayChart.js +284 -0
  35. package/dist/charts/strategycharts/CapTableChart.js +366 -0
  36. package/dist/charts/strategycharts/KanbanBoard.js +324 -0
  37. package/dist/charts/strategycharts/OkrTree.js +339 -0
  38. package/dist/charts/strategycharts/StrategyPane.js +27 -0
  39. package/dist/charts/strategycharts/StrategySamples.js +251 -0
  40. package/dist/charts/strategycharts/index.js +15 -3
  41. package/dist/charts/threefields/BsfcMap3DChart.js +231 -0
  42. package/dist/charts/threefields/CompressorMap3DChart.js +217 -0
  43. package/dist/charts/threefields/FieldGrid.js +50 -0
  44. package/dist/charts/threefields/LossLandscape3DChart.js +201 -0
  45. package/dist/charts/threefields/MapSheet.js +77 -0
  46. package/dist/charts/threefields/TerrainRoute3DChart.js +201 -0
  47. package/dist/charts/threefields/TerrainRouteMath.js +40 -0
  48. package/dist/charts/threefields/ThreeFieldBase.js +117 -0
  49. package/dist/charts/threefields/ThreeFieldsSamples.js +80 -0
  50. package/dist/charts/threefields/WaferMap3DChart.js +218 -0
  51. package/dist/charts/threefields/index.js +19 -0
  52. package/dist/charts/threesurfaces/index.js +2 -2
  53. package/dist/charts/tradingcharts/KeltnerChannelChart.js +171 -0
  54. package/dist/charts/tradingcharts/TradingMath.js +20 -0
  55. package/dist/charts/tradingcharts/index.js +4 -2
  56. package/dist/{chunk-ZL6XDXMK.cjs → chunk-26PSLEP4.cjs} +8 -8
  57. package/dist/{chunk-W3US6EFP.cjs → chunk-2BO5DZUP.cjs} +12 -12
  58. package/dist/{chunk-5DP7OUSE.cjs → chunk-2GG5YYSC.cjs} +6 -6
  59. package/dist/{chunk-7FG4JSVO.cjs → chunk-2GL2VNJU.cjs} +253 -33
  60. package/dist/{chunk-LCWMRCLF.cjs → chunk-2PYOI7OY.cjs} +21 -21
  61. package/dist/{chunk-JFWJAEBD.cjs → chunk-3U4MCSKI.cjs} +4 -4
  62. package/dist/{chunk-CUPLHZRR.cjs → chunk-3ZMM3FSK.cjs} +4 -4
  63. package/dist/{chunk-L2AV62DP.cjs → chunk-4767WQJ7.cjs} +6 -6
  64. package/dist/{chunk-DA2EYIIP.cjs → chunk-4E7FSSBF.cjs} +1210 -168
  65. package/dist/{chunk-VS5LQEZB.cjs → chunk-526STI2S.cjs} +5 -5
  66. package/dist/{chunk-RXIMEK6C.cjs → chunk-55767YPI.cjs} +20 -20
  67. package/dist/{chunk-JXLSKIUV.cjs → chunk-5FBQOMMT.cjs} +26 -26
  68. package/dist/{chunk-27PZV5BR.cjs → chunk-5N4Z7MTS.cjs} +4 -4
  69. package/dist/{chunk-KEWCUIQA.cjs → chunk-5WEV6YWA.cjs} +22 -22
  70. package/dist/chunk-5XOVVC5X.cjs +3281 -0
  71. package/dist/{chunk-HK5J7Q2W.cjs → chunk-6HLXVWXU.cjs} +9 -9
  72. package/dist/{chunk-7JG47RW4.cjs → chunk-6LQT4WJ5.cjs} +25 -25
  73. package/dist/{chunk-OCVTI6X4.cjs → chunk-6YTWOUFD.cjs} +329 -36
  74. package/dist/{chunk-W7IQCAVN.cjs → chunk-7F6W6HKL.cjs} +11 -11
  75. package/dist/{chunk-F2DCJXDM.cjs → chunk-7L6KYU5A.cjs} +21 -21
  76. package/dist/{chunk-GTGR6LPR.cjs → chunk-A4GIN4FE.cjs} +17 -17
  77. package/dist/{chunk-B2CETSR6.cjs → chunk-A4US7SA7.cjs} +5 -5
  78. package/dist/{chunk-3DIF2YYW.cjs → chunk-AOXPBLPW.cjs} +10 -10
  79. package/dist/{chunk-7TTR4UF5.cjs → chunk-ATI45Z4M.cjs} +2 -2
  80. package/dist/{chunk-5BFCIX2V.cjs → chunk-CPPMO4IQ.cjs} +434 -148
  81. package/dist/{chunk-AYZZQ6AC.cjs → chunk-CZ5KGF6Q.cjs} +9 -9
  82. package/dist/{chunk-7THJ3ZBK.cjs → chunk-D4I35MCE.cjs} +2 -2
  83. package/dist/{chunk-MCPPFRLN.cjs → chunk-DCGAAN3Z.cjs} +2 -2
  84. package/dist/{chunk-VABL6CVX.cjs → chunk-DEY36N37.cjs} +21 -21
  85. package/dist/{chunk-RNCKGJCC.cjs → chunk-DXHXD3DK.cjs} +3 -3
  86. package/dist/{chunk-A56ZGMVZ.cjs → chunk-E7B45DBZ.cjs} +11 -11
  87. package/dist/{chunk-DOR6L4MT.cjs → chunk-EJC6EAC5.cjs} +18 -18
  88. package/dist/{chunk-UPGNM7MA.cjs → chunk-EULJOOMA.cjs} +11 -11
  89. package/dist/{chunk-G4AZL4GO.cjs → chunk-EYM6LEIF.cjs} +474 -70
  90. package/dist/{chunk-NJ4X6XGV.cjs → chunk-EZTYX2GH.cjs} +5 -5
  91. package/dist/chunk-FDD4UP73.cjs +521 -0
  92. package/dist/{chunk-WJ3VH2Q4.cjs → chunk-GEAIGM3J.cjs} +110 -615
  93. package/dist/{chunk-P3SBHF43.cjs → chunk-GRUYVXTS.cjs} +2 -2
  94. package/dist/{chunk-NX4Z5LMS.cjs → chunk-H3SZXND5.cjs} +5 -5
  95. package/dist/{chunk-EE4S4TOE.cjs → chunk-HS45TOFJ.cjs} +21 -21
  96. package/dist/chunk-INGOG6OV.cjs +899 -0
  97. package/dist/{chunk-UDKA6DGT.cjs → chunk-J3CDXZHF.cjs} +4 -4
  98. package/dist/{chunk-YO6G7TKI.cjs → chunk-JAU5ADEU.cjs} +11 -11
  99. package/dist/{chunk-22LBK4GA.cjs → chunk-JQEBSHX3.cjs} +4 -4
  100. package/dist/{chunk-RXX3U7VQ.cjs → chunk-KLXGLMFU.cjs} +10 -10
  101. package/dist/chunk-KVOX36J3.cjs +327 -0
  102. package/dist/chunk-L6BGNHFL.cjs +139 -0
  103. package/dist/{chunk-GMER35L3.cjs → chunk-L7TB7PU5.cjs} +20 -20
  104. package/dist/{chunk-AFXYNBL2.cjs → chunk-LBTRYEM2.cjs} +4 -4
  105. package/dist/{chunk-WYYCKIOD.cjs → chunk-LLULNJSP.cjs} +11 -11
  106. package/dist/{chunk-J27XOSLP.cjs → chunk-LSO46AFV.cjs} +8 -8
  107. package/dist/{chunk-5XJO45ES.cjs → chunk-LZ2KJ7ZX.cjs} +11 -11
  108. package/dist/chunk-M4IQ5LIZ.cjs +422 -0
  109. package/dist/{chunk-Y2KIUKJF.cjs → chunk-MPDHDKYZ.cjs} +11 -11
  110. package/dist/{chunk-4EMPKRZU.cjs → chunk-MRQ42ZJE.cjs} +3 -3
  111. package/dist/{chunk-EU5D2MF4.cjs → chunk-MYV4KZWP.cjs} +9 -9
  112. package/dist/{chunk-XD7KN4UN.cjs → chunk-MZXVLC24.cjs} +6 -6
  113. package/dist/{chunk-PPSONARU.cjs → chunk-NLBVDFIR.cjs} +41 -2
  114. package/dist/{chunk-L3PEGMGM.cjs → chunk-NY3TBZY4.cjs} +33 -33
  115. package/dist/{chunk-6YNYXXB6.cjs → chunk-OGVVSFAR.cjs} +3 -3
  116. package/dist/{chunk-MLV7QLB6.cjs → chunk-OMTQIQMN.cjs} +6 -6
  117. package/dist/{chunk-BEEOSNK7.cjs → chunk-PEJJ6TXJ.cjs} +15 -144
  118. package/dist/{chunk-SOKOWUF5.cjs → chunk-PPGWHIU7.cjs} +2 -2
  119. package/dist/{chunk-IELWOM2J.cjs → chunk-PPO6SDAN.cjs} +6 -6
  120. package/dist/{chunk-6JTZZCSL.cjs → chunk-PUMKX5F2.cjs} +3 -3
  121. package/dist/{chunk-RFOXFY2U.cjs → chunk-PXBYWCNB.cjs} +190 -799
  122. package/dist/{chunk-3BYXOISI.cjs → chunk-Q3HB3IX6.cjs} +4 -4
  123. package/dist/{chunk-RXCOVONX.cjs → chunk-RBMUOIXE.cjs} +289 -34
  124. package/dist/{chunk-MSBNHCSE.cjs → chunk-RJHGCUUD.cjs} +6 -6
  125. package/dist/{chunk-I6VG7F6Z.cjs → chunk-RSONDMYW.cjs} +708 -141
  126. package/dist/{chunk-GZDNPHMT.cjs → chunk-SHMPFCUE.cjs} +19 -19
  127. package/dist/{chunk-ZIBVCOW6.cjs → chunk-SN4FCXFC.cjs} +19 -19
  128. package/dist/{chunk-7KM52NMN.cjs → chunk-SN5T7WYO.cjs} +2 -2
  129. package/dist/{chunk-7MSZR65Z.cjs → chunk-SQJZGVDR.cjs} +7 -7
  130. package/dist/chunk-SYABFMD7.cjs +633 -0
  131. package/dist/{chunk-2RRFEYFH.cjs → chunk-TICB3MAC.cjs} +16 -16
  132. package/dist/{chunk-AOOKHUV5.cjs → chunk-U7Z7XYR2.cjs} +5 -5
  133. package/dist/{chunk-JEWQAXVG.cjs → chunk-UA2THQFV.cjs} +6 -6
  134. package/dist/{chunk-LHZPAHU3.cjs → chunk-VIK4L2YF.cjs} +112 -521
  135. package/dist/{chunk-4YWMAQ4J.cjs → chunk-VM2Y6BDY.cjs} +4 -4
  136. package/dist/{chunk-IRRKE2ZE.cjs → chunk-VMS3KWYI.cjs} +21 -21
  137. package/dist/{chunk-4SLARW6F.cjs → chunk-VU5NUD46.cjs} +17 -17
  138. package/dist/{chunk-XHY6TVYG.cjs → chunk-VV5CVOF7.cjs} +13 -13
  139. package/dist/{chunk-CCIBPGPZ.cjs → chunk-VYSAWPSS.cjs} +57 -57
  140. package/dist/{chunk-TTNEMQ2A.cjs → chunk-W7YRWEWQ.cjs} +22 -22
  141. package/dist/{chunk-C7MUOGEW.cjs → chunk-X7R5SY62.cjs} +6 -6
  142. package/dist/{chunk-ILR5KBMB.cjs → chunk-XOK3KTSS.cjs} +6 -6
  143. package/dist/{chunk-2CZM2I3T.cjs → chunk-XUIX45VU.cjs} +19 -19
  144. package/dist/{chunk-TGRMPS3A.cjs → chunk-XWH46PVJ.cjs} +165 -43
  145. package/dist/{chunk-WQYXXECR.cjs → chunk-Y5XVMK3K.cjs} +6 -6
  146. package/dist/{chunk-AK4TX2WG.cjs → chunk-YCNKEDTG.cjs} +13 -13
  147. package/dist/{chunk-PJJB24DU.cjs → chunk-YEF7SE3X.cjs} +20 -20
  148. package/dist/{chunk-RVLV4XW6.cjs → chunk-YMTVPMU3.cjs} +22 -22
  149. package/dist/data/index.cjs +2 -2
  150. package/dist/entries/autograph-lazy.cjs +2 -2
  151. package/dist/entries/charts/acoustictransport.cjs +3 -3
  152. package/dist/entries/charts/analysischarts.cjs +3 -3
  153. package/dist/entries/charts/astrocharts.cjs +3 -3
  154. package/dist/entries/charts/bars.cjs +3 -3
  155. package/dist/entries/charts/bayesiancharts.cjs +3 -3
  156. package/dist/entries/charts/biocharts.cjs +3 -3
  157. package/dist/entries/charts/biologycharts.cjs +11 -3
  158. package/dist/entries/charts/biologycharts.d.ts +1 -1
  159. package/dist/entries/charts/biologycharts.js +3 -2
  160. package/dist/entries/charts/business.cjs +3 -3
  161. package/dist/entries/charts/carecharts.cjs +3 -3
  162. package/dist/entries/charts/chemistrycharts.cjs +3 -3
  163. package/dist/entries/charts/civicscharts.cjs +3 -3
  164. package/dist/entries/charts/clinicalcharts.cjs +3 -3
  165. package/dist/entries/charts/comparison.cjs +3 -3
  166. package/dist/entries/charts/demography.cjs +3 -3
  167. package/dist/entries/charts/density.cjs +3 -3
  168. package/dist/entries/charts/diagrams.cjs +3 -3
  169. package/dist/entries/charts/distribution.cjs +3 -3
  170. package/dist/entries/charts/doecharts.cjs +13 -3
  171. package/dist/entries/charts/doecharts.d.ts +1 -1
  172. package/dist/entries/charts/doecharts.js +2 -1
  173. package/dist/entries/charts/earthscience.cjs +3 -3
  174. package/dist/entries/charts/economicscharts.cjs +3 -3
  175. package/dist/entries/charts/energycharts.cjs +3 -3
  176. package/dist/entries/charts/engineering.cjs +3 -3
  177. package/dist/entries/charts/fieldcharts.cjs +7 -3
  178. package/dist/entries/charts/fieldcharts.d.ts +1 -1
  179. package/dist/entries/charts/fieldcharts.js +3 -2
  180. package/dist/entries/charts/financial.cjs +3 -3
  181. package/dist/entries/charts/flow.cjs +3 -3
  182. package/dist/entries/charts/frameworks.cjs +3 -3
  183. package/dist/entries/charts/genomics.cjs +3 -3
  184. package/dist/entries/charts/geoflows.cjs +3 -3
  185. package/dist/entries/charts/geomaps.cjs +3 -3
  186. package/dist/entries/charts/geosciencecharts.cjs +3 -3
  187. package/dist/entries/charts/hierarchy.cjs +3 -3
  188. package/dist/entries/charts/indicators.cjs +3 -3
  189. package/dist/entries/charts/inferencecharts.cjs +3 -3
  190. package/dist/entries/charts/layoutcharts.cjs +3 -3
  191. package/dist/entries/charts/lifescience.cjs +4 -4
  192. package/dist/entries/charts/linesareas.cjs +3 -3
  193. package/dist/entries/charts/logisticscharts.cjs +3 -3
  194. package/dist/entries/charts/machinecharts.cjs +7 -3
  195. package/dist/entries/charts/machinecharts.d.ts +1 -1
  196. package/dist/entries/charts/machinecharts.js +2 -1
  197. package/dist/entries/charts/massive.cjs +3 -3
  198. package/dist/entries/charts/mathematical.cjs +3 -3
  199. package/dist/entries/charts/matrix.cjs +3 -3
  200. package/dist/entries/charts/medicalcharts.cjs +4 -4
  201. package/dist/entries/charts/mlcharts.cjs +4 -4
  202. package/dist/entries/charts/modelcharts.cjs +6 -5
  203. package/dist/entries/charts/multivariate.cjs +3 -3
  204. package/dist/entries/charts/musiccharts.cjs +3 -3
  205. package/dist/entries/charts/network.cjs +3 -3
  206. package/dist/entries/charts/physicscharts.cjs +3 -3
  207. package/dist/entries/charts/pictorial.cjs +4 -4
  208. package/dist/entries/charts/portfoliocharts.cjs +3 -3
  209. package/dist/entries/charts/productcharts.cjs +3 -3
  210. package/dist/entries/charts/proportion.cjs +3 -3
  211. package/dist/entries/charts/qualitycharts.cjs +3 -3
  212. package/dist/entries/charts/radial.cjs +3 -3
  213. package/dist/entries/charts/reliabilitycharts.cjs +5 -3
  214. package/dist/entries/charts/scatter.cjs +3 -3
  215. package/dist/entries/charts/scientific.cjs +3 -3
  216. package/dist/entries/charts/seriescharts.cjs +3 -3
  217. package/dist/entries/charts/signals.cjs +7 -3
  218. package/dist/entries/charts/signals.d.ts +1 -1
  219. package/dist/entries/charts/signals.js +2 -1
  220. package/dist/entries/charts/softwarediagrams.cjs +21 -3
  221. package/dist/entries/charts/softwarediagrams.d.ts +1 -1
  222. package/dist/entries/charts/softwarediagrams.js +4 -2
  223. package/dist/entries/charts/sportscharts.cjs +13 -3
  224. package/dist/entries/charts/sportscharts.d.ts +1 -1
  225. package/dist/entries/charts/sportscharts.js +3 -1
  226. package/dist/entries/charts/statistics.cjs +6 -6
  227. package/dist/entries/charts/strategycharts.cjs +30 -3
  228. package/dist/entries/charts/strategycharts.d.ts +1 -1
  229. package/dist/entries/charts/strategycharts.js +6 -1
  230. package/dist/entries/charts/structure.cjs +3 -3
  231. package/dist/entries/charts/surveycharts.cjs +3 -3
  232. package/dist/entries/charts/systemscharts.cjs +3 -3
  233. package/dist/entries/charts/textcharts.cjs +5 -5
  234. package/dist/entries/charts/thematicmaps.cjs +4 -4
  235. package/dist/entries/charts/threebars.cjs +3 -3
  236. package/dist/entries/charts/threefields.cjs +53 -0
  237. package/dist/entries/charts/threefields.d.ts +1 -0
  238. package/dist/entries/charts/threefields.js +6 -0
  239. package/dist/entries/charts/threeglobe.cjs +3 -3
  240. package/dist/entries/charts/threenetwork.cjs +3 -3
  241. package/dist/entries/charts/threestrata.cjs +3 -3
  242. package/dist/entries/charts/threesurfaces.cjs +7 -3
  243. package/dist/entries/charts/threesurfaces.d.ts +1 -1
  244. package/dist/entries/charts/threesurfaces.js +2 -1
  245. package/dist/entries/charts/threevolume.cjs +4 -4
  246. package/dist/entries/charts/timeline.cjs +3 -3
  247. package/dist/entries/charts/tracecharts.cjs +3 -3
  248. package/dist/entries/charts/trackscharts.cjs +3 -3
  249. package/dist/entries/charts/tradingcharts.cjs +6 -4
  250. package/dist/entries/charts/tradingcharts.d.ts +1 -1
  251. package/dist/entries/charts/tradingcharts.js +2 -1
  252. package/dist/entries/three.cjs +60 -20
  253. package/dist/entries/three.d.ts +1 -1
  254. package/dist/entries/three.js +7 -1
  255. package/dist/index.cjs +258 -97
  256. package/dist/index.d.cts +1953 -10
  257. package/dist/index.d.ts +1953 -10
  258. package/dist/index.js +26 -5
  259. package/dist/page/index.cjs +2 -2
  260. package/dist/react/components.js +58 -1
  261. package/dist/react/index.cjs +135 -92
  262. package/dist/react/index.d.ts +1 -1
  263. package/dist/react/index.js +2 -2
  264. package/package.json +1 -1
  265. package/dist/AutoGraph-XLBJQDRB.cjs +0 -140
  266. package/dist/catalog-O7XGDD2H.cjs +0 -137
  267. package/dist/chunk-77K2HTRC.cjs +0 -3220
  268. package/dist/chunk-XEK47TVD.cjs +0 -323
  269. /package/dist/{chunk-UMEKIIHJ.cjs → chunk-LNWTC72Y.cjs} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14;
2
2
 
3
3
  var _chunkDN5ND7ZDcjs = require('./chunk-DN5ND7ZD.cjs');
4
4
 
@@ -6,7 +6,7 @@ var _chunkDN5ND7ZDcjs = require('./chunk-DN5ND7ZD.cjs');
6
6
  var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
7
7
 
8
8
 
9
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
9
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
10
10
 
11
11
  // src/charts/softwarediagrams/softwareEnums.ts
12
12
  var SoftwareRouting = /* @__PURE__ */ ((SoftwareRouting2) => {
@@ -178,6 +178,44 @@ var TrieLabel = /* @__PURE__ */ ((TrieLabel2) => {
178
178
  TrieLabel2["Node"] = "node";
179
179
  return TrieLabel2;
180
180
  })(TrieLabel || {});
181
+ var ComponentNodeKind = /* @__PURE__ */ ((ComponentNodeKind2) => {
182
+ ComponentNodeKind2["Component"] = "component";
183
+ ComponentNodeKind2["Interface"] = "interface";
184
+ return ComponentNodeKind2;
185
+ })(ComponentNodeKind || {});
186
+ var ComponentLinkKind = /* @__PURE__ */ ((ComponentLinkKind2) => {
187
+ ComponentLinkKind2["Provides"] = "provides";
188
+ ComponentLinkKind2["Requires"] = "requires";
189
+ ComponentLinkKind2["Dependency"] = "dependency";
190
+ return ComponentLinkKind2;
191
+ })(ComponentLinkKind || {});
192
+ var ComponentInterfaceForm = /* @__PURE__ */ ((ComponentInterfaceForm2) => {
193
+ ComponentInterfaceForm2["BallSocket"] = "ball-socket";
194
+ ComponentInterfaceForm2["Dependency"] = "dependency";
195
+ return ComponentInterfaceForm2;
196
+ })(ComponentInterfaceForm || {});
197
+ var ComponentGrouping = /* @__PURE__ */ ((ComponentGrouping2) => {
198
+ ComponentGrouping2["Frames"] = "frames";
199
+ ComponentGrouping2["Flat"] = "flat";
200
+ return ComponentGrouping2;
201
+ })(ComponentGrouping || {});
202
+ var DeploymentKind = /* @__PURE__ */ ((DeploymentKind2) => {
203
+ DeploymentKind2["Node"] = "node";
204
+ DeploymentKind2["Device"] = "device";
205
+ DeploymentKind2["Environment"] = "environment";
206
+ DeploymentKind2["Artifact"] = "artifact";
207
+ return DeploymentKind2;
208
+ })(DeploymentKind || {});
209
+ var DeploymentNodeForm = /* @__PURE__ */ ((DeploymentNodeForm2) => {
210
+ DeploymentNodeForm2["Cube"] = "cube";
211
+ DeploymentNodeForm2["Flat"] = "flat";
212
+ return DeploymentNodeForm2;
213
+ })(DeploymentNodeForm || {});
214
+ var DeploymentArtifactForm = /* @__PURE__ */ ((DeploymentArtifactForm2) => {
215
+ DeploymentArtifactForm2["Symbol"] = "symbol";
216
+ DeploymentArtifactForm2["Listed"] = "listed";
217
+ return DeploymentArtifactForm2;
218
+ })(DeploymentArtifactForm || {});
181
219
 
182
220
  // src/charts/softwarediagrams/SoftwareGraph.ts
183
221
  var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -402,16 +440,16 @@ var SoftwareLayers = class _SoftwareLayers {
402
440
  return span;
403
441
  });
404
442
  const v = /* @__PURE__ */ new Map();
405
- const apart = (a, b) => (size(a) + size(b)) / 2 + gap;
443
+ const apart2 = (a, b) => (size(a) + size(b)) / 2 + gap;
406
444
  const settle = (group, at2, wanted) => {
407
445
  const lo = spans[at2].start + lanePad, hi = spans[at2].start + spans[at2].size - lanePad, end = group.length - 1;
408
446
  const sweep = (rightFirst) => {
409
447
  const out = [...wanted];
410
448
  const right = () => {
411
- for (let i = 0; i <= end; i++) out[i] = Math.max(out[i], i ? out[i - 1] + apart(group[i - 1], group[i]) : lo + size(group[i]) / 2);
449
+ for (let i = 0; i <= end; i++) out[i] = Math.max(out[i], i ? out[i - 1] + apart2(group[i - 1], group[i]) : lo + size(group[i]) / 2);
412
450
  };
413
451
  const left = () => {
414
- for (let i = end; i >= 0; i--) out[i] = Math.min(out[i], i < end ? out[i + 1] - apart(group[i], group[i + 1]) : hi - size(group[i]) / 2);
452
+ for (let i = end; i >= 0; i--) out[i] = Math.min(out[i], i < end ? out[i + 1] - apart2(group[i], group[i + 1]) : hi - size(group[i]) / 2);
415
453
  };
416
454
  if (rightFirst) {
417
455
  right();
@@ -558,11 +596,11 @@ var SoftwareWiring = class _SoftwareWiring {
558
596
  high.set(route.low, [..._nullishCoalesce(high.get(route.low), () => ( [])), { route: i, other: _nullishCoalesce(_optionalChain([route, 'access', _8 => _8.mids, 'access', _9 => _9[0], 'optionalAccess', _10 => _10.v]), () => ( at2(route.high))) }]);
559
597
  low.set(route.high, [..._nullishCoalesce(low.get(route.high), () => ( [])), { route: i, other: _nullishCoalesce(_optionalChain([route, 'access', _11 => _11.mids, 'access', _12 => _12.at, 'call', _13 => _13(-1), 'optionalAccess', _14 => _14.v]), () => ( at2(route.low))) }]);
560
598
  });
561
- for (const side of [low, high]) for (const list of side.values()) list.sort((a, b) => a.other - b.other || a.route - b.route);
599
+ for (const side of [low, high]) for (const list2 of side.values()) list2.sort((a, b) => a.other - b.other || a.route - b.route);
562
600
  const port = (side, id, route) => {
563
- const list = _nullishCoalesce(side.get(id), () => ( [])), node = byId.get(id);
564
- if (!node.ports || list.length < 2) return at2(id);
565
- return at2(id) + ((list.findIndex((end) => end.route === route) + 1) / (list.length + 1) - 0.5) * node.across * (node.ports === "round" ? 0.5 : 0.8);
601
+ const list2 = _nullishCoalesce(side.get(id), () => ( [])), node = byId.get(id);
602
+ if (!node.ports || list2.length < 2) return at2(id);
603
+ return at2(id) + ((list2.findIndex((end) => end.route === route) + 1) / (list2.length + 1) - 0.5) * node.across * (node.ports === "round" ? 0.5 : 0.8);
566
604
  };
567
605
  const reach = (id, v) => {
568
606
  const node = byId.get(id);
@@ -727,11 +765,11 @@ var SoftwareDiagram = class extends _chunkEEF5WRRZcjs.Chart2D {
727
765
 
728
766
  // src/charts/softwarediagrams/SoftwareSamples.ts
729
767
  var { Start, End, Action, Decision, Fork, Join } = ActivityNodeKind;
730
- var pick = (list, u) => list[Math.floor(u() * list.length)];
768
+ var pick = (list2, u) => list2[Math.floor(u() * list2.length)];
731
769
  var SoftwareSamples = class {
732
770
  /** Order fulfilment as a UML activity: `{ id, label, kind, lane }` nodes and `{ source, target, guard }` flows. The seed names the packing step and the reason a payment is retried. */
733
771
  static activity(seed) {
734
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
772
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
735
773
  const extra = pick(["Gift wrap", "Check quality", "Print label"], u), retry = pick(["declined", "refused", "timed out"], u);
736
774
  return {
737
775
  nodes: [
@@ -768,7 +806,7 @@ var SoftwareSamples = class {
768
806
  }
769
807
  /** An order handled between a customer and a retailer, as BPMN: `{ id, label, kind, pool, lane }` elements and `{ source, target, label, kind }` flows. */
770
808
  static bpmn(seed) {
771
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), B = BpmnNodeKind;
809
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), B = BpmnNodeKind;
772
810
  const charge = pick(["Charge card", "Send invoice", "Take deposit"], u), refuse = pick(["Cancel order", "Offer refund", "Wait for stock"], u);
773
811
  const customer = { pool: "Customer" }, sales = { pool: "Retailer", lane: "Sales" }, warehouse = { pool: "Retailer", lane: "Warehouse" };
774
812
  return {
@@ -804,7 +842,7 @@ var SoftwareSamples = class {
804
842
  }
805
843
  /** A level 1 data flow diagram of order processing: `{ id, label, kind, number }` nodes and `{ source, target, label }` flows. */
806
844
  static dataFlow(seed) {
807
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), { Process: Process2, External: External2, Store: Store2 } = DataFlowKind;
845
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { Process: Process2, External: External2, Store: Store2 } = DataFlowKind;
808
846
  const payer = pick(["Bank", "Card network", "Payment gateway"], u), proof = pick(["receipt", "invoice", "confirmation"], u);
809
847
  return {
810
848
  nodes: [
@@ -834,7 +872,7 @@ var SoftwareSamples = class {
834
872
  }
835
873
  /** A producer and a consumer sharing a bounded buffer, as a Petri net: `{ id, label, kind, tokens }` nodes and `{ source, target, weight }` arcs. */
836
874
  static petri(seed) {
837
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), { Place, Transition } = PetriNodeKind;
875
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { Place, Transition } = PetriNodeKind;
838
876
  const held = 1 + Math.floor(u() * 4), producing = u() < 0.5, batch = 1 + Math.floor(u() * 2);
839
877
  return {
840
878
  nodes: [
@@ -867,7 +905,7 @@ var SoftwareSamples = class {
867
905
  }
868
906
  /** A profiled program: `{ id, self, module }` functions with self time in ms, and `{ source, target, calls }` call counts. */
869
907
  static calls(seed) {
870
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
908
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
871
909
  const time = (base) => Math.round(base * (0.6 + u() * 0.8) * 10) / 10, count = (base) => Math.max(1, Math.round(base * (0.5 + u())));
872
910
  return {
873
911
  nodes: [
@@ -904,7 +942,7 @@ var SoftwareSamples = class {
904
942
  }
905
943
  /** A lending library as UML use cases: `{ id, label, kind, role }` actors and use cases, `{ source, target, kind }` relations, and the `system` name. */
906
944
  static useCases(seed) {
907
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), { Actor, UseCase } = UseCaseNodeKind, { Association: Association2, Include: Include2, Extend: Extend2 } = UseCaseLinkKind;
945
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { Actor, UseCase } = UseCaseNodeKind, { Association: Association2, Include: Include2, Extend: Extend2 } = UseCaseLinkKind;
908
946
  const fine = pick(["Pay fine", "Pay late fee", "Settle account"], u), stock = pick(["Manage stock", "Add new title", "Retire old copy"], u);
909
947
  return {
910
948
  system: pick(["Library system", "Lending desk", "Branch library"], u),
@@ -934,7 +972,7 @@ var SoftwareSamples = class {
934
972
  }
935
973
  /** A structured program as nested `{ name, kind, children }` nodes: a loop over orders with nested selections, a multi-way choice and a post-test loop. */
936
974
  static program(seed) {
937
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), { If: If2, Case: Case2, While: While2, Until: Until2 } = NassiKind;
975
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { If: If2, Case: Case2, While: While2, Until: Until2 } = NassiKind;
938
976
  const audit = pick(["Log result", "Update totals", "Notify customer"], u), formats = pick([["PDF", "CSV"], ["HTML", "JSON"], ["Screen", "Printer"]], u);
939
977
  const step = (name) => ({ name });
940
978
  return {
@@ -965,7 +1003,7 @@ var SoftwareSamples = class {
965
1003
  }
966
1004
  /** A microcontroller's address space: `{ region, start, size, used, kind }` rows, sizes in bytes. Peripherals carry no usage. */
967
1005
  static memory(seed) {
968
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), K = 1024, heap = (48 + 16 * Math.floor(u() * 3)) * K;
1006
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), K = 1024, heap = (48 + 16 * Math.floor(u() * 3)) * K;
969
1007
  const region = (name, start, size, kind, share) => ({ region: name, start, size, used: share === void 0 ? null : Math.round(size * share / 64) * 64, kind });
970
1008
  return [
971
1009
  region("Vector table", 134217728, K, "Flash", 1),
@@ -981,7 +1019,7 @@ var SoftwareSamples = class {
981
1019
  }
982
1020
  /** Two profiles of one request handler as nested `{ name, value, before, children }` frames: own samples after and before a change. */
983
1021
  static profiles(seed) {
984
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
1022
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
985
1023
  const frame = (name, before, after, children) => ({ name, before: Math.round(before * (0.8 + u() * 0.4)), value: Math.round(after * (0.8 + u() * 0.4)), children });
986
1024
  return frame("main", 5, 5, [
987
1025
  frame("parseRequest", 12, 12, [frame("readHeaders", 30, 28), frame("jsonDecode", 60, 104), frame("validate", 22, 20)]),
@@ -995,7 +1033,7 @@ var SoftwareSamples = class {
995
1033
  }
996
1034
  /** A feedback control loop as a signal-flow graph: `{ id, label }` signals and `{ source, target, gain }` branches. The seed picks the inner loop and the feedforward path. */
997
1035
  static signalFlow(seed) {
998
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
1036
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
999
1037
  const inner = pick([{ source: "x2", target: "x1", gain: "\u2212H1" }, { source: "x3", target: "x2", gain: "\u2212H1" }], u);
1000
1038
  const bypass = pick([{ source: "x1", target: "x3", gain: "G4" }, { source: "e", target: "x2", gain: "G4" }], u);
1001
1039
  return {
@@ -1014,7 +1052,7 @@ var SoftwareSamples = class {
1014
1052
  }
1015
1053
  /** The concrete syntax tree of one assignment, as nested `{ name, children }` nodes with the tokens at the leaves in source order. */
1016
1054
  static syntax(seed) {
1017
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed);
1055
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
1018
1056
  const [target, left, right, extra] = pick([["total", "price", "qty", "tax"], ["area", "width", "height", "margin"], ["score", "hits", "weight", "bonus"]], u);
1019
1057
  const sum2 = pick(["+", "-"], u), id = (name) => ({ name: "Id", children: [{ name }] });
1020
1058
  return {
@@ -1028,10 +1066,79 @@ var SoftwareSamples = class {
1028
1066
  }
1029
1067
  /** Short keywords with how often each was seen: `{ word, count }` rows for a prefix tree. */
1030
1068
  static keywords(seed) {
1031
- const { u } = _chunkUMEKIIHJcjs.SampleData.rng(seed), all = ["if", "in", "int", "is", "do", "def", "del", "for", "fn", "from", "try", "true"];
1069
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), all = ["if", "in", "int", "is", "do", "def", "del", "for", "fn", "from", "try", "true"];
1032
1070
  const skip = Math.floor(u() * 4);
1033
1071
  return all.filter((_, i) => i % 4 !== skip).map((word) => ({ word, count: Math.round(5 + u() * 90) }));
1034
1072
  }
1073
+ /**
1074
+ * A shop as UML components: `{ id, label, kind, package }` components and interfaces, and `{ source, target, kind, label }` links
1075
+ * that say which component provides or requires which interface, plus one plain dependency. One interface is required and provided by nobody.
1076
+ */
1077
+ static components(seed) {
1078
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { Component, Interface } = ComponentNodeKind, { Provides: Provides2, Requires: Requires2, Dependency: Dependency2 } = ComponentLinkKind;
1079
+ const front = pick(["Web shop", "Mobile app", "Kiosk"], u), gateway = pick(["CardGateway", "BankTransfer", "Wallet"], u), used = pick(["catalogue", "billing"], u);
1080
+ const web = { kind: Component, package: "Front end" }, services = { kind: Component, package: "Services" }, data = { kind: Component, package: "Data" };
1081
+ return {
1082
+ nodes: [
1083
+ { id: "shop", label: front, ...web },
1084
+ { id: "admin", label: "Admin console", ...web },
1085
+ { id: "orders", label: "Order service", ...services },
1086
+ { id: "catalogue", label: "Catalogue", ...services },
1087
+ { id: "billing", label: "Billing", ...services },
1088
+ { id: "store", label: "Order store", ...data },
1089
+ { id: "index", label: "Search index", ...data },
1090
+ ...["Orders", "Products", "Payments", "Persistence", "Search", gateway].map((id) => ({ id, kind: Interface }))
1091
+ ],
1092
+ links: [
1093
+ { source: "orders", target: "Orders", kind: Provides2 },
1094
+ { source: "shop", target: "Orders", kind: Requires2 },
1095
+ { source: "admin", target: "Orders", kind: Requires2 },
1096
+ { source: "catalogue", target: "Products", kind: Provides2 },
1097
+ { source: "shop", target: "Products", kind: Requires2 },
1098
+ { source: "billing", target: "Payments", kind: Provides2 },
1099
+ { source: "orders", target: "Payments", kind: Requires2 },
1100
+ { source: "store", target: "Persistence", kind: Provides2 },
1101
+ { source: "orders", target: "Persistence", kind: Requires2 },
1102
+ { source: "index", target: "Search", kind: Provides2 },
1103
+ { source: "catalogue", target: "Search", kind: Requires2 },
1104
+ { source: "billing", target: gateway, kind: Requires2 },
1105
+ { source: "admin", target: used, kind: Dependency2, label: "\xABuse\xBB" }
1106
+ ]
1107
+ };
1108
+ }
1109
+ /**
1110
+ * Where a shop runs, as a UML deployment: `{ id, label, kind, parent }` devices, execution environments and artifacts, nested
1111
+ * by `parent`, and `{ source, target, protocol }` communication paths.
1112
+ */
1113
+ static deployment(seed) {
1114
+ const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed), { Device, Environment, Artifact: Artifact2 } = DeploymentKind;
1115
+ const client = pick([["Customer phone", "shop.apk"], ["Till", "till.exe"], ["Customer laptop", "shop.js"]], u), wire = pick(["JDBC", "TCP/IP", "TLS"], u);
1116
+ const extra = pick([["Payment host", "gateway.war", "HTTPS"], ["Mail relay", "relay.conf", "SMTP"], ["Report server", "reports.jar", "gRPC"]], u);
1117
+ return {
1118
+ nodes: [
1119
+ { id: "client", label: client[0], kind: Device },
1120
+ { id: "client-app", label: client[1], kind: Artifact2, parent: "client" },
1121
+ { id: "web", label: "Web server", kind: Device },
1122
+ { id: "site", label: "site.conf", kind: Artifact2, parent: "web" },
1123
+ { id: "assets", label: "assets.zip", kind: Artifact2, parent: "web" },
1124
+ { id: "app", label: "Application server", kind: Device },
1125
+ { id: "runtime", label: "Servlet container", kind: Environment, parent: "app" },
1126
+ { id: "orders", label: "orders.war", kind: Artifact2, parent: "runtime" },
1127
+ { id: "billing", label: "billing.war", kind: Artifact2, parent: "runtime" },
1128
+ { id: "db", label: "Database server", kind: Device },
1129
+ { id: "dbms", label: "SQL database", kind: Environment, parent: "db" },
1130
+ { id: "schema", label: "schema.sql", kind: Artifact2, parent: "dbms" },
1131
+ { id: "extra", label: extra[0], kind: Device },
1132
+ { id: "extra-app", label: extra[1], kind: Artifact2, parent: "extra" }
1133
+ ],
1134
+ links: [
1135
+ { source: "client", target: "web", protocol: "HTTPS" },
1136
+ { source: "web", target: "app", protocol: "HTTP" },
1137
+ { source: "app", target: "db", protocol: wire },
1138
+ { source: "app", target: "extra", protocol: extra[2] }
1139
+ ]
1140
+ };
1141
+ }
1035
1142
  };
1036
1143
 
1037
1144
  // src/charts/softwarediagrams/ActivityDiagram.ts
@@ -1399,14 +1506,255 @@ var CallGraph = (_class3 = class _CallGraph extends SoftwareDiagram {
1399
1506
  }
1400
1507
  }, _class3.__initStatic3(), _class3);
1401
1508
 
1402
- // src/charts/softwarediagrams/DataFlowDiagram.ts
1509
+ // src/charts/softwarediagrams/ComponentDiagram.ts
1403
1510
  var SIZE4 = 10.5;
1511
+ var FACE = 10;
1512
+ var BALL = 5;
1513
+ var SOCKET = 8;
1514
+ var PORT = 3.5;
1515
+ var PAD = 8;
1516
+ var TAB = 16;
1517
+ var REACH = 40;
1518
+ var { Provides, Requires, Dependency } = ComponentLinkKind;
1519
+ var stated = (raw, column) => String(_nullishCoalesce(raw[column], () => ( ""))).toLowerCase();
1520
+ var apart = (a, b, by = 0) => a[1] + by < b[0] || b[1] + by < a[0];
1521
+ var list = (names) => names.join(", ") || "none";
1522
+ var ComponentDiagram = (_class4 = class _ComponentDiagram extends SoftwareDiagram {
1523
+ static __initStatic4() {this.meta = {
1524
+ id: "uml-component-diagram",
1525
+ name: "UML component diagram",
1526
+ family: "network" /* Network */,
1527
+ dimension: 2 /* Two */,
1528
+ shape: "graph" /* Graph */,
1529
+ description: "Wires components through provided and required interfaces in ball and socket notation, with ports, dependencies and package frames.",
1530
+ tags: ["uml", "component", "interface", "ball and socket", "lollipop", "port", "package", "software"],
1531
+ sample: (seed) => SoftwareSamples.components(seed),
1532
+ variants: {
1533
+ orientation: ["horizontal" /* Horizontal */, "vertical" /* Vertical */],
1534
+ routing: ["curved" /* Curved */, "orthogonal" /* Orthogonal */],
1535
+ interfaces: ["ball-socket" /* BallSocket */, "dependency" /* Dependency */],
1536
+ grouping: ["frames" /* Frames */, "flat" /* Flat */]
1537
+ }
1538
+ }}
1539
+ defaults() {
1540
+ return {
1541
+ nodeId: "id",
1542
+ label: "label",
1543
+ kind: "kind",
1544
+ group: "package",
1545
+ source: "source",
1546
+ target: "target",
1547
+ linkKind: "kind",
1548
+ linkLabel: "label",
1549
+ orientation: "horizontal" /* Horizontal */,
1550
+ routing: "curved" /* Curved */,
1551
+ interfaces: "ball-socket" /* BallSocket */,
1552
+ grouping: "frames" /* Frames */,
1553
+ ports: true
1554
+ };
1555
+ }
1556
+ legendItems() {
1557
+ return this.options.grouping === "frames" /* Frames */ ? [] : this.palette.items();
1558
+ }
1559
+ #graph() {
1560
+ const { nodeId, source, target } = this.options;
1561
+ return SoftwareGraph.read(this.options.data, { nodeId, source, target });
1562
+ }
1563
+ table() {
1564
+ const { source, target, linkKind, linkLabel } = this.options;
1565
+ return this.rowsOf(this.#graph().arcs.map((arc) => arc.raw), [.../* @__PURE__ */ new Set([source, target, linkKind, linkLabel])]);
1566
+ }
1567
+ /**
1568
+ * Components, interfaces and the links between them. A link between two components is a dependency, one between a
1569
+ * component and an interface provides or requires it whichever end names the component, and the rest are dropped.
1570
+ */
1571
+ static model(graph, columns) {
1572
+ const offered = new Set(graph.arcs.filter((arc) => [Provides, Requires].includes(stated(arc.raw, columns.linkKind))).map((arc) => arc.target));
1573
+ const parts = graph.vertices.map(({ id, raw }) => {
1574
+ const kind = stated(raw, columns.kind);
1575
+ return { id, raw, label: _nullishCoalesce(SoftwareGraph.text(raw[columns.label]), () => ( id)), face: kind === "interface" /* Interface */ || !kind && offered.has(id), group: _nullishCoalesce(SoftwareGraph.text(raw[columns.group]), () => ( "")), shared: false };
1576
+ });
1577
+ const byId = new Map(parts.map((part) => [part.id, part]));
1578
+ const joins = graph.arcs.flatMap((arc) => {
1579
+ const a = byId.get(arc.source), b = byId.get(arc.target);
1580
+ if (a === b || a.face && b.face) return [];
1581
+ if (!a.face && !b.face) return [{ key: arc.key, kind: Dependency, component: a.id, other: b.id, raw: arc.raw }];
1582
+ const [component, face] = a.face ? [b, a] : [a, b];
1583
+ return [{ key: arc.key, kind: stated(arc.raw, columns.linkKind) === Provides ? Provides : Requires, component: component.id, other: face.id, raw: arc.raw }];
1584
+ });
1585
+ for (const part of parts) {
1586
+ if (!part.face) continue;
1587
+ const users = joins.filter((join) => join.other === part.id), owner = _nullishCoalesce(users.find((join) => join.kind === Provides), () => ( users[0]));
1588
+ part.group = owner ? byId.get(owner.component).group : "";
1589
+ part.shared = !users.some((join) => join.kind === Provides) || !users.some((join) => join.kind === Requires) || users.some((join) => byId.get(join.component).group !== part.group);
1590
+ }
1591
+ return { parts, joins };
1592
+ }
1593
+ /**
1594
+ * The lane across the flow that each package takes. Packages share a lane when their frames sit at least a rank
1595
+ * apart along the flow and neither frame takes in an interface of the other, so frames in one lane never touch.
1596
+ */
1597
+ static lanes(spans) {
1598
+ const lanes = [];
1599
+ for (const span of spans) {
1600
+ const fits = (other) => (!other.frame || apart(span.owned, other.frame)) && (!span.frame || apart(other.owned, span.frame)) && (!span.frame || !other.frame || apart(span.frame, other.frame, 1));
1601
+ const free = lanes.find((lane) => lane.every(fits));
1602
+ if (free) free.push(span);
1603
+ else lanes.push([span]);
1604
+ }
1605
+ return new Map(lanes.flatMap((lane, at2) => lane.map((span) => [span.name, at2])));
1606
+ }
1607
+ /** The half circle of a required interface, cupped around the ball at `centre` and open along `angle`, the way its connector runs. */
1608
+ static socket([cx, cy], angle, radius = SOCKET) {
1609
+ const end = (turn) => `${+(cx + radius * Math.cos(angle + turn)).toFixed(2)},${+(cy + radius * Math.sin(angle + turn)).toFixed(2)}`;
1610
+ return `M${end(Math.PI / 2)}A${radius},${radius} 0 0 1 ${end(-Math.PI / 2)}`;
1611
+ }
1612
+ draw(ctx) {
1613
+ const { orientation, routing, interfaces, grouping, ports, label, kind, group, linkKind, linkLabel } = this.options;
1614
+ const vertical = orientation === "vertical" /* Vertical */, socketed = interfaces === "ball-socket" /* BallSocket */;
1615
+ const { theme, palette } = ctx, ink = theme.inkSecondary;
1616
+ const { parts, joins } = _ComponentDiagram.model(this.#graph(), { label, kind, group, linkKind });
1617
+ const byId = new Map(parts.map((part) => [part.id, part]));
1618
+ const links = joins.map((join) => join.kind === Provides ? { source: join.other, target: join.component } : { source: join.component, target: join.other });
1619
+ const framed = grouping === "frames" /* Frames */ && parts.some((part) => part.group);
1620
+ const rank = SoftwareLayers.ranks(parts.map((part) => part.id), links);
1621
+ const reach = (members) => members.length ? [Math.min(...members.map((part) => rank.get(part.id))), Math.max(...members.map((part) => rank.get(part.id)))] : null;
1622
+ const lanes = _ComponentDiagram.lanes(framed ? [...new Set(parts.map((part) => part.group))].map((name) => {
1623
+ const owned = parts.filter((part) => part.group === name);
1624
+ return { name, owned: reach(owned), frame: name ? reach(owned.filter((part) => !part.shared)) : null };
1625
+ }) : []);
1626
+ const lane = (part) => _nullishCoalesce(lanes.get(part.group), () => ( 0)), count = Math.max(1, ...[...lanes.values()].map((at2) => at2 + 1));
1627
+ const half = socketed ? SOCKET : BALL;
1628
+ const lines = new Map(parts.map((part) => [part.id, part.face ? [SoftwareText.fit(part.label, framed && !vertical ? 64 : 78, FACE)] : SoftwareText.wrap(part.label, 96, SIZE4)]));
1629
+ const widest = (id, size) => Math.max(0, ...lines.get(id).map((line) => SoftwareText.width(line, size)));
1630
+ const words = joins.map((join) => join.kind === Dependency ? SoftwareText.fit(_nullishCoalesce(SoftwareGraph.text(join.raw[linkLabel]), () => ( "")), 80, 10) : "");
1631
+ const edge = framed ? 2 * PAD : 0;
1632
+ const plan = SoftwareWiring.build({
1633
+ nodes: parts.map((part) => {
1634
+ if (part.face) {
1635
+ const room = vertical ? widest(part.id, FACE) + 8 : 26;
1636
+ return { id: part.id, along: 2 * half, across: 2 * half, slot: 2 * half + room, shift: vertical ? -room / 2 : 0, lane: lane(part) };
1637
+ }
1638
+ const width = Math.max(80, widest(part.id, SIZE4) + 42), height = lines.get(part.id).length > 1 ? 44 : 32;
1639
+ return { id: part.id, along: vertical ? height : width, across: vertical ? width : height, ports: "spread", lane: lane(part) };
1640
+ }),
1641
+ links,
1642
+ vertical,
1643
+ routing,
1644
+ nodeGap: 16,
1645
+ rankGap: vertical ? 30 : 34,
1646
+ inset: 0,
1647
+ labelRoom: words.map((text) => text ? SoftwareText.width(text, 10) + 16 : 0),
1648
+ lanes: count,
1649
+ lanePad: framed ? vertical ? PAD + 2 : PAD + TAB + 4 : 0,
1650
+ laneMin: framed && vertical ? Array.from({ length: count }, (_, at2) => Math.max(0, ...[...lanes].filter(([name, own]) => name && own === at2).map(([name]) => Math.min(130, SoftwareText.width(name, SIZE4, true)) + 4 * PAD + 6))) : void 0,
1651
+ room: vertical ? { length: ctx.plot.height - edge - (framed ? TAB : 0), breadth: ctx.plot.width } : { length: ctx.plot.width - edge, breadth: ctx.plot.height }
1652
+ });
1653
+ const placer = this.placer(plan, vertical ? { x0: 0, y0: -REACH, x1: plan.width, y1: plan.height + REACH } : { x0: -REACH, y0: 0, x1: plan.width + REACH, y1: plan.height });
1654
+ const shapes = [], balls = [], squares = /* @__PURE__ */ new Map(), labels = [];
1655
+ const held = /* @__PURE__ */ new Map(), loose = [];
1656
+ const hold = (part, box) => {
1657
+ if (!part.shared) held.set(part.group, [..._nullishCoalesce(held.get(part.group), () => ( [])), box]);
1658
+ };
1659
+ const bare = /* @__PURE__ */ new Map();
1660
+ const naming = (id, sort) => joins.filter((join) => join.kind === sort && join.component === id).map((join) => byId.get(join.other).label);
1661
+ const users = (id, sort) => joins.filter((join) => join.kind === sort && join.other === id).map((join) => byId.get(join.component).label);
1662
+ for (const part of parts) {
1663
+ const { x, y, width: w, height: h } = plan.boxes.get(part.id);
1664
+ hold(part, { x0: x - w / 2, y0: y - h / 2, x1: x + w / 2, y1: y + h / 2 });
1665
+ if (part.face) {
1666
+ const text2 = lines.get(part.id)[0], tip = { title: part.label, rows: [["Provided by", list(users(part.id, Provides))], ["Required by", list(users(part.id, Requires))]] };
1667
+ if (!socketed || users(part.id, Provides).length) balls.push({ key: part.id, raw: part.raw, d: SoftwareShapes.ellipse(x, y, BALL - 0.75), fill: theme.surface, stroke: ink, tip });
1668
+ else bare.set(part.id, tip);
1669
+ const spots = vertical ? [["start", x + half + 4, y + 3.5]] : [["middle", x, y - half - 4], ["middle", x, y + half + 11]];
1670
+ const spot = text2 ? placer.claim(spots.map(([anchor, lx, ly]) => ({ anchor, x: lx, y: ly, box: SoftwarePlacer.text(lx, ly, text2, FACE, anchor) }))) : null;
1671
+ if (!spot) continue;
1672
+ labels.push({ key: `${part.id}/name`, x: spot.x, y: spot.y, text: text2, anchor: spot.anchor, size: FACE, halo: true });
1673
+ hold(part, spot.box);
1674
+ loose.push(spot.box);
1675
+ continue;
1676
+ }
1677
+ const fill = palette.color(part.group || "Component"), on = palette.inkOn(fill), text = lines.get(part.id), left = x - w / 2, top = y - h / 2;
1678
+ shapes.push({
1679
+ key: part.id,
1680
+ raw: part.raw,
1681
+ d: SoftwareShapes.rect(left, top, w, h, 2),
1682
+ fill,
1683
+ tip: { title: part.label, color: fill, rows: [...part.group ? [["Package", part.group]] : [], ["Provides", list(naming(part.id, Provides))], ["Requires", list(naming(part.id, Requires))]] }
1684
+ });
1685
+ const ix = left + w - 17, iy = top + 5;
1686
+ shapes.push({ key: `${part.id}/icon`, d: SoftwareShapes.rect(ix + 3, iy, 9, 11), fill, stroke: on, strokeWidth: 1.2 });
1687
+ shapes.push({ key: `${part.id}/tabs`, d: `${SoftwareShapes.rect(ix, iy + 2, 6, 2.5)}${SoftwareShapes.rect(ix, iy + 6.5, 6, 2.5)}`, fill, stroke: on, strokeWidth: 1.2 });
1688
+ const centre = widest(part.id, SIZE4) / 2 <= w / 2 - 20 ? x : x - 7;
1689
+ text.forEach((line, i) => labels.push({ key: `${part.id}/${i}`, x: centre, y: y + 3.5 + (i - (text.length - 1) / 2) * 12, text: line, anchor: "middle", size: SIZE4, weight: 600, fill: on }));
1690
+ }
1691
+ const port = ([px, py]) => {
1692
+ if (ports) squares.set(`${px.toFixed(1)}/${py.toFixed(1)}`, { key: `port/${squares.size}`, d: SoftwareShapes.rect(px - PORT, py - PORT, 2 * PORT, 2 * PORT), fill: theme.surface, stroke: ink });
1693
+ };
1694
+ const sockets = /* @__PURE__ */ new Map();
1695
+ const wires = plan.wires.map((wire, i) => {
1696
+ const join = joins[i], from = byId.get(join.component).label, to = byId.get(join.other).label;
1697
+ const arrow = { d: SoftwareShapes.arrow(wire.tip, wire.angle, 8, true), fill: "none" };
1698
+ if (join.kind === Dependency) return { key: join.key, raw: join.raw, d: wire.d, dash: "5 4", head: arrow, tip: { title: `${from} \u2192 ${to}`, rows: [["Relation", words[i] || "dependency"]] } };
1699
+ const face = plan.boxes.get(join.other), centre = [face.x, face.y];
1700
+ if (join.kind === Requires) {
1701
+ port(wire.points[0]);
1702
+ const cup = _ComponentDiagram.socket(centre, wire.angle);
1703
+ if (socketed) sockets.set(cup, { key: `${join.other}/socket/${sockets.size}`, raw: byId.get(join.other).raw, d: cup, stroke: ink, strokeWidth: 2, tip: bare.get(join.other) });
1704
+ return { key: join.key, raw: join.raw, d: wire.d, dash: socketed ? void 0 : "5 4", head: socketed ? void 0 : arrow, tip: { title: `${from} requires ${to}` } };
1705
+ }
1706
+ port(wire.tip);
1707
+ const start = wire.points[0], away = Math.atan2(start[1] - centre[1], start[0] - centre[0]);
1708
+ const stick = socketed ? SoftwareShapes.line([[centre[0] + BALL * Math.cos(away), centre[1] + BALL * Math.sin(away)], start]) : "";
1709
+ return { key: join.key, raw: join.raw, d: `${stick}${wire.d}`, tip: { title: `${from} provides ${to}` } };
1710
+ });
1711
+ const frames = [...held].flatMap(([name, boxes]) => {
1712
+ if (!framed || !name) return [];
1713
+ let x02 = Math.min(...boxes.map((box) => box.x0)) - PAD, x1 = Math.max(...boxes.map((box) => box.x1)) + PAD;
1714
+ const y02 = Math.min(...boxes.map((box) => box.y0)) - PAD, y1 = Math.max(...boxes.map((box) => box.y1)) + PAD, band = plan.lanes[lanes.get(name)];
1715
+ const title = SoftwareText.fit(name, vertical ? 130 : x1 - x02 - 2 * PAD, SIZE4, true), tab = SoftwareText.width(title, SIZE4, true) + 2 * PAD;
1716
+ if (vertical) {
1717
+ x1 = Math.max(x1, x02 + tab + 2 * PAD);
1718
+ const over = Math.max(0, Math.min(x1 - (band.start + band.size - 2), x02 - band.start - 2));
1719
+ x02 -= over;
1720
+ x1 -= over;
1721
+ }
1722
+ const spot = placer.claim(Array.from({ length: Math.floor(Math.max(0, x1 - x02 - tab) / 4) + 1 }, (_, k) => ({ at: x02 + k * 4, box: { x0: x02 + k * 4, y0: y02 - TAB, x1: x02 + k * 4 + tab, y1: y02 } })));
1723
+ return [{ name, title, x0: x02, y0: y02, x1, y1, tab, at: _nullishCoalesce(_optionalChain([spot, 'optionalAccess', _22 => _22.at]), () => ( x02)) }];
1724
+ });
1725
+ const marks = this.wireLabels(placer, plan.wires, (i) => words[i]);
1726
+ const all = [{ x0: 0, y0: 0, x1: plan.width, y1: plan.height }, ...frames.map((frame) => ({ ...frame, y0: frame.y0 - TAB })), ...loose];
1727
+ const x0 = Math.min(...all.map((box) => box.x0)), y0 = Math.min(...all.map((box) => box.y0));
1728
+ const stage = this.stage(ctx, Math.max(...all.map((box) => box.x1)) - x0, Math.max(...all.map((box) => box.y1)) - y0);
1729
+ const body = stage.nest(`translate(${+(-x0).toFixed(2)},${+(-y0).toFixed(2)})`, "body");
1730
+ this.paths(body, ctx, "frames", frames.map((frame) => ({
1731
+ key: frame.name,
1732
+ fill: theme.grid,
1733
+ opacity: 0.45,
1734
+ d: SoftwareShapes.polygon([[frame.at, frame.y0], [frame.at, frame.y0 - TAB], [frame.at + frame.tab, frame.y0 - TAB], [frame.at + frame.tab, frame.y0], [frame.x1, frame.y0], [frame.x1, frame.y1], [frame.x0, frame.y1], [frame.x0, frame.y0]])
1735
+ })));
1736
+ this.wires(body, ctx, wires);
1737
+ this.paths(body, ctx, "frame-tabs", frames.flatMap((frame) => {
1738
+ const d = SoftwareShapes.rect(frame.at, frame.y0 - TAB, frame.tab, TAB);
1739
+ return [{ key: `${frame.name}/under`, d, fill: theme.surface }, { key: frame.name, d, fill: theme.grid, opacity: 0.45 }];
1740
+ }));
1741
+ this.texts(body, ctx, "frame-names", frames.map((frame) => ({ key: frame.name, x: frame.at + PAD, y: frame.y0 - 4.5, text: frame.title, size: SIZE4, weight: 600 })));
1742
+ this.paths(body, ctx, "nodes", shapes);
1743
+ this.paths(body, ctx, "interfaces", [...sockets.values(), ...balls]);
1744
+ this.paths(body, ctx, "ports", [...squares.values()]);
1745
+ this.texts(body, ctx, "node-text", labels);
1746
+ this.texts(body, ctx, "wire-text", marks);
1747
+ }
1748
+ }, _class4.__initStatic4(), _class4);
1749
+
1750
+ // src/charts/softwarediagrams/DataFlowDiagram.ts
1751
+ var SIZE5 = 10.5;
1404
1752
  var KINDS3 = new Set(Object.values(DataFlowKind));
1405
1753
  var NAME3 = { process: "Process", external: "External entity", store: "Data store" };
1406
1754
  var { Process, External, Store } = DataFlowKind;
1407
- var TAB = 24;
1408
- var DataFlowDiagram = (_class4 = class extends SoftwareDiagram {
1409
- static __initStatic4() {this.meta = {
1755
+ var TAB2 = 24;
1756
+ var DataFlowDiagram = (_class5 = class extends SoftwareDiagram {
1757
+ static __initStatic5() {this.meta = {
1410
1758
  id: "data-flow-diagram",
1411
1759
  name: "Data flow diagram",
1412
1760
  family: "flow" /* Flow */,
@@ -1440,16 +1788,16 @@ var DataFlowDiagram = (_class4 = class extends SoftwareDiagram {
1440
1788
  const vertical = orientation === "vertical" /* Vertical */, yourdon = notation === "yourdon" /* Yourdon */, { theme, palette } = ctx;
1441
1789
  const graph = this.#graph();
1442
1790
  const parts = graph.vertices.map(({ id, raw }) => {
1443
- const stated = String(_nullishCoalesce(raw[kind], () => ( ""))).toLowerCase();
1444
- return { id, raw, label: _nullishCoalesce(SoftwareGraph.text(raw[label]), () => ( id)), kind: KINDS3.has(stated) ? stated : Process, number: SoftwareGraph.text(raw[number]) };
1791
+ const stated2 = String(_nullishCoalesce(raw[kind], () => ( ""))).toLowerCase();
1792
+ return { id, raw, label: _nullishCoalesce(SoftwareGraph.text(raw[label]), () => ( id)), kind: KINDS3.has(stated2) ? stated2 : Process, number: SoftwareGraph.text(raw[number]) };
1445
1793
  });
1446
1794
  const byId = new Map(parts.map((part) => [part.id, part]));
1447
- const lines = new Map(parts.map((part) => [part.id, part.kind === Store ? [SoftwareText.fit(part.label, 96, SIZE4)] : SoftwareText.wrap(part.label, part.kind === Process && yourdon ? 62 : 88, SIZE4)]));
1448
- const widest = (part) => Math.max(0, ...lines.get(part.id).map((line) => SoftwareText.width(line, SIZE4)));
1795
+ const lines = new Map(parts.map((part) => [part.id, part.kind === Store ? [SoftwareText.fit(part.label, 96, SIZE5)] : SoftwareText.wrap(part.label, part.kind === Process && yourdon ? 62 : 88, SIZE5)]));
1796
+ const widest = (part) => Math.max(0, ...lines.get(part.id).map((line) => SoftwareText.width(line, SIZE5)));
1449
1797
  const rows = (part) => lines.get(part.id).length + (part.number ? 1 : 0);
1450
1798
  const bubble = Math.max(54, ...parts.filter((part) => part.kind === Process).map((part) => Math.min(86, Math.max(widest(part) + 20, rows(part) * 13 + 22))));
1451
1799
  const extent = (part) => {
1452
- if (part.kind === Store) return [Math.max(72, widest(part) + 22 + (yourdon || !part.number ? 0 : TAB)), 26];
1800
+ if (part.kind === Store) return [Math.max(72, widest(part) + 22 + (yourdon || !part.number ? 0 : TAB2)), 26];
1453
1801
  if (part.kind === External) return [Math.max(64, widest(part) + 20), lines.get(part.id).length > 1 ? 42 : 32];
1454
1802
  if (yourdon) return [bubble, bubble];
1455
1803
  return [Math.max(70, widest(part) + 20), rows(part) * 12 + 18];
@@ -1475,7 +1823,7 @@ var DataFlowDiagram = (_class4 = class extends SoftwareDiagram {
1475
1823
  const main = { key: part.id, raw: part.raw, fill, tip: { title: part.label, color: fill, rows: [["Kind", NAME3[part.kind]], ...part.number ? [["Number", part.number]] : []] } };
1476
1824
  let centre = x, first = y + 3.5 - (text.length - 1) * 12 / 2;
1477
1825
  if (part.kind === Store) {
1478
- const tab = !yourdon && part.number ? TAB : 0;
1826
+ const tab = !yourdon && part.number ? TAB2 : 0;
1479
1827
  shapes.push({ ...main, d: SoftwareShapes.rect(left, top, w, h) });
1480
1828
  shapes.push({ key: `${part.id}/rule`, d: yourdon ? `M${left},${top}h${w}M${left},${top + h}h${w}` : `M${left + w},${top}h${-w}v${h}h${w}${tab ? `M${left + tab},${top}v${h}` : ""}`, stroke: ink, strokeWidth: 2 });
1481
1829
  if (tab) labels.push({ key: `${part.id}/id`, x: left + tab / 2, y: y + 3.5, text: SoftwareText.fit(part.number, tab - 4, 9.5), anchor: "middle", size: 9.5, weight: 600, fill: on });
@@ -1492,7 +1840,7 @@ var DataFlowDiagram = (_class4 = class extends SoftwareDiagram {
1492
1840
  first = yourdon ? head + 12 : top + 18 + (h - 18) / 2 + 3.5 - (text.length - 1) * 12 / 2;
1493
1841
  }
1494
1842
  }
1495
- text.forEach((line, i) => labels.push({ key: `${part.id}/${i}`, x: centre, y: first + i * 12, text: line, anchor: "middle", size: SIZE4, fill: on }));
1843
+ text.forEach((line, i) => labels.push({ key: `${part.id}/${i}`, x: centre, y: first + i * 12, text: line, anchor: "middle", size: SIZE5, fill: on }));
1496
1844
  }
1497
1845
  const wires = plan.wires.map((wire, i) => {
1498
1846
  const arc = graph.arcs[i];
@@ -1503,7 +1851,215 @@ var DataFlowDiagram = (_class4 = class extends SoftwareDiagram {
1503
1851
  this.texts(stage, ctx, "node-text", labels);
1504
1852
  this.texts(stage, ctx, "wire-text", this.wireLabels(placer, plan.wires, (i) => words[i]));
1505
1853
  }
1506
- }, _class4.__initStatic4(), _class4);
1854
+ }, _class5.__initStatic5(), _class5);
1855
+
1856
+ // src/charts/softwarediagrams/DeploymentDiagram.ts
1857
+ var SIZE6 = 10.5;
1858
+ var PAD2 = 8;
1859
+ var LEAD = 13;
1860
+ var DEPTH = 7;
1861
+ var TOP = "";
1862
+ var KINDS4 = new Set(Object.values(DeploymentKind));
1863
+ var NAME4 = { node: "Node", device: "Device", environment: "Execution environment", artifact: "Artifact" };
1864
+ var STEREOTYPE = { node: "", device: "\xABdevice\xBB", environment: "\xABexecutionEnvironment\xBB", artifact: "\xABartifact\xBB" };
1865
+ var { Artifact } = DeploymentKind;
1866
+ var n3 = (value) => Math.round(value * 100) / 100;
1867
+ var shifted = (d, dx, dy) => d.replace(/(-?[\d.]+),(-?[\d.]+)/g, (_, x, y) => `${n3(+x + dx)},${n3(+y + dy)}`);
1868
+ var DeploymentDiagram = (_class6 = class _DeploymentDiagram extends SoftwareDiagram {
1869
+ static __initStatic6() {this.meta = {
1870
+ id: "uml-deployment-diagram",
1871
+ name: "UML deployment diagram",
1872
+ family: "network" /* Network */,
1873
+ dimension: 2 /* Two */,
1874
+ shape: "graph" /* Graph */,
1875
+ description: "Nests devices, execution environments and their artifacts as UML node boxes, joined by communication paths labelled with protocols.",
1876
+ tags: ["uml", "deployment", "node", "device", "execution environment", "artifact", "communication path", "infrastructure"],
1877
+ sample: (seed) => SoftwareSamples.deployment(seed),
1878
+ variants: {
1879
+ orientation: ["horizontal" /* Horizontal */, "vertical" /* Vertical */],
1880
+ routing: ["orthogonal" /* Orthogonal */, "curved" /* Curved */],
1881
+ form: ["cube" /* Cube */, "flat" /* Flat */],
1882
+ artifacts: ["symbol" /* Symbol */, "listed" /* Listed */]
1883
+ }
1884
+ }}
1885
+ defaults() {
1886
+ return {
1887
+ nodeId: "id",
1888
+ label: "label",
1889
+ kind: "kind",
1890
+ parent: "parent",
1891
+ source: "source",
1892
+ target: "target",
1893
+ protocol: "protocol",
1894
+ orientation: "horizontal" /* Horizontal */,
1895
+ routing: "orthogonal" /* Orthogonal */,
1896
+ form: "cube" /* Cube */,
1897
+ artifacts: "symbol" /* Symbol */
1898
+ };
1899
+ }
1900
+ legendItems() {
1901
+ return this.palette.items();
1902
+ }
1903
+ #graph() {
1904
+ const { nodeId, source, target } = this.options;
1905
+ return SoftwareGraph.read(this.options.data, { nodeId, source, target });
1906
+ }
1907
+ table() {
1908
+ const { source, target, protocol } = this.options;
1909
+ return this.rowsOf(this.#graph().arcs.map((arc) => arc.raw), [source, target, protocol]);
1910
+ }
1911
+ /** Every element with its parent and children. A parent that is unknown, or that would close a loop, is ignored. */
1912
+ static tree(graph, columns) {
1913
+ const elements = new Map(graph.vertices.map(({ id, raw }) => {
1914
+ const kind = String(_nullishCoalesce(raw[columns.kind], () => ( ""))).toLowerCase();
1915
+ return [id, { id, raw, label: _nullishCoalesce(SoftwareGraph.text(raw[columns.label]), () => ( id)), kind: KINDS4.has(kind) ? kind : "node" /* Node */, parent: null, children: [] }];
1916
+ }));
1917
+ for (const element of elements.values()) {
1918
+ const holder = elements.get(_nullishCoalesce(SoftwareGraph.text(element.raw[columns.parent]), () => ( TOP)));
1919
+ let up = _nullishCoalesce(holder, () => ( null));
1920
+ while (up && up !== element) up = up.parent;
1921
+ if (!holder || up) continue;
1922
+ element.parent = holder;
1923
+ holder.children.push(element);
1924
+ }
1925
+ return elements;
1926
+ }
1927
+ /**
1928
+ * Sizes every node from the inside out, then places it from the outside in. The children of one node are layered by
1929
+ * the paths among them, and a path between elements of different nodes is drawn at the level where their holders are siblings.
1930
+ */
1931
+ static layout(elements, links, look) {
1932
+ const { vertical, routing, depth, listed } = look;
1933
+ const symbol = (element) => element.kind === Artifact && !element.children.length;
1934
+ const named = (element) => listed && symbol(element) && !!element.parent;
1935
+ const chain = (id) => {
1936
+ const out = [];
1937
+ for (let element = _nullishCoalesce(elements.get(id), () => ( null)); element; element = element.parent) if (!named(element)) out.unshift(element);
1938
+ return out;
1939
+ };
1940
+ const levels = /* @__PURE__ */ new Map();
1941
+ links.forEach((link, index) => {
1942
+ const a = chain(link.source), b = chain(link.target);
1943
+ let k = 0;
1944
+ while (k < a.length && k < b.length && a[k] === b[k]) k++;
1945
+ if (k >= a.length || k >= b.length) return;
1946
+ const level = k ? a[k - 1].id : TOP;
1947
+ levels.set(level, [..._nullishCoalesce(levels.get(level), () => ( [])), { link: index, source: a[k].id, target: b[k].id }]);
1948
+ });
1949
+ const size = (element) => {
1950
+ if (symbol(element)) {
1951
+ const title2 = SoftwareText.fit(element.label, 110, SIZE6);
1952
+ return { element, symbol: true, width: Math.max(64, SoftwareText.width(title2, SIZE6) + 32), height: 24, head: 0, title: title2, names: [], inner: null };
1953
+ }
1954
+ const title = SoftwareText.fit(element.label, 150, 11, true), names = element.children.filter(named).map((child) => SoftwareText.fit(child.label, 140, 10)).filter(Boolean);
1955
+ const head = STEREOTYPE[element.kind] ? 30 : 22, kids = element.children.filter((child) => !named(child)), inner = kids.length ? group(kids, element.id) : null;
1956
+ const text = Math.max(SoftwareText.width(STEREOTYPE[element.kind], 9), SoftwareText.width(title, 11, true), ...names.map((name) => SoftwareText.width(name, 10)));
1957
+ return {
1958
+ element,
1959
+ symbol: false,
1960
+ head,
1961
+ title,
1962
+ names,
1963
+ inner,
1964
+ width: Math.max(80, text + 2 * PAD2, (_nullishCoalesce(_optionalChain([inner, 'optionalAccess', _23 => _23.plan, 'access', _24 => _24.width]), () => ( 0))) + 2 * PAD2),
1965
+ height: head + (names.length ? names.length * LEAD + 2 : 0) + (inner ? inner.plan.height + PAD2 : names.length ? 4 : 2)
1966
+ };
1967
+ };
1968
+ const group = (kids, level, room) => {
1969
+ const sized = kids.map(size), own = _nullishCoalesce(levels.get(level), () => ( [])), words = own.map(({ link }) => SoftwareText.width(links[link].text, 10));
1970
+ const wide = Math.max(0, ...sized.filter((entry) => entry.symbol).map((entry) => entry.width));
1971
+ for (const entry of sized) if (entry.symbol) entry.width = wide;
1972
+ const plan = SoftwareWiring.build({
1973
+ nodes: sized.map((entry) => {
1974
+ const width = entry.width + (entry.symbol ? 0 : depth), height = entry.height + (entry.symbol ? 0 : depth);
1975
+ return { id: entry.element.id, along: vertical ? height : width, across: vertical ? width : height, ports: "spread" };
1976
+ }),
1977
+ links: own,
1978
+ vertical,
1979
+ routing,
1980
+ nodeGap: 12,
1981
+ inset: 0,
1982
+ room,
1983
+ rankGap: vertical ? 30 : Math.max(36, Math.min(110, Math.max(0, ...words) + 20)),
1984
+ labelRoom: words.map((width) => width ? width + 16 : 0)
1985
+ });
1986
+ return { sized, plan, links: own.map(({ link }) => link) };
1987
+ };
1988
+ const blocks = [], runs = [], areas = /* @__PURE__ */ new Map();
1989
+ const put = (inner, left, top, level) => {
1990
+ areas.set(level, { x0: left, y0: top, x1: left + inner.plan.width, y1: top + inner.plan.height });
1991
+ inner.plan.wires.forEach((wire, i) => runs.push({
1992
+ key: `${level}/${i}`,
1993
+ level,
1994
+ link: inner.links[i],
1995
+ wire: { ...wire, d: shifted(wire.d, left, top), points: wire.points.map(([x, y]) => [x + left, y + top]), tip: [wire.tip[0] + left, wire.tip[1] + top] }
1996
+ }));
1997
+ for (const entry of inner.sized) {
1998
+ const box = inner.plan.boxes.get(entry.element.id), x = left + box.x - box.width / 2, y = top + box.y - box.height / 2 + (entry.symbol ? 0 : depth);
1999
+ blocks.push({ element: entry.element, symbol: entry.symbol, level, x, y, width: entry.width, height: entry.height, title: entry.title, names: entry.names });
2000
+ if (entry.inner) put(entry.inner, x + (entry.width - entry.inner.plan.width) / 2, y + entry.head + (entry.names.length ? entry.names.length * LEAD + 2 : 0), entry.element.id);
2001
+ }
2002
+ };
2003
+ const root = group([...elements.values()].filter((element) => !element.parent), TOP, look.room);
2004
+ put(root, 0, 0, TOP);
2005
+ return { blocks, runs, areas, width: root.plan.width, height: root.plan.height };
2006
+ }
2007
+ draw(ctx) {
2008
+ const { orientation, routing, form, artifacts, label, kind, parent, protocol } = this.options;
2009
+ const vertical = orientation === "vertical" /* Vertical */, depth = form === "cube" /* Cube */ ? DEPTH : 0, { theme, palette } = ctx;
2010
+ const graph = this.#graph(), elements = _DeploymentDiagram.tree(graph, { label, kind, parent });
2011
+ const words = graph.arcs.map((arc) => SoftwareText.fit(_nullishCoalesce(SoftwareGraph.text(arc.raw[protocol]), () => ( "")), 90, 10));
2012
+ const plan = _DeploymentDiagram.layout(elements, graph.arcs.map((arc, i) => ({ source: arc.source, target: arc.target, text: words[i] })), {
2013
+ vertical,
2014
+ routing,
2015
+ depth,
2016
+ listed: artifacts === "listed" /* Listed */,
2017
+ room: vertical ? { length: ctx.plot.height, breadth: ctx.plot.width } : { length: ctx.plot.width, breadth: ctx.plot.height }
2018
+ });
2019
+ const stage = this.stage(ctx, plan.width, plan.height);
2020
+ const shapes = [], labels = [];
2021
+ for (const { element, symbol, x, y, width: w, height: h, title, names } of plan.blocks) {
2022
+ const sort = symbol ? NAME4.artifact : NAME4[element.kind], fill = palette.color(sort), main = { key: element.id, raw: element.raw };
2023
+ const held = element.children.map((child) => child.label);
2024
+ const tip = { title: element.label, color: fill, rows: [["Kind", sort], ...element.parent ? [["On", element.parent.label]] : [], ...held.length ? [["Holds", held.join(", ")]] : []] };
2025
+ if (symbol) {
2026
+ const on = palette.inkOn(fill), gx = x + w - 16, gy = y + 6;
2027
+ shapes.push({ ...main, d: SoftwareShapes.rect(x, y, w, h, 2), fill, tip });
2028
+ shapes.push({ key: `${element.id}/page`, d: `M${n3(gx)},${n3(gy)}h5.5l3.5,3.5v8.5h-9ZM${n3(gx + 5.5)},${n3(gy)}v3.5h3.5`, stroke: on, strokeWidth: 1.2 });
2029
+ labels.push({ key: element.id, x: x + 8, y: y + h / 2 + 3.5, text: title, size: SIZE6, fill: on });
2030
+ continue;
2031
+ }
2032
+ if (depth) {
2033
+ shapes.push({ key: `${element.id}/top`, d: SoftwareShapes.polygon([[x, y], [x + depth, y - depth], [x + w + depth, y - depth], [x + w, y]]), fill, opacity: 0.5, stroke: theme.surface, strokeWidth: 1 });
2034
+ shapes.push({ key: `${element.id}/side`, d: SoftwareShapes.polygon([[x + w, y], [x + w + depth, y - depth], [x + w + depth, y + h - depth], [x + w, y + h]]), fill, opacity: 0.8, stroke: theme.surface, strokeWidth: 1 });
2035
+ }
2036
+ shapes.push({ ...main, d: SoftwareShapes.rect(x, y, w, h), fill, opacity: 0.2, stroke: theme.surface, strokeWidth: 1, tip });
2037
+ const stereotype = STEREOTYPE[element.kind], base = y + (stereotype ? 30 : 22);
2038
+ if (stereotype) labels.push({ key: `${element.id}/kind`, x: x + w / 2, y: y + 12, text: stereotype, anchor: "middle", size: 9, fill: theme.inkSecondary });
2039
+ labels.push({ key: element.id, x: x + w / 2, y: base - 6, text: title, anchor: "middle", size: 11, weight: 600 });
2040
+ names.forEach((name, i) => labels.push({ key: `${element.id}/${i}`, x: x + w / 2, y: base + 8 + i * LEAD, text: name, anchor: "middle", size: 10 }));
2041
+ }
2042
+ const marks = [];
2043
+ for (const [level, area] of plan.areas) {
2044
+ const own = plan.runs.filter((run) => run.level === level), placer = new SoftwarePlacer(area);
2045
+ for (const block of plan.blocks) {
2046
+ if (block.level !== level) continue;
2047
+ const lift = block.symbol ? 0 : depth;
2048
+ placer.block({ x0: block.x - 2, y0: block.y - lift - 2, x1: block.x + block.width + lift + 2, y1: block.y + block.height + 2 });
2049
+ }
2050
+ for (const run of own) placer.avoid(run.wire.points);
2051
+ marks.push(...this.wireLabels(placer, own.map((run) => run.wire), (i) => words[own[i].link]).map((mark) => ({ ...mark, key: `${level}/${mark.key}` })));
2052
+ }
2053
+ const wires = plan.runs.map(({ key: key2, link, wire }) => {
2054
+ const arc = graph.arcs[link];
2055
+ return { key: key2, raw: arc.raw, d: wire.d, tip: { title: `${elements.get(arc.source).label} \u2194 ${elements.get(arc.target).label}`, rows: words[link] ? [["Protocol", words[link]]] : [] } };
2056
+ });
2057
+ this.paths(stage, ctx, "nodes", shapes);
2058
+ this.wires(stage, ctx, wires);
2059
+ this.texts(stage, ctx, "node-text", labels);
2060
+ this.texts(stage, ctx, "wire-text", marks);
2061
+ }
2062
+ }, _class6.__initStatic6(), _class6);
1507
2063
 
1508
2064
  // src/charts/softwarediagrams/DifferentialFlameGraph.ts
1509
2065
 
@@ -1513,8 +2069,8 @@ var STEPS = [-1, -0.5, 0, 0.5, 1];
1513
2069
  var percent = _d3.format.call(void 0, ".1%");
1514
2070
  var points = (delta) => `${delta > 0 ? "+" : delta < 0 ? "\u2212" : ""}${_d3.format.call(void 0, ".1f")(Math.abs(delta) * 100)} pp`;
1515
2071
  var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1516
- var DifferentialFlameGraph = (_class5 = class _DifferentialFlameGraph extends SoftwareDiagram {
1517
- static __initStatic5() {this.meta = {
2072
+ var DifferentialFlameGraph = (_class7 = class _DifferentialFlameGraph extends SoftwareDiagram {
2073
+ static __initStatic7() {this.meta = {
1518
2074
  id: "differential-flame-graph",
1519
2075
  name: "Differential flame graph",
1520
2076
  family: "hierarchy" /* Hierarchy */,
@@ -1600,16 +2156,16 @@ var DifferentialFlameGraph = (_class5 = class _DifferentialFlameGraph extends So
1600
2156
  { key: "high", x: x + STEPS.length * 16 + 5, y: y + 9, text: points(most), size: 9.5, fill: theme.inkSecondary }
1601
2157
  ] : []);
1602
2158
  }
1603
- }, _class5.__initStatic5(), _class5);
2159
+ }, _class7.__initStatic7(), _class7);
1604
2160
 
1605
2161
  // src/charts/softwarediagrams/MemoryMap.ts
1606
- var SIZE5 = 10;
2162
+ var SIZE7 = 10;
1607
2163
  var GAP = 14;
1608
2164
  var MIN = 4;
1609
2165
  var UNITS = ["B", "KiB", "MiB", "GiB", "TiB"];
1610
2166
  var hex = (address) => `0x${Math.max(0, Math.round(address)).toString(16).toUpperCase().padStart(8, "0")}`;
1611
- var MemoryMap = (_class6 = class _MemoryMap extends SoftwareDiagram {
1612
- static __initStatic6() {this.meta = {
2167
+ var MemoryMap = (_class8 = class _MemoryMap extends SoftwareDiagram {
2168
+ static __initStatic8() {this.meta = {
1613
2169
  id: "memory-map",
1614
2170
  name: "Memory map",
1615
2171
  family: "composition" /* Composition */,
@@ -1639,14 +2195,14 @@ var MemoryMap = (_class6 = class _MemoryMap extends SoftwareDiagram {
1639
2195
  }
1640
2196
  /** Rows with a positive length, by ascending start address. `used` is clamped to the region. */
1641
2197
  static regions(rows, columns) {
1642
- const list = (Array.isArray(rows) ? rows : []).flatMap((row) => {
2198
+ const list2 = (Array.isArray(rows) ? rows : []).flatMap((row) => {
1643
2199
  if (!row || typeof row !== "object") return [];
1644
2200
  const start = SoftwareGraph.number(row[columns.start], Number.NaN), size = SoftwareGraph.number(row[columns.size], Number.NaN);
1645
2201
  if (!Number.isFinite(start) || !(size > 0)) return [];
1646
2202
  const used = row[columns.used] === null || row[columns.used] === void 0 ? Number.NaN : SoftwareGraph.number(row[columns.used], Number.NaN);
1647
2203
  return [{ row, start, size, end: start + size, used: Number.isFinite(used) ? Math.max(0, Math.min(size, used)) : null, name: _nullishCoalesce(SoftwareGraph.text(row[columns.region]), () => ( hex(start))), kind: _nullishCoalesce(SoftwareGraph.text(row[columns.group]), () => ( "Memory")) }];
1648
2204
  });
1649
- return list.sort((a, b) => a.start - b.start);
2205
+ return list2.sort((a, b) => a.start - b.start);
1650
2206
  }
1651
2207
  /**
1652
2208
  * Regions and the gaps between them along `room` px. A gap is `GAP` px whatever it spans; a region gets room in step
@@ -1708,7 +2264,7 @@ var MemoryMap = (_class6 = class _MemoryMap extends SoftwareDiagram {
1708
2264
  if (split && share > 0) shapes.push({ key: `used-${i}`, d: slab(from, from + (to - from) * share, 0, thick, 2), fill });
1709
2265
  if (meter && share !== null) meters.push({ key: `track-${i}`, d: slab(from, to, thick + 4, 5), fill: theme.grid }, { key: `level-${i}`, d: slab(from, from + (to - from) * share, thick + 4, 5), fill: theme.inkSecondary });
1710
2266
  });
1711
- const marks = spans.flatMap((span, i) => span.region ? [{ at: span.from, address: span.region.start }, ..._optionalChain([spans, 'access', _22 => _22[i + 1], 'optionalAccess', _23 => _23.region]) ? [] : [{ at: span.to, address: span.region.end }]] : []);
2267
+ const marks = spans.flatMap((span, i) => span.region ? [{ at: span.from, address: span.region.start }, ..._optionalChain([spans, 'access', _25 => _25[i + 1], 'optionalAccess', _26 => _26.region]) ? [] : [{ at: span.to, address: span.region.end }]] : []);
1712
2268
  const room = vertical ? 11 : SoftwareText.width(hex(0), 9.5) + 14, far = vertical ? x0 : y0 + thick;
1713
2269
  const seat = (at2) => vertical ? along(at2) : Math.max(x0 + room / 2, Math.min(x0 + length - room / 2, along(at2)));
1714
2270
  const ticks = [];
@@ -1724,21 +2280,21 @@ var MemoryMap = (_class6 = class _MemoryMap extends SoftwareDiagram {
1724
2280
  for (let i = 0; i < ys.length; i++) ys[i] = Math.max(ys[i], i ? ys[i - 1] + 12 : 6);
1725
2281
  for (let i = ys.length - 1; i >= 0; i--) ys[i] = Math.min(ys[i], i < ys.length - 1 ? ys[i + 1] - 12 : height - 4);
1726
2282
  kept.forEach((span, i) => {
1727
- const key2 = `name-${spans.indexOf(span)}`, name = SoftwareText.fit(title(span), width - x, SIZE5), note = span.region ? _MemoryMap.bytes(span.bytes) : "", after = x + SoftwareText.width(name, SIZE5) + 8;
1728
- names.push({ key: key2, x, y: ys[i] + 3.5, text: name, size: SIZE5, fill: span.region ? theme.ink : theme.inkMuted });
2283
+ const key2 = `name-${spans.indexOf(span)}`, name = SoftwareText.fit(title(span), width - x, SIZE7), note = span.region ? _MemoryMap.bytes(span.bytes) : "", after = x + SoftwareText.width(name, SIZE7) + 8;
2284
+ names.push({ key: key2, x, y: ys[i] + 3.5, text: name, size: SIZE7, fill: span.region ? theme.ink : theme.inkMuted });
1729
2285
  if (note && after + SoftwareText.width(note, 9.5) <= width) names.push({ key: `${key2}/size`, x: after, y: ys[i] + 3.5, text: note, size: 9.5, fill: theme.inkMuted });
1730
2286
  leaders.push({ key: key2, d: `M${x - 11},${along((span.from + span.to) / 2)}L${x - 4},${ys[i]}`, stroke: theme.axis, strokeWidth: 1 });
1731
2287
  });
1732
2288
  } else {
1733
2289
  const levels = Math.max(1, Math.floor((y0 - 4) / 13)), taken = [];
1734
2290
  for (const span of [...spans].reverse()) {
1735
- const x = along((span.from + span.to) / 2), text = SoftwareText.fit(title(span), width - x - 4, SIZE5), to = x + 4 + SoftwareText.width(text, SIZE5);
2291
+ const x = along((span.from + span.to) / 2), text = SoftwareText.fit(title(span), width - x - 4, SIZE7), to = x + 4 + SoftwareText.width(text, SIZE7);
1736
2292
  if (!text) continue;
1737
2293
  const level = Array.from({ length: levels }, (_, k) => k).find((k) => !taken.some((other) => other.level === k && other.from < to + 6 || other.level > k && other.x >= x && other.x <= to + 2));
1738
2294
  if (level === void 0) continue;
1739
2295
  taken.push({ from: x, to, level, x });
1740
2296
  const y = y0 - 7 - level * 13, key2 = `name-${spans.indexOf(span)}`;
1741
- names.push({ key: key2, x: x + 4, y, text, size: SIZE5, fill: span.region ? theme.ink : theme.inkMuted });
2297
+ names.push({ key: key2, x: x + 4, y, text, size: SIZE7, fill: span.region ? theme.ink : theme.inkMuted });
1742
2298
  leaders.push({ key: key2, d: `M${x},${y0 - 2}V${y - 8}`, stroke: theme.axis, strokeWidth: 1 });
1743
2299
  }
1744
2300
  }
@@ -1750,14 +2306,14 @@ var MemoryMap = (_class6 = class _MemoryMap extends SoftwareDiagram {
1750
2306
  this.texts(ctx, ctx, "axis-addresses", addresses);
1751
2307
  this.texts(ctx, ctx, "names", names);
1752
2308
  }
1753
- }, _class6.__initStatic6(), _class6);
2309
+ }, _class8.__initStatic8(), _class8);
1754
2310
 
1755
2311
  // src/charts/softwarediagrams/NassiLayout.ts
1756
- var SIZE6 = 10.5;
2312
+ var SIZE8 = 10.5;
1757
2313
  var INDENT = 16;
1758
2314
  var TWO_WAY = 1.5;
1759
2315
  var MANY_WAY = 1.8;
1760
- var KINDS4 = new Set(Object.values(NassiKind));
2316
+ var KINDS5 = new Set(Object.values(NassiKind));
1761
2317
  var { Statement, Sequence, If, Case, While, Until } = NassiKind;
1762
2318
  var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1763
2319
  var selects = (node) => node.kind === If || node.kind === Case;
@@ -1769,10 +2325,10 @@ var NassiLayout = class _NassiLayout {
1769
2325
  const visit = (raw, key2, depth, branch) => {
1770
2326
  if (!isRecord3(raw) || seen.has(raw)) return null;
1771
2327
  seen.add(raw);
1772
- const list = Array.isArray(raw[nodeChildren]) ? raw[nodeChildren] : [], stated = String(_nullishCoalesce(raw[kind], () => ( ""))).toLowerCase();
1773
- const sort = branch ? Sequence : KINDS4.has(stated) && (list.length || stated === While || stated === Until || stated === Statement) ? stated : list.length ? Sequence : Statement;
1774
- const node = { key: key2, text: raw[name] === null || raw[name] === void 0 ? "" : String(raw[name]), kind: sort === Statement && list.length ? Sequence : sort, children: [], depth, raw };
1775
- node.children = list.flatMap((child, i) => _nullishCoalesce(visit(child, `${key2}/${i}`, depth + (node.kind === Sequence ? 0 : 1), selects(node)), () => ( [])));
2328
+ const list2 = Array.isArray(raw[nodeChildren]) ? raw[nodeChildren] : [], stated2 = String(_nullishCoalesce(raw[kind], () => ( ""))).toLowerCase();
2329
+ const sort = branch ? Sequence : KINDS5.has(stated2) && (list2.length || stated2 === While || stated2 === Until || stated2 === Statement) ? stated2 : list2.length ? Sequence : Statement;
2330
+ const node = { key: key2, text: raw[name] === null || raw[name] === void 0 ? "" : String(raw[name]), kind: sort === Statement && list2.length ? Sequence : sort, children: [], depth, raw };
2331
+ node.children = list2.flatMap((child, i) => _nullishCoalesce(visit(child, `${key2}/${i}`, depth + (node.kind === Sequence ? 0 : 1), selects(node)), () => ( [])));
1776
2332
  return node;
1777
2333
  };
1778
2334
  if (Array.isArray(data)) return { key: "root", text: "", kind: Sequence, children: data.flatMap((child, i) => _nullishCoalesce(visit(child, `root/${i}`, 0, false), () => ( []))), depth: 0, raw: null };
@@ -1794,7 +2350,7 @@ var NassiLayout = class _NassiLayout {
1794
2350
  const cells = [];
1795
2351
  if (!root) return { cells, width, height: 0 };
1796
2352
  const total = Math.max(_nullishCoalesce(height, () => ( 0)), _NassiLayout.rows(root) * row);
1797
- const fit = (text, room, bold = false) => room > 14 ? SoftwareText.fit(text, room, SIZE6, bold) : "";
2353
+ const fit = (text, room, bold = false) => room > 14 ? SoftwareText.fit(text, room, SIZE8, bold) : "";
1798
2354
  const box = (node, role, x, y, w, h, d, rules = "", texts = []) => {
1799
2355
  cells.push({ key: node.key, node, role, x, y, width: w, height: h, d, rules, texts: texts.filter((entry) => entry.text) });
1800
2356
  };
@@ -1839,9 +2395,9 @@ var NassiLayout = class _NassiLayout {
1839
2395
  };
1840
2396
 
1841
2397
  // src/charts/softwarediagrams/NassiShneidermanDiagram.ts
1842
- var NAME4 = { statement: "Statement", sequence: "Sequence", if: "Selection", case: "Multi-way selection", while: "Pre-test loop", until: "Post-test loop" };
1843
- var NassiShneidermanDiagram = (_class7 = class extends SoftwareDiagram {
1844
- static __initStatic7() {this.meta = {
2398
+ var NAME5 = { statement: "Statement", sequence: "Sequence", if: "Selection", case: "Multi-way selection", while: "Pre-test loop", until: "Post-test loop" };
2399
+ var NassiShneidermanDiagram = (_class9 = class extends SoftwareDiagram {
2400
+ static __initStatic9() {this.meta = {
1845
2401
  id: "nassi-shneiderman-diagram",
1846
2402
  name: "Nassi-Shneiderman diagram",
1847
2403
  family: "hierarchy" /* Hierarchy */,
@@ -1891,7 +2447,7 @@ var NassiShneidermanDiagram = (_class7 = class extends SoftwareDiagram {
1891
2447
  fill: fill(cell),
1892
2448
  opacity: cell.role === "empty" ? 0.45 : void 0,
1893
2449
  raw: cell.node.raw,
1894
- tip: cell.role === "empty" ? void 0 : { title: cell.node.text || NAME4[cell.node.kind], rows: [["Kind", NAME4[cell.node.kind]], ["Depth", cell.node.depth], ...cell.role === "selection" ? [["Branches", cell.node.children.length]] : []] }
2450
+ tip: cell.role === "empty" ? void 0 : { title: cell.node.text || NAME5[cell.node.kind], rows: [["Kind", NAME5[cell.node.kind]], ["Depth", cell.node.depth], ...cell.role === "selection" ? [["Branches", cell.node.children.length]] : []] }
1895
2451
  })));
1896
2452
  this.paths(stage, ctx, "rules", shown.filter((cell) => cell.rules).map((cell) => ({ key: cell.key, d: cell.rules, stroke: theme.surface, strokeWidth: 2 })));
1897
2453
  this.texts(stage, ctx, "block-text", shown.flatMap((cell) => cell.texts.map((text, i) => ({
@@ -1905,7 +2461,7 @@ var NassiShneidermanDiagram = (_class7 = class extends SoftwareDiagram {
1905
2461
  fill: cell.role === "statement" ? theme.ink : palette.inkOn(fill(cell))
1906
2462
  }))));
1907
2463
  }
1908
- }, _class7.__initStatic7(), _class7);
2464
+ }, _class9.__initStatic9(), _class9);
1909
2465
 
1910
2466
  // src/charts/softwarediagrams/SoftwareTree.ts
1911
2467
  var SoftwareTree = class _SoftwareTree {
@@ -1938,11 +2494,11 @@ var SoftwareTree = class _SoftwareTree {
1938
2494
  };
1939
2495
 
1940
2496
  // src/charts/softwarediagrams/ParseTree.ts
1941
- var SIZE7 = 11;
2497
+ var SIZE9 = 11;
1942
2498
  var BOX = 20;
1943
2499
  var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1944
- var ParseTree = (_class8 = class _ParseTree extends SoftwareDiagram {
1945
- static __initStatic8() {this.meta = {
2500
+ var ParseTree = (_class10 = class _ParseTree extends SoftwareDiagram {
2501
+ static __initStatic10() {this.meta = {
1946
2502
  id: "parse-tree",
1947
2503
  name: "Parse tree",
1948
2504
  family: "hierarchy" /* Hierarchy */,
@@ -1966,15 +2522,15 @@ var ParseTree = (_class8 = class _ParseTree extends SoftwareDiagram {
1966
2522
  const visit = (raw, key2) => {
1967
2523
  if (!isRecord4(raw) || seen.has(raw)) return null;
1968
2524
  seen.add(raw);
1969
- const list = Array.isArray(raw[nodeChildren]) ? raw[nodeChildren] : [];
1970
- return { key: key2, raw, text: raw[name] === null || raw[name] === void 0 ? "" : String(raw[name]), children: list.flatMap((child, i) => _nullishCoalesce(visit(child, `${key2}/${i}`), () => ( []))) };
2525
+ const list2 = Array.isArray(raw[nodeChildren]) ? raw[nodeChildren] : [];
2526
+ return { key: key2, raw, text: raw[name] === null || raw[name] === void 0 ? "" : String(raw[name]), children: list2.flatMap((child, i) => _nullishCoalesce(visit(child, `${key2}/${i}`), () => ( []))) };
1971
2527
  };
1972
2528
  return visit(data, "root");
1973
2529
  }
1974
2530
  /** Symbols placed across by the room their text needs and down by level, `row` px apart. Tokens share the last level unless they hang. */
1975
2531
  static layout(root, row, baseline = true, byHeight = false) {
1976
2532
  if (!root) return { spots: [], width: 0, height: 0 };
1977
- const wide = (symbol) => Math.max(BOX, SoftwareText.width(SoftwareText.fit(symbol.text, 96, SIZE7, true), SIZE7, true) + 12);
2533
+ const wide = (symbol) => Math.max(BOX, SoftwareText.width(SoftwareText.fit(symbol.text, 96, SIZE9, true), SIZE9, true) + 12);
1978
2534
  const tree = SoftwareTree.place(root, (symbol) => symbol.children, (symbol) => wide(symbol) + 8), last = tree.height;
1979
2535
  const spots = [];
1980
2536
  const add = (node, parent) => {
@@ -2024,22 +2580,22 @@ var ParseTree = (_class8 = class _ParseTree extends SoftwareDiagram {
2024
2580
  key: spot.symbol.key,
2025
2581
  x: spot.x,
2026
2582
  y: spot.y + 4,
2027
- text: SoftwareText.fit(spot.symbol.text, 96, SIZE7, true),
2583
+ text: SoftwareText.fit(spot.symbol.text, 96, SIZE9, true),
2028
2584
  anchor: "middle",
2029
- size: SIZE7,
2585
+ size: SIZE9,
2030
2586
  weight: spot.token ? 600 : void 0,
2031
2587
  fill: spot.token ? palette.inkOn(fill(spot)) : theme.ink
2032
2588
  })));
2033
2589
  }
2034
- }, _class8.__initStatic8(), _class8);
2590
+ }, _class10.__initStatic10(), _class10);
2035
2591
 
2036
2592
  // src/charts/softwarediagrams/PetriNet.ts
2037
- var SIZE8 = 10;
2593
+ var SIZE10 = 10;
2038
2594
  var R2 = 16;
2039
2595
  var DOT = 2.6;
2040
2596
  var DOTS = [[], [[0, 0]], [[-5, 0], [5, 0]], [[0, -5.5], [-5.5, 4], [5.5, 4]], [[-5, -5], [5, -5], [-5, 5], [5, 5]], [[-6, -6], [6, -6], [0, 0], [-6, 6], [6, 6]]];
2041
- var PetriNet = (_class9 = class _PetriNet extends SoftwareDiagram {
2042
- static __initStatic9() {this.meta = {
2597
+ var PetriNet = (_class11 = class _PetriNet extends SoftwareDiagram {
2598
+ static __initStatic11() {this.meta = {
2043
2599
  id: "petri-net",
2044
2600
  name: "Petri net",
2045
2601
  family: "network" /* Network */,
@@ -2091,11 +2647,11 @@ var PetriNet = (_class9 = class _PetriNet extends SoftwareDiagram {
2091
2647
  const vertical = orientation === "vertical" /* Vertical */, bar = transitionForm === "bar" /* Bar */, { theme, palette } = ctx, ink = theme.inkSecondary;
2092
2648
  const graph = this.#graph(), marking = _PetriNet.marking(graph, { kind, tokens, weight });
2093
2649
  const names = new Map(graph.vertices.map(({ id, raw }) => [id, _nullishCoalesce(SoftwareGraph.text(raw[label]), () => ( id))]));
2094
- const lines = new Map(graph.vertices.map(({ id }) => [id, SoftwareText.wrap(names.get(id), vertical ? 96 : 62, SIZE8)]));
2650
+ const lines = new Map(graph.vertices.map(({ id }) => [id, SoftwareText.wrap(names.get(id), vertical ? 96 : 62, SIZE10)]));
2095
2651
  const extent = (id) => !marking.transitions.has(id) ? [R2 * 2, R2 * 2] : !bar ? [26, 26] : vertical ? [36, 8] : [8, 36];
2096
2652
  const plan = SoftwareWiring.build({
2097
2653
  nodes: graph.vertices.map(({ id }) => {
2098
- const [width, height] = extent(id), text = lines.get(id), wide = Math.max(0, ...text.map((line) => SoftwareText.width(line, SIZE8)));
2654
+ const [width, height] = extent(id), text = lines.get(id), wide = Math.max(0, ...text.map((line) => SoftwareText.width(line, SIZE10)));
2099
2655
  const room = vertical ? wide + 6 : text.length * 12 + 4;
2100
2656
  return { id, along: vertical ? height : width, across: vertical ? width : height, slot: (vertical ? width : height) + room, shift: -room / 2, span: vertical ? Math.max(height, text.length * 12) : Math.max(width, wide + 4), ports: marking.transitions.has(id) ? "spread" : "round" };
2101
2657
  }),
@@ -2112,8 +2668,8 @@ var PetriNet = (_class9 = class _PetriNet extends SoftwareDiagram {
2112
2668
  const { x, y, width: w, height: h } = plan.boxes.get(id), name = names.get(id), text = lines.get(id);
2113
2669
  text.forEach((line, i) => {
2114
2670
  const at2 = vertical ? { x: x + w / 2 + 6, y: y + 3.5 + (i - (text.length - 1) / 2) * 12, anchor: "start" } : { x, y: y + h / 2 + 13 + i * 12, anchor: "middle" };
2115
- labels.push({ key: `${id}/${i}`, ...at2, text: line, size: SIZE8, fill: theme.inkSecondary });
2116
- placer.block(SoftwarePlacer.text(at2.x, at2.y, line, SIZE8, at2.anchor));
2671
+ labels.push({ key: `${id}/${i}`, ...at2, text: line, size: SIZE10, fill: theme.inkSecondary });
2672
+ placer.block(SoftwarePlacer.text(at2.x, at2.y, line, SIZE10, at2.anchor));
2117
2673
  });
2118
2674
  if (marking.transitions.has(id)) {
2119
2675
  const state = marking.enabled.has(id) ? "Enabled" : "Not enabled", fill = palette.color(state);
@@ -2136,14 +2692,14 @@ var PetriNet = (_class9 = class _PetriNet extends SoftwareDiagram {
2136
2692
  this.texts(stage, ctx, "node-text", labels);
2137
2693
  this.texts(stage, ctx, "wire-text", this.wireLabels(placer, plan.wires, (i) => weights[i] > 1 ? String(weights[i]) : ""));
2138
2694
  }
2139
- }, _class9.__initStatic9(), _class9);
2695
+ }, _class11.__initStatic11(), _class11);
2140
2696
 
2141
2697
  // src/charts/softwarediagrams/SignalFlowGraph.ts
2142
- var SIZE9 = 10.5;
2143
- var NAME5 = { forward: "Forward path", feedforward: "Feedforward", feedback: "Feedback", self: "Self loop" };
2144
- var n3 = (value) => Math.round(value * 100) / 100;
2145
- var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram {
2146
- static __initStatic10() {this.meta = {
2698
+ var SIZE11 = 10.5;
2699
+ var NAME6 = { forward: "Forward path", feedforward: "Feedforward", feedback: "Feedback", self: "Self loop" };
2700
+ var n4 = (value) => Math.round(value * 100) / 100;
2701
+ var SignalFlowGraph = (_class12 = class _SignalFlowGraph extends SoftwareDiagram {
2702
+ static __initStatic12() {this.meta = {
2147
2703
  id: "signal-flow-graph",
2148
2704
  name: "Signal-flow graph",
2149
2705
  family: "network" /* Network */,
@@ -2191,8 +2747,8 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2191
2747
  const level = /* @__PURE__ */ new Map(), depth = { feedforward: 0, feedback: 0 };
2192
2748
  for (const side of ["feedforward", "feedback"]) {
2193
2749
  const taken = [];
2194
- const list = arcs.map((_, i) => i).filter((i) => sorts[i] === side).sort((a, b) => span(a)[1] - span(a)[0] - (span(b)[1] - span(b)[0]) || a - b);
2195
- for (const i of list) {
2750
+ const list2 = arcs.map((_, i) => i).filter((i) => sorts[i] === side).sort((a, b) => span(a)[1] - span(a)[0] - (span(b)[1] - span(b)[0]) || a - b);
2751
+ for (const i of list2) {
2196
2752
  const [lo, hi] = span(i);
2197
2753
  let at2 = 0;
2198
2754
  while (taken.some((other) => other.level === at2 && other.lo < hi && lo < other.hi)) at2++;
@@ -2212,7 +2768,7 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2212
2768
  const sort = sorts[index], xa = x.get(arc.source), xb = x.get(arc.target), dir = Math.sign(xb - xa) || 1, mid = (xa + xb) / 2;
2213
2769
  if (sort === "forward") {
2214
2770
  const end = xb - r - (endArrows ? 3 : 0);
2215
- return { index, sort, level: 0, d: `M${n3(xa + r)},${n3(y)}H${n3(end)}`, points: [[xa + r, y], [xb - r, y]], tip: endArrows ? [xb - r, y] : [mid + 4, y], angle: 0, label: { x: mid, y: y - 9, room: pitch - 2 * r - 10 } };
2771
+ return { index, sort, level: 0, d: `M${n4(xa + r)},${n4(y)}H${n4(end)}`, points: [[xa + r, y], [xb - r, y]], tip: endArrows ? [xb - r, y] : [mid + 4, y], angle: 0, label: { x: mid, y: y - 9, room: pitch - 2 * r - 10 } };
2216
2772
  }
2217
2773
  const up = sort === "feedforward" || sort === "self" && selfAbove, side = up ? -1 : 1;
2218
2774
  if (sort === "self") {
@@ -2221,7 +2777,7 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2221
2777
  index,
2222
2778
  sort,
2223
2779
  level: 0,
2224
- d: `M${n3(xa - 5)},${n3(y + side * (r - 1))}A9.5,9.5 0 1 ${sweep} ${n3(xa + 5)},${n3(y + side * (r + (endArrows ? 2 : -1)))}`,
2780
+ d: `M${n4(xa - 5)},${n4(y + side * (r - 1))}A9.5,9.5 0 1 ${sweep} ${n4(xa + 5)},${n4(y + side * (r + (endArrows ? 2 : -1)))}`,
2225
2781
  points: [[xa - 9, cy], [xa, cy + side * 9], [xa + 9, cy]],
2226
2782
  tip: endArrows ? [xa + 5, y + side * (r - 1)] : [xa + 4, cy + side * 9.5],
2227
2783
  angle: endArrows ? -side * 1.95 : 0,
@@ -2229,8 +2785,8 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2229
2785
  };
2230
2786
  }
2231
2787
  const at2 = level.get(index), top = y + side * reach(at2), corner = Math.min(square ? 5 : reach(at2) - r, Math.abs(xb - xa) / 2), foot = y + side * r, turn = side * dir < 0 ? 1 : 0;
2232
- const shoulder = (toward) => `A${n3(corner)},${n3(corner)} 0 0 ${turn} ${toward}`;
2233
- const d = `M${n3(xa)},${n3(foot)}V${n3(top - side * corner)}${shoulder(`${n3(xa + dir * corner)},${n3(top)}`)}H${n3(xb - dir * corner)}${shoulder(`${n3(xb)},${n3(top - side * corner)}`)}V${n3(foot + (endArrows ? side * 3 : 0))}`;
2788
+ const shoulder = (toward) => `A${n4(corner)},${n4(corner)} 0 0 ${turn} ${toward}`;
2789
+ const d = `M${n4(xa)},${n4(foot)}V${n4(top - side * corner)}${shoulder(`${n4(xa + dir * corner)},${n4(top)}`)}H${n4(xb - dir * corner)}${shoulder(`${n4(xb)},${n4(top - side * corner)}`)}V${n4(foot + (endArrows ? side * 3 : 0))}`;
2234
2790
  const turns = [0, 0.25, 0.5, 0.75, 1].map((share) => share * Math.PI / 2);
2235
2791
  const points2 = [
2236
2792
  [xa, foot],
@@ -2246,17 +2802,17 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2246
2802
  const { arc, nodeForm, arrow, label, gain } = this.options, { theme, palette } = ctx;
2247
2803
  const graph = this.#graph(), circle = nodeForm === "circle" /* Circle */;
2248
2804
  const names = new Map(graph.vertices.map(({ id, raw }) => [id, _nullishCoalesce(SoftwareGraph.text(raw[label]), () => ( id))]));
2249
- const radius = circle ? Math.max(11, Math.min(20, Math.max(0, ...[...names.values()].map((name) => SoftwareText.width(name, SIZE9))) / 2 + 5)) : 4;
2805
+ const radius = circle ? Math.max(11, Math.min(20, Math.max(0, ...[...names.values()].map((name) => SoftwareText.width(name, SIZE11))) / 2 + 5)) : 4;
2250
2806
  const plan = _SignalFlowGraph.layout(graph.vertices.map((vertex) => vertex.id), graph.arcs, { width: ctx.plot.width, height: ctx.plot.height, radius, square: arc === "square" /* Square */, endArrows: arrow === "end" /* End */ });
2251
2807
  const stage = this.stage(ctx, plan.width, plan.height), placer = new SoftwarePlacer({ x0: 0, y0: 0, x1: plan.width, y1: plan.height });
2252
2808
  for (const x of plan.x.values()) placer.block({ x0: x - radius - 1, y0: plan.baseline - radius - 1, x1: x + radius + 1, y1: plan.baseline + radius + 1 });
2253
2809
  for (const branch of plan.branches) placer.avoid(branch.points);
2254
2810
  const gains = [];
2255
2811
  const wires = plan.branches.map((branch) => {
2256
- const link = graph.arcs[branch.index], stroke = palette.color(NAME5[branch.sort]), text = SoftwareText.fit(_nullishCoalesce(SoftwareGraph.text(link.raw[gain]), () => ( "")), branch.label.room, SIZE9);
2257
- const spot = text ? placer.claim([{ ...branch.label, box: SoftwarePlacer.text(branch.label.x, branch.label.y, text, SIZE9, "middle") }]) : null;
2258
- if (spot) gains.push({ key: link.key, x: spot.x, y: spot.y, text, anchor: "middle", size: SIZE9, halo: true });
2259
- return { key: link.key, d: branch.d, raw: link.raw, stroke, head: { d: SoftwareShapes.arrow(branch.tip, branch.angle, 8) }, tip: { title: `${names.get(link.source)} \u2192 ${names.get(link.target)}`, color: stroke, rows: [["Branch", NAME5[branch.sort]], ["Gain", text || "none"]] } };
2812
+ const link = graph.arcs[branch.index], stroke = palette.color(NAME6[branch.sort]), text = SoftwareText.fit(_nullishCoalesce(SoftwareGraph.text(link.raw[gain]), () => ( "")), branch.label.room, SIZE11);
2813
+ const spot = text ? placer.claim([{ ...branch.label, box: SoftwarePlacer.text(branch.label.x, branch.label.y, text, SIZE11, "middle") }]) : null;
2814
+ if (spot) gains.push({ key: link.key, x: spot.x, y: spot.y, text, anchor: "middle", size: SIZE11, halo: true });
2815
+ return { key: link.key, d: branch.d, raw: link.raw, stroke, head: { d: SoftwareShapes.arrow(branch.tip, branch.angle, 8) }, tip: { title: `${names.get(link.source)} \u2192 ${names.get(link.target)}`, color: stroke, rows: [["Branch", NAME6[branch.sort]], ["Gain", text || "none"]] } };
2260
2816
  });
2261
2817
  const shapes = [], labels = [];
2262
2818
  for (const { id, raw } of graph.vertices) {
@@ -2264,27 +2820,27 @@ var SignalFlowGraph = (_class10 = class _SignalFlowGraph extends SoftwareDiagram
2264
2820
  const into = graph.arcs.filter((link) => link.target === id).length, out = graph.arcs.filter((link) => link.source === id).length;
2265
2821
  shapes.push({ key: id, raw, d: SoftwareShapes.ellipse(x, y, radius - (circle ? 1 : 0)), fill: circle ? theme.surface : theme.ink, stroke: circle ? theme.inkSecondary : theme.surface, strokeWidth: 2, tip: { title: name, rows: [["Branches in", into], ["Branches out", out]] } });
2266
2822
  if (circle) {
2267
- labels.push({ key: id, x, y: y + 3.5, text: SoftwareText.fit(name, 2 * radius - 6, SIZE9), anchor: "middle", size: SIZE9 });
2823
+ labels.push({ key: id, x, y: y + 3.5, text: SoftwareText.fit(name, 2 * radius - 6, SIZE11), anchor: "middle", size: SIZE11 });
2268
2824
  continue;
2269
2825
  }
2270
- const text = SoftwareText.fit(name, 70, SIZE9), half = SoftwareText.width(text, SIZE9) / 2 + 5;
2826
+ const text = SoftwareText.fit(name, 70, SIZE11), half = SoftwareText.width(text, SIZE11) / 2 + 5;
2271
2827
  const spots = [["middle", x, y + 17], ["start", x + 5, y + 16], ["end", x - 5, y + 16], ["middle", x, y - 10], ["start", x + 5, y - 9], ["end", x - 5, y - 9], ["middle", x + half + 4, y + 17]];
2272
- const spot = placer.claim(spots.map(([anchor, lx, ly]) => ({ anchor, x: lx, y: ly, box: SoftwarePlacer.text(lx, ly, text, SIZE9, anchor) })));
2273
- if (spot && text) labels.push({ key: id, x: spot.x, y: spot.y, text, anchor: spot.anchor, size: SIZE9, weight: 600, halo: true });
2828
+ const spot = placer.claim(spots.map(([anchor, lx, ly]) => ({ anchor, x: lx, y: ly, box: SoftwarePlacer.text(lx, ly, text, SIZE11, anchor) })));
2829
+ if (spot && text) labels.push({ key: id, x: spot.x, y: spot.y, text, anchor: spot.anchor, size: SIZE11, weight: 600, halo: true });
2274
2830
  }
2275
2831
  this.wires(stage, ctx, wires);
2276
2832
  this.paths(stage, ctx, "nodes", shapes);
2277
2833
  this.texts(stage, ctx, "gains", gains);
2278
2834
  this.texts(stage, ctx, "node-text", labels);
2279
2835
  }
2280
- }, _class10.__initStatic10(), _class10);
2836
+ }, _class12.__initStatic12(), _class12);
2281
2837
 
2282
2838
  // src/charts/softwarediagrams/TrieDiagram.ts
2283
- var SIZE10 = 10.5;
2839
+ var SIZE12 = 10.5;
2284
2840
  var PILL = 18;
2285
2841
  var DOT2 = 5;
2286
- var TrieDiagram = (_class11 = class _TrieDiagram extends SoftwareDiagram {
2287
- static __initStatic11() {this.meta = {
2842
+ var TrieDiagram = (_class13 = class _TrieDiagram extends SoftwareDiagram {
2843
+ static __initStatic13() {this.meta = {
2288
2844
  id: "trie-diagram",
2289
2845
  name: "Trie",
2290
2846
  family: "hierarchy" /* Hierarchy */,
@@ -2334,7 +2890,7 @@ var TrieDiagram = (_class11 = class _TrieDiagram extends SoftwareDiagram {
2334
2890
  const { word, value, compression, orientation, labelAt } = this.options, { theme, palette } = ctx;
2335
2891
  const vertical = orientation === "vertical" /* Vertical */, inside = labelAt === "node" /* Node */;
2336
2892
  const root = _TrieDiagram.build(this.options.data, word, value, compression === "radix" /* Radix */);
2337
- const text = (node) => SoftwareText.fit(node.label, 84, SIZE10, true), wide = (node) => SoftwareText.width(text(node), SIZE10, true);
2893
+ const text = (node) => SoftwareText.fit(node.label, 84, SIZE12, true), wide = (node) => SoftwareText.width(text(node), SIZE12, true);
2338
2894
  const pill = (node) => inside && node.label ? Math.max(PILL, wide(node) + 12) : DOT2 * 2;
2339
2895
  const tree = SoftwareTree.place(root, (node) => node.children, (node) => !vertical ? 22 : inside ? pill(node) + 8 : Math.max(18, (wide(node) + 10) / 0.6));
2340
2896
  const nodes = SoftwareTree.list(tree), depth = tree.height;
@@ -2365,24 +2921,24 @@ var TrieDiagram = (_class11 = class _TrieDiagram extends SoftwareDiagram {
2365
2921
  }));
2366
2922
  this.texts(stage, ctx, "node-text", nodes.filter((node) => node.data.label).map((node) => {
2367
2923
  const { x, y } = at2(node), data = node.data;
2368
- if (inside) return { key: data.key, x, y: y + 3.5, text: text(data), anchor: "middle", size: SIZE10, weight: 600, fill: data.terminal ? palette.inkOn(fill(data)) : theme.ink };
2924
+ if (inside) return { key: data.key, x, y: y + 3.5, text: text(data), anchor: "middle", size: SIZE12, weight: 600, fill: data.terminal ? palette.inkOn(fill(data)) : theme.ink };
2369
2925
  const parent = links.find((link) => link.node === data).parent;
2370
- return vertical ? { key: data.key, x: parent.x + (x - parent.x) * 0.6, y: parent.y + (y - parent.y) * 0.6 + 3.5, text: text(data), anchor: "middle", size: SIZE10, weight: 600, halo: true } : { key: data.key, x: x - DOT2 - 5, y: y - 5, text: text(data), anchor: "end", size: SIZE10, weight: 600, halo: true };
2926
+ return vertical ? { key: data.key, x: parent.x + (x - parent.x) * 0.6, y: parent.y + (y - parent.y) * 0.6 + 3.5, text: text(data), anchor: "middle", size: SIZE12, weight: 600, halo: true } : { key: data.key, x: x - DOT2 - 5, y: y - 5, text: text(data), anchor: "end", size: SIZE12, weight: 600, halo: true };
2371
2927
  }));
2372
2928
  }
2373
- }, _class11.__initStatic11(), _class11);
2929
+ }, _class13.__initStatic13(), _class13);
2374
2930
 
2375
2931
  // src/charts/softwarediagrams/UseCaseDiagram.ts
2376
2932
 
2377
- var SIZE11 = 10.5;
2933
+ var SIZE13 = 10.5;
2378
2934
  var TITLE = 22;
2379
- var PAD = 12;
2935
+ var PAD3 = 12;
2380
2936
  var GAP2 = 58;
2381
2937
  var ROW2 = 12;
2382
- var KINDS5 = new Set(Object.values(UseCaseLinkKind));
2938
+ var KINDS6 = new Set(Object.values(UseCaseLinkKind));
2383
2939
  var { Association, Include, Extend, Generalization } = UseCaseLinkKind;
2384
- var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2385
- static __initStatic12() {this.meta = {
2940
+ var UseCaseDiagram = (_class14 = class _UseCaseDiagram extends SoftwareDiagram {
2941
+ static __initStatic14() {this.meta = {
2386
2942
  id: "uml-use-case-diagram",
2387
2943
  name: "UML use case diagram",
2388
2944
  family: "network" /* Network */,
@@ -2434,12 +2990,12 @@ var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2434
2990
  const columns = Array.from({ length: Math.max(0, ...cases.map((id) => (_nullishCoalesce(depth.get(id), () => ( 0))) + 1)) }, (_, column) => cases.filter((id) => (_nullishCoalesce(depth.get(id), () => ( 0))) === column)).filter((column) => column.length);
2435
2991
  const lists = [parts.filter((part) => part.actor && !part.right).map((part) => part.id), ...columns, parts.filter((part) => part.actor && part.right).map((part) => part.id)];
2436
2992
  const place = /* @__PURE__ */ new Map();
2437
- const settle = (list) => list.forEach((id, i) => place.set(id, (i + 0.5) / list.length));
2993
+ const settle = (list2) => list2.forEach((id, i) => place.set(id, (i + 0.5) / list2.length));
2438
2994
  lists.forEach(settle);
2439
- const order = (list, others) => {
2440
- const score = new Map(list.map((id) => [id, _nullishCoalesce(_d3.mean.call(void 0, near.get(id).filter((other) => others.has(other)), (other) => place.get(other)), () => ( place.get(id)))]));
2441
- list.sort((a, b) => score.get(a) - score.get(b));
2442
- settle(list);
2995
+ const order = (list2, others) => {
2996
+ const score = new Map(list2.map((id) => [id, _nullishCoalesce(_d3.mean.call(void 0, near.get(id).filter((other) => others.has(other)), (other) => place.get(other)), () => ( place.get(id)))]));
2997
+ list2.sort((a, b) => score.get(a) - score.get(b));
2998
+ settle(list2);
2443
2999
  };
2444
3000
  for (let sweep = 0; sweep < 4; sweep++) {
2445
3001
  for (let i = 1; i < lists.length; i++) order(lists[i], new Set(lists.slice(0, i).flat()));
@@ -2448,38 +3004,38 @@ var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2448
3004
  const spots = /* @__PURE__ */ new Map();
2449
3005
  const size = (part) => {
2450
3006
  if (!part.actor) {
2451
- const lines2 = SoftwareText.wrap(part.label, 88, SIZE11);
2452
- return { lines: lines2, rx: Math.max(40, Math.max(0, ...lines2.map((line) => SoftwareText.width(line, SIZE11))) / 2 + 15), ry: lines2.length > 1 ? 21 : 17 };
3007
+ const lines2 = SoftwareText.wrap(part.label, 88, SIZE13);
3008
+ return { lines: lines2, rx: Math.max(40, Math.max(0, ...lines2.map((line) => SoftwareText.width(line, SIZE13))) / 2 + 15), ry: lines2.length > 1 ? 21 : 17 };
2453
3009
  }
2454
- const lines = [SoftwareText.fit(part.label, 104, SIZE11, true)];
2455
- return boxed ? { lines, rx: Math.max(28, SoftwareText.width(lines[0], SIZE11, true) / 2 + 8), ry: 17 } : { lines, rx: 14, ry: 15 };
3010
+ const lines = [SoftwareText.fit(part.label, 104, SIZE13, true)];
3011
+ return boxed ? { lines, rx: Math.max(28, SoftwareText.width(lines[0], SIZE13, true) / 2 + 8), ry: 17 } : { lines, rx: 14, ry: 15 };
2456
3012
  };
2457
3013
  const sized = new Map(parts.map((part) => [part.id, size(part)]));
2458
3014
  const [left, right] = [lists[0], lists.at(-1)];
2459
- const reach = (list) => Math.max(0, ...list.map((id) => Math.max(sized.get(id).rx, boxed ? 0 : SoftwareText.width(sized.get(id).lines[0], SIZE11, true) / 2)));
3015
+ const reach = (list2) => Math.max(0, ...list2.map((id) => Math.max(sized.get(id).rx, boxed ? 0 : SoftwareText.width(sized.get(id).lines[0], SIZE13, true) / 2)));
2460
3016
  const [leftRoom, rightRoom] = [left.length ? 2 * reach(left) + 36 : 0, right.length ? 2 * reach(right) + 36 : 0];
2461
3017
  const widths = columns.map((column) => 2 * Math.max(...column.map((id) => sized.get(id).rx)));
2462
3018
  const pitches = columns.map((column) => 2 * Math.max(...column.map((id) => sized.get(id).ry)) + ROW2);
2463
3019
  const inner = Math.max(0, ...columns.map((column, c) => column.length * pitches[c] - ROW2));
2464
- const frame = columns.length ? { x: leftRoom, y: 0, width: 2 * PAD + widths.reduce((a, b) => a + b, 0) + GAP2 * (columns.length - 1), height: TITLE + 2 * PAD + inner } : null;
3020
+ const frame = columns.length ? { x: leftRoom, y: 0, width: 2 * PAD3 + widths.reduce((a, b) => a + b, 0) + GAP2 * (columns.length - 1), height: TITLE + 2 * PAD3 + inner } : null;
2465
3021
  const [above, below] = boxed ? [17, 17] : [15, 30], step = above + below + ROW2;
2466
- const height = Math.max(_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _24 => _24.height]), () => ( 0)), Math.max(left.length, right.length) * step - ROW2);
3022
+ const height = Math.max(_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _27 => _27.height]), () => ( 0)), Math.max(left.length, right.length) * step - ROW2);
2467
3023
  if (frame) frame.y = (height - frame.height) / 2;
2468
- let x = leftRoom + PAD;
3024
+ let x = leftRoom + PAD3;
2469
3025
  columns.forEach((column, c) => {
2470
- const top = frame.y + TITLE + PAD + (inner - (column.length * pitches[c] - ROW2)) / 2;
3026
+ const top = frame.y + TITLE + PAD3 + (inner - (column.length * pitches[c] - ROW2)) / 2;
2471
3027
  column.forEach((id, row) => spots.set(id, { part: byId.get(id), x: x + widths[c] / 2, y: top + (pitches[c] - ROW2) / 2 + row * pitches[c], ...sized.get(id), column: c, row }));
2472
3028
  x += widths[c] + GAP2;
2473
3029
  });
2474
- const stand = (list, at2, column) => {
2475
- const wanted = list.map((id, i) => _nullishCoalesce(_d3.mean.call(void 0, near.get(id).filter((other) => spots.has(other) && !byId.get(other).actor), (other) => spots.get(other).y), () => ( (i + 0.5) / list.length * height)));
2476
- for (let i = 0; i < list.length; i++) wanted[i] = Math.max(wanted[i], i ? wanted[i - 1] + step : above);
2477
- for (let i = list.length - 1; i >= 0; i--) wanted[i] = Math.min(wanted[i], i < list.length - 1 ? wanted[i + 1] - step : height - below);
2478
- list.forEach((id, row) => spots.set(id, { part: byId.get(id), x: at2, y: wanted[row], ...sized.get(id), column, row }));
3030
+ const stand = (list2, at2, column) => {
3031
+ const wanted = list2.map((id, i) => _nullishCoalesce(_d3.mean.call(void 0, near.get(id).filter((other) => spots.has(other) && !byId.get(other).actor), (other) => spots.get(other).y), () => ( (i + 0.5) / list2.length * height)));
3032
+ for (let i = 0; i < list2.length; i++) wanted[i] = Math.max(wanted[i], i ? wanted[i - 1] + step : above);
3033
+ for (let i = list2.length - 1; i >= 0; i--) wanted[i] = Math.min(wanted[i], i < list2.length - 1 ? wanted[i + 1] - step : height - below);
3034
+ list2.forEach((id, row) => spots.set(id, { part: byId.get(id), x: at2, y: wanted[row], ...sized.get(id), column, row }));
2479
3035
  };
2480
3036
  stand(left, leftRoom / 2 - 6, -1);
2481
- stand(right, leftRoom + (_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _25 => _25.width]), () => ( 0))) + rightRoom / 2 + 6, columns.length);
2482
- return { spots, boundary: frame, width: leftRoom + (_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _26 => _26.width]), () => ( 0))) + rightRoom, height };
3037
+ stand(right, leftRoom + (_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _28 => _28.width]), () => ( 0))) + rightRoom / 2 + 6, columns.length);
3038
+ return { spots, boundary: frame, width: leftRoom + (_nullishCoalesce(_optionalChain([frame, 'optionalAccess', _29 => _29.width]), () => ( 0))) + rightRoom, height };
2483
3039
  }
2484
3040
  /** Points from the outline of `a` to the outline of `b`, bowed sideways by `bulge`. */
2485
3041
  static link(a, b, bulge = 0) {
@@ -2511,10 +3067,10 @@ var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2511
3067
  return { id, raw, actor, label: _nullishCoalesce(SoftwareGraph.text(raw[label]), () => ( id)), right: actor && actorSide === "split" /* Split */ && String(_nullishCoalesce(raw[role], () => ( ""))).toLowerCase() === "secondary" };
2512
3068
  });
2513
3069
  const plan = _UseCaseDiagram.layout(parts, graph.arcs, boxed), stage = this.stage(ctx, plan.width, plan.height);
2514
- const held = this.options.data, system = _nullishCoalesce(this.options.system, () => ( (Array.isArray(held) ? null : SoftwareGraph.text(_optionalChain([held, 'optionalAccess', _27 => _27.system])))));
3070
+ const held = this.options.data, system = _nullishCoalesce(this.options.system, () => ( (Array.isArray(held) ? null : SoftwareGraph.text(_optionalChain([held, 'optionalAccess', _30 => _30.system])))));
2515
3071
  const frame = plan.boundary;
2516
3072
  this.paths(stage, ctx, "boundary", frame ? [{ key: "system", d: SoftwareShapes.rect(frame.x, frame.y, frame.width, frame.height, 6), fill: theme.grid, opacity: 0.45 }] : []);
2517
- this.texts(stage, ctx, "boundary-name", frame && system ? [{ key: "system", x: frame.x + PAD, y: frame.y + 16, text: SoftwareText.fit(system, frame.width - 2 * PAD, 11, true), size: 11, weight: 600 }] : []);
3073
+ this.texts(stage, ctx, "boundary-name", frame && system ? [{ key: "system", x: frame.x + PAD3, y: frame.y + 16, text: SoftwareText.fit(system, frame.width - 2 * PAD3, 11, true), size: 11, weight: 600 }] : []);
2518
3074
  const placer = new SoftwarePlacer(), shapes = [], labels = [];
2519
3075
  const degree = (id) => graph.arcs.filter((arc) => arc.source === id || arc.target === id).length;
2520
3076
  for (const spot of plan.spots.values()) {
@@ -2523,22 +3079,22 @@ var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2523
3079
  if (!part.actor) {
2524
3080
  const fill = palette.color("Use case");
2525
3081
  shapes.push({ ...main, d: SoftwareShapes.ellipse(x, y, rx, ry), fill, tip: { title: part.label, color: fill, rows: [["Kind", "Use case"], ["Relations", degree(part.id)]] } });
2526
- lines.forEach((line, i) => labels.push({ key: `${part.id}/${i}`, x, y: y + 3.5 + (i - (lines.length - 1) / 2) * 12, text: line, anchor: "middle", size: SIZE11, fill: palette.inkOn(fill) }));
3082
+ lines.forEach((line, i) => labels.push({ key: `${part.id}/${i}`, x, y: y + 3.5 + (i - (lines.length - 1) / 2) * 12, text: line, anchor: "middle", size: SIZE13, fill: palette.inkOn(fill) }));
2527
3083
  continue;
2528
3084
  }
2529
3085
  const tip = { title: part.label, rows: [["Kind", "Actor"], ["Relations", degree(part.id)]] };
2530
3086
  if (boxed) {
2531
3087
  const fill = palette.color("Actor");
2532
3088
  shapes.push({ ...main, d: SoftwareShapes.rect(x - rx, y - ry, 2 * rx, 2 * ry, 3), fill, tip: { ...tip, color: fill } });
2533
- labels.push({ key: `${part.id}/kind`, x, y: y - 3, text: "\xABactor\xBB", anchor: "middle", size: 9, fill: palette.inkOn(fill) }, { key: `${part.id}/0`, x, y: y + 10, text: lines[0], anchor: "middle", size: SIZE11, weight: 600, fill: palette.inkOn(fill) });
3089
+ labels.push({ key: `${part.id}/kind`, x, y: y - 3, text: "\xABactor\xBB", anchor: "middle", size: 9, fill: palette.inkOn(fill) }, { key: `${part.id}/0`, x, y: y + 10, text: lines[0], anchor: "middle", size: SIZE13, weight: 600, fill: palette.inkOn(fill) });
2534
3090
  } else {
2535
3091
  shapes.push({ ...main, d: SoftwareShapes.actor(x, y - ry, 2 * ry), fill: theme.surface, stroke: ink, strokeWidth: 2, tip });
2536
- labels.push({ key: `${part.id}/0`, x, y: y + ry + 12, text: lines[0], anchor: "middle", size: SIZE11, weight: 600 });
2537
- placer.block(SoftwarePlacer.text(x, y + ry + 12, lines[0], SIZE11, "middle", true));
3092
+ labels.push({ key: `${part.id}/0`, x, y: y + ry + 12, text: lines[0], anchor: "middle", size: SIZE13, weight: 600 });
3093
+ placer.block(SoftwarePlacer.text(x, y + ry + 12, lines[0], SIZE13, "middle", true));
2538
3094
  }
2539
3095
  }
2540
3096
  const drawn = graph.arcs.flatMap((arc) => {
2541
- const a = plan.spots.get(arc.source), b = plan.spots.get(arc.target), stated = String(_nullishCoalesce(arc.raw[linkKind], () => ( ""))).toLowerCase(), sort = KINDS5.has(stated) ? stated : Association;
3097
+ const a = plan.spots.get(arc.source), b = plan.spots.get(arc.target), stated2 = String(_nullishCoalesce(arc.raw[linkKind], () => ( ""))).toLowerCase(), sort = KINDS6.has(stated2) ? stated2 : Association;
2542
3098
  const stacked = a.column === b.column && Math.abs(a.row - b.row) > 1;
2543
3099
  const points2 = arc.source === arc.target ? [] : _UseCaseDiagram.link(a, b, stacked ? (a.column < 0 ? -1 : 1) * (Math.max(a.rx, b.rx) + 22) : 0);
2544
3100
  return points2.length > 1 ? [{ arc, a, b, sort, points: points2 }] : [];
@@ -2570,7 +3126,7 @@ var UseCaseDiagram = (_class12 = class _UseCaseDiagram extends SoftwareDiagram {
2570
3126
  this.texts(stage, ctx, "node-text", labels);
2571
3127
  this.texts(stage, ctx, "stereotypes", marks);
2572
3128
  }
2573
- }, _class12.__initStatic12(), _class12);
3129
+ }, _class14.__initStatic14(), _class14);
2574
3130
 
2575
3131
  // src/charts/softwarediagrams/index.ts
2576
3132
  var softwarediagramsCatalog = [
@@ -2585,7 +3141,9 @@ var softwarediagramsCatalog = [
2585
3141
  CallGraph,
2586
3142
  SignalFlowGraph,
2587
3143
  ParseTree,
2588
- TrieDiagram
3144
+ TrieDiagram,
3145
+ ComponentDiagram,
3146
+ DeploymentDiagram
2589
3147
  ];
2590
3148
 
2591
3149
 
@@ -2633,4 +3191,13 @@ var softwarediagramsCatalog = [
2633
3191
 
2634
3192
 
2635
3193
 
2636
- exports.SoftwareRouting = SoftwareRouting; exports.ActivityNodeKind = ActivityNodeKind; exports.UseCaseNodeKind = UseCaseNodeKind; exports.UseCaseLinkKind = UseCaseLinkKind; exports.UseCaseActorSide = UseCaseActorSide; exports.UseCaseActorForm = UseCaseActorForm; exports.DataFlowKind = DataFlowKind; exports.DataFlowNotation = DataFlowNotation; exports.NassiKind = NassiKind; exports.NassiBranchWidth = NassiBranchWidth; exports.NassiRowHeight = NassiRowHeight; exports.PetriNodeKind = PetriNodeKind; exports.PetriTokenMark = PetriTokenMark; exports.PetriTransitionForm = PetriTransitionForm; exports.BpmnNodeKind = BpmnNodeKind; exports.BpmnFlowKind = BpmnFlowKind; exports.BpmnPartition = BpmnPartition; exports.MemoryMapUsage = MemoryMapUsage; exports.MemoryMapOrigin = MemoryMapOrigin; exports.DifferentialFlameBasis = DifferentialFlameBasis; exports.DifferentialFlameSort = DifferentialFlameSort; exports.CallGraphLayering = CallGraphLayering; exports.SignalFlowArc = SignalFlowArc; exports.SignalFlowNode = SignalFlowNode; exports.SignalFlowArrow = SignalFlowArrow; exports.ParseTreeLeaves = ParseTreeLeaves; exports.ParseTreeLevels = ParseTreeLevels; exports.ParseTreeEdge = ParseTreeEdge; exports.TrieCompression = TrieCompression; exports.TrieLabel = TrieLabel; exports.SoftwareGraph = SoftwareGraph; exports.ActivityDiagram = ActivityDiagram; exports.BpmnDiagram = BpmnDiagram; exports.CallGraph = CallGraph; exports.DataFlowDiagram = DataFlowDiagram; exports.DifferentialFlameGraph = DifferentialFlameGraph; exports.MemoryMap = MemoryMap; exports.NassiShneidermanDiagram = NassiShneidermanDiagram; exports.ParseTree = ParseTree; exports.PetriNet = PetriNet; exports.SignalFlowGraph = SignalFlowGraph; exports.TrieDiagram = TrieDiagram; exports.UseCaseDiagram = UseCaseDiagram; exports.softwarediagramsCatalog = softwarediagramsCatalog;
3194
+
3195
+
3196
+
3197
+
3198
+
3199
+
3200
+
3201
+
3202
+
3203
+ exports.SoftwareRouting = SoftwareRouting; exports.ActivityNodeKind = ActivityNodeKind; exports.UseCaseNodeKind = UseCaseNodeKind; exports.UseCaseLinkKind = UseCaseLinkKind; exports.UseCaseActorSide = UseCaseActorSide; exports.UseCaseActorForm = UseCaseActorForm; exports.DataFlowKind = DataFlowKind; exports.DataFlowNotation = DataFlowNotation; exports.NassiKind = NassiKind; exports.NassiBranchWidth = NassiBranchWidth; exports.NassiRowHeight = NassiRowHeight; exports.PetriNodeKind = PetriNodeKind; exports.PetriTokenMark = PetriTokenMark; exports.PetriTransitionForm = PetriTransitionForm; exports.BpmnNodeKind = BpmnNodeKind; exports.BpmnFlowKind = BpmnFlowKind; exports.BpmnPartition = BpmnPartition; exports.MemoryMapUsage = MemoryMapUsage; exports.MemoryMapOrigin = MemoryMapOrigin; exports.DifferentialFlameBasis = DifferentialFlameBasis; exports.DifferentialFlameSort = DifferentialFlameSort; exports.CallGraphLayering = CallGraphLayering; exports.SignalFlowArc = SignalFlowArc; exports.SignalFlowNode = SignalFlowNode; exports.SignalFlowArrow = SignalFlowArrow; exports.ParseTreeLeaves = ParseTreeLeaves; exports.ParseTreeLevels = ParseTreeLevels; exports.ParseTreeEdge = ParseTreeEdge; exports.TrieCompression = TrieCompression; exports.TrieLabel = TrieLabel; exports.ComponentNodeKind = ComponentNodeKind; exports.ComponentLinkKind = ComponentLinkKind; exports.ComponentInterfaceForm = ComponentInterfaceForm; exports.ComponentGrouping = ComponentGrouping; exports.DeploymentKind = DeploymentKind; exports.DeploymentNodeForm = DeploymentNodeForm; exports.DeploymentArtifactForm = DeploymentArtifactForm; exports.SoftwareGraph = SoftwareGraph; exports.ActivityDiagram = ActivityDiagram; exports.BpmnDiagram = BpmnDiagram; exports.CallGraph = CallGraph; exports.ComponentDiagram = ComponentDiagram; exports.DataFlowDiagram = DataFlowDiagram; exports.DeploymentDiagram = DeploymentDiagram; exports.DifferentialFlameGraph = DifferentialFlameGraph; exports.MemoryMap = MemoryMap; exports.NassiShneidermanDiagram = NassiShneidermanDiagram; exports.ParseTree = ParseTree; exports.PetriNet = PetriNet; exports.SignalFlowGraph = SignalFlowGraph; exports.TrieDiagram = TrieDiagram; exports.UseCaseDiagram = UseCaseDiagram; exports.softwarediagramsCatalog = softwarediagramsCatalog;