@foris/ai-agent 0.6.0 → 0.7.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_baseUniq-DgXUlKKz.js +479 -0
- package/dist/ai-agent.es.js +1 -1
- package/dist/ai-agent.umd.js +501 -600
- package/dist/ai-chat-panel/ChatPanel.d.ts +5 -2
- package/dist/ai-chat-panel/chatPanel.constants.d.ts +6 -0
- package/dist/ai-prompt-code-editor/editor-input.d.ts +11 -0
- package/dist/{arc-Cwy_FAAZ.js → arc-dRLdhpvC.js} +1 -1
- package/dist/architecture-U656AL7Q-Z_eXDnPQ.js +11 -0
- package/dist/{architectureDiagram-VXUJARFQ-B1-UJMiM.js → architectureDiagram-VXUJARFQ-B346Z2M7.js} +8 -6
- package/dist/{blockDiagram-VD42YOAC-Bg7WuLT0.js → blockDiagram-VD42YOAC-Cgs0FJbu.js} +801 -937
- package/dist/{c4Diagram-YG6GDRKO-CNvcQC6a.js → c4Diagram-YG6GDRKO-DBVWmtyp.js} +3 -3
- package/dist/{channel-DIM_8NS4.js → channel-Cz-B434b.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BWcWjYwu.js → chunk-4BX2VUAB-BPxxqzni.js} +1 -1
- package/dist/{chunk-55IACEB6-DtNYl9nY.js → chunk-55IACEB6-C8UAY5kX.js} +1 -1
- package/dist/{chunk-B4BG7PRW-DBB5S5cH.js → chunk-B4BG7PRW-DJmfdyX3.js} +4 -4
- package/dist/{chunk-DI55MBZ5-C6nAAiqC.js → chunk-DI55MBZ5-h9C01Pxw.js} +3 -3
- package/dist/{chunk-FMBD7UC4-B6AjbSrR.js → chunk-FMBD7UC4-C0_hkEix.js} +1 -1
- package/dist/{chunk-QN33PNHL-B0uYFSeh.js → chunk-QN33PNHL-Bv4zOqbW.js} +1 -1
- package/dist/{chunk-QZHKN3VN-CSDjUowT.js → chunk-QZHKN3VN-BBXHJaw4.js} +1 -1
- package/dist/{chunk-TZMSLE5B-Ca1zk2vP.js → chunk-TZMSLE5B-CYyN5LfG.js} +1 -1
- package/dist/{classDiagram-2ON5EDUG-C_c8E9FP.js → classDiagram-2ON5EDUG-BwiqNztm.js} +6 -6
- package/dist/{classDiagram-v2-WZHVMYZB-C_c8E9FP.js → classDiagram-v2-WZHVMYZB-BwiqNztm.js} +6 -6
- package/dist/clone-BeH4hO5_.js +8 -0
- package/dist/{code-block-QI2IAROF-CuUy0mnB.js → code-block-QI2IAROF-Bs_779OL.js} +1 -1
- package/dist/components/ai-chat-logo/AiChatLogo.d.ts +5 -0
- package/dist/components/ai-chat-logo/index.d.ts +2 -0
- package/dist/components/ai-elements/conversation.d.ts +7 -4
- package/dist/components/ai-elements/message.d.ts +8 -8
- package/dist/components/ai-elements/tool.d.ts +9 -9
- package/dist/components/ui/input-group.d.ts +8 -8
- package/dist/{cose-bilkent-S5V4N54A-C7Y9e90Q.js → cose-bilkent-S5V4N54A-DzcEIQWF.js} +2 -2
- package/dist/{dagre-6UL2VRFP-BYW0skUi.js → dagre-6UL2VRFP-dGu9qEUT.js} +54 -55
- package/dist/{diagram-PSM6KHXK-Bznhb7hC.js → diagram-PSM6KHXK-ClFdS91X.js} +9 -7
- package/dist/{diagram-QEK2KX5R-BgSmsry5.js → diagram-QEK2KX5R-Dw3jZbmz.js} +8 -6
- package/dist/{diagram-S2PKOQOG-PXuksWgt.js → diagram-S2PKOQOG-CLlnDl5U.js} +12 -10
- package/dist/{erDiagram-Q2GNP2WA-BZj3IESM.js → erDiagram-Q2GNP2WA-BnoCnt_A.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-Bc6_zLaJ.js → flowDiagram-NV44I4VS-BdKlLEA8.js} +6 -6
- package/dist/{ganttDiagram-JELNMOA3-CLMVqeY5.js → ganttDiagram-JELNMOA3-Dn5TklYE.js} +3 -3
- package/dist/gitGraph-F6HP7TQM-7U1XAjjI.js +11 -0
- package/dist/{gitGraphDiagram-NY62KEGX-4mKiKaxs.js → gitGraphDiagram-NY62KEGX-DqOyO_gE.js} +71 -69
- package/dist/graph-Bmfcy0Sl.js +381 -0
- package/dist/hooks/useChatScroll.d.ts +13 -0
- package/dist/{index-Z0agb9P7.js → index-C-KHcZQ2.js} +14928 -14956
- package/dist/info-NVLQJR56-DhgCJpk8.js +11 -0
- package/dist/infoDiagram-WHAUD3N6-z3WzEU-r.js +29 -0
- package/dist/{journeyDiagram-XKPGCS4Q-CNy0BP9N.js → journeyDiagram-XKPGCS4Q-BxUR6Cqa.js} +5 -5
- package/dist/{kanban-definition-3W4ZIXB7-CEX_c0Kj.js → kanban-definition-3W4ZIXB7-D7FZcoxE.js} +3 -3
- package/dist/layout-OqeNPdO7.js +1443 -0
- package/dist/{linear-CD6IiF07.js → linear-CrPirp2O.js} +25 -25
- package/dist/{mermaid-NA5CF7SZ-CH1oqogY.js → mermaid-NA5CF7SZ-BqH1EwOP.js} +1 -1
- package/dist/{treemap-KMMF4GRG-D_L55G0b.js → mermaid-parser.core-Bsa0mY-K.js} +5934 -5793
- package/dist/{mermaid.core-ZUwHDr0v.js → mermaid.core-BbyS6MrY.js} +112 -88
- package/dist/min-PP7peUIE.js +38 -0
- package/dist/{mindmap-definition-VGOIOE7T-BURJsEy8.js → mindmap-definition-VGOIOE7T-BS220ypg.js} +15 -15
- package/dist/packet-BFZMPI3H-Cr8f00VX.js +11 -0
- package/dist/pie-7BOR55EZ-DiduYgYI.js +11 -0
- package/dist/pieDiagram-ADFJNKIX-BTYZ1lLr.js +168 -0
- package/dist/{quadrantDiagram-AYHSOK5B-BPfUc7N-.js → quadrantDiagram-AYHSOK5B-QtH9PfxV.js} +3 -3
- package/dist/radar-NHE76QYJ-CUbcj3fU.js +11 -0
- package/dist/{requirementDiagram-UZGBJVZJ-CnxEdTU8.js → requirementDiagram-UZGBJVZJ-DZB3Zlfr.js} +4 -4
- package/dist/{sankeyDiagram-TZEHDZUN-BEAqOkfR.js → sankeyDiagram-TZEHDZUN-Cnwp6p__.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-Do4JCDiB.js → sequenceDiagram-WL72ISMW-BkcWI-NS.js} +4 -4
- package/dist/{stateDiagram-FKZM4ZOC-SCm7q9lv.js → stateDiagram-FKZM4ZOC-xHy91uT_.js} +11 -9
- package/dist/{stateDiagram-v2-4FDKWEC3-D6CFYySF.js → stateDiagram-v2-4FDKWEC3-DcUoLT4b.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-pBxBbVmM.js → timeline-definition-IT6M3QCI-BcUJiAmy.js} +3 -3
- package/dist/treemap-KMMF4GRG-BTb_ndOA.js +11 -0
- package/dist/{xychartDiagram-PRI3JC2R-DzokeHor.js → xychartDiagram-PRI3JC2R-BpsBXjbb.js} +3 -3
- package/package.json +1 -1
- package/dist/graph-DB2UxkYH.js +0 -1190
- package/dist/infoDiagram-WHAUD3N6-CZgQFgny.js +0 -27
- package/dist/layout-Q6wQN5dr.js +0 -1730
- package/dist/pieDiagram-ADFJNKIX-DhjpfyOd.js +0 -166
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { Y as S, P as F, av as K, E as Y, o as Z, p as q, s as H, g as J, c as Q, b as X, _ as g, l as z, v as ee, d as te, F as ae, K as re, a6 as ne, k as ie } from "./mermaid.core-ZUwHDr0v.js";
|
|
2
|
-
import { p as se } from "./chunk-4BX2VUAB-BWcWjYwu.js";
|
|
3
|
-
import { p as le } from "./treemap-KMMF4GRG-D_L55G0b.js";
|
|
4
|
-
import { d as I } from "./arc-Cwy_FAAZ.js";
|
|
5
|
-
import { o as oe } from "./ordinal-MUacOSdK.js";
|
|
6
|
-
import "./index-Z0agb9P7.js";
|
|
7
|
-
import "react";
|
|
8
|
-
import "react-dom";
|
|
9
|
-
import "./init-DjUOC4st.js";
|
|
10
|
-
function ce(e, a) {
|
|
11
|
-
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
|
12
|
-
}
|
|
13
|
-
function ue(e) {
|
|
14
|
-
return e;
|
|
15
|
-
}
|
|
16
|
-
function pe() {
|
|
17
|
-
var e = ue, a = ce, f = null, x = S(0), s = S(F), o = S(0);
|
|
18
|
-
function l(t) {
|
|
19
|
-
var n, c = (t = K(t)).length, u, y, h = 0, p = new Array(c), i = new Array(c), v = +x.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), m, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), d;
|
|
20
|
-
for (n = 0; n < c; ++n)
|
|
21
|
-
(d = i[p[n] = n] = +e(t[n], n, t)) > 0 && (h += d);
|
|
22
|
-
for (a != null ? p.sort(function(A, D) {
|
|
23
|
-
return a(i[A], i[D]);
|
|
24
|
-
}) : f != null && p.sort(function(A, D) {
|
|
25
|
-
return f(t[A], t[D]);
|
|
26
|
-
}), n = 0, y = h ? (w - c * $) / h : 0; n < c; ++n, v = m)
|
|
27
|
-
u = p[n], d = i[u], m = v + (d > 0 ? d * y : 0) + $, i[u] = {
|
|
28
|
-
data: t[u],
|
|
29
|
-
index: n,
|
|
30
|
-
value: d,
|
|
31
|
-
startAngle: v,
|
|
32
|
-
endAngle: m,
|
|
33
|
-
padAngle: C
|
|
34
|
-
};
|
|
35
|
-
return i;
|
|
36
|
-
}
|
|
37
|
-
return l.value = function(t) {
|
|
38
|
-
return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
|
|
39
|
-
}, l.sortValues = function(t) {
|
|
40
|
-
return arguments.length ? (a = t, f = null, l) : a;
|
|
41
|
-
}, l.sort = function(t) {
|
|
42
|
-
return arguments.length ? (f = t, a = null, l) : f;
|
|
43
|
-
}, l.startAngle = function(t) {
|
|
44
|
-
return arguments.length ? (x = typeof t == "function" ? t : S(+t), l) : x;
|
|
45
|
-
}, l.endAngle = function(t) {
|
|
46
|
-
return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
|
|
47
|
-
}, l.padAngle = function(t) {
|
|
48
|
-
return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
|
|
49
|
-
}, l;
|
|
50
|
-
}
|
|
51
|
-
var L = Y.pie, G = {
|
|
52
|
-
sections: /* @__PURE__ */ new Map(),
|
|
53
|
-
showData: !1,
|
|
54
|
-
config: L
|
|
55
|
-
}, T = G.sections, N = G.showData, ge = structuredClone(L), de = /* @__PURE__ */ g(() => structuredClone(ge), "getConfig"), fe = /* @__PURE__ */ g(() => {
|
|
56
|
-
T = /* @__PURE__ */ new Map(), N = G.showData, ee();
|
|
57
|
-
}, "clear"), me = /* @__PURE__ */ g(({ label: e, value: a }) => {
|
|
58
|
-
if (a < 0)
|
|
59
|
-
throw new Error(
|
|
60
|
-
`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
61
|
-
);
|
|
62
|
-
T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
|
|
63
|
-
}, "addSection"), he = /* @__PURE__ */ g(() => T, "getSections"), ve = /* @__PURE__ */ g((e) => {
|
|
64
|
-
N = e;
|
|
65
|
-
}, "setShowData"), Se = /* @__PURE__ */ g(() => N, "getShowData"), _ = {
|
|
66
|
-
getConfig: de,
|
|
67
|
-
clear: fe,
|
|
68
|
-
setDiagramTitle: Z,
|
|
69
|
-
getDiagramTitle: q,
|
|
70
|
-
setAccTitle: H,
|
|
71
|
-
getAccTitle: J,
|
|
72
|
-
setAccDescription: Q,
|
|
73
|
-
getAccDescription: X,
|
|
74
|
-
addSection: me,
|
|
75
|
-
getSections: he,
|
|
76
|
-
setShowData: ve,
|
|
77
|
-
getShowData: Se
|
|
78
|
-
}, xe = /* @__PURE__ */ g((e, a) => {
|
|
79
|
-
se(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
|
|
80
|
-
}, "populateDb"), ye = {
|
|
81
|
-
parse: /* @__PURE__ */ g(async (e) => {
|
|
82
|
-
const a = await le("pie", e);
|
|
83
|
-
z.debug(a), xe(a, _);
|
|
84
|
-
}, "parse")
|
|
85
|
-
}, we = /* @__PURE__ */ g((e) => `
|
|
86
|
-
.pieCircle{
|
|
87
|
-
stroke: ${e.pieStrokeColor};
|
|
88
|
-
stroke-width : ${e.pieStrokeWidth};
|
|
89
|
-
opacity : ${e.pieOpacity};
|
|
90
|
-
}
|
|
91
|
-
.pieOuterCircle{
|
|
92
|
-
stroke: ${e.pieOuterStrokeColor};
|
|
93
|
-
stroke-width: ${e.pieOuterStrokeWidth};
|
|
94
|
-
fill: none;
|
|
95
|
-
}
|
|
96
|
-
.pieTitleText {
|
|
97
|
-
text-anchor: middle;
|
|
98
|
-
font-size: ${e.pieTitleTextSize};
|
|
99
|
-
fill: ${e.pieTitleTextColor};
|
|
100
|
-
font-family: ${e.fontFamily};
|
|
101
|
-
}
|
|
102
|
-
.slice {
|
|
103
|
-
font-family: ${e.fontFamily};
|
|
104
|
-
fill: ${e.pieSectionTextColor};
|
|
105
|
-
font-size:${e.pieSectionTextSize};
|
|
106
|
-
// fill: white;
|
|
107
|
-
}
|
|
108
|
-
.legend text {
|
|
109
|
-
fill: ${e.pieLegendTextColor};
|
|
110
|
-
font-family: ${e.fontFamily};
|
|
111
|
-
font-size: ${e.pieLegendTextSize};
|
|
112
|
-
}
|
|
113
|
-
`, "getStyles"), Ae = we, De = /* @__PURE__ */ g((e) => {
|
|
114
|
-
const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
|
|
115
|
-
return pe().value((s) => s.value)(f);
|
|
116
|
-
}, "createPieArcs"), Ce = /* @__PURE__ */ g((e, a, f, x) => {
|
|
117
|
-
z.debug(`rendering pie chart
|
|
118
|
-
` + e);
|
|
119
|
-
const s = x.db, o = te(), l = ae(s.getConfig(), o.pie), t = 40, n = 18, c = 4, u = 450, y = u, h = re(a), p = h.append("g");
|
|
120
|
-
p.attr("transform", "translate(" + y / 2 + "," + u / 2 + ")");
|
|
121
|
-
const { themeVariables: i } = o;
|
|
122
|
-
let [v] = ne(i.pieOuterStrokeWidth);
|
|
123
|
-
v ?? (v = 2);
|
|
124
|
-
const w = l.textPosition, m = Math.min(y, u) / 2 - t, C = I().innerRadius(0).outerRadius(m), $ = I().innerRadius(m * w).outerRadius(m * w);
|
|
125
|
-
p.append("circle").attr("cx", 0).attr("cy", 0).attr("r", m + v / 2).attr("class", "pieOuterCircle");
|
|
126
|
-
const d = s.getSections(), A = De(d), D = [
|
|
127
|
-
i.pie1,
|
|
128
|
-
i.pie2,
|
|
129
|
-
i.pie3,
|
|
130
|
-
i.pie4,
|
|
131
|
-
i.pie5,
|
|
132
|
-
i.pie6,
|
|
133
|
-
i.pie7,
|
|
134
|
-
i.pie8,
|
|
135
|
-
i.pie9,
|
|
136
|
-
i.pie10,
|
|
137
|
-
i.pie11,
|
|
138
|
-
i.pie12
|
|
139
|
-
];
|
|
140
|
-
let E = 0;
|
|
141
|
-
d.forEach((r) => {
|
|
142
|
-
E += r;
|
|
143
|
-
});
|
|
144
|
-
const P = A.filter((r) => (r.data.value / E * 100).toFixed(0) !== "0"), b = oe(D);
|
|
145
|
-
p.selectAll("mySlices").data(P).enter().append("path").attr("d", C).attr("fill", (r) => b(r.data.label)).attr("class", "pieCircle"), p.selectAll("mySlices").data(P).enter().append("text").text((r) => (r.data.value / E * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), p.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -(u - 50) / 2).attr("class", "pieTitleText");
|
|
146
|
-
const W = [...d.entries()].map(([r, M]) => ({
|
|
147
|
-
label: r,
|
|
148
|
-
value: M
|
|
149
|
-
})), k = p.selectAll(".legend").data(W).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
|
|
150
|
-
const R = n + c, V = R * W.length / 2, U = 12 * n, j = M * R - V;
|
|
151
|
-
return "translate(" + U + "," + j + ")";
|
|
152
|
-
});
|
|
153
|
-
k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => b(r.label)).style("stroke", (r) => b(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
|
|
154
|
-
const B = Math.max(
|
|
155
|
-
...k.selectAll("text").nodes().map((r) => (r == null ? void 0 : r.getBoundingClientRect().width) ?? 0)
|
|
156
|
-
), O = y + t + n + c + B;
|
|
157
|
-
h.attr("viewBox", `0 0 ${O} ${u}`), ie(h, u, O, l.useMaxWidth);
|
|
158
|
-
}, "draw"), $e = { draw: Ce }, Pe = {
|
|
159
|
-
parser: ye,
|
|
160
|
-
db: _,
|
|
161
|
-
renderer: $e,
|
|
162
|
-
styles: Ae
|
|
163
|
-
};
|
|
164
|
-
export {
|
|
165
|
-
Pe as diagram
|
|
166
|
-
};
|