@flowdrop/flowdrop 1.3.0 → 1.5.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/README.md +68 -24
- package/dist/adapters/WorkflowAdapter.js +2 -22
- package/dist/adapters/agentspec/autoLayout.d.ts +51 -5
- package/dist/adapters/agentspec/autoLayout.js +120 -23
- package/dist/chat/commandClassifier.d.ts +19 -0
- package/dist/chat/commandClassifier.js +30 -0
- package/dist/chat/index.d.ts +27 -0
- package/dist/chat/index.js +32 -0
- package/dist/chat/responseParser.d.ts +21 -0
- package/dist/chat/responseParser.js +87 -0
- package/dist/commands/batch.d.ts +18 -0
- package/dist/commands/batch.js +56 -0
- package/dist/commands/executor.d.ts +37 -0
- package/dist/commands/executor.js +1044 -0
- package/dist/commands/index.d.ts +14 -0
- package/dist/commands/index.js +17 -0
- package/dist/commands/parser.d.ts +16 -0
- package/dist/commands/parser.js +278 -0
- package/dist/commands/positioner.d.ts +19 -0
- package/dist/commands/positioner.js +33 -0
- package/dist/commands/storeIntegration.svelte.d.ts +16 -0
- package/dist/commands/storeIntegration.svelte.js +67 -0
- package/dist/commands/types.d.ts +343 -0
- package/dist/commands/types.js +45 -0
- package/dist/components/App.svelte +431 -17
- package/dist/components/App.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.stories.svelte +6 -2
- package/dist/components/CanvasController.svelte +38 -0
- package/dist/components/CanvasController.svelte.d.ts +32 -0
- package/dist/components/ConfigMappingRow.svelte +130 -0
- package/dist/components/ConfigMappingRow.svelte.d.ts +8 -0
- package/dist/components/ConfigPanel.svelte +56 -7
- package/dist/components/ConfigPanel.svelte.d.ts +2 -0
- package/dist/components/FlowDropEdge.svelte +8 -57
- package/dist/components/Logo.svelte +14 -14
- package/dist/components/LogsSidebar.svelte +5 -5
- package/dist/components/Navbar.svelte +58 -10
- package/dist/components/Navbar.svelte.d.ts +7 -0
- package/dist/components/NodeSidebar.svelte +238 -362
- package/dist/components/NodeSwapPicker.svelte +537 -0
- package/dist/components/NodeSwapPicker.svelte.d.ts +16 -0
- package/dist/components/PortMappingRow.svelte +209 -0
- package/dist/components/PortMappingRow.svelte.d.ts +12 -0
- package/dist/components/SwapMappingEditor.svelte +550 -0
- package/dist/components/SwapMappingEditor.svelte.d.ts +12 -0
- package/dist/components/WorkflowEditor.svelte +99 -4
- package/dist/components/WorkflowEditor.svelte.d.ts +8 -0
- package/dist/components/chat/AIChatPanel.svelte +658 -0
- package/dist/components/chat/AIChatPanel.svelte.d.ts +13 -0
- package/dist/components/chat/CommandPreview.svelte +184 -0
- package/dist/components/chat/CommandPreview.svelte.d.ts +9 -0
- package/dist/components/console/CommandConsole.stories.svelte +93 -0
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +27 -0
- package/dist/components/console/CommandConsole.svelte +259 -0
- package/dist/components/console/CommandConsole.svelte.d.ts +11 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +139 -0
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +21 -0
- package/dist/components/console/ConsoleInput.svelte +712 -0
- package/dist/components/console/ConsoleInput.svelte.d.ts +16 -0
- package/dist/components/console/ConsoleOutput.svelte +121 -0
- package/dist/components/console/ConsoleOutput.svelte.d.ts +11 -0
- package/dist/components/console/formatters.d.ts +26 -0
- package/dist/components/console/formatters.js +118 -0
- package/dist/components/interrupt/index.d.ts +1 -0
- package/dist/components/interrupt/index.js +1 -0
- package/dist/components/nodes/SimpleNode.stories.svelte +64 -0
- package/dist/components/nodes/SimpleNode.svelte +27 -11
- package/dist/components/nodes/SquareNode.stories.svelte +45 -0
- package/dist/components/nodes/SquareNode.svelte +27 -11
- package/dist/components/nodes/WorkflowNode.stories.svelte +63 -0
- package/dist/config/endpoints.d.ts +8 -0
- package/dist/config/endpoints.js +5 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +9 -0
- package/dist/editor/index.d.ts +3 -1
- package/dist/editor/index.js +4 -2
- package/dist/helpers/proximityConnect.js +8 -1
- package/dist/helpers/workflowEditorHelper.d.ts +3 -53
- package/dist/helpers/workflowEditorHelper.js +13 -228
- package/dist/playground/index.d.ts +1 -1
- package/dist/playground/index.js +1 -1
- package/dist/schemas/v1/workflow.schema.json +107 -22
- package/dist/services/chatService.d.ts +65 -0
- package/dist/services/chatService.js +131 -0
- package/dist/services/historyService.d.ts +6 -4
- package/dist/services/historyService.js +21 -6
- package/dist/skins/slate.js +16 -0
- package/dist/stores/interruptStore.svelte.js +6 -1
- package/dist/stores/playgroundStore.svelte.d.ts +1 -1
- package/dist/stores/playgroundStore.svelte.js +11 -2
- package/dist/stores/portCoordinateStore.svelte.d.ts +4 -0
- package/dist/stores/portCoordinateStore.svelte.js +20 -26
- package/dist/stores/workflowStore.svelte.d.ts +31 -2
- package/dist/stores/workflowStore.svelte.js +84 -64
- package/dist/stories/EdgeDecorator.svelte +4 -4
- package/dist/styles/base.css +48 -0
- package/dist/svelte-app.d.ts +7 -1
- package/dist/svelte-app.js +4 -1
- package/dist/types/chat.d.ts +63 -0
- package/dist/types/chat.js +9 -0
- package/dist/types/events.d.ts +28 -2
- package/dist/types/events.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/settings.d.ts +6 -0
- package/dist/types/settings.js +3 -0
- package/dist/utils/edgeStyling.d.ts +42 -0
- package/dist/utils/edgeStyling.js +176 -0
- package/dist/utils/nodeIds.d.ts +31 -0
- package/dist/utils/nodeIds.js +42 -0
- package/dist/utils/nodeSwap.d.ts +221 -0
- package/dist/utils/nodeSwap.js +686 -0
- package/package.json +6 -1
- package/dist/helpers/nodeLayoutHelper.d.ts +0 -14
- package/dist/helpers/nodeLayoutHelper.js +0 -19
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
ConsoleAutocomplete Component
|
|
3
|
+
Dropdown suggestion list for command verbs and node type IDs
|
|
4
|
+
Positioned above the input, max 8 visible items, scrollable
|
|
5
|
+
Styled with BEM syntax matching console component pattern
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { tick } from "svelte";
|
|
10
|
+
|
|
11
|
+
export interface Suggestion {
|
|
12
|
+
/** The text to insert into the input */
|
|
13
|
+
value: string;
|
|
14
|
+
/** Display label shown in the dropdown */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Optional secondary text (e.g., category) */
|
|
17
|
+
detail?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface Props {
|
|
21
|
+
/** List of suggestions to display */
|
|
22
|
+
suggestions: Suggestion[];
|
|
23
|
+
/** Whether the dropdown is visible */
|
|
24
|
+
visible: boolean;
|
|
25
|
+
/** Currently highlighted index */
|
|
26
|
+
selectedIndex: number;
|
|
27
|
+
/** Called when a suggestion is accepted */
|
|
28
|
+
onAccept: (suggestion: Suggestion) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let { suggestions, visible, selectedIndex, onAccept }: Props = $props();
|
|
32
|
+
|
|
33
|
+
let listElement: HTMLDivElement | undefined = $state();
|
|
34
|
+
|
|
35
|
+
// Scroll selected item into view
|
|
36
|
+
$effect(() => {
|
|
37
|
+
if (!visible || !listElement || selectedIndex < 0) return;
|
|
38
|
+
const items = listElement.children;
|
|
39
|
+
if (items[selectedIndex]) {
|
|
40
|
+
items[selectedIndex].scrollIntoView({ block: "nearest" });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
{#if visible && suggestions.length > 0}
|
|
46
|
+
<div
|
|
47
|
+
class="console-autocomplete"
|
|
48
|
+
role="listbox"
|
|
49
|
+
id="console-autocomplete-listbox"
|
|
50
|
+
bind:this={listElement}
|
|
51
|
+
>
|
|
52
|
+
{#each suggestions as suggestion, i}
|
|
53
|
+
<div
|
|
54
|
+
class="console-autocomplete__item"
|
|
55
|
+
class:console-autocomplete__item--selected={i === selectedIndex}
|
|
56
|
+
role="option"
|
|
57
|
+
id="console-autocomplete-option-{i}"
|
|
58
|
+
tabindex="-1"
|
|
59
|
+
aria-selected={i === selectedIndex}
|
|
60
|
+
onmousedown={(e: MouseEvent) => { e.preventDefault(); onAccept(suggestion); }}
|
|
61
|
+
>
|
|
62
|
+
<span class="console-autocomplete__label">{suggestion.label}</span>
|
|
63
|
+
{#if suggestion.detail}
|
|
64
|
+
<span class="console-autocomplete__detail">{suggestion.detail}</span>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
{/each}
|
|
68
|
+
</div>
|
|
69
|
+
{/if}
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.console-autocomplete {
|
|
73
|
+
position: absolute;
|
|
74
|
+
bottom: 100%;
|
|
75
|
+
left: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
max-height: calc(8 * 2rem);
|
|
78
|
+
overflow-y: auto;
|
|
79
|
+
background-color: var(--fd-card);
|
|
80
|
+
border: 1px solid var(--fd-border);
|
|
81
|
+
border-bottom: none;
|
|
82
|
+
border-radius: var(--fd-radius-sm) var(--fd-radius-sm) 0 0;
|
|
83
|
+
z-index: 10;
|
|
84
|
+
|
|
85
|
+
scrollbar-width: thin;
|
|
86
|
+
scrollbar-color: var(--fd-scrollbar-thumb) var(--fd-scrollbar-track);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.console-autocomplete::-webkit-scrollbar {
|
|
90
|
+
width: 6px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.console-autocomplete::-webkit-scrollbar-track {
|
|
94
|
+
background: var(--fd-scrollbar-track);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.console-autocomplete::-webkit-scrollbar-thumb {
|
|
98
|
+
background: var(--fd-scrollbar-thumb);
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.console-autocomplete__item {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
padding: 0.25rem 1rem;
|
|
107
|
+
height: 2rem;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
font-family: monospace;
|
|
110
|
+
font-size: 0.875rem;
|
|
111
|
+
color: var(--fd-foreground);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.console-autocomplete__item:hover {
|
|
115
|
+
background-color: var(--fd-accent);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.console-autocomplete__item--selected {
|
|
119
|
+
background-color: var(--fd-primary-muted);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.console-autocomplete__item--selected:hover {
|
|
123
|
+
background-color: var(--fd-primary-muted);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.console-autocomplete__label {
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.console-autocomplete__detail {
|
|
133
|
+
color: var(--fd-muted-foreground);
|
|
134
|
+
font-size: 0.75rem;
|
|
135
|
+
margin-left: 1rem;
|
|
136
|
+
white-space: nowrap;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Suggestion {
|
|
2
|
+
/** The text to insert into the input */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Display label shown in the dropdown */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Optional secondary text (e.g., category) */
|
|
7
|
+
detail?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
/** List of suggestions to display */
|
|
11
|
+
suggestions: Suggestion[];
|
|
12
|
+
/** Whether the dropdown is visible */
|
|
13
|
+
visible: boolean;
|
|
14
|
+
/** Currently highlighted index */
|
|
15
|
+
selectedIndex: number;
|
|
16
|
+
/** Called when a suggestion is accepted */
|
|
17
|
+
onAccept: (suggestion: Suggestion) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const ConsoleAutocomplete: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type ConsoleAutocomplete = ReturnType<typeof ConsoleAutocomplete>;
|
|
21
|
+
export default ConsoleAutocomplete;
|