@d34dman/flowdrop 0.0.62 → 0.0.64
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/README.md +2 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.js +1 -40
- package/dist/api/enhanced-client.d.ts +19 -0
- package/dist/api/enhanced-client.js +9 -0
- package/dist/components/App.svelte +31 -35
- package/dist/components/CanvasBanner.stories.svelte +12 -8
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +35 -26
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +13 -13
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +4 -4
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +25 -10
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.stories.svelte +42 -30
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +6 -3
- package/dist/components/NodeStatusOverlay.stories.svelte +61 -50
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/PipelineStatus.svelte +9 -12
- package/dist/components/PipelineStatus.svelte.d.ts +2 -2
- package/dist/components/SchemaForm.stories.svelte +97 -82
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +6 -2
- package/dist/components/SettingsPanel.svelte +5 -1
- package/dist/components/StatusIcon.stories.svelte +15 -15
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusLabel.stories.svelte +8 -8
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.stories.svelte +10 -10
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +23 -9
- package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -13
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormField.svelte +2 -2
- package/dist/components/form/FormFieldLight.svelte +4 -4
- package/dist/components/form/FormFieldWrapper.stories.svelte +38 -16
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.stories.svelte +21 -18
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.stories.svelte +13 -13
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.stories.svelte +21 -21
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +0 -13
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -7
- package/dist/components/form/FormTextField.stories.svelte +17 -17
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.stories.svelte +21 -18
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.stories.svelte +13 -13
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -1
- package/dist/components/form/index.js +1 -2
- package/dist/components/form/types.d.ts +8 -20
- package/dist/components/form/types.js +3 -8
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +37 -28
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +57 -35
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +52 -31
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +42 -25
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +32 -19
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.stories.svelte +96 -64
- package/dist/components/nodes/IdeaNode.stories.svelte +40 -36
- package/dist/components/nodes/NotesNode.stories.svelte +61 -54
- package/dist/components/nodes/SimpleNode.stories.svelte +141 -83
- package/dist/components/nodes/SquareNode.stories.svelte +70 -44
- package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
- package/dist/components/nodes/TerminalNode.svelte +7 -3
- package/dist/components/nodes/ToolNode.stories.svelte +177 -59
- package/dist/components/nodes/WorkflowNode.stories.svelte +43 -38
- package/dist/components/playground/MessageBubble.stories.svelte +51 -38
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +1 -4
- package/dist/config/constants.d.ts +21 -0
- package/dist/config/constants.js +9 -0
- package/dist/core/index.d.ts +7 -5
- package/dist/core/index.js +5 -5
- package/dist/editor/index.d.ts +4 -4
- package/dist/editor/index.js +3 -4
- package/dist/form/code.js +16 -4
- package/dist/form/fieldRegistry.d.ts +8 -82
- package/dist/form/fieldRegistry.js +9 -101
- package/dist/form/full.d.ts +4 -1
- package/dist/form/full.js +6 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +0 -2
- package/dist/form/markdown.js +11 -3
- package/dist/helpers/workflowEditorHelper.d.ts +0 -3
- package/dist/helpers/workflowEditorHelper.js +12 -50
- package/dist/index.js +3 -0
- package/dist/schemas/v1/workflow.schema.json +950 -1076
- package/dist/services/apiVariableService.d.ts +1 -3
- package/dist/services/apiVariableService.js +3 -4
- package/dist/services/dynamicSchemaService.js +3 -4
- package/dist/stories/CanvasDecorator.svelte +7 -8
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/NodeDecorator.svelte +13 -14
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +55 -55
- package/dist/styles/base.css +12 -4
- package/dist/styles/tokens.css +138 -130
- package/dist/types/interrupt.d.ts +1 -4
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.js +44 -0
- package/dist/utils/handleIds.d.ts +35 -0
- package/dist/utils/handleIds.js +58 -0
- package/package.json +53 -12
- package/dist/api/client.d.ts +0 -110
- package/dist/api/client.js +0 -240
package/dist/styles/tokens.css
CHANGED
|
@@ -119,97 +119,97 @@
|
|
|
119
119
|
========================================================================= */
|
|
120
120
|
|
|
121
121
|
/* ----- SURFACES (Backgrounds) ----- */
|
|
122
|
-
--fd-background: #ffffff;
|
|
123
|
-
--fd-foreground: var(--_gray-9);
|
|
124
|
-
--fd-muted: #f8f8fb;
|
|
122
|
+
--fd-background: #ffffff; /* @public */
|
|
123
|
+
--fd-foreground: var(--_gray-9); /* @public */
|
|
124
|
+
--fd-muted: #f8f8fb; /* @public */
|
|
125
125
|
--fd-muted-foreground: var(--_gray-6); /* @public */
|
|
126
|
-
--fd-subtle: #f0f0f5;
|
|
127
|
-
--fd-card: #ffffff;
|
|
128
|
-
--fd-card-foreground: var(--_gray-9);
|
|
126
|
+
--fd-subtle: #f0f0f5; /* @public */
|
|
127
|
+
--fd-card: #ffffff; /* @public */
|
|
128
|
+
--fd-card-foreground: var(--_gray-9); /* @public */
|
|
129
129
|
|
|
130
130
|
/* ----- HEADER (Distinct header styling) ----- */
|
|
131
|
-
--fd-header: #f5f7fa;
|
|
132
|
-
--fd-header-foreground: var(--_gray-8);
|
|
131
|
+
--fd-header: #f5f7fa; /* @public */
|
|
132
|
+
--fd-header-foreground: var(--_gray-8); /* @public */
|
|
133
133
|
--fd-header-gradient: linear-gradient(180deg, #f8f9fc 0%, #f4f5f8 100%); /* @public */
|
|
134
134
|
|
|
135
135
|
/* ----- SURFACE TINT (Subtle accent for surfaces) ----- */
|
|
136
136
|
--fd-surface-tint: rgba(99, 102, 241, 0.02); /* @public */
|
|
137
137
|
|
|
138
138
|
/* ----- BORDERS ----- */
|
|
139
|
-
--fd-border: var(--_gray-4);
|
|
140
|
-
--fd-border-muted: var(--_gray-3);
|
|
139
|
+
--fd-border: var(--_gray-4); /* @public */
|
|
140
|
+
--fd-border-muted: var(--_gray-3); /* @public */
|
|
141
141
|
--fd-border-strong: var(--_gray-5); /* @public */
|
|
142
|
-
--fd-ring: var(--_blue-2);
|
|
142
|
+
--fd-ring: var(--_blue-2); /* @public */
|
|
143
143
|
|
|
144
144
|
/* ----- NODE BORDERS (Higher contrast for visibility when zoomed out) ----- */
|
|
145
|
-
--fd-node-border: var(--_gray-5);
|
|
145
|
+
--fd-node-border: var(--_gray-5); /* @public */
|
|
146
146
|
--fd-node-border-hover: var(--_gray-6); /* @public */
|
|
147
147
|
|
|
148
148
|
/* ----- PRIMARY (Interactive/Brand) ----- */
|
|
149
|
-
--fd-primary: var(--_blue-2);
|
|
150
|
-
--fd-primary-hover: var(--_blue-3);
|
|
151
|
-
--fd-primary-foreground: #ffffff;
|
|
152
|
-
--fd-primary-muted: var(--_blue-1);
|
|
149
|
+
--fd-primary: var(--_blue-2); /* @public */
|
|
150
|
+
--fd-primary-hover: var(--_blue-3); /* @public */
|
|
151
|
+
--fd-primary-foreground: #ffffff; /* @public */
|
|
152
|
+
--fd-primary-muted: var(--_blue-1); /* @public */
|
|
153
153
|
|
|
154
154
|
/* ----- SECONDARY ----- */
|
|
155
|
-
--fd-secondary: var(--_gray-2);
|
|
156
|
-
--fd-secondary-hover: var(--_gray-3);
|
|
155
|
+
--fd-secondary: var(--_gray-2); /* @public */
|
|
156
|
+
--fd-secondary-hover: var(--_gray-3); /* @public */
|
|
157
157
|
--fd-secondary-foreground: var(--_gray-9); /* @public */
|
|
158
158
|
|
|
159
159
|
/* ----- ACCENT ----- */
|
|
160
|
-
--fd-accent: var(--_violet-2);
|
|
161
|
-
--fd-accent-hover: var(--_violet-3);
|
|
162
|
-
--fd-accent-foreground: #ffffff;
|
|
163
|
-
--fd-accent-muted: var(--_violet-1);
|
|
160
|
+
--fd-accent: var(--_violet-2); /* @public */
|
|
161
|
+
--fd-accent-hover: var(--_violet-3); /* @public */
|
|
162
|
+
--fd-accent-foreground: #ffffff; /* @public */
|
|
163
|
+
--fd-accent-muted: var(--_violet-1); /* @public */
|
|
164
164
|
|
|
165
165
|
/* ----- STATUS: SUCCESS ----- */
|
|
166
|
-
--fd-success: var(--_green-2);
|
|
167
|
-
--fd-success-hover: var(--_green-3);
|
|
168
|
-
--fd-success-foreground: #ffffff;
|
|
169
|
-
--fd-success-muted: var(--_green-1);
|
|
166
|
+
--fd-success: var(--_green-2); /* @public */
|
|
167
|
+
--fd-success-hover: var(--_green-3); /* @public */
|
|
168
|
+
--fd-success-foreground: #ffffff; /* @public */
|
|
169
|
+
--fd-success-muted: var(--_green-1); /* @public */
|
|
170
170
|
|
|
171
171
|
/* ----- STATUS: WARNING ----- */
|
|
172
|
-
--fd-warning: var(--_amber-2);
|
|
173
|
-
--fd-warning-hover: var(--_amber-3);
|
|
174
|
-
--fd-warning-foreground: var(--_gray-9);
|
|
175
|
-
--fd-warning-muted: var(--_amber-1);
|
|
172
|
+
--fd-warning: var(--_amber-2); /* @public */
|
|
173
|
+
--fd-warning-hover: var(--_amber-3); /* @public */
|
|
174
|
+
--fd-warning-foreground: var(--_gray-9); /* @public */
|
|
175
|
+
--fd-warning-muted: var(--_amber-1); /* @public */
|
|
176
176
|
|
|
177
177
|
/* ----- STATUS: ERROR/DESTRUCTIVE ----- */
|
|
178
|
-
--fd-error: var(--_red-2);
|
|
179
|
-
--fd-error-hover: var(--_red-3);
|
|
180
|
-
--fd-error-foreground: #ffffff;
|
|
181
|
-
--fd-error-muted: var(--_red-1);
|
|
178
|
+
--fd-error: var(--_red-2); /* @public */
|
|
179
|
+
--fd-error-hover: var(--_red-3); /* @public */
|
|
180
|
+
--fd-error-foreground: #ffffff; /* @public */
|
|
181
|
+
--fd-error-muted: var(--_red-1); /* @public */
|
|
182
182
|
|
|
183
183
|
/* ----- STATUS: INFO ----- */
|
|
184
|
-
--fd-info: var(--_blue-2);
|
|
185
|
-
--fd-info-hover: var(--_blue-3);
|
|
186
|
-
--fd-info-foreground: #ffffff;
|
|
187
|
-
--fd-info-muted: var(--_blue-1);
|
|
184
|
+
--fd-info: var(--_blue-2); /* @public */
|
|
185
|
+
--fd-info-hover: var(--_blue-3); /* @public */
|
|
186
|
+
--fd-info-foreground: #ffffff; /* @public */
|
|
187
|
+
--fd-info-muted: var(--_blue-1); /* @public */
|
|
188
188
|
|
|
189
189
|
/* ----- SPACING SCALE (Named sizes) ----- */
|
|
190
|
-
--fd-space-0: 0;
|
|
191
|
-
--fd-space-3xs: 0.25rem;
|
|
192
|
-
--fd-space-2xs: 0.375rem;
|
|
193
|
-
--fd-space-xs: 0.5rem;
|
|
194
|
-
--fd-space-sm: 0.625rem;
|
|
195
|
-
--fd-space-md: 0.75rem;
|
|
196
|
-
--fd-space-lg: 0.875rem;
|
|
197
|
-
--fd-space-xl: 1rem;
|
|
198
|
-
--fd-space-2xl: 1.25rem;
|
|
199
|
-
--fd-space-3xl: 1.5rem;
|
|
200
|
-
--fd-space-4xl: 2rem;
|
|
201
|
-
--fd-space-5xl: 2.5rem;
|
|
202
|
-
--fd-space-6xl: 3rem;
|
|
203
|
-
--fd-space-7xl: 4rem;
|
|
190
|
+
--fd-space-0: 0; /* @public */
|
|
191
|
+
--fd-space-3xs: 0.25rem; /* @public 4px */
|
|
192
|
+
--fd-space-2xs: 0.375rem; /* @public 6px */
|
|
193
|
+
--fd-space-xs: 0.5rem; /* @public 8px */
|
|
194
|
+
--fd-space-sm: 0.625rem; /* @public 10px */
|
|
195
|
+
--fd-space-md: 0.75rem; /* @public 12px */
|
|
196
|
+
--fd-space-lg: 0.875rem; /* @public 14px */
|
|
197
|
+
--fd-space-xl: 1rem; /* @public 16px */
|
|
198
|
+
--fd-space-2xl: 1.25rem; /* @public 20px */
|
|
199
|
+
--fd-space-3xl: 1.5rem; /* @public 24px */
|
|
200
|
+
--fd-space-4xl: 2rem; /* @public 32px */
|
|
201
|
+
--fd-space-5xl: 2.5rem; /* @public 40px */
|
|
202
|
+
--fd-space-6xl: 3rem; /* @public 48px */
|
|
203
|
+
--fd-space-7xl: 4rem; /* @public 64px */
|
|
204
204
|
|
|
205
205
|
/* ----- BORDER RADIUS ----- */
|
|
206
|
-
--fd-radius-none: 0;
|
|
207
|
-
--fd-radius-sm: 0.25rem;
|
|
208
|
-
--fd-radius-md: 0.375rem;
|
|
209
|
-
--fd-radius-lg: 0.5rem;
|
|
210
|
-
--fd-radius-xl: 0.75rem;
|
|
211
|
-
--fd-radius-2xl: 1rem;
|
|
212
|
-
--fd-radius-full: 9999px;
|
|
206
|
+
--fd-radius-none: 0; /* @public */
|
|
207
|
+
--fd-radius-sm: 0.25rem; /* @public 4px */
|
|
208
|
+
--fd-radius-md: 0.375rem; /* @public 6px */
|
|
209
|
+
--fd-radius-lg: 0.5rem; /* @public 8px */
|
|
210
|
+
--fd-radius-xl: 0.75rem; /* @public 12px */
|
|
211
|
+
--fd-radius-2xl: 1rem; /* @public 16px */
|
|
212
|
+
--fd-radius-full: 9999px; /* @public */
|
|
213
213
|
|
|
214
214
|
/* ----- SHADOWS (Refined layered shadows for modern depth) ----- */
|
|
215
215
|
--fd-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.06); /* @public */
|
|
@@ -218,34 +218,35 @@
|
|
|
218
218
|
--fd-shadow-xl: 0 20px 30px rgb(0 0 0 / 0.1), 0 8px 16px rgb(0 0 0 / 0.06); /* @public */
|
|
219
219
|
|
|
220
220
|
/* ----- FONT SIZES ----- */
|
|
221
|
-
--fd-text-2xs: 0.6875rem;
|
|
222
|
-
--fd-text-xs: 0.75rem;
|
|
223
|
-
--fd-text-xsm: 0.8125rem;
|
|
224
|
-
--fd-text-sm: 0.875rem;
|
|
225
|
-
--fd-text-md: 0.9375rem;
|
|
226
|
-
--fd-text-base: 1rem;
|
|
227
|
-
--fd-text-lg: 1.125rem;
|
|
228
|
-
--fd-text-xl: 1.25rem;
|
|
229
|
-
--fd-text-2xl: 1.5rem;
|
|
221
|
+
--fd-text-2xs: 0.6875rem; /* @public 11px */
|
|
222
|
+
--fd-text-xs: 0.75rem; /* @public 12px */
|
|
223
|
+
--fd-text-xsm: 0.8125rem; /* @public 13px */
|
|
224
|
+
--fd-text-sm: 0.875rem; /* @public 14px */
|
|
225
|
+
--fd-text-md: 0.9375rem; /* @public 15px */
|
|
226
|
+
--fd-text-base: 1rem; /* @public 16px */
|
|
227
|
+
--fd-text-lg: 1.125rem; /* @public 18px */
|
|
228
|
+
--fd-text-xl: 1.25rem; /* @public 20px */
|
|
229
|
+
--fd-text-2xl: 1.5rem; /* @public 24px */
|
|
230
230
|
|
|
231
231
|
/* ----- LINE HEIGHTS ----- */
|
|
232
|
-
--fd-leading-tight: 1.4;
|
|
233
|
-
--fd-leading-normal: 1.5;
|
|
234
|
-
--fd-leading-relaxed: 1.6;
|
|
232
|
+
--fd-leading-tight: 1.4; /* @public */
|
|
233
|
+
--fd-leading-normal: 1.5; /* @public */
|
|
234
|
+
--fd-leading-relaxed: 1.6; /* @public */
|
|
235
235
|
|
|
236
236
|
/* ----- FONT FAMILIES ----- */
|
|
237
|
-
--fd-font-mono:
|
|
237
|
+
--fd-font-mono:
|
|
238
|
+
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; /* @public */
|
|
238
239
|
|
|
239
240
|
/* ----- COMPONENT SIZES ----- */
|
|
240
|
-
--fd-size-icon-btn: 1.75rem;
|
|
241
|
-
--fd-size-btn-min: 2.5rem;
|
|
242
|
-
--fd-size-avatar: 2.25rem;
|
|
243
|
-
--fd-size-spinner: 1rem;
|
|
241
|
+
--fd-size-icon-btn: 1.75rem; /* @internal 28px — may change with component redesigns */
|
|
242
|
+
--fd-size-btn-min: 2.5rem; /* @internal 40px — may change with component redesigns */
|
|
243
|
+
--fd-size-avatar: 2.25rem; /* @internal 36px — may change with component redesigns */
|
|
244
|
+
--fd-size-spinner: 1rem; /* @internal 16px — may change with component redesigns */
|
|
244
245
|
|
|
245
246
|
/* ----- TRANSITIONS ----- */
|
|
246
|
-
--fd-transition-fast: 150ms ease;
|
|
247
|
-
--fd-transition-normal: 200ms ease;
|
|
248
|
-
--fd-transition-slow: 300ms ease;
|
|
247
|
+
--fd-transition-fast: 150ms ease; /* @public */
|
|
248
|
+
--fd-transition-normal: 200ms ease; /* @public */
|
|
249
|
+
--fd-transition-slow: 300ms ease; /* @public */
|
|
249
250
|
|
|
250
251
|
/* =========================================================================
|
|
251
252
|
COMPONENT TOKENS
|
|
@@ -255,85 +256,92 @@
|
|
|
255
256
|
========================================================================= */
|
|
256
257
|
|
|
257
258
|
/* ----- LAYOUT ----- */
|
|
258
|
-
--fd-sidebar-width: 320px;
|
|
259
|
-
--fd-navbar-height: 60px;
|
|
260
|
-
--fd-toolbar-height: 40px;
|
|
259
|
+
--fd-sidebar-width: 320px; /* @internal — controlled programmatically */
|
|
260
|
+
--fd-navbar-height: 60px; /* @internal — controlled programmatically */
|
|
261
|
+
--fd-toolbar-height: 40px; /* @internal — controlled programmatically */
|
|
261
262
|
|
|
262
263
|
/* ----- NODE COLORS (for workflow editor) ----- */
|
|
263
264
|
--fd-node-emerald: #10b981; /* @public */
|
|
264
|
-
--fd-node-blue: #2563eb;
|
|
265
|
-
--fd-node-amber: #f59e0b;
|
|
266
|
-
--fd-node-orange: #f97316;
|
|
267
|
-
--fd-node-red: #ef4444;
|
|
268
|
-
--fd-node-pink: #ec4899;
|
|
269
|
-
--fd-node-indigo: #6366f1;
|
|
270
|
-
--fd-node-teal: #14b8a6;
|
|
271
|
-
--fd-node-cyan: #06b6d4;
|
|
272
|
-
--fd-node-lime: #84cc16;
|
|
273
|
-
--fd-node-slate: #64748b;
|
|
274
|
-
--fd-node-purple: #9333ea;
|
|
265
|
+
--fd-node-blue: #2563eb; /* @public */
|
|
266
|
+
--fd-node-amber: #f59e0b; /* @public */
|
|
267
|
+
--fd-node-orange: #f97316; /* @public */
|
|
268
|
+
--fd-node-red: #ef4444; /* @public */
|
|
269
|
+
--fd-node-pink: #ec4899; /* @public */
|
|
270
|
+
--fd-node-indigo: #6366f1; /* @public */
|
|
271
|
+
--fd-node-teal: #14b8a6; /* @public */
|
|
272
|
+
--fd-node-cyan: #06b6d4; /* @public */
|
|
273
|
+
--fd-node-lime: #84cc16; /* @public */
|
|
274
|
+
--fd-node-slate: #64748b; /* @public */
|
|
275
|
+
--fd-node-purple: #9333ea; /* @public */
|
|
275
276
|
|
|
276
277
|
/** Icon on node squircle: dark in light theme, white in dark theme */
|
|
277
278
|
--fd-node-icon: var(--_gray-9); /* @public */
|
|
278
279
|
/** Opacity of the icon squircle background (color-mix percentage). Light mode: 15% / 22% hover; dark mode uses higher values. */
|
|
279
|
-
--fd-node-icon-bg-opacity: 20%;
|
|
280
|
+
--fd-node-icon-bg-opacity: 20%; /* @public */
|
|
280
281
|
--fd-node-icon-bg-opacity-hover: 50%; /* @public */
|
|
281
282
|
|
|
282
283
|
/* ----- EDGE TOKENS ----- */
|
|
283
|
-
--fd-edge-trigger: var(--_gray-9);
|
|
284
|
-
--fd-edge-trigger-hover: var(--_gray-9);
|
|
284
|
+
--fd-edge-trigger: var(--_gray-9); /* @public */
|
|
285
|
+
--fd-edge-trigger-hover: var(--_gray-9); /* @public */
|
|
285
286
|
--fd-edge-trigger-selected: var(--_violet-2); /* @public */
|
|
286
|
-
--fd-edge-trigger-width: 2px;
|
|
287
|
-
--fd-edge-trigger-width-hover: 3px;
|
|
287
|
+
--fd-edge-trigger-width: 2px; /* @public */
|
|
288
|
+
--fd-edge-trigger-width-hover: 3px; /* @public */
|
|
288
289
|
|
|
289
|
-
--fd-edge-tool: var(--_amber-2);
|
|
290
|
-
--fd-edge-tool-hover: var(--_amber-3);
|
|
291
|
-
--fd-edge-tool-selected: var(--_violet-2);
|
|
290
|
+
--fd-edge-tool: var(--_amber-2); /* @public */
|
|
291
|
+
--fd-edge-tool-hover: var(--_amber-3); /* @public */
|
|
292
|
+
--fd-edge-tool-selected: var(--_violet-2); /* @public */
|
|
292
293
|
|
|
293
|
-
--fd-edge-data: var(--_gray-5);
|
|
294
|
-
--fd-edge-data-hover: var(--_gray-6);
|
|
295
|
-
--fd-edge-data-selected: var(--_violet-2);
|
|
294
|
+
--fd-edge-data: var(--_gray-5); /* @public */
|
|
295
|
+
--fd-edge-data-hover: var(--_gray-6); /* @public */
|
|
296
|
+
--fd-edge-data-selected: var(--_violet-2); /* @public */
|
|
296
297
|
|
|
297
|
-
--fd-edge-loopback: var(--_gray-6);
|
|
298
|
-
--fd-edge-loopback-hover: var(--_gray-7);
|
|
299
|
-
--fd-edge-loopback-selected: var(--_violet-2);
|
|
300
|
-
--fd-edge-loopback-width: 1.5px;
|
|
301
|
-
--fd-edge-loopback-width-hover: 2.5px;
|
|
302
|
-
--fd-edge-loopback-dasharray: 5 5;
|
|
303
|
-
--fd-edge-loopback-opacity: 0.85;
|
|
298
|
+
--fd-edge-loopback: var(--_gray-6); /* @public */
|
|
299
|
+
--fd-edge-loopback-hover: var(--_gray-7); /* @public */
|
|
300
|
+
--fd-edge-loopback-selected: var(--_violet-2); /* @public */
|
|
301
|
+
--fd-edge-loopback-width: 1.5px; /* @public */
|
|
302
|
+
--fd-edge-loopback-width-hover: 2.5px; /* @public */
|
|
303
|
+
--fd-edge-loopback-dasharray: 5 5; /* @public */
|
|
304
|
+
--fd-edge-loopback-opacity: 0.85; /* @public */
|
|
304
305
|
|
|
305
306
|
/* ----- SCROLLBAR COLORS ----- */
|
|
306
|
-
--fd-scrollbar-thumb: var(--_gray-4);
|
|
307
|
+
--fd-scrollbar-thumb: var(--_gray-4); /* @internal */
|
|
307
308
|
--fd-scrollbar-thumb-hover: var(--_gray-5); /* @internal */
|
|
308
|
-
--fd-scrollbar-track: var(--_gray-2);
|
|
309
|
+
--fd-scrollbar-track: var(--_gray-2); /* @internal */
|
|
309
310
|
|
|
310
311
|
/* ----- BACKDROP/OVERLAY ----- */
|
|
311
312
|
--fd-backdrop: rgba(255, 255, 255, 0.8); /* @internal */
|
|
312
|
-
--fd-backdrop-blur: blur(8px);
|
|
313
|
+
--fd-backdrop-blur: blur(8px); /* @internal */
|
|
313
314
|
|
|
314
315
|
/* ----- HANDLE (Node connection points) ----- */
|
|
315
316
|
/* White ring around handles for contrast against node backgrounds */
|
|
316
|
-
--fd-handle-border: #ffffff;
|
|
317
|
+
--fd-handle-border: #ffffff; /* @public */
|
|
317
318
|
/* Outer size = connection/hit area (px); visual = visible circle (px) */
|
|
318
|
-
--fd-handle-size: 20px;
|
|
319
|
-
--fd-handle-visual-size: 12px;
|
|
320
|
-
--fd-handle-offset: calc(
|
|
319
|
+
--fd-handle-size: 20px; /* @public */
|
|
320
|
+
--fd-handle-visual-size: 12px; /* @public */
|
|
321
|
+
--fd-handle-offset: calc(
|
|
322
|
+
-1 * var(--fd-handle-size) / 2
|
|
323
|
+
); /* @internal — half handle size for edge positioning */
|
|
321
324
|
|
|
322
325
|
/* ----- NODE LAYOUT (Dimensions and port alignment; multiples of 10 for grid) ----- */
|
|
323
|
-
--fd-node-grid-step: 10;
|
|
324
|
-
--fd-node-default-width: 290px;
|
|
325
|
-
--fd-node-header-height: 60px;
|
|
326
|
-
--fd-node-header-title-height: 40px;
|
|
327
|
-
--fd-node-header-desc-line: 20px;
|
|
328
|
-
--fd-node-header-gap: 10px;
|
|
329
|
-
--fd-node-port-row-height: 20px;
|
|
330
|
-
--fd-node-terminal-size: 80px;
|
|
331
|
-
--fd-node-square-size: 80px;
|
|
332
|
-
--fd-node-simple-height: 80px;
|
|
333
|
-
--fd-node-tool-min-height: 80px;
|
|
326
|
+
--fd-node-grid-step: 10; /* @internal — layout algorithm detail */
|
|
327
|
+
--fd-node-default-width: 290px; /* @public */
|
|
328
|
+
--fd-node-header-height: 60px; /* @public */
|
|
329
|
+
--fd-node-header-title-height: 40px; /* @internal */
|
|
330
|
+
--fd-node-header-desc-line: 20px; /* @internal */
|
|
331
|
+
--fd-node-header-gap: 10px; /* @internal */
|
|
332
|
+
--fd-node-port-row-height: 20px; /* @internal */
|
|
333
|
+
--fd-node-terminal-size: 80px; /* @public */
|
|
334
|
+
--fd-node-square-size: 80px; /* @public */
|
|
335
|
+
--fd-node-simple-height: 80px; /* @public */
|
|
336
|
+
--fd-node-tool-min-height: 80px; /* @public */
|
|
334
337
|
|
|
335
338
|
/* ----- LAYOUT BACKGROUND (Main content area gradient) ----- */
|
|
336
|
-
--fd-layout-background: linear-gradient(
|
|
339
|
+
--fd-layout-background: linear-gradient(
|
|
340
|
+
135deg,
|
|
341
|
+
#f9fafb 0%,
|
|
342
|
+
#e0e7ff 50%,
|
|
343
|
+
#c7d2fe 100%
|
|
344
|
+
); /* @public */
|
|
337
345
|
}
|
|
338
346
|
|
|
339
347
|
/* =========================================================================
|
|
@@ -213,10 +213,7 @@ export interface Interrupt {
|
|
|
213
213
|
id: string;
|
|
214
214
|
/** Type of interrupt (confirmation, choice, text, form) */
|
|
215
215
|
type: InterruptType;
|
|
216
|
-
/**
|
|
217
|
-
* Current status of the interrupt (legacy field)
|
|
218
|
-
* @deprecated Use `state` for more detailed status tracking
|
|
219
|
-
*/
|
|
216
|
+
/** Current status of the interrupt */
|
|
220
217
|
status: InterruptStatus;
|
|
221
218
|
/** Primary message/prompt to display */
|
|
222
219
|
message: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Handling Utilities
|
|
3
|
+
*
|
|
4
|
+
* @module utils/errors
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Normalize an unknown caught value into an Error instance.
|
|
8
|
+
*
|
|
9
|
+
* Use in catch blocks where the error type is `unknown`:
|
|
10
|
+
* ```typescript
|
|
11
|
+
* try { ... } catch (error) {
|
|
12
|
+
* const err = normalizeError(error);
|
|
13
|
+
* logger.error(err.message);
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param error - The caught value (may be Error, string, or anything)
|
|
18
|
+
* @returns An Error instance with a meaningful message
|
|
19
|
+
*/
|
|
20
|
+
export declare function normalizeError(error: unknown): Error;
|
|
21
|
+
/**
|
|
22
|
+
* Extract a human-readable message from an unknown error.
|
|
23
|
+
*
|
|
24
|
+
* @param error - The caught value
|
|
25
|
+
* @param fallback - Fallback message if error has no useful info
|
|
26
|
+
* @returns A string message
|
|
27
|
+
*/
|
|
28
|
+
export declare function getErrorMessage(error: unknown, fallback?: string): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Handling Utilities
|
|
3
|
+
*
|
|
4
|
+
* @module utils/errors
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Normalize an unknown caught value into an Error instance.
|
|
8
|
+
*
|
|
9
|
+
* Use in catch blocks where the error type is `unknown`:
|
|
10
|
+
* ```typescript
|
|
11
|
+
* try { ... } catch (error) {
|
|
12
|
+
* const err = normalizeError(error);
|
|
13
|
+
* logger.error(err.message);
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param error - The caught value (may be Error, string, or anything)
|
|
18
|
+
* @returns An Error instance with a meaningful message
|
|
19
|
+
*/
|
|
20
|
+
export function normalizeError(error) {
|
|
21
|
+
if (error instanceof Error) {
|
|
22
|
+
return error;
|
|
23
|
+
}
|
|
24
|
+
if (typeof error === 'string') {
|
|
25
|
+
return new Error(error);
|
|
26
|
+
}
|
|
27
|
+
return new Error(String(error));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Extract a human-readable message from an unknown error.
|
|
31
|
+
*
|
|
32
|
+
* @param error - The caught value
|
|
33
|
+
* @param fallback - Fallback message if error has no useful info
|
|
34
|
+
* @returns A string message
|
|
35
|
+
*/
|
|
36
|
+
export function getErrorMessage(error, fallback = 'Unknown error') {
|
|
37
|
+
if (error instanceof Error) {
|
|
38
|
+
return error.message;
|
|
39
|
+
}
|
|
40
|
+
if (typeof error === 'string') {
|
|
41
|
+
return error;
|
|
42
|
+
}
|
|
43
|
+
return fallback;
|
|
44
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle ID utilities for FlowDrop
|
|
3
|
+
*
|
|
4
|
+
* Handle IDs encode node + direction + port in the format:
|
|
5
|
+
* `${nodeId}-${direction}-${portId}` (e.g., "node1-output-trigger")
|
|
6
|
+
*
|
|
7
|
+
* @module utils/handleIds
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Build a handle ID from its parts.
|
|
11
|
+
*
|
|
12
|
+
* @param nodeId - The node identifier
|
|
13
|
+
* @param direction - 'input' or 'output'
|
|
14
|
+
* @param portId - The port identifier
|
|
15
|
+
* @returns A composite handle ID string
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildHandleId(nodeId: string, direction: 'input' | 'output', portId: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Extract the port ID from a composite handle ID.
|
|
20
|
+
*
|
|
21
|
+
* Supports two formats:
|
|
22
|
+
* 1. Standard: `${nodeId}-output-${portId}` or `${nodeId}-input-${portId}`
|
|
23
|
+
* 2. Short: just the portId itself (returned as-is)
|
|
24
|
+
*
|
|
25
|
+
* @param handleId - The handle ID string
|
|
26
|
+
* @returns The port ID, or null if handleId is empty/undefined
|
|
27
|
+
*/
|
|
28
|
+
export declare function extractPortId(handleId: string | undefined): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Extract the direction from a composite handle ID.
|
|
31
|
+
*
|
|
32
|
+
* @param handleId - The handle ID string
|
|
33
|
+
* @returns 'input', 'output', or null if not found
|
|
34
|
+
*/
|
|
35
|
+
export declare function extractDirection(handleId: string | undefined): 'input' | 'output' | null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle ID utilities for FlowDrop
|
|
3
|
+
*
|
|
4
|
+
* Handle IDs encode node + direction + port in the format:
|
|
5
|
+
* `${nodeId}-${direction}-${portId}` (e.g., "node1-output-trigger")
|
|
6
|
+
*
|
|
7
|
+
* @module utils/handleIds
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Build a handle ID from its parts.
|
|
11
|
+
*
|
|
12
|
+
* @param nodeId - The node identifier
|
|
13
|
+
* @param direction - 'input' or 'output'
|
|
14
|
+
* @param portId - The port identifier
|
|
15
|
+
* @returns A composite handle ID string
|
|
16
|
+
*/
|
|
17
|
+
export function buildHandleId(nodeId, direction, portId) {
|
|
18
|
+
return `${nodeId}-${direction}-${portId}`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Extract the port ID from a composite handle ID.
|
|
22
|
+
*
|
|
23
|
+
* Supports two formats:
|
|
24
|
+
* 1. Standard: `${nodeId}-output-${portId}` or `${nodeId}-input-${portId}`
|
|
25
|
+
* 2. Short: just the portId itself (returned as-is)
|
|
26
|
+
*
|
|
27
|
+
* @param handleId - The handle ID string
|
|
28
|
+
* @returns The port ID, or null if handleId is empty/undefined
|
|
29
|
+
*/
|
|
30
|
+
export function extractPortId(handleId) {
|
|
31
|
+
if (!handleId)
|
|
32
|
+
return null;
|
|
33
|
+
const outputMatch = handleId.lastIndexOf('-output-');
|
|
34
|
+
if (outputMatch !== -1) {
|
|
35
|
+
return handleId.substring(outputMatch + '-output-'.length);
|
|
36
|
+
}
|
|
37
|
+
const inputMatch = handleId.lastIndexOf('-input-');
|
|
38
|
+
if (inputMatch !== -1) {
|
|
39
|
+
return handleId.substring(inputMatch + '-input-'.length);
|
|
40
|
+
}
|
|
41
|
+
// Short format: the handleId IS the port ID
|
|
42
|
+
return handleId;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Extract the direction from a composite handle ID.
|
|
46
|
+
*
|
|
47
|
+
* @param handleId - The handle ID string
|
|
48
|
+
* @returns 'input', 'output', or null if not found
|
|
49
|
+
*/
|
|
50
|
+
export function extractDirection(handleId) {
|
|
51
|
+
if (!handleId)
|
|
52
|
+
return null;
|
|
53
|
+
if (handleId.includes('-output-'))
|
|
54
|
+
return 'output';
|
|
55
|
+
if (handleId.includes('-input-'))
|
|
56
|
+
return 'input';
|
|
57
|
+
return null;
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@d34dman/flowdrop",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.64",
|
|
6
6
|
"watch": {
|
|
7
7
|
"build": {
|
|
8
8
|
"ignore": "build",
|
|
@@ -112,12 +112,53 @@
|
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
|
+
"@codemirror/autocomplete": "^6.20.0",
|
|
116
|
+
"@codemirror/commands": "^6.10.2",
|
|
117
|
+
"@codemirror/lang-json": "^6.0.2",
|
|
118
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
119
|
+
"@codemirror/language": "^6.12.1",
|
|
120
|
+
"@codemirror/lint": "^6.9.2",
|
|
121
|
+
"@codemirror/state": "^6.5.4",
|
|
122
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
123
|
+
"@codemirror/view": "^6.39.14",
|
|
115
124
|
"@iconify/svelte": "^5.0.0",
|
|
125
|
+
"@xyflow/svelte": "^1.2",
|
|
126
|
+
"codemirror": "^6.0.2",
|
|
116
127
|
"svelte": "^5.0.0"
|
|
117
128
|
},
|
|
118
129
|
"peerDependenciesMeta": {
|
|
130
|
+
"@codemirror/autocomplete": {
|
|
131
|
+
"optional": true
|
|
132
|
+
},
|
|
133
|
+
"@codemirror/commands": {
|
|
134
|
+
"optional": true
|
|
135
|
+
},
|
|
136
|
+
"@codemirror/lang-json": {
|
|
137
|
+
"optional": true
|
|
138
|
+
},
|
|
139
|
+
"@codemirror/lang-markdown": {
|
|
140
|
+
"optional": true
|
|
141
|
+
},
|
|
142
|
+
"@codemirror/language": {
|
|
143
|
+
"optional": true
|
|
144
|
+
},
|
|
145
|
+
"@codemirror/lint": {
|
|
146
|
+
"optional": true
|
|
147
|
+
},
|
|
148
|
+
"@codemirror/state": {
|
|
149
|
+
"optional": true
|
|
150
|
+
},
|
|
151
|
+
"@codemirror/theme-one-dark": {
|
|
152
|
+
"optional": true
|
|
153
|
+
},
|
|
154
|
+
"@codemirror/view": {
|
|
155
|
+
"optional": true
|
|
156
|
+
},
|
|
119
157
|
"@iconify/svelte": {
|
|
120
158
|
"optional": true
|
|
159
|
+
},
|
|
160
|
+
"codemirror": {
|
|
161
|
+
"optional": true
|
|
121
162
|
}
|
|
122
163
|
},
|
|
123
164
|
"repository": {
|
|
@@ -126,6 +167,17 @@
|
|
|
126
167
|
},
|
|
127
168
|
"devDependencies": {
|
|
128
169
|
"@chromatic-com/storybook": "^5.0.1",
|
|
170
|
+
"@xyflow/svelte": "^1.2",
|
|
171
|
+
"@codemirror/autocomplete": "^6.20.0",
|
|
172
|
+
"@codemirror/commands": "^6.10.2",
|
|
173
|
+
"@codemirror/lang-json": "^6.0.2",
|
|
174
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
175
|
+
"@codemirror/language": "^6.12.1",
|
|
176
|
+
"@codemirror/lint": "^6.9.2",
|
|
177
|
+
"@codemirror/state": "^6.5.4",
|
|
178
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
179
|
+
"@codemirror/view": "^6.39.14",
|
|
180
|
+
"codemirror": "^6.0.2",
|
|
129
181
|
"@eslint/compat": "^1.2.5",
|
|
130
182
|
"@eslint/js": "^9.18.0",
|
|
131
183
|
"@iconify/svelte": "^5.0.0",
|
|
@@ -191,17 +243,6 @@
|
|
|
191
243
|
"dag"
|
|
192
244
|
],
|
|
193
245
|
"dependencies": {
|
|
194
|
-
"@codemirror/autocomplete": "^6.20.0",
|
|
195
|
-
"@codemirror/commands": "^6.10.2",
|
|
196
|
-
"@codemirror/lang-json": "^6.0.2",
|
|
197
|
-
"@codemirror/lang-markdown": "^6.5.0",
|
|
198
|
-
"@codemirror/language": "^6.12.1",
|
|
199
|
-
"@codemirror/lint": "^6.9.2",
|
|
200
|
-
"@codemirror/state": "^6.5.4",
|
|
201
|
-
"@codemirror/theme-one-dark": "^6.1.3",
|
|
202
|
-
"@codemirror/view": "^6.39.14",
|
|
203
|
-
"@xyflow/svelte": "^1.2",
|
|
204
|
-
"codemirror": "^6.0.2",
|
|
205
246
|
"diff": "^8.0.3",
|
|
206
247
|
"dompurify": "^3.3.1",
|
|
207
248
|
"marked": "^16.1.1",
|