@d34dman/flowdrop 0.0.59 → 0.0.60
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/dist/components/App.svelte +18 -3
- package/package.json +1 -1
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { onMount, tick } from 'svelte';
|
|
9
|
-
import { page } from '$app/stores';
|
|
10
9
|
import MainLayout from './layouts/MainLayout.svelte';
|
|
11
10
|
import WorkflowEditor from './WorkflowEditor.svelte';
|
|
12
11
|
import NodeSidebar from './NodeSidebar.svelte';
|
|
@@ -617,7 +616,7 @@
|
|
|
617
616
|
|
|
618
617
|
await fetchNodeTypes();
|
|
619
618
|
|
|
620
|
-
// Initialize the workflow store
|
|
619
|
+
// Initialize the workflow store
|
|
621
620
|
if (initialWorkflow) {
|
|
622
621
|
workflowActions.initialize(initialWorkflow);
|
|
623
622
|
|
|
@@ -625,6 +624,22 @@
|
|
|
625
624
|
if (eventHandlers?.onWorkflowLoad) {
|
|
626
625
|
eventHandlers.onWorkflowLoad(initialWorkflow);
|
|
627
626
|
}
|
|
627
|
+
} else {
|
|
628
|
+
// Initialize with a default empty workflow so the editor is functional
|
|
629
|
+
// (e.g., drag-and-drop requires a non-null workflow in the store)
|
|
630
|
+
const defaultWorkflow: Workflow = {
|
|
631
|
+
id: '',
|
|
632
|
+
name: 'Untitled Workflow',
|
|
633
|
+
nodes: [],
|
|
634
|
+
edges: [],
|
|
635
|
+
metadata: {
|
|
636
|
+
version: '1.0.0',
|
|
637
|
+
format: DEFAULT_WORKFLOW_FORMAT,
|
|
638
|
+
createdAt: new Date().toISOString(),
|
|
639
|
+
updatedAt: new Date().toISOString()
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
workflowActions.initialize(defaultWorkflow);
|
|
628
643
|
}
|
|
629
644
|
})();
|
|
630
645
|
|
|
@@ -684,7 +699,7 @@
|
|
|
684
699
|
|
|
685
700
|
<!-- MainLayout wrapper for workflow editor -->
|
|
686
701
|
<MainLayout
|
|
687
|
-
showHeader={showNavbar
|
|
702
|
+
showHeader={showNavbar}
|
|
688
703
|
showLeftSidebar={!disableSidebar}
|
|
689
704
|
showRightSidebar={showRightPanel}
|
|
690
705
|
showBottomPanel={false}
|