@diagrammo/dgmo 0.52.0 → 0.54.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 +59 -58
- package/.github/copilot-instructions.md +59 -58
- package/.windsurfrules +59 -58
- package/SKILL.md +59 -58
- package/dist/advanced.d.ts +101 -230
- package/dist/advanced.js +330 -658
- package/dist/analyzer-TDN5KJFP.js +15 -0
- package/dist/auto.css +14 -6
- package/dist/auto.js +163 -139
- package/dist/auto.mjs +1859 -885
- package/dist/block.css +14 -6
- package/dist/block.js +96 -81
- 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 +108 -0
- package/dist/charts-d3-25E4VWXO.js +27 -0
- package/dist/chunk-2CW5ZTNH.js +58 -0
- package/dist/{chunk-BPY242XU.js → chunk-2NYXI35Z.js} +32 -14
- package/dist/{chunk-AUIM2NVH.js → chunk-2NZOHEP4.js} +7 -8
- package/dist/{chunk-HFMYN6N2.js → chunk-3B2GXZCX.js} +4 -3
- package/dist/chunk-3FRO35WW.js +1158 -0
- package/dist/{chunk-J7TLCB2Q.js → chunk-3IUHKMJI.js} +2 -2
- package/dist/{chunk-R3YSD62R.js → chunk-3KHJJP3J.js} +3 -3
- package/dist/{chunk-6LBQ7ELG.js → chunk-3SBHODJ4.js} +36 -17
- package/dist/{chunk-4UNQ6X24.js → chunk-3SEEP2JM.js} +4 -4
- package/dist/{chunk-7L4UJOY6.js → chunk-3TYUXC7D.js} +2 -2
- package/dist/{chunk-Y2ZE3MSG.js → chunk-43E26CDA.js} +2 -2
- package/dist/{chunk-CCNDLW7Z.js → chunk-47JNEKJA.js} +9 -9
- package/dist/{chunk-WCT3NYCV.js → chunk-4ASYQ347.js} +33 -8
- package/dist/{chunk-I5IGB56C.js → chunk-4QV26TEG.js} +41 -1
- package/dist/{chunk-INE5YJBZ.js → chunk-4T6OCSJ2.js} +8 -8
- package/dist/{chunk-CXK4DZH3.js → chunk-4W2PE66Q.js} +12 -2
- package/dist/{chunk-7KINELPI.js → chunk-4ZIKWVSQ.js} +17 -16
- package/dist/{chunk-JED6ZDEE.js → chunk-5HWPEYWB.js} +2 -2
- package/dist/{chunk-HWX6ZHF3.js → chunk-5VXU6MND.js} +6 -6
- package/dist/{chunk-44VCIPHF.js → chunk-5XSNLXU5.js} +23 -20
- package/dist/{chunk-4AQRFDXL.js → chunk-62Y27T4C.js} +2 -2
- package/dist/{chunk-QHXCAEMX.js → chunk-6KL7TFLS.js} +5 -5
- package/dist/{chunk-5BHJZH62.js → chunk-6OYDOQ2Q.js} +18 -6
- package/dist/{chunk-5HILBT7X.js → chunk-7JDTNFAK.js} +3 -3
- package/dist/{chunk-JRCOYRRH.js → chunk-7K6NDSXH.js} +9 -9
- package/dist/{chunk-5NGAO4QK.js → chunk-7SP4C6EV.js} +11 -11
- package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
- package/dist/{chunk-WRNFDFPU.js → chunk-7U4OR7CD.js} +2 -2
- package/dist/{chunk-5RP7JRVP.js → chunk-7UPFTBOW.js} +21 -17
- package/dist/{chunk-AAXZDUOV.js → chunk-A3BDLDYG.js} +17 -16
- package/dist/{chunk-GCYTI3DE.js → chunk-ADCHLNWT.js} +56 -10
- package/dist/{chunk-QBZYACOG.js → chunk-ADYKAKE3.js} +3 -3
- package/dist/{chunk-HHKO6SKY.js → chunk-AHTTKERF.js} +3 -3
- package/dist/{chunk-BKVOYV6I.js → chunk-AJFHNS67.js} +15 -15
- package/dist/{chunk-EMLPOL77.js → chunk-AQEYUVGJ.js} +124 -41
- package/dist/{chunk-3LK5DNED.js → chunk-B4XS2AF2.js} +3 -3
- package/dist/{chunk-REJAIQ5S.js → chunk-B7N5KYXQ.js} +16 -16
- package/dist/chunk-BEOAKGNA.js +484 -0
- package/dist/{chunk-SMRFPVLQ.js → chunk-BM7MG6HT.js} +4 -4
- package/dist/{chunk-P3NRSSUU.js → chunk-BULHGPHK.js} +3 -3
- package/dist/{chunk-QZX5S6R3.js → chunk-BWYFIVZF.js} +149 -89
- package/dist/{chunk-UBLHQTLV.js → chunk-BZJIITYM.js} +11 -10
- package/dist/{chunk-PRI2OD4E.js → chunk-C2UORMIA.js} +11 -6
- package/dist/{chunk-3YRPZ7ZZ.js → chunk-CCGWX6AO.js} +4 -4
- package/dist/{chunk-H7KENAZO.js → chunk-COJW2NEY.js} +73 -13
- package/dist/{chunk-WBRZJOEC.js → chunk-COVYNAKJ.js} +6 -6
- package/dist/{chunk-7QE3XMRK.js → chunk-CSHFU6LT.js} +13 -13
- package/dist/{chunk-6EJITS44.js → chunk-DLU643TF.js} +7 -7
- package/dist/{chunk-LBMS4AW6.js → chunk-DPGQ5UMO.js} +14 -14
- package/dist/{chunk-LTXOLDUZ.js → chunk-EAI6XJ7D.js} +12 -5
- package/dist/{chunk-FT3ZYWET.js → chunk-EPRF3ZRV.js} +11 -10
- package/dist/chunk-EQOMY4PY.js +404 -0
- package/dist/{chunk-USZW2HHU.js → chunk-EQW6HOP4.js} +4 -3
- package/dist/{chunk-HBPDFCQY.js → chunk-F7XM366V.js} +10 -9
- package/dist/{chunk-DYWQFQJP.js → chunk-FFVFZLRT.js} +57 -24
- package/dist/{chunk-77FGAVZC.js → chunk-FR6UFVSV.js} +19 -17
- package/dist/{chunk-MUE65OTD.js → chunk-FVMKCZHF.js} +8 -6
- package/dist/{chunk-3QD7VP3U.js → chunk-GK32ZFZY.js} +17 -10
- package/dist/{chunk-TJVLKNGR.js → chunk-GKYHWJXI.js} +5 -5
- package/dist/{chunk-FQMUHRVC.js → chunk-GQ5ECRP4.js} +13 -10
- package/dist/{chunk-5QKQSSPO.js → chunk-GRM2A4BG.js} +4 -4
- package/dist/{chunk-OTOHI4JO.js → chunk-H3HFC3SQ.js} +2 -2
- package/dist/{chunk-BPIZNB5O.js → chunk-HAA25PLC.js} +10 -10
- package/dist/{chunk-YIBAWQGJ.js → chunk-HFEOOQ46.js} +4 -4
- package/dist/{chunk-J76PIKAT.js → chunk-HO3RCNF6.js} +3 -3
- package/dist/{chunk-7DF4J4RL.js → chunk-I47VHSPS.js} +19 -13
- package/dist/{chunk-5SEVICBT.js → chunk-ICKXIMBA.js} +10 -9
- package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
- package/dist/{chunk-SWSIKFEB.js → chunk-IOIMQHQ6.js} +4 -4
- package/dist/{chunk-6HQH6JZE.js → chunk-IYNKLCAZ.js} +7 -7
- package/dist/{chunk-YAA6IID3.js → chunk-J7HQPVYH.js} +2 -2
- package/dist/{chunk-WBM7ZNDI.js → chunk-JYDMBWRP.js} +35 -18
- package/dist/{chunk-ZJV7GYR4.js → chunk-KBVOVDYP.js} +8 -8
- package/dist/{chunk-ICPJPQ5C.js → chunk-KDK5EKUR.js} +3 -3
- package/dist/{chunk-FHGVORFO.js → chunk-KINOX74I.js} +12 -12
- package/dist/{chunk-XD6ZYURY.js → chunk-KQ3FNRGR.js} +7 -14
- package/dist/{chunk-3HGU63UY.js → chunk-KQYQECWQ.js} +17 -16
- package/dist/{chunk-MUVJ57EP.js → chunk-KS5ZSM5T.js} +20 -17
- package/dist/{chunk-FY5MSZAP.js → chunk-KV4HLIJE.js} +21 -6
- package/dist/{chunk-LGT3PZCJ.js → chunk-LPJ6H5X4.js} +17 -17
- package/dist/{chunk-ONU3U4GL.js → chunk-LRSW4JLE.js} +52 -16
- package/dist/{chunk-TPFKKXCB.js → chunk-M24VXUFG.js} +7 -7
- package/dist/{chunk-QJMKPUYK.js → chunk-M3H7ZE6C.js} +21 -14
- package/dist/{chunk-QVENJMNX.js → chunk-MEQYZZFR.js} +2 -2
- package/dist/{chunk-75G3Q4DK.js → chunk-MTZOXISJ.js} +9 -9
- package/dist/{chunk-J7KJR3R6.js → chunk-N7BSBAVP.js} +133 -696
- package/dist/{chunk-VQOCMUWI.js → chunk-NUTWTV6G.js} +13 -11
- package/dist/{chunk-7BIZCTAX.js → chunk-O576GYAP.js} +3 -3
- package/dist/{chunk-H6PI3KJT.js → chunk-ODUT5WMC.js} +2 -2
- package/dist/{chunk-AL672HNE.js → chunk-OJ435DQZ.js} +17 -7
- package/dist/{chunk-3HF5YEFJ.js → chunk-OR3R27CU.js} +4 -4
- package/dist/{chunk-QGATPIPX.js → chunk-OSXQKC3S.js} +35 -23
- package/dist/{chunk-FUPF2UYQ.js → chunk-PIXZTCKH.js} +51 -108
- package/dist/{chunk-QOOUC2J5.js → chunk-Q5IHQ4NW.js} +12 -2
- package/dist/{chunk-4IHAV6O7.js → chunk-QBYP2FBZ.js} +10 -478
- package/dist/{chunk-GU46PPT3.js → chunk-QXGACPS2.js} +5 -5
- package/dist/{chunk-FMDSF3OV.js → chunk-QZAW5SFH.js} +2 -2
- package/dist/{chunk-YTMTPUH4.js → chunk-R5BGGBFF.js} +4 -4
- package/dist/{chunk-KGVZ5VGH.js → chunk-RIEAN4D5.js} +16 -12
- package/dist/{chunk-5223KXFD.js → chunk-RJ5LBZ5U.js} +7 -7
- package/dist/{chunk-K4EOKJA6.js → chunk-RRGKMJYL.js} +45 -18
- package/dist/{chunk-TTIM6YTT.js → chunk-S7FOIURR.js} +14 -13
- package/dist/{chunk-IM6PDDCE.js → chunk-S7YFT3PO.js} +78 -23
- package/dist/{chunk-ZEF5M5MB.js → chunk-SBOAZ7YK.js} +82 -296
- package/dist/{chunk-6NYWYNBI.js → chunk-SSHS42QG.js} +6 -6
- package/dist/{chunk-NNS4E7CW.js → chunk-T3FAJAJT.js} +18 -9
- package/dist/{chunk-ROOE4R4Y.js → chunk-T7Y554OK.js} +146 -18
- package/dist/chunk-TGOMHUOV.js +218 -0
- package/dist/{chunk-K2I2XOZD.js → chunk-TJN2OIVG.js} +30 -15
- package/dist/{chunk-VILVLS7P.js → chunk-TLNVYWPA.js} +8 -4
- package/dist/{chunk-GJFAMOGK.js → chunk-U4IN6AHE.js} +7 -7
- package/dist/chunk-U7VO6JAA.js +566 -0
- package/dist/{chunk-MX2EY5Y7.js → chunk-UEU6IYKY.js} +2 -2
- package/dist/{chunk-J6QROYDA.js → chunk-UIT7E6UF.js} +26 -10
- package/dist/{chunk-Z72XRXD4.js → chunk-UJRTPOHH.js} +3 -3
- package/dist/{chunk-TYS6CSS5.js → chunk-UU6LUYUH.js} +2 -2
- package/dist/{chunk-VL2O2F3W.js → chunk-VHO3YBTB.js} +2 -2
- package/dist/{chunk-4YFKQ5WT.js → chunk-VMSBMIHW.js} +5 -5
- package/dist/{chunk-Z5QVYKR7.js → chunk-VQFDBNYF.js} +4 -4
- package/dist/{chunk-UNURMIQO.js → chunk-W6PCFRPL.js} +4 -4
- package/dist/{chunk-FFUN5D66.js → chunk-WF64MW5G.js} +2 -2
- package/dist/{chunk-T4A4TSTJ.js → chunk-WKNAJ4BR.js} +20 -18
- package/dist/{chunk-CIRFIL4M.js → chunk-WW4BQ744.js} +11 -11
- package/dist/{chunk-ARGMQ3H4.js → chunk-WWHECSYZ.js} +3 -3
- package/dist/{chunk-ZNWAYU6N.js → chunk-XWODFBHJ.js} +73 -18
- package/dist/{chunk-HQQNCY7W.js → chunk-YENNFS5F.js} +10 -10
- package/dist/{chunk-TLVIHFRO.js → chunk-ZKPPI6BF.js} +2 -2
- package/dist/cli.cjs +173 -157
- package/dist/clock.js +9 -1
- package/dist/completion-registry.d.ts +129 -0
- package/dist/completion-registry.js +1270 -0
- package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
- package/dist/countdown.js +4 -3
- package/dist/dgmo-router-TGZWFIZO.js +88 -0
- package/dist/dimensions-L6BXQXXL.js +22 -0
- package/dist/editor.js +51 -5
- package/dist/element.js +163 -139
- package/dist/element.mjs +1859 -885
- package/dist/flowchart-parser-UKYOW3VM.js +21 -0
- package/dist/{flowchart-renderer-MNCDS7MV.js → flowchart-renderer-DCFKUDDR.js} +16 -16
- package/dist/highlight.js +55 -6
- package/dist/index.d.ts +4 -2
- package/dist/index.js +89 -81
- package/dist/layout-25Y3VDYF.js +19 -0
- package/dist/layout-4SPLI4HG.js +15 -0
- package/dist/layout-5XGYNYVT.js +9 -0
- package/dist/{layout-OAC4PEAC.js → layout-A6OIGZN2.js} +7 -7
- package/dist/layout-AZUPXWSK.js +15 -0
- package/dist/{layout-F4WO357A.js → layout-CAAKQX4W.js} +3 -3
- package/dist/{layout-A5UHRWVH.js → layout-CB3XWCOI.js} +3 -3
- package/dist/layout-CH4HFFRD.js +15 -0
- package/dist/layout-G2ABQJQZ.js +20 -0
- package/dist/{layout-7QXCNOVS.js → layout-HBWT2G23.js} +3 -3
- package/dist/{layout-2L3WMRYU.js → layout-ITLPDG6M.js} +9 -8
- package/dist/layout-NF4EWFLT.js +17 -0
- package/dist/layout-NY7MHJCL.js +15 -0
- package/dist/layout-QBNAMEOA.js +19 -0
- package/dist/layout-SP7HJWKA.js +17 -0
- package/dist/{layout-search-55FU6HD3.js → layout-search-LUI475P3.js} +56 -35
- package/dist/legend-constants-B77VKB3R.js +54 -0
- package/dist/{palettes-UDLZ2SA4.js → palettes-FGTNFARW.js} +4 -4
- package/dist/parser-2UWWNTFL.js +12 -0
- package/dist/parser-3RXYQSA7.js +18 -0
- package/dist/parser-5C3PEZK3.js +11 -0
- package/dist/parser-66RYGJRB.js +20 -0
- package/dist/parser-6GN5YJBJ.js +13 -0
- package/dist/parser-6MQM7WT3.js +15 -0
- package/dist/{parser-DQAFLUJB.js → parser-7UI6UQ7B.js} +7 -7
- package/dist/parser-B2A7XOAK.js +12 -0
- package/dist/parser-CCNJKDDA.js +16 -0
- package/dist/parser-ESHNUFME.js +13 -0
- package/dist/parser-F4FEU57T.js +11 -0
- package/dist/parser-FHRMFUNX.js +15 -0
- package/dist/parser-FPCWDYQV.js +13 -0
- package/dist/parser-FY3YFFBS.js +20 -0
- package/dist/parser-GML6V2KZ.js +14 -0
- package/dist/parser-HA3PF5FL.js +15 -0
- package/dist/parser-KTYF6WO5.js +11 -0
- package/dist/{parser-ZL5QUFVH.js → parser-LTA2BOZO.js} +5 -5
- package/dist/parser-LU7UAKNB.js +13 -0
- package/dist/parser-MHKYQPC2.js +11 -0
- package/dist/parser-MVSYFK63.js +17 -0
- package/dist/parser-O7YQYFEN.js +15 -0
- package/dist/parser-OPIXXUY4.js +21 -0
- package/dist/parser-S4EJPNVN.js +19 -0
- package/dist/parser-T3D7BV6O.js +11 -0
- package/dist/{parser-YKYMQG3B.js → parser-VVE4THG3.js} +6 -6
- package/dist/parser-WPPJGB4R.js +12 -0
- package/dist/parser-X5XLFY4Z.js +22 -0
- package/dist/parser-XCPMEB2Z.js +11 -0
- package/dist/parser-XRDUX2AR.js +14 -0
- package/dist/parser-YPWYT46P.js +16 -0
- package/dist/parser-YULS5MLD.js +13 -0
- package/dist/pert.d.ts +2 -0
- package/dist/registry-CaSw0PSH.d.ts +350 -0
- package/dist/renderer-2DME63VZ.js +16 -0
- package/dist/renderer-3VY3VXJE.js +37 -0
- package/dist/renderer-4A32DX5L.js +24 -0
- package/dist/renderer-4K5YYX5R.js +28 -0
- package/dist/renderer-6CFML5G3.js +22 -0
- package/dist/renderer-7HMZ5OCJ.js +16 -0
- package/dist/renderer-7ZNVOVFG.js +16 -0
- package/dist/{renderer-CQY6ATOS.js → renderer-B7Y6I7JX.js} +9 -8
- package/dist/renderer-C3RI4OPJ.js +33 -0
- package/dist/renderer-CJ56SUMF.js +26 -0
- package/dist/renderer-COJZZ4F6.js +25 -0
- package/dist/renderer-FXMGCSRP.js +26 -0
- package/dist/{renderer-HSHHVYWF.js → renderer-G4UOW3RH.js} +7 -7
- package/dist/renderer-HQ4JFZOV.js +27 -0
- package/dist/{renderer-NHO46CT2.js → renderer-K7XLVPH5.js} +6 -6
- package/dist/{renderer-ZWIH4WDW.js → renderer-LHVCKEWF.js} +13 -13
- package/dist/renderer-OZX5KGQM.js +21 -0
- package/dist/{renderer-3F7OS2AX.js → renderer-P3YQES7B.js} +16 -16
- package/dist/renderer-PLVIARM7.js +24 -0
- package/dist/renderer-RA4PTAMF.js +19 -0
- package/dist/renderer-RMAM2SOJ.js +28 -0
- package/dist/renderer-SES7QZYL.js +37 -0
- package/dist/renderer-TQ5QDZOE.js +22 -0
- package/dist/renderer-V5SNTPAM.js +27 -0
- package/dist/{renderer-5DAKMIU2.js → renderer-WCWI4I6A.js} +5 -5
- package/dist/renderer-WVD6G2TS.js +34 -0
- package/dist/{renderer-DT4XRFEP.js → renderer-X2LYSMLU.js} +7 -7
- package/dist/renderer-Y3NXZINM.js +24 -0
- package/dist/{renderer-KNFTTOBL.js → renderer-YEFOOULC.js} +14 -14
- package/dist/renderer-YP3P6UVT.js +24 -0
- package/dist/renderer-YVMETH6V.js +29 -0
- package/dist/renderer-Z4GNKNXO.js +24 -0
- package/dist/renderer-radial-VYBZAXXE.js +21 -0
- package/dist/{resolver-EMTGNR3D.js → resolver-WFKZYBJ2.js} +4 -4
- package/dist/state-parser-VIW2WNA5.js +19 -0
- package/dist/state-renderer-H22AQD3U.js +38 -0
- package/dist/{themes-32xj5ZTW.d.ts → themes-tbBkIVsn.d.ts} +2 -349
- package/docs/ai-integration.md +59 -58
- package/docs/language-reference.md +323 -286
- 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 +9 -1
- package/dist/analyzer-BJ54GIFB.js +0 -15
- package/dist/calculator-LDYQCDDY.js +0 -11
- package/dist/charts-d3-MXEP6BNP.js +0 -26
- package/dist/chunk-BRENJ2BQ.js +0 -714
- package/dist/chunk-FQ7HTV52.js +0 -364
- package/dist/dgmo-router-X7ZGAPIE.js +0 -86
- package/dist/dimensions-45H6JQEY.js +0 -22
- package/dist/flowchart-parser-UKELHBSB.js +0 -21
- package/dist/layout-46N4JJYK.js +0 -17
- package/dist/layout-A4XWNVID.js +0 -14
- package/dist/layout-AM2JWW3X.js +0 -15
- package/dist/layout-EE6GE46Y.js +0 -17
- package/dist/layout-G23F7LDH.js +0 -9
- package/dist/layout-GM4UGR7B.js +0 -19
- package/dist/layout-GQQJXNYH.js +0 -15
- package/dist/layout-IIE2S5FK.js +0 -20
- package/dist/layout-VMCRX66I.js +0 -14
- package/dist/layout-ZDOSXL5G.js +0 -19
- package/dist/parser-2ECN6JA2.js +0 -16
- package/dist/parser-4WTIHM5J.js +0 -11
- package/dist/parser-5H2BTSJQ.js +0 -11
- package/dist/parser-75KVXUNS.js +0 -16
- package/dist/parser-774AC53T.js +0 -13
- package/dist/parser-BE4YCSRU.js +0 -11
- package/dist/parser-CNGUQUQI.js +0 -11
- package/dist/parser-DEUUSQIN.js +0 -22
- package/dist/parser-EYCKNKQA.js +0 -21
- package/dist/parser-FXISIU6A.js +0 -14
- package/dist/parser-GTB4XC7P.js +0 -18
- package/dist/parser-GVEPAUSD.js +0 -12
- package/dist/parser-HSQGTY4G.js +0 -19
- package/dist/parser-HVKRINUS.js +0 -11
- package/dist/parser-J5MIEYO4.js +0 -15
- package/dist/parser-KMZIXLDZ.js +0 -13
- package/dist/parser-LJHXWSXU.js +0 -14
- package/dist/parser-PT3W72G5.js +0 -15
- package/dist/parser-SBJQDPHL.js +0 -15
- package/dist/parser-SUWWWCMX.js +0 -12
- package/dist/parser-SXDRNZOA.js +0 -13
- package/dist/parser-UMILOW3M.js +0 -14
- package/dist/parser-UP3AZ367.js +0 -13
- package/dist/parser-WHPRV3X5.js +0 -20
- package/dist/parser-WX3UODSJ.js +0 -12
- package/dist/parser-XCIEN3KN.js +0 -13
- package/dist/parser-XIRTUMVN.js +0 -18
- package/dist/parser-YKCGIG45.js +0 -11
- package/dist/parser-ZGM2OJ6Y.js +0 -22
- package/dist/renderer-4QB4K7Q3.js +0 -24
- package/dist/renderer-5H4SY7YY.js +0 -22
- package/dist/renderer-5PIQPFOX.js +0 -16
- package/dist/renderer-6MU37QF5.js +0 -19
- package/dist/renderer-AQVMWJ4M.js +0 -27
- package/dist/renderer-BDDW6K7N.js +0 -24
- package/dist/renderer-BNB3VIDY.js +0 -26
- package/dist/renderer-CVW75CXL.js +0 -37
- package/dist/renderer-ERHBSTQT.js +0 -25
- package/dist/renderer-IDPVUFNB.js +0 -28
- package/dist/renderer-ILX6BGKR.js +0 -21
- package/dist/renderer-JP663HKG.js +0 -22
- package/dist/renderer-MVUZBESR.js +0 -16
- package/dist/renderer-N4EBR2FV.js +0 -28
- package/dist/renderer-NO2QJ5LZ.js +0 -27
- package/dist/renderer-OGFV5RXX.js +0 -34
- package/dist/renderer-PDLESJMS.js +0 -37
- package/dist/renderer-T4MTNINC.js +0 -24
- package/dist/renderer-TOUGFGTM.js +0 -24
- package/dist/renderer-U3KPD43Y.js +0 -34
- package/dist/renderer-X334IJU2.js +0 -26
- package/dist/renderer-Y5OAMOCR.js +0 -23
- package/dist/renderer-YONAKAJU.js +0 -16
- package/dist/renderer-YWMI6Y2U.js +0 -29
- package/dist/renderer-radial-7CGZMVMS.js +0 -21
- package/dist/state-parser-BATWAID2.js +0 -18
- package/dist/state-renderer-3FKZJ3LP.js +0 -34
|
@@ -0,0 +1,1158 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RECOGNIZED_COLOR_NAMES,
|
|
3
|
+
invalidColorDiagnostic,
|
|
4
|
+
resolveColor,
|
|
5
|
+
resolveColorWithDiagnostic
|
|
6
|
+
} from "./chunk-ZKPPI6BF.js";
|
|
7
|
+
import {
|
|
8
|
+
METADATA_DIAGNOSTIC_CODES,
|
|
9
|
+
emptyMetadataValueMessage,
|
|
10
|
+
makeDgmoError,
|
|
11
|
+
suggest
|
|
12
|
+
} from "./chunk-4W2PE66Q.js";
|
|
13
|
+
|
|
14
|
+
// src/directives-registry.ts
|
|
15
|
+
var DIRECTIVES_REGISTRY = [
|
|
16
|
+
// ── Universal date handling (§ BL-121) ───────────────────
|
|
17
|
+
// Accepted in every date-bearing chart (gantt, pert, countdown, timeline,
|
|
18
|
+
// event-line). Handled inline by each parser's prescan — no parser-Set
|
|
19
|
+
// membership here — so they only contribute highlighting (DIRECTIVE_KEYWORDS).
|
|
20
|
+
{ token: "year", category: "directive" },
|
|
21
|
+
{ token: "date-order", category: "directive" },
|
|
22
|
+
{ token: "no-current-year", category: "directive" },
|
|
23
|
+
// ── Infra ────────────────────────────────────────────────
|
|
24
|
+
// Top-level SLO options that are ALSO accepted as node colon-properties
|
|
25
|
+
// (dual membership). Highlight bare (kept in DIRECTIVE_KEYWORDS) — their
|
|
26
|
+
// rarer colon form stays keyword, an accepted minor false-positive.
|
|
27
|
+
{
|
|
28
|
+
token: "slo-availability",
|
|
29
|
+
category: "directive",
|
|
30
|
+
infra: ["top-level", "behavior"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
token: "slo-p90-latency-ms",
|
|
34
|
+
category: "directive",
|
|
35
|
+
infra: ["top-level", "behavior"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
token: "slo-warning-margin",
|
|
39
|
+
category: "directive",
|
|
40
|
+
infra: ["top-level", "behavior"]
|
|
41
|
+
},
|
|
42
|
+
// Top-level-only options (space-separated, bare).
|
|
43
|
+
{ token: "default-latency-ms", category: "directive", infra: ["top-level"] },
|
|
44
|
+
{ token: "default-uptime", category: "directive", infra: ["top-level"] },
|
|
45
|
+
{ token: "default-rps", category: "directive", infra: ["top-level"] },
|
|
46
|
+
// `active-tag` is shared with gantt + map (see below).
|
|
47
|
+
// Node behavior colon-keys — highlight as propertyName.
|
|
48
|
+
{ token: "latency-ms", colonKey: true, infra: ["behavior"] },
|
|
49
|
+
{ token: "uptime", colonKey: true, infra: ["behavior"] },
|
|
50
|
+
{ token: "instances", colonKey: true, infra: ["behavior"] },
|
|
51
|
+
{ token: "max-rps", colonKey: true, infra: ["behavior"] },
|
|
52
|
+
{ token: "cache-hit", colonKey: true, infra: ["behavior"] },
|
|
53
|
+
{ token: "firewall-block", colonKey: true, infra: ["behavior"] },
|
|
54
|
+
{ token: "ratelimit-rps", colonKey: true, infra: ["behavior"] },
|
|
55
|
+
{ token: "buffer", colonKey: true, infra: ["behavior"] },
|
|
56
|
+
{ token: "drain-rate", colonKey: true, infra: ["behavior"] },
|
|
57
|
+
{ token: "retention-hours", colonKey: true, infra: ["behavior"] },
|
|
58
|
+
{ token: "partitions", colonKey: true, infra: ["behavior"] },
|
|
59
|
+
{ token: "concurrency", colonKey: true, infra: ["behavior"] },
|
|
60
|
+
{ token: "duration-ms", colonKey: true, infra: ["behavior"] },
|
|
61
|
+
{ token: "cold-start-ms", colonKey: true, infra: ["behavior"] },
|
|
62
|
+
{ token: "cb-error-threshold", colonKey: true, infra: ["behavior"] },
|
|
63
|
+
{ token: "cb-latency-threshold-ms", colonKey: true, infra: ["behavior"] },
|
|
64
|
+
// Edge-only colon-key.
|
|
65
|
+
{ token: "rps", colonKey: true, infra: ["edge"] },
|
|
66
|
+
// ── Gantt ────────────────────────────────────────────────
|
|
67
|
+
{ token: "start", category: "directive", gantt: ["option"] },
|
|
68
|
+
{
|
|
69
|
+
token: "today-marker",
|
|
70
|
+
category: "directive",
|
|
71
|
+
gantt: ["option", "boolean"]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
token: "critical-path",
|
|
75
|
+
category: "directive",
|
|
76
|
+
gantt: ["option", "boolean"]
|
|
77
|
+
},
|
|
78
|
+
{ token: "sprint-length", category: "directive", gantt: ["option"] },
|
|
79
|
+
{ token: "sprint-number", category: "directive", gantt: ["option"] },
|
|
80
|
+
{ token: "sprint-start", category: "directive", gantt: ["option"] },
|
|
81
|
+
{ token: "fill-tint", category: "directive", gantt: ["boolean"] },
|
|
82
|
+
{ token: "fill-solid", category: "directive", gantt: ["boolean"] },
|
|
83
|
+
{ token: "fill-outline", category: "directive", gantt: ["boolean"] },
|
|
84
|
+
// `chart` is a wireframe element keyword (CONTROL); gantt also accepts it as
|
|
85
|
+
// an option. Highlight family is control.
|
|
86
|
+
{ token: "chart", category: "control", gantt: ["option"] },
|
|
87
|
+
// `dependencies` is ON by default → almost never written bare (authors write
|
|
88
|
+
// `no-dependencies`, which DOES highlight). Bare word collides with prose and
|
|
89
|
+
// the specializer is context-free, so it stays plain. Present for parser
|
|
90
|
+
// Set derivation only.
|
|
91
|
+
{ token: "dependencies", noHighlight: true, gantt: ["option", "boolean"] },
|
|
92
|
+
// ── Map ──────────────────────────────────────────────────
|
|
93
|
+
// Per-element value→channel ramps (decision #20): the directive names the
|
|
94
|
+
// visual channel — `region-heat` (colour), `poi-size` (marker area),
|
|
95
|
+
// `flow-width` (stroke). The per-element key mirrors it (`heat:`/`size:`/`width:`).
|
|
96
|
+
{ token: "region-heat", category: "directive", map: true },
|
|
97
|
+
{ token: "poi-size", category: "directive", map: true },
|
|
98
|
+
{ token: "flow-width", category: "directive", map: true },
|
|
99
|
+
{ token: "locale", category: "directive", map: true },
|
|
100
|
+
{ token: "caption", category: "directive", map: true },
|
|
101
|
+
{ token: "no-coastline", category: "directive", map: true },
|
|
102
|
+
{ token: "no-relief", category: "directive", map: true },
|
|
103
|
+
{ token: "no-context-labels", category: "directive", map: true },
|
|
104
|
+
{ token: "no-region-labels", category: "directive", map: true },
|
|
105
|
+
{ token: "no-region-heat-value", category: "directive", map: true },
|
|
106
|
+
{ token: "no-poi-labels", category: "directive", map: true },
|
|
107
|
+
{ token: "no-colorize", category: "directive", map: true },
|
|
108
|
+
{ token: "no-cities", category: "directive", map: true },
|
|
109
|
+
{ token: "no-cluster-pois", category: "directive", map: true },
|
|
110
|
+
// ── Clock channel (BL-122): live local-time cards on POIs flagged `clock` ──
|
|
111
|
+
// Activation is the per-POI `clock` flag (peeled in the map parser, not a
|
|
112
|
+
// directive). `hours 9-17` / `days mon-fri` are the global availability
|
|
113
|
+
// window (reused verbatim from the clock chart type).
|
|
114
|
+
{ token: "hours", category: "directive", map: true },
|
|
115
|
+
{ token: "days", category: "directive", map: true },
|
|
116
|
+
// ── Shared across types ──────────────────────────────────
|
|
117
|
+
// `active-tag`: infra top-level option + gantt option + map directive.
|
|
118
|
+
// Treemap also accepts it (§24C.6, decision #48) — validated inline in its
|
|
119
|
+
// parser, so no chart-scoped Set is derived for it; highlighting comes from
|
|
120
|
+
// the global directive category here.
|
|
121
|
+
{
|
|
122
|
+
token: "active-tag",
|
|
123
|
+
category: "directive",
|
|
124
|
+
infra: ["top-level"],
|
|
125
|
+
gantt: ["option"],
|
|
126
|
+
map: true
|
|
127
|
+
},
|
|
128
|
+
// `title`: gantt option. (The data-chart `title` directive was removed in
|
|
129
|
+
// decision #48 — it now raises E_TITLE_DIRECTIVE; the token stays here for
|
|
130
|
+
// gantt.)
|
|
131
|
+
{ token: "title", category: "directive", gantt: ["option"] },
|
|
132
|
+
// `sort`: gantt option (also general, hand-listed).
|
|
133
|
+
{ token: "sort", category: "directive", gantt: ["option"] },
|
|
134
|
+
// `lane-by <group>`: swimlane axis (view-state). NB not `swimlane` — that's a
|
|
135
|
+
// chart type. Kanban reads it via its own KNOWN_OPTIONS; gantt via the switch.
|
|
136
|
+
{ token: "lane-by", category: "directive", gantt: ["option"] },
|
|
137
|
+
// `no-title`: gantt boolean + map directive (also general, hand-listed).
|
|
138
|
+
{ token: "no-title", category: "directive", gantt: ["boolean"], map: true },
|
|
139
|
+
// `no-legend`: universal (decision #48) — every chart that renders a legend
|
|
140
|
+
// accepts it, and charts without one take it as a harmless no-op. Parsed for
|
|
141
|
+
// most types via GLOBAL_BOOLEANS in utils/parsing; gantt derives its boolean
|
|
142
|
+
// Set from here, and map from `map: true`.
|
|
143
|
+
{ token: "no-legend", category: "directive", gantt: ["boolean"], map: true },
|
|
144
|
+
// ══════════════════════════════════════════════════════════
|
|
145
|
+
// Highlight-only vocab (no extractable parser Set).
|
|
146
|
+
// ══════════════════════════════════════════════════════════
|
|
147
|
+
// These chart types validate their directives with inline checks rather than
|
|
148
|
+
// a literal Set, so there is no parser literal to delete — the registry is
|
|
149
|
+
// simply their single declaration site for highlighting. Grouped by chart
|
|
150
|
+
// type. Categories route to the specializer-read sets in keywords.ts.
|
|
151
|
+
// ── Gantt (extras beyond the option/boolean Sets) ────────
|
|
152
|
+
{ token: "era", category: "directive" },
|
|
153
|
+
{ token: "marker", category: "directive" },
|
|
154
|
+
{ token: "holiday", category: "directive" },
|
|
155
|
+
// `workweek` is also the canonical weekday-window directive on clock and map
|
|
156
|
+
// clock-cards (decision #48; `days` stays as the legacy alias).
|
|
157
|
+
{ token: "workweek", category: "directive", map: true },
|
|
158
|
+
{ token: "no-dependencies", category: "directive" },
|
|
159
|
+
// ── Tech-radar ───────────────────────────────────────────
|
|
160
|
+
{ token: "rings", category: "directive" },
|
|
161
|
+
// Blip listing is default-on everywhere (decision #48): `no-blip-legend`
|
|
162
|
+
// suppresses it; `show-blip-legend` stays as the parse-accepted legacy no-op.
|
|
163
|
+
{ token: "no-blip-legend", category: "directive" },
|
|
164
|
+
{ token: "show-blip-legend", category: "directive" },
|
|
165
|
+
{ token: "trend", category: "directive" },
|
|
166
|
+
// ── Tags / shared directives ─────────────────────────────
|
|
167
|
+
{ token: "tags", category: "directive" },
|
|
168
|
+
{ token: "import", category: "directive" },
|
|
169
|
+
{ token: "hide", category: "directive" },
|
|
170
|
+
{ token: "direction", category: "directive" },
|
|
171
|
+
// ── Clock ────────────────────────────────────────────────
|
|
172
|
+
// The board's flat directives — highlight-only (the parser validates them
|
|
173
|
+
// inline, no extractable Set). `no-title` + `direction` are already listed
|
|
174
|
+
// above (shared). Values (analog is a bare flag; color-by's
|
|
175
|
+
// place|work|daylight|time|none) highlight as plain tokens.
|
|
176
|
+
{ token: "analog", category: "directive" },
|
|
177
|
+
{ token: "hours", category: "directive" },
|
|
178
|
+
{ token: "days", category: "directive" },
|
|
179
|
+
{ token: "no-sun", category: "directive" },
|
|
180
|
+
{ token: "time-24", category: "directive" },
|
|
181
|
+
{ token: "color-by", category: "directive" },
|
|
182
|
+
// ── Boxes-and-lines ──────────────────────────────────────
|
|
183
|
+
// `heat <Label> [low] [high]` is the value→colour ramp directive, but `heat`
|
|
184
|
+
// is NOT registered as a directive keyword: it is dual-use with the `heat:`
|
|
185
|
+
// metadata key (decision #20), and a token in DIRECTIVE_KEYWORDS would block the
|
|
186
|
+
// ATTRIBUTE_KEYS colon-gate from reclassifying `heat:` as a propertyName. So
|
|
187
|
+
// `heat` lives only in the reserved-key registry + ATTRIBUTE_KEYS and highlights
|
|
188
|
+
// as a property in both positions — exactly the treemap `heat` precedent.
|
|
189
|
+
// Box values render by default since decision #48; `show-values` stays as
|
|
190
|
+
// the parse-accepted legacy no-op (suppress with the shared `no-value`).
|
|
191
|
+
{ token: "show-values", category: "directive" },
|
|
192
|
+
// Treemap's legacy plural spelling of the same suppression (decision #48
|
|
193
|
+
// made the shared singular `no-value` canonical). Registered so a legacy
|
|
194
|
+
// document still highlights it as a directive rather than plain text.
|
|
195
|
+
{ token: "no-values", category: "directive" },
|
|
196
|
+
// ── Swimlane ─────────────────────────────────────────────
|
|
197
|
+
{ token: "lane", category: "directive" },
|
|
198
|
+
// ── ER ───────────────────────────────────────────────────
|
|
199
|
+
{ token: "notation", category: "directive" },
|
|
200
|
+
// ── Class ────────────────────────────────────────────────
|
|
201
|
+
{ token: "extends", category: "directive" },
|
|
202
|
+
{ token: "implements", category: "directive" },
|
|
203
|
+
{ token: "abstract", category: "directive" },
|
|
204
|
+
{ token: "interface", category: "directive" },
|
|
205
|
+
{ token: "enum", category: "directive" },
|
|
206
|
+
// ── C4 ───────────────────────────────────────────────────
|
|
207
|
+
{ token: "containers", category: "directive" },
|
|
208
|
+
{ token: "components", category: "directive" },
|
|
209
|
+
{ token: "deployment", category: "directive" },
|
|
210
|
+
{ token: "technology", category: "directive" },
|
|
211
|
+
// ── Infra (directives beyond the option/behavior Sets) ───
|
|
212
|
+
{ token: "sub-node-label", category: "directive" },
|
|
213
|
+
{ token: "show-sub-node-count", category: "directive" },
|
|
214
|
+
{ token: "animate", category: "directive" },
|
|
215
|
+
// ── Sequence ─────────────────────────────────────────────
|
|
216
|
+
{ token: "activations", category: "directive" },
|
|
217
|
+
{ token: "no-activations", category: "directive" },
|
|
218
|
+
// ── Map element leaders (not in DIRECTIVE_SET) ───────────
|
|
219
|
+
{ token: "poi", category: "directive" },
|
|
220
|
+
{ token: "route", category: "directive" },
|
|
221
|
+
// ── Data charts ──────────────────────────────────────────
|
|
222
|
+
{ token: "stacked", category: "directive" },
|
|
223
|
+
{ token: "no-name", category: "directive" },
|
|
224
|
+
{ token: "no-value", category: "directive" },
|
|
225
|
+
{ token: "no-percent", category: "directive" },
|
|
226
|
+
{ token: "series", category: "directive" },
|
|
227
|
+
{ token: "orientation", category: "directive" },
|
|
228
|
+
{ token: "x-label", category: "directive" },
|
|
229
|
+
{ token: "y-label", category: "directive" },
|
|
230
|
+
{ token: "size-label", category: "directive" },
|
|
231
|
+
{ token: "columns", category: "directive" },
|
|
232
|
+
{ token: "rows", category: "directive" },
|
|
233
|
+
{ token: "labels", category: "directive" },
|
|
234
|
+
{ token: "rotate", category: "directive" },
|
|
235
|
+
{ token: "scale", category: "directive" },
|
|
236
|
+
{ token: "values", category: "directive" },
|
|
237
|
+
{ token: "orientation-horizontal", category: "directive" },
|
|
238
|
+
// ── Slope ────────────────────────────────────────────────
|
|
239
|
+
{ token: "period", category: "directive" },
|
|
240
|
+
// ── Quadrant ─────────────────────────────────────────────
|
|
241
|
+
{ token: "x-axis", category: "directive" },
|
|
242
|
+
{ token: "y-axis", category: "directive" },
|
|
243
|
+
{ token: "top-right", category: "directive" },
|
|
244
|
+
{ token: "top-left", category: "directive" },
|
|
245
|
+
{ token: "bottom-right", category: "directive" },
|
|
246
|
+
{ token: "bottom-left", category: "directive" },
|
|
247
|
+
// ── Layout (cross-chart) ─────────────────────────────────
|
|
248
|
+
{ token: "direction-tb", category: "directive" },
|
|
249
|
+
{ token: "direction-lr", category: "directive" },
|
|
250
|
+
{ token: "orientation-vertical", category: "directive" },
|
|
251
|
+
// ── Pyramid ──────────────────────────────────────────────
|
|
252
|
+
{ token: "inverted", category: "directive" },
|
|
253
|
+
// ── Color / notes (cross-chart) ──────────────────────────
|
|
254
|
+
{ token: "color", category: "directive" },
|
|
255
|
+
{ token: "no-notes", category: "directive" },
|
|
256
|
+
// ── Emphasis family (§1.11, decision #49) ────────────────
|
|
257
|
+
// `highlight <Name>…` / `dim <Name>…` — the figure/ground axis, orthogonal
|
|
258
|
+
// to color (§1.5) and to the chart-wide `fill-*` family (§1.9). Both are
|
|
259
|
+
// chart-level directives taking a name list, validated inline by each
|
|
260
|
+
// adopting parser (no extractable Set), so the registry is their single
|
|
261
|
+
// declaration site for highlighting.
|
|
262
|
+
//
|
|
263
|
+
// `highlight` shipped on `family` long before this entry existed and was
|
|
264
|
+
// never registered — it had completions but highlighted as plain text. Both
|
|
265
|
+
// tokens are registered together so the whole family lights up at once.
|
|
266
|
+
//
|
|
267
|
+
// Supported on `sankey` and `family` today; every further chart type is a
|
|
268
|
+
// separate decision. Registering them globally is correct regardless: the
|
|
269
|
+
// Lezer specializer is context-free (it cannot know the chart type), and the
|
|
270
|
+
// same is already true of every other chart-scoped token here.
|
|
271
|
+
{ token: "highlight", category: "directive" },
|
|
272
|
+
{ token: "dim", category: "directive" },
|
|
273
|
+
// ── RACI ─────────────────────────────────────────────────
|
|
274
|
+
{ token: "roles", category: "directive" },
|
|
275
|
+
// ── Cycle ────────────────────────────────────────────────
|
|
276
|
+
{ token: "direction-counterclockwise", category: "directive" },
|
|
277
|
+
{ token: "circle-nodes", category: "directive" },
|
|
278
|
+
// ── Journey-map ──────────────────────────────────────────
|
|
279
|
+
{ token: "persona", category: "directive" },
|
|
280
|
+
// ── Function ─────────────────────────────────────────────
|
|
281
|
+
{ token: "x", category: "directive" },
|
|
282
|
+
{ token: "shade", category: "directive" },
|
|
283
|
+
// ── Wordcloud ────────────────────────────────────────────
|
|
284
|
+
{ token: "max", category: "directive" },
|
|
285
|
+
{ token: "size", category: "directive" },
|
|
286
|
+
// ── Arc ──────────────────────────────────────────────────
|
|
287
|
+
{ token: "order", category: "directive" },
|
|
288
|
+
// ── PERT ─────────────────────────────────────────────────
|
|
289
|
+
{ token: "time-unit", category: "directive" },
|
|
290
|
+
{ token: "default-confidence", category: "directive" },
|
|
291
|
+
{ token: "node-detail", category: "directive" },
|
|
292
|
+
{ token: "trials", category: "directive" },
|
|
293
|
+
{ token: "seed", category: "directive" },
|
|
294
|
+
{ token: "scrubber-trials", category: "directive" },
|
|
295
|
+
// `start-date` is also gantt's canonical project-start option (decision #48;
|
|
296
|
+
// bare `start` above stays as the legacy alias).
|
|
297
|
+
{ token: "start-date", category: "directive", gantt: ["option"] },
|
|
298
|
+
{ token: "end-date", category: "directive" },
|
|
299
|
+
// ── Goal ─────────────────────────────────────────────────
|
|
300
|
+
// Mode flags, value-key leaders, and opt-outs. `now`/`target` collide with
|
|
301
|
+
// label prose ("start now", "on target"), but the arrow-label demotion pass
|
|
302
|
+
// (see highlight-api LABEL_WORD_NODES) treats any keyword-bearing label as
|
|
303
|
+
// text and demotes them, so they highlight only as line leaders.
|
|
304
|
+
{ token: "thermometer", category: "directive" },
|
|
305
|
+
{ token: "gauge", category: "directive" },
|
|
306
|
+
{ token: "now", category: "directive" },
|
|
307
|
+
{ token: "target", category: "directive" },
|
|
308
|
+
{ token: "no-note", category: "directive" },
|
|
309
|
+
{ token: "no-auto-color", category: "directive" },
|
|
310
|
+
// ── Control-flow + wireframe element keywords (CONTROL) ──
|
|
311
|
+
{ token: "if", category: "control" },
|
|
312
|
+
{ token: "else", category: "control" },
|
|
313
|
+
{ token: "loop", category: "control" },
|
|
314
|
+
{ token: "parallel", category: "control" },
|
|
315
|
+
{ token: "note", category: "control" },
|
|
316
|
+
{ token: "nav", category: "control" },
|
|
317
|
+
{ token: "tabs", category: "control" },
|
|
318
|
+
{ token: "table", category: "control" },
|
|
319
|
+
{ token: "image", category: "control" },
|
|
320
|
+
{ token: "modal", category: "control" },
|
|
321
|
+
{ token: "skeleton", category: "control" },
|
|
322
|
+
{ token: "alert", category: "control" },
|
|
323
|
+
{ token: "progress", category: "control" },
|
|
324
|
+
{ token: "mobile", category: "control" },
|
|
325
|
+
// ── Kanban status keywords (STATUS) ──────────────────────
|
|
326
|
+
{ token: "na", category: "status" },
|
|
327
|
+
{ token: "todo", category: "status" },
|
|
328
|
+
{ token: "wip", category: "status" },
|
|
329
|
+
{ token: "done", category: "status" },
|
|
330
|
+
{ token: "blocked", category: "status" },
|
|
331
|
+
{ token: "in-progress", category: "status" },
|
|
332
|
+
{ token: "backlog", category: "status" },
|
|
333
|
+
{ token: "ready", category: "status" },
|
|
334
|
+
// ── Modifiers + ER column types/modifiers (MODIFIER) ─────
|
|
335
|
+
// `collapsed` is the bare trailing group-line flag made canonical by
|
|
336
|
+
// decision #48 (`[Fulfillment] collapsed`). It is deliberately a bare
|
|
337
|
+
// MODIFIER rather than a colon key: the legacy `collapsed: true` form still
|
|
338
|
+
// parses and still highlights (as `modifier` instead of `propertyName`),
|
|
339
|
+
// whereas leaving it colon-only left the canonical bare form as plain text.
|
|
340
|
+
{ token: "collapsed", category: "modifier" },
|
|
341
|
+
{ token: "as", category: "modifier" },
|
|
342
|
+
{ token: "alias", category: "modifier" },
|
|
343
|
+
{ token: "aka", category: "modifier" },
|
|
344
|
+
{ token: "position", category: "modifier" },
|
|
345
|
+
{ token: "default", category: "modifier" },
|
|
346
|
+
{ token: "pk", category: "modifier" },
|
|
347
|
+
{ token: "fk", category: "modifier" },
|
|
348
|
+
{ token: "nullable", category: "modifier" },
|
|
349
|
+
{ token: "unique", category: "modifier" },
|
|
350
|
+
{ token: "int", category: "modifier" },
|
|
351
|
+
{ token: "varchar", category: "modifier" },
|
|
352
|
+
{ token: "text", category: "modifier" },
|
|
353
|
+
{ token: "boolean", category: "modifier" },
|
|
354
|
+
{ token: "date", category: "modifier" },
|
|
355
|
+
{ token: "timestamp", category: "modifier" },
|
|
356
|
+
{ token: "float", category: "modifier" },
|
|
357
|
+
{ token: "decimal", category: "modifier" },
|
|
358
|
+
// ── Bracket ──────────────────────────────────────────────
|
|
359
|
+
// `beats` / `vs` are the infix match keywords; the rest are line directives.
|
|
360
|
+
// (`seed` and `no-legend` already appear above — shared, not re-listed.)
|
|
361
|
+
{ token: "beats", category: "control" },
|
|
362
|
+
{ token: "vs", category: "control" },
|
|
363
|
+
{ token: "rounds", category: "directive" },
|
|
364
|
+
{ token: "accent", category: "directive" },
|
|
365
|
+
{ token: "no-round", category: "modifier" },
|
|
366
|
+
{ token: "no-rounds", category: "modifier" },
|
|
367
|
+
{ token: "single-elim", category: "modifier" },
|
|
368
|
+
{ token: "double-elim", category: "modifier" },
|
|
369
|
+
{ token: "seeded", category: "modifier" }
|
|
370
|
+
];
|
|
371
|
+
function tokensWhere(pred) {
|
|
372
|
+
const out = /* @__PURE__ */ new Set();
|
|
373
|
+
for (const e of DIRECTIVES_REGISTRY) if (pred(e)) out.add(e.token);
|
|
374
|
+
return out;
|
|
375
|
+
}
|
|
376
|
+
var ALL_REGISTRY_TOKENS = tokensWhere(() => true);
|
|
377
|
+
var INFRA_TOP_LEVEL_OPTION_SET = tokensWhere(
|
|
378
|
+
(e) => !!e.infra?.includes("top-level")
|
|
379
|
+
);
|
|
380
|
+
var INFRA_BEHAVIOR_KEY_SET = tokensWhere(
|
|
381
|
+
(e) => !!e.infra?.includes("behavior")
|
|
382
|
+
);
|
|
383
|
+
var INFRA_EDGE_ONLY_KEY_SET = tokensWhere(
|
|
384
|
+
(e) => !!e.infra?.includes("edge")
|
|
385
|
+
);
|
|
386
|
+
var GANTT_OPTION_SET = tokensWhere(
|
|
387
|
+
(e) => !!e.gantt?.includes("option")
|
|
388
|
+
);
|
|
389
|
+
var GANTT_BOOLEAN_SET = tokensWhere(
|
|
390
|
+
(e) => !!e.gantt?.includes("boolean")
|
|
391
|
+
);
|
|
392
|
+
var MAP_DIRECTIVE_KEY_SET = tokensWhere((e) => e.map === true);
|
|
393
|
+
var REGISTRY_DIRECTIVE_TOKENS = tokensWhere(
|
|
394
|
+
(e) => e.category === "directive" && !e.colonKey && !e.noHighlight
|
|
395
|
+
);
|
|
396
|
+
var REGISTRY_CONTROL_TOKENS = tokensWhere(
|
|
397
|
+
(e) => e.category === "control" && !e.colonKey && !e.noHighlight
|
|
398
|
+
);
|
|
399
|
+
var REGISTRY_STATUS_TOKENS = tokensWhere(
|
|
400
|
+
(e) => e.category === "status" && !e.colonKey && !e.noHighlight
|
|
401
|
+
);
|
|
402
|
+
var REGISTRY_MODIFIER_TOKENS = tokensWhere(
|
|
403
|
+
(e) => e.category === "modifier" && !e.colonKey && !e.noHighlight
|
|
404
|
+
);
|
|
405
|
+
var REGISTRY_COLON_KEY_TOKENS = tokensWhere((e) => !!e.colonKey);
|
|
406
|
+
var REGISTRY_NON_HIGHLIGHT_TOKENS = tokensWhere(
|
|
407
|
+
(e) => !!e.noHighlight
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
// src/utils/reserved-key-registry.ts
|
|
411
|
+
function staticRegistry(keys) {
|
|
412
|
+
return { keys: new Set(keys), tagAliases: /* @__PURE__ */ new Set() };
|
|
413
|
+
}
|
|
414
|
+
function withTagAliases(base, aliases) {
|
|
415
|
+
return { keys: base.keys, tagAliases: aliases };
|
|
416
|
+
}
|
|
417
|
+
function isReservedKey(registry, key) {
|
|
418
|
+
return registry.keys.has(key) || registry.tagAliases.has(key);
|
|
419
|
+
}
|
|
420
|
+
var SEQUENCE_REGISTRY = staticRegistry([
|
|
421
|
+
"color",
|
|
422
|
+
"description",
|
|
423
|
+
"role",
|
|
424
|
+
"collapsed",
|
|
425
|
+
// Participant layout-order override (§2.2). Colon-keyed `position: N`.
|
|
426
|
+
"position"
|
|
427
|
+
]);
|
|
428
|
+
var INFRA_REGISTRY = staticRegistry([
|
|
429
|
+
"color",
|
|
430
|
+
"description",
|
|
431
|
+
"collapsed",
|
|
432
|
+
"icon"
|
|
433
|
+
]);
|
|
434
|
+
var MAP_REGISTRY = staticRegistry([
|
|
435
|
+
"heat",
|
|
436
|
+
"size",
|
|
437
|
+
"width",
|
|
438
|
+
"label",
|
|
439
|
+
"style",
|
|
440
|
+
// `clock` (BL-122): the time-card control. Bare (`poi Denver clock`) → a card
|
|
441
|
+
// with the zone auto-derived from the place; valued (`clock: Europe/Oslo`) →
|
|
442
|
+
// that IANA id or fixed offset (`clock: UTC+9`) as the zone, for bare-coord
|
|
443
|
+
// pins or to override a city. Reserved so the valued form peels off the POI
|
|
444
|
+
// name cleanly; the BARE flag is peeled separately in handlePoi (no colon).
|
|
445
|
+
"clock"
|
|
446
|
+
// `surface:` was removed in the 2026-06-02 defaults-on review — it is no longer
|
|
447
|
+
// a recognized metadata key (the route/edge surface feature was cut; §24B.7).
|
|
448
|
+
// A stray `surface: water` is no longer captured as a reserved key.
|
|
449
|
+
]);
|
|
450
|
+
var ORG_REGISTRY = staticRegistry([
|
|
451
|
+
"color",
|
|
452
|
+
"description",
|
|
453
|
+
"role",
|
|
454
|
+
"location",
|
|
455
|
+
"email",
|
|
456
|
+
"phone"
|
|
457
|
+
]);
|
|
458
|
+
var C4_REGISTRY = staticRegistry([
|
|
459
|
+
"color",
|
|
460
|
+
"description",
|
|
461
|
+
"tech",
|
|
462
|
+
"type",
|
|
463
|
+
"collapsed"
|
|
464
|
+
]);
|
|
465
|
+
var ER_REGISTRY = staticRegistry([
|
|
466
|
+
"color",
|
|
467
|
+
"description",
|
|
468
|
+
"domain"
|
|
469
|
+
]);
|
|
470
|
+
var EVENT_LINE_REGISTRY = staticRegistry([
|
|
471
|
+
"color"
|
|
472
|
+
]);
|
|
473
|
+
var KANBAN_REGISTRY = staticRegistry([
|
|
474
|
+
"color",
|
|
475
|
+
"description",
|
|
476
|
+
"wip",
|
|
477
|
+
"assignee",
|
|
478
|
+
"due",
|
|
479
|
+
"collapsed"
|
|
480
|
+
// `[Column] collapsed: true` view-state marker
|
|
481
|
+
]);
|
|
482
|
+
var SITEMAP_REGISTRY = staticRegistry([
|
|
483
|
+
"color",
|
|
484
|
+
"description",
|
|
485
|
+
"status"
|
|
486
|
+
]);
|
|
487
|
+
var GANTT_REGISTRY = staticRegistry([
|
|
488
|
+
"color",
|
|
489
|
+
"description",
|
|
490
|
+
"duration",
|
|
491
|
+
"offset",
|
|
492
|
+
"progress",
|
|
493
|
+
"start",
|
|
494
|
+
"collapsed"
|
|
495
|
+
// `[Group] collapsed: true` view-state marker
|
|
496
|
+
]);
|
|
497
|
+
var PERT_REGISTRY = staticRegistry([
|
|
498
|
+
"color",
|
|
499
|
+
"description",
|
|
500
|
+
"confidence",
|
|
501
|
+
"collapsed"
|
|
502
|
+
]);
|
|
503
|
+
var BOXES_AND_LINES_REGISTRY = staticRegistry([
|
|
504
|
+
"color",
|
|
505
|
+
"description",
|
|
506
|
+
"heat"
|
|
507
|
+
]);
|
|
508
|
+
var STATE_REGISTRY = staticRegistry([]);
|
|
509
|
+
var SKETCH_REGISTRY = staticRegistry([
|
|
510
|
+
"shape",
|
|
511
|
+
"at",
|
|
512
|
+
"collapsed"
|
|
513
|
+
]);
|
|
514
|
+
var TIMELINE_REGISTRY = staticRegistry([
|
|
515
|
+
"color",
|
|
516
|
+
"description",
|
|
517
|
+
"duration"
|
|
518
|
+
]);
|
|
519
|
+
var MINDMAP_REGISTRY = staticRegistry([
|
|
520
|
+
"color",
|
|
521
|
+
"description",
|
|
522
|
+
"collapsed"
|
|
523
|
+
]);
|
|
524
|
+
var TECH_RADAR_REGISTRY = staticRegistry([
|
|
525
|
+
"color",
|
|
526
|
+
"description",
|
|
527
|
+
"quadrant",
|
|
528
|
+
"ring",
|
|
529
|
+
"trend"
|
|
530
|
+
]);
|
|
531
|
+
var CYCLE_REGISTRY = staticRegistry([
|
|
532
|
+
"color",
|
|
533
|
+
"description",
|
|
534
|
+
"width",
|
|
535
|
+
"span"
|
|
536
|
+
]);
|
|
537
|
+
var JOURNEY_MAP_REGISTRY = staticRegistry([
|
|
538
|
+
"color",
|
|
539
|
+
"description",
|
|
540
|
+
"score",
|
|
541
|
+
"emotion",
|
|
542
|
+
"pain",
|
|
543
|
+
"opportunity",
|
|
544
|
+
"thought"
|
|
545
|
+
]);
|
|
546
|
+
var PYRAMID_REGISTRY = staticRegistry([
|
|
547
|
+
"color",
|
|
548
|
+
"description"
|
|
549
|
+
]);
|
|
550
|
+
var RING_REGISTRY = staticRegistry([
|
|
551
|
+
"color",
|
|
552
|
+
"description"
|
|
553
|
+
]);
|
|
554
|
+
var TREEMAP_REGISTRY = staticRegistry(["heat"]);
|
|
555
|
+
var RACI_REGISTRY = staticRegistry([
|
|
556
|
+
"color",
|
|
557
|
+
"description"
|
|
558
|
+
]);
|
|
559
|
+
var FAMILY_PERSON_REGISTRY = staticRegistry([
|
|
560
|
+
"sex",
|
|
561
|
+
"b",
|
|
562
|
+
"d",
|
|
563
|
+
"bp",
|
|
564
|
+
"dp",
|
|
565
|
+
"occupation",
|
|
566
|
+
"military",
|
|
567
|
+
"education",
|
|
568
|
+
"religion",
|
|
569
|
+
"burial"
|
|
570
|
+
]);
|
|
571
|
+
var FAMILY_UNION_REGISTRY = staticRegistry(["m"]);
|
|
572
|
+
|
|
573
|
+
// src/utils/parsing.ts
|
|
574
|
+
var RECOGNIZED_COLOR_SET = new Set(
|
|
575
|
+
RECOGNIZED_COLOR_NAMES
|
|
576
|
+
);
|
|
577
|
+
var ALL_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
578
|
+
// data charts
|
|
579
|
+
"bar",
|
|
580
|
+
"line",
|
|
581
|
+
"pie",
|
|
582
|
+
"polar-area",
|
|
583
|
+
"radar",
|
|
584
|
+
"scatter",
|
|
585
|
+
"sankey",
|
|
586
|
+
"function",
|
|
587
|
+
"heatmap",
|
|
588
|
+
"funnel",
|
|
589
|
+
// visualizations
|
|
590
|
+
"slope",
|
|
591
|
+
"wordcloud",
|
|
592
|
+
"arc",
|
|
593
|
+
"timeline",
|
|
594
|
+
"event-line",
|
|
595
|
+
"venn",
|
|
596
|
+
"quadrant",
|
|
597
|
+
// diagrams
|
|
598
|
+
"body",
|
|
599
|
+
"sequence",
|
|
600
|
+
"flowchart",
|
|
601
|
+
"class",
|
|
602
|
+
"er",
|
|
603
|
+
"org",
|
|
604
|
+
"kanban",
|
|
605
|
+
"c4",
|
|
606
|
+
"state",
|
|
607
|
+
"sitemap",
|
|
608
|
+
"infra",
|
|
609
|
+
"gantt",
|
|
610
|
+
"pert",
|
|
611
|
+
"boxes-and-lines",
|
|
612
|
+
"swimlane",
|
|
613
|
+
"version-control",
|
|
614
|
+
"mindmap",
|
|
615
|
+
"wireframe",
|
|
616
|
+
"tech-radar",
|
|
617
|
+
"cycle",
|
|
618
|
+
"journey-map",
|
|
619
|
+
"pyramid",
|
|
620
|
+
"ring",
|
|
621
|
+
"treemap",
|
|
622
|
+
"block",
|
|
623
|
+
"goal",
|
|
624
|
+
"countdown",
|
|
625
|
+
"clock",
|
|
626
|
+
"sketch",
|
|
627
|
+
"raci",
|
|
628
|
+
"map",
|
|
629
|
+
"family",
|
|
630
|
+
"bracket"
|
|
631
|
+
]);
|
|
632
|
+
function measureIndent(line) {
|
|
633
|
+
let indent = 0;
|
|
634
|
+
for (const ch of line) {
|
|
635
|
+
if (ch === " ") indent++;
|
|
636
|
+
else if (ch === " ") indent += 4;
|
|
637
|
+
else break;
|
|
638
|
+
}
|
|
639
|
+
return indent;
|
|
640
|
+
}
|
|
641
|
+
function extractColor(label, palette, diagnostics, line) {
|
|
642
|
+
const lastSpaceIdx = Math.max(
|
|
643
|
+
label.lastIndexOf(" "),
|
|
644
|
+
label.lastIndexOf(" ")
|
|
645
|
+
);
|
|
646
|
+
if (lastSpaceIdx < 0) return { label };
|
|
647
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
648
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) {
|
|
649
|
+
if (diagnostics && line !== void 0) {
|
|
650
|
+
const diag = invalidColorDiagnostic(trailing, line);
|
|
651
|
+
if (diag) diagnostics.push(diag);
|
|
652
|
+
}
|
|
653
|
+
return { label };
|
|
654
|
+
}
|
|
655
|
+
let color;
|
|
656
|
+
if (diagnostics && line !== void 0) {
|
|
657
|
+
color = resolveColorWithDiagnostic(trailing, line, diagnostics, palette);
|
|
658
|
+
} else {
|
|
659
|
+
color = resolveColor(trailing, palette) ?? void 0;
|
|
660
|
+
}
|
|
661
|
+
return {
|
|
662
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
663
|
+
...color !== void 0 && { color }
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
var OPTION_NOCOLON_RE = /^([a-z][a-z0-9-]*)\s+(.+)$/i;
|
|
667
|
+
var GLOBAL_BOOLEANS = /* @__PURE__ */ new Set([
|
|
668
|
+
"fill-tint",
|
|
669
|
+
"fill-solid",
|
|
670
|
+
"fill-outline",
|
|
671
|
+
"no-title",
|
|
672
|
+
"no-notes",
|
|
673
|
+
"no-legend"
|
|
674
|
+
]);
|
|
675
|
+
function legendSuppressed(options) {
|
|
676
|
+
return options["no-legend"] === "on";
|
|
677
|
+
}
|
|
678
|
+
var FILL_FAMILY_TOKENS = /* @__PURE__ */ new Set([
|
|
679
|
+
"fill-tint",
|
|
680
|
+
"fill-solid",
|
|
681
|
+
"fill-outline"
|
|
682
|
+
]);
|
|
683
|
+
function fillModeFromToken(token) {
|
|
684
|
+
switch (token.trim().toLowerCase()) {
|
|
685
|
+
case "fill-solid":
|
|
686
|
+
return "solid";
|
|
687
|
+
case "fill-outline":
|
|
688
|
+
return "outline";
|
|
689
|
+
case "fill-tint":
|
|
690
|
+
return "tint";
|
|
691
|
+
default:
|
|
692
|
+
return null;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function fillModeFromOptions(options) {
|
|
696
|
+
if (options["fill-solid"] === "on") return "solid";
|
|
697
|
+
if (options["fill-outline"] === "on") return "outline";
|
|
698
|
+
return void 0;
|
|
699
|
+
}
|
|
700
|
+
function recognizeGlobalBoolean(token) {
|
|
701
|
+
const t = token.trim().toLowerCase();
|
|
702
|
+
return GLOBAL_BOOLEANS.has(t) ? t : null;
|
|
703
|
+
}
|
|
704
|
+
function tryParseSharedOption(line, options) {
|
|
705
|
+
const key = recognizeGlobalBoolean(line);
|
|
706
|
+
if (key) {
|
|
707
|
+
if (FILL_FAMILY_TOKENS.has(key)) {
|
|
708
|
+
for (const t of FILL_FAMILY_TOKENS) delete options[t];
|
|
709
|
+
}
|
|
710
|
+
options[key] = "on";
|
|
711
|
+
return true;
|
|
712
|
+
}
|
|
713
|
+
return false;
|
|
714
|
+
}
|
|
715
|
+
function parseFirstLine(line) {
|
|
716
|
+
const trimmed = line.trim();
|
|
717
|
+
if (!trimmed || trimmed.startsWith("//")) return null;
|
|
718
|
+
const spaceIdx = trimmed.indexOf(" ");
|
|
719
|
+
if (spaceIdx === -1) {
|
|
720
|
+
const ct = trimmed.toLowerCase();
|
|
721
|
+
return ALL_CHART_TYPES.has(ct) ? { chartType: ct, title: void 0 } : null;
|
|
722
|
+
}
|
|
723
|
+
const firstToken = trimmed.substring(0, spaceIdx).toLowerCase();
|
|
724
|
+
if (!ALL_CHART_TYPES.has(firstToken)) return null;
|
|
725
|
+
return {
|
|
726
|
+
chartType: firstToken,
|
|
727
|
+
title: trimmed.substring(spaceIdx + 1).trim() || void 0
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
var CHART_TYPE_TOKEN_RE = /^[A-Za-z][A-Za-z0-9-]*$/;
|
|
731
|
+
var TITLE_LIKE_RE = /^[A-Za-z][A-Za-z\s'&,.\-—–]*$/;
|
|
732
|
+
function detectBadChartTypeDeclaration(line, knownOptionKeys) {
|
|
733
|
+
const trimmed = line.trim();
|
|
734
|
+
if (!trimmed || trimmed.includes(":")) return null;
|
|
735
|
+
const spaceIdx = trimmed.indexOf(" ");
|
|
736
|
+
const token = spaceIdx === -1 ? trimmed : trimmed.substring(0, spaceIdx);
|
|
737
|
+
if (!CHART_TYPE_TOKEN_RE.test(token)) return null;
|
|
738
|
+
const lower = token.toLowerCase();
|
|
739
|
+
if (knownOptionKeys.has(lower) || ALL_REGISTRY_TOKENS.has(lower)) return null;
|
|
740
|
+
if (spaceIdx === -1) return /\d/.test(token) ? null : token;
|
|
741
|
+
const rest = trimmed.substring(spaceIdx + 1).trim();
|
|
742
|
+
if (!rest || !TITLE_LIKE_RE.test(rest)) return null;
|
|
743
|
+
return token;
|
|
744
|
+
}
|
|
745
|
+
function normalizeNumericToken(token) {
|
|
746
|
+
if (!token.includes(",") && !token.includes("_")) return null;
|
|
747
|
+
if (token.includes(",") && token.includes("_")) return null;
|
|
748
|
+
let sign = "";
|
|
749
|
+
let unsigned = token;
|
|
750
|
+
if (unsigned.startsWith("-")) {
|
|
751
|
+
sign = "-";
|
|
752
|
+
unsigned = unsigned.substring(1);
|
|
753
|
+
}
|
|
754
|
+
if (!unsigned) return null;
|
|
755
|
+
if (unsigned.includes(",")) {
|
|
756
|
+
if (/^\d{1,3}(,\d{3})+$/.test(unsigned))
|
|
757
|
+
return sign + unsigned.replace(/,/g, "");
|
|
758
|
+
if (/^\d{1,3}(,\d{3})+\.\d+$/.test(unsigned))
|
|
759
|
+
return sign + unsigned.replace(/,/g, "");
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
if (/^\d+(_\d+)+$/.test(unsigned)) return sign + unsigned.replace(/_/g, "");
|
|
763
|
+
if (/^\d+(_\d+)*\.\d+$/.test(unsigned) && unsigned.includes("_"))
|
|
764
|
+
return sign + unsigned.replace(/_/g, "");
|
|
765
|
+
return null;
|
|
766
|
+
}
|
|
767
|
+
function stripQuotes(token) {
|
|
768
|
+
if (token.length >= 2) {
|
|
769
|
+
if (token[0] === '"' && token[token.length - 1] === '"' || token[0] === "'" && token[token.length - 1] === "'") {
|
|
770
|
+
return token.substring(1, token.length - 1);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return token;
|
|
774
|
+
}
|
|
775
|
+
function tokenizeQuoteAware(input) {
|
|
776
|
+
const tokens = [];
|
|
777
|
+
let i = 0;
|
|
778
|
+
while (i < input.length) {
|
|
779
|
+
if (input[i] === " " || input[i] === " ") {
|
|
780
|
+
i++;
|
|
781
|
+
continue;
|
|
782
|
+
}
|
|
783
|
+
if (input[i] === '"' || input[i] === "'") {
|
|
784
|
+
const quote = input[i];
|
|
785
|
+
const start2 = i;
|
|
786
|
+
i++;
|
|
787
|
+
while (i < input.length && input[i] !== quote) i++;
|
|
788
|
+
if (i < input.length) i++;
|
|
789
|
+
tokens.push(input.substring(start2, i));
|
|
790
|
+
continue;
|
|
791
|
+
}
|
|
792
|
+
const start = i;
|
|
793
|
+
while (i < input.length && input[i] !== " " && input[i] !== " ") i++;
|
|
794
|
+
tokens.push(input.substring(start, i));
|
|
795
|
+
}
|
|
796
|
+
return tokens;
|
|
797
|
+
}
|
|
798
|
+
function collectIndentedValues(lines, startIndex) {
|
|
799
|
+
const values = [];
|
|
800
|
+
const lineNumbers = [];
|
|
801
|
+
let j = startIndex + 1;
|
|
802
|
+
for (; j < lines.length; j++) {
|
|
803
|
+
const raw = lines[j];
|
|
804
|
+
const trimmed = raw.trim();
|
|
805
|
+
if (!trimmed) continue;
|
|
806
|
+
if (trimmed.startsWith("//")) continue;
|
|
807
|
+
if (raw[0] !== " " && raw[0] !== " ") break;
|
|
808
|
+
values.push(trimmed.replace(/,\s*$/, ""));
|
|
809
|
+
lineNumbers.push(j + 1);
|
|
810
|
+
}
|
|
811
|
+
return { values, lineNumbers, newIndex: j - 1 };
|
|
812
|
+
}
|
|
813
|
+
function parseSeriesNames(value, lines, lineIndex, palette, diagnostics) {
|
|
814
|
+
let rawNames;
|
|
815
|
+
let series;
|
|
816
|
+
let newIndex = lineIndex;
|
|
817
|
+
let nameLineNumbers = [];
|
|
818
|
+
if (value) {
|
|
819
|
+
series = value;
|
|
820
|
+
rawNames = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
821
|
+
nameLineNumbers = rawNames.map(() => lineIndex + 1);
|
|
822
|
+
} else {
|
|
823
|
+
const collected = collectIndentedValues(lines, lineIndex);
|
|
824
|
+
newIndex = collected.newIndex;
|
|
825
|
+
rawNames = collected.values;
|
|
826
|
+
nameLineNumbers = collected.lineNumbers;
|
|
827
|
+
series = rawNames.join(", ");
|
|
828
|
+
}
|
|
829
|
+
const isHeader = (s) => {
|
|
830
|
+
const tok = s.split(/\s+/, 1)[0];
|
|
831
|
+
if (tok === "y-label") return "left";
|
|
832
|
+
if (tok === "y-right-label") return "right";
|
|
833
|
+
return null;
|
|
834
|
+
};
|
|
835
|
+
if (rawNames.some((r) => isHeader(r) !== null)) {
|
|
836
|
+
const names2 = [];
|
|
837
|
+
const nameColors2 = [];
|
|
838
|
+
const axes = [];
|
|
839
|
+
const memberLineNumbers = [];
|
|
840
|
+
let leftLabel;
|
|
841
|
+
let rightLabel;
|
|
842
|
+
let currentAxis = "left";
|
|
843
|
+
for (let i = 0; i < rawNames.length; i++) {
|
|
844
|
+
const raw = rawNames[i];
|
|
845
|
+
const side = isHeader(raw);
|
|
846
|
+
if (side !== null) {
|
|
847
|
+
const label = raw.slice(raw.indexOf(" ") + 1).trim();
|
|
848
|
+
currentAxis = side;
|
|
849
|
+
if (side === "left") leftLabel = label || leftLabel;
|
|
850
|
+
else rightLabel = label || rightLabel;
|
|
851
|
+
continue;
|
|
852
|
+
}
|
|
853
|
+
const extracted = extractColor(
|
|
854
|
+
raw,
|
|
855
|
+
palette,
|
|
856
|
+
diagnostics,
|
|
857
|
+
nameLineNumbers[i]
|
|
858
|
+
);
|
|
859
|
+
names2.push(extracted.label);
|
|
860
|
+
nameColors2.push(extracted.color);
|
|
861
|
+
axes.push(currentAxis);
|
|
862
|
+
memberLineNumbers.push(nameLineNumbers[i]);
|
|
863
|
+
}
|
|
864
|
+
return {
|
|
865
|
+
series: names2.join(", "),
|
|
866
|
+
names: names2,
|
|
867
|
+
nameColors: nameColors2,
|
|
868
|
+
nameLineNumbers: memberLineNumbers,
|
|
869
|
+
newIndex,
|
|
870
|
+
axes,
|
|
871
|
+
...leftLabel !== void 0 && { leftLabel },
|
|
872
|
+
...rightLabel !== void 0 && { rightLabel }
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
const names = [];
|
|
876
|
+
const nameColors = [];
|
|
877
|
+
for (let i = 0; i < rawNames.length; i++) {
|
|
878
|
+
const raw = rawNames[i];
|
|
879
|
+
const extracted = extractColor(
|
|
880
|
+
raw,
|
|
881
|
+
palette,
|
|
882
|
+
diagnostics,
|
|
883
|
+
nameLineNumbers[i]
|
|
884
|
+
);
|
|
885
|
+
nameColors.push(extracted.color);
|
|
886
|
+
names.push(extracted.label);
|
|
887
|
+
}
|
|
888
|
+
if (names.length === 1) {
|
|
889
|
+
series = names[0];
|
|
890
|
+
}
|
|
891
|
+
return { series, names, nameColors, nameLineNumbers, newIndex };
|
|
892
|
+
}
|
|
893
|
+
function peelTrailingColorName(label) {
|
|
894
|
+
const lastSpaceIdx = Math.max(
|
|
895
|
+
label.lastIndexOf(" "),
|
|
896
|
+
label.lastIndexOf(" ")
|
|
897
|
+
);
|
|
898
|
+
if (lastSpaceIdx < 0) return { label };
|
|
899
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
900
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
|
|
901
|
+
return {
|
|
902
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
903
|
+
colorName: trailing
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
function peelTrailingCollapsedFlag(text) {
|
|
907
|
+
const t = text.trimEnd();
|
|
908
|
+
if (t === "collapsed") return { rest: "", collapsed: true };
|
|
909
|
+
if (/[ \t]collapsed$/.test(t)) {
|
|
910
|
+
return {
|
|
911
|
+
rest: t.slice(0, t.length - "collapsed".length).trimEnd().replace(/,\s*$/, ""),
|
|
912
|
+
collapsed: true
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
return { rest: text, collapsed: false };
|
|
916
|
+
}
|
|
917
|
+
function peelRampColors(label) {
|
|
918
|
+
const peelOne = (s) => {
|
|
919
|
+
const idx = Math.max(s.lastIndexOf(" "), s.lastIndexOf(" "));
|
|
920
|
+
if (idx < 0) return { rest: s };
|
|
921
|
+
const trailing = s.substring(idx + 1);
|
|
922
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { rest: s };
|
|
923
|
+
return { rest: s.substring(0, idx).trimEnd(), color: trailing };
|
|
924
|
+
};
|
|
925
|
+
const first = peelOne(label);
|
|
926
|
+
if (first.color === void 0) return { label };
|
|
927
|
+
const second = peelOne(first.rest);
|
|
928
|
+
if (second.color === void 0) {
|
|
929
|
+
return { label: first.rest, high: first.color };
|
|
930
|
+
}
|
|
931
|
+
return { label: second.rest, low: second.color, high: first.color };
|
|
932
|
+
}
|
|
933
|
+
var RESERVED_KEY_RE = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
934
|
+
var AS_ALIAS_RE = /\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})$/;
|
|
935
|
+
function scanTokens(line) {
|
|
936
|
+
const tokens = [];
|
|
937
|
+
let i = 0;
|
|
938
|
+
while (i < line.length) {
|
|
939
|
+
if (line[i] === " " || line[i] === " ") {
|
|
940
|
+
i++;
|
|
941
|
+
continue;
|
|
942
|
+
}
|
|
943
|
+
if (line[i] === '"' || line[i] === "'") {
|
|
944
|
+
const quote = line[i];
|
|
945
|
+
const start2 = i;
|
|
946
|
+
i++;
|
|
947
|
+
while (i < line.length && line[i] !== quote) i++;
|
|
948
|
+
if (i < line.length) i++;
|
|
949
|
+
tokens.push({
|
|
950
|
+
text: line.substring(start2, i),
|
|
951
|
+
start: start2,
|
|
952
|
+
end: i,
|
|
953
|
+
quoted: true
|
|
954
|
+
});
|
|
955
|
+
continue;
|
|
956
|
+
}
|
|
957
|
+
const start = i;
|
|
958
|
+
while (i < line.length && line[i] !== " " && line[i] !== " ") i++;
|
|
959
|
+
tokens.push({
|
|
960
|
+
text: line.substring(start, i),
|
|
961
|
+
start,
|
|
962
|
+
end: i,
|
|
963
|
+
quoted: false
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
return tokens;
|
|
967
|
+
}
|
|
968
|
+
function findMetadataCutOffset(line, tokens, registry) {
|
|
969
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
970
|
+
const tok = tokens[i];
|
|
971
|
+
if (tok.quoted) continue;
|
|
972
|
+
const inlineColon = tok.text.indexOf(":");
|
|
973
|
+
if (inlineColon > 0) {
|
|
974
|
+
const keyPart = tok.text.substring(0, inlineColon);
|
|
975
|
+
if (RESERVED_KEY_RE.test(keyPart) && isReservedKey(registry, keyPart.toLowerCase())) {
|
|
976
|
+
return tok.start;
|
|
977
|
+
}
|
|
978
|
+
} else if (inlineColon < 0) {
|
|
979
|
+
if (RESERVED_KEY_RE.test(tok.text) && isReservedKey(registry, tok.text.toLowerCase())) {
|
|
980
|
+
const tail = line.substring(tok.end).replace(/^[ \t]+/, "");
|
|
981
|
+
if (tail.startsWith(":")) {
|
|
982
|
+
return tok.start;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
return -1;
|
|
988
|
+
}
|
|
989
|
+
function parseMetadataRegion(region, aliasMap, diagnostics, line) {
|
|
990
|
+
const meta = {};
|
|
991
|
+
let i = 0;
|
|
992
|
+
while (i < region.length) {
|
|
993
|
+
while (i < region.length && (region[i] === " " || region[i] === " " || region[i] === ","))
|
|
994
|
+
i++;
|
|
995
|
+
if (i >= region.length) break;
|
|
996
|
+
const keyStart = i;
|
|
997
|
+
while (i < region.length && region[i] !== ":" && region[i] !== ",") i++;
|
|
998
|
+
if (i >= region.length || region[i] !== ":") break;
|
|
999
|
+
const rawKey = region.substring(keyStart, i).trim().toLowerCase();
|
|
1000
|
+
if (!rawKey) break;
|
|
1001
|
+
i++;
|
|
1002
|
+
while (i < region.length && (region[i] === " " || region[i] === " ")) i++;
|
|
1003
|
+
let value;
|
|
1004
|
+
if (i < region.length && (region[i] === '"' || region[i] === "'")) {
|
|
1005
|
+
const quote = region[i];
|
|
1006
|
+
i++;
|
|
1007
|
+
const vStart = i;
|
|
1008
|
+
while (i < region.length && region[i] !== quote) i++;
|
|
1009
|
+
value = region.substring(vStart, i);
|
|
1010
|
+
if (i < region.length) i++;
|
|
1011
|
+
while (i < region.length && (region[i] === " " || region[i] === " "))
|
|
1012
|
+
i++;
|
|
1013
|
+
} else {
|
|
1014
|
+
const vStart = i;
|
|
1015
|
+
while (i < region.length && region[i] !== ",") i++;
|
|
1016
|
+
value = region.substring(vStart, i).trim();
|
|
1017
|
+
}
|
|
1018
|
+
const key = aliasMap.get(rawKey) ?? rawKey;
|
|
1019
|
+
if (!value) {
|
|
1020
|
+
if (diagnostics && line !== void 0) {
|
|
1021
|
+
diagnostics.push(
|
|
1022
|
+
makeDgmoError(
|
|
1023
|
+
line,
|
|
1024
|
+
emptyMetadataValueMessage(rawKey),
|
|
1025
|
+
"warning",
|
|
1026
|
+
METADATA_DIAGNOSTIC_CODES.EMPTY_METADATA_VALUE
|
|
1027
|
+
)
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
continue;
|
|
1031
|
+
}
|
|
1032
|
+
meta[key] = value;
|
|
1033
|
+
}
|
|
1034
|
+
return meta;
|
|
1035
|
+
}
|
|
1036
|
+
function cutUnionMetadata(line, registry) {
|
|
1037
|
+
return findMetadataCutOffset(line, scanTokens(line), registry);
|
|
1038
|
+
}
|
|
1039
|
+
function splitNameAndMeta(line, registry, aliasMap = /* @__PURE__ */ new Map(), palette, diagnostics, lineNumber, options = {}) {
|
|
1040
|
+
const tokens = scanTokens(line);
|
|
1041
|
+
const cutOffset = findMetadataCutOffset(line, tokens, registry);
|
|
1042
|
+
let nameRegion;
|
|
1043
|
+
let metaRegion;
|
|
1044
|
+
if (cutOffset === -1) {
|
|
1045
|
+
nameRegion = line.trim();
|
|
1046
|
+
metaRegion = "";
|
|
1047
|
+
} else {
|
|
1048
|
+
nameRegion = line.substring(0, cutOffset).trimEnd();
|
|
1049
|
+
metaRegion = line.substring(cutOffset);
|
|
1050
|
+
}
|
|
1051
|
+
const colorResult = peelTrailingColorName(nameRegion);
|
|
1052
|
+
let postColorName = colorResult.label;
|
|
1053
|
+
let alias;
|
|
1054
|
+
if (options.peelAlias !== false) {
|
|
1055
|
+
const aliasMatch = postColorName.match(AS_ALIAS_RE);
|
|
1056
|
+
if (aliasMatch) {
|
|
1057
|
+
alias = aliasMatch[1];
|
|
1058
|
+
postColorName = postColorName.substring(0, aliasMatch.index).trimEnd();
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
const meta = metaRegion.length > 0 ? parseMetadataRegion(metaRegion, aliasMap, diagnostics, lineNumber) : {};
|
|
1062
|
+
void palette;
|
|
1063
|
+
return {
|
|
1064
|
+
name: postColorName,
|
|
1065
|
+
meta,
|
|
1066
|
+
...colorResult.colorName !== void 0 && {
|
|
1067
|
+
color: colorResult.colorName
|
|
1068
|
+
},
|
|
1069
|
+
...alias !== void 0 && { alias }
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
var POTENTIAL_META_RE = /\b([\w-]+)\s*:/;
|
|
1073
|
+
function warnUnknownMetaKeys(meta, registry, warn, nameToScan) {
|
|
1074
|
+
const candidates = Array.from(registry.keys);
|
|
1075
|
+
for (const key of Object.keys(meta)) {
|
|
1076
|
+
if (isReservedKey(registry, key)) continue;
|
|
1077
|
+
const hint = suggest(key, candidates);
|
|
1078
|
+
warn(`Unknown metadata key "${key}".${hint ? " " + hint : ""}`);
|
|
1079
|
+
}
|
|
1080
|
+
if (nameToScan) {
|
|
1081
|
+
const m = nameToScan.match(POTENTIAL_META_RE);
|
|
1082
|
+
if (m) {
|
|
1083
|
+
const key = m[1].toLowerCase();
|
|
1084
|
+
if (!isReservedKey(registry, key)) {
|
|
1085
|
+
const hint = suggest(key, candidates);
|
|
1086
|
+
if (hint) {
|
|
1087
|
+
warn(`Unknown metadata key "${key}". ${hint}`);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export {
|
|
1095
|
+
INFRA_TOP_LEVEL_OPTION_SET,
|
|
1096
|
+
INFRA_BEHAVIOR_KEY_SET,
|
|
1097
|
+
INFRA_EDGE_ONLY_KEY_SET,
|
|
1098
|
+
GANTT_OPTION_SET,
|
|
1099
|
+
GANTT_BOOLEAN_SET,
|
|
1100
|
+
MAP_DIRECTIVE_KEY_SET,
|
|
1101
|
+
REGISTRY_DIRECTIVE_TOKENS,
|
|
1102
|
+
REGISTRY_CONTROL_TOKENS,
|
|
1103
|
+
REGISTRY_STATUS_TOKENS,
|
|
1104
|
+
REGISTRY_MODIFIER_TOKENS,
|
|
1105
|
+
REGISTRY_COLON_KEY_TOKENS,
|
|
1106
|
+
withTagAliases,
|
|
1107
|
+
isReservedKey,
|
|
1108
|
+
SEQUENCE_REGISTRY,
|
|
1109
|
+
INFRA_REGISTRY,
|
|
1110
|
+
MAP_REGISTRY,
|
|
1111
|
+
ORG_REGISTRY,
|
|
1112
|
+
C4_REGISTRY,
|
|
1113
|
+
ER_REGISTRY,
|
|
1114
|
+
EVENT_LINE_REGISTRY,
|
|
1115
|
+
KANBAN_REGISTRY,
|
|
1116
|
+
SITEMAP_REGISTRY,
|
|
1117
|
+
GANTT_REGISTRY,
|
|
1118
|
+
PERT_REGISTRY,
|
|
1119
|
+
BOXES_AND_LINES_REGISTRY,
|
|
1120
|
+
STATE_REGISTRY,
|
|
1121
|
+
SKETCH_REGISTRY,
|
|
1122
|
+
TIMELINE_REGISTRY,
|
|
1123
|
+
MINDMAP_REGISTRY,
|
|
1124
|
+
TECH_RADAR_REGISTRY,
|
|
1125
|
+
CYCLE_REGISTRY,
|
|
1126
|
+
JOURNEY_MAP_REGISTRY,
|
|
1127
|
+
PYRAMID_REGISTRY,
|
|
1128
|
+
RING_REGISTRY,
|
|
1129
|
+
TREEMAP_REGISTRY,
|
|
1130
|
+
RACI_REGISTRY,
|
|
1131
|
+
FAMILY_PERSON_REGISTRY,
|
|
1132
|
+
FAMILY_UNION_REGISTRY,
|
|
1133
|
+
ALL_CHART_TYPES,
|
|
1134
|
+
measureIndent,
|
|
1135
|
+
extractColor,
|
|
1136
|
+
OPTION_NOCOLON_RE,
|
|
1137
|
+
GLOBAL_BOOLEANS,
|
|
1138
|
+
legendSuppressed,
|
|
1139
|
+
FILL_FAMILY_TOKENS,
|
|
1140
|
+
fillModeFromToken,
|
|
1141
|
+
fillModeFromOptions,
|
|
1142
|
+
tryParseSharedOption,
|
|
1143
|
+
parseFirstLine,
|
|
1144
|
+
detectBadChartTypeDeclaration,
|
|
1145
|
+
normalizeNumericToken,
|
|
1146
|
+
stripQuotes,
|
|
1147
|
+
tokenizeQuoteAware,
|
|
1148
|
+
collectIndentedValues,
|
|
1149
|
+
parseSeriesNames,
|
|
1150
|
+
peelTrailingColorName,
|
|
1151
|
+
peelTrailingCollapsedFlag,
|
|
1152
|
+
peelRampColors,
|
|
1153
|
+
parseMetadataRegion,
|
|
1154
|
+
cutUnionMetadata,
|
|
1155
|
+
splitNameAndMeta,
|
|
1156
|
+
warnUnknownMetaKeys
|
|
1157
|
+
};
|
|
1158
|
+
//# sourceMappingURL=chunk-3FRO35WW.js.map
|