@yiyi_zhang/reactflow-ui 0.5.0-beta.0 → 1.1.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 (116) hide show
  1. package/README.md +150 -117
  2. package/dist/AiWorkflowIDE.d.ts +2 -0
  3. package/dist/WorkflowIDE.d.ts +14 -2
  4. package/dist/actions/builtin/common.d.ts +8 -0
  5. package/dist/actions/builtin/ecs.d.ts +12 -0
  6. package/dist/actions/registry.d.ts +23 -0
  7. package/dist/actions/types.d.ts +45 -0
  8. package/dist/ai.d.ts +5 -1
  9. package/dist/components/AICopilot/ParameterSuggester.d.ts +9 -0
  10. package/dist/components/AiNative/AgentTimeline.d.ts +11 -6
  11. package/dist/components/AiNative/InlineCanvasCopilot.d.ts +7 -0
  12. package/dist/components/AiNative/ProposalPreviewCard.d.ts +3 -3
  13. package/dist/components/BrandLogo.d.ts +13 -0
  14. package/dist/components/ExecutionWaterfallPanel.d.ts +3 -0
  15. package/dist/components/SandboxConfigModal.d.ts +7 -0
  16. package/dist/components/StructuredJsonViewer.d.ts +11 -0
  17. package/dist/components/business/ActionForm.d.ts +12 -0
  18. package/dist/components/business/DataPillInput.d.ts +14 -0
  19. package/dist/components/business/DecisionBranchCard.d.ts +13 -0
  20. package/dist/components/business/ForkJoinCard.d.ts +13 -0
  21. package/dist/components/business/FriendlyErrorCard.d.ts +8 -0
  22. package/dist/components/business/LoopDoWhileCard.d.ts +13 -0
  23. package/dist/components/business/PillPicker.d.ts +11 -0
  24. package/dist/components/business/RunStoryTimeline.d.ts +9 -0
  25. package/dist/components/business/StepFlowEditor.d.ts +11 -0
  26. package/dist/components/nodes/NodeLayout.d.ts +3 -1
  27. package/dist/components/template/TemplateExtractor.d.ts +10 -0
  28. package/dist/components/template/TemplateGallery.d.ts +10 -0
  29. package/dist/components/template/TemplateSetupWizard.d.ts +9 -0
  30. package/dist/hooks/useNodeExecution.d.ts +5 -2
  31. package/dist/index.d.ts +33 -0
  32. package/dist/logo.svg +37 -0
  33. package/dist/product-launch.html +1400 -0
  34. package/dist/reactflow-ui-ai.es.js +21392 -10
  35. package/dist/reactflow-ui.css +1 -1
  36. package/dist/reactflow-ui.es.js +20314 -9020
  37. package/dist/reactflow-ui.umd.js +31 -21
  38. package/dist/sample-workflows/ecs-lifecycle-automation.json +74 -0
  39. package/dist/services/ai/agentRunner.d.ts +23 -19
  40. package/dist/services/ai/draftPersistence.d.ts +3 -2
  41. package/dist/services/ai/systemPrompt.d.ts +1 -1
  42. package/dist/services/ai/toolExecutor.d.ts +15 -2
  43. package/dist/services/ai/workflowSynthesizer.d.ts +118 -0
  44. package/dist/services/wlsp/workflowLsp.d.ts +101 -0
  45. package/dist/stepmodel/compile.d.ts +5 -0
  46. package/dist/stepmodel/decompile.d.ts +5 -0
  47. package/dist/stepmodel/types.d.ts +61 -0
  48. package/dist/store/aiStore.d.ts +34 -3
  49. package/dist/template/applyTemplate.d.ts +10 -0
  50. package/dist/template/builtin/templates.d.ts +37 -0
  51. package/dist/template/sanitizer/anonymize.d.ts +5 -0
  52. package/dist/template/sanitizer/prune.d.ts +10 -0
  53. package/dist/template/sanitizer/rules.d.ts +10 -0
  54. package/dist/template/sanitizer/types.d.ts +55 -0
  55. package/dist/template/templateStore.d.ts +32 -0
  56. package/dist/template/types.d.ts +99 -0
  57. package/dist/types/aiEvents.d.ts +3 -1
  58. package/dist/types/conductor.d.ts +6 -1
  59. package/dist/types/workflow.d.ts +32 -0
  60. package/dist/utils/friendlyErrorTranslator.d.ts +26 -0
  61. package/dist/utils/localSandboxEngine.d.ts +49 -0
  62. package/package.json +7 -4
  63. package/dist/ai-BJwQZcGK.js +0 -15168
  64. package/dist/arc-BUGZGgtu.js +0 -83
  65. package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +0 -4692
  66. package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +0 -2418
  67. package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +0 -1577
  68. package/dist/channel-CURI9jmI.js +0 -5
  69. package/dist/chunk-2J33WTMH-D7gashNz.js +0 -19
  70. package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +0 -8
  71. package/dist/chunk-55IACEB6-GYZ_m2MY.js +0 -8
  72. package/dist/chunk-727SXJPM-D4WVyvOg.js +0 -1528
  73. package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +0 -1387
  74. package/dist/chunk-FMBD7UC4-B3CSVzS4.js +0 -19
  75. package/dist/chunk-ND2GUHAM-CNj_s1aK.js +0 -68
  76. package/dist/chunk-QZHKN3VN-DoV8iUKo.js +0 -15
  77. package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +0 -16
  78. package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +0 -16
  79. package/dist/components/Controls/ModeSlider.d.ts +0 -2
  80. package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +0 -2609
  81. package/dist/cytoscape.esm-kVAWcYoG.js +0 -18755
  82. package/dist/dagre-BM42HDAG-CFMIuOmS.js +0 -445
  83. package/dist/defaultLocale-BgPVtth8.js +0 -171
  84. package/dist/diagram-2AECGRRQ-C5jZp2YX.js +0 -217
  85. package/dist/diagram-5GNKFQAL-DRUVcHpp.js +0 -123
  86. package/dist/diagram-KO2AKTUF-BOl4aaej.js +0 -461
  87. package/dist/diagram-LMA3HP47-ZeckPR2Q.js +0 -142
  88. package/dist/diagram-OG6HWLK6-qUWeLfa-.js +0 -528
  89. package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +0 -899
  90. package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +0 -1628
  91. package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +0 -2707
  92. package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +0 -815
  93. package/dist/graph-BRoPeNF3.js +0 -1545
  94. package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +0 -24
  95. package/dist/init-DjUOC4st.js +0 -16
  96. package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +0 -621
  97. package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +0 -834
  98. package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +0 -724
  99. package/dist/katex-DoRnZ_sp.js +0 -11682
  100. package/dist/layout-D9EpM4Fg.js +0 -1728
  101. package/dist/linear-BA49eco4.js +0 -259
  102. package/dist/mermaid.core-XSpZEAKP.js +0 -16137
  103. package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +0 -827
  104. package/dist/ordinal-B6-f3MAq.js +0 -61
  105. package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +0 -163
  106. package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +0 -1024
  107. package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +0 -882
  108. package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +0 -847
  109. package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +0 -2891
  110. package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +0 -263
  111. package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +0 -16
  112. package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +0 -1055
  113. package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +0 -1557
  114. package/dist/wardley-L42UT6IY-D7b2ujEZ.js +0 -22512
  115. package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +0 -675
  116. package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +0 -1342
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface DataPillInputProps {
5
+ value: any;
6
+ onChange: (val: any) => void;
7
+ placeholder?: string;
8
+ multiline?: boolean;
9
+ upstreamSteps: BusinessStep[];
10
+ registry?: ActionRegistry;
11
+ workflowInputParams?: any[];
12
+ disabled?: boolean;
13
+ }
14
+ export declare const DataPillInput: React.FC<DataPillInputProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface DecisionBranchCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ }
13
+ export declare const DecisionBranchCard: React.FC<DecisionBranchCardProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface ForkJoinCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ }
13
+ export declare const ForkJoinCard: React.FC<ForkJoinCardProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface FriendlyErrorCardProps {
3
+ rawError?: string;
4
+ statusCode?: number;
5
+ taskName?: string;
6
+ onActionClick?: (actionKey?: string) => void;
7
+ }
8
+ export declare const FriendlyErrorCard: React.FC<FriendlyErrorCardProps>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface LoopDoWhileCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ }
13
+ export declare const LoopDoWhileCard: React.FC<LoopDoWhileCardProps>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { BusinessStep, PillToken } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface PillPickerProps {
5
+ upstreamSteps: BusinessStep[];
6
+ onSelect: (pill: PillToken) => void;
7
+ onClose: () => void;
8
+ registry?: ActionRegistry;
9
+ workflowInputParams?: any[];
10
+ }
11
+ export declare const PillPicker: React.FC<PillPickerProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WorkflowInstance } from '../../types/conductor';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface RunStoryTimelineProps {
5
+ instance: WorkflowInstance;
6
+ registry?: ActionRegistry;
7
+ onInspectStep?: (taskRef: string) => void;
8
+ }
9
+ export declare const RunStoryTimeline: React.FC<RunStoryTimelineProps>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef, WorkflowInstance } from '../../types/conductor';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface StepFlowEditorProps {
5
+ workflowDef: WorkflowDef | null;
6
+ onChange: (def: WorkflowDef) => void;
7
+ registry?: ActionRegistry;
8
+ readOnly?: boolean;
9
+ workflowExecution?: WorkflowInstance;
10
+ }
11
+ export declare const StepFlowEditor: React.FC<StepFlowEditorProps>;
@@ -4,7 +4,9 @@ interface NodeLayoutProps {
4
4
  icon: React.ElementType;
5
5
  header: string;
6
6
  title: string;
7
+ subTitle?: string;
7
8
  meta?: string;
9
+ duration?: string;
8
10
  color: string;
9
11
  status?: ExecutionStatus;
10
12
  isRunning?: boolean;
@@ -12,5 +14,5 @@ interface NodeLayoutProps {
12
14
  width?: string | number;
13
15
  border?: boolean;
14
16
  }
15
- declare const _default: React.MemoExoticComponent<({ icon: Icon, header, title, meta, color, status, isRunning, children, width, border }: NodeLayoutProps) => import("react/jsx-runtime").JSX.Element>;
17
+ declare const _default: React.MemoExoticComponent<({ icon: Icon, header, title, subTitle, meta, duration, color, status, isRunning, children, width, }: NodeLayoutProps) => import("react/jsx-runtime").JSX.Element>;
16
18
  export default _default;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { WorkflowInstance } from '../../types/conductor';
3
+ import type { WorkflowTemplate } from '../../template/types';
4
+ export interface TemplateExtractorProps {
5
+ isOpen: boolean;
6
+ instance: WorkflowInstance;
7
+ onClose: () => void;
8
+ onPublished?: (template: WorkflowTemplate) => void;
9
+ }
10
+ export declare const TemplateExtractor: React.FC<TemplateExtractorProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef } from '../../types/conductor';
3
+ import { TemplateStore } from '../../template/templateStore';
4
+ export interface TemplateGalleryProps {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ onSelectTemplate: (configuredDef: WorkflowDef) => void;
8
+ templateStore?: TemplateStore;
9
+ }
10
+ export declare const TemplateGallery: React.FC<TemplateGalleryProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef } from '../../types/conductor';
3
+ import type { WorkflowTemplate } from '../../template/types';
4
+ export interface TemplateSetupWizardProps {
5
+ template: WorkflowTemplate;
6
+ onApply: (configuredDef: WorkflowDef) => void;
7
+ onClose: () => void;
8
+ }
9
+ export declare const TemplateSetupWizard: React.FC<TemplateSetupWizardProps>;
@@ -1,9 +1,12 @@
1
+ import type { TaskExecutionData } from '../types/workflow';
1
2
  /**
2
- * 获取节点的运行态信息(mode、executionData、retryCount)
3
+ * 获取节点的运行态信息(mode、executionData、retryCount),
4
+ * 支持 DO_WHILE 循环迭代轮次切换与 Time-Travel 时间旅行状态投影。
3
5
  */
4
6
  export declare const useNodeExecution: (taskReferenceName: string) => {
5
7
  mode: import("../types/workflow").EditorMode;
6
- execution: import("../ai").TaskExecutionData | null | undefined;
8
+ execution: TaskExecutionData | null;
7
9
  isRunning: boolean;
8
10
  retryCount: number;
11
+ durationText: string | undefined;
9
12
  };
package/dist/index.d.ts CHANGED
@@ -4,3 +4,36 @@ export type { WorkflowDef, TaskDef, WorkflowInputParam, WorkflowInstance } from
4
4
  export { parseWorkflowInputParams } from './types/conductor';
5
5
  export type { AIServiceConfig } from './services/aiService';
6
6
  export type { ExecutionActions, RestartOptions, ViewMode, RunState, WorkflowExecutionInput } from './types/workflow';
7
+ export { getCompletionItems, buildDataFlowGraph, refactorTaskReferenceName, getUpstreamAncestors, inferTaskOutputSchema, } from './services/wlsp/workflowLsp';
8
+ export type { WlspCompletionItem, DataFlowGraph, DataFlowEdge, InferredField, UpstreamTaskInfo, } from './services/wlsp/workflowLsp';
9
+ export { executeLocalSandboxDryRun, buildDefaultWorkflowMockInput, generateDefaultTaskOutputPreview, } from './utils/localSandboxEngine';
10
+ export type { SandboxDryRunOptions, TaskMockOverride, } from './utils/localSandboxEngine';
11
+ export * from './actions/types';
12
+ export { ActionRegistry, defaultActionRegistry } from './actions/registry';
13
+ export { BUILTIN_ECS_ACTIONS } from './actions/builtin/ecs';
14
+ export { BUILTIN_COMMON_ACTIONS } from './actions/builtin/common';
15
+ export * from './stepmodel/types';
16
+ export { compileStepToTaskDef, compileStepModelToWorkflowDef, } from './stepmodel/compile';
17
+ export { decompileTaskDefToStep, decompileWorkflowDefToStepModel, } from './stepmodel/decompile';
18
+ export { StepFlowEditor } from './components/business/StepFlowEditor';
19
+ export { DecisionBranchCard } from './components/business/DecisionBranchCard';
20
+ export { ForkJoinCard } from './components/business/ForkJoinCard';
21
+ export { LoopDoWhileCard } from './components/business/LoopDoWhileCard';
22
+ export { DataPillInput } from './components/business/DataPillInput';
23
+ export { ActionForm } from './components/business/ActionForm';
24
+ export * from './template/types';
25
+ export { TemplateStore, defaultTemplateStore } from './template/templateStore';
26
+ export { applyTemplateVariables } from './template/applyTemplate';
27
+ export { BUILTIN_WORKFLOW_TEMPLATES } from './template/builtin/templates';
28
+ export { TemplateGallery } from './components/template/TemplateGallery';
29
+ export { TemplateSetupWizard } from './components/template/TemplateSetupWizard';
30
+ export * from './template/sanitizer/types';
31
+ export { scanWorkflowDef, scanObjectForSensitiveFindings } from './template/sanitizer/rules';
32
+ export { analyzeTasksForPruning, applyTaskPruning } from './template/sanitizer/prune';
33
+ export { extractTemplateFromInstance } from './template/sanitizer/anonymize';
34
+ export { TemplateExtractor } from './components/template/TemplateExtractor';
35
+ export * from './utils/friendlyErrorTranslator';
36
+ export { FriendlyErrorCard } from './components/business/FriendlyErrorCard';
37
+ export type { FriendlyErrorCardProps } from './components/business/FriendlyErrorCard';
38
+ export { RunStoryTimeline } from './components/business/RunStoryTimeline';
39
+ export type { RunStoryTimelineProps } from './components/business/RunStoryTimeline';
package/dist/logo.svg ADDED
@@ -0,0 +1,37 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
2
+ <defs>
3
+ <linearGradient id="bg-grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0%" stop-color="#11172B" />
5
+ <stop offset="100%" stop-color="#090D18" />
6
+ </linearGradient>
7
+ <linearGradient id="border-grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0%" stop-color="#6366F1" stop-opacity="0.75" />
9
+ <stop offset="100%" stop-color="#06B6D4" stop-opacity="0.45" />
10
+ </linearGradient>
11
+ <linearGradient id="branch-top" x1="9" y1="16" x2="23" y2="10" gradientUnits="userSpaceOnUse">
12
+ <stop offset="0%" stop-color="#818CF8" />
13
+ <stop offset="100%" stop-color="#22D3EE" />
14
+ </linearGradient>
15
+ <linearGradient id="branch-bottom" x1="9" y1="16" x2="23" y2="22" gradientUnits="userSpaceOnUse">
16
+ <stop offset="0%" stop-color="#6366F1" />
17
+ <stop offset="100%" stop-color="#34D399" />
18
+ </linearGradient>
19
+ </defs>
20
+
21
+ <!-- Minimalist Squircle Base -->
22
+ <rect x="1.25" y="1.25" width="29.5" height="29.5" rx="8" fill="url(#bg-grad)" stroke="url(#border-grad)" stroke-width="1.5" />
23
+
24
+ <!-- Bifurcated DAG Flow Curves -->
25
+ <path d="M 9.5 16 C 15 16, 15.5 10, 22.5 10" stroke="url(#branch-top)" stroke-width="2.4" stroke-linecap="round" />
26
+ <path d="M 9.5 16 C 15 16, 15.5 22, 22.5 22" stroke="url(#branch-bottom)" stroke-width="2.4" stroke-linecap="round" />
27
+
28
+ <!-- Origin Root Node -->
29
+ <circle cx="9.5" cy="16" r="3.4" fill="#6366F1" />
30
+ <circle cx="9.5" cy="16" r="1.4" fill="#F8FAFC" />
31
+
32
+ <!-- Upper Branch Target Node -->
33
+ <circle cx="22.5" cy="10" r="2.7" fill="#22D3EE" />
34
+
35
+ <!-- Lower Branch Deterministic Pass Node -->
36
+ <circle cx="22.5" cy="22" r="2.7" fill="#34D399" />
37
+ </svg>