@d34dman/flowdrop 0.0.1 → 0.0.2

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 (119) hide show
  1. package/README.md +307 -215
  2. package/dist/adapters/WorkflowAdapter.d.ts +1 -1
  3. package/dist/adapters/WorkflowAdapter.js +30 -30
  4. package/dist/api/client.d.ts +24 -1
  5. package/dist/api/client.js +55 -38
  6. package/dist/api/enhanced-client.d.ts +46 -0
  7. package/dist/api/enhanced-client.js +211 -0
  8. package/dist/clients/ApiClient.d.ts +19 -23
  9. package/dist/clients/ApiClient.js +36 -34
  10. package/dist/components/App.svelte +1299 -230
  11. package/dist/components/App.svelte.d.ts +21 -1
  12. package/dist/components/CanvasBanner.svelte +50 -44
  13. package/dist/components/CanvasBanner.svelte.d.ts +5 -19
  14. package/dist/components/ConfigForm.svelte +555 -0
  15. package/dist/components/ConfigForm.svelte.d.ts +32 -0
  16. package/dist/components/ConfigModal.svelte +261 -0
  17. package/dist/components/ConfigModal.svelte.d.ts +31 -0
  18. package/dist/components/ConfigSidebar.svelte +934 -0
  19. package/dist/components/ConfigSidebar.svelte.d.ts +51 -0
  20. package/dist/components/ConnectionLine.svelte +32 -0
  21. package/dist/components/ConnectionLine.svelte.d.ts +3 -0
  22. package/dist/components/GatewayNode.svelte +471 -0
  23. package/dist/components/GatewayNode.svelte.d.ts +15 -0
  24. package/dist/components/LoadingSpinner.svelte +23 -23
  25. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  26. package/dist/components/Logo.svelte +82 -0
  27. package/dist/components/Logo.svelte.d.ts +26 -0
  28. package/dist/components/LogsSidebar.svelte +565 -0
  29. package/dist/components/LogsSidebar.svelte.d.ts +34 -0
  30. package/dist/components/MarkdownDisplay.svelte +28 -0
  31. package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
  32. package/dist/components/Navbar.svelte +663 -0
  33. package/dist/components/Navbar.svelte.d.ts +21 -0
  34. package/dist/components/NodeSidebar.svelte +629 -488
  35. package/dist/components/NodeSidebar.svelte.d.ts +1 -2
  36. package/dist/components/NodeStatusOverlay.svelte +327 -0
  37. package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
  38. package/dist/components/NotesNode.svelte +566 -0
  39. package/dist/components/NotesNode.svelte.d.ts +43 -0
  40. package/dist/components/PipelineStatus.svelte +331 -0
  41. package/dist/components/PipelineStatus.svelte.d.ts +18 -0
  42. package/dist/components/SimpleNode.svelte +447 -0
  43. package/dist/components/SimpleNode.svelte.d.ts +24 -0
  44. package/dist/components/SquareNode.svelte +346 -0
  45. package/dist/components/SquareNode.svelte.d.ts +24 -0
  46. package/dist/components/StatusIcon.svelte +112 -0
  47. package/dist/components/StatusIcon.svelte.d.ts +10 -0
  48. package/dist/components/StatusLabel.svelte +33 -0
  49. package/dist/components/StatusLabel.svelte.d.ts +7 -0
  50. package/dist/components/ToolNode.svelte +385 -0
  51. package/dist/components/ToolNode.svelte.d.ts +36 -0
  52. package/dist/components/UniversalNode.svelte +126 -0
  53. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  54. package/dist/components/WorkflowEditor.svelte +871 -528
  55. package/dist/components/WorkflowEditor.svelte.d.ts +15 -5
  56. package/dist/components/WorkflowNode.svelte +428 -542
  57. package/dist/components/WorkflowNode.svelte.d.ts +7 -3
  58. package/dist/config/apiConfig.d.ts +33 -0
  59. package/dist/config/apiConfig.js +39 -0
  60. package/dist/config/defaultPortConfig.d.ts +6 -0
  61. package/dist/config/defaultPortConfig.js +192 -0
  62. package/dist/config/demo.d.ts +58 -0
  63. package/dist/config/demo.js +142 -0
  64. package/dist/config/endpoints.d.ts +106 -0
  65. package/dist/config/endpoints.js +128 -0
  66. package/dist/data/samples.d.ts +38 -4
  67. package/dist/data/samples.js +2789 -737
  68. package/dist/examples/adapter-usage.d.ts +4 -4
  69. package/dist/examples/adapter-usage.js +21 -26
  70. package/dist/examples/api-client-usage.d.ts +6 -6
  71. package/dist/examples/api-client-usage.js +55 -54
  72. package/dist/index.d.ts +23 -15
  73. package/dist/index.js +23 -15
  74. package/dist/mocks/app-environment.d.ts +8 -0
  75. package/dist/mocks/app-environment.js +16 -0
  76. package/dist/mocks/app-forms.d.ts +2 -0
  77. package/dist/mocks/app-forms.js +21 -0
  78. package/dist/mocks/app-navigation.d.ts +5 -0
  79. package/dist/mocks/app-navigation.js +34 -0
  80. package/dist/mocks/app-stores.d.ts +14 -0
  81. package/dist/mocks/app-stores.js +26 -0
  82. package/dist/services/api.d.ts +13 -3
  83. package/dist/services/api.js +91 -36
  84. package/dist/services/globalSave.d.ts +20 -0
  85. package/dist/services/globalSave.js +165 -0
  86. package/dist/services/nodeExecutionService.d.ts +63 -0
  87. package/dist/services/nodeExecutionService.js +261 -0
  88. package/dist/services/portConfigApi.d.ts +14 -0
  89. package/dist/services/portConfigApi.js +69 -0
  90. package/dist/services/toastService.d.ts +147 -0
  91. package/dist/services/toastService.js +235 -0
  92. package/dist/services/workflowStorage.d.ts +2 -2
  93. package/dist/services/workflowStorage.js +10 -10
  94. package/dist/stores/workflowStore.d.ts +53 -0
  95. package/dist/stores/workflowStore.js +264 -0
  96. package/dist/styles/base.css +896 -363
  97. package/dist/svelte-app.d.ts +52 -5
  98. package/dist/svelte-app.js +128 -6
  99. package/dist/types/config.d.ts +291 -0
  100. package/dist/types/config.js +4 -0
  101. package/dist/types/index.d.ts +231 -19
  102. package/dist/types/index.js +1 -1
  103. package/dist/utils/colors.d.ts +67 -33
  104. package/dist/utils/colors.js +183 -118
  105. package/dist/utils/config.d.ts +41 -0
  106. package/dist/utils/config.js +248 -0
  107. package/dist/utils/connections.d.ts +40 -3
  108. package/dist/utils/connections.js +115 -44
  109. package/dist/utils/icons.d.ts +1 -1
  110. package/dist/utils/icons.js +71 -70
  111. package/dist/utils/nodeStatus.d.ts +53 -0
  112. package/dist/utils/nodeStatus.js +183 -0
  113. package/dist/utils/nodeTypes.d.ts +57 -0
  114. package/dist/utils/nodeTypes.js +109 -0
  115. package/dist/utils/nodeWrapper.d.ts +39 -0
  116. package/dist/utils/nodeWrapper.js +62 -0
  117. package/package.json +129 -97
  118. package/dist/components/Node.svelte +0 -38
  119. package/dist/components/Node.svelte.d.ts +0 -4
@@ -1,8 +1,7 @@
1
- import type { NodeMetadata, NodeCategory } from "../types/index.js";
1
+ import type { NodeMetadata, NodeCategory } from '../types/index.js';
2
2
  interface Props {
3
3
  nodes: NodeMetadata[];
4
4
  selectedCategory?: NodeCategory;
5
- searchQuery?: string;
6
5
  }
7
6
  declare const NodeSidebar: import("svelte").Component<Props, {}, "">;
8
7
  type NodeSidebar = ReturnType<typeof NodeSidebar>;
@@ -0,0 +1,327 @@
1
+ <!--
2
+ Node Status Overlay Component
3
+ Universal status indicator that can be overlaid on any node type
4
+ Displays execution status, count, and other execution information
5
+ Styled with BEM syntax
6
+ -->
7
+
8
+ <script lang="ts">
9
+ import type { NodeExecutionInfo } from '../types/index.js';
10
+ import Icon from '@iconify/svelte';
11
+ import StatusLabel from './StatusLabel.svelte';
12
+ import {
13
+ getStatusColor,
14
+ getStatusIcon,
15
+ getStatusLabel,
16
+ getStatusBackgroundColor,
17
+ formatExecutionDuration,
18
+ formatLastExecuted
19
+ } from '../utils/nodeStatus.js';
20
+
21
+ interface Props {
22
+ nodeId: string;
23
+ executionInfo?: NodeExecutionInfo;
24
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
25
+ size?: 'sm' | 'md' | 'lg';
26
+ showDetails?: boolean;
27
+ }
28
+
29
+ let props: Props = $props();
30
+
31
+ // Default values
32
+ let position = $state(props.position || 'top-right');
33
+ let size = $state(props.size || 'md');
34
+ let showDetails = $state(props.showDetails || false);
35
+ let isHovered = $state(false);
36
+
37
+ // Size configurations - optimized for larger, centered overlay
38
+ const sizeConfig = {
39
+ sm: {
40
+ statusSize: '18px',
41
+ iconSize: '10px',
42
+ labelSize: '0.75rem',
43
+ padding: '6px 12px'
44
+ },
45
+ md: {
46
+ statusSize: '24px',
47
+ iconSize: '14px',
48
+ labelSize: '0.875rem',
49
+ padding: '8px 16px'
50
+ },
51
+ lg: {
52
+ statusSize: '28px',
53
+ iconSize: '16px',
54
+ labelSize: '1rem',
55
+ padding: '10px 20px'
56
+ }
57
+ };
58
+
59
+ const config = sizeConfig[size];
60
+
61
+ // Position styles - horizontal center aligned with top edge of node
62
+ const positionStyles = {
63
+ 'top-left': 'top: -24px; left: 50%; transform: translateX(-50%);',
64
+ 'top-right': 'top: -24px; left: 50%; transform: translateX(-50%);',
65
+ 'bottom-left': 'top: -24px; left: 50%; transform: translateX(-50%);',
66
+ 'bottom-right': 'top: -24px; left: 50%; transform: translateX(-50%);'
67
+ };
68
+
69
+ // Get execution info or default
70
+ let executionInfo = $derived(
71
+ props.executionInfo || {
72
+ status: 'idle' as const,
73
+ executionCount: 0,
74
+ isExecuting: false
75
+ }
76
+ );
77
+
78
+ // Show overlay if there's meaningful status information
79
+ let shouldShow = $derived(
80
+ executionInfo.status !== 'idle' || executionInfo.executionCount > 0 || executionInfo.isExecuting
81
+ );
82
+ </script>
83
+
84
+ {#if shouldShow}
85
+ <div
86
+ class="node-status-overlay"
87
+ class:node-status-overlay--hovered={isHovered}
88
+ class:node-status-overlay--top-left={true}
89
+ class:node-status-overlay--sm={size === 'sm'}
90
+ class:node-status-overlay--md={size === 'md'}
91
+ class:node-status-overlay--lg={size === 'lg'}
92
+ style="
93
+ {positionStyles[position]}
94
+ --status-size: {config.statusSize};
95
+ --label-size: {config.labelSize};
96
+ --icon-size: {config.iconSize};
97
+ --padding: {config.padding};
98
+ "
99
+ onmouseenter={() => (isHovered = true)}
100
+ onmouseleave={() => (isHovered = false)}
101
+ title="{getStatusLabel(executionInfo.status)} - Executed {executionInfo.executionCount} times"
102
+ role="status"
103
+ aria-label="Node execution status: {getStatusLabel(executionInfo.status)}"
104
+ >
105
+ <!-- Status Display: [icon] [label] -->
106
+ <div
107
+ class="node-status-overlay__status-display"
108
+ style="background-color: {getStatusBackgroundColor(executionInfo.status)}"
109
+ >
110
+ <div
111
+ class="node-status-overlay__status-icon"
112
+ style="background-color: {getStatusColor(executionInfo.status)}"
113
+ >
114
+ <Icon icon={getStatusIcon(executionInfo.status)} class="node-status-overlay__icon" />
115
+ </div>
116
+ <StatusLabel
117
+ label={getStatusLabel(executionInfo.status)}
118
+ class="node-status-overlay__label"
119
+ />
120
+ </div>
121
+
122
+ <!-- Execution Count Badge -->
123
+ {#if executionInfo.executionCount > 0}
124
+ <div class="node-status-overlay__count">
125
+ {executionInfo.executionCount}
126
+ </div>
127
+ {/if}
128
+
129
+ <!-- Detailed Information (shown on hover) -->
130
+ {#if showDetails && isHovered}
131
+ <div class="node-status-overlay__details">
132
+ <div class="node-status-overlay__detail-item">
133
+ <span class="node-status-overlay__detail-label">Status:</span>
134
+ <span class="node-status-overlay__detail-value"
135
+ >{getStatusLabel(executionInfo.status)}</span
136
+ >
137
+ </div>
138
+ <div class="node-status-overlay__detail-item">
139
+ <span class="node-status-overlay__detail-label">Executions:</span>
140
+ <span class="node-status-overlay__detail-value">{executionInfo.executionCount}</span>
141
+ </div>
142
+ {#if executionInfo.lastExecuted}
143
+ <div class="node-status-overlay__detail-item">
144
+ <span class="node-status-overlay__detail-label">Last Run:</span>
145
+ <span class="node-status-overlay__detail-value"
146
+ >{formatLastExecuted(executionInfo.lastExecuted)}</span
147
+ >
148
+ </div>
149
+ {/if}
150
+ {#if executionInfo.lastExecutionDuration}
151
+ <div class="node-status-overlay__detail-item">
152
+ <span class="node-status-overlay__detail-label">Duration:</span>
153
+ <span class="node-status-overlay__detail-value"
154
+ >{formatExecutionDuration(executionInfo.lastExecutionDuration)}</span
155
+ >
156
+ </div>
157
+ {/if}
158
+ {#if executionInfo.lastError}
159
+ <div class="node-status-overlay__detail-item node-status-overlay__detail-item--error">
160
+ <span class="node-status-overlay__detail-label">Error:</span>
161
+ <span class="node-status-overlay__detail-value">{executionInfo.lastError}</span>
162
+ </div>
163
+ {/if}
164
+ </div>
165
+ {/if}
166
+ </div>
167
+ {/if}
168
+
169
+ <style>
170
+ .node-status-overlay {
171
+ position: absolute;
172
+ display: flex;
173
+ align-items: center;
174
+ gap: 0.75rem;
175
+ z-index: 1000;
176
+ pointer-events: none;
177
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
178
+ height: 48px;
179
+ width: auto;
180
+ min-width: 120px;
181
+ }
182
+
183
+ .node-status-overlay--hovered {
184
+ pointer-events: auto;
185
+ transform: translateY(-2px);
186
+ }
187
+
188
+ .node-status-overlay--hovered .node-status-overlay__status-display {
189
+ box-shadow:
190
+ 0 8px 25px -5px rgba(0, 0, 0, 0.15),
191
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1),
192
+ inset 0 1px 0 rgba(255, 255, 255, 0.2);
193
+ transform: scale(1.02);
194
+ }
195
+
196
+ .node-status-overlay__status-display {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 0.5rem;
200
+ border: 2px solid rgba(255, 255, 255, 0.3);
201
+ border-radius: 1rem;
202
+ padding: 0.5rem 1rem;
203
+ box-shadow:
204
+ 0 6px 12px -2px rgba(0, 0, 0, 0.15),
205
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1),
206
+ inset 0 1px 0 rgba(255, 255, 255, 0.2);
207
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
208
+ height: 48px;
209
+ backdrop-filter: blur(12px);
210
+ -webkit-backdrop-filter: blur(12px);
211
+ width: 100%;
212
+ justify-content: flex-start;
213
+ overflow: hidden;
214
+ }
215
+
216
+ .node-status-overlay__status-icon {
217
+ width: 48px;
218
+ height: 48px;
219
+ border-radius: 0.5rem;
220
+ display: flex;
221
+ align-items: center;
222
+ justify-content: center;
223
+ box-shadow:
224
+ 0 2px 4px rgba(0, 0, 0, 0.1),
225
+ inset 0 1px 0 rgba(255, 255, 255, 0.2);
226
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
227
+ flex-shrink: 0;
228
+ position: relative;
229
+ margin: -0.5rem 0.5rem -0.5rem -1rem;
230
+ }
231
+
232
+ .node-status-overlay__count {
233
+ background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
234
+ color: #1f2937;
235
+ border: 2px solid rgba(255, 255, 255, 0.4);
236
+ border-radius: 0.75rem;
237
+ padding: var(--padding);
238
+ font-size: var(--label-size);
239
+ font-weight: 700;
240
+ min-width: 2rem;
241
+ text-align: center;
242
+ line-height: 1;
243
+ box-shadow:
244
+ 0 3px 6px rgba(0, 0, 0, 0.15),
245
+ inset 0 1px 0 rgba(255, 255, 255, 0.3);
246
+ height: 48px;
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
251
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
252
+ }
253
+
254
+ .node-status-overlay__details {
255
+ position: absolute;
256
+ top: 100%;
257
+ right: 0;
258
+ background-color: #ffffff;
259
+ border: 1px solid #e5e7eb;
260
+ border-radius: 0.5rem;
261
+ padding: 0.75rem;
262
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
263
+ min-width: 200px;
264
+ z-index: 1001;
265
+ pointer-events: auto;
266
+ }
267
+
268
+ .node-status-overlay__detail-item {
269
+ display: flex;
270
+ justify-content: space-between;
271
+ align-items: center;
272
+ margin-bottom: 0.25rem;
273
+ }
274
+
275
+ .node-status-overlay__detail-item:last-child {
276
+ margin-bottom: 0;
277
+ }
278
+
279
+ .node-status-overlay__detail-label {
280
+ font-size: 0.75rem;
281
+ font-weight: 500;
282
+ color: #6b7280;
283
+ }
284
+
285
+ .node-status-overlay__detail-value {
286
+ font-size: 0.75rem;
287
+ font-weight: 600;
288
+ color: #374151;
289
+ text-align: right;
290
+ max-width: 120px;
291
+ overflow: hidden;
292
+ text-overflow: ellipsis;
293
+ white-space: nowrap;
294
+ }
295
+
296
+ .node-status-overlay__detail-item--error .node-status-overlay__detail-value {
297
+ color: #ef4444;
298
+ }
299
+
300
+ /* Size variants */
301
+ .node-status-overlay--sm {
302
+ gap: 0.125rem;
303
+ }
304
+
305
+ .node-status-overlay--md {
306
+ gap: 0.25rem;
307
+ }
308
+
309
+ .node-status-overlay--lg {
310
+ gap: 0.375rem;
311
+ }
312
+
313
+ /* Animation for running status */
314
+ .node-status-overlay__status-icon[style*='running'] {
315
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
316
+ }
317
+
318
+ @keyframes pulse {
319
+ 0%,
320
+ 100% {
321
+ opacity: 1;
322
+ }
323
+ 50% {
324
+ opacity: 0.5;
325
+ }
326
+ }
327
+ </style>
@@ -0,0 +1,11 @@
1
+ import type { NodeExecutionInfo } from '../types/index.js';
2
+ interface Props {
3
+ nodeId: string;
4
+ executionInfo?: NodeExecutionInfo;
5
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
6
+ size?: 'sm' | 'md' | 'lg';
7
+ showDetails?: boolean;
8
+ }
9
+ declare const NodeStatusOverlay: import("svelte").Component<Props, {}, "">;
10
+ type NodeStatusOverlay = ReturnType<typeof NodeStatusOverlay>;
11
+ export default NodeStatusOverlay;