@diagrammo/dgmo 0.89.0 → 0.91.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 +589 -15
- package/dist/advanced.js +813 -211
- package/dist/block.d.ts +11 -2
- package/dist/block.js +94 -64
- package/dist/{calculator-35YVW4QO.js → calculator-3LZUWOBK.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 +18 -17
- package/dist/{chart-types-Bf8C5QQW.d.ts → chart-types-V2NcgN5O.d.ts} +4 -0
- package/dist/{charts-d3-KEQSUWKP.js → charts-d3-YXD6VGZQ.js} +8 -7
- package/dist/{chunk-PMNITNPR.js → chunk-273GB7WK.js} +6 -5
- package/dist/{chunk-HAMF4F3P.js → chunk-2A4OFZ2Z.js} +5 -5
- package/dist/{chunk-K5XT7NHD.js → chunk-2AM6VA3A.js} +10 -10
- package/dist/{chunk-XJ2TBXHA.js → chunk-2UV627GG.js} +9 -9
- package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
- package/dist/{chunk-JVZ7KFAX.js → chunk-37QQXKFV.js} +9 -10
- package/dist/{chunk-M2BCY7H3.js → chunk-3LINSNJT.js} +199 -146
- package/dist/{chunk-WPL5PFXE.js → chunk-3SLRZKLB.js} +6 -6
- package/dist/chunk-3UR4F7FE.js +14 -0
- package/dist/{chunk-ZUCXFXLD.js → chunk-3YTAOMMN.js} +2 -2
- package/dist/{chunk-NIUO2TNR.js → chunk-4HG4PYHM.js} +197 -203
- package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
- package/dist/{chunk-HUNDJTTH.js → chunk-53BJIOLF.js} +1 -1
- package/dist/{chunk-LR6RRDWN.js → chunk-57L2JPP2.js} +10 -6
- package/dist/{chunk-IIOLFAGJ.js → chunk-5DIBB2QG.js} +51 -32
- package/dist/{chunk-S2WE7TVK.js → chunk-5MDQMB6A.js} +1 -1
- package/dist/{chunk-7Z2VFRP5.js → chunk-5U6DXIMV.js} +47 -24
- package/dist/{chunk-QIOYTQDZ.js → chunk-5VPWIC6T.js} +9 -9
- package/dist/{chunk-JRUEIRJB.js → chunk-634LDSN6.js} +3 -3
- package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
- package/dist/{chunk-LPYYZCSI.js → chunk-6NO3MNBC.js} +3 -3
- package/dist/{chunk-ITSBBQTH.js → chunk-6QEXWMBP.js} +13 -17
- package/dist/{chunk-DDPGEGHB.js → chunk-7BBRSOKS.js} +3 -3
- package/dist/{chunk-WQ6G6FFM.js → chunk-AR4QVMWG.js} +5 -2
- package/dist/{chunk-BB6QKWHZ.js → chunk-B6EUFLRP.js} +10 -10
- package/dist/{chunk-C4FRGZGX.js → chunk-CDT33RHG.js} +1 -1
- package/dist/{chunk-WP22MHH6.js → chunk-CPGKRI7H.js} +10 -13
- package/dist/{chunk-ZNNVI5SR.js → chunk-CU2PZLZP.js} +53 -31
- package/dist/{chunk-CUYHST3B.js → chunk-CVZBLHHW.js} +1 -1
- package/dist/{chunk-Y7PSAHAY.js → chunk-CXIPV2FY.js} +3 -3
- package/dist/{chunk-NRPELUB6.js → chunk-D7DXNQW5.js} +2 -2
- package/dist/{chunk-YMFQLWZ2.js → chunk-D7PP35BA.js} +1 -1
- package/dist/{chunk-RGWYZR3S.js → chunk-DLX7MEN4.js} +2 -2
- package/dist/chunk-EDPDAUBL.js +825 -0
- package/dist/{chunk-GSYZZFI5.js → chunk-EP7BT3HU.js} +2 -2
- package/dist/{chunk-ICZ7M6IZ.js → chunk-EQJ3U5EW.js} +1 -1
- package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
- package/dist/{chunk-XUCQVKLQ.js → chunk-F2436VRR.js} +4 -4
- package/dist/{chunk-UG2XG57E.js → chunk-F26ZPBSF.js} +3 -3
- package/dist/{chunk-UWKRPQZO.js → chunk-FJCYK4K3.js} +25 -22
- package/dist/{chunk-FKLE6QA3.js → chunk-G22UV5AF.js} +12 -12
- package/dist/{chunk-GUTZCRBT.js → chunk-G3EUQMV4.js} +4 -4
- package/dist/{chunk-SOPM5PLO.js → chunk-GCDW3WAY.js} +14 -14
- package/dist/{chunk-7UDAIP6W.js → chunk-HFG7KQOY.js} +13 -15
- package/dist/{chunk-ID2K3IHI.js → chunk-HLE5QGZJ.js} +1 -1
- package/dist/{chunk-QFHWYWQL.js → chunk-HLVGZXM5.js} +2 -2
- package/dist/{chunk-7C2RAGPT.js → chunk-HSGWR2FL.js} +16 -16
- package/dist/{chunk-P3SKSKJI.js → chunk-HWXUQCDY.js} +3 -3
- package/dist/{chunk-HTWH2XQL.js → chunk-HYV6GSXM.js} +6 -3
- package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
- package/dist/chunk-IHK3Y2HG.js +781 -0
- package/dist/{chunk-7KPHRTND.js → chunk-II4XJETG.js} +1 -1
- package/dist/{chunk-RXIKESRI.js → chunk-IMHNZITR.js} +2 -2
- package/dist/{chunk-TAP2NZEU.js → chunk-IMKPFW67.js} +13 -13
- package/dist/{chunk-FKZ2Y3Q5.js → chunk-IS6WFBX7.js} +3 -3
- package/dist/{chunk-47E5UTXE.js → chunk-IUBCDNT2.js} +2 -2
- package/dist/{chunk-EXKCRXPO.js → chunk-IWTUXGHN.js} +12 -12
- package/dist/{chunk-C7QRRTAW.js → chunk-J2SQNZ6D.js} +2 -2
- package/dist/{chunk-DZPHN2WN.js → chunk-JA2S7PHR.js} +14 -14
- package/dist/{chunk-DPSMX4EY.js → chunk-JJQWCI35.js} +4 -4
- package/dist/chunk-JJUDOR4I.js +110 -0
- package/dist/{chunk-LYLNMN77.js → chunk-K3BYD3WU.js} +8 -3
- package/dist/{chunk-3AQJNY65.js → chunk-KFXY5IW2.js} +149 -43
- package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
- package/dist/{chunk-LCJURK7L.js → chunk-LKR4FACF.js} +2 -4
- package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
- package/dist/{chunk-IJ27L3R4.js → chunk-MA42PIGJ.js} +1 -1
- package/dist/{chunk-IQ6P3HDE.js → chunk-MI6SJJQU.js} +2 -2
- package/dist/{chunk-N4BBSDWI.js → chunk-MJKQ5ZYY.js} +140 -151
- package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
- package/dist/{chunk-AZ24RI5L.js → chunk-MNL547RV.js} +6 -6
- package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
- package/dist/{chunk-ECMA6XE2.js → chunk-N254IJM2.js} +13 -13
- package/dist/{layout-search-YKUL4VBV.js → chunk-NWPMLX2V.js} +27 -30
- package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
- package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
- package/dist/{chunk-B3S76BZO.js → chunk-PSGSFRRE.js} +4 -4
- package/dist/{chunk-4AJKOUBO.js → chunk-PUZ63XZM.js} +13 -11
- package/dist/{chunk-UQLHKLF4.js → chunk-PZVTFQI2.js} +8 -8
- package/dist/{chunk-W7QN5BC5.js → chunk-Q3N7PI3B.js} +180 -7
- package/dist/{chunk-L5AFONQU.js → chunk-QKJ6MQXW.js} +2 -4
- package/dist/{chunk-7SX4IY6T.js → chunk-QVKTAU7P.js} +1 -1
- package/dist/{chunk-SLQT3JP3.js → chunk-R7BSF7Z7.js} +1 -1
- package/dist/{chunk-4R6OMKXB.js → chunk-RHXIUUWB.js} +5 -5
- package/dist/{chunk-MHAYUS65.js → chunk-RMTOZALT.js} +8 -5
- package/dist/{chunk-HSRQDWV7.js → chunk-ROCBGUJN.js} +8 -17
- package/dist/{chunk-44FTCIRI.js → chunk-RVTYIGWZ.js} +9 -9
- package/dist/{chunk-RU725VCJ.js → chunk-SKF7XLCM.js} +10 -35
- package/dist/{chunk-RPKBWJBB.js → chunk-SMTWQ66K.js} +6 -6
- package/dist/{chunk-3AX6MCI6.js → chunk-SPQVER4T.js} +2 -2
- package/dist/{chunk-CX6OH5WP.js → chunk-SWBHH2UW.js} +4 -4
- package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
- package/dist/{chunk-7TF3QOOD.js → chunk-TIVMAITN.js} +14 -0
- package/dist/{chunk-NSR2CGV6.js → chunk-TLPY4ZBI.js} +611 -437
- package/dist/{chunk-WRCAH3UO.js → chunk-TPEYEOXA.js} +15 -15
- package/dist/{chunk-FJNXXGTR.js → chunk-UWJP4JSZ.js} +3 -3
- package/dist/{chunk-MY6GUH26.js → chunk-V3KHZQPK.js} +3 -3
- package/dist/{chunk-66YFDTT6.js → chunk-VGSSAMLA.js} +4 -4
- package/dist/{chunk-Q6SQISHT.js → chunk-VMD2CYVP.js} +311 -74
- package/dist/{chunk-MFW6P7WH.js → chunk-WNTPJZU7.js} +3 -3
- package/dist/{chunk-7W4XLIVH.js → chunk-WTE27AJT.js} +14 -14
- package/dist/{chunk-UKJLPA7R.js → chunk-X6IZP2BD.js} +1 -1
- package/dist/{chunk-2GM7N5TV.js → chunk-XLAREWBK.js} +9 -9
- package/dist/{chunk-AYOVY75O.js → chunk-XLPJJ35N.js} +4 -4
- package/dist/{chunk-NGC3IZRY.js → chunk-XQTRGKQ3.js} +4 -4
- package/dist/{chunk-WEF6MXFG.js → chunk-YZG37S7L.js} +9 -9
- package/dist/{chunk-LFKSHDVI.js → chunk-ZB2Q67NO.js} +14 -13
- 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/{compute-JAP5E2E4.js → compute-2XWFVO7K.js} +1 -1
- package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
- package/dist/dgmo-router-YHBMKTXY.js +94 -0
- package/dist/{dimensions-7MF7VSGS.js → dimensions-QMGWJQTR.js} +5 -5
- package/dist/editor.js +12 -0
- package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-BLJ6RA53.js} +4 -4
- package/dist/{flowchart-renderer-DZQZRL2F.js → flowchart-renderer-FXRQKXAK.js} +12 -8
- package/dist/highlight.js +12 -0
- package/dist/index.d.ts +26 -5
- package/dist/index.js +84 -57
- package/dist/{layout-5VSMZPMG.js → layout-5HCEF7VO.js} +1 -1
- package/dist/{layout-6L3BIFEZ.js → layout-6PLSBB5X.js} +3 -3
- package/dist/{layout-UIV56NUA.js → layout-B7PQRAMB.js} +1 -1
- package/dist/{layout-IGAVGDME.js → layout-CCVCLZ6S.js} +1 -1
- package/dist/{layout-PP36LUTA.js → layout-CRUAP7JG.js} +3 -3
- package/dist/{layout-Q3RYSODA.js → layout-G42FDCF3.js} +3 -3
- package/dist/{layout-EFEZ533S.js → layout-IV4H2FLB.js} +3 -3
- package/dist/{layout-4RRC7XU7.js → layout-JTNRSGOS.js} +6 -3
- package/dist/{layout-H4K54IW3.js → layout-RBLD5EGX.js} +6 -3
- package/dist/{layout-SW3XWYKC.js → layout-ROAVGBUC.js} +1 -1
- package/dist/{layout-XUW444O5.js → layout-T2DQ4M77.js} +8 -4
- package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
- package/dist/{layout-DXVAYF6W.js → layout-VRJ5YFUE.js} +2 -2
- package/dist/{layout-ZP7XYVXF.js → layout-YKGQRFDM.js} +2 -4
- package/dist/layout-search-L75YOBME.js +42 -0
- package/dist/{palettes-WZAIQTEG.js → palettes-WQHELGVQ.js} +2 -1
- package/dist/{parser-ZLKYDFI5.js → parser-2XCDVLSN.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-GCCWMBTU.js → parser-4QNRCGU5.js} +5 -4
- package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
- package/dist/{parser-WEVTMBJ5.js → parser-6NSQLPTS.js} +3 -3
- package/dist/{parser-KYPP2DX6.js → parser-6X4GGH2R.js} +4 -4
- package/dist/parser-AL6YL7KM.js +12 -0
- package/dist/{parser-5655XSOR.js → parser-D6YRVV75.js} +3 -3
- package/dist/{parser-NGHQQGD2.js → parser-EY3VJWBE.js} +3 -3
- package/dist/{parser-TL3JA4RI.js → parser-EYF4ZSZO.js} +3 -3
- package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
- package/dist/{parser-JOOAVBJI.js → parser-H2DJEAPG.js} +3 -3
- package/dist/{parser-AKBVJHMK.js → parser-ILWAA3QJ.js} +3 -3
- package/dist/{parser-AN3MGHRL.js → parser-KMFMNZYI.js} +3 -3
- package/dist/{parser-IMM2JJX3.js → parser-MDSVVCJP.js} +4 -4
- package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
- package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
- package/dist/{parser-DGF3ZEO6.js → parser-QL4DEPVA.js} +4 -4
- package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
- package/dist/{parser-GEKPWSSK.js → parser-UEDPLM46.js} +3 -3
- package/dist/{parser-KZMALSB2.js → parser-UL6WN6W5.js} +4 -4
- package/dist/{parser-J4DVNL4W.js → parser-ULSUK36C.js} +4 -4
- package/dist/{parser-KZMJNKDW.js → parser-UY3K4ROB.js} +2 -2
- package/dist/{parser-KFYRTGTC.js → parser-UYQNNQKT.js} +4 -4
- package/dist/{parser-DHSFIUPU.js → parser-VG747VR6.js} +3 -3
- package/dist/{parser-UTXFJG4X.js → parser-VK4PNDX4.js} +3 -3
- package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
- package/dist/{parser-NPXPJHWN.js → parser-X5FQ36KJ.js} +3 -3
- package/dist/{parser-OKB64MMN.js → parser-XO5IAXMT.js} +3 -3
- package/dist/{parser-HCGXNHHL.js → parser-YVHO2NRM.js} +3 -3
- package/dist/{parser-P4TOQYNN.js → parser-YWZGIU3C.js} +3 -3
- package/dist/{parser-337TACHB.js → parser-ZFLSULFC.js} +3 -3
- package/dist/{parser-7OEE7QT6.js → parser-ZR7JAKSW.js} +2 -2
- package/dist/{renderer-CHQZES6G.js → renderer-3N64GVNM.js} +2 -2
- package/dist/{renderer-JR2XNZAH.js → renderer-43IVPARP.js} +5 -5
- package/dist/{renderer-J4OS77PK.js → renderer-4MEZYGU6.js} +3 -3
- package/dist/{renderer-IR5GGAPB.js → renderer-54GXA3UO.js} +11 -7
- package/dist/{renderer-7VQOKAII.js → renderer-7EAWN7MC.js} +6 -6
- package/dist/{renderer-QQHQY3GT.js → renderer-7SEXPBGM.js} +5 -5
- package/dist/{renderer-P4XCRNCY.js → renderer-B7B7BQM3.js} +9 -9
- package/dist/{renderer-7HOSI6JJ.js → renderer-I2LYSQBV.js} +4 -4
- package/dist/{renderer-6OQM32X3.js → renderer-IPDCAACY.js} +3 -3
- package/dist/{renderer-JRVY7HAD.js → renderer-J2LOMTBC.js} +4 -4
- package/dist/renderer-JUH6M3XF.js +46 -0
- package/dist/renderer-KY6O5JTX.js +80 -0
- package/dist/{renderer-FCXRDYSJ.js → renderer-LHTDI5RV.js} +7 -7
- package/dist/{renderer-XHEMXBQM.js → renderer-LWL3IJOF.js} +5 -5
- package/dist/{renderer-BLHN3RCY.js → renderer-MRMFYYZT.js} +2 -2
- package/dist/{renderer-DBNDLKPE.js → renderer-NCIDGJ2R.js} +7 -7
- package/dist/{renderer-3AD4NDF5.js → renderer-OPA4JJKX.js} +6 -6
- package/dist/{renderer-XFEZ5UBE.js → renderer-QMNC7TGN.js} +6 -6
- package/dist/{renderer-5GZNGZU5.js → renderer-QQNPJGAP.js} +9 -7
- package/dist/{renderer-CEIX5JPA.js → renderer-R7OYCJEA.js} +2 -2
- package/dist/{renderer-WQ654YT5.js → renderer-R7RK7FKI.js} +1 -1
- package/dist/{renderer-4JE5ORRO.js → renderer-RFP55AW7.js} +13 -10
- package/dist/{renderer-NAA7D33G.js → renderer-S3NFBJCY.js} +15 -11
- package/dist/{renderer-43ESBXVY.js → renderer-SD4ZHHAR.js} +8 -6
- package/dist/{renderer-WB75JME5.js → renderer-SE7Z5AOL.js} +6 -6
- package/dist/{renderer-YTEZK3GC.js → renderer-T2WUA7MC.js} +7 -7
- package/dist/{renderer-VYWCMRWA.js → renderer-TWKEZ3DD.js} +5 -5
- package/dist/{renderer-DCJ4AQ3N.js → renderer-U5PD72G7.js} +5 -5
- package/dist/{renderer-EAORWLVK.js → renderer-VCTKBUTR.js} +7 -7
- package/dist/{renderer-7L7J4DHO.js → renderer-VNZTWATB.js} +7 -6
- package/dist/{renderer-2ZQ6DPVD.js → renderer-YDNWK6RI.js} +2 -2
- package/dist/{renderer-VGQMJC5K.js → renderer-YDOWBIUB.js} +11 -10
- package/dist/{renderer-7MCC6GKH.js → renderer-YQPZ7O2C.js} +2 -2
- package/dist/{renderer-ZXQXRNDR.js → renderer-ZQ77CM6Y.js} +6 -6
- package/dist/{renderer-radial-NA5DVBG4.js → renderer-radial-TNNEL3YN.js} +5 -5
- package/dist/{resolver-XSXE2TRX.js → resolver-6DJLZF6Y.js} +1 -1
- package/dist/{state-parser-FE3RF6XY.js → state-parser-NIIVOU2Y.js} +4 -4
- package/dist/{state-renderer-4S2C2CHB.js → state-renderer-TVLEG32M.js} +14 -10
- 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/chunk-6EK55ART.js +0 -116
- package/dist/chunk-HTNLLT34.js +0 -72
- package/dist/dgmo-router-7WANZOBD.js +0 -92
- package/dist/renderer-TJJGFQGT.js +0 -78
- package/dist/{chunk-3FCSOYN4.js → chunk-5P2L5QXE.js} +0 -0
- package/dist/{chunk-HJRP6PXL.js → chunk-BQVTV4LB.js} +0 -0
- package/dist/{chunk-LYRDIVSY.js → chunk-GLCMUTO5.js} +0 -0
- package/dist/{chunk-5LE2CTLS.js → chunk-NTJ5HVV6.js} +3 -3
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
stripDefaultModifier,
|
|
10
10
|
tagAttrKey,
|
|
11
11
|
validateTagGroupNames
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
13
13
|
import {
|
|
14
14
|
JOURNEY_MAP_REGISTRY,
|
|
15
15
|
OPTION_NOCOLON_RE,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
splitNameAndMeta,
|
|
21
21
|
warnUnknownMetaKeys,
|
|
22
22
|
withTagAliases
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveColorWithDiagnostic
|
|
26
26
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -317,7 +317,7 @@ function parseJourneyMap(content, palette) {
|
|
|
317
317
|
const groupKey = aliasMap.get(tagKey.toLowerCase()) ?? tagKey.toLowerCase();
|
|
318
318
|
const validValues = tagValueSets.get(groupKey);
|
|
319
319
|
if (validValues && !validValues.has(tagValue.toLowerCase())) {
|
|
320
|
-
const entries = result.tagGroups.find((g) => g.name
|
|
320
|
+
const entries = result.tagGroups.find((g) => tagAttrKey(g.name) === groupKey)?.entries.map((e) => e.value);
|
|
321
321
|
let msg = `Unknown tag value "${tagValue}" for group "${groupKey}"`;
|
|
322
322
|
if (entries) {
|
|
323
323
|
const hint = suggest(tagValue, entries);
|
|
@@ -340,7 +340,7 @@ function parseJourneyMap(content, palette) {
|
|
|
340
340
|
validateTagGroupNames(result.tagGroups, warn, (line, msg) => {
|
|
341
341
|
const diag = makeDgmoError(line, msg);
|
|
342
342
|
result.diagnostics.push(diag);
|
|
343
|
-
|
|
343
|
+
result.error ??= formatDgmoError(diag);
|
|
344
344
|
});
|
|
345
345
|
const activeTagWarning = activeTagNoMatchMessage(
|
|
346
346
|
options["active-tag"],
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CYLINDER_RY,
|
|
3
|
+
QUEUE_CAP,
|
|
2
4
|
collectCardMetadata,
|
|
3
5
|
layoutC4Components,
|
|
4
6
|
layoutC4Containers,
|
|
5
7
|
layoutC4Context,
|
|
6
8
|
layoutC4Deployment
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K3BYD3WU.js";
|
|
8
10
|
import {
|
|
9
11
|
appendArrowheadMarkers,
|
|
10
12
|
appendReverseArrowheadMarkers
|
|
@@ -12,6 +14,9 @@ import {
|
|
|
12
14
|
import {
|
|
13
15
|
renderInlineText
|
|
14
16
|
} from "./chunk-S7W75MIM.js";
|
|
17
|
+
import {
|
|
18
|
+
renderIntegratedLegend
|
|
19
|
+
} from "./chunk-QVKTAU7P.js";
|
|
15
20
|
import {
|
|
16
21
|
ARROWHEAD_HEIGHT,
|
|
17
22
|
ARROWHEAD_WIDTH,
|
|
@@ -33,25 +38,22 @@ import {
|
|
|
33
38
|
TITLE_FONT_SIZE,
|
|
34
39
|
TITLE_FONT_WEIGHT
|
|
35
40
|
} from "./chunk-VLC6WNRD.js";
|
|
36
|
-
import {
|
|
37
|
-
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-7SX4IY6T.js";
|
|
39
41
|
import {
|
|
40
42
|
FONT_FAMILY
|
|
41
43
|
} from "./chunk-ICLB27PZ.js";
|
|
42
44
|
import {
|
|
43
45
|
parseC4
|
|
44
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EP7BT3HU.js";
|
|
45
47
|
import {
|
|
46
48
|
preprocessDescriptionLine
|
|
47
49
|
} from "./chunk-IYULMRBE.js";
|
|
48
50
|
import {
|
|
49
51
|
resolveGroupTagColor,
|
|
50
52
|
tagAttrKey
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
52
54
|
import {
|
|
53
55
|
fillModeFromOptions
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
55
57
|
import {
|
|
56
58
|
LEGEND_HEIGHT
|
|
57
59
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -81,9 +83,7 @@ var TYPE_LABEL_HEIGHT = 18;
|
|
|
81
83
|
var DIVIDER_GAP = 6;
|
|
82
84
|
var NAME_HEIGHT = 20;
|
|
83
85
|
var BOUNDARY_LABEL_FONT_SIZE = 12;
|
|
84
|
-
var CYLINDER_RY = 8;
|
|
85
86
|
var CLOUD_BUMP = 7;
|
|
86
|
-
var QUEUE_CAP = 16;
|
|
87
87
|
var PERSON_HEAD_R = 4;
|
|
88
88
|
var PERSON_ARM_SPAN = 10;
|
|
89
89
|
var PERSON_LEG_SPAN = 7;
|
|
@@ -232,7 +232,7 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
232
232
|
nodeG.attr(`data-tag-${tagKey}`, tagValue.toLowerCase());
|
|
233
233
|
} else {
|
|
234
234
|
const tagGroup = parsed.tagGroups.find(
|
|
235
|
-
(g) => g.name
|
|
235
|
+
(g) => tagAttrKey(g.name) === tagKey || g.alias?.toLowerCase() === tagKey
|
|
236
236
|
);
|
|
237
237
|
if (tagGroup?.defaultValue) {
|
|
238
238
|
nodeG.attr(`data-tag-${tagKey}`, tagGroup.defaultValue.toLowerCase());
|
|
@@ -863,7 +863,7 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
863
863
|
nodeG.attr(`data-tag-${tagKey}`, tagValue.toLowerCase());
|
|
864
864
|
} else {
|
|
865
865
|
const tagGroup = parsed.tagGroups.find(
|
|
866
|
-
(g) => g.name
|
|
866
|
+
(g) => tagAttrKey(g.name) === tagKey || g.alias?.toLowerCase() === tagKey
|
|
867
867
|
);
|
|
868
868
|
if (tagGroup?.defaultValue) {
|
|
869
869
|
nodeG.attr(`data-tag-${tagKey}`, tagGroup.defaultValue.toLowerCase());
|
|
@@ -1128,6 +1128,8 @@ function renderC4DeploymentForExport(content, theme, palette) {
|
|
|
1128
1128
|
export {
|
|
1129
1129
|
renderC4Context,
|
|
1130
1130
|
renderC4ContextForExport,
|
|
1131
|
+
drawCylinderCard,
|
|
1132
|
+
drawQueueCard,
|
|
1131
1133
|
renderC4Containers,
|
|
1132
1134
|
renderC4ContainersForExport,
|
|
1133
1135
|
renderC4ComponentsForExport,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderIntegratedLegend
|
|
3
|
+
} from "./chunk-QVKTAU7P.js";
|
|
1
4
|
import {
|
|
2
5
|
EDGE_DASH
|
|
3
6
|
} from "./chunk-XCKNFFKM.js";
|
|
4
7
|
import {
|
|
5
8
|
layoutInlineHeader
|
|
6
9
|
} from "./chunk-CNUN5GO6.js";
|
|
10
|
+
import {
|
|
11
|
+
getLegendExtent,
|
|
12
|
+
getMaxLegendReservedHeight
|
|
13
|
+
} from "./chunk-NS7L7YKH.js";
|
|
7
14
|
import {
|
|
8
15
|
TITLE_FONT_SIZE,
|
|
9
16
|
TITLE_FONT_WEIGHT,
|
|
10
17
|
TITLE_Y
|
|
11
18
|
} from "./chunk-VLC6WNRD.js";
|
|
12
|
-
import {
|
|
13
|
-
renderIntegratedLegend
|
|
14
|
-
} from "./chunk-7SX4IY6T.js";
|
|
15
|
-
import {
|
|
16
|
-
getLegendExtent,
|
|
17
|
-
getMaxLegendReservedHeight
|
|
18
|
-
} from "./chunk-NS7L7YKH.js";
|
|
19
19
|
import {
|
|
20
20
|
FONT_FAMILY
|
|
21
21
|
} from "./chunk-ICLB27PZ.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
resolveTagColor,
|
|
27
27
|
tagAttrKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
29
29
|
import {
|
|
30
30
|
LEGEND_GROUP_GAP
|
|
31
31
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
noteBoxSize
|
|
3
|
+
} from "./chunk-RJNZHFNG.js";
|
|
4
|
+
import {
|
|
5
|
+
NOTE_GAP
|
|
6
|
+
} from "./chunk-5DH3KYFH.js";
|
|
1
7
|
import {
|
|
2
8
|
LABEL_REACH_WIDE,
|
|
3
9
|
NODE_HEIGHT,
|
|
4
10
|
NODE_WIDTH,
|
|
5
11
|
placeEdgeLabels
|
|
6
12
|
} from "./chunk-QT3KDDXK.js";
|
|
7
|
-
import {
|
|
8
|
-
buildPlacedNotes
|
|
9
|
-
} from "./chunk-HTNLLT34.js";
|
|
10
|
-
import {
|
|
11
|
-
noteCanvasShift
|
|
12
|
-
} from "./chunk-6EK55ART.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveNotes
|
|
15
15
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -18,6 +18,176 @@ import {
|
|
|
18
18
|
wrapTextToWidth
|
|
19
19
|
} from "./chunk-KAO7JL4I.js";
|
|
20
20
|
|
|
21
|
+
// src/utils/notes/place.ts
|
|
22
|
+
var NOTE_CLEAR = 14;
|
|
23
|
+
var intersects = (a, b, pad) => !(a.right + pad <= b.left || b.right + pad <= a.left || a.bottom + pad <= b.top || b.bottom + pad <= a.top);
|
|
24
|
+
function placeNotes(obstacles, requests, direction) {
|
|
25
|
+
const placements = /* @__PURE__ */ new Map();
|
|
26
|
+
const occupied = obstacles.map((p) => ({
|
|
27
|
+
left: p.x - p.width / 2,
|
|
28
|
+
top: p.y - p.height / 2,
|
|
29
|
+
right: p.x + p.width / 2,
|
|
30
|
+
bottom: p.y + p.height / 2
|
|
31
|
+
}));
|
|
32
|
+
for (const req of requests) {
|
|
33
|
+
if (req.collapsed) {
|
|
34
|
+
placements.set(req.key, {
|
|
35
|
+
collapsed: true,
|
|
36
|
+
side: "right",
|
|
37
|
+
x: 0,
|
|
38
|
+
y: 0
|
|
39
|
+
});
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const p = req.node;
|
|
43
|
+
const cx = p.x;
|
|
44
|
+
const cy = p.y;
|
|
45
|
+
const nodeLeft = cx - p.width / 2;
|
|
46
|
+
const nodeRight = cx + p.width / 2;
|
|
47
|
+
const nodeTop = cy - p.height / 2;
|
|
48
|
+
const nodeBottom = cy + p.height / 2;
|
|
49
|
+
const { noteW, noteH } = req;
|
|
50
|
+
const rectFor = (side) => {
|
|
51
|
+
switch (side) {
|
|
52
|
+
case "right": {
|
|
53
|
+
const left = nodeRight + NOTE_GAP;
|
|
54
|
+
const top = cy - noteH / 2;
|
|
55
|
+
return { left, top, right: left + noteW, bottom: top + noteH };
|
|
56
|
+
}
|
|
57
|
+
case "left": {
|
|
58
|
+
const right = nodeLeft - NOTE_GAP;
|
|
59
|
+
const top = cy - noteH / 2;
|
|
60
|
+
return { left: right - noteW, top, right, bottom: top + noteH };
|
|
61
|
+
}
|
|
62
|
+
case "below": {
|
|
63
|
+
const left = cx - noteW / 2;
|
|
64
|
+
const top = nodeBottom + NOTE_GAP;
|
|
65
|
+
return { left, top, right: left + noteW, bottom: top + noteH };
|
|
66
|
+
}
|
|
67
|
+
case "above":
|
|
68
|
+
default: {
|
|
69
|
+
const left = cx - noteW / 2;
|
|
70
|
+
const bottom = nodeTop - NOTE_GAP;
|
|
71
|
+
return { left, top: bottom - noteH, right: left + noteW, bottom };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const order = direction === "LR" ? ["below", "above"] : ["right", "left"];
|
|
76
|
+
let chosen = null;
|
|
77
|
+
for (const side of order) {
|
|
78
|
+
const rect = rectFor(side);
|
|
79
|
+
if (!occupied.some((o) => intersects(rect, o, NOTE_CLEAR))) {
|
|
80
|
+
chosen = { rect, side };
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!chosen) {
|
|
85
|
+
const side = order[0];
|
|
86
|
+
let rect = rectFor(side);
|
|
87
|
+
const axisIsY = side === "above" || side === "below";
|
|
88
|
+
const outward = side === "below" || side === "right" ? 1 : -1;
|
|
89
|
+
for (let guard = 0; guard < 50; guard++) {
|
|
90
|
+
const blockers = occupied.filter(
|
|
91
|
+
(o) => intersects(rect, o, NOTE_CLEAR)
|
|
92
|
+
);
|
|
93
|
+
if (blockers.length === 0) break;
|
|
94
|
+
if (axisIsY && outward > 0) {
|
|
95
|
+
const top = Math.max(...blockers.map((b) => b.bottom)) + NOTE_CLEAR;
|
|
96
|
+
rect = { ...rect, top, bottom: top + noteH };
|
|
97
|
+
} else if (axisIsY) {
|
|
98
|
+
const bottom = Math.min(...blockers.map((b) => b.top)) - NOTE_CLEAR;
|
|
99
|
+
rect = { ...rect, bottom, top: bottom - noteH };
|
|
100
|
+
} else if (outward > 0) {
|
|
101
|
+
const left = Math.max(...blockers.map((b) => b.right)) + NOTE_CLEAR;
|
|
102
|
+
rect = { ...rect, left, right: left + noteW };
|
|
103
|
+
} else {
|
|
104
|
+
const right = Math.min(...blockers.map((b) => b.left)) - NOTE_CLEAR;
|
|
105
|
+
rect = { ...rect, right, left: right - noteW };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
chosen = { rect, side };
|
|
109
|
+
}
|
|
110
|
+
occupied.push(chosen.rect);
|
|
111
|
+
placements.set(req.key, {
|
|
112
|
+
collapsed: false,
|
|
113
|
+
side: chosen.side,
|
|
114
|
+
x: chosen.rect.left - p.x,
|
|
115
|
+
y: chosen.rect.top - p.y
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return placements;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// src/utils/notes/build.ts
|
|
122
|
+
function buildPlacedNotes(anchors, noteByNode, direction, collapsedNotes) {
|
|
123
|
+
const placed = /* @__PURE__ */ new Map();
|
|
124
|
+
if (noteByNode.size === 0) return placed;
|
|
125
|
+
const geoms = /* @__PURE__ */ new Map();
|
|
126
|
+
const requests = [];
|
|
127
|
+
for (const a of anchors) {
|
|
128
|
+
const note = noteByNode.get(a.id);
|
|
129
|
+
if (!note) continue;
|
|
130
|
+
const size = noteBoxSize(note.body);
|
|
131
|
+
geoms.set(a.id, {
|
|
132
|
+
noteW: size.width,
|
|
133
|
+
noteH: size.height,
|
|
134
|
+
...note.color && { color: note.color },
|
|
135
|
+
lines: size.lines,
|
|
136
|
+
lineNumber: note.lineNumber,
|
|
137
|
+
endLineNumber: note.endLineNumber
|
|
138
|
+
});
|
|
139
|
+
requests.push({
|
|
140
|
+
key: a.id,
|
|
141
|
+
node: { x: a.x, y: a.y, width: a.width, height: a.height },
|
|
142
|
+
noteW: size.width,
|
|
143
|
+
noteH: size.height,
|
|
144
|
+
collapsed: collapsedNotes?.has(note.lineNumber) ?? false
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const placements = placeNotes(
|
|
148
|
+
anchors.map((a) => ({ x: a.x, y: a.y, width: a.width, height: a.height })),
|
|
149
|
+
requests,
|
|
150
|
+
direction
|
|
151
|
+
);
|
|
152
|
+
for (const [id, g] of geoms) {
|
|
153
|
+
const p = placements.get(id);
|
|
154
|
+
placed.set(
|
|
155
|
+
id,
|
|
156
|
+
p.collapsed ? {
|
|
157
|
+
x: 0,
|
|
158
|
+
y: 0,
|
|
159
|
+
width: 0,
|
|
160
|
+
height: 0,
|
|
161
|
+
side: "right",
|
|
162
|
+
...g.color && { color: g.color },
|
|
163
|
+
lines: [],
|
|
164
|
+
lineNumber: g.lineNumber,
|
|
165
|
+
endLineNumber: g.endLineNumber,
|
|
166
|
+
collapsed: true
|
|
167
|
+
} : {
|
|
168
|
+
x: p.x,
|
|
169
|
+
y: p.y,
|
|
170
|
+
width: g.noteW,
|
|
171
|
+
height: g.noteH,
|
|
172
|
+
side: p.side,
|
|
173
|
+
...g.color && { color: g.color },
|
|
174
|
+
lines: g.lines,
|
|
175
|
+
lineNumber: g.lineNumber,
|
|
176
|
+
endLineNumber: g.endLineNumber
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
return placed;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/utils/notes/bounds.ts
|
|
184
|
+
function noteCanvasShift(minX, minY, margin = 20) {
|
|
185
|
+
return {
|
|
186
|
+
shiftX: minX < 0 ? margin - minX : 0,
|
|
187
|
+
shiftY: minY < 0 ? margin - minY : 0
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
21
191
|
// src/boxes-and-lines/layout.ts
|
|
22
192
|
var MARGIN = 40;
|
|
23
193
|
var MAX_PARALLEL_EDGES = 5;
|
|
@@ -107,7 +277,7 @@ function computeNodeSize(node, reserveValueRow) {
|
|
|
107
277
|
return { width: w, height: Math.max(NODE_HEIGHT, totalHeight) };
|
|
108
278
|
}
|
|
109
279
|
async function layoutBoxesAndLines(parsed, collapseInfo, layoutOptions) {
|
|
110
|
-
const { layoutBoxesAndLinesSearch } = await import("./layout-search-
|
|
280
|
+
const { layoutBoxesAndLinesSearch } = await import("./layout-search-L75YOBME.js");
|
|
111
281
|
const searchOpts = {
|
|
112
282
|
...layoutOptions?.hideDescriptions !== void 0 && {
|
|
113
283
|
hideDescriptions: layoutOptions.hideDescriptions
|
|
@@ -423,6 +593,9 @@ function applyParallelEdgeOffsets(layout) {
|
|
|
423
593
|
}
|
|
424
594
|
|
|
425
595
|
export {
|
|
596
|
+
placeNotes,
|
|
597
|
+
buildPlacedNotes,
|
|
598
|
+
noteCanvasShift,
|
|
426
599
|
computeNodeSize,
|
|
427
600
|
layoutBoxesAndLines
|
|
428
601
|
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
peelQuotedName,
|
|
3
3
|
stripQuotes,
|
|
4
4
|
tokenizeQuoteAware
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
6
6
|
import {
|
|
7
7
|
CATEGORICAL_COLOR_ORDER,
|
|
8
8
|
RECOGNIZED_COLOR_NAMES,
|
|
@@ -44,9 +44,7 @@ function assignAutoTagColors(group, palette) {
|
|
|
44
44
|
let chosen = cycle.find(
|
|
45
45
|
(c) => !explicitHexes.has(c.hex.toLowerCase()) && !autoHexes.has(c.hex.toLowerCase())
|
|
46
46
|
);
|
|
47
|
-
|
|
48
|
-
chosen = cycle[autoHexes.size % cycle.length];
|
|
49
|
-
}
|
|
47
|
+
chosen ??= cycle[autoHexes.size % cycle.length];
|
|
50
48
|
autoHexes.add(chosen.hex.toLowerCase());
|
|
51
49
|
entries[i] = { ...e, color: chosen.hex };
|
|
52
50
|
}
|
|
@@ -7,22 +7,22 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ScaleContext
|
|
9
9
|
} from "./chunk-24YPR5EH.js";
|
|
10
|
-
import {
|
|
11
|
-
TITLE_FONT_SIZE
|
|
12
|
-
} from "./chunk-VLC6WNRD.js";
|
|
13
10
|
import {
|
|
14
11
|
renderIntegratedLegend
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QVKTAU7P.js";
|
|
16
13
|
import {
|
|
17
14
|
getMaxLegendReservedHeight
|
|
18
15
|
} from "./chunk-NS7L7YKH.js";
|
|
16
|
+
import {
|
|
17
|
+
TITLE_FONT_SIZE
|
|
18
|
+
} from "./chunk-VLC6WNRD.js";
|
|
19
19
|
import {
|
|
20
20
|
FONT_FAMILY
|
|
21
21
|
} from "./chunk-ICLB27PZ.js";
|
|
22
22
|
import {
|
|
23
23
|
fillModeFromOptions,
|
|
24
24
|
legendSuppressed
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
26
26
|
import {
|
|
27
27
|
measureText,
|
|
28
28
|
truncateText,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KSZHIAI2.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNotes
|
|
6
6
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tagAttrKey,
|
|
21
21
|
validateTagGroupNames,
|
|
22
22
|
validateTagValues
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
24
24
|
import {
|
|
25
25
|
AliasRegistry,
|
|
26
26
|
BOXES_AND_LINES_REGISTRY,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
tryParseSharedOption,
|
|
34
34
|
warnUnknownMetaKeys,
|
|
35
35
|
withTagAliases
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
37
37
|
import {
|
|
38
38
|
makeDgmoError,
|
|
39
39
|
suggest
|
|
@@ -585,7 +585,7 @@ function parseBoxesAndLines(content, palette) {
|
|
|
585
585
|
validateTagGroupNames(result.tagGroups, pushWarning, (line, msg) => {
|
|
586
586
|
const diag = makeDgmoError(line, msg);
|
|
587
587
|
result.diagnostics.push(diag);
|
|
588
|
-
|
|
588
|
+
result.error ??= diag.message;
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
591
|
const activeTagWarning = activeTagNoMatchMessage(
|
|
@@ -594,7 +594,10 @@ function parseBoxesAndLines(content, palette) {
|
|
|
594
594
|
// The value metric is a legitimate `active-tag` target here (§13.9), named
|
|
595
595
|
// by `box-metric` and defaulting to `Value` — but only when some box
|
|
596
596
|
// actually carries a value, which is what the renderer gates on.
|
|
597
|
-
result.nodes.some((n) => n.value !== void 0) ?
|
|
597
|
+
result.nodes.some((n) => n.value !== void 0) ? (
|
|
598
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an empty metric name also falls back to 'Value'
|
|
599
|
+
[result.boxMetric?.trim() || "Value"]
|
|
600
|
+
) : [],
|
|
598
601
|
"the value metric"
|
|
599
602
|
);
|
|
600
603
|
if (activeTagWarning) {
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isTagBlockHeading
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
4
4
|
import {
|
|
5
5
|
OPTION_NOCOLON_RE,
|
|
6
6
|
measureIndent,
|
|
7
7
|
parseFirstLine,
|
|
8
8
|
tryParseSharedOption
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
10
10
|
import {
|
|
11
11
|
formatDgmoError,
|
|
12
12
|
makeDgmoError
|
|
13
13
|
} from "./chunk-BYU54C3S.js";
|
|
14
14
|
|
|
15
15
|
// src/wireframe/parser.ts
|
|
16
|
-
var KNOWN_OPTIONS = /* @__PURE__ */ new Set(["palette", "theme"]);
|
|
17
16
|
var INERT_OPTIONS = {
|
|
18
17
|
"active-tag": '"active-tag" does nothing on a wireframe \u2014 it has no tag groups. Element appearance comes from the trailing state keywords (primary, disabled, selected, \u2026).'
|
|
19
18
|
};
|
|
@@ -255,7 +254,7 @@ function parseSegment(segment, lineNumber, indent, diagnostics) {
|
|
|
255
254
|
const dropdownMatch = trimmed.match(DROPDOWN_RE);
|
|
256
255
|
if (dropdownMatch) {
|
|
257
256
|
const options = dropdownMatch[1].split("|").map((s) => s.trim()).filter(Boolean);
|
|
258
|
-
const el = makeElement("dropdown", options[0]
|
|
257
|
+
const el = makeElement("dropdown", options[0] ?? "", lineNumber, indent);
|
|
259
258
|
el.options = options;
|
|
260
259
|
applyTrailingMeta(el, dropdownMatch[2]);
|
|
261
260
|
return el;
|
|
@@ -271,7 +270,7 @@ function parseSegment(segment, lineNumber, indent, diagnostics) {
|
|
|
271
270
|
)
|
|
272
271
|
);
|
|
273
272
|
const options = parenPipeMatch[1].split("|").map((s) => s.trim()).filter(Boolean);
|
|
274
|
-
const el = makeElement("dropdown", options[0]
|
|
273
|
+
const el = makeElement("dropdown", options[0] ?? "", lineNumber, indent);
|
|
275
274
|
el.options = options;
|
|
276
275
|
return el;
|
|
277
276
|
}
|
|
@@ -310,7 +309,7 @@ function parseSegment(segment, lineNumber, indent, diagnostics) {
|
|
|
310
309
|
if (kwMatch) {
|
|
311
310
|
const el = makeElement(
|
|
312
311
|
kwMatch.type,
|
|
313
|
-
kwMatch.param
|
|
312
|
+
kwMatch.param ?? "",
|
|
314
313
|
lineNumber,
|
|
315
314
|
indent
|
|
316
315
|
);
|
|
@@ -322,7 +321,7 @@ function parseSegment(segment, lineNumber, indent, diagnostics) {
|
|
|
322
321
|
} else if (kwMatch.type === "chart") {
|
|
323
322
|
el.chartHint = kwMatch.param || "line";
|
|
324
323
|
} else if (kwMatch.type === "table") {
|
|
325
|
-
const skelMatch = `table ${kwMatch.param
|
|
324
|
+
const skelMatch = `table ${kwMatch.param ?? ""}`.match(TABLE_SKELETON_RE);
|
|
326
325
|
if (skelMatch) {
|
|
327
326
|
el.tableRows = parseInt(skelMatch[1], 10);
|
|
328
327
|
el.tableCols = parseInt(skelMatch[2], 10);
|
|
@@ -365,7 +364,7 @@ function parseSegment(segment, lineNumber, indent, diagnostics) {
|
|
|
365
364
|
);
|
|
366
365
|
const rawContent = trimmed.substring(1).trim();
|
|
367
366
|
const options = rawContent.split("|").map((s) => s.trim()).filter(Boolean);
|
|
368
|
-
const el = makeElement("dropdown", options[0]
|
|
367
|
+
const el = makeElement("dropdown", options[0] ?? "", lineNumber, indent);
|
|
369
368
|
el.options = options;
|
|
370
369
|
return el;
|
|
371
370
|
}
|
|
@@ -517,10 +516,6 @@ function parseWireframe(content) {
|
|
|
517
516
|
pushWarning(lineNumber, inertMsg);
|
|
518
517
|
continue;
|
|
519
518
|
}
|
|
520
|
-
if (KNOWN_OPTIONS.has(key)) {
|
|
521
|
-
options[key] = optMatch[2] || "";
|
|
522
|
-
continue;
|
|
523
|
-
}
|
|
524
519
|
}
|
|
525
520
|
if (isTagBlockHeading(trimmed)) {
|
|
526
521
|
refuseTagBlock(lineNumber);
|
|
@@ -544,10 +539,6 @@ function parseWireframe(content) {
|
|
|
544
539
|
pushWarning(lineNumber, inertMsg);
|
|
545
540
|
continue;
|
|
546
541
|
}
|
|
547
|
-
if (KNOWN_OPTIONS.has(key)) {
|
|
548
|
-
options[key] = optMatch[2] || "";
|
|
549
|
-
continue;
|
|
550
|
-
}
|
|
551
542
|
}
|
|
552
543
|
}
|
|
553
544
|
if (isTagBlockHeading(trimmed)) {
|
|
@@ -565,7 +556,7 @@ function parseWireframe(content) {
|
|
|
565
556
|
topNode.tableHeaders = cells;
|
|
566
557
|
}
|
|
567
558
|
} else {
|
|
568
|
-
|
|
559
|
+
topNode.tableData ??= [];
|
|
569
560
|
topNode.tableData.push(cells);
|
|
570
561
|
}
|
|
571
562
|
continue;
|
|
@@ -9,28 +9,28 @@ import {
|
|
|
9
9
|
layoutBracket,
|
|
10
10
|
wrapText
|
|
11
11
|
} from "./chunk-ABP5BUD6.js";
|
|
12
|
+
import {
|
|
13
|
+
renderIntegratedLegend
|
|
14
|
+
} from "./chunk-QVKTAU7P.js";
|
|
12
15
|
import {
|
|
13
16
|
layoutInlineHeader
|
|
14
17
|
} from "./chunk-CNUN5GO6.js";
|
|
18
|
+
import {
|
|
19
|
+
getLegendExtent,
|
|
20
|
+
getMaxLegendReservedHeight
|
|
21
|
+
} from "./chunk-NS7L7YKH.js";
|
|
15
22
|
import {
|
|
16
23
|
TITLE_FONT_SIZE,
|
|
17
24
|
TITLE_FONT_WEIGHT,
|
|
18
25
|
TITLE_Y
|
|
19
26
|
} from "./chunk-VLC6WNRD.js";
|
|
20
|
-
import {
|
|
21
|
-
renderIntegratedLegend
|
|
22
|
-
} from "./chunk-7SX4IY6T.js";
|
|
23
|
-
import {
|
|
24
|
-
getLegendExtent,
|
|
25
|
-
getMaxLegendReservedHeight
|
|
26
|
-
} from "./chunk-NS7L7YKH.js";
|
|
27
27
|
import {
|
|
28
28
|
FONT_FAMILY
|
|
29
29
|
} from "./chunk-ICLB27PZ.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveTagColor,
|
|
32
32
|
tagAttrKey
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
34
34
|
import {
|
|
35
35
|
LEGEND_GROUP_GAP
|
|
36
36
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -86,7 +86,7 @@ function paintForAccent(palette, isDark, accent, fillMode) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
function paintFor(palette, isDark, sideColor, fillMode) {
|
|
89
|
-
const accent = sideColor && resolveColor(sideColor, palette)
|
|
89
|
+
const accent = (sideColor && resolveColor(sideColor, palette)) ?? sideColor ?? getSeriesColors(palette)[0];
|
|
90
90
|
return paintForAccent(palette, isDark, accent, fillMode);
|
|
91
91
|
}
|
|
92
92
|
function resolveBracketLegend(parsed, palette) {
|