@d34dman/flowdrop 0.0.22 → 0.0.23

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.
Files changed (42) hide show
  1. package/dist/components/App.svelte +26 -25
  2. package/dist/components/ConfigForm.svelte +140 -519
  3. package/dist/components/ConfigForm.svelte.d.ts +5 -3
  4. package/dist/components/form/FormArray.svelte +1049 -0
  5. package/dist/components/form/FormArray.svelte.d.ts +22 -0
  6. package/dist/components/form/FormCheckboxGroup.svelte +152 -0
  7. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +15 -0
  8. package/dist/components/form/FormField.svelte +279 -0
  9. package/dist/components/form/FormField.svelte.d.ts +18 -0
  10. package/dist/components/form/FormFieldWrapper.svelte +133 -0
  11. package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
  12. package/dist/components/form/FormNumberField.svelte +109 -0
  13. package/dist/components/form/FormNumberField.svelte.d.ts +23 -0
  14. package/dist/components/form/FormSelect.svelte +126 -0
  15. package/dist/components/form/FormSelect.svelte.d.ts +18 -0
  16. package/dist/components/form/FormTextField.svelte +88 -0
  17. package/dist/components/form/FormTextField.svelte.d.ts +17 -0
  18. package/dist/components/form/FormTextarea.svelte +94 -0
  19. package/dist/components/form/FormTextarea.svelte.d.ts +19 -0
  20. package/dist/components/form/FormToggle.svelte +123 -0
  21. package/dist/components/form/FormToggle.svelte.d.ts +17 -0
  22. package/dist/components/form/index.d.ts +41 -0
  23. package/dist/components/form/index.js +45 -0
  24. package/dist/components/form/types.d.ts +208 -0
  25. package/dist/components/form/types.js +29 -0
  26. package/dist/components/nodes/GatewayNode.svelte +84 -12
  27. package/dist/components/nodes/SimpleNode.svelte +41 -5
  28. package/dist/components/nodes/SimpleNode.svelte.d.ts +2 -1
  29. package/dist/components/nodes/SquareNode.svelte +41 -5
  30. package/dist/components/nodes/SquareNode.svelte.d.ts +2 -1
  31. package/dist/components/nodes/WorkflowNode.svelte +88 -5
  32. package/dist/index.d.ts +2 -3
  33. package/dist/index.js +1 -3
  34. package/dist/stores/workflowStore.d.ts +15 -0
  35. package/dist/stores/workflowStore.js +28 -0
  36. package/dist/types/index.d.ts +77 -0
  37. package/dist/types/index.js +16 -0
  38. package/package.json +3 -3
  39. package/dist/config/demo.d.ts +0 -58
  40. package/dist/config/demo.js +0 -142
  41. package/dist/data/samples.d.ts +0 -51
  42. package/dist/data/samples.js +0 -3245
@@ -14,8 +14,7 @@
14
14
  import ConfigPanel from './ConfigPanel.svelte';
15
15
  import Navbar from './Navbar.svelte';
16
16
  import { api, setEndpointConfig } from '../services/api.js';
17
- import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema } from '../types/index.js';
18
- import { sampleNodes } from '../data/samples.js';
17
+ import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema, NodeUIExtensions } from '../types/index.js';
19
18
  import { createEndpointConfig } from '../config/endpoints.js';
20
19
  import type { EndpointConfig } from '../config/endpoints.js';
21
20
  import type { AuthProvider } from '../types/auth.js';
@@ -205,20 +204,20 @@
205
204
  'fetchNodes'
206
205
  );
207
206
  if (suppressToast) {
208
- // Parent handled the error, don't show default toast
209
- nodes = sampleNodes;
207
+ // Parent handled the error, keep nodes empty
208
+ nodes = [];
210
209
  return;
211
210
  }
212
211
  }
213
212
 
214
- // Show error but don't block the UI
215
- error = `API Error: ${errorMessage}. Using sample data.`;
213
+ // Show error and set empty nodes array (no fallback to sample data)
214
+ error = `API Error: ${errorMessage}. No node types available.`;
216
215
  if (features.showToasts) {
217
216
  apiToasts.error('Load node types', errorMessage);
218
217
  }
219
218
 
220
- // Fallback to sample data
221
- nodes = sampleNodes;
219
+ // Set empty nodes array instead of fallback data
220
+ nodes = [];
222
221
  }
223
222
  }
224
223
 
@@ -645,6 +644,7 @@
645
644
  <ConfigForm
646
645
  schema={workflowConfigSchema}
647
646
  values={workflowConfigValues}
647
+ showUIExtensions={false}
648
648
  onSave={handleWorkflowSave}
649
649
  onCancel={() => (isWorkflowSettingsOpen = false)}
650
650
  />
@@ -663,14 +663,25 @@
663
663
  >
664
664
  <ConfigForm
665
665
  node={currentNode}
666
- onSave={(updatedConfig) => {
666
+ onSave={(updatedConfig, uiExtensions?: NodeUIExtensions) => {
667
667
  if (selectedNodeId && currentNode) {
668
+ // Build the updated node data
669
+ const updatedData = {
670
+ ...currentNode.data,
671
+ config: updatedConfig
672
+ };
673
+
674
+ // Include UI extensions if provided
675
+ if (uiExtensions) {
676
+ updatedData.extensions = {
677
+ ...currentNode.data.extensions,
678
+ ui: uiExtensions
679
+ };
680
+ }
681
+
668
682
  // Handle nodeType switching if nodeType is in the config
669
- let nodeUpdates: Record<string, unknown> = {
670
- data: {
671
- ...currentNode.data,
672
- config: updatedConfig
673
- }
683
+ const nodeUpdates: Record<string, unknown> = {
684
+ data: updatedData
674
685
  };
675
686
 
676
687
  // NOTE: We do NOT change the node's type field anymore
@@ -697,22 +708,12 @@
697
708
  </div>
698
709
  <div class="flowdrop-flex flowdrop-gap--2">
699
710
  <button
700
- class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--outline"
711
+ class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--primary"
701
712
  onclick={retryLoad}
702
713
  type="button"
703
714
  >
704
715
  Retry
705
716
  </button>
706
- <button
707
- class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--primary"
708
- onclick={() => {
709
- nodes = sampleNodes;
710
- error = null;
711
- }}
712
- type="button"
713
- >
714
- Use Sample Data
715
- </button>
716
717
  <button
717
718
  class="flowdrop-btn flowdrop-btn--sm flowdrop-btn--outline"
718
719
  onclick={() => {