vue3-network-graph 0.1.2 → 0.1.4

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.
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export interface TopologyNode {
13
13
  id: string;
14
14
  label?: string | null;
15
15
  /** "core" / "text" / custom icon types */
16
- type?: string;
16
+ nodeType?: string;
17
17
  /** "none" | "normal" | "warning" | "error" | ... */
18
18
  state?: string;
19
19
  x: number;
@@ -28,7 +28,11 @@ export interface TopologyNode {
28
28
  borderWidth?: number;
29
29
  borderStyle?: "dashed" | string;
30
30
  background?: string;
31
+ /** Node box corner radius in px (default 6); applies to the node background, border and selection box. */
32
+ borderRadius?: number;
31
33
  labelPosition?: "top" | "center" | "bottom";
34
+ /** Z-axis layer index for sorting nodes (default: 0) */
35
+ zIndex?: number;
32
36
  [key: string]: unknown;
33
37
  }
34
38
 
@@ -118,6 +122,8 @@ export interface TopologyConfig {
118
122
  showNodeHandles?: boolean;
119
123
  /** Status dot at each node's top-right corner (shown by default) */
120
124
  showStatusDot?: boolean;
125
+ /** Fixed gap (px at 1x zoom) between the node box edge and its label, regardless of node size (default 18). */
126
+ labelGap?: number;
121
127
  watchDataChanges?: boolean;
122
128
  /** Effects master switch: false = all off / true = all on / unset = auto by scale */
123
129
  fx?: boolean;
@@ -133,6 +139,8 @@ export interface TopologyConfig {
133
139
  fxGlowMaxEdges?: number;
134
140
  /** Node count above which breathing rings auto-disable (default 300) */
135
141
  fxBreatheMaxNodes?: number;
142
+ /** Enable Z-axis layer sorting for nodes based on zIndex (default: false) */
143
+ enableZOrder?: boolean;
136
144
  }
137
145
 
138
146
  export interface TopologyData {
@@ -213,6 +221,15 @@ export interface TopologyExposed {
213
221
  ): Point | null;
214
222
  /** SVG user coordinates → viewport (clientX / clientY) coordinates. */
215
223
  svgToClient(x: number, y: number): Point | null;
224
+ /* Layer management methods (require enableZOrder config) */
225
+ /** Move node one layer up (toward front) */
226
+ moveLayerUp(nodeId: string): boolean;
227
+ /** Move node one layer down (toward back) */
228
+ moveLayerDown(nodeId: string): boolean;
229
+ /** Move node to the very front (highest zIndex) */
230
+ moveToFront(nodeId: string): boolean;
231
+ /** Move node to the very back (lowest zIndex) */
232
+ moveToBack(nodeId: string): boolean;
216
233
  }
217
234
 
218
235
  export declare const Topology: DefineComponent<TopologyProps>;