vue3-network-graph 0.1.7 → 0.1.8

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
@@ -12,8 +12,13 @@ export type TopologyViewMode = "2d" | "3d";
12
12
  export interface TopologyNode {
13
13
  id: string;
14
14
  label?: string | null;
15
- /** "core" / "text" / custom icon types */
15
+ /** "core" / "text" / "image" / custom icon types */
16
16
  nodeType?: string;
17
+ /**
18
+ * Image source for image nodes (`nodeType: "image"`, or any node without a
19
+ * nodeType). Image nodes are scaled uniformly — see `config.imageFit`.
20
+ */
21
+ image?: string;
17
22
  /** "none" | "normal" | "warning" | "error" | ... */
18
23
  state?: string;
19
24
  x: number;
@@ -125,6 +130,36 @@ export interface TopologyConfig {
125
130
  showStatusDot?: boolean;
126
131
  /** Fixed gap (px at 1x zoom) between the node box edge and its label, regardless of node size (default 18). */
127
132
  labelGap?: number;
133
+ /**
134
+ * How image nodes fill their node box — "contain" (default) keeps the
135
+ * whole image visible inside the box (letterboxed, never cropped),
136
+ * "cover" fills the box and crops the overflow.
137
+ * Both preserve the image's aspect ratio, so a non-square node never
138
+ * deforms the picture.
139
+ */
140
+ imageFit?: "cover" | "contain";
141
+ /**
142
+ * Node / edge paint order.
143
+ * - "split" (default): every node is painted in two passes — background
144
+ * plate + border below the edges, icon / image / label above them — so an
145
+ * edge crossing a node stays visible instead of being cut by the node
146
+ * body (also fixes a node overlapping another node hiding its edges).
147
+ * - "below": classic order, all edges under all nodes.
148
+ */
149
+ edgeLayer?: "split" | "below";
150
+ /**
151
+ * Re-paint selected edges above the node layer so the highlighted path is
152
+ * never hidden by a node plate or icon. Default true.
153
+ */
154
+ highlightEdgeOnTop?: boolean;
155
+ /** Casing color drawn under a promoted (selected) edge — default "#0a0e1a". */
156
+ edgeCasingColor?: string;
157
+ /**
158
+ * Delete the current selection when Delete / Backspace is pressed
159
+ * (only while editable and something is selected; form fields are never
160
+ * affected). Default true; set false to disable the keyboard shortcut.
161
+ */
162
+ enableDeleteKey?: boolean;
128
163
  watchDataChanges?: boolean;
129
164
  /** Effects master switch: false = all off / true = all on / unset = auto by scale */
130
165
  fx?: boolean;