@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
|
SKETCH_DIAGNOSTIC_CODES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NWSPPGIE.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInArrowLabel
|
|
6
6
|
} from "./chunk-N7VMGZCU.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tagAttrKey,
|
|
17
17
|
validateTagGroupNames,
|
|
18
18
|
validateTagValues
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
20
20
|
import {
|
|
21
21
|
SKETCH_REGISTRY,
|
|
22
22
|
extractColor,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
stripQuotes,
|
|
29
29
|
warnUnknownMetaKeys,
|
|
30
30
|
withTagAliases
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
32
32
|
import {
|
|
33
33
|
NAME_DIAGNOSTIC_CODES,
|
|
34
34
|
formatDgmoError,
|
|
@@ -38,19 +38,6 @@ import {
|
|
|
38
38
|
suggest
|
|
39
39
|
} from "./chunk-BYU54C3S.js";
|
|
40
40
|
|
|
41
|
-
// src/sketch/types.ts
|
|
42
|
-
var SKETCH_SHAPE_KINDS = [
|
|
43
|
-
"rectangle",
|
|
44
|
-
"database",
|
|
45
|
-
"queue",
|
|
46
|
-
"person",
|
|
47
|
-
"document",
|
|
48
|
-
"note"
|
|
49
|
-
];
|
|
50
|
-
function isSketchShapeKind(value) {
|
|
51
|
-
return SKETCH_SHAPE_KINDS.includes(value);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
41
|
// src/sketch/parser.ts
|
|
55
42
|
var EDGE_FORMS = [
|
|
56
43
|
{ re: /^<-(.+?)->\s*(.+)$/, heads: "both", dashed: false, labeled: true },
|
|
@@ -137,25 +124,19 @@ function parseSketch(content, palette) {
|
|
|
137
124
|
return { c, r };
|
|
138
125
|
};
|
|
139
126
|
const liftReserved = (meta, lineNumber) => {
|
|
140
|
-
let shape = "rectangle";
|
|
141
127
|
const shapeRaw = meta["shape"];
|
|
142
128
|
if (shapeRaw !== void 0) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
shape
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
lineNumber,
|
|
149
|
-
`Unknown shape "${shapeRaw}" \u2014 rendered as a rectangle (valid: database, queue, person, document, note)`,
|
|
150
|
-
SKETCH_DIAGNOSTIC_CODES.UNKNOWN_SHAPE
|
|
151
|
-
);
|
|
152
|
-
}
|
|
129
|
+
pushError(
|
|
130
|
+
lineNumber,
|
|
131
|
+
`shape: ${shapeRaw.trim()} is not supported in sketch \u2014 every box is a plain rectangle; remove the shape: clause`,
|
|
132
|
+
SKETCH_DIAGNOSTIC_CODES.SHAPE_UNSUPPORTED
|
|
133
|
+
);
|
|
153
134
|
delete meta["shape"];
|
|
154
135
|
}
|
|
155
136
|
const at = parseAt(meta["at"], lineNumber);
|
|
156
137
|
delete meta["at"];
|
|
157
138
|
delete meta["collapsed"];
|
|
158
|
-
return {
|
|
139
|
+
return { at };
|
|
159
140
|
};
|
|
160
141
|
const addShape = (trimmed, lineNumber, box) => {
|
|
161
142
|
const snm = splitNameAndMeta(
|
|
@@ -179,7 +160,7 @@ function parseSketch(content, palette) {
|
|
|
179
160
|
(m) => warn(lineNumber, m),
|
|
180
161
|
snm.name
|
|
181
162
|
);
|
|
182
|
-
const {
|
|
163
|
+
const { at } = liftReserved(meta, lineNumber);
|
|
183
164
|
const norm = normalizeName(label);
|
|
184
165
|
if (snm.alias !== void 0 && aliasIndex.has(snm.alias)) {
|
|
185
166
|
warn(
|
|
@@ -196,9 +177,6 @@ function parseSketch(content, palette) {
|
|
|
196
177
|
if (!(k in first.metadata)) first.metadata[k] = v;
|
|
197
178
|
}
|
|
198
179
|
if (first.at === null && at !== null) first.at = at;
|
|
199
|
-
if (first.shape === "rectangle" && shape !== "rectangle") {
|
|
200
|
-
first.shape = shape;
|
|
201
|
-
}
|
|
202
180
|
warn(
|
|
203
181
|
lineNumber,
|
|
204
182
|
nameMergedMessage({
|
|
@@ -217,7 +195,6 @@ function parseSketch(content, palette) {
|
|
|
217
195
|
id,
|
|
218
196
|
label,
|
|
219
197
|
...alias !== void 0 && { alias },
|
|
220
|
-
shape,
|
|
221
198
|
at,
|
|
222
199
|
metadata: meta,
|
|
223
200
|
...box !== null && { boxLabel: box.label },
|
|
@@ -658,7 +635,5 @@ ${descLine}`;
|
|
|
658
635
|
}
|
|
659
636
|
|
|
660
637
|
export {
|
|
661
|
-
SKETCH_SHAPE_KINDS,
|
|
662
|
-
isSketchShapeKind,
|
|
663
638
|
parseSketch
|
|
664
639
|
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-ICLB27PZ.js";
|
|
11
11
|
import {
|
|
12
12
|
fillModeFromOptions
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
14
14
|
import {
|
|
15
15
|
measureText
|
|
16
16
|
} from "./chunk-KAO7JL4I.js";
|
|
@@ -334,8 +334,8 @@ function renderTabs(g, node, ctx) {
|
|
|
334
334
|
function renderTable(g, node, ctx) {
|
|
335
335
|
const { palette, isTransparent } = ctx;
|
|
336
336
|
const el = node.element;
|
|
337
|
-
const headers = el.tableHeaders
|
|
338
|
-
const data = el.tableData
|
|
337
|
+
const headers = el.tableHeaders ?? [];
|
|
338
|
+
const data = el.tableData ?? [];
|
|
339
339
|
const isSkeleton = el.tableRows !== void 0 && el.tableCols !== void 0;
|
|
340
340
|
const cols = headers.length || el.tableCols || 3;
|
|
341
341
|
const colW = node.width / cols;
|
|
@@ -361,7 +361,7 @@ function renderTable(g, node, ctx) {
|
|
|
361
361
|
if (isSkeleton) {
|
|
362
362
|
g.append("rect").attr("x", c * colW + 10).attr("y", ry + 8).attr("width", colW * 0.6).attr("height", 12).attr("fill", palette.textMuted).attr("opacity", 0.25).attr("rx", 2);
|
|
363
363
|
} else if (data[r]) {
|
|
364
|
-
const cellText = data[r][c]
|
|
364
|
+
const cellText = data[r][c] ?? "";
|
|
365
365
|
renderTableCell(g, cellText, c * colW + 10, ry, colW - 20, rowH, ctx);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
@@ -445,7 +445,7 @@ function renderSkeletonPlaceholder(g, node, ctx) {
|
|
|
445
445
|
function renderAlert(g, node, ctx) {
|
|
446
446
|
const { palette, isDark, isTransparent } = ctx;
|
|
447
447
|
const el = node.element;
|
|
448
|
-
const color = getElementSemanticColor(el, palette)
|
|
448
|
+
const color = getElementSemanticColor(el, palette) ?? palette.accent;
|
|
449
449
|
const fill = isTransparent ? null : shapeFill(palette, color, isDark, { mode: ctx.fillMode });
|
|
450
450
|
if (fill) {
|
|
451
451
|
g.append("rect").attr("width", node.width).attr("height", node.height).attr("fill", fill).attr("rx", 4);
|
|
@@ -473,7 +473,7 @@ function renderProgress(g, node, ctx) {
|
|
|
473
473
|
function renderChart(g, node, ctx) {
|
|
474
474
|
const { palette, isTransparent } = ctx;
|
|
475
475
|
const el = node.element;
|
|
476
|
-
const hint = el.chartHint
|
|
476
|
+
const hint = el.chartHint ?? "line";
|
|
477
477
|
g.append("rect").attr("width", node.width).attr("height", node.height).attr(
|
|
478
478
|
"fill",
|
|
479
479
|
isTransparent ? "none" : mix(palette.textMuted, palette.bg, 8)
|
|
@@ -185,9 +185,9 @@ function resolveMap(parsed, data) {
|
|
|
185
185
|
const f = fold(r.name);
|
|
186
186
|
return usStateIndex.has(f) && !countryIndex.has(f);
|
|
187
187
|
}) || parsed.regions.some(
|
|
188
|
-
(r) => r.scope === "US" || r.scope?.startsWith("US-") || usStateFromBareScope(r.scope) !== null
|
|
188
|
+
(r) => r.scope === "US" || !!r.scope?.startsWith("US-") || usStateFromBareScope(r.scope) !== null
|
|
189
189
|
) || parsed.pois.some(
|
|
190
|
-
(p) => p.pos.kind === "name" && (p.pos.scope?.startsWith("US-") || usStateFromBareScope(p.pos.scope) !== null)
|
|
190
|
+
(p) => p.pos.kind === "name" && (!!p.pos.scope?.startsWith("US-") || usStateFromBareScope(p.pos.scope) !== null)
|
|
191
191
|
);
|
|
192
192
|
const regions = [];
|
|
193
193
|
const seenRegion = /* @__PURE__ */ new Map();
|
|
@@ -5,9 +5,6 @@ import {
|
|
|
5
5
|
renderInlineText,
|
|
6
6
|
stripInlineMarkdown
|
|
7
7
|
} from "./chunk-S7W75MIM.js";
|
|
8
|
-
import {
|
|
9
|
-
FONT_FAMILY
|
|
10
|
-
} from "./chunk-ICLB27PZ.js";
|
|
11
8
|
import {
|
|
12
9
|
DAY_MS,
|
|
13
10
|
applyOrdinalTemplate,
|
|
@@ -25,6 +22,9 @@ import {
|
|
|
25
22
|
import {
|
|
26
23
|
now
|
|
27
24
|
} from "./chunk-3DPOIW3W.js";
|
|
25
|
+
import {
|
|
26
|
+
FONT_FAMILY
|
|
27
|
+
} from "./chunk-ICLB27PZ.js";
|
|
28
28
|
import {
|
|
29
29
|
contrastText,
|
|
30
30
|
getSeriesColors,
|
|
@@ -838,7 +838,7 @@ function renderCountdown(container, parsed, palette, isDark, exportDims) {
|
|
|
838
838
|
}
|
|
839
839
|
const seriesAccent = getSeriesColors(palette)[0];
|
|
840
840
|
const defaultAccent = resolveColor("red", palette) ?? seriesAccent;
|
|
841
|
-
const manualColor = parsed.color && resolveColor(parsed.color, palette)
|
|
841
|
+
const manualColor = (parsed.color && resolveColor(parsed.color, palette)) ?? parsed.color ?? null;
|
|
842
842
|
const accent = manualColor ?? defaultAccent;
|
|
843
843
|
const muted = mix(palette.text, themeBaseBg(palette, isDark), 55);
|
|
844
844
|
const banked = resolveColor("green", palette) ?? muted;
|
|
@@ -71,6 +71,20 @@ B
|
|
|
71
71
|
hint: "Remove the trailing tag/metadata suffix \u2014 flowchart node colors come from shape.",
|
|
72
72
|
example: `flowchart
|
|
73
73
|
(Start) -> (Denied) s: Denied
|
|
74
|
+
`
|
|
75
|
+
},
|
|
76
|
+
FLOWCHART_STRUCTURE: {
|
|
77
|
+
// src/validate-diagram.ts — validateFlowchartStructure(), the agent-facing
|
|
78
|
+
// gate both MCP servers run; the editor itself never emits it.
|
|
79
|
+
code: "E_FLOWCHART_STRUCTURE",
|
|
80
|
+
severity: "error",
|
|
81
|
+
chartType: "flowchart",
|
|
82
|
+
title: "Flowchart is not one connected flow",
|
|
83
|
+
message: "A decision has fewer than two outgoing branches, the flow has no start or no end, or a node is not on a path from a start to an end.",
|
|
84
|
+
hint: "Give every decision two or more branches, and wire every node into a path from the start to an end.",
|
|
85
|
+
example: `flowchart
|
|
86
|
+
(Start) -> (End)
|
|
87
|
+
[Floating]
|
|
74
88
|
`
|
|
75
89
|
}
|
|
76
90
|
};
|