@aiderdesk/aiderdesk 0.87.0 → 0.89.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/out/renderer/assets/2DXBBFLN-DhlZjS3f.js +666 -0
- package/out/renderer/assets/46IJ22JX-C1e8pvI2.js +853 -0
- package/out/renderer/assets/4TTDE5I4-Bea_IXhu.js +501 -0
- package/out/renderer/assets/4UF3HTLV-CVqcE2iq.js +29 -0
- package/out/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
- package/out/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
- package/out/renderer/assets/AAXQQPKT-BVbjBycX.js +1130 -0
- package/out/renderer/assets/AKE5O7KZ-Dr4O6i9X.js +184 -0
- package/out/renderer/assets/{AgentSettings-Cp7VI6CM.js → AgentSettings-ByYnHHTv.js} +710 -255
- package/out/renderer/assets/BNMLP6AG-CHDGj3j_.js +804 -0
- package/out/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
- package/out/renderer/assets/DR6PKOQU-C6a3Tq7K.js +301 -0
- package/out/renderer/assets/E4RJ7UJB-BQWgl9gv.js +441 -0
- package/out/renderer/assets/ELSXBIJH-CVPK3kX4.js +39 -0
- package/out/renderer/assets/ERTIBQVS-71_Ru0iJ.js +182 -0
- package/out/renderer/assets/F653G4FO-Dj2Ang6n.js +1497 -0
- package/out/renderer/assets/FKCDD66M-DCrQTwBi.js +205 -0
- package/out/renderer/assets/FP7KDXVC-DKVnH-En.js +221 -0
- package/out/renderer/assets/FT5I3RHX-hlTJy7Nw.js +243 -0
- package/out/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
- package/out/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
- package/out/renderer/assets/GY35JXOZ-cSi0MdIc.js +168 -0
- package/out/renderer/assets/H5EEJPP2-bpYW0xE8.js +353 -0
- package/out/renderer/assets/HWDLEDTA-uLGgs5fE.js +982 -0
- package/out/renderer/assets/{InfoIcon-DesJ60KC.js → InfoIcon-DI4teJbi.js} +1 -1
- package/out/renderer/assets/JZWSX6AR-B0pkfB2b.js +67 -0
- package/out/renderer/assets/KQOEJWJY-EQFQbIDt.js +84 -0
- package/out/renderer/assets/KS3BB3KE-DclWHpbY.js +138 -0
- package/out/renderer/assets/KXJRRZHI-CHoCRoQ4.js +502 -0
- package/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/out/renderer/assets/MFVI5XKI-TmPyVySZ.js +10 -0
- package/out/renderer/assets/MWY2J62P-BlVjis68.js +1102 -0
- package/out/renderer/assets/MXGNCBL2-HvKcixVr.js +216 -0
- package/out/renderer/assets/N6DAJLIZ-B0JHSPS3.js +120 -0
- package/out/renderer/assets/NU5M23IW-CWgVJ5o_.js +116 -0
- package/out/renderer/assets/NV4XNBIS-uOSoaYKk.js +1221 -0
- package/out/renderer/assets/OGLU4SIR-CiNpshB1.js +289 -0
- package/out/renderer/assets/OUNS5N76-C6p0zhvm.js +1064 -0
- package/out/renderer/assets/{Onboarding-B2h7iatR.js → Onboarding-Ct6-CF4Z.js} +4 -4
- package/out/renderer/assets/PU4ISKXV-BQc-2oYa.js +515 -0
- package/out/renderer/assets/PUZGS23X-Bf89SCAj.js +21 -0
- package/out/renderer/assets/{ProviderHeader-BvigqAWX.js → ProviderHeader-Buje398H.js} +2 -2
- package/out/renderer/assets/Q3IYVLG5-DbP4qs2C.js +500 -0
- package/out/renderer/assets/QYHQDLKZ-dANs6SeT.js +983 -0
- package/out/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
- package/out/renderer/assets/RZSVICHU-CeuX_9H4.js +263 -0
- package/out/renderer/assets/{SettingsPage-CBonY1bv.js → SettingsPage-CLpPKXG1.js} +978 -848
- package/out/renderer/assets/UEXXS2NB-Bmbum3yG.js +25 -0
- package/out/renderer/assets/UHTQJXKL-C2OuiQBx.js +134 -0
- package/out/renderer/assets/URA2L2QI-DJ2BF8fn.js +201 -0
- package/out/renderer/assets/UXCHDUKG-B6wMZRAn.js +173 -0
- package/out/renderer/assets/{UsageDashboard-DFgckoeT.js → UsageDashboard-ORnsHGxF.js} +9130 -6449
- package/out/renderer/assets/VKNV3BUX-BMK4lviM.js +277 -0
- package/out/renderer/assets/VMV7XPHP-CzHnUaWh.js +127 -0
- package/out/renderer/assets/WEVWDWVA-BYWYeLxq.js +57 -0
- package/out/renderer/assets/XRRJ35LF-DaeQ2kbN.js +119 -0
- package/out/renderer/assets/YFKBLVVN-DsXlM7HO.js +990 -0
- package/out/renderer/assets/YHRE5QGZ-nB9z3NP1.js +697 -0
- package/out/renderer/assets/ZF3OVT4B-Ctn5OOBd.js +420 -0
- package/out/renderer/assets/{index-BFhJk8dv.js → index-BCaQe4ny.js} +2 -2
- package/out/renderer/assets/{index-Dk4pOCFt.js → index-BD-JYQGT.js} +5 -5
- package/out/renderer/assets/{index-bNFXvWqr.js → index-BGR4ZXWZ.js} +2 -2
- package/out/renderer/assets/{index-BP0q4HOE.js → index-BZBhErKV.js} +2 -2
- package/out/renderer/assets/{index-x_iC3w5N.js → index-BcWszklu.js} +1 -1
- package/out/renderer/assets/{index-C8TOzJWw.js → index-BpNNugm2.js} +4 -4
- package/out/renderer/assets/{index-uAJ0Zw9K.js → index-BrgyIQaN.js} +2 -2
- package/out/renderer/assets/{index-CuQvDzzr.js → index-Bt1dN7k_.js} +1 -1
- package/out/renderer/assets/{index-BZmjwrvJ.js → index-Bxu6rqm3.js} +1 -1
- package/out/renderer/assets/{index-tNlkrDYM.js → index-C6mXHxX3.js} +1 -1
- package/out/renderer/assets/{index-Z71oMk_m.js → index-CCbq90uE.js} +1 -1
- package/out/renderer/assets/{index-DE2koGci.js → index-CCm3UXZP.js} +2 -2
- package/out/renderer/assets/{index-DKNYbwcH.js → index-CNkiGtsK.js} +3 -3
- package/out/renderer/assets/{index-D_o1aMFn.css → index-CWfnJXNI.css} +130 -0
- package/out/renderer/assets/{index-47ZLfCU8.js → index-Cc-He418.js} +72999 -82151
- package/out/renderer/assets/{index-Dx6kKrXY.js → index-Crdzxx6k.js} +19 -15
- package/out/renderer/assets/{index-B_PkNLqT.js → index-D30k3y98.js} +1 -1
- package/out/renderer/assets/{index-CasrGDb0.js → index-DAWoHfjM.js} +2 -2
- package/out/renderer/assets/{index-D-rE7YVD.js → index-DG5AIC6J.js} +3 -3
- package/out/renderer/assets/{index-BzOM6AUj.js → index-DSBgCNMv.js} +2 -2
- package/out/renderer/assets/{index-C1I2Idqy.js → index-DeRKeskE.js} +5 -5
- package/out/renderer/assets/{index-Bh4xfAPL.js → index-DgQEgdew.js} +2 -2
- package/out/renderer/assets/{index-BKmr7UTW.js → index-Dgdp4i2K.js} +1 -1
- package/out/renderer/assets/{index-Bbv79qeB.js → index-DnNK6R2g.js} +2 -2
- package/out/renderer/assets/{index-CiIr--kg.js → index-DrNutodm.js} +2 -2
- package/out/renderer/assets/{index-B2jZTTYL.js → index-FS3mY8Ct.js} +1 -1
- package/out/renderer/assets/{index-DvSWnCZD.js → index-KId2jLzt.js} +2 -2
- package/out/renderer/assets/{index-DWZF-uSf.js → index-PyRCX6hq.js} +5 -5
- package/out/renderer/assets/{index-J-dLn6uq.js → index-U8nE80jx.js} +2 -2
- package/out/renderer/assets/{index-cO9XeYPQ.js → index-Vw8jKJU_.js} +5 -5
- package/out/renderer/assets/{index-B9bf5T9j.js → index-_a6zbU-0.js} +1 -1
- package/out/renderer/assets/{index-CenYyetH.js → index-dsqlqRSG.js} +5 -5
- package/out/renderer/assets/{index-D4dhIRp1.js → index-rQL1hwaP.js} +5 -5
- package/out/renderer/assets/{jsx-dev-runtime-CtvYhMha.js → jsx-dev-runtime-Bwt8d4vP.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/out/resources/prompts/system-prompt.hbs +11 -0
- package/out/resources/skills/extension-creator/SKILL.md +20 -1
- package/out/resources/skills/extension-creator/references/event-types.md +5 -3
- package/out/resources/skills/extension-creator/references/extension-interface.md +62 -1
- package/out/resources/skills/extension-creator/references/external-agent-providers.md +90 -0
- package/out/runner.js +2016 -615
- package/package.json +3 -3
- package/out/renderer/assets/abnfDiagram-N423BO3Z-DV7pjob8.js +0 -118
- package/out/renderer/assets/arc-C2NyJjKR.js +0 -131
- package/out/renderer/assets/architectureDiagram-T3A2C74G-BmG8PHmc.js +0 -8829
- package/out/renderer/assets/band-zXq5o_Ib.js +0 -77
- package/out/renderer/assets/blockDiagram-VBNYF7ZC-CJndPtzf.js +0 -3824
- package/out/renderer/assets/c4Diagram-5PPSVZJV-B9DY2Hnr.js +0 -2482
- package/out/renderer/assets/channel-CCPkBLnh.js +0 -7
- package/out/renderer/assets/chunk-2GRJ4B5K-Bt46bDfT.js +0 -116
- package/out/renderer/assets/chunk-2Q5K7J3B-DkQwfKC2.js +0 -19
- package/out/renderer/assets/chunk-5RXB4S5H-CFNEWvlR.js +0 -1988
- package/out/renderer/assets/chunk-5VM5RSS4-BNeZg_6d.js +0 -19
- package/out/renderer/assets/chunk-6Q2QTUOP-BU5gT8Us.js +0 -860
- package/out/renderer/assets/chunk-GF5L2VYU-BNML5JwJ.js +0 -2026
- package/out/renderer/assets/chunk-JWPE2WC7-Dvih3ku3.js +0 -16
- package/out/renderer/assets/chunk-KBJHAD2P-CMgAbRkQ.js +0 -24
- package/out/renderer/assets/chunk-RYQCIY6F-CAJ6Qldz.js +0 -474
- package/out/renderer/assets/chunk-XXDRQBXY-BDZJ-WFV.js +0 -13
- package/out/renderer/assets/classDiagram-JCYQIIEL-BJCilkUQ.js +0 -23
- package/out/renderer/assets/classDiagram-v2-OCEON4UE-BJCilkUQ.js +0 -23
- package/out/renderer/assets/cose-bilkent-JH36ORCC-D6MsqBP5.js +0 -4942
- package/out/renderer/assets/cynefin-VYW2F7L2-3kPlVPG0.js +0 -32093
- package/out/renderer/assets/cynefinDiagram-MW4NZA55-6BlkJqWN.js +0 -453
- package/out/renderer/assets/cytoscape.esm-Bx_1tVW-.js +0 -30332
- package/out/renderer/assets/dagre-VZM6K2ZE-Chj1W0as.js +0 -522
- package/out/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
- package/out/renderer/assets/diagram-7IWD3JNH-CHFj7vIm.js +0 -488
- package/out/renderer/assets/diagram-B4RE2ZJO-BqOMO30m.js +0 -632
- package/out/renderer/assets/diagram-LBJQPF4R-CkiuQM5K.js +0 -212
- package/out/renderer/assets/diagram-Q27KOJAE-WVbpb4Iq.js +0 -857
- package/out/renderer/assets/diagram-UB23O5K3-B9Q0wQI3.js +0 -311
- package/out/renderer/assets/ebnfDiagram-BXEA7PRR-BUhf1ZxU.js +0 -138
- package/out/renderer/assets/erDiagram-JOGREHBK-DGxWkssI.js +0 -1238
- package/out/renderer/assets/flowDiagram-UKHOOZJN-D3ul5aGG.js +0 -2348
- package/out/renderer/assets/ganttDiagram-PKOTCBZU-BD3VbhAZ.js +0 -2782
- package/out/renderer/assets/gitGraphDiagram-DS77QQ5N-x-7NMw7v.js +0 -1373
- package/out/renderer/assets/graph-BDbmSegI.js +0 -1308
- package/out/renderer/assets/infoDiagram-6WML65LV-BMwbA6CU.js +0 -31
- package/out/renderer/assets/init-CTO7spbL.js +0 -35
- package/out/renderer/assets/ishikawaDiagram-WSZJBQD7-Bx90Gz0s.js +0 -967
- package/out/renderer/assets/journeyDiagram-NVQOT4AX-Dh4pUAU5.js +0 -1255
- package/out/renderer/assets/kanban-definition-27J2QSJJ-BZ_lX-ko.js +0 -1052
- package/out/renderer/assets/katex-oVG3DVWa.js +0 -14499
- package/out/renderer/assets/layout-oaOUFeBM.js +0 -2326
- package/out/renderer/assets/linear-B2eGZpM_.js +0 -361
- package/out/renderer/assets/map-BijQCI9U.js +0 -299
- package/out/renderer/assets/mindmap-definition-FAOFIHXS-BeWZh5qg.js +0 -1153
- package/out/renderer/assets/ordinal-BD3Y6v77.js +0 -77
- package/out/renderer/assets/pegDiagram-VL7TDLO6-BA6NzzN6.js +0 -126
- package/out/renderer/assets/pieDiagram-7S7Q4E2Y-KJmT5t-P.js +0 -316
- package/out/renderer/assets/quadrantDiagram-CIZ2JOQS-BdFz_bQU.js +0 -1343
- package/out/renderer/assets/railroadDiagram-AXF67PYL-CbH2ZZ1S.js +0 -92
- package/out/renderer/assets/requirementDiagram-LRYGKXZP-BZXG5Vgf.js +0 -1204
- package/out/renderer/assets/sankeyDiagram-W5VNT64P-CV1Upv22.js +0 -1274
- package/out/renderer/assets/sequenceDiagram-SI44F4Z6-Csbi3ivi.js +0 -4514
- package/out/renderer/assets/sizeCapture-X5ZJPWSS-CaN4k1d3.js +0 -62
- package/out/renderer/assets/stateDiagram-OKZ733FA-DSo1KeOQ.js +0 -452
- package/out/renderer/assets/stateDiagram-v2-UEYNNEHI-BhXw89HT.js +0 -22
- package/out/renderer/assets/swimlanes-SLNWSIFB-p3GZ-wkU.js +0 -8557
- package/out/renderer/assets/swimlanesDiagram-ULZ7WXOC-DGBdyiqy.js +0 -20
- package/out/renderer/assets/time-4LaKa9ym.js +0 -985
- package/out/renderer/assets/timeline-definition-Z64GVDOM-DfY8hG5p.js +0 -1596
- package/out/renderer/assets/vennDiagram-T6HMQDX7-wp87GaTi.js +0 -2515
- package/out/renderer/assets/wardleyDiagram-T6FBY63Y-DNrC2vOI.js +0 -975
- package/out/renderer/assets/xychartDiagram-ELKLHX3M-Bn8J2SKt.js +0 -1943
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
function formatDecimal(x) {
|
|
2
|
-
return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
|
|
3
|
-
}
|
|
4
|
-
function formatDecimalParts(x, p) {
|
|
5
|
-
if (!isFinite(x) || x === 0) return null;
|
|
6
|
-
var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"), coefficient = x.slice(0, i);
|
|
7
|
-
return [
|
|
8
|
-
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
9
|
-
+x.slice(i + 1)
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
function exponent(x) {
|
|
13
|
-
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
|
14
|
-
}
|
|
15
|
-
function formatGroup(grouping, thousands) {
|
|
16
|
-
return function(value, width) {
|
|
17
|
-
var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
|
|
18
|
-
while (i > 0 && g > 0) {
|
|
19
|
-
if (length + g + 1 > width) g = Math.max(1, width - length);
|
|
20
|
-
t.push(value.substring(i -= g, i + g));
|
|
21
|
-
if ((length += g + 1) > width) break;
|
|
22
|
-
g = grouping[j = (j + 1) % grouping.length];
|
|
23
|
-
}
|
|
24
|
-
return t.reverse().join(thousands);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function formatNumerals(numerals) {
|
|
28
|
-
return function(value) {
|
|
29
|
-
return value.replace(/[0-9]/g, function(i) {
|
|
30
|
-
return numerals[+i];
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
35
|
-
function formatSpecifier(specifier) {
|
|
36
|
-
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
37
|
-
var match;
|
|
38
|
-
return new FormatSpecifier({
|
|
39
|
-
fill: match[1],
|
|
40
|
-
align: match[2],
|
|
41
|
-
sign: match[3],
|
|
42
|
-
symbol: match[4],
|
|
43
|
-
zero: match[5],
|
|
44
|
-
width: match[6],
|
|
45
|
-
comma: match[7],
|
|
46
|
-
precision: match[8] && match[8].slice(1),
|
|
47
|
-
trim: match[9],
|
|
48
|
-
type: match[10]
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
formatSpecifier.prototype = FormatSpecifier.prototype;
|
|
52
|
-
function FormatSpecifier(specifier) {
|
|
53
|
-
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
|
|
54
|
-
this.align = specifier.align === void 0 ? ">" : specifier.align + "";
|
|
55
|
-
this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
|
|
56
|
-
this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
|
|
57
|
-
this.zero = !!specifier.zero;
|
|
58
|
-
this.width = specifier.width === void 0 ? void 0 : +specifier.width;
|
|
59
|
-
this.comma = !!specifier.comma;
|
|
60
|
-
this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
|
|
61
|
-
this.trim = !!specifier.trim;
|
|
62
|
-
this.type = specifier.type === void 0 ? "" : specifier.type + "";
|
|
63
|
-
}
|
|
64
|
-
FormatSpecifier.prototype.toString = function() {
|
|
65
|
-
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
66
|
-
};
|
|
67
|
-
function formatTrim(s) {
|
|
68
|
-
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
|
|
69
|
-
switch (s[i]) {
|
|
70
|
-
case ".":
|
|
71
|
-
i0 = i1 = i;
|
|
72
|
-
break;
|
|
73
|
-
case "0":
|
|
74
|
-
if (i0 === 0) i0 = i;
|
|
75
|
-
i1 = i;
|
|
76
|
-
break;
|
|
77
|
-
default:
|
|
78
|
-
if (!+s[i]) break out;
|
|
79
|
-
if (i0 > 0) i0 = 0;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
84
|
-
}
|
|
85
|
-
var prefixExponent;
|
|
86
|
-
function formatPrefixAuto(x, p) {
|
|
87
|
-
var d = formatDecimalParts(x, p);
|
|
88
|
-
if (!d) return prefixExponent = void 0, x.toPrecision(p);
|
|
89
|
-
var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
|
|
90
|
-
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
|
|
91
|
-
}
|
|
92
|
-
function formatRounded(x, p) {
|
|
93
|
-
var d = formatDecimalParts(x, p);
|
|
94
|
-
if (!d) return x + "";
|
|
95
|
-
var coefficient = d[0], exponent2 = d[1];
|
|
96
|
-
return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0");
|
|
97
|
-
}
|
|
98
|
-
const formatTypes = {
|
|
99
|
-
"%": (x, p) => (x * 100).toFixed(p),
|
|
100
|
-
"b": (x) => Math.round(x).toString(2),
|
|
101
|
-
"c": (x) => x + "",
|
|
102
|
-
"d": formatDecimal,
|
|
103
|
-
"e": (x, p) => x.toExponential(p),
|
|
104
|
-
"f": (x, p) => x.toFixed(p),
|
|
105
|
-
"g": (x, p) => x.toPrecision(p),
|
|
106
|
-
"o": (x) => Math.round(x).toString(8),
|
|
107
|
-
"p": (x, p) => formatRounded(x * 100, p),
|
|
108
|
-
"r": formatRounded,
|
|
109
|
-
"s": formatPrefixAuto,
|
|
110
|
-
"X": (x) => Math.round(x).toString(16).toUpperCase(),
|
|
111
|
-
"x": (x) => Math.round(x).toString(16)
|
|
112
|
-
};
|
|
113
|
-
function identity(x) {
|
|
114
|
-
return x;
|
|
115
|
-
}
|
|
116
|
-
var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
117
|
-
function formatLocale(locale2) {
|
|
118
|
-
var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity : formatGroup(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity : formatNumerals(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "−" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
|
|
119
|
-
function newFormat(specifier, options) {
|
|
120
|
-
specifier = formatSpecifier(specifier);
|
|
121
|
-
var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
|
|
122
|
-
if (type === "n") comma = true, type = "g";
|
|
123
|
-
else if (!formatTypes[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
|
|
124
|
-
if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "=";
|
|
125
|
-
var prefix = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
|
|
126
|
-
var formatType = formatTypes[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
127
|
-
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
128
|
-
function format2(value) {
|
|
129
|
-
var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
|
|
130
|
-
if (type === "c") {
|
|
131
|
-
valueSuffix = formatType(value) + valueSuffix;
|
|
132
|
-
value = "";
|
|
133
|
-
} else {
|
|
134
|
-
value = +value;
|
|
135
|
-
var valueNegative = value < 0 || 1 / value < 0;
|
|
136
|
-
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
|
|
137
|
-
if (trim) value = formatTrim(value);
|
|
138
|
-
if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
|
|
139
|
-
valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
|
|
140
|
-
valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== void 0 ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
|
|
141
|
-
if (maybeSuffix) {
|
|
142
|
-
i = -1, n = value.length;
|
|
143
|
-
while (++i < n) {
|
|
144
|
-
if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
|
145
|
-
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
|
|
146
|
-
value = value.slice(0, i);
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (comma && !zero) value = group(value, Infinity);
|
|
153
|
-
var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
154
|
-
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
|
155
|
-
switch (align) {
|
|
156
|
-
case "<":
|
|
157
|
-
value = valuePrefix + value + valueSuffix + padding;
|
|
158
|
-
break;
|
|
159
|
-
case "=":
|
|
160
|
-
value = valuePrefix + padding + value + valueSuffix;
|
|
161
|
-
break;
|
|
162
|
-
case "^":
|
|
163
|
-
value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
|
|
164
|
-
break;
|
|
165
|
-
default:
|
|
166
|
-
value = padding + valuePrefix + value + valueSuffix;
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
return numerals(value);
|
|
170
|
-
}
|
|
171
|
-
format2.toString = function() {
|
|
172
|
-
return specifier + "";
|
|
173
|
-
};
|
|
174
|
-
return format2;
|
|
175
|
-
}
|
|
176
|
-
function formatPrefix2(specifier, value) {
|
|
177
|
-
var e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, k = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
|
|
178
|
-
return function(value2) {
|
|
179
|
-
return f(k * value2);
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
format: newFormat,
|
|
184
|
-
formatPrefix: formatPrefix2
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
var locale;
|
|
188
|
-
var format;
|
|
189
|
-
var formatPrefix;
|
|
190
|
-
defaultLocale({
|
|
191
|
-
thousands: ",",
|
|
192
|
-
grouping: [3],
|
|
193
|
-
currency: ["$", ""]
|
|
194
|
-
});
|
|
195
|
-
function defaultLocale(definition) {
|
|
196
|
-
locale = formatLocale(definition);
|
|
197
|
-
format = locale.format;
|
|
198
|
-
formatPrefix = locale.formatPrefix;
|
|
199
|
-
return locale;
|
|
200
|
-
}
|
|
201
|
-
export {
|
|
202
|
-
formatPrefix as a,
|
|
203
|
-
format as b,
|
|
204
|
-
exponent as e,
|
|
205
|
-
formatSpecifier as f
|
|
206
|
-
};
|
|
@@ -1,488 +0,0 @@
|
|
|
1
|
-
import { I as ImperativeState } from "./chunk-2Q5K7J3B-DkQwfKC2.js";
|
|
2
|
-
import { p as populateCommonDb } from "./chunk-JWPE2WC7-Dvih3ku3.js";
|
|
3
|
-
import { V as setDiagramTitle, x as setAccTitle, u as setAccDescription, W as getDiagramTitle, v as getAccDescription, w as getAccTitle, _ as __name, a5 as cleanAndMerge, A as log, a8 as selectSvgElement, B as configureSvgSize, a3 as getConfig, X as clear, J as sanitizeText, aO as getIconSVG, a6 as defaultConfig_default, aP as registerIconPacks } from "./index-47ZLfCU8.js";
|
|
4
|
-
import { p as parse } from "./cynefin-VYW2F7L2-3kPlVPG0.js";
|
|
5
|
-
var ALL_BOX_CHARS = /[─━│┃└┗├┣]/;
|
|
6
|
-
var BRANCH_CHAR = /[└┗├┣]/;
|
|
7
|
-
var DASH_CHAR = /[─━]/;
|
|
8
|
-
var DECORATION_ONLY = /^[\s│┃]+$/;
|
|
9
|
-
var METADATA_LINE = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/;
|
|
10
|
-
var COMMENT_LINE = /^\s*%%/;
|
|
11
|
-
var INDENT_UNIT = " ";
|
|
12
|
-
function isBoxDrawingFormat(lines) {
|
|
13
|
-
return lines.some((line) => ALL_BOX_CHARS.test(line));
|
|
14
|
-
}
|
|
15
|
-
__name(isBoxDrawingFormat, "isBoxDrawingFormat");
|
|
16
|
-
function inferSegmentWidth(contentLines) {
|
|
17
|
-
for (const line of contentLines) {
|
|
18
|
-
const match = BRANCH_CHAR.exec(line);
|
|
19
|
-
if (match?.index && match.index > 0) {
|
|
20
|
-
return match.index;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return 4;
|
|
24
|
-
}
|
|
25
|
-
__name(inferSegmentWidth, "inferSegmentWidth");
|
|
26
|
-
function remapErrorLines(message, lineMap) {
|
|
27
|
-
return message.replace(/\bline\s+(\d+)\b/gi, (match, lineStr) => {
|
|
28
|
-
const line = parseInt(lineStr, 10);
|
|
29
|
-
const original = lineMap.get(line);
|
|
30
|
-
return original ? `line ${original}` : match;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
__name(remapErrorLines, "remapErrorLines");
|
|
34
|
-
function preprocessBoxDrawing(input) {
|
|
35
|
-
const lines = input.split("\n");
|
|
36
|
-
const lineMap = /* @__PURE__ */ new Map();
|
|
37
|
-
let keywordIdx = -1;
|
|
38
|
-
for (const [i, line] of lines.entries()) {
|
|
39
|
-
if (line.trim() === "treeView-beta") {
|
|
40
|
-
keywordIdx = i;
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (keywordIdx === -1) {
|
|
45
|
-
return { text: input, lineMap };
|
|
46
|
-
}
|
|
47
|
-
const contentLineTexts = [];
|
|
48
|
-
for (let i = keywordIdx + 1; i < lines.length; i++) {
|
|
49
|
-
const line = lines[i];
|
|
50
|
-
const trimmed = line.trim();
|
|
51
|
-
if (trimmed === "" || COMMENT_LINE.test(line) || METADATA_LINE.test(line)) {
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
if (DECORATION_ONLY.test(line)) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
contentLineTexts.push(line.replace(/\t/g, " "));
|
|
58
|
-
}
|
|
59
|
-
if (!isBoxDrawingFormat(contentLineTexts)) {
|
|
60
|
-
return { text: input, lineMap };
|
|
61
|
-
}
|
|
62
|
-
const segmentWidth = inferSegmentWidth(contentLineTexts);
|
|
63
|
-
const outputLines = [];
|
|
64
|
-
let outLineNo = 0;
|
|
65
|
-
for (let i = 0; i <= keywordIdx; i++) {
|
|
66
|
-
outputLines.push(lines[i]);
|
|
67
|
-
outLineNo++;
|
|
68
|
-
lineMap.set(outLineNo, i + 1);
|
|
69
|
-
}
|
|
70
|
-
for (let i = keywordIdx + 1; i < lines.length; i++) {
|
|
71
|
-
const line = lines[i];
|
|
72
|
-
const trimmed = line.trim();
|
|
73
|
-
const origLineNo = i + 1;
|
|
74
|
-
if (trimmed === "") {
|
|
75
|
-
outputLines.push(line);
|
|
76
|
-
outLineNo++;
|
|
77
|
-
lineMap.set(outLineNo, origLineNo);
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (COMMENT_LINE.test(line)) {
|
|
81
|
-
outputLines.push(line);
|
|
82
|
-
outLineNo++;
|
|
83
|
-
lineMap.set(outLineNo, origLineNo);
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (METADATA_LINE.test(line)) {
|
|
87
|
-
outputLines.push(line);
|
|
88
|
-
outLineNo++;
|
|
89
|
-
lineMap.set(outLineNo, origLineNo);
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (DECORATION_ONLY.test(line)) {
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
const normalized = line.replace(/\t/g, " ");
|
|
96
|
-
const branchMatch = BRANCH_CHAR.exec(normalized);
|
|
97
|
-
if (branchMatch?.index !== void 0) {
|
|
98
|
-
const branchCol = branchMatch.index;
|
|
99
|
-
const depth = Math.round(branchCol / segmentWidth) + 1;
|
|
100
|
-
let pos = branchCol + 1;
|
|
101
|
-
while (pos < normalized.length && DASH_CHAR.test(normalized[pos])) {
|
|
102
|
-
pos++;
|
|
103
|
-
}
|
|
104
|
-
while (pos < normalized.length && normalized[pos] === " ") {
|
|
105
|
-
pos++;
|
|
106
|
-
}
|
|
107
|
-
const content = normalized.slice(pos).trimEnd();
|
|
108
|
-
if (!content) {
|
|
109
|
-
throw new Error(
|
|
110
|
-
`Line ${origLineNo}: Empty node — expected a filename or directory name after the box-drawing prefix`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
const indent = INDENT_UNIT.repeat(depth);
|
|
114
|
-
outputLines.push(indent + content);
|
|
115
|
-
outLineNo++;
|
|
116
|
-
lineMap.set(outLineNo, origLineNo);
|
|
117
|
-
} else if (/^[\s─━│┃└┗├┣]+$/.test(normalized)) {
|
|
118
|
-
continue;
|
|
119
|
-
} else if (ALL_BOX_CHARS.test(normalized)) {
|
|
120
|
-
outputLines.push(line);
|
|
121
|
-
outLineNo++;
|
|
122
|
-
lineMap.set(outLineNo, origLineNo);
|
|
123
|
-
} else if (/^\s+/.test(normalized)) {
|
|
124
|
-
throw new Error(
|
|
125
|
-
`Line ${origLineNo}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`
|
|
126
|
-
);
|
|
127
|
-
} else {
|
|
128
|
-
outputLines.push(line);
|
|
129
|
-
outLineNo++;
|
|
130
|
-
lineMap.set(outLineNo, origLineNo);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return { text: outputLines.join("\n"), lineMap };
|
|
134
|
-
}
|
|
135
|
-
__name(preprocessBoxDrawing, "preprocessBoxDrawing");
|
|
136
|
-
var state = new ImperativeState(() => ({
|
|
137
|
-
cnt: 1,
|
|
138
|
-
stack: [
|
|
139
|
-
{
|
|
140
|
-
id: 0,
|
|
141
|
-
level: -1,
|
|
142
|
-
name: "/",
|
|
143
|
-
nodeType: "directory",
|
|
144
|
-
children: []
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
}));
|
|
148
|
-
var clear2 = /* @__PURE__ */ __name(() => {
|
|
149
|
-
state.reset();
|
|
150
|
-
clear();
|
|
151
|
-
}, "clear");
|
|
152
|
-
var getRoot = /* @__PURE__ */ __name(() => {
|
|
153
|
-
return state.records.stack[0];
|
|
154
|
-
}, "getRoot");
|
|
155
|
-
var getCount = /* @__PURE__ */ __name(() => state.records.cnt, "getCount");
|
|
156
|
-
var defaultConfig = defaultConfig_default.treeView;
|
|
157
|
-
var getConfig2 = /* @__PURE__ */ __name(() => {
|
|
158
|
-
return cleanAndMerge(defaultConfig, getConfig().treeView);
|
|
159
|
-
}, "getConfig");
|
|
160
|
-
var addNode = /* @__PURE__ */ __name((level, name, nodeType, cssClass, icon, description) => {
|
|
161
|
-
while (level <= state.records.stack[state.records.stack.length - 1].level) {
|
|
162
|
-
state.records.stack.pop();
|
|
163
|
-
}
|
|
164
|
-
const node = {
|
|
165
|
-
id: state.records.cnt++,
|
|
166
|
-
level,
|
|
167
|
-
name,
|
|
168
|
-
nodeType,
|
|
169
|
-
icon,
|
|
170
|
-
cssClass,
|
|
171
|
-
description,
|
|
172
|
-
children: []
|
|
173
|
-
};
|
|
174
|
-
state.records.stack[state.records.stack.length - 1].children.push(node);
|
|
175
|
-
state.records.stack.push(node);
|
|
176
|
-
}, "addNode");
|
|
177
|
-
var db = {
|
|
178
|
-
clear: clear2,
|
|
179
|
-
addNode,
|
|
180
|
-
getRoot,
|
|
181
|
-
getCount,
|
|
182
|
-
getConfig: getConfig2,
|
|
183
|
-
getAccTitle,
|
|
184
|
-
getAccDescription,
|
|
185
|
-
getDiagramTitle,
|
|
186
|
-
setAccDescription,
|
|
187
|
-
setAccTitle,
|
|
188
|
-
setDiagramTitle
|
|
189
|
-
};
|
|
190
|
-
var db_default = db;
|
|
191
|
-
var populate = /* @__PURE__ */ __name((ast) => {
|
|
192
|
-
populateCommonDb(ast, db_default);
|
|
193
|
-
for (const node of ast.nodes) {
|
|
194
|
-
const level = typeof node.indent === "number" ? node.indent : 0;
|
|
195
|
-
let name = node.name;
|
|
196
|
-
const isDirectory = name.endsWith("/");
|
|
197
|
-
if (isDirectory) {
|
|
198
|
-
name = name.slice(0, -1);
|
|
199
|
-
}
|
|
200
|
-
const nodeType = isDirectory ? "directory" : "file";
|
|
201
|
-
const cssClass = node.classAnnotation || void 0;
|
|
202
|
-
const rawIcon = node.iconAnnotation;
|
|
203
|
-
const icon = rawIcon !== void 0 ? rawIcon || "none" : void 0;
|
|
204
|
-
const rawDesc = node.descAnnotation || void 0;
|
|
205
|
-
const description = rawDesc ? sanitizeText(rawDesc, getConfig()) : void 0;
|
|
206
|
-
db_default.addNode(level, name, nodeType, cssClass, icon, description);
|
|
207
|
-
}
|
|
208
|
-
}, "populate");
|
|
209
|
-
var parser = {
|
|
210
|
-
parse: /* @__PURE__ */ __name(async (input) => {
|
|
211
|
-
const { text, lineMap } = preprocessBoxDrawing(input);
|
|
212
|
-
try {
|
|
213
|
-
const ast = await parse("treeView", text);
|
|
214
|
-
log.debug(ast);
|
|
215
|
-
populate(ast);
|
|
216
|
-
} catch (error) {
|
|
217
|
-
if (lineMap.size > 0 && error instanceof Error) {
|
|
218
|
-
error.message = remapErrorLines(error.message, lineMap);
|
|
219
|
-
}
|
|
220
|
-
throw error;
|
|
221
|
-
}
|
|
222
|
-
}, "parse")
|
|
223
|
-
};
|
|
224
|
-
var treeViewIcons = {
|
|
225
|
-
prefix: "mermaid-treeview",
|
|
226
|
-
height: 24,
|
|
227
|
-
width: 24,
|
|
228
|
-
icons: {
|
|
229
|
-
folder: {
|
|
230
|
-
body: '<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'
|
|
231
|
-
},
|
|
232
|
-
file: {
|
|
233
|
-
body: '<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
function detectIcon(name, config) {
|
|
238
|
-
const filenameIcon = config?.filenameIcons?.[name];
|
|
239
|
-
if (filenameIcon) {
|
|
240
|
-
return filenameIcon;
|
|
241
|
-
}
|
|
242
|
-
const dotIdx = name.lastIndexOf(".");
|
|
243
|
-
if (dotIdx > 0) {
|
|
244
|
-
const ext = name.substring(dotIdx).toLowerCase();
|
|
245
|
-
const extensionIcons = config?.extensionIcons;
|
|
246
|
-
return extensionIcons?.[ext] ?? extensionIcons?.[ext.slice(1)];
|
|
247
|
-
}
|
|
248
|
-
return void 0;
|
|
249
|
-
}
|
|
250
|
-
__name(detectIcon, "detectIcon");
|
|
251
|
-
function qualifyIcon(icon, defaultIconPack) {
|
|
252
|
-
if (icon.includes(":")) {
|
|
253
|
-
return icon;
|
|
254
|
-
}
|
|
255
|
-
if (icon in treeViewIcons.icons || !defaultIconPack) {
|
|
256
|
-
return `${treeViewIcons.prefix}:${icon}`;
|
|
257
|
-
}
|
|
258
|
-
return `${defaultIconPack}:${icon}`;
|
|
259
|
-
}
|
|
260
|
-
__name(qualifyIcon, "qualifyIcon");
|
|
261
|
-
function getNodeIcon(node, config) {
|
|
262
|
-
if (node.icon === "none") {
|
|
263
|
-
return void 0;
|
|
264
|
-
}
|
|
265
|
-
if (node.icon) {
|
|
266
|
-
return qualifyIcon(node.icon, config.defaultIconPack);
|
|
267
|
-
}
|
|
268
|
-
if (!config.showIcons) {
|
|
269
|
-
return void 0;
|
|
270
|
-
}
|
|
271
|
-
if (node.nodeType === "file") {
|
|
272
|
-
const detected = detectIcon(node.name, config);
|
|
273
|
-
if (detected === "none") {
|
|
274
|
-
return void 0;
|
|
275
|
-
}
|
|
276
|
-
if (detected) {
|
|
277
|
-
return qualifyIcon(detected, config.defaultIconPack);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return `${treeViewIcons.prefix}:${node.nodeType === "directory" ? "folder" : "file"}`;
|
|
281
|
-
}
|
|
282
|
-
__name(getNodeIcon, "getNodeIcon");
|
|
283
|
-
registerIconPacks([
|
|
284
|
-
{
|
|
285
|
-
name: treeViewIcons.prefix,
|
|
286
|
-
icons: treeViewIcons
|
|
287
|
-
}
|
|
288
|
-
]);
|
|
289
|
-
var ICON_SIZE = 14;
|
|
290
|
-
var ICON_GAP = 4;
|
|
291
|
-
var DESC_GAP = 16;
|
|
292
|
-
var iconSymbolId = /* @__PURE__ */ __name((diagramId, icon) => `tv-icon-${diagramId}-${icon.replace(/[^\w-]/g, "-")}`, "iconSymbolId");
|
|
293
|
-
var injectIconDefs = /* @__PURE__ */ __name(async (svg, root, config, diagramId) => {
|
|
294
|
-
const usedIcons = /* @__PURE__ */ new Set();
|
|
295
|
-
const collect = /* @__PURE__ */ __name((node) => {
|
|
296
|
-
const icon = getNodeIcon(node, config);
|
|
297
|
-
if (icon) {
|
|
298
|
-
usedIcons.add(icon);
|
|
299
|
-
}
|
|
300
|
-
node.children.forEach(collect);
|
|
301
|
-
}, "collect");
|
|
302
|
-
collect(root);
|
|
303
|
-
if (usedIcons.size === 0) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
const iconSVGs = await Promise.all(
|
|
307
|
-
[...usedIcons].map(async (icon) => ({
|
|
308
|
-
icon,
|
|
309
|
-
svg: await getIconSVG(icon, {
|
|
310
|
-
height: ICON_SIZE,
|
|
311
|
-
width: ICON_SIZE
|
|
312
|
-
})
|
|
313
|
-
}))
|
|
314
|
-
);
|
|
315
|
-
const defs = svg.append("defs");
|
|
316
|
-
for (const { icon, svg: iconSVG } of iconSVGs) {
|
|
317
|
-
defs.append("g").attr("id", iconSymbolId(diagramId, icon)).html(iconSVG);
|
|
318
|
-
}
|
|
319
|
-
}, "injectIconDefs");
|
|
320
|
-
var positionLabel = /* @__PURE__ */ __name((x, y, node, domElem, config, diagramId) => {
|
|
321
|
-
const nodeGroup = domElem.append("g");
|
|
322
|
-
let cssClasses = "treeView-node-label";
|
|
323
|
-
if (node.nodeType === "directory") {
|
|
324
|
-
cssClasses += " treeView-node-dir";
|
|
325
|
-
}
|
|
326
|
-
if (node.cssClass) {
|
|
327
|
-
cssClasses += ` ${node.cssClass}`;
|
|
328
|
-
}
|
|
329
|
-
const iconOffset = ICON_SIZE + ICON_GAP;
|
|
330
|
-
const icon = getNodeIcon(node, config);
|
|
331
|
-
const showIcon = icon !== void 0;
|
|
332
|
-
if (icon) {
|
|
333
|
-
nodeGroup.append("use").attr("xlink:href", `#${iconSymbolId(diagramId, icon)}`).attr("x", x + config.paddingX).attr("y", y + config.paddingY).attr("class", "treeView-node-icon");
|
|
334
|
-
}
|
|
335
|
-
const label = nodeGroup.append("text").text(node.name).attr("dominant-baseline", "middle").attr("class", cssClasses);
|
|
336
|
-
const { height: labelHeight, width: labelWidth } = label.node().getBBox();
|
|
337
|
-
const height = labelHeight + config.paddingY * 2;
|
|
338
|
-
const labelX = x + config.paddingX + (showIcon ? iconOffset : 0);
|
|
339
|
-
label.attr("x", labelX);
|
|
340
|
-
label.attr("y", y + height / 2);
|
|
341
|
-
const labelRightEdge = labelX + labelWidth;
|
|
342
|
-
const width = labelWidth + config.paddingX * 2 + (showIcon ? iconOffset : 0);
|
|
343
|
-
node.BBox = { x, y, width, height };
|
|
344
|
-
if (node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
345
|
-
nodeGroup.insert("rect", ":first-child").attr("x", x).attr("y", y + 1).attr("width", 0).attr("height", height - 2).attr("rx", 3).attr("class", "treeView-highlight-bg");
|
|
346
|
-
}
|
|
347
|
-
return { node, nodeGroup, labelRightEdge, centerY: y + height / 2 };
|
|
348
|
-
}, "positionLabel");
|
|
349
|
-
var positionLine = /* @__PURE__ */ __name((domElem, x1, y1, x2, y2, lineThickness) => {
|
|
350
|
-
return domElem.append("line").attr("x1", x1).attr("y1", y1).attr("x2", x2).attr("y2", y2).attr("stroke-width", lineThickness).attr("class", "treeView-node-line");
|
|
351
|
-
}, "positionLine");
|
|
352
|
-
var drawTree = /* @__PURE__ */ __name((elem, root, config, diagramId) => {
|
|
353
|
-
let totalHeight = 0;
|
|
354
|
-
let totalWidth = 0;
|
|
355
|
-
const renderInfos = [];
|
|
356
|
-
const drawNode = /* @__PURE__ */ __name((elem2, node, config2, depth) => {
|
|
357
|
-
const indent = depth * (config2.rowIndent + config2.paddingX);
|
|
358
|
-
const info = positionLabel(indent, totalHeight, node, elem2, config2, diagramId);
|
|
359
|
-
renderInfos.push(info);
|
|
360
|
-
const { height, width } = node.BBox;
|
|
361
|
-
positionLine(
|
|
362
|
-
elem2,
|
|
363
|
-
indent - config2.rowIndent,
|
|
364
|
-
totalHeight + height / 2,
|
|
365
|
-
indent,
|
|
366
|
-
totalHeight + height / 2,
|
|
367
|
-
config2.lineThickness
|
|
368
|
-
);
|
|
369
|
-
totalWidth = Math.max(totalWidth, indent + width);
|
|
370
|
-
totalHeight += height;
|
|
371
|
-
}, "drawNode");
|
|
372
|
-
const processNode = /* @__PURE__ */ __name((node, depth = 0) => {
|
|
373
|
-
drawNode(elem, node, config, depth);
|
|
374
|
-
node.children.forEach((child) => {
|
|
375
|
-
processNode(child, depth + 1);
|
|
376
|
-
});
|
|
377
|
-
const { x, y, height } = node.BBox;
|
|
378
|
-
if (node.children.length) {
|
|
379
|
-
const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;
|
|
380
|
-
positionLine(
|
|
381
|
-
elem,
|
|
382
|
-
x + config.paddingX,
|
|
383
|
-
y + height,
|
|
384
|
-
x + config.paddingX,
|
|
385
|
-
endY + endHeight / 2 + config.lineThickness / 2,
|
|
386
|
-
config.lineThickness
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
}, "processNode");
|
|
390
|
-
processNode(root);
|
|
391
|
-
const nodesWithDesc = renderInfos.filter((ri) => ri.node.description);
|
|
392
|
-
if (nodesWithDesc.length > 0) {
|
|
393
|
-
const maxLabelRight = Math.max(...renderInfos.map((ri) => ri.labelRightEdge));
|
|
394
|
-
const descX = maxLabelRight + DESC_GAP;
|
|
395
|
-
for (const ri of nodesWithDesc) {
|
|
396
|
-
const desc = ri.nodeGroup.append("text").text(ri.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", descX).attr("y", ri.centerY);
|
|
397
|
-
const descBBox = desc.node().getBBox();
|
|
398
|
-
totalWidth = Math.max(totalWidth, descX + descBBox.width + config.paddingX);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
for (const ri of renderInfos) {
|
|
402
|
-
if (ri.node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
403
|
-
const rect = ri.nodeGroup.select(".treeView-highlight-bg");
|
|
404
|
-
if (!rect.empty()) {
|
|
405
|
-
const rectWidth = totalWidth - ri.node.BBox.x + 8;
|
|
406
|
-
rect.attr("width", rectWidth);
|
|
407
|
-
totalWidth = Math.max(totalWidth, ri.node.BBox.x + rectWidth + 2);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
return { totalHeight, totalWidth };
|
|
412
|
-
}, "drawTree");
|
|
413
|
-
var draw = /* @__PURE__ */ __name(async (text, id, _ver, diagObj) => {
|
|
414
|
-
log.debug("Rendering treeView diagram\n" + text);
|
|
415
|
-
const db2 = diagObj.db;
|
|
416
|
-
const root = db2.getRoot();
|
|
417
|
-
const config = db2.getConfig();
|
|
418
|
-
const svg = selectSvgElement(id);
|
|
419
|
-
await injectIconDefs(svg, root, config, id);
|
|
420
|
-
const treeElem = svg.append("g");
|
|
421
|
-
treeElem.attr("class", "tree-view");
|
|
422
|
-
const { totalHeight, totalWidth } = drawTree(treeElem, root, config, id);
|
|
423
|
-
svg.attr("viewBox", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);
|
|
424
|
-
configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth);
|
|
425
|
-
}, "draw");
|
|
426
|
-
var renderer = {
|
|
427
|
-
draw
|
|
428
|
-
};
|
|
429
|
-
var renderer_default = renderer;
|
|
430
|
-
var defaultTreeViewDiagramStyles = {
|
|
431
|
-
labelFontSize: "16px",
|
|
432
|
-
labelColor: "black",
|
|
433
|
-
lineColor: "black",
|
|
434
|
-
iconColor: "#546e7a",
|
|
435
|
-
descriptionColor: "#6a9955",
|
|
436
|
-
highlightBg: "rgba(255, 193, 7, 0.15)",
|
|
437
|
-
highlightStroke: "#ffc107"
|
|
438
|
-
};
|
|
439
|
-
var styles = /* @__PURE__ */ __name(({
|
|
440
|
-
treeView
|
|
441
|
-
}) => {
|
|
442
|
-
const {
|
|
443
|
-
labelFontSize,
|
|
444
|
-
labelColor,
|
|
445
|
-
lineColor,
|
|
446
|
-
iconColor,
|
|
447
|
-
descriptionColor,
|
|
448
|
-
highlightBg,
|
|
449
|
-
highlightStroke
|
|
450
|
-
} = cleanAndMerge(defaultTreeViewDiagramStyles, treeView);
|
|
451
|
-
return `
|
|
452
|
-
.treeView-node-label {
|
|
453
|
-
font-size: ${labelFontSize};
|
|
454
|
-
fill: ${labelColor};
|
|
455
|
-
white-space: pre;
|
|
456
|
-
}
|
|
457
|
-
.treeView-node-dir {
|
|
458
|
-
font-weight: bold;
|
|
459
|
-
}
|
|
460
|
-
.treeView-node-line {
|
|
461
|
-
stroke: ${lineColor};
|
|
462
|
-
}
|
|
463
|
-
.treeView-node-icon {
|
|
464
|
-
color: ${iconColor};
|
|
465
|
-
}
|
|
466
|
-
.treeView-node-description {
|
|
467
|
-
font-size: ${labelFontSize};
|
|
468
|
-
fill: ${descriptionColor};
|
|
469
|
-
font-style: italic;
|
|
470
|
-
white-space: pre;
|
|
471
|
-
}
|
|
472
|
-
.treeView-highlight-bg {
|
|
473
|
-
fill: ${highlightBg};
|
|
474
|
-
stroke: ${highlightStroke};
|
|
475
|
-
stroke-width: 1;
|
|
476
|
-
}
|
|
477
|
-
`;
|
|
478
|
-
}, "styles");
|
|
479
|
-
var styles_default = styles;
|
|
480
|
-
var diagram = {
|
|
481
|
-
db: db_default,
|
|
482
|
-
renderer: renderer_default,
|
|
483
|
-
parser,
|
|
484
|
-
styles: styles_default
|
|
485
|
-
};
|
|
486
|
-
export {
|
|
487
|
-
diagram
|
|
488
|
-
};
|