@aiderdesk/aiderdesk 0.88.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.
Files changed (163) hide show
  1. package/out/renderer/assets/2DXBBFLN-DhlZjS3f.js +666 -0
  2. package/out/renderer/assets/46IJ22JX-C1e8pvI2.js +853 -0
  3. package/out/renderer/assets/4TTDE5I4-Bea_IXhu.js +501 -0
  4. package/out/renderer/assets/4UF3HTLV-CVqcE2iq.js +29 -0
  5. package/out/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
  6. package/out/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
  7. package/out/renderer/assets/AAXQQPKT-BVbjBycX.js +1130 -0
  8. package/out/renderer/assets/AKE5O7KZ-Dr4O6i9X.js +184 -0
  9. package/out/renderer/assets/{AgentSettings-DffQ3g7i.js → AgentSettings-ByYnHHTv.js} +710 -255
  10. package/out/renderer/assets/BNMLP6AG-CHDGj3j_.js +804 -0
  11. package/out/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
  12. package/out/renderer/assets/DR6PKOQU-C6a3Tq7K.js +301 -0
  13. package/out/renderer/assets/E4RJ7UJB-BQWgl9gv.js +441 -0
  14. package/out/renderer/assets/ELSXBIJH-CVPK3kX4.js +39 -0
  15. package/out/renderer/assets/ERTIBQVS-71_Ru0iJ.js +182 -0
  16. package/out/renderer/assets/F653G4FO-Dj2Ang6n.js +1497 -0
  17. package/out/renderer/assets/FKCDD66M-DCrQTwBi.js +205 -0
  18. package/out/renderer/assets/FP7KDXVC-DKVnH-En.js +221 -0
  19. package/out/renderer/assets/FT5I3RHX-hlTJy7Nw.js +243 -0
  20. package/out/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
  21. package/out/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
  22. package/out/renderer/assets/GY35JXOZ-cSi0MdIc.js +168 -0
  23. package/out/renderer/assets/H5EEJPP2-bpYW0xE8.js +353 -0
  24. package/out/renderer/assets/HWDLEDTA-uLGgs5fE.js +982 -0
  25. package/out/renderer/assets/{InfoIcon-CMLVIQF3.js → InfoIcon-DI4teJbi.js} +1 -1
  26. package/out/renderer/assets/JZWSX6AR-B0pkfB2b.js +67 -0
  27. package/out/renderer/assets/KQOEJWJY-EQFQbIDt.js +84 -0
  28. package/out/renderer/assets/KS3BB3KE-DclWHpbY.js +138 -0
  29. package/out/renderer/assets/KXJRRZHI-CHoCRoQ4.js +502 -0
  30. package/out/renderer/assets/MFVI5XKI-TmPyVySZ.js +10 -0
  31. package/out/renderer/assets/MWY2J62P-BlVjis68.js +1102 -0
  32. package/out/renderer/assets/MXGNCBL2-HvKcixVr.js +216 -0
  33. package/out/renderer/assets/N6DAJLIZ-B0JHSPS3.js +120 -0
  34. package/out/renderer/assets/NU5M23IW-CWgVJ5o_.js +116 -0
  35. package/out/renderer/assets/NV4XNBIS-uOSoaYKk.js +1221 -0
  36. package/out/renderer/assets/OGLU4SIR-CiNpshB1.js +289 -0
  37. package/out/renderer/assets/OUNS5N76-C6p0zhvm.js +1064 -0
  38. package/out/renderer/assets/{Onboarding-699qRMTN.js → Onboarding-Ct6-CF4Z.js} +4 -4
  39. package/out/renderer/assets/PU4ISKXV-BQc-2oYa.js +515 -0
  40. package/out/renderer/assets/PUZGS23X-Bf89SCAj.js +21 -0
  41. package/out/renderer/assets/{ProviderHeader-BnuGEmze.js → ProviderHeader-Buje398H.js} +2 -2
  42. package/out/renderer/assets/Q3IYVLG5-DbP4qs2C.js +500 -0
  43. package/out/renderer/assets/QYHQDLKZ-dANs6SeT.js +983 -0
  44. package/out/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
  45. package/out/renderer/assets/RZSVICHU-CeuX_9H4.js +263 -0
  46. package/out/renderer/assets/{SettingsPage-CLTNRnQI.js → SettingsPage-CLpPKXG1.js} +975 -845
  47. package/out/renderer/assets/UEXXS2NB-Bmbum3yG.js +25 -0
  48. package/out/renderer/assets/UHTQJXKL-C2OuiQBx.js +134 -0
  49. package/out/renderer/assets/URA2L2QI-DJ2BF8fn.js +201 -0
  50. package/out/renderer/assets/UXCHDUKG-B6wMZRAn.js +173 -0
  51. package/out/renderer/assets/{UsageDashboard-DRihVOqx.js → UsageDashboard-ORnsHGxF.js} +9130 -6449
  52. package/out/renderer/assets/VKNV3BUX-BMK4lviM.js +277 -0
  53. package/out/renderer/assets/VMV7XPHP-CzHnUaWh.js +127 -0
  54. package/out/renderer/assets/WEVWDWVA-BYWYeLxq.js +57 -0
  55. package/out/renderer/assets/XRRJ35LF-DaeQ2kbN.js +119 -0
  56. package/out/renderer/assets/YFKBLVVN-DsXlM7HO.js +990 -0
  57. package/out/renderer/assets/YHRE5QGZ-nB9z3NP1.js +697 -0
  58. package/out/renderer/assets/ZF3OVT4B-Ctn5OOBd.js +420 -0
  59. package/out/renderer/assets/{index-CC_7dh5L.js → index-BCaQe4ny.js} +2 -2
  60. package/out/renderer/assets/{index-HjbPyDJm.js → index-BD-JYQGT.js} +5 -5
  61. package/out/renderer/assets/{index-CBVmxCYX.js → index-BGR4ZXWZ.js} +2 -2
  62. package/out/renderer/assets/{index-D1Him45L.js → index-BZBhErKV.js} +2 -2
  63. package/out/renderer/assets/{index-DUOs3uZb.js → index-BcWszklu.js} +1 -1
  64. package/out/renderer/assets/{index-D1jY29Az.js → index-BpNNugm2.js} +4 -4
  65. package/out/renderer/assets/{index-3hl2j-_p.js → index-BrgyIQaN.js} +2 -2
  66. package/out/renderer/assets/{index-BJ-vdpjD.js → index-Bt1dN7k_.js} +1 -1
  67. package/out/renderer/assets/{index-B41U46QG.js → index-Bxu6rqm3.js} +1 -1
  68. package/out/renderer/assets/{index-TTgmBk0H.js → index-C6mXHxX3.js} +1 -1
  69. package/out/renderer/assets/{index-CNGDTtBW.js → index-CCbq90uE.js} +1 -1
  70. package/out/renderer/assets/{index-4IKrE3Ch.js → index-CCm3UXZP.js} +2 -2
  71. package/out/renderer/assets/{index-CY4zeK5l.js → index-CNkiGtsK.js} +3 -3
  72. package/out/renderer/assets/{index-ly0cB32v.css → index-CWfnJXNI.css} +116 -0
  73. package/out/renderer/assets/{index-DZ8Tuuit.js → index-Cc-He418.js} +29267 -54630
  74. package/out/renderer/assets/{index-Otcl72On.js → index-Crdzxx6k.js} +19 -15
  75. package/out/renderer/assets/{index-Z7VaFhjR.js → index-D30k3y98.js} +1 -1
  76. package/out/renderer/assets/{index-Bv8Yvnki.js → index-DAWoHfjM.js} +2 -2
  77. package/out/renderer/assets/{index-tkTKXqGX.js → index-DG5AIC6J.js} +3 -3
  78. package/out/renderer/assets/{index-DHZvdQmh.js → index-DSBgCNMv.js} +2 -2
  79. package/out/renderer/assets/{index-D2Y9BB9n.js → index-DeRKeskE.js} +5 -5
  80. package/out/renderer/assets/{index-Dq8m0XiD.js → index-DgQEgdew.js} +2 -2
  81. package/out/renderer/assets/{index-BeF6VrSe.js → index-Dgdp4i2K.js} +1 -1
  82. package/out/renderer/assets/{index--DpoC2Fa.js → index-DnNK6R2g.js} +2 -2
  83. package/out/renderer/assets/{index-vBiBurKH.js → index-DrNutodm.js} +2 -2
  84. package/out/renderer/assets/{index-DTwId9nn.js → index-FS3mY8Ct.js} +1 -1
  85. package/out/renderer/assets/{index-DBHj35Nq.js → index-KId2jLzt.js} +2 -2
  86. package/out/renderer/assets/{index-BFLm6WFt.js → index-PyRCX6hq.js} +5 -5
  87. package/out/renderer/assets/{index-8-JzmzqC.js → index-U8nE80jx.js} +2 -2
  88. package/out/renderer/assets/{index-BhXi7Le_.js → index-Vw8jKJU_.js} +5 -5
  89. package/out/renderer/assets/{index-CnxPOcjf.js → index-_a6zbU-0.js} +1 -1
  90. package/out/renderer/assets/{index-BSh2X31_.js → index-dsqlqRSG.js} +5 -5
  91. package/out/renderer/assets/{index-C-WEDvyw.js → index-rQL1hwaP.js} +5 -5
  92. package/out/renderer/assets/{jsx-dev-runtime-DshTpFeb.js → jsx-dev-runtime-Bwt8d4vP.js} +1 -1
  93. package/out/renderer/index.html +2 -2
  94. package/out/resources/prompts/system-prompt.hbs +11 -0
  95. package/out/resources/skills/extension-creator/SKILL.md +20 -1
  96. package/out/resources/skills/extension-creator/references/event-types.md +3 -3
  97. package/out/resources/skills/extension-creator/references/extension-interface.md +52 -0
  98. package/out/resources/skills/extension-creator/references/external-agent-providers.md +90 -0
  99. package/out/runner.js +1456 -182
  100. package/package.json +2 -2
  101. package/out/renderer/assets/abnfDiagram-N423BO3Z-D0STbTTF.js +0 -118
  102. package/out/renderer/assets/arc-DeFSKBzy.js +0 -131
  103. package/out/renderer/assets/architectureDiagram-T3A2C74G-BDrfxwK6.js +0 -8829
  104. package/out/renderer/assets/band-zXq5o_Ib.js +0 -77
  105. package/out/renderer/assets/blockDiagram-VBNYF7ZC-x_YF9Yme.js +0 -3824
  106. package/out/renderer/assets/c4Diagram-5PPSVZJV-C7kuvNRf.js +0 -2482
  107. package/out/renderer/assets/channel-T97-CMvj.js +0 -7
  108. package/out/renderer/assets/chunk-2GRJ4B5K-C7nbnxgH.js +0 -116
  109. package/out/renderer/assets/chunk-2Q5K7J3B-D5IUyzX4.js +0 -19
  110. package/out/renderer/assets/chunk-5RXB4S5H-DkL2I1-Q.js +0 -1988
  111. package/out/renderer/assets/chunk-5VM5RSS4-qszW8EYL.js +0 -19
  112. package/out/renderer/assets/chunk-6Q2QTUOP-CbtMo4y_.js +0 -860
  113. package/out/renderer/assets/chunk-GF5L2VYU-C6qdgHXJ.js +0 -2026
  114. package/out/renderer/assets/chunk-JWPE2WC7-DxAg7bLn.js +0 -16
  115. package/out/renderer/assets/chunk-KBJHAD2P-Cqd2HDdS.js +0 -24
  116. package/out/renderer/assets/chunk-RYQCIY6F-DVzbqgRf.js +0 -474
  117. package/out/renderer/assets/chunk-XXDRQBXY-DF_8pbWI.js +0 -13
  118. package/out/renderer/assets/classDiagram-JCYQIIEL-MfTsDS5w.js +0 -23
  119. package/out/renderer/assets/classDiagram-v2-OCEON4UE-MfTsDS5w.js +0 -23
  120. package/out/renderer/assets/cose-bilkent-JH36ORCC-BvzyW9fn.js +0 -4942
  121. package/out/renderer/assets/cynefin-VYW2F7L2-BmRenSSB.js +0 -32093
  122. package/out/renderer/assets/cynefinDiagram-MW4NZA55-DmybMaTR.js +0 -453
  123. package/out/renderer/assets/cytoscape.esm-Bx_1tVW-.js +0 -30332
  124. package/out/renderer/assets/dagre-VZM6K2ZE-b6plu1_t.js +0 -522
  125. package/out/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
  126. package/out/renderer/assets/diagram-7IWD3JNH-B0LyLNK-.js +0 -488
  127. package/out/renderer/assets/diagram-B4RE2ZJO-BtJGLH72.js +0 -632
  128. package/out/renderer/assets/diagram-LBJQPF4R-BpSykW90.js +0 -212
  129. package/out/renderer/assets/diagram-Q27KOJAE-_vw0jdNl.js +0 -857
  130. package/out/renderer/assets/diagram-UB23O5K3-rE12zYQ8.js +0 -311
  131. package/out/renderer/assets/ebnfDiagram-BXEA7PRR-BXR1_d_o.js +0 -138
  132. package/out/renderer/assets/erDiagram-JOGREHBK-B1QCAGl4.js +0 -1238
  133. package/out/renderer/assets/flowDiagram-UKHOOZJN-wRfN63to.js +0 -2348
  134. package/out/renderer/assets/ganttDiagram-PKOTCBZU-DsXpzatp.js +0 -2782
  135. package/out/renderer/assets/gitGraphDiagram-DS77QQ5N-CsYsZ42q.js +0 -1373
  136. package/out/renderer/assets/graph-CfUL5tFv.js +0 -1308
  137. package/out/renderer/assets/infoDiagram-6WML65LV-BXT6TYnf.js +0 -31
  138. package/out/renderer/assets/init-CTO7spbL.js +0 -35
  139. package/out/renderer/assets/ishikawaDiagram-WSZJBQD7-6BJ687Ec.js +0 -967
  140. package/out/renderer/assets/journeyDiagram-NVQOT4AX-HgkRlCT0.js +0 -1255
  141. package/out/renderer/assets/kanban-definition-27J2QSJJ-COYri25f.js +0 -1052
  142. package/out/renderer/assets/layout-BBVpFPy1.js +0 -2326
  143. package/out/renderer/assets/linear-DuNIFrPi.js +0 -361
  144. package/out/renderer/assets/map-toxJVbdU.js +0 -299
  145. package/out/renderer/assets/mindmap-definition-FAOFIHXS-DhCEcxPL.js +0 -1153
  146. package/out/renderer/assets/ordinal-BD3Y6v77.js +0 -77
  147. package/out/renderer/assets/pegDiagram-VL7TDLO6-DZ8w3ViJ.js +0 -126
  148. package/out/renderer/assets/pieDiagram-7S7Q4E2Y-JcEYE_Dn.js +0 -316
  149. package/out/renderer/assets/quadrantDiagram-CIZ2JOQS-De59Sk4l.js +0 -1343
  150. package/out/renderer/assets/railroadDiagram-AXF67PYL-D7nWbE5S.js +0 -92
  151. package/out/renderer/assets/requirementDiagram-LRYGKXZP-DKWcKu7I.js +0 -1204
  152. package/out/renderer/assets/sankeyDiagram-W5VNT64P-Bj8jLitx.js +0 -1274
  153. package/out/renderer/assets/sequenceDiagram-SI44F4Z6-D9Jp65xC.js +0 -4514
  154. package/out/renderer/assets/sizeCapture-X5ZJPWSS-mY9H2lE6.js +0 -62
  155. package/out/renderer/assets/stateDiagram-OKZ733FA-BEn9ud4k.js +0 -452
  156. package/out/renderer/assets/stateDiagram-v2-UEYNNEHI-D_psrMs3.js +0 -22
  157. package/out/renderer/assets/swimlanes-SLNWSIFB-BMcpfWEi.js +0 -8557
  158. package/out/renderer/assets/swimlanesDiagram-ULZ7WXOC-OwdbT2xV.js +0 -20
  159. package/out/renderer/assets/time-DMe8nTku.js +0 -985
  160. package/out/renderer/assets/timeline-definition-Z64GVDOM-BTi-OvtJ.js +0 -1596
  161. package/out/renderer/assets/vennDiagram-T6HMQDX7-CoxSnB7W.js +0 -2515
  162. package/out/renderer/assets/wardleyDiagram-T6FBY63Y-Dj0FNpwr.js +0 -975
  163. package/out/renderer/assets/xychartDiagram-ELKLHX3M-jVSDR4Ov.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-D5IUyzX4.js";
2
- import { p as populateCommonDb } from "./chunk-JWPE2WC7-DxAg7bLn.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-DZ8Tuuit.js";
4
- import { p as parse } from "./cynefin-VYW2F7L2-BmRenSSB.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
- };