@diagrammo/dgmo 0.54.0 → 0.56.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.
- package/dist/advanced.d.ts +138 -11
- package/dist/advanced.js +140 -115
- package/dist/{analyzer-TDN5KJFP.js → analyzer-HQUXKZ5J.js} +3 -3
- package/dist/auto.js +129 -126
- package/dist/auto.mjs +2731 -882
- package/dist/block.js +58 -56
- package/dist/{calculator-VBIT6GQF.js → calculator-BBKAAQGD.js} +3 -3
- package/dist/chart-meta.js +49 -49
- package/dist/charts-d3-D67V6KHE.js +29 -0
- package/dist/{chunk-5VXU6MND.js → chunk-23THM67F.js} +2 -2
- package/dist/{chunk-N7BSBAVP.js → chunk-2JMNOEAU.js} +117 -98
- package/dist/{chunk-6OYDOQ2Q.js → chunk-2UZVMWSQ.js} +4 -4
- package/dist/{chunk-3FRO35WW.js → chunk-3KOPPSUQ.js} +19 -5
- package/dist/{chunk-IYNKLCAZ.js → chunk-3R67RRPC.js} +126 -57
- package/dist/{chunk-JYDMBWRP.js → chunk-42IT4BG2.js} +2 -2
- package/dist/{chunk-O576GYAP.js → chunk-4MB4UOT5.js} +3 -3
- package/dist/{chunk-3KHJJP3J.js → chunk-4MJOBVY7.js} +3 -3
- package/dist/{chunk-3SEEP2JM.js → chunk-5J2RQGFG.js} +9 -5
- package/dist/{chunk-EAI6XJ7D.js → chunk-5VLUAAAE.js} +4 -4
- package/dist/{chunk-FVMKCZHF.js → chunk-5XMDSXZT.js} +3 -3
- package/dist/{chunk-LPJ6H5X4.js → chunk-5ZDHXS5N.js} +60 -15
- package/dist/{chunk-MEQYZZFR.js → chunk-6IVXRTXH.js} +96 -23
- package/dist/chunk-6VJCURWU.js +87 -0
- package/dist/{chunk-QZAW5SFH.js → chunk-7NK42OIB.js} +2 -2
- package/dist/{chunk-EQOMY4PY.js → chunk-7SXTD7L6.js} +3 -3
- package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
- package/dist/{chunk-S7FOIURR.js → chunk-A4DAZO3U.js} +12 -9
- package/dist/{chunk-AJFHNS67.js → chunk-AIH6M5J6.js} +7 -7
- package/dist/{chunk-KS5ZSM5T.js → chunk-AMC2OGXF.js} +64 -16
- package/dist/{chunk-SSHS42QG.js → chunk-AN465MXC.js} +2 -2
- package/dist/{chunk-BZJIITYM.js → chunk-AOJJSGXE.js} +5 -5
- package/dist/{chunk-T7Y554OK.js → chunk-APD52YJV.js} +8 -8
- package/dist/{chunk-FFVFZLRT.js → chunk-BR2VSKHI.js} +377 -60
- package/dist/{chunk-7K6NDSXH.js → chunk-C3BWDEYN.js} +5 -5
- package/dist/{chunk-HO3RCNF6.js → chunk-CGLBK5Q4.js} +2 -2
- package/dist/{chunk-ADYKAKE3.js → chunk-CQ7Y3O67.js} +7 -4
- package/dist/{chunk-WKNAJ4BR.js → chunk-CQOC2MD6.js} +66 -13
- package/dist/{chunk-TLNVYWPA.js → chunk-CXI6X54X.js} +3 -3
- package/dist/{chunk-AQEYUVGJ.js → chunk-CY5KE2P5.js} +67 -10
- package/dist/{chunk-COVYNAKJ.js → chunk-D3WTEBGT.js} +2 -2
- package/dist/{chunk-AHTTKERF.js → chunk-D5FANMSG.js} +3 -3
- package/dist/{chunk-CCGWX6AO.js → chunk-D64FRGKU.js} +3 -3
- package/dist/{chunk-RRGKMJYL.js → chunk-DIKIHU52.js} +9 -4
- package/dist/{chunk-BULHGPHK.js → chunk-DNSEG6P2.js} +3 -3
- package/dist/{chunk-UJRTPOHH.js → chunk-DUI5SMFX.js} +2 -2
- package/dist/{chunk-VQFDBNYF.js → chunk-EEKGMS63.js} +4 -4
- package/dist/{chunk-MTZOXISJ.js → chunk-ES3MUYRX.js} +5 -5
- package/dist/{chunk-J7HQPVYH.js → chunk-ES66QH6J.js} +24 -3
- package/dist/{chunk-ZKPPI6BF.js → chunk-EXNKNJ65.js} +2 -2
- package/dist/{chunk-2NYXI35Z.js → chunk-FCA2UGJT.js} +7 -6
- package/dist/{chunk-M3H7ZE6C.js → chunk-FERE46TP.js} +7 -6
- package/dist/{chunk-B4XS2AF2.js → chunk-FWVKPEG3.js} +3 -3
- package/dist/{chunk-S7YFT3PO.js → chunk-FXVPSTDT.js} +6 -6
- package/dist/{chunk-BM7MG6HT.js → chunk-FZECLCCU.js} +4 -4
- package/dist/{chunk-SBOAZ7YK.js → chunk-GDGOVO2I.js} +60 -41
- package/dist/{chunk-QBYP2FBZ.js → chunk-GG7TK3IA.js} +5 -5
- package/dist/{chunk-GQ5ECRP4.js → chunk-GUVVQW3Y.js} +5 -5
- package/dist/{chunk-R5BGGBFF.js → chunk-HE57UQHL.js} +3 -3
- package/dist/{chunk-4ZIKWVSQ.js → chunk-HIMDUQT7.js} +7 -7
- package/dist/{chunk-CSHFU6LT.js → chunk-HKKPUUNK.js} +10 -10
- package/dist/{chunk-KINOX74I.js → chunk-HODUM6LY.js} +50 -12
- package/dist/{chunk-47JNEKJA.js → chunk-HOPTF3ZP.js} +47 -12
- package/dist/{chunk-WW4BQ744.js → chunk-HPJITTF7.js} +11 -8
- package/dist/{chunk-BEOAKGNA.js → chunk-I55PVEIX.js} +2 -2
- package/dist/{chunk-7JDTNFAK.js → chunk-IMXG673Y.js} +78 -34
- package/dist/{chunk-4T6OCSJ2.js → chunk-JE3SMHRZ.js} +6 -6
- package/dist/{chunk-KQYQECWQ.js → chunk-JXFB3APA.js} +52 -16
- package/dist/{chunk-OJ435DQZ.js → chunk-KF575IXC.js} +4 -4
- package/dist/{chunk-IOIMQHQ6.js → chunk-KIGV66SP.js} +3 -3
- package/dist/{chunk-ICKXIMBA.js → chunk-KSPCR75O.js} +7 -7
- package/dist/{chunk-JTSMEYIZ.js → chunk-L43KTQTW.js} +5 -2
- package/dist/{chunk-DLU643TF.js → chunk-LV5BFA24.js} +6 -6
- package/dist/{chunk-RJ5LBZ5U.js → chunk-MD2KWAXJ.js} +16 -16
- package/dist/{chunk-KDK5EKUR.js → chunk-MGLJA5TK.js} +3 -3
- package/dist/{chunk-FR6UFVSV.js → chunk-N2KO445N.js} +99 -46
- package/dist/{chunk-C2UORMIA.js → chunk-NFAHDPCG.js} +8 -4
- package/dist/{chunk-7UPFTBOW.js → chunk-NHZAYL2X.js} +7 -7
- package/dist/{chunk-PIXZTCKH.js → chunk-NVQXIDLE.js} +3 -3
- package/dist/chunk-NZ5QVASG.js +20 -0
- package/dist/{chunk-F7XM366V.js → chunk-OHBIN74X.js} +4 -4
- package/dist/{chunk-4W2PE66Q.js → chunk-OLMWTJVU.js} +11 -1
- package/dist/{chunk-HAA25PLC.js → chunk-OWLGERJL.js} +46 -11
- package/dist/{chunk-NUTWTV6G.js → chunk-P6XFQVYY.js} +103 -57
- package/dist/{chunk-GKYHWJXI.js → chunk-PECYPUJJ.js} +5 -5
- package/dist/{chunk-T3FAJAJT.js → chunk-PFG3EVRD.js} +4 -4
- package/dist/{chunk-2NZOHEP4.js → chunk-QDOYT6UW.js} +5 -5
- package/dist/{chunk-EPRF3ZRV.js → chunk-QWUYFUNO.js} +3 -3
- package/dist/{chunk-I47VHSPS.js → chunk-R7ECJQTB.js} +10 -8
- package/dist/{chunk-BWYFIVZF.js → chunk-RBIX3HQQ.js} +4 -4
- package/dist/{chunk-COJW2NEY.js → chunk-RK3Y4WMV.js} +57 -15
- package/dist/{chunk-KQ3FNRGR.js → chunk-RQGNELB3.js} +7 -6
- package/dist/{chunk-WF64MW5G.js → chunk-RRX4Z4TH.js} +2 -2
- package/dist/{chunk-W6PCFRPL.js → chunk-RV2N7COG.js} +4 -4
- package/dist/{chunk-UEU6IYKY.js → chunk-S6QDCFEU.js} +2 -2
- package/dist/{chunk-Q5IHQ4NW.js → chunk-SCJ7CAJF.js} +2 -2
- package/dist/{chunk-3B2GXZCX.js → chunk-SK7PCW4F.js} +2 -2
- package/dist/{chunk-6KL7TFLS.js → chunk-SOBGK35Z.js} +4 -4
- package/dist/{chunk-WWHECSYZ.js → chunk-ST3ZNEUQ.js} +3 -3
- package/dist/{chunk-3IUHKMJI.js → chunk-U2BKSEKU.js} +2 -2
- package/dist/{chunk-KBVOVDYP.js → chunk-U7ZQTUZT.js} +6 -6
- package/dist/{chunk-3SBHODJ4.js → chunk-ULONXAOD.js} +50 -11
- package/dist/{chunk-B7N5KYXQ.js → chunk-ULR3BVNH.js} +8 -8
- package/dist/{chunk-YENNFS5F.js → chunk-USFZQPJ2.js} +10 -5
- package/dist/{chunk-OR3R27CU.js → chunk-UZ6L5VQJ.js} +4 -4
- package/dist/{chunk-ADCHLNWT.js → chunk-VKN7YW4Q.js} +10 -7
- package/dist/{chunk-XWODFBHJ.js → chunk-VSFAJUEF.js} +8 -4
- package/dist/{chunk-HFEOOQ46.js → chunk-VU3DOZ6C.js} +3 -3
- package/dist/{chunk-M24VXUFG.js → chunk-VYEQPPS6.js} +7 -7
- package/dist/{chunk-5XSNLXU5.js → chunk-W2I2EXSC.js} +58 -16
- package/dist/{chunk-7U4OR7CD.js → chunk-W4EKQ2P6.js} +2 -2
- package/dist/{chunk-UIT7E6UF.js → chunk-WFX6AUQO.js} +52 -5
- package/dist/{chunk-RIEAN4D5.js → chunk-WK3UFCZC.js} +51 -11
- package/dist/{chunk-7SP4C6EV.js → chunk-WOMXS5R7.js} +24 -5
- package/dist/chunk-WTTIODDV.js +10 -0
- package/dist/{chunk-GK32ZFZY.js → chunk-X32RDWT5.js} +5 -5
- package/dist/{chunk-LRSW4JLE.js → chunk-XN4ZSACM.js} +4 -4
- package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
- package/dist/{chunk-OSXQKC3S.js → chunk-Y2L2LET6.js} +8 -5
- package/dist/{chunk-TJN2OIVG.js → chunk-YG5KQ55U.js} +182 -14
- package/dist/{chunk-DPGQ5UMO.js → chunk-YH62K5D4.js} +15 -12
- package/dist/{chunk-A3BDLDYG.js → chunk-YJUF2N3C.js} +62 -23
- package/dist/{chunk-VMSBMIHW.js → chunk-YM2ZQIVG.js} +4 -4
- package/dist/{chunk-KV4HLIJE.js → chunk-YNAHUNMA.js} +7 -4
- package/dist/{chunk-62Y27T4C.js → chunk-YWPWRR7W.js} +2 -2
- package/dist/{chunk-U4IN6AHE.js → chunk-ZMMYCERO.js} +2 -2
- package/dist/cli.cjs +155 -149
- package/dist/clock.js +34 -1
- package/dist/completion-registry.js +15 -7
- package/dist/dgmo-router-GSWUPLP2.js +88 -0
- package/dist/dimensions-PLECMFTR.js +22 -0
- package/dist/editor.js +10 -1
- package/dist/element.js +131 -128
- package/dist/element.mjs +2731 -882
- package/dist/flowchart-parser-DA3V2SLH.js +21 -0
- package/dist/{flowchart-renderer-DCFKUDDR.js → flowchart-renderer-UQVXOUW4.js} +13 -12
- package/dist/highlight.js +10 -1
- package/dist/index.js +72 -57
- package/dist/{layout-A6OIGZN2.js → layout-2BJDECLZ.js} +5 -8
- package/dist/{layout-NF4EWFLT.js → layout-3XFPPFXI.js} +4 -4
- package/dist/layout-A5UVXINF.js +15 -0
- package/dist/layout-HIK4ZJFQ.js +15 -0
- package/dist/{layout-CB3XWCOI.js → layout-NX37NSRY.js} +3 -3
- package/dist/layout-OHAIIXBC.js +10 -0
- package/dist/{layout-QBNAMEOA.js → layout-QRVYYYZ3.js} +6 -6
- package/dist/{layout-ITLPDG6M.js → layout-SNIEAZ2I.js} +8 -8
- package/dist/{layout-SP7HJWKA.js → layout-UFZQI6SX.js} +4 -4
- package/dist/{layout-G2ABQJQZ.js → layout-UXMNKETK.js} +7 -7
- package/dist/layout-WDXNSQQF.js +15 -0
- package/dist/{layout-search-LUI475P3.js → layout-search-I4VNIRGT.js} +320 -36
- package/dist/{legend-constants-B77VKB3R.js → legend-constants-QQU3QYBF.js} +5 -5
- package/dist/{palettes-FGTNFARW.js → palettes-WO3VA6NU.js} +4 -4
- package/dist/parser-4TX6U4ZU.js +11 -0
- package/dist/{parser-X5XLFY4Z.js → parser-4ZIJDGPG.js} +6 -6
- package/dist/parser-5UZWYSIV.js +16 -0
- package/dist/parser-6CM27UPA.js +14 -0
- package/dist/parser-73YUU35J.js +11 -0
- package/dist/parser-A6M25MLK.js +11 -0
- package/dist/parser-AYZTKZC3.js +11 -0
- package/dist/parser-CCAUZLYI.js +15 -0
- package/dist/parser-D7YZX3CH.js +12 -0
- package/dist/parser-DQ2DGDYO.js +11 -0
- package/dist/parser-GGCDY65M.js +14 -0
- package/dist/parser-HMQZPPOK.js +19 -0
- package/dist/parser-IPBEW2DG.js +13 -0
- package/dist/{parser-66RYGJRB.js → parser-JWAGGYLL.js} +7 -7
- package/dist/parser-KTVDCWHG.js +13 -0
- package/dist/{parser-OPIXXUY4.js → parser-LNEAHGXF.js} +7 -7
- package/dist/parser-LQDEU22S.js +15 -0
- package/dist/{parser-VVE4THG3.js → parser-MH62NYKM.js} +6 -6
- package/dist/parser-O5XCVGZG.js +11 -0
- package/dist/parser-OPOGIKFR.js +17 -0
- package/dist/parser-PEBXIOPX.js +12 -0
- package/dist/parser-PQXN6SBB.js +18 -0
- package/dist/parser-Q3KNFXQR.js +12 -0
- package/dist/parser-Q62VR2UJ.js +20 -0
- package/dist/parser-QEWSTNEJ.js +15 -0
- package/dist/{parser-7UI6UQ7B.js → parser-QL2LBPFE.js} +7 -7
- package/dist/{parser-LTA2BOZO.js → parser-QN3GJJ3J.js} +5 -5
- package/dist/parser-RBNOWHGM.js +15 -0
- package/dist/parser-SJ7ECFAP.js +13 -0
- package/dist/parser-VVTCMQWY.js +16 -0
- package/dist/parser-WT3DSNPQ.js +13 -0
- package/dist/parser-XWNSCDY6.js +13 -0
- package/dist/pert.d.ts +2 -0
- package/dist/{renderer-WVD6G2TS.js → renderer-2NU7M5PN.js} +14 -12
- package/dist/renderer-3IETIUZB.js +30 -0
- package/dist/renderer-4VLQKKTV.js +39 -0
- package/dist/{renderer-HQ4JFZOV.js → renderer-52S6JM5R.js} +12 -11
- package/dist/renderer-53FU55KK.js +19 -0
- package/dist/renderer-5CU6GYF2.js +27 -0
- package/dist/{renderer-LHVCKEWF.js → renderer-5G3PORFD.js} +13 -12
- package/dist/renderer-CB2DOQ2O.js +25 -0
- package/dist/{renderer-B7Y6I7JX.js → renderer-CL4SAUA5.js} +8 -8
- package/dist/{renderer-FXMGCSRP.js → renderer-CRAIC4ER.js} +12 -10
- package/dist/renderer-DZ5N6BHW.js +26 -0
- package/dist/renderer-FRBPMKPP.js +25 -0
- package/dist/renderer-HGWKAXS6.js +16 -0
- package/dist/renderer-I5MAFUKX.js +26 -0
- package/dist/{renderer-K7XLVPH5.js → renderer-IWNHBIZ6.js} +5 -5
- package/dist/renderer-J5MMVCGN.js +29 -0
- package/dist/renderer-J5TL5ZX4.js +39 -0
- package/dist/renderer-JNC6VJMN.js +24 -0
- package/dist/{renderer-X2LYSMLU.js → renderer-KUIZNLAQ.js} +6 -6
- package/dist/renderer-M6AFKVLS.js +21 -0
- package/dist/renderer-MLDGFZDW.js +23 -0
- package/dist/{renderer-YVMETH6V.js → renderer-O4ECS2BI.js} +13 -12
- package/dist/{renderer-YEFOOULC.js → renderer-OZIPP7VF.js} +14 -13
- package/dist/{renderer-C3RI4OPJ.js → renderer-P7O6OUYC.js} +13 -12
- package/dist/renderer-Q3A7572V.js +25 -0
- package/dist/renderer-QRX7Q2YN.js +22 -0
- package/dist/{renderer-WCWI4I6A.js → renderer-RJT3MOUU.js} +5 -5
- package/dist/{renderer-7HMZ5OCJ.js → renderer-SYT4L7GE.js} +6 -6
- package/dist/{renderer-G4UOW3RH.js → renderer-TOKGYFTG.js} +6 -6
- package/dist/renderer-WWC5VGHH.js +27 -0
- package/dist/{renderer-P3YQES7B.js → renderer-YVCD55ZX.js} +15 -13
- package/dist/renderer-YWYX6WAI.js +16 -0
- package/dist/renderer-radial-QG644QYY.js +21 -0
- package/dist/{resolver-WFKZYBJ2.js → resolver-W3WKLWDP.js} +4 -4
- package/dist/state-parser-NQGVYSM3.js +19 -0
- package/dist/state-renderer-NKV5B3KH.js +40 -0
- package/docs/language-reference.md +11 -2
- package/package.json +2 -2
- package/dist/charts-d3-25E4VWXO.js +0 -27
- package/dist/dgmo-router-TGZWFIZO.js +0 -88
- package/dist/dimensions-L6BXQXXL.js +0 -22
- package/dist/flowchart-parser-UKYOW3VM.js +0 -21
- package/dist/layout-25Y3VDYF.js +0 -19
- package/dist/layout-4SPLI4HG.js +0 -15
- package/dist/layout-CH4HFFRD.js +0 -15
- package/dist/layout-NY7MHJCL.js +0 -15
- package/dist/parser-2UWWNTFL.js +0 -12
- package/dist/parser-3RXYQSA7.js +0 -18
- package/dist/parser-5C3PEZK3.js +0 -11
- package/dist/parser-6GN5YJBJ.js +0 -13
- package/dist/parser-6MQM7WT3.js +0 -15
- package/dist/parser-B2A7XOAK.js +0 -12
- package/dist/parser-CCNJKDDA.js +0 -16
- package/dist/parser-ESHNUFME.js +0 -13
- package/dist/parser-F4FEU57T.js +0 -11
- package/dist/parser-FHRMFUNX.js +0 -15
- package/dist/parser-FPCWDYQV.js +0 -13
- package/dist/parser-FY3YFFBS.js +0 -20
- package/dist/parser-GML6V2KZ.js +0 -14
- package/dist/parser-HA3PF5FL.js +0 -15
- package/dist/parser-KTYF6WO5.js +0 -11
- package/dist/parser-LU7UAKNB.js +0 -13
- package/dist/parser-MHKYQPC2.js +0 -11
- package/dist/parser-MVSYFK63.js +0 -17
- package/dist/parser-O7YQYFEN.js +0 -15
- package/dist/parser-S4EJPNVN.js +0 -19
- package/dist/parser-T3D7BV6O.js +0 -11
- package/dist/parser-WPPJGB4R.js +0 -12
- package/dist/parser-XCPMEB2Z.js +0 -11
- package/dist/parser-XRDUX2AR.js +0 -14
- package/dist/parser-YPWYT46P.js +0 -16
- package/dist/parser-YULS5MLD.js +0 -13
- package/dist/renderer-2DME63VZ.js +0 -16
- package/dist/renderer-3VY3VXJE.js +0 -37
- package/dist/renderer-4A32DX5L.js +0 -24
- package/dist/renderer-4K5YYX5R.js +0 -28
- package/dist/renderer-6CFML5G3.js +0 -22
- package/dist/renderer-7ZNVOVFG.js +0 -16
- package/dist/renderer-CJ56SUMF.js +0 -26
- package/dist/renderer-COJZZ4F6.js +0 -25
- package/dist/renderer-OZX5KGQM.js +0 -21
- package/dist/renderer-PLVIARM7.js +0 -24
- package/dist/renderer-RA4PTAMF.js +0 -19
- package/dist/renderer-RMAM2SOJ.js +0 -28
- package/dist/renderer-SES7QZYL.js +0 -37
- package/dist/renderer-TQ5QDZOE.js +0 -22
- package/dist/renderer-V5SNTPAM.js +0 -27
- package/dist/renderer-Y3NXZINM.js +0 -24
- package/dist/renderer-YP3P6UVT.js +0 -24
- package/dist/renderer-Z4GNKNXO.js +0 -24
- package/dist/renderer-radial-VYBZAXXE.js +0 -21
- package/dist/state-parser-VIW2WNA5.js +0 -19
- package/dist/state-renderer-H22AQD3U.js +0 -38
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RT7ACF77.js";
|
|
4
4
|
import {
|
|
5
5
|
makeDgmoError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OLMWTJVU.js";
|
|
7
7
|
|
|
8
8
|
// src/sketch/geometry.ts
|
|
9
9
|
var SKETCH_PHI = (1 + Math.sqrt(5)) / 2;
|
|
@@ -72,6 +72,16 @@ function collapseSketch(parsed, collapsedLabels) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// src/sketch/layout.ts
|
|
75
|
+
function resolveAutoFlags(f = {}) {
|
|
76
|
+
return {
|
|
77
|
+
normalizeOrigin: f.normalizeOrigin ?? true,
|
|
78
|
+
sortRootsBySource: f.sortRootsBySource ?? true,
|
|
79
|
+
resolveOverlap: f.resolveOverlap ?? true,
|
|
80
|
+
groupCollisionAsRect: f.groupCollisionAsRect ?? true,
|
|
81
|
+
flowPlaceUnpositioned: f.flowPlaceUnpositioned ?? true,
|
|
82
|
+
avoidEdges: f.avoidEdges ?? true
|
|
83
|
+
};
|
|
84
|
+
}
|
|
75
85
|
function unitRect(c, r) {
|
|
76
86
|
return { c, r, w: SKETCH_SEP, h: SKETCH_SEP };
|
|
77
87
|
}
|
|
@@ -104,7 +114,7 @@ function nearestFree(base, occupied) {
|
|
|
104
114
|
}
|
|
105
115
|
return { c: base.c, r: base.r };
|
|
106
116
|
}
|
|
107
|
-
function layoutChildren(box, nodesById, warn) {
|
|
117
|
+
function layoutChildren(box, nodesById, warn, flags) {
|
|
108
118
|
const occupied = [];
|
|
109
119
|
const children = [];
|
|
110
120
|
const pending = [];
|
|
@@ -116,13 +126,17 @@ function layoutChildren(box, nodesById, warn) {
|
|
|
116
126
|
continue;
|
|
117
127
|
}
|
|
118
128
|
const target = unitRect(node.at.c, node.at.r);
|
|
119
|
-
const spot = nearestFree(target, occupied);
|
|
129
|
+
const spot = flags.resolveOverlap ? nearestFree(target, occupied) : { c: node.at.c, r: node.at.r };
|
|
120
130
|
if (spot.c !== node.at.c || spot.r !== node.at.r) {
|
|
121
131
|
warn(node.lineNumber, node.label);
|
|
122
132
|
}
|
|
123
133
|
occupied.push(unitRect(spot.c, spot.r));
|
|
124
134
|
children.push({ node, c: spot.c, r: spot.r });
|
|
125
135
|
}
|
|
136
|
+
if (!flags.flowPlaceUnpositioned) {
|
|
137
|
+
for (const node of pending) children.push({ node, c: 0, r: 0 });
|
|
138
|
+
pending.length = 0;
|
|
139
|
+
}
|
|
126
140
|
let flowRow = occupied.length > 0 ? Math.max(...occupied.map((o) => o.r)) + SKETCH_SEP : 0;
|
|
127
141
|
let flowCol = 0;
|
|
128
142
|
const wrapAt = Math.max(
|
|
@@ -169,6 +183,7 @@ function layoutSketch(parsed, options = {}) {
|
|
|
169
183
|
)
|
|
170
184
|
);
|
|
171
185
|
};
|
|
186
|
+
const flags = resolveAutoFlags(options.autoLayout);
|
|
172
187
|
const collapsed = collapseSketch(parsed, options.collapsedBoxes);
|
|
173
188
|
const nodesById = new Map(collapsed.nodes.map((n) => [n.id, n]));
|
|
174
189
|
const padHsX = SKETCH_GEOMETRY.boxPadPx / SKETCH_HALF_SLOT_X;
|
|
@@ -177,10 +192,39 @@ function layoutSketch(parsed, options = {}) {
|
|
|
177
192
|
const boxLocal = /* @__PURE__ */ new Map();
|
|
178
193
|
const inExpandedBox = /* @__PURE__ */ new Set();
|
|
179
194
|
for (const box of collapsed.boxes) {
|
|
180
|
-
const local = layoutChildren(box, nodesById, overlapWarn);
|
|
195
|
+
const local = layoutChildren(box, nodesById, overlapWarn, flags);
|
|
181
196
|
boxLocal.set(box.id, local);
|
|
182
197
|
for (const child of local.children) inExpandedBox.add(child.node.id);
|
|
183
198
|
}
|
|
199
|
+
const allNodesById = new Map(parsed.nodes.map((n) => [n.id, n]));
|
|
200
|
+
const noWarn = () => {
|
|
201
|
+
};
|
|
202
|
+
const virtualLocal = /* @__PURE__ */ new Map();
|
|
203
|
+
for (const box of collapsed.virtualBoxes) {
|
|
204
|
+
virtualLocal.set(box.id, layoutChildren(box, allNodesById, noWarn, flags));
|
|
205
|
+
}
|
|
206
|
+
const footWs = SKETCH_FOOT_W / SKETCH_HALF_SLOT_X;
|
|
207
|
+
const footHs = SKETCH_FOOT_H / SKETCH_HALF_SLOT_Y;
|
|
208
|
+
const virtualCardSpot = (boxId, spot) => {
|
|
209
|
+
const local = virtualLocal.get(boxId);
|
|
210
|
+
if (local.children.length === 0) return { c: spot.c, r: spot.r };
|
|
211
|
+
let minC = Infinity;
|
|
212
|
+
let minR = Infinity;
|
|
213
|
+
let maxC = -Infinity;
|
|
214
|
+
let maxR = -Infinity;
|
|
215
|
+
for (const ch of local.children) {
|
|
216
|
+
minC = Math.min(minC, ch.c);
|
|
217
|
+
minR = Math.min(minR, ch.r);
|
|
218
|
+
maxC = Math.max(maxC, ch.c + footWs);
|
|
219
|
+
maxR = Math.max(maxR, ch.r + footHs);
|
|
220
|
+
}
|
|
221
|
+
const cx = spot.c + (minC + maxC) / 2;
|
|
222
|
+
const cy = spot.r + (minR + maxR) / 2 + (padHsY - bandHs) / 2;
|
|
223
|
+
return {
|
|
224
|
+
c: Math.round(cx - footWs / 2),
|
|
225
|
+
r: Math.round(cy - footHs / 2)
|
|
226
|
+
};
|
|
227
|
+
};
|
|
184
228
|
const rootUnits = [];
|
|
185
229
|
for (const node of collapsed.nodes) {
|
|
186
230
|
if (!inExpandedBox.has(node.id)) rootUnits.push({ kind: "shape", node });
|
|
@@ -191,14 +235,27 @@ function layoutSketch(parsed, options = {}) {
|
|
|
191
235
|
for (const box of collapsed.boxes) {
|
|
192
236
|
rootUnits.push({ kind: "box", box });
|
|
193
237
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
238
|
+
const lineOf = (u) => u.kind === "shape" ? u.node.lineNumber : u.box.lineNumber;
|
|
239
|
+
const atOf = (u) => u.kind === "shape" ? u.node.at : u.box.at;
|
|
240
|
+
if (flags.sortRootsBySource) {
|
|
241
|
+
rootUnits.sort((a, b) => lineOf(a) - lineOf(b));
|
|
242
|
+
} else {
|
|
243
|
+
rootUnits.sort((a, b) => {
|
|
244
|
+
const aa = atOf(a);
|
|
245
|
+
const ba = atOf(b);
|
|
246
|
+
if (aa && ba) {
|
|
247
|
+
return aa.r - ba.r || aa.c - ba.c || lineOf(a) - lineOf(b);
|
|
248
|
+
}
|
|
249
|
+
if (aa) return -1;
|
|
250
|
+
if (ba) return 1;
|
|
251
|
+
return lineOf(a) - lineOf(b);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
199
254
|
const rectFor = (unit, c, r) => {
|
|
200
|
-
if (unit.kind
|
|
201
|
-
const local =
|
|
255
|
+
if (unit.kind !== "shape" && flags.groupCollisionAsRect) {
|
|
256
|
+
const local = (unit.kind === "box" ? boxLocal : virtualLocal).get(
|
|
257
|
+
unit.box.id
|
|
258
|
+
);
|
|
202
259
|
return {
|
|
203
260
|
c: c + local.extent.c - padHsX,
|
|
204
261
|
r: r + local.extent.r - bandHs,
|
|
@@ -212,26 +269,31 @@ function layoutSketch(parsed, options = {}) {
|
|
|
212
269
|
const placedAt = /* @__PURE__ */ new Map();
|
|
213
270
|
const pending = [];
|
|
214
271
|
for (const unit of rootUnits) {
|
|
215
|
-
const at = unit
|
|
272
|
+
const at = atOf(unit);
|
|
216
273
|
if (at === null) {
|
|
217
274
|
pending.push(unit);
|
|
218
275
|
continue;
|
|
219
276
|
}
|
|
220
277
|
const base = rectFor(unit, at.c, at.r);
|
|
221
278
|
let spot = { c: at.c, r: at.r };
|
|
222
|
-
if (collidesAny(base, occupied)) {
|
|
279
|
+
if (flags.resolveOverlap && unit.kind === "shape" && collidesAny(base, occupied)) {
|
|
223
280
|
const freed = nearestFree(base, occupied);
|
|
224
281
|
spot = {
|
|
225
282
|
c: at.c + (freed.c - base.c),
|
|
226
283
|
r: at.r + (freed.r - base.r)
|
|
227
284
|
};
|
|
228
|
-
|
|
229
|
-
const label = unit.kind === "shape" ? unit.node.label : unit.box.label;
|
|
230
|
-
overlapWarn(line, label);
|
|
285
|
+
overlapWarn(unit.node.lineNumber, unit.node.label);
|
|
231
286
|
}
|
|
232
287
|
occupied.push(rectFor(unit, spot.c, spot.r));
|
|
233
288
|
placedAt.set(unit, spot);
|
|
234
289
|
}
|
|
290
|
+
if (!flags.flowPlaceUnpositioned) {
|
|
291
|
+
for (const unit of pending) {
|
|
292
|
+
occupied.push(rectFor(unit, 0, 0));
|
|
293
|
+
placedAt.set(unit, { c: 0, r: 0 });
|
|
294
|
+
}
|
|
295
|
+
pending.length = 0;
|
|
296
|
+
}
|
|
235
297
|
let flowRow = occupied.length > 0 ? Math.ceil(Math.max(...occupied.map((o) => o.r + o.h))) : 0;
|
|
236
298
|
let flowCol = 0;
|
|
237
299
|
const wrapAt = Math.max(
|
|
@@ -258,8 +320,10 @@ function layoutSketch(parsed, options = {}) {
|
|
|
258
320
|
const spot = placedAt.get(u);
|
|
259
321
|
return rectFor(u, spot.c, spot.r);
|
|
260
322
|
});
|
|
261
|
-
const
|
|
262
|
-
const
|
|
323
|
+
const liveCMin = allRects.length > 0 ? Math.min(...allRects.map((r) => r.c)) : 0;
|
|
324
|
+
const liveRMin = allRects.length > 0 ? Math.min(...allRects.map((r) => r.r)) : 0;
|
|
325
|
+
const cMin = flags.normalizeOrigin ? liveCMin : Math.min(options.frozenOrigin?.c ?? liveCMin, liveCMin);
|
|
326
|
+
const rMin = flags.normalizeOrigin ? liveRMin : Math.min(options.frozenOrigin?.r ?? liveRMin, liveRMin);
|
|
263
327
|
const toPx = (c, r) => ({
|
|
264
328
|
x: (c - cMin) * SKETCH_HALF_SLOT_X,
|
|
265
329
|
y: (r - rMin) * SKETCH_HALF_SLOT_Y
|
|
@@ -284,14 +348,15 @@ function layoutSketch(parsed, options = {}) {
|
|
|
284
348
|
h: SKETCH_FOOT_H
|
|
285
349
|
});
|
|
286
350
|
} else if (unit.kind === "virtual") {
|
|
287
|
-
const
|
|
351
|
+
const cardSpot = virtualCardSpot(unit.box.id, spot);
|
|
352
|
+
const { x, y } = toPx(cardSpot.c, cardSpot.r);
|
|
288
353
|
nodes.push({
|
|
289
354
|
id: unit.box.id,
|
|
290
355
|
label: unit.box.label,
|
|
291
356
|
shape: "rectangle",
|
|
292
357
|
metadata: unit.box.metadata,
|
|
293
358
|
lineNumber: unit.box.lineNumber,
|
|
294
|
-
slot:
|
|
359
|
+
slot: cardSpot,
|
|
295
360
|
x,
|
|
296
361
|
y,
|
|
297
362
|
w: SKETCH_FOOT_W,
|
|
@@ -348,7 +413,13 @@ function layoutSketch(parsed, options = {}) {
|
|
|
348
413
|
});
|
|
349
414
|
}
|
|
350
415
|
}
|
|
351
|
-
{
|
|
416
|
+
if (flags.avoidEdges) {
|
|
417
|
+
const authored = /* @__PURE__ */ new Set();
|
|
418
|
+
for (const unit of rootUnits) {
|
|
419
|
+
if (atOf(unit) !== null) {
|
|
420
|
+
authored.add(unit.kind === "shape" ? unit.node.id : unit.box.id);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
352
423
|
const centerOf = (id) => {
|
|
353
424
|
const n = nodes.find((nd) => nd.id === id);
|
|
354
425
|
if (n) return { x: n.x + n.w / 2, y: n.y + n.h / 2 };
|
|
@@ -382,6 +453,7 @@ function layoutSketch(parsed, options = {}) {
|
|
|
382
453
|
let moved = false;
|
|
383
454
|
for (const n of nodes) {
|
|
384
455
|
if (n.boxLabel) continue;
|
|
456
|
+
if (authored.has(n.id)) continue;
|
|
385
457
|
for (const e of collapsed.edges) {
|
|
386
458
|
if (e.sourceId === n.id || e.targetId === n.id) continue;
|
|
387
459
|
const a = centerOf(e.sourceId);
|
|
@@ -432,7 +504,8 @@ function layoutSketch(parsed, options = {}) {
|
|
|
432
504
|
edges: collapsed.edges,
|
|
433
505
|
width,
|
|
434
506
|
height,
|
|
435
|
-
diagnostics
|
|
507
|
+
diagnostics,
|
|
508
|
+
origin: { c: cMin, r: rMin }
|
|
436
509
|
};
|
|
437
510
|
}
|
|
438
511
|
|
|
@@ -449,4 +522,4 @@ export {
|
|
|
449
522
|
collapseSketch,
|
|
450
523
|
layoutSketch
|
|
451
524
|
};
|
|
452
|
-
//# sourceMappingURL=chunk-
|
|
525
|
+
//# sourceMappingURL=chunk-6IVXRTXH.js.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TITLE_FONT_SIZE,
|
|
3
|
+
TITLE_Y
|
|
4
|
+
} from "./chunk-A4GOY3PE.js";
|
|
5
|
+
import {
|
|
6
|
+
LEGEND_HEIGHT
|
|
7
|
+
} from "./chunk-SCJ7CAJF.js";
|
|
8
|
+
import {
|
|
9
|
+
measureText
|
|
10
|
+
} from "./chunk-4ASYQ347.js";
|
|
11
|
+
|
|
12
|
+
// src/utils/inline-header.ts
|
|
13
|
+
var LEGEND_INLINE_SUPPORTED = /* @__PURE__ */ new Set([
|
|
14
|
+
// data charts
|
|
15
|
+
"bar",
|
|
16
|
+
"line",
|
|
17
|
+
"radar",
|
|
18
|
+
"scatter",
|
|
19
|
+
"function",
|
|
20
|
+
// structured
|
|
21
|
+
"state",
|
|
22
|
+
"treemap",
|
|
23
|
+
"block",
|
|
24
|
+
"event-line",
|
|
25
|
+
"boxes-and-lines",
|
|
26
|
+
"er",
|
|
27
|
+
"class",
|
|
28
|
+
"family",
|
|
29
|
+
"infra",
|
|
30
|
+
"sequence",
|
|
31
|
+
"sketch",
|
|
32
|
+
"bracket",
|
|
33
|
+
"gantt",
|
|
34
|
+
"pert",
|
|
35
|
+
"sitemap",
|
|
36
|
+
"mindmap",
|
|
37
|
+
"kanban",
|
|
38
|
+
"journey-map"
|
|
39
|
+
]);
|
|
40
|
+
function legendInlineSupported(type) {
|
|
41
|
+
return LEGEND_INLINE_SUPPORTED.has(type.toLowerCase());
|
|
42
|
+
}
|
|
43
|
+
var INLINE_HEADER_PAD = 8;
|
|
44
|
+
var INLINE_HEADER_GAP = 16;
|
|
45
|
+
var BOLD_WIDTH_FACTOR = 1.06;
|
|
46
|
+
var MIN_INLINE_LEGEND_W = 48;
|
|
47
|
+
function measureTitleWidth(title, fontSize = TITLE_FONT_SIZE) {
|
|
48
|
+
return measureText(title, fontSize) * BOLD_WIDTH_FACTOR;
|
|
49
|
+
}
|
|
50
|
+
function layoutInlineHeader(input) {
|
|
51
|
+
const pad = input.pad ?? INLINE_HEADER_PAD;
|
|
52
|
+
const gap = input.gap ?? INLINE_HEADER_GAP;
|
|
53
|
+
const fontSize = input.titleFontSize ?? TITLE_FONT_SIZE;
|
|
54
|
+
const baselineY = input.titleBaselineY ?? TITLE_Y;
|
|
55
|
+
const stacked = {
|
|
56
|
+
inline: false,
|
|
57
|
+
titleX: input.containerWidth / 2,
|
|
58
|
+
titleAnchor: "middle",
|
|
59
|
+
legendX: 0,
|
|
60
|
+
legendY: input.titleBandHeight,
|
|
61
|
+
headerHeight: input.titleBandHeight + (input.hasLegend ? input.legendReserve : 0)
|
|
62
|
+
};
|
|
63
|
+
if (!input.requested || !input.hasLegend) return stacked;
|
|
64
|
+
const titleW = measureTitleWidth(input.title, fontSize);
|
|
65
|
+
const titleRight = pad + titleW + gap;
|
|
66
|
+
const avail = input.containerWidth - titleRight - pad;
|
|
67
|
+
const fits = avail >= MIN_INLINE_LEGEND_W && input.legendHeight <= LEGEND_HEIGHT + 1 && input.legendWidth <= avail + 0.5;
|
|
68
|
+
if (!fits) return stacked;
|
|
69
|
+
return {
|
|
70
|
+
inline: true,
|
|
71
|
+
titleX: pad,
|
|
72
|
+
titleAnchor: "start",
|
|
73
|
+
// Flush to the right edge; the fit test guarantees this clears the title.
|
|
74
|
+
legendX: input.containerWidth - pad - input.legendWidth,
|
|
75
|
+
// Center the legend row on the title's visual middle (cap-center ≈ baseline
|
|
76
|
+
// − 0.36·fontSize).
|
|
77
|
+
legendY: baselineY - fontSize * 0.36 - input.legendHeight / 2,
|
|
78
|
+
headerHeight: input.titleBandHeight
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
legendInlineSupported,
|
|
84
|
+
INLINE_HEADER_PAD,
|
|
85
|
+
layoutInlineHeader
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=chunk-6VJCURWU.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
makeDgmoError,
|
|
6
6
|
suggest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OLMWTJVU.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/notes/resolve.ts
|
|
10
10
|
function resolveNotes(notes, targets, diagnostics) {
|
|
@@ -65,4 +65,4 @@ function resolveNotes(notes, targets, diagnostics) {
|
|
|
65
65
|
export {
|
|
66
66
|
resolveNotes
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-7NK42OIB.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
isTagBlockHeading,
|
|
6
6
|
matchTagBlockHeading
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D5FANMSG.js";
|
|
8
8
|
import {
|
|
9
9
|
makeDgmoError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OLMWTJVU.js";
|
|
11
11
|
|
|
12
12
|
// src/pert/share-normalize.ts
|
|
13
13
|
var START_DATE_NOW_RE = /^(\s*start-date\s+)now(\s*)$/i;
|
|
@@ -401,4 +401,4 @@ export {
|
|
|
401
401
|
normalizePertSourceForShare,
|
|
402
402
|
resolveOrgImports
|
|
403
403
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
404
|
+
//# sourceMappingURL=chunk-7SXTD7L6.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-
|
|
233
|
+
//# sourceMappingURL=chunk-A2RUBBVT.js.map
|
|
@@ -7,12 +7,15 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-YYVTBZZC.js";
|
|
10
|
+
import {
|
|
11
|
+
serializeSvg
|
|
12
|
+
} from "./chunk-NZ5QVASG.js";
|
|
10
13
|
import {
|
|
11
14
|
renderIntegratedLegend
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QDOYT6UW.js";
|
|
13
16
|
import {
|
|
14
17
|
getMaxLegendReservedHeight
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ES66QH6J.js";
|
|
16
19
|
import {
|
|
17
20
|
TITLE_FONT_SIZE,
|
|
18
21
|
TITLE_FONT_WEIGHT
|
|
@@ -22,11 +25,11 @@ import {
|
|
|
22
25
|
} from "./chunk-6KFWC4CO.js";
|
|
23
26
|
import {
|
|
24
27
|
parseKanban
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-X32RDWT5.js";
|
|
26
29
|
import {
|
|
27
30
|
LEGEND_HEIGHT,
|
|
28
31
|
measureLegendText
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SCJ7CAJF.js";
|
|
30
33
|
import {
|
|
31
34
|
measureText
|
|
32
35
|
} from "./chunk-4ASYQ347.js";
|
|
@@ -35,14 +38,14 @@ import {
|
|
|
35
38
|
mix,
|
|
36
39
|
shapeFill,
|
|
37
40
|
themeBaseBg
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-42IT4BG2.js";
|
|
39
42
|
import {
|
|
40
43
|
tagAttrKey
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-D5FANMSG.js";
|
|
42
45
|
import {
|
|
43
46
|
fillModeFromOptions,
|
|
44
47
|
legendSuppressed
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-3KOPPSUQ.js";
|
|
46
49
|
|
|
47
50
|
// src/kanban/renderer.ts
|
|
48
51
|
import * as d3Selection from "d3-selection";
|
|
@@ -552,7 +555,7 @@ function renderKanbanForExport(content, theme, palette) {
|
|
|
552
555
|
exportMode: true
|
|
553
556
|
});
|
|
554
557
|
const svgEl = container.querySelector("svg");
|
|
555
|
-
return svgEl
|
|
558
|
+
return svgEl ? serializeSvg(svgEl) : "";
|
|
556
559
|
}
|
|
557
560
|
var LANE_HEADER_WIDTH = 140;
|
|
558
561
|
var LANE_GAP = 14;
|
|
@@ -893,4 +896,4 @@ export {
|
|
|
893
896
|
renderKanban,
|
|
894
897
|
renderKanbanForExport
|
|
895
898
|
};
|
|
896
|
-
//# sourceMappingURL=chunk-
|
|
899
|
+
//# sourceMappingURL=chunk-A4DAZO3U.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSwatches
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FWVKPEG3.js";
|
|
4
4
|
import {
|
|
5
5
|
layoutMap,
|
|
6
6
|
mapLegendConfig,
|
|
7
7
|
mapLegendGroups,
|
|
8
8
|
parsePathRings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U7ZQTUZT.js";
|
|
10
10
|
import {
|
|
11
11
|
renderIntegratedLegend
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QDOYT6UW.js";
|
|
13
13
|
import {
|
|
14
14
|
TITLE_FONT_SIZE,
|
|
15
15
|
TITLE_FONT_WEIGHT,
|
|
@@ -20,21 +20,21 @@ import {
|
|
|
20
20
|
} from "./chunk-6KFWC4CO.js";
|
|
21
21
|
import {
|
|
22
22
|
parseClock
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YNAHUNMA.js";
|
|
24
24
|
import {
|
|
25
25
|
fixedParts,
|
|
26
26
|
formatTime,
|
|
27
27
|
sunLine,
|
|
28
28
|
workStatus,
|
|
29
29
|
zoneParts
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-A2RUBBVT.js";
|
|
31
31
|
import {
|
|
32
32
|
measureText
|
|
33
33
|
} from "./chunk-4ASYQ347.js";
|
|
34
34
|
import {
|
|
35
35
|
mix,
|
|
36
36
|
themeBaseBg
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-42IT4BG2.js";
|
|
38
38
|
|
|
39
39
|
// src/map/renderer.ts
|
|
40
40
|
import * as d3Selection from "d3-selection";
|
|
@@ -781,4 +781,4 @@ export {
|
|
|
781
781
|
renderMap,
|
|
782
782
|
renderMapForExport
|
|
783
783
|
};
|
|
784
|
-
//# sourceMappingURL=chunk-
|
|
784
|
+
//# sourceMappingURL=chunk-AIH6M5J6.js.map
|
|
@@ -16,12 +16,16 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
ScaleContext
|
|
18
18
|
} from "./chunk-YYVTBZZC.js";
|
|
19
|
+
import {
|
|
20
|
+
layoutInlineHeader
|
|
21
|
+
} from "./chunk-6VJCURWU.js";
|
|
19
22
|
import {
|
|
20
23
|
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QDOYT6UW.js";
|
|
22
25
|
import {
|
|
26
|
+
getLegendExtent,
|
|
23
27
|
getMaxLegendReservedHeight
|
|
24
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ES66QH6J.js";
|
|
25
29
|
import {
|
|
26
30
|
TITLE_FONT_SIZE,
|
|
27
31
|
TITLE_FONT_WEIGHT,
|
|
@@ -33,7 +37,7 @@ import {
|
|
|
33
37
|
} from "./chunk-6KFWC4CO.js";
|
|
34
38
|
import {
|
|
35
39
|
parseInfra
|
|
36
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-FXVPSTDT.js";
|
|
37
41
|
import {
|
|
38
42
|
preprocessDescriptionLine
|
|
39
43
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -47,7 +51,7 @@ import {
|
|
|
47
51
|
LEGEND_PILL_FONT_SIZE,
|
|
48
52
|
LEGEND_PILL_PAD,
|
|
49
53
|
measureLegendText
|
|
50
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-SCJ7CAJF.js";
|
|
51
55
|
import {
|
|
52
56
|
CHAR_WIDTH_RATIO,
|
|
53
57
|
measureText,
|
|
@@ -57,16 +61,17 @@ import {
|
|
|
57
61
|
contrastText,
|
|
58
62
|
mix,
|
|
59
63
|
shapeFill
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-42IT4BG2.js";
|
|
61
65
|
import {
|
|
62
66
|
tagAttrKey
|
|
63
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-D5FANMSG.js";
|
|
64
68
|
import {
|
|
69
|
+
legendInlineRequested,
|
|
65
70
|
legendSuppressed
|
|
66
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-3KOPPSUQ.js";
|
|
67
72
|
import {
|
|
68
73
|
resolveColor
|
|
69
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-EXNKNJ65.js";
|
|
70
75
|
|
|
71
76
|
// src/infra/renderer.ts
|
|
72
77
|
import * as d3Selection from "d3-selection";
|
|
@@ -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(
|
|
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
|
|
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(
|
|
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",
|
|
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-
|
|
1611
|
+
//# sourceMappingURL=chunk-AMC2OGXF.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-6EK55ART.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveNotes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7NK42OIB.js";
|
|
10
10
|
import {
|
|
11
11
|
measureText
|
|
12
12
|
} from "./chunk-4ASYQ347.js";
|
|
@@ -326,4 +326,4 @@ function layoutERDiagram(parsed, options) {
|
|
|
326
326
|
export {
|
|
327
327
|
layoutERDiagram
|
|
328
328
|
};
|
|
329
|
-
//# sourceMappingURL=chunk-
|
|
329
|
+
//# sourceMappingURL=chunk-AN465MXC.js.map
|