@diagrammo/dgmo 0.46.0 → 0.48.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/dist/advanced.d.ts +3 -855
- package/dist/advanced.js +541 -70107
- package/dist/analyzer-UYKBXAKR.js +15 -0
- package/dist/auto.js +1 -1
- package/dist/auto.mjs +1 -1
- package/dist/block.js +83 -69417
- package/dist/calculator-LDYQCDDY.js +11 -0
- package/dist/charts-d3-QOZHKTCT.js +25 -0
- package/dist/chunk-2DXMZRWJ.js +800 -0
- package/dist/chunk-2LACINWN.js +786 -0
- package/dist/chunk-33LCUH4H.js +893 -0
- package/dist/chunk-3CIOJ5YJ.js +35 -0
- package/dist/chunk-3HDBAXF5.js +86 -0
- package/dist/chunk-3JLKYGBQ.js +290 -0
- package/dist/chunk-3MQQNXPD.js +415 -0
- package/dist/chunk-3R5POCTZ.js +967 -0
- package/dist/chunk-3SMGIJDD.js +112 -0
- package/dist/chunk-44CM72SQ.js +409 -0
- package/dist/chunk-4GRI7MEB.js +1604 -0
- package/dist/chunk-4OHACBGX.js +606 -0
- package/dist/chunk-5DH3KYFH.js +21 -0
- package/dist/chunk-5MLYVTYM.js +76 -0
- package/dist/chunk-5QXL4NYS.js +553 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-6EK55ART.js +117 -0
- package/dist/chunk-6FZYCKXB.js +2065 -0
- package/dist/chunk-6HO5ZTXK.js +277 -0
- package/dist/chunk-6KFWC4CO.js +7 -0
- package/dist/chunk-6MTWIQVO.js +121 -0
- package/dist/chunk-6NYWYNBI.js +329 -0
- package/dist/chunk-6SM5NJQH.js +620 -0
- package/dist/chunk-725LDASD.js +422 -0
- package/dist/chunk-76OWZ3BA.js +130 -0
- package/{src/block/parser.ts → dist/chunk-7JEGTRLD.js} +100 -189
- package/dist/chunk-A44USUV7.js +923 -0
- package/dist/chunk-A4GOY3PE.js +25 -0
- package/dist/chunk-A4VFQH5G.js +251 -0
- package/dist/chunk-AELOBFW5.js +375 -0
- package/dist/chunk-AN2MOO5T.js +522 -0
- package/dist/chunk-BMR4CIEO.js +41 -0
- package/dist/chunk-BS7SV7C3.js +51 -0
- package/dist/chunk-BUPDIHML.js +613 -0
- package/dist/chunk-BUVJFRPY.js +887 -0
- package/dist/chunk-C3Z4DX3V.js +112 -0
- package/dist/chunk-CI2G3OEB.js +1818 -0
- package/dist/chunk-CKNVO24D.js +54 -0
- package/dist/chunk-CUVHQHZ7.js +391 -0
- package/dist/chunk-CXK4DZH3.js +114 -0
- package/dist/{editor.cjs → chunk-DKEPS5LH.js} +14 -225
- package/dist/chunk-DU7W62N5.js +487 -0
- package/dist/chunk-DZAQBW35.js +751 -0
- package/dist/chunk-EB6FPQUP.js +316 -0
- package/dist/chunk-EMS2SK26.js +376 -0
- package/dist/chunk-ERLBPDGU.js +510 -0
- package/dist/chunk-EVCVDTXE.js +732 -0
- package/dist/chunk-FCIIHT24.js +384 -0
- package/dist/chunk-FFUN5D66.js +97 -0
- package/dist/chunk-FITOLXSX.js +714 -0
- package/dist/chunk-FMDSF3OV.js +68 -0
- package/dist/chunk-FNB3PNGF.js +410 -0
- package/dist/chunk-G2H74XJZ.js +2104 -0
- package/dist/chunk-GMR5MFHJ.js +339 -0
- package/dist/chunk-H6PI3KJT.js +305 -0
- package/dist/chunk-I46X5VUA.js +59 -0
- package/dist/chunk-I5IGB56C.js +255 -0
- package/dist/chunk-IH6ZMVQ5.js +3950 -0
- package/dist/chunk-IJZFN3HM.js +463 -0
- package/dist/chunk-IPWPWM6R.js +3079 -0
- package/dist/chunk-IYULMRBE.js +23 -0
- package/dist/chunk-IZMRON6C.js +167 -0
- package/dist/chunk-J5FIXQRT.js +813 -0
- package/dist/chunk-JED6ZDEE.js +73 -0
- package/dist/chunk-JEUJOX5X.js +136 -0
- package/dist/chunk-JM4LEPY3.js +436 -0
- package/dist/chunk-L3UHP6TD.js +101 -0
- package/dist/chunk-L66GEFB6.js +524 -0
- package/dist/chunk-LIOHW36Z.js +469 -0
- package/dist/chunk-LP7EC4MI.js +16 -0
- package/dist/chunk-MITI6NOL.js +548 -0
- package/dist/chunk-MO5YHHMQ.js +168 -0
- package/dist/chunk-MZSBFAPJ.js +885 -0
- package/dist/chunk-NNAAJVBU.js +9 -0
- package/dist/chunk-NOTA6TEI.js +47 -0
- package/dist/chunk-NURGB5Z4.js +335 -0
- package/dist/chunk-NX4EQS3U.js +1062 -0
- package/dist/chunk-NXMESY4J.js +1 -0
- package/dist/chunk-OJR3MQYV.js +1458 -0
- package/dist/chunk-OURHMODR.js +454 -0
- package/dist/chunk-P235SVAH.js +1057 -0
- package/dist/chunk-P4RH4OSP.js +1038 -0
- package/dist/chunk-P6T66CCZ.js +226 -0
- package/dist/chunk-PBAHEPLQ.js +223 -0
- package/dist/chunk-PBHE5UG6.js +1530 -0
- package/dist/chunk-PDKUANDZ.js +35 -0
- package/dist/chunk-PWIHZ6NJ.js +296 -0
- package/{src/c4/layout.ts → dist/chunk-QEBUY5NY.js} +384 -1140
- package/dist/chunk-QLCCJEJI.js +253 -0
- package/dist/chunk-QOOUC2J5.js +52 -0
- package/dist/chunk-QYTPPDAO.js +402 -0
- package/dist/chunk-R3XI2VC7.js +801 -0
- package/dist/chunk-RCERWOJR.js +154 -0
- package/dist/chunk-RJE5JTVK.js +362 -0
- package/dist/chunk-RTLBSQ3G.js +1155 -0
- package/dist/chunk-RUNNI6VE.js +448 -0
- package/dist/chunk-RVMRZAPB.js +354 -0
- package/dist/chunk-RYEGFMUO.js +955 -0
- package/dist/chunk-RZCF2VVM.js +528 -0
- package/dist/chunk-SML67VPV.js +1025 -0
- package/dist/chunk-SQ7IY53Q.js +44 -0
- package/dist/chunk-SQAG3UXH.js +161 -0
- package/dist/chunk-SRTU6HMQ.js +1851 -0
- package/dist/chunk-T2OE3YQB.js +550 -0
- package/dist/chunk-T3UBLACL.js +299 -0
- package/dist/chunk-TLVIHFRO.js +296 -0
- package/dist/chunk-TYS6CSS5.js +52 -0
- package/dist/chunk-U6EQI3U6.js +130 -0
- package/dist/chunk-UJ4FJLBF.js +86 -0
- package/dist/chunk-ULOEATBZ.js +347 -0
- package/dist/chunk-UNCCZ3NU.js +127 -0
- package/dist/chunk-USZW2HHU.js +197 -0
- package/dist/chunk-UWN33VNX.js +1610 -0
- package/dist/chunk-UZ7EZW3B.js +40 -0
- package/dist/chunk-VOKGH627.js +37 -0
- package/dist/chunk-WBRZJOEC.js +204 -0
- package/dist/chunk-WCSOJFU3.js +380 -0
- package/dist/chunk-WCT3NYCV.js +160 -0
- package/dist/chunk-WVAJFAIA.js +529 -0
- package/dist/chunk-X5LCYCL5.js +394 -0
- package/dist/chunk-XAKEUMEJ.js +1256 -0
- package/dist/chunk-Y2ZE3MSG.js +590 -0
- package/dist/chunk-Y3J7VR52.js +646 -0
- package/dist/chunk-Y5QGVTVC.js +33 -0
- package/dist/chunk-YAA6IID3.js +548 -0
- package/dist/chunk-YGJTDXVR.js +692 -0
- package/{src/utils/time-ticks.ts → dist/chunk-YRYKTYMQ.js} +45 -112
- package/dist/chunk-YYVTBZZC.js +61 -0
- package/dist/chunk-Z5CGSFJB.js +647 -0
- package/{src/gantt/calculator.ts → dist/chunk-Z72XRXD4.js} +236 -428
- package/dist/chunk-ZGR7ULFJ.js +978 -0
- package/dist/chunk-ZJEL4H2R.js +851 -0
- package/dist/chunk-ZO27FGJS.js +554 -0
- package/dist/collapse-CLPJD2RL.js +11 -0
- package/dist/collapse-SLINJQW6.js +9 -0
- package/dist/collapse-ZWUFFCK2.js +9 -0
- package/dist/compute-G55RG53N.js +8 -0
- package/dist/dgmo-router-DZCIDUO5.js +73 -0
- package/dist/dimensions-J3FHIMJ6.js +22 -0
- package/dist/element.js +1 -1
- package/dist/element.mjs +1 -1
- package/dist/flowchart-parser-ZNSKIBVR.js +21 -0
- package/dist/flowchart-renderer-ZAEOL4DX.js +35 -0
- package/dist/index.d.ts +3 -469
- package/dist/index.js +137 -69685
- package/dist/layout-46N4JJYK.js +17 -0
- package/dist/layout-5RA6QWR6.js +26 -0
- package/dist/layout-5T6RH5M6.js +14 -0
- package/dist/layout-7QXCNOVS.js +13 -0
- package/dist/layout-EE6GE46Y.js +17 -0
- package/dist/layout-G23F7LDH.js +9 -0
- package/dist/layout-HRBZPFCN.js +23 -0
- package/dist/layout-HWDSRX5E.js +20 -0
- package/dist/layout-HYZPWAK5.js +18 -0
- package/dist/layout-N76NR4ZO.js +19 -0
- package/dist/layout-OB3RI63S.js +14 -0
- package/dist/layout-S2QBYSK2.js +15 -0
- package/dist/layout-UM5F4DJB.js +15 -0
- package/dist/layout-search-OYV77HHS.js +1655 -0
- package/dist/load-data-EHDDZ5ZS.js +8 -0
- package/dist/palettes-PRJ2RI6D.js +56 -0
- package/dist/parser-2MFP2H2E.js +11 -0
- package/dist/parser-3STE62GB.js +21 -0
- package/dist/parser-4FL2CMDG.js +18 -0
- package/dist/parser-4OGOBJJ4.js +13 -0
- package/dist/parser-6BTRLKRZ.js +15 -0
- package/dist/parser-AQETEVRW.js +21 -0
- package/dist/parser-CFZD5IBL.js +12 -0
- package/dist/parser-FUSKFGZN.js +16 -0
- package/dist/parser-I6KXEYFK.js +13 -0
- package/dist/parser-IXSZZQHY.js +18 -0
- package/dist/parser-JAL2HD4I.js +13 -0
- package/dist/parser-KNSQSKQO.js +20 -0
- package/dist/parser-N5O4IHUN.js +13 -0
- package/dist/parser-NGU3ETO6.js +16 -0
- package/dist/parser-NRAI6O25.js +19 -0
- package/dist/parser-O5J4VBII.js +11 -0
- package/dist/parser-OV7NOBW6.js +21 -0
- package/dist/parser-PQ3POX45.js +23 -0
- package/dist/parser-TFZFBVWN.js +11 -0
- package/dist/parser-TRTHDFPP.js +18 -0
- package/dist/parser-VQP2UJ6W.js +11 -0
- package/dist/parser-XDVELHRK.js +13 -0
- package/dist/parser-XKRP7QKP.js +11 -0
- package/dist/parser-Y6WTBU76.js +14 -0
- package/dist/parser-ZSDPZYQP.js +12 -0
- package/dist/renderer-2XQQQ6QR.js +28 -0
- package/dist/renderer-5NDVNDAZ.js +26 -0
- package/dist/renderer-6EEZHMH4.js +26 -0
- package/dist/renderer-6W5462RB.js +43 -0
- package/dist/renderer-7MVLWWQD.js +22 -0
- package/dist/renderer-AWWAF6XD.js +33 -0
- package/dist/renderer-BYCNMBF7.js +34 -0
- package/dist/renderer-CLJHQPBJ.js +29 -0
- package/dist/renderer-GHPZMFU2.js +15 -0
- package/dist/renderer-JGBKUCZD.js +16 -0
- package/dist/renderer-KQB7UGDS.js +19 -0
- package/dist/renderer-PGX2TKVS.js +24 -0
- package/dist/renderer-QIWVHWZO.js +15 -0
- package/dist/renderer-RPOA5YPZ.js +35 -0
- package/dist/renderer-SMIBCRVB.js +24 -0
- package/dist/renderer-T7YKC5VP.js +28 -0
- package/dist/renderer-TOCOVLHS.js +37 -0
- package/dist/renderer-UWA5XS74.js +39 -0
- package/dist/renderer-VACVQYML.js +25 -0
- package/dist/renderer-W4M6QLIJ.js +37 -0
- package/dist/renderer-WZRREQ2P.js +23 -0
- package/dist/renderer-YY2OSF6E.js +27 -0
- package/dist/renderer-Z7I3W2PP.js +24 -0
- package/dist/renderer-ZGNTUWC4.js +22 -0
- package/dist/renderer-ZTR3DER3.js +19 -0
- package/dist/renderer-radial-C32GPJQ7.js +21 -0
- package/dist/resolver-NOAA7ID7.js +13 -0
- package/dist/state-collapse-HCGD6IVJ.js +8 -0
- package/dist/state-parser-Z2V23ATR.js +18 -0
- package/dist/state-renderer-RFYHSP4K.js +34 -0
- package/dist/themes-1-CuKpeH.d.ts +908 -0
- package/package.json +19 -70
- package/dist/advanced.cjs +0 -71648
- package/dist/advanced.d.cts +0 -6571
- package/dist/auto.cjs +0 -70648
- package/dist/auto.d.cts +0 -54
- package/dist/block.cjs +0 -70208
- package/dist/block.d.cts +0 -115
- package/dist/editor.d.cts +0 -26
- package/dist/element.cjs +0 -70530
- package/dist/element.d.cts +0 -62
- package/dist/highlight.cjs +0 -852
- package/dist/highlight.d.cts +0 -49
- package/dist/index.cjs +0 -70491
- package/dist/index.d.cts +0 -626
- package/dist/pert.cjs +0 -325
- package/dist/pert.d.cts +0 -559
- package/src/advanced.ts +0 -873
- package/src/arc/parser.ts +0 -15
- package/src/arc/renderer.ts +0 -633
- package/src/auto/index.ts +0 -621
- package/src/auto/shared.ts +0 -370
- package/src/auto/styles.ts +0 -73
- package/src/block/layout.ts +0 -198
- package/src/block/renderer.ts +0 -484
- package/src/block/types.ts +0 -67
- package/src/boxes-and-lines/collapse.ts +0 -96
- package/src/boxes-and-lines/focus.ts +0 -257
- package/src/boxes-and-lines/label-placement.ts +0 -339
- package/src/boxes-and-lines/layout-grouped.ts +0 -912
- package/src/boxes-and-lines/layout-layered.ts +0 -722
- package/src/boxes-and-lines/layout-search.ts +0 -1678
- package/src/boxes-and-lines/layout.ts +0 -398
- package/src/boxes-and-lines/parser.ts +0 -1181
- package/src/boxes-and-lines/renderer.ts +0 -1465
- package/src/boxes-and-lines/types.ts +0 -66
- package/src/c4/parser.ts +0 -1158
- package/src/c4/renderer.ts +0 -2008
- package/src/c4/types.ts +0 -89
- package/src/chart-type-registry.ts +0 -529
- package/src/chart-types.ts +0 -225
- package/src/chart.ts +0 -685
- package/src/charts-d3/bar.ts +0 -338
- package/src/charts-d3/chord.ts +0 -140
- package/src/charts-d3/function.ts +0 -147
- package/src/charts-d3/funnel.ts +0 -104
- package/src/charts-d3/heatmap.ts +0 -145
- package/src/charts-d3/index.ts +0 -337
- package/src/charts-d3/interactions.ts +0 -477
- package/src/charts-d3/line.ts +0 -344
- package/src/charts-d3/mount.ts +0 -151
- package/src/charts-d3/pie.ts +0 -117
- package/src/charts-d3/polar.ts +0 -89
- package/src/charts-d3/radar.ts +0 -0
- package/src/charts-d3/sankey.ts +0 -0
- package/src/charts-d3/scatter.ts +0 -185
- package/src/charts-d3/shared.ts +0 -208
- package/src/class/layout.ts +0 -326
- package/src/class/parser.ts +0 -635
- package/src/class/renderer.ts +0 -793
- package/src/class/types.ts +0 -58
- package/src/cli-banner.ts +0 -106
- package/src/cli.ts +0 -1080
- package/src/colors-diagnostics.ts +0 -35
- package/src/colors.ts +0 -379
- package/src/completion-types.ts +0 -27
- package/src/completion.ts +0 -2668
- package/src/cycle/layout.ts +0 -1026
- package/src/cycle/parser.ts +0 -387
- package/src/cycle/renderer.ts +0 -653
- package/src/cycle/types.ts +0 -101
- package/src/d3.ts +0 -1434
- package/src/data-chart-parser.ts +0 -1007
- package/src/dgmo-router.ts +0 -296
- package/src/diagnostics-registry.ts +0 -108
- package/src/diagnostics.ts +0 -0
- package/src/dimensions.ts +0 -20
- package/src/directives-registry.ts +0 -396
- package/src/editor/dgmo.grammar +0 -76
- package/src/editor/dgmo.grammar.d.ts +0 -2
- package/src/editor/dgmo.grammar.js +0 -18
- package/src/editor/dgmo.grammar.terms.d.ts +0 -5
- package/src/editor/dgmo.grammar.terms.js +0 -35
- package/src/editor/highlight-api.ts +0 -596
- package/src/editor/highlight.ts +0 -36
- package/src/editor/index.ts +0 -27
- package/src/editor/keywords.ts +0 -128
- package/src/editor/tokens.ts +0 -30
- package/src/element/index.ts +0 -432
- package/src/embed/css.ts +0 -312
- package/src/embed/escape.ts +0 -15
- package/src/embed/index.ts +0 -280
- package/src/er/classify.ts +0 -228
- package/src/er/layout.ts +0 -530
- package/src/er/parser.ts +0 -750
- package/src/er/renderer.ts +0 -725
- package/src/er/types.ts +0 -52
- package/src/error-card.ts +0 -269
- package/src/event-line/diagnostics.ts +0 -117
- package/src/event-line/parser.ts +0 -643
- package/src/event-line/renderer.ts +0 -1742
- package/src/event-line/types.ts +0 -74
- package/src/fonts.ts +0 -3
- package/src/gantt/parser.ts +0 -1641
- package/src/gantt/renderer.ts +0 -3787
- package/src/gantt/resolver.ts +0 -172
- package/src/gantt/types.ts +0 -206
- package/src/graph/diagnostics.ts +0 -64
- package/src/graph/edge-spline.ts +0 -29
- package/src/graph/flowchart-parser.ts +0 -759
- package/src/graph/flowchart-renderer.ts +0 -817
- package/src/graph/layout.ts +0 -472
- package/src/graph/notes.ts +0 -21
- package/src/graph/state-collapse.ts +0 -78
- package/src/graph/state-parser.ts +0 -574
- package/src/graph/state-renderer.ts +0 -653
- package/src/graph/types.ts +0 -65
- package/src/index.ts +0 -261
- package/src/infra/compute.ts +0 -1385
- package/src/infra/layout.ts +0 -888
- package/src/infra/parser.ts +0 -1234
- package/src/infra/renderer.ts +0 -2534
- package/src/infra/roles.ts +0 -75
- package/src/infra/types.ts +0 -216
- package/src/infra/validation.ts +0 -201
- package/src/journey-map/layout.ts +0 -490
- package/src/journey-map/parser.ts +0 -557
- package/src/journey-map/renderer.ts +0 -1580
- package/src/journey-map/types.ts +0 -47
- package/src/kanban/mutations.ts +0 -175
- package/src/kanban/parser.ts +0 -509
- package/src/kanban/renderer.ts +0 -1449
- package/src/kanban/types.ts +0 -39
- package/src/label-layout.ts +0 -368
- package/src/map/colorize.ts +0 -54
- package/src/map/completion.ts +0 -316
- package/src/map/context-labels.ts +0 -609
- package/src/map/data/PROVENANCE.json +0 -1
- package/src/map/data/README.md +0 -40
- package/src/map/data/airport-collisions.json +0 -1
- package/src/map/data/airports.json +0 -1
- package/src/map/data/gazetteer.json +0 -1
- package/src/map/data/lakes.json +0 -1
- package/src/map/data/mountain-ranges.json +0 -1
- package/src/map/data/na-lakes.json +0 -1
- package/src/map/data/na-land.json +0 -1
- package/src/map/data/region-names.json +0 -1
- package/src/map/data/rivers.json +0 -1
- package/src/map/data/types.ts +0 -121
- package/src/map/data/us-states.json +0 -1
- package/src/map/data/water-bodies.json +0 -1
- package/src/map/data/world-coarse.json +0 -1
- package/src/map/data/world-detail.json +0 -1
- package/src/map/diagnostics.ts +0 -134
- package/src/map/dimensions.ts +0 -150
- package/src/map/geo-query.ts +0 -295
- package/src/map/geo.ts +0 -438
- package/src/map/invert.ts +0 -111
- package/src/map/layout.ts +0 -5069
- package/src/map/legend-band.ts +0 -127
- package/src/map/load-data.ts +0 -186
- package/src/map/parser.ts +0 -783
- package/src/map/renderer.ts +0 -1445
- package/src/map/resolved-types.ts +0 -160
- package/src/map/resolver.ts +0 -1146
- package/src/map/types.ts +0 -194
- package/src/mindmap/collapse.ts +0 -67
- package/src/mindmap/layout.ts +0 -649
- package/src/mindmap/parser.ts +0 -430
- package/src/mindmap/renderer.ts +0 -637
- package/src/mindmap/text-wrap.ts +0 -218
- package/src/mindmap/types.ts +0 -56
- package/src/org/collapse.ts +0 -151
- package/src/org/layout.ts +0 -1262
- package/src/org/parser.ts +0 -519
- package/src/org/renderer.ts +0 -866
- package/src/org/resolver.ts +0 -636
- package/src/palettes/atlas.ts +0 -77
- package/src/palettes/blueprint.ts +0 -73
- package/src/palettes/catppuccin.ts +0 -84
- package/src/palettes/color-utils.ts +0 -443
- package/src/palettes/index.ts +0 -67
- package/src/palettes/nord.ts +0 -67
- package/src/palettes/registry.ts +0 -114
- package/src/palettes/slate.ts +0 -73
- package/src/palettes/tidewater.ts +0 -73
- package/src/palettes/tokyo-night.ts +0 -86
- package/src/palettes/types.ts +0 -88
- package/src/pert/analyzer.ts +0 -1183
- package/src/pert/diagnostics.ts +0 -110
- package/src/pert/index.ts +0 -43
- package/src/pert/internal.ts +0 -252
- package/src/pert/layout.ts +0 -971
- package/src/pert/monte-carlo.ts +0 -446
- package/src/pert/parser.ts +0 -1606
- package/src/pert/renderer.ts +0 -4009
- package/src/pert/share-normalize.ts +0 -62
- package/src/pert/types.ts +0 -604
- package/src/pyramid/parser.ts +0 -185
- package/src/pyramid/renderer.ts +0 -768
- package/src/pyramid/types.ts +0 -28
- package/src/quadrant/parser.ts +0 -18
- package/src/quadrant/renderer.ts +0 -638
- package/src/raci/diagnostics.ts +0 -213
- package/src/raci/index.ts +0 -23
- package/src/raci/mutations.ts +0 -321
- package/src/raci/parser.ts +0 -699
- package/src/raci/renderer.ts +0 -1627
- package/src/raci/types.ts +0 -82
- package/src/raci/variants.ts +0 -320
- package/src/render.ts +0 -268
- package/src/ring/parser.ts +0 -212
- package/src/ring/renderer.ts +0 -490
- package/src/ring/types.ts +0 -27
- package/src/sequence/collapse.ts +0 -174
- package/src/sequence/parser.ts +0 -1596
- package/src/sequence/participant-inference.ts +0 -152
- package/src/sequence/renderer.ts +0 -3168
- package/src/sequence/tag-resolution.ts +0 -164
- package/src/sharing.ts +0 -211
- package/src/sitemap/collapse.ts +0 -100
- package/src/sitemap/layout.ts +0 -925
- package/src/sitemap/parser.ts +0 -755
- package/src/sitemap/renderer.ts +0 -828
- package/src/sitemap/types.ts +0 -42
- package/src/slope/parser.ts +0 -18
- package/src/slope/renderer.ts +0 -378
- package/src/swimlane/diagnostics.ts +0 -94
- package/src/swimlane/layout.ts +0 -597
- package/src/swimlane/parser.ts +0 -613
- package/src/swimlane/renderer.ts +0 -681
- package/src/swimlane/types.ts +0 -151
- package/src/tech-radar/interactive.ts +0 -1129
- package/src/tech-radar/layout.ts +0 -197
- package/src/tech-radar/parser.ts +0 -436
- package/src/tech-radar/renderer.ts +0 -1239
- package/src/tech-radar/shared.ts +0 -151
- package/src/tech-radar/types.ts +0 -86
- package/src/themes.ts +0 -22
- package/src/timeline/parser.ts +0 -472
- package/src/timeline/renderer.ts +0 -3024
- package/src/timeline/types.ts +0 -33
- package/src/timeline/viz-parser.ts +0 -21
- package/src/treemap/diagnostics.ts +0 -62
- package/src/treemap/layout-radial.ts +0 -233
- package/src/treemap/layout.ts +0 -189
- package/src/treemap/parser.ts +0 -463
- package/src/treemap/renderer-radial.ts +0 -438
- package/src/treemap/renderer.ts +0 -572
- package/src/treemap/treemap-shared.ts +0 -309
- package/src/treemap/types.ts +0 -60
- package/src/utils/arrow-markers.ts +0 -51
- package/src/utils/arrows-diagnostics.ts +0 -62
- package/src/utils/arrows.ts +0 -227
- package/src/utils/brand.ts +0 -61
- package/src/utils/card.ts +0 -183
- package/src/utils/collapse-engine/tree-edges.ts +0 -115
- package/src/utils/collapse-engine/tree.ts +0 -117
- package/src/utils/d3-helpers.ts +0 -219
- package/src/utils/d3-types.ts +0 -9
- package/src/utils/description-helpers.ts +0 -38
- package/src/utils/duration.ts +0 -312
- package/src/utils/export-container.ts +0 -41
- package/src/utils/expr-eval.ts +0 -27
- package/src/utils/fit-canvas.ts +0 -64
- package/src/utils/hover-styles.ts +0 -673
- package/src/utils/inline-markdown.ts +0 -96
- package/src/utils/legend-constants.ts +0 -48
- package/src/utils/legend-d3.ts +0 -618
- package/src/utils/legend-integration.ts +0 -107
- package/src/utils/legend-layout.ts +0 -776
- package/src/utils/legend-svg.ts +0 -214
- package/src/utils/legend-types.ts +0 -272
- package/src/utils/name-normalize.ts +0 -163
- package/src/utils/note-box/constants.ts +0 -25
- package/src/utils/note-box/index.ts +0 -11
- package/src/utils/note-box/metrics.ts +0 -90
- package/src/utils/note-box/svg.ts +0 -331
- package/src/utils/notes/bounds.ts +0 -30
- package/src/utils/notes/build.ts +0 -131
- package/src/utils/notes/index.ts +0 -18
- package/src/utils/notes/model.ts +0 -19
- package/src/utils/notes/parse.ts +0 -131
- package/src/utils/notes/place.ts +0 -177
- package/src/utils/notes/resolve.ts +0 -88
- package/src/utils/number-format.ts +0 -36
- package/src/utils/parsing.ts +0 -953
- package/src/utils/reserved-key-registry.ts +0 -239
- package/src/utils/safe-href.ts +0 -38
- package/src/utils/scaling.ts +0 -97
- package/src/utils/svg-embed.ts +0 -251
- package/src/utils/tag-groups.ts +0 -607
- package/src/utils/text-measure.ts +0 -122
- package/src/utils/title-constants.ts +0 -24
- package/src/utils/visual-conventions.ts +0 -61
- package/src/utils/wrapped-desc.ts +0 -87
- package/src/venn/parser.ts +0 -18
- package/src/venn/renderer.ts +0 -1047
- package/src/version-control/diagnostics.ts +0 -67
- package/src/version-control/parser.ts +0 -544
- package/src/version-control/renderer.ts +0 -724
- package/src/version-control/types.ts +0 -100
- package/src/visualizations/parse.ts +0 -1560
- package/src/visualizations/types.ts +0 -262
- package/src/wireframe/layout.ts +0 -479
- package/src/wireframe/parser.ts +0 -1114
- package/src/wireframe/renderer.ts +0 -1318
- package/src/wireframe/types.ts +0 -110
- package/src/wordcloud/parser.ts +0 -18
- package/src/wordcloud/renderer.ts +0 -357
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TITLE_FONT_SIZE,
|
|
3
|
+
TITLE_FONT_WEIGHT,
|
|
4
|
+
TITLE_Y
|
|
5
|
+
} from "./chunk-A4GOY3PE.js";
|
|
6
|
+
import {
|
|
7
|
+
FONT_FAMILY
|
|
8
|
+
} from "./chunk-6KFWC4CO.js";
|
|
9
|
+
import {
|
|
10
|
+
getSeriesColors
|
|
11
|
+
} from "./chunk-P6T66CCZ.js";
|
|
12
|
+
|
|
13
|
+
// src/utils/d3-helpers.ts
|
|
14
|
+
import * as d3Selection from "d3-selection";
|
|
15
|
+
function renderChartTitle(svg, title, titleLineNumber, width, textColor, onClickItem) {
|
|
16
|
+
if (!title) return;
|
|
17
|
+
const titleEl = svg.append("text").attr("class", "chart-title").attr("x", width / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).style("cursor", onClickItem && titleLineNumber ? "pointer" : "default").text(title);
|
|
18
|
+
if (titleLineNumber) {
|
|
19
|
+
titleEl.attr("data-line-number", titleLineNumber);
|
|
20
|
+
if (onClickItem) {
|
|
21
|
+
titleEl.on("click", () => onClickItem(titleLineNumber)).on("mouseenter", function() {
|
|
22
|
+
d3Selection.select(this).attr("opacity", 0.7);
|
|
23
|
+
}).on("mouseleave", function() {
|
|
24
|
+
d3Selection.select(this).attr("opacity", 1);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function initD3Chart(container, palette, exportDims) {
|
|
30
|
+
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
31
|
+
const width = exportDims?.width ?? container.clientWidth;
|
|
32
|
+
const height = exportDims?.height ?? container.clientHeight;
|
|
33
|
+
if (width <= 0 || height <= 0) return null;
|
|
34
|
+
const textColor = palette.text;
|
|
35
|
+
const mutedColor = palette.border;
|
|
36
|
+
const bgColor = palette.bg;
|
|
37
|
+
const colors = getSeriesColors(palette);
|
|
38
|
+
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).style("background", bgColor);
|
|
39
|
+
return { svg, width, height, textColor, mutedColor, bgColor, colors };
|
|
40
|
+
}
|
|
41
|
+
function createTooltip(container, palette, isDark) {
|
|
42
|
+
container.style.position = "relative";
|
|
43
|
+
const existing = container.querySelector("[data-d3-tooltip]");
|
|
44
|
+
if (existing) {
|
|
45
|
+
existing.style.display = "none";
|
|
46
|
+
existing.style.background = palette.surface;
|
|
47
|
+
existing.style.color = palette.text;
|
|
48
|
+
existing.style.boxShadow = isDark ? "0 2px 6px rgba(0,0,0,0.3)" : "0 2px 6px rgba(0,0,0,0.12)";
|
|
49
|
+
return existing;
|
|
50
|
+
}
|
|
51
|
+
const tip = document.createElement("div");
|
|
52
|
+
tip.setAttribute("data-d3-tooltip", "");
|
|
53
|
+
tip.style.position = "absolute";
|
|
54
|
+
tip.style.display = "none";
|
|
55
|
+
tip.style.pointerEvents = "none";
|
|
56
|
+
tip.style.background = palette.surface;
|
|
57
|
+
tip.style.color = palette.text;
|
|
58
|
+
tip.style.padding = "6px 10px";
|
|
59
|
+
tip.style.borderRadius = "4px";
|
|
60
|
+
tip.style.fontSize = "12px";
|
|
61
|
+
tip.style.lineHeight = "1.4";
|
|
62
|
+
tip.style.whiteSpace = "nowrap";
|
|
63
|
+
tip.style.zIndex = "10";
|
|
64
|
+
tip.style.boxShadow = isDark ? "0 2px 6px rgba(0,0,0,0.3)" : "0 2px 6px rgba(0,0,0,0.12)";
|
|
65
|
+
container.appendChild(tip);
|
|
66
|
+
return tip;
|
|
67
|
+
}
|
|
68
|
+
function showTooltip(tooltip, html, event) {
|
|
69
|
+
tooltip.innerHTML = html;
|
|
70
|
+
tooltip.style.display = "block";
|
|
71
|
+
const container = tooltip.parentElement;
|
|
72
|
+
const rect = container.getBoundingClientRect();
|
|
73
|
+
let left = event.clientX - rect.left + 12;
|
|
74
|
+
let top = event.clientY - rect.top - 28;
|
|
75
|
+
const tipW = tooltip.offsetWidth;
|
|
76
|
+
const tipH = tooltip.offsetHeight;
|
|
77
|
+
if (left + tipW > rect.width) left = rect.width - tipW - 4;
|
|
78
|
+
if (top < 0) top = event.clientY - rect.top + 16;
|
|
79
|
+
if (top + tipH > rect.height) top = rect.height - tipH - 4;
|
|
80
|
+
tooltip.style.left = `${left}px`;
|
|
81
|
+
tooltip.style.top = `${top}px`;
|
|
82
|
+
}
|
|
83
|
+
function hideTooltip(tooltip) {
|
|
84
|
+
tooltip.style.display = "none";
|
|
85
|
+
}
|
|
86
|
+
var EXPORT_WIDTH = 1200;
|
|
87
|
+
var EXPORT_HEIGHT = 800;
|
|
88
|
+
async function resolveExportPalette(theme, palette) {
|
|
89
|
+
if (palette) return palette;
|
|
90
|
+
const { getPalette } = await import("./palettes-PRJ2RI6D.js");
|
|
91
|
+
return theme === "dark" ? getPalette("nord").dark : getPalette("nord").light;
|
|
92
|
+
}
|
|
93
|
+
function createExportContainer(width, height) {
|
|
94
|
+
const container = document.createElement("div");
|
|
95
|
+
container.style.width = `${width}px`;
|
|
96
|
+
container.style.height = `${height}px`;
|
|
97
|
+
container.style.position = "absolute";
|
|
98
|
+
container.style.left = "-9999px";
|
|
99
|
+
document.body.appendChild(container);
|
|
100
|
+
return container;
|
|
101
|
+
}
|
|
102
|
+
function finalizeSvgExport(container, theme, palette) {
|
|
103
|
+
const svgEl = container.querySelector("svg");
|
|
104
|
+
if (!svgEl) return "";
|
|
105
|
+
if (theme === "transparent") {
|
|
106
|
+
svgEl.style.background = "none";
|
|
107
|
+
} else if (!svgEl.style.background) {
|
|
108
|
+
svgEl.style.background = palette.bg;
|
|
109
|
+
}
|
|
110
|
+
svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
111
|
+
svgEl.style.fontFamily = FONT_FAMILY;
|
|
112
|
+
svgEl.querySelectorAll("[data-export-ignore]").forEach((el) => el.remove());
|
|
113
|
+
const svgHtml = svgEl.outerHTML;
|
|
114
|
+
document.body.removeChild(container);
|
|
115
|
+
return svgHtml;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
renderChartTitle,
|
|
120
|
+
initD3Chart,
|
|
121
|
+
createTooltip,
|
|
122
|
+
showTooltip,
|
|
123
|
+
hideTooltip,
|
|
124
|
+
EXPORT_WIDTH,
|
|
125
|
+
EXPORT_HEIGHT,
|
|
126
|
+
resolveExportPalette,
|
|
127
|
+
createExportContainer,
|
|
128
|
+
finalizeSvgExport
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=chunk-U6EQI3U6.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
collapseTree
|
|
3
|
+
} from "./chunk-BS7SV7C3.js";
|
|
4
|
+
|
|
5
|
+
// src/org/collapse.ts
|
|
6
|
+
function cloneNode(node) {
|
|
7
|
+
return {
|
|
8
|
+
id: node.id,
|
|
9
|
+
label: node.label,
|
|
10
|
+
metadata: { ...node.metadata },
|
|
11
|
+
children: node.children.map(cloneNode),
|
|
12
|
+
parentId: node.parentId,
|
|
13
|
+
isContainer: node.isContainer,
|
|
14
|
+
lineNumber: node.lineNumber,
|
|
15
|
+
...node.color !== void 0 && { color: node.color }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var ORG_SHAPE = {
|
|
19
|
+
getId: (node) => node.id,
|
|
20
|
+
getChildren: (node) => node.children,
|
|
21
|
+
clone: cloneNode,
|
|
22
|
+
setChildren: (node, children) => {
|
|
23
|
+
node.children = children;
|
|
24
|
+
},
|
|
25
|
+
countsAsHidden: (node) => !node.isContainer
|
|
26
|
+
};
|
|
27
|
+
function collapseOrgTree(original, collapsedIds) {
|
|
28
|
+
if (collapsedIds.size === 0) {
|
|
29
|
+
return { parsed: original, hiddenCounts: /* @__PURE__ */ new Map() };
|
|
30
|
+
}
|
|
31
|
+
const { roots, hiddenCounts } = collapseTree(
|
|
32
|
+
original.roots,
|
|
33
|
+
collapsedIds,
|
|
34
|
+
ORG_SHAPE
|
|
35
|
+
);
|
|
36
|
+
return { parsed: { ...original, roots }, hiddenCounts };
|
|
37
|
+
}
|
|
38
|
+
function findNodeWithPath(nodes, targetId, path) {
|
|
39
|
+
for (const node of nodes) {
|
|
40
|
+
if (node.id === targetId) {
|
|
41
|
+
return { node, path };
|
|
42
|
+
}
|
|
43
|
+
const result = findNodeWithPath(node.children, targetId, [
|
|
44
|
+
...path,
|
|
45
|
+
{
|
|
46
|
+
id: node.id,
|
|
47
|
+
label: node.label,
|
|
48
|
+
lineNumber: node.lineNumber,
|
|
49
|
+
...node.color !== void 0 && { color: node.color },
|
|
50
|
+
metadata: { ...node.metadata },
|
|
51
|
+
isContainer: node.isContainer
|
|
52
|
+
}
|
|
53
|
+
]);
|
|
54
|
+
if (result) return result;
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
function focusOrgTree(original, focusNodeId) {
|
|
59
|
+
const found = findNodeWithPath(original.roots, focusNodeId, []);
|
|
60
|
+
if (!found) return null;
|
|
61
|
+
const isRoot = original.roots.some((r) => r.id === focusNodeId);
|
|
62
|
+
if (isRoot) {
|
|
63
|
+
return {
|
|
64
|
+
parsed: {
|
|
65
|
+
...original,
|
|
66
|
+
roots: [cloneNode(found.node)]
|
|
67
|
+
},
|
|
68
|
+
ancestorPath: []
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const cloned = cloneNode(found.node);
|
|
72
|
+
cloned.parentId = null;
|
|
73
|
+
return {
|
|
74
|
+
parsed: {
|
|
75
|
+
...original,
|
|
76
|
+
roots: [cloned]
|
|
77
|
+
},
|
|
78
|
+
ancestorPath: found.path
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
collapseOrgTree,
|
|
84
|
+
focusOrgTree
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=chunk-UJ4FJLBF.js.map
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildHeatScale,
|
|
3
|
+
buildLegend,
|
|
4
|
+
compactNumber,
|
|
5
|
+
formatPct,
|
|
6
|
+
resolveCellColor,
|
|
7
|
+
resolveColorMode
|
|
8
|
+
} from "./chunk-IZMRON6C.js";
|
|
9
|
+
import {
|
|
10
|
+
renderIntegratedLegend
|
|
11
|
+
} from "./chunk-PWIHZ6NJ.js";
|
|
12
|
+
import {
|
|
13
|
+
getMaxLegendReservedHeight
|
|
14
|
+
} from "./chunk-YAA6IID3.js";
|
|
15
|
+
import {
|
|
16
|
+
FONT_FAMILY
|
|
17
|
+
} from "./chunk-6KFWC4CO.js";
|
|
18
|
+
import {
|
|
19
|
+
LEGEND_GROUP_GAP
|
|
20
|
+
} from "./chunk-QOOUC2J5.js";
|
|
21
|
+
import {
|
|
22
|
+
measureText
|
|
23
|
+
} from "./chunk-WCT3NYCV.js";
|
|
24
|
+
import {
|
|
25
|
+
contrastText,
|
|
26
|
+
getSeriesColors
|
|
27
|
+
} from "./chunk-P6T66CCZ.js";
|
|
28
|
+
import {
|
|
29
|
+
tagAttrKey
|
|
30
|
+
} from "./chunk-QLCCJEJI.js";
|
|
31
|
+
|
|
32
|
+
// src/treemap/renderer-radial.ts
|
|
33
|
+
import * as d3Selection from "d3-selection";
|
|
34
|
+
import { arc as d3arc } from "d3-shape";
|
|
35
|
+
|
|
36
|
+
// src/treemap/layout-radial.ts
|
|
37
|
+
import {
|
|
38
|
+
hierarchy,
|
|
39
|
+
partition
|
|
40
|
+
} from "d3-hierarchy";
|
|
41
|
+
function toDatum(node) {
|
|
42
|
+
if (node.children.length === 0) {
|
|
43
|
+
return {
|
|
44
|
+
ref: node,
|
|
45
|
+
label: node.label,
|
|
46
|
+
value: node.value ?? 0,
|
|
47
|
+
...node.heat !== void 0 && { heat: node.heat },
|
|
48
|
+
lineNumber: node.lineNumber
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
ref: node,
|
|
53
|
+
label: node.label,
|
|
54
|
+
...node.heat !== void 0 && { heat: node.heat },
|
|
55
|
+
lineNumber: node.lineNumber,
|
|
56
|
+
children: node.children.map((c) => toDatum(c))
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function datumHeat(node) {
|
|
60
|
+
if (node.data.heat !== void 0) return node.data.heat;
|
|
61
|
+
const xs = [];
|
|
62
|
+
for (const l of node.leaves()) {
|
|
63
|
+
if (l.data.heat !== void 0) xs.push(l.data.heat);
|
|
64
|
+
}
|
|
65
|
+
if (xs.length === 0) return void 0;
|
|
66
|
+
return xs.reduce((a, b) => a + b, 0) / xs.length;
|
|
67
|
+
}
|
|
68
|
+
function defaultDiscRadius(radius, treeDepth) {
|
|
69
|
+
const frac = radius * 0.32;
|
|
70
|
+
const share = radius / (Math.max(1, treeDepth) + 1);
|
|
71
|
+
return Math.min(frac, share);
|
|
72
|
+
}
|
|
73
|
+
function layoutTreemapRadial(roots, opts) {
|
|
74
|
+
const maxDepth = opts.maxDepth ?? Infinity;
|
|
75
|
+
const radius = Math.max(1, opts.radius);
|
|
76
|
+
const rootDatum = {
|
|
77
|
+
label: "__root",
|
|
78
|
+
children: roots.map((r) => toDatum(r))
|
|
79
|
+
};
|
|
80
|
+
const h = hierarchy(rootDatum).sum(
|
|
81
|
+
(d) => d.children?.length ? 0 : d.value ?? 0
|
|
82
|
+
);
|
|
83
|
+
const total = h.value ?? 0;
|
|
84
|
+
if (total <= 0) {
|
|
85
|
+
return {
|
|
86
|
+
cells: [],
|
|
87
|
+
total: 0,
|
|
88
|
+
discRadius: opts.discRadius ?? defaultDiscRadius(radius, 1),
|
|
89
|
+
maxDepthReached: 0,
|
|
90
|
+
isEmpty: true
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const hroot = partition().size([2 * Math.PI, 1])(h);
|
|
94
|
+
const treeDepth = hroot.height;
|
|
95
|
+
const discRadius = Math.min(
|
|
96
|
+
radius - 1,
|
|
97
|
+
opts.discRadius ?? defaultDiscRadius(radius, treeDepth)
|
|
98
|
+
);
|
|
99
|
+
const ringSpan = Math.max(1, radius - discRadius);
|
|
100
|
+
const ringWidth = ringSpan / Math.max(1, treeDepth);
|
|
101
|
+
(hroot.children ?? []).forEach((top, i) => {
|
|
102
|
+
top.each((d) => {
|
|
103
|
+
d._topIndex = i;
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
const cells = [];
|
|
107
|
+
let maxDepthReached = 0;
|
|
108
|
+
for (const d of hroot.descendants()) {
|
|
109
|
+
if (d.depth === 0) continue;
|
|
110
|
+
if (d.depth > maxDepth) continue;
|
|
111
|
+
const hasChildren = !!d.children && d.children.length > 0;
|
|
112
|
+
if (d.depth > maxDepthReached) maxDepthReached = d.depth;
|
|
113
|
+
const path = [];
|
|
114
|
+
let p = d;
|
|
115
|
+
while (p && p.depth > 0) {
|
|
116
|
+
path.unshift(p.data.label);
|
|
117
|
+
p = p.parent;
|
|
118
|
+
}
|
|
119
|
+
const innerR = discRadius + (d.depth - 1) * ringWidth;
|
|
120
|
+
const outerR = discRadius + d.depth * ringWidth;
|
|
121
|
+
const heatVal = datumHeat(d);
|
|
122
|
+
cells.push({
|
|
123
|
+
node: d.data.ref ?? null,
|
|
124
|
+
label: d.data.label,
|
|
125
|
+
startAngle: d.x0,
|
|
126
|
+
endAngle: d.x1,
|
|
127
|
+
innerR,
|
|
128
|
+
outerR,
|
|
129
|
+
depth: d.depth,
|
|
130
|
+
value: d.value ?? 0,
|
|
131
|
+
isContainer: hasChildren,
|
|
132
|
+
isCollapsed: false,
|
|
133
|
+
topIndex: d._topIndex ?? 0,
|
|
134
|
+
pctOfRoot: total > 0 ? (d.value ?? 0) / total : 0,
|
|
135
|
+
pctOfParent: d.parent && (d.parent.value ?? 0) > 0 ? (d.value ?? 0) / (d.parent.value ?? 1) : 1,
|
|
136
|
+
...heatVal !== void 0 && { heat: heatVal },
|
|
137
|
+
path,
|
|
138
|
+
...d.data.lineNumber !== void 0 && { lineNumber: d.data.lineNumber }
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return { cells, total, discRadius, maxDepthReached, isEmpty: false };
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/treemap/renderer-radial.ts
|
|
145
|
+
var PADDING = 12;
|
|
146
|
+
var LEGEND_POSITION = {
|
|
147
|
+
placement: "top-center",
|
|
148
|
+
titleRelation: "below-title"
|
|
149
|
+
};
|
|
150
|
+
var MIN_LABEL_SWEEP = 6 * Math.PI / 180;
|
|
151
|
+
var MIN_LABEL_FS = 8;
|
|
152
|
+
function renderTreemapRadialForExport(container, parsed, palette, isDark, exportDims, options) {
|
|
153
|
+
renderTreemapRadial(container, parsed, palette, isDark, exportDims, {
|
|
154
|
+
exportMode: true,
|
|
155
|
+
...options
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function renderTreemapRadial(container, parsed, palette, isDark, exportDims, options = {}) {
|
|
159
|
+
if (parsed.error || parsed.roots.length === 0) return;
|
|
160
|
+
void isDark;
|
|
161
|
+
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
162
|
+
const width = exportDims?.width ?? container.clientWidth;
|
|
163
|
+
const height = exportDims?.height ?? container.clientHeight;
|
|
164
|
+
if (width <= 0 || height <= 0) return;
|
|
165
|
+
const mode = resolveColorMode(parsed, options.colorMode);
|
|
166
|
+
const opts = parsed.options;
|
|
167
|
+
const exportMode = options.exportMode ?? false;
|
|
168
|
+
const seriesColors = getSeriesColors(palette);
|
|
169
|
+
const heat = buildHeatScale(parsed, palette);
|
|
170
|
+
const legend = !opts.noLegend ? buildLegend(mode, parsed, heat, seriesColors, options.colorOffset ?? 0) : null;
|
|
171
|
+
const legendReserve = legend ? getMaxLegendReservedHeight(
|
|
172
|
+
{ groups: legend.groups, position: LEGEND_POSITION, mode: "preview" },
|
|
173
|
+
width
|
|
174
|
+
) + LEGEND_GROUP_GAP : 0;
|
|
175
|
+
const areaY = legendReserve + PADDING;
|
|
176
|
+
const areaW = Math.max(1, width - PADDING * 2);
|
|
177
|
+
const areaH = Math.max(1, height - areaY - PADDING);
|
|
178
|
+
const radius = Math.max(1, Math.min(areaW, areaH) / 2 - PADDING);
|
|
179
|
+
const cx = width / 2;
|
|
180
|
+
const cy = areaY + areaH / 2;
|
|
181
|
+
const layout = layoutTreemapRadial(parsed.roots, {
|
|
182
|
+
radius,
|
|
183
|
+
...options.maxDepth !== void 0 && { maxDepth: options.maxDepth }
|
|
184
|
+
});
|
|
185
|
+
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMin meet").attr("xmlns", "http://www.w3.org/2000/svg").attr("class", "dgmo-treemap dgmo-treemap-radial").style("font-family", FONT_FAMILY);
|
|
186
|
+
const defs = svg.append("defs");
|
|
187
|
+
svg.append("rect").attr("width", width).attr("height", height).attr("fill", palette.bg);
|
|
188
|
+
const plot = svg.append("g").attr("class", "dgmo-treemap-cells").attr("transform", `translate(${cx},${cy})`);
|
|
189
|
+
const activeGroup = parsed.tagGroups.length > 0 ? parsed.tagGroups[0].name : null;
|
|
190
|
+
const rootIndexByLabel = new Map(parsed.roots.map((r, i) => [r.label, i]));
|
|
191
|
+
const colorCtx = {
|
|
192
|
+
mode,
|
|
193
|
+
heat,
|
|
194
|
+
tagGroups: parsed.tagGroups,
|
|
195
|
+
activeGroup,
|
|
196
|
+
rootIndexByLabel,
|
|
197
|
+
seriesColors,
|
|
198
|
+
colorOffset: options.colorOffset ?? 0,
|
|
199
|
+
bg: palette.bg
|
|
200
|
+
};
|
|
201
|
+
const arcGen = d3arc().startAngle((c) => c.startAngle).endAngle((c) => c.endAngle).innerRadius((c) => c.innerR).outerRadius((c) => c.outerR).padAngle(4e-3).padRadius(radius);
|
|
202
|
+
let labelSeq = 0;
|
|
203
|
+
if (!layout.isEmpty) {
|
|
204
|
+
for (const cell of layout.cells) {
|
|
205
|
+
const fill = resolveCellColor(cell, colorCtx);
|
|
206
|
+
const g = plot.append("g").attr("class", "dgmo-treemap-cell").attr("data-node-path", cell.path.join(" / "));
|
|
207
|
+
if (cell.lineNumber !== void 0) {
|
|
208
|
+
g.attr("data-line-number", cell.lineNumber);
|
|
209
|
+
}
|
|
210
|
+
if (cell.heat !== void 0) g.attr("data-heat", cell.heat);
|
|
211
|
+
if (cell.node && activeGroup) {
|
|
212
|
+
const key = tagAttrKey(activeGroup);
|
|
213
|
+
const tagVal = cell.node.metadata[key];
|
|
214
|
+
if (tagVal) g.attr(`data-tag-${key}`, tagVal);
|
|
215
|
+
}
|
|
216
|
+
g.append("path").attr(
|
|
217
|
+
"class",
|
|
218
|
+
cell.isContainer ? "dgmo-treemap-arc branch" : "dgmo-treemap-arc"
|
|
219
|
+
).attr("d", arcGen(cell) ?? "").attr("fill", fill).attr("stroke", palette.bg).attr("stroke-width", 1);
|
|
220
|
+
drawArcLabel(
|
|
221
|
+
g,
|
|
222
|
+
defs,
|
|
223
|
+
`dgmo-arc-lbl-${labelSeq++}`,
|
|
224
|
+
cell,
|
|
225
|
+
opts,
|
|
226
|
+
palette,
|
|
227
|
+
fill
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
drawCenterDisc(
|
|
232
|
+
plot,
|
|
233
|
+
parsed,
|
|
234
|
+
layout.discRadius,
|
|
235
|
+
layout.total,
|
|
236
|
+
layout.isEmpty,
|
|
237
|
+
palette
|
|
238
|
+
);
|
|
239
|
+
if (legend) {
|
|
240
|
+
const legendG = svg.append("g").attr("class", "dgmo-treemap-legend").attr("transform", "translate(0, 0)");
|
|
241
|
+
renderIntegratedLegend(legendG, {
|
|
242
|
+
groups: legend.groups,
|
|
243
|
+
palette: {
|
|
244
|
+
bg: palette.bg,
|
|
245
|
+
surface: palette.surface,
|
|
246
|
+
text: palette.text,
|
|
247
|
+
textMuted: palette.textMuted,
|
|
248
|
+
primary: palette.primary
|
|
249
|
+
},
|
|
250
|
+
isDark,
|
|
251
|
+
width,
|
|
252
|
+
mode: exportMode ? "export" : "preview",
|
|
253
|
+
position: LEGEND_POSITION,
|
|
254
|
+
activeGroup: legend.activeGroup,
|
|
255
|
+
showInactivePills: !exportMode,
|
|
256
|
+
showEmptyGroups: !exportMode
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function drawCenterDisc(plot, parsed, discRadius, total, isEmpty, palette) {
|
|
261
|
+
const disc = plot.append("g").attr("class", "dgmo-treemap-disc");
|
|
262
|
+
disc.append("circle").attr("r", discRadius).attr("fill", palette.surface).attr("stroke", palette.bg).attr("stroke-width", 1);
|
|
263
|
+
const ink = contrastText(
|
|
264
|
+
palette.surface,
|
|
265
|
+
palette.textOnFillLight,
|
|
266
|
+
palette.textOnFillDark
|
|
267
|
+
);
|
|
268
|
+
const maxW = discRadius * 1.7;
|
|
269
|
+
if (isEmpty) {
|
|
270
|
+
disc.append("text").attr("class", "dgmo-treemap-empty").attr("text-anchor", "middle").attr("y", 4).attr("fill", ink).attr("font-size", clampFs(13, discRadius)).text(clip("No values to chart", maxW, 13));
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const title = parsed.title ?? "";
|
|
274
|
+
const totalStr = compactNumber(total);
|
|
275
|
+
const titleFs = clampFs(15, discRadius);
|
|
276
|
+
const totalFs = clampFs(22, discRadius);
|
|
277
|
+
if (title) {
|
|
278
|
+
const t = disc.append("text").attr("class", "dgmo-treemap-disc-title").attr("text-anchor", "middle").attr("y", -4).attr("fill", ink).attr("font-size", titleFs).attr("font-weight", 600).text(clip(title, maxW, titleFs));
|
|
279
|
+
if (parsed.titleLineNumber !== null) {
|
|
280
|
+
t.attr("data-line-number", parsed.titleLineNumber);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
disc.append("text").attr("class", "dgmo-treemap-disc-total").attr("text-anchor", "middle").attr("y", title ? titleFs : 8).attr("fill", ink).attr("font-size", totalFs).attr("font-weight", 700).text(clip(totalStr, maxW, totalFs));
|
|
284
|
+
}
|
|
285
|
+
function drawArcLabel(g, defs, pathId, cell, opts, palette, fill) {
|
|
286
|
+
const sweep = cell.endAngle - cell.startAngle;
|
|
287
|
+
if (sweep < MIN_LABEL_SWEEP) return;
|
|
288
|
+
const ringThickness = cell.outerR - cell.innerR;
|
|
289
|
+
if (ringThickness < 10) return;
|
|
290
|
+
const ink = contrastText(
|
|
291
|
+
fill,
|
|
292
|
+
palette.textOnFillLight,
|
|
293
|
+
palette.textOnFillDark
|
|
294
|
+
);
|
|
295
|
+
const rMid = (cell.innerR + cell.outerR) / 2;
|
|
296
|
+
const maxFs = clampFs(13, ringThickness);
|
|
297
|
+
const valParts = [
|
|
298
|
+
opts.noValues ? "" : compactNumber(cell.value),
|
|
299
|
+
opts.noPercent ? "" : formatPct(cell.pctOfRoot)
|
|
300
|
+
].filter(Boolean);
|
|
301
|
+
const valStr = valParts.join(" \xB7 ");
|
|
302
|
+
const full = valStr ? `${cell.label} ${valStr}` : cell.label;
|
|
303
|
+
const availLen = sweep * rMid * 0.94;
|
|
304
|
+
let fs = maxFs;
|
|
305
|
+
const wAtMax = measureText(full, maxFs);
|
|
306
|
+
if (wAtMax > availLen) {
|
|
307
|
+
fs = Math.max(MIN_LABEL_FS, Math.floor(maxFs * availLen / wAtMax));
|
|
308
|
+
}
|
|
309
|
+
const text = clip(full, availLen, fs);
|
|
310
|
+
if (!text) return;
|
|
311
|
+
drawCurvedLabel(g, defs, pathId, cell, rMid, fs, text, ink);
|
|
312
|
+
}
|
|
313
|
+
function drawCurvedLabel(g, defs, pathId, cell, rMid, fs, text, ink) {
|
|
314
|
+
const mid = (cell.startAngle + cell.endAngle) / 2;
|
|
315
|
+
const bottom = mid > Math.PI / 2 && mid < 3 * Math.PI / 2;
|
|
316
|
+
const rPath = bottom ? rMid + fs * 0.32 : rMid - fs * 0.32;
|
|
317
|
+
const [a0, a1] = bottom ? [cell.endAngle, cell.startAngle] : [cell.startAngle, cell.endAngle];
|
|
318
|
+
const p0x = Math.sin(a0) * rPath;
|
|
319
|
+
const p0y = -Math.cos(a0) * rPath;
|
|
320
|
+
const p1x = Math.sin(a1) * rPath;
|
|
321
|
+
const p1y = -Math.cos(a1) * rPath;
|
|
322
|
+
const sweepFlag = bottom ? 0 : 1;
|
|
323
|
+
const d = `M ${p0x.toFixed(2)} ${p0y.toFixed(2)} A ${rPath.toFixed(2)} ${rPath.toFixed(2)} 0 0 ${sweepFlag} ${p1x.toFixed(2)} ${p1y.toFixed(2)}`;
|
|
324
|
+
defs.append("path").attr("id", pathId).attr("d", d);
|
|
325
|
+
g.append("text").attr("class", "dgmo-treemap-label").attr("font-size", fs).attr("font-weight", 600).attr("fill", ink).append("textPath").attr("href", `#${pathId}`).attr("startOffset", "50%").attr("text-anchor", "middle").text(text);
|
|
326
|
+
}
|
|
327
|
+
function clampFs(base, thickness) {
|
|
328
|
+
return Math.max(8, Math.min(base, Math.round(thickness * 0.9)));
|
|
329
|
+
}
|
|
330
|
+
function clip(s, maxWidth, fs) {
|
|
331
|
+
if (measureText(s, fs) <= maxWidth) return s;
|
|
332
|
+
let lo = 0;
|
|
333
|
+
let hi = s.length;
|
|
334
|
+
while (lo < hi) {
|
|
335
|
+
const mid = Math.ceil((lo + hi) / 2);
|
|
336
|
+
if (measureText(s.slice(0, mid) + "\u2026", fs) <= maxWidth) lo = mid;
|
|
337
|
+
else hi = mid - 1;
|
|
338
|
+
}
|
|
339
|
+
return lo <= 0 ? "" : s.slice(0, lo) + "\u2026";
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export {
|
|
343
|
+
layoutTreemapRadial,
|
|
344
|
+
renderTreemapRadialForExport,
|
|
345
|
+
renderTreemapRadial
|
|
346
|
+
};
|
|
347
|
+
//# sourceMappingURL=chunk-ULOEATBZ.js.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
collapseTree,
|
|
3
|
+
collectTreeIds
|
|
4
|
+
} from "./chunk-BS7SV7C3.js";
|
|
5
|
+
|
|
6
|
+
// src/utils/collapse-engine/tree-edges.ts
|
|
7
|
+
function buildParentMap(roots, shape) {
|
|
8
|
+
const map = /* @__PURE__ */ new Map();
|
|
9
|
+
const walk = (nodes) => {
|
|
10
|
+
for (const node of nodes) {
|
|
11
|
+
for (const child of shape.getChildren(node)) {
|
|
12
|
+
map.set(shape.getId(child), shape.getId(node));
|
|
13
|
+
walk([child]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
walk(roots);
|
|
18
|
+
return map;
|
|
19
|
+
}
|
|
20
|
+
function findVisibleAncestor(nodeId, parentMap, visibleIds, collapsedIds) {
|
|
21
|
+
let current = nodeId;
|
|
22
|
+
while (true) {
|
|
23
|
+
const parentId = parentMap.get(current);
|
|
24
|
+
if (!parentId) return null;
|
|
25
|
+
if (visibleIds.has(parentId) && collapsedIds.has(parentId)) {
|
|
26
|
+
return parentId;
|
|
27
|
+
}
|
|
28
|
+
current = parentId;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function reterminateEdges(originalRoots, prunedRoots, edges, collapsedIds, nodeShape, edgeShape) {
|
|
32
|
+
const visibleIds = collectTreeIds(prunedRoots, nodeShape);
|
|
33
|
+
const parentMap = buildParentMap(originalRoots, nodeShape);
|
|
34
|
+
const result = [];
|
|
35
|
+
for (const edge of edges) {
|
|
36
|
+
let sourceId = edgeShape.getSource(edge);
|
|
37
|
+
let targetId = edgeShape.getTarget(edge);
|
|
38
|
+
const sourceVisible = visibleIds.has(sourceId);
|
|
39
|
+
const targetVisible = visibleIds.has(targetId);
|
|
40
|
+
if (sourceVisible && targetVisible) {
|
|
41
|
+
result.push(edgeShape.withEndpoints(edge, sourceId, targetId));
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!sourceVisible) {
|
|
45
|
+
const ancestor = findVisibleAncestor(
|
|
46
|
+
sourceId,
|
|
47
|
+
parentMap,
|
|
48
|
+
visibleIds,
|
|
49
|
+
collapsedIds
|
|
50
|
+
);
|
|
51
|
+
if (!ancestor) continue;
|
|
52
|
+
sourceId = ancestor;
|
|
53
|
+
}
|
|
54
|
+
if (!targetVisible) {
|
|
55
|
+
const ancestor = findVisibleAncestor(
|
|
56
|
+
targetId,
|
|
57
|
+
parentMap,
|
|
58
|
+
visibleIds,
|
|
59
|
+
collapsedIds
|
|
60
|
+
);
|
|
61
|
+
if (!ancestor) continue;
|
|
62
|
+
targetId = ancestor;
|
|
63
|
+
}
|
|
64
|
+
if (sourceId === targetId) continue;
|
|
65
|
+
result.push(edgeShape.withEndpoints(edge, sourceId, targetId));
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/sitemap/collapse.ts
|
|
71
|
+
function cloneNode(node) {
|
|
72
|
+
return {
|
|
73
|
+
id: node.id,
|
|
74
|
+
label: node.label,
|
|
75
|
+
metadata: { ...node.metadata },
|
|
76
|
+
children: node.children.map(cloneNode),
|
|
77
|
+
parentId: node.parentId,
|
|
78
|
+
isContainer: node.isContainer,
|
|
79
|
+
lineNumber: node.lineNumber,
|
|
80
|
+
...node.color !== void 0 && { color: node.color }
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var SITEMAP_SHAPE = {
|
|
84
|
+
getId: (node) => node.id,
|
|
85
|
+
getChildren: (node) => node.children,
|
|
86
|
+
clone: cloneNode,
|
|
87
|
+
setChildren: (node, children) => {
|
|
88
|
+
node.children = children;
|
|
89
|
+
},
|
|
90
|
+
countsAsHidden: (node) => !node.isContainer
|
|
91
|
+
};
|
|
92
|
+
var SITEMAP_EDGE_SHAPE = {
|
|
93
|
+
getSource: (edge) => edge.sourceId,
|
|
94
|
+
getTarget: (edge) => edge.targetId,
|
|
95
|
+
withEndpoints: (edge, sourceId, targetId) => ({
|
|
96
|
+
...edge,
|
|
97
|
+
sourceId,
|
|
98
|
+
targetId
|
|
99
|
+
})
|
|
100
|
+
};
|
|
101
|
+
function collapseSitemapTree(original, collapsedIds) {
|
|
102
|
+
if (collapsedIds.size === 0) {
|
|
103
|
+
return { parsed: original, hiddenCounts: /* @__PURE__ */ new Map() };
|
|
104
|
+
}
|
|
105
|
+
const { roots, hiddenCounts } = collapseTree(
|
|
106
|
+
original.roots,
|
|
107
|
+
collapsedIds,
|
|
108
|
+
SITEMAP_SHAPE
|
|
109
|
+
);
|
|
110
|
+
const edges = reterminateEdges(
|
|
111
|
+
original.roots,
|
|
112
|
+
roots,
|
|
113
|
+
original.edges,
|
|
114
|
+
collapsedIds,
|
|
115
|
+
SITEMAP_SHAPE,
|
|
116
|
+
SITEMAP_EDGE_SHAPE
|
|
117
|
+
);
|
|
118
|
+
return {
|
|
119
|
+
parsed: { ...original, roots, edges },
|
|
120
|
+
hiddenCounts
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
collapseSitemapTree
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=chunk-UNCCZ3NU.js.map
|