@d34dman/flowdrop 0.0.61 → 0.0.62
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 +6 -0
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/agentspec/AgentSpecAdapter.js +3 -1
- package/dist/api/client.d.ts +4 -0
- package/dist/api/client.js +6 -1
- package/dist/api/enhanced-client.js +7 -6
- package/dist/components/App.svelte +143 -219
- package/dist/components/CanvasBanner.stories.svelte +25 -0
- package/dist/components/CanvasBanner.stories.svelte.d.ts +27 -0
- package/dist/components/CanvasBanner.svelte +2 -2
- package/dist/components/ConfigForm.svelte +37 -36
- package/dist/components/ConfigPanel.stories.svelte +38 -0
- package/dist/components/ConfigPanel.stories.svelte.d.ts +27 -0
- package/dist/components/ConfigPanel.svelte +2 -2
- package/dist/components/ConnectionLine.svelte +2 -2
- package/dist/components/FlowDropZone.svelte +18 -2
- package/dist/components/FlowDropZone.svelte.d.ts +2 -0
- package/dist/components/LoadingSpinner.stories.svelte +30 -0
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.stories.svelte +22 -0
- package/dist/components/Logo.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.svelte +33 -13
- package/dist/components/Logo.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +21 -0
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +27 -0
- package/dist/components/MarkdownDisplay.svelte +4 -3
- package/dist/components/Navbar.stories.svelte +41 -0
- package/dist/components/Navbar.stories.svelte.d.ts +27 -0
- package/dist/components/Navbar.svelte +4 -4
- package/dist/components/NodeSidebar.svelte +12 -12
- package/dist/components/NodeStatusOverlay.stories.svelte +74 -0
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +27 -0
- package/dist/components/PipelineStatus.svelte +11 -4
- package/dist/components/PortCoordinateTracker.svelte +1 -1
- package/dist/components/SchemaForm.stories.svelte +101 -0
- package/dist/components/SchemaForm.stories.svelte.d.ts +27 -0
- package/dist/components/SchemaForm.svelte +17 -12
- package/dist/components/SettingsModal.svelte +3 -3
- package/dist/components/SettingsPanel.svelte +23 -22
- package/dist/components/StatusIcon.stories.svelte +60 -0
- package/dist/components/StatusIcon.stories.svelte.d.ts +27 -0
- package/dist/components/StatusIcon.svelte +7 -0
- package/dist/components/StatusLabel.stories.svelte +17 -0
- package/dist/components/StatusLabel.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.stories.svelte +25 -0
- package/dist/components/ThemeToggle.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.svelte +8 -8
- package/dist/components/UniversalNode.svelte +1 -1
- package/dist/components/WorkflowEditor.svelte +298 -294
- package/dist/components/form/FormAutocomplete.svelte +20 -19
- package/dist/components/form/FormCheckboxGroup.stories.svelte +28 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormField.svelte +3 -3
- package/dist/components/form/FormFieldLight.svelte +2 -2
- package/dist/components/form/FormFieldWrapper.stories.svelte +31 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormFieldset.svelte +7 -7
- package/dist/components/form/FormNumberField.stories.svelte +33 -0
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormRangeField.stories.svelte +31 -0
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormSelect.stories.svelte +50 -0
- package/dist/components/form/FormSelect.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTemplateEditor.svelte +2 -1
- package/dist/components/form/FormTextField.stories.svelte +30 -0
- package/dist/components/form/FormTextField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextarea.stories.svelte +31 -0
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormToggle.stories.svelte +30 -0
- package/dist/components/form/FormToggle.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +1 -1
- package/dist/components/form/types.d.ts +15 -47
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +43 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +24 -24
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +49 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +19 -19
- package/dist/components/interrupt/FormPrompt.svelte +15 -15
- package/dist/components/interrupt/InterruptBubble.svelte +202 -236
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +46 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +842 -0
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +34 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +21 -21
- package/dist/components/nodes/GatewayNode.stories.svelte +76 -0
- package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/GatewayNode.svelte +19 -17
- package/dist/components/nodes/IdeaNode.stories.svelte +48 -0
- package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/IdeaNode.svelte +10 -26
- package/dist/components/nodes/NotesNode.stories.svelte +69 -0
- package/dist/components/nodes/NotesNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/NotesNode.svelte +8 -8
- package/dist/components/nodes/SimpleNode.stories.svelte +101 -0
- package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SimpleNode.svelte +16 -24
- package/dist/components/nodes/SquareNode.stories.svelte +56 -0
- package/dist/components/nodes/SquareNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SquareNode.svelte +13 -21
- package/dist/components/nodes/TerminalNode.stories.svelte +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/TerminalNode.svelte +6 -6
- package/dist/components/nodes/ToolNode.stories.svelte +71 -0
- package/dist/components/nodes/ToolNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/ToolNode.svelte +7 -15
- package/dist/components/nodes/WorkflowNode.stories.svelte +50 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/WorkflowNode.svelte +13 -13
- package/dist/components/playground/ChatPanel.svelte +48 -48
- package/dist/components/playground/ExecutionLogs.svelte +23 -23
- package/dist/components/playground/InputCollector.svelte +24 -24
- package/dist/components/playground/MessageBubble.stories.svelte +49 -0
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +27 -0
- package/dist/components/playground/MessageBubble.svelte +49 -46
- package/dist/components/playground/Playground.svelte +194 -129
- package/dist/components/playground/PlaygroundModal.svelte +5 -5
- package/dist/components/playground/SessionManager.svelte +26 -26
- package/dist/config/constants.d.ts +22 -0
- package/dist/config/constants.js +22 -0
- package/dist/config/endpoints.d.ts +19 -0
- package/dist/config/runtimeConfig.js +2 -1
- package/dist/core/index.d.ts +5 -2
- package/dist/core/index.js +9 -1
- package/dist/editor/index.d.ts +13 -9
- package/dist/editor/index.js +15 -11
- package/dist/form/code.d.ts +2 -1
- package/dist/form/code.js +1 -3
- package/dist/form/markdown.d.ts +2 -1
- package/dist/form/markdown.js +1 -3
- package/dist/helpers/workflowEditorHelper.js +13 -9
- package/dist/mocks/app-forms.js +1 -0
- package/dist/mocks/app-navigation.js +3 -1
- package/dist/mocks/app-stores.d.ts +4 -4
- package/dist/playground/index.d.ts +4 -3
- package/dist/playground/index.js +12 -10
- package/dist/playground/mount.js +6 -13
- package/dist/services/agentSpecExecutionService.js +2 -1
- package/dist/services/api.js +10 -18
- package/dist/services/apiVariableService.js +2 -1
- package/dist/services/autoSaveService.d.ts +3 -3
- package/dist/services/autoSaveService.js +21 -17
- package/dist/services/categoriesApi.js +13 -5
- package/dist/services/draftStorage.js +5 -4
- package/dist/services/dynamicSchemaService.js +4 -4
- package/dist/services/globalSave.d.ts +60 -11
- package/dist/services/globalSave.js +160 -83
- package/dist/services/historyService.d.ts +2 -1
- package/dist/services/historyService.js +7 -3
- package/dist/services/interruptService.js +9 -8
- package/dist/services/nodeExecutionService.js +14 -6
- package/dist/services/playgroundService.js +2 -1
- package/dist/services/portConfigApi.js +11 -7
- package/dist/services/toastService.d.ts +1 -1
- package/dist/services/toastService.js +6 -5
- package/dist/services/variableService.js +3 -2
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/stores/{categoriesStore.d.ts → categoriesStore.svelte.d.ts} +3 -3
- package/dist/stores/{categoriesStore.js → categoriesStore.svelte.js} +15 -18
- package/dist/stores/editorStateMachine.svelte.d.ts +42 -0
- package/dist/stores/editorStateMachine.svelte.js +132 -0
- package/dist/stores/{historyStore.d.ts → historyStore.svelte.d.ts} +18 -15
- package/dist/stores/{historyStore.js → historyStore.svelte.js} +40 -21
- package/dist/stores/{interruptStore.d.ts → interruptStore.svelte.d.ts} +16 -15
- package/dist/stores/{interruptStore.js → interruptStore.svelte.js} +85 -94
- package/dist/stores/{playgroundStore.d.ts → playgroundStore.svelte.d.ts} +41 -33
- package/dist/stores/{playgroundStore.js → playgroundStore.svelte.js} +164 -84
- package/dist/stores/{portCoordinateStore.d.ts → portCoordinateStore.svelte.d.ts} +10 -4
- package/dist/stores/{portCoordinateStore.js → portCoordinateStore.svelte.js} +38 -35
- package/dist/stores/{settingsStore.d.ts → settingsStore.svelte.d.ts} +45 -28
- package/dist/stores/{settingsStore.js → settingsStore.svelte.js} +169 -128
- package/dist/stores/{workflowStore.d.ts → workflowStore.svelte.d.ts} +101 -65
- package/dist/stores/{workflowStore.js → workflowStore.svelte.js} +285 -239
- package/dist/stories/CanvasDecorator.svelte +50 -0
- package/dist/stories/CanvasDecorator.svelte.d.ts +8 -0
- package/dist/stories/NodeDecorator.svelte +74 -0
- package/dist/stories/NodeDecorator.svelte.d.ts +8 -0
- package/dist/stories/utils.d.ts +93 -0
- package/dist/stories/utils.js +122 -0
- package/dist/styles/base.css +114 -61
- package/dist/styles/toast.css +2 -2
- package/dist/styles/tokens.css +250 -185
- package/dist/svelte-app.d.ts +0 -6
- package/dist/svelte-app.js +13 -31
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interrupt.d.ts +89 -5
- package/dist/types/interrupt.js +13 -1
- package/dist/types/playground.d.ts +5 -0
- package/dist/types/settings.js +1 -1
- package/dist/utils/colors.js +4 -4
- package/dist/utils/connections.js +33 -8
- package/dist/utils/icons.js +1 -1
- package/dist/utils/logger.d.ts +47 -0
- package/dist/utils/logger.js +72 -0
- package/dist/utils/nodeWrapper.js +1 -1
- package/dist/utils/sanitize.d.ts +19 -0
- package/dist/utils/sanitize.js +31 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.js +39 -0
- package/package.json +243 -232
|
@@ -1,22 +1,113 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workflow Store for FlowDrop
|
|
2
|
+
* Workflow Store for FlowDrop (Svelte 5 Runes)
|
|
3
3
|
*
|
|
4
4
|
* Provides global state management for workflows with dirty state tracking
|
|
5
5
|
* and undo/redo history integration.
|
|
6
6
|
*
|
|
7
|
+
* **Important: Single-instance only.** This store uses module-level singletons.
|
|
8
|
+
* Only one FlowDrop editor instance per page is supported. Mounting multiple
|
|
9
|
+
* FlowDrop editors on the same page will cause them to share workflow state.
|
|
10
|
+
*
|
|
7
11
|
* @module stores/workflowStore
|
|
8
12
|
*/
|
|
9
13
|
import type { Workflow, WorkflowNode, WorkflowEdge } from '../types';
|
|
10
14
|
import type { WorkflowChangeType } from '../types/events.js';
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
type WorkflowMetadata = NonNullable<Workflow['metadata']>;
|
|
16
|
+
/**
|
|
17
|
+
* Get the current workflow store value reactively
|
|
18
|
+
*
|
|
19
|
+
* @returns The current workflow or null
|
|
20
|
+
*/
|
|
21
|
+
export declare function getWorkflowStore(): Workflow | null;
|
|
22
|
+
/**
|
|
23
|
+
* Get the current dirty state reactively
|
|
24
|
+
*
|
|
25
|
+
* @returns true if there are unsaved changes
|
|
26
|
+
*/
|
|
27
|
+
export declare function getIsDirty(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get the workflow ID reactively
|
|
30
|
+
*
|
|
31
|
+
* @returns The workflow ID or null
|
|
32
|
+
*/
|
|
33
|
+
export declare function getWorkflowId(): string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Get the workflow name reactively
|
|
36
|
+
*
|
|
37
|
+
* @returns The workflow name or 'Untitled Workflow'
|
|
38
|
+
*/
|
|
39
|
+
export declare function getWorkflowName(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get the workflow nodes reactively
|
|
42
|
+
*
|
|
43
|
+
* @returns Array of workflow nodes
|
|
44
|
+
*/
|
|
45
|
+
export declare function getWorkflowNodes(): WorkflowNode[];
|
|
46
|
+
/**
|
|
47
|
+
* Get the workflow edges reactively
|
|
48
|
+
*
|
|
49
|
+
* @returns Array of workflow edges
|
|
50
|
+
*/
|
|
51
|
+
export declare function getWorkflowEdges(): WorkflowEdge[];
|
|
13
52
|
/**
|
|
14
|
-
*
|
|
53
|
+
* Get the workflow metadata reactively
|
|
15
54
|
*
|
|
16
|
-
*
|
|
17
|
-
* It can be reset to false by calling markAsSaved().
|
|
55
|
+
* @returns The workflow metadata with defaults
|
|
18
56
|
*/
|
|
19
|
-
export declare
|
|
57
|
+
export declare function getWorkflowMetadata(): WorkflowMetadata;
|
|
58
|
+
/**
|
|
59
|
+
* Get the current workflow format reactively
|
|
60
|
+
*
|
|
61
|
+
* @returns The workflow format string
|
|
62
|
+
*/
|
|
63
|
+
export declare function getWorkflowFormat(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Get workflow change summary reactively (useful for triggering saves)
|
|
66
|
+
*
|
|
67
|
+
* @returns Object with nodes, edges, and name
|
|
68
|
+
*/
|
|
69
|
+
export declare function getWorkflowChanged(): {
|
|
70
|
+
nodes: WorkflowNode[];
|
|
71
|
+
edges: WorkflowEdge[];
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Get workflow validation state reactively
|
|
76
|
+
*
|
|
77
|
+
* @returns Validation info object
|
|
78
|
+
*/
|
|
79
|
+
export declare function getWorkflowValidation(): {
|
|
80
|
+
hasNodes: boolean;
|
|
81
|
+
hasEdges: boolean;
|
|
82
|
+
nodeCount: number;
|
|
83
|
+
edgeCount: number;
|
|
84
|
+
isValid: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Get workflow metadata change summary reactively
|
|
88
|
+
*
|
|
89
|
+
* @returns Metadata change info
|
|
90
|
+
*/
|
|
91
|
+
export declare function getWorkflowMetadataChanged(): {
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
version: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Get connected handles reactively
|
|
98
|
+
*
|
|
99
|
+
* Provides a Set of all handle IDs that are currently connected to edges.
|
|
100
|
+
* Used by node components to implement hideUnconnectedHandles functionality.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* import { getConnectedHandles } from './workflowStore.svelte.js';
|
|
105
|
+
*
|
|
106
|
+
* // Check if a specific handle is connected
|
|
107
|
+
* const isConnected = getConnectedHandles().has('node-1-input-data');
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export declare function getConnectedHandles(): Set<string>;
|
|
20
111
|
/**
|
|
21
112
|
* Set the dirty state change callback
|
|
22
113
|
*
|
|
@@ -36,7 +127,7 @@ export declare function setOnWorkflowChange(callback: ((workflow: Workflow, chan
|
|
|
36
127
|
*/
|
|
37
128
|
export declare function markAsSaved(): void;
|
|
38
129
|
/**
|
|
39
|
-
* Check if there are unsaved changes
|
|
130
|
+
* Check if there are unsaved changes (non-reactive version for plain TS)
|
|
40
131
|
*
|
|
41
132
|
* @returns true if there are unsaved changes
|
|
42
133
|
*/
|
|
@@ -64,32 +155,11 @@ export declare function isHistoryEnabled(): boolean;
|
|
|
64
155
|
*/
|
|
65
156
|
export declare function setRestoringFromHistory(restoring: boolean): void;
|
|
66
157
|
/**
|
|
67
|
-
* Get the current workflow
|
|
158
|
+
* Get the current workflow (non-reactive version for plain TS)
|
|
68
159
|
*
|
|
69
160
|
* @returns The current workflow or null
|
|
70
161
|
*/
|
|
71
162
|
export declare function getWorkflow(): Workflow | null;
|
|
72
|
-
/** Derived store for workflow ID */
|
|
73
|
-
export declare const workflowId: import("svelte/store").Readable<string>;
|
|
74
|
-
/** Derived store for workflow name */
|
|
75
|
-
export declare const workflowName: import("svelte/store").Readable<string>;
|
|
76
|
-
/** Derived store for workflow nodes */
|
|
77
|
-
export declare const workflowNodes: import("svelte/store").Readable<WorkflowNode[]>;
|
|
78
|
-
/** Derived store for workflow edges */
|
|
79
|
-
export declare const workflowEdges: import("svelte/store").Readable<WorkflowEdge[]>;
|
|
80
|
-
/** Derived store for workflow metadata */
|
|
81
|
-
export declare const workflowMetadata: import("svelte/store").Readable<{
|
|
82
|
-
version: string;
|
|
83
|
-
createdAt: string;
|
|
84
|
-
updatedAt: string;
|
|
85
|
-
author?: string;
|
|
86
|
-
tags?: string[];
|
|
87
|
-
versionId?: string;
|
|
88
|
-
updateNumber?: number;
|
|
89
|
-
format?: import("../types").WorkflowFormat;
|
|
90
|
-
}>;
|
|
91
|
-
/** Derived store for the current workflow format */
|
|
92
|
-
export declare const workflowFormat: import("svelte/store").Readable<import("../types").WorkflowFormat>;
|
|
93
163
|
/**
|
|
94
164
|
* Actions for updating the workflow
|
|
95
165
|
*
|
|
@@ -187,38 +257,4 @@ export declare const workflowActions: {
|
|
|
187
257
|
*/
|
|
188
258
|
pushHistory: (description?: string, workflow?: Workflow) => void;
|
|
189
259
|
};
|
|
190
|
-
|
|
191
|
-
export declare const workflowChanged: import("svelte/store").Readable<{
|
|
192
|
-
nodes: WorkflowNode[];
|
|
193
|
-
edges: WorkflowEdge[];
|
|
194
|
-
name: string;
|
|
195
|
-
}>;
|
|
196
|
-
/** Derived store for workflow validation */
|
|
197
|
-
export declare const workflowValidation: import("svelte/store").Readable<{
|
|
198
|
-
hasNodes: boolean;
|
|
199
|
-
hasEdges: boolean;
|
|
200
|
-
nodeCount: number;
|
|
201
|
-
edgeCount: number;
|
|
202
|
-
isValid: boolean;
|
|
203
|
-
}>;
|
|
204
|
-
/** Derived store for workflow metadata changes */
|
|
205
|
-
export declare const workflowMetadataChanged: import("svelte/store").Readable<{
|
|
206
|
-
createdAt: string;
|
|
207
|
-
updatedAt: string;
|
|
208
|
-
version: string;
|
|
209
|
-
}>;
|
|
210
|
-
/**
|
|
211
|
-
* Derived store for connected handles
|
|
212
|
-
*
|
|
213
|
-
* Provides a Set of all handle IDs that are currently connected to edges.
|
|
214
|
-
* Used by node components to implement hideUnconnectedHandles functionality.
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* ```typescript
|
|
218
|
-
* import { connectedHandles } from './workflowStore.js';
|
|
219
|
-
*
|
|
220
|
-
* // Check if a specific handle is connected
|
|
221
|
-
* const isConnected = $connectedHandles.has('node-1-input-data');
|
|
222
|
-
* ```
|
|
223
|
-
*/
|
|
224
|
-
export declare const connectedHandles: import("svelte/store").Readable<Set<string>>;
|
|
260
|
+
export {};
|