@goplasmatic/dataflow-ui 2.1.3 → 2.1.5

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 (140) hide show
  1. package/dist/components/common/ErrorBoundary.d.ts +20 -0
  2. package/dist/components/common/ErrorBoundary.d.ts.map +1 -0
  3. package/dist/components/common/JsonEditor.d.ts +14 -0
  4. package/dist/components/common/JsonEditor.d.ts.map +1 -0
  5. package/dist/components/common/JsonViewer.d.ts +9 -0
  6. package/dist/components/common/JsonViewer.d.ts.map +1 -0
  7. package/dist/components/common/SearchInput.d.ts +10 -0
  8. package/dist/components/common/SearchInput.d.ts.map +1 -0
  9. package/dist/components/common/StatusBar.d.ts +13 -0
  10. package/dist/components/common/StatusBar.d.ts.map +1 -0
  11. package/dist/components/common/index.d.ts +6 -0
  12. package/dist/components/common/index.d.ts.map +1 -0
  13. package/dist/components/workflow-visualizer/WorkflowVisualizer.d.ts +64 -0
  14. package/dist/components/workflow-visualizer/WorkflowVisualizer.d.ts.map +1 -0
  15. package/dist/components/workflow-visualizer/cards/ConditionBadge.d.ts +9 -0
  16. package/dist/components/workflow-visualizer/cards/ConditionBadge.d.ts.map +1 -0
  17. package/dist/components/workflow-visualizer/cards/FunctionTypeBadge.d.ts +7 -0
  18. package/dist/components/workflow-visualizer/cards/FunctionTypeBadge.d.ts.map +1 -0
  19. package/dist/components/workflow-visualizer/cards/TaskRow.d.ts +11 -0
  20. package/dist/components/workflow-visualizer/cards/TaskRow.d.ts.map +1 -0
  21. package/dist/components/workflow-visualizer/cards/WorkflowCard.d.ts +11 -0
  22. package/dist/components/workflow-visualizer/cards/WorkflowCard.d.ts.map +1 -0
  23. package/dist/components/workflow-visualizer/cards/index.d.ts +5 -0
  24. package/dist/components/workflow-visualizer/cards/index.d.ts.map +1 -0
  25. package/dist/components/workflow-visualizer/components/DebugStateIcon.d.ts +8 -0
  26. package/dist/components/workflow-visualizer/components/DebugStateIcon.d.ts.map +1 -0
  27. package/dist/components/workflow-visualizer/components/FolderNode.d.ts +14 -0
  28. package/dist/components/workflow-visualizer/components/FolderNode.d.ts.map +1 -0
  29. package/dist/components/workflow-visualizer/components/TaskNode.d.ts +15 -0
  30. package/dist/components/workflow-visualizer/components/TaskNode.d.ts.map +1 -0
  31. package/dist/components/workflow-visualizer/components/TreeNode.d.ts +21 -0
  32. package/dist/components/workflow-visualizer/components/TreeNode.d.ts.map +1 -0
  33. package/dist/components/workflow-visualizer/components/WorkflowNode.d.ts +14 -0
  34. package/dist/components/workflow-visualizer/components/WorkflowNode.d.ts.map +1 -0
  35. package/dist/components/workflow-visualizer/components/colors.d.ts +13 -0
  36. package/dist/components/workflow-visualizer/components/colors.d.ts.map +1 -0
  37. package/dist/components/workflow-visualizer/components/index.d.ts +8 -0
  38. package/dist/components/workflow-visualizer/components/index.d.ts.map +1 -0
  39. package/dist/components/workflow-visualizer/constants.d.ts +31 -0
  40. package/dist/components/workflow-visualizer/constants.d.ts.map +1 -0
  41. package/dist/components/workflow-visualizer/context/DebuggerContext.d.ts +66 -0
  42. package/dist/components/workflow-visualizer/context/DebuggerContext.d.ts.map +1 -0
  43. package/dist/components/workflow-visualizer/context/ThemeContext.d.ts +15 -0
  44. package/dist/components/workflow-visualizer/context/ThemeContext.d.ts.map +1 -0
  45. package/dist/components/workflow-visualizer/context/index.d.ts +4 -0
  46. package/dist/components/workflow-visualizer/context/index.d.ts.map +1 -0
  47. package/dist/components/workflow-visualizer/debug/DebugInfoBubble.d.ts +26 -0
  48. package/dist/components/workflow-visualizer/debug/DebugInfoBubble.d.ts.map +1 -0
  49. package/dist/components/workflow-visualizer/debug/DebuggerControls.d.ts +12 -0
  50. package/dist/components/workflow-visualizer/debug/DebuggerControls.d.ts.map +1 -0
  51. package/dist/components/workflow-visualizer/debug/IntegratedDebugToolbar.d.ts +22 -0
  52. package/dist/components/workflow-visualizer/debug/IntegratedDebugToolbar.d.ts.map +1 -0
  53. package/dist/components/workflow-visualizer/debug/MessageInputPanel.d.ts +17 -0
  54. package/dist/components/workflow-visualizer/debug/MessageInputPanel.d.ts.map +1 -0
  55. package/dist/components/workflow-visualizer/debug/MessageStatePanel.d.ts +10 -0
  56. package/dist/components/workflow-visualizer/debug/MessageStatePanel.d.ts.map +1 -0
  57. package/dist/components/workflow-visualizer/debug/index.d.ts +6 -0
  58. package/dist/components/workflow-visualizer/debug/index.d.ts.map +1 -0
  59. package/dist/components/workflow-visualizer/hooks/index.d.ts +6 -0
  60. package/dist/components/workflow-visualizer/hooks/index.d.ts.map +1 -0
  61. package/dist/components/workflow-visualizer/hooks/useExpandedState.d.ts +10 -0
  62. package/dist/components/workflow-visualizer/hooks/useExpandedState.d.ts.map +1 -0
  63. package/dist/components/workflow-visualizer/hooks/useResizable.d.ts +28 -0
  64. package/dist/components/workflow-visualizer/hooks/useResizable.d.ts.map +1 -0
  65. package/dist/components/workflow-visualizer/hooks/useSearch.d.ts +10 -0
  66. package/dist/components/workflow-visualizer/hooks/useSearch.d.ts.map +1 -0
  67. package/dist/components/workflow-visualizer/hooks/useTreeNodeDebugState.d.ts +56 -0
  68. package/dist/components/workflow-visualizer/hooks/useTreeNodeDebugState.d.ts.map +1 -0
  69. package/dist/components/workflow-visualizer/index.d.ts +10 -0
  70. package/dist/components/workflow-visualizer/index.d.ts.map +1 -0
  71. package/dist/components/workflow-visualizer/utils/folderTree.d.ts +38 -0
  72. package/dist/components/workflow-visualizer/utils/folderTree.d.ts.map +1 -0
  73. package/dist/components/workflow-visualizer/utils/index.d.ts +3 -0
  74. package/dist/components/workflow-visualizer/utils/index.d.ts.map +1 -0
  75. package/dist/components/workflow-visualizer/views/DetailsPanel.d.ts +8 -0
  76. package/dist/components/workflow-visualizer/views/DetailsPanel.d.ts.map +1 -0
  77. package/dist/components/workflow-visualizer/views/ResultPanel.d.ts +16 -0
  78. package/dist/components/workflow-visualizer/views/ResultPanel.d.ts.map +1 -0
  79. package/dist/components/workflow-visualizer/views/RulesListView.d.ts +10 -0
  80. package/dist/components/workflow-visualizer/views/RulesListView.d.ts.map +1 -0
  81. package/dist/components/workflow-visualizer/views/TreeView.d.ts +12 -0
  82. package/dist/components/workflow-visualizer/views/TreeView.d.ts.map +1 -0
  83. package/dist/components/workflow-visualizer/views/WorkflowFlowView.d.ts +14 -0
  84. package/dist/components/workflow-visualizer/views/WorkflowFlowView.d.ts.map +1 -0
  85. package/dist/components/workflow-visualizer/views/detail-views/DataLogicView.d.ts +8 -0
  86. package/dist/components/workflow-visualizer/views/detail-views/DataLogicView.d.ts.map +1 -0
  87. package/dist/components/workflow-visualizer/views/detail-views/MappingContent.d.ts +9 -0
  88. package/dist/components/workflow-visualizer/views/detail-views/MappingContent.d.ts.map +1 -0
  89. package/dist/components/workflow-visualizer/views/detail-views/TaskContent.d.ts +9 -0
  90. package/dist/components/workflow-visualizer/views/detail-views/TaskContent.d.ts.map +1 -0
  91. package/dist/components/workflow-visualizer/views/detail-views/ValidationRuleContent.d.ts +9 -0
  92. package/dist/components/workflow-visualizer/views/detail-views/ValidationRuleContent.d.ts.map +1 -0
  93. package/dist/components/workflow-visualizer/views/detail-views/index.d.ts +5 -0
  94. package/dist/components/workflow-visualizer/views/detail-views/index.d.ts.map +1 -0
  95. package/dist/components/workflow-visualizer/views/flow-diagram/GroupFlowDiagram.d.ts +10 -0
  96. package/dist/components/workflow-visualizer/views/flow-diagram/GroupFlowDiagram.d.ts.map +1 -0
  97. package/dist/components/workflow-visualizer/views/flow-diagram/WorkflowFlowDiagram.d.ts +9 -0
  98. package/dist/components/workflow-visualizer/views/flow-diagram/WorkflowFlowDiagram.d.ts.map +1 -0
  99. package/dist/components/workflow-visualizer/views/flow-diagram/buildFlowGraph.d.ts +7 -0
  100. package/dist/components/workflow-visualizer/views/flow-diagram/buildFlowGraph.d.ts.map +1 -0
  101. package/dist/components/workflow-visualizer/views/flow-diagram/buildGroupFlowGraph.d.ts +7 -0
  102. package/dist/components/workflow-visualizer/views/flow-diagram/buildGroupFlowGraph.d.ts.map +1 -0
  103. package/dist/components/workflow-visualizer/views/flow-diagram/index.d.ts +3 -0
  104. package/dist/components/workflow-visualizer/views/flow-diagram/index.d.ts.map +1 -0
  105. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowConditionNode.d.ts +8 -0
  106. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowConditionNode.d.ts.map +1 -0
  107. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowSkipNode.d.ts +3 -0
  108. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowSkipNode.d.ts.map +1 -0
  109. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowStartEndNode.d.ts +8 -0
  110. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowStartEndNode.d.ts.map +1 -0
  111. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowTaskNode.d.ts +10 -0
  112. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowTaskNode.d.ts.map +1 -0
  113. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowWorkflowGroupNode.d.ts +11 -0
  114. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/FlowWorkflowGroupNode.d.ts.map +1 -0
  115. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/index.d.ts +6 -0
  116. package/dist/components/workflow-visualizer/views/flow-diagram/nodes/index.d.ts.map +1 -0
  117. package/dist/components/workflow-visualizer/views/index.d.ts +6 -0
  118. package/dist/components/workflow-visualizer/views/index.d.ts.map +1 -0
  119. package/dist/dataflow-ui.css +0 -4942
  120. package/dist/engines/WasmEngineAdapter.d.ts +23 -0
  121. package/dist/engines/WasmEngineAdapter.d.ts.map +1 -0
  122. package/dist/engines/index.d.ts +2 -0
  123. package/dist/engines/index.d.ts.map +1 -0
  124. package/dist/index.cjs +204 -29629
  125. package/dist/index.js +154 -29605
  126. package/dist/lib.d.ts +14 -0
  127. package/dist/types/debug.d.ts +221 -0
  128. package/dist/types/debug.d.ts.map +1 -0
  129. package/dist/types/debugConfig.d.ts +38 -0
  130. package/dist/types/debugConfig.d.ts.map +1 -0
  131. package/dist/types/engine.d.ts +28 -0
  132. package/dist/types/engine.d.ts.map +1 -0
  133. package/dist/types/index.d.ts +5 -0
  134. package/dist/types/index.d.ts.map +1 -0
  135. package/dist/types/workflow.d.ts +107 -0
  136. package/dist/types/workflow.d.ts.map +1 -0
  137. package/package.json +3 -3
  138. package/dist/datalogic_wasm-daWVf40b-DjgvHyxB.cjs +0 -383
  139. package/dist/datalogic_wasm-daWVf40b-kCXwLQ0R.js +0 -380
  140. package/dist/index.d.ts +0 -1
package/dist/lib.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export { WorkflowVisualizer } from './components/workflow-visualizer';
2
+ export type { WorkflowVisualizerProps, TreeSelectionType, } from './components/workflow-visualizer';
3
+ export { WorkflowCard, TaskRow, FunctionTypeBadge, ConditionBadge, } from './components/workflow-visualizer/cards';
4
+ export { RulesListView, WorkflowFlowView, TreeView } from './components/workflow-visualizer/views';
5
+ export { DebuggerControls, MessageInputPanel, MessageStatePanel, DebugInfoBubble, DebugStateBadge, IntegratedDebugToolbar, } from './components/workflow-visualizer/debug';
6
+ export { ThemeProvider, useTheme, DebuggerProvider, useDebugger, useDebuggerOptional, } from './components/workflow-visualizer/context';
7
+ export type { Theme } from './components/workflow-visualizer/context';
8
+ export { useTreeNodeDebugState, useWorkflowDebugState, useWorkflowConditionDebugState, useTaskDebugState, useTaskConditionDebugState, } from './components/workflow-visualizer/hooks';
9
+ export type { TreeNodeDebugState } from './components/workflow-visualizer/hooks';
10
+ export { SearchInput, JsonViewer, ErrorBoundary } from './components/common';
11
+ export type { Workflow, Task, FunctionConfig, JsonLogicValue, MapMapping, MappingItem, MapFunctionInput, ValidationRule, ValidationFunctionInput, BuiltinFunctionType, Message, ErrorInfo, Change, AuditTrail, DebugNodeState, ConditionResult, ExecutionStep, ExecutionTrace, StepResult, PlaybackState, DebuggerState, DebuggerAction, DataflowEngine, EngineFactory, DebugConfig, } from './types';
12
+ export { isBuiltinFunction, getFunctionDisplayInfo, createEmptyMessage, cloneMessage, getMessageAtStep, getChangesAtStep, getWorkflowState, getTaskState, } from './types';
13
+ export { WasmEngineAdapter, defaultEngineFactory } from './engines';
14
+ //# sourceMappingURL=lib.d.ts.map
@@ -0,0 +1,221 @@
1
+ import { JsonLogicValue } from './workflow';
2
+ /**
3
+ * Message structure for workflow execution
4
+ * Mirrors the Rust Message struct from WASM output
5
+ */
6
+ export interface Message {
7
+ /** Unique message ID */
8
+ id: string;
9
+ /** Original payload */
10
+ payload: Record<string, unknown>;
11
+ /** Context containing data, metadata, temp_data */
12
+ context: {
13
+ data: Record<string, unknown>;
14
+ metadata: Record<string, unknown>;
15
+ temp_data: Record<string, unknown>;
16
+ };
17
+ /** List of errors that occurred during processing */
18
+ errors: ErrorInfo[];
19
+ /** Audit trail of changes made during processing */
20
+ audit_trail: AuditTrail[];
21
+ }
22
+ /**
23
+ * Error information captured during execution
24
+ */
25
+ export interface ErrorInfo {
26
+ /** Error code or identifier */
27
+ code: string;
28
+ /** Human-readable error message */
29
+ message: string;
30
+ /** Task ID where error occurred */
31
+ task_id?: string;
32
+ /** Workflow ID where error occurred */
33
+ workflow_id?: string;
34
+ }
35
+ /**
36
+ * Audit trail entry for tracking changes (matches Rust AuditTrail)
37
+ */
38
+ export interface AuditTrail {
39
+ /** Workflow ID where change occurred */
40
+ workflow_id: string;
41
+ /** Task ID where change occurred */
42
+ task_id: string;
43
+ /** Timestamp of the change */
44
+ timestamp: string;
45
+ /** Changes made by the task */
46
+ changes: Change[];
47
+ /** Status code (e.g., 200 for success) */
48
+ status: number;
49
+ }
50
+ /**
51
+ * A single change in the audit trail
52
+ */
53
+ export interface Change {
54
+ /** Path to the changed field (e.g., "data.user.name") */
55
+ path: string;
56
+ /** Previous value */
57
+ old_value: unknown;
58
+ /** New value */
59
+ new_value: unknown;
60
+ }
61
+ /**
62
+ * Result of a step (executed or skipped)
63
+ */
64
+ export type StepResult = 'executed' | 'skipped';
65
+ /**
66
+ * A single step in the execution trace (matches Rust ExecutionStep)
67
+ */
68
+ export interface ExecutionStep {
69
+ /** ID of the workflow this step belongs to */
70
+ workflow_id: string;
71
+ /** ID of the task (undefined for workflow-level skips) */
72
+ task_id?: string;
73
+ /** Result of the step execution */
74
+ result: StepResult;
75
+ /** Message snapshot after this step (only for executed steps) */
76
+ message?: Message;
77
+ /** Context snapshots before each mapping (map tasks only, trace mode) */
78
+ mapping_contexts?: Record<string, unknown>[];
79
+ }
80
+ /**
81
+ * Complete execution trace (matches Rust ExecutionTrace)
82
+ */
83
+ export interface ExecutionTrace {
84
+ /** All execution steps in order */
85
+ steps: ExecutionStep[];
86
+ }
87
+ /**
88
+ * Debug state for a node in the execution tree
89
+ */
90
+ export type DebugNodeState = 'pending' | 'current' | 'executed' | 'skipped' | 'error';
91
+ /**
92
+ * Result of evaluating a condition
93
+ */
94
+ export interface ConditionResult {
95
+ /** The condition that was evaluated */
96
+ condition: JsonLogicValue;
97
+ /** The result of evaluation */
98
+ result: boolean;
99
+ /** Data context used for evaluation */
100
+ context: Record<string, unknown>;
101
+ }
102
+ /**
103
+ * Playback state for the debugger
104
+ */
105
+ export type PlaybackState = 'stopped' | 'playing' | 'paused';
106
+ /**
107
+ * Complete debugger state
108
+ */
109
+ export interface DebuggerState {
110
+ /** Whether debug mode is active */
111
+ isActive: boolean;
112
+ /** Current execution trace */
113
+ trace: ExecutionTrace | null;
114
+ /** Current step index being viewed */
115
+ currentStepIndex: number;
116
+ /** Playback state */
117
+ playbackState: PlaybackState;
118
+ /** Playback speed (ms between steps) */
119
+ playbackSpeed: number;
120
+ /** Input payload for debugging */
121
+ inputPayload: Record<string, unknown> | null;
122
+ /** Whether the debugger is currently executing */
123
+ isExecuting: boolean;
124
+ /** Error during execution */
125
+ executionError: string | null;
126
+ /** Whether to skip steps with failed conditions (result: 'skipped') */
127
+ skipFailedConditions: boolean;
128
+ }
129
+ /**
130
+ * Actions for the debugger reducer
131
+ */
132
+ export type DebuggerAction = {
133
+ type: 'ACTIVATE';
134
+ } | {
135
+ type: 'DEACTIVATE';
136
+ } | {
137
+ type: 'SET_INPUT_PAYLOAD';
138
+ payload: Record<string, unknown>;
139
+ } | {
140
+ type: 'START_EXECUTION';
141
+ } | {
142
+ type: 'EXECUTE_TRACE';
143
+ trace: ExecutionTrace;
144
+ } | {
145
+ type: 'EXECUTION_ERROR';
146
+ error: string;
147
+ } | {
148
+ type: 'PLAY';
149
+ } | {
150
+ type: 'PAUSE';
151
+ } | {
152
+ type: 'STOP';
153
+ } | {
154
+ type: 'RESET';
155
+ } | {
156
+ type: 'STEP_FORWARD';
157
+ } | {
158
+ type: 'STEP_BACKWARD';
159
+ } | {
160
+ type: 'GO_TO_STEP';
161
+ index: number;
162
+ } | {
163
+ type: 'SET_SPEED';
164
+ speed: number;
165
+ } | {
166
+ type: 'SET_SKIP_FAILED_CONDITIONS';
167
+ skip: boolean;
168
+ };
169
+ /**
170
+ * Create an empty message
171
+ */
172
+ export declare function createEmptyMessage(): Message;
173
+ /**
174
+ * Deep clone a message
175
+ */
176
+ export declare function cloneMessage(message: Message): Message;
177
+ /**
178
+ * Get the message at a specific step in the trace
179
+ * Returns the message snapshot from the last executed step at or before the given index
180
+ */
181
+ export declare function getMessageAtStep(trace: ExecutionTrace, stepIndex: number): Message | null;
182
+ /**
183
+ * Get the changes made at a specific step
184
+ * Returns the changes from the last audit_trail entry if step was executed
185
+ */
186
+ export declare function getChangesAtStep(trace: ExecutionTrace, stepIndex: number): Change[];
187
+ /**
188
+ * Check if a step is for a specific workflow
189
+ */
190
+ export declare function isStepForWorkflow(step: ExecutionStep, workflowId: string): boolean;
191
+ /**
192
+ * Check if a step is for a specific task
193
+ */
194
+ export declare function isStepForTask(step: ExecutionStep, workflowId: string, taskId: string): boolean;
195
+ /**
196
+ * Get the context snapshot for a specific mapping within a step.
197
+ * For map tasks, returns the context before that mapping executed.
198
+ * Falls back to the step's message context if mapping_contexts is not available.
199
+ */
200
+ export declare function getMappingContext(step: ExecutionStep, mappingIndex: number): Record<string, unknown> | undefined;
201
+ /**
202
+ * Get the state of a workflow based on the trace and current step
203
+ * Returns:
204
+ * - 'pending' if all workflow steps are after the current step
205
+ * - 'executed'/'skipped'/'error' for workflows with steps at or before current
206
+ * Note: Workflows don't show as 'current' - only individual tasks do
207
+ */
208
+ export declare function getWorkflowState(trace: ExecutionTrace, currentStepIndex: number, workflowId: string): DebugNodeState;
209
+ /**
210
+ * Get the state of a task based on the trace and current step
211
+ * Returns:
212
+ * - 'pending' for future steps (after current)
213
+ * - 'executed'/'skipped'/'error' for steps at or before current position
214
+ * Note: Tasks show as 'executed' when on their step (completed state)
215
+ */
216
+ export declare function getTaskState(trace: ExecutionTrace, currentStepIndex: number, workflowId: string, taskId: string): DebugNodeState;
217
+ /**
218
+ * Check if a task is the currently viewed step
219
+ */
220
+ export declare function isTaskCurrent(trace: ExecutionTrace, currentStepIndex: number, workflowId: string, taskId: string): boolean;
221
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/types/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,mDAAmD;IACnD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;IACF,qDAAqD;IACrD,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,oDAAoD;IACpD,WAA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,CAAC,GAAG,SAAS,CAErC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GACjB,cAAc,CAmDhB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,EACrB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,cAAc,CAqChB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,cAAc,EACrB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAKT"}
@@ -0,0 +1,38 @@
1
+ import { EngineFactory, ExecutionTrace } from './index';
2
+ /**
3
+ * Configuration for integrated debug mode in WorkflowVisualizer.
4
+ *
5
+ * When enabled, the visualizer wraps itself with a DebuggerProvider and
6
+ * shows integrated debug controls in the header.
7
+ */
8
+ export interface DebugConfig {
9
+ /**
10
+ * Enable integrated debug mode.
11
+ * When true, the visualizer will include a DebuggerProvider and show debug controls.
12
+ */
13
+ enabled: boolean;
14
+ /**
15
+ * Factory function to create engine instances.
16
+ * Required for execution. If not provided, the run button will be disabled.
17
+ */
18
+ engineFactory?: EngineFactory;
19
+ /**
20
+ * Initial payload to use for debugging.
21
+ * Can also be provided via the debugPayload prop on WorkflowVisualizer.
22
+ */
23
+ initialPayload?: Record<string, unknown>;
24
+ /**
25
+ * Automatically execute when workflows or payload change.
26
+ * @default false
27
+ */
28
+ autoExecute?: boolean;
29
+ /**
30
+ * Callback fired when execution completes successfully.
31
+ */
32
+ onExecutionComplete?: (trace: ExecutionTrace) => void;
33
+ /**
34
+ * Callback fired when execution encounters an error.
35
+ */
36
+ onExecutionError?: (error: string) => void;
37
+ }
38
+ //# sourceMappingURL=debugConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugConfig.d.ts","sourceRoot":"","sources":["../../src/types/debugConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C"}
@@ -0,0 +1,28 @@
1
+ import { ExecutionTrace } from './debug';
2
+ import { Workflow } from './workflow';
3
+ /**
4
+ * Interface for custom dataflow engines
5
+ *
6
+ * Implement this interface to provide a custom WASM engine for executing
7
+ * workflows with custom functions or plugins.
8
+ */
9
+ export interface DataflowEngine {
10
+ /**
11
+ * Process a payload through the engine and return an execution trace
12
+ * for step-by-step debugging.
13
+ */
14
+ processWithTrace(payload: Record<string, unknown>): Promise<ExecutionTrace>;
15
+ /**
16
+ * Optional cleanup method called when the engine is no longer needed.
17
+ * Use this to free WASM memory.
18
+ */
19
+ dispose?(): void;
20
+ }
21
+ /**
22
+ * Factory function type for creating engine instances.
23
+ *
24
+ * Called when workflows change to create a new engine instance
25
+ * configured with the current workflows.
26
+ */
27
+ export type EngineFactory = (workflows: Workflow[]) => DataflowEngine;
28
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/types/engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE5E;;;OAGG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './workflow';
2
+ export * from './debug';
3
+ export * from './engine';
4
+ export * from './debugConfig';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ /**
3
+ * JSONLogic value type - can be any valid JSON value or JSONLogic expression
4
+ */
5
+ export type JsonLogicValue = string | number | boolean | null | JsonLogicValue[] | {
6
+ [key: string]: JsonLogicValue;
7
+ };
8
+ /**
9
+ * Function configuration for a task
10
+ */
11
+ export interface FunctionConfig {
12
+ /** Function name (e.g., "map", "validation", or custom) */
13
+ name: string;
14
+ /** Function-specific input configuration */
15
+ input?: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Task definition within a workflow
19
+ */
20
+ export interface Task {
21
+ /** Unique identifier for the task */
22
+ id: string;
23
+ /** Human-readable name */
24
+ name: string;
25
+ /** Optional description */
26
+ description?: string;
27
+ /** JSONLogic condition (evaluated against full context: data, metadata, temp_data) */
28
+ condition?: JsonLogicValue;
29
+ /** Function to execute */
30
+ function: FunctionConfig;
31
+ /** Whether to continue workflow if this task fails */
32
+ continue_on_error?: boolean;
33
+ }
34
+ /**
35
+ * Workflow definition
36
+ */
37
+ export interface Workflow {
38
+ /** Unique identifier for the workflow */
39
+ id: string;
40
+ /** Human-readable name */
41
+ name: string;
42
+ /** Execution priority (lower = higher priority, 0 is highest) */
43
+ priority?: number;
44
+ /** Optional description */
45
+ description?: string;
46
+ /** Optional folder path for grouping (e.g., "orders/processing") */
47
+ path?: string;
48
+ /** JSONLogic condition (evaluated against full context: data, metadata, temp_data) */
49
+ condition?: JsonLogicValue;
50
+ /** Tasks in this workflow */
51
+ tasks: Task[];
52
+ /** Whether to continue processing other workflows if this one fails */
53
+ continue_on_error?: boolean;
54
+ }
55
+ /**
56
+ * Map function mapping configuration
57
+ */
58
+ export interface MapMapping {
59
+ /** Target path for the mapped value */
60
+ path: string;
61
+ /** JSONLogic expression to compute the value */
62
+ logic: JsonLogicValue;
63
+ }
64
+ /**
65
+ * Alias for MapMapping - used in tree and details views
66
+ */
67
+ export type MappingItem = MapMapping;
68
+ /**
69
+ * Map function input configuration
70
+ */
71
+ export interface MapFunctionInput {
72
+ mappings: MapMapping[];
73
+ }
74
+ /**
75
+ * Validation rule configuration
76
+ */
77
+ export interface ValidationRule {
78
+ /** JSONLogic expression that should return true for valid data */
79
+ logic: JsonLogicValue;
80
+ /** Error message if validation fails */
81
+ message: string;
82
+ /** Optional path for the validation target */
83
+ path?: string;
84
+ }
85
+ /**
86
+ * Validation function input configuration
87
+ */
88
+ export interface ValidationFunctionInput {
89
+ rules: ValidationRule[];
90
+ }
91
+ /**
92
+ * Built-in function types
93
+ */
94
+ export type BuiltinFunctionType = 'map' | 'validation' | 'validate';
95
+ /**
96
+ * Check if a function is a built-in type
97
+ */
98
+ export declare function isBuiltinFunction(name: string): name is BuiltinFunctionType;
99
+ /**
100
+ * Get display info for a function type including the Lucide icon component
101
+ */
102
+ export declare function getFunctionDisplayInfo(name: string): {
103
+ label: string;
104
+ colorClass: string;
105
+ Icon: LucideIcon;
106
+ };
107
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/types/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,cAAc,EAAE,GAChB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAAE,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,0BAA0B;IAC1B,QAAQ,EAAE,cAAc,CAAC;IACzB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,6BAA6B;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,KAAK,EAAE,cAAc,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,KAAK,EAAE,cAAc,CAAC;IACtB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,mBAAmB,CAE3E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB,CAUA"}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@goplasmatic/dataflow-ui",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "type": "module",
5
5
  "description": "React visualization library for dataflow-rs workflow engine",
6
6
  "author": "Plasmatic Engineering <shankar@goplasmatic.io>",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
9
+ "types": "./dist/lib.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./dist/index.d.ts",
12
+ "types": "./dist/lib.d.ts",
13
13
  "import": "./dist/index.js",
14
14
  "require": "./dist/index.cjs"
15
15
  },