@goplasmatic/dataflow-ui 2.0.7 → 2.0.9

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/index.d.ts CHANGED
@@ -89,6 +89,43 @@ export declare interface DataflowEngine {
89
89
  dispose?(): void;
90
90
  }
91
91
 
92
+ /**
93
+ * Configuration for integrated debug mode in WorkflowVisualizer.
94
+ *
95
+ * When enabled, the visualizer wraps itself with a DebuggerProvider and
96
+ * shows integrated debug controls in the header.
97
+ */
98
+ export declare interface DebugConfig {
99
+ /**
100
+ * Enable integrated debug mode.
101
+ * When true, the visualizer will include a DebuggerProvider and show debug controls.
102
+ */
103
+ enabled: boolean;
104
+ /**
105
+ * Factory function to create engine instances.
106
+ * Required for execution. If not provided, the run button will be disabled.
107
+ */
108
+ engineFactory?: EngineFactory;
109
+ /**
110
+ * Initial payload to use for debugging.
111
+ * Can also be provided via the debugPayload prop on WorkflowVisualizer.
112
+ */
113
+ initialPayload?: Record<string, unknown>;
114
+ /**
115
+ * Automatically execute when workflows or payload change.
116
+ * @default false
117
+ */
118
+ autoExecute?: boolean;
119
+ /**
120
+ * Callback fired when execution completes successfully.
121
+ */
122
+ onExecutionComplete?: (trace: ExecutionTrace) => void;
123
+ /**
124
+ * Callback fired when execution encounters an error.
125
+ */
126
+ onExecutionError?: (error: string) => void;
127
+ }
128
+
92
129
  /**
93
130
  * Actions for the debugger reducer
94
131
  */
@@ -366,6 +403,27 @@ export declare function getTaskState(trace: ExecutionTrace, currentStepIndex: nu
366
403
  */
367
404
  export declare function getWorkflowState(trace: ExecutionTrace, currentStepIndex: number, workflowId: string): DebugNodeState;
368
405
 
406
+ /**
407
+ * Compact debug toolbar for integration into the visualizer header.
408
+ * Includes execution status, step counter, and playback controls.
409
+ */
410
+ export declare function IntegratedDebugToolbar({ workflows, payload, autoExecute, onExecutionComplete, onExecutionError, className, }: IntegratedDebugToolbarProps): JSX_2.Element;
411
+
412
+ declare interface IntegratedDebugToolbarProps {
413
+ /** Workflows to execute */
414
+ workflows: Workflow[];
415
+ /** Payload for execution */
416
+ payload?: Record<string, unknown>;
417
+ /** Auto-execute on change */
418
+ autoExecute?: boolean;
419
+ /** Callback when execution completes */
420
+ onExecutionComplete?: (trace: ExecutionTrace) => void;
421
+ /** Callback when execution errors */
422
+ onExecutionError?: (error: string) => void;
423
+ /** Additional CSS class */
424
+ className?: string;
425
+ }
426
+
369
427
  /**
370
428
  * Check if a function is a built-in type
371
429
  */
@@ -387,52 +445,6 @@ declare interface JsonViewerProps {
387
445
  className?: string;
388
446
  }
389
447
 
390
- /**
391
- * Legacy execution step type (for backwards compatibility)
392
- * @deprecated Use ExecutionStep instead
393
- */
394
- export declare interface LegacyExecutionStep {
395
- /** Unique ID for this step */
396
- id: string;
397
- /** Type of step */
398
- type: 'workflow-condition' | 'workflow-start' | 'workflow-end' | 'task-condition' | 'task-start' | 'task-end';
399
- /** Associated workflow */
400
- workflow: Workflow;
401
- /** Associated task (if applicable) */
402
- task?: Task;
403
- /** Result of condition evaluation (if applicable) */
404
- conditionResult?: ConditionResult;
405
- /** Message state before this step */
406
- messageBefore: Message;
407
- /** Message state after this step */
408
- messageAfter: Message;
409
- /** State of this node */
410
- state: DebugNodeState;
411
- /** Timestamp when this step occurred */
412
- timestamp: number;
413
- /** Duration of this step in ms (for task-end) */
414
- duration?: number;
415
- /** Error if this step failed */
416
- error?: ErrorInfo;
417
- }
418
-
419
- /**
420
- * Legacy trace type (for backwards compatibility)
421
- * @deprecated Use ExecutionTrace instead
422
- */
423
- export declare interface LegacyWorkflowExecutionTrace {
424
- /** All execution steps */
425
- steps: LegacyExecutionStep[];
426
- /** Initial message before any processing */
427
- initialMessage: Message;
428
- /** Final message after all processing */
429
- finalMessage: Message;
430
- /** Total execution duration in ms */
431
- totalDuration: number;
432
- /** Whether execution completed successfully */
433
- success: boolean;
434
- }
435
-
436
448
  /**
437
449
  * Map function input configuration
438
450
  */
@@ -527,8 +539,6 @@ declare interface SearchInputProps {
527
539
  className?: string;
528
540
  }
529
541
 
530
- export declare type SelectionType = TreeSelectionType;
531
-
532
542
  /**
533
543
  * Result of a step (executed or skipped)
534
544
  */
@@ -739,11 +749,11 @@ declare interface WorkflowFlowViewProps {
739
749
  onWorkflowSelect?: (workflow: Workflow) => void;
740
750
  onWorkflowConditionClick?: (workflow: Workflow) => void;
741
751
  onTaskConditionClick?: (task: Task, workflow: Workflow) => void;
742
- selection?: SelectionType;
752
+ selection?: TreeSelectionType;
743
753
  highlightedTaskIds?: Set<string>;
744
754
  }
745
755
 
746
- export declare function WorkflowVisualizer({ workflows, onWorkflowSelect, onTaskSelect, theme, className, executionResult, debugMode, }: WorkflowVisualizerProps): JSX_2.Element;
756
+ export declare function WorkflowVisualizer({ workflows, onWorkflowSelect, onTaskSelect, theme, className, executionResult, debugConfig, debugPayload, }: WorkflowVisualizerProps): JSX_2.Element;
747
757
 
748
758
  export declare interface WorkflowVisualizerProps {
749
759
  /** Array of workflow definitions to display */
@@ -758,8 +768,16 @@ export declare interface WorkflowVisualizerProps {
758
768
  className?: string;
759
769
  /** Execution result to display in the result panel */
760
770
  executionResult?: Message | null;
761
- /** Enable debug mode with step-by-step visualization */
762
- debugMode?: boolean;
771
+ /**
772
+ * Debug configuration for integrated debug mode.
773
+ * When enabled, automatically wraps with DebuggerProvider and shows controls.
774
+ */
775
+ debugConfig?: DebugConfig;
776
+ /**
777
+ * Payload for debugging. Used with debugConfig.
778
+ * Takes precedence over debugConfig.initialPayload.
779
+ */
780
+ debugPayload?: Record<string, unknown>;
763
781
  }
764
782
 
765
783
  export { }