@foris/ai-agent 0.3.0 → 0.4.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 (57) hide show
  1. package/dist/ai-agent.es.js +3 -3
  2. package/dist/ai-agent.umd.js +619 -609
  3. package/dist/ai-prompt-code-editor/PromptCodeEditor.d.ts +15 -0
  4. package/dist/ai-prompt-code-editor/index.d.ts +1 -0
  5. package/dist/ai-prompt-code-editor/promptCodeEditor.mock.d.ts +5 -0
  6. package/dist/arc-CYayZuAl.js +85 -0
  7. package/dist/{architectureDiagram-VXUJARFQ-CuFlEJrK.js → architectureDiagram-VXUJARFQ-CqFKxLlH.js} +3 -3
  8. package/dist/{blockDiagram-VD42YOAC-Ceho4Zhj.js → blockDiagram-VD42YOAC-DEi-xIcu.js} +46 -46
  9. package/dist/{c4Diagram-YG6GDRKO-zPB3iQJ7.js → c4Diagram-YG6GDRKO-mFZhX_-U.js} +3 -3
  10. package/dist/channel-CbDO3juL.js +5 -0
  11. package/dist/{chunk-4BX2VUAB-BZlHuf6l.js → chunk-4BX2VUAB-D5qkn5BA.js} +1 -1
  12. package/dist/{chunk-55IACEB6-Dr8rgvy_.js → chunk-55IACEB6-CR8xZK7z.js} +1 -1
  13. package/dist/{chunk-B4BG7PRW-Ccllo2e-.js → chunk-B4BG7PRW-Cm3F2ypm.js} +11 -11
  14. package/dist/{chunk-DI55MBZ5-DvAROTIr.js → chunk-DI55MBZ5-CxISwEU9.js} +44 -44
  15. package/dist/{chunk-FMBD7UC4-CVr83prI.js → chunk-FMBD7UC4-DZxSUJCY.js} +1 -1
  16. package/dist/{chunk-QN33PNHL-nSyFq8_s.js → chunk-QN33PNHL-5NUdQ31M.js} +1 -1
  17. package/dist/{chunk-QZHKN3VN-Dg8JYP6e.js → chunk-QZHKN3VN-CSeHgX9s.js} +1 -1
  18. package/dist/{chunk-TZMSLE5B-Bmj6LGNW.js → chunk-TZMSLE5B-DfqMo2XK.js} +1 -1
  19. package/dist/{classDiagram-2ON5EDUG-DAkxtl6o.js → classDiagram-2ON5EDUG-6wC7c07U.js} +6 -6
  20. package/dist/{classDiagram-v2-WZHVMYZB-DAkxtl6o.js → classDiagram-v2-WZHVMYZB-6wC7c07U.js} +6 -6
  21. package/dist/code-block-QI2IAROF-zqFu2qJj.js +2812 -0
  22. package/dist/{cose-bilkent-S5V4N54A-DwRYWoaW.js → cose-bilkent-S5V4N54A-BzL4MMWZ.js} +2 -2
  23. package/dist/{dagre-6UL2VRFP-imN1Fyg8.js → dagre-6UL2VRFP-CwTDE2RX.js} +3 -3
  24. package/dist/{diagram-PSM6KHXK-DAIDeBLn.js → diagram-PSM6KHXK-UeQhynP7.js} +47 -47
  25. package/dist/{diagram-QEK2KX5R-DQFy-qK9.js → diagram-QEK2KX5R-DZy1cp9G.js} +13 -13
  26. package/dist/{diagram-S2PKOQOG-Hlk0Nx_Y.js → diagram-S2PKOQOG-DyT7Ss8-.js} +16 -16
  27. package/dist/{erDiagram-Q2GNP2WA-C8PZPSaf.js → erDiagram-Q2GNP2WA-CpzaErVm.js} +5 -5
  28. package/dist/{flowDiagram-NV44I4VS-CgTiIFnt.js → flowDiagram-NV44I4VS-BHP6h-eN.js} +6 -6
  29. package/dist/{ganttDiagram-JELNMOA3-DzYZEAE_.js → ganttDiagram-JELNMOA3-0qqei9Bz.js} +3 -3
  30. package/dist/{gitGraphDiagram-NY62KEGX-CPwI-Uag.js → gitGraphDiagram-NY62KEGX-DGukWnfa.js} +16 -16
  31. package/dist/hooks/useCodeTransform.d.ts +13 -0
  32. package/dist/{index-C2DJ8qoy.js → index-Zd10d_CE.js} +18512 -11461
  33. package/dist/index.d.ts +2 -2
  34. package/dist/{infoDiagram-WHAUD3N6-CcN7ZNYI.js → infoDiagram-WHAUD3N6-CRWuQBon.js} +2 -2
  35. package/dist/{journeyDiagram-XKPGCS4Q-BACao6jz.js → journeyDiagram-XKPGCS4Q-Bl-asDPd.js} +5 -5
  36. package/dist/{kanban-definition-3W4ZIXB7-Jb7Xwf92.js → kanban-definition-3W4ZIXB7-IdguZzXg.js} +39 -39
  37. package/dist/{linear-CxGB80S5.js → linear-CRqCHTKs.js} +1 -1
  38. package/dist/{mermaid-NA5CF7SZ-DekDSZe_.js → mermaid-NA5CF7SZ-CkTMfgBy.js} +1 -1
  39. package/dist/{mermaid.core-xMGW442o.js → mermaid.core-DyFxH-Px.js} +87 -87
  40. package/dist/{mindmap-definition-VGOIOE7T-UHZgRHb7.js → mindmap-definition-VGOIOE7T-C8jP5oWr.js} +69 -69
  41. package/dist/{pieDiagram-ADFJNKIX-CHrTFTbw.js → pieDiagram-ADFJNKIX-DuP0zFKX.js} +23 -23
  42. package/dist/{quadrantDiagram-AYHSOK5B-CDfhMB18.js → quadrantDiagram-AYHSOK5B-ACKBMWQA.js} +3 -3
  43. package/dist/{requirementDiagram-UZGBJVZJ-C0aeVQh6.js → requirementDiagram-UZGBJVZJ-DAH6cyPg.js} +4 -4
  44. package/dist/{sankeyDiagram-TZEHDZUN-kjxRgXd2.js → sankeyDiagram-TZEHDZUN-DpLK8yNI.js} +2 -2
  45. package/dist/{sequenceDiagram-WL72ISMW-Bs0jyVuH.js → sequenceDiagram-WL72ISMW-CslcsjON.js} +4 -4
  46. package/dist/{stateDiagram-FKZM4ZOC-CAWwlh9R.js → stateDiagram-FKZM4ZOC-oVuJ6JZY.js} +12 -12
  47. package/dist/{stateDiagram-v2-4FDKWEC3-9TYlTzc3.js → stateDiagram-v2-4FDKWEC3-Dw3L9jZX.js} +5 -5
  48. package/dist/style.css +1 -1
  49. package/dist/tailwind.css +52 -0
  50. package/dist/{timeline-definition-IT6M3QCI-DrPozOxH.js → timeline-definition-IT6M3QCI-D_aGDXh0.js} +47 -47
  51. package/dist/{xychartDiagram-PRI3JC2R-BkO8dJff.js → xychartDiagram-PRI3JC2R-u3osfT09.js} +35 -35
  52. package/package.json +2 -1
  53. package/dist/ai-input-action/InputAction.d.ts +0 -8
  54. package/dist/ai-input-action/index.d.ts +0 -1
  55. package/dist/arc-DN1xn8kz.js +0 -85
  56. package/dist/channel-BC4mWQQF.js +0 -5
  57. package/dist/code-block-QI2IAROF-DN-BnDmt.js +0 -9263
@@ -1,6 +1,6 @@
1
- import { _ as V, j as lt, l as k } from "./mermaid.core-xMGW442o.js";
1
+ import { _ as V, j as lt, l as k } from "./mermaid.core-DyFxH-Px.js";
2
2
  import { c as J } from "./cytoscape.esm-ClN43hhW.js";
3
- import { c as $, g as gt } from "./index-C2DJ8qoy.js";
3
+ import { c as $, g as gt } from "./index-Zd10d_CE.js";
4
4
  import "react";
5
5
  import "react-dom";
6
6
  var tt = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, q;
@@ -1,7 +1,7 @@
1
- import { _ as X, al as F, am as Y, an as j, ao as H, l as i, d as V, ap as q, aq as U, ag as $, ar as z, ah as P, af as K, as as Q, at as W, au as Z } from "./mermaid.core-xMGW442o.js";
1
+ import { _ as X, al as j, am as F, an as Y, ao as H, l as i, d as V, ap as q, aq as U, ai as $, ar as z, aj as P, ah as K, as as Q, at as W, au as Z } from "./mermaid.core-DyFxH-Px.js";
2
2
  import { i as x, G as B } from "./graph-DB2UxkYH.js";
3
3
  import { b as L, m as A, l as I } from "./layout-Q6wQN5dr.js";
4
- import "./index-C2DJ8qoy.js";
4
+ import "./index-Zd10d_CE.js";
5
5
  import "react";
6
6
  import "react-dom";
7
7
  var ee = 4;
@@ -401,7 +401,7 @@ Parent cluster`,
401
401
  }).setDefaultEdgeLabel(function() {
402
402
  return {};
403
403
  }), o = t.select("g");
404
- F(o, e.markers, e.type, e.diagramId), Y(), j(), H(), ie(), e.nodes.forEach((g) => {
404
+ j(o, e.markers, e.type, e.diagramId), F(), Y(), H(), ie(), e.nodes.forEach((g) => {
405
405
  n.setNode(g.id, { ...g }), g.parentId && n.setParent(g.id, g.parentId);
406
406
  }), i.debug("Edges:", e.edges), e.edges.forEach((g) => {
407
407
  if (g.start === g.end) {
@@ -1,10 +1,10 @@
1
- import { s as he, g as ue, n as pe, o as fe, b as ge, c as me, _ as w, E as te, D as ae, b2 as ye, t as Se, C as ve, l as K, H as xe, k as be, b3 as P, j as Y } from "./mermaid.core-xMGW442o.js";
2
- import { s as we } from "./chunk-QN33PNHL-nSyFq8_s.js";
3
- import { p as Ce } from "./chunk-4BX2VUAB-BZlHuf6l.js";
1
+ import { s as he, g as ue, o as pe, p as fe, b as ge, c as me, _ as w, G as te, F as ae, b2 as ye, v as Se, E as ve, l as J, K as xe, k as be, b3 as P, j as Y } from "./mermaid.core-DyFxH-Px.js";
2
+ import { s as we } from "./chunk-QN33PNHL-5NUdQ31M.js";
3
+ import { p as Ce } from "./chunk-4BX2VUAB-D5qkn5BA.js";
4
4
  import { p as Te } from "./treemap-KMMF4GRG-D_L55G0b.js";
5
5
  import { b as I } from "./defaultLocale-DcQU6Vee.js";
6
- import { o as J } from "./ordinal-MUacOSdK.js";
7
- import "./index-C2DJ8qoy.js";
6
+ import { o as Z } from "./ordinal-MUacOSdK.js";
7
+ import "./index-Zd10d_CE.js";
8
8
  import "react";
9
9
  import "react-dom";
10
10
  import "./init-DjUOC4st.js";
@@ -26,14 +26,14 @@ function Ae(t, a) {
26
26
  t.call(a, n, ++l, this);
27
27
  return this;
28
28
  }
29
- function ke(t, a) {
29
+ function Fe(t, a) {
30
30
  for (var l = this, n = [l], o, s, d = -1; l = n.pop(); )
31
31
  if (t.call(a, l, ++d, this), o = l.children)
32
32
  for (s = o.length - 1; s >= 0; --s)
33
33
  n.push(o[s]);
34
34
  return this;
35
35
  }
36
- function Fe(t, a) {
36
+ function ke(t, a) {
37
37
  for (var l = this, n = [l], o = [], s, d, h, g = -1; l = n.pop(); )
38
38
  if (o.push(l), s = l.children)
39
39
  for (d = 0, h = s.length; d < h; ++d)
@@ -106,10 +106,10 @@ function* Re() {
106
106
  }
107
107
  function Q(t, a) {
108
108
  t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ie)) : a === void 0 && (a = He);
109
- for (var l = new U(t), n, o = [l], s, d, h, g; n = o.pop(); )
109
+ for (var l = new K(t), n, o = [l], s, d, h, g; n = o.pop(); )
110
110
  if ((d = a(n.data)) && (g = (d = Array.from(d)).length))
111
111
  for (n.children = d, h = g - 1; h >= 0; --h)
112
- o.push(s = d[h] = new U(d[h])), s.parent = n, s.depth = n.depth + 1;
112
+ o.push(s = d[h] = new K(d[h])), s.parent = n, s.depth = n.depth + 1;
113
113
  return l.eachBefore(Ge);
114
114
  }
115
115
  function We() {
@@ -130,15 +130,15 @@ function Ge(t) {
130
130
  t.height = a;
131
131
  while ((t = t.parent) && t.height < ++a);
132
132
  }
133
- function U(t) {
133
+ function K(t) {
134
134
  this.data = t, this.depth = this.height = 0, this.parent = null;
135
135
  }
136
- U.prototype = Q.prototype = {
137
- constructor: U,
136
+ K.prototype = Q.prototype = {
137
+ constructor: K,
138
138
  count: $e,
139
139
  each: Ae,
140
- eachAfter: Fe,
141
- eachBefore: ke,
140
+ eachAfter: ke,
141
+ eachBefore: Fe,
142
142
  find: Ne,
143
143
  sum: Me,
144
144
  sort: _e,
@@ -174,34 +174,34 @@ function Ye(t, a, l, n, o) {
174
174
  for (var s = t.children, d, h = -1, g = s.length, c = t.value && (o - l) / t.value; ++h < g; )
175
175
  d = s[h], d.x0 = a, d.x1 = n, d.y0 = l, d.y1 = l += d.value * c;
176
176
  }
177
- var Ue = (1 + Math.sqrt(5)) / 2;
178
- function Ze(t, a, l, n, o, s) {
179
- for (var d = [], h = a.children, g, c, u = 0, b = 0, r = h.length, x, S, v = a.value, p, m, N, F, V, E, M; u < r; ) {
177
+ var Ke = (1 + Math.sqrt(5)) / 2;
178
+ function Ue(t, a, l, n, o, s) {
179
+ for (var d = [], h = a.children, g, c, u = 0, b = 0, r = h.length, x, S, v = a.value, p, m, N, k, V, E, M; u < r; ) {
180
180
  x = o - l, S = s - n;
181
181
  do
182
182
  p = h[b++].value;
183
183
  while (!p && b < r);
184
184
  for (m = N = p, E = Math.max(S / x, x / S) / (v * t), M = p * p * E, V = Math.max(N / M, M / m); b < r; ++b) {
185
- if (p += c = h[b].value, c < m && (m = c), c > N && (N = c), M = p * p * E, F = Math.max(N / M, M / m), F > V) {
185
+ if (p += c = h[b].value, c < m && (m = c), c > N && (N = c), M = p * p * E, k = Math.max(N / M, M / m), k > V) {
186
186
  p -= c;
187
187
  break;
188
188
  }
189
- V = F;
189
+ V = k;
190
190
  }
191
191
  d.push(g = { value: p, dice: x < S, children: h.slice(u, b) }), g.dice ? Xe(g, l, n, o, v ? n += S * p / v : s) : Ye(g, l, n, v ? l += x * p / v : o, s), v -= p, u = b;
192
192
  }
193
193
  return d;
194
194
  }
195
- const Je = function t(a) {
195
+ const Ze = function t(a) {
196
196
  function l(n, o, s, d, h) {
197
- Ze(a, n, o, s, d, h);
197
+ Ue(a, n, o, s, d, h);
198
198
  }
199
199
  return l.ratio = function(n) {
200
200
  return t((n = +n) > 1 ? n : 1);
201
201
  }, l;
202
- }(Ue);
203
- function Ke() {
204
- var t = Je, a = !1, l = 1, n = 1, o = [0], s = O, d = O, h = O, g = O, c = O;
202
+ }(Ke);
203
+ function Je() {
204
+ var t = Ze, a = !1, l = 1, n = 1, o = [0], s = O, d = O, h = O, g = O, c = O;
205
205
  function u(r) {
206
206
  return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), o = [0], a && r.eachBefore(qe), r;
207
207
  }
@@ -320,7 +320,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
320
320
  var a;
321
321
  try {
322
322
  const n = await Te("treemap", t);
323
- K.debug("Treemap AST:", n);
323
+ J.debug("Treemap AST:", n);
324
324
  const o = (a = re.parser) == null ? void 0 : a.yy;
325
325
  if (!(o instanceof ne))
326
326
  throw new Error(
@@ -328,7 +328,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
328
328
  );
329
329
  Qe(n, o);
330
330
  } catch (l) {
331
- throw K.error("Error parsing treemap:", l), l;
331
+ throw J.error("Error parsing treemap:", l), l;
332
332
  }
333
333
  }, "parse")
334
334
  }, tt = 10, B = 10, j = 25, at = /* @__PURE__ */ w((t, a, l, n) => {
@@ -351,9 +351,9 @@ var Qe = /* @__PURE__ */ w((t, a) => {
351
351
  } else
352
352
  p = I(e);
353
353
  } catch (e) {
354
- K.error("Error creating format function:", e), p = I(",");
354
+ J.error("Error creating format function:", e), p = I(",");
355
355
  }
356
- const m = J().range([
356
+ const m = Z().range([
357
357
  "transparent",
358
358
  c.cScale0,
359
359
  c.cScale1,
@@ -367,7 +367,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
367
367
  c.cScale9,
368
368
  c.cScale10,
369
369
  c.cScale11
370
- ]), N = J().range([
370
+ ]), N = Z().range([
371
371
  "transparent",
372
372
  c.cScalePeer0,
373
373
  c.cScalePeer1,
@@ -381,7 +381,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
381
381
  c.cScalePeer9,
382
382
  c.cScalePeer10,
383
383
  c.cScalePeer11
384
- ]), F = J().range([
384
+ ]), k = Z().range([
385
385
  c.cScaleLabel0,
386
386
  c.cScaleLabel1,
387
387
  c.cScaleLabel2,
@@ -396,7 +396,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
396
396
  c.cScaleLabel11
397
397
  ]);
398
398
  h && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(h);
399
- const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), E = Q(g).sum((e) => e.value ?? 0).sort((e, i) => (i.value ?? 0) - (e.value ?? 0)), ee = Ke().size([r, x]).paddingTop(
399
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), E = Q(g).sum((e) => e.value ?? 0).sort((e, i) => (i.value ?? 0) - (e.value ?? 0)), ee = Je().size([r, x]).paddingTop(
400
400
  (e) => e.children && e.children.length > 0 ? j + B : 0
401
401
  ).paddingInner(d).paddingLeft((e) => e.children && e.children.length > 0 ? B : 0).paddingRight((e) => e.children && e.children.length > 0 ? B : 0).paddingBottom((e) => e.children && e.children.length > 0 ? B : 0).round(!0)(E), se = ee.descendants().filter((e) => e.children && e.children.length > 0), R = V.selectAll(".treemapSection").data(se).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
402
402
  R.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", j).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), R.append("clipPath").attr("id", (e, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", j), R.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, i) => `treemapSection section${i}`).attr("fill", (e) => m(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
@@ -407,7 +407,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
407
407
  }), R.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", j / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => {
408
408
  if (e.depth === 0)
409
409
  return "display: none;";
410
- const i = "dominant-baseline: middle; font-size: 12px; fill:" + F(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
410
+ const i = "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
411
411
  return i + f.labelStyles.replace("color:", "fill:");
412
412
  }).each(function(e) {
413
413
  if (e.depth === 0)
@@ -417,32 +417,32 @@ var Qe = /* @__PURE__ */ w((t, a) => {
417
417
  const C = e.x1 - e.x0, $ = 6;
418
418
  let A;
419
419
  s.showValues !== !1 && e.value ? A = C - 10 - 30 - 10 - $ : A = C - $ - 6;
420
- const k = Math.max(15, A), y = i.node();
421
- if (y.getComputedTextLength() > k) {
420
+ const F = Math.max(15, A), y = i.node();
421
+ if (y.getComputedTextLength() > F) {
422
422
  const T = "...";
423
423
  let L = f;
424
424
  for (; L.length > 0; ) {
425
425
  if (L = f.substring(0, L.length - 1), L.length === 0) {
426
- i.text(T), y.getComputedTextLength() > k && i.text("");
426
+ i.text(T), y.getComputedTextLength() > F && i.text("");
427
427
  break;
428
428
  }
429
- if (i.text(L + T), y.getComputedTextLength() <= k)
429
+ if (i.text(L + T), y.getComputedTextLength() <= F)
430
430
  break;
431
431
  }
432
432
  }
433
433
  }), s.showValues !== !1 && R.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", j / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
434
434
  if (e.depth === 0)
435
435
  return "display: none;";
436
- const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + F(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
436
+ const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
437
437
  return i + f.labelStyles.replace("color:", "fill:");
438
438
  });
439
439
  const ie = ee.leaves(), X = V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class", (e, i) => `treemapNode treemapLeafGroup leaf${i}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
440
440
  X.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("style", (e) => P({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("stroke-width", 3), X.append("clipPath").attr("id", (e, i) => `clip-${a}-${i}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), X.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
441
- const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + F(e.data.name) + ";", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
441
+ const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + k(e.data.name) + ";", f = P({ cssCompiledStyles: e.data.cssCompiledStyles });
442
442
  return i + f.labelStyles.replace("color:", "fill:");
443
443
  }).attr("clip-path", (e, i) => `url(#clip-${a}-${i})`).text((e) => e.data.name).each(function(e) {
444
- const i = Y(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = i.node(), A = 4, D = f - 2 * A, k = C - 2 * A;
445
- if (D < 10 || k < 10) {
444
+ const i = Y(this), f = e.x1 - e.x0, C = e.y1 - e.y0, $ = i.node(), A = 4, D = f - 2 * A, F = C - 2 * A;
445
+ if (D < 10 || F < 10) {
446
446
  i.style("display", "none");
447
447
  return;
448
448
  }
@@ -453,17 +453,17 @@ var Qe = /* @__PURE__ */ w((t, a) => {
453
453
  let H = Math.max(
454
454
  z,
455
455
  Math.min(T, Math.round(y * L))
456
- ), Z = y + W + H;
457
- for (; Z > k && y > _ && (y--, H = Math.max(
456
+ ), U = y + W + H;
457
+ for (; U > F && y > _ && (y--, H = Math.max(
458
458
  z,
459
459
  Math.min(T, Math.round(y * L))
460
460
  ), !(H < z && y === _)); )
461
- i.style("font-size", `${y}px`), Z = y + W + H;
462
- i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < _ || k < y) && i.style("display", "none");
461
+ i.style("font-size", `${y}px`), U = y + W + H;
462
+ i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < _ || F < y) && i.style("display", "none");
463
463
  }), s.showValues !== !1 && X.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
464
464
  return (i.y1 - i.y0) / 2;
465
465
  }).attr("style", (i) => {
466
- const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + F(i.data.name) + ";", C = P({ cssCompiledStyles: i.data.cssCompiledStyles });
466
+ const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + k(i.data.name) + ";", C = P({ cssCompiledStyles: i.data.cssCompiledStyles });
467
467
  return f + C.labelStyles.replace("color:", "fill:");
468
468
  }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? p(i.value) : "").each(function(i) {
469
469
  const f = Y(this), C = this.parentNode;
@@ -476,9 +476,9 @@ var Qe = /* @__PURE__ */ w((t, a) => {
476
476
  f.style("display", "none");
477
477
  return;
478
478
  }
479
- const A = parseFloat($.style("font-size")), D = 28, k = 0.6, y = 6, _ = 2, T = Math.max(
479
+ const A = parseFloat($.style("font-size")), D = 28, F = 0.6, y = 6, _ = 2, T = Math.max(
480
480
  y,
481
- Math.min(D, Math.round(A * k))
481
+ Math.min(D, Math.round(A * F))
482
482
  );
483
483
  f.style("font-size", `${T}px`);
484
484
  const z = (i.y1 - i.y0) / 2 + A / 2 + _;
@@ -1,7 +1,7 @@
1
- import { C as k, _ as l, s as R, g as E, n as I, o as _, b as D, c as F, l as G, D as y, E as C, t as P, H as z, K as H } from "./mermaid.core-xMGW442o.js";
2
- import { p as V } from "./chunk-4BX2VUAB-BZlHuf6l.js";
3
- import { p as W } from "./treemap-KMMF4GRG-D_L55G0b.js";
4
- import "./index-C2DJ8qoy.js";
1
+ import { E as k, _ as l, s as R, g as E, o as F, p as I, b as _, c as D, l as G, F as y, G as C, v as P, K as z, a1 as V } from "./mermaid.core-DyFxH-Px.js";
2
+ import { p as W } from "./chunk-4BX2VUAB-D5qkn5BA.js";
3
+ import { p as B } from "./treemap-KMMF4GRG-D_L55G0b.js";
4
+ import "./index-Zd10d_CE.js";
5
5
  import "react";
6
6
  import "react-dom";
7
7
  var h = {
@@ -14,8 +14,8 @@ var h = {
14
14
  axes: [],
15
15
  curves: [],
16
16
  options: h
17
- }, m = structuredClone(w), B = k.radar, j = /* @__PURE__ */ l(() => y({
18
- ...B,
17
+ }, m = structuredClone(w), H = k.radar, j = /* @__PURE__ */ l(() => y({
18
+ ...H,
19
19
  ...C().radar
20
20
  }), "getConfig"), b = /* @__PURE__ */ l(() => m.axes, "getAxes"), K = /* @__PURE__ */ l(() => m.curves, "getCurves"), N = /* @__PURE__ */ l(() => m.options, "getOptions"), U = /* @__PURE__ */ l((a) => {
21
21
  m.axes = a.map((t) => ({
@@ -69,17 +69,17 @@ var h = {
69
69
  clear: q,
70
70
  setAccTitle: R,
71
71
  getAccTitle: E,
72
- setDiagramTitle: I,
73
- getDiagramTitle: _,
74
- getAccDescription: D,
75
- setAccDescription: F
72
+ setDiagramTitle: F,
73
+ getDiagramTitle: I,
74
+ getAccDescription: _,
75
+ setAccDescription: D
76
76
  }, J = /* @__PURE__ */ l((a) => {
77
- V(a, $);
77
+ W(a, $);
78
78
  const { axes: t, curves: e, options: r } = a;
79
79
  $.setAxes(t), $.setCurves(e), $.setOptions(r);
80
80
  }, "populate"), Q = {
81
81
  parse: /* @__PURE__ */ l(async (a) => {
82
- const t = await W("radar", a);
82
+ const t = await B("radar", a);
83
83
  G.debug(t), J(t);
84
84
  }, "parse")
85
85
  }, tt = /* @__PURE__ */ l((a, t, e, r) => {
@@ -179,7 +179,7 @@ var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
179
179
  }
180
180
  return e;
181
181
  }, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
182
- const t = H(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
182
+ const t = V(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
183
183
  return { themeVariables: r, radarOptions: s };
184
184
  }, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
185
185
  const { themeVariables: t, radarOptions: e } = ot(a);
@@ -1,17 +1,17 @@
1
- import { C, s as B, g as S, n as D, o as T, b as E, c as P, _ as b, D as m, E as z, t as F, l as w, H as A, k as W } from "./mermaid.core-xMGW442o.js";
2
- import { p as _ } from "./chunk-4BX2VUAB-BZlHuf6l.js";
1
+ import { E as B, s as C, g as S, o as D, p as T, b as E, c as F, _ as b, F as m, G as P, v as z, l as w, K as A, k as W } from "./mermaid.core-DyFxH-Px.js";
2
+ import { p as _ } from "./chunk-4BX2VUAB-D5qkn5BA.js";
3
3
  import { p as N } from "./treemap-KMMF4GRG-D_L55G0b.js";
4
- import "./index-C2DJ8qoy.js";
4
+ import "./index-Zd10d_CE.js";
5
5
  import "react";
6
6
  import "react-dom";
7
- var L = C.packet, u, v = (u = class {
7
+ var L = B.packet, u, v = (u = class {
8
8
  constructor() {
9
- this.packet = [], this.setAccTitle = B, this.getAccTitle = S, this.setDiagramTitle = D, this.getDiagramTitle = T, this.getAccDescription = E, this.setAccDescription = P;
9
+ this.packet = [], this.setAccTitle = C, this.getAccTitle = S, this.setDiagramTitle = D, this.getDiagramTitle = T, this.getAccDescription = E, this.setAccDescription = F;
10
10
  }
11
11
  getConfig() {
12
12
  const t = m({
13
13
  ...L,
14
- ...z().packet
14
+ ...P().packet
15
15
  });
16
16
  return t.showBits && (t.paddingY += 10), t;
17
17
  }
@@ -22,7 +22,7 @@ var L = C.packet, u, v = (u = class {
22
22
  t.length > 0 && this.packet.push(t);
23
23
  }
24
24
  clear() {
25
- F(), this.packet = [];
25
+ z(), this.packet = [];
26
26
  }
27
27
  }, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
28
28
  _(e, t);
@@ -38,14 +38,14 @@ var L = C.packet, u, v = (u = class {
38
38
  if (d === 0)
39
39
  throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
40
40
  for (i ?? (i = a + (d ?? 1) - 1), d ?? (d = i - a + 1), o = i, w.debug(`Packet block ${a} - ${o} with label ${c}`); r.length <= l + 1 && t.getPacket().length < M; ) {
41
- const [p, s] = H({ start: a, end: i, bits: d, label: c }, n, l);
41
+ const [p, s] = G({ start: a, end: i, bits: d, label: c }, n, l);
42
42
  if (r.push(p), p.end + 1 === n * l && (t.pushWord(r), r = [], n++), !s)
43
43
  break;
44
44
  ({ start: a, end: i, bits: d, label: c } = s);
45
45
  }
46
46
  }
47
47
  t.pushWord(r);
48
- }, "populate"), H = /* @__PURE__ */ b((e, t, o) => {
48
+ }, "populate"), G = /* @__PURE__ */ b((e, t, o) => {
49
49
  if (e.start === void 0)
50
50
  throw new Error("start should have been set during first phase");
51
51
  if (e.end === void 0)
@@ -85,9 +85,9 @@ var L = C.packet, u, v = (u = class {
85
85
  const n = r.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), s = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (s ? 0 : a), k = d * c + 2, f = A(t);
86
86
  f.attr("viewbox", `0 0 ${k} ${g}`), W(f, g, k, l.useMaxWidth);
87
87
  for (const [y, $] of p.entries())
88
- O(f, $, y, l);
88
+ K(f, $, y, l);
89
89
  f.append("text").text(s).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
90
- }, "draw"), O = /* @__PURE__ */ b((e, t, o, { rowHeight: r, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
90
+ }, "draw"), K = /* @__PURE__ */ b((e, t, o, { rowHeight: r, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
91
91
  const c = e.append("g"), p = o * (r + l) + l;
92
92
  for (const s of t) {
93
93
  const h = s.start % i * a + 1, g = (s.end - s.start + 1) * a - n;
@@ -96,7 +96,7 @@ var L = C.packet, u, v = (u = class {
96
96
  const k = s.end === s.start, f = p - 2;
97
97
  c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(s.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(s.end);
98
98
  }
99
- }, "drawWord"), j = { draw: I }, G = {
99
+ }, "drawWord"), O = { draw: I }, j = {
100
100
  byteFontSize: "10px",
101
101
  startByteColor: "black",
102
102
  endByteColor: "black",
@@ -107,8 +107,8 @@ var L = C.packet, u, v = (u = class {
107
107
  blockStrokeColor: "black",
108
108
  blockStrokeWidth: "1",
109
109
  blockFillColor: "#efefef"
110
- }, K = /* @__PURE__ */ b(({ packet: e } = {}) => {
111
- const t = m(G, e);
110
+ }, H = /* @__PURE__ */ b(({ packet: e } = {}) => {
111
+ const t = m(j, e);
112
112
  return `
113
113
  .packetByte {
114
114
  font-size: ${t.byteFontSize};
@@ -138,8 +138,8 @@ var L = C.packet, u, v = (u = class {
138
138
  get db() {
139
139
  return new v();
140
140
  },
141
- renderer: j,
142
- styles: K
141
+ renderer: O,
142
+ styles: H
143
143
  };
144
144
  export {
145
145
  V as diagram
@@ -1,8 +1,8 @@
1
- import { g as Dt } from "./chunk-55IACEB6-Dr8rgvy_.js";
2
- import { s as wt } from "./chunk-QN33PNHL-nSyFq8_s.js";
3
- import { _ as u, s as Vt, g as Lt, c as Mt, b as Bt, n as Ft, o as Yt, d as tt, l as D, t as Pt, r as zt, B as Gt, y as Kt, z as Zt, j as Ut, u as jt, A as Wt } from "./mermaid.core-xMGW442o.js";
4
- import { c as Qt } from "./channel-BC4mWQQF.js";
5
- import "./index-C2DJ8qoy.js";
1
+ import { g as Dt } from "./chunk-55IACEB6-CR8xZK7z.js";
2
+ import { s as wt } from "./chunk-QN33PNHL-5NUdQ31M.js";
3
+ import { _ as u, s as Vt, g as Lt, c as Mt, b as Bt, o as Ft, p as Yt, d as tt, l as D, v as Pt, t as zt, D as Gt, z as Kt, A as Zt, j as Ut, u as jt, B as Wt } from "./mermaid.core-DyFxH-Px.js";
4
+ import { c as Qt } from "./channel-CbDO3juL.js";
5
+ import "./index-Zd10d_CE.js";
6
6
  import "react";
7
7
  import "react-dom";
8
8
  var dt = function() {
@@ -1,9 +1,9 @@
1
- import { g as qt } from "./chunk-FMBD7UC4-CVr83prI.js";
2
- import { d as b1, s as Ht, c as Xt, n as Qt, g as Jt, b as Zt, o as $t, _ as m, e as te, p as ee, J as se, q as ie, l as t1, r as st, u as it, j as S1, t as re, v as ae, x as Ot, y as ne, z as ue, A as oe } from "./mermaid.core-xMGW442o.js";
3
- import { g as le } from "./chunk-55IACEB6-Dr8rgvy_.js";
4
- import { s as ce } from "./chunk-QN33PNHL-nSyFq8_s.js";
5
- import { c as he } from "./channel-BC4mWQQF.js";
6
- import "./index-C2DJ8qoy.js";
1
+ import { g as qt } from "./chunk-FMBD7UC4-DZxSUJCY.js";
2
+ import { d as b1, s as Ht, c as Xt, o as Qt, g as Jt, b as Zt, p as $t, _ as m, e as te, q as ee, J as se, r as ie, l as t1, t as st, u as it, j as S1, v as re, x as ae, y as Ot, z as ne, A as ue, B as oe } from "./mermaid.core-DyFxH-Px.js";
3
+ import { g as le } from "./chunk-55IACEB6-CR8xZK7z.js";
4
+ import { s as ce } from "./chunk-QN33PNHL-5NUdQ31M.js";
5
+ import { c as he } from "./channel-CbDO3juL.js";
6
+ import "./index-Zd10d_CE.js";
7
7
  import "react";
8
8
  import "react-dom";
9
9
  var de = "flowchart-", O1, pe = (O1 = class {
@@ -1,6 +1,6 @@
1
- import { b4 as Je, b5 as Ke, b6 as tn, b7 as en, b8 as In, b9 as se, ba as Ln, _ as d, bb as rt, d as _t, s as An, g as Wn, n as $n, o as On, c as Hn, b as Nn, t as Pn, m as Vn, l as Tt, j as Bt, k as zn, e as Rn, u as Zn } from "./mermaid.core-xMGW442o.js";
2
- import { c as ne, g as re } from "./index-C2DJ8qoy.js";
3
- import { b as Bn, t as We, c as Xn, a as qn, l as Gn } from "./linear-CxGB80S5.js";
1
+ import { b4 as Je, b5 as Ke, b6 as tn, b7 as en, b8 as In, b9 as se, ba as Ln, _ as d, bb as rt, d as _t, s as An, g as Wn, o as $n, p as On, c as Hn, b as Nn, v as Pn, m as Vn, l as Tt, j as Bt, k as zn, e as Rn, u as Zn } from "./mermaid.core-DyFxH-Px.js";
2
+ import { c as ne, g as re } from "./index-Zd10d_CE.js";
3
+ import { b as Bn, t as We, c as Xn, a as qn, l as Gn } from "./linear-CRqCHTKs.js";
4
4
  import { i as jn } from "./init-DjUOC4st.js";
5
5
  import "react";
6
6
  import "react-dom";
@@ -1,8 +1,8 @@
1
- import { p as Z } from "./chunk-4BX2VUAB-BZlHuf6l.js";
2
- import { I as F } from "./chunk-QZHKN3VN-Dg8JYP6e.js";
3
- import { C as U, _ as h, d as rr, D as er, E as tr, F as ar, l as m, s as nr, g as sr, b as or, c as cr, n as ir, o as dr, e as B, t as hr, j as lr, u as $r, G as fr } from "./mermaid.core-xMGW442o.js";
1
+ import { p as Z } from "./chunk-4BX2VUAB-D5qkn5BA.js";
2
+ import { I as F } from "./chunk-QZHKN3VN-CSeHgX9s.js";
3
+ import { E as U, _ as h, d as rr, F as er, G as tr, H as ar, l as m, s as nr, g as sr, b as or, c as cr, o as ir, p as dr, e as B, v as hr, j as lr, u as $r, I as fr } from "./mermaid.core-DyFxH-Px.js";
4
4
  import { p as gr } from "./treemap-KMMF4GRG-D_L55G0b.js";
5
- import "./index-C2DJ8qoy.js";
5
+ import "./index-Zd10d_CE.js";
6
6
  import "react";
7
7
  import "react-dom";
8
8
  var u = {
@@ -241,12 +241,12 @@ var xr = /* @__PURE__ */ h(function(t) {
241
241
  }, r;
242
242
  }
243
243
  }, "checkout");
244
- function D(t, r, a) {
244
+ function A(t, r, a) {
245
245
  const s = t.indexOf(r);
246
246
  s === -1 ? t.push(a) : t.splice(s, 1, a);
247
247
  }
248
- h(D, "upsert");
249
- function A(t) {
248
+ h(A, "upsert");
249
+ function D(t) {
250
250
  const r = t.reduce((e, n) => e.seq > n.seq ? e : n, t[0]);
251
251
  let a = "";
252
252
  t.forEach(function(e) {
@@ -257,22 +257,22 @@ function A(t) {
257
257
  i.records.branches.get(e) === r.id && s.push(e);
258
258
  if (m.debug(s.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
259
259
  const e = i.records.commits.get(r.parents[0]);
260
- D(t, r, e), r.parents[1] && t.push(i.records.commits.get(r.parents[1]));
260
+ A(t, r, e), r.parents[1] && t.push(i.records.commits.get(r.parents[1]));
261
261
  } else {
262
262
  if (r.parents.length == 0)
263
263
  return;
264
264
  if (r.parents[0]) {
265
265
  const e = i.records.commits.get(r.parents[0]);
266
- D(t, r, e);
266
+ A(t, r, e);
267
267
  }
268
268
  }
269
- t = N(t, (e) => e.id), A(t);
269
+ t = N(t, (e) => e.id), D(t);
270
270
  }
271
- h(A, "prettyPrintCommitHistory");
271
+ h(D, "prettyPrintCommitHistory");
272
272
  var Cr = /* @__PURE__ */ h(function() {
273
273
  m.debug(i.records.commits);
274
274
  const t = V()[0];
275
- A([t]);
275
+ D([t]);
276
276
  }, "prettyPrint"), Er = /* @__PURE__ */ h(function() {
277
277
  i.reset(), hr();
278
278
  }, "clear"), Br = /* @__PURE__ */ h(function() {
@@ -382,7 +382,7 @@ var Cr = /* @__PURE__ */ h(function() {
382
382
  const e = E.get(s).y;
383
383
  e <= a && (r = s, a = e);
384
384
  }), r || void 0;
385
- }, "findClosestParentBT"), Dr = /* @__PURE__ */ h((t, r, a) => {
385
+ }, "findClosestParentBT"), Ar = /* @__PURE__ */ h((t, r, a) => {
386
386
  let s = a, e = a;
387
387
  const n = [];
388
388
  t.forEach((c) => {
@@ -401,7 +401,7 @@ var Cr = /* @__PURE__ */ h(function() {
401
401
  E.set(o.id, { x: l, y: f });
402
402
  }
403
403
  });
404
- }, "setParallelBTPos"), Ar = /* @__PURE__ */ h((t) => {
404
+ }, "setParallelBTPos"), Dr = /* @__PURE__ */ h((t) => {
405
405
  var s;
406
406
  const r = Q(t.parents.filter((e) => e !== null));
407
407
  if (!r)
@@ -410,7 +410,7 @@ var Cr = /* @__PURE__ */ h(function() {
410
410
  if (a === void 0)
411
411
  throw new Error(`Closest parent position not found for commit ${t.id}`);
412
412
  return a;
413
- }, "findClosestParentPos"), Yr = /* @__PURE__ */ h((t) => Ar(t) + I, "calculateCommitPosition"), Kr = /* @__PURE__ */ h((t, r) => {
413
+ }, "findClosestParentPos"), Yr = /* @__PURE__ */ h((t) => Dr(t) + I, "calculateCommitPosition"), Kr = /* @__PURE__ */ h((t, r) => {
414
414
  const a = C.get(t.branch);
415
415
  if (!a)
416
416
  throw new Error(`Branch not found for commit ${t.id}`);
@@ -553,7 +553,7 @@ var Cr = /* @__PURE__ */ h(function() {
553
553
  return d !== void 0 && y !== void 0 ? d - y : 0;
554
554
  }, "sortKeys");
555
555
  let l = c.sort($);
556
- x === "BT" && (o && Dr(l, r, n), l = l.reverse()), l.forEach((f) => {
556
+ x === "BT" && (o && Ar(l, r, n), l = l.reverse()), l.forEach((f) => {
557
557
  var y;
558
558
  const g = r.get(f);
559
559
  if (!g)
@@ -0,0 +1,13 @@
1
+ export interface CodeTransformResponse {
2
+ codeWithAnnotations: string;
3
+ modifiedCode: string;
4
+ }
5
+ export declare const useCodeTransform: (api: string, headers?: any, useMock?: boolean) => {
6
+ onSubmit: (body: {
7
+ code: string;
8
+ prompt: string;
9
+ }) => Promise<void>;
10
+ loading: boolean;
11
+ response: CodeTransformResponse | null;
12
+ error: string | null;
13
+ };