@d34dman/flowdrop 0.0.62 → 0.0.64
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 +2 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.js +1 -40
- package/dist/api/enhanced-client.d.ts +19 -0
- package/dist/api/enhanced-client.js +9 -0
- package/dist/components/App.svelte +31 -35
- package/dist/components/CanvasBanner.stories.svelte +12 -8
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +35 -26
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +13 -13
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +4 -4
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +25 -10
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.stories.svelte +42 -30
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +6 -3
- package/dist/components/NodeStatusOverlay.stories.svelte +61 -50
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/PipelineStatus.svelte +9 -12
- package/dist/components/PipelineStatus.svelte.d.ts +2 -2
- package/dist/components/SchemaForm.stories.svelte +97 -82
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +6 -2
- package/dist/components/SettingsPanel.svelte +5 -1
- package/dist/components/StatusIcon.stories.svelte +15 -15
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusLabel.stories.svelte +8 -8
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.stories.svelte +10 -10
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +23 -9
- package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -13
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormField.svelte +2 -2
- package/dist/components/form/FormFieldLight.svelte +4 -4
- package/dist/components/form/FormFieldWrapper.stories.svelte +38 -16
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.stories.svelte +21 -18
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.stories.svelte +13 -13
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.stories.svelte +21 -21
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +0 -13
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -7
- package/dist/components/form/FormTextField.stories.svelte +17 -17
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.stories.svelte +21 -18
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.stories.svelte +13 -13
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -1
- package/dist/components/form/index.js +1 -2
- package/dist/components/form/types.d.ts +8 -20
- package/dist/components/form/types.js +3 -8
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +37 -28
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +57 -35
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +52 -31
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +42 -25
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +32 -19
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.stories.svelte +96 -64
- package/dist/components/nodes/IdeaNode.stories.svelte +40 -36
- package/dist/components/nodes/NotesNode.stories.svelte +61 -54
- package/dist/components/nodes/SimpleNode.stories.svelte +141 -83
- package/dist/components/nodes/SquareNode.stories.svelte +70 -44
- package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
- package/dist/components/nodes/TerminalNode.svelte +7 -3
- package/dist/components/nodes/ToolNode.stories.svelte +177 -59
- package/dist/components/nodes/WorkflowNode.stories.svelte +43 -38
- package/dist/components/playground/MessageBubble.stories.svelte +51 -38
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +1 -4
- package/dist/config/constants.d.ts +21 -0
- package/dist/config/constants.js +9 -0
- package/dist/core/index.d.ts +7 -5
- package/dist/core/index.js +5 -5
- package/dist/editor/index.d.ts +4 -4
- package/dist/editor/index.js +3 -4
- package/dist/form/code.js +16 -4
- package/dist/form/fieldRegistry.d.ts +8 -82
- package/dist/form/fieldRegistry.js +9 -101
- package/dist/form/full.d.ts +4 -1
- package/dist/form/full.js +6 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +0 -2
- package/dist/form/markdown.js +11 -3
- package/dist/helpers/workflowEditorHelper.d.ts +0 -3
- package/dist/helpers/workflowEditorHelper.js +12 -50
- package/dist/index.js +3 -0
- package/dist/schemas/v1/workflow.schema.json +950 -1076
- package/dist/services/apiVariableService.d.ts +1 -3
- package/dist/services/apiVariableService.js +3 -4
- package/dist/services/dynamicSchemaService.js +3 -4
- package/dist/stories/CanvasDecorator.svelte +7 -8
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/NodeDecorator.svelte +13 -14
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +55 -55
- package/dist/styles/base.css +12 -4
- package/dist/styles/tokens.css +138 -130
- package/dist/types/interrupt.d.ts +1 -4
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.js +44 -0
- package/dist/utils/handleIds.d.ts +35 -0
- package/dist/utils/handleIds.js +58 -0
- package/package.json +53 -12
- package/dist/api/client.d.ts +0 -110
- package/dist/api/client.js +0 -240
|
@@ -1,74 +1,85 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import NodeStatusOverlay from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import NodeStatusOverlay from './NodeStatusOverlay.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
7
|
-
tags: [
|
|
6
|
+
title: 'Editor/NodeStatusOverlay',
|
|
7
|
+
tags: ['autodocs'],
|
|
8
8
|
parameters: {
|
|
9
|
-
layout:
|
|
10
|
-
}
|
|
9
|
+
layout: 'centered'
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
12
|
</script>
|
|
13
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
14
|
<Story name="Idle (with history)">
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
<div
|
|
16
|
+
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);"
|
|
17
|
+
>
|
|
18
|
+
<NodeStatusOverlay
|
|
19
|
+
executionInfo={{
|
|
20
|
+
status: 'idle',
|
|
21
|
+
executionCount: 3,
|
|
22
|
+
isExecuting: false,
|
|
23
|
+
lastExecuted: new Date().toISOString()
|
|
24
|
+
}}
|
|
25
|
+
showDetails
|
|
26
|
+
/>
|
|
27
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">
|
|
28
|
+
Node Content
|
|
29
|
+
</div>
|
|
35
30
|
</div>
|
|
36
31
|
</Story>
|
|
37
32
|
|
|
38
33
|
<Story name="Running">
|
|
39
|
-
<div
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
<div
|
|
35
|
+
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);"
|
|
36
|
+
>
|
|
37
|
+
<NodeStatusOverlay
|
|
38
|
+
executionInfo={{
|
|
39
|
+
status: 'running',
|
|
40
|
+
executionCount: 1,
|
|
41
|
+
isExecuting: true
|
|
42
|
+
}}
|
|
43
|
+
/>
|
|
44
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">
|
|
45
|
+
Processing...
|
|
46
|
+
</div>
|
|
46
47
|
</div>
|
|
47
48
|
</Story>
|
|
48
49
|
|
|
49
50
|
<Story name="Completed">
|
|
50
|
-
<div
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
<div
|
|
52
|
+
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);"
|
|
53
|
+
>
|
|
54
|
+
<NodeStatusOverlay
|
|
55
|
+
executionInfo={{
|
|
56
|
+
status: 'completed',
|
|
57
|
+
executionCount: 5,
|
|
58
|
+
isExecuting: false,
|
|
59
|
+
lastExecuted: new Date().toISOString(),
|
|
60
|
+
lastExecutionDuration: 1250
|
|
61
|
+
}}
|
|
62
|
+
showDetails
|
|
63
|
+
/>
|
|
58
64
|
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Done!</div>
|
|
59
65
|
</div>
|
|
60
66
|
</Story>
|
|
61
67
|
|
|
62
68
|
<Story name="Failed">
|
|
63
|
-
<div
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
<div
|
|
70
|
+
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);"
|
|
71
|
+
>
|
|
72
|
+
<NodeStatusOverlay
|
|
73
|
+
executionInfo={{
|
|
74
|
+
status: 'failed',
|
|
75
|
+
executionCount: 2,
|
|
76
|
+
isExecuting: false,
|
|
77
|
+
lastError: 'Connection timeout',
|
|
78
|
+
lastExecuted: new Date().toISOString(),
|
|
79
|
+
lastExecutionDuration: 30000
|
|
80
|
+
}}
|
|
81
|
+
showDetails
|
|
82
|
+
/>
|
|
72
83
|
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Error</div>
|
|
73
84
|
</div>
|
|
74
85
|
</Story>
|
|
@@ -11,7 +11,7 @@ declare const NodeStatusOverlay: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import NodeStatusOverlay from
|
|
14
|
+
import NodeStatusOverlay from './NodeStatusOverlay.svelte';
|
|
15
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
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
import { onMount } from 'svelte';
|
|
9
9
|
import App from './App.svelte';
|
|
10
10
|
import LogsSidebar from './LogsSidebar.svelte';
|
|
11
|
-
import {
|
|
11
|
+
import { EnhancedFlowDropApiClient } from '../api/enhanced-client.js';
|
|
12
|
+
import { createEndpointConfig } from '../config/endpoints.js';
|
|
12
13
|
import type { Workflow } from '../types/index.js';
|
|
13
14
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
14
15
|
import { logger } from '../utils/logger.js';
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
interface Props {
|
|
17
18
|
pipelineId: string;
|
|
18
19
|
workflow: Workflow;
|
|
19
|
-
apiClient?:
|
|
20
|
+
apiClient?: EnhancedFlowDropApiClient;
|
|
20
21
|
baseUrl?: string;
|
|
21
22
|
endpointConfig?: EndpointConfig;
|
|
22
23
|
onActionsReady?: (
|
|
@@ -35,7 +36,10 @@
|
|
|
35
36
|
|
|
36
37
|
// Initialize API client if not provided
|
|
37
38
|
const client =
|
|
38
|
-
apiClient ||
|
|
39
|
+
apiClient ||
|
|
40
|
+
new EnhancedFlowDropApiClient(
|
|
41
|
+
endpointConfig ?? createEndpointConfig(baseUrl || '/api/flowdrop')
|
|
42
|
+
);
|
|
39
43
|
|
|
40
44
|
// Pipeline status and job data
|
|
41
45
|
let pipelineStatus = $state<string>('unknown');
|
|
@@ -269,15 +273,8 @@
|
|
|
269
273
|
}
|
|
270
274
|
});
|
|
271
275
|
|
|
272
|
-
//
|
|
273
|
-
|
|
274
|
-
return () => {
|
|
275
|
-
if (refreshInterval) {
|
|
276
|
-
clearInterval(refreshInterval);
|
|
277
|
-
refreshInterval = null;
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
});
|
|
276
|
+
// Note: Interval cleanup is handled by the $effect above.
|
|
277
|
+
// In Svelte 5, $effect cleanup runs both on re-execution and component destroy.
|
|
281
278
|
</script>
|
|
282
279
|
|
|
283
280
|
<div class="pipeline-status-container">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnhancedFlowDropApiClient } from '../api/enhanced-client.js';
|
|
2
2
|
import type { Workflow } from '../types/index.js';
|
|
3
3
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
4
4
|
interface Props {
|
|
5
5
|
pipelineId: string;
|
|
6
6
|
workflow: Workflow;
|
|
7
|
-
apiClient?:
|
|
7
|
+
apiClient?: EnhancedFlowDropApiClient;
|
|
8
8
|
baseUrl?: string;
|
|
9
9
|
endpointConfig?: EndpointConfig;
|
|
10
10
|
onActionsReady?: (actions: Array<{
|
|
@@ -1,101 +1,116 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import SchemaForm from
|
|
4
|
-
import { fn } from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import SchemaForm from './SchemaForm.svelte';
|
|
4
|
+
import { fn } from 'storybook/test';
|
|
5
5
|
|
|
6
6
|
const { Story } = defineMeta({
|
|
7
|
-
title:
|
|
7
|
+
title: 'Form/SchemaForm',
|
|
8
8
|
component: SchemaForm,
|
|
9
|
-
tags: [
|
|
9
|
+
tags: ['autodocs'],
|
|
10
10
|
args: {
|
|
11
11
|
onChange: fn(),
|
|
12
12
|
onSave: fn(),
|
|
13
|
-
onCancel: fn()
|
|
14
|
-
}
|
|
13
|
+
onCancel: fn()
|
|
14
|
+
}
|
|
15
15
|
});
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
<Story
|
|
19
|
+
name="Simple Form"
|
|
20
|
+
args={{
|
|
21
|
+
schema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
name: { type: 'string', title: 'Name', description: 'Enter your full name' },
|
|
25
|
+
age: { type: 'number', title: 'Age', minimum: 0, maximum: 120 },
|
|
26
|
+
active: { type: 'boolean', title: 'Active', default: true }
|
|
27
|
+
},
|
|
28
|
+
required: ['name']
|
|
25
29
|
},
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}} />
|
|
30
|
+
values: { name: 'Alice', age: 30, active: true }
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
30
33
|
|
|
31
|
-
<Story
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
34
|
+
<Story
|
|
35
|
+
name="Select Fields"
|
|
36
|
+
args={{
|
|
37
|
+
schema: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
model: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
title: 'AI Model',
|
|
43
|
+
oneOf: [
|
|
44
|
+
{ const: 'gpt-4', title: 'GPT-4' },
|
|
45
|
+
{ const: 'gpt-3.5', title: 'GPT-3.5 Turbo' },
|
|
46
|
+
{ const: 'claude-3', title: 'Claude 3' }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
temperature: {
|
|
50
|
+
type: 'number',
|
|
51
|
+
title: 'Temperature',
|
|
52
|
+
format: 'range',
|
|
53
|
+
minimum: 0,
|
|
54
|
+
maximum: 2,
|
|
55
|
+
step: 0.1,
|
|
56
|
+
default: 0.7
|
|
57
|
+
},
|
|
58
|
+
prompt: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
title: 'System Prompt',
|
|
61
|
+
format: 'multiline',
|
|
62
|
+
description: 'The system prompt for the AI model'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
59
65
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
values: { model: 'gpt-4', temperature: 0.7, prompt: 'You are a helpful assistant.' }
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
63
69
|
|
|
64
|
-
<Story
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
<Story
|
|
71
|
+
name="With Actions"
|
|
72
|
+
args={{
|
|
73
|
+
schema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
email: { type: 'string', title: 'Email' },
|
|
77
|
+
notifications: { type: 'boolean', title: 'Enable Notifications' }
|
|
78
|
+
},
|
|
79
|
+
required: ['email']
|
|
70
80
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}} />
|
|
81
|
+
values: { email: '', notifications: true },
|
|
82
|
+
showActions: true,
|
|
83
|
+
saveLabel: 'Save Settings',
|
|
84
|
+
cancelLabel: 'Reset'
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
78
87
|
|
|
79
|
-
<Story
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
<Story
|
|
89
|
+
name="Loading"
|
|
90
|
+
args={{
|
|
91
|
+
schema: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
name: { type: 'string', title: 'Name' }
|
|
95
|
+
}
|
|
84
96
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
values: { name: 'Test' },
|
|
98
|
+
showActions: true,
|
|
99
|
+
loading: true
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
90
102
|
|
|
91
|
-
<Story
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
<Story
|
|
104
|
+
name="Disabled"
|
|
105
|
+
args={{
|
|
106
|
+
schema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
name: { type: 'string', title: 'Name' },
|
|
110
|
+
role: { type: 'string', title: 'Role' }
|
|
111
|
+
}
|
|
97
112
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
113
|
+
values: { name: 'Admin', role: 'Super User' },
|
|
114
|
+
disabled: true
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
@@ -11,7 +11,7 @@ declare const SchemaForm: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import SchemaForm from
|
|
14
|
+
import SchemaForm from './SchemaForm.svelte';
|
|
15
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
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -34,7 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function handleSave(finalValues: Record<string, unknown>) {
|
|
37
|
-
|
|
37
|
+
// Process saved form values
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleCancel() {
|
|
41
|
+
// Handle form cancellation
|
|
38
42
|
}
|
|
39
43
|
</script>
|
|
40
44
|
|
|
@@ -44,7 +48,7 @@
|
|
|
44
48
|
onChange={handleChange}
|
|
45
49
|
showActions={true}
|
|
46
50
|
onSave={handleSave}
|
|
47
|
-
onCancel={
|
|
51
|
+
onCancel={handleCancel}
|
|
48
52
|
/>
|
|
49
53
|
```
|
|
50
54
|
-->
|
|
@@ -14,11 +14,15 @@
|
|
|
14
14
|
```svelte
|
|
15
15
|
<script>
|
|
16
16
|
import { SettingsPanel } from "@d34dman/flowdrop";
|
|
17
|
+
|
|
18
|
+
function handleClose() {
|
|
19
|
+
// Handle settings panel close
|
|
20
|
+
}
|
|
17
21
|
</script>
|
|
18
22
|
|
|
19
23
|
<SettingsPanel
|
|
20
24
|
showSyncButton={true}
|
|
21
|
-
onClose={
|
|
25
|
+
onClose={handleClose}
|
|
22
26
|
/>
|
|
23
27
|
```
|
|
24
28
|
-->
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import StatusIcon from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import StatusIcon from './StatusIcon.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/StatusIcon',
|
|
7
7
|
component: StatusIcon,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
10
|
status: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['idle', 'pending', 'running', 'completed', 'failed', 'cancelled', 'skipped']
|
|
13
13
|
},
|
|
14
14
|
size: {
|
|
15
|
-
control: { type:
|
|
16
|
-
options: [
|
|
15
|
+
control: { type: 'select' },
|
|
16
|
+
options: ['sm', 'md', 'lg', 'xl']
|
|
17
17
|
},
|
|
18
|
-
showBackground: { control:
|
|
19
|
-
}
|
|
18
|
+
showBackground: { control: 'boolean' }
|
|
19
|
+
}
|
|
20
20
|
});
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
<Story name="Idle" args={{ status:
|
|
23
|
+
<Story name="Idle" args={{ status: 'idle' }} />
|
|
24
24
|
|
|
25
|
-
<Story name="Running" args={{ status:
|
|
25
|
+
<Story name="Running" args={{ status: 'running' }} />
|
|
26
26
|
|
|
27
|
-
<Story name="Completed" args={{ status:
|
|
27
|
+
<Story name="Completed" args={{ status: 'completed' }} />
|
|
28
28
|
|
|
29
|
-
<Story name="Failed" args={{ status:
|
|
29
|
+
<Story name="Failed" args={{ status: 'failed' }} />
|
|
30
30
|
|
|
31
|
-
<Story name="With Background" args={{ status:
|
|
31
|
+
<Story name="With Background" args={{ status: 'completed', showBackground: true }} />
|
|
32
32
|
|
|
33
33
|
<Story name="All Statuses">
|
|
34
34
|
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
@@ -11,7 +11,7 @@ declare const StatusIcon: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import StatusIcon from
|
|
14
|
+
import StatusIcon from './StatusIcon.svelte';
|
|
15
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
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import StatusLabel from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/StatusLabel',
|
|
7
7
|
component: StatusLabel,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
|
-
label: { control:
|
|
11
|
-
}
|
|
10
|
+
label: { control: 'text' }
|
|
11
|
+
}
|
|
12
12
|
});
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<Story name="Default" args={{ label:
|
|
15
|
+
<Story name="Default" args={{ label: 'Ready' }} />
|
|
16
16
|
|
|
17
|
-
<Story name="Long Text" args={{ label:
|
|
17
|
+
<Story name="Long Text" args={{ label: 'Processing workflow execution...' }} />
|
|
@@ -11,7 +11,7 @@ declare const StatusLabel: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import StatusLabel from
|
|
14
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
15
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
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import ThemeToggle from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ThemeToggle from './ThemeToggle.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/ThemeToggle',
|
|
7
7
|
component: ThemeToggle,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['sm', 'md', 'lg']
|
|
13
13
|
},
|
|
14
|
-
showLabel: { control:
|
|
15
|
-
}
|
|
14
|
+
showLabel: { control: 'boolean' }
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<Story name="Default" />
|
|
20
20
|
|
|
21
|
-
<Story name="Small" args={{ size:
|
|
21
|
+
<Story name="Small" args={{ size: 'sm' }} />
|
|
22
22
|
|
|
23
|
-
<Story name="Large" args={{ size:
|
|
23
|
+
<Story name="Large" args={{ size: 'lg' }} />
|
|
24
24
|
|
|
25
25
|
<Story name="With Label" args={{ showLabel: true }} />
|
|
@@ -11,7 +11,7 @@ declare const ThemeToggle: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import ThemeToggle from
|
|
14
|
+
import ThemeToggle from './ThemeToggle.svelte';
|
|
15
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
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|