@diagrammo/dgmo 0.95.0 → 0.97.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/README.md +1 -1
- package/dist/advanced.d.ts +190 -568
- package/dist/advanced.js +259 -470
- package/dist/block.d.ts +8 -0
- package/dist/block.js +144 -73
- package/dist/{calculator-BNH3GSJE.js → calculator-CIGGTURF.js} +2 -2
- package/dist/{chart-meta-BbjsRY7o.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-Cppnp31G.d.ts → chart-types-Dxtv4XSz.d.ts} +4 -5
- package/dist/{charts-d3-SZV2SFTM.js → charts-d3-INWEGMSD.js} +14 -14
- package/dist/{chunk-P5XA627W.js → chunk-2FMOLWX4.js} +73 -65
- package/dist/{chunk-MLY5ALOV.js → chunk-2SZILMQT.js} +57 -15
- package/dist/chunk-35A3J4Z5.js +14 -0
- package/dist/{chunk-UXNA2H2V.js → chunk-3C4OXVZJ.js} +2 -2
- package/dist/{chunk-IZHGT5HD.js → chunk-3HL6NSSQ.js} +63 -18
- package/dist/{chunk-2WQ3YZMN.js → chunk-3IUMSK72.js} +2 -2
- package/dist/{chunk-LAXMUSGW.js → chunk-44RLIAYC.js} +17 -10
- package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
- package/dist/{chunk-2I4UQG7W.js → chunk-47INRTZ6.js} +2 -2
- package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
- package/dist/{chunk-KLBTJEIK.js → chunk-4TK26YHH.js} +2 -2
- package/dist/{chunk-CN4RDJDV.js → chunk-5TGZBHEJ.js} +1 -1
- package/dist/{chunk-IXHWS2HI.js → chunk-5WZYJC2P.js} +2 -2
- package/dist/{chunk-KBDMEOLI.js → chunk-65JFUANT.js} +1 -1
- package/dist/{chunk-D3K4U3ZM.js → chunk-6K2W3FH7.js} +8 -5
- package/dist/{chunk-NXU4N5WT.js → chunk-6OUMYNAJ.js} +1 -1
- package/dist/{chunk-KRPLP5LP.js → chunk-6PUBFB6D.js} +24 -3
- package/dist/{chunk-EXHXTMVR.js → chunk-6S2H6EKN.js} +3 -3
- package/dist/{chunk-KSZB7TIY.js → chunk-6SDEXSJY.js} +42 -22
- package/dist/{chunk-IQN2NGEU.js → chunk-6YBZFOTA.js} +13 -13
- package/dist/{chunk-IHN6WDEY.js → chunk-74XR7Z3I.js} +13 -13
- package/dist/{chunk-2J2CWWWK.js → chunk-7ASVGFW3.js} +1 -1
- package/dist/{chunk-BH2SF4TT.js → chunk-7QKWU7FX.js} +3 -3
- package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
- package/dist/{chunk-VB4VMB2I.js → chunk-7TEAFIEJ.js} +9 -5
- package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
- package/dist/{chunk-BCV2VJTM.js → chunk-A5LFM62B.js} +3 -3
- package/dist/{chunk-U6VS3T2M.js → chunk-AULFF7L2.js} +4 -4
- package/dist/{chunk-LKZCUFOW.js → chunk-B7ZH5EQ2.js} +2 -2
- package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
- package/dist/{chunk-3PP746YM.js → chunk-CGP7RGLJ.js} +1 -1
- package/dist/{chunk-67N26CER.js → chunk-CLW45YKE.js} +2 -1
- package/dist/{chunk-VTESGA5F.js → chunk-CUOMNKYW.js} +4 -4
- package/dist/{chunk-CDM6XMOT.js → chunk-CUTEHGXO.js} +2 -2
- package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
- package/dist/{chunk-XOMIYMQ3.js → chunk-D7KZE2XJ.js} +39 -17
- package/dist/{chunk-NMS5XSLX.js → chunk-DFEVFLEG.js} +3 -3
- package/dist/{chunk-EBVVMUAA.js → chunk-DKMZ4VMV.js} +1 -1
- package/dist/{chunk-V5D6GDNK.js → chunk-DRY4W4W6.js} +36 -15
- package/dist/{chunk-XJQ6Z3FO.js → chunk-E6GHXMH2.js} +8 -8
- package/dist/{chunk-KBEWVCK3.js → chunk-EBJLT7PH.js} +1 -1
- package/dist/{chunk-TASRGDYP.js → chunk-EEIGHOJR.js} +92 -23
- package/dist/{chunk-AQQUJEDN.js → chunk-EUPUVYWO.js} +1 -1
- package/dist/{chunk-7IALGIOI.js → chunk-F2OAZHOX.js} +10 -5
- package/dist/{chunk-JXGSTBW6.js → chunk-FK6HZYGK.js} +4 -14
- package/dist/{chunk-OSSTOSXU.js → chunk-FTW2E2YH.js} +7 -10
- package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
- package/dist/chunk-G24NSISJ.js +69 -0
- package/dist/{chunk-EBIDNRSR.js → chunk-GFQFLLP3.js} +2 -2
- package/dist/{chunk-RQTDUZUH.js → chunk-GLLYHYGT.js} +27 -17
- package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
- package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
- package/dist/{chunk-C6G36F5S.js → chunk-H242TVAE.js} +9 -9
- package/dist/{chunk-5XBYLYYI.js → chunk-H7DZYHQF.js} +3 -3
- package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
- package/dist/{chunk-IY62DXT2.js → chunk-IAM3IDL4.js} +2 -2
- package/dist/{chunk-IGJEKO2P.js → chunk-II6D6NWX.js} +8 -8
- package/dist/{chunk-AULZD45V.js → chunk-IUFTAFGN.js} +2 -2
- package/dist/{chunk-FWVE373X.js → chunk-IZEKHIV6.js} +3 -3
- package/dist/{chunk-BQMHJ6OW.js → chunk-J3YM6RA5.js} +22 -14
- package/dist/{chunk-R6EGUTIV.js → chunk-J467QBZF.js} +23 -3
- package/dist/{chunk-JJ7RGTAU.js → chunk-J7JF4QKA.js} +40 -30
- package/dist/{chunk-E7F76M3U.js → chunk-JULBDTNU.js} +61 -9
- package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
- package/dist/{chunk-ZECJ7Q6C.js → chunk-KMB754DO.js} +33 -6
- package/dist/chunk-KNKZGRRB.js +439 -0
- package/dist/{chunk-XIUGSUE4.js → chunk-KTGJQJB3.js} +6 -2
- package/dist/{chunk-4SACN2C5.js → chunk-KW3CC7SB.js} +1 -1
- package/dist/{chunk-3GUEYQGL.js → chunk-L3K5O3Z5.js} +3 -3
- package/dist/chunk-LRTSTDJ6.js +126 -0
- package/dist/{chunk-NBAAIRFP.js → chunk-LZATSXAA.js} +5 -2
- package/dist/{chunk-USE6HIOZ.js → chunk-MJ725XHD.js} +1156 -330
- package/dist/{chunk-3KVUFHUJ.js → chunk-NBISN6FH.js} +2 -2
- package/dist/{chunk-RITTLIDJ.js → chunk-NN5RUHXV.js} +84 -16
- package/dist/{chunk-62GLKE6Q.js → chunk-NOZMRPXI.js} +112 -157
- package/dist/{chunk-4XYZJTFO.js → chunk-NQFZ7LXC.js} +14 -6
- package/dist/chunk-NTDWVTEY.js +12 -0
- package/dist/{chunk-BQO24BDM.js → chunk-O3HRF25Z.js} +1 -1
- package/dist/{chunk-ZD3QCNB7.js → chunk-OSSA5UWA.js} +3 -3
- package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
- package/dist/{chunk-NPDVWFAQ.js → chunk-PLQZJZ2K.js} +1 -1
- package/dist/chunk-PRG7NIUU.js +272 -0
- package/dist/{chunk-S4SJ4LLY.js → chunk-PSNRB75I.js} +3 -3
- package/dist/{chunk-QPQWY5RU.js → chunk-PT5VFY3B.js} +38 -14
- package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
- package/dist/{chunk-J7Q4AB23.js → chunk-PZ5LAAO3.js} +2 -2
- package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
- package/dist/{chunk-Y3SIQN4J.js → chunk-Q6V342WS.js} +17 -5
- package/dist/{chunk-RBVFNUAL.js → chunk-QDPTOIG7.js} +5 -5
- package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
- package/dist/{chunk-NM5V5EKY.js → chunk-QLIZ7SB7.js} +1 -1
- package/dist/chunk-QLNLRZ37.js +181 -0
- package/dist/{chunk-HHVIE45A.js → chunk-QOLRTPGH.js} +6 -6
- package/dist/{chunk-2ZW4NBYX.js → chunk-R4SXMBGF.js} +1 -1
- package/dist/chunk-R4U7IIRX.js +178 -0
- package/dist/{chunk-BRGRIZQB.js → chunk-RC6PISCK.js} +4 -2
- package/dist/{chunk-UIEKW4SG.js → chunk-REKLKGR6.js} +3 -4
- package/dist/{chunk-TIIZIAGS.js → chunk-RFGQDIOI.js} +843 -233
- package/dist/{chunk-FVTYJUXR.js → chunk-ROFSIFSY.js} +4 -4
- package/dist/{chunk-VSAKEMDD.js → chunk-ROH4LYBL.js} +71 -21
- package/dist/{chunk-4UVCTLRH.js → chunk-SNDCXT5R.js} +9 -7
- package/dist/{chunk-R46N5KR4.js → chunk-SQBCNEJB.js} +2 -1
- package/dist/{chunk-66JTY4AN.js → chunk-TDUBTDXS.js} +1 -1
- package/dist/{chunk-PGSGJLUR.js → chunk-TMB4YY3J.js} +34 -4
- package/dist/{chunk-UZ7EZW3B.js → chunk-TO53KK2P.js} +6 -1
- package/dist/{chunk-5KKZXA44.js → chunk-V3ICBS2O.js} +7 -5
- package/dist/{chunk-GWQRTA5W.js → chunk-V65EDV6S.js} +3 -3
- package/dist/{chunk-VF7IKIRS.js → chunk-VKT3BVRO.js} +35 -11
- package/dist/{chunk-L5S32VZJ.js → chunk-VOO65FKC.js} +12 -12
- package/dist/{chunk-PVWIBKV2.js → chunk-VQWLASDC.js} +2 -2
- package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
- package/dist/{chunk-GI5R5B3S.js → chunk-VVZDBUHA.js} +2 -2
- package/dist/{chunk-PGBTUGDB.js → chunk-W46OMHOK.js} +23 -27
- package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
- package/dist/{chunk-H6BT45SN.js → chunk-WPYJAHRP.js} +1 -1
- package/dist/{chunk-LJGE43SG.js → chunk-WXGFB2O2.js} +3 -3
- package/dist/{chunk-YQMIKX54.js → chunk-XCYGOCMS.js} +102 -52
- package/dist/{chunk-BTP2BMWN.js → chunk-XEMCNQQW.js} +15 -15
- package/dist/{chunk-NVZ7R4EK.js → chunk-XMUFXJI2.js} +6 -6
- package/dist/{chunk-AM42TLSZ.js → chunk-XZGXVN4T.js} +5 -5
- package/dist/{chunk-5OTA2PUH.js → chunk-YCIBBVI2.js} +2 -2
- package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
- package/dist/{chunk-USZLHYEQ.js → chunk-YFWIFKRQ.js} +3 -3
- 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-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
- package/dist/{chunk-4EX4OKGZ.js → chunk-ZCKVTZHD.js} +41 -19
- package/dist/{chunk-7PJBJ2DU.js → chunk-ZMVMGZAJ.js} +1 -1
- package/dist/{chunk-6EFCOES2.js → chunk-ZRW4B4KF.js} +48 -14
- package/dist/{chunk-A2A2I4Z4.js → chunk-ZTKO2RD4.js} +5 -5
- package/dist/collapse-6IGH2B24.js +31 -0
- package/dist/{collapse-BSPH3BFM.js → collapse-6X5S2S3G.js} +2 -1
- 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 +28 -39
- package/dist/countdown.js +1 -1
- package/dist/dgmo-router-RSYWR5IS.js +101 -0
- package/dist/dimensions-KXAI7U2B.js +21 -0
- package/dist/editor.js +884 -222
- package/dist/{flowchart-parser-J3VWIFWB.js → flowchart-parser-UI5VZNGJ.js} +5 -5
- package/dist/{flowchart-renderer-FECH5KK5.js → flowchart-renderer-IYWPKPCF.js} +18 -18
- package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
- package/dist/highlight.js +886 -224
- package/dist/index.d.ts +89 -6
- package/dist/index.js +91 -70
- package/dist/{layout-TIBRMWHL.js → layout-6VY3DHYD.js} +6 -6
- package/dist/{layout-5SZ5A64I.js → layout-7C2QZCEZ.js} +10 -10
- package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
- package/dist/layout-BSK374N6.js +11 -0
- package/dist/{layout-RH3N46HP.js → layout-FJDBY3WG.js} +6 -5
- package/dist/{layout-YBMT74MG.js → layout-G3RVKEC4.js} +10 -10
- package/dist/{layout-KV27UW25.js → layout-GC5XX2RH.js} +2 -2
- package/dist/{layout-JTIRCKAW.js → layout-R6ULGQJK.js} +6 -6
- package/dist/{layout-HFBK5UEG.js → layout-ROI5KVSO.js} +3 -3
- package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
- package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
- package/dist/{layout-EWXHEXNS.js → layout-WBH5IHYK.js} +10 -10
- package/dist/layout-WTHBGTH2.js +15 -0
- package/dist/layout-ZCCABSV7.js +15 -0
- package/dist/{layout-search-AWPJWBKT.js → layout-search-DSIDKKQO.js} +8 -8
- package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
- package/dist/{parser-NUU3DVW4.js → parser-3PMYAVFL.js} +2 -2
- package/dist/{parser-KJPPUN4D.js → parser-5KVFS4RN.js} +2 -2
- package/dist/{parser-6TDWUKM5.js → parser-BA43YPIQ.js} +3 -3
- package/dist/{parser-EFF22GYO.js → parser-CFAYEWLF.js} +3 -3
- package/dist/{parser-A3AN76RQ.js → parser-DRFEX6OX.js} +3 -3
- package/dist/{parser-H5OODY5N.js → parser-DWVBRBB2.js} +3 -3
- package/dist/{parser-BJ7RJNUM.js → parser-E4B7HJT2.js} +3 -3
- package/dist/{parser-5UZV32ZI.js → parser-FWQY3HJX.js} +2 -2
- package/dist/{parser-RTWPFKXG.js → parser-GMCXCJSP.js} +3 -3
- package/dist/{parser-NL73FSFI.js → parser-IHFHPFL7.js} +3 -3
- package/dist/{parser-BTSTKY5G.js → parser-IU6425JW.js} +6 -6
- package/dist/{parser-ZRIZFDZY.js → parser-IZYIXDJX.js} +6 -6
- package/dist/{parser-4TBSWULQ.js → parser-JQGUTDSX.js} +3 -3
- package/dist/{parser-TUAEX6ML.js → parser-JRKPOO2Z.js} +3 -3
- package/dist/{parser-KMKVFET2.js → parser-KI2XYB2R.js} +2 -2
- package/dist/parser-LDVVBP7S.js +12 -0
- package/dist/{parser-YG625J5H.js → parser-MAGFK6OK.js} +4 -4
- package/dist/{parser-AR2GON37.js → parser-MH5BDN7X.js} +4 -4
- package/dist/{parser-EAQPZX2B.js → parser-MUHFEM4G.js} +3 -3
- package/dist/{parser-RCIEKN7Y.js → parser-P375HO7Q.js} +2 -2
- package/dist/{parser-GMQJISZ6.js → parser-PYY5BRLQ.js} +2 -2
- package/dist/parser-QEMFMVF5.js +12 -0
- package/dist/{parser-GDLKUBTO.js → parser-QIPDBT5M.js} +2 -2
- package/dist/{parser-BT4NI6JY.js → parser-RNBDDEGL.js} +3 -3
- package/dist/{parser-MA7L3XND.js → parser-RSWZGQA7.js} +6 -6
- package/dist/{parser-K2DI26SC.js → parser-SGX2PVR5.js} +2 -2
- package/dist/{parser-KKF6Y5MM.js → parser-SJUEFKNM.js} +4 -3
- package/dist/{parser-3QIFY5IN.js → parser-UMNBPXG2.js} +2 -2
- package/dist/{parser-F7NDRPMA.js → parser-WE4VSBBY.js} +3 -3
- package/dist/{parser-4Y6PODW6.js → parser-WKEYS7N3.js} +3 -3
- package/dist/{parser-KLCSFQ3J.js → parser-WPXUUNA2.js} +3 -3
- package/dist/{parser-LTRQASGB.js → parser-XP3RCOTN.js} +3 -3
- package/dist/{parser-2IKPQVKX.js → parser-YV4RBHG7.js} +3 -3
- package/dist/{parser-3LT3ZUUC.js → parser-YZ3J542U.js} +2 -2
- package/dist/{redraw-AHW7EUUF.js → redraw-BZ4GI6IC.js} +6 -4
- package/dist/{redraw-STZ4WJAI.js → redraw-LEOXS7C6.js} +3 -3
- package/dist/{renderer-IGSHD3OT.js → renderer-2V5NVI3V.js} +16 -16
- package/dist/renderer-4PKYVOYL.js +39 -0
- package/dist/{renderer-IVHD7ENY.js → renderer-66SCERH7.js} +14 -12
- package/dist/renderer-6IAXRZLK.js +85 -0
- package/dist/{renderer-XCLARXCK.js → renderer-6O5SV5YE.js} +10 -10
- package/dist/{renderer-IXBOT6DU.js → renderer-7OXMSF4R.js} +4 -4
- package/dist/{renderer-AM7P4LN7.js → renderer-A36NL2SS.js} +8 -8
- package/dist/{renderer-ACQQ2JXA.js → renderer-ASPBBACI.js} +13 -11
- package/dist/{renderer-W4MUMXJE.js → renderer-BXVTYE27.js} +7 -6
- package/dist/renderer-CC6O6GQK.js +18 -0
- package/dist/{renderer-Y47EM337.js → renderer-CNDB4JTZ.js} +17 -17
- package/dist/renderer-COV2DXTM.js +41 -0
- package/dist/renderer-DXCATVLO.js +30 -0
- package/dist/{renderer-JYHA6R2D.js → renderer-E5E3OJ42.js} +12 -11
- package/dist/{renderer-DAZWHNLI.js → renderer-E7LC7HCU.js} +5 -5
- package/dist/{renderer-RUSQJFFC.js → renderer-F3JYZERE.js} +4 -4
- package/dist/{renderer-7OGGV327.js → renderer-FAFSRFGR.js} +9 -9
- package/dist/renderer-HIB6LZWZ.js +26 -0
- package/dist/renderer-HLDRRFZB.js +28 -0
- package/dist/renderer-INQMQPNN.js +22 -0
- package/dist/renderer-ITJ67HXO.js +27 -0
- package/dist/{renderer-UTEEJDGB.js → renderer-JLOKFKOZ.js} +14 -13
- package/dist/{renderer-2LYX6NHN.js → renderer-KOPJ76GS.js} +10 -10
- package/dist/{renderer-MWZC7TMD.js → renderer-M2467III.js} +14 -13
- package/dist/{renderer-HX6ICPDX.js → renderer-MYKL6VG6.js} +6 -6
- package/dist/{renderer-BXD5KVSR.js → renderer-S6L3JR6C.js} +11 -11
- package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
- package/dist/renderer-TCTZZ5Y6.js +32 -0
- package/dist/{renderer-QTPWRRJ7.js → renderer-UIHCYXBY.js} +12 -12
- package/dist/{renderer-36446HSH.js → renderer-WIBVOPRC.js} +6 -4
- package/dist/{renderer-2QPHDBZY.js → renderer-XMJ6XZGL.js} +12 -11
- package/dist/{renderer-TINHO2IO.js → renderer-ZTHXOBXW.js} +8 -8
- package/dist/{renderer-radial-WFUX3Z3C.js → renderer-radial-FC25BDCZ.js} +8 -8
- package/dist/{state-parser-PMNHLHLE.js → state-parser-2PQRH5JE.js} +6 -6
- package/dist/state-renderer-YP6HWLJR.js +43 -0
- package/dist/{themes-DzIH3Hjv.d.ts → themes-DoLdhUXV.d.ts} +1 -1
- package/docs/ai-integration.md +4 -4
- package/docs/language-reference.md +154 -104
- package/gallery/fixtures/swot-relabel.dgmo +19 -0
- package/gallery/fixtures/swot-tags.dgmo +16 -0
- package/gallery/fixtures/swot.dgmo +13 -0
- package/gallery/fixtures/whiteboard.dgmo +1 -0
- package/package.json +1 -1
- package/dist/chunk-6BQSDF77.js +0 -734
- package/dist/chunk-NWSPPGIE.js +0 -60
- package/dist/chunk-R2K5L4UA.js +0 -49
- package/dist/chunk-VBMRZCMQ.js +0 -1465
- package/dist/chunk-WZBZXZ6T.js +0 -636
- package/dist/collapse-TCVK3RPO.js +0 -8
- package/dist/dgmo-router-6YLKM6WU.js +0 -101
- package/dist/dimensions-DS6FWLRY.js +0 -21
- package/dist/layout-D4L44NRG.js +0 -11
- package/dist/layout-MXHR3P35.js +0 -15
- package/dist/layout-ND26WVX2.js +0 -15
- package/dist/layout-VDCJOZSH.js +0 -11
- package/dist/parser-PEZ7RN43.js +0 -14
- package/dist/parser-YHDGKPZI.js +0 -14
- package/dist/renderer-4VGO27EE.js +0 -41
- package/dist/renderer-6BDK47V6.js +0 -30
- package/dist/renderer-ISQJ2ELA.js +0 -25
- package/dist/renderer-KJ3V5BYP.js +0 -26
- package/dist/renderer-O6RP52CQ.js +0 -22
- package/dist/renderer-P3WR7TKD.js +0 -39
- package/dist/renderer-UGW4N2W5.js +0 -28
- package/dist/renderer-WPN2SXGT.js +0 -29
- package/dist/renderer-XDX6S7OV.js +0 -30
- package/dist/renderer-ZV6KCLCL.js +0 -85
- package/dist/state-renderer-JQ5DS66J.js +0 -42
- package/gallery/fixtures/sketch.dgmo +0 -22
|
@@ -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
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
markTitleRoot
|
|
3
|
+
} from "./chunk-35A3J4Z5.js";
|
|
1
4
|
import {
|
|
2
5
|
tryStripDescriptionKeyword
|
|
3
6
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -11,7 +14,7 @@ import {
|
|
|
11
14
|
tagAttrKey,
|
|
12
15
|
validateTagGroupNames,
|
|
13
16
|
validateTagValues
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KW3CC7SB.js";
|
|
15
18
|
import {
|
|
16
19
|
MINDMAP_REGISTRY,
|
|
17
20
|
OPTION_NOCOLON_RE,
|
|
@@ -23,7 +26,7 @@ import {
|
|
|
23
26
|
tryParseSharedOption,
|
|
24
27
|
warnUnknownMetaKeys,
|
|
25
28
|
withTagAliases
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RFGQDIOI.js";
|
|
27
30
|
import {
|
|
28
31
|
formatDgmoError,
|
|
29
32
|
makeDgmoError,
|
|
@@ -99,6 +102,7 @@ function parseMindmap(content, palette) {
|
|
|
99
102
|
parentId: null,
|
|
100
103
|
lineNumber
|
|
101
104
|
};
|
|
105
|
+
markTitleRoot(titleRoot);
|
|
102
106
|
result.roots.push(titleRoot);
|
|
103
107
|
indentStack.push({ node: titleRoot, indent: -1 });
|
|
104
108
|
}
|
|
@@ -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,
|