@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
|
@@ -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
|
ER_REGISTRY,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
tryParseSharedOption,
|
|
35
35
|
warnUnknownMetaKeys,
|
|
36
36
|
withTagAliases
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
38
38
|
import {
|
|
39
39
|
resolveColorWithDiagnostic
|
|
40
40
|
} from "./chunk-2M4IGSCY.js";
|
|
@@ -149,7 +149,7 @@ function parseERDiagram(content, palette) {
|
|
|
149
149
|
const pushError = (line, message) => {
|
|
150
150
|
const diag = makeDgmoError(line, message);
|
|
151
151
|
result.diagnostics.push(diag);
|
|
152
|
-
|
|
152
|
+
result.error ??= formatDgmoError(diag);
|
|
153
153
|
};
|
|
154
154
|
const tableMap = /* @__PURE__ */ new Map();
|
|
155
155
|
const tableMetadataMap = /* @__PURE__ */ new Map();
|
|
@@ -244,12 +244,12 @@ function parseERDiagram(content, palette) {
|
|
|
244
244
|
if (tagBlockMatch.alias) {
|
|
245
245
|
metaAliasMap.set(
|
|
246
246
|
normalizeName(tagBlockMatch.alias),
|
|
247
|
-
tagBlockMatch.name
|
|
247
|
+
tagAttrKey(tagBlockMatch.name)
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
250
|
metaAliasMap.set(
|
|
251
251
|
normalizeName(tagBlockMatch.name),
|
|
252
|
-
tagBlockMatch.name
|
|
252
|
+
tagAttrKey(tagBlockMatch.name)
|
|
253
253
|
);
|
|
254
254
|
result.tagGroups.push(currentTagGroup);
|
|
255
255
|
continue;
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
resolveActiveTagGroup,
|
|
9
9
|
stripDefaultModifier,
|
|
10
10
|
tagAttrKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
12
12
|
import {
|
|
13
13
|
extractColor,
|
|
14
14
|
fillModeFromToken,
|
|
15
15
|
measureIndent,
|
|
16
16
|
parseFirstLine,
|
|
17
17
|
splitNameAndMeta
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
19
19
|
import {
|
|
20
20
|
makeDgmoError,
|
|
21
21
|
makeFail
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BUILT_IN_PALETTE_IDS
|
|
3
|
+
} from "./chunk-3UR4F7FE.js";
|
|
1
4
|
import {
|
|
2
5
|
apcaContrast,
|
|
3
6
|
contrastRatio,
|
|
@@ -78,6 +81,197 @@ function getAvailablePalettes() {
|
|
|
78
81
|
);
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
// src/palettes/theme-file.ts
|
|
85
|
+
var CONTRAST_FLOOR = 4.5;
|
|
86
|
+
var SOLID_FLOOR_LC = 45;
|
|
87
|
+
var FILL_ACCENT_KEYS = [
|
|
88
|
+
"primary",
|
|
89
|
+
"secondary",
|
|
90
|
+
"accent",
|
|
91
|
+
"destructive"
|
|
92
|
+
];
|
|
93
|
+
var CONTRAST_EXEMPT = /* @__PURE__ */ new Set([
|
|
94
|
+
"black",
|
|
95
|
+
"white"
|
|
96
|
+
]);
|
|
97
|
+
function isRecord(value) {
|
|
98
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
99
|
+
}
|
|
100
|
+
function collectShapeErrors(value, mode, errors) {
|
|
101
|
+
if (!isRecord(value)) {
|
|
102
|
+
errors.push(
|
|
103
|
+
`${mode}: expected an object of colors, got ${describe(value)}`
|
|
104
|
+
);
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const before = errors.length;
|
|
108
|
+
const fields = /* @__PURE__ */ new Set([...SEMANTIC_KEYS, "colors"]);
|
|
109
|
+
for (const key of Object.keys(value)) {
|
|
110
|
+
if (!fields.has(key)) {
|
|
111
|
+
errors.push(`${mode}.${key}: not a palette field`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
for (const key of SEMANTIC_KEYS) {
|
|
115
|
+
const hex = value[key];
|
|
116
|
+
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
117
|
+
errors.push(`${mode}.${key}: invalid hex ${describe(hex)}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const named = value["colors"];
|
|
121
|
+
if (!isRecord(named)) {
|
|
122
|
+
errors.push(
|
|
123
|
+
`${mode}.colors: expected an object of named colors, got ${describe(named)}`
|
|
124
|
+
);
|
|
125
|
+
} else {
|
|
126
|
+
const names = new Set(COLOR_KEYS);
|
|
127
|
+
for (const key of Object.keys(named)) {
|
|
128
|
+
if (!names.has(key)) {
|
|
129
|
+
errors.push(
|
|
130
|
+
`${mode}.colors.${key}: not a palette color \u2014 a theme sets the existing color names and cannot add one`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
for (const key of COLOR_KEYS) {
|
|
135
|
+
const hex = named[key];
|
|
136
|
+
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
137
|
+
errors.push(`${mode}.colors.${key}: invalid hex ${describe(hex)}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return errors.length === before;
|
|
142
|
+
}
|
|
143
|
+
function describe(value) {
|
|
144
|
+
if (value === void 0) return "nothing";
|
|
145
|
+
if (typeof value === "string") return `"${value}"`;
|
|
146
|
+
if (value === null) return "null";
|
|
147
|
+
return typeof value;
|
|
148
|
+
}
|
|
149
|
+
function intents(colors) {
|
|
150
|
+
const out = [];
|
|
151
|
+
for (const key of COLOR_KEYS) {
|
|
152
|
+
if (CONTRAST_EXEMPT.has(key)) continue;
|
|
153
|
+
out.push([`colors.${key}`, colors.colors[key]]);
|
|
154
|
+
}
|
|
155
|
+
for (const key of FILL_ACCENT_KEYS) out.push([key, colors[key]]);
|
|
156
|
+
return out;
|
|
157
|
+
}
|
|
158
|
+
function drawnToken(colors, bg) {
|
|
159
|
+
const drawn = contrastText(bg, colors.textOnFillLight, colors.textOnFillDark);
|
|
160
|
+
return drawn === colors.textOnFillDark ? "textOnFillDark" : "textOnFillLight";
|
|
161
|
+
}
|
|
162
|
+
function worstTintedFill(colors, isDark) {
|
|
163
|
+
let worst;
|
|
164
|
+
for (const [fill, intent] of intents(colors)) {
|
|
165
|
+
const fillHex = shapeFill(colors, intent, isDark);
|
|
166
|
+
const token = drawnToken(colors, fillHex);
|
|
167
|
+
const ratio = contrastRatio(colors[token], fillHex);
|
|
168
|
+
if (!worst || ratio < worst.ratio) {
|
|
169
|
+
worst = { ratio, token, fill, fillHex };
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return worst;
|
|
173
|
+
}
|
|
174
|
+
function worstSolidFill(colors) {
|
|
175
|
+
let worst;
|
|
176
|
+
for (const [fill, intent] of intents(colors)) {
|
|
177
|
+
const token = drawnToken(colors, intent);
|
|
178
|
+
const lc = Math.abs(apcaContrast(colors[token], intent));
|
|
179
|
+
if (!worst || lc < worst.lc) {
|
|
180
|
+
worst = { lc, token, fill, fillHex: intent };
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return worst;
|
|
184
|
+
}
|
|
185
|
+
function collectContrastErrors(colors, where, isDark, errors) {
|
|
186
|
+
const tinted = worstTintedFill(colors, isDark);
|
|
187
|
+
if (tinted.ratio < CONTRAST_FLOOR) {
|
|
188
|
+
errors.push(
|
|
189
|
+
`${where}: ${tinted.token} ${colors[tinted.token]} on the ${tinted.fill} fill ${tinted.fillHex} reaches only ${tinted.ratio.toFixed(2)}:1 \u2014 text on a fill needs ${CONTRAST_FLOOR.toFixed(1)}:1`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function collectSolidErrors(colors, where, errors) {
|
|
194
|
+
const solid = worstSolidFill(colors);
|
|
195
|
+
if (solid.lc >= SOLID_FLOOR_LC) return;
|
|
196
|
+
errors.push(
|
|
197
|
+
`${where}: ${solid.token} ${colors[solid.token]} on the solid ${solid.fill} ${solid.fillHex} reaches only Lc ${solid.lc.toFixed(1)} \u2014 text on a solid fill needs Lc ${SOLID_FLOOR_LC}`
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
function validateThemeFile(input) {
|
|
201
|
+
const errors = [];
|
|
202
|
+
if (!isRecord(input)) {
|
|
203
|
+
return {
|
|
204
|
+
ok: false,
|
|
205
|
+
errors: [`expected a theme object, got ${describe(input)}`]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const id = input["id"];
|
|
209
|
+
if (typeof id !== "string" || id.trim() === "") {
|
|
210
|
+
errors.push(`id: expected a non-empty string, got ${describe(id)}`);
|
|
211
|
+
} else if (BUILT_IN_PALETTE_IDS.has(id)) {
|
|
212
|
+
errors.push(
|
|
213
|
+
`id: "${id}" is a built-in palette \u2014 a theme file needs an id of its own`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
const name = input["name"];
|
|
217
|
+
if (typeof name !== "string" || name.trim() === "") {
|
|
218
|
+
errors.push(`name: expected a non-empty string, got ${describe(name)}`);
|
|
219
|
+
}
|
|
220
|
+
const declared = input["mode"];
|
|
221
|
+
let mode = null;
|
|
222
|
+
if (declared !== void 0) {
|
|
223
|
+
if (declared === "light" || declared === "dark") {
|
|
224
|
+
mode = declared;
|
|
225
|
+
} else {
|
|
226
|
+
errors.push(
|
|
227
|
+
`mode: expected "light" or "dark", got ${describe(declared)}`
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (mode) {
|
|
232
|
+
const other = mode === "light" ? "dark" : "light";
|
|
233
|
+
if (input[other] !== void 0) {
|
|
234
|
+
errors.push(
|
|
235
|
+
`${other}: a theme declaring mode "${mode}" must not also define ${other} \u2014 drop the mode to define both`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const wanted = mode ? [mode] : ["light", "dark"];
|
|
240
|
+
const modes = {};
|
|
241
|
+
for (const key of wanted) {
|
|
242
|
+
const value = input[key];
|
|
243
|
+
if (value === void 0) {
|
|
244
|
+
errors.push(
|
|
245
|
+
mode ? `${key}: a theme declaring mode "${mode}" has to define ${key}` : `${key}: a theme without a mode has to define both light and dark`
|
|
246
|
+
);
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (collectShapeErrors(value, key, errors)) modes[key] = value;
|
|
250
|
+
}
|
|
251
|
+
if (errors.length === 0) {
|
|
252
|
+
const light2 = modes.light ?? modes.dark;
|
|
253
|
+
const dark2 = modes.dark ?? modes.light;
|
|
254
|
+
const declaredMode = mode;
|
|
255
|
+
const label = (render) => declaredMode !== null && render !== declaredMode ? `${render} (a theme declaring mode "${declaredMode}" is used in ${render} mode too)` : render;
|
|
256
|
+
collectContrastErrors(light2, label("light"), false, errors);
|
|
257
|
+
collectContrastErrors(dark2, label("dark"), true, errors);
|
|
258
|
+
if (declaredMode !== null) {
|
|
259
|
+
collectSolidErrors(light2, declaredMode, errors);
|
|
260
|
+
} else {
|
|
261
|
+
collectSolidErrors(light2, "light", errors);
|
|
262
|
+
collectSolidErrors(dark2, "dark", errors);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (errors.length > 0) return { ok: false, errors };
|
|
266
|
+
const light = modes.light ?? modes.dark;
|
|
267
|
+
const dark = modes.dark ?? modes.light;
|
|
268
|
+
return {
|
|
269
|
+
ok: true,
|
|
270
|
+
palette: { id, name, light, dark },
|
|
271
|
+
mode
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
81
275
|
// src/palettes/atlas.ts
|
|
82
276
|
var atlasPalette = {
|
|
83
277
|
id: "atlas",
|
|
@@ -783,208 +977,6 @@ var tokyoNightPalette = {
|
|
|
783
977
|
};
|
|
784
978
|
registerPalette(tokyoNightPalette);
|
|
785
979
|
|
|
786
|
-
// src/palettes/theme-file.ts
|
|
787
|
-
var CONTRAST_FLOOR = 4.5;
|
|
788
|
-
var SOLID_FLOOR_LC = 45;
|
|
789
|
-
var FILL_ACCENT_KEYS = [
|
|
790
|
-
"primary",
|
|
791
|
-
"secondary",
|
|
792
|
-
"accent",
|
|
793
|
-
"destructive"
|
|
794
|
-
];
|
|
795
|
-
var CONTRAST_EXEMPT = /* @__PURE__ */ new Set([
|
|
796
|
-
"black",
|
|
797
|
-
"white"
|
|
798
|
-
]);
|
|
799
|
-
var BUILT_IN_IDS = new Set(
|
|
800
|
-
[
|
|
801
|
-
atlasPalette,
|
|
802
|
-
blueprintPalette,
|
|
803
|
-
catppuccinPalette,
|
|
804
|
-
nordPalette,
|
|
805
|
-
slatePalette,
|
|
806
|
-
tidewaterPalette,
|
|
807
|
-
tokyoNightPalette
|
|
808
|
-
].map((palette) => palette.id)
|
|
809
|
-
);
|
|
810
|
-
function isRecord(value) {
|
|
811
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
812
|
-
}
|
|
813
|
-
function collectShapeErrors(value, mode, errors) {
|
|
814
|
-
if (!isRecord(value)) {
|
|
815
|
-
errors.push(
|
|
816
|
-
`${mode}: expected an object of colors, got ${describe(value)}`
|
|
817
|
-
);
|
|
818
|
-
return false;
|
|
819
|
-
}
|
|
820
|
-
const before = errors.length;
|
|
821
|
-
const fields = /* @__PURE__ */ new Set([...SEMANTIC_KEYS, "colors"]);
|
|
822
|
-
for (const key of Object.keys(value)) {
|
|
823
|
-
if (!fields.has(key)) {
|
|
824
|
-
errors.push(`${mode}.${key}: not a palette field`);
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
for (const key of SEMANTIC_KEYS) {
|
|
828
|
-
const hex = value[key];
|
|
829
|
-
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
830
|
-
errors.push(`${mode}.${key}: invalid hex ${describe(hex)}`);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
const named = value["colors"];
|
|
834
|
-
if (!isRecord(named)) {
|
|
835
|
-
errors.push(
|
|
836
|
-
`${mode}.colors: expected an object of named colors, got ${describe(named)}`
|
|
837
|
-
);
|
|
838
|
-
} else {
|
|
839
|
-
const names = new Set(COLOR_KEYS);
|
|
840
|
-
for (const key of Object.keys(named)) {
|
|
841
|
-
if (!names.has(key)) {
|
|
842
|
-
errors.push(
|
|
843
|
-
`${mode}.colors.${key}: not a palette color \u2014 a theme sets the existing color names and cannot add one`
|
|
844
|
-
);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
for (const key of COLOR_KEYS) {
|
|
848
|
-
const hex = named[key];
|
|
849
|
-
if (typeof hex !== "string" || !isValidHex(hex)) {
|
|
850
|
-
errors.push(`${mode}.colors.${key}: invalid hex ${describe(hex)}`);
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
return errors.length === before;
|
|
855
|
-
}
|
|
856
|
-
function describe(value) {
|
|
857
|
-
if (value === void 0) return "nothing";
|
|
858
|
-
if (typeof value === "string") return `"${value}"`;
|
|
859
|
-
if (value === null) return "null";
|
|
860
|
-
return typeof value;
|
|
861
|
-
}
|
|
862
|
-
function intents(colors) {
|
|
863
|
-
const out = [];
|
|
864
|
-
for (const key of COLOR_KEYS) {
|
|
865
|
-
if (CONTRAST_EXEMPT.has(key)) continue;
|
|
866
|
-
out.push([`colors.${key}`, colors.colors[key]]);
|
|
867
|
-
}
|
|
868
|
-
for (const key of FILL_ACCENT_KEYS) out.push([key, colors[key]]);
|
|
869
|
-
return out;
|
|
870
|
-
}
|
|
871
|
-
function drawnToken(colors, bg) {
|
|
872
|
-
const drawn = contrastText(bg, colors.textOnFillLight, colors.textOnFillDark);
|
|
873
|
-
return drawn === colors.textOnFillDark ? "textOnFillDark" : "textOnFillLight";
|
|
874
|
-
}
|
|
875
|
-
function worstTintedFill(colors, isDark) {
|
|
876
|
-
let worst;
|
|
877
|
-
for (const [fill, intent] of intents(colors)) {
|
|
878
|
-
const fillHex = shapeFill(colors, intent, isDark);
|
|
879
|
-
const token = drawnToken(colors, fillHex);
|
|
880
|
-
const ratio = contrastRatio(colors[token], fillHex);
|
|
881
|
-
if (!worst || ratio < worst.ratio) {
|
|
882
|
-
worst = { ratio, token, fill, fillHex };
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
return worst;
|
|
886
|
-
}
|
|
887
|
-
function worstSolidFill(colors) {
|
|
888
|
-
let worst;
|
|
889
|
-
for (const [fill, intent] of intents(colors)) {
|
|
890
|
-
const token = drawnToken(colors, intent);
|
|
891
|
-
const lc = Math.abs(apcaContrast(colors[token], intent));
|
|
892
|
-
if (!worst || lc < worst.lc) {
|
|
893
|
-
worst = { lc, token, fill, fillHex: intent };
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return worst;
|
|
897
|
-
}
|
|
898
|
-
function collectContrastErrors(colors, where, isDark, errors) {
|
|
899
|
-
const tinted = worstTintedFill(colors, isDark);
|
|
900
|
-
if (tinted.ratio < CONTRAST_FLOOR) {
|
|
901
|
-
errors.push(
|
|
902
|
-
`${where}: ${tinted.token} ${colors[tinted.token]} on the ${tinted.fill} fill ${tinted.fillHex} reaches only ${tinted.ratio.toFixed(2)}:1 \u2014 text on a fill needs ${CONTRAST_FLOOR.toFixed(1)}:1`
|
|
903
|
-
);
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
function collectSolidErrors(colors, where, errors) {
|
|
907
|
-
const solid = worstSolidFill(colors);
|
|
908
|
-
if (solid.lc >= SOLID_FLOOR_LC) return;
|
|
909
|
-
errors.push(
|
|
910
|
-
`${where}: ${solid.token} ${colors[solid.token]} on the solid ${solid.fill} ${solid.fillHex} reaches only Lc ${solid.lc.toFixed(1)} \u2014 text on a solid fill needs Lc ${SOLID_FLOOR_LC}`
|
|
911
|
-
);
|
|
912
|
-
}
|
|
913
|
-
function validateThemeFile(input) {
|
|
914
|
-
const errors = [];
|
|
915
|
-
if (!isRecord(input)) {
|
|
916
|
-
return {
|
|
917
|
-
ok: false,
|
|
918
|
-
errors: [`expected a theme object, got ${describe(input)}`]
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
const id = input["id"];
|
|
922
|
-
if (typeof id !== "string" || id.trim() === "") {
|
|
923
|
-
errors.push(`id: expected a non-empty string, got ${describe(id)}`);
|
|
924
|
-
} else if (BUILT_IN_IDS.has(id)) {
|
|
925
|
-
errors.push(
|
|
926
|
-
`id: "${id}" is a built-in palette \u2014 a theme file needs an id of its own`
|
|
927
|
-
);
|
|
928
|
-
}
|
|
929
|
-
const name = input["name"];
|
|
930
|
-
if (typeof name !== "string" || name.trim() === "") {
|
|
931
|
-
errors.push(`name: expected a non-empty string, got ${describe(name)}`);
|
|
932
|
-
}
|
|
933
|
-
const declared = input["mode"];
|
|
934
|
-
let mode = null;
|
|
935
|
-
if (declared !== void 0) {
|
|
936
|
-
if (declared === "light" || declared === "dark") {
|
|
937
|
-
mode = declared;
|
|
938
|
-
} else {
|
|
939
|
-
errors.push(
|
|
940
|
-
`mode: expected "light" or "dark", got ${describe(declared)}`
|
|
941
|
-
);
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
if (mode) {
|
|
945
|
-
const other = mode === "light" ? "dark" : "light";
|
|
946
|
-
if (input[other] !== void 0) {
|
|
947
|
-
errors.push(
|
|
948
|
-
`${other}: a theme declaring mode "${mode}" must not also define ${other} \u2014 drop the mode to define both`
|
|
949
|
-
);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
const wanted = mode ? [mode] : ["light", "dark"];
|
|
953
|
-
const modes = {};
|
|
954
|
-
for (const key of wanted) {
|
|
955
|
-
const value = input[key];
|
|
956
|
-
if (value === void 0) {
|
|
957
|
-
errors.push(
|
|
958
|
-
mode ? `${key}: a theme declaring mode "${mode}" has to define ${key}` : `${key}: a theme without a mode has to define both light and dark`
|
|
959
|
-
);
|
|
960
|
-
continue;
|
|
961
|
-
}
|
|
962
|
-
if (collectShapeErrors(value, key, errors)) modes[key] = value;
|
|
963
|
-
}
|
|
964
|
-
if (errors.length === 0) {
|
|
965
|
-
const light2 = modes.light ?? modes.dark;
|
|
966
|
-
const dark2 = modes.dark ?? modes.light;
|
|
967
|
-
const declaredMode = mode;
|
|
968
|
-
const label = (render) => declaredMode !== null && render !== declaredMode ? `${render} (a theme declaring mode "${declaredMode}" is used in ${render} mode too)` : render;
|
|
969
|
-
collectContrastErrors(light2, label("light"), false, errors);
|
|
970
|
-
collectContrastErrors(dark2, label("dark"), true, errors);
|
|
971
|
-
if (declaredMode !== null) {
|
|
972
|
-
collectSolidErrors(light2, declaredMode, errors);
|
|
973
|
-
} else {
|
|
974
|
-
collectSolidErrors(light2, "light", errors);
|
|
975
|
-
collectSolidErrors(dark2, "dark", errors);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
if (errors.length > 0) return { ok: false, errors };
|
|
979
|
-
const light = modes.light ?? modes.dark;
|
|
980
|
-
const dark = modes.dark ?? modes.light;
|
|
981
|
-
return {
|
|
982
|
-
ok: true,
|
|
983
|
-
palette: { id, name, light, dark },
|
|
984
|
-
mode
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
|
|
988
980
|
// src/palettes/index.ts
|
|
989
981
|
var palettes = {
|
|
990
982
|
atlas: atlasPalette,
|
|
@@ -999,10 +991,13 @@ var palettes = {
|
|
|
999
991
|
export {
|
|
1000
992
|
DEFAULT_PALETTE_ID,
|
|
1001
993
|
isValidHex,
|
|
994
|
+
COLOR_KEYS,
|
|
995
|
+
SEMANTIC_KEYS,
|
|
1002
996
|
registerPalette,
|
|
1003
997
|
getPalette,
|
|
1004
998
|
resolvePaletteOrFallback,
|
|
1005
999
|
getAvailablePalettes,
|
|
1000
|
+
validateThemeFile,
|
|
1006
1001
|
atlasPalette,
|
|
1007
1002
|
blueprintPalette,
|
|
1008
1003
|
catppuccinPalette,
|
|
@@ -1010,6 +1005,5 @@ export {
|
|
|
1010
1005
|
slatePalette,
|
|
1011
1006
|
tidewaterPalette,
|
|
1012
1007
|
tokyoNightPalette,
|
|
1013
|
-
validateThemeFile,
|
|
1014
1008
|
palettes
|
|
1015
1009
|
};
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
rectsOverlap,
|
|
10
10
|
segmentRectOverlap
|
|
11
11
|
} from "./chunk-KMU65FYM.js";
|
|
12
|
-
import {
|
|
13
|
-
TITLE_FONT_SIZE,
|
|
14
|
-
TITLE_Y
|
|
15
|
-
} from "./chunk-VLC6WNRD.js";
|
|
16
12
|
import {
|
|
17
13
|
compactNumber,
|
|
18
14
|
computeLegendLayout
|
|
19
15
|
} from "./chunk-NS7L7YKH.js";
|
|
16
|
+
import {
|
|
17
|
+
TITLE_FONT_SIZE,
|
|
18
|
+
TITLE_Y
|
|
19
|
+
} from "./chunk-VLC6WNRD.js";
|
|
20
20
|
import {
|
|
21
21
|
tagAttrKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
23
23
|
import {
|
|
24
24
|
measureLegendText
|
|
25
25
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -40,6 +40,7 @@ var LEGEND_BOTTOM_GAP = 10;
|
|
|
40
40
|
function mapLegendGroups(legend) {
|
|
41
41
|
const ramp = legend.ramp;
|
|
42
42
|
const scoreGroup = ramp ? {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- a blank metric name must still read 'Value'
|
|
43
44
|
name: ramp.metric?.trim() || "Value",
|
|
44
45
|
entries: [],
|
|
45
46
|
gradient: {
|
|
@@ -1981,7 +1982,10 @@ function layoutMap(resolvedIn, data, size, opts) {
|
|
|
1981
1982
|
const rampHue = resolveColor(resolved.directives.regionMetricColor ?? "", palette) ?? palette.colors.red;
|
|
1982
1983
|
const rampLow = resolved.directives.regionMetricLowColor ? resolveColor(resolved.directives.regionMetricLowColor, palette) ?? void 0 : void 0;
|
|
1983
1984
|
const hasRamp = values.length > 0;
|
|
1984
|
-
const VALUE_NAME = hasRamp ?
|
|
1985
|
+
const VALUE_NAME = hasRamp ? (
|
|
1986
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- a blank metric name must still read 'Value'
|
|
1987
|
+
resolved.directives.regionMetric?.trim() || "Value"
|
|
1988
|
+
) : null;
|
|
1985
1989
|
const matchColorGroup = (v) => {
|
|
1986
1990
|
const lv = v.trim().toLowerCase();
|
|
1987
1991
|
if (lv === "none") return null;
|