@genfeedai/workflow-ui 0.1.0

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 (86) hide show
  1. package/dist/canvas.d.mts +27 -0
  2. package/dist/canvas.d.ts +27 -0
  3. package/dist/canvas.js +45 -0
  4. package/dist/canvas.mjs +16 -0
  5. package/dist/chunk-22PDGHNQ.mjs +737 -0
  6. package/dist/chunk-3SPPKCWR.js +458 -0
  7. package/dist/chunk-3YFFDHC5.js +300 -0
  8. package/dist/chunk-5HJFQVUR.js +61 -0
  9. package/dist/chunk-5LQ4QBR5.js +2 -0
  10. package/dist/chunk-6DOEUDD5.js +254 -0
  11. package/dist/chunk-7SKSRSS7.mjs +57 -0
  12. package/dist/chunk-AC6TWLRT.mjs +27 -0
  13. package/dist/chunk-ADWNF7V3.js +120 -0
  14. package/dist/chunk-BJ3R5R32.mjs +2163 -0
  15. package/dist/chunk-CETJJ73S.js +1555 -0
  16. package/dist/chunk-CSUBLSKZ.mjs +1002 -0
  17. package/dist/chunk-CV4M7CNU.mjs +251 -0
  18. package/dist/chunk-E323WAZG.mjs +272 -0
  19. package/dist/chunk-E544XUBL.js +378 -0
  20. package/dist/chunk-EC2ZIWOK.js +1007 -0
  21. package/dist/chunk-EFXQT23N.mjs +99 -0
  22. package/dist/chunk-EMUMKW5C.js +107 -0
  23. package/dist/chunk-FOMOOERN.js +2 -0
  24. package/dist/chunk-FT33LFII.mjs +21 -0
  25. package/dist/chunk-FT64PCUP.mjs +533 -0
  26. package/dist/chunk-H6LZKSLY.js +5678 -0
  27. package/dist/chunk-HPQT36RR.js +543 -0
  28. package/dist/chunk-JLWKW3G5.js +2 -0
  29. package/dist/chunk-L5TF4EHW.mjs +1 -0
  30. package/dist/chunk-LAJ34AH2.mjs +374 -0
  31. package/dist/chunk-LDN7IX4Y.mjs +1 -0
  32. package/dist/chunk-MLJJBBTB.mjs +1 -0
  33. package/dist/chunk-NSDLGLAQ.js +2166 -0
  34. package/dist/chunk-RJ262NXS.js +24 -0
  35. package/dist/chunk-RXNEDWK2.js +141 -0
  36. package/dist/chunk-SW7QNEZU.js +744 -0
  37. package/dist/chunk-UQQUWGHW.mjs +118 -0
  38. package/dist/chunk-VOGL2WCE.mjs +1542 -0
  39. package/dist/chunk-VRN3UWE5.mjs +138 -0
  40. package/dist/chunk-XV5Z5XYR.mjs +5640 -0
  41. package/dist/chunk-Z7PWFZG5.js +30 -0
  42. package/dist/chunk-ZJD5WMR3.mjs +418 -0
  43. package/dist/hooks.d.mts +255 -0
  44. package/dist/hooks.d.ts +255 -0
  45. package/dist/hooks.js +56 -0
  46. package/dist/hooks.mjs +11 -0
  47. package/dist/index.d.mts +29 -0
  48. package/dist/index.d.ts +29 -0
  49. package/dist/index.js +180 -0
  50. package/dist/index.mjs +19 -0
  51. package/dist/lib.d.mts +164 -0
  52. package/dist/lib.d.ts +164 -0
  53. package/dist/lib.js +144 -0
  54. package/dist/lib.mjs +3 -0
  55. package/dist/nodes.d.mts +128 -0
  56. package/dist/nodes.d.ts +128 -0
  57. package/dist/nodes.js +151 -0
  58. package/dist/nodes.mjs +14 -0
  59. package/dist/panels.d.mts +22 -0
  60. package/dist/panels.d.ts +22 -0
  61. package/dist/panels.js +21 -0
  62. package/dist/panels.mjs +4 -0
  63. package/dist/promptLibraryStore-BZnfmEkc.d.ts +464 -0
  64. package/dist/promptLibraryStore-zqb59nsu.d.mts +464 -0
  65. package/dist/provider.d.mts +29 -0
  66. package/dist/provider.d.ts +29 -0
  67. package/dist/provider.js +17 -0
  68. package/dist/provider.mjs +4 -0
  69. package/dist/stores.d.mts +96 -0
  70. package/dist/stores.d.ts +96 -0
  71. package/dist/stores.js +113 -0
  72. package/dist/stores.mjs +43 -0
  73. package/dist/toolbar.d.mts +73 -0
  74. package/dist/toolbar.d.ts +73 -0
  75. package/dist/toolbar.js +34 -0
  76. package/dist/toolbar.mjs +5 -0
  77. package/dist/types-ipAnBzAJ.d.mts +46 -0
  78. package/dist/types-ipAnBzAJ.d.ts +46 -0
  79. package/dist/ui.d.mts +67 -0
  80. package/dist/ui.d.ts +67 -0
  81. package/dist/ui.js +84 -0
  82. package/dist/ui.mjs +3 -0
  83. package/dist/workflowStore-4EGKJLYK.mjs +3 -0
  84. package/dist/workflowStore-KM32FDL7.js +12 -0
  85. package/package.json +117 -0
  86. package/src/styles/workflow-ui.css +186 -0
@@ -0,0 +1,378 @@
1
+ 'use strict';
2
+
3
+ var chunkEC2ZIWOK_js = require('./chunk-EC2ZIWOK.js');
4
+ var chunkNSDLGLAQ_js = require('./chunk-NSDLGLAQ.js');
5
+ var chunkZ7PWFZG5_js = require('./chunk-Z7PWFZG5.js');
6
+ var lucideReact = require('lucide-react');
7
+ var react = require('react');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ // src/panels/NodePalette.tsx
11
+ var import_types = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
12
+ var ICONS = {
13
+ // Input
14
+ Image: lucideReact.Image,
15
+ MessageSquare: lucideReact.MessageSquare,
16
+ FileText: lucideReact.FileText,
17
+ FileVideo: lucideReact.FileVideo,
18
+ Volume2: lucideReact.Volume2,
19
+ Puzzle: lucideReact.Puzzle,
20
+ // AI
21
+ Sparkles: lucideReact.Sparkles,
22
+ Video: lucideReact.Video,
23
+ Brain: lucideReact.Brain,
24
+ Mic: lucideReact.Mic,
25
+ AudioLines: lucideReact.AudioLines,
26
+ Navigation: lucideReact.Navigation,
27
+ // Processing
28
+ Maximize2: lucideReact.Maximize2,
29
+ Wand2: lucideReact.Wand2,
30
+ Layers: lucideReact.Layers,
31
+ Scissors: lucideReact.Scissors,
32
+ Film: lucideReact.Film,
33
+ Crop: lucideReact.Crop,
34
+ Maximize: lucideReact.Maximize,
35
+ Grid3X3: lucideReact.Grid3X3,
36
+ Pencil: lucideReact.Pencil,
37
+ Subtitles: lucideReact.Subtitles,
38
+ LayoutGrid: lucideReact.LayoutGrid,
39
+ Columns2: lucideReact.Columns2,
40
+ // Output
41
+ CheckCircle: lucideReact.CheckCircle,
42
+ Eye: lucideReact.Eye,
43
+ Download: lucideReact.Download,
44
+ // Composition
45
+ ArrowRightToLine: lucideReact.ArrowRightToLine,
46
+ ArrowLeftFromLine: lucideReact.ArrowLeftFromLine,
47
+ GitBranch: lucideReact.GitBranch
48
+ };
49
+ var CATEGORY_LABELS = {
50
+ input: "Input",
51
+ ai: "AI Generation",
52
+ processing: "Processing",
53
+ output: "Output",
54
+ composition: "Composition"
55
+ };
56
+ var CATEGORY_COLORS = {
57
+ input: {
58
+ icon: "bg-[var(--category-input)]/20 text-[var(--category-input)]",
59
+ hover: "hover:border-[var(--category-input)]",
60
+ cssVar: "var(--category-input)"
61
+ },
62
+ ai: {
63
+ icon: "bg-[var(--category-ai)]/20 text-[var(--category-ai)]",
64
+ hover: "hover:border-[var(--category-ai)]",
65
+ cssVar: "var(--category-ai)"
66
+ },
67
+ processing: {
68
+ icon: "bg-[var(--category-processing)]/20 text-[var(--category-processing)]",
69
+ hover: "hover:border-[var(--category-processing)]",
70
+ cssVar: "var(--category-processing)"
71
+ },
72
+ output: {
73
+ icon: "bg-[var(--category-output)]/20 text-[var(--category-output)]",
74
+ hover: "hover:border-[var(--category-output)]",
75
+ cssVar: "var(--category-output)"
76
+ },
77
+ composition: {
78
+ icon: "bg-[var(--category-composition)]/20 text-[var(--category-composition)]",
79
+ hover: "hover:border-[var(--category-composition)]",
80
+ cssVar: "var(--category-composition)"
81
+ }
82
+ };
83
+ function NodeCard({ type, label, description, icon, category }) {
84
+ const Icon = ICONS[icon] ?? lucideReact.Sparkles;
85
+ const handleDragStart = react.useCallback(
86
+ (event) => {
87
+ event.dataTransfer.setData("nodeType", type);
88
+ event.dataTransfer.effectAllowed = "move";
89
+ },
90
+ [type]
91
+ );
92
+ const colors = CATEGORY_COLORS[category];
93
+ return /* @__PURE__ */ jsxRuntime.jsx(
94
+ "div",
95
+ {
96
+ draggable: true,
97
+ onDragStart: handleDragStart,
98
+ className: `p-3 bg-[var(--card)] border border-[var(--border)] rounded-lg cursor-grab transition-colors group ${colors.hover}`,
99
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
100
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `p-2 rounded ${colors.icon}`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-4 h-4" }) }),
101
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
102
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-sm text-[var(--foreground)] truncate", children: label }),
103
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-[var(--muted-foreground)] mt-0.5 line-clamp-2", children: description })
104
+ ] })
105
+ ] })
106
+ }
107
+ );
108
+ }
109
+ function CategorySection({ category, isExpanded, onToggle }) {
110
+ const nodes = (0, import_types.getNodesByCategory)()[category];
111
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-[var(--border)] last:border-0", children: [
112
+ /* @__PURE__ */ jsxRuntime.jsxs(
113
+ "button",
114
+ {
115
+ onClick: onToggle,
116
+ className: "w-full flex items-center gap-2 px-4 py-3 text-left hover:bg-[var(--secondary)] transition cursor-pointer",
117
+ children: [
118
+ isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-4 h-4 text-[var(--muted-foreground)]" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-[var(--muted-foreground)]" }),
119
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-sm text-[var(--foreground)]", children: CATEGORY_LABELS[category] }),
120
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[var(--muted-foreground)] ml-auto", children: nodes.length })
121
+ ]
122
+ }
123
+ ),
124
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-4 space-y-2", children: nodes.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
125
+ NodeCard,
126
+ {
127
+ type: node.type,
128
+ label: node.label,
129
+ description: node.description,
130
+ icon: node.icon,
131
+ category: node.category
132
+ },
133
+ node.type
134
+ )) })
135
+ ] });
136
+ }
137
+ function NodePalette() {
138
+ const { togglePalette } = chunkEC2ZIWOK_js.useUIStore();
139
+ const [searchQuery, setSearchQuery] = react.useState("");
140
+ const [expandedCategories, setExpandedCategories] = react.useState(
141
+ /* @__PURE__ */ new Set(["input"])
142
+ );
143
+ const nodesByCategory = react.useMemo(() => (0, import_types.getNodesByCategory)(), []);
144
+ const filteredNodes = react.useMemo(() => {
145
+ if (!searchQuery.trim()) return null;
146
+ const query = searchQuery.toLowerCase();
147
+ const results = [];
148
+ for (const category of Object.keys(nodesByCategory)) {
149
+ for (const node of nodesByCategory[category]) {
150
+ if (node.label.toLowerCase().includes(query) || node.description.toLowerCase().includes(query)) {
151
+ results.push(node);
152
+ }
153
+ }
154
+ }
155
+ return results;
156
+ }, [searchQuery, nodesByCategory]);
157
+ const toggleCategory = react.useCallback((category) => {
158
+ setExpandedCategories((prev) => {
159
+ const next = new Set(prev);
160
+ if (next.has(category)) {
161
+ next.delete(category);
162
+ } else {
163
+ next.add(category);
164
+ }
165
+ return next;
166
+ });
167
+ }, []);
168
+ const categories = react.useMemo(
169
+ () => ["input", "ai", "processing", "output", "composition"].filter(
170
+ (cat) => nodesByCategory[cat].length > 0
171
+ ),
172
+ [nodesByCategory]
173
+ );
174
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-64 min-w-64 h-full bg-[var(--background)] border-r border-[var(--border)] flex flex-col overflow-hidden", children: [
175
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3 border-b border-[var(--border)] flex items-start justify-between gap-2", children: [
176
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
177
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-semibold text-sm text-[var(--foreground)]", children: "Nodes" }),
178
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[var(--muted-foreground)] mt-1", children: "Drag to canvas" })
179
+ ] }),
180
+ /* @__PURE__ */ jsxRuntime.jsx(
181
+ "button",
182
+ {
183
+ onClick: togglePalette,
184
+ className: "p-1.5 hover:bg-[var(--secondary)] rounded-md transition-colors group",
185
+ title: "Close sidebar (M)",
186
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeftClose, { className: "w-4 h-4 text-[var(--muted-foreground)] group-hover:text-[var(--foreground)]" })
187
+ }
188
+ )
189
+ ] }),
190
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 border-b border-[var(--border)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
191
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--muted-foreground)]" }),
192
+ /* @__PURE__ */ jsxRuntime.jsx(
193
+ "input",
194
+ {
195
+ type: "text",
196
+ placeholder: "Search nodes...",
197
+ value: searchQuery,
198
+ onChange: (e) => setSearchQuery(e.target.value),
199
+ className: "w-full pl-8 pr-3 py-1.5 text-sm bg-[var(--secondary)] border border-[var(--border)] rounded-md placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-1 focus:ring-[var(--ring)]"
200
+ }
201
+ )
202
+ ] }) }),
203
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: filteredNodes ? (
204
+ // Search results
205
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 space-y-2", children: filteredNodes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--muted-foreground)] text-center py-4", children: "No nodes found" }) : filteredNodes.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
206
+ NodeCard,
207
+ {
208
+ type: node.type,
209
+ label: node.label,
210
+ description: node.description,
211
+ icon: node.icon,
212
+ category: node.category
213
+ },
214
+ node.type
215
+ )) })
216
+ ) : (
217
+ // Category view
218
+ categories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(
219
+ CategorySection,
220
+ {
221
+ category,
222
+ isExpanded: expandedCategories.has(category),
223
+ onToggle: () => toggleCategory(category)
224
+ },
225
+ category
226
+ ))
227
+ ) })
228
+ ] });
229
+ }
230
+ var PanelContainer = react.forwardRef(
231
+ ({ children, className, ...props }, ref) => {
232
+ const stopPropagation = (e) => {
233
+ e.stopPropagation();
234
+ };
235
+ return /* @__PURE__ */ jsxRuntime.jsx(
236
+ "div",
237
+ {
238
+ ref,
239
+ className,
240
+ onClick: stopPropagation,
241
+ onMouseDown: stopPropagation,
242
+ onPointerDown: stopPropagation,
243
+ onDoubleClick: stopPropagation,
244
+ ...props,
245
+ children
246
+ }
247
+ );
248
+ }
249
+ );
250
+ PanelContainer.displayName = "PanelContainer";
251
+ function PayloadCard({ payload }) {
252
+ const [isExpanded, setIsExpanded] = react.useState(false);
253
+ const [copied, setCopied] = react.useState(false);
254
+ const handleCopy = react.useCallback(
255
+ async (e) => {
256
+ e.stopPropagation();
257
+ try {
258
+ await navigator.clipboard.writeText(JSON.stringify(payload.input, null, 2));
259
+ setCopied(true);
260
+ setTimeout(() => setCopied(false), 2e3);
261
+ } catch {
262
+ const textArea = document.createElement("textarea");
263
+ textArea.value = JSON.stringify(payload.input, null, 2);
264
+ textArea.style.position = "fixed";
265
+ textArea.style.left = "-9999px";
266
+ document.body.appendChild(textArea);
267
+ textArea.select();
268
+ try {
269
+ document.execCommand("copy");
270
+ setCopied(true);
271
+ setTimeout(() => setCopied(false), 2e3);
272
+ } catch {
273
+ }
274
+ document.body.removeChild(textArea);
275
+ }
276
+ },
277
+ [payload.input]
278
+ );
279
+ const timestamp = new Date(payload.timestamp).toLocaleTimeString();
280
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-[var(--border)] rounded-lg overflow-hidden", children: [
281
+ /* @__PURE__ */ jsxRuntime.jsxs(
282
+ "button",
283
+ {
284
+ onClick: () => setIsExpanded(!isExpanded),
285
+ className: "w-full flex items-center gap-2 p-3 text-left hover:bg-[var(--muted)]/50 transition",
286
+ children: [
287
+ isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-4 h-4 text-[var(--muted-foreground)] shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-[var(--muted-foreground)] shrink-0" }),
288
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
289
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
290
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--foreground)] truncate", children: payload.nodeName || payload.nodeId }),
291
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] px-1.5 py-0.5 bg-amber-500/10 text-amber-500 rounded", children: payload.nodeType })
292
+ ] }),
293
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[10px] text-[var(--muted-foreground)] mt-0.5", children: [
294
+ payload.model,
295
+ " \u2022 ",
296
+ timestamp
297
+ ] })
298
+ ] })
299
+ ]
300
+ }
301
+ ),
302
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-[var(--border)] p-3 bg-[var(--muted)]/30", children: [
303
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
304
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-[var(--muted-foreground)] uppercase", children: "Payload" }),
305
+ /* @__PURE__ */ jsxRuntime.jsxs(
306
+ "button",
307
+ {
308
+ onClick: handleCopy,
309
+ className: "flex items-center gap-1 text-[10px] text-[var(--primary)] hover:underline",
310
+ children: [
311
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3" }),
312
+ copied ? "Copied!" : "Copy"
313
+ ]
314
+ }
315
+ )
316
+ ] }),
317
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-[11px] font-mono text-[var(--muted-foreground)] bg-[var(--background)] p-2 rounded border border-[var(--border)] overflow-x-auto max-h-64 overflow-y-auto", children: JSON.stringify(payload.input, null, 2) })
318
+ ] })
319
+ ] });
320
+ }
321
+ function DebugPanelComponent() {
322
+ const debugPayloads = chunkEC2ZIWOK_js.useExecutionStore((s) => s.debugPayloads);
323
+ const clearDebugPayloads = chunkEC2ZIWOK_js.useExecutionStore((s) => s.clearDebugPayloads);
324
+ const setShowDebugPanel = chunkEC2ZIWOK_js.useUIStore((s) => s.setShowDebugPanel);
325
+ const handleClose = react.useCallback(() => {
326
+ setShowDebugPanel(false);
327
+ }, [setShowDebugPanel]);
328
+ return /* @__PURE__ */ jsxRuntime.jsxs(PanelContainer, { className: "w-80 h-full border-l border-[var(--border)] bg-[var(--background)] flex flex-col", children: [
329
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border-b border-[var(--border)]", children: [
330
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
331
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bug, { className: "w-4 h-4 text-amber-500" }),
332
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-sm", children: "Debug Console" }),
333
+ debugPayloads.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] px-1.5 py-0.5 bg-amber-500/10 text-amber-500 rounded-full", children: debugPayloads.length })
334
+ ] }),
335
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
336
+ debugPayloads.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
337
+ "button",
338
+ {
339
+ onClick: clearDebugPayloads,
340
+ className: "p-1.5 hover:bg-[var(--muted)] rounded transition",
341
+ title: "Clear all payloads",
342
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-4 h-4 text-[var(--muted-foreground)]" })
343
+ }
344
+ ),
345
+ /* @__PURE__ */ jsxRuntime.jsx(
346
+ "button",
347
+ {
348
+ onClick: handleClose,
349
+ className: "p-1.5 hover:bg-[var(--muted)] rounded transition",
350
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
351
+ }
352
+ )
353
+ ] })
354
+ ] }),
355
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-3 space-y-2", children: debugPayloads.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-[var(--muted-foreground)]", children: [
356
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bug, { className: "w-12 h-12 mx-auto mb-3 opacity-50 text-amber-500/50" }),
357
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium mb-2", children: "No payloads captured" }),
358
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: "Run a workflow with debug mode enabled to capture API payloads." })
359
+ ] }) : debugPayloads.map((payload, index) => /* @__PURE__ */ jsxRuntime.jsx(
360
+ PayloadCard,
361
+ {
362
+ payload
363
+ },
364
+ `${payload.nodeId}-${payload.timestamp}-${index}`
365
+ )) }),
366
+ debugPayloads.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 border-t border-[var(--border)] bg-[var(--muted)]/30", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[10px] text-[var(--muted-foreground)]", children: [
367
+ debugPayloads.length,
368
+ " payload",
369
+ debugPayloads.length !== 1 ? "s" : "",
370
+ " captured. Click to expand and view details."
371
+ ] }) })
372
+ ] });
373
+ }
374
+ var DebugPanel = react.memo(DebugPanelComponent);
375
+
376
+ exports.DebugPanel = DebugPanel;
377
+ exports.NodePalette = NodePalette;
378
+ exports.PanelContainer = PanelContainer;