@diagrammo/dgmo 0.89.0 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/advanced.d.ts +435 -15
- package/dist/advanced.js +356 -197
- package/dist/block.d.ts +1 -1
- package/dist/block.js +86 -63
- package/dist/{calculator-35YVW4QO.js → calculator-PX3JHKAS.js} +2 -2
- package/dist/{chart-meta-Bev5Ebjr.d.ts → chart-meta-B_WTMP0y.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +17 -16
- package/dist/{chart-types-Bf8C5QQW.d.ts → chart-types-V2NcgN5O.d.ts} +4 -0
- package/dist/{charts-d3-KEQSUWKP.js → charts-d3-QW4ERNUE.js} +8 -7
- package/dist/{chunk-ECMA6XE2.js → chunk-2EDJPHXQ.js} +9 -9
- package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
- package/dist/{chunk-UWKRPQZO.js → chunk-3BQCSQQJ.js} +16 -13
- package/dist/{chunk-7C2RAGPT.js → chunk-3HBR3YAN.js} +12 -12
- package/dist/chunk-3UR4F7FE.js +14 -0
- package/dist/{chunk-NIUO2TNR.js → chunk-4HG4PYHM.js} +197 -203
- package/dist/{chunk-NSR2CGV6.js → chunk-4IYJOXGS.js} +10 -10
- package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
- package/dist/{chunk-YMFQLWZ2.js → chunk-54YUDXGP.js} +1 -1
- package/dist/{chunk-UG2XG57E.js → chunk-5M52RPAS.js} +2 -2
- package/dist/{chunk-QIOYTQDZ.js → chunk-5M6PMV5Z.js} +9 -9
- package/dist/{chunk-S2WE7TVK.js → chunk-5MDQMB6A.js} +1 -1
- package/dist/{chunk-WPL5PFXE.js → chunk-5TZPIKNV.js} +5 -5
- package/dist/{chunk-LFKSHDVI.js → chunk-62VWZ3SE.js} +5 -4
- package/dist/{chunk-PMNITNPR.js → chunk-64KSPLU2.js} +2 -1
- package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
- package/dist/{chunk-HUNDJTTH.js → chunk-A5EE66RQ.js} +1 -1
- package/dist/{chunk-JVZ7KFAX.js → chunk-AAC3XQWV.js} +2 -2
- package/dist/{chunk-7KPHRTND.js → chunk-AHWA36O7.js} +1 -1
- package/dist/{chunk-FKZ2Y3Q5.js → chunk-C4W62JZO.js} +2 -2
- package/dist/{chunk-C4FRGZGX.js → chunk-CDT33RHG.js} +1 -1
- package/dist/{chunk-B3S76BZO.js → chunk-COPSI54O.js} +3 -3
- package/dist/{chunk-GUTZCRBT.js → chunk-CUY56BK4.js} +2 -2
- package/dist/{chunk-HSRQDWV7.js → chunk-CYF2X3CG.js} +2 -11
- package/dist/{chunk-NGC3IZRY.js → chunk-DNMICILX.js} +2 -2
- package/dist/{chunk-N4BBSDWI.js → chunk-DXPT2HPH.js} +140 -151
- package/dist/{chunk-TAP2NZEU.js → chunk-EB7AEM2H.js} +13 -13
- package/dist/{chunk-3AQJNY65.js → chunk-EEYQFJVK.js} +149 -43
- package/dist/{chunk-SLQT3JP3.js → chunk-EK7JYFCL.js} +1 -1
- package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
- package/dist/{chunk-4AJKOUBO.js → chunk-FDRHBQUG.js} +17 -15
- package/dist/{chunk-FJNXXGTR.js → chunk-FS2LZBHG.js} +2 -2
- package/dist/{chunk-LPYYZCSI.js → chunk-G5BGW4BX.js} +1 -1
- package/dist/{chunk-IQ6P3HDE.js → chunk-GQVXYRPC.js} +2 -2
- package/dist/{chunk-MHAYUS65.js → chunk-GXP344YZ.js} +3 -3
- package/dist/{chunk-HAMF4F3P.js → chunk-GYBKG4Z6.js} +5 -5
- package/dist/{chunk-Q6SQISHT.js → chunk-HIVJBESO.js} +306 -68
- package/dist/{chunk-ID2K3IHI.js → chunk-HLE5QGZJ.js} +1 -1
- package/dist/{chunk-L5AFONQU.js → chunk-HX2KJEPD.js} +1 -1
- package/dist/{chunk-SOPM5PLO.js → chunk-I6FWHICD.js} +13 -13
- package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
- package/dist/{chunk-NRPELUB6.js → chunk-ICYPGWOV.js} +2 -2
- package/dist/chunk-IHK3Y2HG.js +781 -0
- package/dist/{chunk-RXIKESRI.js → chunk-IMHNZITR.js} +2 -2
- package/dist/{chunk-DPSMX4EY.js → chunk-IRVQT4GR.js} +3 -3
- package/dist/{chunk-AZ24RI5L.js → chunk-J3ODKAWN.js} +2 -2
- package/dist/{chunk-BB6QKWHZ.js → chunk-JRQ4LBQI.js} +10 -10
- package/dist/{chunk-MY6GUH26.js → chunk-JX4RCC6B.js} +2 -2
- package/dist/{chunk-XUCQVKLQ.js → chunk-K4GUO7FV.js} +4 -4
- package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
- package/dist/{chunk-CUYHST3B.js → chunk-LBRHDWEA.js} +1 -1
- package/dist/{chunk-GSYZZFI5.js → chunk-LC5LY5V2.js} +2 -2
- package/dist/{chunk-WP22MHH6.js → chunk-LNQDICFJ.js} +9 -9
- package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
- package/dist/{chunk-UQLHKLF4.js → chunk-MIVSVEK4.js} +8 -8
- package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
- package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
- package/dist/{chunk-WQ6G6FFM.js → chunk-NFWRIC2V.js} +1 -1
- package/dist/{chunk-7SX4IY6T.js → chunk-NJYA4QSN.js} +1 -1
- package/dist/{chunk-RU725VCJ.js → chunk-NMKLX57Y.js} +10 -35
- package/dist/{chunk-RPKBWJBB.js → chunk-NP2SE6MQ.js} +1 -1
- package/dist/{chunk-ITSBBQTH.js → chunk-NUYWNKHH.js} +2 -2
- package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
- package/dist/{chunk-AYOVY75O.js → chunk-NY56FM55.js} +3 -3
- package/dist/{chunk-MFW6P7WH.js → chunk-OSIUWQ3N.js} +3 -3
- package/dist/{chunk-2GM7N5TV.js → chunk-OWJVSJLA.js} +9 -9
- package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
- package/dist/{chunk-4R6OMKXB.js → chunk-PIHAUVA4.js} +5 -5
- package/dist/{chunk-C7QRRTAW.js → chunk-PNCKZFPE.js} +2 -2
- package/dist/{chunk-DDPGEGHB.js → chunk-POBNN5DP.js} +2 -2
- package/dist/{chunk-XJ2TBXHA.js → chunk-PQ5NW3QZ.js} +8 -8
- package/dist/{chunk-FKLE6QA3.js → chunk-PXEUQ7EG.js} +12 -12
- package/dist/{chunk-WEF6MXFG.js → chunk-QOZ4RVQY.js} +8 -8
- package/dist/{chunk-LR6RRDWN.js → chunk-QRIW46LR.js} +5 -5
- package/dist/{chunk-7W4XLIVH.js → chunk-R2PTZ6QM.js} +10 -10
- package/dist/{chunk-M2BCY7H3.js → chunk-RCBHL2B5.js} +189 -136
- package/dist/{chunk-66YFDTT6.js → chunk-RJYFHEP4.js} +3 -3
- package/dist/{chunk-P3SKSKJI.js → chunk-RNXX2GOQ.js} +2 -2
- package/dist/{chunk-RGWYZR3S.js → chunk-RRBV4HIM.js} +2 -2
- package/dist/{chunk-44FTCIRI.js → chunk-RY5RRKYN.js} +8 -8
- package/dist/{chunk-Y7PSAHAY.js → chunk-S4LLHDGK.js} +3 -3
- package/dist/chunk-S7C32S2T.js +825 -0
- package/dist/{chunk-JRUEIRJB.js → chunk-SLO22FPS.js} +2 -2
- package/dist/{chunk-47E5UTXE.js → chunk-SMEVBJJJ.js} +2 -2
- package/dist/{chunk-QFHWYWQL.js → chunk-SVQDLYX7.js} +1 -1
- package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
- package/dist/{chunk-EXKCRXPO.js → chunk-TQ644YGV.js} +12 -12
- package/dist/{chunk-WRCAH3UO.js → chunk-U762HK4D.js} +15 -15
- package/dist/{chunk-LYLNMN77.js → chunk-VCHYS3RD.js} +8 -3
- package/dist/{chunk-7UDAIP6W.js → chunk-WHRIN7N3.js} +1 -1
- package/dist/{chunk-ZUCXFXLD.js → chunk-X3WYJ5T7.js} +2 -2
- package/dist/{chunk-UKJLPA7R.js → chunk-X6IZP2BD.js} +1 -1
- package/dist/{chunk-LCJURK7L.js → chunk-Y6GQQ4Y2.js} +1 -1
- package/dist/{chunk-HTWH2XQL.js → chunk-YE7D2S75.js} +2 -2
- package/dist/{chunk-DZPHN2WN.js → chunk-YKGUSW6D.js} +10 -10
- package/dist/{chunk-K5XT7NHD.js → chunk-YWRZG6GN.js} +10 -10
- package/dist/{chunk-JQ57AWDL.js → chunk-ZJ4PYTCK.js} +1 -1
- package/dist/completion-registry.d.ts +6 -0
- package/dist/completion-registry.js +62 -6
- package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
- package/dist/dgmo-router-BJBXSZMV.js +94 -0
- package/dist/{dimensions-7MF7VSGS.js → dimensions-AMA2S7RO.js} +5 -5
- package/dist/editor.js +12 -0
- package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-ADZIFVCH.js} +3 -3
- package/dist/{flowchart-renderer-DZQZRL2F.js → flowchart-renderer-CAG6ZNJ6.js} +5 -5
- package/dist/highlight.js +12 -0
- package/dist/index.d.ts +26 -5
- package/dist/index.js +83 -56
- package/dist/{layout-EFEZ533S.js → layout-6OSF2UGP.js} +3 -3
- package/dist/{layout-IGAVGDME.js → layout-C6MKMOBI.js} +1 -1
- package/dist/{layout-XUW444O5.js → layout-QS2SESBU.js} +2 -2
- package/dist/{layout-PP36LUTA.js → layout-T2PGKQUQ.js} +3 -3
- package/dist/{layout-Q3RYSODA.js → layout-UFB2O4AO.js} +3 -3
- package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
- package/dist/{layout-6L3BIFEZ.js → layout-VQ2USZJ3.js} +3 -3
- package/dist/{layout-DXVAYF6W.js → layout-VRJ5YFUE.js} +2 -2
- package/dist/{palettes-WZAIQTEG.js → palettes-WQHELGVQ.js} +2 -1
- package/dist/{parser-KYPP2DX6.js → parser-223VOHSB.js} +4 -4
- package/dist/{parser-JOOAVBJI.js → parser-2PNV7UI3.js} +3 -3
- package/dist/{parser-GZ3LVF72.js → parser-3MGA2MTM.js} +2 -2
- package/dist/{parser-NOANDFJ4.js → parser-4AR25MAS.js} +2 -2
- package/dist/{parser-337TACHB.js → parser-4B2PIXHI.js} +3 -3
- package/dist/{parser-KZMJNKDW.js → parser-57YQEEMC.js} +2 -2
- package/dist/{parser-J4DVNL4W.js → parser-5ZD2NKGU.js} +4 -4
- package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
- package/dist/parser-AL6YL7KM.js +12 -0
- package/dist/{parser-5655XSOR.js → parser-B2FWP7ZO.js} +3 -3
- package/dist/{parser-GEKPWSSK.js → parser-BJDQX4KV.js} +3 -3
- package/dist/{parser-UTXFJG4X.js → parser-CA5WC5HF.js} +3 -3
- package/dist/{parser-KZMALSB2.js → parser-E5HFYL7B.js} +4 -4
- package/dist/{parser-GCCWMBTU.js → parser-ESZ5J5IJ.js} +5 -4
- package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
- package/dist/{parser-AN3MGHRL.js → parser-FV6RGALQ.js} +3 -3
- package/dist/{parser-DGF3ZEO6.js → parser-HPR7G7F6.js} +3 -3
- package/dist/{parser-OKB64MMN.js → parser-I4HZVIHX.js} +3 -3
- package/dist/{parser-P4TOQYNN.js → parser-J3BM2AP2.js} +3 -3
- package/dist/{parser-NPXPJHWN.js → parser-JFNDS5E5.js} +3 -3
- package/dist/{parser-TL3JA4RI.js → parser-KFIK3EOO.js} +3 -3
- package/dist/{parser-IMM2JJX3.js → parser-LGUT7KKH.js} +4 -4
- package/dist/{parser-KFYRTGTC.js → parser-MYRGCK7Q.js} +4 -4
- package/dist/{parser-ZLKYDFI5.js → parser-NAUUUCI3.js} +3 -3
- package/dist/{parser-DHSFIUPU.js → parser-NJ5VEZA3.js} +3 -3
- package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
- package/dist/{parser-AKBVJHMK.js → parser-OV2WDSEV.js} +3 -3
- package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
- package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
- package/dist/{parser-7OEE7QT6.js → parser-RARXAHC7.js} +2 -2
- package/dist/{parser-NGHQQGD2.js → parser-T2RVIRDG.js} +3 -3
- package/dist/{parser-WEVTMBJ5.js → parser-W2DWCCLO.js} +3 -3
- package/dist/{parser-HCGXNHHL.js → parser-WFY4ZJUW.js} +3 -3
- package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
- package/dist/{renderer-CHQZES6G.js → renderer-3N64GVNM.js} +2 -2
- package/dist/{renderer-JR2XNZAH.js → renderer-3QM2DK7I.js} +5 -5
- package/dist/{renderer-XHEMXBQM.js → renderer-3W5T3IU6.js} +5 -5
- package/dist/{renderer-2ZQ6DPVD.js → renderer-4Z7FRQ2A.js} +2 -2
- package/dist/{renderer-EAORWLVK.js → renderer-52CHSV6S.js} +7 -7
- package/dist/{renderer-ZXQXRNDR.js → renderer-6OOJNEQE.js} +6 -6
- package/dist/{renderer-IR5GGAPB.js → renderer-A3PMPUO6.js} +11 -7
- package/dist/{renderer-3AD4NDF5.js → renderer-AM4VZSBQ.js} +6 -6
- package/dist/{renderer-P4XCRNCY.js → renderer-B3CPMS5R.js} +6 -6
- package/dist/{renderer-VGQMJC5K.js → renderer-B4KE3NM4.js} +11 -10
- package/dist/renderer-COSJM7UG.js +80 -0
- package/dist/{renderer-NAA7D33G.js → renderer-FXCVH2M5.js} +10 -9
- package/dist/{renderer-J4OS77PK.js → renderer-GWH5ACJ5.js} +3 -3
- package/dist/{renderer-7HOSI6JJ.js → renderer-IG72UJHW.js} +4 -4
- package/dist/{renderer-QQHQY3GT.js → renderer-IO3D5E4E.js} +5 -5
- package/dist/{renderer-6OQM32X3.js → renderer-IPDCAACY.js} +3 -3
- package/dist/{renderer-VYWCMRWA.js → renderer-KK5BU5K2.js} +5 -5
- package/dist/{renderer-7MCC6GKH.js → renderer-LD2H7WGP.js} +2 -2
- package/dist/{renderer-DCJ4AQ3N.js → renderer-MK47ESCB.js} +5 -5
- package/dist/{renderer-BLHN3RCY.js → renderer-MRMFYYZT.js} +2 -2
- package/dist/{renderer-XFEZ5UBE.js → renderer-O5RQHGK2.js} +6 -6
- package/dist/{renderer-43ESBXVY.js → renderer-OA5D3ZKB.js} +6 -6
- package/dist/{renderer-YTEZK3GC.js → renderer-ON4PTUHJ.js} +7 -7
- package/dist/{renderer-JRVY7HAD.js → renderer-OPDSKCQS.js} +4 -4
- package/dist/{renderer-FCXRDYSJ.js → renderer-PLRMST57.js} +7 -7
- package/dist/{renderer-WB75JME5.js → renderer-PSMRAL72.js} +6 -6
- package/dist/{renderer-7L7J4DHO.js → renderer-PXGCR7N4.js} +7 -6
- package/dist/{renderer-CEIX5JPA.js → renderer-R7OYCJEA.js} +2 -2
- package/dist/{renderer-DBNDLKPE.js → renderer-SBXCPA3S.js} +7 -7
- package/dist/{renderer-4JE5ORRO.js → renderer-TMQNTUQS.js} +7 -7
- package/dist/renderer-TTKTBB4C.js +46 -0
- package/dist/{renderer-5GZNGZU5.js → renderer-UVFGW2O6.js} +9 -7
- package/dist/{renderer-7VQOKAII.js → renderer-W22GX72R.js} +6 -6
- package/dist/{renderer-radial-NA5DVBG4.js → renderer-radial-42LVSG74.js} +5 -5
- package/dist/{state-parser-FE3RF6XY.js → state-parser-ROKY5KSI.js} +4 -4
- package/dist/{state-renderer-4S2C2CHB.js → state-renderer-MMG23G4W.js} +8 -8
- package/dist/{themes-CzuBdx1T.d.ts → themes-Cm2YBcT8.d.ts} +38 -2
- package/docs/ai-integration.md +4 -3
- package/docs/language-reference.md +162 -12
- package/gallery/fixtures/sketch.dgmo +2 -2
- package/gallery/fixtures/whiteboard.dgmo +18 -0
- package/package.json +2 -1
- package/dist/dgmo-router-7WANZOBD.js +0 -92
- package/dist/renderer-TJJGFQGT.js +0 -78
- package/dist/{chunk-CX6OH5WP.js → chunk-A5PUOHIS.js} +3 -3
- package/dist/{chunk-5LE2CTLS.js → chunk-NTJ5HVV6.js} +3 -3
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MAP_DIAGNOSTICS
|
|
3
3
|
} from "./chunk-EOYPX6SF.js";
|
|
4
|
+
import {
|
|
5
|
+
parseCountdown
|
|
6
|
+
} from "./chunk-ZJ4PYTCK.js";
|
|
4
7
|
import {
|
|
5
8
|
parseClock
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TCX5PMEY.js";
|
|
7
10
|
import {
|
|
8
11
|
parseBracket
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X3WYJ5T7.js";
|
|
10
13
|
import {
|
|
11
14
|
BODY_DIAGNOSTICS,
|
|
12
15
|
parseBody
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SMEVBJJJ.js";
|
|
14
17
|
import {
|
|
15
18
|
EXTENDED_CHART_DOORS,
|
|
16
19
|
parseChart,
|
|
@@ -19,141 +22,150 @@ import {
|
|
|
19
22
|
parseHeatmap,
|
|
20
23
|
parseSankey,
|
|
21
24
|
parseScatter
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WHRIN7N3.js";
|
|
26
|
+
import {
|
|
27
|
+
parseTechRadar
|
|
28
|
+
} from "./chunk-MKFQ5E7J.js";
|
|
23
29
|
import {
|
|
24
30
|
parseCycle
|
|
25
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NFWRIC2V.js";
|
|
26
32
|
import {
|
|
27
33
|
parseJourneyMap
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-COPSI54O.js";
|
|
29
35
|
import {
|
|
30
36
|
parsePyramid
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-M6J25PAZ.js";
|
|
32
38
|
import {
|
|
33
39
|
parseRing
|
|
34
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-EWERNTOX.js";
|
|
35
41
|
import {
|
|
36
42
|
TREEMAP_DIAGNOSTICS,
|
|
37
43
|
parseTreemap
|
|
38
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RNXX2GOQ.js";
|
|
39
45
|
import {
|
|
40
46
|
parseBlock
|
|
41
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-JX4RCC6B.js";
|
|
42
48
|
import {
|
|
43
49
|
parseGoal
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import {
|
|
46
|
-
parseCountdown
|
|
47
|
-
} from "./chunk-JQ57AWDL.js";
|
|
50
|
+
} from "./chunk-4YO7VJTP.js";
|
|
48
51
|
import {
|
|
49
52
|
parseMap
|
|
50
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-YE7D2S75.js";
|
|
51
54
|
import {
|
|
52
55
|
parseBoxesAndLines
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-GXP344YZ.js";
|
|
54
57
|
import {
|
|
55
58
|
parseSketch
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-NMKLX57Y.js";
|
|
57
60
|
import {
|
|
58
61
|
SKETCH_DIAGNOSTICS
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-NWSPPGIE.js";
|
|
63
|
+
import {
|
|
64
|
+
WHITEBOARD_DIAGNOSTICS,
|
|
65
|
+
parseWhiteboard
|
|
66
|
+
} from "./chunk-IHK3Y2HG.js";
|
|
60
67
|
import {
|
|
61
68
|
SWIMLANE_DIAGNOSTICS,
|
|
62
69
|
parseSwimlane
|
|
63
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-PNCKZFPE.js";
|
|
64
71
|
import {
|
|
65
72
|
FAMILY_DIAGNOSTICS,
|
|
66
73
|
parseFamily
|
|
67
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-C4W62JZO.js";
|
|
68
75
|
import {
|
|
69
76
|
parseMindmap
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import {
|
|
72
|
-
parseTechRadar
|
|
73
|
-
} from "./chunk-6K7RODXG.js";
|
|
77
|
+
} from "./chunk-DNMICILX.js";
|
|
74
78
|
import {
|
|
75
79
|
EVENT_LINE_DIAGNOSTICS,
|
|
76
80
|
parseEventLine
|
|
77
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-RJYFHEP4.js";
|
|
78
82
|
import {
|
|
79
83
|
parseTimelineEventLine
|
|
80
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-OYKNMFUY.js";
|
|
81
85
|
import {
|
|
82
86
|
VERSION_CONTROL_DIAGNOSTICS,
|
|
83
87
|
parseVersionControl
|
|
84
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-SVQDLYX7.js";
|
|
85
89
|
import {
|
|
86
90
|
parseKanban
|
|
87
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-IRVQT4GR.js";
|
|
88
92
|
import {
|
|
89
93
|
parseC4
|
|
90
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-LC5LY5V2.js";
|
|
91
95
|
import {
|
|
92
96
|
parseInfra
|
|
93
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-CUY56BK4.js";
|
|
94
98
|
import {
|
|
95
99
|
parseGantt
|
|
96
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-NUYWNKHH.js";
|
|
97
101
|
import {
|
|
98
102
|
parseDgmoChartType
|
|
99
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-YWRZG6GN.js";
|
|
100
104
|
import {
|
|
101
105
|
parseRaci
|
|
102
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-I74AQRVD.js";
|
|
103
107
|
import {
|
|
104
108
|
PERT_DIAGNOSTICS,
|
|
105
109
|
parsePert
|
|
106
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-AAC3XQWV.js";
|
|
107
111
|
import {
|
|
108
112
|
parseLiveLink
|
|
109
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-2ZVLI6GQ.js";
|
|
110
114
|
import {
|
|
111
115
|
makeYearContext,
|
|
112
116
|
parseDateToken,
|
|
113
117
|
resolveTokenYear,
|
|
114
118
|
toInternal
|
|
115
119
|
} from "./chunk-DAOFNU6J.js";
|
|
120
|
+
import {
|
|
121
|
+
COLOR_KEYS,
|
|
122
|
+
SEMANTIC_KEYS,
|
|
123
|
+
validateThemeFile
|
|
124
|
+
} from "./chunk-4HG4PYHM.js";
|
|
116
125
|
import {
|
|
117
126
|
SEQUENCE_DIAGNOSTICS,
|
|
118
127
|
parseSequenceDgmo
|
|
119
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-62VWZ3SE.js";
|
|
120
129
|
import {
|
|
121
130
|
parseFlowchart
|
|
122
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-SLO22FPS.js";
|
|
123
132
|
import {
|
|
124
133
|
GRAPH_DIAGNOSTICS
|
|
125
134
|
} from "./chunk-7TF3QOOD.js";
|
|
126
135
|
import {
|
|
127
136
|
parseState
|
|
128
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-NY56FM55.js";
|
|
129
138
|
import {
|
|
130
139
|
parseClassDiagram
|
|
131
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-OSIUWQ3N.js";
|
|
132
141
|
import {
|
|
133
142
|
parseERDiagram
|
|
134
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-5TZPIKNV.js";
|
|
135
144
|
import {
|
|
136
145
|
ARROW_DIAGNOSTIC_CODES
|
|
137
146
|
} from "./chunk-N7VMGZCU.js";
|
|
138
147
|
import {
|
|
139
148
|
parseOrg
|
|
140
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-FS2LZBHG.js";
|
|
141
150
|
import {
|
|
142
151
|
parseSitemap
|
|
143
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-5M52RPAS.js";
|
|
144
153
|
import {
|
|
145
154
|
parseWireframe
|
|
146
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-CYF2X3CG.js";
|
|
147
156
|
import {
|
|
148
157
|
RACI_DIAGNOSTICS
|
|
149
158
|
} from "./chunk-4WW3SGMH.js";
|
|
159
|
+
import {
|
|
160
|
+
BUILT_IN_PALETTE_IDS
|
|
161
|
+
} from "./chunk-3UR4F7FE.js";
|
|
150
162
|
import {
|
|
151
163
|
matchTagBlockHeading,
|
|
152
164
|
stripDefaultModifier,
|
|
153
165
|
tagAttrKey,
|
|
154
166
|
validateTagGroupNames,
|
|
155
167
|
validateTagValues
|
|
156
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-HX2KJEPD.js";
|
|
157
169
|
import {
|
|
158
170
|
ALIAS_DIAGNOSTICS,
|
|
159
171
|
TIMELINE_REGISTRY,
|
|
@@ -167,7 +179,7 @@ import {
|
|
|
167
179
|
peelTrailingColorName,
|
|
168
180
|
splitNameAndMeta,
|
|
169
181
|
withTagAliases
|
|
170
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
171
183
|
import {
|
|
172
184
|
resolveColorWithDiagnostic
|
|
173
185
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -241,7 +253,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
241
253
|
result.error = formatDgmoError(diag);
|
|
242
254
|
return result;
|
|
243
255
|
};
|
|
244
|
-
const
|
|
256
|
+
const warn2 = (line, message) => {
|
|
245
257
|
result.diagnostics.push(makeDgmoError(line, message, "warning"));
|
|
246
258
|
};
|
|
247
259
|
if (!content?.trim()) {
|
|
@@ -367,12 +379,12 @@ function parseVisualizationFull(content, palette) {
|
|
|
367
379
|
if (tagBlockMatch.alias) {
|
|
368
380
|
timelineAliasMap.set(
|
|
369
381
|
tagBlockMatch.alias.toLowerCase(),
|
|
370
|
-
tagBlockMatch.name
|
|
382
|
+
tagAttrKey(tagBlockMatch.name)
|
|
371
383
|
);
|
|
372
384
|
} else {
|
|
373
385
|
timelineAliasMap.set(
|
|
374
|
-
tagBlockMatch.name
|
|
375
|
-
tagBlockMatch.name
|
|
386
|
+
tagAttrKey(tagBlockMatch.name),
|
|
387
|
+
tagAttrKey(tagBlockMatch.name)
|
|
376
388
|
);
|
|
377
389
|
}
|
|
378
390
|
result.timelineTagGroups.push(newGroup);
|
|
@@ -575,7 +587,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
575
587
|
lineNumber
|
|
576
588
|
});
|
|
577
589
|
} else {
|
|
578
|
-
|
|
590
|
+
warn2(
|
|
579
591
|
lineNumber,
|
|
580
592
|
`Unrecognized era entry: "${line}" \u2014 use '<start> -> <end> Label [color]' (e.g. '1716 -> 1717 Reign').`
|
|
581
593
|
);
|
|
@@ -603,7 +615,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
603
615
|
lineNumber
|
|
604
616
|
});
|
|
605
617
|
} else {
|
|
606
|
-
|
|
618
|
+
warn2(
|
|
607
619
|
lineNumber,
|
|
608
620
|
`Unrecognized marker entry: "${line}" \u2014 use '<date> Label [color]' (e.g. '1776 Independence').`
|
|
609
621
|
);
|
|
@@ -717,7 +729,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
717
729
|
if (!/^(era|marker|tag|sort|active-tag|swimlanes|no-scale|no-legend|lane-by|fill-tint|fill-solid|fill-outline)\b/i.test(
|
|
718
730
|
line
|
|
719
731
|
) && !line.startsWith("[")) {
|
|
720
|
-
|
|
732
|
+
warn2(lineNumber, `Expected a date at the start \u2014 e.g., '1718 ${line}'`);
|
|
721
733
|
continue;
|
|
722
734
|
}
|
|
723
735
|
}
|
|
@@ -961,7 +973,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
961
973
|
const periodMatch = line.match(/^period\b(.*)$/i);
|
|
962
974
|
if (periodMatch) {
|
|
963
975
|
if (result.periods.length > 0 && !inSlopePeriodBlock) {
|
|
964
|
-
|
|
976
|
+
warn2(
|
|
965
977
|
lineNumber,
|
|
966
978
|
`Duplicate 'period' directive \u2014 periods are already defined`
|
|
967
979
|
);
|
|
@@ -1018,7 +1030,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1018
1030
|
}
|
|
1019
1031
|
}
|
|
1020
1032
|
if (values.length < P) {
|
|
1021
|
-
|
|
1033
|
+
warn2(
|
|
1022
1034
|
lineNumber,
|
|
1023
1035
|
`Data row has ${values.length} numeric value(s) but ${P} period(s) are defined \u2014 expected ${P} values`
|
|
1024
1036
|
);
|
|
@@ -1027,7 +1039,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1027
1039
|
const labelTokens = tokens.slice(0, rightIdx + 1);
|
|
1028
1040
|
const joinedLabel = labelTokens.join(" ");
|
|
1029
1041
|
if (!joinedLabel) {
|
|
1030
|
-
|
|
1042
|
+
warn2(
|
|
1031
1043
|
lineNumber,
|
|
1032
1044
|
`Data row has no label \u2014 add a label before the numeric values`
|
|
1033
1045
|
);
|
|
@@ -1041,14 +1053,14 @@ function parseVisualizationFull(content, palette) {
|
|
|
1041
1053
|
palette
|
|
1042
1054
|
) ?? null : null;
|
|
1043
1055
|
if (!labelPart) {
|
|
1044
|
-
|
|
1056
|
+
warn2(
|
|
1045
1057
|
lineNumber,
|
|
1046
1058
|
`Data row has no label \u2014 add a label before the numeric values`
|
|
1047
1059
|
);
|
|
1048
1060
|
continue;
|
|
1049
1061
|
}
|
|
1050
1062
|
if (/^\d[\d,.]*$/.test(labelPart)) {
|
|
1051
|
-
|
|
1063
|
+
warn2(
|
|
1052
1064
|
lineNumber,
|
|
1053
1065
|
`Label '${labelPart}' looks numeric \u2014 this may indicate too many values or a missing label`
|
|
1054
1066
|
);
|
|
@@ -1062,7 +1074,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1062
1074
|
continue;
|
|
1063
1075
|
}
|
|
1064
1076
|
if (firstLineParsed) {
|
|
1065
|
-
|
|
1077
|
+
warn2(lineNumber, `Unexpected line: '${line}'.`);
|
|
1066
1078
|
}
|
|
1067
1079
|
continue;
|
|
1068
1080
|
}
|
|
@@ -1168,7 +1180,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1168
1180
|
continue;
|
|
1169
1181
|
}
|
|
1170
1182
|
if (firstLineParsed) {
|
|
1171
|
-
|
|
1183
|
+
warn2(lineNumber, `Unexpected line: '${line}'.`);
|
|
1172
1184
|
}
|
|
1173
1185
|
}
|
|
1174
1186
|
if (!result.type) {
|
|
@@ -1190,7 +1202,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1190
1202
|
result.words = tokenizeFreeformText(freeformLines.join(" "));
|
|
1191
1203
|
}
|
|
1192
1204
|
if (result.words.length === 0) {
|
|
1193
|
-
|
|
1205
|
+
warn2(
|
|
1194
1206
|
1,
|
|
1195
1207
|
'No words found. Add words as "word weight" (space-separated), one per line, or paste freeform text'
|
|
1196
1208
|
);
|
|
@@ -1202,14 +1214,14 @@ function parseVisualizationFull(content, palette) {
|
|
|
1202
1214
|
}
|
|
1203
1215
|
if (result.type === "arc") {
|
|
1204
1216
|
if (result.links.length === 0) {
|
|
1205
|
-
|
|
1217
|
+
warn2(
|
|
1206
1218
|
1,
|
|
1207
1219
|
'No links found. Add links as "Source -> Target weight" (e.g., "Alice -> Bob 5")'
|
|
1208
1220
|
);
|
|
1209
1221
|
}
|
|
1210
1222
|
if (result.arcNodeGroups.length > 0) {
|
|
1211
1223
|
if (result.arcOrder === "name" || result.arcOrder === "degree") {
|
|
1212
|
-
|
|
1224
|
+
warn2(
|
|
1213
1225
|
1,
|
|
1214
1226
|
`Cannot use "order ${result.arcOrder}" with [Group] headers. Use "order group" or remove group headers.`
|
|
1215
1227
|
);
|
|
@@ -1223,7 +1235,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1223
1235
|
}
|
|
1224
1236
|
if (result.type === "timeline") {
|
|
1225
1237
|
if (result.timelineEvents.length === 0) {
|
|
1226
|
-
|
|
1238
|
+
warn2(
|
|
1227
1239
|
1,
|
|
1228
1240
|
'No events found. Add events like "1718 Event Name" or "1716 -> 1717 Event Name"'
|
|
1229
1241
|
);
|
|
@@ -1303,7 +1315,7 @@ function parseVisualizationFull(content, palette) {
|
|
|
1303
1315
|
}
|
|
1304
1316
|
if (result.type === "quadrant") {
|
|
1305
1317
|
if (result.quadrantPoints.length === 0) {
|
|
1306
|
-
|
|
1318
|
+
warn2(
|
|
1307
1319
|
1,
|
|
1308
1320
|
'No data points found. Add points as "Label x, y" (e.g., "Item A 0.5, 0.7")'
|
|
1309
1321
|
);
|
|
@@ -1317,14 +1329,14 @@ function parseVisualizationFull(content, palette) {
|
|
|
1317
1329
|
);
|
|
1318
1330
|
}
|
|
1319
1331
|
if (result.data.length === 0) {
|
|
1320
|
-
|
|
1332
|
+
warn2(
|
|
1321
1333
|
1,
|
|
1322
1334
|
"No data lines found. Add data as 'Label value1 value2' (e.g., 'Blackbeard 40 4')"
|
|
1323
1335
|
);
|
|
1324
1336
|
}
|
|
1325
1337
|
for (const item of result.data) {
|
|
1326
1338
|
if (item.values.length !== result.periods.length) {
|
|
1327
|
-
|
|
1339
|
+
warn2(
|
|
1328
1340
|
item.lineNumber,
|
|
1329
1341
|
`Data item "${item.label}" has ${item.values.length} value(s) but ${result.periods.length} period(s) are defined`
|
|
1330
1342
|
);
|
|
@@ -1457,6 +1469,199 @@ function tokenizeFreeformText(text) {
|
|
|
1457
1469
|
return Array.from(counts.entries()).map(([text2, count]) => ({ text: text2, weight: count, lineNumber: 0 })).sort((a, b) => b.weight - a.weight);
|
|
1458
1470
|
}
|
|
1459
1471
|
|
|
1472
|
+
// src/palettes/directive.ts
|
|
1473
|
+
var PALETTE_LINE_RE = /^palette(?:\s+(.*))?$/;
|
|
1474
|
+
var MODES = /* @__PURE__ */ new Set(["light", "dark"]);
|
|
1475
|
+
var COLOR_NAMES = new Set(COLOR_KEYS);
|
|
1476
|
+
var kebab = (key) => key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
1477
|
+
var camel = (key) => key.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
1478
|
+
var ROLE_KEYS = new Set(SEMANTIC_KEYS.map(kebab));
|
|
1479
|
+
function builtInList() {
|
|
1480
|
+
return [...BUILT_IN_PALETTE_IDS].sort().join(", ");
|
|
1481
|
+
}
|
|
1482
|
+
function warn(line, message, code) {
|
|
1483
|
+
return makeDgmoError(line, message, "warning", code);
|
|
1484
|
+
}
|
|
1485
|
+
function readBlock(name, headerLine, block) {
|
|
1486
|
+
const diagnostics = [];
|
|
1487
|
+
const sections = {};
|
|
1488
|
+
const where = /* @__PURE__ */ new Map();
|
|
1489
|
+
let section;
|
|
1490
|
+
for (const { line, text } of block) {
|
|
1491
|
+
const [key = "", value, ...rest] = text.trim().split(/\s+/);
|
|
1492
|
+
if (MODES.has(key) && value === void 0) {
|
|
1493
|
+
section = key;
|
|
1494
|
+
if (sections[section]) {
|
|
1495
|
+
diagnostics.push(
|
|
1496
|
+
warn(
|
|
1497
|
+
line,
|
|
1498
|
+
`The "${section}" section appears twice in palette "${name}".`,
|
|
1499
|
+
"W_PALETTE_INVALID"
|
|
1500
|
+
)
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
sections[section] = { roles: {}, colors: {} };
|
|
1504
|
+
where.set(section, line);
|
|
1505
|
+
continue;
|
|
1506
|
+
}
|
|
1507
|
+
if (key === "colors" && value === void 0) continue;
|
|
1508
|
+
if (!section) {
|
|
1509
|
+
diagnostics.push(
|
|
1510
|
+
warn(
|
|
1511
|
+
line,
|
|
1512
|
+
`"${key}" sits outside a light or dark section of palette "${name}".`,
|
|
1513
|
+
"W_PALETTE_INVALID"
|
|
1514
|
+
)
|
|
1515
|
+
);
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
if (value === void 0 || rest.length > 0) {
|
|
1519
|
+
diagnostics.push(
|
|
1520
|
+
warn(
|
|
1521
|
+
line,
|
|
1522
|
+
`Write "${key}" as one key and one hex colour, e.g. "${key} #282a36".`,
|
|
1523
|
+
"W_PALETTE_INVALID"
|
|
1524
|
+
)
|
|
1525
|
+
);
|
|
1526
|
+
continue;
|
|
1527
|
+
}
|
|
1528
|
+
if (COLOR_NAMES.has(key)) {
|
|
1529
|
+
sections[section].colors[key] = value;
|
|
1530
|
+
where.set(`${section}.colors.${key}`, line);
|
|
1531
|
+
} else {
|
|
1532
|
+
const field = ROLE_KEYS.has(key) ? camel(key) : key;
|
|
1533
|
+
sections[section].roles[field] = value;
|
|
1534
|
+
where.set(`${section}.${field}`, line);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
if (diagnostics.length > 0) return diagnostics;
|
|
1538
|
+
const modes = Object.keys(sections);
|
|
1539
|
+
const input = {
|
|
1540
|
+
id: name.toLowerCase(),
|
|
1541
|
+
name,
|
|
1542
|
+
...modes.length === 1 && { mode: modes[0] }
|
|
1543
|
+
};
|
|
1544
|
+
for (const mode of modes) {
|
|
1545
|
+
const { roles, colors } = sections[mode];
|
|
1546
|
+
input[mode] = { ...roles, colors };
|
|
1547
|
+
}
|
|
1548
|
+
const result = validateThemeFile(input);
|
|
1549
|
+
if (result.ok) return { palette: result.palette, mode: result.mode };
|
|
1550
|
+
return result.errors.map((error) => {
|
|
1551
|
+
const field = /^(light|dark)(?:\.colors)?\.(\w+)/.exec(error) ?? /^(light|dark)\b[^:]*: (\w+) /.exec(error);
|
|
1552
|
+
const at = field ? where.get(`${field[1]}.colors.${field[2]}`) ?? where.get(`${field[1]}.${field[2]}`) ?? where.get(field[1]) : void 0;
|
|
1553
|
+
return warn(
|
|
1554
|
+
at ?? headerLine,
|
|
1555
|
+
`Palette "${name}" is not drawn \u2014 ${error.replace(/\b(text[A-Z]\w*|[a-z]+[A-Z]\w*)\b/g, kebab)}.`,
|
|
1556
|
+
"W_PALETTE_INVALID"
|
|
1557
|
+
);
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
function extractPaletteDirective(content) {
|
|
1561
|
+
if (!/^palette\b/m.test(content)) return { content, diagnostics: [] };
|
|
1562
|
+
const lines = content.split("\n");
|
|
1563
|
+
const diagnostics = [];
|
|
1564
|
+
let paletteId;
|
|
1565
|
+
let palette;
|
|
1566
|
+
let mode;
|
|
1567
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1568
|
+
const match = PALETTE_LINE_RE.exec(lines[i].replace(/\r$/, ""));
|
|
1569
|
+
if (!match) continue;
|
|
1570
|
+
const lineNumber = i + 1;
|
|
1571
|
+
lines[i] = "//";
|
|
1572
|
+
const block = [];
|
|
1573
|
+
let blockEnd = i;
|
|
1574
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
1575
|
+
const next = lines[j].replace(/\r$/, "");
|
|
1576
|
+
if (next.trim() === "") continue;
|
|
1577
|
+
if (!/^\s/.test(next)) break;
|
|
1578
|
+
blockEnd = j;
|
|
1579
|
+
block.push({ line: j + 1, text: next });
|
|
1580
|
+
}
|
|
1581
|
+
for (let j = i + 1; j <= blockEnd; j++) lines[j] = "//";
|
|
1582
|
+
i = blockEnd;
|
|
1583
|
+
const words = (match[1] ?? "").trim().split(/\s+/).filter(Boolean);
|
|
1584
|
+
const name = words[0];
|
|
1585
|
+
if (!name) {
|
|
1586
|
+
diagnostics.push(
|
|
1587
|
+
warn(
|
|
1588
|
+
lineNumber,
|
|
1589
|
+
`"palette" needs a palette name \u2014 one of ${builtInList()}.`,
|
|
1590
|
+
"W_PALETTE_UNKNOWN"
|
|
1591
|
+
)
|
|
1592
|
+
);
|
|
1593
|
+
continue;
|
|
1594
|
+
}
|
|
1595
|
+
if (block.length > 0) {
|
|
1596
|
+
if (words.length > 1) {
|
|
1597
|
+
diagnostics.push(
|
|
1598
|
+
warn(
|
|
1599
|
+
lineNumber,
|
|
1600
|
+
`An embedded palette takes its name only \u2014 its sections say which modes it has.`,
|
|
1601
|
+
"W_PALETTE_MODE_UNKNOWN"
|
|
1602
|
+
)
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
const read = readBlock(name, lineNumber, block);
|
|
1606
|
+
if (Array.isArray(read)) {
|
|
1607
|
+
diagnostics.push(...read);
|
|
1608
|
+
continue;
|
|
1609
|
+
}
|
|
1610
|
+
paletteId = void 0;
|
|
1611
|
+
palette = read.palette;
|
|
1612
|
+
mode = read.mode ?? void 0;
|
|
1613
|
+
continue;
|
|
1614
|
+
}
|
|
1615
|
+
const id = name.toLowerCase();
|
|
1616
|
+
if (!BUILT_IN_PALETTE_IDS.has(id)) {
|
|
1617
|
+
diagnostics.push(
|
|
1618
|
+
warn(
|
|
1619
|
+
lineNumber,
|
|
1620
|
+
`"${name}" is not a built-in palette \u2014 this diagram uses the default palette. Built-in palettes: ${builtInList()}. An embedded palette needs its colours in an indented block.`,
|
|
1621
|
+
"W_PALETTE_UNKNOWN"
|
|
1622
|
+
)
|
|
1623
|
+
);
|
|
1624
|
+
continue;
|
|
1625
|
+
}
|
|
1626
|
+
const modeWord = words[1];
|
|
1627
|
+
if (words.length > 2 || modeWord !== void 0 && !MODES.has(modeWord)) {
|
|
1628
|
+
diagnostics.push(
|
|
1629
|
+
warn(
|
|
1630
|
+
lineNumber,
|
|
1631
|
+
`"palette ${name}" takes one optional mode word, light or dark \u2014 the rest of the line is ignored.`,
|
|
1632
|
+
"W_PALETTE_MODE_UNKNOWN"
|
|
1633
|
+
)
|
|
1634
|
+
);
|
|
1635
|
+
}
|
|
1636
|
+
paletteId = id;
|
|
1637
|
+
palette = void 0;
|
|
1638
|
+
mode = modeWord !== void 0 && MODES.has(modeWord) ? modeWord : void 0;
|
|
1639
|
+
}
|
|
1640
|
+
return {
|
|
1641
|
+
content: lines.join("\n"),
|
|
1642
|
+
...paletteId !== void 0 && { paletteId },
|
|
1643
|
+
...palette !== void 0 && { palette },
|
|
1644
|
+
...mode !== void 0 && { mode },
|
|
1645
|
+
diagnostics
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
function choosePalette(directive, caller) {
|
|
1649
|
+
const callerTheme = caller.theme ?? "light";
|
|
1650
|
+
if (caller.paletteOverride !== void 0) {
|
|
1651
|
+
return { paletteId: caller.paletteOverride, theme: callerTheme };
|
|
1652
|
+
}
|
|
1653
|
+
const fileId = directive.palette?.id ?? directive.paletteId;
|
|
1654
|
+
if (fileId !== void 0) {
|
|
1655
|
+
const theme = directive.mode === "dark" ? "dark" : directive.mode === "light" && callerTheme !== "transparent" ? "light" : callerTheme;
|
|
1656
|
+
return {
|
|
1657
|
+
paletteId: fileId,
|
|
1658
|
+
...directive.palette && { palette: directive.palette },
|
|
1659
|
+
theme
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
return { paletteId: caller.palette ?? "slate", theme: callerTheme };
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1460
1665
|
// src/utils/arrows-diagnostics.ts
|
|
1461
1666
|
var ARROW_DIAGNOSTICS = [
|
|
1462
1667
|
// --- ACTIVE (TD-13): emitted by validateLabelCharacters ---
|
|
@@ -1580,6 +1785,33 @@ var UNIVERSAL_DIAGNOSTICS = [
|
|
|
1580
1785
|
hint: "Remove legend-inline, or use a chart type with a top-center capsule legend (e.g. bar, line, state, treemap, sequence, gantt).",
|
|
1581
1786
|
example: "pie Share\nApples 30\nPears 70"
|
|
1582
1787
|
},
|
|
1788
|
+
{
|
|
1789
|
+
code: "W_PALETTE_UNKNOWN",
|
|
1790
|
+
severity: "warning",
|
|
1791
|
+
chartType: null,
|
|
1792
|
+
title: "Palette not drawn",
|
|
1793
|
+
message: (p) => `"${String(p.name ?? "dracula")}" is not a built-in palette \u2014 this diagram uses the default palette.`,
|
|
1794
|
+
hint: "Name a built-in palette \u2014 the message lists them \u2014 or remove the palette line.",
|
|
1795
|
+
example: "pie Share\nApples 30\nPears 70\n\npalette dracula"
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
code: "W_PALETTE_INVALID",
|
|
1799
|
+
severity: "warning",
|
|
1800
|
+
chartType: null,
|
|
1801
|
+
title: "Embedded palette not drawn",
|
|
1802
|
+
message: (p) => `Palette "${String(p.name ?? "Dracula")}" is not drawn \u2014 ${String(p.reason ?? 'dark.bg: invalid hex "#28"')}.`,
|
|
1803
|
+
hint: "Fix the line the warning names: every key present, hex colours only, text readable on its fill, and a name that is not a built-in palette.",
|
|
1804
|
+
example: "pie Share\nApples 30\nPears 70\n\npalette Dracula\n dark\n bg #28"
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
code: "W_PALETTE_MODE_UNKNOWN",
|
|
1808
|
+
severity: "warning",
|
|
1809
|
+
chartType: null,
|
|
1810
|
+
title: "Palette mode word not recognised",
|
|
1811
|
+
message: (p) => `"palette ${String(p.name ?? "nord")}" takes one optional mode word, light or dark \u2014 the rest of the line is ignored.`,
|
|
1812
|
+
hint: "Write light, dark, or nothing after the palette name.",
|
|
1813
|
+
example: "pie Share\nApples 30\nPears 70\n\npalette nord dim"
|
|
1814
|
+
},
|
|
1583
1815
|
{
|
|
1584
1816
|
code: "W_CANVAS_WIDTH_IGNORED",
|
|
1585
1817
|
severity: "warning",
|
|
@@ -1611,6 +1843,7 @@ var REGISTRY = [
|
|
|
1611
1843
|
...COLOR_DIAGNOSTICS,
|
|
1612
1844
|
...SEQUENCE_DIAGNOSTICS,
|
|
1613
1845
|
...SKETCH_DIAGNOSTICS,
|
|
1846
|
+
...WHITEBOARD_DIAGNOSTICS,
|
|
1614
1847
|
...FAMILY_DIAGNOSTICS,
|
|
1615
1848
|
...ALIAS_DIAGNOSTICS
|
|
1616
1849
|
];
|
|
@@ -1675,6 +1908,7 @@ var REGISTRY2 = {
|
|
|
1675
1908
|
pert: { category: "diagram", parse: parsePert },
|
|
1676
1909
|
"boxes-and-lines": { category: "diagram", parse: parseBoxesAndLines },
|
|
1677
1910
|
sketch: { category: "diagram", parse: parseSketch },
|
|
1911
|
+
whiteboard: { category: "diagram", parse: parseWhiteboard },
|
|
1678
1912
|
swimlane: { category: "diagram", parse: parseSwimlane },
|
|
1679
1913
|
family: { category: "diagram", parse: parseFamily },
|
|
1680
1914
|
"version-control": { category: "diagram", parse: parseVersionControl },
|
|
@@ -1761,7 +1995,9 @@ var knownChartTypeIds = chartTypeParsers.map(
|
|
|
1761
1995
|
var PARSER_BY_ID = new Map(chartTypeParsers);
|
|
1762
1996
|
var ALL_KNOWN_TYPES = new Set(knownChartTypeIds);
|
|
1763
1997
|
function parseDgmo(content) {
|
|
1764
|
-
const
|
|
1998
|
+
const directive = extractPaletteDirective(content);
|
|
1999
|
+
const result = parseDgmoUndeduped(directive.content);
|
|
2000
|
+
result.diagnostics = [...directive.diagnostics, ...result.diagnostics];
|
|
1765
2001
|
return {
|
|
1766
2002
|
// `attachHints` backfills the registry's repair sentence by code, so the
|
|
1767
2003
|
// hint travels however the diagnostic was constructed. See its own comment.
|
|
@@ -1853,7 +2089,7 @@ function detectColonChartType(content) {
|
|
|
1853
2089
|
}
|
|
1854
2090
|
return null;
|
|
1855
2091
|
}
|
|
1856
|
-
var EMPTY_CONTENT_EXEMPT = /* @__PURE__ */ new Set(["live-link"]);
|
|
2092
|
+
var EMPTY_CONTENT_EXEMPT = /* @__PURE__ */ new Set(["live-link", "whiteboard"]);
|
|
1857
2093
|
function detectEmptyContent(content, chartType) {
|
|
1858
2094
|
if (chartType && EMPTY_CONTENT_EXEMPT.has(chartType)) return [];
|
|
1859
2095
|
const lines = content.split("\n");
|
|
@@ -1876,6 +2112,8 @@ export {
|
|
|
1876
2112
|
parseWordcloud,
|
|
1877
2113
|
parseVenn,
|
|
1878
2114
|
parseQuadrant,
|
|
2115
|
+
extractPaletteDirective,
|
|
2116
|
+
choosePalette,
|
|
1879
2117
|
listDiagnosticCodes,
|
|
1880
2118
|
getDiagnosticSpec,
|
|
1881
2119
|
REGISTRY_BY_ID,
|