@d34dman/flowdrop 0.0.43 → 0.0.44

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 (95) hide show
  1. package/README.md +8 -8
  2. package/dist/api/enhanced-client.d.ts +3 -1
  3. package/dist/api/enhanced-client.js +35 -5
  4. package/dist/components/App.svelte +68 -34
  5. package/dist/components/ConfigForm.svelte +169 -142
  6. package/dist/components/ConfigForm.svelte.d.ts +4 -2
  7. package/dist/components/ConfigPanel.svelte +42 -15
  8. package/dist/components/LogsSidebar.svelte +20 -19
  9. package/dist/components/Navbar.svelte +150 -80
  10. package/dist/components/Navbar.svelte.d.ts +8 -0
  11. package/dist/components/NodeSidebar.svelte +330 -217
  12. package/dist/components/PipelineStatus.svelte +6 -1
  13. package/dist/components/ReadOnlyDetails.svelte +14 -14
  14. package/dist/components/SchemaForm.svelte +49 -30
  15. package/dist/components/SchemaForm.svelte.d.ts +11 -1
  16. package/dist/components/SettingsModal.svelte +279 -0
  17. package/dist/components/SettingsModal.svelte.d.ts +23 -0
  18. package/dist/components/SettingsPanel.svelte +615 -0
  19. package/dist/components/SettingsPanel.svelte.d.ts +21 -0
  20. package/dist/components/ThemeToggle.svelte +186 -0
  21. package/dist/components/ThemeToggle.svelte.d.ts +14 -0
  22. package/dist/components/WorkflowEditor.svelte +110 -36
  23. package/dist/components/form/FormArray.svelte +81 -81
  24. package/dist/components/form/FormAutocomplete.svelte +1014 -0
  25. package/dist/components/form/FormAutocomplete.svelte.d.ts +25 -0
  26. package/dist/components/form/FormCheckboxGroup.svelte +16 -16
  27. package/dist/components/form/FormCodeEditor.svelte +26 -26
  28. package/dist/components/form/FormField.svelte +52 -21
  29. package/dist/components/form/FormFieldLight.svelte +19 -19
  30. package/dist/components/form/FormFieldWrapper.svelte +4 -4
  31. package/dist/components/form/FormMarkdownEditor.svelte +124 -57
  32. package/dist/components/form/FormNumberField.svelte +13 -13
  33. package/dist/components/form/FormRangeField.svelte +16 -16
  34. package/dist/components/form/FormSelect.svelte +15 -15
  35. package/dist/components/form/FormTemplateEditor.svelte +34 -34
  36. package/dist/components/form/FormTextField.svelte +13 -13
  37. package/dist/components/form/FormTextarea.svelte +13 -13
  38. package/dist/components/form/FormToggle.svelte +8 -8
  39. package/dist/components/form/index.d.ts +1 -0
  40. package/dist/components/form/index.js +1 -0
  41. package/dist/components/form/types.d.ts +133 -8
  42. package/dist/components/form/types.js +50 -1
  43. package/dist/components/interrupt/ChoicePrompt.svelte +45 -38
  44. package/dist/components/interrupt/ConfirmationPrompt.svelte +35 -35
  45. package/dist/components/interrupt/FormPrompt.svelte +27 -20
  46. package/dist/components/interrupt/InterruptBubble.svelte +50 -50
  47. package/dist/components/interrupt/TextInputPrompt.svelte +39 -32
  48. package/dist/components/layouts/MainLayout.svelte +233 -34
  49. package/dist/components/layouts/MainLayout.svelte.d.ts +12 -0
  50. package/dist/components/nodes/GatewayNode.svelte +102 -73
  51. package/dist/components/nodes/IdeaNode.svelte +53 -52
  52. package/dist/components/nodes/NotesNode.svelte +120 -88
  53. package/dist/components/nodes/SimpleNode.svelte +67 -47
  54. package/dist/components/nodes/SquareNode.svelte +86 -49
  55. package/dist/components/nodes/TerminalNode.svelte +122 -72
  56. package/dist/components/nodes/ToolNode.svelte +96 -65
  57. package/dist/components/nodes/WorkflowNode.svelte +91 -67
  58. package/dist/components/playground/ChatPanel.svelte +76 -76
  59. package/dist/components/playground/ExecutionLogs.svelte +71 -69
  60. package/dist/components/playground/InputCollector.svelte +59 -59
  61. package/dist/components/playground/MessageBubble.svelte +111 -112
  62. package/dist/components/playground/Playground.svelte +184 -138
  63. package/dist/components/playground/PlaygroundModal.svelte +18 -19
  64. package/dist/components/playground/SessionManager.svelte +68 -67
  65. package/dist/config/defaultPortConfig.js +22 -22
  66. package/dist/core/index.d.ts +2 -0
  67. package/dist/core/index.js +1 -0
  68. package/dist/form/fieldRegistry.d.ts +17 -1
  69. package/dist/form/fieldRegistry.js +18 -2
  70. package/dist/form/index.d.ts +20 -2
  71. package/dist/form/index.js +19 -1
  72. package/dist/helpers/workflowEditorHelper.js +23 -11
  73. package/dist/index.d.ts +5 -0
  74. package/dist/index.js +13 -0
  75. package/dist/services/autoSaveService.d.ts +112 -0
  76. package/dist/services/autoSaveService.js +223 -0
  77. package/dist/services/settingsService.d.ts +92 -0
  78. package/dist/services/settingsService.js +202 -0
  79. package/dist/services/toastService.d.ts +9 -0
  80. package/dist/services/toastService.js +30 -1
  81. package/dist/stores/settingsStore.d.ts +128 -0
  82. package/dist/stores/settingsStore.js +488 -0
  83. package/dist/stores/themeStore.d.ts +68 -0
  84. package/dist/stores/themeStore.js +215 -0
  85. package/dist/styles/base.css +298 -621
  86. package/dist/styles/toast.css +33 -0
  87. package/dist/styles/tokens.css +366 -0
  88. package/dist/types/index.d.ts +78 -0
  89. package/dist/types/index.js +2 -0
  90. package/dist/types/playground.d.ts +12 -0
  91. package/dist/types/settings.d.ts +185 -0
  92. package/dist/types/settings.js +101 -0
  93. package/dist/utils/colors.d.ts +100 -7
  94. package/dist/utils/colors.js +228 -67
  95. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ /**
2
+ * FlowDrop Toast Theme
3
+ *
4
+ * Themes svelte-5-french-toast to match FlowDrop design tokens.
5
+ * Apply containerClassName="flowdrop-toaster" and default toastOptions.className="flowdrop-toast-bar"
6
+ * so these selectors apply. Icon colors are set via toastOptions.iconTheme using CSS variables.
7
+ *
8
+ * Uses !important so our token-based styles win over the library's default styles,
9
+ * which are injected when the Toaster mounts (after this stylesheet).
10
+ */
11
+
12
+ /* Toaster container: use design token for offset from viewport edges */
13
+ .flowdrop-toaster.flowdrop-toaster {
14
+ --default-offset: var(--fd-space-4, 16px);
15
+ }
16
+
17
+ /*
18
+ * Toast bar: card surface, border, radius, shadow, typography and spacing from design tokens.
19
+ * Plain descendant selector (no :global - that's Svelte-only and invalid in plain CSS).
20
+ */
21
+ .flowdrop-toaster.flowdrop-toaster .flowdrop-toast-bar {
22
+ background: var(--fd-card) !important;
23
+ color: var(--fd-card-foreground) !important;
24
+ border: 1px solid var(--fd-border) !important;
25
+ border-radius: var(--fd-radius-lg) !important;
26
+ box-shadow: var(--fd-shadow-md) !important;
27
+ padding: var(--fd-space-2) var(--fd-space-3) !important;
28
+ max-width: 350px;
29
+ font-size: var(--fd-text-sm);
30
+ line-height: 1.3;
31
+ transition: background var(--fd-transition-fast), border-color var(--fd-transition-fast),
32
+ box-shadow var(--fd-transition-fast);
33
+ }
@@ -0,0 +1,366 @@
1
+ /**
2
+ * FlowDrop Design Tokens
3
+ *
4
+ * A semantic-first token system with three tiers:
5
+ * 1. Internal palette (--_*) - Raw color values, not documented for users
6
+ * 2. Semantic tokens (--fd-*) - The public API for theming
7
+ * 3. Component tokens - Built using semantic tokens
8
+ *
9
+ * Users customize FlowDrop by overriding --fd-* tokens.
10
+ *
11
+ * @example Quick theming
12
+ * :root {
13
+ * --fd-primary: #8b5cf6;
14
+ * --fd-primary-hover: #7c3aed;
15
+ * --fd-radius-md: 0.5rem;
16
+ * }
17
+ */
18
+
19
+ :root {
20
+ /* =========================================================================
21
+ INTERNAL PALETTE (Private - not documented for users)
22
+ Prefix: --_ indicates internal/private tokens
23
+ ========================================================================= */
24
+
25
+ /* Grays - Tinted scale with subtle blue undertone for modern feel, 9 steps */
26
+ --_gray-1: #fafafc;
27
+ --_gray-2: #f5f5f8;
28
+ --_gray-3: #eaeaef;
29
+ --_gray-4: #dcdce4;
30
+ --_gray-5: #a3a3ad;
31
+ --_gray-6: #71717b;
32
+ --_gray-7: #52525c;
33
+ --_gray-8: #27272b;
34
+ --_gray-9: #18181c;
35
+
36
+ /* Blue - Primary/interactive color */
37
+ --_blue-1: #eff6ff;
38
+ --_blue-2: #3b82f6;
39
+ --_blue-3: #1d4ed8;
40
+
41
+ /* Green - Success states */
42
+ --_green-1: #f0fdf4;
43
+ --_green-2: #22c55e;
44
+ --_green-3: #15803d;
45
+
46
+ /* Red - Error/destructive states */
47
+ --_red-1: #fef2f2;
48
+ --_red-2: #ef4444;
49
+ --_red-3: #b91c1c;
50
+
51
+ /* Amber - Warning states */
52
+ --_amber-1: #fffbeb;
53
+ --_amber-2: #f59e0b;
54
+ --_amber-3: #b45309;
55
+
56
+ /* Violet - Selection/accent */
57
+ --_violet-1: #f5f3ff;
58
+ --_violet-2: #8b5cf6;
59
+ --_violet-3: #6d28d9;
60
+
61
+ /* =========================================================================
62
+ SEMANTIC TOKENS (Public API)
63
+ These are the tokens users override for theming
64
+ ========================================================================= */
65
+
66
+ /* ----- SURFACES (Backgrounds) ----- */
67
+ --fd-background: #ffffff;
68
+ --fd-foreground: var(--_gray-9);
69
+ --fd-muted: #f8f8fb;
70
+ --fd-muted-foreground: var(--_gray-6);
71
+ --fd-subtle: #f0f0f5;
72
+ --fd-card: #ffffff;
73
+ --fd-card-foreground: var(--_gray-9);
74
+
75
+ /* ----- HEADER (Distinct header styling) ----- */
76
+ --fd-header: #f5f7fa;
77
+ --fd-header-foreground: var(--_gray-8);
78
+ --fd-header-gradient: linear-gradient(180deg, #f8f9fc 0%, #f4f5f8 100%);
79
+
80
+ /* ----- SURFACE TINT (Subtle accent for surfaces) ----- */
81
+ --fd-surface-tint: rgba(99, 102, 241, 0.02);
82
+
83
+ /* ----- BORDERS ----- */
84
+ --fd-border: var(--_gray-4);
85
+ --fd-border-muted: var(--_gray-3);
86
+ --fd-border-strong: var(--_gray-5);
87
+ --fd-ring: var(--_blue-2);
88
+
89
+ /* ----- NODE BORDERS (Higher contrast for visibility when zoomed out) ----- */
90
+ --fd-node-border: var(--_gray-5);
91
+ --fd-node-border-hover: var(--_gray-6);
92
+
93
+ /* ----- PRIMARY (Interactive/Brand) ----- */
94
+ --fd-primary: var(--_blue-2);
95
+ --fd-primary-hover: var(--_blue-3);
96
+ --fd-primary-foreground: #ffffff;
97
+ --fd-primary-muted: var(--_blue-1);
98
+
99
+ /* ----- SECONDARY ----- */
100
+ --fd-secondary: var(--_gray-2);
101
+ --fd-secondary-hover: var(--_gray-3);
102
+ --fd-secondary-foreground: var(--_gray-9);
103
+
104
+ /* ----- ACCENT ----- */
105
+ --fd-accent: var(--_violet-2);
106
+ --fd-accent-hover: var(--_violet-3);
107
+ --fd-accent-foreground: #ffffff;
108
+ --fd-accent-muted: var(--_violet-1);
109
+
110
+ /* ----- STATUS: SUCCESS ----- */
111
+ --fd-success: var(--_green-2);
112
+ --fd-success-hover: var(--_green-3);
113
+ --fd-success-foreground: #ffffff;
114
+ --fd-success-muted: var(--_green-1);
115
+
116
+ /* ----- STATUS: WARNING ----- */
117
+ --fd-warning: var(--_amber-2);
118
+ --fd-warning-hover: var(--_amber-3);
119
+ --fd-warning-foreground: var(--_gray-9);
120
+ --fd-warning-muted: var(--_amber-1);
121
+
122
+ /* ----- STATUS: ERROR/DESTRUCTIVE ----- */
123
+ --fd-error: var(--_red-2);
124
+ --fd-error-hover: var(--_red-3);
125
+ --fd-error-foreground: #ffffff;
126
+ --fd-error-muted: var(--_red-1);
127
+
128
+ /* ----- STATUS: INFO ----- */
129
+ --fd-info: var(--_blue-2);
130
+ --fd-info-foreground: #ffffff;
131
+ --fd-info-muted: var(--_blue-1);
132
+
133
+ /* ----- SPACING SCALE ----- */
134
+ --fd-space-0: 0;
135
+ --fd-space-1: 0.25rem;
136
+ /* 4px */
137
+ --fd-space-2: 0.5rem;
138
+ /* 8px */
139
+ --fd-space-3: 0.75rem;
140
+ /* 12px */
141
+ --fd-space-4: 1rem;
142
+ /* 16px */
143
+ --fd-space-5: 1.25rem;
144
+ /* 20px */
145
+ --fd-space-6: 1.5rem;
146
+ /* 24px */
147
+ --fd-space-8: 2rem;
148
+ /* 32px */
149
+ --fd-space-10: 2.5rem;
150
+ /* 40px */
151
+ --fd-space-12: 3rem;
152
+ /* 48px */
153
+ --fd-space-16: 4rem;
154
+ /* 64px */
155
+
156
+ /* ----- BORDER RADIUS ----- */
157
+ --fd-radius-none: 0;
158
+ --fd-radius-sm: 0.25rem;
159
+ /* 4px */
160
+ --fd-radius-md: 0.375rem;
161
+ /* 6px */
162
+ --fd-radius-lg: 0.5rem;
163
+ /* 8px */
164
+ --fd-radius-xl: 0.75rem;
165
+ /* 12px */
166
+ --fd-radius-2xl: 1rem;
167
+ /* 16px */
168
+ --fd-radius-full: 9999px;
169
+
170
+ /* ----- SHADOWS (Refined layered shadows for modern depth) ----- */
171
+ --fd-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.06);
172
+ --fd-shadow-md: 0 4px 8px rgb(0 0 0 / 0.06), 0 2px 4px rgb(0 0 0 / 0.04);
173
+ --fd-shadow-lg: 0 10px 20px rgb(0 0 0 / 0.08), 0 4px 8px rgb(0 0 0 / 0.04);
174
+ --fd-shadow-xl: 0 20px 30px rgb(0 0 0 / 0.1), 0 8px 16px rgb(0 0 0 / 0.06);
175
+
176
+ /* ----- FONT SIZES ----- */
177
+ --fd-text-xs: 0.75rem;
178
+ /* 12px */
179
+ --fd-text-sm: 0.875rem;
180
+ /* 14px */
181
+ --fd-text-base: 1rem;
182
+ /* 16px */
183
+ --fd-text-lg: 1.125rem;
184
+ /* 18px */
185
+ --fd-text-xl: 1.25rem;
186
+ /* 20px */
187
+ --fd-text-2xl: 1.5rem;
188
+ /* 24px */
189
+
190
+ /* ----- TRANSITIONS ----- */
191
+ --fd-transition-fast: 150ms ease;
192
+ --fd-transition-normal: 200ms ease;
193
+ --fd-transition-slow: 300ms ease;
194
+
195
+ /* =========================================================================
196
+ COMPONENT TOKENS
197
+ These provide fine-grained control while defaulting to semantic tokens
198
+ ========================================================================= */
199
+
200
+ /* ----- LAYOUT ----- */
201
+ --fd-sidebar-width: 320px;
202
+ --fd-navbar-height: 60px;
203
+ --fd-toolbar-height: 40px;
204
+
205
+ /* ----- NODE COLORS (for workflow editor) ----- */
206
+ --fd-node-emerald: #10b981;
207
+ --fd-node-blue: #2563eb;
208
+ --fd-node-amber: #f59e0b;
209
+ --fd-node-orange: #f97316;
210
+ --fd-node-red: #ef4444;
211
+ --fd-node-pink: #ec4899;
212
+ --fd-node-indigo: #6366f1;
213
+ --fd-node-teal: #14b8a6;
214
+ --fd-node-cyan: #06b6d4;
215
+ --fd-node-lime: #84cc16;
216
+ --fd-node-slate: #64748b;
217
+ --fd-node-purple: #9333ea;
218
+
219
+ /** Icon on node squircle: dark in light theme, white in dark theme */
220
+ --fd-node-icon: var(--_gray-9);
221
+
222
+ /* ----- EDGE TOKENS ----- */
223
+ --fd-edge-trigger: var(--_gray-9);
224
+ --fd-edge-trigger-hover: var(--_gray-9);
225
+ --fd-edge-trigger-selected: var(--_violet-2);
226
+ --fd-edge-trigger-width: 2px;
227
+ --fd-edge-trigger-width-hover: 3px;
228
+
229
+ --fd-edge-tool: var(--_amber-2);
230
+ --fd-edge-tool-hover: var(--_amber-3);
231
+ --fd-edge-tool-selected: var(--_violet-2);
232
+
233
+ --fd-edge-data: var(--_gray-5);
234
+ --fd-edge-data-hover: var(--_gray-6);
235
+ --fd-edge-data-selected: var(--_violet-2);
236
+
237
+ --fd-edge-loopback: var(--_gray-6);
238
+ --fd-edge-loopback-hover: var(--_gray-7);
239
+ --fd-edge-loopback-selected: var(--_violet-2);
240
+ --fd-edge-loopback-width: 1.5px;
241
+ --fd-edge-loopback-width-hover: 2.5px;
242
+ --fd-edge-loopback-dasharray: 5 5;
243
+ --fd-edge-loopback-opacity: 0.85;
244
+
245
+ /* ----- SCROLLBAR COLORS ----- */
246
+ --fd-scrollbar-thumb: var(--_gray-4);
247
+ --fd-scrollbar-thumb-hover: var(--_gray-5);
248
+ --fd-scrollbar-track: var(--_gray-2);
249
+
250
+ /* ----- BACKDROP/OVERLAY ----- */
251
+ --fd-backdrop: rgba(255, 255, 255, 0.8);
252
+ --fd-backdrop-blur: blur(8px);
253
+
254
+ /* ----- HANDLE (Node connection points) ----- */
255
+ /* White ring around handles for contrast against node backgrounds */
256
+ --fd-handle-border: #ffffff;
257
+
258
+ /* ----- LAYOUT BACKGROUND (Main content area gradient) ----- */
259
+ --fd-layout-background: linear-gradient(135deg, #f9fafb 0%, #e0e7ff 50%, #c7d2fe 100%);
260
+ }
261
+
262
+ /* =========================================================================
263
+ DARK MODE
264
+ Users enable with: <html data-theme="dark">
265
+ Designed for softer contrast and reduced eye strain
266
+ ========================================================================= */
267
+
268
+ [data-theme="dark"] {
269
+ /* ----- SURFACES (Backgrounds) - Softer contrast ----- */
270
+ --fd-background: #1a1a1e;
271
+ --fd-foreground: var(--_gray-2);
272
+ --fd-muted: #242428;
273
+ --fd-muted-foreground: var(--_gray-4);
274
+ --fd-subtle: #2a2a30;
275
+ --fd-card: #222226;
276
+ --fd-card-foreground: var(--_gray-2);
277
+
278
+ /* ----- HEADER (Distinct header styling for dark mode) ----- */
279
+ --fd-header: #1f1f24;
280
+ --fd-header-foreground: var(--_gray-3);
281
+ --fd-header-gradient: linear-gradient(180deg, #222228 0%, #1e1e24 100%);
282
+
283
+ /* ----- SURFACE TINT (Subtle accent for surfaces) ----- */
284
+ --fd-surface-tint: rgba(99, 102, 241, 0.03);
285
+
286
+ /* ----- HANDLE (Node connection points) ----- */
287
+ /* White ring around handles provides contrast on dark node backgrounds */
288
+ --fd-handle-border: rgba(255, 255, 255, 0.9);
289
+
290
+ /* ----- BORDERS - Subtle in dark mode for softer contrast ----- */
291
+ --fd-border: #3a3a40;
292
+ --fd-border-muted: #2e2e33;
293
+ --fd-border-strong: #4a4a52;
294
+
295
+ /* ----- NODE BORDERS (Higher contrast for visibility when zoomed out) ----- */
296
+ --fd-node-border: #4a4a52;
297
+ --fd-node-border-hover: #5a5a62;
298
+
299
+ /** Icon on node squircle: white in dark theme */
300
+ --fd-node-icon: #ffffff;
301
+
302
+ /* ----- PRIMARY (Interactive/Brand) ----- */
303
+ --fd-primary: #60a5fa;
304
+ --fd-primary-hover: #93c5fd;
305
+ --fd-primary-foreground: var(--_gray-9);
306
+ --fd-primary-muted: rgba(59, 130, 246, 0.12);
307
+
308
+ /* ----- SECONDARY ----- */
309
+ --fd-secondary: #2d2d32;
310
+ --fd-secondary-hover: #3a3a3f;
311
+ --fd-secondary-foreground: var(--_gray-2);
312
+
313
+ /* ----- ACCENT ----- */
314
+ --fd-accent: #a78bfa;
315
+ --fd-accent-hover: #c4b5fd;
316
+ --fd-accent-foreground: var(--_gray-9);
317
+ --fd-accent-muted: rgba(139, 92, 246, 0.12);
318
+
319
+ /* ----- STATUS: SUCCESS ----- */
320
+ --fd-success: #4ade80;
321
+ --fd-success-hover: #86efac;
322
+ --fd-success-foreground: var(--_gray-9);
323
+ --fd-success-muted: rgba(34, 197, 94, 0.12);
324
+
325
+ /* ----- STATUS: WARNING ----- */
326
+ --fd-warning: #fbbf24;
327
+ --fd-warning-hover: #fcd34d;
328
+ --fd-warning-foreground: var(--_gray-9);
329
+ --fd-warning-muted: rgba(245, 158, 11, 0.12);
330
+
331
+ /* ----- STATUS: ERROR/DESTRUCTIVE ----- */
332
+ --fd-error: #f87171;
333
+ --fd-error-hover: #fca5a5;
334
+ --fd-error-foreground: var(--_gray-9);
335
+ --fd-error-muted: rgba(239, 68, 68, 0.12);
336
+
337
+ /* ----- STATUS: INFO ----- */
338
+ --fd-info: #60a5fa;
339
+ --fd-info-foreground: var(--_gray-9);
340
+ --fd-info-muted: rgba(59, 130, 246, 0.12);
341
+
342
+ /* ----- SHADOWS (softer for dark mode) ----- */
343
+ --fd-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.2);
344
+ --fd-shadow-md: 0 4px 6px rgb(0 0 0 / 0.25);
345
+ --fd-shadow-lg: 0 10px 15px rgb(0 0 0 / 0.3);
346
+ --fd-shadow-xl: 0 20px 25px rgb(0 0 0 / 0.4);
347
+
348
+ /* ----- SCROLLBAR COLORS ----- */
349
+ --fd-scrollbar-thumb: var(--_gray-5);
350
+ --fd-scrollbar-thumb-hover: var(--_gray-4);
351
+ --fd-scrollbar-track: #242428;
352
+
353
+ /* ----- BACKDROP/OVERLAY ----- */
354
+ --fd-backdrop: rgba(26, 26, 30, 0.85);
355
+
356
+ /* ----- EDGE TOKENS (adjusted for dark mode visibility) ----- */
357
+ --fd-edge-trigger: var(--_gray-3);
358
+ --fd-edge-trigger-hover: var(--_gray-2);
359
+ --fd-edge-data: var(--_gray-5);
360
+ --fd-edge-data-hover: var(--_gray-4);
361
+ --fd-edge-loopback: var(--_gray-5);
362
+ --fd-edge-loopback-hover: var(--_gray-4);
363
+
364
+ /* ----- LAYOUT BACKGROUND (darker gradient for dark mode) ----- */
365
+ --fd-layout-background: linear-gradient(135deg, #141418 0%, #1a1a2e 50%, #16162a 100%);
366
+ }
@@ -151,6 +151,80 @@ export type NodeType = BuiltinNodeType | (string & Record<never, never>);
151
151
  * HTTP method types for dynamic schema endpoints
152
152
  */
153
153
  export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH';
154
+ /**
155
+ * Autocomplete configuration for form fields
156
+ *
157
+ * Defines how autocomplete suggestions are fetched from a callback URL.
158
+ * Supports both "on-type" (debounced search) and "on-focus" (load all options) modes.
159
+ *
160
+ * @example
161
+ * ```typescript
162
+ * const autocompleteConfig: AutocompleteConfig = {
163
+ * url: "/api/users/search",
164
+ * queryParam: "q",
165
+ * minChars: 2,
166
+ * debounceMs: 300,
167
+ * fetchOnFocus: true,
168
+ * labelField: "name",
169
+ * valueField: "id",
170
+ * allowFreeText: false
171
+ * };
172
+ * ```
173
+ */
174
+ export interface AutocompleteConfig {
175
+ /**
176
+ * The callback URL to fetch autocomplete suggestions from.
177
+ * Can be relative (resolved against API base URL) or absolute.
178
+ */
179
+ url: string;
180
+ /**
181
+ * Query parameter name to pass the search term.
182
+ * @default "q"
183
+ */
184
+ queryParam?: string;
185
+ /**
186
+ * Minimum number of characters before fetching suggestions.
187
+ * Set to 0 to fetch immediately on focus (when fetchOnFocus is true).
188
+ * @default 0
189
+ */
190
+ minChars?: number;
191
+ /**
192
+ * Debounce delay in milliseconds before fetching suggestions.
193
+ * Prevents excessive API calls while typing.
194
+ * @default 300
195
+ */
196
+ debounceMs?: number;
197
+ /**
198
+ * Whether to fetch all options when the field is focused.
199
+ * When true, an empty query is sent on focus to load initial options.
200
+ * @default false
201
+ */
202
+ fetchOnFocus?: boolean;
203
+ /**
204
+ * The field name in the response objects to use as the display label.
205
+ * @default "label"
206
+ */
207
+ labelField?: string;
208
+ /**
209
+ * The field name in the response objects to use as the stored value.
210
+ * @default "value"
211
+ */
212
+ valueField?: string;
213
+ /**
214
+ * Whether to allow values that are not in the suggestions list.
215
+ * When true, users can enter and submit any text.
216
+ * When false, only values from suggestions are accepted.
217
+ * @default false
218
+ */
219
+ allowFreeText?: boolean;
220
+ /**
221
+ * Whether to allow multiple selections.
222
+ * When true, users can select multiple values displayed as tags.
223
+ * When false, only a single value can be selected.
224
+ * @default false
225
+ */
226
+ multiple?: boolean;
227
+ }
154
228
  /**
155
229
  * Dynamic schema endpoint configuration
156
230
  * Used when the config schema needs to be fetched at runtime from a REST endpoint
@@ -807,3 +881,7 @@ export interface WorkflowEvents {
807
881
  error: string;
808
882
  };
809
883
  }
884
+ export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from './auth.js';
885
+ export { StaticAuthProvider, CallbackAuthProvider, NoAuthProvider } from './auth.js';
886
+ export type { FlowDropSettings, ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, ThemePreference, ResolvedTheme, SettingsCategory, PartialSettings, SyncStatus, SettingsStoreState, SettingsChangeEvent, SettingsChangeCallback } from './settings.js';
887
+ export { DEFAULT_SETTINGS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, SETTINGS_STORAGE_KEY } from './settings.js';
@@ -18,3 +18,5 @@ export function dynamicPortToNodePort(port, portType) {
18
18
  description: port.description
19
19
  };
20
20
  }
21
+ export { StaticAuthProvider, CallbackAuthProvider, NoAuthProvider } from './auth.js';
22
+ export { DEFAULT_SETTINGS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, SETTINGS_STORAGE_KEY } from './settings.js';
@@ -219,6 +219,18 @@ export interface PlaygroundConfig {
219
219
  * Note: Only runs once per session - subsequent runs require clicking the Run button.
220
220
  */
221
221
  autoRun?: boolean;
222
+ /**
223
+ * Whether to show the sidebar with session list (default: true)
224
+ * When false, the sidebar is hidden, creating a minimal chat widget experience.
225
+ * Use with initialSessionId to load a pre-created session directly.
226
+ */
227
+ showSidebar?: boolean;
228
+ /**
229
+ * Whether to show the session header bar (default: true)
230
+ * When false, the header with session name and close button is hidden.
231
+ * Typically used together with showSidebar: false for minimal UI.
232
+ */
233
+ showSessionHeader?: boolean;
222
234
  }
223
235
  /**
224
236
  * Metadata field to control Run button state from backend.
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Settings Types for FlowDrop
3
+ *
4
+ * Provides comprehensive type definitions for all user-configurable settings.
5
+ * Supports theme, editor, UI, behavior, and API settings with hybrid persistence.
6
+ *
7
+ * @module types/settings
8
+ */
9
+ /**
10
+ * Theme preference options
11
+ * - 'light': Force light theme
12
+ * - 'dark': Force dark theme
13
+ * - 'auto': Follow system preference
14
+ */
15
+ export type ThemePreference = "light" | "dark" | "auto";
16
+ /**
17
+ * Resolved theme (actual applied theme, never 'auto')
18
+ */
19
+ export type ResolvedTheme = "light" | "dark";
20
+ /**
21
+ * Theme-related settings
22
+ */
23
+ export interface ThemeSettings {
24
+ /** User's theme preference */
25
+ preference: ThemePreference;
26
+ }
27
+ /**
28
+ * Editor canvas and interaction settings
29
+ */
30
+ export interface EditorSettings {
31
+ /** Show grid lines on the canvas */
32
+ showGrid: boolean;
33
+ /** Snap nodes to grid when dragging */
34
+ snapToGrid: boolean;
35
+ /** Grid cell size in pixels */
36
+ gridSize: number;
37
+ /** Show minimap for navigation */
38
+ showMinimap: boolean;
39
+ /** Default zoom level (1 = 100%) */
40
+ defaultZoom: number;
41
+ /** Automatically fit workflow to view on load */
42
+ fitViewOnLoad: boolean;
43
+ }
44
+ /**
45
+ * UI layout and display settings
46
+ */
47
+ export interface UISettings {
48
+ /** Width of the node sidebar in pixels */
49
+ sidebarWidth: number;
50
+ /** Whether the sidebar is collapsed */
51
+ sidebarCollapsed: boolean;
52
+ /** Enable compact mode for denser UI */
53
+ compactMode: boolean;
54
+ }
55
+ /**
56
+ * Application behavior and automation settings
57
+ */
58
+ export interface BehaviorSettings {
59
+ /** Automatically save changes */
60
+ autoSave: boolean;
61
+ /** Auto-save interval in milliseconds */
62
+ autoSaveInterval: number;
63
+ /** Maximum number of undo history entries */
64
+ undoHistoryLimit: number;
65
+ /** Show confirmation dialog before deleting nodes */
66
+ confirmDelete: boolean;
67
+ }
68
+ /**
69
+ * API connection and request settings
70
+ */
71
+ export interface ApiSettings {
72
+ /** Request timeout in milliseconds */
73
+ timeout: number;
74
+ /** Enable automatic retry on failure */
75
+ retryEnabled: boolean;
76
+ /** Maximum number of retry attempts */
77
+ retryAttempts: number;
78
+ /** Enable response caching */
79
+ cacheEnabled: boolean;
80
+ }
81
+ /**
82
+ * All FlowDrop settings organized by category
83
+ */
84
+ export interface FlowDropSettings {
85
+ /** Theme appearance settings */
86
+ theme: ThemeSettings;
87
+ /** Editor canvas settings */
88
+ editor: EditorSettings;
89
+ /** UI layout settings */
90
+ ui: UISettings;
91
+ /** Application behavior settings */
92
+ behavior: BehaviorSettings;
93
+ /** API connection settings */
94
+ api: ApiSettings;
95
+ }
96
+ /**
97
+ * Settings category names for iteration and tab rendering
98
+ */
99
+ export type SettingsCategory = keyof FlowDropSettings;
100
+ /**
101
+ * All available settings categories
102
+ */
103
+ export declare const SETTINGS_CATEGORIES: SettingsCategory[];
104
+ /**
105
+ * Human-readable labels for settings categories
106
+ */
107
+ export declare const SETTINGS_CATEGORY_LABELS: Record<SettingsCategory, string>;
108
+ /**
109
+ * Icons for settings categories (Iconify icon names)
110
+ */
111
+ export declare const SETTINGS_CATEGORY_ICONS: Record<SettingsCategory, string>;
112
+ /**
113
+ * Default theme settings
114
+ */
115
+ export declare const DEFAULT_THEME_SETTINGS: ThemeSettings;
116
+ /**
117
+ * Default editor settings
118
+ */
119
+ export declare const DEFAULT_EDITOR_SETTINGS: EditorSettings;
120
+ /**
121
+ * Default UI settings
122
+ */
123
+ export declare const DEFAULT_UI_SETTINGS: UISettings;
124
+ /**
125
+ * Default behavior settings
126
+ */
127
+ export declare const DEFAULT_BEHAVIOR_SETTINGS: BehaviorSettings;
128
+ /**
129
+ * Default API settings
130
+ */
131
+ export declare const DEFAULT_API_SETTINGS: ApiSettings;
132
+ /**
133
+ * Complete default settings object
134
+ */
135
+ export declare const DEFAULT_SETTINGS: FlowDropSettings;
136
+ /**
137
+ * Deep partial type for nested settings updates
138
+ */
139
+ export type DeepPartial<T> = {
140
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
141
+ };
142
+ /**
143
+ * Partial settings for incremental updates
144
+ */
145
+ export type PartialSettings = DeepPartial<FlowDropSettings>;
146
+ /**
147
+ * Event payload for settings changes
148
+ */
149
+ export interface SettingsChangeEvent {
150
+ /** The category that changed */
151
+ category: SettingsCategory;
152
+ /** The key within the category that changed */
153
+ key: string;
154
+ /** The previous value */
155
+ previousValue: unknown;
156
+ /** The new value */
157
+ newValue: unknown;
158
+ }
159
+ /**
160
+ * Callback type for settings change listeners
161
+ */
162
+ export type SettingsChangeCallback = (event: SettingsChangeEvent) => void;
163
+ /**
164
+ * localStorage key for persisting settings
165
+ */
166
+ export declare const SETTINGS_STORAGE_KEY = "flowdrop-settings";
167
+ /**
168
+ * API sync status
169
+ */
170
+ export type SyncStatus = "idle" | "syncing" | "synced" | "error";
171
+ /**
172
+ * Settings store state including sync metadata
173
+ */
174
+ export interface SettingsStoreState {
175
+ /** Current settings values */
176
+ settings: FlowDropSettings;
177
+ /** Whether settings have been loaded from storage */
178
+ initialized: boolean;
179
+ /** API sync status */
180
+ syncStatus: SyncStatus;
181
+ /** Last sync timestamp */
182
+ lastSyncedAt: number | null;
183
+ /** Last sync error message */
184
+ syncError: string | null;
185
+ }