@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.
Files changed (110) hide show
  1. package/README.md +61 -22
  2. package/dist/AiWorkflowIDE.d.ts +217 -0
  3. package/dist/WorkflowIDE.d.ts +22 -3
  4. package/dist/ai-BJwQZcGK.js +15168 -0
  5. package/dist/ai.d.ts +30 -0
  6. package/dist/arc-BUGZGgtu.js +83 -0
  7. package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +4692 -0
  8. package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +2418 -0
  9. package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +1577 -0
  10. package/dist/channel-CURI9jmI.js +5 -0
  11. package/dist/chunk-2J33WTMH-D7gashNz.js +19 -0
  12. package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +8 -0
  13. package/dist/chunk-55IACEB6-GYZ_m2MY.js +8 -0
  14. package/dist/chunk-727SXJPM-D4WVyvOg.js +1528 -0
  15. package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +1387 -0
  16. package/dist/chunk-FMBD7UC4-B3CSVzS4.js +19 -0
  17. package/dist/chunk-ND2GUHAM-CNj_s1aK.js +68 -0
  18. package/dist/chunk-QZHKN3VN-DoV8iUKo.js +15 -0
  19. package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +16 -0
  20. package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +16 -0
  21. package/dist/components/AiNative/AgentTimeline.d.ts +18 -0
  22. package/dist/components/AiNative/AiCommandCenter.d.ts +40 -0
  23. package/dist/components/AiNative/AiConfigPanel.d.ts +9 -0
  24. package/dist/components/AiNative/BusinessCanvas.d.ts +15 -0
  25. package/dist/components/AiNative/CanvasPreview.d.ts +16 -0
  26. package/dist/components/AiNative/ClarificationCard.d.ts +9 -0
  27. package/dist/components/AiNative/FailureSummaryCard.d.ts +20 -0
  28. package/dist/components/AiNative/LibraryPanel.d.ts +9 -0
  29. package/dist/components/AiNative/MermaidBlock.d.ts +6 -0
  30. package/dist/components/AiNative/PlanCard.d.ts +15 -0
  31. package/dist/components/AiNative/ProposalPreviewCard.d.ts +21 -0
  32. package/dist/components/AiNative/RecommendationCard.d.ts +10 -0
  33. package/dist/components/AiNative/RepairCard.d.ts +17 -0
  34. package/dist/components/AiNative/ReviewBar.d.ts +21 -0
  35. package/dist/components/AiNative/WorkflowRunCard.d.ts +14 -0
  36. package/dist/components/Controls/ModeSlider.d.ts +2 -0
  37. package/dist/components/ExecutionSummaryPanel.d.ts +4 -0
  38. package/dist/components/WorkflowRunPanel.d.ts +12 -0
  39. package/dist/components/nodes/NodeWrapper.d.ts +2 -1
  40. package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +2609 -0
  41. package/dist/cytoscape.esm-kVAWcYoG.js +18755 -0
  42. package/dist/dagre-BM42HDAG-CFMIuOmS.js +445 -0
  43. package/dist/defaultLocale-BgPVtth8.js +171 -0
  44. package/dist/diagram-2AECGRRQ-C5jZp2YX.js +217 -0
  45. package/dist/diagram-5GNKFQAL-DRUVcHpp.js +123 -0
  46. package/dist/diagram-KO2AKTUF-BOl4aaej.js +461 -0
  47. package/dist/diagram-LMA3HP47-ZeckPR2Q.js +142 -0
  48. package/dist/diagram-OG6HWLK6-qUWeLfa-.js +528 -0
  49. package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +899 -0
  50. package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +1628 -0
  51. package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +2707 -0
  52. package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +815 -0
  53. package/dist/graph-BRoPeNF3.js +1545 -0
  54. package/dist/hooks/useNodeExecution.d.ts +1 -1
  55. package/dist/hooks/useNodeLayout.d.ts +1 -1
  56. package/dist/index.d.ts +3 -2
  57. package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +24 -0
  58. package/dist/init-DjUOC4st.js +16 -0
  59. package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +621 -0
  60. package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +834 -0
  61. package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +724 -0
  62. package/dist/katex-DoRnZ_sp.js +11682 -0
  63. package/dist/layout-D9EpM4Fg.js +1728 -0
  64. package/dist/linear-BA49eco4.js +259 -0
  65. package/dist/mermaid.core-XSpZEAKP.js +16137 -0
  66. package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +827 -0
  67. package/dist/ordinal-B6-f3MAq.js +61 -0
  68. package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +163 -0
  69. package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +1024 -0
  70. package/dist/reactflow-ui-ai.es.js +12 -0
  71. package/dist/reactflow-ui.css +1 -1
  72. package/dist/reactflow-ui.es.js +8198 -7039
  73. package/dist/reactflow-ui.umd.js +52 -17
  74. package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +882 -0
  75. package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +847 -0
  76. package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +2891 -0
  77. package/dist/services/ai/agentRunner.d.ts +51 -0
  78. package/dist/services/ai/contextEngine.d.ts +83 -0
  79. package/dist/services/ai/draftPersistence.d.ts +22 -0
  80. package/dist/services/ai/errorMessages.d.ts +16 -0
  81. package/dist/services/ai/intentClassifier.d.ts +17 -0
  82. package/dist/services/ai/protocolAdapter.d.ts +114 -0
  83. package/dist/services/ai/ruleEngine.d.ts +57 -0
  84. package/dist/services/ai/schemaRegistry.d.ts +51 -0
  85. package/dist/services/ai/systemPrompt.d.ts +30 -0
  86. package/dist/services/ai/toolDefs.d.ts +9 -0
  87. package/dist/services/ai/toolExecutor.d.ts +83 -0
  88. package/dist/services/ai/toolRegistry.d.ts +38 -0
  89. package/dist/services/ai/transport.d.ts +58 -0
  90. package/dist/services/aiService.d.ts +27 -5
  91. package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +263 -0
  92. package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +16 -0
  93. package/dist/store/aiStore.d.ts +199 -0
  94. package/dist/store/ideStoresContext.d.ts +39 -0
  95. package/dist/store/libraryStore.d.ts +25 -0
  96. package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +1055 -0
  97. package/dist/types/aiEvents.d.ts +38 -0
  98. package/dist/types/conductor.d.ts +23 -2
  99. package/dist/types/workflow.d.ts +36 -0
  100. package/dist/types/workflowLibrary.d.ts +27 -0
  101. package/dist/utils/executionAnalyzer.d.ts +32 -0
  102. package/dist/utils/nodeMeta.d.ts +6 -0
  103. package/dist/utils/proposalPreview.d.ts +19 -0
  104. package/dist/utils/taskTypeMeta.d.ts +18 -0
  105. package/dist/utils/workflowToMermaid.d.ts +7 -0
  106. package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +1557 -0
  107. package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
  108. package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +675 -0
  109. package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +1342 -0
  110. package/package.json +14 -4
package/dist/ai.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * AI 入口 — AiWorkflowIDE 及其配套类型/工具的公开导出。
3
+ *
4
+ * 集成方引入方式:
5
+ * ```tsx
6
+ * import { AiWorkflowIDE } from '@yiyi_zhang/reactflow-ui/ai';
7
+ * import '@yiyi_zhang/reactflow-ui/style.css';
8
+ * ```
9
+ *
10
+ * 拆分为独立入口的原因:只使用 WorkflowIDE(主入口 `.`)的集成方不需要
11
+ * 承担 AI 协议适配、工具执行、Mermaid 渲染等代码体积。
12
+ */
13
+ export { AiWorkflowIDE } from './AiWorkflowIDE';
14
+ export type { AiWorkflowIDEProps, AiWorkflowIDERef } from './AiWorkflowIDE';
15
+ export type { AiConfig, Message, ToolDef, StreamEvent, TestConnectionResult } from './services/ai/protocolAdapter';
16
+ export { PROVIDER_DEFAULTS, testConnection } from './services/ai/protocolAdapter';
17
+ export { BASE_SYSTEM_PROMPT, buildSystemPrompt } from './services/ai/systemPrompt';
18
+ export type { AiTransport, AgentRequest } from './services/ai/transport';
19
+ export type { IdeDraft } from './services/ai/draftPersistence';
20
+ export type { CustomTool } from './services/ai/toolRegistry';
21
+ export type { CustomValidationRule } from './services/ai/ruleEngine';
22
+ export type { TaskSchema } from './services/ai/schemaRegistry';
23
+ export type { WorkflowLevel, WorkflowLibraryItem, WorkflowLibraryDetail } from './types/workflowLibrary';
24
+ export type { AiEvent, AiEventType } from './types/aiEvents';
25
+ export type { DiffSummary, PartialAcceptSelection, PatchOp } from './services/ai/toolExecutor';
26
+ export { applyPartialProposal, describeDiff, computeDiff } from './services/ai/toolExecutor';
27
+ export type { AiMetrics } from './store/aiStore';
28
+ export type { WorkflowDef, TaskDef, WorkflowInputParam, WorkflowInstance } from './types/conductor';
29
+ export { parseWorkflowInputParams } from './types/conductor';
30
+ export type { ExecutionActions, ThemeMode, ThemeColor, LayoutDirection, ViewMode, TaskExecutionData } from './types/workflow';
@@ -0,0 +1,83 @@
1
+ import { a0 as ln, a1 as an, a2 as H, a3 as q, a4 as B, a5 as un, a6 as y, a7 as tn, a8 as L, a9 as _, aa as rn, ab as o, ac as sn, ad as on, ae as fn } from "./mermaid.core-XSpZEAKP.js";
2
+ function cn(l) {
3
+ return l.innerRadius;
4
+ }
5
+ function yn(l) {
6
+ return l.outerRadius;
7
+ }
8
+ function gn(l) {
9
+ return l.startAngle;
10
+ }
11
+ function dn(l) {
12
+ return l.endAngle;
13
+ }
14
+ function mn(l) {
15
+ return l && l.padAngle;
16
+ }
17
+ function pn(l, h, I, D, v, A, C, a) {
18
+ var O = I - l, i = D - h, n = C - v, d = a - A, u = d * O - n * i;
19
+ if (!(u * u < y))
20
+ return u = (n * (h - A) - d * (l - v)) / u, [l + u * O, h + u * i];
21
+ }
22
+ function W(l, h, I, D, v, A, C) {
23
+ var a = l - I, O = h - D, i = (C ? A : -A) / L(a * a + O * O), n = i * O, d = -i * a, u = l + n, s = h + d, f = I + n, c = D + d, F = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, R = m * m + g * g, T = v - A, P = u * c - f * s, S = (g < 0 ? -1 : 1) * L(on(0, T * T * R - P * P)), j = (P * g - m * S) / R, z = (-P * m - g * S) / R, w = (P * g + m * S) / R, p = (-P * m + g * S) / R, x = j - F, e = z - t, r = w - F, G = p - t;
24
+ return x * x + e * e > r * r + G * G && (j = w, z = p), {
25
+ cx: j,
26
+ cy: z,
27
+ x01: -n,
28
+ y01: -d,
29
+ x11: j * (v / T - 1),
30
+ y11: z * (v / T - 1)
31
+ };
32
+ }
33
+ function hn() {
34
+ var l = cn, h = yn, I = B(0), D = null, v = gn, A = dn, C = mn, a = null, O = ln(i);
35
+ function i() {
36
+ var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - un, c = A.apply(this, arguments) - un, F = rn(c - f), t = c > f;
37
+ if (a || (a = n = O()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
38
+ else if (F > tn - y)
39
+ a.moveTo(s * H(f), s * q(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * H(c), u * q(c)), a.arc(0, 0, u, c, f, t));
40
+ else {
41
+ var m = f, g = c, R = f, T = c, P = F, S = F, j = C.apply(this, arguments) / 2, z = j > y && (D ? +D.apply(this, arguments) : L(u * u + s * s)), w = _(rn(s - u) / 2, +I.apply(this, arguments)), p = w, x = w, e, r;
42
+ if (z > y) {
43
+ var G = sn(z / u * q(j)), M = sn(z / s * q(j));
44
+ (P -= G * 2) > y ? (G *= t ? 1 : -1, R += G, T -= G) : (P = 0, R = T = (f + c) / 2), (S -= M * 2) > y ? (M *= t ? 1 : -1, m += M, g -= M) : (S = 0, m = g = (f + c) / 2);
45
+ }
46
+ var J = s * H(m), K = s * q(m), N = u * H(T), Q = u * q(T);
47
+ if (w > y) {
48
+ var U = s * H(g), V = s * q(g), X = u * H(R), Y = u * q(R), E;
49
+ if (F < an)
50
+ if (E = pn(J, K, X, Y, U, V, N, Q)) {
51
+ var Z = J - E[0], $ = K - E[1], b = U - E[0], k = V - E[1], nn = 1 / q(fn((Z * b + $ * k) / (L(Z * Z + $ * $) * L(b * b + k * k))) / 2), en = L(E[0] * E[0] + E[1] * E[1]);
52
+ p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
53
+ } else
54
+ p = x = 0;
55
+ }
56
+ S > y ? x > y ? (e = W(X, Y, J, K, s, x, t), r = W(U, V, N, Q, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(J, K), a.arc(0, 0, s, m, g, !t)) : a.moveTo(J, K), !(u > y) || !(P > y) ? a.lineTo(N, Q) : p > y ? (e = W(N, Q, U, V, u, -p, t), r = W(J, K, X, Y, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, R, t);
57
+ }
58
+ if (a.closePath(), n) return a = null, n + "" || null;
59
+ }
60
+ return i.centroid = function() {
61
+ var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
62
+ return [H(d) * n, q(d) * n];
63
+ }, i.innerRadius = function(n) {
64
+ return arguments.length ? (l = typeof n == "function" ? n : B(+n), i) : l;
65
+ }, i.outerRadius = function(n) {
66
+ return arguments.length ? (h = typeof n == "function" ? n : B(+n), i) : h;
67
+ }, i.cornerRadius = function(n) {
68
+ return arguments.length ? (I = typeof n == "function" ? n : B(+n), i) : I;
69
+ }, i.padRadius = function(n) {
70
+ return arguments.length ? (D = n == null ? null : typeof n == "function" ? n : B(+n), i) : D;
71
+ }, i.startAngle = function(n) {
72
+ return arguments.length ? (v = typeof n == "function" ? n : B(+n), i) : v;
73
+ }, i.endAngle = function(n) {
74
+ return arguments.length ? (A = typeof n == "function" ? n : B(+n), i) : A;
75
+ }, i.padAngle = function(n) {
76
+ return arguments.length ? (C = typeof n == "function" ? n : B(+n), i) : C;
77
+ }, i.context = function(n) {
78
+ return arguments.length ? (a = n ?? null, i) : a;
79
+ }, i;
80
+ }
81
+ export {
82
+ hn as d
83
+ };