vue3-network-graph 0.1.6 → 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/README.md +2 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.mjs +858 -659
- package/dist/index.umd.cjs +5 -5
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -406,7 +406,7 @@ radialGradient: {
|
|
|
406
406
|
| `fontWeight` | `Number \| String` | ❌ | `500` | 字重(100–900) |
|
|
407
407
|
| `borderColor` | `String` | ❌ | `"#94a3b8"` | 边框颜色 |
|
|
408
408
|
| `borderWidth` | `Number` | ❌ | `0` | 边框宽度(0 为无边框) |
|
|
409
|
-
| `borderStyle` | `"dashed" \| ""`
|
|
409
|
+
| `borderStyle` | `"full" \| "dashed" \| "none"` | ❌ | `"full"` | 边框样式:`"full"` 实线,`"dashed"` 虚线,`"none"` 无边框 |
|
|
410
410
|
| `background` | `String` | ❌ | `"#0f1729"` | 背景颜色 |
|
|
411
411
|
| `borderRadius` | `Number` | ❌ | `6` | 圆角半径(px) |
|
|
412
412
|
| `labelPosition` | `"top" \| "center" \| "bottom"` | ❌ | `"bottom"` | 标签位置 |
|
|
@@ -654,4 +654,4 @@ topoRef.value?.clientToSvg(event);
|
|
|
654
654
|
|
|
655
655
|
## 许可证
|
|
656
656
|
|
|
657
|
-
[MIT](
|
|
657
|
+
[MIT](../LICENSE) © 2026 vnodegit
|
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;
|
|
@@ -26,7 +31,8 @@ export interface TopologyNode {
|
|
|
26
31
|
fontWeight?: number | string;
|
|
27
32
|
borderColor?: string;
|
|
28
33
|
borderWidth?: number;
|
|
29
|
-
|
|
34
|
+
/** Border style: "full" solid (default), "dashed", or "none" to hide the border. */
|
|
35
|
+
borderStyle?: "full" | "dashed" | "none" | string;
|
|
30
36
|
background?: string;
|
|
31
37
|
/** Node box corner radius in px (default 6); applies to the node background, border and selection box. */
|
|
32
38
|
borderRadius?: number;
|
|
@@ -124,6 +130,36 @@ export interface TopologyConfig {
|
|
|
124
130
|
showStatusDot?: boolean;
|
|
125
131
|
/** Fixed gap (px at 1x zoom) between the node box edge and its label, regardless of node size (default 18). */
|
|
126
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;
|
|
127
163
|
watchDataChanges?: boolean;
|
|
128
164
|
/** Effects master switch: false = all off / true = all on / unset = auto by scale */
|
|
129
165
|
fx?: boolean;
|