@yiyi_zhang/reactflow-ui 0.3.0 → 0.5.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -22
- package/dist/AiWorkflowIDE.d.ts +217 -0
- package/dist/WorkflowIDE.d.ts +22 -3
- package/dist/ai-BJwQZcGK.js +15168 -0
- package/dist/ai.d.ts +30 -0
- package/dist/arc-BUGZGgtu.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +2418 -0
- package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +1577 -0
- package/dist/channel-CURI9jmI.js +5 -0
- package/dist/chunk-2J33WTMH-D7gashNz.js +19 -0
- package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +8 -0
- package/dist/chunk-55IACEB6-GYZ_m2MY.js +8 -0
- package/dist/chunk-727SXJPM-D4WVyvOg.js +1528 -0
- package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +1387 -0
- package/dist/chunk-FMBD7UC4-B3CSVzS4.js +19 -0
- package/dist/chunk-ND2GUHAM-CNj_s1aK.js +68 -0
- package/dist/chunk-QZHKN3VN-DoV8iUKo.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +16 -0
- package/dist/components/AiNative/AgentTimeline.d.ts +18 -0
- package/dist/components/AiNative/AiCommandCenter.d.ts +40 -0
- package/dist/components/AiNative/AiConfigPanel.d.ts +9 -0
- package/dist/components/AiNative/BusinessCanvas.d.ts +15 -0
- package/dist/components/AiNative/CanvasPreview.d.ts +16 -0
- package/dist/components/AiNative/ClarificationCard.d.ts +9 -0
- package/dist/components/AiNative/FailureSummaryCard.d.ts +20 -0
- package/dist/components/AiNative/LibraryPanel.d.ts +9 -0
- package/dist/components/AiNative/MermaidBlock.d.ts +6 -0
- package/dist/components/AiNative/PlanCard.d.ts +15 -0
- package/dist/components/AiNative/ProposalPreviewCard.d.ts +21 -0
- package/dist/components/AiNative/RecommendationCard.d.ts +10 -0
- package/dist/components/AiNative/RepairCard.d.ts +17 -0
- package/dist/components/AiNative/ReviewBar.d.ts +21 -0
- package/dist/components/AiNative/WorkflowRunCard.d.ts +14 -0
- package/dist/components/Controls/ModeSlider.d.ts +2 -0
- package/dist/components/ExecutionSummaryPanel.d.ts +4 -0
- package/dist/components/WorkflowRunPanel.d.ts +12 -0
- package/dist/components/nodes/NodeWrapper.d.ts +2 -1
- package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +2609 -0
- package/dist/cytoscape.esm-kVAWcYoG.js +18755 -0
- package/dist/dagre-BM42HDAG-CFMIuOmS.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-C5jZp2YX.js +217 -0
- package/dist/diagram-5GNKFQAL-DRUVcHpp.js +123 -0
- package/dist/diagram-KO2AKTUF-BOl4aaej.js +461 -0
- package/dist/diagram-LMA3HP47-ZeckPR2Q.js +142 -0
- package/dist/diagram-OG6HWLK6-qUWeLfa-.js +528 -0
- package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +815 -0
- package/dist/graph-BRoPeNF3.js +1545 -0
- package/dist/hooks/useNodeExecution.d.ts +1 -1
- package/dist/hooks/useNodeLayout.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +724 -0
- package/dist/katex-DoRnZ_sp.js +11682 -0
- package/dist/layout-D9EpM4Fg.js +1728 -0
- package/dist/linear-BA49eco4.js +259 -0
- package/dist/mermaid.core-XSpZEAKP.js +16137 -0
- package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +1024 -0
- package/dist/reactflow-ui-ai.es.js +12 -0
- package/dist/reactflow-ui.css +1 -1
- package/dist/reactflow-ui.es.js +8198 -7039
- package/dist/reactflow-ui.umd.js +52 -17
- package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +2891 -0
- package/dist/services/ai/agentRunner.d.ts +51 -0
- package/dist/services/ai/contextEngine.d.ts +83 -0
- package/dist/services/ai/draftPersistence.d.ts +22 -0
- package/dist/services/ai/errorMessages.d.ts +16 -0
- package/dist/services/ai/intentClassifier.d.ts +17 -0
- package/dist/services/ai/protocolAdapter.d.ts +114 -0
- package/dist/services/ai/ruleEngine.d.ts +57 -0
- package/dist/services/ai/schemaRegistry.d.ts +51 -0
- package/dist/services/ai/systemPrompt.d.ts +30 -0
- package/dist/services/ai/toolDefs.d.ts +9 -0
- package/dist/services/ai/toolExecutor.d.ts +83 -0
- package/dist/services/ai/toolRegistry.d.ts +38 -0
- package/dist/services/ai/transport.d.ts +58 -0
- package/dist/services/aiService.d.ts +27 -5
- package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +16 -0
- package/dist/store/aiStore.d.ts +199 -0
- package/dist/store/ideStoresContext.d.ts +39 -0
- package/dist/store/libraryStore.d.ts +25 -0
- package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +1055 -0
- package/dist/types/aiEvents.d.ts +38 -0
- package/dist/types/conductor.d.ts +23 -2
- package/dist/types/workflow.d.ts +36 -0
- package/dist/types/workflowLibrary.d.ts +27 -0
- package/dist/utils/executionAnalyzer.d.ts +32 -0
- package/dist/utils/nodeMeta.d.ts +6 -0
- package/dist/utils/proposalPreview.d.ts +19 -0
- package/dist/utils/taskTypeMeta.d.ts +18 -0
- package/dist/utils/workflowToMermaid.d.ts +7 -0
- package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +1342 -0
- package/package.json +14 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as a } from "./init-DjUOC4st.js";
|
|
2
|
+
class o extends Map {
|
|
3
|
+
constructor(n, t = g) {
|
|
4
|
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
|
5
|
+
}
|
|
6
|
+
get(n) {
|
|
7
|
+
return super.get(c(this, n));
|
|
8
|
+
}
|
|
9
|
+
has(n) {
|
|
10
|
+
return super.has(c(this, n));
|
|
11
|
+
}
|
|
12
|
+
set(n, t) {
|
|
13
|
+
return super.set(l(this, n), t);
|
|
14
|
+
}
|
|
15
|
+
delete(n) {
|
|
16
|
+
return super.delete(p(this, n));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function c({ _intern: e, _key: n }, t) {
|
|
20
|
+
const r = n(t);
|
|
21
|
+
return e.has(r) ? e.get(r) : t;
|
|
22
|
+
}
|
|
23
|
+
function l({ _intern: e, _key: n }, t) {
|
|
24
|
+
const r = n(t);
|
|
25
|
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
|
26
|
+
}
|
|
27
|
+
function p({ _intern: e, _key: n }, t) {
|
|
28
|
+
const r = n(t);
|
|
29
|
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
32
|
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
|
33
|
+
}
|
|
34
|
+
const f = /* @__PURE__ */ Symbol("implicit");
|
|
35
|
+
function h() {
|
|
36
|
+
var e = new o(), n = [], t = [], r = f;
|
|
37
|
+
function s(u) {
|
|
38
|
+
let i = e.get(u);
|
|
39
|
+
if (i === void 0) {
|
|
40
|
+
if (r !== f) return r;
|
|
41
|
+
e.set(u, i = n.push(u) - 1);
|
|
42
|
+
}
|
|
43
|
+
return t[i % t.length];
|
|
44
|
+
}
|
|
45
|
+
return s.domain = function(u) {
|
|
46
|
+
if (!arguments.length) return n.slice();
|
|
47
|
+
n = [], e = new o();
|
|
48
|
+
for (const i of u)
|
|
49
|
+
e.has(i) || e.set(i, n.push(i) - 1);
|
|
50
|
+
return s;
|
|
51
|
+
}, s.range = function(u) {
|
|
52
|
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
|
53
|
+
}, s.unknown = function(u) {
|
|
54
|
+
return arguments.length ? (r = u, s) : r;
|
|
55
|
+
}, s.copy = function() {
|
|
56
|
+
return h(n, t).unknown(r);
|
|
57
|
+
}, a.apply(s, arguments), s;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
h as o
|
|
61
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { a4 as S, a7 as R, b2 as K, _ as d, g as Q, s as Y, a as tt, b as et, q as at, p as nt, l as z, c as rt, F as it, I as st, N as ot, e as lt, z as ct, G as ut } from "./mermaid.core-XSpZEAKP.js";
|
|
2
|
+
import { p as dt } from "./chunk-4BX2VUAB-DE3VjyiZ.js";
|
|
3
|
+
import { p as pt } from "./wardley-L42UT6IY-D7b2ujEZ.js";
|
|
4
|
+
import { d as P } from "./arc-BUGZGgtu.js";
|
|
5
|
+
import { o as gt } from "./ordinal-B6-f3MAq.js";
|
|
6
|
+
function ft(t, a) {
|
|
7
|
+
return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
|
|
8
|
+
}
|
|
9
|
+
function ht(t) {
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
function mt() {
|
|
13
|
+
var t = ht, a = ft, f = null, y = S(0), s = S(R), p = S(0);
|
|
14
|
+
function o(e) {
|
|
15
|
+
var r, l = (e = K(e)).length, g, h, v = 0, c = new Array(l), i = new Array(l), x = +y.apply(this, arguments), w = Math.min(R, Math.max(-R, s.apply(this, arguments) - x)), m, D = Math.min(Math.abs(w) / l, p.apply(this, arguments)), $ = D * (w < 0 ? -1 : 1), u;
|
|
16
|
+
for (r = 0; r < l; ++r)
|
|
17
|
+
(u = i[c[r] = r] = +t(e[r], r, e)) > 0 && (v += u);
|
|
18
|
+
for (a != null ? c.sort(function(A, C) {
|
|
19
|
+
return a(i[A], i[C]);
|
|
20
|
+
}) : f != null && c.sort(function(A, C) {
|
|
21
|
+
return f(e[A], e[C]);
|
|
22
|
+
}), r = 0, h = v ? (w - l * $) / v : 0; r < l; ++r, x = m)
|
|
23
|
+
g = c[r], u = i[g], m = x + (u > 0 ? u * h : 0) + $, i[g] = {
|
|
24
|
+
data: e[g],
|
|
25
|
+
index: r,
|
|
26
|
+
value: u,
|
|
27
|
+
startAngle: x,
|
|
28
|
+
endAngle: m,
|
|
29
|
+
padAngle: D
|
|
30
|
+
};
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
return o.value = function(e) {
|
|
34
|
+
return arguments.length ? (t = typeof e == "function" ? e : S(+e), o) : t;
|
|
35
|
+
}, o.sortValues = function(e) {
|
|
36
|
+
return arguments.length ? (a = e, f = null, o) : a;
|
|
37
|
+
}, o.sort = function(e) {
|
|
38
|
+
return arguments.length ? (f = e, a = null, o) : f;
|
|
39
|
+
}, o.startAngle = function(e) {
|
|
40
|
+
return arguments.length ? (y = typeof e == "function" ? e : S(+e), o) : y;
|
|
41
|
+
}, o.endAngle = function(e) {
|
|
42
|
+
return arguments.length ? (s = typeof e == "function" ? e : S(+e), o) : s;
|
|
43
|
+
}, o.padAngle = function(e) {
|
|
44
|
+
return arguments.length ? (p = typeof e == "function" ? e : S(+e), o) : p;
|
|
45
|
+
}, o;
|
|
46
|
+
}
|
|
47
|
+
var vt = ut.pie, F = {
|
|
48
|
+
sections: /* @__PURE__ */ new Map(),
|
|
49
|
+
showData: !1
|
|
50
|
+
}, T = F.sections, W = F.showData, xt = structuredClone(vt), St = /* @__PURE__ */ d(() => structuredClone(xt), "getConfig"), yt = /* @__PURE__ */ d(() => {
|
|
51
|
+
T = /* @__PURE__ */ new Map(), W = F.showData, ct();
|
|
52
|
+
}, "clear"), wt = /* @__PURE__ */ d(({ label: t, value: a }) => {
|
|
53
|
+
if (a < 0)
|
|
54
|
+
throw new Error(
|
|
55
|
+
`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
|
|
56
|
+
);
|
|
57
|
+
T.has(t) || (T.set(t, a), z.debug(`added new section: ${t}, with value: ${a}`));
|
|
58
|
+
}, "addSection"), At = /* @__PURE__ */ d(() => T, "getSections"), Ct = /* @__PURE__ */ d((t) => {
|
|
59
|
+
W = t;
|
|
60
|
+
}, "setShowData"), Dt = /* @__PURE__ */ d(() => W, "getShowData"), _ = {
|
|
61
|
+
getConfig: St,
|
|
62
|
+
clear: yt,
|
|
63
|
+
setDiagramTitle: nt,
|
|
64
|
+
getDiagramTitle: at,
|
|
65
|
+
setAccTitle: et,
|
|
66
|
+
getAccTitle: tt,
|
|
67
|
+
setAccDescription: Y,
|
|
68
|
+
getAccDescription: Q,
|
|
69
|
+
addSection: wt,
|
|
70
|
+
getSections: At,
|
|
71
|
+
setShowData: Ct,
|
|
72
|
+
getShowData: Dt
|
|
73
|
+
}, $t = /* @__PURE__ */ d((t, a) => {
|
|
74
|
+
dt(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
|
|
75
|
+
}, "populateDb"), Tt = {
|
|
76
|
+
parse: /* @__PURE__ */ d(async (t) => {
|
|
77
|
+
const a = await pt("pie", t);
|
|
78
|
+
z.debug(a), $t(a, _);
|
|
79
|
+
}, "parse")
|
|
80
|
+
}, bt = /* @__PURE__ */ d((t) => `
|
|
81
|
+
.pieCircle{
|
|
82
|
+
stroke: ${t.pieStrokeColor};
|
|
83
|
+
stroke-width : ${t.pieStrokeWidth};
|
|
84
|
+
opacity : ${t.pieOpacity};
|
|
85
|
+
}
|
|
86
|
+
.pieOuterCircle{
|
|
87
|
+
stroke: ${t.pieOuterStrokeColor};
|
|
88
|
+
stroke-width: ${t.pieOuterStrokeWidth};
|
|
89
|
+
fill: none;
|
|
90
|
+
}
|
|
91
|
+
.pieTitleText {
|
|
92
|
+
text-anchor: middle;
|
|
93
|
+
font-size: ${t.pieTitleTextSize};
|
|
94
|
+
fill: ${t.pieTitleTextColor};
|
|
95
|
+
font-family: ${t.fontFamily};
|
|
96
|
+
}
|
|
97
|
+
.slice {
|
|
98
|
+
font-family: ${t.fontFamily};
|
|
99
|
+
fill: ${t.pieSectionTextColor};
|
|
100
|
+
font-size:${t.pieSectionTextSize};
|
|
101
|
+
// fill: white;
|
|
102
|
+
}
|
|
103
|
+
.legend text {
|
|
104
|
+
fill: ${t.pieLegendTextColor};
|
|
105
|
+
font-family: ${t.fontFamily};
|
|
106
|
+
font-size: ${t.pieLegendTextSize};
|
|
107
|
+
}
|
|
108
|
+
`, "getStyles"), kt = bt, Et = /* @__PURE__ */ d((t) => {
|
|
109
|
+
const a = [...t.values()].reduce((s, p) => s + p, 0), f = [...t.entries()].map(([s, p]) => ({ label: s, value: p })).filter((s) => s.value / a * 100 >= 1);
|
|
110
|
+
return mt().value((s) => s.value).sort(null)(f);
|
|
111
|
+
}, "createPieArcs"), Mt = /* @__PURE__ */ d((t, a, f, y) => {
|
|
112
|
+
z.debug(`rendering pie chart
|
|
113
|
+
` + t);
|
|
114
|
+
const s = y.db, p = rt(), o = it(s.getConfig(), p.pie), e = 40, r = 18, l = 4, g = 450, h = g, v = st(a), c = v.append("g");
|
|
115
|
+
c.attr("transform", "translate(" + h / 2 + "," + g / 2 + ")");
|
|
116
|
+
const { themeVariables: i } = p;
|
|
117
|
+
let [x] = ot(i.pieOuterStrokeWidth);
|
|
118
|
+
x ??= 2;
|
|
119
|
+
const w = o.textPosition, m = Math.min(h, g) / 2 - e, D = P().innerRadius(0).outerRadius(m), $ = P().innerRadius(m * w).outerRadius(m * w);
|
|
120
|
+
c.append("circle").attr("cx", 0).attr("cy", 0).attr("r", m + x / 2).attr("class", "pieOuterCircle");
|
|
121
|
+
const u = s.getSections(), A = Et(u), C = [
|
|
122
|
+
i.pie1,
|
|
123
|
+
i.pie2,
|
|
124
|
+
i.pie3,
|
|
125
|
+
i.pie4,
|
|
126
|
+
i.pie5,
|
|
127
|
+
i.pie6,
|
|
128
|
+
i.pie7,
|
|
129
|
+
i.pie8,
|
|
130
|
+
i.pie9,
|
|
131
|
+
i.pie10,
|
|
132
|
+
i.pie11,
|
|
133
|
+
i.pie12
|
|
134
|
+
];
|
|
135
|
+
let b = 0;
|
|
136
|
+
u.forEach((n) => {
|
|
137
|
+
b += n;
|
|
138
|
+
});
|
|
139
|
+
const G = A.filter((n) => (n.data.value / b * 100).toFixed(0) !== "0"), k = gt(C).domain([
|
|
140
|
+
...u.keys()
|
|
141
|
+
]);
|
|
142
|
+
c.selectAll("mySlices").data(G).enter().append("path").attr("d", D).attr("fill", (n) => k(n.data.label)).attr("class", "pieCircle"), c.selectAll("mySlices").data(G).enter().append("text").text((n) => (n.data.value / b * 100).toFixed(0) + "%").attr("transform", (n) => "translate(" + $.centroid(n) + ")").style("text-anchor", "middle").attr("class", "slice");
|
|
143
|
+
const V = c.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText"), N = [...u.entries()].map(([n, M]) => ({
|
|
144
|
+
label: n,
|
|
145
|
+
value: M
|
|
146
|
+
})), E = c.selectAll(".legend").data(N).enter().append("g").attr("class", "legend").attr("transform", (n, M) => {
|
|
147
|
+
const O = r + l, Z = O * N.length / 2, H = 12 * r, J = M * O - Z;
|
|
148
|
+
return "translate(" + H + "," + J + ")";
|
|
149
|
+
});
|
|
150
|
+
E.append("rect").attr("width", r).attr("height", r).style("fill", (n) => k(n.label)).style("stroke", (n) => k(n.label)), E.append("text").attr("x", r + l).attr("y", r - l).text((n) => s.getShowData() ? `${n.label} [${n.value}]` : n.label);
|
|
151
|
+
const U = Math.max(
|
|
152
|
+
...E.selectAll("text").nodes().map((n) => n?.getBoundingClientRect().width ?? 0)
|
|
153
|
+
), j = h + e + r + l + U, L = V.node()?.getBoundingClientRect().width ?? 0, q = h / 2 - L / 2, X = h / 2 + L / 2, B = Math.min(0, q), I = Math.max(j, X) - B;
|
|
154
|
+
v.attr("viewBox", `${B} 0 ${I} ${g}`), lt(v, g, I, o.useMaxWidth);
|
|
155
|
+
}, "draw"), Rt = { draw: Mt }, Bt = {
|
|
156
|
+
parser: Tt,
|
|
157
|
+
db: _,
|
|
158
|
+
renderer: Rt,
|
|
159
|
+
styles: kt
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
Bt as diagram
|
|
163
|
+
};
|