ezux 1.1.19 → 1.1.21

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 (75) hide show
  1. package/README.md +7 -1
  2. package/dist/{DeleteConfirmationModal-CukNDgtX.cjs → DeleteConfirmationModal-BM1PoL6P.cjs} +1 -1
  3. package/dist/{DeleteConfirmationModal-p8XGDGIw.js → DeleteConfirmationModal-B_tXm0N0.js} +4 -4
  4. package/dist/{EzEventModal-BrCBSXBM.cjs → EzEventModal-D1EzXBsQ.cjs} +1 -1
  5. package/dist/{EzEventModal-BDSHG11m.js → EzEventModal-D5lX9XuW.js} +2 -2
  6. package/dist/{EzFlow-CQFeY7DL.cjs → EzFlow-B4qRm5KH.cjs} +3 -3
  7. package/dist/{EzFlow-C74NbZA9.js → EzFlow-CEfPykao.js} +278 -278
  8. package/dist/EzKanban-2b9skOep.cjs +2 -0
  9. package/dist/{EzKanban-COcGidzh.js → EzKanban-CpYH8b8g.js} +86 -80
  10. package/dist/{EzLayout-CiaPLniV.js → EzLayout-DFxegglu.js} +30 -24
  11. package/dist/EzLayout-EYOfpFXs.cjs +1 -0
  12. package/dist/{EzScheduler-CjQbi1Na.js → EzScheduler-D7aH4KCY.js} +60 -55
  13. package/dist/EzScheduler-hC9PsLrI.cjs +1 -0
  14. package/dist/{EzSchedulerQuickAdd-BeNfGdWs.cjs → EzSchedulerQuickAdd-BYrV9PQ-.cjs} +1 -1
  15. package/dist/{EzSchedulerQuickAdd-BIC8xbSn.js → EzSchedulerQuickAdd-D0kGTzE3.js} +2 -2
  16. package/dist/{EzSchedulerToolbar-jMw8KB8k.js → EzSchedulerToolbar-BhlCMeOT.js} +2 -2
  17. package/dist/{EzSchedulerToolbar-ihfe-5Yd.cjs → EzSchedulerToolbar-Dy62PVnH.cjs} +1 -1
  18. package/dist/{EzSignature-7UHO5lSP.js → EzSignature-B-CPcf7e.js} +5 -2
  19. package/dist/{EzSignature-Df7UZ-IS.cjs → EzSignature-DcmWBPIL.cjs} +1 -1
  20. package/dist/EzTable-Bcq7TByw.cjs +3 -0
  21. package/dist/{EzTable-D2p1IWHc.js → EzTable-DLbb3nl7.js} +1296 -1161
  22. package/dist/EzTableEditDialog--8pD39Rp.cjs +1 -0
  23. package/dist/EzTableEditDialog-m0zW6r6z.js +100 -0
  24. package/dist/{EzTableFooter-DrLoWelo.js → EzTableFooter-BuTS3wDK.js} +1 -1
  25. package/dist/{EzTableToolbar-DwuumvWP.cjs → EzTableToolbar-BWjqKfwx.cjs} +1 -1
  26. package/dist/{EzTableToolbar-BH5z9fSJ.js → EzTableToolbar-BiRfKm9d.js} +2 -2
  27. package/dist/{EzTreeView-D1G0Aomc.js → EzTreeView-B2B_Ruwm.js} +37 -37
  28. package/dist/EzTreeView-DLoPKe2i.cjs +1 -0
  29. package/dist/{KanbanBoard-BsZP_PJi.js → KanbanBoard-CRF0-mYa.js} +119 -119
  30. package/dist/{KanbanBoard-C9bjU_gk.cjs → KanbanBoard-DdXD-Zjt.cjs} +1 -1
  31. package/dist/advanced.cjs +2 -2
  32. package/dist/advanced.es.js +30 -29
  33. package/dist/card-NlCLCGFb.cjs +1 -0
  34. package/dist/{card-ZUNxcdIM.js → card-urNaa5h-.js} +1 -1
  35. package/dist/{checkbox-BrCh_Iid.cjs → checkbox-B9yPkCYi.cjs} +1 -1
  36. package/dist/{checkbox-DRkQuB4W.js → checkbox-BTuckDEm.js} +1 -1
  37. package/dist/components/EzTable/EzTableEditDialog.d.ts +1 -1
  38. package/dist/components/EzTable/hooks/useTableFiltering.d.ts +6 -6
  39. package/dist/components/EzTable/hooks/useTableHistory.d.ts +3 -3
  40. package/dist/components/EzTable/hooks/useTableImperative.d.ts +9 -6
  41. package/dist/components/EzTable/hooks/useTableState.d.ts +12 -12
  42. package/dist/components/EzTable/types/EzTableProps.d.ts +9 -1
  43. package/dist/ezux.css +1 -1
  44. package/dist/flow.cjs +1 -1
  45. package/dist/flow.es.js +1 -1
  46. package/dist/index.cjs +2 -2
  47. package/dist/index.es.js +20 -20
  48. package/dist/input-CcRi0LeO.js +14 -0
  49. package/dist/input-DOh8O0iX.cjs +1 -0
  50. package/dist/kanban.cjs +1 -1
  51. package/dist/kanban.es.js +2 -2
  52. package/dist/layout.cjs +1 -1
  53. package/dist/layout.es.js +1 -1
  54. package/dist/mock-services.cjs +1 -1
  55. package/dist/mock-services.es.js +1 -1
  56. package/dist/scheduler.cjs +1 -1
  57. package/dist/scheduler.es.js +1 -1
  58. package/dist/signature.cjs +1 -1
  59. package/dist/signature.es.js +1 -1
  60. package/dist/table.cjs +1 -1
  61. package/dist/table.es.js +1 -1
  62. package/dist/theme-vars.css +25 -5
  63. package/dist/treeview.cjs +1 -1
  64. package/dist/treeview.es.js +1 -1
  65. package/package.json +39 -36
  66. package/dist/EzKanban-DokdXGqQ.cjs +0 -2
  67. package/dist/EzLayout-BGnqFtvO.cjs +0 -1
  68. package/dist/EzScheduler-B8nV1VWY.cjs +0 -1
  69. package/dist/EzTable-CEXvJR1t.cjs +0 -3
  70. package/dist/EzTableEditDialog-BXnnYSSy.cjs +0 -1
  71. package/dist/EzTableEditDialog-Ccd5XoHm.js +0 -84
  72. package/dist/EzTreeView-KMGlU4ax.cjs +0 -1
  73. package/dist/card-CPlRZxbq.cjs +0 -1
  74. package/dist/input-CYlvlbF7.cjs +0 -1
  75. package/dist/input-Cj3sQK3M.js +0 -14
@@ -1,11 +1,11 @@
1
1
  import { _ as e } from "./EzProvider-AlmsYIDk.js";
2
2
  import { t } from "./button-CYyNwV8S.js";
3
- import { t as n } from "./input-Cj3sQK3M.js";
4
- import { a as r, i, n as a, r as o, t as s } from "./select-D4tFaSai.js";
5
- import { a as c, o as l, r as u, s as d, t as f } from "./card-ZUNxcdIM.js";
6
- import { t as p } from "./DeleteConfirmationModal-p8XGDGIw.js";
3
+ import { t as n } from "./input-CcRi0LeO.js";
4
+ import { a as r, o as i, r as a, s as o, t as s } from "./card-urNaa5h-.js";
5
+ import { a as c, i as l, n as u, r as d, t as f } from "./select-D4tFaSai.js";
6
+ import { t as p } from "./DeleteConfirmationModal-B_tXm0N0.js";
7
7
  import m from "react";
8
- import { AlertCircle as h, Box as g, CheckCircle2 as ee, ChevronDown as _, ChevronLeft as v, ChevronRight as y, Circle as b, Clock as x, Cloud as S, Diamond as C, Download as w, GitBranch as T, GripVertical as te, Hand as ne, PanelLeft as re, PanelLeftClose as ie, Play as E, Redo2 as ae, RefreshCw as oe, Repeat as se, Rocket as ce, Save as le, Send as ue, Square as de, SquareStack as fe, Trash2 as D, Undo2 as pe, Upload as me, User as he, Wand2 as ge, X as O, Zap as _e } from "lucide-react";
8
+ import { AlertCircle as h, Box as g, CheckCircle2 as ee, ChevronDown as _, ChevronLeft as te, ChevronRight as v, Circle as y, Clock as b, Cloud as x, Diamond as S, Download as C, GitBranch as w, GripVertical as ne, Hand as re, PanelLeft as ie, PanelLeftClose as ae, Play as T, Redo2 as oe, RefreshCw as se, Repeat as E, Rocket as ce, Save as le, Send as ue, Square as de, SquareStack as fe, Trash2 as D, Undo2 as pe, Upload as me, User as he, Wand2 as ge, X as O, Zap as _e } from "lucide-react";
9
9
  import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
10
10
  import { Background as ve, BaseEdge as ye, Controls as be, EdgeLabelRenderer as xe, Handle as M, NodeResizer as N, Position as P, ReactFlow as Se, ReactFlowProvider as Ce, addEdge as we, applyEdgeChanges as Te, applyNodeChanges as Ee, getSmoothStepPath as De, useReactFlow as Oe } from "@xyflow/react";
11
11
  //#region src/components/EzFlow/nodes/StartNode.tsx
@@ -18,7 +18,7 @@ var F = m.memo(({ data: t, selected: n }) => {
18
18
  children: [
19
19
  /* @__PURE__ */ j("div", {
20
20
  className: "flex items-center gap-2",
21
- children: [/* @__PURE__ */ A(E, {
21
+ children: [/* @__PURE__ */ A(T, {
22
22
  size: 14,
23
23
  className: "fill-emerald-500"
24
24
  }), /* @__PURE__ */ A("span", {
@@ -153,14 +153,14 @@ L.displayName = "DecisionNode";
153
153
  //#endregion
154
154
  //#region src/components/EzFlow/nodes/LoopNode.tsx
155
155
  var R = m.memo(({ data: t, selected: n }) => {
156
- let { label: r, description: i, maxIterations: a } = t, [o, s] = m.useState(!1);
156
+ let { label: o, description: c, maxIterations: l } = t, [u, d] = m.useState(!1);
157
157
  return /* @__PURE__ */ j("div", {
158
158
  className: "w-full h-full relative group",
159
159
  onPointerDownCapture: (e) => {
160
160
  let t = e.target.closest(".react-flow__resize-control");
161
161
  if (t) {
162
162
  let e = t.getAttribute("data-handlepos")?.includes("-");
163
- s(!!e);
163
+ d(!!e);
164
164
  }
165
165
  },
166
166
  children: [/* @__PURE__ */ A(N, {
@@ -168,13 +168,13 @@ var R = m.memo(({ data: t, selected: n }) => {
168
168
  isVisible: n,
169
169
  minWidth: 160,
170
170
  minHeight: 80,
171
- keepAspectRatio: o,
171
+ keepAspectRatio: u,
172
172
  handleClassName: e("!w-3 !h-3 !bg-white !border-2 transition-all hover:!scale-125 !z-[70] shadow-sm", "data-[handlepos^='top-']:!rounded-sm data-[handlepos^='bottom-']:!rounded-sm !border-indigo-600", "data-[handlepos='top']:!rounded-full data-[handlepos='bottom']:!rounded-full data-[handlepos='left']:!rounded-full data-[handlepos='right']:!rounded-full !border-slate-400"),
173
173
  lineClassName: "!border-indigo-500/30"
174
- }), /* @__PURE__ */ j(f, {
174
+ }), /* @__PURE__ */ j(s, {
175
175
  className: e("w-full h-full rounded-2xl transition-all duration-200 overflow-hidden", "border-2 border-orange-500/30 bg-orange-500/5 backdrop-blur-xl", n && "ring-2 ring-orange-500/40 border-orange-500 shadow-lg"),
176
176
  role: "group",
177
- "aria-label": `Loop node: ${r || "Loop"}`,
177
+ "aria-label": `Loop node: ${o || "Loop"}`,
178
178
  children: [
179
179
  /* @__PURE__ */ A(M, {
180
180
  type: "target",
@@ -182,14 +182,14 @@ var R = m.memo(({ data: t, selected: n }) => {
182
182
  className: "!w-3.5 !h-3.5 !bg-orange-500 !border-[3px] !border-background !z-50",
183
183
  "aria-label": "Input connection"
184
184
  }),
185
- /* @__PURE__ */ j(c, {
185
+ /* @__PURE__ */ j(r, {
186
186
  className: "p-4 space-y-1",
187
187
  children: [
188
188
  /* @__PURE__ */ j("div", {
189
189
  className: "flex items-center gap-2",
190
190
  children: [/* @__PURE__ */ A("div", {
191
191
  className: "flex items-center justify-center w-8 h-8 rounded-lg bg-orange-500/15",
192
- children: /* @__PURE__ */ A(se, {
192
+ children: /* @__PURE__ */ A(E, {
193
193
  size: 16,
194
194
  className: "text-orange-500"
195
195
  })
@@ -198,21 +198,21 @@ var R = m.memo(({ data: t, selected: n }) => {
198
198
  children: [/* @__PURE__ */ A("div", {
199
199
  className: "text-[9px] uppercase font-bold tracking-widest text-orange-500/70",
200
200
  children: "Loop"
201
- }), /* @__PURE__ */ A(l, {
201
+ }), /* @__PURE__ */ A(i, {
202
202
  className: "text-sm font-semibold truncate",
203
- children: r
203
+ children: o
204
204
  })]
205
205
  })]
206
206
  }),
207
- i && /* @__PURE__ */ A(u, {
207
+ c && /* @__PURE__ */ A(a, {
208
208
  className: "text-xs line-clamp-2",
209
- children: i
209
+ children: c
210
210
  }),
211
- a && /* @__PURE__ */ j("div", {
211
+ l && /* @__PURE__ */ j("div", {
212
212
  className: "text-[10px] text-orange-400/80 font-medium",
213
213
  children: [
214
214
  "Max: ",
215
- a,
215
+ l,
216
216
  " iterations"
217
217
  ]
218
218
  })
@@ -239,14 +239,14 @@ R.displayName = "LoopNode";
239
239
  //#endregion
240
240
  //#region src/components/EzFlow/nodes/ActionNode.tsx
241
241
  var z = m.memo(({ data: t, selected: n }) => {
242
- let { label: r, description: i, actionType: a } = t, [o, s] = m.useState(!1);
242
+ let { label: o, description: c, actionType: l } = t, [u, d] = m.useState(!1);
243
243
  return /* @__PURE__ */ j("div", {
244
244
  className: "w-full h-full relative group",
245
245
  onPointerDownCapture: (e) => {
246
246
  let t = e.target.closest(".react-flow__resize-control");
247
247
  if (t) {
248
248
  let e = t.getAttribute("data-handlepos")?.includes("-");
249
- s(!!e);
249
+ d(!!e);
250
250
  }
251
251
  },
252
252
  children: [/* @__PURE__ */ A(N, {
@@ -254,13 +254,13 @@ var z = m.memo(({ data: t, selected: n }) => {
254
254
  isVisible: n,
255
255
  minWidth: 160,
256
256
  minHeight: 80,
257
- keepAspectRatio: o,
257
+ keepAspectRatio: u,
258
258
  handleClassName: e("!w-3 !h-3 !bg-white !border-2 transition-all hover:!scale-125 !z-[70] shadow-sm", "data-[handlepos^='top-']:!rounded-sm data-[handlepos^='bottom-']:!rounded-sm !border-indigo-600", "data-[handlepos='top']:!rounded-full data-[handlepos='bottom']:!rounded-full data-[handlepos='left']:!rounded-full data-[handlepos='right']:!rounded-full !border-slate-400"),
259
259
  lineClassName: "!border-indigo-500/30"
260
- }), /* @__PURE__ */ j(f, {
260
+ }), /* @__PURE__ */ j(s, {
261
261
  className: e("w-full h-full rounded-2xl transition-all duration-200 overflow-hidden", "border-2 border-blue-500/30 bg-blue-500/5 backdrop-blur-xl", n && "ring-2 ring-blue-500/40 border-blue-500 shadow-lg"),
262
262
  role: "group",
263
- "aria-label": `Action node: ${r || "Action"}`,
263
+ "aria-label": `Action node: ${o || "Action"}`,
264
264
  children: [
265
265
  /* @__PURE__ */ A(M, {
266
266
  type: "target",
@@ -268,7 +268,7 @@ var z = m.memo(({ data: t, selected: n }) => {
268
268
  className: "!w-3.5 !h-3.5 !bg-blue-500 !border-[3px] !border-background !z-50",
269
269
  "aria-label": "Input connection"
270
270
  }),
271
- /* @__PURE__ */ j(c, {
271
+ /* @__PURE__ */ j(r, {
272
272
  className: "p-4 space-y-1",
273
273
  children: [
274
274
  /* @__PURE__ */ j("div", {
@@ -284,19 +284,19 @@ var z = m.memo(({ data: t, selected: n }) => {
284
284
  children: [/* @__PURE__ */ A("div", {
285
285
  className: "text-[9px] uppercase font-bold tracking-widest text-blue-500/70",
286
286
  children: "Action"
287
- }), /* @__PURE__ */ A(l, {
287
+ }), /* @__PURE__ */ A(i, {
288
288
  className: "text-sm font-semibold truncate",
289
- children: r
289
+ children: o
290
290
  })]
291
291
  })]
292
292
  }),
293
- i && /* @__PURE__ */ A(u, {
293
+ c && /* @__PURE__ */ A(a, {
294
294
  className: "text-xs line-clamp-2",
295
- children: i
295
+ children: c
296
296
  }),
297
- a && /* @__PURE__ */ A("div", {
297
+ l && /* @__PURE__ */ A("div", {
298
298
  className: "text-[10px] text-blue-400/80 font-medium mt-1",
299
- children: a
299
+ children: l
300
300
  })
301
301
  ]
302
302
  }),
@@ -314,14 +314,14 @@ z.displayName = "ActionNode";
314
314
  //#endregion
315
315
  //#region src/components/EzFlow/nodes/RequestNode.tsx
316
316
  var B = m.memo(({ data: t, selected: n }) => {
317
- let { label: r, description: i, method: a, url: o } = t, [s, d] = m.useState(!1);
317
+ let { label: o, description: c, method: l, url: u } = t, [d, f] = m.useState(!1);
318
318
  return /* @__PURE__ */ j("div", {
319
319
  className: "w-full h-full relative group",
320
320
  onPointerDownCapture: (e) => {
321
321
  let t = e.target.closest(".react-flow__resize-control");
322
322
  if (t) {
323
323
  let e = t.getAttribute("data-handlepos")?.includes("-");
324
- d(!!e);
324
+ f(!!e);
325
325
  }
326
326
  },
327
327
  children: [/* @__PURE__ */ A(N, {
@@ -329,13 +329,13 @@ var B = m.memo(({ data: t, selected: n }) => {
329
329
  isVisible: n,
330
330
  minWidth: 200,
331
331
  minHeight: 100,
332
- keepAspectRatio: s,
332
+ keepAspectRatio: d,
333
333
  handleClassName: e("!w-3 !h-3 !bg-white !border-2 transition-all hover:!scale-125 !z-[70] shadow-sm", "data-[handlepos^='top-']:!rounded-sm data-[handlepos^='bottom-']:!rounded-sm !border-indigo-600", "data-[handlepos='top']:!rounded-full data-[handlepos='bottom']:!rounded-full data-[handlepos='left']:!rounded-full data-[handlepos='right']:!rounded-full !border-slate-400"),
334
334
  lineClassName: "!border-indigo-500/30"
335
- }), /* @__PURE__ */ j(f, {
335
+ }), /* @__PURE__ */ j(s, {
336
336
  className: e("w-full h-full rounded-2xl transition-all duration-200 overflow-hidden", "border-2 border-indigo-500/30 bg-indigo-500/5 backdrop-blur-xl", n && "ring-2 ring-indigo-500/40 border-indigo-500 shadow-lg"),
337
337
  role: "group",
338
- "aria-label": `Request node: ${r || "HTTP Request"}`,
338
+ "aria-label": `Request node: ${o || "HTTP Request"}`,
339
339
  children: [
340
340
  /* @__PURE__ */ A(M, {
341
341
  type: "target",
@@ -343,14 +343,14 @@ var B = m.memo(({ data: t, selected: n }) => {
343
343
  className: "!w-3.5 !h-3.5 !bg-indigo-500 !border-[3px] !border-background !z-50",
344
344
  "aria-label": "Input connection"
345
345
  }),
346
- /* @__PURE__ */ j(c, {
346
+ /* @__PURE__ */ j(r, {
347
347
  className: "p-4 space-y-1",
348
348
  children: [
349
349
  /* @__PURE__ */ j("div", {
350
350
  className: "flex items-center gap-2",
351
351
  children: [/* @__PURE__ */ A("div", {
352
352
  className: "flex items-center justify-center w-8 h-8 rounded-lg bg-indigo-500/15",
353
- children: /* @__PURE__ */ A(S, {
353
+ children: /* @__PURE__ */ A(x, {
354
354
  size: 16,
355
355
  className: "text-indigo-500"
356
356
  })
@@ -359,24 +359,24 @@ var B = m.memo(({ data: t, selected: n }) => {
359
359
  children: [/* @__PURE__ */ A("div", {
360
360
  className: "text-[9px] uppercase font-bold tracking-widest text-indigo-500/70",
361
361
  children: "HTTP Request"
362
- }), /* @__PURE__ */ A(l, {
362
+ }), /* @__PURE__ */ A(i, {
363
363
  className: "text-sm font-semibold truncate",
364
- children: r
364
+ children: o
365
365
  })]
366
366
  })]
367
367
  }),
368
- i && /* @__PURE__ */ A(u, {
368
+ c && /* @__PURE__ */ A(a, {
369
369
  className: "text-xs line-clamp-2",
370
- children: i
370
+ children: c
371
371
  }),
372
- (a || o) && /* @__PURE__ */ j("div", {
372
+ (l || u) && /* @__PURE__ */ j("div", {
373
373
  className: "flex items-center gap-2 mt-1",
374
- children: [a && /* @__PURE__ */ A("span", {
374
+ children: [l && /* @__PURE__ */ A("span", {
375
375
  className: "text-[9px] font-black uppercase tracking-wider px-2 py-0.5 rounded-full bg-indigo-500/20 text-indigo-400",
376
- children: a
377
- }), o && /* @__PURE__ */ A("span", {
376
+ children: l
377
+ }), u && /* @__PURE__ */ A("span", {
378
378
  className: "text-[10px] text-muted-foreground truncate max-w-[120px]",
379
- children: o
379
+ children: u
380
380
  })]
381
381
  })
382
382
  ]
@@ -395,7 +395,7 @@ B.displayName = "RequestNode";
395
395
  //#endregion
396
396
  //#region src/components/EzFlow/nodes/DelayNode.tsx
397
397
  var ke = m.memo(({ data: t, selected: n }) => {
398
- let { label: r, description: i, duration: a, unit: o } = t, s = () => a ? `${a} ${o || "minutes"}` : null, [d, p] = m.useState(!1);
398
+ let { label: o, description: c, duration: l, unit: u } = t, d = () => l ? `${l} ${u || "minutes"}` : null, [f, p] = m.useState(!1);
399
399
  return /* @__PURE__ */ j("div", {
400
400
  className: "w-full h-full relative group",
401
401
  onPointerDownCapture: (e) => {
@@ -410,13 +410,13 @@ var ke = m.memo(({ data: t, selected: n }) => {
410
410
  isVisible: n,
411
411
  minWidth: 160,
412
412
  minHeight: 80,
413
- keepAspectRatio: d,
413
+ keepAspectRatio: f,
414
414
  handleClassName: e("!w-3 !h-3 !bg-white !border-2 transition-all hover:!scale-125 !z-[70] shadow-sm", "data-[handlepos^='top-']:!rounded-sm data-[handlepos^='bottom-']:!rounded-sm !border-indigo-600", "data-[handlepos='top']:!rounded-full data-[handlepos='bottom']:!rounded-full data-[handlepos='left']:!rounded-full data-[handlepos='right']:!rounded-full !border-slate-400"),
415
415
  lineClassName: "!border-indigo-500/30"
416
- }), /* @__PURE__ */ j(f, {
416
+ }), /* @__PURE__ */ j(s, {
417
417
  className: e("w-full h-full rounded-2xl transition-all duration-200 overflow-hidden", "border-2 border-gray-400/30 bg-gray-500/5 backdrop-blur-xl", n && "ring-2 ring-gray-400/40 border-gray-400 shadow-lg"),
418
418
  role: "group",
419
- "aria-label": `Delay node: ${r || "Delay"}`,
419
+ "aria-label": `Delay node: ${o || "Delay"}`,
420
420
  children: [
421
421
  /* @__PURE__ */ A(M, {
422
422
  type: "target",
@@ -424,14 +424,14 @@ var ke = m.memo(({ data: t, selected: n }) => {
424
424
  className: "!w-3.5 !h-3.5 !bg-gray-400 !border-[3px] !border-background !z-50",
425
425
  "aria-label": "Input connection"
426
426
  }),
427
- /* @__PURE__ */ j(c, {
427
+ /* @__PURE__ */ j(r, {
428
428
  className: "p-4 space-y-1",
429
429
  children: [
430
430
  /* @__PURE__ */ j("div", {
431
431
  className: "flex items-center gap-2",
432
432
  children: [/* @__PURE__ */ A("div", {
433
433
  className: "flex items-center justify-center w-8 h-8 rounded-lg bg-gray-500/15",
434
- children: /* @__PURE__ */ A(x, {
434
+ children: /* @__PURE__ */ A(b, {
435
435
  size: 16,
436
436
  className: "text-gray-400"
437
437
  })
@@ -440,19 +440,19 @@ var ke = m.memo(({ data: t, selected: n }) => {
440
440
  children: [/* @__PURE__ */ A("div", {
441
441
  className: "text-[9px] uppercase font-bold tracking-widest text-gray-400/70",
442
442
  children: "Delay"
443
- }), /* @__PURE__ */ A(l, {
443
+ }), /* @__PURE__ */ A(i, {
444
444
  className: "text-sm font-semibold truncate",
445
- children: r
445
+ children: o
446
446
  })]
447
447
  })]
448
448
  }),
449
- i && /* @__PURE__ */ A(u, {
449
+ c && /* @__PURE__ */ A(a, {
450
450
  className: "text-xs line-clamp-2",
451
- children: i
451
+ children: c
452
452
  }),
453
- s() && /* @__PURE__ */ j("div", {
453
+ d() && /* @__PURE__ */ j("div", {
454
454
  className: "flex items-center gap-1.5 text-[10px] text-gray-400/80 font-medium mt-1",
455
- children: [/* @__PURE__ */ A(x, { size: 10 }), s()]
455
+ children: [/* @__PURE__ */ A(b, { size: 10 }), d()]
456
456
  })
457
457
  ]
458
458
  }),
@@ -470,14 +470,14 @@ ke.displayName = "DelayNode";
470
470
  //#endregion
471
471
  //#region src/components/EzFlow/nodes/ApprovalNode.tsx
472
472
  var V = m.memo(({ data: t, selected: n }) => {
473
- let { label: r, description: i, approverRole: a, slaHours: o } = t, [s, d] = m.useState(!1);
473
+ let { label: o, description: c, approverRole: l, slaHours: u } = t, [d, f] = m.useState(!1);
474
474
  return /* @__PURE__ */ j("div", {
475
475
  className: "w-full h-full relative group",
476
476
  onPointerDownCapture: (e) => {
477
477
  let t = e.target.closest(".react-flow__resize-control");
478
478
  if (t) {
479
479
  let e = t.getAttribute("data-handlepos")?.includes("-");
480
- d(!!e);
480
+ f(!!e);
481
481
  }
482
482
  },
483
483
  children: [/* @__PURE__ */ A(N, {
@@ -485,13 +485,13 @@ var V = m.memo(({ data: t, selected: n }) => {
485
485
  isVisible: n,
486
486
  minWidth: 200,
487
487
  minHeight: 100,
488
- keepAspectRatio: s,
488
+ keepAspectRatio: d,
489
489
  handleClassName: e("!w-3 !h-3 !bg-white !border-2 transition-all hover:!scale-125 !z-[70] shadow-sm", "data-[handlepos^='top-']:!rounded-sm data-[handlepos^='bottom-']:!rounded-sm !border-indigo-600", "data-[handlepos='top']:!rounded-full data-[handlepos='bottom']:!rounded-full data-[handlepos='left']:!rounded-full data-[handlepos='right']:!rounded-full !border-slate-400"),
490
490
  lineClassName: "!border-indigo-500/30"
491
- }), /* @__PURE__ */ j(f, {
491
+ }), /* @__PURE__ */ j(s, {
492
492
  className: e("w-full h-full rounded-2xl transition-all duration-200 overflow-hidden", "border-2 border-purple-500/30 bg-purple-500/5 backdrop-blur-xl", n && "ring-2 ring-purple-500/40 border-purple-500 shadow-lg"),
493
493
  role: "group",
494
- "aria-label": `Approval node: ${r || "Approval"}`,
494
+ "aria-label": `Approval node: ${o || "Approval"}`,
495
495
  children: [
496
496
  /* @__PURE__ */ A(M, {
497
497
  type: "target",
@@ -499,7 +499,7 @@ var V = m.memo(({ data: t, selected: n }) => {
499
499
  className: "!w-3.5 !h-3.5 !bg-purple-500 !border-[3px] !border-background !z-50",
500
500
  "aria-label": "Input connection"
501
501
  }),
502
- /* @__PURE__ */ j(c, {
502
+ /* @__PURE__ */ j(r, {
503
503
  className: "p-4 space-y-1",
504
504
  children: [
505
505
  /* @__PURE__ */ j("div", {
@@ -515,31 +515,31 @@ var V = m.memo(({ data: t, selected: n }) => {
515
515
  children: [/* @__PURE__ */ A("div", {
516
516
  className: "text-[9px] uppercase font-bold tracking-widest text-purple-500/70",
517
517
  children: "Approval"
518
- }), /* @__PURE__ */ A(l, {
518
+ }), /* @__PURE__ */ A(i, {
519
519
  className: "text-sm font-semibold truncate",
520
- children: r
520
+ children: o
521
521
  })]
522
522
  })]
523
523
  }),
524
- i && /* @__PURE__ */ A(u, {
524
+ c && /* @__PURE__ */ A(a, {
525
525
  className: "text-xs line-clamp-2",
526
- children: i
526
+ children: c
527
527
  }),
528
528
  /* @__PURE__ */ j("div", {
529
529
  className: "flex flex-col gap-1 mt-1",
530
- children: [a && /* @__PURE__ */ j("div", {
530
+ children: [l && /* @__PURE__ */ j("div", {
531
531
  className: "flex items-center gap-1.5 text-[10px] text-purple-400/80 font-medium",
532
532
  children: [
533
533
  /* @__PURE__ */ A(he, { size: 10 }),
534
534
  " ",
535
- a
535
+ l
536
536
  ]
537
- }), o && /* @__PURE__ */ j("div", {
537
+ }), u && /* @__PURE__ */ j("div", {
538
538
  className: "flex items-center gap-1.5 text-[10px] text-purple-400/60 font-medium",
539
539
  children: [
540
- /* @__PURE__ */ A(x, { size: 10 }),
540
+ /* @__PURE__ */ A(b, { size: 10 }),
541
541
  " ",
542
- o,
542
+ u,
543
543
  "h SLA"
544
544
  ]
545
545
  })]
@@ -752,11 +752,11 @@ var U = {
752
752
  delayNode: ke,
753
753
  approvalNode: V,
754
754
  groupNode: H
755
- }, Pe = m.forwardRef(({ nodes: t, edges: n, onNodesChange: r, onEdgesChange: i, onConnect: a, onDrop: o, onDragOver: s, onNodeClick: c, onNodeDoubleClick: l, onEdgeClick: u, onEdgeDelete: d, onPaneClick: f, nodeTypes: p = U, edgeTypes: h, isValidConnection: g, snapToGrid: ee = !0, snapGrid: _ = [15, 15], showGrid: v = !0, fitView: y = !1, readOnly: b = !1, className: x, style: S, ...C }, w) => {
756
- let T = m.useMemo(() => h ?? { ezEdge: (e) => /* @__PURE__ */ A(Ae, {
755
+ }, Pe = m.forwardRef(({ nodes: t, edges: n, onNodesChange: r, onEdgesChange: i, onConnect: a, onDrop: o, onDragOver: s, onNodeClick: c, onNodeDoubleClick: l, onEdgeClick: u, onEdgeDelete: d, onPaneClick: f, nodeTypes: p = U, edgeTypes: h, isValidConnection: g, snapToGrid: ee = !0, snapGrid: _ = [15, 15], showGrid: te = !0, fitView: v = !1, readOnly: y = !1, className: b, style: x, ...S }, C) => {
756
+ let w = m.useMemo(() => h ?? { ezEdge: (e) => /* @__PURE__ */ A(Ae, {
757
757
  ...e,
758
758
  onDelete: d
759
- }) }, [h, d]), te = m.useCallback((e) => {
759
+ }) }, [h, d]), ne = m.useCallback((e) => {
760
760
  if (g) return g(e);
761
761
  if (!e.source || !e.target || e.source === e.target) return !1;
762
762
  let r = new Map(t.map((e) => [e.id, e])), i = /* @__PURE__ */ new Set(), a = [{
@@ -783,27 +783,27 @@ var U = {
783
783
  t
784
784
  ]);
785
785
  return /* @__PURE__ */ A("div", {
786
- ref: w,
787
- className: e("w-full h-full min-h-0 relative", x),
788
- style: S,
789
- ...C,
786
+ ref: C,
787
+ className: e("w-full h-full min-h-0 relative", b),
788
+ style: x,
789
+ ...S,
790
790
  children: /* @__PURE__ */ j(Se, {
791
791
  nodes: t,
792
792
  edges: n,
793
- onNodesChange: b ? void 0 : r,
794
- onEdgesChange: b ? void 0 : i,
795
- onConnect: b ? void 0 : a,
796
- onDrop: b ? void 0 : o,
797
- onDragOver: b ? void 0 : s,
793
+ onNodesChange: y ? void 0 : r,
794
+ onEdgesChange: y ? void 0 : i,
795
+ onConnect: y ? void 0 : a,
796
+ onDrop: y ? void 0 : o,
797
+ onDragOver: y ? void 0 : s,
798
798
  onNodeClick: c,
799
799
  onNodeDoubleClick: l,
800
800
  onEdgeClick: u,
801
801
  onPaneClick: f,
802
802
  nodeTypes: p,
803
- edgeTypes: T,
803
+ edgeTypes: w,
804
804
  connectionLineComponent: je,
805
- isValidConnection: te,
806
- fitView: y,
805
+ isValidConnection: ne,
806
+ fitView: v,
807
807
  defaultViewport: {
808
808
  x: 0,
809
809
  y: 0,
@@ -813,16 +813,16 @@ var U = {
813
813
  zoomOnScroll: !1,
814
814
  snapToGrid: ee,
815
815
  snapGrid: _,
816
- nodesDraggable: !b,
817
- nodesConnectable: !b,
818
- elementsSelectable: !b,
816
+ nodesDraggable: !y,
817
+ nodesConnectable: !y,
818
+ elementsSelectable: !y,
819
819
  defaultEdgeOptions: {
820
820
  type: "ezEdge",
821
821
  animated: !0,
822
822
  selectable: !0
823
823
  },
824
824
  proOptions: { hideAttribution: !0 },
825
- children: [v && /* @__PURE__ */ A(Me, {
825
+ children: [te && /* @__PURE__ */ A(Me, {
826
826
  gap: _[0],
827
827
  size: 1.5
828
828
  }), /* @__PURE__ */ A(Ne, { "aria-label": "Canvas controls" })]
@@ -843,7 +843,7 @@ var Fe = ({ category: e, isExpanded: t, onToggle: n, onNodeActivate: r }) => {
843
843
  onClick: n,
844
844
  "aria-expanded": t,
845
845
  "aria-label": `Toggle ${e.categoryKey} section`,
846
- children: [A(t ? _ : y, { size: 12 }), e.categoryKey]
846
+ children: [A(t ? _ : v, { size: 12 }), e.categoryKey]
847
847
  }), t && /* @__PURE__ */ A("div", {
848
848
  className: "flex flex-col gap-1.5 mt-1 px-1",
849
849
  children: e.items.map((e) => /* @__PURE__ */ j("div", {
@@ -861,7 +861,7 @@ var Fe = ({ category: e, isExpanded: t, onToggle: n, onNodeActivate: r }) => {
861
861
  children: [
862
862
  /* @__PURE__ */ A("div", {
863
863
  className: "absolute left-1 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-30 transition-opacity",
864
- children: /* @__PURE__ */ A(te, { size: 12 })
864
+ children: /* @__PURE__ */ A(ne, { size: 12 })
865
865
  }),
866
866
  /* @__PURE__ */ A("div", {
867
867
  className: "flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 text-primary group-hover:scale-110 transition-transform ml-2",
@@ -897,7 +897,7 @@ var Fe = ({ category: e, isExpanded: t, onToggle: n, onNodeActivate: r }) => {
897
897
  className: "rounded-xl mb-2",
898
898
  onClick: () => o?.(!1),
899
899
  "aria-label": "Expand node library",
900
- children: /* @__PURE__ */ A(re, { size: 16 })
900
+ children: /* @__PURE__ */ A(ie, { size: 16 })
901
901
  }), n.flatMap((e) => e.items.map((e) => /* @__PURE__ */ A("div", {
902
902
  className: "w-10 h-10 flex items-center justify-center rounded-xl hover:bg-primary/10 cursor-grab active:cursor-grabbing transition-colors mb-1",
903
903
  onDragStart: (t) => {
@@ -929,7 +929,7 @@ var Fe = ({ category: e, isExpanded: t, onToggle: n, onNodeActivate: r }) => {
929
929
  className: "rounded-xl w-7 h-7",
930
930
  onClick: () => o(!0),
931
931
  "aria-label": "Collapse node library",
932
- children: /* @__PURE__ */ A(ie, { size: 14 })
932
+ children: /* @__PURE__ */ A(ae, { size: 14 })
933
933
  })]
934
934
  }), n.map((e) => /* @__PURE__ */ A(Fe, {
935
935
  category: e,
@@ -956,19 +956,19 @@ var W = {
956
956
  label: "Archived"
957
957
  }
958
958
  }, Le = ({ title: n, description: r, status: i = "draft", isDirty: a = !1, onTitleChange: o, onDescriptionChange: s, onSave: c, onPublish: l, onCancel: u, showGrid: d = !0, onShowGridChange: f, snapToGrid: p = !0, onSnapToGridChange: h, className: g }) => {
959
- let [ee, _] = m.useState(!1), [y, b] = m.useState(!1), [x, S] = m.useState(n), [C, w] = m.useState(r || ""), T = m.useRef(null), te = m.useRef(null);
959
+ let [ee, _] = m.useState(!1), [v, y] = m.useState(!1), [b, x] = m.useState(n), [S, C] = m.useState(r || ""), w = m.useRef(null), ne = m.useRef(null);
960
960
  m.useEffect(() => {
961
- S(n);
961
+ x(n);
962
962
  }, [n]), m.useEffect(() => {
963
- w(r || "");
963
+ C(r || "");
964
964
  }, [r]);
965
- let ne = () => {
966
- _(!1), x !== n && o?.(x);
967
- }, re = () => {
968
- b(!1), C !== r && s?.(C);
965
+ let re = () => {
966
+ _(!1), b !== n && o?.(b);
969
967
  }, ie = () => {
968
+ y(!1), S !== r && s?.(S);
969
+ }, ae = () => {
970
970
  a && !window.confirm("You have unsaved changes. Discard and exit?") || u?.();
971
- }, E = W[i];
971
+ }, T = W[i];
972
972
  return /* @__PURE__ */ j("header", {
973
973
  className: e("h-16 border-b border-border flex items-center justify-between px-6 bg-card/50 backdrop-blur-xl shrink-0", g),
974
974
  role: "banner",
@@ -980,20 +980,20 @@ var W = {
980
980
  variant: "ghost",
981
981
  size: "icon",
982
982
  className: "rounded-xl shrink-0",
983
- onClick: ie,
983
+ onClick: ae,
984
984
  "aria-label": "Go back",
985
- children: /* @__PURE__ */ A(v, { size: 18 })
985
+ children: /* @__PURE__ */ A(te, { size: 18 })
986
986
  }),
987
987
  /* @__PURE__ */ A("div", { className: "h-6 w-px bg-border shrink-0" }),
988
988
  /* @__PURE__ */ j("div", {
989
989
  className: "flex flex-col min-w-0",
990
990
  children: [ee ? /* @__PURE__ */ A("input", {
991
- ref: T,
992
- value: x,
993
- onChange: (e) => S(e.target.value),
994
- onBlur: ne,
991
+ ref: w,
992
+ value: b,
993
+ onChange: (e) => x(e.target.value),
994
+ onBlur: re,
995
995
  onKeyDown: (e) => {
996
- e.key === "Enter" && ne(), e.key === "Escape" && (S(n), _(!1));
996
+ e.key === "Enter" && re(), e.key === "Escape" && (x(n), _(!1));
997
997
  },
998
998
  className: "text-base font-bold bg-transparent border-none outline-none ring-0 p-0 text-foreground w-full",
999
999
  autoFocus: !0,
@@ -1001,20 +1001,20 @@ var W = {
1001
1001
  }) : /* @__PURE__ */ j("button", {
1002
1002
  className: "text-base font-bold text-left hover:text-primary transition-colors cursor-text truncate",
1003
1003
  onClick: () => {
1004
- _(!0), setTimeout(() => T.current?.focus(), 0);
1004
+ _(!0), setTimeout(() => w.current?.focus(), 0);
1005
1005
  },
1006
- "aria-label": `Workflow title: ${x}. Click to edit`,
1007
- children: [x || "Untitled Workflow", a && /* @__PURE__ */ A("span", {
1006
+ "aria-label": `Workflow title: ${b}. Click to edit`,
1007
+ children: [b || "Untitled Workflow", a && /* @__PURE__ */ A("span", {
1008
1008
  className: "ml-2 text-[9px] text-muted-foreground/50 font-normal",
1009
1009
  children: "(unsaved)"
1010
1010
  })]
1011
- }), y ? /* @__PURE__ */ A("input", {
1012
- ref: te,
1013
- value: C,
1014
- onChange: (e) => w(e.target.value),
1015
- onBlur: re,
1011
+ }), v ? /* @__PURE__ */ A("input", {
1012
+ ref: ne,
1013
+ value: S,
1014
+ onChange: (e) => C(e.target.value),
1015
+ onBlur: ie,
1016
1016
  onKeyDown: (e) => {
1017
- e.key === "Enter" && re(), e.key === "Escape" && (w(r || ""), b(!1));
1017
+ e.key === "Enter" && ie(), e.key === "Escape" && (C(r || ""), y(!1));
1018
1018
  },
1019
1019
  className: "text-[10px] uppercase tracking-widest text-muted-foreground bg-transparent border-none outline-none ring-0 p-0 w-full",
1020
1020
  autoFocus: !0,
@@ -1022,17 +1022,17 @@ var W = {
1022
1022
  }) : /* @__PURE__ */ A("button", {
1023
1023
  className: "text-[10px] uppercase tracking-widest text-muted-foreground/50 text-left hover:text-muted-foreground transition-colors cursor-text truncate",
1024
1024
  onClick: () => {
1025
- b(!0), setTimeout(() => te.current?.focus(), 0);
1025
+ y(!0), setTimeout(() => ne.current?.focus(), 0);
1026
1026
  },
1027
- "aria-label": `Description: ${C || "Click to add description"}`,
1028
- children: C || "Click to add description"
1027
+ "aria-label": `Description: ${S || "Click to add description"}`,
1028
+ children: S || "Click to add description"
1029
1029
  })]
1030
1030
  }),
1031
1031
  /* @__PURE__ */ A("div", {
1032
- className: e("shrink-0 px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-widest", E.className),
1032
+ className: e("shrink-0 px-3 py-1 rounded-full border text-[10px] font-bold uppercase tracking-widest", T.className),
1033
1033
  role: "status",
1034
- "aria-label": `Status: ${E.label}`,
1035
- children: E.label
1034
+ "aria-label": `Status: ${T.label}`,
1035
+ children: T.label
1036
1036
  })
1037
1037
  ]
1038
1038
  }), /* @__PURE__ */ j("div", {
@@ -1072,7 +1072,7 @@ var W = {
1072
1072
  /* @__PURE__ */ j(t, {
1073
1073
  variant: "ghost",
1074
1074
  className: "rounded-xl h-9 px-4 text-xs gap-2",
1075
- onClick: ie,
1075
+ onClick: ae,
1076
1076
  "aria-label": "Cancel changes",
1077
1077
  children: [/* @__PURE__ */ A(O, { size: 14 }), "Cancel"]
1078
1078
  }),
@@ -1157,7 +1157,7 @@ var Re = {
1157
1157
  label: "Start",
1158
1158
  description: "Workflow entry point",
1159
1159
  category: "flow_control",
1160
- icon: /* @__PURE__ */ A(E, { size: 16 }),
1160
+ icon: /* @__PURE__ */ A(T, { size: 16 }),
1161
1161
  component: F,
1162
1162
  defaultData: G.startNode
1163
1163
  },
@@ -1175,7 +1175,7 @@ var Re = {
1175
1175
  label: "Decision",
1176
1176
  description: "Branch by condition",
1177
1177
  category: "logic",
1178
- icon: /* @__PURE__ */ A(C, { size: 16 }),
1178
+ icon: /* @__PURE__ */ A(S, { size: 16 }),
1179
1179
  component: L,
1180
1180
  defaultData: G.decisionNode,
1181
1181
  requiredDataKeys: ["branches"]
@@ -1185,7 +1185,7 @@ var Re = {
1185
1185
  label: "Loop",
1186
1186
  description: "Repeat a path",
1187
1187
  category: "flow_control",
1188
- icon: /* @__PURE__ */ A(T, { size: 16 }),
1188
+ icon: /* @__PURE__ */ A(w, { size: 16 }),
1189
1189
  component: R,
1190
1190
  defaultData: G.loopNode,
1191
1191
  requiredDataKeys: ["iteratorSource"]
@@ -1195,7 +1195,7 @@ var Re = {
1195
1195
  label: "Action",
1196
1196
  description: "Run an action",
1197
1197
  category: "execution",
1198
- icon: /* @__PURE__ */ A(b, { size: 16 }),
1198
+ icon: /* @__PURE__ */ A(y, { size: 16 }),
1199
1199
  component: z,
1200
1200
  defaultData: G.actionNode,
1201
1201
  requiredDataKeys: ["actionType"]
@@ -1215,7 +1215,7 @@ var Re = {
1215
1215
  label: "Delay",
1216
1216
  description: "Pause execution",
1217
1217
  category: "logic",
1218
- icon: /* @__PURE__ */ A(x, { size: 16 }),
1218
+ icon: /* @__PURE__ */ A(b, { size: 16 }),
1219
1219
  component: ke,
1220
1220
  defaultData: G.delayNode,
1221
1221
  requiredDataKeys: ["duration"]
@@ -1225,7 +1225,7 @@ var Re = {
1225
1225
  label: "Approval",
1226
1226
  description: "Wait for a person",
1227
1227
  category: "human",
1228
- icon: /* @__PURE__ */ A(ne, { size: 16 }),
1228
+ icon: /* @__PURE__ */ A(re, { size: 16 }),
1229
1229
  component: V,
1230
1230
  defaultData: G.approvalNode,
1231
1231
  requiredDataKeys: ["approverRole"]
@@ -1276,7 +1276,7 @@ var Re = {
1276
1276
  labelKey: e.label,
1277
1277
  descriptionKey: e.description,
1278
1278
  category: e.category,
1279
- icon: e.icon ?? /* @__PURE__ */ A(b, { size: 16 }),
1279
+ icon: e.icon ?? /* @__PURE__ */ A(y, { size: 16 }),
1280
1280
  defaultData: e.defaultData
1281
1281
  }), t.set(e.category, n);
1282
1282
  }), Array.from(t.values()).sort((e, t) => K.indexOf(e.category) - K.indexOf(t.category));
@@ -1364,10 +1364,10 @@ var Re = {
1364
1364
  }, X = Y, Z = (e) => e == null ? "" : String(e), Q = (e) => e.split("\n").map((e) => e.trim()).filter(Boolean).reduce((e, t) => {
1365
1365
  let [n, ...r] = t.split(":");
1366
1366
  return n && r.length > 0 && (e[n.trim()] = r.join(":").trim()), e;
1367
- }, {}), Ue = (e) => e && typeof e == "object" ? Object.entries(e).map(([e, t]) => `${e}: ${t}`).join("\n") : "", We = ({ node: c, registry: l, issues: u, readOnly: f, onChange: g, onDelete: ee, onClose: _, className: v }) => {
1368
- let [y, b] = m.useState(!1);
1369
- if (!c) return /* @__PURE__ */ j("aside", {
1370
- className: e("w-80 border-l border-border bg-card/35 p-4", v),
1367
+ }, {}), Ue = (e) => e && typeof e == "object" ? Object.entries(e).map(([e, t]) => `${e}: ${t}`).join("\n") : "", We = ({ node: r, registry: i, issues: a, readOnly: s, onChange: g, onDelete: ee, onClose: _, className: te }) => {
1368
+ let [v, y] = m.useState(!1);
1369
+ if (!r) return /* @__PURE__ */ j("aside", {
1370
+ className: e("w-80 border-l border-border bg-card/35 p-4", te),
1371
1371
  "aria-label": "Workflow inspector",
1372
1372
  children: [/* @__PURE__ */ A("div", {
1373
1373
  className: "text-xs font-bold uppercase tracking-wide text-muted-foreground",
@@ -1377,15 +1377,15 @@ var Re = {
1377
1377
  children: "Select a node to edit its configuration."
1378
1378
  })]
1379
1379
  });
1380
- let x = l[String(c.type ?? "")], S = c.data, C = x?.editor, w = (t, n, r) => /* @__PURE__ */ j("label", {
1380
+ let b = i[String(r.type ?? "")], x = r.data, S = b?.editor, C = (t, n, r) => /* @__PURE__ */ j("label", {
1381
1381
  className: "grid gap-1.5",
1382
1382
  children: [/* @__PURE__ */ A("span", {
1383
- className: e("text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", (r ? u.some((e) => e.field === r) : !1) && "text-destructive"),
1383
+ className: e("text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", (r ? a.some((e) => e.field === r) : !1) && "text-destructive"),
1384
1384
  children: t
1385
1385
  }), n]
1386
- }), T = (e) => g(e);
1386
+ }), w = (e) => g(e);
1387
1387
  return /* @__PURE__ */ j("aside", {
1388
- className: e("w-80 border-l border-border bg-card/35 p-4 overflow-y-auto", v),
1388
+ className: e("w-80 border-l border-border bg-card/35 p-4 overflow-y-auto", te),
1389
1389
  "aria-label": "Workflow inspector",
1390
1390
  children: [
1391
1391
  /* @__PURE__ */ j("div", {
@@ -1397,7 +1397,7 @@ var Re = {
1397
1397
  children: "Inspector"
1398
1398
  }), /* @__PURE__ */ A("div", {
1399
1399
  className: "truncate text-sm font-semibold",
1400
- children: x?.label ?? c.type ?? "Node"
1400
+ children: b?.label ?? r.type ?? "Node"
1401
1401
  })]
1402
1402
  }), /* @__PURE__ */ A(t, {
1403
1403
  variant: "ghost",
@@ -1410,186 +1410,186 @@ var Re = {
1410
1410
  /* @__PURE__ */ j("div", {
1411
1411
  className: "mt-4 grid gap-4",
1412
1412
  children: [
1413
- w("Label", /* @__PURE__ */ A(n, {
1414
- value: Z(S.label),
1415
- onChange: (e) => T({ label: e.target.value }),
1416
- disabled: f
1413
+ C("Label", /* @__PURE__ */ A(n, {
1414
+ value: Z(x.label),
1415
+ onChange: (e) => w({ label: e.target.value }),
1416
+ disabled: s
1417
1417
  }), "label"),
1418
- w("Description", /* @__PURE__ */ A(d, {
1419
- value: Z(S.description),
1420
- onChange: (e) => T({ description: e.target.value }),
1421
- disabled: f
1418
+ C("Description", /* @__PURE__ */ A(o, {
1419
+ value: Z(x.description),
1420
+ onChange: (e) => w({ description: e.target.value }),
1421
+ disabled: s
1422
1422
  })),
1423
1423
  (() => {
1424
- if (C) return /* @__PURE__ */ A(C, {
1425
- node: c,
1426
- data: S,
1427
- onChange: T,
1428
- readOnly: f,
1429
- issues: u
1424
+ if (S) return /* @__PURE__ */ A(S, {
1425
+ node: r,
1426
+ data: x,
1427
+ onChange: w,
1428
+ readOnly: s,
1429
+ issues: a
1430
1430
  });
1431
- switch (c.type) {
1432
- case "startNode": return w("Trigger", /* @__PURE__ */ j(s, {
1433
- value: Z("triggerType" in S ? S.triggerType : "manual"),
1434
- onValueChange: f ? void 0 : (e) => T({ triggerType: e }),
1435
- children: [/* @__PURE__ */ A(i, { children: /* @__PURE__ */ A(r, {}) }), /* @__PURE__ */ j(a, { children: [
1436
- /* @__PURE__ */ A(o, {
1431
+ switch (r.type) {
1432
+ case "startNode": return C("Trigger", /* @__PURE__ */ j(f, {
1433
+ value: Z("triggerType" in x ? x.triggerType : "manual"),
1434
+ onValueChange: s ? void 0 : (e) => w({ triggerType: e }),
1435
+ children: [/* @__PURE__ */ A(l, { children: /* @__PURE__ */ A(c, {}) }), /* @__PURE__ */ j(u, { children: [
1436
+ /* @__PURE__ */ A(d, {
1437
1437
  value: "manual",
1438
1438
  children: "Manual"
1439
1439
  }),
1440
- /* @__PURE__ */ A(o, {
1440
+ /* @__PURE__ */ A(d, {
1441
1441
  value: "scheduled",
1442
1442
  children: "Scheduled"
1443
1443
  }),
1444
- /* @__PURE__ */ A(o, {
1444
+ /* @__PURE__ */ A(d, {
1445
1445
  value: "webhook",
1446
1446
  children: "Webhook"
1447
1447
  })
1448
1448
  ] })]
1449
1449
  }));
1450
- case "endNode": return w("Outcome", /* @__PURE__ */ j(s, {
1451
- value: Z("outcome" in S ? S.outcome : "success"),
1452
- onValueChange: f ? void 0 : (e) => T({ outcome: e }),
1453
- children: [/* @__PURE__ */ A(i, { children: /* @__PURE__ */ A(r, {}) }), /* @__PURE__ */ j(a, { children: [
1454
- /* @__PURE__ */ A(o, {
1450
+ case "endNode": return C("Outcome", /* @__PURE__ */ j(f, {
1451
+ value: Z("outcome" in x ? x.outcome : "success"),
1452
+ onValueChange: s ? void 0 : (e) => w({ outcome: e }),
1453
+ children: [/* @__PURE__ */ A(l, { children: /* @__PURE__ */ A(c, {}) }), /* @__PURE__ */ j(u, { children: [
1454
+ /* @__PURE__ */ A(d, {
1455
1455
  value: "success",
1456
1456
  children: "Success"
1457
1457
  }),
1458
- /* @__PURE__ */ A(o, {
1458
+ /* @__PURE__ */ A(d, {
1459
1459
  value: "failure",
1460
1460
  children: "Failure"
1461
1461
  }),
1462
- /* @__PURE__ */ A(o, {
1462
+ /* @__PURE__ */ A(d, {
1463
1463
  value: "cancelled",
1464
1464
  children: "Cancelled"
1465
1465
  })
1466
1466
  ] })]
1467
1467
  }));
1468
- case "decisionNode": return /* @__PURE__ */ j(k, { children: [w("Condition", /* @__PURE__ */ A(d, {
1469
- value: Z("condition" in S ? S.condition : ""),
1470
- onChange: (e) => T({ condition: e.target.value }),
1471
- disabled: f
1472
- })), w("Branches", /* @__PURE__ */ A(d, {
1473
- value: ("branches" in S && Array.isArray(S.branches) ? S.branches : []).map((e) => e.label).join("\n"),
1474
- onChange: (e) => T({ branches: e.target.value.split("\n").filter(Boolean).map((e, t) => ({
1468
+ case "decisionNode": return /* @__PURE__ */ j(k, { children: [C("Condition", /* @__PURE__ */ A(o, {
1469
+ value: Z("condition" in x ? x.condition : ""),
1470
+ onChange: (e) => w({ condition: e.target.value }),
1471
+ disabled: s
1472
+ })), C("Branches", /* @__PURE__ */ A(o, {
1473
+ value: ("branches" in x && Array.isArray(x.branches) ? x.branches : []).map((e) => e.label).join("\n"),
1474
+ onChange: (e) => w({ branches: e.target.value.split("\n").filter(Boolean).map((e, t) => ({
1475
1475
  id: `branch-${t + 1}`,
1476
1476
  label: e
1477
1477
  })) }),
1478
- disabled: f
1478
+ disabled: s
1479
1479
  }), "branches")] });
1480
- case "loopNode": return /* @__PURE__ */ j(k, { children: [w("Iterator source", /* @__PURE__ */ A(n, {
1481
- value: Z("iteratorSource" in S ? S.iteratorSource : ""),
1482
- onChange: (e) => T({ iteratorSource: e.target.value }),
1483
- disabled: f
1484
- }), "iteratorSource"), w("Max iterations", /* @__PURE__ */ A(n, {
1480
+ case "loopNode": return /* @__PURE__ */ j(k, { children: [C("Iterator source", /* @__PURE__ */ A(n, {
1481
+ value: Z("iteratorSource" in x ? x.iteratorSource : ""),
1482
+ onChange: (e) => w({ iteratorSource: e.target.value }),
1483
+ disabled: s
1484
+ }), "iteratorSource"), C("Max iterations", /* @__PURE__ */ A(n, {
1485
1485
  type: "number",
1486
1486
  min: 1,
1487
- value: Z("maxIterations" in S ? S.maxIterations : 10),
1488
- onChange: (e) => T({ maxIterations: Number(e.target.value) }),
1489
- disabled: f
1487
+ value: Z("maxIterations" in x ? x.maxIterations : 10),
1488
+ onChange: (e) => w({ maxIterations: Number(e.target.value) }),
1489
+ disabled: s
1490
1490
  }))] });
1491
- case "actionNode": return w("Action type", /* @__PURE__ */ A(n, {
1492
- value: Z("actionType" in S ? S.actionType : ""),
1493
- onChange: (e) => T({ actionType: e.target.value }),
1494
- disabled: f
1491
+ case "actionNode": return C("Action type", /* @__PURE__ */ A(n, {
1492
+ value: Z("actionType" in x ? x.actionType : ""),
1493
+ onChange: (e) => w({ actionType: e.target.value }),
1494
+ disabled: s
1495
1495
  }), "actionType");
1496
1496
  case "requestNode": return /* @__PURE__ */ j(k, { children: [
1497
- w("Method", /* @__PURE__ */ j(s, {
1498
- value: Z("method" in S ? S.method : "GET"),
1499
- onValueChange: f ? void 0 : (e) => T({ method: e }),
1500
- children: [/* @__PURE__ */ A(i, { children: /* @__PURE__ */ A(r, {}) }), /* @__PURE__ */ j(a, { children: [
1501
- /* @__PURE__ */ A(o, {
1497
+ C("Method", /* @__PURE__ */ j(f, {
1498
+ value: Z("method" in x ? x.method : "GET"),
1499
+ onValueChange: s ? void 0 : (e) => w({ method: e }),
1500
+ children: [/* @__PURE__ */ A(l, { children: /* @__PURE__ */ A(c, {}) }), /* @__PURE__ */ j(u, { children: [
1501
+ /* @__PURE__ */ A(d, {
1502
1502
  value: "GET",
1503
1503
  children: "GET"
1504
1504
  }),
1505
- /* @__PURE__ */ A(o, {
1505
+ /* @__PURE__ */ A(d, {
1506
1506
  value: "POST",
1507
1507
  children: "POST"
1508
1508
  }),
1509
- /* @__PURE__ */ A(o, {
1509
+ /* @__PURE__ */ A(d, {
1510
1510
  value: "PUT",
1511
1511
  children: "PUT"
1512
1512
  }),
1513
- /* @__PURE__ */ A(o, {
1513
+ /* @__PURE__ */ A(d, {
1514
1514
  value: "PATCH",
1515
1515
  children: "PATCH"
1516
1516
  }),
1517
- /* @__PURE__ */ A(o, {
1517
+ /* @__PURE__ */ A(d, {
1518
1518
  value: "DELETE",
1519
1519
  children: "DELETE"
1520
1520
  })
1521
1521
  ] })]
1522
1522
  })),
1523
- w("URL", /* @__PURE__ */ A(n, {
1524
- value: Z("url" in S ? S.url : ""),
1525
- onChange: (e) => T({ url: e.target.value }),
1526
- disabled: f
1523
+ C("URL", /* @__PURE__ */ A(n, {
1524
+ value: Z("url" in x ? x.url : ""),
1525
+ onChange: (e) => w({ url: e.target.value }),
1526
+ disabled: s
1527
1527
  }), "url"),
1528
- w("Headers", /* @__PURE__ */ A(d, {
1529
- value: Ue("headers" in S ? S.headers : void 0),
1530
- onChange: (e) => T({ headers: Q(e.target.value) }),
1531
- disabled: f
1528
+ C("Headers", /* @__PURE__ */ A(o, {
1529
+ value: Ue("headers" in x ? x.headers : void 0),
1530
+ onChange: (e) => w({ headers: Q(e.target.value) }),
1531
+ disabled: s
1532
1532
  }))
1533
1533
  ] });
1534
- case "delayNode": return /* @__PURE__ */ j(k, { children: [w("Duration", /* @__PURE__ */ A(n, {
1534
+ case "delayNode": return /* @__PURE__ */ j(k, { children: [C("Duration", /* @__PURE__ */ A(n, {
1535
1535
  type: "number",
1536
1536
  min: 1,
1537
- value: Z("duration" in S ? S.duration : 1),
1538
- onChange: (e) => T({ duration: Number(e.target.value) }),
1539
- disabled: f
1540
- }), "duration"), w("Unit", /* @__PURE__ */ j(s, {
1541
- value: Z("unit" in S ? S.unit : "hours"),
1542
- onValueChange: f ? void 0 : (e) => T({ unit: e }),
1543
- children: [/* @__PURE__ */ A(i, { children: /* @__PURE__ */ A(r, {}) }), /* @__PURE__ */ j(a, { children: [
1544
- /* @__PURE__ */ A(o, {
1537
+ value: Z("duration" in x ? x.duration : 1),
1538
+ onChange: (e) => w({ duration: Number(e.target.value) }),
1539
+ disabled: s
1540
+ }), "duration"), C("Unit", /* @__PURE__ */ j(f, {
1541
+ value: Z("unit" in x ? x.unit : "hours"),
1542
+ onValueChange: s ? void 0 : (e) => w({ unit: e }),
1543
+ children: [/* @__PURE__ */ A(l, { children: /* @__PURE__ */ A(c, {}) }), /* @__PURE__ */ j(u, { children: [
1544
+ /* @__PURE__ */ A(d, {
1545
1545
  value: "seconds",
1546
1546
  children: "Seconds"
1547
1547
  }),
1548
- /* @__PURE__ */ A(o, {
1548
+ /* @__PURE__ */ A(d, {
1549
1549
  value: "minutes",
1550
1550
  children: "Minutes"
1551
1551
  }),
1552
- /* @__PURE__ */ A(o, {
1552
+ /* @__PURE__ */ A(d, {
1553
1553
  value: "hours",
1554
1554
  children: "Hours"
1555
1555
  }),
1556
- /* @__PURE__ */ A(o, {
1556
+ /* @__PURE__ */ A(d, {
1557
1557
  value: "days",
1558
1558
  children: "Days"
1559
1559
  })
1560
1560
  ] })]
1561
1561
  }))] });
1562
1562
  case "approvalNode": return /* @__PURE__ */ j(k, { children: [
1563
- w("Approver role", /* @__PURE__ */ A(n, {
1564
- value: Z("approverRole" in S ? S.approverRole : ""),
1565
- onChange: (e) => T({ approverRole: e.target.value }),
1566
- disabled: f
1563
+ C("Approver role", /* @__PURE__ */ A(n, {
1564
+ value: Z("approverRole" in x ? x.approverRole : ""),
1565
+ onChange: (e) => w({ approverRole: e.target.value }),
1566
+ disabled: s
1567
1567
  }), "approverRole"),
1568
- w("Escalation role", /* @__PURE__ */ A(n, {
1569
- value: Z("escalationRole" in S ? S.escalationRole : ""),
1570
- onChange: (e) => T({ escalationRole: e.target.value }),
1571
- disabled: f
1568
+ C("Escalation role", /* @__PURE__ */ A(n, {
1569
+ value: Z("escalationRole" in x ? x.escalationRole : ""),
1570
+ onChange: (e) => w({ escalationRole: e.target.value }),
1571
+ disabled: s
1572
1572
  })),
1573
- w("SLA hours", /* @__PURE__ */ A(n, {
1573
+ C("SLA hours", /* @__PURE__ */ A(n, {
1574
1574
  type: "number",
1575
1575
  min: 1,
1576
- value: Z("slaHours" in S ? S.slaHours : ""),
1577
- onChange: (e) => T({ slaHours: Number(e.target.value) }),
1578
- disabled: f
1576
+ value: Z("slaHours" in x ? x.slaHours : ""),
1577
+ onChange: (e) => w({ slaHours: Number(e.target.value) }),
1578
+ disabled: s
1579
1579
  }))
1580
1580
  ] });
1581
- default: return w("Description", /* @__PURE__ */ A(d, {
1582
- value: Z(S.description),
1583
- onChange: (e) => T({ description: e.target.value }),
1584
- disabled: f
1581
+ default: return C("Description", /* @__PURE__ */ A(o, {
1582
+ value: Z(x.description),
1583
+ onChange: (e) => w({ description: e.target.value }),
1584
+ disabled: s
1585
1585
  }));
1586
1586
  }
1587
1587
  })()
1588
1588
  ]
1589
1589
  }),
1590
- u.length > 0 && /* @__PURE__ */ A("div", {
1590
+ a.length > 0 && /* @__PURE__ */ A("div", {
1591
1591
  className: "mt-4 grid gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3",
1592
- children: u.map((e, t) => /* @__PURE__ */ j("div", {
1592
+ children: a.map((e, t) => /* @__PURE__ */ j("div", {
1593
1593
  className: "flex gap-2 text-xs text-destructive",
1594
1594
  children: [/* @__PURE__ */ A(h, {
1595
1595
  size: 14,
@@ -1597,16 +1597,16 @@ var Re = {
1597
1597
  }), /* @__PURE__ */ A("span", { children: e.message })]
1598
1598
  }, `${e.code}-${t}`))
1599
1599
  }),
1600
- !f && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(t, {
1600
+ !s && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(t, {
1601
1601
  variant: "destructive",
1602
1602
  className: "mt-4 w-full gap-2",
1603
- onClick: () => b(!0),
1603
+ onClick: () => y(!0),
1604
1604
  children: [/* @__PURE__ */ A(D, { size: 14 }), "Delete node"]
1605
1605
  }), /* @__PURE__ */ A(p, {
1606
- isOpen: y,
1607
- onClose: () => b(!1),
1606
+ isOpen: v,
1607
+ onClose: () => y(!1),
1608
1608
  onConfirm: () => {
1609
- ee(), b(!1);
1609
+ ee(), y(!1);
1610
1610
  },
1611
1611
  title: "Delete Node",
1612
1612
  message: "Are you sure you want to delete this node?",
@@ -1615,7 +1615,7 @@ var Re = {
1615
1615
  ]
1616
1616
  });
1617
1617
  }, Ge = m.forwardRef((n, r) => {
1618
- let { workflow: i, defaultWorkflow: a = Re, workflowId: o, service: s, nodeRegistry: c, onWorkflowChange: l, onNodeAdd: u, onNodeUpdate: d, onNodeDelete: f, onConnectionCreate: p, onValidationChange: g, onSave: _, onPublish: v, onError: y, title: b, description: x, status: S, toolboxTitle: C = "Node Library", showHeader: T = !0, showToolbox: te = !0, showInspector: ne = !0, showValidationPanel: re = !0, showActionBar: ie = !0, autoValidate: E = !0, readOnly: se = !1, showGrid: ce = !0, snapToGrid: le = !0, fitView: ue = !0, exportFileName: de = "workflow.json", className: fe, classNames: D, ...he } = n, O = m.useMemo(() => ({
1618
+ let { workflow: i, defaultWorkflow: a = Re, workflowId: o, service: s, nodeRegistry: c, onWorkflowChange: l, onNodeAdd: u, onNodeUpdate: d, onNodeDelete: f, onConnectionCreate: p, onValidationChange: g, onSave: _, onPublish: te, onError: v, title: y, description: b, status: x, toolboxTitle: S = "Node Library", showHeader: w = !0, showToolbox: ne = !0, showInspector: re = !0, showValidationPanel: ie = !0, showActionBar: ae = !0, autoValidate: T = !0, readOnly: E = !1, showGrid: ce = !0, snapToGrid: le = !0, fitView: ue = !0, exportFileName: de = "workflow.json", className: fe, classNames: D, ...he } = n, O = m.useMemo(() => ({
1619
1619
  ...ze,
1620
1620
  ...c
1621
1621
  }), [c]), _e = m.useMemo(() => {
@@ -1635,12 +1635,12 @@ var Re = {
1635
1635
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1636
1636
  }
1637
1637
  });
1638
- if (t && (G.current = [...G.current, q(W.current)], K.current = []), W.current = n, ye || xe(n), l?.(n), E) {
1638
+ if (t && (G.current = [...G.current, q(W.current)], K.current = []), W.current = n, ye || xe(n), l?.(n), T) {
1639
1639
  let e = X(n);
1640
1640
  R(e), g?.(e);
1641
1641
  }
1642
1642
  }, [
1643
- E,
1643
+ T,
1644
1644
  ye,
1645
1645
  g,
1646
1646
  l,
@@ -1722,7 +1722,7 @@ var Re = {
1722
1722
  return B(!0), U(null), s.loadWorkflow(o).then((t) => {
1723
1723
  e && Z(t, !1);
1724
1724
  }).catch((t) => {
1725
- e && (U(t.message), y?.(t, "load"));
1725
+ e && (U(t.message), v?.(t, "load"));
1726
1726
  }).finally(() => {
1727
1727
  e && B(!1);
1728
1728
  }), () => {
@@ -1731,7 +1731,7 @@ var Re = {
1731
1731
  }, [
1732
1732
  ye,
1733
1733
  Z,
1734
- y,
1734
+ v,
1735
1735
  s,
1736
1736
  o
1737
1737
  ]), m.useEffect(() => {
@@ -1766,7 +1766,7 @@ var Re = {
1766
1766
  Z(JSON.parse(e)), U(null);
1767
1767
  } catch (e) {
1768
1768
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Invalid workflow JSON.");
1769
- U(t.message), y?.(t, "import");
1769
+ U(t.message), v?.(t, "import");
1770
1770
  }
1771
1771
  }
1772
1772
  }), [
@@ -1775,7 +1775,7 @@ var Re = {
1775
1775
  Ge,
1776
1776
  Z,
1777
1777
  Be,
1778
- y,
1778
+ v,
1779
1779
  Ue,
1780
1780
  X
1781
1781
  ]);
@@ -1815,13 +1815,13 @@ var Re = {
1815
1815
  s && o && await s.saveWorkflow(o, e), await _?.(e), Me((/* @__PURE__ */ new Date()).toISOString());
1816
1816
  } catch (e) {
1817
1817
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to save workflow.");
1818
- U(t.message), y?.(t, "save");
1818
+ U(t.message), v?.(t, "save");
1819
1819
  } finally {
1820
1820
  V(!1);
1821
1821
  }
1822
1822
  }
1823
1823
  }, [
1824
- y,
1824
+ v,
1825
1825
  _,
1826
1826
  g,
1827
1827
  s,
@@ -1839,18 +1839,18 @@ var Re = {
1839
1839
  if (R(t), g?.(t), t.valid) {
1840
1840
  Ae(!0), U(null);
1841
1841
  try {
1842
- s && o && await s.publishWorkflow(o, e), await v?.(e), Z(e, !1);
1842
+ s && o && await s.publishWorkflow(o, e), await te?.(e), Z(e, !1);
1843
1843
  } catch (e) {
1844
1844
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to publish workflow.");
1845
- U(t.message), y?.(t, "publish");
1845
+ U(t.message), v?.(t, "publish");
1846
1846
  } finally {
1847
1847
  Ae(!1);
1848
1848
  }
1849
1849
  }
1850
1850
  }, [
1851
1851
  Z,
1852
- y,
1853
1852
  v,
1853
+ te,
1854
1854
  g,
1855
1855
  s,
1856
1856
  X,
@@ -1861,10 +1861,10 @@ var Re = {
1861
1861
  R(e), g?.(e), U(null);
1862
1862
  } catch (e) {
1863
1863
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to validate workflow.");
1864
- U(t.message), y?.(t, "validate");
1864
+ U(t.message), v?.(t, "validate");
1865
1865
  }
1866
1866
  }, [
1867
- y,
1867
+ v,
1868
1868
  g,
1869
1869
  X
1870
1870
  ]), et = m.useCallback((e) => {
@@ -1874,15 +1874,15 @@ var Re = {
1874
1874
  Z(JSON.parse(t)), U(null);
1875
1875
  } catch (e) {
1876
1876
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Invalid workflow JSON.");
1877
- U(t.message), y?.(t, "import");
1877
+ U(t.message), v?.(t, "import");
1878
1878
  } finally {
1879
1879
  e.target.value = "";
1880
1880
  }
1881
1881
  });
1882
- }, [Z, y]), tt = m.useCallback(() => {
1882
+ }, [Z, v]), tt = m.useCallback(() => {
1883
1883
  let e = new Blob([JSON.stringify(W.current, null, 2)], { type: "application/json" }), t = URL.createObjectURL(e), n = document.createElement("a");
1884
1884
  n.href = t, n.download = de, n.click(), URL.revokeObjectURL(t);
1885
- }, [de]), nt = b ?? J.metadata?.title ?? "Untitled Workflow", rt = x ?? J.metadata?.description, it = F ? J.nodes.find((e) => e.id === F) : void 0, at = F ? L.issues.filter((e) => e.nodeId === F) : [], ot = L.issues.filter((e) => e.severity === "error").length, st = L.issues.filter((e) => e.severity === "warning").length, ct = G.current.length > 0, lt = K.current.length > 0;
1885
+ }, [de]), nt = y ?? J.metadata?.title ?? "Untitled Workflow", rt = b ?? J.metadata?.description, it = F ? J.nodes.find((e) => e.id === F) : void 0, at = F ? L.issues.filter((e) => e.nodeId === F) : [], ot = L.issues.filter((e) => e.severity === "error").length, st = L.issues.filter((e) => e.severity === "warning").length, ct = G.current.length > 0, lt = K.current.length > 0;
1886
1886
  return /* @__PURE__ */ j("div", {
1887
1887
  className: e("ez-workflow flex h-full min-h-[560px] flex-col overflow-hidden bg-background", D?.root, fe),
1888
1888
  ...he,
@@ -1894,10 +1894,10 @@ var Re = {
1894
1894
  className: "hidden",
1895
1895
  onChange: et
1896
1896
  }),
1897
- T && /* @__PURE__ */ A(Le, {
1897
+ w && /* @__PURE__ */ A(Le, {
1898
1898
  title: nt,
1899
1899
  description: rt,
1900
- status: S ?? J.metadata?.status,
1900
+ status: x ?? J.metadata?.status,
1901
1901
  isDirty: G.current.length > 0,
1902
1902
  onTitleChange: (e) => Z({
1903
1903
  ...W.current,
@@ -1924,9 +1924,9 @@ var Re = {
1924
1924
  /* @__PURE__ */ j("div", {
1925
1925
  className: e("flex min-h-0 flex-1", D?.body),
1926
1926
  children: [
1927
- te && /* @__PURE__ */ A(Ie, {
1927
+ ne && /* @__PURE__ */ A(Ie, {
1928
1928
  categories: ve,
1929
- title: C,
1929
+ title: S,
1930
1930
  collapsed: Ce,
1931
1931
  onCollapsedChange: De,
1932
1932
  onNodeActivate: (e) => Q({ type: e.type }),
@@ -1950,14 +1950,14 @@ var Re = {
1950
1950
  showGrid: M,
1951
1951
  snapToGrid: P,
1952
1952
  fitView: ue,
1953
- readOnly: se,
1953
+ readOnly: E,
1954
1954
  className: e("flex-1", D?.canvas)
1955
1955
  }),
1956
- ne && /* @__PURE__ */ A(We, {
1956
+ re && /* @__PURE__ */ A(We, {
1957
1957
  node: it,
1958
1958
  registry: O,
1959
1959
  issues: at,
1960
- readOnly: se,
1960
+ readOnly: E,
1961
1961
  onChange: (e) => it && Ue(it.id, e),
1962
1962
  onDelete: () => it && Ge(it.id),
1963
1963
  onClose: () => I(null),
@@ -1965,17 +1965,17 @@ var Re = {
1965
1965
  })
1966
1966
  ]
1967
1967
  }),
1968
- (ie || re) && /* @__PURE__ */ j("footer", {
1968
+ (ae || ie) && /* @__PURE__ */ j("footer", {
1969
1969
  className: e("flex min-h-14 items-center justify-between gap-3 border-t border-border bg-card/50 px-4 py-2", D?.actionBar),
1970
1970
  "aria-label": "Workflow actions",
1971
1971
  children: [/* @__PURE__ */ A("div", {
1972
1972
  className: "flex min-w-0 items-center gap-2",
1973
- children: ie && /* @__PURE__ */ j(k, { children: [
1973
+ children: ae && /* @__PURE__ */ j(k, { children: [
1974
1974
  /* @__PURE__ */ j(t, {
1975
1975
  variant: "outline",
1976
1976
  size: "sm",
1977
1977
  className: "gap-2",
1978
- disabled: !ct || se,
1978
+ disabled: !ct || E,
1979
1979
  onClick: () => {
1980
1980
  let e = G.current[G.current.length - 1];
1981
1981
  e && (G.current = G.current.slice(0, -1), K.current = [q(W.current), ...K.current], Z(e, !1));
@@ -1986,12 +1986,12 @@ var Re = {
1986
1986
  variant: "outline",
1987
1987
  size: "sm",
1988
1988
  className: "gap-2",
1989
- disabled: !lt || se,
1989
+ disabled: !lt || E,
1990
1990
  onClick: () => {
1991
1991
  let e = K.current[0];
1992
1992
  e && (K.current = K.current.slice(1), G.current = [...G.current, q(W.current)], Z(e, !1));
1993
1993
  },
1994
- children: [/* @__PURE__ */ A(ae, { size: 14 }), "Redo"]
1994
+ children: [/* @__PURE__ */ A(oe, { size: 14 }), "Redo"]
1995
1995
  }),
1996
1996
  /* @__PURE__ */ j(t, {
1997
1997
  variant: "outline",
@@ -2005,7 +2005,7 @@ var Re = {
2005
2005
  size: "sm",
2006
2006
  className: "gap-2",
2007
2007
  onClick: () => Fe.current?.click(),
2008
- disabled: se,
2008
+ disabled: E,
2009
2009
  children: [/* @__PURE__ */ A(me, { size: 14 }), "Import"]
2010
2010
  }),
2011
2011
  /* @__PURE__ */ j(t, {
@@ -2013,15 +2013,15 @@ var Re = {
2013
2013
  size: "sm",
2014
2014
  className: "gap-2",
2015
2015
  onClick: tt,
2016
- children: [/* @__PURE__ */ A(w, { size: 14 }), "Export"]
2016
+ children: [/* @__PURE__ */ A(C, { size: 14 }), "Export"]
2017
2017
  })
2018
2018
  ] })
2019
- }), re && /* @__PURE__ */ j("div", {
2019
+ }), ie && /* @__PURE__ */ j("div", {
2020
2020
  className: e("flex min-w-0 items-center gap-3 text-xs", D?.validationPanel),
2021
2021
  children: [
2022
2022
  z || ke || H ? /* @__PURE__ */ j("span", {
2023
2023
  className: "inline-flex items-center gap-2 text-muted-foreground",
2024
- children: [/* @__PURE__ */ A(oe, {
2024
+ children: [/* @__PURE__ */ A(se, {
2025
2025
  size: 14,
2026
2026
  className: "animate-spin"
2027
2027
  }), z ? "Loading" : H ? "Publishing" : "Saving"]