@diagrammo/dgmo 0.51.0 → 0.53.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/.cursorrules +74 -77
- package/.github/copilot-instructions.md +74 -77
- package/.windsurfrules +74 -77
- package/SKILL.md +74 -77
- package/dist/advanced.d.ts +109 -246
- package/dist/advanced.js +296 -633
- package/dist/analyzer-TDN5KJFP.js +15 -0
- package/dist/auto.css +14 -6
- package/dist/auto.js +141 -129
- package/dist/auto.mjs +2062 -937
- package/dist/block.css +14 -6
- package/dist/block.js +123 -73
- package/dist/calculator-VBIT6GQF.js +11 -0
- package/dist/chart-meta-CPNVUZ5J.d.ts +232 -0
- package/dist/chart-meta.d.ts +2 -0
- package/dist/chart-meta.js +105 -0
- package/dist/charts-d3-DH2XA45I.js +26 -0
- package/dist/{chunk-RLFVAKEO.js → chunk-22OQWBWD.js} +25 -8
- package/dist/{chunk-I2QZFCS2.js → chunk-27STWBOK.js} +10 -8
- package/dist/{chunk-5PZT4DQG.js → chunk-2QC4HXCY.js} +41 -21
- package/dist/{chunk-HFMYN6N2.js → chunk-3B2GXZCX.js} +4 -3
- package/dist/{chunk-F3FYUFUH.js → chunk-3BEKKRH5.js} +18 -17
- package/dist/{chunk-2UJSV2VT.js → chunk-3CZLWOCI.js} +17 -7
- package/dist/{chunk-JEUJOX5X.js → chunk-3IUHKMJI.js} +2 -2
- package/dist/{chunk-7L4UJOY6.js → chunk-3TYUXC7D.js} +2 -2
- package/dist/{chunk-Y2ZE3MSG.js → chunk-43E26CDA.js} +2 -2
- package/dist/{chunk-ZO27FGJS.js → chunk-4ASVFYB2.js} +10 -7
- package/dist/{chunk-WCT3NYCV.js → chunk-4ASYQ347.js} +33 -8
- package/dist/{chunk-2ILHQOL3.js → chunk-4K42RUGC.js} +41 -13
- package/dist/{chunk-I5IGB56C.js → chunk-4QV26TEG.js} +41 -1
- package/dist/{chunk-QOOUC2J5.js → chunk-4RGZFA7H.js} +2 -2
- package/dist/{chunk-CXK4DZH3.js → chunk-4W2PE66Q.js} +12 -2
- package/dist/{chunk-EXOQP75F.js → chunk-4WGMGKCZ.js} +53 -33
- package/dist/{chunk-JED6ZDEE.js → chunk-5HWPEYWB.js} +2 -2
- package/dist/{chunk-3YSQZ75W.js → chunk-65V6IRFN.js} +46 -33
- package/dist/{chunk-TMACGPW5.js → chunk-6AUZPPAV.js} +4 -4
- package/dist/{chunk-6H7O2OPM.js → chunk-6DCOIN4W.js} +36 -6
- package/dist/{chunk-GTWKD3QT.js → chunk-6HTRCTAS.js} +7 -6
- package/dist/{chunk-VB4UJ3H2.js → chunk-6KY7OCZC.js} +21 -11
- package/dist/{chunk-YAA6IID3.js → chunk-774C2FF3.js} +2 -2
- package/dist/{chunk-WJ7RW65H.js → chunk-7GUF6SDR.js} +22 -20
- package/dist/{chunk-QYTPPDAO.js → chunk-7JDTNFAK.js} +3 -3
- package/dist/{chunk-U6EQI3U6.js → chunk-ADYKAKE3.js} +3 -3
- package/dist/{chunk-VNSXLA6G.js → chunk-AHXIMHDQ.js} +84 -20
- package/dist/chunk-AIMLCDAO.js +404 -0
- package/dist/{chunk-6MNGECP2.js → chunk-ALYZ3MAA.js} +4 -4
- package/dist/{chunk-5F5ELR3V.js → chunk-AN2DQB3G.js} +151 -20
- package/dist/{chunk-IEWG6J7C.js → chunk-AZNXGWDC.js} +91 -36
- package/dist/{chunk-4XFBQT5O.js → chunk-B4XS2AF2.js} +3 -3
- package/dist/{chunk-CC4YRBWV.js → chunk-BD3WGY4T.js} +18 -8
- package/dist/{chunk-RAHVMKBG.js → chunk-BFDVEO5R.js} +2 -2
- package/dist/{chunk-332ZR4QU.js → chunk-BR7AYN76.js} +8 -8
- package/dist/{chunk-P3NRSSUU.js → chunk-BULHGPHK.js} +3 -3
- package/dist/{chunk-PZDBOK2Q.js → chunk-CK2GMDXD.js} +11 -5
- package/dist/{chunk-467TVMQL.js → chunk-CMVZWP32.js} +3 -3
- package/dist/{chunk-GNSFLJAA.js → chunk-CQFNIIQN.js} +7 -7
- package/dist/{chunk-RBDIYLA5.js → chunk-DAOFNU6J.js} +17 -1
- package/dist/{chunk-AFIEPDLX.js → chunk-DWUMPMV2.js} +23 -11
- package/dist/{chunk-USZW2HHU.js → chunk-EQW6HOP4.js} +4 -3
- package/dist/{chunk-6BQFET7X.js → chunk-FFXCKZOU.js} +12 -4
- package/dist/{chunk-WRNFDFPU.js → chunk-FGDSTT3F.js} +2 -2
- package/dist/{chunk-6NFYEQDX.js → chunk-FLDC7ZAK.js} +34 -7
- package/dist/{chunk-IUJODQKX.js → chunk-FT7TPPZ5.js} +25 -23
- package/dist/{chunk-IEDMFNU7.js → chunk-FUKNRLIJ.js} +19 -7
- package/dist/{chunk-JJXGQIRV.js → chunk-FXCB7H5O.js} +4 -4
- package/dist/{chunk-GGHRAITI.js → chunk-GABSL6TH.js} +4 -4
- package/dist/{chunk-RXKTSFDL.js → chunk-GAWKIIPO.js} +35 -43
- package/dist/{chunk-ZJ3LS7DW.js → chunk-GMAH572Z.js} +6 -6
- package/dist/{chunk-TRM2J7ZN.js → chunk-GMIJ35PW.js} +28 -29
- package/dist/{chunk-AB7INMR5.js → chunk-GQ644SPD.js} +26 -25
- package/dist/{chunk-5QKQSSPO.js → chunk-GRM2A4BG.js} +4 -4
- package/dist/{chunk-3ODS2VGL.js → chunk-GWQJKTFS.js} +161 -704
- package/dist/{chunk-OTOHI4JO.js → chunk-H3HFC3SQ.js} +2 -2
- package/dist/{chunk-JSSX2SX4.js → chunk-HE5J53SZ.js} +4 -4
- package/dist/{chunk-2EQMXBBQ.js → chunk-HNBY6CNV.js} +3 -3
- package/dist/{chunk-J76PIKAT.js → chunk-HO3RCNF6.js} +3 -3
- package/dist/{chunk-OJTXTQA2.js → chunk-HORZ5H2L.js} +38 -31
- package/dist/{chunk-MX2EY5Y7.js → chunk-HOXKNRON.js} +2 -2
- package/dist/{chunk-E7Y3SYKW.js → chunk-I64ECJX3.js} +18 -8
- package/dist/{chunk-JM4LEPY3.js → chunk-IQJCVREL.js} +11 -8
- package/dist/{chunk-3JLKYGBQ.js → chunk-J7HI6G3G.js} +9 -6
- package/dist/{chunk-Q62FEYK3.js → chunk-JHOAH4TI.js} +3 -3
- package/dist/{chunk-OZPBJM5Q.js → chunk-JTMSWEIW.js} +11 -8
- package/dist/{chunk-P6T66CCZ.js → chunk-JYDMBWRP.js} +37 -19
- package/dist/{chunk-7DF4J4RL.js → chunk-KKHCNSKK.js} +17 -11
- package/dist/{chunk-ENRS56GC.js → chunk-KUSAVOWZ.js} +11 -8
- package/dist/{chunk-BYJBIALT.js → chunk-LC3FFD43.js} +23 -18
- package/dist/{chunk-65WJYYKJ.js → chunk-LHILKFDP.js} +16 -11
- package/dist/{chunk-NEQ6GJXB.js → chunk-LQHVDZYC.js} +52 -16
- package/dist/{chunk-5WPNFSXP.js → chunk-MA3HJZHB.js} +5 -5
- package/dist/{chunk-Z6XJQ6KO.js → chunk-MEQYZZFR.js} +3 -3
- package/dist/{chunk-MVN25IF6.js → chunk-NNUMX6WX.js} +42 -12
- package/dist/{chunk-7DYOELRK.js → chunk-NNYFQOTK.js} +78 -38
- package/dist/{chunk-NNAAJVBU.js → chunk-NR5HCAUD.js} +1 -1
- package/dist/{chunk-H6PI3KJT.js → chunk-ODUT5WMC.js} +2 -2
- package/dist/{chunk-5PDTIBLV.js → chunk-P3H7QVDH.js} +56 -19
- package/dist/{chunk-ND76YJCN.js → chunk-PIXZTCKH.js} +84 -117
- package/dist/{chunk-3LV2NCB6.js → chunk-PKNNHU7H.js} +22 -9
- package/dist/{chunk-TK2VQQX2.js → chunk-PT4SW76W.js} +20 -18
- package/dist/{chunk-AE7II3E3.js → chunk-PV2QO7QL.js} +4 -4
- package/dist/{chunk-FTBZV6NE.js → chunk-PYO4TJJ3.js} +34 -26
- package/dist/{chunk-QZPEGJOM.js → chunk-Q7AH665U.js} +28 -14
- package/dist/{chunk-QHI5XVUJ.js → chunk-QAALSCKI.js} +27 -26
- package/dist/{chunk-GD6L76WD.js → chunk-QI3BOLQB.js} +23 -11
- package/dist/{chunk-Y6GBQTBK.js → chunk-QWIBT6DS.js} +50 -28
- package/dist/{chunk-GU46PPT3.js → chunk-QXGACPS2.js} +5 -5
- package/dist/{chunk-FMDSF3OV.js → chunk-QZAW5SFH.js} +2 -2
- package/dist/{chunk-YGJZWZTY.js → chunk-R5NH5BZG.js} +12 -9
- package/dist/{chunk-U5SI5NIM.js → chunk-RJ5LBZ5U.js} +43 -26
- package/dist/{chunk-XHVV4NVW.js → chunk-RT7ACF77.js} +12 -2
- package/dist/{chunk-XEQXCIBC.js → chunk-RW5PEJ7D.js} +18 -6
- package/dist/{chunk-4VWJ4LW2.js → chunk-SG4PRYO3.js} +61 -49
- package/dist/{chunk-RBHWPDBB.js → chunk-SGPFVDUL.js} +18 -7
- package/dist/{chunk-KJGG2JKQ.js → chunk-SQCBSFT5.js} +84 -79
- package/dist/{chunk-5X6YQA2J.js → chunk-U7NKYLX2.js} +18 -16
- package/dist/chunk-U7VO6JAA.js +566 -0
- package/dist/{chunk-32XPAAET.js → chunk-UFQJMOVZ.js} +10 -10
- package/dist/{chunk-Z72XRXD4.js → chunk-UJRTPOHH.js} +3 -3
- package/dist/{chunk-EDA6C7MV.js → chunk-UK6DKJLD.js} +34 -14
- package/dist/{chunk-GROLTAWZ.js → chunk-UKP5HWB5.js} +149 -89
- package/dist/{chunk-DY7XLRHK.js → chunk-UQRIKAMH.js} +28 -27
- package/dist/{chunk-TYS6CSS5.js → chunk-UU6LUYUH.js} +2 -2
- package/dist/{chunk-NI3XQBPB.js → chunk-UVDCHR4E.js} +18 -6
- package/dist/{chunk-6K2M4VSR.js → chunk-VAO6ANGC.js} +23 -10
- package/dist/{chunk-6NYWYNBI.js → chunk-VGNIDAPQ.js} +4 -4
- package/dist/{chunk-VL2O2F3W.js → chunk-VHO3YBTB.js} +2 -2
- package/dist/{chunk-IUO34HKW.js → chunk-VIRANCNY.js} +36 -32
- package/dist/{chunk-4QZ43D7I.js → chunk-VJHBSPGF.js} +12 -14
- package/dist/{chunk-BGP54HVR.js → chunk-VKNCC2GX.js} +12 -8
- package/dist/{chunk-FC5I2KXV.js → chunk-VRRDUYOK.js} +7 -7
- package/dist/{chunk-G3PF3S7P.js → chunk-W2DINCHL.js} +15 -15
- package/dist/{chunk-OU7HLO7I.js → chunk-W5KMNC5U.js} +8 -8
- package/dist/{chunk-FFUN5D66.js → chunk-WF64MW5G.js} +2 -2
- package/dist/{chunk-X7EC3L2H.js → chunk-X3RXGSCZ.js} +48 -30
- package/dist/{chunk-KFNWFNAA.js → chunk-XEAQDIMF.js} +7 -6
- package/dist/{chunk-AXW3M6OQ.js → chunk-XG4NWFPY.js} +38 -27
- package/dist/{chunk-B63YB7X3.js → chunk-XQ4KN6JQ.js} +127 -65
- package/dist/{chunk-WBRZJOEC.js → chunk-XY3UDKKH.js} +4 -4
- package/dist/{chunk-IE477RQZ.js → chunk-YG2BEIQU.js} +14 -13
- package/dist/{chunk-LV4BETUU.js → chunk-YJVA3QUU.js} +55 -5
- package/dist/{chunk-5SVOCD5W.js → chunk-YR43LJT5.js} +20 -16
- package/dist/{chunk-TLVIHFRO.js → chunk-ZKPPI6BF.js} +2 -2
- package/dist/{chunk-WQLMU7VG.js → chunk-ZXUAPTCK.js} +3 -3
- package/dist/cli.cjs +158 -155
- package/dist/clock.js +25 -23
- package/dist/countdown.js +4 -3
- package/dist/dgmo-router-B4S23EBH.js +86 -0
- package/dist/dimensions-K6PGYYGT.js +22 -0
- package/dist/editor.js +36 -6
- package/dist/element.js +143 -131
- package/dist/element.mjs +2062 -937
- package/dist/flowchart-parser-LALR6J6F.js +21 -0
- package/dist/{flowchart-renderer-AQSMEMYF.js → flowchart-renderer-DXYB5YRF.js} +14 -14
- package/dist/highlight.d.ts +21 -1
- package/dist/highlight.js +129 -8
- package/dist/index.d.ts +4 -2
- package/dist/index.js +80 -75
- package/dist/layout-3BVDMKXI.js +15 -0
- package/dist/layout-3M5UYJHY.js +14 -0
- package/dist/{layout-JDJAEQ3P.js → layout-3V2A4MUE.js} +8 -8
- package/dist/layout-4IHCMWZN.js +19 -0
- package/dist/layout-5XGYNYVT.js +9 -0
- package/dist/layout-AZUPXWSK.js +15 -0
- package/dist/{layout-F4WO357A.js → layout-CAAKQX4W.js} +3 -3
- package/dist/layout-CB3XWCOI.js +10 -0
- package/dist/{layout-OAC4PEAC.js → layout-E6HR6PXH.js} +7 -7
- package/dist/{layout-7QXCNOVS.js → layout-HBWT2G23.js} +3 -3
- package/dist/layout-KPQWJNAG.js +14 -0
- package/dist/layout-OL2XFJXA.js +17 -0
- package/dist/layout-WCAIKGZG.js +19 -0
- package/dist/layout-WSMPBQ4Q.js +17 -0
- package/dist/layout-ZE5DRJWX.js +20 -0
- package/dist/{layout-search-55FU6HD3.js → layout-search-34DPZD43.js} +51 -35
- package/dist/legend-constants-P5EQWRQQ.js +49 -0
- package/dist/{palettes-PRJ2RI6D.js → palettes-FGTNFARW.js} +4 -4
- package/dist/{parser-KKTJ6M3Y.js → parser-275KP7JO.js} +8 -8
- package/dist/parser-27Z76SN3.js +22 -0
- package/dist/parser-3CODK6RG.js +15 -0
- package/dist/{parser-EH5VE7ZN.js → parser-3KIGEEJM.js} +6 -6
- package/dist/parser-3VSWEKBF.js +15 -0
- package/dist/parser-4E4I3GNT.js +13 -0
- package/dist/parser-5FGJSQNS.js +12 -0
- package/dist/parser-5HQXCNOS.js +12 -0
- package/dist/parser-5QPFOB5F.js +12 -0
- package/dist/parser-6B6SSZT7.js +11 -0
- package/dist/parser-6PPHAXXH.js +14 -0
- package/dist/parser-7JHWEWXM.js +13 -0
- package/dist/{parser-5PDYJGWA.js → parser-7JVIDLLR.js} +7 -7
- package/dist/parser-CKA3QMAG.js +18 -0
- package/dist/parser-CRKLXGW7.js +13 -0
- package/dist/parser-EXNBDNGY.js +11 -0
- package/dist/parser-FF4BMRSB.js +16 -0
- package/dist/parser-FOOFEJQU.js +13 -0
- package/dist/parser-G26MTBFS.js +11 -0
- package/dist/parser-GKP2MHHL.js +11 -0
- package/dist/parser-GN2MM5CC.js +11 -0
- package/dist/parser-IKWK2ZU3.js +18 -0
- package/dist/parser-IVGHXLZP.js +14 -0
- package/dist/parser-NNIL3HXU.js +11 -0
- package/dist/parser-RNLTBIJ6.js +19 -0
- package/dist/parser-UWRX52PC.js +16 -0
- package/dist/parser-VOERD6XR.js +14 -0
- package/dist/parser-XNKJCMMA.js +13 -0
- package/dist/parser-XVPTRWZ4.js +15 -0
- package/dist/parser-YSLNDFLV.js +22 -0
- package/dist/parser-ZGNXYFPS.js +15 -0
- package/dist/parser-ZQDQTB4X.js +20 -0
- package/dist/pert.d.ts +4 -2
- package/dist/registry-CaSw0PSH.d.ts +350 -0
- package/dist/renderer-2C6DJRYN.js +24 -0
- package/dist/renderer-5MPN7CXZ.js +19 -0
- package/dist/renderer-6EN5XXJZ.js +27 -0
- package/dist/renderer-6WRYVM5R.js +24 -0
- package/dist/renderer-7NQSTQMQ.js +16 -0
- package/dist/renderer-7ZNVOVFG.js +16 -0
- package/dist/{renderer-KQB7UGDS.js → renderer-AK2WO4EI.js} +7 -6
- package/dist/renderer-COLQFSFV.js +26 -0
- package/dist/renderer-CWEFGEIC.js +36 -0
- package/dist/renderer-D3BRNOMV.js +29 -0
- package/dist/renderer-HIFQVEJA.js +22 -0
- package/dist/renderer-JCZG6AYU.js +28 -0
- package/dist/{renderer-6RKQPNJI.js → renderer-JTCX6PCG.js} +13 -13
- package/dist/renderer-JWGQSTMR.js +37 -0
- package/dist/{renderer-3YPZHMOU.js → renderer-K7XLVPH5.js} +6 -6
- package/dist/renderer-KARQF3F3.js +22 -0
- package/dist/renderer-LVZAHRP6.js +34 -0
- package/dist/{renderer-QXGN5H3A.js → renderer-NE5W7CQP.js} +8 -8
- package/dist/renderer-QD2SJF2I.js +34 -0
- package/dist/renderer-RLMOTXZ6.js +37 -0
- package/dist/renderer-SQ54MDSA.js +26 -0
- package/dist/{renderer-UV6MI64M.js → renderer-TYHGXAVT.js} +7 -6
- package/dist/renderer-UKXW2QPE.js +23 -0
- package/dist/renderer-UPF7NRTI.js +28 -0
- package/dist/renderer-VMH6L6CP.js +24 -0
- package/dist/{renderer-GHPZMFU2.js → renderer-WCWI4I6A.js} +5 -5
- package/dist/renderer-WFSUBKUL.js +25 -0
- package/dist/renderer-WNFXYYGL.js +21 -0
- package/dist/{renderer-RGIYOTKJ.js → renderer-XTXSOK3L.js} +14 -14
- package/dist/renderer-YUKPS27O.js +24 -0
- package/dist/renderer-YUXGXGSW.js +27 -0
- package/dist/renderer-ZBTEX2JK.js +16 -0
- package/dist/renderer-radial-WF6VOUOD.js +21 -0
- package/dist/{resolver-EMTGNR3D.js → resolver-WFKZYBJ2.js} +4 -4
- package/dist/state-parser-L7DHZIQO.js +19 -0
- package/dist/state-renderer-TFEUOP4H.js +38 -0
- package/dist/{themes-32xj5ZTW.d.ts → themes-tbBkIVsn.d.ts} +2 -349
- package/docs/ai-integration.md +74 -77
- package/docs/language-reference.md +329 -290
- package/fonts/Inter-Bold.woff2 +0 -0
- package/fonts/Inter-Regular.woff2 +0 -0
- package/gallery/fixtures/boxes-and-lines-diverging.dgmo +1 -2
- package/gallery/fixtures/boxes-and-lines.dgmo +1 -1
- package/gallery/fixtures/clock.dgmo +1 -1
- package/gallery/fixtures/event-line.dgmo +1 -1
- package/gallery/fixtures/gantt-full.dgmo +1 -1
- package/gallery/fixtures/gantt-sprints.dgmo +9 -9
- package/gallery/fixtures/gantt.dgmo +1 -1
- package/gallery/fixtures/legacy-syntax-backcompat.dgmo +16 -0
- package/gallery/fixtures/state-tags.dgmo +40 -0
- package/gallery/fixtures/swimlane.dgmo +1 -1
- package/gallery/fixtures/timeline-intraday.dgmo +1 -1
- package/package.json +5 -1
- package/dist/analyzer-BJ54GIFB.js +0 -15
- package/dist/calculator-LDYQCDDY.js +0 -11
- package/dist/charts-d3-7E4B4IMW.js +0 -26
- package/dist/dgmo-router-Y2VEX46B.js +0 -86
- package/dist/dimensions-F7B5C4BJ.js +0 -22
- package/dist/flowchart-parser-MY53QWTZ.js +0 -21
- package/dist/layout-46366KBT.js +0 -10
- package/dist/layout-46N4JJYK.js +0 -17
- package/dist/layout-4DIUOX2T.js +0 -14
- package/dist/layout-AM2JWW3X.js +0 -15
- package/dist/layout-CBCLPMSG.js +0 -15
- package/dist/layout-EE6GE46Y.js +0 -17
- package/dist/layout-G23F7LDH.js +0 -9
- package/dist/layout-HYZPWAK5.js +0 -18
- package/dist/layout-MUPRALE5.js +0 -14
- package/dist/layout-YVTNOTN4.js +0 -20
- package/dist/layout-ZDOSXL5G.js +0 -19
- package/dist/parser-2Q2T4C3B.js +0 -22
- package/dist/parser-3A42DZ72.js +0 -11
- package/dist/parser-4RFTKAQX.js +0 -15
- package/dist/parser-57ILIFZ2.js +0 -20
- package/dist/parser-5A2UWU6B.js +0 -11
- package/dist/parser-6BJEXUFX.js +0 -13
- package/dist/parser-6ZKABF5S.js +0 -22
- package/dist/parser-AIMHGJRR.js +0 -19
- package/dist/parser-AZJ25OKK.js +0 -13
- package/dist/parser-B77S5SZM.js +0 -11
- package/dist/parser-BEPSWJAD.js +0 -11
- package/dist/parser-BKI42XBQ.js +0 -16
- package/dist/parser-C3D7MVXY.js +0 -11
- package/dist/parser-CDG7CHV5.js +0 -14
- package/dist/parser-CZOJ7XQ6.js +0 -15
- package/dist/parser-E2RL6JYF.js +0 -18
- package/dist/parser-FQ6GZFMR.js +0 -13
- package/dist/parser-GKLZKEIK.js +0 -13
- package/dist/parser-H6ABKHZZ.js +0 -12
- package/dist/parser-I6GGFKOQ.js +0 -12
- package/dist/parser-JA7JQ7NF.js +0 -15
- package/dist/parser-OK22AC6Y.js +0 -14
- package/dist/parser-OK2ILHRT.js +0 -16
- package/dist/parser-OUTPNJWC.js +0 -11
- package/dist/parser-PORDUX5E.js +0 -15
- package/dist/parser-SRVFR7PM.js +0 -13
- package/dist/parser-UKFFZCFJ.js +0 -14
- package/dist/parser-UMWPLORP.js +0 -18
- package/dist/parser-Z4TZV2CB.js +0 -12
- package/dist/renderer-2AUFT3E2.js +0 -24
- package/dist/renderer-2HTNBIF2.js +0 -34
- package/dist/renderer-3K3IB7D5.js +0 -22
- package/dist/renderer-3YNIWF5I.js +0 -16
- package/dist/renderer-4WR6WMVF.js +0 -26
- package/dist/renderer-66MERVQ2.js +0 -24
- package/dist/renderer-ARMJBP6C.js +0 -28
- package/dist/renderer-CO2DW7S7.js +0 -37
- package/dist/renderer-EDJ2O4S5.js +0 -34
- package/dist/renderer-F7U3MFCV.js +0 -22
- package/dist/renderer-GD2COXVL.js +0 -16
- package/dist/renderer-GQIESYEM.js +0 -25
- package/dist/renderer-HCKJDFXD.js +0 -37
- package/dist/renderer-HYGHO4SJ.js +0 -28
- package/dist/renderer-JC3RDUT7.js +0 -23
- package/dist/renderer-NKJ24TEA.js +0 -19
- package/dist/renderer-OYO67VZK.js +0 -26
- package/dist/renderer-QIWVHWZO.js +0 -15
- package/dist/renderer-QRWACQRI.js +0 -21
- package/dist/renderer-QXPP4TA2.js +0 -27
- package/dist/renderer-RHT4MHFU.js +0 -24
- package/dist/renderer-RYR3TJ46.js +0 -36
- package/dist/renderer-SRKDNDFB.js +0 -27
- package/dist/renderer-TGTUABCI.js +0 -24
- package/dist/renderer-TXJFKPOG.js +0 -29
- package/dist/renderer-radial-FWABAZHB.js +0 -21
- package/dist/state-parser-6T6CNMPX.js +0 -18
- package/dist/state-renderer-AWZ3ECAX.js +0 -34
|
@@ -1,38 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUTO_TAG_COLOR_SENTINEL,
|
|
3
|
+
finalizeAutoTagColors,
|
|
4
|
+
matchTagBlockHeading,
|
|
5
|
+
stripDefaultModifier,
|
|
6
|
+
tagAttrKey,
|
|
7
|
+
validateTagGroupNames,
|
|
8
|
+
validateTagValues
|
|
9
|
+
} from "./chunk-CMVZWP32.js";
|
|
1
10
|
import {
|
|
2
11
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZXUAPTCK.js";
|
|
4
13
|
import {
|
|
5
14
|
resolveNotes
|
|
6
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QZAW5SFH.js";
|
|
7
16
|
import {
|
|
8
17
|
parseInArrowLabel
|
|
9
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WF64MW5G.js";
|
|
10
19
|
import {
|
|
11
20
|
displayName,
|
|
12
21
|
normalizeName
|
|
13
22
|
} from "./chunk-NOTA6TEI.js";
|
|
14
23
|
import {
|
|
15
24
|
ALL_CHART_TYPES,
|
|
25
|
+
FILL_FAMILY_TOKENS,
|
|
16
26
|
OPTION_NOCOLON_RE,
|
|
27
|
+
STATE_REGISTRY,
|
|
28
|
+
cutUnionMetadata,
|
|
29
|
+
extractColor,
|
|
17
30
|
measureIndent,
|
|
18
31
|
parseFirstLine,
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
parseMetadataRegion,
|
|
33
|
+
tryParseSharedOption,
|
|
34
|
+
withTagAliases
|
|
35
|
+
} from "./chunk-YJVA3QUU.js";
|
|
21
36
|
import {
|
|
22
37
|
resolveColorWithDiagnostic
|
|
23
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZKPPI6BF.js";
|
|
24
39
|
import {
|
|
25
40
|
NAME_DIAGNOSTIC_CODES,
|
|
26
41
|
formatDgmoError,
|
|
27
42
|
makeDgmoError,
|
|
28
43
|
nameMergedMessage,
|
|
29
44
|
suggest
|
|
30
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-4W2PE66Q.js";
|
|
31
46
|
|
|
32
47
|
// src/graph/state-parser.ts
|
|
33
48
|
var PSEUDOSTATE_ID = "pseudostate:[*]";
|
|
34
49
|
var PSEUDOSTATE_LABEL = "[*]";
|
|
35
|
-
var GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:,?\s+collapsed
|
|
50
|
+
var GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:,?\s+(collapsed)(?::\s*(\S+))?)?\s*$/;
|
|
36
51
|
function splitArrows(line) {
|
|
37
52
|
const segments = [];
|
|
38
53
|
const arrowPositions = [];
|
|
@@ -125,6 +140,7 @@ function parseState(content, palette) {
|
|
|
125
140
|
direction: "LR",
|
|
126
141
|
nodes: [],
|
|
127
142
|
edges: [],
|
|
143
|
+
tagGroups: [],
|
|
128
144
|
options,
|
|
129
145
|
diagnostics: [],
|
|
130
146
|
error: null
|
|
@@ -143,6 +159,22 @@ function parseState(content, palette) {
|
|
|
143
159
|
const groups = [];
|
|
144
160
|
let contentStarted = false;
|
|
145
161
|
let firstLineParsed = false;
|
|
162
|
+
const tagGroups = result.tagGroups;
|
|
163
|
+
let currentTagGroup = null;
|
|
164
|
+
const metaAliasMap = /* @__PURE__ */ new Map();
|
|
165
|
+
let registry = STATE_REGISTRY;
|
|
166
|
+
const refreshRegistry = () => {
|
|
167
|
+
registry = withTagAliases(STATE_REGISTRY, new Set(metaAliasMap.keys()));
|
|
168
|
+
};
|
|
169
|
+
function peelStateMeta(text) {
|
|
170
|
+
if (metaAliasMap.size === 0) return { text, meta: {} };
|
|
171
|
+
const cut = cutUnionMetadata(text, registry);
|
|
172
|
+
if (cut === -1) return { text, meta: {} };
|
|
173
|
+
return {
|
|
174
|
+
text: text.substring(0, cut).trimEnd(),
|
|
175
|
+
meta: parseMetadataRegion(text.substring(cut), metaAliasMap)
|
|
176
|
+
};
|
|
177
|
+
}
|
|
146
178
|
const nameAliasMap = /* @__PURE__ */ new Map();
|
|
147
179
|
function peelAlias(seg) {
|
|
148
180
|
const trimmed = seg.trim();
|
|
@@ -150,10 +182,13 @@ function parseState(content, palette) {
|
|
|
150
182
|
if (!m) return { seg: trimmed };
|
|
151
183
|
return { seg: m[1].trim(), alias: m[2] };
|
|
152
184
|
}
|
|
153
|
-
function getOrCreateNode(ref, lineNumber) {
|
|
185
|
+
function getOrCreateNode(ref, lineNumber, meta) {
|
|
154
186
|
const key = ref.id;
|
|
155
187
|
const existing = nodeMap.get(key);
|
|
156
188
|
if (existing) {
|
|
189
|
+
if (meta && Object.keys(meta).length > 0) {
|
|
190
|
+
existing.metadata = { ...existing.metadata ?? {}, ...meta };
|
|
191
|
+
}
|
|
157
192
|
const incomingDisplay = displayName(ref.label);
|
|
158
193
|
const existingDisplay = displayName(existing.label);
|
|
159
194
|
if (incomingDisplay !== existingDisplay) {
|
|
@@ -179,7 +214,8 @@ function parseState(content, palette) {
|
|
|
179
214
|
shape: ref.shape,
|
|
180
215
|
lineNumber,
|
|
181
216
|
...ref.color && { color: ref.color },
|
|
182
|
-
...currentGroup && { group: currentGroup.id }
|
|
217
|
+
...currentGroup && { group: currentGroup.id },
|
|
218
|
+
...meta && Object.keys(meta).length > 0 && { metadata: { ...meta } }
|
|
183
219
|
};
|
|
184
220
|
nodeMap.set(key, node);
|
|
185
221
|
result.nodes.push(node);
|
|
@@ -201,7 +237,10 @@ function parseState(content, palette) {
|
|
|
201
237
|
const trimmed = raw.trim();
|
|
202
238
|
const lineNumber = i + 1;
|
|
203
239
|
const indent = measureIndent(raw);
|
|
204
|
-
if (!trimmed)
|
|
240
|
+
if (!trimmed) {
|
|
241
|
+
currentTagGroup = null;
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
205
244
|
if (trimmed.startsWith("//")) continue;
|
|
206
245
|
if (!firstLineParsed && !contentStarted) {
|
|
207
246
|
const firstLineResult = parseFirstLine(trimmed);
|
|
@@ -221,6 +260,53 @@ function parseState(content, palette) {
|
|
|
221
260
|
continue;
|
|
222
261
|
}
|
|
223
262
|
}
|
|
263
|
+
if (!contentStarted) {
|
|
264
|
+
const tagBlockMatch = matchTagBlockHeading(trimmed);
|
|
265
|
+
if (tagBlockMatch) {
|
|
266
|
+
currentTagGroup = {
|
|
267
|
+
name: tagBlockMatch.name,
|
|
268
|
+
...tagBlockMatch.alias !== void 0 && {
|
|
269
|
+
alias: tagBlockMatch.alias
|
|
270
|
+
},
|
|
271
|
+
entries: [],
|
|
272
|
+
lineNumber
|
|
273
|
+
};
|
|
274
|
+
if (tagBlockMatch.alias) {
|
|
275
|
+
metaAliasMap.set(
|
|
276
|
+
normalizeName(tagBlockMatch.alias),
|
|
277
|
+
tagAttrKey(tagBlockMatch.name)
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
metaAliasMap.set(
|
|
281
|
+
normalizeName(tagBlockMatch.name),
|
|
282
|
+
tagAttrKey(tagBlockMatch.name)
|
|
283
|
+
);
|
|
284
|
+
refreshRegistry();
|
|
285
|
+
tagGroups.push(currentTagGroup);
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (currentTagGroup && indent > 0) {
|
|
289
|
+
const { text: cleanEntry, isDefault } = stripDefaultModifier(trimmed);
|
|
290
|
+
const { label, color } = extractColor(
|
|
291
|
+
cleanEntry,
|
|
292
|
+
palette,
|
|
293
|
+
result.diagnostics,
|
|
294
|
+
lineNumber
|
|
295
|
+
);
|
|
296
|
+
if (isDefault || currentTagGroup.entries.length === 0) {
|
|
297
|
+
currentTagGroup.defaultValue = label;
|
|
298
|
+
}
|
|
299
|
+
currentTagGroup.entries.push({
|
|
300
|
+
value: label,
|
|
301
|
+
// Bare value → sentinel; finalizeAutoTagColors assigns a
|
|
302
|
+
// deterministic palette color after the parse.
|
|
303
|
+
color: color ?? AUTO_TAG_COLOR_SENTINEL,
|
|
304
|
+
lineNumber
|
|
305
|
+
});
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
currentTagGroup = null;
|
|
309
|
+
}
|
|
224
310
|
const noteResult = tryCollectNote(
|
|
225
311
|
lines,
|
|
226
312
|
i,
|
|
@@ -243,7 +329,7 @@ function parseState(content, palette) {
|
|
|
243
329
|
result.diagnostics,
|
|
244
330
|
palette
|
|
245
331
|
) : void 0;
|
|
246
|
-
const groupCollapsed = groupMatch[3]
|
|
332
|
+
const groupCollapsed = groupMatch[3] !== void 0 && (groupMatch[4] === void 0 || groupMatch[4].toLowerCase() === "true");
|
|
247
333
|
currentGroup = {
|
|
248
334
|
id: `group:${groupLabel.toLowerCase()}`,
|
|
249
335
|
label: groupLabel,
|
|
@@ -257,12 +343,15 @@ function parseState(content, palette) {
|
|
|
257
343
|
continue;
|
|
258
344
|
}
|
|
259
345
|
if (!contentStarted) {
|
|
260
|
-
|
|
261
|
-
|
|
346
|
+
const dirBool = trimmed.match(/^direction-(lr|tb)$/i);
|
|
347
|
+
if (dirBool) {
|
|
348
|
+
result.direction = dirBool[1].toUpperCase();
|
|
262
349
|
continue;
|
|
263
350
|
}
|
|
264
|
-
if (
|
|
265
|
-
options[
|
|
351
|
+
if (FILL_FAMILY_TOKENS.has(trimmed.toLowerCase())) {
|
|
352
|
+
for (const t of FILL_FAMILY_TOKENS) delete options[t];
|
|
353
|
+
if (trimmed.toLowerCase() !== "fill-tint")
|
|
354
|
+
options[trimmed.toLowerCase()] = "on";
|
|
266
355
|
continue;
|
|
267
356
|
}
|
|
268
357
|
if (/^no-color$/i.test(trimmed)) {
|
|
@@ -275,7 +364,8 @@ function parseState(content, palette) {
|
|
|
275
364
|
continue;
|
|
276
365
|
}
|
|
277
366
|
const optMatch = trimmed.match(OPTION_NOCOLON_RE);
|
|
278
|
-
|
|
367
|
+
const carriesTagMeta = metaAliasMap.size > 0 && cutUnionMetadata(trimmed, registry) !== -1;
|
|
368
|
+
if (optMatch && !trimmed.includes("->") && !carriesTagMeta) {
|
|
279
369
|
const key = optMatch[1].toLowerCase();
|
|
280
370
|
const value = optMatch[2].trim();
|
|
281
371
|
if (key === "no-color") {
|
|
@@ -311,10 +401,11 @@ function parseState(content, palette) {
|
|
|
311
401
|
) : null;
|
|
312
402
|
const segments = splitArrows(trimmed);
|
|
313
403
|
if (segments.length === 1) {
|
|
314
|
-
const
|
|
404
|
+
const withMeta = peelStateMeta(segments[0]);
|
|
405
|
+
const peeled = peelAlias(withMeta.text);
|
|
315
406
|
const ref = parseStateNodeRef(peeled.seg);
|
|
316
407
|
if (ref) {
|
|
317
|
-
const node = getOrCreateNode(ref, lineNumber);
|
|
408
|
+
const node = getOrCreateNode(ref, lineNumber, withMeta.meta);
|
|
318
409
|
if (peeled.alias) nameAliasMap.set(peeled.alias, node.id);
|
|
319
410
|
node.lineNumber = lineNumber;
|
|
320
411
|
indentStack.push({ nodeId: node.id, indent });
|
|
@@ -371,6 +462,46 @@ function parseState(content, palette) {
|
|
|
371
462
|
indentStack.push({ nodeId: lastNodeId, indent });
|
|
372
463
|
}
|
|
373
464
|
}
|
|
465
|
+
if (tagGroups.length > 0) {
|
|
466
|
+
finalizeAutoTagColors(tagGroups, palette);
|
|
467
|
+
const defaults = [];
|
|
468
|
+
for (const group of tagGroups) {
|
|
469
|
+
if (group.defaultValue) {
|
|
470
|
+
defaults.push({
|
|
471
|
+
key: tagAttrKey(group.name),
|
|
472
|
+
value: group.defaultValue
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
const taggable = result.nodes.filter(
|
|
477
|
+
(n) => n.shape !== "pseudostate"
|
|
478
|
+
);
|
|
479
|
+
for (const node of taggable) {
|
|
480
|
+
const meta = { ...node.metadata ?? {} };
|
|
481
|
+
for (const { key, value } of defaults) {
|
|
482
|
+
if (!(key in meta)) meta[key] = value;
|
|
483
|
+
}
|
|
484
|
+
node.metadata = meta;
|
|
485
|
+
}
|
|
486
|
+
validateTagValues(
|
|
487
|
+
taggable.map((n) => ({
|
|
488
|
+
metadata: n.metadata ?? {},
|
|
489
|
+
lineNumber: n.lineNumber
|
|
490
|
+
})),
|
|
491
|
+
tagGroups,
|
|
492
|
+
(line, message) => result.diagnostics.push(makeDgmoError(line, message, "warning")),
|
|
493
|
+
suggest
|
|
494
|
+
);
|
|
495
|
+
validateTagGroupNames(
|
|
496
|
+
tagGroups,
|
|
497
|
+
(line, message) => result.diagnostics.push(makeDgmoError(line, message, "warning")),
|
|
498
|
+
(line, message) => {
|
|
499
|
+
const diag = makeDgmoError(line, message);
|
|
500
|
+
result.diagnostics.push(diag);
|
|
501
|
+
if (!result.error) result.error = formatDgmoError(diag);
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
}
|
|
374
505
|
if (groups.length > 0) result.groups = groups;
|
|
375
506
|
if (notes.length > 0) {
|
|
376
507
|
result.notes = notes;
|
|
@@ -412,4 +543,4 @@ export {
|
|
|
412
543
|
parseState,
|
|
413
544
|
looksLikeState
|
|
414
545
|
};
|
|
415
|
-
//# sourceMappingURL=chunk-
|
|
546
|
+
//# sourceMappingURL=chunk-AN2DQB3G.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-PDKUANDZ.js";
|
|
5
5
|
import {
|
|
6
6
|
layoutGraph
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3B2GXZCX.js";
|
|
8
8
|
import {
|
|
9
9
|
appendArrowheadMarkers
|
|
10
10
|
} from "./chunk-LP7EC4MI.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
renderNoteBadge,
|
|
15
15
|
renderNoteBox,
|
|
16
16
|
renderNoteConnector
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3IUHKMJI.js";
|
|
18
18
|
import {
|
|
19
19
|
EDGE_STROKE_WIDTH,
|
|
20
20
|
NODE_STROKE_WIDTH
|
|
@@ -30,16 +30,19 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
FONT_FAMILY
|
|
32
32
|
} from "./chunk-6KFWC4CO.js";
|
|
33
|
-
import {
|
|
34
|
-
measureText
|
|
35
|
-
} from "./chunk-WCT3NYCV.js";
|
|
36
33
|
import {
|
|
37
34
|
contrastText,
|
|
38
35
|
shapeFill
|
|
39
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JYDMBWRP.js";
|
|
37
|
+
import {
|
|
38
|
+
measureText
|
|
39
|
+
} from "./chunk-4ASYQ347.js";
|
|
40
40
|
import {
|
|
41
41
|
parseFlowchart
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-JTMSWEIW.js";
|
|
43
|
+
import {
|
|
44
|
+
fillModeFromOptions
|
|
45
|
+
} from "./chunk-YJVA3QUU.js";
|
|
43
46
|
|
|
44
47
|
// src/graph/flowchart-renderer.ts
|
|
45
48
|
import * as d3Selection from "d3-selection";
|
|
@@ -52,6 +55,14 @@ var ARROWHEAD_H = 7;
|
|
|
52
55
|
var IO_SKEW = 15;
|
|
53
56
|
var SUBROUTINE_INSET = 8;
|
|
54
57
|
var DOC_WAVE_HEIGHT = 10;
|
|
58
|
+
function clipPointToDiamond(cx, cy, halfW, halfH, towardX, towardY) {
|
|
59
|
+
const dx = towardX - cx;
|
|
60
|
+
const dy = towardY - cy;
|
|
61
|
+
const denom = Math.abs(dx) / halfW + Math.abs(dy) / halfH;
|
|
62
|
+
if (denom === 0) return { x: cx, y: cy };
|
|
63
|
+
const s = 1 / denom;
|
|
64
|
+
return { x: cx + dx * s, y: cy + dy * s };
|
|
65
|
+
}
|
|
55
66
|
function shapeDefaultColor(shape, palette, isEndTerminal, colorOff) {
|
|
56
67
|
if (colorOff) return palette.textMuted;
|
|
57
68
|
switch (shape) {
|
|
@@ -71,28 +82,34 @@ function shapeDefaultColor(shape, palette, isEndTerminal, colorOff) {
|
|
|
71
82
|
return palette.colors.blue;
|
|
72
83
|
}
|
|
73
84
|
}
|
|
74
|
-
function nodeFill(palette, isDark, shape, nodeColor, isEndTerminal, colorOff,
|
|
85
|
+
function nodeFill(palette, isDark, shape, nodeColor, isEndTerminal, colorOff, fillMode) {
|
|
75
86
|
const color = nodeColor ?? shapeDefaultColor(shape, palette, isEndTerminal, colorOff);
|
|
76
|
-
return shapeFill(palette, color, isDark, {
|
|
77
|
-
...solid !== void 0 && { solid }
|
|
78
|
-
});
|
|
87
|
+
return shapeFill(palette, color, isDark, { mode: fillMode });
|
|
79
88
|
}
|
|
80
89
|
function nodeStroke(palette, shape, nodeColor, isEndTerminal, colorOff) {
|
|
81
90
|
return nodeColor ?? shapeDefaultColor(shape, palette, isEndTerminal, colorOff);
|
|
82
91
|
}
|
|
83
|
-
function renderTerminal(g, node, palette, isDark, isEnd, colorOff,
|
|
92
|
+
function renderTerminal(g, node, palette, isDark, isEnd, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH) {
|
|
84
93
|
const w = node.width;
|
|
85
94
|
const h = node.height;
|
|
86
95
|
const rx = h / 2;
|
|
87
96
|
g.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", rx).attr("ry", rx).attr(
|
|
88
97
|
"fill",
|
|
89
|
-
nodeFill(
|
|
98
|
+
nodeFill(
|
|
99
|
+
palette,
|
|
100
|
+
isDark,
|
|
101
|
+
node.shape,
|
|
102
|
+
node.color,
|
|
103
|
+
isEnd,
|
|
104
|
+
colorOff,
|
|
105
|
+
fillMode
|
|
106
|
+
)
|
|
90
107
|
).attr(
|
|
91
108
|
"stroke",
|
|
92
109
|
nodeStroke(palette, node.shape, node.color, isEnd, colorOff)
|
|
93
110
|
).attr("stroke-width", sNodeStrokeWidth);
|
|
94
111
|
}
|
|
95
|
-
function renderProcess(g, node, palette, isDark, colorOff,
|
|
112
|
+
function renderProcess(g, node, palette, isDark, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH) {
|
|
96
113
|
const w = node.width;
|
|
97
114
|
const h = node.height;
|
|
98
115
|
g.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", 3).attr("ry", 3).attr(
|
|
@@ -104,14 +121,14 @@ function renderProcess(g, node, palette, isDark, colorOff, solid, sNodeStrokeWid
|
|
|
104
121
|
node.color,
|
|
105
122
|
void 0,
|
|
106
123
|
colorOff,
|
|
107
|
-
|
|
124
|
+
fillMode
|
|
108
125
|
)
|
|
109
126
|
).attr(
|
|
110
127
|
"stroke",
|
|
111
128
|
nodeStroke(palette, node.shape, node.color, void 0, colorOff)
|
|
112
129
|
).attr("stroke-width", sNodeStrokeWidth);
|
|
113
130
|
}
|
|
114
|
-
function renderDecision(g, node, palette, isDark, colorOff,
|
|
131
|
+
function renderDecision(g, node, palette, isDark, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH) {
|
|
115
132
|
const w = node.width / 2;
|
|
116
133
|
const h = node.height / 2;
|
|
117
134
|
const points = [`${0},${-h}`, `${w},${0}`, `${0},${h}`, `${-w},${0}`].join(
|
|
@@ -126,14 +143,14 @@ function renderDecision(g, node, palette, isDark, colorOff, solid, sNodeStrokeWi
|
|
|
126
143
|
node.color,
|
|
127
144
|
void 0,
|
|
128
145
|
colorOff,
|
|
129
|
-
|
|
146
|
+
fillMode
|
|
130
147
|
)
|
|
131
148
|
).attr(
|
|
132
149
|
"stroke",
|
|
133
150
|
nodeStroke(palette, node.shape, node.color, void 0, colorOff)
|
|
134
151
|
).attr("stroke-width", sNodeStrokeWidth);
|
|
135
152
|
}
|
|
136
|
-
function renderIO(g, node, palette, isDark, colorOff,
|
|
153
|
+
function renderIO(g, node, palette, isDark, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH, sIoSkew = IO_SKEW) {
|
|
137
154
|
const w = node.width / 2;
|
|
138
155
|
const h = node.height / 2;
|
|
139
156
|
const sk = sIoSkew;
|
|
@@ -152,14 +169,14 @@ function renderIO(g, node, palette, isDark, colorOff, solid, sNodeStrokeWidth =
|
|
|
152
169
|
node.color,
|
|
153
170
|
void 0,
|
|
154
171
|
colorOff,
|
|
155
|
-
|
|
172
|
+
fillMode
|
|
156
173
|
)
|
|
157
174
|
).attr(
|
|
158
175
|
"stroke",
|
|
159
176
|
nodeStroke(palette, node.shape, node.color, void 0, colorOff)
|
|
160
177
|
).attr("stroke-width", sNodeStrokeWidth);
|
|
161
178
|
}
|
|
162
|
-
function renderSubroutine(g, node, palette, isDark, colorOff,
|
|
179
|
+
function renderSubroutine(g, node, palette, isDark, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH, sSubroutineInset = SUBROUTINE_INSET) {
|
|
163
180
|
const w = node.width;
|
|
164
181
|
const h = node.height;
|
|
165
182
|
const s = nodeStroke(palette, node.shape, node.color, void 0, colorOff);
|
|
@@ -170,14 +187,14 @@ function renderSubroutine(g, node, palette, isDark, colorOff, solid, sNodeStroke
|
|
|
170
187
|
node.color,
|
|
171
188
|
void 0,
|
|
172
189
|
colorOff,
|
|
173
|
-
|
|
190
|
+
fillMode
|
|
174
191
|
);
|
|
175
|
-
const innerStroke = solid ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : s;
|
|
192
|
+
const innerStroke = fillMode === "solid" ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : s;
|
|
176
193
|
g.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", 3).attr("ry", 3).attr("fill", fill).attr("stroke", s).attr("stroke-width", sNodeStrokeWidth);
|
|
177
194
|
g.append("line").attr("x1", -w / 2 + sSubroutineInset).attr("y1", -h / 2).attr("x2", -w / 2 + sSubroutineInset).attr("y2", h / 2).attr("stroke", innerStroke).attr("stroke-width", sNodeStrokeWidth);
|
|
178
195
|
g.append("line").attr("x1", w / 2 - sSubroutineInset).attr("y1", -h / 2).attr("x2", w / 2 - sSubroutineInset).attr("y2", h / 2).attr("stroke", innerStroke).attr("stroke-width", sNodeStrokeWidth);
|
|
179
196
|
}
|
|
180
|
-
function renderDocument(g, node, palette, isDark, colorOff,
|
|
197
|
+
function renderDocument(g, node, palette, isDark, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH, sDocWaveHeight = DOC_WAVE_HEIGHT) {
|
|
181
198
|
const w = node.width;
|
|
182
199
|
const h = node.height;
|
|
183
200
|
const waveH = sDocWaveHeight;
|
|
@@ -201,14 +218,14 @@ function renderDocument(g, node, palette, isDark, colorOff, solid, sNodeStrokeWi
|
|
|
201
218
|
node.color,
|
|
202
219
|
void 0,
|
|
203
220
|
colorOff,
|
|
204
|
-
|
|
221
|
+
fillMode
|
|
205
222
|
)
|
|
206
223
|
).attr(
|
|
207
224
|
"stroke",
|
|
208
225
|
nodeStroke(palette, node.shape, node.color, void 0, colorOff)
|
|
209
226
|
).attr("stroke-width", sNodeStrokeWidth);
|
|
210
227
|
}
|
|
211
|
-
function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff,
|
|
228
|
+
function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, fillMode, sNodeStrokeWidth = NODE_STROKE_WIDTH, sIoSkew = IO_SKEW, sSubroutineInset = SUBROUTINE_INSET, sDocWaveHeight = DOC_WAVE_HEIGHT) {
|
|
212
229
|
switch (node.shape) {
|
|
213
230
|
case "terminal":
|
|
214
231
|
renderTerminal(
|
|
@@ -218,7 +235,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
218
235
|
isDark,
|
|
219
236
|
endTerminalIds.has(node.id),
|
|
220
237
|
colorOff,
|
|
221
|
-
|
|
238
|
+
fillMode,
|
|
222
239
|
sNodeStrokeWidth
|
|
223
240
|
);
|
|
224
241
|
break;
|
|
@@ -229,7 +246,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
229
246
|
palette,
|
|
230
247
|
isDark,
|
|
231
248
|
colorOff,
|
|
232
|
-
|
|
249
|
+
fillMode,
|
|
233
250
|
sNodeStrokeWidth
|
|
234
251
|
);
|
|
235
252
|
break;
|
|
@@ -240,7 +257,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
240
257
|
palette,
|
|
241
258
|
isDark,
|
|
242
259
|
colorOff,
|
|
243
|
-
|
|
260
|
+
fillMode,
|
|
244
261
|
sNodeStrokeWidth
|
|
245
262
|
);
|
|
246
263
|
break;
|
|
@@ -251,7 +268,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
251
268
|
palette,
|
|
252
269
|
isDark,
|
|
253
270
|
colorOff,
|
|
254
|
-
|
|
271
|
+
fillMode,
|
|
255
272
|
sNodeStrokeWidth,
|
|
256
273
|
sIoSkew
|
|
257
274
|
);
|
|
@@ -263,7 +280,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
263
280
|
palette,
|
|
264
281
|
isDark,
|
|
265
282
|
colorOff,
|
|
266
|
-
|
|
283
|
+
fillMode,
|
|
267
284
|
sNodeStrokeWidth,
|
|
268
285
|
sSubroutineInset
|
|
269
286
|
);
|
|
@@ -275,7 +292,7 @@ function renderNodeShape(g, node, palette, isDark, endTerminalIds, colorOff, sol
|
|
|
275
292
|
palette,
|
|
276
293
|
isDark,
|
|
277
294
|
colorOff,
|
|
278
|
-
|
|
295
|
+
fillMode,
|
|
279
296
|
sNodeStrokeWidth,
|
|
280
297
|
sDocWaveHeight
|
|
281
298
|
);
|
|
@@ -383,13 +400,51 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
383
400
|
}
|
|
384
401
|
const labelPosMap = /* @__PURE__ */ new Map();
|
|
385
402
|
for (const lp of labelPositions) labelPosMap.set(lp.edgeIdx, lp);
|
|
403
|
+
const nodeGeom = /* @__PURE__ */ new Map();
|
|
404
|
+
for (const n of layout.nodes) {
|
|
405
|
+
nodeGeom.set(n.id, {
|
|
406
|
+
x: n.x,
|
|
407
|
+
y: n.y,
|
|
408
|
+
halfW: n.width / 2,
|
|
409
|
+
halfH: n.height / 2,
|
|
410
|
+
shape: n.shape
|
|
411
|
+
});
|
|
412
|
+
}
|
|
386
413
|
for (let ei = 0; ei < layout.edges.length; ei++) {
|
|
387
414
|
const edge = layout.edges[ei];
|
|
388
415
|
if (edge.points.length < 2) continue;
|
|
389
416
|
const edgeG = contentG.append("g").attr("class", "fc-edge-group").attr("data-line-number", String(edge.lineNumber)).attr("data-source", edge.source).attr("data-target", edge.target);
|
|
390
417
|
const edgeColor = palette.textMuted;
|
|
391
418
|
const markerId = "fc-arrow";
|
|
392
|
-
|
|
419
|
+
let drawPoints = edge.points;
|
|
420
|
+
const src = nodeGeom.get(edge.source);
|
|
421
|
+
const tgt = nodeGeom.get(edge.target);
|
|
422
|
+
if (src?.shape === "decision" || tgt?.shape === "decision") {
|
|
423
|
+
const pts = edge.points.map((p) => ({ x: p.x, y: p.y }));
|
|
424
|
+
const last = pts.length - 1;
|
|
425
|
+
if (tgt?.shape === "decision") {
|
|
426
|
+
pts[last] = clipPointToDiamond(
|
|
427
|
+
tgt.x,
|
|
428
|
+
tgt.y,
|
|
429
|
+
tgt.halfW,
|
|
430
|
+
tgt.halfH,
|
|
431
|
+
pts[last - 1].x,
|
|
432
|
+
pts[last - 1].y
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
if (src?.shape === "decision") {
|
|
436
|
+
pts[0] = clipPointToDiamond(
|
|
437
|
+
src.x,
|
|
438
|
+
src.y,
|
|
439
|
+
src.halfW,
|
|
440
|
+
src.halfH,
|
|
441
|
+
pts[1].x,
|
|
442
|
+
pts[1].y
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
drawPoints = pts;
|
|
446
|
+
}
|
|
447
|
+
const pathD = edgeSplinePath(drawPoints);
|
|
393
448
|
if (pathD) {
|
|
394
449
|
edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor).attr("stroke-width", sEdgeStrokeWidth).attr("marker-end", `url(#${markerId})`).attr("class", "fc-edge");
|
|
395
450
|
}
|
|
@@ -408,7 +463,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
408
463
|
}
|
|
409
464
|
}
|
|
410
465
|
const colorOff = graph.options?.["color"] === "off";
|
|
411
|
-
const
|
|
466
|
+
const fillMode = fillModeFromOptions(graph.options ?? {});
|
|
412
467
|
const noNotes = graph.options?.["no-notes"] === "on";
|
|
413
468
|
for (const node of layout.nodes) {
|
|
414
469
|
const nodeG = contentG.append("g").attr("transform", `translate(${node.x}, ${node.y})`).attr("class", "fc-node").attr("data-line-number", String(node.lineNumber)).attr("data-node-id", node.id);
|
|
@@ -425,7 +480,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
425
480
|
isDark,
|
|
426
481
|
endTerminalIds,
|
|
427
482
|
colorOff,
|
|
428
|
-
|
|
483
|
+
fillMode,
|
|
429
484
|
sNodeStrokeWidth,
|
|
430
485
|
sIoSkew,
|
|
431
486
|
sSubroutineInset,
|
|
@@ -439,7 +494,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
439
494
|
node.color,
|
|
440
495
|
isEnd,
|
|
441
496
|
colorOff,
|
|
442
|
-
|
|
497
|
+
fillMode
|
|
443
498
|
);
|
|
444
499
|
nodeG.append("text").attr("x", 0).attr("y", 0).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr(
|
|
445
500
|
"fill",
|
|
@@ -527,4 +582,4 @@ export {
|
|
|
527
582
|
renderFlowchart,
|
|
528
583
|
renderFlowchartForExport
|
|
529
584
|
};
|
|
530
|
-
//# sourceMappingURL=chunk-
|
|
585
|
+
//# sourceMappingURL=chunk-AZNXGWDC.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mix
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JYDMBWRP.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveColor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZKPPI6BF.js";
|
|
7
7
|
|
|
8
8
|
// src/clock/swatches.ts
|
|
9
9
|
function buildSwatches(palette, muted) {
|
|
@@ -32,4 +32,4 @@ function buildSwatches(palette, muted) {
|
|
|
32
32
|
export {
|
|
33
33
|
buildSwatches
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-B4XS2AF2.js.map
|