@diagrammo/dgmo 0.96.0 → 0.98.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 +178 -8
- package/dist/advanced.js +232 -246
- package/dist/block.d.ts +8 -0
- package/dist/block.js +138 -66
- package/dist/{calculator-GIB7POFX.js → calculator-CIGGTURF.js} +2 -2
- package/dist/{chart-meta-uImk4eTn.d.ts → chart-meta-B7niEd52.d.ts} +3 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +19 -19
- package/dist/{chart-types-CBVYiLqy.d.ts → chart-types-Dxtv4XSz.d.ts} +3 -0
- package/dist/{charts-d3-IRP5VANE.js → charts-d3-INWEGMSD.js} +14 -14
- package/dist/{chunk-VLI6AWS3.js → chunk-3C4OXVZJ.js} +2 -2
- package/dist/{chunk-I3ZRIMR7.js → chunk-3EDV56HL.js} +15 -15
- package/dist/{chunk-OO4GUE4E.js → chunk-3F74NDUY.js} +63 -18
- package/dist/{chunk-RGFVHYDP.js → chunk-3IUMSK72.js} +2 -2
- package/dist/chunk-42AZPI2W.js +150 -0
- package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
- package/dist/{chunk-FHX373L5.js → chunk-47INRTZ6.js} +2 -2
- package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
- package/dist/{chunk-JBAFAKGX.js → chunk-4PZP6URA.js} +41 -51
- package/dist/{chunk-5LG526X7.js → chunk-5TGZBHEJ.js} +1 -1
- package/dist/{chunk-BD4O4D2A.js → chunk-5WZYJC2P.js} +2 -2
- package/dist/{chunk-DPNSDCR3.js → chunk-65JFUANT.js} +1 -1
- package/dist/{chunk-EZ6BI5LL.js → chunk-6OUMYNAJ.js} +1 -1
- package/dist/{chunk-U6N547QA.js → chunk-6PUBFB6D.js} +24 -3
- package/dist/{chunk-IKXQ6NVR.js → chunk-6Q46GMKH.js} +21 -58
- package/dist/{chunk-DKCVAQU3.js → chunk-6YRTBI2F.js} +53 -75
- package/dist/{chunk-RTRORHSP.js → chunk-7QKWU7FX.js} +3 -3
- package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
- package/dist/{chunk-H7RQG4PH.js → chunk-A3N4UHHL.js} +2 -2
- package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
- package/dist/chunk-AHUBG6GR.js +188 -0
- package/dist/{chunk-P3PSLC2K.js → chunk-AULFF7L2.js} +2 -2
- package/dist/{chunk-SCYVGPLI.js → chunk-B7ZH5EQ2.js} +2 -2
- package/dist/{chunk-TUOZ6AXC.js → chunk-BTFB7W5Z.js} +16 -4
- package/dist/{chunk-THTYCJGF.js → chunk-BWVJTYTJ.js} +4 -4
- package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
- package/dist/{chunk-H7JVKUA5.js → chunk-CES7REQM.js} +44 -60
- package/dist/{chunk-B2YVZ3QU.js → chunk-CGP7RGLJ.js} +1 -1
- package/dist/{chunk-34JOHSVE.js → chunk-CUTEHGXO.js} +2 -2
- package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
- package/dist/{chunk-TPCP2UOI.js → chunk-D6XR22KO.js} +3 -3
- package/dist/{chunk-OAZ6BIIB.js → chunk-D7FHY6DO.js} +9 -7
- package/dist/{chunk-67N26CER.js → chunk-DA2GIHAY.js} +38 -5
- package/dist/{chunk-PGD6CNWO.js → chunk-DFEVFLEG.js} +3 -3
- package/dist/{chunk-VVTCUIPN.js → chunk-DKMZ4VMV.js} +1 -1
- package/dist/{chunk-VJ7NLYFE.js → chunk-DYI73PFY.js} +3 -3
- package/dist/{chunk-IQZSKWE5.js → chunk-E6GHXMH2.js} +8 -8
- package/dist/{chunk-I2I2FKAK.js → chunk-EBJLT7PH.js} +1 -1
- package/dist/{chunk-K2SFH3GJ.js → chunk-ENXENGW5.js} +3 -3
- package/dist/{chunk-FKJWZWNU.js → chunk-EUPUVYWO.js} +1 -1
- package/dist/{chunk-26EVL454.js → chunk-F4DGHT3F.js} +20 -0
- package/dist/{chunk-WLGOIMTI.js → chunk-FDVUD3PR.js} +4 -4
- package/dist/{chunk-IU7XKZA6.js → chunk-FK6HZYGK.js} +4 -14
- package/dist/{chunk-67RKJEKF.js → chunk-FTRW6YGU.js} +35 -11
- package/dist/{chunk-2M3K6GD2.js → chunk-FTW2E2YH.js} +6 -6
- package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
- package/dist/chunk-G24NSISJ.js +69 -0
- package/dist/{chunk-4B45SNZH.js → chunk-G36XKXWT.js} +17 -15
- package/dist/{chunk-5H7SA5ZD.js → chunk-GFQFLLP3.js} +2 -2
- package/dist/{chunk-MAYTYF5S.js → chunk-GMJBBFKC.js} +3 -3
- package/dist/{chunk-5BG4OSWJ.js → chunk-GNQYARON.js} +20 -57
- package/dist/{chunk-RVOSA4RR.js → chunk-GNWCMWTO.js} +441 -267
- package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
- package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
- package/dist/{chunk-7UWVHNPM.js → chunk-H242TVAE.js} +9 -9
- package/dist/{chunk-CD7VQCDL.js → chunk-H7XXQSYA.js} +63 -53
- package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
- package/dist/{chunk-WTPS73RM.js → chunk-II6D6NWX.js} +8 -8
- package/dist/{chunk-3W73ZP6W.js → chunk-IMBFWXHF.js} +3 -3
- package/dist/{chunk-5ARANBIE.js → chunk-IUFTAFGN.js} +2 -2
- package/dist/{chunk-AQRSEQZV.js → chunk-IZEKHIV6.js} +3 -3
- package/dist/{chunk-WGNP5ND2.js → chunk-J3YM6RA5.js} +3 -3
- package/dist/{chunk-YFIUABSF.js → chunk-J467QBZF.js} +23 -3
- package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
- package/dist/{chunk-TIPNNOZC.js → chunk-KKJG3LBY.js} +41 -19
- package/dist/{chunk-YVIPJGFG.js → chunk-KMB754DO.js} +33 -6
- package/dist/chunk-KNKZGRRB.js +439 -0
- package/dist/{chunk-SIABEREK.js → chunk-KTGJQJB3.js} +2 -2
- package/dist/{chunk-LGUFJ7Y2.js → chunk-KW3CC7SB.js} +1 -1
- package/dist/{chunk-ITDF3MWD.js → chunk-L3K5O3Z5.js} +3 -3
- package/dist/{chunk-NI4L6HEU.js → chunk-LZATSXAA.js} +1 -1
- package/dist/{chunk-EPB3UEMD.js → chunk-NBISN6FH.js} +2 -2
- package/dist/{chunk-VNAPEZX2.js → chunk-NHN6GBG7.js} +1 -1
- package/dist/{chunk-EM5SA7NC.js → chunk-NQFZ7LXC.js} +4 -4
- package/dist/chunk-NTDWVTEY.js +12 -0
- package/dist/{chunk-ZBOIYC2G.js → chunk-NXOIH5JK.js} +8 -13
- package/dist/{chunk-AUXUNV73.js → chunk-O3HRF25Z.js} +1 -1
- package/dist/{chunk-KDWEOT54.js → chunk-O5APWRZN.js} +192 -230
- package/dist/{chunk-GLL237AP.js → chunk-OSSA5UWA.js} +3 -3
- package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
- package/dist/{chunk-QEU6VM4O.js → chunk-PLQZJZ2K.js} +1 -1
- package/dist/chunk-PRG7NIUU.js +272 -0
- package/dist/{chunk-CP73WWLN.js → chunk-PRYAVMU6.js} +48 -14
- package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
- package/dist/{chunk-B7BSRVNC.js → chunk-PZ5LAAO3.js} +2 -2
- package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
- package/dist/{chunk-MVUNMJKO.js → chunk-Q6OKTHYL.js} +71 -57
- package/dist/{chunk-ZOKD5F7M.js → chunk-QDPTOIG7.js} +5 -5
- package/dist/{chunk-2BYFNZVM.js → chunk-QGSQ2LMB.js} +57 -15
- package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
- package/dist/{chunk-K2WXMXI2.js → chunk-QLIZ7SB7.js} +1 -1
- package/dist/{chunk-P6LKX3IQ.js → chunk-QOLRTPGH.js} +6 -6
- package/dist/{chunk-FBK32S4D.js → chunk-R4SXMBGF.js} +1 -1
- package/dist/chunk-R4U7IIRX.js +178 -0
- package/dist/{chunk-DWMQ24JR.js → chunk-RC6PISCK.js} +4 -2
- package/dist/{chunk-R5L5E3TC.js → chunk-REKLKGR6.js} +3 -3
- package/dist/{chunk-FUYEXLAN.js → chunk-RFGQDIOI.js} +837 -220
- package/dist/{chunk-W5MMPPGX.js → chunk-ROFSIFSY.js} +4 -4
- package/dist/{chunk-JCC3B2GS.js → chunk-ROH4LYBL.js} +65 -21
- package/dist/{chunk-MYHR3PMH.js → chunk-S5VZLZUQ.js} +7 -7
- package/dist/{chunk-JRN2CRXJ.js → chunk-TDUBTDXS.js} +1 -1
- package/dist/{chunk-IZFJZCF6.js → chunk-TGQQD2KC.js} +84 -16
- package/dist/{chunk-GM2SLMQW.js → chunk-TMB4YY3J.js} +34 -4
- package/dist/{chunk-HH3DHNQA.js → chunk-UWWQECLC.js} +2 -2
- package/dist/{chunk-HZX4QZGR.js → chunk-V65EDV6S.js} +3 -3
- package/dist/{chunk-OYGJZA24.js → chunk-VHVQT4EW.js} +39 -19
- package/dist/{chunk-KQAPFIYF.js → chunk-VQWLASDC.js} +2 -2
- package/dist/chunk-VTGGPBLW.js +14 -0
- package/dist/{chunk-LRHPBWOY.js → chunk-VUBCCY65.js} +32 -69
- package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
- package/dist/{chunk-D7DGLJ7N.js → chunk-VVZDBUHA.js} +2 -2
- package/dist/{chunk-B5CEV7IR.js → chunk-VYEIMHL5.js} +38 -14
- package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
- package/dist/{chunk-P2GNNEMN.js → chunk-WPYJAHRP.js} +1 -1
- package/dist/{chunk-RIK6WUMO.js → chunk-XCYGOCMS.js} +43 -26
- package/dist/{chunk-PWZEJNO6.js → chunk-XMUFXJI2.js} +6 -6
- package/dist/{chunk-5G4DOOX2.js → chunk-XPOEE2RW.js} +9 -5
- package/dist/{chunk-EMGNCG5C.js → chunk-XZGXVN4T.js} +5 -5
- package/dist/{chunk-BUVLLK3D.js → chunk-Y24QPREP.js} +27 -17
- package/dist/{chunk-GEHK4UD5.js → chunk-YCIOLYWL.js} +92 -23
- package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
- package/dist/{chunk-6XLMTAEX.js → chunk-YIHRLY55.js} +33 -6
- package/dist/{chunk-CYRB2JTN.js → chunk-YLKPRT6U.js} +1 -1
- package/dist/{chunk-KMU65FYM.js → chunk-YSDSFXQD.js} +1 -1
- package/dist/{chunk-M4ZUIW3J.js → chunk-Z6V73LD6.js} +3 -3
- package/dist/{chunk-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
- package/dist/{chunk-YSGOXZBB.js → chunk-ZMVMGZAJ.js} +1 -1
- package/dist/{chunk-O2HNVNKO.js → chunk-ZTKO2RD4.js} +5 -5
- package/dist/{chunk-5GU6C5WB.js → chunk-ZXPSNBZC.js} +3 -3
- package/dist/collapse-6IGH2B24.js +31 -0
- package/dist/collapse-GOWNCVHZ.js +7 -0
- package/dist/collapse-HNTPLB2Q.js +11 -0
- package/dist/collapse-NUM7DPJA.js +10 -0
- package/dist/completion-registry.js +27 -4
- package/dist/dgmo-router-RXV7BNPN.js +101 -0
- package/dist/dimensions-KXAI7U2B.js +21 -0
- package/dist/editor.js +882 -215
- package/dist/{flowchart-parser-SM5LHF2D.js → flowchart-parser-JAZRKKKJ.js} +5 -5
- package/dist/flowchart-renderer-JED3RESY.js +40 -0
- package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
- package/dist/highlight.js +883 -216
- package/dist/index.d.ts +52 -5
- package/dist/index.js +79 -63
- package/dist/{layout-LNVIH45F.js → layout-6QXAC2WA.js} +7 -6
- package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
- package/dist/layout-BSK374N6.js +11 -0
- package/dist/{layout-FCFUVCRI.js → layout-DJOZCSAP.js} +10 -10
- package/dist/{layout-R6G4MEO3.js → layout-FJDBY3WG.js} +5 -5
- package/dist/{layout-H2KP5A6M.js → layout-GC5XX2RH.js} +2 -2
- package/dist/{layout-KELSNWBD.js → layout-LCHMEGTV.js} +10 -10
- package/dist/{layout-PPIVGJXD.js → layout-ROI5KVSO.js} +3 -3
- package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
- package/dist/{layout-AF4KA5B2.js → layout-VHBM32OD.js} +6 -6
- package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
- package/dist/layout-WTHBGTH2.js +15 -0
- package/dist/layout-ZCCABSV7.js +15 -0
- package/dist/{layout-MPSH3YWE.js → layout-ZDMJL4KO.js} +10 -10
- package/dist/{layout-search-C2TYUH4L.js → layout-search-UZYZE4PR.js} +8 -8
- package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
- package/dist/{parser-6WURFLOB.js → parser-3KMY23A2.js} +3 -3
- package/dist/{parser-DGLKH4NT.js → parser-3PMYAVFL.js} +2 -2
- package/dist/{parser-OHBBDCG4.js → parser-5KVFS4RN.js} +2 -2
- package/dist/{parser-QWTECQEC.js → parser-ASXY2CPV.js} +6 -6
- package/dist/{parser-UHKROC7Z.js → parser-BA43YPIQ.js} +3 -3
- package/dist/{parser-F75WNYMK.js → parser-CFAYEWLF.js} +3 -3
- package/dist/{parser-MWINQNQW.js → parser-DRFEX6OX.js} +3 -3
- package/dist/{parser-W6NX3AIV.js → parser-DWVBRBB2.js} +3 -3
- package/dist/{parser-DRUGM3R6.js → parser-FWQY3HJX.js} +2 -2
- package/dist/{parser-4GHAYZKZ.js → parser-GBB5MYAN.js} +6 -6
- package/dist/{parser-GBQY3WOZ.js → parser-GMCXCJSP.js} +3 -3
- package/dist/{parser-BPYHIG24.js → parser-IHFHPFL7.js} +3 -3
- package/dist/{parser-TTGZYLYD.js → parser-JQGUTDSX.js} +3 -3
- package/dist/{parser-BNRX35NT.js → parser-JRKPOO2Z.js} +3 -3
- package/dist/{parser-B7SCN7FG.js → parser-KI2XYB2R.js} +2 -2
- package/dist/parser-LDVVBP7S.js +12 -0
- package/dist/{parser-L7SI3PW4.js → parser-MAGFK6OK.js} +4 -4
- package/dist/{parser-722KLLAQ.js → parser-MH5BDN7X.js} +3 -3
- package/dist/{parser-5RUD4A3X.js → parser-MUHFEM4G.js} +3 -3
- package/dist/{parser-Y7QXD2UR.js → parser-P375HO7Q.js} +2 -2
- package/dist/{parser-LUJX7AXO.js → parser-PYY5BRLQ.js} +2 -2
- package/dist/parser-QEMFMVF5.js +12 -0
- package/dist/{parser-WIKXZP4X.js → parser-QIPDBT5M.js} +2 -2
- package/dist/{parser-2AXU2MHJ.js → parser-RNBDDEGL.js} +3 -3
- package/dist/{parser-H6HT2WFQ.js → parser-SGX2PVR5.js} +2 -2
- package/dist/{parser-ZWWQZ4XZ.js → parser-SJUEFKNM.js} +3 -3
- package/dist/{parser-4BOP77CD.js → parser-UMNBPXG2.js} +2 -2
- package/dist/{parser-GM5B2EPW.js → parser-WE4VSBBY.js} +3 -3
- package/dist/{parser-XEJP37GQ.js → parser-WKEYS7N3.js} +3 -3
- package/dist/{parser-DWV2CYBS.js → parser-WPXUUNA2.js} +3 -3
- package/dist/{parser-5HQPPVHJ.js → parser-XP3RCOTN.js} +3 -3
- package/dist/{parser-F3JJNIFC.js → parser-YV4RBHG7.js} +3 -3
- package/dist/{parser-CRJYLOHA.js → parser-YZ3J542U.js} +2 -2
- package/dist/{parser-ZV756RMP.js → parser-ZSBMGGTD.js} +6 -6
- package/dist/renderer-37LMEGLD.js +26 -0
- package/dist/{renderer-TS5NHOQD.js → renderer-3EIZRVO3.js} +12 -11
- package/dist/renderer-4LK2RFHD.js +28 -0
- package/dist/{renderer-BYLQ37T2.js → renderer-4WD4ZIEH.js} +16 -15
- package/dist/renderer-67PNYODC.js +32 -0
- package/dist/{renderer-GKY55M4Z.js → renderer-6O5SV5YE.js} +10 -10
- package/dist/{renderer-VNJOZPSH.js → renderer-6VBL2DWH.js} +17 -17
- package/dist/{renderer-F7YGMEGQ.js → renderer-7OXMSF4R.js} +4 -4
- package/dist/{renderer-6HU44IGJ.js → renderer-A36NL2SS.js} +8 -8
- package/dist/renderer-CC6O6GQK.js +18 -0
- package/dist/renderer-CUEMI3PI.js +85 -0
- package/dist/{renderer-QZJZIAT3.js → renderer-D6BEC6LI.js} +6 -4
- package/dist/{renderer-5GP7YUS4.js → renderer-DT2PP7NJ.js} +7 -6
- package/dist/{renderer-MGF2NNGG.js → renderer-E7LC7HCU.js} +5 -5
- package/dist/{renderer-PEJF6R2I.js → renderer-F3JYZERE.js} +4 -4
- package/dist/{renderer-CVCCW7UT.js → renderer-FAFSRFGR.js} +9 -9
- package/dist/renderer-GHYW6Y3A.js +27 -0
- package/dist/{renderer-VUXAAGUG.js → renderer-HRUKL4T6.js} +12 -11
- package/dist/renderer-INQMQPNN.js +22 -0
- package/dist/{renderer-LJPUCG3U.js → renderer-KOPJ76GS.js} +10 -10
- package/dist/renderer-KVC7Z4T2.js +39 -0
- package/dist/{renderer-MVBAQP3M.js → renderer-MYKL6VG6.js} +6 -6
- package/dist/{renderer-D6EH5UQ6.js → renderer-QVUPRQ4L.js} +13 -12
- package/dist/{renderer-SYRH3B62.js → renderer-RBAMFLZQ.js} +14 -13
- package/dist/{renderer-YJVQT7QG.js → renderer-S6L3JR6C.js} +11 -11
- package/dist/{renderer-ONENGXFQ.js → renderer-SGRZKIMS.js} +14 -12
- package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
- package/dist/{renderer-66NCRXSC.js → renderer-TJPBVNVG.js} +14 -11
- package/dist/renderer-WK2BPXND.js +41 -0
- package/dist/renderer-ZG7WOBBN.js +30 -0
- package/dist/{renderer-N6PM5CSG.js → renderer-ZRPL5COW.js} +14 -13
- package/dist/{renderer-2V2XY2V7.js → renderer-ZTHXOBXW.js} +8 -8
- package/dist/{renderer-radial-4R7AKETK.js → renderer-radial-FC25BDCZ.js} +8 -8
- package/dist/{state-parser-EQBBEKHR.js → state-parser-LSFAJFMV.js} +6 -6
- package/dist/state-renderer-QTDBFB4F.js +43 -0
- package/dist/{themes-CbJL3w8L.d.ts → themes-DoLdhUXV.d.ts} +1 -1
- package/docs/ai-integration.md +4 -3
- package/docs/language-reference.md +100 -14
- package/gallery/fixtures/swot-relabel.dgmo +19 -0
- package/gallery/fixtures/swot-tags.dgmo +16 -0
- package/gallery/fixtures/swot.dgmo +13 -0
- package/package.json +1 -1
- package/dist/chunk-R2K5L4UA.js +0 -49
- package/dist/collapse-TCVK3RPO.js +0 -8
- package/dist/dgmo-router-EPBQKQW2.js +0 -100
- package/dist/dimensions-DBCRBZIU.js +0 -21
- package/dist/flowchart-renderer-PPS2GTTD.js +0 -40
- package/dist/layout-3J72UULM.js +0 -15
- package/dist/layout-IXQNVRBE.js +0 -15
- package/dist/layout-VDCJOZSH.js +0 -11
- package/dist/parser-HM6FEX5K.js +0 -14
- package/dist/renderer-2MCV75JQ.js +0 -41
- package/dist/renderer-5AEDVLAA.js +0 -31
- package/dist/renderer-7C76HP5W.js +0 -30
- package/dist/renderer-7RAMBMTH.js +0 -22
- package/dist/renderer-E3334XLT.js +0 -84
- package/dist/renderer-LFZKG2GR.js +0 -26
- package/dist/renderer-MZIWP55B.js +0 -28
- package/dist/renderer-N75E3UVY.js +0 -25
- package/dist/renderer-VNUDN6F5.js +0 -39
- package/dist/state-renderer-SOGZ2CNN.js +0 -42
|
@@ -16,10 +16,11 @@ import {
|
|
|
16
16
|
RACI_REGISTRY,
|
|
17
17
|
measureIndent,
|
|
18
18
|
parseFirstLine,
|
|
19
|
+
peelTrailingCollapsedFlag,
|
|
19
20
|
splitNameAndMeta,
|
|
20
21
|
tryParseSharedOption,
|
|
21
22
|
warnUnknownMetaKeys
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RFGQDIOI.js";
|
|
23
24
|
import {
|
|
24
25
|
resolveColorWithDiagnostic
|
|
25
26
|
} from "./chunk-3J7O3CU6.js";
|
|
@@ -285,7 +286,26 @@ function parseRaci(content, palette) {
|
|
|
285
286
|
continue;
|
|
286
287
|
}
|
|
287
288
|
let phaseColor;
|
|
288
|
-
|
|
289
|
+
let tail = (phaseMatch[2] ?? "").trim();
|
|
290
|
+
let collapsed = false;
|
|
291
|
+
const barePeel = peelTrailingCollapsedFlag(tail);
|
|
292
|
+
if (barePeel.collapsed) {
|
|
293
|
+
collapsed = true;
|
|
294
|
+
tail = barePeel.rest.trim();
|
|
295
|
+
}
|
|
296
|
+
if (/(?:^|[\s,])collapsed\s*:/.test(tail)) {
|
|
297
|
+
const split = splitNameAndMeta(
|
|
298
|
+
`_ ${tail}`,
|
|
299
|
+
RACI_REGISTRY,
|
|
300
|
+
/* @__PURE__ */ new Map(),
|
|
301
|
+
void 0,
|
|
302
|
+
result.diagnostics,
|
|
303
|
+
lineNumber
|
|
304
|
+
);
|
|
305
|
+
if ("collapsed" in split.meta) {
|
|
306
|
+
collapsed = split.meta["collapsed"].trim().toLowerCase() === "true";
|
|
307
|
+
}
|
|
308
|
+
}
|
|
289
309
|
const colorMatch = tail.match(PHASE_PALETTE_COLOR_RE);
|
|
290
310
|
if (colorMatch) {
|
|
291
311
|
phaseColor = resolveColorWithDiagnostic(
|
|
@@ -301,7 +321,8 @@ function parseRaci(content, palette) {
|
|
|
301
321
|
...phaseColor !== void 0 && { color: phaseColor },
|
|
302
322
|
tasks: [],
|
|
303
323
|
lineNumber,
|
|
304
|
-
endLineNumber: lineNumber
|
|
324
|
+
endLineNumber: lineNumber,
|
|
325
|
+
...collapsed && { collapsed: true }
|
|
305
326
|
};
|
|
306
327
|
result.phases.push(currentPhase);
|
|
307
328
|
continue;
|
|
@@ -1,59 +1,55 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutERDiagram
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IMBFWXHF.js";
|
|
4
4
|
import {
|
|
5
5
|
serializeSvg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YLKPRT6U.js";
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
10
10
|
import {
|
|
11
11
|
layoutInlineHeader
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-REKLKGR6.js";
|
|
13
13
|
import {
|
|
14
14
|
TITLE_FONT_SIZE,
|
|
15
15
|
TITLE_FONT_WEIGHT,
|
|
16
16
|
TITLE_Y
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GULGSH2Z.js";
|
|
18
18
|
import {
|
|
19
19
|
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
20
20
|
EDGE_STROKE_WIDTH,
|
|
21
21
|
NODE_STROKE_WIDTH
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WH6E6SHC.js";
|
|
23
23
|
import {
|
|
24
24
|
renderIntegratedLegend
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DFEVFLEG.js";
|
|
26
26
|
import {
|
|
27
27
|
getLegendExtent
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VVL2KKG4.js";
|
|
29
29
|
import {
|
|
30
30
|
parseERDiagram
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GMJBBFKC.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
renderNoteBadge,
|
|
36
|
-
renderNoteBox,
|
|
37
|
-
renderNoteConnector
|
|
38
|
-
} from "./chunk-67N26CER.js";
|
|
33
|
+
renderNodeNote
|
|
34
|
+
} from "./chunk-DA2GIHAY.js";
|
|
39
35
|
import {
|
|
40
36
|
FONT_FAMILY
|
|
41
37
|
} from "./chunk-ICLB27PZ.js";
|
|
42
38
|
import {
|
|
43
39
|
resolveTagColor,
|
|
44
40
|
tagAttrKey
|
|
45
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KW3CC7SB.js";
|
|
46
42
|
import {
|
|
47
43
|
fillModeFromOptions,
|
|
48
44
|
legendInlineRequested,
|
|
49
45
|
legendSuppressed
|
|
50
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RFGQDIOI.js";
|
|
51
47
|
import {
|
|
52
48
|
LEGEND_HEIGHT
|
|
53
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-OZXKW5NA.js";
|
|
54
50
|
import {
|
|
55
51
|
measureText
|
|
56
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-PU5X3P3T.js";
|
|
57
53
|
import {
|
|
58
54
|
contrastText,
|
|
59
55
|
getSeriesColors,
|
|
@@ -478,46 +474,13 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
478
474
|
}
|
|
479
475
|
}
|
|
480
476
|
if (node.note) {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
palette,
|
|
489
|
-
{
|
|
490
|
-
isDark,
|
|
491
|
-
...node.note.color && { color: node.note.color },
|
|
492
|
-
lineNumber: node.note.lineNumber,
|
|
493
|
-
endLineNumber: node.note.endLineNumber
|
|
494
|
-
}
|
|
495
|
-
);
|
|
496
|
-
} else {
|
|
497
|
-
const [cx1, cy1, cx2, cy2] = noteConnectorPoints(
|
|
498
|
-
{ width: w, height: h },
|
|
499
|
-
node.note
|
|
500
|
-
);
|
|
501
|
-
renderNoteConnector(nodeG, cx1, cy1, cx2, cy2, palette);
|
|
502
|
-
renderNoteBox(
|
|
503
|
-
nodeG,
|
|
504
|
-
{
|
|
505
|
-
x: node.note.x,
|
|
506
|
-
y: node.note.y,
|
|
507
|
-
width: node.note.width,
|
|
508
|
-
height: node.note.height
|
|
509
|
-
},
|
|
510
|
-
node.note.lines,
|
|
511
|
-
palette,
|
|
512
|
-
{
|
|
513
|
-
isDark,
|
|
514
|
-
...node.note.color && { color: node.note.color },
|
|
515
|
-
lineNumber: node.note.lineNumber,
|
|
516
|
-
endLineNumber: node.note.endLineNumber,
|
|
517
|
-
interactive: true
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
}
|
|
477
|
+
renderNodeNote(
|
|
478
|
+
nodeG,
|
|
479
|
+
{ width: w, height: h },
|
|
480
|
+
node.note,
|
|
481
|
+
palette,
|
|
482
|
+
isDark
|
|
483
|
+
);
|
|
521
484
|
}
|
|
522
485
|
}
|
|
523
486
|
if (hasTagLegend) {
|
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
import {
|
|
2
2
|
edgeSplinePath,
|
|
3
|
+
renderGraphTitle,
|
|
3
4
|
selfLoopArcPath
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F4DGHT3F.js";
|
|
5
6
|
import {
|
|
6
7
|
layoutGraph
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZXPSNBZC.js";
|
|
8
9
|
import {
|
|
9
10
|
appendArrowheadMarkers
|
|
10
11
|
} from "./chunk-XBJJP2HN.js";
|
|
11
12
|
import {
|
|
12
13
|
fitDiagramToCanvas
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K7RRXZHS.js";
|
|
14
15
|
import {
|
|
15
16
|
serializeSvg
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YLKPRT6U.js";
|
|
17
18
|
import {
|
|
18
19
|
ScaleContext
|
|
19
20
|
} from "./chunk-24YPR5EH.js";
|
|
21
|
+
import {
|
|
22
|
+
renderCollapseBar
|
|
23
|
+
} from "./chunk-42AZPI2W.js";
|
|
20
24
|
import {
|
|
21
25
|
layoutInlineHeader
|
|
22
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-REKLKGR6.js";
|
|
23
27
|
import {
|
|
24
28
|
TITLE_FONT_SIZE,
|
|
25
|
-
TITLE_FONT_WEIGHT,
|
|
26
29
|
TITLE_Y
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GULGSH2Z.js";
|
|
28
31
|
import {
|
|
29
32
|
ARROWHEAD_HEIGHT,
|
|
30
33
|
ARROWHEAD_WIDTH,
|
|
31
34
|
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
32
35
|
EDGE_STROKE_WIDTH,
|
|
33
36
|
NODE_STROKE_WIDTH
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-WH6E6SHC.js";
|
|
35
38
|
import {
|
|
36
39
|
renderIntegratedLegend
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-DFEVFLEG.js";
|
|
38
41
|
import {
|
|
39
42
|
getLegendExtent,
|
|
40
43
|
getMaxLegendReservedHeight
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VVL2KKG4.js";
|
|
42
45
|
import {
|
|
43
46
|
parseState
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-D6XR22KO.js";
|
|
45
48
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
renderNoteBadge,
|
|
49
|
-
renderNoteBox,
|
|
50
|
-
renderNoteConnector
|
|
51
|
-
} from "./chunk-67N26CER.js";
|
|
49
|
+
renderNodeNote
|
|
50
|
+
} from "./chunk-DA2GIHAY.js";
|
|
52
51
|
import {
|
|
53
52
|
FONT_FAMILY
|
|
54
53
|
} from "./chunk-ICLB27PZ.js";
|
|
@@ -57,15 +56,15 @@ import {
|
|
|
57
56
|
resolveGroupTagColor,
|
|
58
57
|
resolveTagColor,
|
|
59
58
|
tagAttrKey
|
|
60
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-KW3CC7SB.js";
|
|
61
60
|
import {
|
|
62
61
|
fillModeFromOptions,
|
|
63
62
|
legendInlineRequested,
|
|
64
63
|
legendSuppressed
|
|
65
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-RFGQDIOI.js";
|
|
66
65
|
import {
|
|
67
66
|
measureText
|
|
68
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PU5X3P3T.js";
|
|
69
68
|
import {
|
|
70
69
|
contrastText,
|
|
71
70
|
mix,
|
|
@@ -184,20 +183,16 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
184
183
|
colors: edgeColors
|
|
185
184
|
});
|
|
186
185
|
if (showTitle) {
|
|
187
|
-
|
|
188
|
-
"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
d3Selection.select(this).attr("opacity", 1);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
186
|
+
renderGraphTitle(svg, {
|
|
187
|
+
title: graph.title ?? "",
|
|
188
|
+
titleLineNumber: graph.titleLineNumber,
|
|
189
|
+
x: header.titleX,
|
|
190
|
+
y: sTitleY,
|
|
191
|
+
anchor: header.titleAnchor,
|
|
192
|
+
fontSize: sTitleFontSize,
|
|
193
|
+
color: palette.text,
|
|
194
|
+
onClickItem
|
|
195
|
+
});
|
|
201
196
|
}
|
|
202
197
|
if (hasLegend) {
|
|
203
198
|
const legendG = svg.append("g").attr(
|
|
@@ -238,6 +233,18 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
238
233
|
const groupWrapper = contentG.append("g").attr("class", "st-group-wrapper").attr("data-line-number", String(group.lineNumber)).attr("data-group-id", group.id).attr("data-group-toggle", group.id).attr("role", "button").attr("aria-expanded", "true").attr("aria-label", `Collapse group ${group.label}`).style("cursor", "pointer");
|
|
239
234
|
groupWrapper.append("rect").attr("x", gx).attr("y", gy).attr("width", gw).attr("height", gh).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "st-group");
|
|
240
235
|
groupWrapper.append("text").attr("x", gx + 8).attr("y", gy + sGroupLabelFontSize + 4).attr("fill", strokeColor).attr("font-size", sGroupLabelFontSize).attr("font-weight", "bold").attr("opacity", 0.7).attr("class", "st-group-label").text(group.label);
|
|
236
|
+
renderCollapseBar(groupWrapper, {
|
|
237
|
+
expanded: true,
|
|
238
|
+
x: gx,
|
|
239
|
+
y: gy,
|
|
240
|
+
width: gw,
|
|
241
|
+
height: gh,
|
|
242
|
+
rx: 6,
|
|
243
|
+
fill: strokeColor,
|
|
244
|
+
clipId: `st-group-clip-${group.id.replace(/[[\]:\s]/g, "")}`,
|
|
245
|
+
prefix: "state",
|
|
246
|
+
scale: ctx
|
|
247
|
+
});
|
|
241
248
|
}
|
|
242
249
|
const LABEL_PAD = 8;
|
|
243
250
|
const LABEL_H = 16;
|
|
@@ -354,11 +361,18 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
354
361
|
mode: fillMode
|
|
355
362
|
});
|
|
356
363
|
const strokeColor = groupColor;
|
|
357
|
-
const COLLAPSE_BAR_H = 6;
|
|
358
364
|
nodeG.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", sStateCornerRadius).attr("ry", sStateCornerRadius).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", sNodeStrokeWidth);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
365
|
+
renderCollapseBar(nodeG, {
|
|
366
|
+
x: -w / 2,
|
|
367
|
+
y: -h / 2,
|
|
368
|
+
width: w,
|
|
369
|
+
height: h,
|
|
370
|
+
rx: sStateCornerRadius,
|
|
371
|
+
fill: strokeColor,
|
|
372
|
+
clipId: `st-clip-${node.id.replace(/[[\]:\s]/g, "")}`,
|
|
373
|
+
prefix: "state",
|
|
374
|
+
scale: ctx
|
|
375
|
+
});
|
|
362
376
|
nodeG.append("text").attr("x", 0).attr("y", 0).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr(
|
|
363
377
|
"fill",
|
|
364
378
|
contrastText(
|
|
@@ -389,43 +403,7 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
389
403
|
).attr("font-size", sNodeFontSize).text(node.label);
|
|
390
404
|
}
|
|
391
405
|
if (hasNote && node.note) {
|
|
392
|
-
|
|
393
|
-
renderNoteBadge(
|
|
394
|
-
nodeG,
|
|
395
|
-
{
|
|
396
|
-
x: node.width / 2 - NOTE_BADGE_RADIUS - 3,
|
|
397
|
-
y: -node.height / 2 + NOTE_BADGE_RADIUS + 3
|
|
398
|
-
},
|
|
399
|
-
palette,
|
|
400
|
-
{
|
|
401
|
-
isDark,
|
|
402
|
-
...node.note.color && { color: node.note.color },
|
|
403
|
-
lineNumber: node.note.lineNumber,
|
|
404
|
-
endLineNumber: node.note.endLineNumber
|
|
405
|
-
}
|
|
406
|
-
);
|
|
407
|
-
} else {
|
|
408
|
-
const [cx1, cy1, cx2, cy2] = noteConnectorPoints(node, node.note);
|
|
409
|
-
renderNoteConnector(nodeG, cx1, cy1, cx2, cy2, palette);
|
|
410
|
-
renderNoteBox(
|
|
411
|
-
nodeG,
|
|
412
|
-
{
|
|
413
|
-
x: node.note.x,
|
|
414
|
-
y: node.note.y,
|
|
415
|
-
width: node.note.width,
|
|
416
|
-
height: node.note.height
|
|
417
|
-
},
|
|
418
|
-
node.note.lines,
|
|
419
|
-
palette,
|
|
420
|
-
{
|
|
421
|
-
isDark,
|
|
422
|
-
...node.note.color && { color: node.note.color },
|
|
423
|
-
lineNumber: node.note.lineNumber,
|
|
424
|
-
endLineNumber: node.note.endLineNumber,
|
|
425
|
-
interactive: true
|
|
426
|
-
}
|
|
427
|
-
);
|
|
428
|
-
}
|
|
406
|
+
renderNodeNote(nodeG, node, node.note, palette, isDark);
|
|
429
407
|
}
|
|
430
408
|
}
|
|
431
409
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TITLE_FONT_SIZE,
|
|
6
6
|
TITLE_FONT_WEIGHT,
|
|
7
7
|
TITLE_Y
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GULGSH2Z.js";
|
|
9
9
|
import {
|
|
10
10
|
wrapDescriptionLines
|
|
11
11
|
} from "./chunk-7WEYXYLC.js";
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
} from "./chunk-ICLB27PZ.js";
|
|
18
18
|
import {
|
|
19
19
|
fillModeFromOptions
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RFGQDIOI.js";
|
|
21
21
|
import {
|
|
22
22
|
CHAR_WIDTH_RATIO,
|
|
23
23
|
measureText
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PU5X3P3T.js";
|
|
25
25
|
import {
|
|
26
26
|
contrastText,
|
|
27
27
|
getSeriesColors,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
resolveNotes,
|
|
9
9
|
tryCollectNote
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UWWQECLC.js";
|
|
11
11
|
import {
|
|
12
12
|
displayName,
|
|
13
13
|
normalizeName
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
measureIndent,
|
|
20
20
|
parseFirstLine,
|
|
21
21
|
tryParseSharedOption
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RFGQDIOI.js";
|
|
23
23
|
import {
|
|
24
24
|
NAME_DIAGNOSTIC_CODES,
|
|
25
25
|
emit,
|
|
@@ -77,7 +77,8 @@ function cloneNode(node) {
|
|
|
77
77
|
parentId: node.parentId,
|
|
78
78
|
isContainer: node.isContainer,
|
|
79
79
|
lineNumber: node.lineNumber,
|
|
80
|
-
...node.color !== void 0 && { color: node.color }
|
|
80
|
+
...node.color !== void 0 && { color: node.color },
|
|
81
|
+
...node.collapsed !== void 0 && { collapsed: node.collapsed }
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
84
|
var SITEMAP_SHAPE = {
|
|
@@ -98,6 +99,17 @@ var SITEMAP_EDGE_SHAPE = {
|
|
|
98
99
|
targetId
|
|
99
100
|
})
|
|
100
101
|
};
|
|
102
|
+
function unionCollapsedSitemapNodes(parsed, interactive) {
|
|
103
|
+
const ids = new Set(interactive ?? []);
|
|
104
|
+
const walk = (nodes) => {
|
|
105
|
+
for (const node of nodes) {
|
|
106
|
+
if (node.collapsed) ids.add(node.id);
|
|
107
|
+
walk(node.children);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
walk(parsed.roots);
|
|
111
|
+
return ids;
|
|
112
|
+
}
|
|
101
113
|
function collapseSitemapTree(original, collapsedIds) {
|
|
102
114
|
if (collapsedIds.size === 0) {
|
|
103
115
|
return { parsed: original, hiddenCounts: /* @__PURE__ */ new Map() };
|
|
@@ -122,5 +134,6 @@ function collapseSitemapTree(original, collapsedIds) {
|
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
export {
|
|
137
|
+
unionCollapsedSitemapNodes,
|
|
125
138
|
collapseSitemapTree
|
|
126
139
|
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseMindmap
|
|
3
|
+
} from "./chunk-KTGJQJB3.js";
|
|
4
|
+
import {
|
|
5
|
+
parseDgmoChartType
|
|
6
|
+
} from "./chunk-3EDV56HL.js";
|
|
7
|
+
import {
|
|
8
|
+
parseSitemap
|
|
9
|
+
} from "./chunk-KMB754DO.js";
|
|
10
|
+
import {
|
|
11
|
+
parseOrg
|
|
12
|
+
} from "./chunk-FDVUD3PR.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/collapse-marker.ts
|
|
15
|
+
var MARKER_VALUE = /collapsed:\s*\S+/;
|
|
16
|
+
var BARE_FLAG = /(?:\s*,)?[ \t]+collapsed\s*$/;
|
|
17
|
+
var META_KEY = /(?:^|[\s,|])[\w-]+\s*:/;
|
|
18
|
+
var hasBareFlag = (line, label) => line.trim() !== label && BARE_FLAG.test(line);
|
|
19
|
+
function applyCollapsedMarker(line, label, collapse) {
|
|
20
|
+
if (collapse) {
|
|
21
|
+
if (MARKER_VALUE.test(line)) {
|
|
22
|
+
return line.replace(MARKER_VALUE, "collapsed: true");
|
|
23
|
+
}
|
|
24
|
+
if (hasBareFlag(line, label)) return line;
|
|
25
|
+
const stripped = line.replace(/\s+$/, "");
|
|
26
|
+
const body = line.trimStart();
|
|
27
|
+
const hasMeta = body.startsWith(label) && META_KEY.test(body.slice(label.length));
|
|
28
|
+
return hasMeta ? `${stripped}, collapsed: true` : `${stripped} collapsed: true`;
|
|
29
|
+
}
|
|
30
|
+
const expanded = line.replace(/\s*,\s*collapsed:\s*[^,\s]+/, "").replace(/\bcollapsed:\s*[^,\s]+\s*,\s*/, "").replace(/\s+collapsed:\s*[^,\s]+/, "").replace(/\s+$/, "");
|
|
31
|
+
return hasBareFlag(expanded, label) ? expanded.replace(BARE_FLAG, "") : expanded;
|
|
32
|
+
}
|
|
33
|
+
function applyCollapsedMarkerAtLine(text, lineNumber, label, collapse) {
|
|
34
|
+
const lines = text.split("\n");
|
|
35
|
+
const idx = lineNumber - 1;
|
|
36
|
+
const target = lines[idx];
|
|
37
|
+
if (target === void 0) return text;
|
|
38
|
+
lines[idx] = applyCollapsedMarker(target, label, collapse);
|
|
39
|
+
return lines.join("\n");
|
|
40
|
+
}
|
|
41
|
+
function applyGroupHeaderCollapsedMarkerAtLine(text, lineNumber, collapse) {
|
|
42
|
+
const lines = text.split("\n");
|
|
43
|
+
const idx = lineNumber - 1;
|
|
44
|
+
const target = lines[idx];
|
|
45
|
+
if (target === void 0) return text;
|
|
46
|
+
const close = target.indexOf("]");
|
|
47
|
+
if (close === -1) return text;
|
|
48
|
+
const header = target.slice(0, close + 1).trimStart();
|
|
49
|
+
lines[idx] = applyCollapsedMarker(target, header, collapse);
|
|
50
|
+
return lines.join("\n");
|
|
51
|
+
}
|
|
52
|
+
var INDENT = (s) => s.length - s.trimStart().length;
|
|
53
|
+
var COLLAPSED_LINE = /^\s*collapsed:\s*\S+\s*$/;
|
|
54
|
+
function applyIndentedGroupCollapsedMarkerAtLine(text, headerLineNumber, collapse) {
|
|
55
|
+
const lines = text.split("\n");
|
|
56
|
+
const hIdx = headerLineNumber - 1;
|
|
57
|
+
const header = lines[hIdx];
|
|
58
|
+
if (header === void 0) return text;
|
|
59
|
+
const headerIndent = INDENT(header);
|
|
60
|
+
let blockEnd = lines.length;
|
|
61
|
+
let childIndent = null;
|
|
62
|
+
for (let i = hIdx + 1; i < lines.length; i++) {
|
|
63
|
+
const line = lines[i];
|
|
64
|
+
if (line.trim() === "") continue;
|
|
65
|
+
const ind = INDENT(line);
|
|
66
|
+
if (ind <= headerIndent) {
|
|
67
|
+
blockEnd = i;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
childIndent ??= ind;
|
|
71
|
+
}
|
|
72
|
+
const indentStr = " ".repeat(childIndent ?? headerIndent + 2);
|
|
73
|
+
if (collapse) {
|
|
74
|
+
for (let i = hIdx + 1; i < blockEnd; i++) {
|
|
75
|
+
if (COLLAPSED_LINE.test(lines[i])) {
|
|
76
|
+
lines[i] = `${indentStr}collapsed: true`;
|
|
77
|
+
return lines.join("\n");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
lines.splice(hIdx + 1, 0, `${indentStr}collapsed: true`);
|
|
81
|
+
return lines.join("\n");
|
|
82
|
+
}
|
|
83
|
+
for (let i = hIdx + 1; i < blockEnd; i++) {
|
|
84
|
+
const l = lines[i];
|
|
85
|
+
if (INDENT(l) === childIndent && COLLAPSED_LINE.test(l)) {
|
|
86
|
+
lines.splice(i, 1);
|
|
87
|
+
return lines.join("\n");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return text;
|
|
91
|
+
}
|
|
92
|
+
function applyNoteCollapsedMarkerAtLine(text, lineNumber, collapse) {
|
|
93
|
+
const lines = text.split("\n");
|
|
94
|
+
const idx = lineNumber - 1;
|
|
95
|
+
const target = lines[idx];
|
|
96
|
+
if (target === void 0) return text;
|
|
97
|
+
const head = target.trim().replace(/(?:\s*,)?\s+collapsed:\s*\S+$/, "").replace(BARE_FLAG, "");
|
|
98
|
+
if (!/^note(\s|$)/i.test(head)) return text;
|
|
99
|
+
lines[idx] = applyCollapsedMarker(target, head, collapse);
|
|
100
|
+
return lines.join("\n");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// src/utils/fold-at-line.ts
|
|
104
|
+
var NODE_TREES = {
|
|
105
|
+
mindmap: (s) => parseMindmap(s).roots,
|
|
106
|
+
org: (s) => parseOrg(s).roots,
|
|
107
|
+
sitemap: (s) => parseSitemap(s).roots
|
|
108
|
+
};
|
|
109
|
+
var GROUP_HEADER_TYPES = /* @__PURE__ */ new Set([
|
|
110
|
+
"block",
|
|
111
|
+
"boxes-and-lines",
|
|
112
|
+
"event-line",
|
|
113
|
+
"gantt",
|
|
114
|
+
"infra",
|
|
115
|
+
"journey-map",
|
|
116
|
+
"kanban",
|
|
117
|
+
"org",
|
|
118
|
+
"pert",
|
|
119
|
+
"raci",
|
|
120
|
+
"sequence",
|
|
121
|
+
"sitemap",
|
|
122
|
+
"state",
|
|
123
|
+
"timeline"
|
|
124
|
+
]);
|
|
125
|
+
var GROUP_HEAD = /^(?:[+-]\S*\s+)?\[/;
|
|
126
|
+
var SECTION_LINE = /^==\s+\S/;
|
|
127
|
+
var SECTION_MARKER = /(?:\s*,)?\s+collapsed(?::\s*\S+)?\s*$/;
|
|
128
|
+
function labelAtLine(nodes, line) {
|
|
129
|
+
for (const n of nodes) {
|
|
130
|
+
if (n.lineNumber === line) return n.label;
|
|
131
|
+
const inner = labelAtLine(n.children, line);
|
|
132
|
+
if (inner !== null) return inner;
|
|
133
|
+
}
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
function foldSection(source, line, text, collapse) {
|
|
137
|
+
const label = text.trim().replace(SECTION_MARKER, "");
|
|
138
|
+
return applyCollapsedMarkerAtLine(source, line, label, collapse);
|
|
139
|
+
}
|
|
140
|
+
var INDENTED_MARKER_TYPES = /* @__PURE__ */ new Set([
|
|
141
|
+
"infra",
|
|
142
|
+
"org",
|
|
143
|
+
"sitemap"
|
|
144
|
+
]);
|
|
145
|
+
function foldGroupHeader(source, line, collapse) {
|
|
146
|
+
return applyGroupHeaderCollapsedMarkerAtLine(source, line, collapse);
|
|
147
|
+
}
|
|
148
|
+
function foldAtLine(source, line, collapse) {
|
|
149
|
+
if (!Number.isInteger(line) || line < 1) return null;
|
|
150
|
+
const chartType = parseDgmoChartType(source);
|
|
151
|
+
if (chartType === null) return null;
|
|
152
|
+
const text = source.split("\n")[line - 1];
|
|
153
|
+
if (text === void 0) return null;
|
|
154
|
+
const trimmed = text.trim();
|
|
155
|
+
let next = null;
|
|
156
|
+
if (GROUP_HEAD.test(trimmed)) {
|
|
157
|
+
if (GROUP_HEADER_TYPES.has(chartType)) {
|
|
158
|
+
next = foldGroupHeader(source, line, collapse);
|
|
159
|
+
}
|
|
160
|
+
} else if (chartType === "sequence") {
|
|
161
|
+
if (SECTION_LINE.test(trimmed)) {
|
|
162
|
+
next = foldSection(source, line, text, collapse);
|
|
163
|
+
} else if (/^note(\s|$)/i.test(trimmed)) {
|
|
164
|
+
next = applyNoteCollapsedMarkerAtLine(source, line, collapse);
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
const tree = NODE_TREES[chartType];
|
|
168
|
+
const label = tree ? labelAtLine(tree(source), line) : null;
|
|
169
|
+
if (label !== null) {
|
|
170
|
+
next = applyCollapsedMarkerAtLine(source, line, label, collapse);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (!collapse && INDENTED_MARKER_TYPES.has(chartType)) {
|
|
174
|
+
const base = next ?? source;
|
|
175
|
+
const lifted = applyIndentedGroupCollapsedMarkerAtLine(base, line, false);
|
|
176
|
+
if (lifted !== base) next = lifted;
|
|
177
|
+
}
|
|
178
|
+
return next === null || next === source ? null : next;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
applyCollapsedMarker,
|
|
183
|
+
applyCollapsedMarkerAtLine,
|
|
184
|
+
applyGroupHeaderCollapsedMarkerAtLine,
|
|
185
|
+
applyIndentedGroupCollapsedMarkerAtLine,
|
|
186
|
+
applyNoteCollapsedMarkerAtLine,
|
|
187
|
+
foldAtLine
|
|
188
|
+
};
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
} from "./chunk-CYTFO2LF.js";
|
|
14
14
|
import {
|
|
15
15
|
matchTagBlockHeading
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KW3CC7SB.js";
|
|
17
17
|
import {
|
|
18
18
|
parseFirstLine,
|
|
19
19
|
recognizeGlobalBoolean
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RFGQDIOI.js";
|
|
21
21
|
import {
|
|
22
22
|
makeDgmoError,
|
|
23
23
|
makeFail,
|