@diagrammo/dgmo 0.53.0 → 0.55.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 (212) hide show
  1. package/dist/advanced.d.ts +112 -9
  2. package/dist/advanced.js +188 -160
  3. package/dist/auto.js +147 -132
  4. package/dist/auto.mjs +2352 -746
  5. package/dist/block.js +65 -62
  6. package/dist/chart-meta.js +52 -49
  7. package/dist/{charts-d3-DH2XA45I.js → charts-d3-KZ6V4OP2.js} +10 -8
  8. package/dist/chunk-2CW5ZTNH.js +58 -0
  9. package/dist/{chunk-MA3HJZHB.js → chunk-2HX6ZGY7.js} +7 -7
  10. package/dist/{chunk-YG2BEIQU.js → chunk-2R6HG6D5.js} +11 -11
  11. package/dist/{chunk-65V6IRFN.js → chunk-2ZJXKJSI.js} +106 -60
  12. package/dist/{chunk-PYO4TJJ3.js → chunk-32HUNA33.js} +60 -18
  13. package/dist/{chunk-UK6DKJLD.js → chunk-3BFXELBL.js} +51 -4
  14. package/dist/{chunk-RW5PEJ7D.js → chunk-3BZJ5KD5.js} +7 -3
  15. package/dist/{chunk-FT7TPPZ5.js → chunk-3FUTFYSP.js} +65 -26
  16. package/dist/{chunk-QAALSCKI.js → chunk-4MZCJV4M.js} +12 -12
  17. package/dist/{chunk-ZXUAPTCK.js → chunk-4R5KIPNX.js} +2 -2
  18. package/dist/{chunk-QWIBT6DS.js → chunk-5D5VHDJM.js} +49 -14
  19. package/dist/{chunk-U7NKYLX2.js → chunk-5H5GWWA4.js} +55 -19
  20. package/dist/{chunk-P3H7QVDH.js → chunk-5K5XBEXT.js} +11 -6
  21. package/dist/{chunk-PT4SW76W.js → chunk-6NJWBMJV.js} +49 -14
  22. package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
  23. package/dist/{chunk-6DCOIN4W.js → chunk-A2ARDILY.js} +783 -3
  24. package/dist/{chunk-CK2GMDXD.js → chunk-A2PTRSAO.js} +2 -2
  25. package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
  26. package/dist/{chunk-GMIJ35PW.js → chunk-A4UJP4IS.js} +68 -20
  27. package/dist/{chunk-LQHVDZYC.js → chunk-AKE6C2D7.js} +4 -4
  28. package/dist/{chunk-W5KMNC5U.js → chunk-ASPS5O6F.js} +9 -10
  29. package/dist/{chunk-FLDC7ZAK.js → chunk-AU75JHSR.js} +6 -3
  30. package/dist/chunk-BEOAKGNA.js +484 -0
  31. package/dist/{chunk-XY3UDKKH.js → chunk-COVYNAKJ.js} +4 -4
  32. package/dist/{chunk-4ASVFYB2.js → chunk-DS4MDEQ7.js} +5 -5
  33. package/dist/{chunk-7JDTNFAK.js → chunk-EFUQENO5.js} +76 -32
  34. package/dist/{chunk-BULHGPHK.js → chunk-EMSOFHEN.js} +2 -2
  35. package/dist/{chunk-3BEKKRH5.js → chunk-ETTDF3S2.js} +49 -11
  36. package/dist/{chunk-JHOAH4TI.js → chunk-ETYF5QZR.js} +2 -2
  37. package/dist/{chunk-AHXIMHDQ.js → chunk-F5ZNUMSY.js} +53 -14
  38. package/dist/{chunk-I64ECJX3.js → chunk-FBP33UM6.js} +3 -3
  39. package/dist/{chunk-VIRANCNY.js → chunk-FGAMFJNJ.js} +58 -20
  40. package/dist/{chunk-774C2FF3.js → chunk-GRXPFBYC.js} +24 -3
  41. package/dist/{chunk-NNYFQOTK.js → chunk-GTO5VCYG.js} +10 -8
  42. package/dist/{chunk-RJ5LBZ5U.js → chunk-HES4K6DV.js} +13 -13
  43. package/dist/{chunk-AZNXGWDC.js → chunk-HGKOVKAX.js} +7 -7
  44. package/dist/{chunk-DWUMPMV2.js → chunk-HLGOG44K.js} +2 -2
  45. package/dist/{chunk-VJHBSPGF.js → chunk-HUTP35XT.js} +5 -4
  46. package/dist/{chunk-3CZLWOCI.js → chunk-HX7QNHC6.js} +3 -3
  47. package/dist/{chunk-R5NH5BZG.js → chunk-IALX52TR.js} +6 -6
  48. package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
  49. package/dist/{chunk-27STWBOK.js → chunk-IF4KYSJZ.js} +10 -8
  50. package/dist/{chunk-HORZ5H2L.js → chunk-IG6J7JWH.js} +61 -22
  51. package/dist/{chunk-VRRDUYOK.js → chunk-IIUYKQ5J.js} +3 -3
  52. package/dist/{chunk-GMAH572Z.js → chunk-INTAQV2Y.js} +2 -2
  53. package/dist/{chunk-6AUZPPAV.js → chunk-ITXL2KU5.js} +2 -2
  54. package/dist/{chunk-KKHCNSKK.js → chunk-IWG2ECAO.js} +5 -5
  55. package/dist/{chunk-GQ644SPD.js → chunk-JGCEFKZP.js} +14 -14
  56. package/dist/{chunk-HNBY6CNV.js → chunk-JQLSFZZP.js} +2 -2
  57. package/dist/{chunk-CMVZWP32.js → chunk-JR7Q6GHE.js} +2 -2
  58. package/dist/{chunk-LHILKFDP.js → chunk-KC3WBBI7.js} +9 -9
  59. package/dist/{chunk-GABSL6TH.js → chunk-KK3L5NVK.js} +3 -3
  60. package/dist/{chunk-LC3FFD43.js → chunk-L2DIXZUT.js} +98 -48
  61. package/dist/{chunk-4WGMGKCZ.js → chunk-LCRPGGGS.js} +11 -11
  62. package/dist/{chunk-6KY7OCZC.js → chunk-LKGQ46P4.js} +3 -3
  63. package/dist/{chunk-HE5J53SZ.js → chunk-LW7STMYZ.js} +3 -3
  64. package/dist/{chunk-BD3WGY4T.js → chunk-M53MDBIW.js} +2 -2
  65. package/dist/{chunk-AN2DQB3G.js → chunk-MEH4TJEX.js} +12 -12
  66. package/dist/{chunk-SGPFVDUL.js → chunk-MNS2ENXF.js} +6 -6
  67. package/dist/{chunk-FXCB7H5O.js → chunk-MSWIBF6J.js} +2 -2
  68. package/dist/{chunk-BR7AYN76.js → chunk-NL7FUIVD.js} +12 -12
  69. package/dist/{chunk-AIMLCDAO.js → chunk-NN5TF4OV.js} +2 -2
  70. package/dist/{chunk-7GUF6SDR.js → chunk-NPPUZ4SK.js} +9 -9
  71. package/dist/{chunk-4K42RUGC.js → chunk-NYOOPQFD.js} +47 -12
  72. package/dist/{chunk-FFXCKZOU.js → chunk-O4CZDTQA.js} +3 -3
  73. package/dist/{chunk-6HTRCTAS.js → chunk-P5XXIVEU.js} +6 -4
  74. package/dist/{chunk-XEAQDIMF.js → chunk-PC4YLEKA.js} +6 -6
  75. package/dist/{chunk-Q7AH665U.js → chunk-PCVXXPYU.js} +121 -38
  76. package/dist/{chunk-W2DINCHL.js → chunk-PKUWYPI5.js} +207 -24
  77. package/dist/{chunk-PV2QO7QL.js → chunk-PSIDVCBA.js} +2 -2
  78. package/dist/{chunk-YR43LJT5.js → chunk-PV7ND5WL.js} +58 -15
  79. package/dist/{chunk-QI3BOLQB.js → chunk-Q5CMQVWF.js} +4 -4
  80. package/dist/{chunk-4RGZFA7H.js → chunk-Q5IHQ4NW.js} +11 -1
  81. package/dist/{chunk-SG4PRYO3.js → chunk-QQXFYTLC.js} +391 -60
  82. package/dist/{chunk-GWQJKTFS.js → chunk-QZYGRDMM.js} +118 -99
  83. package/dist/{chunk-CQFNIIQN.js → chunk-RKBCKCSF.js} +2 -2
  84. package/dist/{chunk-FUKNRLIJ.js → chunk-RSBH2C7O.js} +6 -6
  85. package/dist/{chunk-2QC4HXCY.js → chunk-RYNCWA5X.js} +11 -10
  86. package/dist/{chunk-NNUMX6WX.js → chunk-RZWIPDZ2.js} +40 -15
  87. package/dist/{chunk-VKNCC2GX.js → chunk-S52F62GW.js} +13 -13
  88. package/dist/{chunk-UQRIKAMH.js → chunk-SCOHNGPG.js} +59 -18
  89. package/dist/{chunk-VGNIDAPQ.js → chunk-SSHS42QG.js} +4 -4
  90. package/dist/chunk-TGOMHUOV.js +218 -0
  91. package/dist/{chunk-UKP5HWB5.js → chunk-UBQU2BY6.js} +4 -4
  92. package/dist/{chunk-IQJCVREL.js → chunk-UES4P7FN.js} +6 -6
  93. package/dist/chunk-US3P2DQO.js +87 -0
  94. package/dist/{chunk-GAWKIIPO.js → chunk-UXXLE6AH.js} +8 -8
  95. package/dist/{chunk-22OQWBWD.js → chunk-VMWSZCAK.js} +12 -11
  96. package/dist/{chunk-XG4NWFPY.js → chunk-VVIRAGID.js} +13 -13
  97. package/dist/{chunk-X3RXGSCZ.js → chunk-VXTUWXFB.js} +54 -15
  98. package/dist/{chunk-J7HI6G3G.js → chunk-W4TSD3IP.js} +6 -6
  99. package/dist/{chunk-FGDSTT3F.js → chunk-WB3NA3JJ.js} +2 -2
  100. package/dist/{chunk-KUSAVOWZ.js → chunk-WITOJZGL.js} +8 -4
  101. package/dist/{chunk-UVDCHR4E.js → chunk-WVGNXDEE.js} +2 -2
  102. package/dist/{chunk-HOXKNRON.js → chunk-X3X4LZDC.js} +2 -2
  103. package/dist/{chunk-SQCBSFT5.js → chunk-XKKH2DPG.js} +51 -263
  104. package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
  105. package/dist/{chunk-BFDVEO5R.js → chunk-Y4BBGFKY.js} +2 -2
  106. package/dist/{chunk-VAO6ANGC.js → chunk-YP2T5YUP.js} +14 -9
  107. package/dist/{chunk-PKNNHU7H.js → chunk-YXKNXIWA.js} +19 -11
  108. package/dist/{chunk-UFQJMOVZ.js → chunk-ZGIBV36U.js} +6 -6
  109. package/dist/{chunk-XQ4KN6JQ.js → chunk-ZP265ICS.js} +16 -15
  110. package/dist/{chunk-JTMSWEIW.js → chunk-ZWVKTWK6.js} +4 -4
  111. package/dist/{chunk-ALYZ3MAA.js → chunk-ZXNHHO6D.js} +8 -476
  112. package/dist/cli.cjs +166 -149
  113. package/dist/clock.js +34 -1
  114. package/dist/completion-registry.d.ts +129 -0
  115. package/dist/completion-registry.js +1278 -0
  116. package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
  117. package/dist/dgmo-router-T4HGLIGA.js +88 -0
  118. package/dist/{dimensions-K6PGYYGT.js → dimensions-3JINHSYK.js} +8 -8
  119. package/dist/editor.js +28 -1
  120. package/dist/element.js +148 -133
  121. package/dist/element.mjs +2352 -746
  122. package/dist/{flowchart-parser-LALR6J6F.js → flowchart-parser-M7KKTLX7.js} +5 -5
  123. package/dist/{flowchart-renderer-DXYB5YRF.js → flowchart-renderer-FFEQFQEU.js} +9 -9
  124. package/dist/highlight.js +28 -1
  125. package/dist/index.js +77 -64
  126. package/dist/{layout-ZE5DRJWX.js → layout-3ZZBKUQC.js} +4 -4
  127. package/dist/{layout-3BVDMKXI.js → layout-AUKTWGYL.js} +4 -4
  128. package/dist/{layout-4IHCMWZN.js → layout-CRLTSFYQ.js} +4 -4
  129. package/dist/{layout-WCAIKGZG.js → layout-FNZDJGKF.js} +5 -5
  130. package/dist/layout-GHWRJKZQ.js +15 -0
  131. package/dist/{layout-3V2A4MUE.js → layout-LGXOKUCD.js} +6 -5
  132. package/dist/{layout-WSMPBQ4Q.js → layout-NF4EWFLT.js} +3 -3
  133. package/dist/{layout-OL2XFJXA.js → layout-SP7HJWKA.js} +3 -3
  134. package/dist/{layout-E6HR6PXH.js → layout-UR7CYAHL.js} +3 -3
  135. package/dist/layout-UTMEVFHN.js +15 -0
  136. package/dist/{layout-search-34DPZD43.js → layout-search-U2H4ORFJ.js} +14 -7
  137. package/dist/{legend-constants-P5EQWRQQ.js → legend-constants-B77VKB3R.js} +7 -2
  138. package/dist/{parser-6PPHAXXH.js → parser-2AXPSKWB.js} +5 -5
  139. package/dist/{parser-5HQXCNOS.js → parser-2AZ2KQTO.js} +4 -4
  140. package/dist/{parser-3KIGEEJM.js → parser-2LF33IS2.js} +4 -4
  141. package/dist/{parser-NNIL3HXU.js → parser-3QJ2Z4H4.js} +3 -3
  142. package/dist/parser-5GCQFSTQ.js +13 -0
  143. package/dist/{parser-6B6SSZT7.js → parser-62OHBRU5.js} +3 -3
  144. package/dist/{parser-VOERD6XR.js → parser-7LYJFZCP.js} +4 -4
  145. package/dist/{parser-ZGNXYFPS.js → parser-BMOTF72G.js} +3 -3
  146. package/dist/{parser-IVGHXLZP.js → parser-CIFLYZYP.js} +4 -3
  147. package/dist/{parser-GN2MM5CC.js → parser-D2UL2G5U.js} +3 -3
  148. package/dist/{parser-GKP2MHHL.js → parser-DM2APTKB.js} +3 -3
  149. package/dist/{parser-27Z76SN3.js → parser-DYYTPLBL.js} +4 -4
  150. package/dist/{parser-5FGJSQNS.js → parser-GOUGUTPU.js} +4 -4
  151. package/dist/{parser-G26MTBFS.js → parser-HGVUVD6J.js} +3 -3
  152. package/dist/{parser-EXNBDNGY.js → parser-IEJD3CZB.js} +3 -3
  153. package/dist/{parser-ZQDQTB4X.js → parser-JBEWNLAV.js} +5 -5
  154. package/dist/{parser-5QPFOB5F.js → parser-JMXPHNZD.js} +4 -4
  155. package/dist/{parser-4E4I3GNT.js → parser-JMXSQY3K.js} +4 -4
  156. package/dist/{parser-FF4BMRSB.js → parser-LUXS7J32.js} +4 -4
  157. package/dist/{parser-3VSWEKBF.js → parser-M5BUHULF.js} +4 -4
  158. package/dist/{parser-IKWK2ZU3.js → parser-MESRHUS4.js} +4 -5
  159. package/dist/{parser-3CODK6RG.js → parser-OOYNI2UT.js} +4 -4
  160. package/dist/{parser-YSLNDFLV.js → parser-PVBUAVRR.js} +4 -5
  161. package/dist/{parser-CKA3QMAG.js → parser-QKRBSQLJ.js} +5 -5
  162. package/dist/{parser-UWRX52PC.js → parser-S6NWSIJO.js} +4 -4
  163. package/dist/{parser-RNLTBIJ6.js → parser-SFEK6Q7Z.js} +4 -4
  164. package/dist/{parser-7JVIDLLR.js → parser-SUV52NQW.js} +4 -4
  165. package/dist/{parser-CRKLXGW7.js → parser-SZHGLOOZ.js} +4 -4
  166. package/dist/{parser-275KP7JO.js → parser-TO7IENWL.js} +5 -6
  167. package/dist/{parser-XNKJCMMA.js → parser-TVAMC7CQ.js} +4 -4
  168. package/dist/{parser-FOOFEJQU.js → parser-VAW46R57.js} +4 -4
  169. package/dist/{parser-XVPTRWZ4.js → parser-XDSPOXSE.js} +4 -4
  170. package/dist/pert.d.ts +2 -0
  171. package/dist/{renderer-D3BRNOMV.js → renderer-3PWLOJPD.js} +11 -11
  172. package/dist/{renderer-7NQSTQMQ.js → renderer-5EMHIQL5.js} +4 -4
  173. package/dist/{renderer-ZBTEX2JK.js → renderer-5PODNLYP.js} +4 -4
  174. package/dist/{renderer-6WRYVM5R.js → renderer-AQJIQ2XU.js} +9 -8
  175. package/dist/{renderer-JCZG6AYU.js → renderer-BEW3AYFT.js} +10 -10
  176. package/dist/{renderer-YUKPS27O.js → renderer-C3UYAXA6.js} +10 -8
  177. package/dist/{renderer-AK2WO4EI.js → renderer-CENXCMWG.js} +4 -4
  178. package/dist/{renderer-HIFQVEJA.js → renderer-CXM3ARYN.js} +10 -9
  179. package/dist/{renderer-JTCX6PCG.js → renderer-DW6TEBLA.js} +10 -9
  180. package/dist/{renderer-VMH6L6CP.js → renderer-FE5M6SEZ.js} +10 -9
  181. package/dist/{renderer-TYHGXAVT.js → renderer-FXK6ZL3P.js} +4 -4
  182. package/dist/{renderer-UPF7NRTI.js → renderer-G5ESLCJB.js} +12 -11
  183. package/dist/{renderer-CWEFGEIC.js → renderer-HTDS4FED.js} +14 -13
  184. package/dist/{renderer-XTXSOK3L.js → renderer-IO4KCFVL.js} +10 -10
  185. package/dist/{renderer-SQ54MDSA.js → renderer-IRAFJNTK.js} +10 -9
  186. package/dist/{renderer-JWGQSTMR.js → renderer-MFTTFW32.js} +15 -14
  187. package/dist/{renderer-2C6DJRYN.js → renderer-MPXI4FVL.js} +8 -8
  188. package/dist/{renderer-5MPN7CXZ.js → renderer-NVBEMQ6L.js} +5 -5
  189. package/dist/{renderer-7ZNVOVFG.js → renderer-OOGDCR6K.js} +3 -3
  190. package/dist/{renderer-COLQFSFV.js → renderer-Q5P72O4A.js} +9 -9
  191. package/dist/{renderer-WCWI4I6A.js → renderer-QZESC66H.js} +2 -2
  192. package/dist/{renderer-NE5W7CQP.js → renderer-RDBUXW7P.js} +6 -5
  193. package/dist/{renderer-6EN5XXJZ.js → renderer-S4XB3JR2.js} +11 -11
  194. package/dist/{renderer-WFSUBKUL.js → renderer-SIWEEWJ5.js} +9 -8
  195. package/dist/{renderer-LVZAHRP6.js → renderer-TKTM2SL4.js} +12 -12
  196. package/dist/{renderer-QD2SJF2I.js → renderer-TXTTV4HA.js} +10 -9
  197. package/dist/{renderer-YUXGXGSW.js → renderer-UZIU4AHK.js} +10 -9
  198. package/dist/{renderer-RLMOTXZ6.js → renderer-V72VJIGG.js} +14 -13
  199. package/dist/{renderer-UKXW2QPE.js → renderer-VEGOEZOI.js} +10 -8
  200. package/dist/{renderer-WNFXYYGL.js → renderer-W6I6T2TA.js} +8 -8
  201. package/dist/{renderer-KARQF3F3.js → renderer-WSHJRR2T.js} +8 -8
  202. package/dist/{renderer-radial-WF6VOUOD.js → renderer-radial-AG75PBYD.js} +9 -9
  203. package/dist/{resolver-WFKZYBJ2.js → resolver-ZSFQQRTH.js} +3 -3
  204. package/dist/{state-parser-L7DHZIQO.js → state-parser-KIPZGIB4.js} +5 -5
  205. package/dist/{state-renderer-TFEUOP4H.js → state-renderer-U6OSJG52.js} +13 -12
  206. package/docs/language-reference.md +2 -1
  207. package/package.json +5 -1
  208. package/dist/chunk-YJVA3QUU.js +0 -734
  209. package/dist/dgmo-router-B4S23EBH.js +0 -86
  210. package/dist/layout-3M5UYJHY.js +0 -14
  211. package/dist/layout-KPQWJNAG.js +0 -14
  212. package/dist/parser-7JHWEWXM.js +0 -13
@@ -5,7 +5,7 @@ import {
5
5
  parseFirstLine,
6
6
  splitNameAndMeta,
7
7
  warnUnknownMetaKeys
8
- } from "./chunk-YJVA3QUU.js";
8
+ } from "./chunk-A2ARDILY.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail,
@@ -338,4 +338,4 @@ function assignGlobalNumbers(result) {
338
338
  export {
339
339
  parseTechRadar
340
340
  };
341
- //# sourceMappingURL=chunk-CK2GMDXD.js.map
341
+ //# sourceMappingURL=chunk-A2PTRSAO.js.map
@@ -128,6 +128,18 @@ function formatTime(h, m, s, hours12) {
128
128
  }
129
129
  return { main: `${pad2(h)}:${pad2(m)}`, sec, ap: "" };
130
130
  }
131
+ function fixedTimeCells(s, x0, fs) {
132
+ const digit = fs * 0.6;
133
+ const colon = fs * 0.32;
134
+ const cells = [];
135
+ let x = x0;
136
+ for (const ch of s) {
137
+ const cw = ch === ":" ? colon : digit;
138
+ cells.push({ ch, x: x + cw / 2 });
139
+ x += cw;
140
+ }
141
+ return { cells, width: x - x0 };
142
+ }
131
143
  function fmtDelta(ms) {
132
144
  const m = Math.max(0, Math.round(ms / 6e4));
133
145
  if (m < 90) return `${m}m`;
@@ -213,8 +225,9 @@ export {
213
225
  formatOffsetLabel,
214
226
  fixedParts,
215
227
  formatTime,
228
+ fixedTimeCells,
216
229
  workStatus,
217
230
  sunLine,
218
231
  handAngles
219
232
  };
220
- //# sourceMappingURL=chunk-APKUAJ2L.js.map
233
+ //# sourceMappingURL=chunk-A2RUBBVT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  computeInfra
3
- } from "./chunk-A44USUV7.js";
3
+ } from "./chunk-ICZ7M6IZ.js";
4
4
  import {
5
5
  layoutInfra
6
6
  } from "./chunk-43E26CDA.js";
@@ -16,12 +16,16 @@ import {
16
16
  import {
17
17
  ScaleContext
18
18
  } from "./chunk-YYVTBZZC.js";
19
+ import {
20
+ layoutInlineHeader
21
+ } from "./chunk-US3P2DQO.js";
19
22
  import {
20
23
  renderIntegratedLegend
21
- } from "./chunk-W5KMNC5U.js";
24
+ } from "./chunk-ASPS5O6F.js";
22
25
  import {
26
+ getLegendExtent,
23
27
  getMaxLegendReservedHeight
24
- } from "./chunk-774C2FF3.js";
28
+ } from "./chunk-GRXPFBYC.js";
25
29
  import {
26
30
  TITLE_FONT_SIZE,
27
31
  TITLE_FONT_WEIGHT,
@@ -33,15 +37,10 @@ import {
33
37
  } from "./chunk-6KFWC4CO.js";
34
38
  import {
35
39
  parseInfra
36
- } from "./chunk-NNUMX6WX.js";
40
+ } from "./chunk-RZWIPDZ2.js";
37
41
  import {
38
42
  preprocessDescriptionLine
39
43
  } from "./chunk-IYULMRBE.js";
40
- import {
41
- contrastText,
42
- mix,
43
- shapeFill
44
- } from "./chunk-JYDMBWRP.js";
45
44
  import {
46
45
  LEGEND_CAPSULE_PAD,
47
46
  LEGEND_DOT_R,
@@ -52,18 +51,24 @@ import {
52
51
  LEGEND_PILL_FONT_SIZE,
53
52
  LEGEND_PILL_PAD,
54
53
  measureLegendText
55
- } from "./chunk-4RGZFA7H.js";
54
+ } from "./chunk-Q5IHQ4NW.js";
56
55
  import {
57
56
  CHAR_WIDTH_RATIO,
58
57
  measureText,
59
58
  truncateText
60
59
  } from "./chunk-4ASYQ347.js";
60
+ import {
61
+ contrastText,
62
+ mix,
63
+ shapeFill
64
+ } from "./chunk-JYDMBWRP.js";
61
65
  import {
62
66
  tagAttrKey
63
- } from "./chunk-CMVZWP32.js";
67
+ } from "./chunk-JR7Q6GHE.js";
64
68
  import {
69
+ legendInlineRequested,
65
70
  legendSuppressed
66
- } from "./chunk-YJVA3QUU.js";
71
+ } from "./chunk-A2ARDILY.js";
67
72
  import {
68
73
  resolveColor
69
74
  } from "./chunk-ZKPPI6BF.js";
@@ -1293,10 +1298,10 @@ function computeInfraLegendGroups(nodes, tagGroups, palette, edges) {
1293
1298
  }
1294
1299
  return groups;
1295
1300
  }
1296
- function renderLegend(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback, exportMode = false, controlsHost) {
1301
+ function renderLegend(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback, exportMode = false, controlsHost, legendX = 0, inlineHeader = false) {
1297
1302
  if (legendGroups.length === 0 && !playback) return;
1298
1303
  const appHostedPlayback = controlsHost === "app" && !!playback;
1299
- const legendG = rootSvg.append("g").attr("transform", `translate(0, ${legendY})`);
1304
+ const legendG = rootSvg.append("g").attr("transform", `translate(${legendX}, ${legendY})`);
1300
1305
  if (activeGroup) {
1301
1306
  legendG.attr("data-legend-active", tagAttrKey(activeGroup));
1302
1307
  }
@@ -1312,6 +1317,12 @@ function renderLegend(rootSvg, legendGroups, totalWidth, legendY, palette, isDar
1312
1317
  activeGroup,
1313
1318
  mode: exportMode ? "export" : "preview",
1314
1319
  showEmptyGroups: true,
1320
+ ...inlineHeader && {
1321
+ position: {
1322
+ placement: "top-center",
1323
+ titleRelation: "inline-with-title"
1324
+ }
1325
+ },
1315
1326
  ...appHostedPlayback && {
1316
1327
  controlsHost: "app",
1317
1328
  controlsGroup: {
@@ -1395,7 +1406,39 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
1395
1406
  const legendOffset = hasLegend && !fixedLegend ? legendDynamicH : 0;
1396
1407
  const titleOffset = title ? TITLE_OFFSET : 0;
1397
1408
  const totalWidth = layout.width;
1398
- const totalHeight = layout.height + titleOffset + legendOffset;
1409
+ const inlineRequested = legendInlineRequested(layout.options) && !fixedLegend;
1410
+ const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
1411
+ {
1412
+ groups: legendGroups.map((g) => ({
1413
+ name: g.name,
1414
+ entries: g.entries.map((e) => ({
1415
+ value: e.value,
1416
+ color: e.color
1417
+ }))
1418
+ })),
1419
+ position: {
1420
+ placement: "top-center",
1421
+ titleRelation: "inline-with-title"
1422
+ },
1423
+ mode: exportMode ? "export" : "preview",
1424
+ showEmptyGroups: true
1425
+ },
1426
+ { activeGroup: activeGroup ?? null },
1427
+ totalWidth
1428
+ ) : { width: 0, height: 0 };
1429
+ const header = layoutInlineHeader({
1430
+ requested: inlineRequested,
1431
+ title: title ?? "",
1432
+ hasLegend,
1433
+ legendWidth: legendExtent.width,
1434
+ legendHeight: legendExtent.height,
1435
+ containerWidth: totalWidth,
1436
+ titleBandHeight: titleOffset,
1437
+ legendReserve: legendOffset,
1438
+ titleBaselineY: sc.sTitleY,
1439
+ titleFontSize: sc.sTitleFontSize
1440
+ });
1441
+ const totalHeight = layout.height + titleOffset + (header.inline ? 0 : legendOffset);
1399
1442
  const shouldAnimate = animate !== false;
1400
1443
  const fixedTitleH = fixedLegend && title ? TITLE_OFFSET : 0;
1401
1444
  const diagramViewHeight = fixedLegend ? layout.height + (title && !fixedTitleH ? titleOffset : 0) + legendOffset : totalHeight;
@@ -1455,9 +1498,12 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
1455
1498
  `);
1456
1499
  }
1457
1500
  const contentTitleOffset = fixedTitleH ? 0 : titleOffset;
1458
- const svg = rootSvg.append("g").attr("transform", `translate(0, ${contentTitleOffset + legendOffset})`);
1501
+ const svg = rootSvg.append("g").attr(
1502
+ "transform",
1503
+ `translate(0, ${contentTitleOffset + (header.inline ? 0 : legendOffset)})`
1504
+ );
1459
1505
  if (title && !fixedTitleH) {
1460
- rootSvg.append("text").attr("class", "chart-title").attr("x", totalWidth / 2).attr("y", sc.sTitleY).attr("text-anchor", "middle").attr("font-family", FONT_FAMILY).attr("font-size", sc.sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("data-line-number", titleLineNumber != null ? titleLineNumber : "").text(title);
1506
+ rootSvg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", sc.sTitleY).attr("text-anchor", header.titleAnchor).attr("font-family", FONT_FAMILY).attr("font-size", sc.sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("data-line-number", titleLineNumber != null ? titleLineNumber : "").text(title);
1461
1507
  }
1462
1508
  renderGroups(svg, layout.groups, palette, isDark, sc);
1463
1509
  const speedMultiplier = playback?.speed ?? 1;
@@ -1534,13 +1580,15 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
1534
1580
  rootSvg,
1535
1581
  legendGroups,
1536
1582
  totalWidth,
1537
- titleOffset,
1583
+ header.inline ? header.legendY : titleOffset,
1538
1584
  palette,
1539
1585
  isDark,
1540
1586
  activeGroup ?? null,
1541
1587
  playback ?? void 0,
1542
1588
  exportMode,
1543
- controlsHost
1589
+ controlsHost,
1590
+ header.inline ? header.legendX : 0,
1591
+ header.inline
1544
1592
  );
1545
1593
  }
1546
1594
  }
@@ -1560,4 +1608,4 @@ export {
1560
1608
  renderInfra,
1561
1609
  parseAndLayoutInfra
1562
1610
  };
1563
- //# sourceMappingURL=chunk-GMIJ35PW.js.map
1611
+ //# sourceMappingURL=chunk-A4UJP4IS.js.map
@@ -8,17 +8,17 @@ import {
8
8
  LEGEND_PILL_FONT_SIZE,
9
9
  LEGEND_PILL_PAD,
10
10
  measureLegendText
11
- } from "./chunk-4RGZFA7H.js";
11
+ } from "./chunk-Q5IHQ4NW.js";
12
12
  import {
13
13
  measureText,
14
14
  wrapTextToWidth
15
15
  } from "./chunk-4ASYQ347.js";
16
16
  import {
17
17
  tagAttrKey
18
- } from "./chunk-CMVZWP32.js";
18
+ } from "./chunk-JR7Q6GHE.js";
19
19
  import {
20
20
  legendSuppressed
21
- } from "./chunk-YJVA3QUU.js";
21
+ } from "./chunk-A2ARDILY.js";
22
22
 
23
23
  // src/c4/layout.ts
24
24
  import dagre from "@dagrejs/dagre";
@@ -1718,4 +1718,4 @@ export {
1718
1718
  layoutC4Components,
1719
1719
  layoutC4Deployment
1720
1720
  };
1721
- //# sourceMappingURL=chunk-LQHVDZYC.js.map
1721
+ //# sourceMappingURL=chunk-AKE6C2D7.js.map
@@ -1,13 +1,9 @@
1
1
  import {
2
2
  computeLegendLayout
3
- } from "./chunk-774C2FF3.js";
3
+ } from "./chunk-GRXPFBYC.js";
4
4
  import {
5
5
  FONT_FAMILY
6
6
  } from "./chunk-6KFWC4CO.js";
7
- import {
8
- mix,
9
- valueRampStops
10
- } from "./chunk-JYDMBWRP.js";
11
7
  import {
12
8
  CONTROLS_ICON_PATH,
13
9
  LEGEND_DOT_R,
@@ -17,11 +13,15 @@ import {
17
13
  LEGEND_PILL_FONT_SIZE,
18
14
  LEGEND_TOGGLE_DOT_R,
19
15
  LEGEND_TOGGLE_OFF_OPACITY,
16
+ legendChromeColors,
20
17
  measureLegendText
21
- } from "./chunk-4RGZFA7H.js";
18
+ } from "./chunk-Q5IHQ4NW.js";
19
+ import {
20
+ valueRampStops
21
+ } from "./chunk-JYDMBWRP.js";
22
22
  import {
23
23
  tagAttrKey
24
- } from "./chunk-CMVZWP32.js";
24
+ } from "./chunk-JR7Q6GHE.js";
25
25
 
26
26
  // src/utils/legend-d3.ts
27
27
  var LEGEND_TEXT_DY = "0.32em";
@@ -45,8 +45,7 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
45
45
  } else {
46
46
  legendG.attr("data-legend-active", null);
47
47
  }
48
- const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
49
- const pillBorder = mix(palette.textMuted, palette.bg, 50);
48
+ const { groupBg, pillBorder } = legendChromeColors(palette, isDark);
50
49
  if (currentLayout.activeCapsule) {
51
50
  renderCapsule(
52
51
  legendG,
@@ -293,4 +292,4 @@ export {
293
292
  renderLegendD3,
294
293
  renderIntegratedLegend
295
294
  };
296
- //# sourceMappingURL=chunk-W5KMNC5U.js.map
295
+ //# sourceMappingURL=chunk-ASPS5O6F.js.map
@@ -2,12 +2,12 @@ import {
2
2
  formatOffsetLabel,
3
3
  parseFixedOffset,
4
4
  zoneParts
5
- } from "./chunk-APKUAJ2L.js";
5
+ } from "./chunk-A2RUBBVT.js";
6
6
  import {
7
7
  extractColor,
8
8
  fillModeFromToken,
9
9
  parseFirstLine
10
- } from "./chunk-YJVA3QUU.js";
10
+ } from "./chunk-A2ARDILY.js";
11
11
  import {
12
12
  makeDgmoError,
13
13
  makeFail
@@ -332,6 +332,7 @@ var DIRECTIVES = /* @__PURE__ */ new Set([
332
332
  "no-sun",
333
333
  "time-24",
334
334
  "no-title",
335
+ "legend-inline",
335
336
  // Canonical direction booleans (§1.9); key+value `direction <lr|tb>` (and
336
337
  // its `columns` value alias) stays parse-accepted legacy. These MUST be in
337
338
  // this set — otherwise a bare `direction-lr` line parses as a zone entry.
@@ -508,6 +509,8 @@ function parseClock(content, palette) {
508
509
  case "no-title":
509
510
  result.noTitle = true;
510
511
  break;
512
+ case "legend-inline":
513
+ break;
511
514
  case "fill-tint":
512
515
  case "fill-solid":
513
516
  case "fill-outline": {
@@ -672,4 +675,4 @@ export {
672
675
  searchZones,
673
676
  parseClock
674
677
  };
675
- //# sourceMappingURL=chunk-FLDC7ZAK.js.map
678
+ //# sourceMappingURL=chunk-AU75JHSR.js.map