@flowdrop/flowdrop 1.15.0 → 2.0.0-beta.10
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 +648 -0
- package/MIGRATION-2.0.md +642 -0
- package/README.md +28 -28
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +18 -13
- package/dist/adapters/agentspec/AgentSpecAdapter.js +10 -10
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.d.ts +39 -0
- package/dist/chat/batchFeedback.js +51 -0
- package/dist/commands/executor.js +66 -27
- package/dist/commands/storeIntegration.svelte.d.ts +4 -1
- package/dist/commands/storeIntegration.svelte.js +36 -21
- package/dist/commands/types.d.ts +2 -0
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +696 -565
- package/dist/components/App.svelte.d.ts +63 -16
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +181 -552
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +16 -3
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/ConnectionLine.svelte +4 -2
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +78 -64
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +48 -171
- package/dist/components/NodeStatusOverlay.svelte +94 -6
- package/dist/components/NodeSwapPicker.svelte +22 -38
- package/dist/components/PipelineStatus.svelte +22 -68
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortCoordinateTracker.svelte +5 -6
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.stories.svelte +1 -3
- package/dist/components/SchemaForm.svelte +22 -39
- package/dist/components/SchemaForm.svelte.d.ts +0 -8
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +8 -8
- package/dist/components/SettingsPanel.svelte +44 -10
- package/dist/components/SwapMappingEditor.svelte +67 -49
- package/dist/components/SwapMappingEditor.svelte.d.ts +0 -2
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +45 -11
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +183 -162
- package/dist/components/WorkflowEditor.svelte.d.ts +39 -10
- package/dist/components/chat/AIChatPanel.svelte +99 -90
- package/dist/components/chat/AIChatPanel.svelte.d.ts +0 -4
- package/dist/components/chat/CommandPreview.svelte +2 -1
- package/dist/components/console/CommandConsole.svelte +7 -5
- package/dist/components/console/ConsoleAutocomplete.svelte +11 -12
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleInput.svelte +18 -9
- package/dist/components/console/ConsoleOutput.svelte +4 -3
- package/dist/components/form/FormArray.svelte +42 -182
- package/dist/components/form/FormArray.svelte.d.ts +2 -1
- package/dist/components/form/FormAutocomplete.svelte +26 -21
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +22 -44
- package/dist/components/form/FormFieldLight.svelte +56 -50
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +17 -9
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +262 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +62 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +17 -7
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +5 -16
- package/dist/components/form/FormToggle.svelte.d.ts +4 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/form/templateAutocomplete.js +1 -5
- package/dist/components/form/types.d.ts +1 -14
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/FormPrompt.svelte +3 -2
- package/dist/components/interrupt/InterruptBubble.svelte +25 -27
- package/dist/components/interrupt/ReviewPrompt.svelte +10 -23
- package/dist/components/interrupt/TextInputPrompt.svelte +2 -7
- package/dist/components/layouts/MainLayout.svelte +24 -18
- package/dist/components/layouts/MainLayout.svelte.d.ts +4 -0
- package/dist/components/nodes/AtomNode.svelte +70 -72
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +134 -172
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +79 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +68 -137
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +122 -169
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +70 -127
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +99 -104
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +145 -195
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +11 -15
- package/dist/components/playground/ChatPanel.svelte +6 -49
- package/dist/components/playground/ChatPanel.svelte.d.ts +0 -14
- package/dist/components/playground/ControlPanel.svelte +134 -123
- package/dist/components/playground/ControlPanel.svelte.d.ts +3 -0
- package/dist/components/playground/ExecutionLogs.svelte +11 -9
- package/dist/components/playground/InputCollector.svelte +22 -57
- package/dist/components/playground/MessageStream.svelte +17 -23
- package/dist/components/playground/PipelineKanbanView.svelte +69 -8
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +31 -8
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +188 -44
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +154 -105
- package/dist/components/playground/Playground.svelte.d.ts +5 -0
- package/dist/components/playground/PlaygroundApp.svelte +12 -2
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundModal.svelte +18 -3
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +40 -37
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +6 -0
- package/dist/components/playground/SessionManager.svelte +9 -12
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +30 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +40 -3
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +23 -7
- package/dist/config/endpoints.js +30 -10
- package/dist/core/index.d.ts +6 -7
- package/dist/core/index.js +8 -12
- package/dist/display/index.d.ts +6 -3
- package/dist/display/index.js +7 -5
- package/dist/editor/index.d.ts +20 -21
- package/dist/editor/index.js +26 -36
- package/dist/form/code.d.ts +25 -15
- package/dist/form/code.js +44 -41
- package/dist/form/fieldRegistry.d.ts +17 -13
- package/dist/form/fieldRegistry.js +32 -12
- package/dist/form/full.d.ts +19 -14
- package/dist/form/full.js +26 -28
- package/dist/form/index.d.ts +3 -4
- package/dist/form/index.js +6 -5
- package/dist/form/markdown.d.ts +13 -8
- package/dist/form/markdown.js +22 -23
- package/dist/helpers/proximityConnect.d.ts +3 -2
- package/dist/helpers/proximityConnect.js +2 -5
- package/dist/helpers/workflowEditorHelper.d.ts +14 -5
- package/dist/helpers/workflowEditorHelper.js +32 -30
- package/dist/index.d.ts +28 -24
- package/dist/index.js +27 -50
- package/dist/messages/defaults.d.ts +2 -5
- package/dist/messages/defaults.js +3 -6
- package/dist/messages/index.d.ts +1 -2
- package/dist/messages/index.js +1 -2
- package/dist/mocks/app-forms.d.ts +6 -2
- package/dist/mocks/app-forms.js +11 -4
- package/dist/openapi/v1/openapi.yaml +38 -26
- package/dist/playground/index.d.ts +4 -5
- package/dist/playground/index.js +4 -32
- package/dist/playground/mount.d.ts +34 -5
- package/dist/playground/mount.js +58 -24
- package/dist/registry/{BaseRegistry.d.ts → BaseRegistry.svelte.d.ts} +22 -1
- package/dist/registry/{BaseRegistry.js → BaseRegistry.svelte.js} +37 -1
- package/dist/registry/builtinFormats.d.ts +9 -18
- package/dist/registry/builtinFormats.js +9 -39
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -64
- package/dist/registry/builtinNodes.js +7 -103
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.js +4 -6
- package/dist/registry/nodeComponentRegistry.d.ts +184 -16
- package/dist/registry/nodeComponentRegistry.js +235 -17
- package/dist/registry/workflowFormatRegistry.d.ts +14 -9
- package/dist/registry/workflowFormatRegistry.js +24 -8
- package/dist/{schema → schemas}/index.d.ts +2 -2
- package/dist/{schema → schemas}/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +19 -17
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -3
- package/dist/services/apiVariableService.d.ts +2 -1
- package/dist/services/apiVariableService.js +16 -47
- package/dist/services/autoSaveService.d.ts +7 -0
- package/dist/services/autoSaveService.js +6 -4
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +9 -4
- package/dist/services/chatService.js +23 -28
- package/dist/services/draftStorage.d.ts +129 -13
- package/dist/services/draftStorage.js +185 -37
- package/dist/services/dynamicSchemaService.d.ts +33 -5
- package/dist/services/dynamicSchemaService.js +67 -55
- package/dist/services/globalSave.d.ts +13 -12
- package/dist/services/globalSave.js +29 -51
- package/dist/services/historyService.d.ts +39 -11
- package/dist/services/historyService.js +60 -18
- package/dist/services/interruptService.d.ts +15 -9
- package/dist/services/interruptService.js +35 -37
- package/dist/services/nodeExecutionService.d.ts +18 -3
- package/dist/services/nodeExecutionService.js +71 -45
- package/dist/services/playgroundService.d.ts +16 -10
- package/dist/services/playgroundService.js +42 -43
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/variableService.d.ts +2 -1
- package/dist/services/variableService.js +2 -2
- package/dist/services/workflowStorage.js +6 -6
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +56 -0
- package/dist/stores/apiContext.js +80 -0
- package/dist/stores/categoriesStore.svelte.d.ts +28 -23
- package/dist/stores/categoriesStore.svelte.js +69 -64
- package/dist/stores/getInstance.svelte.d.ts +39 -0
- package/dist/stores/getInstance.svelte.js +65 -0
- package/dist/stores/historyStore.svelte.d.ts +89 -91
- package/dist/stores/historyStore.svelte.js +159 -158
- package/dist/stores/instanceContainer.svelte.d.ts +111 -0
- package/dist/stores/instanceContainer.svelte.js +119 -0
- package/dist/stores/interruptStore.svelte.d.ts +112 -82
- package/dist/stores/interruptStore.svelte.js +253 -226
- package/dist/stores/pipelinePanelStore.svelte.d.ts +27 -3
- package/dist/stores/pipelinePanelStore.svelte.js +61 -14
- package/dist/stores/playgroundStore.svelte.d.ts +169 -222
- package/dist/stores/playgroundStore.svelte.js +513 -580
- package/dist/stores/portCoordinateStore.svelte.d.ts +57 -51
- package/dist/stores/portCoordinateStore.svelte.js +109 -98
- package/dist/stores/settingsStore.svelte.d.ts +17 -1
- package/dist/stores/settingsStore.svelte.js +79 -12
- package/dist/stores/workflowStore.svelte.d.ts +212 -210
- package/dist/stores/workflowStore.svelte.js +527 -502
- package/dist/stories/EdgeDecorator.svelte +5 -2
- package/dist/stories/NodeDecorator.svelte +5 -3
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +78 -11
- package/dist/svelte-app.js +210 -141
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/events.d.ts +24 -3
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +117 -32
- package/dist/types/index.js +0 -1
- package/dist/types/navbar.d.ts +7 -0
- package/dist/types/playground.d.ts +18 -3
- package/dist/types/settings.d.ts +30 -1
- package/dist/types/settings.js +5 -2
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/colors.d.ts +74 -21
- package/dist/utils/colors.js +92 -68
- package/dist/utils/connections.d.ts +9 -15
- package/dist/utils/connections.js +33 -88
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +45 -0
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/icons.d.ts +5 -2
- package/dist/utils/icons.js +6 -5
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.d.ts +6 -2
- package/dist/utils/nodeSwap.js +62 -129
- package/dist/utils/nodeTypes.d.ts +17 -8
- package/dist/utils/nodeTypes.js +27 -20
- package/dist/utils/performanceUtils.js +7 -0
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +7 -5
- package/dist/messages/deprecation.d.ts +0 -20
- package/dist/messages/deprecation.js +0 -33
- package/dist/registry/plugin.d.ts +0 -215
- package/dist/registry/plugin.js +0 -249
- package/dist/services/api.d.ts +0 -129
- package/dist/services/api.js +0 -217
package/dist/form/markdown.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import { registerMarkdownEditorField } from "@flowdrop/flowdrop/form/markdown";
|
|
13
13
|
*
|
|
14
14
|
* // Register markdown editor support (call once at app startup)
|
|
15
|
-
* registerMarkdownEditorField();
|
|
15
|
+
* registerMarkdownEditorField(fd.fields);
|
|
16
16
|
*
|
|
17
17
|
* // Now SchemaForm will render markdown editors for format: "markdown"
|
|
18
18
|
* const schema = {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* };
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
import type { FieldComponent } from './fieldRegistry.js';
|
|
26
|
+
import type { FieldComponent, FieldComponentRegistry } from './fieldRegistry.js';
|
|
27
27
|
import type { FieldSchema } from '../components/form/types.js';
|
|
28
28
|
export { default as FormMarkdownEditor } from '../components/form/FormMarkdownEditor.svelte';
|
|
29
29
|
export type { MarkdownEditorFieldProps } from '../components/form/types.js';
|
|
@@ -38,6 +38,7 @@ export declare function markdownEditorFieldMatcher(schema: FieldSchema): boolean
|
|
|
38
38
|
* Call this function once at application startup to enable
|
|
39
39
|
* markdown editor fields in SchemaForm.
|
|
40
40
|
*
|
|
41
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
41
42
|
* @param priority - Priority for field matching (default: 100)
|
|
42
43
|
*
|
|
43
44
|
* @example
|
|
@@ -45,25 +46,29 @@ export declare function markdownEditorFieldMatcher(schema: FieldSchema): boolean
|
|
|
45
46
|
* // In your app's entry point:
|
|
46
47
|
* import { registerMarkdownEditorField } from "@flowdrop/flowdrop/form/markdown";
|
|
47
48
|
*
|
|
48
|
-
* registerMarkdownEditorField();
|
|
49
|
+
* registerMarkdownEditorField(fd.fields);
|
|
49
50
|
* ```
|
|
50
51
|
*/
|
|
51
|
-
export declare function registerMarkdownEditorField(priority?: number): void;
|
|
52
|
+
export declare function registerMarkdownEditorField(registry: FieldComponentRegistry, priority?: number): void;
|
|
52
53
|
/**
|
|
53
54
|
* Synchronously register markdown editor field using the imported component
|
|
54
55
|
*
|
|
55
56
|
* Use this when you've already imported the component and want immediate registration.
|
|
56
57
|
*
|
|
58
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
59
|
+
* @param component - The pre-imported markdown editor component
|
|
57
60
|
* @param priority - Priority for field matching (default: 100)
|
|
58
61
|
*
|
|
59
62
|
* @example
|
|
60
63
|
* ```typescript
|
|
61
64
|
* import { registerMarkdownEditorFieldWithComponent, FormMarkdownEditor } from "@flowdrop/flowdrop/form/markdown";
|
|
62
|
-
* registerMarkdownEditorFieldWithComponent(FormMarkdownEditor);
|
|
65
|
+
* registerMarkdownEditorFieldWithComponent(fd.fields, FormMarkdownEditor);
|
|
63
66
|
* ```
|
|
64
67
|
*/
|
|
65
|
-
export declare function registerMarkdownEditorFieldWithComponent(component: FieldComponent, priority?: number): void;
|
|
68
|
+
export declare function registerMarkdownEditorFieldWithComponent(registry: FieldComponentRegistry, component: FieldComponent, priority?: number): void;
|
|
66
69
|
/**
|
|
67
|
-
* Check if markdown editor field is registered
|
|
70
|
+
* Check if markdown editor field is registered in the given registry.
|
|
71
|
+
*
|
|
72
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
68
73
|
*/
|
|
69
|
-
export declare function isMarkdownEditorRegistered(): boolean;
|
|
74
|
+
export declare function isMarkdownEditorRegistered(registry: FieldComponentRegistry): boolean;
|
package/dist/form/markdown.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import { registerMarkdownEditorField } from "@flowdrop/flowdrop/form/markdown";
|
|
13
13
|
*
|
|
14
14
|
* // Register markdown editor support (call once at app startup)
|
|
15
|
-
* registerMarkdownEditorField();
|
|
15
|
+
* registerMarkdownEditorField(fd.fields);
|
|
16
16
|
*
|
|
17
17
|
* // Now SchemaForm will render markdown editors for format: "markdown"
|
|
18
18
|
* const schema = {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
* };
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
import { fieldComponentRegistry } from './fieldRegistry.js';
|
|
27
26
|
// Re-export the component for direct usage if needed
|
|
28
27
|
export { default as FormMarkdownEditor } from '../components/form/FormMarkdownEditor.svelte';
|
|
29
28
|
/**
|
|
@@ -33,20 +32,13 @@ export { default as FormMarkdownEditor } from '../components/form/FormMarkdownEd
|
|
|
33
32
|
export function markdownEditorFieldMatcher(schema) {
|
|
34
33
|
return schema.format === 'markdown';
|
|
35
34
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Track if markdown editor is registered
|
|
38
|
-
*/
|
|
39
|
-
let markdownEditorRegistered = false;
|
|
40
|
-
// Sync registration flag with registry.clear() for test isolation
|
|
41
|
-
fieldComponentRegistry.onClear(() => {
|
|
42
|
-
markdownEditorRegistered = false;
|
|
43
|
-
});
|
|
44
35
|
/**
|
|
45
36
|
* Register the markdown editor field component
|
|
46
37
|
*
|
|
47
38
|
* Call this function once at application startup to enable
|
|
48
39
|
* markdown editor fields in SchemaForm.
|
|
49
40
|
*
|
|
41
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
50
42
|
* @param priority - Priority for field matching (default: 100)
|
|
51
43
|
*
|
|
52
44
|
* @example
|
|
@@ -54,21 +46,25 @@ fieldComponentRegistry.onClear(() => {
|
|
|
54
46
|
* // In your app's entry point:
|
|
55
47
|
* import { registerMarkdownEditorField } from "@flowdrop/flowdrop/form/markdown";
|
|
56
48
|
*
|
|
57
|
-
* registerMarkdownEditorField();
|
|
49
|
+
* registerMarkdownEditorField(fd.fields);
|
|
58
50
|
* ```
|
|
59
51
|
*/
|
|
60
|
-
export function registerMarkdownEditorField(priority = 100) {
|
|
61
|
-
if (
|
|
52
|
+
export function registerMarkdownEditorField(registry, priority = 100) {
|
|
53
|
+
if (registry.has('markdown-editor')) {
|
|
62
54
|
return;
|
|
63
55
|
}
|
|
64
56
|
// Dynamic import to ensure proper code splitting
|
|
65
57
|
import('../components/form/FormMarkdownEditor.svelte').then((module) => {
|
|
66
|
-
|
|
58
|
+
// Re-check inside the async callback: two rapid synchronous calls both pass
|
|
59
|
+
// the guard above before either import resolves, so guard again here.
|
|
60
|
+
if (registry.has('markdown-editor')) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
registry.register('markdown-editor', {
|
|
67
64
|
component: module.default,
|
|
68
65
|
matcher: markdownEditorFieldMatcher,
|
|
69
66
|
priority
|
|
70
67
|
});
|
|
71
|
-
markdownEditorRegistered = true;
|
|
72
68
|
});
|
|
73
69
|
}
|
|
74
70
|
/**
|
|
@@ -76,28 +72,31 @@ export function registerMarkdownEditorField(priority = 100) {
|
|
|
76
72
|
*
|
|
77
73
|
* Use this when you've already imported the component and want immediate registration.
|
|
78
74
|
*
|
|
75
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
76
|
+
* @param component - The pre-imported markdown editor component
|
|
79
77
|
* @param priority - Priority for field matching (default: 100)
|
|
80
78
|
*
|
|
81
79
|
* @example
|
|
82
80
|
* ```typescript
|
|
83
81
|
* import { registerMarkdownEditorFieldWithComponent, FormMarkdownEditor } from "@flowdrop/flowdrop/form/markdown";
|
|
84
|
-
* registerMarkdownEditorFieldWithComponent(FormMarkdownEditor);
|
|
82
|
+
* registerMarkdownEditorFieldWithComponent(fd.fields, FormMarkdownEditor);
|
|
85
83
|
* ```
|
|
86
84
|
*/
|
|
87
|
-
export function registerMarkdownEditorFieldWithComponent(component, priority = 100) {
|
|
88
|
-
if (
|
|
85
|
+
export function registerMarkdownEditorFieldWithComponent(registry, component, priority = 100) {
|
|
86
|
+
if (registry.has('markdown-editor')) {
|
|
89
87
|
return;
|
|
90
88
|
}
|
|
91
|
-
|
|
89
|
+
registry.register('markdown-editor', {
|
|
92
90
|
component,
|
|
93
91
|
matcher: markdownEditorFieldMatcher,
|
|
94
92
|
priority
|
|
95
93
|
});
|
|
96
|
-
markdownEditorRegistered = true;
|
|
97
94
|
}
|
|
98
95
|
/**
|
|
99
|
-
* Check if markdown editor field is registered
|
|
96
|
+
* Check if markdown editor field is registered in the given registry.
|
|
97
|
+
*
|
|
98
|
+
* @param registry - The instance's field registry (e.g. `fd.fields`)
|
|
100
99
|
*/
|
|
101
|
-
export function isMarkdownEditorRegistered() {
|
|
102
|
-
return
|
|
100
|
+
export function isMarkdownEditorRegistered(registry) {
|
|
101
|
+
return registry.has('markdown-editor');
|
|
103
102
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* compatible port pair and creates a preview/permanent edge.
|
|
7
7
|
*/
|
|
8
8
|
import type { WorkflowNode as WorkflowNodeType, WorkflowEdge, NodePort, PortCoordinateMap } from '../types/index.js';
|
|
9
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
9
10
|
/** A candidate proximity edge before it is finalized */
|
|
10
11
|
export interface ProximityEdgeCandidate {
|
|
11
12
|
id: string;
|
|
@@ -61,7 +62,7 @@ export declare class ProximityConnectHelper {
|
|
|
61
62
|
*
|
|
62
63
|
* @returns Array with at most ONE ProximityEdgeCandidate
|
|
63
64
|
*/
|
|
64
|
-
static findCompatibleEdges(draggedNode: WorkflowNodeType, allNodes: WorkflowNodeType[], existingEdges: WorkflowEdge[], minDistance: number): ProximityEdgeCandidate[];
|
|
65
|
+
static findCompatibleEdges(checker: PortCompatibilityChecker, draggedNode: WorkflowNodeType, allNodes: WorkflowNodeType[], existingEdges: WorkflowEdge[], minDistance: number): ProximityEdgeCandidate[];
|
|
65
66
|
/**
|
|
66
67
|
* Find the single best compatible edge using port-to-port distance.
|
|
67
68
|
*
|
|
@@ -77,7 +78,7 @@ export declare class ProximityConnectHelper {
|
|
|
77
78
|
*
|
|
78
79
|
* @returns Array with at most ONE ProximityEdgeCandidate
|
|
79
80
|
*/
|
|
80
|
-
static findCompatibleEdgesByPortCoordinates(draggedNodeId: string, portCoordinates: PortCoordinateMap, existingEdges: WorkflowEdge[], maxDistance: number): ProximityEdgeCandidate[];
|
|
81
|
+
static findCompatibleEdgesByPortCoordinates(checker: PortCompatibilityChecker, draggedNodeId: string, portCoordinates: PortCoordinateMap, existingEdges: WorkflowEdge[], maxDistance: number): ProximityEdgeCandidate[];
|
|
81
82
|
/**
|
|
82
83
|
* Convert candidates to temporary (preview) WorkflowEdge objects with dashed styling.
|
|
83
84
|
*/
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* compatible port pair and creates a preview/permanent edge.
|
|
7
7
|
*/
|
|
8
8
|
import { dynamicPortToNodePort } from '../types/index.js';
|
|
9
|
-
import { getPortCompatibilityChecker } from '../utils/connections.js';
|
|
10
9
|
import { v4 as uuidv4 } from 'uuid';
|
|
11
10
|
/** CSS class applied to proximity preview edges */
|
|
12
11
|
const PROXIMITY_EDGE_CLASS = 'flowdrop--edge--proximity-preview';
|
|
@@ -86,8 +85,7 @@ export class ProximityConnectHelper {
|
|
|
86
85
|
*
|
|
87
86
|
* @returns Array with at most ONE ProximityEdgeCandidate
|
|
88
87
|
*/
|
|
89
|
-
static findCompatibleEdges(draggedNode, allNodes, existingEdges, minDistance) {
|
|
90
|
-
const checker = getPortCompatibilityChecker();
|
|
88
|
+
static findCompatibleEdges(checker, draggedNode, allNodes, existingEdges, minDistance) {
|
|
91
89
|
// Build lookup set for O(1) duplicate checks
|
|
92
90
|
const existingEdgeSet = new Set(existingEdges.map((e) => `${e.source}:${e.sourceHandle}->${e.target}:${e.targetHandle}`));
|
|
93
91
|
// Find the closest node within distance
|
|
@@ -198,8 +196,7 @@ export class ProximityConnectHelper {
|
|
|
198
196
|
*
|
|
199
197
|
* @returns Array with at most ONE ProximityEdgeCandidate
|
|
200
198
|
*/
|
|
201
|
-
static findCompatibleEdgesByPortCoordinates(draggedNodeId, portCoordinates, existingEdges, maxDistance) {
|
|
202
|
-
const checker = getPortCompatibilityChecker();
|
|
199
|
+
static findCompatibleEdgesByPortCoordinates(checker, draggedNodeId, portCoordinates, existingEdges, maxDistance) {
|
|
203
200
|
// Build lookup set for O(1) duplicate checks
|
|
204
201
|
const existingEdgeSet = new Set(existingEdges.map((e) => `${e.source}:${e.sourceHandle}->${e.target}:${e.targetHandle}`));
|
|
205
202
|
// Partition ports by owner and direction, group other-node ports by dataType
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Contains business logic for workflow operations
|
|
4
4
|
*/
|
|
5
5
|
import type { WorkflowNode as WorkflowNodeType, NodeMetadata, Workflow, WorkflowEdge, NodeExecutionInfo } from '../types/index.js';
|
|
6
|
+
import { type FlowDropInstance } from '../stores/instanceContainer.svelte.js';
|
|
7
|
+
import type { ApiContext } from '../stores/apiContext.js';
|
|
8
|
+
import type { AuthProvider } from '../types/auth.js';
|
|
6
9
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
7
10
|
export { generateNodeId, extractConfigDefaults } from '../utils/nodeIds.js';
|
|
8
11
|
/**
|
|
@@ -33,11 +36,11 @@ export declare class NodeOperationsHelper {
|
|
|
33
36
|
/**
|
|
34
37
|
* Load nodes from API
|
|
35
38
|
*/
|
|
36
|
-
static loadNodesFromApi(providedNodes?: NodeMetadata[]): Promise<NodeMetadata[]>;
|
|
39
|
+
static loadNodesFromApi(api: ApiContext, providedNodes?: NodeMetadata[]): Promise<NodeMetadata[]>;
|
|
37
40
|
/**
|
|
38
41
|
* Load node execution information for all nodes in the workflow
|
|
39
42
|
*/
|
|
40
|
-
static loadNodeExecutionInfo(workflow: Workflow | null, pipelineId?: string): Promise<Record<string, NodeExecutionInfo>>;
|
|
43
|
+
static loadNodeExecutionInfo(api: ApiContext, workflow: Workflow | null, pipelineId?: string): Promise<Record<string, NodeExecutionInfo>>;
|
|
41
44
|
/**
|
|
42
45
|
* Create a new node from dropped data
|
|
43
46
|
*/
|
|
@@ -72,8 +75,13 @@ export declare class WorkflowOperationsHelper {
|
|
|
72
75
|
static addNode(workflow: Workflow, node: WorkflowNodeType): Workflow;
|
|
73
76
|
/**
|
|
74
77
|
* Save workflow to backend
|
|
78
|
+
*
|
|
79
|
+
* @param api - The instance's API context (endpoints + client)
|
|
80
|
+
* @param workflow - The workflow to save
|
|
81
|
+
* @param instance - The FlowDrop instance whose store should be synced when
|
|
82
|
+
* the server assigns a new ID; defaults to the page-default instance
|
|
75
83
|
*/
|
|
76
|
-
static saveWorkflow(workflow: Workflow | null): Promise<Workflow | null>;
|
|
84
|
+
static saveWorkflow(api: ApiContext, workflow: Workflow | null, instance?: FlowDropInstance): Promise<Workflow | null>;
|
|
77
85
|
/**
|
|
78
86
|
* Export workflow as JSON file
|
|
79
87
|
*/
|
|
@@ -127,7 +135,8 @@ export declare class WorkflowOperationsHelper {
|
|
|
127
135
|
*/
|
|
128
136
|
export declare class ConfigurationHelper {
|
|
129
137
|
/**
|
|
130
|
-
* Configure API endpoints
|
|
138
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
139
|
+
* instance's API context.
|
|
131
140
|
*/
|
|
132
|
-
static configureEndpoints(config: EndpointConfig): void;
|
|
141
|
+
static configureEndpoints(api: ApiContext, config: EndpointConfig, authProvider?: AuthProvider): void;
|
|
133
142
|
}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Contains business logic for workflow operations
|
|
4
4
|
*/
|
|
5
5
|
import { hasCycles, hasInvalidCycles } from '../utils/connections.js';
|
|
6
|
-
import { workflowApi, nodeApi, setEndpointConfig } from '../services/api.js';
|
|
7
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
-
import {
|
|
7
|
+
import { getDefaultInstance } from '../stores/instanceContainer.svelte.js';
|
|
9
8
|
import { nodeExecutionService } from '../services/nodeExecutionService.js';
|
|
10
9
|
import { WorkflowAdapter } from '../adapters/WorkflowAdapter.js';
|
|
11
10
|
import { AgentSpecAdapter } from '../adapters/agentspec/AgentSpecAdapter.js';
|
|
@@ -49,14 +48,14 @@ export class NodeOperationsHelper {
|
|
|
49
48
|
/**
|
|
50
49
|
* Load nodes from API
|
|
51
50
|
*/
|
|
52
|
-
static async loadNodesFromApi(providedNodes) {
|
|
51
|
+
static async loadNodesFromApi(api, providedNodes) {
|
|
53
52
|
// If nodes are provided via props, use them
|
|
54
53
|
if (providedNodes && providedNodes.length > 0) {
|
|
55
54
|
return providedNodes;
|
|
56
55
|
}
|
|
57
56
|
// Otherwise, load from API
|
|
58
57
|
try {
|
|
59
|
-
const fetchedNodes = await
|
|
58
|
+
const fetchedNodes = await api.client.getAvailableNodes();
|
|
60
59
|
return fetchedNodes;
|
|
61
60
|
}
|
|
62
61
|
catch (error) {
|
|
@@ -64,7 +63,7 @@ export class NodeOperationsHelper {
|
|
|
64
63
|
// Use fallback sample nodes
|
|
65
64
|
return [
|
|
66
65
|
{
|
|
67
|
-
|
|
66
|
+
node_type_id: 'text-input',
|
|
68
67
|
name: 'Text Input',
|
|
69
68
|
category: 'inputs',
|
|
70
69
|
description: 'Simple text input field',
|
|
@@ -74,7 +73,7 @@ export class NodeOperationsHelper {
|
|
|
74
73
|
outputs: [{ id: 'text', name: 'text', type: 'output', dataType: 'string' }]
|
|
75
74
|
},
|
|
76
75
|
{
|
|
77
|
-
|
|
76
|
+
node_type_id: 'text-output',
|
|
78
77
|
name: 'Text Output',
|
|
79
78
|
category: 'outputs',
|
|
80
79
|
description: 'Display text output',
|
|
@@ -89,7 +88,7 @@ export class NodeOperationsHelper {
|
|
|
89
88
|
/**
|
|
90
89
|
* Load node execution information for all nodes in the workflow
|
|
91
90
|
*/
|
|
92
|
-
static async loadNodeExecutionInfo(workflow, pipelineId) {
|
|
91
|
+
static async loadNodeExecutionInfo(api, workflow, pipelineId) {
|
|
93
92
|
if (!workflow?.nodes)
|
|
94
93
|
return {};
|
|
95
94
|
// Only load execution info if we have a pipelineId (for pipeline status mode)
|
|
@@ -97,7 +96,7 @@ export class NodeOperationsHelper {
|
|
|
97
96
|
return {};
|
|
98
97
|
try {
|
|
99
98
|
const nodeIds = workflow.nodes.map((node) => node.id);
|
|
100
|
-
const executionInfo = await nodeExecutionService.getMultipleNodeExecutionInfo(nodeIds, pipelineId);
|
|
99
|
+
const executionInfo = await nodeExecutionService.getMultipleNodeExecutionInfo(api.config, nodeIds, pipelineId);
|
|
101
100
|
return executionInfo;
|
|
102
101
|
}
|
|
103
102
|
catch (error) {
|
|
@@ -129,7 +128,7 @@ export class NodeOperationsHelper {
|
|
|
129
128
|
};
|
|
130
129
|
}
|
|
131
130
|
// Generate node ID based on node type and existing nodes
|
|
132
|
-
const newNodeId = generateNodeId(nodeType.
|
|
131
|
+
const newNodeId = generateNodeId(nodeType.node_type_id, existingNodes);
|
|
133
132
|
// All nodes use "universalNode" type
|
|
134
133
|
// UniversalNode component handles internal switching based on metadata and config
|
|
135
134
|
const newNode = {
|
|
@@ -138,8 +137,7 @@ export class NodeOperationsHelper {
|
|
|
138
137
|
position, // Use the position calculated from the drop event
|
|
139
138
|
deletable: true,
|
|
140
139
|
data: {
|
|
141
|
-
...nodeData
|
|
142
|
-
nodeId: newNodeId // Use the same ID
|
|
140
|
+
...nodeData
|
|
143
141
|
}
|
|
144
142
|
};
|
|
145
143
|
return newNode;
|
|
@@ -160,7 +158,7 @@ export class WorkflowOperationsHelper {
|
|
|
160
158
|
static generateMetadata(existingMetadata) {
|
|
161
159
|
const now = new Date().toISOString();
|
|
162
160
|
return {
|
|
163
|
-
|
|
161
|
+
schemaVersion: '1.0.0',
|
|
164
162
|
createdAt: now,
|
|
165
163
|
...(existingMetadata ?? {}),
|
|
166
164
|
updatedAt: now,
|
|
@@ -217,38 +215,41 @@ export class WorkflowOperationsHelper {
|
|
|
217
215
|
}
|
|
218
216
|
/**
|
|
219
217
|
* Save workflow to backend
|
|
218
|
+
*
|
|
219
|
+
* @param api - The instance's API context (endpoints + client)
|
|
220
|
+
* @param workflow - The workflow to save
|
|
221
|
+
* @param instance - The FlowDrop instance whose store should be synced when
|
|
222
|
+
* the server assigns a new ID; defaults to the page-default instance
|
|
220
223
|
*/
|
|
221
|
-
static async saveWorkflow(workflow) {
|
|
224
|
+
static async saveWorkflow(api, workflow, instance) {
|
|
222
225
|
if (!workflow) {
|
|
223
226
|
logger.warn('No workflow data available to save');
|
|
224
227
|
return null;
|
|
225
228
|
}
|
|
226
229
|
try {
|
|
227
|
-
// Determine
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
// Generate a new UUID for a new workflow
|
|
235
|
-
workflowId = uuidv4();
|
|
236
|
-
}
|
|
230
|
+
// Determine new vs existing BEFORE the uuidv4() fallback: a present id (any
|
|
231
|
+
// format) means the workflow came from a backend and must be updated. Only
|
|
232
|
+
// a missing id means "truly new".
|
|
233
|
+
const isExistingWorkflow = !!workflow.id;
|
|
234
|
+
const workflowId = workflow.id || uuidv4();
|
|
237
235
|
const workflowToSave = {
|
|
238
236
|
id: workflowId,
|
|
239
237
|
name: workflow.name || 'Untitled Workflow',
|
|
240
238
|
nodes: workflow.nodes || [],
|
|
241
239
|
edges: workflow.edges || [],
|
|
242
240
|
metadata: {
|
|
243
|
-
|
|
241
|
+
schemaVersion: workflow.metadata?.schemaVersion || '1.0.0',
|
|
244
242
|
createdAt: workflow.metadata?.createdAt || new Date().toISOString(),
|
|
245
243
|
updatedAt: new Date().toISOString()
|
|
246
244
|
}
|
|
247
245
|
};
|
|
248
|
-
const savedWorkflow =
|
|
246
|
+
const savedWorkflow = isExistingWorkflow
|
|
247
|
+
? await api.client.updateWorkflow(workflowToSave.id, workflowToSave)
|
|
248
|
+
: await api.client.saveWorkflow(workflowToSave);
|
|
249
249
|
// Update the workflow ID if it changed (new workflow)
|
|
250
250
|
if (savedWorkflow.id && savedWorkflow.id !== workflowToSave.id) {
|
|
251
|
-
|
|
251
|
+
const fd = instance ?? getDefaultInstance();
|
|
252
|
+
fd.workflow.batchUpdate({
|
|
252
253
|
nodes: workflowToSave.nodes,
|
|
253
254
|
edges: workflowToSave.edges,
|
|
254
255
|
name: workflowToSave.name,
|
|
@@ -281,7 +282,7 @@ export class WorkflowOperationsHelper {
|
|
|
281
282
|
nodes: workflow.nodes || [],
|
|
282
283
|
edges: workflow.edges || [],
|
|
283
284
|
metadata: {
|
|
284
|
-
|
|
285
|
+
schemaVersion: workflow.metadata?.schemaVersion || '1.0.0',
|
|
285
286
|
createdAt: workflow.metadata?.createdAt || new Date().toISOString(),
|
|
286
287
|
updatedAt: new Date().toISOString()
|
|
287
288
|
}
|
|
@@ -380,9 +381,10 @@ export class WorkflowOperationsHelper {
|
|
|
380
381
|
*/
|
|
381
382
|
export class ConfigurationHelper {
|
|
382
383
|
/**
|
|
383
|
-
* Configure API endpoints
|
|
384
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
385
|
+
* instance's API context.
|
|
384
386
|
*/
|
|
385
|
-
static configureEndpoints(config) {
|
|
386
|
-
|
|
387
|
+
static configureEndpoints(api, config, authProvider) {
|
|
388
|
+
api.configure(config, authProvider);
|
|
387
389
|
}
|
|
388
390
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FlowDrop - Visual Workflow Editor Library
|
|
3
3
|
*
|
|
4
|
-
* A Svelte 5 component library built on @xyflow/svelte for creating node-based
|
|
4
|
+
* A Svelte 5 component library built on @xyflow/svelte for creating node-based
|
|
5
|
+
* workflow editors.
|
|
5
6
|
*
|
|
6
|
-
* ##
|
|
7
|
+
* ## The main entry is a minimal front door
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* This entry point intentionally exposes only the small surface most apps need
|
|
10
|
+
* to get started: the `App` component, the `mountFlowDropApp` / `unmountFlowDropApp`
|
|
11
|
+
* mount helpers, instance plumbing (`createFlowDropInstance` / `getInstance` /
|
|
12
|
+
* `provideInstance`), endpoint + auth helpers, and the core public types. It does
|
|
13
|
+
* NOT re-export the entire library.
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
15
|
+
* Everything else lives in focused sub-modules — import from the one you need:
|
|
16
|
+
*
|
|
17
|
+
* - `@flowdrop/flowdrop/core` - Types, utilities, theme/skin, messages helpers (no heavy deps)
|
|
18
|
+
* - `@flowdrop/flowdrop/editor` - WorkflowEditor, registries, stores, services (adds @xyflow/svelte)
|
|
12
19
|
* - `@flowdrop/flowdrop/form` - SchemaForm with basic fields
|
|
13
|
-
* - `@flowdrop/flowdrop/form/code` - Code editor
|
|
14
|
-
* - `@flowdrop/flowdrop/form/markdown` - Markdown editor
|
|
20
|
+
* - `@flowdrop/flowdrop/form/code` - Code editor field (adds CodeMirror)
|
|
21
|
+
* - `@flowdrop/flowdrop/form/markdown` - Markdown editor field (CodeMirror 6)
|
|
15
22
|
* - `@flowdrop/flowdrop/display` - MarkdownDisplay (adds marked)
|
|
16
23
|
* - `@flowdrop/flowdrop/playground` - Playground for interactive workflow testing
|
|
24
|
+
* - `@flowdrop/flowdrop/settings` - Settings stores, services, components
|
|
17
25
|
* - `@flowdrop/flowdrop/styles` - CSS styles
|
|
18
26
|
*
|
|
19
|
-
* ## Legacy Import (Full Bundle)
|
|
20
|
-
*
|
|
21
|
-
* Importing from the main entry point includes everything:
|
|
22
|
-
*
|
|
23
|
-
* ```typescript
|
|
24
|
-
* import { WorkflowEditor, SchemaForm } from "@flowdrop/flowdrop";
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* **Note**: This will bundle ALL dependencies including @xyflow/svelte,
|
|
28
|
-
* CodeMirror and marked. For smaller bundles, use sub-modules.
|
|
29
|
-
*
|
|
30
27
|
* @module flowdrop
|
|
31
28
|
*/
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
29
|
+
export { default as App } from './components/App.svelte';
|
|
30
|
+
export { mountFlowDropApp, unmountFlowDropApp } from './svelte-app.js';
|
|
31
|
+
export { createFlowDropInstance } from './stores/instanceContainer.svelte.js';
|
|
32
|
+
export { getInstance, provideInstance } from './stores/getInstance.svelte.js';
|
|
33
|
+
export { createEndpointConfig, defaultEndpointConfig } from './config/endpoints.js';
|
|
34
|
+
export { NoAuthProvider, StaticAuthProvider, CallbackAuthProvider } from './types/auth.js';
|
|
35
|
+
export type { Workflow, WorkflowNode, WorkflowEdge, NodeMetadata, ConfigSchema } from './types/index.js';
|
|
36
|
+
export type { EndpointConfig } from './config/endpoints.js';
|
|
37
|
+
export type { AuthProvider } from './types/auth.js';
|
|
38
|
+
export type { FlowDropInstance } from './stores/instanceContainer.svelte.js';
|
|
39
|
+
export type { FlowDropMountOptions, MountedFlowDropApp } from './svelte-app.js';
|
|
40
|
+
export type { FlowDropEventHandlers } from './types/events.js';
|
|
41
|
+
export type { Messages, MessagesOverride } from './messages/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,64 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FlowDrop - Visual Workflow Editor Library
|
|
3
3
|
*
|
|
4
|
-
* A Svelte 5 component library built on @xyflow/svelte for creating node-based
|
|
4
|
+
* A Svelte 5 component library built on @xyflow/svelte for creating node-based
|
|
5
|
+
* workflow editors.
|
|
5
6
|
*
|
|
6
|
-
* ##
|
|
7
|
+
* ## The main entry is a minimal front door
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* This entry point intentionally exposes only the small surface most apps need
|
|
10
|
+
* to get started: the `App` component, the `mountFlowDropApp` / `unmountFlowDropApp`
|
|
11
|
+
* mount helpers, instance plumbing (`createFlowDropInstance` / `getInstance` /
|
|
12
|
+
* `provideInstance`), endpoint + auth helpers, and the core public types. It does
|
|
13
|
+
* NOT re-export the entire library.
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
15
|
+
* Everything else lives in focused sub-modules — import from the one you need:
|
|
16
|
+
*
|
|
17
|
+
* - `@flowdrop/flowdrop/core` - Types, utilities, theme/skin, messages helpers (no heavy deps)
|
|
18
|
+
* - `@flowdrop/flowdrop/editor` - WorkflowEditor, registries, stores, services (adds @xyflow/svelte)
|
|
12
19
|
* - `@flowdrop/flowdrop/form` - SchemaForm with basic fields
|
|
13
|
-
* - `@flowdrop/flowdrop/form/code` - Code editor
|
|
14
|
-
* - `@flowdrop/flowdrop/form/markdown` - Markdown editor
|
|
20
|
+
* - `@flowdrop/flowdrop/form/code` - Code editor field (adds CodeMirror)
|
|
21
|
+
* - `@flowdrop/flowdrop/form/markdown` - Markdown editor field (CodeMirror 6)
|
|
15
22
|
* - `@flowdrop/flowdrop/display` - MarkdownDisplay (adds marked)
|
|
16
23
|
* - `@flowdrop/flowdrop/playground` - Playground for interactive workflow testing
|
|
24
|
+
* - `@flowdrop/flowdrop/settings` - Settings stores, services, components
|
|
17
25
|
* - `@flowdrop/flowdrop/styles` - CSS styles
|
|
18
26
|
*
|
|
19
|
-
* ## Legacy Import (Full Bundle)
|
|
20
|
-
*
|
|
21
|
-
* Importing from the main entry point includes everything:
|
|
22
|
-
*
|
|
23
|
-
* ```typescript
|
|
24
|
-
* import { WorkflowEditor, SchemaForm } from "@flowdrop/flowdrop";
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* **Note**: This will bundle ALL dependencies including @xyflow/svelte,
|
|
28
|
-
* CodeMirror and marked. For smaller bundles, use sub-modules.
|
|
29
|
-
*
|
|
30
27
|
* @module flowdrop
|
|
31
28
|
*/
|
|
32
29
|
// ============================================================================
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
export
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
// ============================================================================
|
|
46
|
-
export * from './form/index.js';
|
|
47
|
-
// Note: Heavy form fields (code, markdown) are NOT auto-registered.
|
|
48
|
-
// Users must import from form/code or form/markdown and register explicitly.
|
|
49
|
-
// ============================================================================
|
|
50
|
-
// Display Exports
|
|
51
|
-
// ============================================================================
|
|
52
|
-
export * from './display/index.js';
|
|
53
|
-
// ============================================================================
|
|
54
|
-
// Playground Exports
|
|
55
|
-
// ============================================================================
|
|
56
|
-
export * from './playground/index.js';
|
|
57
|
-
// ============================================================================
|
|
58
|
-
// Editor Exports (includes @xyflow/svelte and auto-registers builtin nodes)
|
|
59
|
-
// ============================================================================
|
|
60
|
-
export * from './editor/index.js';
|
|
61
|
-
// ============================================================================
|
|
62
|
-
// Settings Exports (stores, services, components, types)
|
|
63
|
-
// ============================================================================
|
|
64
|
-
export * from './settings/index.js';
|
|
30
|
+
// Values
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// App component + vanilla-JS mount lifecycle.
|
|
33
|
+
export { default as App } from './components/App.svelte';
|
|
34
|
+
export { mountFlowDropApp, unmountFlowDropApp } from './svelte-app.js';
|
|
35
|
+
// Instance plumbing — per-instance state container + Svelte context helpers.
|
|
36
|
+
export { createFlowDropInstance } from './stores/instanceContainer.svelte.js';
|
|
37
|
+
export { getInstance, provideInstance } from './stores/getInstance.svelte.js';
|
|
38
|
+
// Endpoint configuration helpers.
|
|
39
|
+
export { createEndpointConfig, defaultEndpointConfig } from './config/endpoints.js';
|
|
40
|
+
// Authentication providers.
|
|
41
|
+
export { NoAuthProvider, StaticAuthProvider, CallbackAuthProvider } from './types/auth.js';
|
|
@@ -279,12 +279,8 @@ export declare const defaultMessages: {
|
|
|
279
279
|
readonly predefinedRun: "Run workflow";
|
|
280
280
|
};
|
|
281
281
|
readonly states: {
|
|
282
|
-
readonly viewOnlyTitle: "View only";
|
|
283
|
-
readonly viewOnlyText: "This playground is in view-only mode. No inputs are available.";
|
|
284
282
|
readonly newSessionTitle: "New session";
|
|
285
283
|
readonly newSessionText: "Test your flow with a prompt";
|
|
286
|
-
readonly readyTitle: "Ready to run";
|
|
287
|
-
readonly readyText: "Click Run to execute your workflow";
|
|
288
284
|
readonly processing: "Processing...";
|
|
289
285
|
readonly viewOnlyHelp: "View-only mode. Workflow execution is controlled externally.";
|
|
290
286
|
};
|
|
@@ -342,7 +338,7 @@ export declare const defaultMessages: {
|
|
|
342
338
|
readonly newSession: "New session";
|
|
343
339
|
};
|
|
344
340
|
readonly controlPanel: {
|
|
345
|
-
readonly sessionsLabel: "
|
|
341
|
+
readonly sessionsLabel: "Session";
|
|
346
342
|
readonly noSession: "No session";
|
|
347
343
|
readonly switchSession: "Switch session";
|
|
348
344
|
readonly newSession: "New session";
|
|
@@ -420,6 +416,7 @@ export declare const defaultMessages: {
|
|
|
420
416
|
readonly lastRunLabel: "Last Run:";
|
|
421
417
|
readonly durationLabel: "Duration:";
|
|
422
418
|
readonly errorLabel: "Error:";
|
|
419
|
+
readonly historyLabel: "Runs:";
|
|
423
420
|
};
|
|
424
421
|
};
|
|
425
422
|
};
|