@angflow/angular 0.0.1 → 0.0.3

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 (97) hide show
  1. package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js +24 -35
  2. package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js.map +1 -1
  3. package/dist/esm/lib/components/attribution/attribution.component.js +21 -17
  4. package/dist/esm/lib/components/attribution/attribution.component.js.map +1 -1
  5. package/dist/esm/lib/components/background/background.component.js +85 -77
  6. package/dist/esm/lib/components/background/background.component.js.map +1 -1
  7. package/dist/esm/lib/components/connection-line/connection-line.component.js +34 -45
  8. package/dist/esm/lib/components/connection-line/connection-line.component.js.map +1 -1
  9. package/dist/esm/lib/components/controls/controls.component.d.ts.map +1 -1
  10. package/dist/esm/lib/components/controls/controls.component.js +83 -86
  11. package/dist/esm/lib/components/controls/controls.component.js.map +1 -1
  12. package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js +14 -19
  13. package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js.map +1 -1
  14. package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js +20 -27
  15. package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js.map +1 -1
  16. package/dist/esm/lib/components/edges/base-edge.component.js +30 -27
  17. package/dist/esm/lib/components/edges/base-edge.component.js.map +1 -1
  18. package/dist/esm/lib/components/edges/bezier-edge.component.js +20 -18
  19. package/dist/esm/lib/components/edges/bezier-edge.component.js.map +1 -1
  20. package/dist/esm/lib/components/edges/edge-text.component.js +24 -23
  21. package/dist/esm/lib/components/edges/edge-text.component.js.map +1 -1
  22. package/dist/esm/lib/components/edges/simple-bezier-edge.component.js +19 -17
  23. package/dist/esm/lib/components/edges/simple-bezier-edge.component.js.map +1 -1
  24. package/dist/esm/lib/components/edges/smooth-step-edge.component.js +19 -17
  25. package/dist/esm/lib/components/edges/smooth-step-edge.component.js.map +1 -1
  26. package/dist/esm/lib/components/edges/step-edge.component.js +19 -17
  27. package/dist/esm/lib/components/edges/step-edge.component.js.map +1 -1
  28. package/dist/esm/lib/components/edges/straight-edge.component.js +19 -17
  29. package/dist/esm/lib/components/edges/straight-edge.component.js.map +1 -1
  30. package/dist/esm/lib/components/handle/handle.component.js +36 -46
  31. package/dist/esm/lib/components/handle/handle.component.js.map +1 -1
  32. package/dist/esm/lib/components/minimap/minimap.component.d.ts +8 -0
  33. package/dist/esm/lib/components/minimap/minimap.component.d.ts.map +1 -1
  34. package/dist/esm/lib/components/minimap/minimap.component.js +174 -75
  35. package/dist/esm/lib/components/minimap/minimap.component.js.map +1 -1
  36. package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js +12 -17
  37. package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js.map +1 -1
  38. package/dist/esm/lib/components/node-resizer/node-resizer.component.js +83 -50
  39. package/dist/esm/lib/components/node-resizer/node-resizer.component.js.map +1 -1
  40. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts +1 -1
  41. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts.map +1 -1
  42. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js +28 -29
  43. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js.map +1 -1
  44. package/dist/esm/lib/components/nodes/default-node.component.js +16 -26
  45. package/dist/esm/lib/components/nodes/default-node.component.js.map +1 -1
  46. package/dist/esm/lib/components/nodes/group-node.component.js +14 -15
  47. package/dist/esm/lib/components/nodes/group-node.component.js.map +1 -1
  48. package/dist/esm/lib/components/nodes/input-node.component.js +15 -24
  49. package/dist/esm/lib/components/nodes/input-node.component.js.map +1 -1
  50. package/dist/esm/lib/components/nodes/output-node.component.js +15 -23
  51. package/dist/esm/lib/components/nodes/output-node.component.js.map +1 -1
  52. package/dist/esm/lib/components/panel/panel.component.js +19 -26
  53. package/dist/esm/lib/components/panel/panel.component.js.map +1 -1
  54. package/dist/esm/lib/components/selection-box/selection-box.component.d.ts +7 -0
  55. package/dist/esm/lib/components/selection-box/selection-box.component.d.ts.map +1 -1
  56. package/dist/esm/lib/components/selection-box/selection-box.component.js +69 -28
  57. package/dist/esm/lib/components/selection-box/selection-box.component.js.map +1 -1
  58. package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js +15 -22
  59. package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js.map +1 -1
  60. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts +6 -0
  61. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts.map +1 -1
  62. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js +192 -139
  63. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js.map +1 -1
  64. package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts +2 -0
  65. package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts.map +1 -1
  66. package/dist/esm/lib/container/ng-flow/ng-flow.component.js +135 -101
  67. package/dist/esm/lib/container/ng-flow/ng-flow.component.js.map +1 -1
  68. package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts +4 -0
  69. package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts.map +1 -1
  70. package/dist/esm/lib/container/node-renderer/node-renderer.component.js +164 -109
  71. package/dist/esm/lib/container/node-renderer/node-renderer.component.js.map +1 -1
  72. package/dist/esm/lib/container/pane/pane.component.d.ts.map +1 -1
  73. package/dist/esm/lib/container/pane/pane.component.js +23 -28
  74. package/dist/esm/lib/container/pane/pane.component.js.map +1 -1
  75. package/dist/esm/lib/container/viewport/viewport.component.js +16 -23
  76. package/dist/esm/lib/container/viewport/viewport.component.js.map +1 -1
  77. package/dist/esm/lib/directives/drag.directive.js +10 -10
  78. package/dist/esm/lib/directives/drag.directive.js.map +1 -1
  79. package/dist/esm/lib/directives/drop-zone.directive.js +9 -9
  80. package/dist/esm/lib/directives/drop-zone.directive.js.map +1 -1
  81. package/dist/esm/lib/directives/key-handler.directive.js +13 -15
  82. package/dist/esm/lib/directives/key-handler.directive.js.map +1 -1
  83. package/dist/esm/lib/directives/node-type.directive.js +12 -12
  84. package/dist/esm/lib/directives/node-type.directive.js.map +1 -1
  85. package/dist/esm/lib/services/flow-store.service.d.ts +7 -0
  86. package/dist/esm/lib/services/flow-store.service.d.ts.map +1 -1
  87. package/dist/esm/lib/services/flow-store.service.js +28 -5
  88. package/dist/esm/lib/services/flow-store.service.js.map +1 -1
  89. package/dist/esm/lib/services/ng-flow.service.d.ts +9 -9
  90. package/dist/esm/lib/services/ng-flow.service.d.ts.map +1 -1
  91. package/dist/esm/lib/services/ng-flow.service.js +18 -19
  92. package/dist/esm/lib/services/ng-flow.service.js.map +1 -1
  93. package/dist/esm/test-setup.d.ts +2 -0
  94. package/dist/esm/test-setup.d.ts.map +1 -0
  95. package/dist/esm/test-setup.js +6 -0
  96. package/dist/esm/test-setup.js.map +1 -0
  97. package/package.json +9 -3
@@ -1,43 +1,75 @@
1
1
  import { Component, ChangeDetectionStrategy, inject, computed, output } from '@angular/core';
2
2
  import { FlowStore } from '../../services/flow-store.service';
3
3
  import * as i0 from "@angular/core";
4
- function SelectionBoxComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5
- const _r1 = i0.ɵɵgetCurrentView();
6
- i0.ɵɵdomElementStart(0, "div", 1);
7
- i0.ɵɵdomListener("contextmenu", function SelectionBoxComponent_Conditional_0_Template_div_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onContextMenu($event)); });
8
- i0.ɵɵdomElementEnd();
9
- } if (rf & 2) {
10
- const ctx_r1 = i0.ɵɵnextContext();
11
- i0.ɵɵstyleProp("left", ctx_r1.rect().x, "px")("top", ctx_r1.rect().y, "px")("width", ctx_r1.rect().width, "px")("height", ctx_r1.rect().height, "px");
12
- } }
13
4
  export class SelectionBoxComponent {
14
5
  constructor() {
15
6
  this.store = inject(FlowStore);
16
7
  this.contextMenu = output();
17
8
  this.isVisible = computed(() => this.store.userSelectionActive() && this.store.userSelectionRect() !== null, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
18
9
  this.rect = computed(() => this.store.userSelectionRect(), ...(ngDevMode ? [{ debugName: "rect" }] : /* istanbul ignore next */ []));
10
+ this.nodesSelectionBounds = computed(() => {
11
+ this.store.version();
12
+ const selected = this.store.selectedNodes();
13
+ if (selected.length === 0)
14
+ return { x: 0, y: 0, width: 0, height: 0 };
15
+ let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
16
+ for (const node of selected) {
17
+ const internal = this.store.nodeLookup.get(node.id);
18
+ const x = internal?.internals?.positionAbsolute?.x ?? node.position.x;
19
+ const y = internal?.internals?.positionAbsolute?.y ?? node.position.y;
20
+ const w = internal?.measured?.width ?? node.width ?? 150;
21
+ const h = internal?.measured?.height ?? node.height ?? 40;
22
+ minX = Math.min(minX, x);
23
+ minY = Math.min(minY, y);
24
+ maxX = Math.max(maxX, x + w);
25
+ maxY = Math.max(maxY, y + h);
26
+ }
27
+ return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
28
+ }, ...(ngDevMode ? [{ debugName: "nodesSelectionBounds" }] : /* istanbul ignore next */ []));
29
+ this.nodesSelectionTransform = computed(() => {
30
+ const b = this.nodesSelectionBounds();
31
+ return `translate(${b.x}px, ${b.y}px)`;
32
+ }, ...(ngDevMode ? [{ debugName: "nodesSelectionTransform" }] : /* istanbul ignore next */ []));
19
33
  }
20
34
  onContextMenu(event) {
21
35
  event.preventDefault();
22
36
  this.contextMenu.emit(event);
23
37
  }
24
- static { this.ɵfac = function SelectionBoxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SelectionBoxComponent)(); }; }
25
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectionBoxComponent, selectors: [["ng-flow-selection-box"]], hostAttrs: [2, "display", "contents"], outputs: { contextMenu: "contextMenu" }, decls: 1, vars: 1, consts: [[1, "ng-flow__selection", "xy-flow__selection", 2, "position", "absolute", "pointer-events", "all", "z-index", "10", 3, "left", "top", "width", "height"], [1, "ng-flow__selection", "xy-flow__selection", 2, "position", "absolute", "pointer-events", "all", "z-index", "10", 3, "contextmenu"]], template: function SelectionBoxComponent_Template(rf, ctx) { if (rf & 1) {
26
- i0.ɵɵconditionalCreate(0, SelectionBoxComponent_Conditional_0_Template, 1, 8, "div", 0);
27
- } if (rf & 2) {
28
- i0.ɵɵconditional(ctx.isVisible() ? 0 : -1);
29
- } }, encapsulation: 2, changeDetection: 0 }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: SelectionBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: SelectionBoxComponent, isStandalone: true, selector: "ng-flow-selection-box", outputs: { contextMenu: "contextMenu" }, host: { styleAttribute: "display: contents;" }, ngImport: i0, template: `
40
+ @if (isVisible()) {
41
+ <div
42
+ class="ng-flow__selection xy-flow__selection"
43
+ style="position: absolute; pointer-events: all; z-index: 10;"
44
+ [style.left.px]="rect()!.x"
45
+ [style.top.px]="rect()!.y"
46
+ [style.width.px]="rect()!.width"
47
+ [style.height.px]="rect()!.height"
48
+ (contextmenu)="onContextMenu($event)"
49
+ ></div>
50
+ }
51
+ @if (store.nodesSelectionActive()) {
52
+ <div
53
+ class="ng-flow__selection ng-flow__nodesselection xy-flow__selection xy-flow__nodesselection"
54
+ style="position: absolute; pointer-events: all; z-index: 10; transform-origin: left top;"
55
+ [style.transform]="nodesSelectionTransform()"
56
+ [style.width.px]="nodesSelectionBounds().width"
57
+ [style.height.px]="nodesSelectionBounds().height"
58
+ (contextmenu)="onContextMenu($event)"
59
+ ></div>
60
+ }
61
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
30
62
  }
31
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectionBoxComponent, [{
32
- type: Component,
33
- args: [{
34
- selector: 'ng-flow-selection-box',
35
- standalone: true,
36
- changeDetection: ChangeDetectionStrategy.OnPush,
37
- host: {
38
- 'style': 'display: contents;',
39
- },
40
- template: `
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: SelectionBoxComponent, decorators: [{
64
+ type: Component,
65
+ args: [{
66
+ selector: 'ng-flow-selection-box',
67
+ standalone: true,
68
+ changeDetection: ChangeDetectionStrategy.OnPush,
69
+ host: {
70
+ 'style': 'display: contents;',
71
+ },
72
+ template: `
41
73
  @if (isVisible()) {
42
74
  <div
43
75
  class="ng-flow__selection xy-flow__selection"
@@ -49,8 +81,17 @@ export class SelectionBoxComponent {
49
81
  (contextmenu)="onContextMenu($event)"
50
82
  ></div>
51
83
  }
84
+ @if (store.nodesSelectionActive()) {
85
+ <div
86
+ class="ng-flow__selection ng-flow__nodesselection xy-flow__selection xy-flow__nodesselection"
87
+ style="position: absolute; pointer-events: all; z-index: 10; transform-origin: left top;"
88
+ [style.transform]="nodesSelectionTransform()"
89
+ [style.width.px]="nodesSelectionBounds().width"
90
+ [style.height.px]="nodesSelectionBounds().height"
91
+ (contextmenu)="onContextMenu($event)"
92
+ ></div>
93
+ }
52
94
  `,
53
- }]
54
- }], null, { contextMenu: [{ type: i0.Output, args: ["contextMenu"] }] }); })();
55
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectionBoxComponent, { className: "SelectionBoxComponent", filePath: "lib/components/selection-box/selection-box.component.ts", lineNumber: 25 }); })();
95
+ }]
96
+ }], propDecorators: { contextMenu: [{ type: i0.Output, args: ["contextMenu"] }] } });
56
97
  //# sourceMappingURL=selection-box.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selection-box.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/selection-box/selection-box.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;;;IAWxD,iCAQC;IADC,2MAAe,4BAAqB,KAAC;IACtC,oBAAM;;;IAFL,AADA,AADA,AADA,6CAA2B,8BACD,oCACM,sCACE;;AAM1C,MAAM,OAAO,qBAAqB;IArBlC;QAsBW,UAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAE1B,gBAAW,GAAG,MAAM,EAAc,CAAC;QAEnC,cAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,IAAI,gFAAC,CAAC;QACxG,SAAI,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,2EAAC,CAAC;KAMhE;IAJC,aAAa,CAAC,KAAiB;QAC7B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;sHAXU,qBAAqB;oEAArB,qBAAqB;YAb9B,uFAAmB;;YAAnB,0CAUC;;;iFAGQ,qBAAqB;cArBjC,SAAS;eAAC;gBACT,QAAQ,EAAE,uBAAuB;gBACjC,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,IAAI,EAAE;oBACJ,OAAO,EAAE,oBAAoB;iBAC9B;gBACD,QAAQ,EAAE;;;;;;;;;;;;GAYT;aACF;;kFACY,qBAAqB"}
1
+ {"version":3,"file":"selection-box.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/selection-box/selection-box.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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;;;;;;;GAsBT;;2FAEU,qBAAqB;kBA/BjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACJ,OAAO,EAAE,oBAAoB;qBAC9B;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;GAsBT;iBACF"}
@@ -1,7 +1,6 @@
1
1
  import { Component, ChangeDetectionStrategy, inject, computed } from '@angular/core';
2
2
  import { FlowStore } from '../../services/flow-store.service';
3
3
  import * as i0 from "@angular/core";
4
- const _c0 = ["*"];
5
4
  export class ViewportPortalComponent {
6
5
  constructor() {
7
6
  this.store = inject(FlowStore);
@@ -10,26 +9,20 @@ export class ViewportPortalComponent {
10
9
  return `translate(${t[0]}px, ${t[1]}px) scale(${t[2]})`;
11
10
  }, ...(ngDevMode ? [{ debugName: "cssTransform" }] : /* istanbul ignore next */ []));
12
11
  }
13
- static { this.ɵfac = function ViewportPortalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ViewportPortalComponent)(); }; }
14
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ViewportPortalComponent, selectors: [["ng-flow-viewport-portal"]], hostAttrs: [1, "ng-flow__viewport-portal", "xy-flow__viewport-portal"], hostVars: 2, hostBindings: function ViewportPortalComponent_HostBindings(rf, ctx) { if (rf & 2) {
15
- i0.ɵɵstyleProp("transform", ctx.cssTransform());
16
- } }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function ViewportPortalComponent_Template(rf, ctx) { if (rf & 1) {
17
- i0.ɵɵprojectionDef();
18
- i0.ɵɵprojection(0);
19
- } }, encapsulation: 2, changeDetection: 0 }); }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ViewportPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: ViewportPortalComponent, isStandalone: true, selector: "ng-flow-viewport-portal", host: { properties: { "style.transform": "cssTransform()" }, classAttribute: "ng-flow__viewport-portal xy-flow__viewport-portal" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
14
  }
21
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewportPortalComponent, [{
22
- type: Component,
23
- args: [{
24
- selector: 'ng-flow-viewport-portal',
25
- standalone: true,
26
- changeDetection: ChangeDetectionStrategy.OnPush,
27
- host: {
28
- 'class': 'ng-flow__viewport-portal xy-flow__viewport-portal',
29
- '[style.transform]': 'cssTransform()',
30
- },
31
- template: `<ng-content />`,
32
- }]
33
- }], null, null); })();
34
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ViewportPortalComponent, { className: "ViewportPortalComponent", filePath: "lib/components/viewport-portal/viewport-portal.component.ts", lineNumber: 14 }); })();
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ViewportPortalComponent, decorators: [{
16
+ type: Component,
17
+ args: [{
18
+ selector: 'ng-flow-viewport-portal',
19
+ standalone: true,
20
+ changeDetection: ChangeDetectionStrategy.OnPush,
21
+ host: {
22
+ 'class': 'ng-flow__viewport-portal xy-flow__viewport-portal',
23
+ '[style.transform]': 'cssTransform()',
24
+ },
25
+ template: `<ng-content />`,
26
+ }]
27
+ }] });
35
28
  //# sourceMappingURL=viewport-portal.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewport-portal.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/viewport-portal/viewport-portal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;;AAY9D,MAAM,OAAO,uBAAuB;IAVpC;QAWU,UAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAEzB,iBAAY,GAAG,QAAQ,CAAC,GAAG,EAAE;YACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1D,CAAC,mFAAC,CAAC;KACJ;wHAPY,uBAAuB;oEAAvB,uBAAuB;YAAvB,4BAAA,kBAAc,CAAS;;;YAFvB,kBAAc;;;iFAEd,uBAAuB;cAVnC,SAAS;eAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,IAAI,EAAE;oBACJ,OAAO,EAAE,mDAAmD;oBAC5D,mBAAmB,EAAE,gBAAgB;iBACtC;gBACD,QAAQ,EAAE,gBAAgB;aAC3B;;kFACY,uBAAuB"}
1
+ {"version":3,"file":"viewport-portal.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/viewport-portal/viewport-portal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;AAY9D,MAAM,OAAO,uBAAuB;IAVpC;QAWU,UAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAEzB,iBAAY,GAAG,QAAQ,CAAC,GAAG,EAAE;YACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1D,CAAC,mFAAC,CAAC;KACJ;8GAPY,uBAAuB;kGAAvB,uBAAuB,uNAFxB,gBAAgB;;2FAEf,uBAAuB;kBAVnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACJ,OAAO,EAAE,mDAAmD;wBAC5D,mBAAmB,EAAE,gBAAgB;qBACtC;oBACD,QAAQ,EAAE,gBAAgB;iBAC3B"}
@@ -49,10 +49,16 @@ export declare class EdgeRendererComponent {
49
49
  readonly visibleEdges: import("@angular/core").Signal<Edge[]>;
50
50
  readonly markers: import("@angular/core").Signal<Record<string, unknown>[]>;
51
51
  isCustomEdge(type?: string): boolean;
52
+ getEdgeClasses(edge: Edge): string;
53
+ getEdgeGClasses(edge: Edge): string;
54
+ getEdgePathStyle(edge: Edge): string | null;
55
+ getEdgeZIndex(edge: Edge): number;
52
56
  getEdgePath(ei: Record<string, unknown>): string;
53
57
  getEdgeComponent(type?: string): Type<unknown>;
54
58
  getEdgeInputs(edge: Edge): Record<string, any>;
55
59
  onEdgeEvent(event: MouseEvent, edge: Edge, eventType: string): void;
60
+ onEdgeKeyDown(event: KeyboardEvent, edge: Edge): void;
61
+ onEdgeFocus(edge: Edge): void;
56
62
  getEdgeCenterX(ei: Record<string, unknown>): number;
57
63
  getEdgeCenterY(ei: Record<string, unknown>): number;
58
64
  getEdgeAriaLabel(edge: Edge): string;
@@ -1 +1 @@
1
- {"version":3,"file":"edge-renderer.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/container/edge-renderer/edge-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,IAAI,EAEL,MAAM,eAAe,CAAC;AAEvB,OAAO,EASL,KAAK,UAAU,EACf,KAAK,UAAU,EAEf,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAC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