@sourcegraph/amp 0.0.1749585689-g82b91d → 0.0.1749600114-g5c00b8

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 (61) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/architectureDiagram-RWNHDUBN-1v8WgxdD.js +4635 -0
  3. package/dist/blockDiagram-XZSR5OGQ-XFBYN-jB.js +2243 -0
  4. package/dist/c4Diagram-6R2MQUNL-B0L0pltn.js +1587 -0
  5. package/dist/chunk-COUQ6RZ3-qd4eG6tc.js +17852 -0
  6. package/dist/chunk-CRQPXCKQ-yjI467Bq.js +65 -0
  7. package/dist/chunk-EFPBJHX4-DdHmqd0M.js +1378 -0
  8. package/dist/chunk-EOAU2GW5-CpRNAcjo.js +253 -0
  9. package/dist/chunk-IHYUGLNO-DJcRQIf7.js +1365 -0
  10. package/dist/chunk-K2ZEYYM2-CbqHhUqy.js +9 -0
  11. package/dist/chunk-Q7VUVKE6-gBSSbdjU.js +24 -0
  12. package/dist/chunk-T2M37SMK-Br8mK30k.js +1411 -0
  13. package/dist/chunk-TGZYFRKZ-BYBLXoJz.js +1331 -0
  14. package/dist/chunk-YJGJQOYZ-BGiSkWF0.js +19 -0
  15. package/dist/classDiagram-LB37KKQG-DhFsEyDS.js +17 -0
  16. package/dist/classDiagram-v2-KFQJBC22-DhFsEyDS.js +17 -0
  17. package/dist/{client-C1WG2nEf.js → client-D-YAg8x6.js} +6 -6
  18. package/dist/{console-DK0gDzNQ.js → console-CoE5Qzyz.js} +41106 -22971
  19. package/dist/create_file.node-Co0Uh1F3.js +21 -0
  20. package/dist/dagre-CMTPJJKG-UDPzd9Iy.js +446 -0
  21. package/dist/diagram-BIPOGRU5-B7TV59-n.js +128 -0
  22. package/dist/diagram-YF4VECWA-LsAZsciQ.js +219 -0
  23. package/dist/{edit_file.node-BH524GkF.js → edit_file.node-CmTZeBc2.js} +11 -11
  24. package/dist/erDiagram-AK44R45H-BWpeEu7D.js +843 -0
  25. package/dist/{executable-5cBRGrsC.js → executable-BE7tfoX5.js} +1 -1
  26. package/dist/{files-CybxYgbE.js → files-DqpRf5q4.js} +10 -10
  27. package/dist/flowDiagram-XARHJDSH-DzpV02UB.js +1618 -0
  28. package/dist/ganttDiagram-H5QQZTZ5-C0BhJTzn.js +1605 -0
  29. package/dist/gitGraphDiagram-XHLTLO3W-0EiOmv44.js +701 -0
  30. package/dist/{glob.node-C6HbLuPt.js → glob.node-DNei8bFS.js} +11 -11
  31. package/dist/{index-C2wo7rRZ.js → index-BcjxaWOc.js} +31 -31
  32. package/dist/infoDiagram-TP2HPDHO-CQX5a0Fc.js +24 -0
  33. package/dist/journeyDiagram-VHRN44N3-C82dEe4G.js +809 -0
  34. package/dist/kanban-definition-K5J3OUUV-xilJcrom.js +718 -0
  35. package/dist/katex-5N2NCDMP-CAsrnb6_.js +11703 -0
  36. package/dist/{list_directory.node-ZQscizpi.js → list_directory.node-CMiNNbXP.js} +1 -1
  37. package/dist/{load-profile-BbmyxO_7.js → load-profile-Cg8XaTx6.js} +1 -1
  38. package/dist/{main-CiUaVPC2.js → main-Dy2VZM_S.js} +15 -15
  39. package/dist/mindmap-definition-TI5ONXTW-BNaRba4R.js +3221 -0
  40. package/dist/{node-DvmQAW7h.js → node-BtG1o_DD.js} +2 -2
  41. package/dist/{node-VrazB_nQ.js → node-BulbxvrV.js} +58 -58
  42. package/dist/{node-Cpbjmhrj.js → node-Cp3D7_hw.js} +71 -71
  43. package/dist/{node-GgocwWwI.js → node-CtoBdTQT.js} +3 -3
  44. package/dist/{node-CiFAW-F3.js → node-Ctw1i0nl.js} +12 -12
  45. package/dist/{node-CgVq0JJ9.js → node-D1zxOCuN.js} +1 -1
  46. package/dist/pieDiagram-FPR3CNQC-_30_tQz0.js +120 -0
  47. package/dist/quadrantDiagram-RLP5YTJ2-CTD43GTk.js +1028 -0
  48. package/dist/radar-MK3ICKWK-55CS4JTO-afihMdR4.js +14398 -0
  49. package/dist/{read_file.node-CIdAFiJ6.js → read_file.node-QZ0VCmB2.js} +1 -1
  50. package/dist/requirementDiagram-P5NVWGNK-Sd2_6g8e.js +853 -0
  51. package/dist/sankeyDiagram-C6NZRJHT-D1EcCYaw.js +864 -0
  52. package/dist/sequenceDiagram-6SLVIXKN-CghQTpGf.js +2283 -0
  53. package/dist/stateDiagram-WI5ZVJ5I-Bv21MlSK.js +272 -0
  54. package/dist/stateDiagram-v2-KVDSFUFK-BgP0D8xL.js +17 -0
  55. package/dist/{stdio-D9HyubOc.js → stdio-CCCGI3C7.js} +8 -8
  56. package/dist/storybook.js +7 -7
  57. package/dist/timeline-definition-65575674-BUqRZdJ-.js +800 -0
  58. package/dist/{undo_edit.node-VYuTxRwd.js → undo_edit.node-BkletvTZ.js} +5 -5
  59. package/dist/xychartDiagram-674MFTBU-DjBabATx.js +1291 -0
  60. package/package.json +1 -1
  61. package/dist/create_file.node-DtVTaHj5.js +0 -21
@@ -0,0 +1,219 @@
1
+ #!/usr/bin/env node
2
+ import { p as k } from "./chunk-K2ZEYYM2-CbqHhUqy.js";
3
+ import { p as R } from "./radar-MK3ICKWK-55CS4JTO-afihMdR4.js";
4
+ import { _ as l, u as I, v as _, U as E, T as F, w as D, x as G, av as P, Z as z, a4 as y, a5 as w, a6 as B, A as V, aB as W } from "./console-CoE5Qzyz.js";
5
+ import "./chunk-TGZYFRKZ-BYBLXoJz.js";
6
+ var x = {
7
+ showLegend: !0,
8
+ ticks: 5,
9
+ max: null,
10
+ min: 0,
11
+ graticule: "circle"
12
+ }, C = {
13
+ axes: [],
14
+ curves: [],
15
+ options: x
16
+ }, h = structuredClone(C), H = B.radar, j = /* @__PURE__ */ l(() => y({
17
+ ...H,
18
+ ...w().radar
19
+ }), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), U = /* @__PURE__ */ l(() => h.curves, "getCurves"), Z = /* @__PURE__ */ l(() => h.options, "getOptions"), N = /* @__PURE__ */ l((a) => {
20
+ h.axes = a.map((t) => ({
21
+ name: t.name,
22
+ label: t.label ?? t.name
23
+ }));
24
+ }, "setAxes"), X = /* @__PURE__ */ l((a) => {
25
+ h.curves = a.map((t) => ({
26
+ name: t.name,
27
+ label: t.label ?? t.name,
28
+ entries: Y(t.entries)
29
+ }));
30
+ }, "setCurves"), Y = /* @__PURE__ */ l((a) => {
31
+ if (a[0].axis == null)
32
+ return a.map((e) => e.value);
33
+ const t = b();
34
+ if (t.length === 0)
35
+ throw new Error("Axes must be populated before curves for reference entries");
36
+ return t.map((e) => {
37
+ const r = a.find((s) => s.axis?.$refText === e.name);
38
+ if (r === void 0)
39
+ throw new Error("Missing entry for axis " + e.label);
40
+ return r.value;
41
+ });
42
+ }, "computeCurveEntries"), q = /* @__PURE__ */ l((a) => {
43
+ const t = a.reduce(
44
+ (e, r) => (e[r.name] = r, e),
45
+ {}
46
+ );
47
+ h.options = {
48
+ showLegend: t.showLegend?.value ?? x.showLegend,
49
+ ticks: t.ticks?.value ?? x.ticks,
50
+ max: t.max?.value ?? x.max,
51
+ min: t.min?.value ?? x.min,
52
+ graticule: t.graticule?.value ?? x.graticule
53
+ };
54
+ }, "setOptions"), J = /* @__PURE__ */ l(() => {
55
+ z(), h = structuredClone(C);
56
+ }, "clear"), $ = {
57
+ getAxes: b,
58
+ getCurves: U,
59
+ getOptions: Z,
60
+ setAxes: N,
61
+ setCurves: X,
62
+ setOptions: q,
63
+ getConfig: j,
64
+ clear: J,
65
+ setAccTitle: G,
66
+ getAccTitle: D,
67
+ setDiagramTitle: F,
68
+ getDiagramTitle: E,
69
+ getAccDescription: _,
70
+ setAccDescription: I
71
+ }, K = /* @__PURE__ */ l((a) => {
72
+ k(a, $);
73
+ const { axes: t, curves: e, options: r } = a;
74
+ $.setAxes(t), $.setCurves(e), $.setOptions(r);
75
+ }, "populate"), Q = {
76
+ parse: /* @__PURE__ */ l(async (a) => {
77
+ const t = await R("radar", a);
78
+ V.debug(t), K(t);
79
+ }, "parse")
80
+ }, tt = /* @__PURE__ */ l((a, t, e, r) => {
81
+ const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = P(t), u = et(p, c), g = n.max ?? Math.max(...i.map((f) => Math.max(...f.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
82
+ at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
83
+ }, "draw"), et = /* @__PURE__ */ l((a, t) => {
84
+ const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
85
+ x: t.marginLeft + t.width / 2,
86
+ y: t.marginTop + t.height / 2
87
+ };
88
+ return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
89
+ }, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
90
+ if (s === "circle")
91
+ for (let o = 0; o < r; o++) {
92
+ const i = e * (o + 1) / r;
93
+ a.append("circle").attr("r", i).attr("class", "radarGraticule");
94
+ }
95
+ else if (s === "polygon") {
96
+ const o = t.length;
97
+ for (let i = 0; i < r; i++) {
98
+ const n = e * (i + 1) / r, c = t.map((d, p) => {
99
+ const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
100
+ return `${g},${m}`;
101
+ }).join(" ");
102
+ a.append("polygon").attr("points", c).attr("class", "radarGraticule");
103
+ }
104
+ }
105
+ }, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
106
+ const s = t.length;
107
+ for (let o = 0; o < s; o++) {
108
+ const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
109
+ a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
110
+ }
111
+ }, "drawAxes");
112
+ function M(a, t, e, r, s, o, i) {
113
+ const n = t.length, c = Math.min(i.width, i.height) / 2;
114
+ e.forEach((d, p) => {
115
+ if (d.entries.length !== n)
116
+ return;
117
+ const u = d.entries.map((g, m) => {
118
+ const v = 2 * Math.PI * m / n - Math.PI / 2, f = A(g, r, s, c), O = f * Math.cos(v), S = f * Math.sin(v);
119
+ return { x: O, y: S };
120
+ });
121
+ o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
122
+ });
123
+ }
124
+ l(M, "drawCurves");
125
+ function A(a, t, e, r) {
126
+ const s = Math.min(Math.max(a, t), e);
127
+ return r * (s - t) / (e - t);
128
+ }
129
+ l(A, "relativeRadius");
130
+ function L(a, t) {
131
+ const e = a.length;
132
+ let r = `M${a[0].x},${a[0].y}`;
133
+ for (let s = 0; s < e; s++) {
134
+ const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
135
+ x: i.x + (n.x - o.x) * t,
136
+ y: i.y + (n.y - o.y) * t
137
+ }, p = {
138
+ x: n.x - (c.x - i.x) * t,
139
+ y: n.y - (c.y - i.y) * t
140
+ };
141
+ r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
142
+ }
143
+ return `${r} Z`;
144
+ }
145
+ l(L, "closedRoundCurve");
146
+ function T(a, t, e, r) {
147
+ if (!e)
148
+ return;
149
+ const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
150
+ t.forEach((n, c) => {
151
+ const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
152
+ d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
153
+ });
154
+ }
155
+ l(T, "drawLegend");
156
+ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
157
+ let e = "";
158
+ for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
159
+ const s = a[`cScale${r}`];
160
+ e += `
161
+ .radarCurve-${r} {
162
+ color: ${s};
163
+ fill: ${s};
164
+ fill-opacity: ${t.curveOpacity};
165
+ stroke: ${s};
166
+ stroke-width: ${t.curveStrokeWidth};
167
+ }
168
+ .radarLegendBox-${r} {
169
+ fill: ${s};
170
+ fill-opacity: ${t.curveOpacity};
171
+ stroke: ${s};
172
+ }
173
+ `;
174
+ }
175
+ return e;
176
+ }, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
177
+ const t = W(), e = w(), r = y(t, e.themeVariables), s = y(r.radar, a);
178
+ return { themeVariables: r, radarOptions: s };
179
+ }, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
180
+ const { themeVariables: t, radarOptions: e } = ot(a);
181
+ return `
182
+ .radarTitle {
183
+ font-size: ${t.fontSize};
184
+ color: ${t.titleColor};
185
+ dominant-baseline: hanging;
186
+ text-anchor: middle;
187
+ }
188
+ .radarAxisLine {
189
+ stroke: ${e.axisColor};
190
+ stroke-width: ${e.axisStrokeWidth};
191
+ }
192
+ .radarAxisLabel {
193
+ dominant-baseline: middle;
194
+ text-anchor: middle;
195
+ font-size: ${e.axisLabelFontSize}px;
196
+ color: ${e.axisColor};
197
+ }
198
+ .radarGraticule {
199
+ fill: ${e.graticuleColor};
200
+ fill-opacity: ${e.graticuleOpacity};
201
+ stroke: ${e.graticuleColor};
202
+ stroke-width: ${e.graticuleStrokeWidth};
203
+ }
204
+ .radarLegendText {
205
+ text-anchor: start;
206
+ font-size: ${e.legendFontSize}px;
207
+ dominant-baseline: hanging;
208
+ }
209
+ ${nt(t, e)}
210
+ `;
211
+ }, "styles"), pt = {
212
+ parser: Q,
213
+ db: $,
214
+ renderer: st,
215
+ styles: it
216
+ };
217
+ export {
218
+ pt as diagram
219
+ };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { p, aF as m, aG as F, aH as v, aI as _, aJ as b } from "./console-DK0gDzNQ.js";
3
- import { recordEdit as x } from "./undo_edit.node-VYuTxRwd.js";
2
+ import { b as m, d as p, r as b, b$ as F, c0 as v, c1 as _ } from "./console-CoE5Qzyz.js";
3
+ import { recordEdit as x } from "./undo_edit.node-BkletvTZ.js";
4
4
  class y {
5
5
  #e = !1;
6
6
  #t = [];
@@ -21,13 +21,13 @@ class y {
21
21
  this.#t.length > 0 ? this.#t.shift()?.() : this.#e = !1;
22
22
  }
23
23
  }
24
- const l = new y(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileChange: h, filesystem: i }) => p(async (a) => {
24
+ const l = new y(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileChange: h, filesystem: i }) => m(async (n) => {
25
25
  await l.acquire();
26
26
  try {
27
- E(e), m(t);
28
- const r = await F(i, d, e.path, a);
27
+ E(e), p(t);
28
+ const r = await b(i, d, e.path, n);
29
29
  if (!i.exclusiveWriter) {
30
- const s = v(r, u), c = await i.getMtime(r);
30
+ const s = F(r, u), c = await i.getMtime(r);
31
31
  if (s && c && s !== c)
32
32
  return {
33
33
  status: "error",
@@ -37,14 +37,14 @@ const l = new y(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileCh
37
37
  }
38
38
  };
39
39
  }
40
- const n = await i.readFile(r, a), { modifiedContent: o, formattedDiff: f, lineRange: w } = await _(
40
+ const a = await i.readFile(r, n), { modifiedContent: o, formattedDiff: f, lineRange: w } = await v(
41
41
  e.path,
42
- n,
42
+ a,
43
43
  e.old_str,
44
44
  e.new_str
45
45
  );
46
- return await x(e.path, n, o), await h(r, async (s) => {
47
- await i.writeFile(s, o, a);
46
+ return await x(e.path, a, o), await h(r, async (s) => {
47
+ await i.writeFile(s, o, n);
48
48
  }), {
49
49
  status: "done",
50
50
  progress: {},
@@ -59,7 +59,7 @@ const l = new y(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileCh
59
59
  }
60
60
  });
61
61
  function E(e) {
62
- if (e = b.parse(e), e.old_str === e.new_str)
62
+ if (e = _.parse(e), e.old_str === e.new_str)
63
63
  throw new Error("old_str and new_str must be different from each other.");
64
64
  }
65
65
  export {