@memberjunction/ng-flow-editor 6.3.0-edge.0 → 6.3.0-edge.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 (51) hide show
  1. package/dist/lib/agent-editor/agent-flow-transformer.service.d.ts.map +1 -1
  2. package/dist/lib/agent-editor/agent-flow-transformer.service.js +38 -0
  3. package/dist/lib/agent-editor/agent-flow-transformer.service.js.map +1 -1
  4. package/dist/lib/agent-editor/agent-properties-panel.component.d.ts +49 -0
  5. package/dist/lib/agent-editor/agent-properties-panel.component.d.ts.map +1 -1
  6. package/dist/lib/agent-editor/agent-properties-panel.component.js +1065 -347
  7. package/dist/lib/agent-editor/agent-properties-panel.component.js.map +1 -1
  8. package/dist/lib/agent-editor/agent-step-list.component.d.ts +10 -2
  9. package/dist/lib/agent-editor/agent-step-list.component.d.ts.map +1 -1
  10. package/dist/lib/agent-editor/agent-step-list.component.js +257 -199
  11. package/dist/lib/agent-editor/agent-step-list.component.js.map +1 -1
  12. package/dist/lib/agent-editor/flow-agent-editor.component.d.ts +16 -8
  13. package/dist/lib/agent-editor/flow-agent-editor.component.d.ts.map +1 -1
  14. package/dist/lib/agent-editor/flow-agent-editor.component.js +209 -117
  15. package/dist/lib/agent-editor/flow-agent-editor.component.js.map +1 -1
  16. package/dist/lib/agent-editor/waiting-step-config.d.ts +45 -0
  17. package/dist/lib/agent-editor/waiting-step-config.d.ts.map +1 -0
  18. package/dist/lib/agent-editor/waiting-step-config.js +117 -0
  19. package/dist/lib/agent-editor/waiting-step-config.js.map +1 -0
  20. package/dist/lib/components/flow-editor.component.d.ts +42 -5
  21. package/dist/lib/components/flow-editor.component.d.ts.map +1 -1
  22. package/dist/lib/components/flow-editor.component.js +299 -113
  23. package/dist/lib/components/flow-editor.component.js.map +1 -1
  24. package/dist/lib/components/flow-node.component.d.ts +25 -3
  25. package/dist/lib/components/flow-node.component.d.ts.map +1 -1
  26. package/dist/lib/components/flow-node.component.js +412 -125
  27. package/dist/lib/components/flow-node.component.js.map +1 -1
  28. package/dist/lib/components/flow-status-bar.component.d.ts +2 -1
  29. package/dist/lib/components/flow-status-bar.component.d.ts.map +1 -1
  30. package/dist/lib/components/flow-status-bar.component.js +12 -11
  31. package/dist/lib/components/flow-status-bar.component.js.map +1 -1
  32. package/dist/lib/components/flow-toolbar.component.d.ts +5 -2
  33. package/dist/lib/components/flow-toolbar.component.d.ts.map +1 -1
  34. package/dist/lib/components/flow-toolbar.component.js +42 -23
  35. package/dist/lib/components/flow-toolbar.component.js.map +1 -1
  36. package/dist/lib/interfaces/flow-types.d.ts +40 -0
  37. package/dist/lib/interfaces/flow-types.d.ts.map +1 -1
  38. package/dist/lib/interfaces/flow-types.js.map +1 -1
  39. package/dist/lib/services/flow-layout.service.d.ts +0 -1
  40. package/dist/lib/services/flow-layout.service.d.ts.map +1 -1
  41. package/dist/lib/services/flow-layout.service.js +5 -23
  42. package/dist/lib/services/flow-layout.service.js.map +1 -1
  43. package/dist/lib/services/flow-viewport.util.d.ts +58 -0
  44. package/dist/lib/services/flow-viewport.util.d.ts.map +1 -0
  45. package/dist/lib/services/flow-viewport.util.js +134 -0
  46. package/dist/lib/services/flow-viewport.util.js.map +1 -0
  47. package/dist/public-api.d.ts +1 -0
  48. package/dist/public-api.d.ts.map +1 -1
  49. package/dist/public-api.js +1 -0
  50. package/dist/public-api.js.map +1 -1
  51. package/package.json +10 -10
@@ -1,9 +1,11 @@
1
1
  import { Component, Input, Output, EventEmitter, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, HostListener } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
+ import { UserInfoEngine } from '@memberjunction/core-entities';
3
4
  import { FFlowComponent, FCanvasComponent } from '@foblex/flow';
4
5
  import { FlowBeforeContextMenuEventArgs, FlowAfterContextMenuActionEventArgs, } from '../interfaces/flow-types';
5
6
  import { FlowStateService } from '../services/flow-state.service';
6
7
  import { FlowLayoutService } from '../services/flow-layout.service';
8
+ import { ComputeCappedFitViewport, FlowViewportStore, MAX_FIT_SCALE, } from '../services/flow-viewport.util';
7
9
  import { UUIDsEqual, UUIDMap, UUIDSet, FilterByUUIDs, ExcludeByUUIDs, IndexByUUID } from '@memberjunction/global';
8
10
  import * as i0 from "@angular/core";
9
11
  import * as i1 from "../services/flow-state.service";
@@ -18,17 +20,18 @@ import * as i9 from "./flow-status-bar.component";
18
20
  const _c0 = ["fZoomRef"];
19
21
  const _c1 = ["canvasArea"];
20
22
  const _c2 = (a0, a1) => ({ x: a0, y: a1 });
21
- const _forTrack0 = ($index, $item) => $item.ID;
23
+ const _forTrack0 = ($index, $item) => $item.Type;
24
+ const _forTrack1 = ($index, $item) => $item.ID;
22
25
  function FlowEditorComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
23
26
  const _r1 = i0.ɵɵgetCurrentView();
24
27
  i0.ɵɵelementStart(0, "div", 3)(1, "mj-flow-toolbar", 20);
25
- i0.ɵɵlistener("ZoomInClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_ZoomInClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomIn()); })("ZoomOutClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_ZoomOutClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomOut()); })("FitToScreenClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_FitToScreenClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomToFit()); })("AutoLayoutClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_AutoLayoutClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AutoArrange()); })("GridToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_GridToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onGridToggled($event)); })("MinimapToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_MinimapToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMinimapToggled($event)); })("LegendToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_LegendToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLegendToggled($event)); })("PanModeToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_PanModeToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onPanModeToggled($event)); })("MinimizeClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_MinimizeClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetToolbarVisibility("minimized")); })("HideClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_HideClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetToolbarVisibility("hidden")); });
28
+ i0.ɵɵlistener("ZoomInClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_ZoomInClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomIn()); })("ZoomOutClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_ZoomOutClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomOut()); })("FitToScreenClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_FitToScreenClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ZoomToFit()); })("AutoLayoutClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_AutoLayoutClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AutoArrange()); })("LayoutDirectionToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_LayoutDirectionToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLayoutDirectionToggled($event)); })("GridToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_GridToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onGridToggled($event)); })("MinimapToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_MinimapToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMinimapToggled($event)); })("LegendToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_LegendToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLegendToggled($event)); })("PanModeToggled", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_PanModeToggled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onPanModeToggled($event)); })("MinimizeClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_MinimizeClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetToolbarVisibility("minimized")); })("HideClicked", function FlowEditorComponent_Conditional_1_Template_mj_flow_toolbar_HideClicked_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SetToolbarVisibility("hidden")); });
26
29
  i0.ɵɵelementEnd()();
27
30
  } if (rf & 2) {
28
31
  const ctx_r1 = i0.ɵɵnextContext();
29
32
  i0.ɵɵattribute("data-align", ctx_r1.ToolbarAlign);
30
33
  i0.ɵɵadvance();
31
- i0.ɵɵproperty("ZoomLevel", ctx_r1.zoomLevel)("ShowGrid", ctx_r1.ShowGrid)("ShowMinimap", ctx_r1.ShowMinimap)("ShowLegend", ctx_r1.ShowLegend)("ReadOnly", ctx_r1.ReadOnly)("PanMode", ctx_r1.panMode);
34
+ i0.ɵɵproperty("ZoomLevel", ctx_r1.zoomLevel)("ShowGrid", ctx_r1.ShowGrid)("ShowMinimap", ctx_r1.ShowMinimap)("ShowLegend", ctx_r1.ShowLegend)("ReadOnly", ctx_r1.ReadOnly)("PanMode", ctx_r1.panMode)("LayoutDirection", ctx_r1.AutoLayoutDirection);
32
35
  } }
33
36
  function FlowEditorComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
34
37
  const _r3 = i0.ɵɵgetCurrentView();
@@ -57,7 +60,7 @@ function FlowEditorComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
57
60
  i0.ɵɵelementEnd();
58
61
  } if (rf & 2) {
59
62
  const ctx_r1 = i0.ɵɵnextContext();
60
- i0.ɵɵproperty("NodeTypes", ctx_r1.NodeTypes);
63
+ i0.ɵɵproperty("NodeTypes", ctx_r1.PaletteNodeTypes);
61
64
  } }
62
65
  function FlowEditorComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
63
66
  i0.ɵɵelementStart(0, "f-background");
@@ -65,7 +68,7 @@ function FlowEditorComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
65
68
  i0.ɵɵelementEnd();
66
69
  } if (rf & 2) {
67
70
  i0.ɵɵadvance();
68
- i0.ɵɵproperty("color", "#94a3b8")("radius", 24);
71
+ i0.ɵɵproperty("color", "var(--mj-border-strong)")("radius", 24);
69
72
  } }
70
73
  function FlowEditorComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
71
74
  i0.ɵɵelement(0, "f-line-alignment", 10);
@@ -118,25 +121,25 @@ function FlowEditorComponent_For_15_Template(rf, ctx) { if (rf & 1) {
118
121
  } if (rf & 2) {
119
122
  const conn_r7 = ctx.$implicit;
120
123
  const ctx_r1 = i0.ɵɵnextContext();
121
- i0.ɵɵstyleProp("--connection-color", conn_r7.Color || "#94a3b8")("--connection-width", conn_r7.StrokeWidth || 2, "px");
122
- i0.ɵɵclassProp("mj-flow-connection-colored", !!conn_r7.Color)("mj-flow-connection-dashed", conn_r7.Style === "dashed")("mj-flow-connection-dotted", conn_r7.Style === "dotted")("mj-flow-connection-animated", !!conn_r7.Animated);
124
+ i0.ɵɵstyleProp("--connection-color", conn_r7.Color || "var(--mj-text-disabled)")("--connection-width", conn_r7.StrokeWidth || 2, "px");
125
+ i0.ɵɵclassProp("mj-flow-connection-colored", !!conn_r7.Color)("mj-flow-connection-dashed", conn_r7.Style === "dashed")("mj-flow-connection-dotted", conn_r7.Style === "dotted")("mj-flow-connection-untaken", conn_r7.Untaken === true)("mj-flow-connection-forced", conn_r7.ForcedVerdict != null)("mj-flow-connection-animated", !!conn_r7.Animated);
123
126
  i0.ɵɵproperty("fConnectionId", conn_r7.ID)("fOutputId", conn_r7.SourcePortID)("fInputId", conn_r7.TargetPortID)("fRadius", 8)("fOffset", 12)("fSelectionDisabled", false)("fReassignDisabled", ctx_r1.ReadOnly);
124
127
  i0.ɵɵadvance();
125
128
  i0.ɵɵproperty("refX", 9)("refY", 5)("height", conn_r7.Animated ? 16 : 10)("width", conn_r7.Animated ? 16 : 10);
126
129
  i0.ɵɵadvance();
127
- i0.ɵɵattribute("fill", conn_r7.Color || "#94a3b8");
130
+ i0.ɵɵattribute("fill", conn_r7.Color || "var(--mj-text-disabled)");
128
131
  i0.ɵɵadvance();
129
132
  i0.ɵɵconditional(conn_r7.Label ? 3 : -1);
130
133
  } }
131
134
  function FlowEditorComponent_For_17_Template(rf, ctx) { if (rf & 1) {
132
135
  const _r8 = i0.ɵɵgetCurrentView();
133
136
  i0.ɵɵelementStart(0, "mj-flow-node", 35);
134
- i0.ɵɵlistener("contextmenu", function FlowEditorComponent_For_17_Template_mj_flow_node_contextmenu_0_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onNodeContextMenu($event, node_r9)); });
137
+ i0.ɵɵlistener("BreakpointClicked", function FlowEditorComponent_For_17_Template_mj_flow_node_BreakpointClicked_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.NodeBreakpointClicked.emit($event)); })("QuickAddClicked", function FlowEditorComponent_For_17_Template_mj_flow_node_QuickAddClicked_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.NodeQuickAddClicked.emit($event)); })("RunStepClicked", function FlowEditorComponent_For_17_Template_mj_flow_node_RunStepClicked_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.NodeRunStepClicked.emit($event)); })("contextmenu", function FlowEditorComponent_For_17_Template_mj_flow_node_contextmenu_0_listener($event) { const node_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onNodeContextMenu($event, node_r9)); });
135
138
  i0.ɵɵelementEnd();
136
139
  } if (rf & 2) {
137
140
  const node_r9 = ctx.$implicit;
138
141
  const ctx_r1 = i0.ɵɵnextContext();
139
- i0.ɵɵproperty("fNodeId", node_r9.ID)("fNodePosition", i0.ɵɵpureFunction2(8, _c2, node_r9.Position.X, node_r9.Position.Y))("fNodeDraggingDisabled", ctx_r1.ReadOnly || ctx_r1.panMode || node_r9.Locked === true)("fNodeSelectionDisabled", ctx_r1.panMode)("fConnectOnNode", !ctx_r1.ReadOnly && !ctx_r1.panMode)("Node", node_r9)("TypeConfig", ctx_r1.GetTypeConfig(node_r9.Type))("ReadOnly", ctx_r1.ReadOnly);
142
+ i0.ɵɵproperty("fNodeId", node_r9.ID)("fNodePosition", i0.ɵɵpureFunction2(10, _c2, node_r9.Position.X, node_r9.Position.Y))("fNodeDraggingDisabled", ctx_r1.ReadOnly || ctx_r1.panMode || ctx_r1.spacePressed || node_r9.Locked === true)("fNodeSelectionDisabled", ctx_r1.panMode || ctx_r1.spacePressed)("fConnectOnNode", !ctx_r1.ReadOnly && !ctx_r1.panMode && !ctx_r1.spacePressed)("Node", node_r9)("TypeConfig", ctx_r1.GetTypeConfig(node_r9.Type))("ReadOnly", ctx_r1.ReadOnly)("XRayEnabled", ctx_r1.XRayEnabled)("AllowBreakpointClick", ctx_r1.AllowBreakpointClick);
140
143
  } }
141
144
  function FlowEditorComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
142
145
  i0.ɵɵelement(0, "f-selection-area");
@@ -149,12 +152,36 @@ function FlowEditorComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
149
152
  i0.ɵɵadvance();
150
153
  i0.ɵɵproperty("fMinSize", 1500);
151
154
  } }
155
+ function FlowEditorComponent_Conditional_20_Conditional_32_For_4_Template(rf, ctx) { if (rf & 1) {
156
+ i0.ɵɵelementStart(0, "div", 40);
157
+ i0.ɵɵelement(1, "span", 51);
158
+ i0.ɵɵelementStart(2, "span");
159
+ i0.ɵɵtext(3);
160
+ i0.ɵɵelementEnd()();
161
+ } if (rf & 2) {
162
+ const nt_r10 = ctx.$implicit;
163
+ i0.ɵɵadvance();
164
+ i0.ɵɵstyleProp("background-color", nt_r10.Color);
165
+ i0.ɵɵadvance(2);
166
+ i0.ɵɵtextInterpolate(nt_r10.Label);
167
+ } }
168
+ function FlowEditorComponent_Conditional_20_Conditional_32_Template(rf, ctx) { if (rf & 1) {
169
+ i0.ɵɵelementStart(0, "div", 38)(1, "div", 39);
170
+ i0.ɵɵtext(2, "Step Types");
171
+ i0.ɵɵelementEnd();
172
+ i0.ɵɵrepeaterCreate(3, FlowEditorComponent_Conditional_20_Conditional_32_For_4_Template, 4, 3, "div", 40, _forTrack0);
173
+ i0.ɵɵelementEnd();
174
+ } if (rf & 2) {
175
+ const ctx_r1 = i0.ɵɵnextContext(2);
176
+ i0.ɵɵadvance(3);
177
+ i0.ɵɵrepeater(ctx_r1.NodeTypes);
178
+ } }
152
179
  function FlowEditorComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
153
180
  i0.ɵɵelementStart(0, "div", 16)(1, "div", 37);
154
181
  i0.ɵɵtext(2, "Legend");
155
182
  i0.ɵɵelementEnd();
156
183
  i0.ɵɵelementStart(3, "div", 38)(4, "div", 39);
157
- i0.ɵɵtext(5, "Connections");
184
+ i0.ɵɵtext(5, "Paths");
158
185
  i0.ɵɵelementEnd();
159
186
  i0.ɵɵelementStart(6, "div", 40);
160
187
  i0.ɵɵnamespaceSVG();
@@ -163,7 +190,7 @@ function FlowEditorComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
163
190
  i0.ɵɵelementEnd();
164
191
  i0.ɵɵnamespaceHTML();
165
192
  i0.ɵɵelementStart(9, "span");
166
- i0.ɵɵtext(10, "Only exit path");
193
+ i0.ɵɵtext(10, "Always / Next");
167
194
  i0.ɵɵelementEnd()();
168
195
  i0.ɵɵelementStart(11, "div", 40);
169
196
  i0.ɵɵnamespaceSVG();
@@ -173,7 +200,7 @@ function FlowEditorComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
173
200
  i0.ɵɵnamespaceHTML();
174
201
  i0.ɵɵelement(14, "i", 44);
175
202
  i0.ɵɵelementStart(15, "span");
176
- i0.ɵɵtext(16, "Default (fallback)");
203
+ i0.ɵɵtext(16, "Taken / Fallback");
177
204
  i0.ɵɵelementEnd()();
178
205
  i0.ɵɵelementStart(17, "div", 40);
179
206
  i0.ɵɵnamespaceSVG();
@@ -190,60 +217,45 @@ function FlowEditorComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
190
217
  i0.ɵɵelement(24, "line", 46);
191
218
  i0.ɵɵelementEnd();
192
219
  i0.ɵɵnamespaceHTML();
193
- i0.ɵɵelement(25, "i", 47);
194
- i0.ɵɵelementStart(26, "span");
195
- i0.ɵɵtext(27, "Duplicate defaults");
196
- i0.ɵɵelementEnd()()();
197
- i0.ɵɵelementStart(28, "div", 38)(29, "div", 39);
198
- i0.ɵɵtext(30, "Step Types");
199
- i0.ɵɵelementEnd();
200
- i0.ɵɵelementStart(31, "div", 40);
201
- i0.ɵɵelement(32, "span", 48);
202
- i0.ɵɵelementStart(33, "span");
203
- i0.ɵɵtext(34, "Action");
204
- i0.ɵɵelementEnd()();
205
- i0.ɵɵelementStart(35, "div", 40);
206
- i0.ɵɵelement(36, "span", 49);
207
- i0.ɵɵelementStart(37, "span");
208
- i0.ɵɵtext(38, "Prompt");
220
+ i0.ɵɵelementStart(25, "span");
221
+ i0.ɵɵtext(26, "Forced override");
209
222
  i0.ɵɵelementEnd()();
210
- i0.ɵɵelementStart(39, "div", 40);
211
- i0.ɵɵelement(40, "span", 50);
212
- i0.ɵɵelementStart(41, "span");
213
- i0.ɵɵtext(42, "Sub-Agent");
214
- i0.ɵɵelementEnd()();
215
- i0.ɵɵelementStart(43, "div", 40);
216
- i0.ɵɵelement(44, "span", 51);
217
- i0.ɵɵelementStart(45, "span");
218
- i0.ɵɵtext(46, "For Each");
219
- i0.ɵɵelementEnd()();
220
- i0.ɵɵelementStart(47, "div", 40);
221
- i0.ɵɵelement(48, "span", 52);
222
- i0.ɵɵelementStart(49, "span");
223
- i0.ɵɵtext(50, "While");
223
+ i0.ɵɵelementStart(27, "div", 40);
224
+ i0.ɵɵnamespaceSVG();
225
+ i0.ɵɵelementStart(28, "svg", 41);
226
+ i0.ɵɵelement(29, "line", 47);
227
+ i0.ɵɵelementEnd();
228
+ i0.ɵɵnamespaceHTML();
229
+ i0.ɵɵelementStart(30, "span");
230
+ i0.ɵɵtext(31, "Untaken / Skipped");
224
231
  i0.ɵɵelementEnd()()();
225
- i0.ɵɵelementStart(51, "div", 38)(52, "div", 39);
226
- i0.ɵɵtext(53, "Borders");
232
+ i0.ɵɵconditionalCreate(32, FlowEditorComponent_Conditional_20_Conditional_32_Template, 5, 0, "div", 38);
233
+ i0.ɵɵelementStart(33, "div", 38)(34, "div", 39);
234
+ i0.ɵɵtext(35, "States");
227
235
  i0.ɵɵelementEnd();
228
- i0.ɵɵelementStart(54, "div", 40);
229
- i0.ɵɵelement(55, "span", 53);
230
- i0.ɵɵelementStart(56, "span");
231
- i0.ɵɵtext(57, "Start node");
236
+ i0.ɵɵelementStart(36, "div", 40);
237
+ i0.ɵɵelement(37, "span", 48);
238
+ i0.ɵɵelementStart(38, "span");
239
+ i0.ɵɵtext(39, "Start step");
232
240
  i0.ɵɵelementEnd()();
233
- i0.ɵɵelementStart(58, "div", 40);
234
- i0.ɵɵelement(59, "span", 54)(60, "i", 55);
235
- i0.ɵɵelementStart(61, "span");
236
- i0.ɵɵtext(62, "Missing config");
241
+ i0.ɵɵelementStart(40, "div", 40);
242
+ i0.ɵɵelement(41, "span", 49)(42, "i", 50);
243
+ i0.ɵɵelementStart(43, "span");
244
+ i0.ɵɵtext(44, "Needs attention");
237
245
  i0.ɵɵelementEnd()()()();
246
+ } if (rf & 2) {
247
+ const ctx_r1 = i0.ɵɵnextContext();
248
+ i0.ɵɵadvance(32);
249
+ i0.ɵɵconditional(ctx_r1.NodeTypes.length > 0 ? 32 : -1);
238
250
  } }
239
251
  function FlowEditorComponent_Conditional_21_Conditional_2_Template(rf, ctx) { if (rf & 1) {
240
- i0.ɵɵelementStart(0, "p", 57);
241
- i0.ɵɵtext(1, " Or use auto-layout after adding steps to arrange them automatically ");
252
+ i0.ɵɵelementStart(0, "p", 53);
253
+ i0.ɵɵtext(1, " Or use auto-arrange after adding steps to lay them out automatically ");
242
254
  i0.ɵɵelementEnd();
243
255
  } }
244
256
  function FlowEditorComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
245
- i0.ɵɵelementStart(0, "div", 17)(1, "mj-empty-state", 56);
246
- i0.ɵɵconditionalCreate(2, FlowEditorComponent_Conditional_21_Conditional_2_Template, 2, 0, "p", 57);
257
+ i0.ɵɵelementStart(0, "div", 17)(1, "mj-empty-state", 52);
258
+ i0.ɵɵconditionalCreate(2, FlowEditorComponent_Conditional_21_Conditional_2_Template, 2, 0, "p", 53);
247
259
  i0.ɵɵelementEnd()();
248
260
  } if (rf & 2) {
249
261
  const ctx_r1 = i0.ɵɵnextContext();
@@ -253,55 +265,55 @@ function FlowEditorComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
253
265
  i0.ɵɵconditional(!ctx_r1.ReadOnly ? 2 : -1);
254
266
  } }
255
267
  function FlowEditorComponent_Conditional_22_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
256
- i0.ɵɵelement(0, "i", 60);
268
+ i0.ɵɵelement(0, "i", 56);
257
269
  } if (rf & 2) {
258
- const item_r11 = i0.ɵɵnextContext().$implicit;
259
- i0.ɵɵproperty("ngClass", item_r11.Icon);
270
+ const item_r12 = i0.ɵɵnextContext().$implicit;
271
+ i0.ɵɵproperty("ngClass", item_r12.Icon);
260
272
  } }
261
273
  function FlowEditorComponent_Conditional_22_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
262
- i0.ɵɵelementStart(0, "kbd", 61);
274
+ i0.ɵɵelementStart(0, "kbd", 57);
263
275
  i0.ɵɵtext(1);
264
276
  i0.ɵɵelementEnd();
265
277
  } if (rf & 2) {
266
- const item_r11 = i0.ɵɵnextContext().$implicit;
278
+ const item_r12 = i0.ɵɵnextContext().$implicit;
267
279
  i0.ɵɵadvance();
268
- i0.ɵɵtextInterpolate(item_r11.Shortcut);
280
+ i0.ɵɵtextInterpolate(item_r12.Shortcut);
269
281
  } }
270
282
  function FlowEditorComponent_Conditional_22_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
271
- i0.ɵɵelement(0, "div", 62);
283
+ i0.ɵɵelement(0, "div", 58);
272
284
  } }
273
285
  function FlowEditorComponent_Conditional_22_For_2_Template(rf, ctx) { if (rf & 1) {
274
- const _r10 = i0.ɵɵgetCurrentView();
275
- i0.ɵɵelementStart(0, "button", 59);
276
- i0.ɵɵlistener("click", function FlowEditorComponent_Conditional_22_For_2_Template_button_click_0_listener() { const item_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onContextMenuAction(item_r11.ID)); });
277
- i0.ɵɵconditionalCreate(1, FlowEditorComponent_Conditional_22_For_2_Conditional_1_Template, 1, 1, "i", 60);
286
+ const _r11 = i0.ɵɵgetCurrentView();
287
+ i0.ɵɵelementStart(0, "button", 55);
288
+ i0.ɵɵlistener("click", function FlowEditorComponent_Conditional_22_For_2_Template_button_click_0_listener() { const item_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onContextMenuAction(item_r12.ID)); });
289
+ i0.ɵɵconditionalCreate(1, FlowEditorComponent_Conditional_22_For_2_Conditional_1_Template, 1, 1, "i", 56);
278
290
  i0.ɵɵelementStart(2, "span");
279
291
  i0.ɵɵtext(3);
280
292
  i0.ɵɵelementEnd();
281
- i0.ɵɵconditionalCreate(4, FlowEditorComponent_Conditional_22_For_2_Conditional_4_Template, 2, 1, "kbd", 61);
293
+ i0.ɵɵconditionalCreate(4, FlowEditorComponent_Conditional_22_For_2_Conditional_4_Template, 2, 1, "kbd", 57);
282
294
  i0.ɵɵelementEnd();
283
- i0.ɵɵconditionalCreate(5, FlowEditorComponent_Conditional_22_For_2_Conditional_5_Template, 1, 0, "div", 62);
295
+ i0.ɵɵconditionalCreate(5, FlowEditorComponent_Conditional_22_For_2_Conditional_5_Template, 1, 0, "div", 58);
284
296
  } if (rf & 2) {
285
- const item_r11 = ctx.$implicit;
286
- const $index_r12 = ctx.$index;
287
- const ɵ$index_193_r13 = ctx.$index;
288
- const ɵ$count_193_r14 = ctx.$count;
297
+ const item_r12 = ctx.$implicit;
298
+ const $index_r13 = ctx.$index;
299
+ const ɵ$index_174_r14 = ctx.$index;
300
+ const ɵ$count_174_r15 = ctx.$count;
289
301
  const ctx_r1 = i0.ɵɵnextContext(2);
290
- i0.ɵɵclassProp("mj-flow-context-menu-item--danger", item_r11.Danger);
291
- i0.ɵɵproperty("disabled", item_r11.Disabled);
302
+ i0.ɵɵclassProp("mj-flow-context-menu-item--danger", item_r12.Danger);
303
+ i0.ɵɵproperty("disabled", item_r12.Disabled);
292
304
  i0.ɵɵadvance();
293
- i0.ɵɵconditional(item_r11.Icon ? 1 : -1);
305
+ i0.ɵɵconditional(item_r12.Icon ? 1 : -1);
294
306
  i0.ɵɵadvance(2);
295
- i0.ɵɵtextInterpolate(item_r11.Label);
307
+ i0.ɵɵtextInterpolate(item_r12.Label);
296
308
  i0.ɵɵadvance();
297
- i0.ɵɵconditional(item_r11.Shortcut ? 4 : -1);
309
+ i0.ɵɵconditional(item_r12.Shortcut ? 4 : -1);
298
310
  i0.ɵɵadvance();
299
- i0.ɵɵconditional(!(ɵ$index_193_r13 === ɵ$count_193_r14 - 1) && item_r11.Danger !== (ctx_r1.contextMenuItems[$index_r12 + 1] == null ? null : ctx_r1.contextMenuItems[$index_r12 + 1].Danger) ? 5 : -1);
311
+ i0.ɵɵconditional(!(ɵ$index_174_r14 === ɵ$count_174_r15 - 1) && item_r12.Danger !== (ctx_r1.contextMenuItems[$index_r13 + 1] == null ? null : ctx_r1.contextMenuItems[$index_r13 + 1].Danger) ? 5 : -1);
300
312
  } }
301
313
  function FlowEditorComponent_Conditional_22_Template(rf, ctx) { if (rf & 1) {
302
- i0.ɵɵelementStart(0, "div", 58);
314
+ i0.ɵɵelementStart(0, "div", 54);
303
315
  i0.ɵɵlistener("click", function FlowEditorComponent_Conditional_22_Template_div_click_0_listener($event) { return $event.stopPropagation(); });
304
- i0.ɵɵrepeaterCreate(1, FlowEditorComponent_Conditional_22_For_2_Template, 6, 7, null, null, _forTrack0);
316
+ i0.ɵɵrepeaterCreate(1, FlowEditorComponent_Conditional_22_For_2_Template, 6, 7, null, null, _forTrack1);
305
317
  i0.ɵɵelementEnd();
306
318
  } if (rf & 2) {
307
319
  const ctx_r1 = i0.ɵɵnextContext();
@@ -355,6 +367,29 @@ export class FlowEditorComponent {
355
367
  ShowLegend = true;
356
368
  GridSize = 20;
357
369
  AutoLayoutDirection = 'vertical';
370
+ /** Expand inline X-Ray telemetry slots on nodes that supply telemetry. */
371
+ XRayEnabled = false;
372
+ /** Enable left-gutter breakpoint clicking directly on nodes. */
373
+ AllowBreakpointClick = false;
374
+ /**
375
+ * Optional persistence key (e.g. `'agent:<id>'` or `'run:<id>'`). When set, pan `{ x, y }`
376
+ * and zoom `scale` are automatically restored on mount and saved per-user via `UserInfoEngine`.
377
+ */
378
+ _viewportKey = null;
379
+ set ViewportKey(value) {
380
+ const normalized = value?.trim() || null;
381
+ if (normalized === this._viewportKey)
382
+ return;
383
+ this._viewportKey = normalized;
384
+ this.hasAutoFitted = false;
385
+ this.viewportOwnedByUser = false;
386
+ if (this.initialized && this.fCanvas && this.Nodes.length > 0) {
387
+ this.applyInitialViewport();
388
+ }
389
+ }
390
+ get ViewportKey() {
391
+ return this._viewportKey;
392
+ }
358
393
  /** Background color for connection labels */
359
394
  // Design tokens, not literals — the canvas renders on both themes, and a near-white pill on a
360
395
  // dark canvas made the least important element the most visually dominant thing on screen.
@@ -363,11 +398,15 @@ export class FlowEditorComponent {
363
398
  ConnectionLabelBorderColor = 'var(--mj-border-default)';
364
399
  /** Text color for connection labels */
365
400
  ConnectionLabelTextColor = 'var(--mj-text-secondary)';
401
+ /** Only draggable/authorable node types appear in the authoring palette sidebar. */
402
+ get PaletteNodeTypes() {
403
+ return this.NodeTypes.filter(nt => nt.Draggable !== false);
404
+ }
366
405
  /** Title for the canvas empty-state overlay — depends on read-only mode. */
367
406
  get EmptyStateTitle() {
368
407
  return this.ReadOnly
369
- ? 'No steps defined for this flow'
370
- : 'Click a step in the palette — or drag one onto the canvas — to start building your flow';
408
+ ? 'No steps defined for this workflow'
409
+ : 'Click a step in the palette — or drag one onto the canvas — to start building your workflow';
371
410
  }
372
411
  // ── Outputs ─────────────────────────────────────────────────
373
412
  NodeSelected = new EventEmitter();
@@ -390,6 +429,14 @@ export class FlowEditorComponent {
390
429
  GridToggled = new EventEmitter();
391
430
  MinimapToggled = new EventEmitter();
392
431
  LegendToggled = new EventEmitter();
432
+ /** Emitted when the user flips layout orientation (LR ⇄ TB) from the canvas toolbar. */
433
+ LayoutDirectionChanged = new EventEmitter();
434
+ /** Emitted when the user clicks a node's left-gutter breakpoint dot. */
435
+ NodeBreakpointClicked = new EventEmitter();
436
+ /** Emitted when the user clicks the `+` quick-add affordance on a node's output port. */
437
+ NodeQuickAddClicked = new EventEmitter();
438
+ /** Emitted when the user clicks the inline `Run This Step` action inside a node's X-Ray slot. */
439
+ NodeRunStepClicked = new EventEmitter();
393
440
  /** The person changed shown / minimized / hidden from the canvas chrome. */
394
441
  ToolbarVisibilityChanged = new EventEmitter();
395
442
  /** What the template actually paints — `ShowToolbar === false` is a hard hide. */
@@ -421,9 +468,10 @@ export class FlowEditorComponent {
421
468
  selectedNodeIDs = [];
422
469
  selectedConnectionIDs = [];
423
470
  panMode = false;
424
- /** Trigger function for canvas panning — only allows panning in pan mode */
471
+ spacePressed = false;
472
+ /** Trigger function for canvas panning — allows panning in pan mode OR while holding Space. */
425
473
  canvasMoveTriggerFn = (_event) => {
426
- return this.panMode;
474
+ return this.panMode || this.spacePressed;
427
475
  };
428
476
  /* Context menu state */
429
477
  contextMenuVisible = false;
@@ -434,6 +482,8 @@ export class FlowEditorComponent {
434
482
  contextMenuConnection = null;
435
483
  contextMenuItems = [];
436
484
  destroy$ = new Subject();
485
+ /** Set in ngOnDestroy. The auto-fit timers are not cancelled, so one can still fire afterwards. */
486
+ destroyed = false;
437
487
  initialized = false;
438
488
  lastConnectionClickTime = 0;
439
489
  /** How many click-placed nodes are cascaded before the offset wraps back to the viewport centre. */
@@ -441,6 +491,22 @@ export class FlowEditorComponent {
441
491
  /** Pixels (canvas units) each cascaded click-placed node is offset by. */
442
492
  static CLICK_CASCADE_OFFSET = 40;
443
493
  clickPlacementIndex = 0;
494
+ viewportStore = new FlowViewportStore({
495
+ Get: (key) => {
496
+ try {
497
+ return UserInfoEngine.Instance.GetSetting(key);
498
+ }
499
+ catch {
500
+ return undefined;
501
+ }
502
+ },
503
+ Set: (key, value) => {
504
+ try {
505
+ UserInfoEngine.Instance.SetSettingDebounced(key, value);
506
+ }
507
+ catch { /* noop */ }
508
+ },
509
+ });
444
510
  constructor(cdr, stateService, layoutService) {
445
511
  this.cdr = cdr;
446
512
  this.stateService = stateService;
@@ -451,14 +517,52 @@ export class FlowEditorComponent {
451
517
  this.initialized = true;
452
518
  }
453
519
  ngOnDestroy() {
520
+ this.destroyed = true;
454
521
  this.destroy$.next();
455
522
  this.destroy$.complete();
456
523
  }
457
524
  // ── Public Methods ──────────────────────────────────────────
458
- /** Fit all nodes within the viewport */
459
- ZoomToFit() {
525
+ /** Restores saved viewport if `ViewportKey` has one, otherwise fits capped at MAX_FIT_SCALE. */
526
+ FitOrRestoreViewport() {
527
+ const saved = this.viewportStore.Load(this._viewportKey);
528
+ if (saved) {
529
+ this.hasAutoFitted = true;
530
+ this.applyProgrammaticViewport(saved.x, saved.y, saved.scale);
531
+ return;
532
+ }
533
+ this.ZoomToFit(false);
534
+ }
535
+ /**
536
+ * Fit all steps within the viewport, capped at MAX_FIT_SCALE (95%) so small 1–5 step workflows
537
+ * stay crisp and centered instead of over-zooming to 200%+. Persists when triggered explicitly.
538
+ */
539
+ ZoomToFit(persist = true) {
540
+ // A fit scheduled with setTimeout (a ViewportKey change, AutoArrange, a host's own timer) can
541
+ // land after the editor is gone. Foblex's canvas then registers a destroy hook on a destroyed
542
+ // view, which throws NG0911.
543
+ if (this.destroyed)
544
+ return;
545
+ const el = this.canvasArea?.nativeElement;
546
+ const vw = el?.clientWidth ?? 0;
547
+ const vh = el?.clientHeight ?? 0;
548
+ const fitted = ComputeCappedFitViewport(this.Nodes, vw, vh);
549
+ if (fitted) {
550
+ this.applyProgrammaticViewport(fitted.x, fitted.y, fitted.scale);
551
+ this.hasAutoFitted = true;
552
+ if (persist && this._viewportKey) {
553
+ this.viewportStore.Save(this._viewportKey, fitted);
554
+ }
555
+ return;
556
+ }
557
+ // Fallback when container dimensions are not measurable yet (e.g., jsdom tests)
460
558
  this.applyingProgrammaticViewport = true;
461
- this.fCanvas?.fitToScreen({ x: 150, y: 150 }, true);
559
+ this.fCanvas?.fitToScreen({ x: 120, y: 120 }, false);
560
+ const currentScale = this.fCanvas?.getScale() ?? this.canvasScale;
561
+ if (currentScale > MAX_FIT_SCALE) {
562
+ this.canvasScale = MAX_FIT_SCALE;
563
+ this.updateZoomLevel(MAX_FIT_SCALE);
564
+ this.fCanvas?.setScale(MAX_FIT_SCALE);
565
+ }
462
566
  this.hasAutoFitted = true;
463
567
  queueMicrotask(() => { this.applyingProgrammaticViewport = false; });
464
568
  }
@@ -486,10 +590,12 @@ export class FlowEditorComponent {
486
590
  this.updateZoomLevel(newScale);
487
591
  }
488
592
  }
489
- /** Run auto-layout using dagre */
593
+ /** Run auto-layout using dagre and align node port sides to the active flow direction. */
490
594
  AutoArrange(direction) {
491
595
  const dir = direction ?? this.AutoLayoutDirection;
596
+ this.AutoLayoutDirection = dir;
492
597
  this.pushUndoState();
598
+ this.syncPortSidesToDirection(dir);
493
599
  const result = this.layoutService.CalculateLayout(this.Nodes, this.Connections, dir);
494
600
  for (const node of this.Nodes) {
495
601
  const newPos = result.Positions.get(node.ID);
@@ -499,9 +605,20 @@ export class FlowEditorComponent {
499
605
  }
500
606
  this.NodesChanged.emit(this.Nodes);
501
607
  this.cdr.detectChanges();
502
- // Fit to screen after layout
503
608
  setTimeout(() => this.ZoomToFit(), 100);
504
609
  }
610
+ /** Aligns input/output port sides with LR ('left'/'right') or TB ('top'/'bottom') layout direction. */
611
+ syncPortSidesToDirection(dir) {
612
+ const inputSide = dir === 'horizontal' ? 'left' : 'top';
613
+ const outputSide = dir === 'horizontal' ? 'right' : 'bottom';
614
+ this.Nodes = this.Nodes.map(node => ({
615
+ ...node,
616
+ Ports: node.Ports.map(port => ({
617
+ ...port,
618
+ Side: port.Direction === 'input' ? inputSide : outputSide
619
+ }))
620
+ }));
621
+ }
505
622
  /** Center the canvas on a specific node */
506
623
  CenterOnNode(nodeId) {
507
624
  this.fCanvas?.centerGroupOrNode(nodeId, true);
@@ -628,23 +745,49 @@ export class FlowEditorComponent {
628
745
  this.restoreViewport();
629
746
  return;
630
747
  }
748
+ this.applyInitialViewport();
749
+ }
750
+ /** Restores persisted viewport for `ViewportKey` when available, otherwise fits with max-zoom cap. */
751
+ applyInitialViewport() {
752
+ const saved = this.viewportStore.Load(this._viewportKey);
753
+ if (saved) {
754
+ this.hasAutoFitted = true;
755
+ this.applyProgrammaticViewport(saved.x, saved.y, saved.scale);
756
+ return;
757
+ }
631
758
  this.hasAutoFitted = true;
632
- setTimeout(() => this.ZoomToFit(), 200);
759
+ setTimeout(() => this.ZoomToFit(false), 120);
760
+ }
761
+ applyProgrammaticViewport(x, y, scale) {
762
+ this.applyingProgrammaticViewport = true;
763
+ this.canvasPosition = { x, y };
764
+ this.canvasScale = scale;
765
+ this.updateZoomLevel(scale);
766
+ this.fCanvas?.setScale(scale);
767
+ this.fCanvas?.redraw();
768
+ this.cdr.markForCheck();
769
+ queueMicrotask(() => { this.applyingProgrammaticViewport = false; });
633
770
  }
634
771
  /** Canvas zoom/pan changed */
635
772
  onCanvasChange(event) {
636
773
  this.canvasPosition = event.position;
637
774
  this.canvasScale = event.scale;
638
775
  this.updateZoomLevel(event.scale);
639
- if (!this.applyingProgrammaticViewport)
776
+ if (!this.applyingProgrammaticViewport) {
640
777
  this.viewportOwnedByUser = true;
778
+ if (this._viewportKey) {
779
+ this.viewportStore.Save(this._viewportKey, {
780
+ x: event.position.x,
781
+ y: event.position.y,
782
+ scale: event.scale,
783
+ });
784
+ }
785
+ }
641
786
  }
642
787
  restoreViewport() {
643
788
  if (!this.fCanvas)
644
789
  return;
645
- this.applyingProgrammaticViewport = true;
646
- this.fCanvas.setScale(this.canvasScale);
647
- queueMicrotask(() => { this.applyingProgrammaticViewport = false; });
790
+ this.applyProgrammaticViewport(this.canvasPosition.x, this.canvasPosition.y, this.canvasScale);
648
791
  }
649
792
  /** User drew a new connection */
650
793
  onCreateConnection(event) {
@@ -851,6 +994,16 @@ export class FlowEditorComponent {
851
994
  this.panMode = enabled;
852
995
  this.cdr.detectChanges();
853
996
  }
997
+ onLayoutDirectionToggled(direction) {
998
+ this.AutoLayoutDirection = direction;
999
+ this.LayoutDirectionChanged.emit(direction);
1000
+ if (this.Nodes.length > 0) {
1001
+ this.AutoArrange(direction);
1002
+ }
1003
+ else {
1004
+ this.cdr.detectChanges();
1005
+ }
1006
+ }
854
1007
  // ── Context Menu ───────────────────────────────────────────
855
1008
  onNodeContextMenu(event, node) {
856
1009
  event.preventDefault();
@@ -954,15 +1107,22 @@ export class FlowEditorComponent {
954
1107
  }
955
1108
  // ── Keyboard Shortcuts ─────────────────────────────────────
956
1109
  onKeyDown(event) {
1110
+ const target = event.target;
1111
+ const isTyping = target != null && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.tagName === 'SELECT' || target.isContentEditable);
1112
+ if (event.code === 'Space' && !isTyping) {
1113
+ if (!this.spacePressed) {
1114
+ this.spacePressed = true;
1115
+ this.cdr.detectChanges();
1116
+ }
1117
+ event.preventDefault();
1118
+ return;
1119
+ }
957
1120
  if (this.ReadOnly)
958
1121
  return;
959
1122
  const isCtrlOrMeta = event.ctrlKey || event.metaKey;
960
1123
  if (event.key === 'Delete' || event.key === 'Backspace') {
961
- // Don't delete if user is typing in an input
962
- const target = event.target;
963
- if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.tagName === 'SELECT') {
1124
+ if (isTyping)
964
1125
  return;
965
- }
966
1126
  event.preventDefault();
967
1127
  this.DeleteSelected();
968
1128
  }
@@ -979,6 +1139,12 @@ export class FlowEditorComponent {
979
1139
  this.fFlow?.selectAll();
980
1140
  }
981
1141
  }
1142
+ onKeyUp(event) {
1143
+ if (event.code === 'Space' && this.spacePressed) {
1144
+ this.spacePressed = false;
1145
+ this.cdr.detectChanges();
1146
+ }
1147
+ }
982
1148
  // ── TrackBy Functions ───────────────────────────────────────
983
1149
  trackNodeById(_index, node) {
984
1150
  return node.ID;
@@ -1048,9 +1214,11 @@ export class FlowEditorComponent {
1048
1214
  }
1049
1215
  createDefaultNode(config, position) {
1050
1216
  const id = this.generateId();
1217
+ const inputSide = this.AutoLayoutDirection === 'horizontal' ? 'left' : 'top';
1218
+ const outputSide = this.AutoLayoutDirection === 'horizontal' ? 'right' : 'bottom';
1051
1219
  const defaultPorts = config.DefaultPorts ?? [
1052
- { ID: `${id}-input`, Direction: 'input', Side: 'top', Multiple: true },
1053
- { ID: `${id}-output`, Direction: 'output', Side: 'bottom', Multiple: true }
1220
+ { ID: `${id}-input`, Direction: 'input', Side: inputSide, Multiple: true },
1221
+ { ID: `${id}-output`, Direction: 'output', Side: outputSide, Multiple: true }
1054
1222
  ];
1055
1223
  return {
1056
1224
  ID: id,
@@ -1061,6 +1229,7 @@ export class FlowEditorComponent {
1061
1229
  Position: position,
1062
1230
  Ports: defaultPorts.map(p => ({
1063
1231
  ...p,
1232
+ Side: p.Direction === 'input' ? inputSide : outputSide,
1064
1233
  ID: p.ID.startsWith(id) ? p.ID : `${id}-${p.ID}`
1065
1234
  }))
1066
1235
  };
@@ -1103,10 +1272,10 @@ export class FlowEditorComponent {
1103
1272
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fZoom = _t.first);
1104
1273
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.canvasArea = _t.first);
1105
1274
  } }, hostBindings: function FlowEditorComponent_HostBindings(rf, ctx) { if (rf & 1) {
1106
- i0.ɵɵlistener("click", function FlowEditorComponent_click_HostBindingHandler() { return ctx.onDocumentClick(); }, i0.ɵɵresolveDocument)("keydown", function FlowEditorComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });
1107
- } }, inputs: { Nodes: "Nodes", Connections: "Connections", NodeTypes: "NodeTypes", ReadOnly: "ReadOnly", ShowMinimap: "ShowMinimap", ShowPalette: "ShowPalette", ShowGrid: "ShowGrid", ShowStatusBar: "ShowStatusBar", ShowToolbar: "ShowToolbar", ToolbarVisibility: "ToolbarVisibility", ToolbarAlign: "ToolbarAlign", ShowLegend: "ShowLegend", GridSize: "GridSize", AutoLayoutDirection: "AutoLayoutDirection", ConnectionLabelBackground: "ConnectionLabelBackground", ConnectionLabelBorderColor: "ConnectionLabelBorderColor", ConnectionLabelTextColor: "ConnectionLabelTextColor" }, outputs: { NodeSelected: "NodeSelected", NodeAdded: "NodeAdded", NodeRemoved: "NodeRemoved", NodeMoved: "NodeMoved", ConnectionCreated: "ConnectionCreated", ConnectionRemoved: "ConnectionRemoved", ConnectionReassigned: "ConnectionReassigned", ConnectionSelected: "ConnectionSelected", SelectionChanged: "SelectionChanged", CanvasClicked: "CanvasClicked", NodesChanged: "NodesChanged", ConnectionsChanged: "ConnectionsChanged", NodeEditRequested: "NodeEditRequested", ConnectionEditRequested: "ConnectionEditRequested", BeforeContextMenu: "BeforeContextMenu", AfterContextMenuAction: "AfterContextMenuAction", GridToggled: "GridToggled", MinimapToggled: "MinimapToggled", LegendToggled: "LegendToggled", ToolbarVisibilityChanged: "ToolbarVisibilityChanged" }, standalone: false, features: [i0.ɵɵProvidersFeature([FlowStateService, FlowLayoutService])], decls: 24, vars: 25, consts: [["canvasArea", ""], ["fZoomRef", "fComponent"], ["tabindex", "0", 1, "mj-flow-editor"], [1, "mj-flow-editor-toolbar-area"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-chip"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-tab"], [1, "mj-flow-editor-canvas-area"], [3, "NodeTypes"], [1, "mj-flow-editor-canvas"], ["fDraggable", "", 3, "fLoaded", "fCreateConnection", "fReassignConnection", "fCreateNode", "fSelectionChange", "fMoveNodes", "fDraggableDisabled", "fCanvasMoveTrigger", "vCellSize", "hCellSize", "fCellSizeWhileDragging"], [3, "fAlignThreshold"], ["fZoom", "", 3, "fCanvasChange", "fZoomMinimum", "fZoomMaximum", "fZoomStep", "position", "scale"], ["fType", "bezier", 3, "fRadius", "fOffset"], ["fType", "bezier", "fBehavior", "fixed", 3, "fConnectionId", "fOutputId", "fInputId", "fRadius", "fOffset", "fSelectionDisabled", "fReassignDisabled", "--connection-color", "--connection-width", "mj-flow-connection-colored", "mj-flow-connection-dashed", "mj-flow-connection-dotted", "mj-flow-connection-animated"], ["fNode", "", "fDragHandle", "", 3, "fNodeId", "fNodePosition", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fConnectOnNode", "Node", "TypeConfig", "ReadOnly"], ["fDragBlocker", "", 1, "mj-flow-editor-minimap"], [1, "mj-flow-editor-legend"], [1, "mj-flow-editor-empty"], [1, "mj-flow-context-menu", 3, "left", "top"], [3, "NodeCount", "ConnectionCount", "SelectedCount", "ZoomLevel"], [3, "ZoomInClicked", "ZoomOutClicked", "FitToScreenClicked", "AutoLayoutClicked", "GridToggled", "MinimapToggled", "LegendToggled", "PanModeToggled", "MinimizeClicked", "HideClicked", "ZoomLevel", "ShowGrid", "ShowMinimap", "ShowLegend", "ReadOnly", "PanMode"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-chip", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-wrench"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-tab", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-ellipsis"], [3, "NodeTypeActivated", "NodeTypes"], [3, "color", "radius"], ["viewBox", "0 0 10 10", "fMarker", "", "type", "end", "orient", "auto", 3, "refX", "refY", "height", "width"], ["d", "M0 0L10 5L0 10Z", "fill", "#94a3b8"], ["fType", "bezier", "fBehavior", "fixed", 3, "click", "contextmenu", "fConnectionId", "fOutputId", "fInputId", "fRadius", "fOffset", "fSelectionDisabled", "fReassignDisabled"], ["d", "M0 0L10 5L0 10Z"], ["fConnectionContent", "", 1, "mj-flow-connection-label", 3, "position", "backgroundColor", "borderColor", "color", "title"], ["fConnectionContent", "", 1, "mj-flow-connection-label", 3, "position", "title"], [1, "fa-solid", "mj-flow-connection-label-icon", 3, "ngClass", "color"], [1, "fa-solid", "mj-flow-connection-label-icon", 3, "ngClass"], ["fNode", "", "fDragHandle", "", 3, "contextmenu", "fNodeId", "fNodePosition", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fConnectOnNode", "Node", "TypeConfig", "ReadOnly"], [3, "fMinSize"], [1, "mj-flow-editor-legend-title"], [1, "mj-flow-editor-legend-section"], [1, "mj-flow-editor-legend-heading"], [1, "mj-flow-editor-legend-item"], ["width", "28", "height", "10", 1, "mj-flow-editor-legend-line-svg"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "#64748b", "stroke-width", "2"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "#16a34a", "stroke-width", "2"], [1, "fa-solid", "fa-circle-check", 2, "color", "#16a34a", "font-size", "10px"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "#f59e0b", "stroke-width", "2", "stroke-dasharray", "5 3"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "#ef4444", "stroke-width", "2"], [1, "fa-solid", "fa-triangle-exclamation", 2, "color", "#ef4444", "font-size", "10px"], [1, "mj-flow-editor-legend-swatch", 2, "background", "#3B82F6"], [1, "mj-flow-editor-legend-swatch", 2, "background", "#8B5CF6"], [1, "mj-flow-editor-legend-swatch", 2, "background", "#10B981"], [1, "mj-flow-editor-legend-swatch", 2, "background", "#F59E0B"], [1, "mj-flow-editor-legend-swatch", 2, "background", "#F97316"], [1, "mj-flow-editor-legend-box", 2, "border-color", "#16a34a", "background", "#f0fdf4"], [1, "mj-flow-editor-legend-box", 2, "border-color", "#ef4444", "background", "#fef2f2"], [1, "fa-solid", "fa-triangle-exclamation", 2, "color", "#ea580c", "font-size", "10px"], ["Icon", "fa-solid fa-diagram-project", 3, "Title"], [1, "mj-flow-editor-empty-subtitle"], [1, "mj-flow-context-menu", 3, "click"], ["type", "button", 1, "mj-flow-context-menu-item", 3, "click", "disabled"], [1, "fa-solid", 3, "ngClass"], [1, "mj-flow-context-menu-shortcut"], [1, "mj-flow-context-menu-divider"]], template: function FlowEditorComponent_Template(rf, ctx) { if (rf & 1) {
1275
+ i0.ɵɵlistener("click", function FlowEditorComponent_click_HostBindingHandler() { return ctx.onDocumentClick(); }, i0.ɵɵresolveDocument)("keydown", function FlowEditorComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); })("keyup", function FlowEditorComponent_keyup_HostBindingHandler($event) { return ctx.onKeyUp($event); }, i0.ɵɵresolveDocument);
1276
+ } }, inputs: { Nodes: "Nodes", Connections: "Connections", NodeTypes: "NodeTypes", ReadOnly: "ReadOnly", ShowMinimap: "ShowMinimap", ShowPalette: "ShowPalette", ShowGrid: "ShowGrid", ShowStatusBar: "ShowStatusBar", ShowToolbar: "ShowToolbar", ToolbarVisibility: "ToolbarVisibility", ToolbarAlign: "ToolbarAlign", ShowLegend: "ShowLegend", GridSize: "GridSize", AutoLayoutDirection: "AutoLayoutDirection", XRayEnabled: "XRayEnabled", AllowBreakpointClick: "AllowBreakpointClick", ViewportKey: "ViewportKey", ConnectionLabelBackground: "ConnectionLabelBackground", ConnectionLabelBorderColor: "ConnectionLabelBorderColor", ConnectionLabelTextColor: "ConnectionLabelTextColor" }, outputs: { NodeSelected: "NodeSelected", NodeAdded: "NodeAdded", NodeRemoved: "NodeRemoved", NodeMoved: "NodeMoved", ConnectionCreated: "ConnectionCreated", ConnectionRemoved: "ConnectionRemoved", ConnectionReassigned: "ConnectionReassigned", ConnectionSelected: "ConnectionSelected", SelectionChanged: "SelectionChanged", CanvasClicked: "CanvasClicked", NodesChanged: "NodesChanged", ConnectionsChanged: "ConnectionsChanged", NodeEditRequested: "NodeEditRequested", ConnectionEditRequested: "ConnectionEditRequested", BeforeContextMenu: "BeforeContextMenu", AfterContextMenuAction: "AfterContextMenuAction", GridToggled: "GridToggled", MinimapToggled: "MinimapToggled", LegendToggled: "LegendToggled", LayoutDirectionChanged: "LayoutDirectionChanged", NodeBreakpointClicked: "NodeBreakpointClicked", NodeQuickAddClicked: "NodeQuickAddClicked", NodeRunStepClicked: "NodeRunStepClicked", ToolbarVisibilityChanged: "ToolbarVisibilityChanged" }, standalone: false, features: [i0.ɵɵProvidersFeature([FlowStateService, FlowLayoutService])], decls: 24, vars: 25, consts: [["canvasArea", ""], ["fZoomRef", "fComponent"], ["tabindex", "0", 1, "mj-flow-editor"], [1, "mj-flow-editor-toolbar-area"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-chip"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-tab"], [1, "mj-flow-editor-canvas-area"], [3, "NodeTypes"], [1, "mj-flow-editor-canvas"], ["fDraggable", "", 3, "fLoaded", "fCreateConnection", "fReassignConnection", "fCreateNode", "fSelectionChange", "fMoveNodes", "fDraggableDisabled", "fCanvasMoveTrigger", "vCellSize", "hCellSize", "fCellSizeWhileDragging"], [3, "fAlignThreshold"], ["fZoom", "", 3, "fCanvasChange", "fZoomMinimum", "fZoomMaximum", "fZoomStep", "position", "scale"], ["fType", "bezier", 3, "fRadius", "fOffset"], ["fType", "bezier", "fBehavior", "fixed", 3, "fConnectionId", "fOutputId", "fInputId", "fRadius", "fOffset", "fSelectionDisabled", "fReassignDisabled", "--connection-color", "--connection-width", "mj-flow-connection-colored", "mj-flow-connection-dashed", "mj-flow-connection-dotted", "mj-flow-connection-untaken", "mj-flow-connection-forced", "mj-flow-connection-animated"], ["fNode", "", "fDragHandle", "", 3, "fNodeId", "fNodePosition", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fConnectOnNode", "Node", "TypeConfig", "ReadOnly", "XRayEnabled", "AllowBreakpointClick"], ["fDragBlocker", "", 1, "mj-flow-editor-minimap"], [1, "mj-flow-editor-legend"], [1, "mj-flow-editor-empty"], [1, "mj-flow-context-menu", 3, "left", "top"], [3, "NodeCount", "ConnectionCount", "SelectedCount", "ZoomLevel"], [3, "ZoomInClicked", "ZoomOutClicked", "FitToScreenClicked", "AutoLayoutClicked", "LayoutDirectionToggled", "GridToggled", "MinimapToggled", "LegendToggled", "PanModeToggled", "MinimizeClicked", "HideClicked", "ZoomLevel", "ShowGrid", "ShowMinimap", "ShowLegend", "ReadOnly", "PanMode", "LayoutDirection"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-chip", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-wrench"], ["type", "button", "title", "Show canvas tools", "aria-label", "Show canvas tools", 1, "mj-flow-editor-toolbar-tab", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-ellipsis"], [3, "NodeTypeActivated", "NodeTypes"], [3, "color", "radius"], ["viewBox", "0 0 10 10", "fMarker", "", "type", "end", "orient", "auto", 3, "refX", "refY", "height", "width"], ["d", "M0 0L10 5L0 10Z", "fill", "var(--mj-text-disabled)"], ["fType", "bezier", "fBehavior", "fixed", 3, "click", "contextmenu", "fConnectionId", "fOutputId", "fInputId", "fRadius", "fOffset", "fSelectionDisabled", "fReassignDisabled"], ["d", "M0 0L10 5L0 10Z"], ["fConnectionContent", "", 1, "mj-flow-connection-label", 3, "position", "backgroundColor", "borderColor", "color", "title"], ["fConnectionContent", "", 1, "mj-flow-connection-label", 3, "position", "title"], [1, "fa-solid", "mj-flow-connection-label-icon", 3, "ngClass", "color"], [1, "fa-solid", "mj-flow-connection-label-icon", 3, "ngClass"], ["fNode", "", "fDragHandle", "", 3, "BreakpointClicked", "QuickAddClicked", "RunStepClicked", "contextmenu", "fNodeId", "fNodePosition", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fConnectOnNode", "Node", "TypeConfig", "ReadOnly", "XRayEnabled", "AllowBreakpointClick"], [3, "fMinSize"], [1, "mj-flow-editor-legend-title"], [1, "mj-flow-editor-legend-section"], [1, "mj-flow-editor-legend-heading"], [1, "mj-flow-editor-legend-item"], ["width", "28", "height", "10", 1, "mj-flow-editor-legend-line-svg"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "var(--mj-text-muted)", "stroke-width", "2"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "var(--mj-status-success)", "stroke-width", "2"], [1, "fa-solid", "fa-circle-check", "mj-flow-editor-legend-icon--ok"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "var(--mj-status-warning)", "stroke-width", "2", "stroke-dasharray", "5 3"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "var(--mj-status-warning)", "stroke-width", "2.5", "stroke-dasharray", "3 3"], ["x1", "0", "y1", "5", "x2", "28", "y2", "5", "stroke", "var(--mj-text-disabled)", "stroke-width", "2", "stroke-dasharray", "5 4"], [1, "mj-flow-editor-legend-box", "mj-flow-editor-legend-box--start"], [1, "mj-flow-editor-legend-box", "mj-flow-editor-legend-box--warn"], [1, "fa-solid", "fa-triangle-exclamation", "mj-flow-editor-legend-icon--warn"], [1, "mj-flow-editor-legend-swatch"], ["Icon", "fa-solid fa-diagram-project", 3, "Title"], [1, "mj-flow-editor-empty-subtitle"], [1, "mj-flow-context-menu", 3, "click"], ["type", "button", 1, "mj-flow-context-menu-item", 3, "click", "disabled"], [1, "fa-solid", 3, "ngClass"], [1, "mj-flow-context-menu-shortcut"], [1, "mj-flow-context-menu-divider"]], template: function FlowEditorComponent_Template(rf, ctx) { if (rf & 1) {
1108
1277
  i0.ɵɵelementStart(0, "div", 2);
1109
- i0.ɵɵconditionalCreate(1, FlowEditorComponent_Conditional_1_Template, 2, 7, "div", 3)(2, FlowEditorComponent_Conditional_2_Template, 2, 1, "button", 4)(3, FlowEditorComponent_Conditional_3_Template, 2, 1, "button", 5);
1278
+ i0.ɵɵconditionalCreate(1, FlowEditorComponent_Conditional_1_Template, 2, 8, "div", 3)(2, FlowEditorComponent_Conditional_2_Template, 2, 1, "button", 4)(3, FlowEditorComponent_Conditional_3_Template, 2, 1, "button", 5);
1110
1279
  i0.ɵɵelementStart(4, "div", 6);
1111
1280
  i0.ɵɵconditionalCreate(5, FlowEditorComponent_Conditional_5_Template, 1, 1, "mj-flow-palette", 7);
1112
1281
  i0.ɵɵelementStart(6, "div", 8, 0)(8, "f-flow", 9);
@@ -1116,13 +1285,13 @@ export class FlowEditorComponent {
1116
1285
  i0.ɵɵelementStart(11, "f-canvas", 11, 1);
1117
1286
  i0.ɵɵlistener("fCanvasChange", function FlowEditorComponent_Template_f_canvas_fCanvasChange_11_listener($event) { return ctx.onCanvasChange($event); });
1118
1287
  i0.ɵɵconditionalCreate(13, FlowEditorComponent_Conditional_13_Template, 3, 6, "f-connection-for-create", 12);
1119
- i0.ɵɵrepeaterCreate(14, FlowEditorComponent_For_15_Template, 4, 25, "f-connection", 13, ctx.trackConnectionById, true);
1120
- i0.ɵɵrepeaterCreate(16, FlowEditorComponent_For_17_Template, 1, 11, "mj-flow-node", 14, ctx.trackNodeById, true);
1288
+ i0.ɵɵrepeaterCreate(14, FlowEditorComponent_For_15_Template, 4, 29, "f-connection", 13, ctx.trackConnectionById, true);
1289
+ i0.ɵɵrepeaterCreate(16, FlowEditorComponent_For_17_Template, 1, 13, "mj-flow-node", 14, ctx.trackNodeById, true);
1121
1290
  i0.ɵɵelementEnd();
1122
1291
  i0.ɵɵconditionalCreate(18, FlowEditorComponent_Conditional_18_Template, 1, 0, "f-selection-area");
1123
1292
  i0.ɵɵconditionalCreate(19, FlowEditorComponent_Conditional_19_Template, 2, 1, "div", 15);
1124
1293
  i0.ɵɵelementEnd();
1125
- i0.ɵɵconditionalCreate(20, FlowEditorComponent_Conditional_20_Template, 63, 0, "div", 16);
1294
+ i0.ɵɵconditionalCreate(20, FlowEditorComponent_Conditional_20_Template, 45, 1, "div", 16);
1126
1295
  i0.ɵɵconditionalCreate(21, FlowEditorComponent_Conditional_21_Template, 3, 2, "div", 17);
1127
1296
  i0.ɵɵelementEnd()();
1128
1297
  i0.ɵɵconditionalCreate(22, FlowEditorComponent_Conditional_22_Template, 3, 4, "div", 18);
@@ -1135,7 +1304,7 @@ export class FlowEditorComponent {
1135
1304
  i0.ɵɵadvance(4);
1136
1305
  i0.ɵɵconditional(ctx.ShowPalette && !ctx.ReadOnly ? 5 : -1);
1137
1306
  i0.ɵɵadvance();
1138
- i0.ɵɵclassProp("mj-flow-editor-canvas--pan-mode", ctx.panMode);
1307
+ i0.ɵɵclassProp("mj-flow-editor-canvas--pan-mode", ctx.panMode || ctx.spacePressed);
1139
1308
  i0.ɵɵadvance(2);
1140
1309
  i0.ɵɵproperty("fDraggableDisabled", false)("fCanvasMoveTrigger", ctx.canvasMoveTriggerFn)("vCellSize", ctx.GridSize)("hCellSize", ctx.GridSize)("fCellSizeWhileDragging", ctx.ShowGrid);
1141
1310
  i0.ɵɵadvance();
@@ -1162,11 +1331,11 @@ export class FlowEditorComponent {
1162
1331
  i0.ɵɵconditional(ctx.contextMenuVisible ? 22 : -1);
1163
1332
  i0.ɵɵadvance();
1164
1333
  i0.ɵɵconditional(ctx.ShowStatusBar ? 23 : -1);
1165
- } }, dependencies: [i3.NgClass, i4.FFlowComponent, i4.FCanvasComponent, i4.FBackgroundComponent, i4.FCirclePatternComponent, i4.FZoomDirective, i4.FConnectionContent, i4.FConnectionMarker, i4.FConnectionComponent, i4.FConnectionForCreateComponent, i4.FLineAlignmentComponent, i4.FMinimapComponent, i4.FNodeDirective, i4.FDragHandleDirective, i4.FSelectionAreaComponent, i4.FDragBlockerDirective, i4.FDraggableDirective, i5.MJEmptyStateComponent, i6.FlowNodeComponent, i7.FlowPaletteComponent, i8.FlowToolbarComponent, i9.FlowStatusBarComponent], styles: ["/* ============================================================\n Flow Editor \u2014 Main container styles\n ============================================================ */\n\n/* The HOST is a custom element, which is `display: inline` with auto height until told otherwise.\n Without this, `.mj-flow-editor { height: 100% }` below resolved against an auto-height parent \u2014\n which means auto \u2014 so the canvas fell back to its `min-height` floor and sat at 400px no matter\n how much room its pane actually had.\n\n `height: 100%` here is safe for hosts that DON'T give it a box: it resolves to auto in that case,\n and the floor takes over exactly as before. */\n:host {\n display: block;\n height: 100%;\n min-height: 0;\n}\n\n.mj-flow-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n outline: none;\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n}\n\n.mj-flow-editor--readonly .mj-flow-node-port {\n cursor: default;\n pointer-events: none;\n}\n\n/* \u2500\u2500 Toolbar Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-toolbar-area,\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n position: absolute;\n top: 10px;\n z-index: 20;\n}\n.mj-flow-editor-toolbar-area[data-align=\"center\"],\n.mj-flow-editor-toolbar-chip[data-align=\"center\"],\n.mj-flow-editor-toolbar-tab[data-align=\"center\"] {\n left: 50%;\n transform: translateX(-50%);\n}\n.mj-flow-editor-toolbar-area[data-align=\"left\"],\n.mj-flow-editor-toolbar-chip[data-align=\"left\"],\n.mj-flow-editor-toolbar-tab[data-align=\"left\"] {\n left: 10px;\n}\n.mj-flow-editor-toolbar-area[data-align=\"right\"],\n.mj-flow-editor-toolbar-chip[data-align=\"right\"],\n.mj-flow-editor-toolbar-tab[data-align=\"right\"] {\n right: 10px;\n}\n\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.mj-flow-editor-toolbar-chip:hover,\n.mj-flow-editor-toolbar-tab:hover {\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-flow-editor-toolbar-chip {\n width: 32px;\n height: 32px;\n border-radius: var(--mj-radius-md);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.mj-flow-editor-toolbar-tab {\n width: 22px;\n height: 18px;\n padding: 0;\n border-radius: var(--mj-radius-sm);\n opacity: 0.55;\n}\n.mj-flow-editor-toolbar-tab:hover { opacity: 1; }\n\n/* \u2500\u2500 Canvas Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-canvas-area {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-flow-editor-canvas {\n flex: 1;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface);\n}\n\n.mj-flow-editor-canvas f-flow {\n width: 100%;\n height: 100%;\n}\n\n/* Pan mode \u2014 grab cursor, nodes pass through pointer events to canvas */\n.mj-flow-editor-canvas--pan-mode {\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode:active {\n cursor: grabbing;\n}\n\n.mj-flow-editor-canvas--pan-mode mj-flow-node {\n pointer-events: none;\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode f-connection {\n pointer-events: none;\n}\n\n.mj-flow-editor-canvas--pan-mode .mj-flow-connection-label {\n pointer-events: none;\n}\n\n/* \u2500\u2500 Minimap \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-minimap {\n position: absolute;\n bottom: 12px;\n right: 12px;\n width: 160px;\n height: 120px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n z-index: 15;\n}\n\n.mj-flow-editor-minimap f-minimap {\n width: 100%;\n height: 100%;\n}\n\n/* Foblex minimap SVG node rectangles (no default styles provided by Foblex) */\n.mj-flow-editor-minimap .f-minimap-node {\n fill: var(--mj-border-strong);\n stroke: var(--mj-text-disabled);\n stroke-width: 1;\n rx: 3;\n ry: 3;\n}\n\n.mj-flow-editor-minimap .f-minimap-node.f-selected {\n fill: color-mix(in srgb, var(--mj-brand-primary) 50%, var(--mj-bg-surface));\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n.mj-flow-editor-minimap .f-minimap-group {\n fill: var(--mj-border-default);\n stroke: var(--mj-text-disabled);\n stroke-width: 0.5;\n rx: 2;\n ry: 2;\n}\n\n/* Viewport indicator rectangle */\n.mj-flow-editor-minimap .f-minimap-view {\n fill: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n/* \u2500\u2500 Empty State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-empty {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n z-index: 5;\n}\n\n.mj-flow-editor-empty-subtitle {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-disabled);\n margin: 0;\n}\n\n/* \u2500\u2500 Connection Labels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-connection-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 5px;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 5px;\n padding: 4px 10px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n box-shadow: var(--mj-shadow-sm);\n pointer-events: none;\n line-height: 1.4;\n text-align: center;\n}\n\n.mj-flow-connection-label-icon {\n font-size: 10px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n/* \u2500\u2500 Foblex Overrides \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Canvas \u2014 transparent so the grid pattern shows through */\nf-canvas {\n background: transparent;\n}\n\n/* Selection area */\nf-selection-area {\n --f-selection-area-background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n --f-selection-area-border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* Line alignment guides */\nf-line-alignment {\n --f-line-alignment-color: var(--mj-brand-primary);\n}\n\n/* Connection paths \u2014 default stroke color prevents invisible connections */\n.f-connection path {\n stroke: var(--mj-text-disabled);\n stroke-width: var(--connection-width, 2px);\n fill: none;\n transition: stroke 0.15s ease, stroke-width 0.15s ease;\n}\n\n.f-connection:hover path {\n stroke-width: calc(var(--connection-width, 2px) + 1px);\n}\n\n.f-connection.f-selected path {\n stroke: var(--mj-brand-primary);\n stroke-width: max(3px, var(--connection-width, 2px));\n}\n\n/* Colored connections use the --connection-color custom property,\n defaulting to neutral when no color is specified by the consumer */\n.mj-flow-connection-colored path {\n stroke: var(--connection-color, var(--mj-text-disabled));\n}\n\n.mj-flow-connection-colored.f-selected path {\n stroke: var(--connection-color, var(--mj-brand-primary));\n stroke-width: max(3px, var(--connection-width, 2px));\n filter: brightness(0.85);\n}\n\n/* Dashed connection style */\n.mj-flow-connection-dashed path {\n stroke-dasharray: 8 4;\n}\n\n/* Dotted connection style */\n.mj-flow-connection-dotted path {\n stroke-dasharray: 3 3;\n}\n\n.mj-flow-connection-animated path {\n stroke-dasharray: 14 10;\n stroke-linecap: round;\n stroke-width: var(--connection-width, 4.5px);\n animation: mj-flow-dash 0.5s linear infinite;\n filter: drop-shadow(0 0 5px color-mix(in srgb, var(--connection-color, var(--mj-brand-primary)) 70%, transparent));\n}\n@keyframes mj-flow-dash {\n to { stroke-dashoffset: -24; }\n}\n\n/* Connection for create (dragging) */\n.f-connection-for-create path {\n stroke: var(--mj-text-disabled);\n stroke-dasharray: 6 3;\n stroke-width: 2;\n}\n\n/* \u2500\u2500 Legend \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-legend {\n position: absolute;\n bottom: 12px;\n left: 12px;\n background: color-mix(in srgb, var(--mj-bg-surface) 92%, transparent);\n backdrop-filter: blur(6px);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 10px 14px;\n box-shadow: var(--mj-shadow-sm);\n z-index: 15;\n font-size: 11px;\n color: var(--mj-text-secondary);\n max-width: 200px;\n}\n\n.mj-flow-editor-legend-title {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 8px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mj-flow-editor-legend-section {\n margin-bottom: 8px;\n}\n\n.mj-flow-editor-legend-section:last-child {\n margin-bottom: 0;\n}\n\n.mj-flow-editor-legend-heading {\n font-size: 10px;\n font-weight: 600;\n color: var(--mj-text-disabled);\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-bottom: 4px;\n}\n\n.mj-flow-editor-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 11px;\n color: var(--mj-text-secondary);\n}\n\n.mj-flow-editor-legend-svg,\n.mj-flow-editor-legend-line-svg {\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-swatch {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-box {\n display: inline-block;\n width: 14px;\n height: 10px;\n border: 2px solid;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Context Menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-context-menu {\n position: fixed;\n min-width: 180px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-lg);\n padding: 4px;\n z-index: 9999;\n animation: mj-ctx-fade-in 0.1s ease-out;\n}\n\n@keyframes mj-ctx-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n\n.mj-flow-context-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: var(--mj-text-sm);\n font-weight: 450;\n color: var(--mj-text-secondary);\n cursor: pointer;\n border-radius: 5px;\n text-align: left;\n transition: background-color 0.1s ease;\n}\n\n.mj-flow-context-menu-item:hover {\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.mj-flow-context-menu-item i {\n width: 16px;\n text-align: center;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-shortcut {\n margin-left: auto;\n padding: 0 4px;\n border: 1px solid var(--mj-border-default);\n border-radius: 3px;\n font-size: 10px;\n font-family: inherit;\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-item--danger {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-item--danger:hover {\n background-color: var(--mj-status-error-subtle);\n}\n\n.mj-flow-context-menu-item--danger i {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 8px;\n}\n\n/* \u2500\u2500 Focus Indicators (Accessibility) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-toolbar-btn:focus-visible,\n.mj-agent-editor-btn:focus-visible,\n.mj-agent-editor-view-btn:focus-visible,\n.mj-agent-props-close:focus-visible,\n.mj-agent-props-delete-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n\n.mj-flow-palette-item:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n border-radius: var(--mj-radius-md);\n}\n"], encapsulation: 2 });
1334
+ } }, dependencies: [i3.NgClass, i4.FFlowComponent, i4.FCanvasComponent, i4.FBackgroundComponent, i4.FCirclePatternComponent, i4.FZoomDirective, i4.FConnectionContent, i4.FConnectionMarker, i4.FConnectionComponent, i4.FConnectionForCreateComponent, i4.FLineAlignmentComponent, i4.FMinimapComponent, i4.FNodeDirective, i4.FDragHandleDirective, i4.FSelectionAreaComponent, i4.FDragBlockerDirective, i4.FDraggableDirective, i5.MJEmptyStateComponent, i6.FlowNodeComponent, i7.FlowPaletteComponent, i8.FlowToolbarComponent, i9.FlowStatusBarComponent], styles: ["/* ============================================================\n Flow Editor \u2014 Main container styles\n ============================================================ */\n\n/* The HOST is a custom element, which is `display: inline` with auto height until told otherwise.\n Without this, `.mj-flow-editor { height: 100% }` below resolved against an auto-height parent \u2014\n which means auto \u2014 so the canvas fell back to its `min-height` floor and sat at 400px no matter\n how much room its pane actually had.\n\n `height: 100%` here is safe for hosts that DON'T give it a box: it resolves to auto in that case,\n and the floor takes over exactly as before. */\n:host {\n display: block;\n height: 100%;\n min-height: 0;\n}\n\n.mj-flow-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n outline: none;\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n}\n\n.mj-flow-editor--readonly .mj-flow-node-port {\n cursor: default;\n pointer-events: none;\n}\n\n/* \u2500\u2500 Toolbar Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-toolbar-area,\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n position: absolute;\n top: 10px;\n z-index: 20;\n}\n.mj-flow-editor-toolbar-area[data-align=\"center\"],\n.mj-flow-editor-toolbar-chip[data-align=\"center\"],\n.mj-flow-editor-toolbar-tab[data-align=\"center\"] {\n left: 50%;\n transform: translateX(-50%);\n}\n.mj-flow-editor-toolbar-area[data-align=\"left\"],\n.mj-flow-editor-toolbar-chip[data-align=\"left\"],\n.mj-flow-editor-toolbar-tab[data-align=\"left\"] {\n left: 10px;\n}\n.mj-flow-editor-toolbar-area[data-align=\"right\"],\n.mj-flow-editor-toolbar-chip[data-align=\"right\"],\n.mj-flow-editor-toolbar-tab[data-align=\"right\"] {\n right: 10px;\n}\n\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.mj-flow-editor-toolbar-chip:hover,\n.mj-flow-editor-toolbar-tab:hover {\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-flow-editor-toolbar-chip {\n width: 32px;\n height: 32px;\n border-radius: var(--mj-radius-md);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.mj-flow-editor-toolbar-tab {\n width: 22px;\n height: 18px;\n padding: 0;\n border-radius: var(--mj-radius-sm);\n opacity: 0.55;\n}\n.mj-flow-editor-toolbar-tab:hover { opacity: 1; }\n\n/* \u2500\u2500 Canvas Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-canvas-area {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-flow-editor-canvas {\n flex: 1;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface);\n}\n\n.mj-flow-editor-canvas f-flow {\n width: 100%;\n height: 100%;\n}\n\n/* Pan mode \u2014 grab cursor, nodes pass through pointer events to canvas */\n.mj-flow-editor-canvas--pan-mode {\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode:active {\n cursor: grabbing;\n}\n\n.mj-flow-editor-canvas--pan-mode mj-flow-node {\n pointer-events: none;\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode f-connection {\n pointer-events: none;\n}\n\n.mj-flow-editor-canvas--pan-mode .mj-flow-connection-label {\n pointer-events: none;\n}\n\n/* \u2500\u2500 Minimap \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-minimap {\n position: absolute;\n bottom: 12px;\n right: 12px;\n width: 160px;\n height: 120px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n z-index: 15;\n}\n\n.mj-flow-editor-minimap f-minimap {\n width: 100%;\n height: 100%;\n}\n\n/* Foblex minimap SVG node rectangles (no default styles provided by Foblex) */\n.mj-flow-editor-minimap .f-minimap-node {\n fill: var(--mj-border-strong);\n stroke: var(--mj-text-disabled);\n stroke-width: 1;\n rx: 3;\n ry: 3;\n}\n\n.mj-flow-editor-minimap .f-minimap-node.f-selected {\n fill: color-mix(in srgb, var(--mj-brand-primary) 50%, var(--mj-bg-surface));\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n.mj-flow-editor-minimap .f-minimap-group {\n fill: var(--mj-border-default);\n stroke: var(--mj-text-disabled);\n stroke-width: 0.5;\n rx: 2;\n ry: 2;\n}\n\n/* Viewport indicator rectangle */\n.mj-flow-editor-minimap .f-minimap-view {\n fill: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n/* \u2500\u2500 Empty State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-empty {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n z-index: 5;\n}\n\n.mj-flow-editor-empty-subtitle {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-disabled);\n margin: 0;\n}\n\n/* \u2500\u2500 Connection Labels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-connection-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 5px;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 5px;\n padding: 4px 10px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n box-shadow: var(--mj-shadow-sm);\n pointer-events: none;\n line-height: 1.4;\n text-align: center;\n}\n\n.mj-flow-connection-label-icon {\n font-size: 10px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n/* \u2500\u2500 Foblex Overrides \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Canvas \u2014 transparent so the grid pattern shows through */\nf-canvas {\n background: transparent;\n}\n\n/* Selection area */\nf-selection-area {\n --f-selection-area-background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n --f-selection-area-border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* Line alignment guides */\nf-line-alignment {\n --f-line-alignment-color: var(--mj-brand-primary);\n}\n\n/* Connection paths \u2014 default stroke color prevents invisible connections */\n.f-connection path {\n stroke: var(--mj-text-disabled);\n stroke-width: var(--connection-width, 2px);\n fill: none;\n transition: stroke 0.15s ease, stroke-width 0.15s ease;\n}\n\n.f-connection:hover path {\n stroke-width: calc(var(--connection-width, 2px) + 1px);\n}\n\n.f-connection.f-selected path {\n stroke: var(--mj-brand-primary);\n stroke-width: max(3px, var(--connection-width, 2px));\n}\n\n/* Colored connections use the --connection-color custom property,\n defaulting to neutral when no color is specified by the consumer */\n.mj-flow-connection-colored path {\n stroke: var(--connection-color, var(--mj-text-disabled));\n}\n\n.mj-flow-connection-colored.f-selected path {\n stroke: var(--connection-color, var(--mj-brand-primary));\n stroke-width: max(3px, var(--connection-width, 2px));\n filter: brightness(0.85);\n}\n\n/* Dashed connection style */\n.mj-flow-connection-dashed path {\n stroke-dasharray: 8 4;\n}\n\n/* Dotted connection style */\n.mj-flow-connection-dotted path {\n stroke-dasharray: 3 3;\n}\n\n.mj-flow-connection-animated path {\n stroke-dasharray: 14 10;\n stroke-linecap: round;\n stroke-width: var(--connection-width, 4.5px);\n animation: mj-flow-dash 0.5s linear infinite;\n filter: drop-shadow(0 0 5px color-mix(in srgb, var(--connection-color, var(--mj-brand-primary)) 70%, transparent));\n}\n@keyframes mj-flow-dash {\n to { stroke-dashoffset: -24; }\n}\n\n/* Connection for create (dragging) */\n.f-connection-for-create path {\n stroke: var(--mj-text-disabled);\n stroke-dasharray: 6 3;\n stroke-width: 2;\n}\n\n/* \u2500\u2500 Legend \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-legend {\n position: absolute;\n bottom: 12px;\n left: 12px;\n background: color-mix(in srgb, var(--mj-bg-surface) 92%, transparent);\n backdrop-filter: blur(6px);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 10px 14px;\n box-shadow: var(--mj-shadow-sm);\n z-index: 15;\n font-size: 11px;\n color: var(--mj-text-secondary);\n max-width: 200px;\n}\n\n.mj-flow-editor-legend-title {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 8px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mj-flow-editor-legend-section {\n margin-bottom: 8px;\n}\n\n.mj-flow-editor-legend-section:last-child {\n margin-bottom: 0;\n}\n\n.mj-flow-editor-legend-heading {\n font-size: 10px;\n font-weight: 600;\n color: var(--mj-text-disabled);\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-bottom: 4px;\n}\n\n.mj-flow-editor-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 11px;\n color: var(--mj-text-secondary);\n}\n\n.mj-flow-editor-legend-svg,\n.mj-flow-editor-legend-line-svg {\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-swatch {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-box {\n display: inline-block;\n width: 14px;\n height: 10px;\n border: 2px solid;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Context Menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-context-menu {\n position: fixed;\n min-width: 180px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-lg);\n padding: 4px;\n z-index: 9999;\n animation: mj-ctx-fade-in 0.1s ease-out;\n}\n\n@keyframes mj-ctx-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n\n.mj-flow-context-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: var(--mj-text-sm);\n font-weight: 450;\n color: var(--mj-text-secondary);\n cursor: pointer;\n border-radius: 5px;\n text-align: left;\n transition: background-color 0.1s ease;\n}\n\n.mj-flow-context-menu-item:hover {\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.mj-flow-context-menu-item i {\n width: 16px;\n text-align: center;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-shortcut {\n margin-left: auto;\n padding: 0 4px;\n border: 1px solid var(--mj-border-default);\n border-radius: 3px;\n font-size: 10px;\n font-family: inherit;\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-item--danger {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-item--danger:hover {\n background-color: var(--mj-status-error-bg);\n}\n\n.mj-flow-connection-untaken path {\n opacity: 0.45;\n stroke-dasharray: 5 4;\n}\n\n.mj-flow-connection-forced path {\n stroke-dasharray: 3 4;\n}\n\n.mj-flow-editor-legend-box--start {\n border-color: var(--mj-status-success);\n background: var(--mj-status-success-bg);\n}\n\n.mj-flow-editor-legend-box--warn {\n border-color: var(--mj-status-warning);\n background: var(--mj-status-warning-bg);\n}\n\n.mj-flow-editor-legend-icon--ok {\n color: var(--mj-status-success);\n font-size: 10px;\n}\n\n.mj-flow-editor-legend-icon--err {\n color: var(--mj-status-error);\n font-size: 10px;\n}\n\n.mj-flow-editor-legend-icon--warn {\n color: var(--mj-status-warning);\n font-size: 10px;\n}\n\n.mj-flow-context-menu-item--danger i {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 8px;\n}\n\n/* \u2500\u2500 Focus Indicators (Accessibility) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-toolbar-btn:focus-visible,\n.mj-agent-editor-btn:focus-visible,\n.mj-agent-editor-view-btn:focus-visible,\n.mj-agent-props-close:focus-visible,\n.mj-agent-props-delete-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n\n.mj-flow-palette-item:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n border-radius: var(--mj-radius-md);\n}\n"], encapsulation: 2 });
1166
1335
  }
1167
1336
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlowEditorComponent, [{
1168
1337
  type: Component,
1169
- args: [{ standalone: false, selector: 'mj-flow-editor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [FlowStateService, FlowLayoutService], template: "<div class=\"mj-flow-editor\" [class.mj-flow-editor--readonly]=\"ReadOnly\" tabindex=\"0\">\n\n <!-- Canvas Toolbar \u2014 shown / minimized / hidden (recover tab). Align is left/center/right. -->\n @if (ShowToolbar && EffectiveToolbarVisibility === 'shown') {\n <div class=\"mj-flow-editor-toolbar-area\" [attr.data-align]=\"ToolbarAlign\">\n <mj-flow-toolbar\n [ZoomLevel]=\"zoomLevel\"\n [ShowGrid]=\"ShowGrid\"\n [ShowMinimap]=\"ShowMinimap\"\n [ShowLegend]=\"ShowLegend\"\n [ReadOnly]=\"ReadOnly\"\n [PanMode]=\"panMode\"\n (ZoomInClicked)=\"ZoomIn()\"\n (ZoomOutClicked)=\"ZoomOut()\"\n (FitToScreenClicked)=\"ZoomToFit()\"\n (AutoLayoutClicked)=\"AutoArrange()\"\n (GridToggled)=\"onGridToggled($event)\"\n (MinimapToggled)=\"onMinimapToggled($event)\"\n (LegendToggled)=\"onLegendToggled($event)\"\n (PanModeToggled)=\"onPanModeToggled($event)\"\n (MinimizeClicked)=\"SetToolbarVisibility('minimized')\"\n (HideClicked)=\"SetToolbarVisibility('hidden')\">\n </mj-flow-toolbar>\n </div>\n } @else if (ShowToolbar && EffectiveToolbarVisibility === 'minimized') {\n <button type=\"button\" class=\"mj-flow-editor-toolbar-chip\" [attr.data-align]=\"ToolbarAlign\"\n (click)=\"SetToolbarVisibility('shown')\"\n title=\"Show canvas tools\" aria-label=\"Show canvas tools\">\n <i class=\"fa-solid fa-wrench\" aria-hidden=\"true\"></i>\n </button>\n } @else if (ShowToolbar && EffectiveToolbarVisibility === 'hidden') {\n <button type=\"button\" class=\"mj-flow-editor-toolbar-tab\" [attr.data-align]=\"ToolbarAlign\"\n (click)=\"SetToolbarVisibility('shown')\"\n title=\"Show canvas tools\" aria-label=\"Show canvas tools\">\n <i class=\"fa-solid fa-ellipsis\" aria-hidden=\"true\"></i>\n </button>\n }\n\n <!-- Main Canvas Area -->\n <div class=\"mj-flow-editor-canvas-area\">\n\n <!-- Palette Sidebar -->\n @if (ShowPalette && !ReadOnly) {\n <mj-flow-palette\n [NodeTypes]=\"NodeTypes\"\n (NodeTypeActivated)=\"onPaletteNodeTypeActivated($event)\">\n </mj-flow-palette>\n }\n\n <!-- Foblex Canvas -->\n <div class=\"mj-flow-editor-canvas\" #canvasArea\n [class.mj-flow-editor-canvas--pan-mode]=\"panMode\">\n <f-flow fDraggable\n [fDraggableDisabled]=\"false\"\n [fCanvasMoveTrigger]=\"canvasMoveTriggerFn\"\n [vCellSize]=\"GridSize\"\n [hCellSize]=\"GridSize\"\n [fCellSizeWhileDragging]=\"ShowGrid\"\n (fLoaded)=\"onFlowLoaded()\"\n (fCreateConnection)=\"onCreateConnection($event)\"\n (fReassignConnection)=\"onReassignConnection($event)\"\n (fCreateNode)=\"onCreateNode($event)\"\n (fSelectionChange)=\"onSelectionChange($event)\"\n (fMoveNodes)=\"onNodesMoved($event)\">\n\n <!-- Background grid \u2014 MUST be direct child of f-flow (Foblex content projection requires it) -->\n @if (ShowGrid) {\n <f-background>\n <f-circle-pattern [color]=\"'#94a3b8'\" [radius]=\"24\"></f-circle-pattern>\n </f-background>\n }\n\n <!-- Alignment snap lines \u2014 direct child of f-flow -->\n @if (!ReadOnly) {\n <f-line-alignment [fAlignThreshold]=\"10\"></f-line-alignment>\n }\n\n <f-canvas fZoom #fZoomRef=\"fComponent\"\n [fZoomMinimum]=\"0.15\"\n [fZoomMaximum]=\"3\"\n [fZoomStep]=\"0.1\"\n [position]=\"canvasPosition\"\n [scale]=\"canvasScale\"\n (fCanvasChange)=\"onCanvasChange($event)\">\n\n <!-- Interactive connection drawing -->\n @if (!ReadOnly) {\n <f-connection-for-create\n fType=\"bezier\"\n [fRadius]=\"8\"\n [fOffset]=\"12\">\n <svg viewBox=\"0 0 10 10\" fMarker type=\"end\"\n orient=\"auto\" [refX]=\"9\" [refY]=\"5\" [height]=\"10\" [width]=\"10\">\n <path d=\"M0 0L10 5L0 10Z\" fill=\"#94a3b8\"/>\n </svg>\n </f-connection-for-create>\n }\n\n <!-- Connections -->\n @for (conn of Connections; track trackConnectionById($index, conn)) {\n <f-connection\n [fConnectionId]=\"conn.ID\"\n [fOutputId]=\"conn.SourcePortID\"\n [fInputId]=\"conn.TargetPortID\"\n fType=\"bezier\"\n fBehavior=\"fixed\"\n [fRadius]=\"8\"\n [fOffset]=\"12\"\n [fSelectionDisabled]=\"false\"\n [fReassignDisabled]=\"ReadOnly\"\n [style.--connection-color]=\"conn.Color || '#94a3b8'\"\n [style.--connection-width.px]=\"conn.StrokeWidth || 2\"\n [class.mj-flow-connection-colored]=\"!!conn.Color\"\n [class.mj-flow-connection-dashed]=\"conn.Style === 'dashed'\"\n [class.mj-flow-connection-dotted]=\"conn.Style === 'dotted'\"\n [class.mj-flow-connection-animated]=\"!!conn.Animated\"\n (click)=\"onConnectionClicked($event, conn)\"\n (contextmenu)=\"onConnectionContextMenu($event, conn)\">\n <!-- Arrow marker -->\n <svg viewBox=\"0 0 10 10\" fMarker type=\"end\"\n orient=\"auto\" [refX]=\"9\" [refY]=\"5\"\n [height]=\"conn.Animated ? 16 : 10\"\n [width]=\"conn.Animated ? 16 : 10\">\n <path d=\"M0 0L10 5L0 10Z\" [attr.fill]=\"conn.Color || '#94a3b8'\"/>\n </svg>\n <!-- Connection label -->\n @if (conn.Label) {\n <div fConnectionContent [position]=\"0.5\"\n class=\"mj-flow-connection-label\"\n [style.backgroundColor]=\"ConnectionLabelBackground\"\n [style.borderColor]=\"ConnectionLabelBorderColor\"\n [style.color]=\"ConnectionLabelTextColor\"\n [title]=\"conn.LabelDetail || conn.Label || ''\">\n @if (conn.LabelIcon) {\n <i\n class=\"fa-solid mj-flow-connection-label-icon\"\n [ngClass]=\"conn.LabelIcon\"\n [style.color]=\"conn.LabelIconColor || 'inherit'\"></i>\n }\n {{ conn.Label }}\n </div>\n }\n </f-connection>\n }\n\n <!-- Nodes -->\n @for (node of Nodes; track trackNodeById($index, node)) {\n <mj-flow-node\n fNode\n fDragHandle\n [fNodeId]=\"node.ID\"\n [fNodePosition]=\"{ x: node.Position.X, y: node.Position.Y }\"\n [fNodeDraggingDisabled]=\"ReadOnly || panMode || node.Locked === true\"\n [fNodeSelectionDisabled]=\"panMode\"\n [fConnectOnNode]=\"!ReadOnly && !panMode\"\n [Node]=\"node\"\n [TypeConfig]=\"GetTypeConfig(node.Type)\"\n [ReadOnly]=\"ReadOnly\"\n (contextmenu)=\"onNodeContextMenu($event, node)\">\n </mj-flow-node>\n }\n\n </f-canvas>\n\n <!-- Rubber-band selection \u2014 direct child of f-flow -->\n @if (!ReadOnly) {\n <f-selection-area></f-selection-area>\n }\n\n <!-- Minimap -->\n @if (ShowMinimap) {\n <div class=\"mj-flow-editor-minimap\" fDragBlocker>\n <f-minimap [fMinSize]=\"1500\"></f-minimap>\n </div>\n }\n </f-flow>\n\n <!-- Legend -->\n @if (ShowLegend && Nodes.length > 0) {\n <div class=\"mj-flow-editor-legend\">\n <div class=\"mj-flow-editor-legend-title\">Legend</div>\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">Connections</div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"#64748b\" stroke-width=\"2\"/></svg>\n <span>Only exit path</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"#16a34a\" stroke-width=\"2\"/></svg>\n <i class=\"fa-solid fa-circle-check\" style=\"color:#16a34a;font-size:10px;\"></i>\n <span>Default (fallback)</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"#f59e0b\" stroke-width=\"2\" stroke-dasharray=\"5 3\"/></svg>\n <span>Conditional</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"#ef4444\" stroke-width=\"2\"/></svg>\n <i class=\"fa-solid fa-triangle-exclamation\" style=\"color:#ef4444;font-size:10px;\"></i>\n <span>Duplicate defaults</span>\n </div>\n </div>\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">Step Types</div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" style=\"background:#3B82F6\"></span>\n <span>Action</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" style=\"background:#8B5CF6\"></span>\n <span>Prompt</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" style=\"background:#10B981\"></span>\n <span>Sub-Agent</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" style=\"background:#F59E0B\"></span>\n <span>For Each</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" style=\"background:#F97316\"></span>\n <span>While</span>\n </div>\n </div>\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">Borders</div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-box\" style=\"border-color:#16a34a;background:#f0fdf4;\"></span>\n <span>Start node</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-box\" style=\"border-color:#ef4444;background:#fef2f2;\"></span>\n <i class=\"fa-solid fa-triangle-exclamation\" style=\"color:#ea580c;font-size:10px;\"></i>\n <span>Missing config</span>\n </div>\n </div>\n </div>\n }\n\n <!-- Empty state overlay -->\n @if (Nodes.length === 0) {\n <div class=\"mj-flow-editor-empty\">\n <mj-empty-state\n Icon=\"fa-solid fa-diagram-project\"\n [Title]=\"EmptyStateTitle\">\n @if (!ReadOnly) {\n <p class=\"mj-flow-editor-empty-subtitle\">\n Or use auto-layout after adding steps to arrange them automatically\n </p>\n }\n </mj-empty-state>\n </div>\n }\n </div>\n </div>\n\n <!-- Context Menu -->\n @if (contextMenuVisible) {\n <div\n class=\"mj-flow-context-menu\"\n [style.left.px]=\"contextMenuX\"\n [style.top.px]=\"contextMenuY\"\n (click)=\"$event.stopPropagation()\">\n @for (item of contextMenuItems; track item.ID; let last = $last) {\n <button type=\"button\" class=\"mj-flow-context-menu-item\"\n [class.mj-flow-context-menu-item--danger]=\"item.Danger\"\n [disabled]=\"item.Disabled\"\n (click)=\"onContextMenuAction(item.ID)\">\n @if (item.Icon) {\n <i class=\"fa-solid\" [ngClass]=\"item.Icon\"></i>\n }\n <span>{{ item.Label }}</span>\n @if (item.Shortcut) {\n <kbd class=\"mj-flow-context-menu-shortcut\">{{ item.Shortcut }}</kbd>\n }\n </button>\n @if (!last && item.Danger !== contextMenuItems[$index + 1]?.Danger) {\n <div class=\"mj-flow-context-menu-divider\"></div>\n }\n }\n </div>\n }\n\n <!-- Status Bar -->\n @if (ShowStatusBar) {\n <mj-flow-status-bar\n [NodeCount]=\"Nodes.length\"\n [ConnectionCount]=\"Connections.length\"\n [SelectedCount]=\"selectedCount\"\n [ZoomLevel]=\"zoomLevel\">\n </mj-flow-status-bar>\n }\n</div>\n", styles: ["/* ============================================================\n Flow Editor \u2014 Main container styles\n ============================================================ */\n\n/* The HOST is a custom element, which is `display: inline` with auto height until told otherwise.\n Without this, `.mj-flow-editor { height: 100% }` below resolved against an auto-height parent \u2014\n which means auto \u2014 so the canvas fell back to its `min-height` floor and sat at 400px no matter\n how much room its pane actually had.\n\n `height: 100%` here is safe for hosts that DON'T give it a box: it resolves to auto in that case,\n and the floor takes over exactly as before. */\n:host {\n display: block;\n height: 100%;\n min-height: 0;\n}\n\n.mj-flow-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n outline: none;\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n}\n\n.mj-flow-editor--readonly .mj-flow-node-port {\n cursor: default;\n pointer-events: none;\n}\n\n/* \u2500\u2500 Toolbar Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-toolbar-area,\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n position: absolute;\n top: 10px;\n z-index: 20;\n}\n.mj-flow-editor-toolbar-area[data-align=\"center\"],\n.mj-flow-editor-toolbar-chip[data-align=\"center\"],\n.mj-flow-editor-toolbar-tab[data-align=\"center\"] {\n left: 50%;\n transform: translateX(-50%);\n}\n.mj-flow-editor-toolbar-area[data-align=\"left\"],\n.mj-flow-editor-toolbar-chip[data-align=\"left\"],\n.mj-flow-editor-toolbar-tab[data-align=\"left\"] {\n left: 10px;\n}\n.mj-flow-editor-toolbar-area[data-align=\"right\"],\n.mj-flow-editor-toolbar-chip[data-align=\"right\"],\n.mj-flow-editor-toolbar-tab[data-align=\"right\"] {\n right: 10px;\n}\n\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.mj-flow-editor-toolbar-chip:hover,\n.mj-flow-editor-toolbar-tab:hover {\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-flow-editor-toolbar-chip {\n width: 32px;\n height: 32px;\n border-radius: var(--mj-radius-md);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.mj-flow-editor-toolbar-tab {\n width: 22px;\n height: 18px;\n padding: 0;\n border-radius: var(--mj-radius-sm);\n opacity: 0.55;\n}\n.mj-flow-editor-toolbar-tab:hover { opacity: 1; }\n\n/* \u2500\u2500 Canvas Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-canvas-area {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-flow-editor-canvas {\n flex: 1;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface);\n}\n\n.mj-flow-editor-canvas f-flow {\n width: 100%;\n height: 100%;\n}\n\n/* Pan mode \u2014 grab cursor, nodes pass through pointer events to canvas */\n.mj-flow-editor-canvas--pan-mode {\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode:active {\n cursor: grabbing;\n}\n\n.mj-flow-editor-canvas--pan-mode mj-flow-node {\n pointer-events: none;\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode f-connection {\n pointer-events: none;\n}\n\n.mj-flow-editor-canvas--pan-mode .mj-flow-connection-label {\n pointer-events: none;\n}\n\n/* \u2500\u2500 Minimap \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-minimap {\n position: absolute;\n bottom: 12px;\n right: 12px;\n width: 160px;\n height: 120px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n z-index: 15;\n}\n\n.mj-flow-editor-minimap f-minimap {\n width: 100%;\n height: 100%;\n}\n\n/* Foblex minimap SVG node rectangles (no default styles provided by Foblex) */\n.mj-flow-editor-minimap .f-minimap-node {\n fill: var(--mj-border-strong);\n stroke: var(--mj-text-disabled);\n stroke-width: 1;\n rx: 3;\n ry: 3;\n}\n\n.mj-flow-editor-minimap .f-minimap-node.f-selected {\n fill: color-mix(in srgb, var(--mj-brand-primary) 50%, var(--mj-bg-surface));\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n.mj-flow-editor-minimap .f-minimap-group {\n fill: var(--mj-border-default);\n stroke: var(--mj-text-disabled);\n stroke-width: 0.5;\n rx: 2;\n ry: 2;\n}\n\n/* Viewport indicator rectangle */\n.mj-flow-editor-minimap .f-minimap-view {\n fill: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n/* \u2500\u2500 Empty State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-empty {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n z-index: 5;\n}\n\n.mj-flow-editor-empty-subtitle {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-disabled);\n margin: 0;\n}\n\n/* \u2500\u2500 Connection Labels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-connection-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 5px;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 5px;\n padding: 4px 10px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n box-shadow: var(--mj-shadow-sm);\n pointer-events: none;\n line-height: 1.4;\n text-align: center;\n}\n\n.mj-flow-connection-label-icon {\n font-size: 10px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n/* \u2500\u2500 Foblex Overrides \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Canvas \u2014 transparent so the grid pattern shows through */\nf-canvas {\n background: transparent;\n}\n\n/* Selection area */\nf-selection-area {\n --f-selection-area-background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n --f-selection-area-border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* Line alignment guides */\nf-line-alignment {\n --f-line-alignment-color: var(--mj-brand-primary);\n}\n\n/* Connection paths \u2014 default stroke color prevents invisible connections */\n.f-connection path {\n stroke: var(--mj-text-disabled);\n stroke-width: var(--connection-width, 2px);\n fill: none;\n transition: stroke 0.15s ease, stroke-width 0.15s ease;\n}\n\n.f-connection:hover path {\n stroke-width: calc(var(--connection-width, 2px) + 1px);\n}\n\n.f-connection.f-selected path {\n stroke: var(--mj-brand-primary);\n stroke-width: max(3px, var(--connection-width, 2px));\n}\n\n/* Colored connections use the --connection-color custom property,\n defaulting to neutral when no color is specified by the consumer */\n.mj-flow-connection-colored path {\n stroke: var(--connection-color, var(--mj-text-disabled));\n}\n\n.mj-flow-connection-colored.f-selected path {\n stroke: var(--connection-color, var(--mj-brand-primary));\n stroke-width: max(3px, var(--connection-width, 2px));\n filter: brightness(0.85);\n}\n\n/* Dashed connection style */\n.mj-flow-connection-dashed path {\n stroke-dasharray: 8 4;\n}\n\n/* Dotted connection style */\n.mj-flow-connection-dotted path {\n stroke-dasharray: 3 3;\n}\n\n.mj-flow-connection-animated path {\n stroke-dasharray: 14 10;\n stroke-linecap: round;\n stroke-width: var(--connection-width, 4.5px);\n animation: mj-flow-dash 0.5s linear infinite;\n filter: drop-shadow(0 0 5px color-mix(in srgb, var(--connection-color, var(--mj-brand-primary)) 70%, transparent));\n}\n@keyframes mj-flow-dash {\n to { stroke-dashoffset: -24; }\n}\n\n/* Connection for create (dragging) */\n.f-connection-for-create path {\n stroke: var(--mj-text-disabled);\n stroke-dasharray: 6 3;\n stroke-width: 2;\n}\n\n/* \u2500\u2500 Legend \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-legend {\n position: absolute;\n bottom: 12px;\n left: 12px;\n background: color-mix(in srgb, var(--mj-bg-surface) 92%, transparent);\n backdrop-filter: blur(6px);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 10px 14px;\n box-shadow: var(--mj-shadow-sm);\n z-index: 15;\n font-size: 11px;\n color: var(--mj-text-secondary);\n max-width: 200px;\n}\n\n.mj-flow-editor-legend-title {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 8px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mj-flow-editor-legend-section {\n margin-bottom: 8px;\n}\n\n.mj-flow-editor-legend-section:last-child {\n margin-bottom: 0;\n}\n\n.mj-flow-editor-legend-heading {\n font-size: 10px;\n font-weight: 600;\n color: var(--mj-text-disabled);\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-bottom: 4px;\n}\n\n.mj-flow-editor-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 11px;\n color: var(--mj-text-secondary);\n}\n\n.mj-flow-editor-legend-svg,\n.mj-flow-editor-legend-line-svg {\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-swatch {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-box {\n display: inline-block;\n width: 14px;\n height: 10px;\n border: 2px solid;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Context Menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-context-menu {\n position: fixed;\n min-width: 180px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-lg);\n padding: 4px;\n z-index: 9999;\n animation: mj-ctx-fade-in 0.1s ease-out;\n}\n\n@keyframes mj-ctx-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n\n.mj-flow-context-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: var(--mj-text-sm);\n font-weight: 450;\n color: var(--mj-text-secondary);\n cursor: pointer;\n border-radius: 5px;\n text-align: left;\n transition: background-color 0.1s ease;\n}\n\n.mj-flow-context-menu-item:hover {\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.mj-flow-context-menu-item i {\n width: 16px;\n text-align: center;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-shortcut {\n margin-left: auto;\n padding: 0 4px;\n border: 1px solid var(--mj-border-default);\n border-radius: 3px;\n font-size: 10px;\n font-family: inherit;\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-item--danger {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-item--danger:hover {\n background-color: var(--mj-status-error-subtle);\n}\n\n.mj-flow-context-menu-item--danger i {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 8px;\n}\n\n/* \u2500\u2500 Focus Indicators (Accessibility) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-toolbar-btn:focus-visible,\n.mj-agent-editor-btn:focus-visible,\n.mj-agent-editor-view-btn:focus-visible,\n.mj-agent-props-close:focus-visible,\n.mj-agent-props-delete-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n\n.mj-flow-palette-item:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n border-radius: var(--mj-radius-md);\n}\n"] }]
1338
+ args: [{ standalone: false, selector: 'mj-flow-editor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [FlowStateService, FlowLayoutService], template: "<div class=\"mj-flow-editor\" [class.mj-flow-editor--readonly]=\"ReadOnly\" tabindex=\"0\">\n\n <!-- Canvas Toolbar \u2014 shown / minimized / hidden (recover tab). Align is left/center/right. -->\n @if (ShowToolbar && EffectiveToolbarVisibility === 'shown') {\n <div class=\"mj-flow-editor-toolbar-area\" [attr.data-align]=\"ToolbarAlign\">\n <mj-flow-toolbar\n [ZoomLevel]=\"zoomLevel\"\n [ShowGrid]=\"ShowGrid\"\n [ShowMinimap]=\"ShowMinimap\"\n [ShowLegend]=\"ShowLegend\"\n [ReadOnly]=\"ReadOnly\"\n [PanMode]=\"panMode\"\n [LayoutDirection]=\"AutoLayoutDirection\"\n (ZoomInClicked)=\"ZoomIn()\"\n (ZoomOutClicked)=\"ZoomOut()\"\n (FitToScreenClicked)=\"ZoomToFit()\"\n (AutoLayoutClicked)=\"AutoArrange()\"\n (LayoutDirectionToggled)=\"onLayoutDirectionToggled($event)\"\n (GridToggled)=\"onGridToggled($event)\"\n (MinimapToggled)=\"onMinimapToggled($event)\"\n (LegendToggled)=\"onLegendToggled($event)\"\n (PanModeToggled)=\"onPanModeToggled($event)\"\n (MinimizeClicked)=\"SetToolbarVisibility('minimized')\"\n (HideClicked)=\"SetToolbarVisibility('hidden')\">\n </mj-flow-toolbar>\n </div>\n } @else if (ShowToolbar && EffectiveToolbarVisibility === 'minimized') {\n <button type=\"button\" class=\"mj-flow-editor-toolbar-chip\" [attr.data-align]=\"ToolbarAlign\"\n (click)=\"SetToolbarVisibility('shown')\"\n title=\"Show canvas tools\" aria-label=\"Show canvas tools\">\n <i class=\"fa-solid fa-wrench\" aria-hidden=\"true\"></i>\n </button>\n } @else if (ShowToolbar && EffectiveToolbarVisibility === 'hidden') {\n <button type=\"button\" class=\"mj-flow-editor-toolbar-tab\" [attr.data-align]=\"ToolbarAlign\"\n (click)=\"SetToolbarVisibility('shown')\"\n title=\"Show canvas tools\" aria-label=\"Show canvas tools\">\n <i class=\"fa-solid fa-ellipsis\" aria-hidden=\"true\"></i>\n </button>\n }\n\n <!-- Main Canvas Area -->\n <div class=\"mj-flow-editor-canvas-area\">\n\n <!-- Palette Sidebar -->\n @if (ShowPalette && !ReadOnly) {\n <mj-flow-palette\n [NodeTypes]=\"PaletteNodeTypes\"\n (NodeTypeActivated)=\"onPaletteNodeTypeActivated($event)\">\n </mj-flow-palette>\n }\n\n <!-- Foblex Canvas -->\n <div class=\"mj-flow-editor-canvas\" #canvasArea\n [class.mj-flow-editor-canvas--pan-mode]=\"panMode || spacePressed\">\n <f-flow fDraggable\n [fDraggableDisabled]=\"false\"\n [fCanvasMoveTrigger]=\"canvasMoveTriggerFn\"\n [vCellSize]=\"GridSize\"\n [hCellSize]=\"GridSize\"\n [fCellSizeWhileDragging]=\"ShowGrid\"\n (fLoaded)=\"onFlowLoaded()\"\n (fCreateConnection)=\"onCreateConnection($event)\"\n (fReassignConnection)=\"onReassignConnection($event)\"\n (fCreateNode)=\"onCreateNode($event)\"\n (fSelectionChange)=\"onSelectionChange($event)\"\n (fMoveNodes)=\"onNodesMoved($event)\">\n\n <!-- Background grid \u2014 MUST be direct child of f-flow (Foblex content projection requires it) -->\n @if (ShowGrid) {\n <f-background>\n <f-circle-pattern [color]=\"'var(--mj-border-strong)'\" [radius]=\"24\"></f-circle-pattern>\n </f-background>\n }\n\n <!-- Alignment snap lines \u2014 direct child of f-flow -->\n @if (!ReadOnly) {\n <f-line-alignment [fAlignThreshold]=\"10\"></f-line-alignment>\n }\n\n <f-canvas fZoom #fZoomRef=\"fComponent\"\n [fZoomMinimum]=\"0.15\"\n [fZoomMaximum]=\"3\"\n [fZoomStep]=\"0.1\"\n [position]=\"canvasPosition\"\n [scale]=\"canvasScale\"\n (fCanvasChange)=\"onCanvasChange($event)\">\n\n <!-- Interactive connection drawing -->\n @if (!ReadOnly) {\n <f-connection-for-create\n fType=\"bezier\"\n [fRadius]=\"8\"\n [fOffset]=\"12\">\n <svg viewBox=\"0 0 10 10\" fMarker type=\"end\"\n orient=\"auto\" [refX]=\"9\" [refY]=\"5\" [height]=\"10\" [width]=\"10\">\n <path d=\"M0 0L10 5L0 10Z\" fill=\"var(--mj-text-disabled)\"/>\n </svg>\n </f-connection-for-create>\n }\n\n <!-- Connections -->\n @for (conn of Connections; track trackConnectionById($index, conn)) {\n <f-connection\n [fConnectionId]=\"conn.ID\"\n [fOutputId]=\"conn.SourcePortID\"\n [fInputId]=\"conn.TargetPortID\"\n fType=\"bezier\"\n fBehavior=\"fixed\"\n [fRadius]=\"8\"\n [fOffset]=\"12\"\n [fSelectionDisabled]=\"false\"\n [fReassignDisabled]=\"ReadOnly\"\n [style.--connection-color]=\"conn.Color || 'var(--mj-text-disabled)'\"\n [style.--connection-width.px]=\"conn.StrokeWidth || 2\"\n [class.mj-flow-connection-colored]=\"!!conn.Color\"\n [class.mj-flow-connection-dashed]=\"conn.Style === 'dashed'\"\n [class.mj-flow-connection-dotted]=\"conn.Style === 'dotted'\"\n [class.mj-flow-connection-untaken]=\"conn.Untaken === true\"\n [class.mj-flow-connection-forced]=\"conn.ForcedVerdict != null\"\n [class.mj-flow-connection-animated]=\"!!conn.Animated\"\n (click)=\"onConnectionClicked($event, conn)\"\n (contextmenu)=\"onConnectionContextMenu($event, conn)\">\n <!-- Arrow marker -->\n <svg viewBox=\"0 0 10 10\" fMarker type=\"end\"\n orient=\"auto\" [refX]=\"9\" [refY]=\"5\"\n [height]=\"conn.Animated ? 16 : 10\"\n [width]=\"conn.Animated ? 16 : 10\">\n <path d=\"M0 0L10 5L0 10Z\" [attr.fill]=\"conn.Color || 'var(--mj-text-disabled)'\"/>\n </svg>\n <!-- Connection label -->\n @if (conn.Label) {\n <div fConnectionContent [position]=\"0.5\"\n class=\"mj-flow-connection-label\"\n [style.backgroundColor]=\"ConnectionLabelBackground\"\n [style.borderColor]=\"ConnectionLabelBorderColor\"\n [style.color]=\"ConnectionLabelTextColor\"\n [title]=\"conn.LabelDetail || conn.Label || ''\">\n @if (conn.LabelIcon) {\n <i\n class=\"fa-solid mj-flow-connection-label-icon\"\n [ngClass]=\"conn.LabelIcon\"\n [style.color]=\"conn.LabelIconColor || 'inherit'\"></i>\n }\n {{ conn.Label }}\n </div>\n }\n </f-connection>\n }\n\n <!-- Nodes -->\n @for (node of Nodes; track trackNodeById($index, node)) {\n <mj-flow-node\n fNode\n fDragHandle\n [fNodeId]=\"node.ID\"\n [fNodePosition]=\"{ x: node.Position.X, y: node.Position.Y }\"\n [fNodeDraggingDisabled]=\"ReadOnly || panMode || spacePressed || node.Locked === true\"\n [fNodeSelectionDisabled]=\"panMode || spacePressed\"\n [fConnectOnNode]=\"!ReadOnly && !panMode && !spacePressed\"\n [Node]=\"node\"\n [TypeConfig]=\"GetTypeConfig(node.Type)\"\n [ReadOnly]=\"ReadOnly\"\n [XRayEnabled]=\"XRayEnabled\"\n [AllowBreakpointClick]=\"AllowBreakpointClick\"\n (BreakpointClicked)=\"NodeBreakpointClicked.emit($event)\"\n (QuickAddClicked)=\"NodeQuickAddClicked.emit($event)\"\n (RunStepClicked)=\"NodeRunStepClicked.emit($event)\"\n (contextmenu)=\"onNodeContextMenu($event, node)\">\n </mj-flow-node>\n }\n\n </f-canvas>\n\n <!-- Rubber-band selection \u2014 direct child of f-flow -->\n @if (!ReadOnly) {\n <f-selection-area></f-selection-area>\n }\n\n <!-- Minimap -->\n @if (ShowMinimap) {\n <div class=\"mj-flow-editor-minimap\" fDragBlocker>\n <f-minimap [fMinSize]=\"1500\"></f-minimap>\n </div>\n }\n </f-flow>\n\n <!-- Dynamic Theme-Native Legend -->\n @if (ShowLegend && Nodes.length > 0) {\n <div class=\"mj-flow-editor-legend\">\n <div class=\"mj-flow-editor-legend-title\">Legend</div>\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">Paths</div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"var(--mj-text-muted)\" stroke-width=\"2\"/></svg>\n <span>Always / Next</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"var(--mj-status-success)\" stroke-width=\"2\"/></svg>\n <i class=\"fa-solid fa-circle-check mj-flow-editor-legend-icon--ok\"></i>\n <span>Taken / Fallback</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"var(--mj-status-warning)\" stroke-width=\"2\" stroke-dasharray=\"5 3\"/></svg>\n <span>Conditional</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"var(--mj-status-warning)\" stroke-width=\"2.5\" stroke-dasharray=\"3 3\"/></svg>\n <span>Forced override</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <svg class=\"mj-flow-editor-legend-line-svg\" width=\"28\" height=\"10\"><line x1=\"0\" y1=\"5\" x2=\"28\" y2=\"5\" stroke=\"var(--mj-text-disabled)\" stroke-width=\"2\" stroke-dasharray=\"5 4\"/></svg>\n <span>Untaken / Skipped</span>\n </div>\n </div>\n @if (NodeTypes.length > 0) {\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">Step Types</div>\n @for (nt of NodeTypes; track nt.Type) {\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-swatch\" [style.backgroundColor]=\"nt.Color\"></span>\n <span>{{ nt.Label }}</span>\n </div>\n }\n </div>\n }\n <div class=\"mj-flow-editor-legend-section\">\n <div class=\"mj-flow-editor-legend-heading\">States</div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-box mj-flow-editor-legend-box--start\"></span>\n <span>Start step</span>\n </div>\n <div class=\"mj-flow-editor-legend-item\">\n <span class=\"mj-flow-editor-legend-box mj-flow-editor-legend-box--warn\"></span>\n <i class=\"fa-solid fa-triangle-exclamation mj-flow-editor-legend-icon--warn\"></i>\n <span>Needs attention</span>\n </div>\n </div>\n </div>\n }\n\n <!-- Empty state overlay -->\n @if (Nodes.length === 0) {\n <div class=\"mj-flow-editor-empty\">\n <mj-empty-state\n Icon=\"fa-solid fa-diagram-project\"\n [Title]=\"EmptyStateTitle\">\n @if (!ReadOnly) {\n <p class=\"mj-flow-editor-empty-subtitle\">\n Or use auto-arrange after adding steps to lay them out automatically\n </p>\n }\n </mj-empty-state>\n </div>\n }\n </div>\n </div>\n\n <!-- Context Menu -->\n @if (contextMenuVisible) {\n <div\n class=\"mj-flow-context-menu\"\n [style.left.px]=\"contextMenuX\"\n [style.top.px]=\"contextMenuY\"\n (click)=\"$event.stopPropagation()\">\n @for (item of contextMenuItems; track item.ID; let last = $last) {\n <button type=\"button\" class=\"mj-flow-context-menu-item\"\n [class.mj-flow-context-menu-item--danger]=\"item.Danger\"\n [disabled]=\"item.Disabled\"\n (click)=\"onContextMenuAction(item.ID)\">\n @if (item.Icon) {\n <i class=\"fa-solid\" [ngClass]=\"item.Icon\"></i>\n }\n <span>{{ item.Label }}</span>\n @if (item.Shortcut) {\n <kbd class=\"mj-flow-context-menu-shortcut\">{{ item.Shortcut }}</kbd>\n }\n </button>\n @if (!last && item.Danger !== contextMenuItems[$index + 1]?.Danger) {\n <div class=\"mj-flow-context-menu-divider\"></div>\n }\n }\n </div>\n }\n\n <!-- Status Bar -->\n @if (ShowStatusBar) {\n <mj-flow-status-bar\n [NodeCount]=\"Nodes.length\"\n [ConnectionCount]=\"Connections.length\"\n [SelectedCount]=\"selectedCount\"\n [ZoomLevel]=\"zoomLevel\">\n </mj-flow-status-bar>\n }\n</div>\n", styles: ["/* ============================================================\n Flow Editor \u2014 Main container styles\n ============================================================ */\n\n/* The HOST is a custom element, which is `display: inline` with auto height until told otherwise.\n Without this, `.mj-flow-editor { height: 100% }` below resolved against an auto-height parent \u2014\n which means auto \u2014 so the canvas fell back to its `min-height` floor and sat at 400px no matter\n how much room its pane actually had.\n\n `height: 100%` here is safe for hosts that DON'T give it a box: it resolves to auto in that case,\n and the floor takes over exactly as before. */\n:host {\n display: block;\n height: 100%;\n min-height: 0;\n}\n\n.mj-flow-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n outline: none;\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n}\n\n.mj-flow-editor--readonly .mj-flow-node-port {\n cursor: default;\n pointer-events: none;\n}\n\n/* \u2500\u2500 Toolbar Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-toolbar-area,\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n position: absolute;\n top: 10px;\n z-index: 20;\n}\n.mj-flow-editor-toolbar-area[data-align=\"center\"],\n.mj-flow-editor-toolbar-chip[data-align=\"center\"],\n.mj-flow-editor-toolbar-tab[data-align=\"center\"] {\n left: 50%;\n transform: translateX(-50%);\n}\n.mj-flow-editor-toolbar-area[data-align=\"left\"],\n.mj-flow-editor-toolbar-chip[data-align=\"left\"],\n.mj-flow-editor-toolbar-tab[data-align=\"left\"] {\n left: 10px;\n}\n.mj-flow-editor-toolbar-area[data-align=\"right\"],\n.mj-flow-editor-toolbar-chip[data-align=\"right\"],\n.mj-flow-editor-toolbar-tab[data-align=\"right\"] {\n right: 10px;\n}\n\n.mj-flow-editor-toolbar-chip,\n.mj-flow-editor-toolbar-tab {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.mj-flow-editor-toolbar-chip:hover,\n.mj-flow-editor-toolbar-tab:hover {\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-flow-editor-toolbar-chip {\n width: 32px;\n height: 32px;\n border-radius: var(--mj-radius-md);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.mj-flow-editor-toolbar-tab {\n width: 22px;\n height: 18px;\n padding: 0;\n border-radius: var(--mj-radius-sm);\n opacity: 0.55;\n}\n.mj-flow-editor-toolbar-tab:hover { opacity: 1; }\n\n/* \u2500\u2500 Canvas Area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-canvas-area {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-flow-editor-canvas {\n flex: 1;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface);\n}\n\n.mj-flow-editor-canvas f-flow {\n width: 100%;\n height: 100%;\n}\n\n/* Pan mode \u2014 grab cursor, nodes pass through pointer events to canvas */\n.mj-flow-editor-canvas--pan-mode {\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode:active {\n cursor: grabbing;\n}\n\n.mj-flow-editor-canvas--pan-mode mj-flow-node {\n pointer-events: none;\n cursor: grab;\n}\n\n.mj-flow-editor-canvas--pan-mode f-connection {\n pointer-events: none;\n}\n\n.mj-flow-editor-canvas--pan-mode .mj-flow-connection-label {\n pointer-events: none;\n}\n\n/* \u2500\u2500 Minimap \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-minimap {\n position: absolute;\n bottom: 12px;\n right: 12px;\n width: 160px;\n height: 120px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n z-index: 15;\n}\n\n.mj-flow-editor-minimap f-minimap {\n width: 100%;\n height: 100%;\n}\n\n/* Foblex minimap SVG node rectangles (no default styles provided by Foblex) */\n.mj-flow-editor-minimap .f-minimap-node {\n fill: var(--mj-border-strong);\n stroke: var(--mj-text-disabled);\n stroke-width: 1;\n rx: 3;\n ry: 3;\n}\n\n.mj-flow-editor-minimap .f-minimap-node.f-selected {\n fill: color-mix(in srgb, var(--mj-brand-primary) 50%, var(--mj-bg-surface));\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n.mj-flow-editor-minimap .f-minimap-group {\n fill: var(--mj-border-default);\n stroke: var(--mj-text-disabled);\n stroke-width: 0.5;\n rx: 2;\n ry: 2;\n}\n\n/* Viewport indicator rectangle */\n.mj-flow-editor-minimap .f-minimap-view {\n fill: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n stroke: var(--mj-brand-primary);\n stroke-width: 1.5;\n}\n\n/* \u2500\u2500 Empty State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-empty {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n z-index: 5;\n}\n\n.mj-flow-editor-empty-subtitle {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-disabled);\n margin: 0;\n}\n\n/* \u2500\u2500 Connection Labels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-connection-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 5px;\n background: var(--mj-bg-surface);\n border: 1.5px solid var(--mj-border-strong);\n border-radius: 5px;\n padding: 4px 10px;\n font-size: 11px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n box-shadow: var(--mj-shadow-sm);\n pointer-events: none;\n line-height: 1.4;\n text-align: center;\n}\n\n.mj-flow-connection-label-icon {\n font-size: 10px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n/* \u2500\u2500 Foblex Overrides \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n/* Canvas \u2014 transparent so the grid pattern shows through */\nf-canvas {\n background: transparent;\n}\n\n/* Selection area */\nf-selection-area {\n --f-selection-area-background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n --f-selection-area-border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n/* Line alignment guides */\nf-line-alignment {\n --f-line-alignment-color: var(--mj-brand-primary);\n}\n\n/* Connection paths \u2014 default stroke color prevents invisible connections */\n.f-connection path {\n stroke: var(--mj-text-disabled);\n stroke-width: var(--connection-width, 2px);\n fill: none;\n transition: stroke 0.15s ease, stroke-width 0.15s ease;\n}\n\n.f-connection:hover path {\n stroke-width: calc(var(--connection-width, 2px) + 1px);\n}\n\n.f-connection.f-selected path {\n stroke: var(--mj-brand-primary);\n stroke-width: max(3px, var(--connection-width, 2px));\n}\n\n/* Colored connections use the --connection-color custom property,\n defaulting to neutral when no color is specified by the consumer */\n.mj-flow-connection-colored path {\n stroke: var(--connection-color, var(--mj-text-disabled));\n}\n\n.mj-flow-connection-colored.f-selected path {\n stroke: var(--connection-color, var(--mj-brand-primary));\n stroke-width: max(3px, var(--connection-width, 2px));\n filter: brightness(0.85);\n}\n\n/* Dashed connection style */\n.mj-flow-connection-dashed path {\n stroke-dasharray: 8 4;\n}\n\n/* Dotted connection style */\n.mj-flow-connection-dotted path {\n stroke-dasharray: 3 3;\n}\n\n.mj-flow-connection-animated path {\n stroke-dasharray: 14 10;\n stroke-linecap: round;\n stroke-width: var(--connection-width, 4.5px);\n animation: mj-flow-dash 0.5s linear infinite;\n filter: drop-shadow(0 0 5px color-mix(in srgb, var(--connection-color, var(--mj-brand-primary)) 70%, transparent));\n}\n@keyframes mj-flow-dash {\n to { stroke-dashoffset: -24; }\n}\n\n/* Connection for create (dragging) */\n.f-connection-for-create path {\n stroke: var(--mj-text-disabled);\n stroke-dasharray: 6 3;\n stroke-width: 2;\n}\n\n/* \u2500\u2500 Legend \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-editor-legend {\n position: absolute;\n bottom: 12px;\n left: 12px;\n background: color-mix(in srgb, var(--mj-bg-surface) 92%, transparent);\n backdrop-filter: blur(6px);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n padding: 10px 14px;\n box-shadow: var(--mj-shadow-sm);\n z-index: 15;\n font-size: 11px;\n color: var(--mj-text-secondary);\n max-width: 200px;\n}\n\n.mj-flow-editor-legend-title {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin-bottom: 8px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mj-flow-editor-legend-section {\n margin-bottom: 8px;\n}\n\n.mj-flow-editor-legend-section:last-child {\n margin-bottom: 0;\n}\n\n.mj-flow-editor-legend-heading {\n font-size: 10px;\n font-weight: 600;\n color: var(--mj-text-disabled);\n text-transform: uppercase;\n letter-spacing: 0.3px;\n margin-bottom: 4px;\n}\n\n.mj-flow-editor-legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 11px;\n color: var(--mj-text-secondary);\n}\n\n.mj-flow-editor-legend-svg,\n.mj-flow-editor-legend-line-svg {\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-swatch {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n.mj-flow-editor-legend-box {\n display: inline-block;\n width: 14px;\n height: 10px;\n border: 2px solid;\n border-radius: var(--mj-radius-sm);\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Context Menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-context-menu {\n position: fixed;\n min-width: 180px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n box-shadow: var(--mj-shadow-lg);\n padding: 4px;\n z-index: 9999;\n animation: mj-ctx-fade-in 0.1s ease-out;\n}\n\n@keyframes mj-ctx-fade-in {\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n}\n\n.mj-flow-context-menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 12px;\n border: none;\n background: none;\n font-size: var(--mj-text-sm);\n font-weight: 450;\n color: var(--mj-text-secondary);\n cursor: pointer;\n border-radius: 5px;\n text-align: left;\n transition: background-color 0.1s ease;\n}\n\n.mj-flow-context-menu-item:hover {\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.mj-flow-context-menu-item i {\n width: 16px;\n text-align: center;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-shortcut {\n margin-left: auto;\n padding: 0 4px;\n border: 1px solid var(--mj-border-default);\n border-radius: 3px;\n font-size: 10px;\n font-family: inherit;\n color: var(--mj-text-muted);\n}\n\n.mj-flow-context-menu-item--danger {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-item--danger:hover {\n background-color: var(--mj-status-error-bg);\n}\n\n.mj-flow-connection-untaken path {\n opacity: 0.45;\n stroke-dasharray: 5 4;\n}\n\n.mj-flow-connection-forced path {\n stroke-dasharray: 3 4;\n}\n\n.mj-flow-editor-legend-box--start {\n border-color: var(--mj-status-success);\n background: var(--mj-status-success-bg);\n}\n\n.mj-flow-editor-legend-box--warn {\n border-color: var(--mj-status-warning);\n background: var(--mj-status-warning-bg);\n}\n\n.mj-flow-editor-legend-icon--ok {\n color: var(--mj-status-success);\n font-size: 10px;\n}\n\n.mj-flow-editor-legend-icon--err {\n color: var(--mj-status-error);\n font-size: 10px;\n}\n\n.mj-flow-editor-legend-icon--warn {\n color: var(--mj-status-warning);\n font-size: 10px;\n}\n\n.mj-flow-context-menu-item--danger i {\n color: var(--mj-status-error);\n}\n\n.mj-flow-context-menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 8px;\n}\n\n/* \u2500\u2500 Focus Indicators (Accessibility) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-flow-toolbar-btn:focus-visible,\n.mj-agent-editor-btn:focus-visible,\n.mj-agent-editor-view-btn:focus-visible,\n.mj-agent-props-close:focus-visible,\n.mj-agent-props-delete-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n}\n\n.mj-flow-palette-item:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 1px;\n border-radius: var(--mj-radius-md);\n}\n"] }]
1170
1339
  }], () => [{ type: i0.ChangeDetectorRef }, { type: i1.FlowStateService }, { type: i2.FlowLayoutService }], { Nodes: [{
1171
1340
  type: Input
1172
1341
  }], Connections: [{
@@ -1195,6 +1364,12 @@ export class FlowEditorComponent {
1195
1364
  type: Input
1196
1365
  }], AutoLayoutDirection: [{
1197
1366
  type: Input
1367
+ }], XRayEnabled: [{
1368
+ type: Input
1369
+ }], AllowBreakpointClick: [{
1370
+ type: Input
1371
+ }], ViewportKey: [{
1372
+ type: Input
1198
1373
  }], ConnectionLabelBackground: [{
1199
1374
  type: Input
1200
1375
  }], ConnectionLabelBorderColor: [{
@@ -1239,6 +1414,14 @@ export class FlowEditorComponent {
1239
1414
  type: Output
1240
1415
  }], LegendToggled: [{
1241
1416
  type: Output
1417
+ }], LayoutDirectionChanged: [{
1418
+ type: Output
1419
+ }], NodeBreakpointClicked: [{
1420
+ type: Output
1421
+ }], NodeQuickAddClicked: [{
1422
+ type: Output
1423
+ }], NodeRunStepClicked: [{
1424
+ type: Output
1242
1425
  }], ToolbarVisibilityChanged: [{
1243
1426
  type: Output
1244
1427
  }], fFlow: [{
@@ -1259,10 +1442,13 @@ export class FlowEditorComponent {
1259
1442
  }], onKeyDown: [{
1260
1443
  type: HostListener,
1261
1444
  args: ['keydown', ['$event']]
1445
+ }], onKeyUp: [{
1446
+ type: HostListener,
1447
+ args: ['document:keyup', ['$event']]
1262
1448
  }] }); })();
1263
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowEditorComponent, { className: "FlowEditorComponent", filePath: "src/lib/components/flow-editor.component.ts", lineNumber: 46 }); })();
1449
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowEditorComponent, { className: "FlowEditorComponent", filePath: "src/lib/components/flow-editor.component.ts", lineNumber: 52 }); })();
1264
1450
  function defaultContextMenuItems(target) {
1265
- const noun = target === 'node' ? 'Node' : 'Connection';
1451
+ const noun = target === 'node' ? 'Step' : 'Path';
1266
1452
  return [
1267
1453
  { ID: 'edit', Label: `Edit ${noun}`, Icon: 'fa-pen-to-square' },
1268
1454
  { ID: 'remove', Label: `Remove ${noun}`, Icon: 'fa-trash-can', Danger: true },