@diagrammo/dgmo 0.48.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +12 -3
- package/.github/copilot-instructions.md +12 -3
- package/.windsurfrules +12 -3
- package/SKILL.md +12 -3
- package/dist/advanced.d.ts +851 -1
- package/dist/advanced.js +601 -177
- package/dist/auto.css +63 -0
- package/dist/auto.js +220 -110
- package/dist/auto.mjs +45920 -33167
- package/dist/block.css +63 -0
- package/dist/block.d.ts +13 -5
- package/dist/block.js +239 -62
- package/dist/{charts-d3-QOZHKTCT.js → charts-d3-DKUD7MQE.js} +9 -8
- package/dist/{chunk-3MQQNXPD.js → chunk-2C56LEML.js} +3 -3
- package/dist/{chunk-L66GEFB6.js → chunk-2JJ2KNPI.js} +4 -4
- package/dist/{chunk-6SM5NJQH.js → chunk-2QYTMIRR.js} +4 -4
- package/dist/{chunk-RJE5JTVK.js → chunk-3G6TMNVF.js} +7 -7
- package/dist/{chunk-MO5YHHMQ.js → chunk-3LKM6FMW.js} +2 -2
- package/dist/{chunk-76OWZ3BA.js → chunk-3P2DKJCG.js} +2 -2
- package/dist/chunk-3TDRHT4J.js +1043 -0
- package/dist/chunk-3XPUDB7B.js +420 -0
- package/dist/{chunk-2LACINWN.js → chunk-3ZPC476N.js} +7 -7
- package/dist/{chunk-G2H74XJZ.js → chunk-4BMJQFNK.js} +8 -8
- package/dist/{chunk-THXCFRTU.js → chunk-4S723I74.js} +9 -9
- package/dist/{chunk-6NYWYNBI.js → chunk-4XK3FLFB.js} +3 -3
- package/dist/chunk-5JSWBPZZ.js +607 -0
- package/dist/{chunk-WCT3NYCV.js → chunk-5LWQH6QV.js} +1 -1
- package/dist/{chunk-7DTWEFUE.js → chunk-5Z736BSU.js} +8 -8
- package/dist/{chunk-ERLBPDGU.js → chunk-6BFZKBGD.js} +2 -2
- package/dist/{chunk-6HO5ZTXK.js → chunk-6IAA2QQ2.js} +2 -2
- package/dist/{chunk-H6PI3KJT.js → chunk-6IUAK7RZ.js} +2 -2
- package/dist/{chunk-RTLBSQ3G.js → chunk-6M5PJFQG.js} +3 -3
- package/dist/{chunk-Z5CGSFJB.js → chunk-6X4AKWLF.js} +4 -4
- package/dist/{chunk-OJR3MQYV.js → chunk-6ZT4U37Q.js} +291 -52
- package/dist/{chunk-5QXL4NYS.js → chunk-7G2ER4CY.js} +10 -5
- package/dist/chunk-7PQYTZMA.js +681 -0
- package/dist/{chunk-OURHMODR.js → chunk-7RB5Q6MB.js} +11 -11
- package/dist/{chunk-YAA6IID3.js → chunk-7UEMZREK.js} +2 -2
- package/dist/{chunk-AN2MOO5T.js → chunk-A3WQVFBS.js} +3 -3
- package/dist/{chunk-VOKGH627.js → chunk-AHGF2YYA.js} +13 -3
- package/dist/{chunk-CI2G3OEB.js → chunk-ASS5YYIZ.js} +12 -12
- package/dist/{chunk-TYS6CSS5.js → chunk-BCYVE3N5.js} +2 -2
- package/dist/chunk-BDXC7MDK.js +2395 -0
- package/dist/chunk-BTUTZMPT.js +482 -0
- package/dist/{chunk-YGJTDXVR.js → chunk-C4GQDB5L.js} +2 -2
- package/dist/{chunk-Y2ZE3MSG.js → chunk-C63UWAKM.js} +2 -2
- package/dist/{chunk-725LDASD.js → chunk-CLD2OKV7.js} +2 -2
- package/dist/{chunk-WBRZJOEC.js → chunk-CMCR5WBW.js} +3 -3
- package/dist/{chunk-IZMRON6C.js → chunk-CVV36CWI.js} +2 -2
- package/dist/chunk-DMJJ3CEQ.js +254 -0
- package/dist/{chunk-MZSBFAPJ.js → chunk-EJTKV7CY.js} +9 -9
- package/dist/{chunk-FITOLXSX.js → chunk-EOFPYPAU.js} +26 -2
- package/dist/{chunk-X5LCYCL5.js → chunk-ER5SCQWQ.js} +5 -5
- package/dist/{chunk-4OHACBGX.js → chunk-F2L5GCQ4.js} +2 -2
- package/dist/{chunk-FCIIHT24.js → chunk-F5UDBSJY.js} +7 -7
- package/dist/{chunk-3JLKYGBQ.js → chunk-F7BFXWNQ.js} +2 -2
- package/dist/{chunk-FANX6UJR.js → chunk-FAL7NOK3.js} +11 -11
- package/dist/{chunk-BUPDIHML.js → chunk-FB2WHOEQ.js} +4 -4
- package/dist/chunk-FL4IOQ37.js +379 -0
- package/dist/{chunk-LIOHW36Z.js → chunk-GBE54KY6.js} +6 -5
- package/dist/{chunk-RUNNI6VE.js → chunk-GL5UZ6NY.js} +3 -3
- package/dist/{chunk-4GRI7MEB.js → chunk-GPWHQ5FJ.js} +6 -6
- package/dist/chunk-GROQGHCT.js +960 -0
- package/dist/{chunk-SGZYXELT.js → chunk-H73FP42Q.js} +9 -6
- package/dist/{chunk-PBAHEPLQ.js → chunk-HGN652MU.js} +7 -6
- package/dist/{chunk-3SMGIJDD.js → chunk-HHXOONLX.js} +13 -1
- package/dist/{chunk-QOOUC2J5.js → chunk-HQCHYB5F.js} +2 -2
- package/dist/{chunk-AELOBFW5.js → chunk-I4IFRCUB.js} +3 -3
- package/dist/{chunk-GMR5MFHJ.js → chunk-I7F2A35O.js} +2 -2
- package/dist/{chunk-T2OE3YQB.js → chunk-IA3FJYWR.js} +3 -3
- package/dist/chunk-IAEC4KLA.js +492 -0
- package/dist/chunk-IVKC4GID.js +32 -0
- package/dist/{chunk-HSH73DP6.js → chunk-JFYIP7XU.js} +139 -39
- package/dist/{chunk-CKNVO24D.js → chunk-JZNMXEIV.js} +2 -2
- package/dist/chunk-KJXIHOVL.js +940 -0
- package/dist/chunk-L2ZTFHAY.js +331 -0
- package/dist/{chunk-B7JUCQUA.js → chunk-M5RXSRO2.js} +4 -4
- package/dist/{chunk-ULOEATBZ.js → chunk-NFFIKVNO.js} +106 -29
- package/dist/{chunk-PZMETGLY.js → chunk-NISQC5KW.js} +358 -122
- package/dist/chunk-O4VUFXIH.js +574 -0
- package/dist/{chunk-RVMRZAPB.js → chunk-O76UD6VJ.js} +3 -3
- package/dist/{chunk-JM4LEPY3.js → chunk-O7NUCTFU.js} +2 -2
- package/dist/{chunk-JED6ZDEE.js → chunk-O7WP4ZD4.js} +2 -2
- package/dist/{chunk-EVCVDTXE.js → chunk-OHQEMBLI.js} +3 -3
- package/dist/{chunk-ZBWMSD5N.js → chunk-ONA5KPV3.js} +4 -4
- package/dist/{chunk-Y3J7VR52.js → chunk-OTAL43EH.js} +34 -2
- package/dist/{chunk-WCSOJFU3.js → chunk-OTP5KVLO.js} +3 -3
- package/dist/{chunk-RYEGFMUO.js → chunk-PGEGPSCZ.js} +2 -2
- package/dist/{chunk-ZO27FGJS.js → chunk-PH5X4GIP.js} +2 -2
- package/dist/{chunk-ZJEL4H2R.js → chunk-PJUGRJHJ.js} +9 -9
- package/dist/{chunk-ZGR7ULFJ.js → chunk-PLZI6KPM.js} +26 -14
- package/dist/{chunk-3R5POCTZ.js → chunk-PMN3Q7RJ.js} +6 -6
- package/dist/{chunk-YGJZWZTY.js → chunk-PZFVK3IH.js} +2 -2
- package/dist/chunk-Q4V4XQWV.js +158 -0
- package/dist/chunk-QDFNCATJ.js +325 -0
- package/dist/{chunk-QEBUY5NY.js → chunk-QFQ35BTO.js} +4 -4
- package/dist/chunk-QQJUTGQH.js +135 -0
- package/dist/{chunk-PWIHZ6NJ.js → chunk-QUJGFNFN.js} +4 -4
- package/dist/{chunk-J5FIXQRT.js → chunk-R56LASIN.js} +4 -4
- package/dist/{chunk-SRTU6HMQ.js → chunk-RV26LTUU.js} +8 -8
- package/dist/chunk-RV6A2B5S.js +354 -0
- package/dist/{chunk-EB6FPQUP.js → chunk-S5GRONXL.js} +3 -3
- package/dist/{chunk-5MLYVTYM.js → chunk-SCHXJTZL.js} +2 -2
- package/dist/{chunk-T3UBLACL.js → chunk-SCQ5VPUF.js} +19 -5
- package/dist/{chunk-PBHE5UG6.js → chunk-SGFZZAUO.js} +46 -12
- package/dist/{chunk-BUVJFRPY.js → chunk-SU2VBK4L.js} +4 -4
- package/dist/{chunk-SML67VPV.js → chunk-T4BRO3Z6.js} +3 -3
- package/dist/{chunk-NURGB5Z4.js → chunk-TSA237IM.js} +2 -2
- package/dist/chunk-TWCLK2GA.js +273 -0
- package/dist/{chunk-IJZFN3HM.js → chunk-TWQUYVP3.js} +4 -4
- package/dist/{chunk-DKEPS5LH.js → chunk-U2HGPLZS.js} +36 -2
- package/dist/{chunk-B65G5DNL.js → chunk-URSQLCTR.js} +3 -3
- package/dist/{chunk-ILKORZ3H.js → chunk-UUS2GIJZ.js} +7 -7
- package/dist/{chunk-XAKEUMEJ.js → chunk-UXOSVCLJ.js} +4 -4
- package/dist/{chunk-QLCCJEJI.js → chunk-WCUHAQKB.js} +2 -2
- package/dist/{chunk-WVAJFAIA.js → chunk-WWN566I7.js} +257 -101
- package/dist/{chunk-IPWPWM6R.js → chunk-X2NMFTG3.js} +111 -10
- package/dist/{chunk-UWN33VNX.js → chunk-XCLHOZAM.js} +10 -10
- package/dist/{chunk-P235SVAH.js → chunk-XDXNDSKO.js} +2 -2
- package/dist/chunk-XHVV4NVW.js +51 -0
- package/dist/{chunk-33LCUH4H.js → chunk-XMVQ5F4M.js} +4 -4
- package/dist/{chunk-MITI6NOL.js → chunk-YA7D2N2O.js} +11 -11
- package/dist/{chunk-7JEGTRLD.js → chunk-YB3FW24O.js} +3 -3
- package/dist/chunk-YNRDWYZP.js +295 -0
- package/dist/{chunk-44CM72SQ.js → chunk-YZLMKW4T.js} +3 -3
- package/dist/chunk-Z6XJQ6KO.js +452 -0
- package/dist/cli.cjs +179 -133
- package/dist/clock.d.ts +10 -0
- package/dist/clock.js +235 -0
- package/dist/countdown.d.ts +12 -0
- package/dist/countdown.js +450 -0
- package/dist/dgmo-router-QOMFCOOV.js +84 -0
- package/dist/dimensions-P5FSX2QN.js +22 -0
- package/dist/editor.js +43 -2
- package/dist/element.js +220 -110
- package/dist/element.mjs +45920 -33167
- package/dist/{flowchart-parser-ZNSKIBVR.js → flowchart-parser-OE4WHLTF.js} +4 -4
- package/dist/{flowchart-renderer-SNDSII4D.js → flowchart-renderer-GPCSMTOR.js} +8 -8
- package/dist/highlight.d.ts +17 -1
- package/dist/highlight.js +163 -6
- package/dist/index.d.ts +5 -1
- package/dist/index.js +199 -233
- package/dist/{layout-HRBZPFCN.js → layout-34CLNICW.js} +5 -5
- package/dist/layout-46366KBT.js +10 -0
- package/dist/{layout-HWDSRX5E.js → layout-5BG6DFCU.js} +6 -6
- package/dist/layout-6RDJHS6E.js +9 -0
- package/dist/{layout-7QXCNOVS.js → layout-7H4H46CS.js} +3 -3
- package/dist/{layout-46N4JJYK.js → layout-7SKMFYHL.js} +5 -5
- package/dist/{layout-EE6GE46Y.js → layout-DC4TVXER.js} +5 -5
- package/dist/layout-FGQWRYYW.js +14 -0
- package/dist/{layout-S2QBYSK2.js → layout-NXG63LWH.js} +3 -3
- package/dist/{layout-N76NR4ZO.js → layout-PUQCB6AN.js} +7 -7
- package/dist/{layout-HYZPWAK5.js → layout-QNUQLEHU.js} +3 -3
- package/dist/{layout-UM5F4DJB.js → layout-T3OZU5QW.js} +5 -5
- package/dist/layout-TJIWF7EM.js +14 -0
- package/dist/layout-VYELEAW7.js +14 -0
- package/dist/{layout-5RA6QWR6.js → layout-WZHNDT2O.js} +6 -6
- package/dist/{layout-search-OYV77HHS.js → layout-search-QS44PI5R.js} +6 -6
- package/dist/{parser-6BTRLKRZ.js → parser-45DENHFZ.js} +4 -4
- package/dist/{parser-TFZFBVWN.js → parser-4AI5ZN5F.js} +3 -3
- package/dist/{parser-XDVELHRK.js → parser-4P36TUVD.js} +4 -4
- package/dist/{parser-ZSDPZYQP.js → parser-5AURY4A6.js} +4 -4
- package/dist/{parser-N5O4IHUN.js → parser-A2BEFMGK.js} +4 -4
- package/dist/parser-B5FVS7O6.js +11 -0
- package/dist/{parser-NGU3ETO6.js → parser-C2HF2C2E.js} +4 -4
- package/dist/parser-CSFUN3CT.js +14 -0
- package/dist/{parser-TRTHDFPP.js → parser-D3QT6GWN.js} +5 -5
- package/dist/parser-D5637H5H.js +15 -0
- package/dist/{parser-VQP2UJ6W.js → parser-DFFEDKHH.js} +3 -3
- package/dist/parser-DOKMZXVZ.js +13 -0
- package/dist/parser-FMPCVFRK.js +15 -0
- package/dist/{parser-Y6WTBU76.js → parser-HYRTF3DO.js} +3 -3
- package/dist/{parser-I6KXEYFK.js → parser-I2UIJKVQ.js} +4 -4
- package/dist/{parser-O5J4VBII.js → parser-IBWNAPY4.js} +3 -3
- package/dist/{parser-PQ3POX45.js → parser-KUQWRPIT.js} +4 -4
- package/dist/{parser-2MFP2H2E.js → parser-LWKKBNSA.js} +3 -3
- package/dist/{parser-OV7NOBW6.js → parser-O4QFCUW7.js} +5 -5
- package/dist/{parser-IXSZZQHY.js → parser-PGMQDD4G.js} +4 -4
- package/dist/{parser-3STE62GB.js → parser-Q4QKCIWQ.js} +4 -4
- package/dist/parser-QTOB4KFL.js +14 -0
- package/dist/{parser-2EWECDSA.js → parser-QYYM4QVW.js} +4 -4
- package/dist/{parser-4OGOBJJ4.js → parser-RZMQP7MM.js} +4 -4
- package/dist/parser-RZPVAQVX.js +11 -0
- package/dist/parser-SOUJOEYI.js +13 -0
- package/dist/{parser-4FL2CMDG.js → parser-UQE5OWZI.js} +5 -5
- package/dist/{parser-NRAI6O25.js → parser-WAV5JRPT.js} +4 -4
- package/dist/{parser-KNSQSKQO.js → parser-YLKYBRIT.js} +5 -5
- package/dist/{parser-XKRP7QKP.js → parser-YS7TOS2K.js} +3 -3
- package/dist/{parser-AQETEVRW.js → parser-ZSOWUBML.js} +5 -5
- package/dist/{parser-CFZD5IBL.js → parser-ZTBATMLX.js} +4 -4
- package/dist/{renderer-VACVQYML.js → renderer-35HSIDMZ.js} +8 -8
- package/dist/{renderer-5MYBMBYO.js → renderer-4ITCHBT7.js} +5 -5
- package/dist/{renderer-CLJHQPBJ.js → renderer-67NPCBIS.js} +11 -11
- package/dist/{renderer-5NDVNDAZ.js → renderer-6GHYK7DX.js} +9 -9
- package/dist/{renderer-Z7I3W2PP.js → renderer-6RNGHC5Z.js} +8 -8
- package/dist/renderer-72LGR2YF.js +14 -0
- package/dist/{renderer-KQB7UGDS.js → renderer-7RH2SI3B.js} +3 -3
- package/dist/renderer-7SWMIFMM.js +21 -0
- package/dist/renderer-BBCEFILK.js +24 -0
- package/dist/{renderer-JGBKUCZD.js → renderer-BSW7SRIZ.js} +4 -4
- package/dist/{renderer-BYCNMBF7.js → renderer-BY533UWU.js} +11 -11
- package/dist/{renderer-6W5462RB.js → renderer-BZSBPTZJ.js} +9 -9
- package/dist/{renderer-7MVLWWQD.js → renderer-CXUC4KAD.js} +9 -9
- package/dist/{renderer-QIWVHWZO.js → renderer-DAXMXIKD.js} +3 -3
- package/dist/renderer-FZUKFUNZ.js +23 -0
- package/dist/renderer-G2NLGNKF.js +17 -0
- package/dist/renderer-GO3FE3RA.js +24 -0
- package/dist/{renderer-ZGNTUWC4.js → renderer-HPGR6USK.js} +8 -8
- package/dist/{renderer-UV6MI64M.js → renderer-HVCU2C3Z.js} +3 -3
- package/dist/renderer-ICJN2SA2.js +24 -0
- package/dist/{renderer-AWWAF6XD.js → renderer-INEXO7B6.js} +10 -10
- package/dist/{renderer-YY2OSF6E.js → renderer-KDYCFRBX.js} +8 -8
- package/dist/renderer-KY4KQBTF.js +19 -0
- package/dist/{renderer-B2OMQIQG.js → renderer-LBN65V45.js} +13 -13
- package/dist/{renderer-N43WR5GV.js → renderer-MGBWOCXG.js} +10 -10
- package/dist/{renderer-PGX2TKVS.js → renderer-O4JKUGKO.js} +8 -8
- package/dist/{renderer-4JHRUBE6.js → renderer-OOGFODWP.js} +10 -10
- package/dist/{renderer-6EEZHMH4.js → renderer-Q6ZKPLS6.js} +9 -9
- package/dist/{renderer-RPOA5YPZ.js → renderer-SZQ326M5.js} +12 -12
- package/dist/{renderer-ZRNG54CW.js → renderer-TKG6LS4U.js} +11 -11
- package/dist/{renderer-W4M6QLIJ.js → renderer-TQMZGDAX.js} +13 -13
- package/dist/renderer-radial-JELMHQ24.js +21 -0
- package/dist/{resolver-NOAA7ID7.js → resolver-FHBCO3PL.js} +3 -3
- package/dist/{state-parser-Z2V23ATR.js → state-parser-3REXRK3R.js} +4 -4
- package/dist/{state-renderer-B4DQBM6M.js → state-renderer-XYLNRWXR.js} +8 -8
- package/docs/ai-integration.md +12 -3
- package/docs/language-reference.md +429 -24
- package/gallery/fixtures/body.dgmo +17 -0
- package/gallery/fixtures/bracket.dgmo +30 -0
- package/gallery/fixtures/clock.dgmo +8 -0
- package/gallery/fixtures/countdown.dgmo +3 -0
- package/gallery/fixtures/family.dgmo +23 -0
- package/gallery/fixtures/goal.dgmo +4 -0
- package/gallery/fixtures/sketch.dgmo +22 -0
- package/package.json +12 -4
- package/dist/chunk-ODZVHU3R.js +0 -153
- package/dist/dgmo-router-X35VLZLM.js +0 -73
- package/dist/dimensions-J3FHIMJ6.js +0 -22
- package/dist/layout-5T6RH5M6.js +0 -14
- package/dist/layout-G23F7LDH.js +0 -9
- package/dist/layout-OB3RI63S.js +0 -14
- package/dist/parser-JAL2HD4I.js +0 -13
- package/dist/renderer-SMIBCRVB.js +0 -24
- package/dist/renderer-radial-C32GPJQ7.js +0 -21
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEmbedSvgViewBox,
|
|
3
|
-
normalizeSvgForEmbed
|
|
4
|
-
|
|
3
|
+
normalizeSvgForEmbed,
|
|
4
|
+
renderErrorCard
|
|
5
|
+
} from "./chunk-L2ZTFHAY.js";
|
|
5
6
|
import {
|
|
6
7
|
completeMapPlaces,
|
|
7
8
|
completeMapRegions,
|
|
@@ -10,79 +11,91 @@ import {
|
|
|
10
11
|
} from "./chunk-SQAG3UXH.js";
|
|
11
12
|
import {
|
|
12
13
|
MAP_DIAGNOSTICS
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HHXOONLX.js";
|
|
14
15
|
import {
|
|
15
16
|
decodeDiagramUrl,
|
|
16
17
|
encodeDiagramUrl,
|
|
17
18
|
render
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
D3_DATA_CHART_TYPES,
|
|
22
|
-
renderDataChartD3,
|
|
23
|
-
supportsD3DataChart
|
|
24
|
-
} from "./chunk-OJR3MQYV.js";
|
|
25
|
-
import "./chunk-UWN33VNX.js";
|
|
19
|
+
} from "./chunk-NISQC5KW.js";
|
|
20
|
+
import "./chunk-XCLHOZAM.js";
|
|
26
21
|
import "./chunk-YRYKTYMQ.js";
|
|
27
|
-
import "./chunk-U6EQI3U6.js";
|
|
28
|
-
import "./chunk-PWIHZ6NJ.js";
|
|
29
22
|
import "./chunk-YYVTBZZC.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-A4GOY3PE.js";
|
|
32
|
-
import {
|
|
33
|
-
FONT_FAMILY
|
|
34
|
-
} from "./chunk-6KFWC4CO.js";
|
|
35
|
-
import "./chunk-QOOUC2J5.js";
|
|
36
|
-
import {
|
|
37
|
-
measureText,
|
|
38
|
-
truncateText
|
|
39
|
-
} from "./chunk-WCT3NYCV.js";
|
|
23
|
+
import "./chunk-QUJGFNFN.js";
|
|
40
24
|
import {
|
|
41
25
|
REGISTRY_BY_ID,
|
|
42
26
|
chartTypes,
|
|
43
27
|
parseDgmo
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-JFYIP7XU.js";
|
|
29
|
+
import "./chunk-Q4V4XQWV.js";
|
|
30
|
+
import "./chunk-BTUTZMPT.js";
|
|
31
|
+
import "./chunk-YNRDWYZP.js";
|
|
32
|
+
import "./chunk-3XPUDB7B.js";
|
|
33
|
+
import "./chunk-FL4IOQ37.js";
|
|
34
|
+
import {
|
|
35
|
+
RACI_DIAGNOSTICS
|
|
36
|
+
} from "./chunk-PGEGPSCZ.js";
|
|
37
|
+
import {
|
|
38
|
+
BODY_DIAGNOSTICS
|
|
39
|
+
} from "./chunk-DMJJ3CEQ.js";
|
|
40
|
+
import "./chunk-BDXC7MDK.js";
|
|
41
|
+
import {
|
|
42
|
+
D3_DATA_CHART_TYPES,
|
|
43
|
+
renderDataChartD3,
|
|
44
|
+
supportsD3DataChart
|
|
45
|
+
} from "./chunk-6ZT4U37Q.js";
|
|
46
|
+
import "./chunk-HGN652MU.js";
|
|
47
|
+
import "./chunk-U6EQI3U6.js";
|
|
48
|
+
import "./chunk-7UEMZREK.js";
|
|
49
|
+
import "./chunk-A4GOY3PE.js";
|
|
50
|
+
import "./chunk-6KFWC4CO.js";
|
|
51
|
+
import "./chunk-HQCHYB5F.js";
|
|
52
|
+
import "./chunk-5LWQH6QV.js";
|
|
53
|
+
import "./chunk-XDXNDSKO.js";
|
|
54
|
+
import "./chunk-OHQEMBLI.js";
|
|
55
|
+
import "./chunk-TSA237IM.js";
|
|
56
|
+
import "./chunk-6IAA2QQ2.js";
|
|
57
|
+
import "./chunk-YZLMKW4T.js";
|
|
58
|
+
import "./chunk-3P2DKJCG.js";
|
|
59
|
+
import "./chunk-3LKM6FMW.js";
|
|
50
60
|
import {
|
|
51
61
|
TREEMAP_DIAGNOSTICS
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
62
|
+
} from "./chunk-OTP5KVLO.js";
|
|
63
|
+
import "./chunk-YB3FW24O.js";
|
|
54
64
|
import "./chunk-NNAAJVBU.js";
|
|
65
|
+
import "./chunk-XMVQ5F4M.js";
|
|
66
|
+
import "./chunk-UXOSVCLJ.js";
|
|
67
|
+
import "./chunk-FB2WHOEQ.js";
|
|
68
|
+
import "./chunk-U2HGPLZS.js";
|
|
69
|
+
import "./chunk-SU2VBK4L.js";
|
|
70
|
+
import "./chunk-5JSWBPZZ.js";
|
|
55
71
|
import {
|
|
56
|
-
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-33LCUH4H.js";
|
|
59
|
-
import "./chunk-XAKEUMEJ.js";
|
|
60
|
-
import "./chunk-BUPDIHML.js";
|
|
61
|
-
import "./chunk-DKEPS5LH.js";
|
|
62
|
-
import "./chunk-BUVJFRPY.js";
|
|
72
|
+
SKETCH_DIAGNOSTICS
|
|
73
|
+
} from "./chunk-XHVV4NVW.js";
|
|
63
74
|
import {
|
|
64
75
|
SWIMLANE_DIAGNOSTICS
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
76
|
+
} from "./chunk-WWN566I7.js";
|
|
77
|
+
import {
|
|
78
|
+
FAMILY_DIAGNOSTICS
|
|
79
|
+
} from "./chunk-O4VUFXIH.js";
|
|
80
|
+
import "./chunk-QQJUTGQH.js";
|
|
81
|
+
import "./chunk-S5GRONXL.js";
|
|
82
|
+
import "./chunk-2JJ2KNPI.js";
|
|
83
|
+
import "./chunk-O76UD6VJ.js";
|
|
84
|
+
import "./chunk-A3WQVFBS.js";
|
|
72
85
|
import {
|
|
73
86
|
PERT_DIAGNOSTICS
|
|
74
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-6M5PJFQG.js";
|
|
75
88
|
import "./chunk-L3UHP6TD.js";
|
|
76
89
|
import "./chunk-USZW2HHU.js";
|
|
77
90
|
import {
|
|
78
91
|
EVENT_LINE_DIAGNOSTICS
|
|
79
|
-
} from "./chunk-
|
|
80
|
-
import "./chunk-
|
|
92
|
+
} from "./chunk-7G2ER4CY.js";
|
|
93
|
+
import "./chunk-I7F2A35O.js";
|
|
81
94
|
import {
|
|
82
95
|
VERSION_CONTROL_DIAGNOSTICS
|
|
83
|
-
} from "./chunk-
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
96
|
+
} from "./chunk-6BFZKBGD.js";
|
|
97
|
+
import "./chunk-I4IFRCUB.js";
|
|
98
|
+
import "./chunk-URSQLCTR.js";
|
|
86
99
|
import "./chunk-IYULMRBE.js";
|
|
87
100
|
import {
|
|
88
101
|
getPalette,
|
|
@@ -90,23 +103,23 @@ import {
|
|
|
90
103
|
resolvePaletteOrFallback
|
|
91
104
|
} from "./chunk-R3XI2VC7.js";
|
|
92
105
|
import "./chunk-P6T66CCZ.js";
|
|
93
|
-
import "./chunk-
|
|
106
|
+
import "./chunk-T4BRO3Z6.js";
|
|
94
107
|
import "./chunk-C3Z4DX3V.js";
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-WCUHAQKB.js";
|
|
109
|
+
import "./chunk-GBE54KY6.js";
|
|
97
110
|
import {
|
|
98
111
|
GRAPH_DIAGNOSTICS
|
|
99
112
|
} from "./chunk-I46X5VUA.js";
|
|
100
|
-
import "./chunk-
|
|
113
|
+
import "./chunk-2C56LEML.js";
|
|
101
114
|
import "./chunk-NXMESY4J.js";
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-
|
|
115
|
+
import "./chunk-GL5UZ6NY.js";
|
|
116
|
+
import "./chunk-SCHXJTZL.js";
|
|
104
117
|
import "./chunk-FMDSF3OV.js";
|
|
105
118
|
import {
|
|
106
119
|
ARROW_DIAGNOSTIC_CODES
|
|
107
120
|
} from "./chunk-FFUN5D66.js";
|
|
108
121
|
import "./chunk-NOTA6TEI.js";
|
|
109
|
-
import "./chunk-
|
|
122
|
+
import "./chunk-OTAL43EH.js";
|
|
110
123
|
import "./chunk-TLVIHFRO.js";
|
|
111
124
|
import {
|
|
112
125
|
emit,
|
|
@@ -116,172 +129,6 @@ import {
|
|
|
116
129
|
} from "./chunk-CXK4DZH3.js";
|
|
117
130
|
import "./chunk-5WRI5ZAA.js";
|
|
118
131
|
|
|
119
|
-
// src/error-card.ts
|
|
120
|
-
var MONO_FAMILY = "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace";
|
|
121
|
-
var W = 660;
|
|
122
|
-
var PAD = 24;
|
|
123
|
-
var CONTENT_W = W - PAD * 2;
|
|
124
|
-
var MAX_ERRORS = 4;
|
|
125
|
-
var MONO_CH = 0.6;
|
|
126
|
-
var CODE_FS = 12.5;
|
|
127
|
-
function renderErrorCard(errors, source, palette, theme) {
|
|
128
|
-
const c = palette[theme === "dark" ? "dark" : "light"];
|
|
129
|
-
const isTransparent = theme === "transparent";
|
|
130
|
-
const card = c.surface;
|
|
131
|
-
const codeBg = c.bg;
|
|
132
|
-
const border = c.border;
|
|
133
|
-
const danger = c.destructive ?? c.colors.red;
|
|
134
|
-
const text = c.text;
|
|
135
|
-
const muted = c.textMuted;
|
|
136
|
-
const srcLines = source.split("\n");
|
|
137
|
-
const shown = errors.slice(0, MAX_ERRORS);
|
|
138
|
-
const overflow = errors.length - shown.length;
|
|
139
|
-
const parts = [];
|
|
140
|
-
let y = PAD + 8;
|
|
141
|
-
parts.push(frownMark(PAD + 14, y + 12, danger));
|
|
142
|
-
parts.push(
|
|
143
|
-
`<text x="${PAD + 38}" y="${y + 11}" fill="${text}" font-family="${FONT_FAMILY}" font-size="16" font-weight="700">Couldn't render this diagram</text>`,
|
|
144
|
-
`<text x="${W - PAD}" y="${y + 10}" text-anchor="end" fill="${muted}" font-family="${FONT_FAMILY}" font-size="12" font-weight="600" letter-spacing="0.5">dgmo</text>`
|
|
145
|
-
);
|
|
146
|
-
y += 24;
|
|
147
|
-
const errLabel = errors.length === 1 ? "1 error" : `${errors.length} errors`;
|
|
148
|
-
parts.push(
|
|
149
|
-
`<text x="${PAD + 38}" y="${y + 4}" fill="${muted}" font-family="${FONT_FAMILY}" font-size="12.5">${errLabel} \u2014 fix the lines below and re-render</text>`
|
|
150
|
-
);
|
|
151
|
-
y += 22;
|
|
152
|
-
parts.push(
|
|
153
|
-
`<line x1="${PAD}" y1="${y}" x2="${W - PAD}" y2="${y}" stroke="${border}" stroke-width="1"/>`
|
|
154
|
-
);
|
|
155
|
-
y += 24;
|
|
156
|
-
for (const e of shown) {
|
|
157
|
-
const hasLine = e.line > 0;
|
|
158
|
-
let msgX = PAD;
|
|
159
|
-
if (hasLine) {
|
|
160
|
-
const label = e.column ? `Line ${e.line}:${e.column}` : `Line ${e.line}`;
|
|
161
|
-
const badgeW = 14 + label.length * 7;
|
|
162
|
-
parts.push(
|
|
163
|
-
`<rect x="${PAD}" y="${y - 13}" width="${badgeW}" height="19" rx="4" fill="${danger}"/>`,
|
|
164
|
-
`<text x="${PAD + badgeW / 2}" y="${y + 1}" text-anchor="middle" fill="${c.bg}" font-family="${FONT_FAMILY}" font-size="11.5" font-weight="700">${escapeXml(label)}</text>`
|
|
165
|
-
);
|
|
166
|
-
msgX = PAD + badgeW + 12;
|
|
167
|
-
}
|
|
168
|
-
const lines = wrapMessage(e.message, CONTENT_W - (msgX - PAD), CONTENT_W);
|
|
169
|
-
lines.forEach((line, i) => {
|
|
170
|
-
parts.push(
|
|
171
|
-
`<text x="${i === 0 ? msgX : PAD}" y="${y + 1}" fill="${text}" font-family="${FONT_FAMILY}" font-size="13">${escapeXml(line)}</text>`
|
|
172
|
-
);
|
|
173
|
-
if (i < lines.length - 1) y += 18;
|
|
174
|
-
});
|
|
175
|
-
y += 24;
|
|
176
|
-
if (hasLine) {
|
|
177
|
-
const CTX = 2;
|
|
178
|
-
const first = Math.max(1, e.line - CTX);
|
|
179
|
-
const last = Math.min(srcLines.length, e.line + CTX);
|
|
180
|
-
const rowH = 18;
|
|
181
|
-
const hasCaret = e.column !== void 0 && e.column > 0;
|
|
182
|
-
const gutterW = `${last}`.length * CODE_FS * MONO_CH + 16;
|
|
183
|
-
const codeX = PAD + gutterW;
|
|
184
|
-
const codeMaxW = CONTENT_W - gutterW - 12;
|
|
185
|
-
const topY = y - 14;
|
|
186
|
-
const rowCount = last - first + 1;
|
|
187
|
-
const blockH = rowCount * rowH + (hasCaret ? 14 : 0) + 10;
|
|
188
|
-
const rowParts = [];
|
|
189
|
-
let ry = y + 3;
|
|
190
|
-
for (let n = first; n <= last; n++) {
|
|
191
|
-
const raw = (srcLines[n - 1] ?? "").replace(/\t/g, " ");
|
|
192
|
-
const codeText = truncateText(raw, CODE_FS, codeMaxW);
|
|
193
|
-
const isBad = n === e.line;
|
|
194
|
-
if (isBad) {
|
|
195
|
-
rowParts.push(
|
|
196
|
-
`<rect x="${PAD + 1}" y="${ry - 13}" width="${CONTENT_W - 2}" height="${rowH}" fill="${danger}" fill-opacity="0.16"/>`
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
rowParts.push(
|
|
200
|
-
`<text x="${PAD + 8}" y="${ry + 1}" fill="${isBad ? danger : muted}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="${isBad ? 700 : 400}">${escapeXml(`${n}`)}</text>`,
|
|
201
|
-
`<text x="${codeX}" y="${ry + 1}" fill="${text}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" xml:space="preserve">${escapeXml(codeText)}</text>`
|
|
202
|
-
);
|
|
203
|
-
if (isBad && hasCaret) {
|
|
204
|
-
const caretX = codeX + (e.column - 1) * CODE_FS * MONO_CH;
|
|
205
|
-
rowParts.push(
|
|
206
|
-
`<text x="${caretX}" y="${ry + 15}" fill="${danger}" font-family="${MONO_FAMILY}" font-size="${CODE_FS}" font-weight="700">^</text>`
|
|
207
|
-
);
|
|
208
|
-
ry += 14;
|
|
209
|
-
}
|
|
210
|
-
ry += rowH;
|
|
211
|
-
}
|
|
212
|
-
parts.push(
|
|
213
|
-
`<rect x="${PAD}" y="${topY}" width="${CONTENT_W}" height="${blockH}" rx="5" fill="${codeBg}" stroke="${border}" stroke-width="1"/>`,
|
|
214
|
-
`<line x1="${codeX - 8}" y1="${topY}" x2="${codeX - 8}" y2="${topY + blockH}" stroke="${border}" stroke-width="1"/>`,
|
|
215
|
-
rowParts.join("")
|
|
216
|
-
);
|
|
217
|
-
y = topY + blockH + 10;
|
|
218
|
-
}
|
|
219
|
-
y += 14;
|
|
220
|
-
}
|
|
221
|
-
if (overflow > 0) {
|
|
222
|
-
parts.push(
|
|
223
|
-
`<text x="${PAD}" y="${y}" fill="${muted}" font-family="${FONT_FAMILY}" font-size="12.5" font-style="italic">+ ${overflow} more error${overflow === 1 ? "" : "s"}</text>`
|
|
224
|
-
);
|
|
225
|
-
y += 22;
|
|
226
|
-
}
|
|
227
|
-
y += 2;
|
|
228
|
-
parts.push(
|
|
229
|
-
`<line x1="${PAD}" y1="${y}" x2="${W - PAD}" y2="${y}" stroke="${border}" stroke-width="1"/>`
|
|
230
|
-
);
|
|
231
|
-
y += 24;
|
|
232
|
-
const encoded = encodeDiagramUrl(source);
|
|
233
|
-
const editUrl = "url" in encoded && encoded.url ? encoded.url : "https://online.diagrammo.app";
|
|
234
|
-
const iconSize = 18;
|
|
235
|
-
const linkColor = c.colors.blue ?? c.text;
|
|
236
|
-
parts.push(
|
|
237
|
-
`<a href="${escapeXml(editUrl)}" target="_blank" rel="noopener noreferrer">` + diagrammoIcon(PAD, y - 14, iconSize) + `<text x="${PAD + iconSize + 8}" y="${y}" fill="${linkColor}" font-family="${FONT_FAMILY}" font-size="12.5" font-weight="600" text-decoration="underline">Edit & fix this diagram at online.diagrammo.app \u2197</text></a>`
|
|
238
|
-
);
|
|
239
|
-
y += 8;
|
|
240
|
-
const height = Math.round(y + PAD - 14);
|
|
241
|
-
const pageBg = isTransparent ? "" : `<rect width="100%" height="100%" fill="${c.bg}"/>`;
|
|
242
|
-
return [
|
|
243
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${height}" viewBox="0 0 ${W} ${height}" font-family="${FONT_FAMILY}">`,
|
|
244
|
-
pageBg,
|
|
245
|
-
`<rect x="0.5" y="0.5" width="${W - 1}" height="${height - 1}" rx="10" fill="${card}" stroke="${border}" stroke-width="1"/>`,
|
|
246
|
-
parts.join(""),
|
|
247
|
-
`</svg>`
|
|
248
|
-
].join("");
|
|
249
|
-
}
|
|
250
|
-
function wrapMessage(message, firstWidth, fullWidth) {
|
|
251
|
-
const words = message.split(/\s+/).filter(Boolean);
|
|
252
|
-
if (words.length === 0) return [""];
|
|
253
|
-
const lines = [];
|
|
254
|
-
let cur = "";
|
|
255
|
-
for (const word of words) {
|
|
256
|
-
const limit = lines.length === 0 ? firstWidth : fullWidth;
|
|
257
|
-
const test = cur ? `${cur} ${word}` : word;
|
|
258
|
-
if (measureText(test, 13) <= limit || !cur) {
|
|
259
|
-
cur = test;
|
|
260
|
-
} else {
|
|
261
|
-
lines.push(cur);
|
|
262
|
-
cur = word;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (cur) lines.push(cur);
|
|
266
|
-
return lines;
|
|
267
|
-
}
|
|
268
|
-
function frownMark(cx, cy, color) {
|
|
269
|
-
const r = 12;
|
|
270
|
-
return [
|
|
271
|
-
`<circle cx="${cx}" cy="${cy}" r="${r}" fill="none" stroke="${color}" stroke-width="2"/>`,
|
|
272
|
-
`<circle cx="${cx - 4.5}" cy="${cy - 3}" r="1.6" fill="${color}"/>`,
|
|
273
|
-
`<circle cx="${cx + 4.5}" cy="${cy - 3}" r="1.6" fill="${color}"/>`,
|
|
274
|
-
`<path d="M ${cx - 5} ${cy + 6} Q ${cx} ${cy + 1} ${cx + 5} ${cy + 6}" fill="none" stroke="${color}" stroke-width="2" stroke-linecap="round"/>`
|
|
275
|
-
].join("");
|
|
276
|
-
}
|
|
277
|
-
function diagrammoIcon(x, y, size) {
|
|
278
|
-
const s = size / 100;
|
|
279
|
-
return `<g transform="translate(${x} ${y}) scale(${s})"><rect width="100" height="100" rx="18" fill="#1f2933"/><path d="M41 71 L41 63.51 A28 28 0 1 1 59 63.51 L59 71" fill="none" stroke="#c9a227" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/><rect x="36" y="43" width="7" height="9" rx="1.9" fill="#c0504d"/><rect x="45" y="37" width="7" height="15" rx="1.9" fill="#5b9357"/><rect x="54" y="30" width="7" height="22" rx="1.9" fill="#3b6ea5"/><rect x="36" y="75" width="28" height="4.6" rx="2.3" fill="#7d5ba6"/><rect x="36" y="82" width="28" height="4.6" rx="2.3" fill="#7d5ba6"/><rect x="36" y="89" width="28" height="4.6" rx="2.3" fill="#7d5ba6"/></g>`;
|
|
280
|
-
}
|
|
281
|
-
function escapeXml(s) {
|
|
282
|
-
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
132
|
// src/dimensions.ts
|
|
286
133
|
function getMinDimensions(content) {
|
|
287
134
|
const { chartType } = parseDgmo(content);
|
|
@@ -300,10 +147,12 @@ function ensureStyle(svg, muted) {
|
|
|
300
147
|
const style = doc.createElementNS(NS, "style");
|
|
301
148
|
style.id = STYLE_ID;
|
|
302
149
|
style.textContent = `
|
|
303
|
-
.dgmo-series,.dgmo-datum,.dgmo-tick{transition:opacity .12s ease}
|
|
304
|
-
.dgmo-series.dgmo-dim,.dgmo-datum.dgmo-dim{opacity:.18}
|
|
150
|
+
.dgmo-series,.dgmo-datum,.dgmo-tick,.dgmo-ptlabel{transition:opacity .12s ease}
|
|
151
|
+
.dgmo-series.dgmo-dim,.dgmo-datum.dgmo-dim,.dgmo-ptlabel.dgmo-dim{opacity:.18}
|
|
305
152
|
.dgmo-tick.dgmo-faded{opacity:.22}
|
|
306
153
|
.dgmo-datum{cursor:pointer}
|
|
154
|
+
.dgmo-axis-label{cursor:pointer}
|
|
155
|
+
.dgmo-axis-label.dgmo-axis-active{font-weight:700}
|
|
307
156
|
.dgmo-axline{stroke:${muted};stroke-width:1;stroke-dasharray:4 4;pointer-events:none}
|
|
308
157
|
`;
|
|
309
158
|
svg.insertBefore(style, svg.firstChild);
|
|
@@ -390,8 +239,36 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
390
239
|
}
|
|
391
240
|
getOverlay().appendChild(t);
|
|
392
241
|
};
|
|
242
|
+
const pointValue = (cx, numY, lblY, label, value, anchor = "middle", color) => {
|
|
243
|
+
const fill = color ?? text;
|
|
244
|
+
const mk = (content, y, font, weight, opacity) => {
|
|
245
|
+
const t = doc.createElementNS(NS, "text");
|
|
246
|
+
t.setAttribute("class", "dgmo-pointval");
|
|
247
|
+
t.setAttribute("font-size", String(font));
|
|
248
|
+
t.setAttribute("font-weight", String(weight));
|
|
249
|
+
t.setAttribute("font-family", "Inter, system-ui, sans-serif");
|
|
250
|
+
t.setAttribute("fill", fill);
|
|
251
|
+
t.setAttribute("fill-opacity", String(opacity));
|
|
252
|
+
t.setAttribute("text-anchor", anchor);
|
|
253
|
+
t.setAttribute("x", String(cx));
|
|
254
|
+
t.setAttribute("y", String(y));
|
|
255
|
+
t.textContent = content;
|
|
256
|
+
getOverlay().appendChild(t);
|
|
257
|
+
};
|
|
258
|
+
mk(value, numY, 20, 700, 0.75);
|
|
259
|
+
mk(label, lblY, 11, 500, 0.85);
|
|
260
|
+
};
|
|
261
|
+
const ptLabels = Array.from(
|
|
262
|
+
svg.querySelectorAll(".dgmo-ptlabel")
|
|
263
|
+
);
|
|
393
264
|
const dimDatumsExcept = (el) => {
|
|
394
265
|
for (const d of datums) d.classList.toggle("dgmo-dim", d !== el);
|
|
266
|
+
const line = el?.getAttribute("data-line-number");
|
|
267
|
+
for (const l of ptLabels)
|
|
268
|
+
l.classList.toggle(
|
|
269
|
+
"dgmo-dim",
|
|
270
|
+
line == null || l.getAttribute("data-line-number") !== line
|
|
271
|
+
);
|
|
395
272
|
};
|
|
396
273
|
const dimByKey = (el) => {
|
|
397
274
|
const key = el.getAttribute("data-emph-key");
|
|
@@ -404,7 +281,42 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
404
281
|
const clearDim = () => {
|
|
405
282
|
for (const d of datums) d.classList.remove("dgmo-dim");
|
|
406
283
|
for (const g of seriesGroups) g.classList.remove("dgmo-dim");
|
|
284
|
+
for (const l of ptLabels) l.classList.remove("dgmo-dim");
|
|
285
|
+
reapplyAxisPin();
|
|
407
286
|
};
|
|
287
|
+
let axisPin = null;
|
|
288
|
+
const axisLabels = Array.from(
|
|
289
|
+
svg.querySelectorAll("[data-filter-attr]")
|
|
290
|
+
);
|
|
291
|
+
const applyAxisFilter = (attr, value) => {
|
|
292
|
+
for (const d of datums)
|
|
293
|
+
d.classList.toggle("dgmo-dim", d.getAttribute(attr) !== value);
|
|
294
|
+
};
|
|
295
|
+
function reapplyAxisPin() {
|
|
296
|
+
if (axisPin) applyAxisFilter(axisPin.attr, axisPin.value);
|
|
297
|
+
}
|
|
298
|
+
const setAxisPin = (next) => {
|
|
299
|
+
if (axisPin) axisPin.el.classList.remove("dgmo-axis-active");
|
|
300
|
+
axisPin = next;
|
|
301
|
+
if (axisPin) axisPin.el.classList.add("dgmo-axis-active");
|
|
302
|
+
if (!axisPin) for (const d of datums) d.classList.remove("dgmo-dim");
|
|
303
|
+
reapplyAxisPin();
|
|
304
|
+
};
|
|
305
|
+
const axisLabelListeners = [];
|
|
306
|
+
for (const el of axisLabels) {
|
|
307
|
+
const attr = el.getAttribute("data-filter-attr");
|
|
308
|
+
const value = el.getAttribute("data-filter-value");
|
|
309
|
+
if (!attr || value == null) continue;
|
|
310
|
+
const onEnter = () => applyAxisFilter(attr, value);
|
|
311
|
+
const onExit = () => {
|
|
312
|
+
for (const d of datums) d.classList.remove("dgmo-dim");
|
|
313
|
+
reapplyAxisPin();
|
|
314
|
+
};
|
|
315
|
+
el.addEventListener("mouseenter", onEnter);
|
|
316
|
+
el.addEventListener("mouseleave", onExit);
|
|
317
|
+
axisLabelListeners.push([el, "mouseenter", onEnter]);
|
|
318
|
+
axisLabelListeners.push([el, "mouseleave", onExit]);
|
|
319
|
+
}
|
|
408
320
|
const crosshairOn = !!plot && circles.length > 0;
|
|
409
321
|
let activePt = null;
|
|
410
322
|
const restorePt = () => {
|
|
@@ -493,6 +405,29 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
493
405
|
dottedLine(plot.left, cy, cx, cy);
|
|
494
406
|
axisValue(plot.left, cy, axY, "y");
|
|
495
407
|
}
|
|
408
|
+
const sz = el.getAttribute("data-size");
|
|
409
|
+
if (sz !== null) {
|
|
410
|
+
const label = el.getAttribute("data-size-label") ?? "size";
|
|
411
|
+
const vx = el.getAttribute("data-sizeval-x");
|
|
412
|
+
const vy = el.getAttribute("data-sizeval-y");
|
|
413
|
+
const vly = el.getAttribute("data-sizeval-ly");
|
|
414
|
+
const va = el.getAttribute("data-sizeval-anchor");
|
|
415
|
+
const color = el.getAttribute("data-color") ?? void 0;
|
|
416
|
+
if (vx !== null && vy !== null && vly !== null) {
|
|
417
|
+
pointValue(
|
|
418
|
+
parseFloat(vx),
|
|
419
|
+
parseFloat(vy),
|
|
420
|
+
parseFloat(vly),
|
|
421
|
+
label,
|
|
422
|
+
sz,
|
|
423
|
+
va === "start" || va === "end" ? va : "middle",
|
|
424
|
+
color
|
|
425
|
+
);
|
|
426
|
+
} else {
|
|
427
|
+
const r = parseFloat(el.getAttribute("r") ?? "0");
|
|
428
|
+
pointValue(cx, cy + r + 22, cy + r + 37, label, sz, "middle", color);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
496
431
|
fadeTicks();
|
|
497
432
|
dimDatumsExcept(el);
|
|
498
433
|
} else {
|
|
@@ -502,9 +437,14 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
502
437
|
};
|
|
503
438
|
let crosshairActive = false;
|
|
504
439
|
const onSvgMove = (e) => {
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
)
|
|
440
|
+
const t = e.target;
|
|
441
|
+
let el = t.closest?.(".dgmo-datum");
|
|
442
|
+
if (!el) {
|
|
443
|
+
const lbl = t.closest?.(".dgmo-ptlabel");
|
|
444
|
+
const ln = lbl?.getAttribute("data-line-number");
|
|
445
|
+
if (ln != null)
|
|
446
|
+
el = datums.find((d) => d.getAttribute("data-line-number") === ln) ?? null;
|
|
447
|
+
}
|
|
508
448
|
if (el) {
|
|
509
449
|
if (el !== curDatum) {
|
|
510
450
|
clearDatum();
|
|
@@ -534,8 +474,24 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
534
474
|
}
|
|
535
475
|
};
|
|
536
476
|
const onClick = (e) => {
|
|
477
|
+
const label = e.target.closest?.(
|
|
478
|
+
"[data-filter-attr]"
|
|
479
|
+
);
|
|
480
|
+
if (label && axisLabels.includes(label)) {
|
|
481
|
+
const attr = label.getAttribute("data-filter-attr");
|
|
482
|
+
const value = label.getAttribute("data-filter-value");
|
|
483
|
+
if (attr && value != null) {
|
|
484
|
+
const same = axisPin?.attr === attr && axisPin.value === value;
|
|
485
|
+
setAxisPin(same ? null : { attr, value, el: label });
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
537
489
|
const line = walkUpForLine(e.target, svg);
|
|
538
|
-
if (line !== null && opts.onNavigate)
|
|
490
|
+
if (line !== null && opts.onNavigate) {
|
|
491
|
+
opts.onNavigate(line);
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
if (axisPin) setAxisPin(null);
|
|
539
495
|
};
|
|
540
496
|
let pinned = [];
|
|
541
497
|
const clearHighlight = () => {
|
|
@@ -543,6 +499,7 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
543
499
|
pinned = [];
|
|
544
500
|
for (const d of datums) d.classList.remove("dgmo-dim");
|
|
545
501
|
for (const g of seriesGroups) g.classList.remove("dgmo-dim");
|
|
502
|
+
reapplyAxisPin();
|
|
546
503
|
};
|
|
547
504
|
const highlightLine = (line) => {
|
|
548
505
|
if (curDatum || crosshairActive) return;
|
|
@@ -586,7 +543,10 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
586
543
|
}
|
|
587
544
|
};
|
|
588
545
|
const legendListeners = [];
|
|
589
|
-
|
|
546
|
+
const datumsHaveSeries = datums.some(
|
|
547
|
+
(d) => d.getAttribute("data-series-name") != null
|
|
548
|
+
);
|
|
549
|
+
if (legendEntries.length > 0 && (seriesGroups.length > 1 || datumsHaveSeries)) {
|
|
590
550
|
for (const entry of legendEntries) {
|
|
591
551
|
const name = entry.getAttribute("data-series-name");
|
|
592
552
|
if (name == null) continue;
|
|
@@ -640,8 +600,11 @@ function attachDataChartInteractions(svg, opts = {}) {
|
|
|
640
600
|
svg.removeEventListener("click", onClick);
|
|
641
601
|
for (const [el, ev, fn] of legendListeners)
|
|
642
602
|
el.removeEventListener(ev, fn);
|
|
603
|
+
for (const [el, ev, fn] of axisLabelListeners)
|
|
604
|
+
el.removeEventListener(ev, fn);
|
|
643
605
|
if (overlay) overlay.remove();
|
|
644
606
|
restorePt();
|
|
607
|
+
setAxisPin(null);
|
|
645
608
|
clearHighlight();
|
|
646
609
|
clearDim();
|
|
647
610
|
},
|
|
@@ -832,12 +795,15 @@ var REGISTRY = [
|
|
|
832
795
|
...RACI_DIAGNOSTICS,
|
|
833
796
|
...TREEMAP_DIAGNOSTICS,
|
|
834
797
|
...EVENT_LINE_DIAGNOSTICS,
|
|
798
|
+
...BODY_DIAGNOSTICS,
|
|
835
799
|
...VERSION_CONTROL_DIAGNOSTICS,
|
|
836
800
|
...ARROW_DIAGNOSTICS,
|
|
837
801
|
...MAP_DIAGNOSTICS,
|
|
838
802
|
...PERT_DIAGNOSTICS,
|
|
839
803
|
...GRAPH_DIAGNOSTICS,
|
|
840
|
-
...COLOR_DIAGNOSTICS
|
|
804
|
+
...COLOR_DIAGNOSTICS,
|
|
805
|
+
...SKETCH_DIAGNOSTICS,
|
|
806
|
+
...FAMILY_DIAGNOSTICS
|
|
841
807
|
];
|
|
842
808
|
function listDiagnosticCodes() {
|
|
843
809
|
return [...REGISTRY].sort((a, b) => a.code.localeCompare(b.code));
|
|
@@ -848,7 +814,7 @@ function getDiagnosticSpec(code) {
|
|
|
848
814
|
|
|
849
815
|
// src/index.ts
|
|
850
816
|
async function render2(text, options) {
|
|
851
|
-
const palette = options?.palette ?? palettes.slate;
|
|
817
|
+
const palette = typeof options?.palette === "string" ? getPalette(options.palette) : options?.palette ?? palettes.slate;
|
|
852
818
|
const onError = options?.onError ?? "svg";
|
|
853
819
|
const result = await render(text, {
|
|
854
820
|
...options?.theme !== void 0 && { theme: options.theme },
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
NODE_WIDTH,
|
|
4
4
|
computeNodeSize,
|
|
5
5
|
layoutBoxesAndLines
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-TWQUYVP3.js";
|
|
7
|
+
import "./chunk-O7WP4ZD4.js";
|
|
8
8
|
import "./chunk-6EK55ART.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-BCYVE3N5.js";
|
|
10
10
|
import "./chunk-5DH3KYFH.js";
|
|
11
11
|
import "./chunk-BMR4CIEO.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-5LWQH6QV.js";
|
|
13
13
|
import "./chunk-FMDSF3OV.js";
|
|
14
14
|
import "./chunk-NOTA6TEI.js";
|
|
15
15
|
import "./chunk-CXK4DZH3.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
computeNodeSize,
|
|
21
21
|
layoutBoxesAndLines
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=layout-
|
|
23
|
+
//# sourceMappingURL=layout-34CLNICW.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCQ5VPUF.js";
|
|
4
4
|
import "./chunk-6EK55ART.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-BCYVE3N5.js";
|
|
6
6
|
import "./chunk-5DH3KYFH.js";
|
|
7
7
|
import "./chunk-BMR4CIEO.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5LWQH6QV.js";
|
|
9
9
|
import "./chunk-NXMESY4J.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-SCHXJTZL.js";
|
|
11
11
|
import "./chunk-FMDSF3OV.js";
|
|
12
12
|
import "./chunk-NOTA6TEI.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OTAL43EH.js";
|
|
14
14
|
import "./chunk-TLVIHFRO.js";
|
|
15
15
|
import "./chunk-CXK4DZH3.js";
|
|
16
16
|
import "./chunk-5WRI5ZAA.js";
|
|
17
17
|
export {
|
|
18
18
|
layoutGraph
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=layout-
|
|
20
|
+
//# sourceMappingURL=layout-5BG6DFCU.js.map
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
fixEdgeWaypoints,
|
|
3
3
|
layoutInfra,
|
|
4
4
|
separateGroups
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-C63UWAKM.js";
|
|
6
|
+
import "./chunk-5LWQH6QV.js";
|
|
7
7
|
import "./chunk-5WRI5ZAA.js";
|
|
8
8
|
export {
|
|
9
9
|
fixEdgeWaypoints,
|
|
10
10
|
layoutInfra,
|
|
11
11
|
separateGroups
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=layout-
|
|
13
|
+
//# sourceMappingURL=layout-7H4H46CS.js.map
|