@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
package/README.md
CHANGED
|
@@ -49,6 +49,8 @@ No vendor lock-in. No data leaving your walls. No surprise bills.
|
|
|
49
49
|
npm install @d34dman/flowdrop
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
> **Note:** FlowDrop supports **one editor instance per page** (module-level singleton stores). See [Architecture Notes](#architecture-notes) for details.
|
|
53
|
+
|
|
52
54
|
You get a production-ready workflow UI. You keep full control of everything else.
|
|
53
55
|
|
|
54
56
|
## Quickstart
|
|
@@ -13,46 +13,7 @@ import { getComponentTypeDefaults, extractComponentType, AGENTSPEC_NAMESPACE } f
|
|
|
13
13
|
import { computeAutoLayout } from './autoLayout.js';
|
|
14
14
|
import { v4 as uuidv4 } from 'uuid';
|
|
15
15
|
import { logger } from '../../utils/logger.js';
|
|
16
|
-
|
|
17
|
-
// Handle ID Helpers
|
|
18
|
-
// ============================================================================
|
|
19
|
-
/**
|
|
20
|
-
* Build a FlowDrop handle ID from node ID, direction, and port ID.
|
|
21
|
-
* Format: `${nodeId}-${direction}-${portId}`
|
|
22
|
-
*/
|
|
23
|
-
function buildHandleId(nodeId, direction, portId) {
|
|
24
|
-
return `${nodeId}-${direction}-${portId}`;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Extract port ID from a FlowDrop handle ID.
|
|
28
|
-
* Handles format: `${nodeId}-output-${portId}` or `${nodeId}-input-${portId}`
|
|
29
|
-
*/
|
|
30
|
-
function extractPortId(handleId) {
|
|
31
|
-
if (!handleId)
|
|
32
|
-
return null;
|
|
33
|
-
const outputMatch = handleId.lastIndexOf('-output-');
|
|
34
|
-
if (outputMatch !== -1) {
|
|
35
|
-
return handleId.substring(outputMatch + '-output-'.length);
|
|
36
|
-
}
|
|
37
|
-
const inputMatch = handleId.lastIndexOf('-input-');
|
|
38
|
-
if (inputMatch !== -1) {
|
|
39
|
-
return handleId.substring(inputMatch + '-input-'.length);
|
|
40
|
-
}
|
|
41
|
-
// Short format: the handleId IS the port ID
|
|
42
|
-
return handleId;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Extract direction from a FlowDrop handle ID.
|
|
46
|
-
*/
|
|
47
|
-
function extractDirection(handleId) {
|
|
48
|
-
if (!handleId)
|
|
49
|
-
return null;
|
|
50
|
-
if (handleId.lastIndexOf('-output-') !== -1)
|
|
51
|
-
return 'output';
|
|
52
|
-
if (handleId.lastIndexOf('-input-') !== -1)
|
|
53
|
-
return 'input';
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
16
|
+
import { buildHandleId, extractPortId, extractDirection } from '../../utils/handleIds.js';
|
|
56
17
|
// ============================================================================
|
|
57
18
|
// Property ↔ Port Conversion
|
|
58
19
|
// ============================================================================
|
|
@@ -161,4 +161,23 @@ export declare class EnhancedFlowDropApiClient {
|
|
|
161
161
|
version: string;
|
|
162
162
|
build: string;
|
|
163
163
|
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Fetch pipeline data including job information and status
|
|
166
|
+
*/
|
|
167
|
+
getPipelineData(pipelineId: string): Promise<{
|
|
168
|
+
status: string;
|
|
169
|
+
jobs: Array<Record<string, unknown>>;
|
|
170
|
+
node_statuses: Record<string, {
|
|
171
|
+
status: string;
|
|
172
|
+
[key: string]: unknown;
|
|
173
|
+
}>;
|
|
174
|
+
job_status_summary: {
|
|
175
|
+
total: number;
|
|
176
|
+
pending: number;
|
|
177
|
+
running: number;
|
|
178
|
+
completed: number;
|
|
179
|
+
failed: number;
|
|
180
|
+
cancelled: number;
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
164
183
|
}
|
|
@@ -418,4 +418,13 @@ export class EnhancedFlowDropApiClient {
|
|
|
418
418
|
}
|
|
419
419
|
return response.data;
|
|
420
420
|
}
|
|
421
|
+
// =========================================================================
|
|
422
|
+
// Pipeline API Methods
|
|
423
|
+
// =========================================================================
|
|
424
|
+
/**
|
|
425
|
+
* Fetch pipeline data including job information and status
|
|
426
|
+
*/
|
|
427
|
+
async getPipelineData(pipelineId) {
|
|
428
|
+
return this.request('pipelines.get', this.config.endpoints.pipelines.get, { id: pipelineId }, {}, 'get pipeline data');
|
|
429
|
+
}
|
|
421
430
|
}
|
|
@@ -507,38 +507,42 @@
|
|
|
507
507
|
// Load node types on mount
|
|
508
508
|
onMount(() => {
|
|
509
509
|
(async () => {
|
|
510
|
-
|
|
510
|
+
try {
|
|
511
|
+
await initializeApiEndpoints();
|
|
511
512
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
// Ensure port compatibility checker is initialized (needed for proximity connect, etc.)
|
|
514
|
+
// mountFlowDropApp initializes this before mounting, but SvelteKit routes need it here.
|
|
515
|
+
initializePortCompatibility(DEFAULT_PORT_CONFIG);
|
|
515
516
|
|
|
516
|
-
|
|
517
|
+
await fetchNodeTypes();
|
|
517
518
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
// Initialize the workflow store
|
|
520
|
+
if (initialWorkflow) {
|
|
521
|
+
workflowActions.initialize(initialWorkflow);
|
|
521
522
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
526
|
-
} else {
|
|
527
|
-
// Initialize with a default empty workflow so the editor is functional
|
|
528
|
-
// (e.g., drag-and-drop requires a non-null workflow in the store)
|
|
529
|
-
const defaultWorkflow: Workflow = {
|
|
530
|
-
id: '',
|
|
531
|
-
name: 'Untitled Workflow',
|
|
532
|
-
nodes: [],
|
|
533
|
-
edges: [],
|
|
534
|
-
metadata: {
|
|
535
|
-
version: '1.0.0',
|
|
536
|
-
format: DEFAULT_WORKFLOW_FORMAT,
|
|
537
|
-
createdAt: new Date().toISOString(),
|
|
538
|
-
updatedAt: new Date().toISOString()
|
|
523
|
+
// Emit onWorkflowLoad event
|
|
524
|
+
if (eventHandlers?.onWorkflowLoad) {
|
|
525
|
+
eventHandlers.onWorkflowLoad(initialWorkflow);
|
|
539
526
|
}
|
|
540
|
-
}
|
|
541
|
-
|
|
527
|
+
} else {
|
|
528
|
+
// Initialize with a default empty workflow so the editor is functional
|
|
529
|
+
// (e.g., drag-and-drop requires a non-null workflow in the store)
|
|
530
|
+
const defaultWorkflow: Workflow = {
|
|
531
|
+
id: '',
|
|
532
|
+
name: 'Untitled Workflow',
|
|
533
|
+
nodes: [],
|
|
534
|
+
edges: [],
|
|
535
|
+
metadata: {
|
|
536
|
+
version: '1.0.0',
|
|
537
|
+
format: DEFAULT_WORKFLOW_FORMAT,
|
|
538
|
+
createdAt: new Date().toISOString(),
|
|
539
|
+
updatedAt: new Date().toISOString()
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
workflowActions.initialize(defaultWorkflow);
|
|
543
|
+
}
|
|
544
|
+
} catch (error) {
|
|
545
|
+
logger.error('Failed to initialize editor:', error);
|
|
542
546
|
}
|
|
543
547
|
})();
|
|
544
548
|
|
|
@@ -569,14 +573,6 @@
|
|
|
569
573
|
};
|
|
570
574
|
});
|
|
571
575
|
|
|
572
|
-
// Monitor workflow store changes for testing node drag updates
|
|
573
|
-
$effect(() => {
|
|
574
|
-
const currentWorkflow = getWorkflowStore();
|
|
575
|
-
if (currentWorkflow) {
|
|
576
|
-
// Workflow store updated
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
|
|
580
576
|
/**
|
|
581
577
|
* Derived value for showing the right config panel
|
|
582
578
|
* Config panel always appears on the right side
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import CanvasBanner from
|
|
4
|
-
import CanvasDecorator from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import CanvasBanner from './CanvasBanner.svelte';
|
|
4
|
+
import CanvasDecorator from '../stories/CanvasDecorator.svelte';
|
|
5
5
|
|
|
6
6
|
const { Story } = defineMeta({
|
|
7
|
-
title:
|
|
8
|
-
tags: [
|
|
7
|
+
title: 'Display/CanvasBanner',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
10
|
-
layout:
|
|
11
|
-
}
|
|
10
|
+
layout: 'centered'
|
|
11
|
+
}
|
|
12
12
|
});
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<Story name="Default">
|
|
16
16
|
<CanvasDecorator>
|
|
17
|
-
<CanvasBanner
|
|
17
|
+
<CanvasBanner
|
|
18
|
+
title="Empty Canvas"
|
|
19
|
+
description="Drag nodes from the sidebar to get started"
|
|
20
|
+
iconName="heroicons:squares-plus"
|
|
21
|
+
/>
|
|
18
22
|
</CanvasDecorator>
|
|
19
23
|
</Story>
|
|
20
24
|
|
|
@@ -11,7 +11,7 @@ declare const CanvasBanner: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import CanvasBanner from
|
|
14
|
+
import CanvasBanner from './CanvasBanner.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,38 +1,47 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import ConfigPanel from
|
|
4
|
-
import { fn } from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ConfigPanel from './ConfigPanel.svelte';
|
|
4
|
+
import { fn } from 'storybook/test';
|
|
5
5
|
|
|
6
6
|
const { Story } = defineMeta({
|
|
7
|
-
title:
|
|
7
|
+
title: 'Editor/ConfigPanel',
|
|
8
8
|
component: ConfigPanel,
|
|
9
|
-
tags: [
|
|
9
|
+
tags: ['autodocs'],
|
|
10
10
|
parameters: {
|
|
11
|
-
layout:
|
|
11
|
+
layout: 'padded'
|
|
12
12
|
},
|
|
13
13
|
args: {
|
|
14
|
-
onClose: fn()
|
|
15
|
-
}
|
|
14
|
+
onClose: fn()
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<Story
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
<Story
|
|
20
|
+
name="Default"
|
|
21
|
+
args={{
|
|
22
|
+
title: 'HTTP Request',
|
|
23
|
+
id: 'node-abc-123',
|
|
24
|
+
description: 'Send HTTP requests to external APIs',
|
|
25
|
+
configTitle: 'Configuration'
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
25
28
|
|
|
26
|
-
<Story
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
29
|
+
<Story
|
|
30
|
+
name="With Details"
|
|
31
|
+
args={{
|
|
32
|
+
title: 'OpenAI Chat',
|
|
33
|
+
id: 'node-def-456',
|
|
34
|
+
description: 'Chat completion using OpenAI models',
|
|
35
|
+
details: [
|
|
36
|
+
{ label: 'Category', value: 'AI' },
|
|
37
|
+
{ label: 'Version', value: '1.2.0' }
|
|
38
|
+
]
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
35
41
|
|
|
36
|
-
<Story
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
<Story
|
|
43
|
+
name="Minimal"
|
|
44
|
+
args={{
|
|
45
|
+
title: 'Start Node'
|
|
46
|
+
}}
|
|
47
|
+
/>
|
|
@@ -11,7 +11,7 @@ declare const ConfigPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import ConfigPanel from
|
|
14
|
+
import ConfigPanel from './ConfigPanel.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,30 +1,30 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import LoadingSpinner from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import LoadingSpinner from './LoadingSpinner.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/LoadingSpinner',
|
|
7
7
|
component: LoadingSpinner,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['xs', 'sm', 'md', 'lg']
|
|
13
13
|
},
|
|
14
|
-
text: { control:
|
|
15
|
-
showText: { control:
|
|
16
|
-
}
|
|
14
|
+
text: { control: 'text' },
|
|
15
|
+
showText: { control: 'boolean' }
|
|
16
|
+
}
|
|
17
17
|
});
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<Story name="Default" />
|
|
21
21
|
|
|
22
|
-
<Story name="Extra Small" args={{ size:
|
|
22
|
+
<Story name="Extra Small" args={{ size: 'xs' }} />
|
|
23
23
|
|
|
24
|
-
<Story name="Small" args={{ size:
|
|
24
|
+
<Story name="Small" args={{ size: 'sm' }} />
|
|
25
25
|
|
|
26
|
-
<Story name="Large" args={{ size:
|
|
26
|
+
<Story name="Large" args={{ size: 'lg' }} />
|
|
27
27
|
|
|
28
|
-
<Story name="Custom Text" args={{ text:
|
|
28
|
+
<Story name="Custom Text" args={{ text: 'Processing...' }} />
|
|
29
29
|
|
|
30
30
|
<Story name="No Text" args={{ showText: false }} />
|
|
@@ -11,7 +11,7 @@ declare const LoadingSpinner: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import LoadingSpinner from
|
|
14
|
+
import LoadingSpinner from './LoadingSpinner.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,11 +1,11 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import Logo from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Logo from './Logo.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/Logo',
|
|
7
7
|
component: Logo,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs']
|
|
9
9
|
});
|
|
10
10
|
</script>
|
|
11
11
|
|
|
@@ -11,7 +11,7 @@ declare const Logo: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import Logo from
|
|
14
|
+
import Logo from './Logo.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,21 +1,36 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import MarkdownDisplay from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import MarkdownDisplay from './MarkdownDisplay.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/MarkdownDisplay',
|
|
7
7
|
component: MarkdownDisplay,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
|
-
content: { control:
|
|
11
|
-
}
|
|
10
|
+
content: { control: 'text' }
|
|
11
|
+
}
|
|
12
12
|
});
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<Story name="Simple" args={{ content:
|
|
15
|
+
<Story name="Simple" args={{ content: 'Hello **world**! This is *italic* and `inline code`.' }} />
|
|
16
16
|
|
|
17
|
-
<Story
|
|
17
|
+
<Story
|
|
18
|
+
name="Headings"
|
|
19
|
+
args={{ content: '# Heading 1\n## Heading 2\n### Heading 3\n\nParagraph text below headings.' }}
|
|
20
|
+
/>
|
|
18
21
|
|
|
19
|
-
<Story
|
|
22
|
+
<Story
|
|
23
|
+
name="Code Block"
|
|
24
|
+
args={{
|
|
25
|
+
content:
|
|
26
|
+
'Here is a code example:\n\n```javascript\nconst greeting = "Hello";\nconsole.log(greeting);\n```\n\nAnd some text after.'
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
20
29
|
|
|
21
|
-
<Story
|
|
30
|
+
<Story
|
|
31
|
+
name="Full Document"
|
|
32
|
+
args={{
|
|
33
|
+
content:
|
|
34
|
+
'# Workflow Guide\n\n## Getting Started\n\nFollow these steps:\n\n1. Create a new workflow\n2. Add nodes from the sidebar\n3. Connect nodes with edges\n\n> **Tip:** Use keyboard shortcuts for faster editing.\n\n### Supported Node Types\n\n| Type | Description |\n|------|-------------|\n| Start | Entry point |\n| End | Exit point |\n| Tool | Processing step |\n\nFor more info, visit [the docs](https://example.com).'
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
@@ -11,7 +11,7 @@ declare const MarkdownDisplay: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import MarkdownDisplay from
|
|
14
|
+
import MarkdownDisplay from './MarkdownDisplay.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,41 +1,53 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import Navbar from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Navbar from './Navbar.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Editor/Navbar',
|
|
7
7
|
component: Navbar,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
10
|
-
layout:
|
|
11
|
-
}
|
|
10
|
+
layout: 'fullscreen'
|
|
11
|
+
}
|
|
12
12
|
});
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<Story
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
<Story
|
|
16
|
+
name="Default"
|
|
17
|
+
args={{
|
|
18
|
+
title: 'My Workflow',
|
|
19
|
+
showStatus: true,
|
|
20
|
+
showSettings: true
|
|
21
|
+
}}
|
|
22
|
+
/>
|
|
20
23
|
|
|
21
|
-
<Story
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
<Story
|
|
25
|
+
name="With Actions"
|
|
26
|
+
args={{
|
|
27
|
+
title: 'Workflow Editor',
|
|
28
|
+
primaryActions: [
|
|
29
|
+
{ label: 'Save', href: '#', icon: 'mdi:content-save', variant: 'primary' },
|
|
30
|
+
{ label: 'Export', href: '#', icon: 'mdi:download', variant: 'outline' }
|
|
31
|
+
],
|
|
32
|
+
showStatus: true
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
29
35
|
|
|
30
|
-
<Story
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
<Story
|
|
37
|
+
name="With Breadcrumbs"
|
|
38
|
+
args={{
|
|
39
|
+
breadcrumbs: [
|
|
40
|
+
{ label: 'Workflows', href: '#', icon: 'mdi:folder' },
|
|
41
|
+
{ label: 'My Workflow', href: '#' }
|
|
42
|
+
],
|
|
43
|
+
showSettings: true
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
37
46
|
|
|
38
|
-
<Story
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
<Story
|
|
48
|
+
name="Minimal"
|
|
49
|
+
args={{
|
|
50
|
+
showStatus: false,
|
|
51
|
+
showSettings: false
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
@@ -11,7 +11,7 @@ declare const Navbar: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import Navbar from
|
|
14
|
+
import Navbar from './Navbar.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;
|
|
@@ -62,10 +62,13 @@
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// Add event listener for click outside
|
|
66
|
-
|
|
65
|
+
// Add event listener for click outside with proper cleanup
|
|
66
|
+
$effect(() => {
|
|
67
67
|
document.addEventListener('click', handleClickOutside);
|
|
68
|
-
|
|
68
|
+
return () => {
|
|
69
|
+
document.removeEventListener('click', handleClickOutside);
|
|
70
|
+
};
|
|
71
|
+
});
|
|
69
72
|
</script>
|
|
70
73
|
|
|
71
74
|
<div class="flowdrop-navbar">
|