@d34dman/flowdrop 0.0.21 → 0.0.22
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 +48 -240
- package/dist/components/ConfigForm.svelte +707 -238
- package/dist/components/ConfigForm.svelte.d.ts +9 -2
- package/dist/components/ConfigPanel.svelte +160 -0
- package/dist/components/ConfigPanel.svelte.d.ts +32 -0
- package/dist/components/ReadOnlyDetails.svelte +168 -0
- package/dist/components/ReadOnlyDetails.svelte.d.ts +25 -0
- package/dist/components/WorkflowEditor.svelte +1 -1
- package/dist/components/nodes/NotesNode.svelte +89 -307
- package/dist/components/nodes/NotesNode.svelte.d.ts +3 -22
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/dist/components/ConfigSidebar.svelte +0 -916
- package/dist/components/ConfigSidebar.svelte.d.ts +0 -51
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
import MainLayout from './layouts/MainLayout.svelte';
|
|
11
11
|
import WorkflowEditor from './WorkflowEditor.svelte';
|
|
12
12
|
import NodeSidebar from './NodeSidebar.svelte';
|
|
13
|
-
import ConfigSidebar from './ConfigSidebar.svelte';
|
|
14
13
|
import ConfigForm from './ConfigForm.svelte';
|
|
14
|
+
import ConfigPanel from './ConfigPanel.svelte';
|
|
15
15
|
import Navbar from './Navbar.svelte';
|
|
16
16
|
import { api, setEndpointConfig } from '../services/api.js';
|
|
17
17
|
import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema } from '../types/index.js';
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
type: 'string',
|
|
139
139
|
title: 'Description',
|
|
140
140
|
description: 'A description of the workflow',
|
|
141
|
+
format: 'multiline',
|
|
141
142
|
default: ''
|
|
142
143
|
}
|
|
143
144
|
},
|
|
@@ -631,121 +632,57 @@
|
|
|
631
632
|
<!-- Right Sidebar: Configuration or Workflow Settings -->
|
|
632
633
|
{#snippet rightSidebar()}
|
|
633
634
|
{#if isWorkflowSettingsOpen}
|
|
634
|
-
<
|
|
635
|
-
isOpen={isWorkflowSettingsOpen}
|
|
635
|
+
<ConfigPanel
|
|
636
636
|
title="Workflow Settings"
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
637
|
+
id={$workflowStore?.id}
|
|
638
|
+
details={[
|
|
639
|
+
{ label: 'Nodes', value: String($workflowStore?.nodes?.length ?? 0) },
|
|
640
|
+
{ label: 'Connections', value: String($workflowStore?.edges?.length ?? 0) }
|
|
641
|
+
]}
|
|
642
|
+
configTitle="Settings"
|
|
640
643
|
onClose={() => (isWorkflowSettingsOpen = false)}
|
|
641
|
-
|
|
644
|
+
>
|
|
645
|
+
<ConfigForm
|
|
646
|
+
schema={workflowConfigSchema}
|
|
647
|
+
values={workflowConfigValues}
|
|
648
|
+
onSave={handleWorkflowSave}
|
|
649
|
+
onCancel={() => (isWorkflowSettingsOpen = false)}
|
|
650
|
+
/>
|
|
651
|
+
</ConfigPanel>
|
|
642
652
|
{:else if selectedNodeForConfig()}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
<span class="flowdrop-config-sidebar__detail-label">Node ID:</span>
|
|
664
|
-
<div class="flowdrop-config-sidebar__detail-value-with-copy">
|
|
665
|
-
<span
|
|
666
|
-
class="flowdrop-config-sidebar__detail-value"
|
|
667
|
-
style="font-family: monospace;"
|
|
668
|
-
>
|
|
669
|
-
{selectedNodeForConfig().id}
|
|
670
|
-
</span>
|
|
671
|
-
<button
|
|
672
|
-
class="flowdrop-config-sidebar__copy-btn"
|
|
673
|
-
onclick={() => {
|
|
674
|
-
navigator.clipboard.writeText(selectedNodeForConfig().id);
|
|
675
|
-
}}
|
|
676
|
-
title="Copy Node ID"
|
|
677
|
-
aria-label="Copy node ID to clipboard"
|
|
678
|
-
>
|
|
679
|
-
<svg
|
|
680
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
681
|
-
fill="none"
|
|
682
|
-
role="img"
|
|
683
|
-
width="1em"
|
|
684
|
-
height="1em"
|
|
685
|
-
viewBox="0 0 24 24"
|
|
686
|
-
stroke-width="1.5"
|
|
687
|
-
stroke="currentColor"
|
|
688
|
-
class="size-6"
|
|
689
|
-
>
|
|
690
|
-
<path
|
|
691
|
-
stroke-linecap="round"
|
|
692
|
-
stroke-linejoin="round"
|
|
693
|
-
d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"
|
|
694
|
-
/>
|
|
695
|
-
</svg>
|
|
696
|
-
</button>
|
|
697
|
-
</div>
|
|
698
|
-
</div>
|
|
699
|
-
<div class="flowdrop-config-sidebar__detail">
|
|
700
|
-
<span class="flowdrop-config-sidebar__detail-label">Type:</span>
|
|
701
|
-
<span class="flowdrop-config-sidebar__detail-value"
|
|
702
|
-
>{selectedNodeForConfig().data.metadata?.type ||
|
|
703
|
-
selectedNodeForConfig().type}</span
|
|
704
|
-
>
|
|
705
|
-
</div>
|
|
706
|
-
<div class="flowdrop-config-sidebar__detail">
|
|
707
|
-
<span class="flowdrop-config-sidebar__detail-label">Category:</span>
|
|
708
|
-
<span class="flowdrop-config-sidebar__detail-value"
|
|
709
|
-
>{selectedNodeForConfig().data.metadata?.category || 'general'}</span
|
|
710
|
-
>
|
|
711
|
-
</div>
|
|
712
|
-
<div class="flowdrop-config-sidebar__detail">
|
|
713
|
-
<span class="flowdrop-config-sidebar__detail-label">Description:</span>
|
|
714
|
-
<p class="flowdrop-config-sidebar__detail-description">
|
|
715
|
-
{selectedNodeForConfig().data.metadata?.description || 'Node configuration'}
|
|
716
|
-
</p>
|
|
717
|
-
</div>
|
|
718
|
-
</div>
|
|
719
|
-
</div>
|
|
720
|
-
|
|
721
|
-
<!-- Configuration Form -->
|
|
722
|
-
<div class="flowdrop-config-sidebar__section">
|
|
723
|
-
<h3 class="flowdrop-config-sidebar__section-title">Configuration</h3>
|
|
724
|
-
<ConfigForm
|
|
725
|
-
node={selectedNodeForConfig()}
|
|
726
|
-
onSave={(updatedConfig) => {
|
|
727
|
-
const currentNode = selectedNodeForConfig();
|
|
728
|
-
if (selectedNodeId && currentNode) {
|
|
729
|
-
// Handle nodeType switching if nodeType is in the config
|
|
730
|
-
let nodeUpdates: Record<string, unknown> = {
|
|
731
|
-
data: {
|
|
732
|
-
...currentNode.data,
|
|
733
|
-
config: updatedConfig
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
// NOTE: We do NOT change the node's type field anymore
|
|
738
|
-
// All nodes use 'universalNode' and UniversalNode handles internal switching
|
|
739
|
-
workflowActions.updateNode(selectedNodeId, nodeUpdates);
|
|
653
|
+
{@const currentNode = selectedNodeForConfig()}
|
|
654
|
+
<ConfigPanel
|
|
655
|
+
title={currentNode.data.label}
|
|
656
|
+
id={currentNode.id}
|
|
657
|
+
description={currentNode.data.metadata?.description || 'Node configuration'}
|
|
658
|
+
details={[
|
|
659
|
+
{ label: 'Type', value: currentNode.data.metadata?.type || currentNode.type },
|
|
660
|
+
{ label: 'Category', value: currentNode.data.metadata?.category || 'general' }
|
|
661
|
+
]}
|
|
662
|
+
onClose={closeConfigSidebar}
|
|
663
|
+
>
|
|
664
|
+
<ConfigForm
|
|
665
|
+
node={currentNode}
|
|
666
|
+
onSave={(updatedConfig) => {
|
|
667
|
+
if (selectedNodeId && currentNode) {
|
|
668
|
+
// Handle nodeType switching if nodeType is in the config
|
|
669
|
+
let nodeUpdates: Record<string, unknown> = {
|
|
670
|
+
data: {
|
|
671
|
+
...currentNode.data,
|
|
672
|
+
config: updatedConfig
|
|
740
673
|
}
|
|
674
|
+
};
|
|
741
675
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
676
|
+
// NOTE: We do NOT change the node's type field anymore
|
|
677
|
+
// All nodes use 'universalNode' and UniversalNode handles internal switching
|
|
678
|
+
workflowActions.updateNode(selectedNodeId, nodeUpdates);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
closeConfigSidebar();
|
|
682
|
+
}}
|
|
683
|
+
onCancel={closeConfigSidebar}
|
|
684
|
+
/>
|
|
685
|
+
</ConfigPanel>
|
|
749
686
|
{/if}
|
|
750
687
|
{/snippet}
|
|
751
688
|
|
|
@@ -949,133 +886,4 @@
|
|
|
949
886
|
overflow: hidden;
|
|
950
887
|
background-color: #1f2937;
|
|
951
888
|
}
|
|
952
|
-
|
|
953
|
-
/* Configuration Sidebar Styles */
|
|
954
|
-
.flowdrop-config-sidebar {
|
|
955
|
-
height: 100%;
|
|
956
|
-
display: flex;
|
|
957
|
-
flex-direction: column;
|
|
958
|
-
background-color: #ffffff;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
.flowdrop-config-sidebar__header {
|
|
962
|
-
display: flex;
|
|
963
|
-
justify-content: space-between;
|
|
964
|
-
align-items: center;
|
|
965
|
-
padding: 1rem;
|
|
966
|
-
border-bottom: 1px solid #e5e7eb;
|
|
967
|
-
background-color: #f9fafb;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
.flowdrop-config-sidebar__title {
|
|
971
|
-
margin: 0;
|
|
972
|
-
font-size: 1.125rem;
|
|
973
|
-
font-weight: 600;
|
|
974
|
-
color: #111827;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
.flowdrop-config-sidebar__close {
|
|
978
|
-
background: none;
|
|
979
|
-
border: none;
|
|
980
|
-
font-size: 1.5rem;
|
|
981
|
-
cursor: pointer;
|
|
982
|
-
color: #6b7280;
|
|
983
|
-
padding: 0.25rem;
|
|
984
|
-
border-radius: 0.25rem;
|
|
985
|
-
transition: color 0.2s;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
.flowdrop-config-sidebar__close:hover {
|
|
989
|
-
color: #374151;
|
|
990
|
-
background-color: #f3f4f6;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
.flowdrop-config-sidebar__content {
|
|
994
|
-
flex: 1;
|
|
995
|
-
overflow-y: auto;
|
|
996
|
-
padding: 1rem;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
.flowdrop-config-sidebar__section {
|
|
1000
|
-
margin-bottom: 1.5rem;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
.flowdrop-config-sidebar__section-title {
|
|
1004
|
-
margin: 0 0 0.75rem 0;
|
|
1005
|
-
font-size: 0.875rem;
|
|
1006
|
-
font-weight: 600;
|
|
1007
|
-
color: #374151;
|
|
1008
|
-
text-transform: uppercase;
|
|
1009
|
-
letter-spacing: 0.05em;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
.flowdrop-config-sidebar__details {
|
|
1013
|
-
display: flex;
|
|
1014
|
-
flex-direction: column;
|
|
1015
|
-
gap: 0.5rem;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.flowdrop-config-sidebar__detail {
|
|
1019
|
-
display: flex;
|
|
1020
|
-
flex-direction: column;
|
|
1021
|
-
gap: 0.25rem;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
.flowdrop-config-sidebar__detail-label {
|
|
1025
|
-
font-size: 0.75rem;
|
|
1026
|
-
font-weight: 500;
|
|
1027
|
-
color: #6b7280;
|
|
1028
|
-
text-transform: uppercase;
|
|
1029
|
-
letter-spacing: 0.05em;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.flowdrop-config-sidebar__detail-value {
|
|
1033
|
-
font-size: 0.875rem;
|
|
1034
|
-
color: #111827;
|
|
1035
|
-
font-weight: 500;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
.flowdrop-config-sidebar__detail-value-with-copy {
|
|
1039
|
-
display: flex;
|
|
1040
|
-
align-items: center;
|
|
1041
|
-
gap: 0.5rem;
|
|
1042
|
-
background-color: #f3f4f6;
|
|
1043
|
-
padding: 0.5rem;
|
|
1044
|
-
border-radius: 0.375rem;
|
|
1045
|
-
border: 1px solid #e5e7eb;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
.flowdrop-config-sidebar__detail-value-with-copy .flowdrop-config-sidebar__detail-value {
|
|
1049
|
-
flex: 1;
|
|
1050
|
-
font-size: 0.8125rem;
|
|
1051
|
-
word-break: break-all;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
.flowdrop-config-sidebar__copy-btn {
|
|
1055
|
-
background: white;
|
|
1056
|
-
border: 1px solid #d1d5db;
|
|
1057
|
-
border-radius: 0.25rem;
|
|
1058
|
-
padding: 0.25rem 0.5rem;
|
|
1059
|
-
cursor: pointer;
|
|
1060
|
-
font-size: 1rem;
|
|
1061
|
-
transition: all 0.2s;
|
|
1062
|
-
flex-shrink: 0;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.flowdrop-config-sidebar__copy-btn:hover {
|
|
1066
|
-
background-color: #f9fafb;
|
|
1067
|
-
border-color: #9ca3af;
|
|
1068
|
-
transform: scale(1.05);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.flowdrop-config-sidebar__copy-btn:active {
|
|
1072
|
-
transform: scale(0.95);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
.flowdrop-config-sidebar__detail-description {
|
|
1076
|
-
margin: 0;
|
|
1077
|
-
font-size: 0.875rem;
|
|
1078
|
-
color: #6b7280;
|
|
1079
|
-
line-height: 1.4;
|
|
1080
|
-
}
|
|
1081
889
|
</style>
|