@d34dman/flowdrop 0.0.61 → 0.0.63
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 -298
- 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 +7 -7
- 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 +18 -33
- 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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import Navbar from "./Navbar.svelte";
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: "Editor/Navbar",
|
|
7
|
+
component: Navbar,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Story name="Default" args={{
|
|
16
|
+
title: "My Workflow",
|
|
17
|
+
showStatus: true,
|
|
18
|
+
showSettings: true,
|
|
19
|
+
}} />
|
|
20
|
+
|
|
21
|
+
<Story name="With Actions" args={{
|
|
22
|
+
title: "Workflow Editor",
|
|
23
|
+
primaryActions: [
|
|
24
|
+
{ label: "Save", href: "#", icon: "mdi:content-save", variant: "primary" },
|
|
25
|
+
{ label: "Export", href: "#", icon: "mdi:download", variant: "outline" },
|
|
26
|
+
],
|
|
27
|
+
showStatus: true,
|
|
28
|
+
}} />
|
|
29
|
+
|
|
30
|
+
<Story name="With Breadcrumbs" args={{
|
|
31
|
+
breadcrumbs: [
|
|
32
|
+
{ label: "Workflows", href: "#", icon: "mdi:folder" },
|
|
33
|
+
{ label: "My Workflow", href: "#" },
|
|
34
|
+
],
|
|
35
|
+
showSettings: true,
|
|
36
|
+
}} />
|
|
37
|
+
|
|
38
|
+
<Story name="Minimal" args={{
|
|
39
|
+
showStatus: false,
|
|
40
|
+
showSettings: false,
|
|
41
|
+
}} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default Navbar;
|
|
2
|
+
type Navbar = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Navbar: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import Navbar from "./Navbar.svelte";
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
display: inline-flex;
|
|
381
381
|
align-items: center;
|
|
382
382
|
gap: 0.375rem;
|
|
383
|
-
padding: var(--fd-space-
|
|
383
|
+
padding: var(--fd-space-3xs) var(--fd-space-xs);
|
|
384
384
|
background-color: var(--fd-success-muted);
|
|
385
385
|
border-radius: var(--fd-radius-md);
|
|
386
386
|
font-size: var(--fd-text-xs);
|
|
@@ -589,8 +589,8 @@
|
|
|
589
589
|
.flowdrop-navbar__end {
|
|
590
590
|
display: flex;
|
|
591
591
|
align-items: center;
|
|
592
|
-
gap: var(--fd-space-
|
|
593
|
-
margin-left: var(--fd-space-
|
|
592
|
+
gap: var(--fd-space-xs);
|
|
593
|
+
margin-left: var(--fd-space-md);
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
.flowdrop-navbar__settings-btn {
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
|
|
706
706
|
.flowdrop-navbar__status {
|
|
707
707
|
font-size: var(--fd-text-xs);
|
|
708
|
-
padding: var(--fd-space-
|
|
708
|
+
padding: var(--fd-space-3xs) var(--fd-space-xs);
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
import Icon from '@iconify/svelte';
|
|
11
11
|
import { getNodeIcon, getCategoryIcon } from '../utils/icons.js';
|
|
12
12
|
import { getCategoryColorToken } from '../utils/colors.js';
|
|
13
|
-
import { getCategoryLabel } from '../stores/categoriesStore.js';
|
|
13
|
+
import { getCategoryLabel } from '../stores/categoriesStore.svelte.js';
|
|
14
14
|
import { SvelteSet } from 'svelte/reactivity';
|
|
15
|
-
import {
|
|
15
|
+
import { getUiSettings, updateSettings } from '../stores/settingsStore.svelte.js';
|
|
16
16
|
|
|
17
17
|
interface Props {
|
|
18
18
|
nodes: NodeMetadata[];
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* Persists the new state to settings
|
|
30
30
|
*/
|
|
31
31
|
function toggleSidebar(): void {
|
|
32
|
-
updateSettings({ ui: { sidebarCollapsed:
|
|
32
|
+
updateSettings({ ui: { sidebarCollapsed: !getUiSettings().sidebarCollapsed } });
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
if (!event.dataTransfer) return;
|
|
102
102
|
|
|
103
103
|
// Extract initial config from configSchema with proper null checks
|
|
104
|
-
let initialConfig = {};
|
|
104
|
+
let initialConfig: Record<string, unknown> = {};
|
|
105
105
|
if (
|
|
106
106
|
nodeType.configSchema &&
|
|
107
107
|
typeof nodeType.configSchema === 'object' &&
|
|
@@ -195,9 +195,9 @@
|
|
|
195
195
|
<!-- Components Sidebar - Always Visible -->
|
|
196
196
|
<aside
|
|
197
197
|
class="flowdrop-sidebar flowdrop-sidebar--container"
|
|
198
|
-
class:flowdrop-sidebar--collapsed={
|
|
199
|
-
class:flowdrop-sidebar--compact={
|
|
200
|
-
style:width="{
|
|
198
|
+
class:flowdrop-sidebar--collapsed={getUiSettings().sidebarCollapsed}
|
|
199
|
+
class:flowdrop-sidebar--compact={getUiSettings().compactMode}
|
|
200
|
+
style:width="{getUiSettings().sidebarCollapsed ? 48 : getUiSettings().sidebarWidth}px"
|
|
201
201
|
aria-label="Components sidebar"
|
|
202
202
|
>
|
|
203
203
|
<!-- Header -->
|
|
@@ -205,19 +205,19 @@
|
|
|
205
205
|
<button
|
|
206
206
|
class="flowdrop-sidebar__toggle"
|
|
207
207
|
onclick={toggleSidebar}
|
|
208
|
-
aria-label={
|
|
209
|
-
title={
|
|
208
|
+
aria-label={getUiSettings().sidebarCollapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
209
|
+
title={getUiSettings().sidebarCollapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
210
210
|
>
|
|
211
|
-
<Icon icon={
|
|
211
|
+
<Icon icon={getUiSettings().sidebarCollapsed ? 'mdi:chevron-right' : 'mdi:chevron-left'} />
|
|
212
212
|
</button>
|
|
213
|
-
{#if
|
|
213
|
+
{#if !getUiSettings().sidebarCollapsed}
|
|
214
214
|
<div class="flowdrop-sidebar__title">
|
|
215
215
|
<h2 class="flowdrop-text--lg flowdrop-font--bold">Components</h2>
|
|
216
216
|
</div>
|
|
217
217
|
{/if}
|
|
218
218
|
</div>
|
|
219
219
|
|
|
220
|
-
{#if
|
|
220
|
+
{#if !getUiSettings().sidebarCollapsed}
|
|
221
221
|
<!-- Search Section -->
|
|
222
222
|
<div class="flowdrop-sidebar__search">
|
|
223
223
|
<div class="flowdrop-join flowdrop-w--full">
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import NodeStatusOverlay from "./NodeStatusOverlay.svelte";
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: "Editor/NodeStatusOverlay",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "centered",
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#snippet nodeBox(label)}
|
|
15
|
+
<div style="position: relative; width: 220px; height: 100px; margin-top: 60px; border: 1px solid var(--fd-border, #e5e7eb); border-radius: 8px; background: var(--fd-card, white);">
|
|
16
|
+
<NodeStatusOverlay executionInfo={{
|
|
17
|
+
status: "idle",
|
|
18
|
+
executionCount: 3,
|
|
19
|
+
isExecuting: false,
|
|
20
|
+
lastExecuted: new Date().toISOString(),
|
|
21
|
+
}} />
|
|
22
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">{label}</div>
|
|
23
|
+
</div>
|
|
24
|
+
{/snippet}
|
|
25
|
+
|
|
26
|
+
<Story name="Idle (with history)">
|
|
27
|
+
<div style="position: relative; width: 220px; height: 100px; margin-top: 60px; border: 1px solid var(--fd-border, #e5e7eb); border-radius: 8px; background: var(--fd-card, white);">
|
|
28
|
+
<NodeStatusOverlay executionInfo={{
|
|
29
|
+
status: "idle",
|
|
30
|
+
executionCount: 3,
|
|
31
|
+
isExecuting: false,
|
|
32
|
+
lastExecuted: new Date().toISOString(),
|
|
33
|
+
}} showDetails />
|
|
34
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Node Content</div>
|
|
35
|
+
</div>
|
|
36
|
+
</Story>
|
|
37
|
+
|
|
38
|
+
<Story name="Running">
|
|
39
|
+
<div style="position: relative; width: 220px; height: 100px; margin-top: 60px; border: 1px solid var(--fd-border, #e5e7eb); border-radius: 8px; background: var(--fd-card, white);">
|
|
40
|
+
<NodeStatusOverlay executionInfo={{
|
|
41
|
+
status: "running",
|
|
42
|
+
executionCount: 1,
|
|
43
|
+
isExecuting: true,
|
|
44
|
+
}} />
|
|
45
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Processing...</div>
|
|
46
|
+
</div>
|
|
47
|
+
</Story>
|
|
48
|
+
|
|
49
|
+
<Story name="Completed">
|
|
50
|
+
<div style="position: relative; width: 220px; height: 100px; margin-top: 60px; border: 1px solid var(--fd-border, #e5e7eb); border-radius: 8px; background: var(--fd-card, white);">
|
|
51
|
+
<NodeStatusOverlay executionInfo={{
|
|
52
|
+
status: "completed",
|
|
53
|
+
executionCount: 5,
|
|
54
|
+
isExecuting: false,
|
|
55
|
+
lastExecuted: new Date().toISOString(),
|
|
56
|
+
lastExecutionDuration: 1250,
|
|
57
|
+
}} showDetails />
|
|
58
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Done!</div>
|
|
59
|
+
</div>
|
|
60
|
+
</Story>
|
|
61
|
+
|
|
62
|
+
<Story name="Failed">
|
|
63
|
+
<div style="position: relative; width: 220px; height: 100px; margin-top: 60px; border: 1px solid var(--fd-border, #e5e7eb); border-radius: 8px; background: var(--fd-card, white);">
|
|
64
|
+
<NodeStatusOverlay executionInfo={{
|
|
65
|
+
status: "failed",
|
|
66
|
+
executionCount: 2,
|
|
67
|
+
isExecuting: false,
|
|
68
|
+
lastError: "Connection timeout",
|
|
69
|
+
lastExecuted: new Date().toISOString(),
|
|
70
|
+
lastExecutionDuration: 30000,
|
|
71
|
+
}} showDetails />
|
|
72
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Error</div>
|
|
73
|
+
</div>
|
|
74
|
+
</Story>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default NodeStatusOverlay;
|
|
2
|
+
type NodeStatusOverlay = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const NodeStatusOverlay: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import NodeStatusOverlay from "./NodeStatusOverlay.svelte";
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { FlowDropApiClient } from '../api/client.js';
|
|
12
12
|
import type { Workflow } from '../types/index.js';
|
|
13
13
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
14
|
+
import { logger } from '../utils/logger.js';
|
|
14
15
|
|
|
15
16
|
interface Props {
|
|
16
17
|
pipelineId: string;
|
|
@@ -38,9 +39,14 @@
|
|
|
38
39
|
|
|
39
40
|
// Pipeline status and job data
|
|
40
41
|
let pipelineStatus = $state<string>('unknown');
|
|
42
|
+
interface PipelineNodeStatus {
|
|
43
|
+
status: string;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
let jobStatusData = $state<{
|
|
42
|
-
jobs:
|
|
43
|
-
node_statuses: Record<string,
|
|
48
|
+
jobs: Record<string, unknown>[];
|
|
49
|
+
node_statuses: Record<string, PipelineNodeStatus>;
|
|
44
50
|
status_summary: {
|
|
45
51
|
total: number;
|
|
46
52
|
pending: number;
|
|
@@ -111,7 +117,8 @@
|
|
|
111
117
|
for (const nodeId in jobStatusData.node_statuses) {
|
|
112
118
|
const status = jobStatusData.node_statuses[nodeId].status;
|
|
113
119
|
if (['pending', 'running', 'completed', 'failed', 'cancelled'].includes(status)) {
|
|
114
|
-
newNodeStatuses[nodeId] =
|
|
120
|
+
newNodeStatuses[nodeId] =
|
|
121
|
+
status === 'failed' ? 'error' : (status as 'pending' | 'running' | 'completed');
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
nodeStatuses = newNodeStatuses;
|
|
@@ -119,7 +126,7 @@
|
|
|
119
126
|
|
|
120
127
|
addLog('info', `Job status updated: ${jobStatusData.status_summary.total} total jobs`);
|
|
121
128
|
} catch (error) {
|
|
122
|
-
|
|
129
|
+
logger.error('Failed to fetch pipeline data:', error);
|
|
123
130
|
addLog(
|
|
124
131
|
'error',
|
|
125
132
|
`Failed to fetch pipeline data: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import {
|
|
14
14
|
rebuildAllPortCoordinates,
|
|
15
15
|
updateNodePortCoordinates
|
|
16
|
-
} from '../stores/portCoordinateStore.js';
|
|
16
|
+
} from '../stores/portCoordinateStore.svelte.js';
|
|
17
17
|
|
|
18
18
|
interface Props {
|
|
19
19
|
/** Node to update coordinates for (e.g., during drag). Set to null when not dragging. */
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from "@storybook/addon-svelte-csf";
|
|
3
|
+
import SchemaForm from "./SchemaForm.svelte";
|
|
4
|
+
import { fn } from "storybook/test";
|
|
5
|
+
|
|
6
|
+
const { Story } = defineMeta({
|
|
7
|
+
title: "Form/SchemaForm",
|
|
8
|
+
component: SchemaForm,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
args: {
|
|
11
|
+
onChange: fn(),
|
|
12
|
+
onSave: fn(),
|
|
13
|
+
onCancel: fn(),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<Story name="Simple Form" args={{
|
|
19
|
+
schema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
name: { type: "string", title: "Name", description: "Enter your full name" },
|
|
23
|
+
age: { type: "number", title: "Age", minimum: 0, maximum: 120 },
|
|
24
|
+
active: { type: "boolean", title: "Active", default: true },
|
|
25
|
+
},
|
|
26
|
+
required: ["name"],
|
|
27
|
+
},
|
|
28
|
+
values: { name: "Alice", age: 30, active: true },
|
|
29
|
+
}} />
|
|
30
|
+
|
|
31
|
+
<Story name="Select Fields" args={{
|
|
32
|
+
schema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
model: {
|
|
36
|
+
type: "string",
|
|
37
|
+
title: "AI Model",
|
|
38
|
+
oneOf: [
|
|
39
|
+
{ const: "gpt-4", title: "GPT-4" },
|
|
40
|
+
{ const: "gpt-3.5", title: "GPT-3.5 Turbo" },
|
|
41
|
+
{ const: "claude-3", title: "Claude 3" },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
temperature: {
|
|
45
|
+
type: "number",
|
|
46
|
+
title: "Temperature",
|
|
47
|
+
format: "range",
|
|
48
|
+
minimum: 0,
|
|
49
|
+
maximum: 2,
|
|
50
|
+
step: 0.1,
|
|
51
|
+
default: 0.7,
|
|
52
|
+
},
|
|
53
|
+
prompt: {
|
|
54
|
+
type: "string",
|
|
55
|
+
title: "System Prompt",
|
|
56
|
+
format: "multiline",
|
|
57
|
+
description: "The system prompt for the AI model",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
values: { model: "gpt-4", temperature: 0.7, prompt: "You are a helpful assistant." },
|
|
62
|
+
}} />
|
|
63
|
+
|
|
64
|
+
<Story name="With Actions" args={{
|
|
65
|
+
schema: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
email: { type: "string", title: "Email" },
|
|
69
|
+
notifications: { type: "boolean", title: "Enable Notifications" },
|
|
70
|
+
},
|
|
71
|
+
required: ["email"],
|
|
72
|
+
},
|
|
73
|
+
values: { email: "", notifications: true },
|
|
74
|
+
showActions: true,
|
|
75
|
+
saveLabel: "Save Settings",
|
|
76
|
+
cancelLabel: "Reset",
|
|
77
|
+
}} />
|
|
78
|
+
|
|
79
|
+
<Story name="Loading" args={{
|
|
80
|
+
schema: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
name: { type: "string", title: "Name" },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
values: { name: "Test" },
|
|
87
|
+
showActions: true,
|
|
88
|
+
loading: true,
|
|
89
|
+
}} />
|
|
90
|
+
|
|
91
|
+
<Story name="Disabled" args={{
|
|
92
|
+
schema: {
|
|
93
|
+
type: "object",
|
|
94
|
+
properties: {
|
|
95
|
+
name: { type: "string", title: "Name" },
|
|
96
|
+
role: { type: "string", title: "Role" },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
values: { name: "Admin", role: "Super User" },
|
|
100
|
+
disabled: true,
|
|
101
|
+
}} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default SchemaForm;
|
|
2
|
+
type SchemaForm = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const SchemaForm: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import SchemaForm from "./SchemaForm.svelte";
|
|
15
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
@@ -173,6 +173,11 @@
|
|
|
173
173
|
setContext<() => AuthProvider | undefined>('flowdrop:getAuthProvider', () => authProvider);
|
|
174
174
|
setContext<() => string>('flowdrop:getBaseUrl', () => baseUrl);
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Reference to this component's form element
|
|
178
|
+
*/
|
|
179
|
+
let formRef: HTMLFormElement | undefined = $state();
|
|
180
|
+
|
|
176
181
|
/**
|
|
177
182
|
* Internal reactive state for form values
|
|
178
183
|
*/
|
|
@@ -231,11 +236,10 @@
|
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
// Collect all form values including hidden fields
|
|
234
|
-
const form = document.querySelector('.schema-form');
|
|
235
239
|
const updatedValues: Record<string, unknown> = { ...formValues };
|
|
236
240
|
|
|
237
|
-
if (
|
|
238
|
-
const inputs =
|
|
241
|
+
if (formRef) {
|
|
242
|
+
const inputs = formRef.querySelectorAll('input, select, textarea');
|
|
239
243
|
inputs.forEach((input: Element) => {
|
|
240
244
|
const inputEl = input as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
241
245
|
if (inputEl.id) {
|
|
@@ -299,6 +303,7 @@
|
|
|
299
303
|
|
|
300
304
|
{#if schema?.properties}
|
|
301
305
|
<form
|
|
306
|
+
bind:this={formRef}
|
|
302
307
|
class="schema-form {className}"
|
|
303
308
|
class:schema-form--loading={loading}
|
|
304
309
|
class:schema-form--disabled={disabled}
|
|
@@ -377,7 +382,7 @@
|
|
|
377
382
|
.schema-form {
|
|
378
383
|
display: flex;
|
|
379
384
|
flex-direction: column;
|
|
380
|
-
gap: var(--fd-space-
|
|
385
|
+
gap: var(--fd-space-3xl);
|
|
381
386
|
}
|
|
382
387
|
|
|
383
388
|
.schema-form--loading,
|
|
@@ -389,7 +394,7 @@
|
|
|
389
394
|
.schema-form__fields {
|
|
390
395
|
display: flex;
|
|
391
396
|
flex-direction: column;
|
|
392
|
-
gap: var(--fd-space-
|
|
397
|
+
gap: var(--fd-space-2xl);
|
|
393
398
|
}
|
|
394
399
|
|
|
395
400
|
/* ============================================
|
|
@@ -398,19 +403,19 @@
|
|
|
398
403
|
|
|
399
404
|
.schema-form__footer {
|
|
400
405
|
display: flex;
|
|
401
|
-
gap: var(--fd-space-
|
|
406
|
+
gap: var(--fd-space-md);
|
|
402
407
|
justify-content: flex-end;
|
|
403
|
-
padding-top: var(--fd-space-
|
|
408
|
+
padding-top: var(--fd-space-xl);
|
|
404
409
|
border-top: 1px solid var(--fd-border-muted);
|
|
405
|
-
margin-top: var(--fd-space-
|
|
410
|
+
margin-top: var(--fd-space-xs);
|
|
406
411
|
}
|
|
407
412
|
|
|
408
413
|
.schema-form__button {
|
|
409
414
|
display: inline-flex;
|
|
410
415
|
align-items: center;
|
|
411
416
|
justify-content: center;
|
|
412
|
-
gap: var(--fd-space-
|
|
413
|
-
padding: 0.625rem var(--fd-space-
|
|
417
|
+
gap: var(--fd-space-xs);
|
|
418
|
+
padding: 0.625rem var(--fd-space-xl);
|
|
414
419
|
border-radius: var(--fd-radius-lg);
|
|
415
420
|
font-size: var(--fd-text-sm);
|
|
416
421
|
font-weight: 600;
|
|
@@ -501,14 +506,14 @@
|
|
|
501
506
|
flex-direction: column;
|
|
502
507
|
align-items: center;
|
|
503
508
|
justify-content: center;
|
|
504
|
-
padding: var(--fd-space-
|
|
509
|
+
padding: var(--fd-space-6xl) var(--fd-space-3xl);
|
|
505
510
|
text-align: center;
|
|
506
511
|
}
|
|
507
512
|
|
|
508
513
|
.schema-form__empty-icon {
|
|
509
514
|
width: 3rem;
|
|
510
515
|
height: 3rem;
|
|
511
|
-
margin-bottom: var(--fd-space-
|
|
516
|
+
margin-bottom: var(--fd-space-xl);
|
|
512
517
|
color: var(--fd-border);
|
|
513
518
|
}
|
|
514
519
|
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
</script>
|
|
119
119
|
|
|
120
|
-
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
120
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions — native <dialog> backdrop click-to-close pattern -->
|
|
121
121
|
<dialog
|
|
122
122
|
bind:this={dialogRef}
|
|
123
123
|
class="flowdrop-settings-modal {className}"
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
display: flex;
|
|
214
214
|
align-items: center;
|
|
215
215
|
justify-content: space-between;
|
|
216
|
-
padding: var(--fd-space-
|
|
216
|
+
padding: var(--fd-space-xl);
|
|
217
217
|
border-bottom: 1px solid var(--fd-border);
|
|
218
218
|
flex-shrink: 0;
|
|
219
219
|
}
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
.flowdrop-settings-modal__title {
|
|
222
222
|
display: flex;
|
|
223
223
|
align-items: center;
|
|
224
|
-
gap: var(--fd-space-
|
|
224
|
+
gap: var(--fd-space-xs);
|
|
225
225
|
margin: 0;
|
|
226
226
|
font-size: var(--fd-text-lg);
|
|
227
227
|
font-weight: 600;
|