@flowdrop/flowdrop 2.10.1 → 2.11.0
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/CHANGELOG.md +162 -0
- package/dist/components/App.svelte +112 -29
- package/dist/components/ConfigForm.svelte +5 -5
- package/dist/components/ConfigModal.svelte +2 -2
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +1 -1
- package/dist/components/LogsSidebar.svelte +15 -12
- package/dist/components/MarkdownDisplay.svelte +1 -1
- package/dist/components/PipelineStatus.svelte +5 -18
- package/dist/components/SchemaForm.svelte +1 -1
- package/dist/components/SettingsModal.svelte +1 -1
- package/dist/components/SettingsPanel.svelte +1 -1
- package/dist/components/WorkflowEditor.svelte +63 -37
- package/dist/components/WorkflowInterfaceEditor.svelte +43 -8
- package/dist/components/WorkflowInterfaceEditor.svelte.d.ts +12 -1
- package/dist/components/WorkflowInterfaceEntryCard.svelte +117 -44
- package/dist/components/WorkflowInterfaceEntryCard.svelte.d.ts +14 -1
- package/dist/components/WorkflowPlaygroundSettings.svelte +551 -0
- package/dist/components/WorkflowPlaygroundSettings.svelte.d.ts +20 -0
- package/dist/components/chat/AIChatPanel.svelte +1 -1
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +2 -2
- package/dist/components/nodes/ToolNode.svelte +1 -1
- package/dist/components/playground/ControlPanel.svelte +30 -0
- package/dist/components/playground/ControlPanel.svelte.d.ts +5 -0
- package/dist/components/playground/Playground.svelte +94 -42
- package/dist/components/playground/PlaygroundApp.svelte +1 -1
- package/dist/components/playground/PlaygroundModal.svelte +1 -1
- package/dist/components/playground/PlaygroundStudio.svelte +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/helpers/workflowEditorHelper.d.ts +12 -0
- package/dist/helpers/workflowEditorHelper.js +31 -0
- package/dist/messages/defaults.d.ts +53 -0
- package/dist/messages/defaults.js +48 -2
- package/dist/openapi/v1/openapi.yaml +113 -5
- package/dist/playground/index.d.ts +3 -1
- package/dist/playground/index.js +2 -1
- package/dist/playground/mount.d.ts +6 -10
- package/dist/playground/mount.js +43 -24
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/v1/workflow.schema.json +140 -2
- package/dist/services/globalSave.js +11 -1
- package/dist/services/playgroundService.d.ts +6 -1
- package/dist/services/playgroundService.js +5 -0
- package/dist/skins/default.d.ts +1 -1
- package/dist/skins/drafter.d.ts +1 -1
- package/dist/skins/index.d.ts +4 -4
- package/dist/skins/index.js +3 -3
- package/dist/skins/slate.d.ts +1 -1
- package/dist/stores/instanceContainer.svelte.d.ts +15 -0
- package/dist/stores/instanceContainer.svelte.js +11 -1
- package/dist/stores/playgroundStore.svelte.d.ts +8 -0
- package/dist/stores/playgroundStore.svelte.js +18 -4
- package/dist/stores/workflowStore.svelte.d.ts +4 -1
- package/dist/stores/workflowStore.svelte.js +8 -1
- package/dist/styles/base.css +14 -3
- package/dist/styles/tokenAliases.d.ts +13 -0
- package/dist/styles/tokenAliases.js +89 -0
- package/dist/themes/scopedSkinCss.d.ts +30 -0
- package/dist/themes/scopedSkinCss.js +95 -0
- package/dist/types/index.d.ts +86 -4
- package/dist/types/index.js +15 -3
- package/dist/types/skin.d.ts +2 -2
- package/dist/utils/playgroundChat.d.ts +121 -0
- package/dist/utils/playgroundChat.js +275 -0
- package/dist/utils/portal.d.ts +8 -0
- package/dist/utils/portal.js +15 -0
- package/dist/utils/workflowInterface.d.ts +88 -20
- package/dist/utils/workflowInterface.js +179 -18
- package/dist/webmcp/WebMCPConfirm.svelte +68 -18
- package/dist/webmcp/gate.d.ts +6 -0
- package/dist/webmcp/gate.js +4 -0
- package/dist/webmcp/runtime.js +2 -1
- package/package.json +7 -6
- package/dist/components/Button.stories.svelte +0 -65
- package/dist/components/Button.stories.svelte.d.ts +0 -19
- package/dist/components/CanvasBanner.stories.svelte +0 -30
- package/dist/components/CanvasBanner.stories.svelte.d.ts +0 -27
- package/dist/components/CanvasContextMenu.stories.svelte +0 -63
- package/dist/components/CanvasContextMenu.stories.svelte.d.ts +0 -19
- package/dist/components/ConfigPanel.stories.svelte +0 -47
- package/dist/components/ConfigPanel.stories.svelte.d.ts +0 -27
- package/dist/components/EditorStatusBar.stories.svelte +0 -44
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +0 -27
- package/dist/components/FlowDropEdge.stories.svelte +0 -197
- package/dist/components/FlowDropEdge.stories.svelte.d.ts +0 -26
- package/dist/components/LoadingSpinner.stories.svelte +0 -30
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +0 -27
- package/dist/components/Logo.stories.svelte +0 -22
- package/dist/components/Logo.stories.svelte.d.ts +0 -27
- package/dist/components/MarkdownDisplay.stories.svelte +0 -38
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +0 -27
- package/dist/components/Navbar.stories.svelte +0 -58
- package/dist/components/Navbar.stories.svelte.d.ts +0 -27
- package/dist/components/NodeStatusOverlay.stories.svelte +0 -85
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +0 -27
- package/dist/components/SchemaForm.stories.svelte +0 -122
- package/dist/components/SchemaForm.stories.svelte.d.ts +0 -27
- package/dist/components/StatusIcon.stories.svelte +0 -60
- package/dist/components/StatusIcon.stories.svelte.d.ts +0 -27
- package/dist/components/StatusLabel.stories.svelte +0 -17
- package/dist/components/StatusLabel.stories.svelte.d.ts +0 -27
- package/dist/components/ThemeToggle.stories.svelte +0 -25
- package/dist/components/ThemeToggle.stories.svelte.d.ts +0 -27
- package/dist/components/console/CommandConsole.stories.svelte +0 -111
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormCheckboxGroup.stories.svelte +0 -28
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormFieldWrapper.stories.svelte +0 -53
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormNumberField.stories.svelte +0 -36
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormRangeField.stories.svelte +0 -31
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormSelect.stories.svelte +0 -50
- package/dist/components/form/FormSelect.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormTextField.stories.svelte +0 -30
- package/dist/components/form/FormTextField.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormTextarea.stories.svelte +0 -34
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +0 -27
- package/dist/components/form/FormToggle.stories.svelte +0 -30
- package/dist/components/form/FormToggle.stories.svelte.d.ts +0 -27
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +0 -68
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +0 -27
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +0 -71
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +0 -27
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +0 -77
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +0 -27
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +0 -51
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +0 -27
- package/dist/components/nodes/CaptionNode.stories.svelte +0 -65
- package/dist/components/nodes/CaptionNode.stories.svelte.d.ts +0 -18
- package/dist/components/nodes/GatewayNode.stories.svelte +0 -108
- package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/IdeaNode.stories.svelte +0 -52
- package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/NotesNode.stories.svelte +0 -76
- package/dist/components/nodes/NotesNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/SimpleNode.stories.svelte +0 -223
- package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/SquareNode.stories.svelte +0 -127
- package/dist/components/nodes/SquareNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/TerminalNode.stories.svelte +0 -25
- package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/ToolNode.stories.svelte +0 -189
- package/dist/components/nodes/ToolNode.stories.svelte.d.ts +0 -26
- package/dist/components/nodes/WorkflowNode.stories.svelte +0 -188
- package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +0 -26
- package/dist/components/playground/MessageBubble.stories.svelte +0 -151
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +0 -27
- package/dist/mocks/app-environment.d.ts +0 -8
- package/dist/mocks/app-environment.js +0 -16
- package/dist/mocks/app-forms.d.ts +0 -6
- package/dist/mocks/app-forms.js +0 -29
- package/dist/mocks/app-navigation.d.ts +0 -5
- package/dist/mocks/app-navigation.js +0 -36
- package/dist/mocks/app-stores.d.ts +0 -14
- package/dist/mocks/app-stores.js +0 -26
- package/dist/stories/CanvasDecorator.svelte +0 -49
- package/dist/stories/CanvasDecorator.svelte.d.ts +0 -8
- package/dist/stories/EdgeDecorator.svelte +0 -125
- package/dist/stories/EdgeDecorator.svelte.d.ts +0 -17
- package/dist/stories/NodeDecorator.svelte +0 -75
- package/dist/stories/NodeDecorator.svelte.d.ts +0 -8
- package/dist/stories/WebMCPFakeAgent.svelte +0 -229
- package/dist/stories/WebMCPFakeAgent.svelte.d.ts +0 -10
- package/dist/stories/utils.d.ts +0 -93
- package/dist/stories/utils.js +0 -156
- package/dist/webmcp/WebMCP.stories.svelte +0 -101
- package/dist/webmcp/WebMCP.stories.svelte.d.ts +0 -18
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<script module lang="ts">
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import CanvasContextMenu from './CanvasContextMenu.svelte';
|
|
4
|
-
import CanvasDecorator from '../stories/CanvasDecorator.svelte';
|
|
5
|
-
import type { ContextMenuEntry } from '../editor/contextMenu.js';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Editor/CanvasContextMenu',
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered'
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const noop = (): void => {};
|
|
16
|
-
|
|
17
|
-
const nodeEntries: ContextMenuEntry[] = [
|
|
18
|
-
{ id: 'configure', label: 'Configure', shortcut: 'Enter', run: noop },
|
|
19
|
-
{ id: 'separator-node', separator: true },
|
|
20
|
-
{ id: 'delete', label: 'Delete', shortcut: 'Delete', run: noop }
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
const selectionEntries: ContextMenuEntry[] = [
|
|
24
|
-
{ id: 'delete', label: 'Delete 3 nodes', shortcut: 'Delete', run: noop }
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const consumerEntries: ContextMenuEntry[] = [
|
|
28
|
-
...nodeEntries,
|
|
29
|
-
{ id: 'separator-consumer', separator: true },
|
|
30
|
-
{ id: 'open-docs', label: 'Open documentation', icon: 'mdi:book-open-variant', run: noop }
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const disabledEntries: ContextMenuEntry[] = [
|
|
34
|
-
{ id: 'configure', label: 'Configure', shortcut: 'Enter', run: noop },
|
|
35
|
-
{ id: 'publish', label: 'Publish (not allowed here)', disabled: true, run: noop },
|
|
36
|
-
{ id: 'separator-node', separator: true },
|
|
37
|
-
{ id: 'delete', label: 'Delete', shortcut: 'Delete', run: noop }
|
|
38
|
-
];
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<Story name="Node">
|
|
42
|
-
<CanvasDecorator>
|
|
43
|
-
<CanvasContextMenu entries={nodeEntries} x={40} y={40} onselect={noop} onclose={noop} />
|
|
44
|
-
</CanvasDecorator>
|
|
45
|
-
</Story>
|
|
46
|
-
|
|
47
|
-
<Story name="Selection">
|
|
48
|
-
<CanvasDecorator>
|
|
49
|
-
<CanvasContextMenu entries={selectionEntries} x={40} y={40} onselect={noop} onclose={noop} />
|
|
50
|
-
</CanvasDecorator>
|
|
51
|
-
</Story>
|
|
52
|
-
|
|
53
|
-
<Story name="Consumer entry">
|
|
54
|
-
<CanvasDecorator>
|
|
55
|
-
<CanvasContextMenu entries={consumerEntries} x={40} y={40} onselect={noop} onclose={noop} />
|
|
56
|
-
</CanvasDecorator>
|
|
57
|
-
</Story>
|
|
58
|
-
|
|
59
|
-
<Story name="Disabled entry">
|
|
60
|
-
<CanvasDecorator>
|
|
61
|
-
<CanvasContextMenu entries={disabledEntries} x={40} y={40} onselect={noop} onclose={noop} />
|
|
62
|
-
</CanvasDecorator>
|
|
63
|
-
</Story>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import CanvasContextMenu from './CanvasContextMenu.svelte';
|
|
2
|
-
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> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const CanvasContextMenu: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {}, {}, string>;
|
|
18
|
-
type CanvasContextMenu = InstanceType<typeof CanvasContextMenu>;
|
|
19
|
-
export default CanvasContextMenu;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import ConfigPanel from './ConfigPanel.svelte';
|
|
4
|
-
import { fn } from 'storybook/test';
|
|
5
|
-
|
|
6
|
-
const { Story } = defineMeta({
|
|
7
|
-
title: 'Editor/ConfigPanel',
|
|
8
|
-
component: ConfigPanel,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'padded'
|
|
12
|
-
},
|
|
13
|
-
args: {
|
|
14
|
-
onClose: fn()
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
</script>
|
|
18
|
-
|
|
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
|
-
/>
|
|
28
|
-
|
|
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
|
-
/>
|
|
41
|
-
|
|
42
|
-
<Story
|
|
43
|
-
name="Minimal"
|
|
44
|
-
args={{
|
|
45
|
-
title: 'Start Node'
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default ConfigPanel;
|
|
2
|
-
type ConfigPanel = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ConfigPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import ConfigPanel from './ConfigPanel.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
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import EditorStatusBar from './EditorStatusBar.svelte';
|
|
4
|
-
import { fn } from 'storybook/test';
|
|
5
|
-
|
|
6
|
-
const { Story } = defineMeta({
|
|
7
|
-
title: 'Editor/EditorStatusBar',
|
|
8
|
-
component: EditorStatusBar,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {
|
|
11
|
-
// The banner is full-width editor chrome — show it edge to edge.
|
|
12
|
-
layout: 'fullscreen'
|
|
13
|
-
},
|
|
14
|
-
args: {
|
|
15
|
-
onRetry: fn(),
|
|
16
|
-
onSetApiUrl: fn(),
|
|
17
|
-
onTestApi: fn(),
|
|
18
|
-
onDismiss: fn()
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<Story
|
|
24
|
-
name="Default"
|
|
25
|
-
args={{
|
|
26
|
-
error: 'API Error: Failed to fetch. No node types available.'
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
|
|
30
|
-
<!-- The real message when the endpoint serves HTML (e.g. a 404 page) instead of JSON. -->
|
|
31
|
-
<Story
|
|
32
|
-
name="Long Message"
|
|
33
|
-
args={{
|
|
34
|
-
error:
|
|
35
|
-
'API Error: Unexpected token \'<\', "<!doctype "... is not valid JSON. No node types available.'
|
|
36
|
-
}}
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
<Story
|
|
40
|
-
name="Endpoint Unreachable"
|
|
41
|
-
args={{
|
|
42
|
-
error: 'API Error: NetworkError when attempting to fetch resource. No node types available.'
|
|
43
|
-
}}
|
|
44
|
-
/>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default EditorStatusBar;
|
|
2
|
-
type EditorStatusBar = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const EditorStatusBar: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import EditorStatusBar from './EditorStatusBar.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
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import EdgeDecorator from '../../lib/stories/EdgeDecorator.svelte';
|
|
4
|
-
import { createSampleNodeData } from '../../lib/stories/utils.js';
|
|
5
|
-
import { EDGE_MARKER_SIZES } from '../../lib/config/constants.js';
|
|
6
|
-
|
|
7
|
-
const { Story } = defineMeta({
|
|
8
|
-
title: 'Edges/FlowDropEdge',
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered'
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const sourceNode = createSampleNodeData({
|
|
16
|
-
label: 'Text Input',
|
|
17
|
-
metadata: {
|
|
18
|
-
id: 'text_input',
|
|
19
|
-
name: 'Text Input',
|
|
20
|
-
description: 'Simple text input',
|
|
21
|
-
category: 'inputs',
|
|
22
|
-
version: '1.0.0',
|
|
23
|
-
type: 'simple',
|
|
24
|
-
icon: 'mdi:text',
|
|
25
|
-
color: '#22c55e',
|
|
26
|
-
inputs: [],
|
|
27
|
-
outputs: [
|
|
28
|
-
{
|
|
29
|
-
id: 'output',
|
|
30
|
-
name: 'Output',
|
|
31
|
-
type: 'output',
|
|
32
|
-
dataType: 'string',
|
|
33
|
-
required: false
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const targetNode = createSampleNodeData({
|
|
40
|
-
label: 'Text Output',
|
|
41
|
-
metadata: {
|
|
42
|
-
id: 'text_output',
|
|
43
|
-
name: 'Text Output',
|
|
44
|
-
description: 'Display text output',
|
|
45
|
-
category: 'outputs',
|
|
46
|
-
version: '1.0.0',
|
|
47
|
-
type: 'simple',
|
|
48
|
-
icon: 'mdi:text-box',
|
|
49
|
-
color: '#ef4444',
|
|
50
|
-
inputs: [
|
|
51
|
-
{
|
|
52
|
-
id: 'input',
|
|
53
|
-
name: 'Input',
|
|
54
|
-
type: 'input',
|
|
55
|
-
dataType: 'string',
|
|
56
|
-
required: false
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
outputs: []
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const triggerSource = createSampleNodeData({
|
|
64
|
-
label: 'Trigger Source',
|
|
65
|
-
metadata: {
|
|
66
|
-
id: 'trigger_source',
|
|
67
|
-
name: 'Trigger Source',
|
|
68
|
-
description: 'Emits a trigger signal',
|
|
69
|
-
category: 'processing',
|
|
70
|
-
version: '1.0.0',
|
|
71
|
-
type: 'simple',
|
|
72
|
-
icon: 'mdi:play',
|
|
73
|
-
color: '#3b82f6',
|
|
74
|
-
inputs: [],
|
|
75
|
-
outputs: [
|
|
76
|
-
{
|
|
77
|
-
id: 'trigger',
|
|
78
|
-
name: 'Trigger',
|
|
79
|
-
type: 'output',
|
|
80
|
-
dataType: 'trigger',
|
|
81
|
-
required: false
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const triggerTarget = createSampleNodeData({
|
|
88
|
-
label: 'Trigger Target',
|
|
89
|
-
metadata: {
|
|
90
|
-
id: 'trigger_target',
|
|
91
|
-
name: 'Trigger Target',
|
|
92
|
-
description: 'Receives a trigger signal',
|
|
93
|
-
category: 'processing',
|
|
94
|
-
version: '1.0.0',
|
|
95
|
-
type: 'simple',
|
|
96
|
-
icon: 'mdi:lightning-bolt',
|
|
97
|
-
color: '#8b5cf6',
|
|
98
|
-
inputs: [
|
|
99
|
-
{
|
|
100
|
-
id: 'trigger',
|
|
101
|
-
name: 'Trigger',
|
|
102
|
-
type: 'input',
|
|
103
|
-
dataType: 'trigger',
|
|
104
|
-
required: false
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
outputs: []
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
const toolSource = createSampleNodeData({
|
|
112
|
-
label: 'Tool Provider',
|
|
113
|
-
metadata: {
|
|
114
|
-
id: 'tool_provider',
|
|
115
|
-
name: 'Tool Provider',
|
|
116
|
-
description: 'Provides a tool',
|
|
117
|
-
category: 'processing',
|
|
118
|
-
version: '1.0.0',
|
|
119
|
-
type: 'simple',
|
|
120
|
-
icon: 'mdi:wrench',
|
|
121
|
-
color: '#f59e0b',
|
|
122
|
-
inputs: [],
|
|
123
|
-
outputs: [
|
|
124
|
-
{
|
|
125
|
-
id: 'tool',
|
|
126
|
-
name: 'Tool',
|
|
127
|
-
type: 'output',
|
|
128
|
-
dataType: 'tool',
|
|
129
|
-
required: false
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
const toolTarget = createSampleNodeData({
|
|
136
|
-
label: 'Tool Consumer',
|
|
137
|
-
metadata: {
|
|
138
|
-
id: 'tool_consumer',
|
|
139
|
-
name: 'Tool Consumer',
|
|
140
|
-
description: 'Consumes a tool',
|
|
141
|
-
category: 'processing',
|
|
142
|
-
version: '1.0.0',
|
|
143
|
-
type: 'simple',
|
|
144
|
-
icon: 'mdi:cog',
|
|
145
|
-
color: '#f59e0b',
|
|
146
|
-
inputs: [
|
|
147
|
-
{
|
|
148
|
-
id: 'tool',
|
|
149
|
-
name: 'Tool',
|
|
150
|
-
type: 'input',
|
|
151
|
-
dataType: 'tool',
|
|
152
|
-
required: false
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
outputs: []
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<Story name="Data Edge">
|
|
161
|
-
<EdgeDecorator
|
|
162
|
-
sourceData={sourceNode}
|
|
163
|
-
targetData={targetNode}
|
|
164
|
-
edgeStyle="stroke: var(--fd-edge-data, #64748b);"
|
|
165
|
-
edgeClass="flowdrop--edge--data"
|
|
166
|
-
edgeMarkerColor="#64748b"
|
|
167
|
-
edgeMarkerSize={EDGE_MARKER_SIZES.data}
|
|
168
|
-
sourceHandleId="output"
|
|
169
|
-
targetHandleId="input"
|
|
170
|
-
/>
|
|
171
|
-
</Story>
|
|
172
|
-
|
|
173
|
-
<Story name="Trigger Edge">
|
|
174
|
-
<EdgeDecorator
|
|
175
|
-
sourceData={triggerSource}
|
|
176
|
-
targetData={triggerTarget}
|
|
177
|
-
edgeStyle="stroke: var(--fd-edge-trigger, #1e293b); stroke-width: 2px;"
|
|
178
|
-
edgeClass="flowdrop--edge--trigger"
|
|
179
|
-
edgeMarkerColor="#1e293b"
|
|
180
|
-
edgeMarkerSize={EDGE_MARKER_SIZES.trigger}
|
|
181
|
-
sourceHandleId="trigger"
|
|
182
|
-
targetHandleId="trigger"
|
|
183
|
-
/>
|
|
184
|
-
</Story>
|
|
185
|
-
|
|
186
|
-
<Story name="Tool Edge">
|
|
187
|
-
<EdgeDecorator
|
|
188
|
-
sourceData={toolSource}
|
|
189
|
-
targetData={toolTarget}
|
|
190
|
-
edgeStyle="stroke: var(--fd-edge-tool, #f59e0b); stroke-dasharray: 5 3;"
|
|
191
|
-
edgeClass="flowdrop--edge--tool"
|
|
192
|
-
edgeMarkerColor="#f59e0b"
|
|
193
|
-
edgeMarkerSize={EDGE_MARKER_SIZES.tool}
|
|
194
|
-
sourceHandleId="tool"
|
|
195
|
-
targetHandleId="tool"
|
|
196
|
-
/>
|
|
197
|
-
</Story>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default FlowDropEdge;
|
|
2
|
-
type FlowDropEdge = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const FlowDropEdge: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
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> {
|
|
15
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
-
$$bindings?: Bindings;
|
|
17
|
-
} & Exports;
|
|
18
|
-
(internal: unknown, props: {
|
|
19
|
-
$$events?: Events;
|
|
20
|
-
$$slots?: Slots;
|
|
21
|
-
}): Exports & {
|
|
22
|
-
$set?: any;
|
|
23
|
-
$on?: any;
|
|
24
|
-
};
|
|
25
|
-
z_$$bindings?: Bindings;
|
|
26
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import LoadingSpinner from './LoadingSpinner.svelte';
|
|
4
|
-
|
|
5
|
-
const { Story } = defineMeta({
|
|
6
|
-
title: 'Display/LoadingSpinner',
|
|
7
|
-
component: LoadingSpinner,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
argTypes: {
|
|
10
|
-
size: {
|
|
11
|
-
control: { type: 'select' },
|
|
12
|
-
options: ['xs', 'sm', 'md', 'lg']
|
|
13
|
-
},
|
|
14
|
-
text: { control: 'text' },
|
|
15
|
-
showText: { control: 'boolean' }
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<Story name="Default" />
|
|
21
|
-
|
|
22
|
-
<Story name="Extra Small" args={{ size: 'xs' }} />
|
|
23
|
-
|
|
24
|
-
<Story name="Small" args={{ size: 'sm' }} />
|
|
25
|
-
|
|
26
|
-
<Story name="Large" args={{ size: 'lg' }} />
|
|
27
|
-
|
|
28
|
-
<Story name="Custom Text" args={{ text: 'Processing...' }} />
|
|
29
|
-
|
|
30
|
-
<Story name="No Text" args={{ showText: false }} />
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default LoadingSpinner;
|
|
2
|
-
type LoadingSpinner = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const LoadingSpinner: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import LoadingSpinner from './LoadingSpinner.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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import Logo from './Logo.svelte';
|
|
4
|
-
|
|
5
|
-
const { Story } = defineMeta({
|
|
6
|
-
title: 'Display/Logo',
|
|
7
|
-
component: Logo,
|
|
8
|
-
tags: ['autodocs']
|
|
9
|
-
});
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Story name="Default">
|
|
13
|
-
<div style="width: 64px; height: 64px;">
|
|
14
|
-
<Logo />
|
|
15
|
-
</div>
|
|
16
|
-
</Story>
|
|
17
|
-
|
|
18
|
-
<Story name="Large">
|
|
19
|
-
<div style="width: 128px; height: 128px;">
|
|
20
|
-
<Logo />
|
|
21
|
-
</div>
|
|
22
|
-
</Story>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Logo;
|
|
2
|
-
type Logo = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const Logo: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import Logo from './Logo.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
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import MarkdownDisplay from './MarkdownDisplay.svelte';
|
|
4
|
-
|
|
5
|
-
const { Story } = defineMeta({
|
|
6
|
-
title: 'Display/MarkdownDisplay',
|
|
7
|
-
component: MarkdownDisplay,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
argTypes: {
|
|
10
|
-
content: { control: 'text' }
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<Story name="Simple" args={{ content: 'Hello **world**! This is *italic* and `inline code`.' }} />
|
|
16
|
-
|
|
17
|
-
<Story
|
|
18
|
-
name="Headings"
|
|
19
|
-
args={{
|
|
20
|
-
content: '# Heading 1\n## Heading 2\n### Heading 3\n\nParagraph text below headings.'
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
<Story
|
|
25
|
-
name="Code Block"
|
|
26
|
-
args={{
|
|
27
|
-
content:
|
|
28
|
-
'Here is a code example:\n\n```javascript\nconst greeting = "Hello";\nconsole.log(greeting);\n```\n\nAnd some text after.'
|
|
29
|
-
}}
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
|
-
<Story
|
|
33
|
-
name="Full Document"
|
|
34
|
-
args={{
|
|
35
|
-
content:
|
|
36
|
-
'# 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).'
|
|
37
|
-
}}
|
|
38
|
-
/>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default MarkdownDisplay;
|
|
2
|
-
type MarkdownDisplay = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const MarkdownDisplay: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
import MarkdownDisplay from './MarkdownDisplay.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
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
|
16
|
-
name="Default"
|
|
17
|
-
args={{
|
|
18
|
-
title: 'My Workflow',
|
|
19
|
-
showStatus: true,
|
|
20
|
-
showSettings: true
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
<Story
|
|
25
|
-
name="With Actions"
|
|
26
|
-
args={{
|
|
27
|
-
title: 'Workflow Editor',
|
|
28
|
-
primaryActions: [
|
|
29
|
-
{
|
|
30
|
-
label: 'Save',
|
|
31
|
-
href: '#',
|
|
32
|
-
icon: 'mdi:content-save',
|
|
33
|
-
variant: 'primary'
|
|
34
|
-
},
|
|
35
|
-
{ label: 'Export', href: '#', icon: 'mdi:download', variant: 'outline' }
|
|
36
|
-
],
|
|
37
|
-
showStatus: true
|
|
38
|
-
}}
|
|
39
|
-
/>
|
|
40
|
-
|
|
41
|
-
<Story
|
|
42
|
-
name="With Breadcrumbs"
|
|
43
|
-
args={{
|
|
44
|
-
breadcrumbs: [
|
|
45
|
-
{ label: 'Workflows', href: '#', icon: 'mdi:folder' },
|
|
46
|
-
{ label: 'My Workflow', href: '#' }
|
|
47
|
-
],
|
|
48
|
-
showSettings: true
|
|
49
|
-
}}
|
|
50
|
-
/>
|
|
51
|
-
|
|
52
|
-
<Story
|
|
53
|
-
name="Minimal"
|
|
54
|
-
args={{
|
|
55
|
-
showStatus: false,
|
|
56
|
-
showSettings: false
|
|
57
|
-
}}
|
|
58
|
-
/>
|