@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
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
tagAttrKey,
|
|
14
14
|
validateTagGroupNames,
|
|
15
15
|
validateTagValues
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KW3CC7SB.js";
|
|
17
17
|
import {
|
|
18
18
|
ALL_CHART_TYPES,
|
|
19
19
|
AliasRegistry,
|
|
@@ -23,11 +23,12 @@ import {
|
|
|
23
23
|
measureIndent,
|
|
24
24
|
parseFirstLine,
|
|
25
25
|
peelQuotedName,
|
|
26
|
+
peelTrailingCollapsedFlag,
|
|
26
27
|
splitNameAndMeta,
|
|
27
28
|
tryParseSharedOption,
|
|
28
29
|
warnUnknownMetaKeys,
|
|
29
30
|
withTagAliases
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RFGQDIOI.js";
|
|
31
32
|
import {
|
|
32
33
|
formatDgmoError,
|
|
33
34
|
makeDgmoError,
|
|
@@ -202,7 +203,8 @@ function parseSitemap(content, palette) {
|
|
|
202
203
|
}
|
|
203
204
|
currentTagGroup = null;
|
|
204
205
|
}
|
|
205
|
-
if (!contentStarted && !currentTagGroup && measureIndent(line) === 0 && !trimmed.includes("|") && !trimmed.includes("->") && !trimmed.includes(":")
|
|
206
|
+
if (!contentStarted && !currentTagGroup && measureIndent(line) === 0 && !trimmed.includes("|") && !trimmed.includes("->") && !trimmed.includes(":") && // `Home collapsed` is a page carrying the bare fold flag, not an option.
|
|
207
|
+
!/[ \t]collapsed$/.test(trimmed)) {
|
|
206
208
|
const dirBool = trimmed.match(/^direction-(lr|tb)$/i);
|
|
207
209
|
if (dirBool) {
|
|
208
210
|
result.direction = dirBool[1].toUpperCase();
|
|
@@ -260,7 +262,10 @@ function parseSitemap(content, palette) {
|
|
|
260
262
|
/^(.*?)\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*$/
|
|
261
263
|
);
|
|
262
264
|
const label = peelQuotedName(asMatch ? asMatch[1].trim() : rawLabel);
|
|
263
|
-
const
|
|
265
|
+
const barePeel = peelTrailingCollapsedFlag(
|
|
266
|
+
(containerMatch[2] ?? "").trim()
|
|
267
|
+
);
|
|
268
|
+
const tail = barePeel.rest.trim();
|
|
264
269
|
const containerMetadata = {};
|
|
265
270
|
if (tail.length > 0) {
|
|
266
271
|
Object.assign(
|
|
@@ -268,6 +273,10 @@ function parseSitemap(content, palette) {
|
|
|
268
273
|
parseSitemapMetaTail(tail, metaAliasMap)
|
|
269
274
|
);
|
|
270
275
|
}
|
|
276
|
+
const containerCollapsed = liftCollapsed(
|
|
277
|
+
containerMetadata,
|
|
278
|
+
barePeel.collapsed
|
|
279
|
+
);
|
|
271
280
|
containerCounter++;
|
|
272
281
|
const containerId = `container-${containerCounter}`;
|
|
273
282
|
if (asMatch) nameAliasMap.declare(asMatch[2], containerId, lineNumber);
|
|
@@ -279,7 +288,10 @@ function parseSitemap(content, palette) {
|
|
|
279
288
|
children: [],
|
|
280
289
|
parentId: null,
|
|
281
290
|
isContainer: true,
|
|
282
|
-
lineNumber
|
|
291
|
+
lineNumber,
|
|
292
|
+
...containerCollapsed !== void 0 && {
|
|
293
|
+
collapsed: containerCollapsed
|
|
294
|
+
}
|
|
283
295
|
};
|
|
284
296
|
attachNode(node, indent, indentStack, result);
|
|
285
297
|
const key = normalizeName(label);
|
|
@@ -294,6 +306,8 @@ function parseSitemap(content, palette) {
|
|
|
294
306
|
lineNumber,
|
|
295
307
|
"Metadata 'key: value' must be indented under a page \u2014 no page precedes it."
|
|
296
308
|
);
|
|
309
|
+
} else if (key === "collapsed") {
|
|
310
|
+
parent.collapsed = value.toLowerCase() === "true";
|
|
297
311
|
} else {
|
|
298
312
|
parent.metadata = { ...parent.metadata, [key]: value };
|
|
299
313
|
}
|
|
@@ -426,8 +440,10 @@ function parseNodeLabel(trimmed, lineNumber, _palette, counter, metaAliasMap = /
|
|
|
426
440
|
new Set(metaAliasMap.keys())
|
|
427
441
|
);
|
|
428
442
|
const id = `node-${counter}`;
|
|
443
|
+
const barePeel = peelTrailingCollapsedFlag(trimmed);
|
|
444
|
+
const bareCollapsed = barePeel.collapsed && barePeel.rest.trim() !== "";
|
|
429
445
|
const split = splitNameAndMeta(
|
|
430
|
-
trimmed,
|
|
446
|
+
bareCollapsed ? barePeel.rest : trimmed,
|
|
431
447
|
registry,
|
|
432
448
|
metaAliasMap,
|
|
433
449
|
void 0,
|
|
@@ -456,10 +472,12 @@ function parseNodeLabel(trimmed, lineNumber, _palette, counter, metaAliasMap = /
|
|
|
456
472
|
}
|
|
457
473
|
delete metadata["description"];
|
|
458
474
|
}
|
|
475
|
+
const collapsed = liftCollapsed(metadata, bareCollapsed);
|
|
459
476
|
return {
|
|
460
477
|
id,
|
|
461
478
|
label,
|
|
462
479
|
metadata,
|
|
480
|
+
...collapsed !== void 0 && { collapsed },
|
|
463
481
|
...description !== void 0 && { description },
|
|
464
482
|
children: [],
|
|
465
483
|
parentId: null,
|
|
@@ -467,6 +485,15 @@ function parseNodeLabel(trimmed, lineNumber, _palette, counter, metaAliasMap = /
|
|
|
467
485
|
lineNumber
|
|
468
486
|
};
|
|
469
487
|
}
|
|
488
|
+
function liftCollapsed(metadata, bare) {
|
|
489
|
+
let collapsed = bare ? true : void 0;
|
|
490
|
+
const raw = metadata["collapsed"];
|
|
491
|
+
if (raw !== void 0) {
|
|
492
|
+
collapsed ??= raw.toLowerCase() === "true";
|
|
493
|
+
delete metadata["collapsed"];
|
|
494
|
+
}
|
|
495
|
+
return collapsed;
|
|
496
|
+
}
|
|
470
497
|
function parseSitemapMetaTail(tail, metaAliasMap) {
|
|
471
498
|
const trimmed = tail.trim();
|
|
472
499
|
if (!trimmed?.includes(":")) return {};
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeName
|
|
3
|
+
} from "./chunk-NOTA6TEI.js";
|
|
4
|
+
import {
|
|
5
|
+
AUTO_TAG_COLOR_SENTINEL,
|
|
6
|
+
activeTagNoMatchMessage,
|
|
7
|
+
finalizeAutoTagColors,
|
|
8
|
+
matchTagBlockHeading,
|
|
9
|
+
stripDefaultModifier,
|
|
10
|
+
tagAttrKey,
|
|
11
|
+
validateTagGroupNames
|
|
12
|
+
} from "./chunk-KW3CC7SB.js";
|
|
13
|
+
import {
|
|
14
|
+
SWOT_REGISTRY,
|
|
15
|
+
extractColor,
|
|
16
|
+
measureIndent,
|
|
17
|
+
parseFirstLine,
|
|
18
|
+
peelQuotedName,
|
|
19
|
+
splitNameAndMeta,
|
|
20
|
+
warnUnknownMetaKeys,
|
|
21
|
+
withTagAliases
|
|
22
|
+
} from "./chunk-RFGQDIOI.js";
|
|
23
|
+
import {
|
|
24
|
+
resolveColorWithDiagnostic
|
|
25
|
+
} from "./chunk-3J7O3CU6.js";
|
|
26
|
+
import {
|
|
27
|
+
emit,
|
|
28
|
+
formatDgmoError,
|
|
29
|
+
makeDgmoError,
|
|
30
|
+
makeFail,
|
|
31
|
+
suggest
|
|
32
|
+
} from "./chunk-BYU54C3S.js";
|
|
33
|
+
|
|
34
|
+
// src/swot/diagnostics.ts
|
|
35
|
+
var SWOT_DX = {
|
|
36
|
+
UNKNOWN_SECTION: {
|
|
37
|
+
code: "E_SWOT_UNKNOWN_SECTION",
|
|
38
|
+
severity: "error",
|
|
39
|
+
chartType: "swot",
|
|
40
|
+
title: "Unknown section",
|
|
41
|
+
message: (p) => `Unknown section '${p.word ?? "word"}'. Did you mean '${p.nearest ?? "strengths"}'?`,
|
|
42
|
+
hint: "A line at indent 0 opens one of: strengths, weaknesses, opportunities, threats. There are no brackets.",
|
|
43
|
+
example: `swot
|
|
44
|
+
|
|
45
|
+
[Strengths]
|
|
46
|
+
Loyal crew`
|
|
47
|
+
},
|
|
48
|
+
DUPLICATE_SECTION: {
|
|
49
|
+
code: "E_SWOT_DUPLICATE_SECTION",
|
|
50
|
+
severity: "error",
|
|
51
|
+
chartType: "swot",
|
|
52
|
+
title: "Duplicate section",
|
|
53
|
+
message: (p) => `Section '${p.section ?? "strengths"}' appears more than once.`,
|
|
54
|
+
hint: "Merge the items under one section line.",
|
|
55
|
+
example: `swot
|
|
56
|
+
|
|
57
|
+
strengths
|
|
58
|
+
Loyal crew
|
|
59
|
+
strengths
|
|
60
|
+
Fast ship`
|
|
61
|
+
},
|
|
62
|
+
EMPTY_SECTION: {
|
|
63
|
+
code: "W_SWOT_EMPTY_SECTION",
|
|
64
|
+
severity: "warning",
|
|
65
|
+
chartType: "swot",
|
|
66
|
+
title: "Empty section",
|
|
67
|
+
message: (p) => `Section '${p.section ?? "threats"}' has no items, so its panel says "None listed".`,
|
|
68
|
+
hint: "Indent at least one item under the section line.",
|
|
69
|
+
example: `swot
|
|
70
|
+
|
|
71
|
+
strengths
|
|
72
|
+
Loyal crew
|
|
73
|
+
weaknesses
|
|
74
|
+
Old sails
|
|
75
|
+
opportunities
|
|
76
|
+
New trade route`
|
|
77
|
+
},
|
|
78
|
+
ORPHAN_ITEM: {
|
|
79
|
+
code: "E_SWOT_ORPHAN_ITEM",
|
|
80
|
+
severity: "error",
|
|
81
|
+
chartType: "swot",
|
|
82
|
+
title: "Item before a section",
|
|
83
|
+
message: (p) => `Item '${p.item ?? "item"}' comes before any section.`,
|
|
84
|
+
hint: "Put a section line above it: strengths, weaknesses, opportunities or threats.",
|
|
85
|
+
example: `swot
|
|
86
|
+
|
|
87
|
+
Loyal crew
|
|
88
|
+
strengths
|
|
89
|
+
Fast ship`
|
|
90
|
+
},
|
|
91
|
+
TOO_DEEP: {
|
|
92
|
+
code: "E_SWOT_TOO_DEEP",
|
|
93
|
+
severity: "error",
|
|
94
|
+
chartType: "swot",
|
|
95
|
+
title: "Nested too deep",
|
|
96
|
+
message: (p) => `'${p.item ?? "line"}' is nested too deep. An item takes one detail level.`,
|
|
97
|
+
hint: "Move the line up to the detail level, or make it an item of its own.",
|
|
98
|
+
example: `swot
|
|
99
|
+
|
|
100
|
+
strengths
|
|
101
|
+
Loyal crew
|
|
102
|
+
Sworn in
|
|
103
|
+
At Tortuga`
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var SWOT_DIAGNOSTICS = Object.values(SWOT_DX);
|
|
107
|
+
|
|
108
|
+
// src/swot/parser.ts
|
|
109
|
+
var SECTION_DEFAULTS = [
|
|
110
|
+
{ key: "strengths", label: "Strengths", color: "green" },
|
|
111
|
+
{ key: "weaknesses", label: "Weaknesses", color: "yellow" },
|
|
112
|
+
{ key: "opportunities", label: "Opportunities", color: "blue" },
|
|
113
|
+
{ key: "threats", label: "Threats", color: "red" }
|
|
114
|
+
];
|
|
115
|
+
var SECTION_KEYS = SECTION_DEFAULTS.map((s) => s.key);
|
|
116
|
+
var VALUE_OPTIONS = /* @__PURE__ */ new Set(["active-tag", "palette"]);
|
|
117
|
+
var BOOLEAN_OPTIONS = /* @__PURE__ */ new Set([
|
|
118
|
+
"no-axes",
|
|
119
|
+
"no-tint-items",
|
|
120
|
+
"no-title",
|
|
121
|
+
"no-legend",
|
|
122
|
+
"legend-inline"
|
|
123
|
+
]);
|
|
124
|
+
var DEFAULT_X_LABELS = ["Helpful", "Harmful"];
|
|
125
|
+
var DEFAULT_Y_LABELS = ["Internal", "External"];
|
|
126
|
+
function editDistance(a, b) {
|
|
127
|
+
let row = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
128
|
+
for (let i = 1; i <= a.length; i++) {
|
|
129
|
+
const next = [i];
|
|
130
|
+
for (let j = 1; j <= b.length; j++) {
|
|
131
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
132
|
+
next.push(Math.min(row[j] + 1, next[j - 1] + 1, row[j - 1] + cost));
|
|
133
|
+
}
|
|
134
|
+
row = next;
|
|
135
|
+
}
|
|
136
|
+
return row[b.length];
|
|
137
|
+
}
|
|
138
|
+
function nearestSection(word) {
|
|
139
|
+
const clean = word.toLowerCase().replace(/[^a-z]/g, "");
|
|
140
|
+
let best = SECTION_KEYS[0];
|
|
141
|
+
let bestDistance = Number.POSITIVE_INFINITY;
|
|
142
|
+
for (const key of SECTION_KEYS) {
|
|
143
|
+
const distance = editDistance(clean, key);
|
|
144
|
+
if (distance < bestDistance) {
|
|
145
|
+
best = key;
|
|
146
|
+
bestDistance = distance;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return best;
|
|
150
|
+
}
|
|
151
|
+
function parseItemLine(trimmed, lineNumber, counter, metaAliasMap, diagnostics) {
|
|
152
|
+
const text = trimmed.startsWith("- ") ? trimmed.slice(2).trim() : trimmed;
|
|
153
|
+
const registry = withTagAliases(SWOT_REGISTRY, new Set(metaAliasMap.keys()));
|
|
154
|
+
const split = splitNameAndMeta(
|
|
155
|
+
text,
|
|
156
|
+
registry,
|
|
157
|
+
metaAliasMap,
|
|
158
|
+
void 0,
|
|
159
|
+
diagnostics,
|
|
160
|
+
lineNumber,
|
|
161
|
+
{ peelAlias: false }
|
|
162
|
+
);
|
|
163
|
+
warnUnknownMetaKeys(
|
|
164
|
+
split.meta,
|
|
165
|
+
registry,
|
|
166
|
+
(msg) => diagnostics.push(makeDgmoError(lineNumber, msg, "warning")),
|
|
167
|
+
split.name
|
|
168
|
+
);
|
|
169
|
+
const name = peelQuotedName(split.name);
|
|
170
|
+
const title = split.color !== void 0 ? `${name} ${split.color}` : name;
|
|
171
|
+
return {
|
|
172
|
+
id: `item-${counter}`,
|
|
173
|
+
title,
|
|
174
|
+
tags: { ...split.meta },
|
|
175
|
+
details: [],
|
|
176
|
+
lineNumber,
|
|
177
|
+
endLineNumber: lineNumber
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function parseSwot(content, palette) {
|
|
181
|
+
const options = {};
|
|
182
|
+
const sectionsByKey = /* @__PURE__ */ new Map();
|
|
183
|
+
const result = {
|
|
184
|
+
type: "swot",
|
|
185
|
+
sections: [],
|
|
186
|
+
tagGroups: [],
|
|
187
|
+
options,
|
|
188
|
+
xLabels: DEFAULT_X_LABELS,
|
|
189
|
+
yLabels: DEFAULT_Y_LABELS,
|
|
190
|
+
diagnostics: [],
|
|
191
|
+
error: null
|
|
192
|
+
};
|
|
193
|
+
const diagnostics = result.diagnostics;
|
|
194
|
+
const fail = makeFail(result);
|
|
195
|
+
const report = (spec, line, params) => {
|
|
196
|
+
const diag = emit(spec, line, params);
|
|
197
|
+
diagnostics.push(diag);
|
|
198
|
+
if (diag.severity === "error") result.error ??= formatDgmoError(diag);
|
|
199
|
+
};
|
|
200
|
+
const warn = (line, message, code) => {
|
|
201
|
+
diagnostics.push(makeDgmoError(line, message, "warning", code));
|
|
202
|
+
};
|
|
203
|
+
const defaultColor = (word, line) => resolveColorWithDiagnostic(word, line, diagnostics, palette) ?? word;
|
|
204
|
+
if (!content?.trim()) {
|
|
205
|
+
return fail(0, "No content provided");
|
|
206
|
+
}
|
|
207
|
+
const lines = content.split("\n");
|
|
208
|
+
const metaAliasMap = /* @__PURE__ */ new Map();
|
|
209
|
+
const tagGroups = result.tagGroups;
|
|
210
|
+
let firstLineSeen = false;
|
|
211
|
+
let contentStarted = false;
|
|
212
|
+
let activeTagLine = 0;
|
|
213
|
+
let currentTagGroup = null;
|
|
214
|
+
let currentSection = null;
|
|
215
|
+
let currentItem = null;
|
|
216
|
+
let itemIndent = 0;
|
|
217
|
+
let detailIndent = null;
|
|
218
|
+
let itemCounter = 0;
|
|
219
|
+
for (let i = 0; i < lines.length; i++) {
|
|
220
|
+
const line = lines[i];
|
|
221
|
+
const lineNumber = i + 1;
|
|
222
|
+
const trimmed = line.trim();
|
|
223
|
+
if (!trimmed) {
|
|
224
|
+
currentTagGroup = null;
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (trimmed.startsWith("//")) continue;
|
|
228
|
+
if (!firstLineSeen) {
|
|
229
|
+
firstLineSeen = true;
|
|
230
|
+
const firstLine = parseFirstLine(trimmed);
|
|
231
|
+
if (firstLine) {
|
|
232
|
+
if (firstLine.chartType !== "swot") {
|
|
233
|
+
let msg = `Expected chart type "swot", got "${firstLine.chartType}"`;
|
|
234
|
+
const hint = suggest(firstLine.chartType, ["swot"]);
|
|
235
|
+
if (hint) msg += `. ${hint}`;
|
|
236
|
+
return fail(lineNumber, msg);
|
|
237
|
+
}
|
|
238
|
+
if (firstLine.title) {
|
|
239
|
+
result.title = firstLine.title;
|
|
240
|
+
result.titleLineNumber = lineNumber;
|
|
241
|
+
}
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const indent = measureIndent(line);
|
|
246
|
+
if (currentTagGroup && !contentStarted) {
|
|
247
|
+
if (indent > 0) {
|
|
248
|
+
const { text, isDefault } = stripDefaultModifier(trimmed);
|
|
249
|
+
const { label, color } = extractColor(
|
|
250
|
+
text,
|
|
251
|
+
palette,
|
|
252
|
+
diagnostics,
|
|
253
|
+
lineNumber
|
|
254
|
+
);
|
|
255
|
+
if (isDefault || currentTagGroup.entries.length === 0) {
|
|
256
|
+
currentTagGroup.defaultValue = label;
|
|
257
|
+
}
|
|
258
|
+
currentTagGroup.entries.push({
|
|
259
|
+
value: label,
|
|
260
|
+
color: color ?? AUTO_TAG_COLOR_SENTINEL,
|
|
261
|
+
lineNumber
|
|
262
|
+
});
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
currentTagGroup = null;
|
|
266
|
+
}
|
|
267
|
+
if (indent === 0) {
|
|
268
|
+
if (!contentStarted) {
|
|
269
|
+
const heading = matchTagBlockHeading(trimmed);
|
|
270
|
+
if (heading) {
|
|
271
|
+
currentTagGroup = {
|
|
272
|
+
name: heading.name,
|
|
273
|
+
...heading.alias !== void 0 && { alias: heading.alias },
|
|
274
|
+
entries: [],
|
|
275
|
+
lineNumber
|
|
276
|
+
};
|
|
277
|
+
if (heading.alias) {
|
|
278
|
+
metaAliasMap.set(
|
|
279
|
+
normalizeName(heading.alias),
|
|
280
|
+
tagAttrKey(heading.name)
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
metaAliasMap.set(
|
|
284
|
+
normalizeName(heading.name),
|
|
285
|
+
tagAttrKey(heading.name)
|
|
286
|
+
);
|
|
287
|
+
tagGroups.push(currentTagGroup);
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const space = trimmed.search(/\s/);
|
|
292
|
+
const word = space < 0 ? trimmed : trimmed.slice(0, space);
|
|
293
|
+
const rest = space < 0 ? "" : trimmed.slice(space + 1).trim();
|
|
294
|
+
const keyword = word.toLowerCase();
|
|
295
|
+
if (SECTION_KEYS.includes(keyword)) {
|
|
296
|
+
contentStarted = true;
|
|
297
|
+
currentItem = null;
|
|
298
|
+
const key = keyword;
|
|
299
|
+
const existing = sectionsByKey.get(key);
|
|
300
|
+
if (existing) {
|
|
301
|
+
report(SWOT_DX.DUPLICATE_SECTION, lineNumber, { section: keyword });
|
|
302
|
+
currentSection = existing;
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
const { label, color } = extractColor(
|
|
306
|
+
`${keyword} ${rest}`.trim(),
|
|
307
|
+
palette,
|
|
308
|
+
diagnostics,
|
|
309
|
+
lineNumber
|
|
310
|
+
);
|
|
311
|
+
const defaults = SECTION_DEFAULTS.find((s) => s.key === key);
|
|
312
|
+
const written = peelQuotedName(label.slice(keyword.length).trim());
|
|
313
|
+
currentSection = {
|
|
314
|
+
key,
|
|
315
|
+
label: written || defaults.label,
|
|
316
|
+
color: color ?? defaultColor(defaults.color, lineNumber),
|
|
317
|
+
items: [],
|
|
318
|
+
lineNumber
|
|
319
|
+
};
|
|
320
|
+
sectionsByKey.set(key, currentSection);
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (BOOLEAN_OPTIONS.has(keyword) && !rest) {
|
|
324
|
+
options[keyword] = "on";
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
if (VALUE_OPTIONS.has(keyword) && rest) {
|
|
328
|
+
options[keyword] = rest;
|
|
329
|
+
if (keyword === "active-tag") activeTagLine = lineNumber;
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
if (keyword === "x-label" || keyword === "y-label") {
|
|
333
|
+
const parts = rest.split(",").map((s) => s.trim()).filter(Boolean);
|
|
334
|
+
if (parts.length === 2) {
|
|
335
|
+
const pair = [parts[0], parts[1]];
|
|
336
|
+
if (keyword === "x-label") result.xLabels = pair;
|
|
337
|
+
else result.yLabels = pair;
|
|
338
|
+
} else {
|
|
339
|
+
warn(
|
|
340
|
+
lineNumber,
|
|
341
|
+
`'${keyword}' takes two labels, like '${keyword} A, B'. Using the defaults.`
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
report(SWOT_DX.UNKNOWN_SECTION, lineNumber, {
|
|
347
|
+
word,
|
|
348
|
+
nearest: nearestSection(word)
|
|
349
|
+
});
|
|
350
|
+
currentSection = null;
|
|
351
|
+
currentItem = null;
|
|
352
|
+
contentStarted = true;
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
if (!currentSection) {
|
|
356
|
+
if (result.error === null) {
|
|
357
|
+
report(SWOT_DX.ORPHAN_ITEM, lineNumber, { item: trimmed });
|
|
358
|
+
}
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
if (currentItem && indent > itemIndent) {
|
|
362
|
+
if (detailIndent === null || indent <= detailIndent) {
|
|
363
|
+
currentItem.details.push(trimmed);
|
|
364
|
+
currentItem.endLineNumber = lineNumber;
|
|
365
|
+
detailIndent = indent;
|
|
366
|
+
} else {
|
|
367
|
+
report(SWOT_DX.TOO_DEEP, lineNumber, { item: trimmed });
|
|
368
|
+
}
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
itemCounter++;
|
|
372
|
+
currentItem = parseItemLine(
|
|
373
|
+
trimmed,
|
|
374
|
+
lineNumber,
|
|
375
|
+
itemCounter,
|
|
376
|
+
metaAliasMap,
|
|
377
|
+
diagnostics
|
|
378
|
+
);
|
|
379
|
+
itemIndent = indent;
|
|
380
|
+
detailIndent = null;
|
|
381
|
+
currentSection.items.push(currentItem);
|
|
382
|
+
}
|
|
383
|
+
const tagValueSets = new Map(
|
|
384
|
+
tagGroups.map((group) => [
|
|
385
|
+
tagAttrKey(group.name),
|
|
386
|
+
new Set(group.entries.map((e) => e.value.toLowerCase()))
|
|
387
|
+
])
|
|
388
|
+
);
|
|
389
|
+
result.sections = SECTION_DEFAULTS.map((defaults) => {
|
|
390
|
+
const section = sectionsByKey.get(defaults.key);
|
|
391
|
+
if (section) return section;
|
|
392
|
+
return {
|
|
393
|
+
key: defaults.key,
|
|
394
|
+
label: defaults.label,
|
|
395
|
+
color: defaultColor(defaults.color, 1),
|
|
396
|
+
items: [],
|
|
397
|
+
lineNumber: 0
|
|
398
|
+
};
|
|
399
|
+
});
|
|
400
|
+
for (const section of result.sections) {
|
|
401
|
+
if (section.items.length === 0) {
|
|
402
|
+
report(SWOT_DX.EMPTY_SECTION, section.lineNumber || 1, {
|
|
403
|
+
section: section.key
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
for (const item of section.items) {
|
|
407
|
+
for (const [tagKey, tagValue] of Object.entries(item.tags)) {
|
|
408
|
+
const groupKey = metaAliasMap.get(tagKey.toLowerCase()) ?? tagKey;
|
|
409
|
+
const valid = tagValueSets.get(groupKey);
|
|
410
|
+
if (valid && !valid.has(tagValue.toLowerCase())) {
|
|
411
|
+
const entries = tagGroups.find((g) => tagAttrKey(g.name) === groupKey)?.entries.map((e) => e.value);
|
|
412
|
+
let msg = `Unknown tag value "${tagValue}" for group "${groupKey}"`;
|
|
413
|
+
const hint = entries ? suggest(tagValue, entries) : null;
|
|
414
|
+
if (hint) msg += `. ${hint}`;
|
|
415
|
+
warn(item.lineNumber, msg);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
finalizeAutoTagColors(tagGroups, palette);
|
|
421
|
+
validateTagGroupNames(tagGroups, warn, (line, msg) => {
|
|
422
|
+
const diag = makeDgmoError(line, msg);
|
|
423
|
+
diagnostics.push(diag);
|
|
424
|
+
result.error ??= formatDgmoError(diag);
|
|
425
|
+
});
|
|
426
|
+
const activeTagWarning = activeTagNoMatchMessage(
|
|
427
|
+
options["active-tag"],
|
|
428
|
+
tagGroups
|
|
429
|
+
);
|
|
430
|
+
if (activeTagWarning) {
|
|
431
|
+
warn(activeTagLine || 1, activeTagWarning, "W_ACTIVE_TAG_NO_MATCH");
|
|
432
|
+
}
|
|
433
|
+
return result;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export {
|
|
437
|
+
SWOT_DIAGNOSTICS,
|
|
438
|
+
parseSwot
|
|
439
|
+
};
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
tagAttrKey,
|
|
15
15
|
validateTagGroupNames,
|
|
16
16
|
validateTagValues
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KW3CC7SB.js";
|
|
18
18
|
import {
|
|
19
19
|
MINDMAP_REGISTRY,
|
|
20
20
|
OPTION_NOCOLON_RE,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
tryParseSharedOption,
|
|
27
27
|
warnUnknownMetaKeys,
|
|
28
28
|
withTagAliases
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RFGQDIOI.js";
|
|
30
30
|
import {
|
|
31
31
|
formatDgmoError,
|
|
32
32
|
makeDgmoError,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractDatePrefix,
|
|
3
3
|
parseTimelineDate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O3HRF25Z.js";
|
|
5
5
|
import {
|
|
6
6
|
makeYearContext,
|
|
7
7
|
parseDateToken,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tagAttrKey,
|
|
17
17
|
validateTagGroupNames,
|
|
18
18
|
validateTagValues
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KW3CC7SB.js";
|
|
20
20
|
import {
|
|
21
21
|
EVENT_LINE_REGISTRY,
|
|
22
22
|
extractColor,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
tryParseSharedOption,
|
|
28
28
|
warnUnknownMetaKeys,
|
|
29
29
|
withTagAliases
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RFGQDIOI.js";
|
|
31
31
|
import {
|
|
32
32
|
emit,
|
|
33
33
|
formatDgmoError,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
tagAttrKey,
|
|
9
9
|
validateTagGroupNames,
|
|
10
10
|
validateTagValues
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KW3CC7SB.js";
|
|
12
12
|
import {
|
|
13
13
|
TREEMAP_REGISTRY,
|
|
14
14
|
extractColor,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
stripQuotes,
|
|
22
22
|
warnUnknownMetaKeys,
|
|
23
23
|
withTagAliases
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RFGQDIOI.js";
|
|
25
25
|
import {
|
|
26
26
|
emit,
|
|
27
27
|
formatDgmoError,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
META_FONT_SIZE,
|
|
5
5
|
META_LINE_HEIGHT,
|
|
6
6
|
SEPARATOR_GAP
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WH6E6SHC.js";
|
|
8
8
|
import {
|
|
9
9
|
injectDefaultTagMetadata,
|
|
10
10
|
resolveTagColor,
|
|
11
11
|
tagAttrKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KW3CC7SB.js";
|
|
13
13
|
import {
|
|
14
14
|
LEGEND_CAPSULE_PAD,
|
|
15
15
|
LEGEND_DOT_R,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
LEGEND_PILL_FONT_SIZE,
|
|
24
24
|
LEGEND_PILL_PAD,
|
|
25
25
|
measureLegendText
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OZXKW5NA.js";
|
|
27
27
|
import {
|
|
28
28
|
measureText
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PU5X3P3T.js";
|
|
30
30
|
|
|
31
31
|
// src/sitemap/layout.ts
|
|
32
32
|
import dagre from "@dagrejs/dagre";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/journey-map/collapse.ts
|
|
2
|
+
function collapsedJourneyPhasesFromSource(parsed, interactive) {
|
|
3
|
+
const names = new Set(interactive ?? []);
|
|
4
|
+
for (const phase of parsed.phases) {
|
|
5
|
+
if (phase.collapsed) names.add(phase.name);
|
|
6
|
+
}
|
|
7
|
+
return names;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
collapsedJourneyPhasesFromSource
|
|
12
|
+
};
|