vue3-network-graph 0.2.4 → 0.2.6

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
@@ -6,14 +6,35 @@ export interface Point {
6
6
  y: number;
7
7
  }
8
8
 
9
- export type TopologyLineMode = "straight" | "polyline" | "curve";
9
+ export type TopologyLineMode = "straight" | "polyline" | "curve" | "rail";
10
10
  export type TopologyViewMode = "2d" | "3d";
11
11
 
12
+ /** Alert halo style: ring / fill / ripple / blink / orbit (demo elliptical halo) */
13
+ export type TopologyAlertStyle = "ring" | "fill" | "ripple" | "blink" | "orbit";
14
+
12
15
  export interface TopologyNode {
13
16
  id: string;
14
17
  label?: string | null;
15
18
  /** "core" / "text" / "image" / custom icon types */
16
19
  nodeType?: string;
20
+ /** Per-node alert halo style, overrides config.alertStyle. */
21
+ alertStyle?: TopologyAlertStyle;
22
+ /** Active alert count shown as a rounded badge at the node's top-right corner. */
23
+ alertCount?: number;
24
+ /** Per-node alert-count badge outline (and digit) colour, overrides config.alertBadgeStroke. */
25
+ alertBadgeStroke?: string;
26
+ /** Per-node orbit halo opacity multiplier (0-1), overrides config.orbitOpacity. */
27
+ orbitOpacity?: number;
28
+ /** Colour to tint the node's SVG icon via feFlood+feComposite (demo glyph ink). White-stroke icons pick up this colour. */
29
+ glyphTint?: string;
30
+ /** Orbit halo palette for the normal state: { tone, deep, light } (demo tier variables). */
31
+ orbitPalette?: { tone: string; deep: string; light: string };
32
+ /** Orbit halo palette when the node is in alarm (severity colours, light = white-mixed for the glint stroke). Presence marks the node as alarm even if `state` is outside `alertStates`. */
33
+ orbitAlarmPalette?: { tone: string; deep: string; light: string };
34
+ /** Orbit halo animation phase offset in seconds (demo staggers by render index). */
35
+ orbitPhase?: number;
36
+ /** Tier key used to pick a built-in orbit palette when `orbitPalette` is absent. */
37
+ orbitTier?: "core" | "aggregate" | "access";
17
38
  /**
18
39
  * Image source for image nodes (`nodeType: "image"`, or any node without a
19
40
  * nodeType). Image nodes are scaled uniformly — see `config.imageFit`.
@@ -75,6 +96,12 @@ export interface TopologyEdge {
75
96
  speed?: number;
76
97
  /** Per-edge animation switch: `false` stops this edge's flow + particle layers (works even when the global fx config is on); `true` / unset follow the global config */
77
98
  animated?: boolean;
99
+ /** Per-edge animation mode override. Takes priority over `animated`; "stream" reproduces the demo's single-band light. */
100
+ animatedMode?: "flow" | "particle" | "all" | "stream" | "none";
101
+ /** Stroke width of the demo-style single-band light stream (default 2.65) */
102
+ streamWidth?: number;
103
+ /** Dash pattern of the demo-style single-band light stream (default "25 151") */
104
+ streamDash?: string;
78
105
  /** Ants-marching dashed flow for this edge (overrides config.edgeDashFlow when set) */
79
106
  dashFlow?: boolean;
80
107
  /** Stroke width of this edge's dashed flow line (default 2) */
@@ -123,6 +150,16 @@ export interface TopologyRadialGradientConfig {
123
150
  }
124
151
 
125
152
  export interface TopologyConfig {
153
+ /** Alert halo animation style (default "ring"); "orbit" reproduces the demo's elliptical glow. */
154
+ alertStyle?: TopologyAlertStyle;
155
+ /** Scale of the orbit-style halo (default 1). Lower it in dense graphs to avoid overlap. */
156
+ orbitScale?: number;
157
+ /** Opacity multiplier (0-1) for all orbit halo layers (default 1). Per-node `orbitOpacity` wins. */
158
+ orbitOpacity?: number;
159
+ /** Whether to render the alert-count badge when a node has `alertCount` (default true). */
160
+ showAlertCount?: boolean;
161
+ /** Alert-count badge outline (and digit) colour (default "#0a0e1a"). Per-node `alertBadgeStroke` wins. */
162
+ alertBadgeStroke?: string;
126
163
  selectedBorderColor?: string;
127
164
  selectedLineColor?: string;
128
165
  nodeDraggable?: boolean;
@@ -240,13 +277,17 @@ export interface TopologyConfig {
240
277
  watchDataChanges?: boolean;
241
278
  /** Effects master switch: false = all off / true = all on / unset = auto by scale */
242
279
  fx?: boolean;
243
- /** Per-feature override — connection-line animation (flow + particles) */
244
- motionFx?: boolean;
280
+ /** Per-feature override — connection-line animation. "stream" is the 1:1 demo-style single-band light mode. */
281
+ motionFx?: boolean | "none" | "flow" | "particle" | "all" | "stream";
282
+ /** Stroke width of the demo-style single-band light stream (default 2.65) */
283
+ streamWidth?: number;
284
+ /** Dash pattern of the demo-style single-band light stream (default "25 151") */
285
+ streamDash?: string;
245
286
  /** Per-feature override — edge glow filter */
246
287
  glowFx?: boolean;
247
288
  /** Per-feature override — node breathing ring */
248
289
  breatheFx?: boolean;
249
- /** Edge count above which flow + particle animation auto-disables (default 200) */
290
+ /** Edge count above which flow / particle / stream animation auto-disables (default 200) */
250
291
  fxMotionMaxEdges?: number;
251
292
  /** Edge count above which edge glow auto-disables (default 500) */
252
293
  fxGlowMaxEdges?: number;