@statelyai/graph 0.13.0 → 1.0.0
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 +3 -1
- package/dist/{adjacency-list-Ca0VjKIf.mjs → adjacency-list-VsUaH9SJ.mjs} +2 -2
- package/dist/{algorithms-BNDQcHU3.mjs → algorithms-Ba7o7niK.mjs} +29 -25
- package/dist/{algorithms-BlM-qoJb.d.mts → algorithms-fTqmvhzP.d.mts} +1 -1
- package/dist/algorithms.d.mts +1 -1
- package/dist/algorithms.mjs +1 -1
- package/dist/{converter-Dspillnn.mjs → converter-udLITX36.mjs} +2 -2
- package/dist/{edge-list-gKe8-iRa.mjs → edge-list-DP4otyPU.mjs} +1 -1
- package/dist/format-support.mjs +31 -2
- package/dist/formats/adjacency-list/index.d.mts +1 -1
- package/dist/formats/adjacency-list/index.mjs +1 -1
- package/dist/formats/converter/index.d.mts +1 -60
- package/dist/formats/converter/index.mjs +1 -1
- package/dist/formats/cytoscape/index.d.mts +1 -1
- package/dist/formats/cytoscape/index.mjs +3 -3
- package/dist/formats/d2/index.d.mts +109 -0
- package/dist/formats/d2/index.mjs +1086 -0
- package/dist/formats/d3/index.d.mts +2 -2
- package/dist/formats/d3/index.mjs +3 -3
- package/dist/formats/dot/index.d.mts +1 -1
- package/dist/formats/dot/index.mjs +3 -3
- package/dist/formats/edge-list/index.d.mts +1 -1
- package/dist/formats/edge-list/index.mjs +1 -1
- package/dist/formats/elk/index.d.mts +1 -1
- package/dist/formats/elk/index.mjs +2 -2
- package/dist/formats/gexf/index.d.mts +1 -1
- package/dist/formats/gexf/index.mjs +9 -3
- package/dist/formats/gml/index.d.mts +1 -1
- package/dist/formats/gml/index.mjs +3 -3
- package/dist/formats/graphml/index.d.mts +1 -1
- package/dist/formats/graphml/index.mjs +11 -4
- package/dist/formats/jgf/index.d.mts +1 -1
- package/dist/formats/jgf/index.mjs +3 -3
- package/dist/formats/mermaid/index.d.mts +1 -1
- package/dist/formats/mermaid/index.mjs +9 -9
- package/dist/formats/tgf/index.d.mts +1 -1
- package/dist/formats/tgf/index.mjs +2 -2
- package/dist/formats/xyflow/index.d.mts +1 -1
- package/dist/formats/xyflow/index.mjs +2 -2
- package/dist/index-CHoriXZD.d.mts +638 -0
- package/dist/index-D9Kj6Fe3.d.mts +61 -0
- package/dist/index.d.mts +6 -631
- package/dist/index.mjs +8 -7
- package/dist/mode-D8OnHFBk.mjs +15 -0
- package/dist/queries-BlkA1HAN.d.mts +516 -0
- package/dist/queries.d.mts +1 -514
- package/dist/queries.mjs +17 -15
- package/dist/schemas.d.mts +21 -10
- package/dist/schemas.mjs +12 -2
- package/dist/{types-CnZ01raw.d.mts → types-3-FS9NV2.d.mts} +30 -7
- package/package.json +2 -1
- package/schemas/edge.schema.json +11 -0
- package/schemas/graph.schema.json +24 -3
- package/schemas/node.schema.json +6 -0
- /package/dist/{indexing-DUl3kTqm.mjs → indexing-DR8M1vBy.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as GraphFormatConverter, u as Graph } from "../../types-
|
|
1
|
+
import { h as GraphFormatConverter, u as Graph } from "../../types-3-FS9NV2.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/d3/index.d.ts
|
|
4
4
|
interface D3Node {
|
|
@@ -12,7 +12,7 @@ interface D3Link {
|
|
|
12
12
|
}
|
|
13
13
|
interface D3Graph {
|
|
14
14
|
id?: string;
|
|
15
|
-
|
|
15
|
+
mode?: Graph['mode'];
|
|
16
16
|
initialNodeId?: string | null;
|
|
17
17
|
data?: any;
|
|
18
18
|
direction?: Graph['direction'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/d3/index.ts
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
|
|
|
21
21
|
function toD3Graph(graph) {
|
|
22
22
|
return {
|
|
23
23
|
...graph.id && { id: graph.id },
|
|
24
|
-
|
|
24
|
+
mode: graph.mode,
|
|
25
25
|
initialNodeId: graph.initialNodeId,
|
|
26
26
|
...graph.data !== void 0 && { data: graph.data },
|
|
27
27
|
...graph.direction && { direction: graph.direction },
|
|
@@ -82,7 +82,7 @@ function fromD3Graph(d3) {
|
|
|
82
82
|
if (!Array.isArray(d3.links)) throw new Error("D3: \"links\" must be an array");
|
|
83
83
|
return {
|
|
84
84
|
id: d3.id ?? "",
|
|
85
|
-
|
|
85
|
+
mode: d3.mode ?? "directed",
|
|
86
86
|
initialNodeId: d3.initialNodeId ?? null,
|
|
87
87
|
data: d3.data,
|
|
88
88
|
...d3.direction && { direction: d3.direction },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
import parse from "dotparser";
|
|
3
3
|
|
|
4
4
|
//#region src/formats/dot/index.ts
|
|
@@ -50,7 +50,7 @@ const SHAPE_TO_DOT = {
|
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
52
|
function toDOT(graph) {
|
|
53
|
-
const isDirected = graph.
|
|
53
|
+
const isDirected = graph.mode !== "undirected";
|
|
54
54
|
const keyword = isDirected ? "digraph" : "graph";
|
|
55
55
|
const edgeOp = isDirected ? "->" : "--";
|
|
56
56
|
const lines = [];
|
|
@@ -270,7 +270,7 @@ function fromDOT(dot) {
|
|
|
270
270
|
walkChildren(root.children, null, {}, {});
|
|
271
271
|
return {
|
|
272
272
|
id: root.id ?? "",
|
|
273
|
-
|
|
273
|
+
mode: isDirected ? "directed" : "undirected",
|
|
274
274
|
initialNodeId: null,
|
|
275
275
|
nodes: [...nodeMap.values()],
|
|
276
276
|
edges,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as VisualGraphFormatConverter, M as VisualGraph } from "../../types-3-FS9NV2.mjs";
|
|
2
2
|
import { ElkEdge, ElkEdgeSection, ElkExtendedEdge, ElkGraphElement, ElkLabel, ElkNode, ElkNode as ElkNode$1, ElkPoint, ElkPort, ElkPrimitiveEdge, ElkShape, LayoutOptions } from "elkjs/lib/elk-api";
|
|
3
3
|
|
|
4
4
|
//#region src/formats/elk/index.d.ts
|
|
@@ -128,7 +128,7 @@ function toELK(graph) {
|
|
|
128
128
|
if (elkDir) root.layoutOptions = { "elk.direction": elkDir };
|
|
129
129
|
addMetadata(root, { graph: {
|
|
130
130
|
id: graph.id,
|
|
131
|
-
|
|
131
|
+
mode: graph.mode,
|
|
132
132
|
initialNodeId: graph.initialNodeId,
|
|
133
133
|
data: graph.data,
|
|
134
134
|
direction: graph.direction,
|
|
@@ -244,7 +244,7 @@ function fromELK(elkRoot) {
|
|
|
244
244
|
const direction = graphMetadata?.direction ?? (elkDir ? ELK_TO_DIRECTION[elkDir] : void 0) ?? "down";
|
|
245
245
|
return {
|
|
246
246
|
id: graphMetadata?.id ?? elkRoot.id,
|
|
247
|
-
|
|
247
|
+
mode: graphMetadata?.mode ?? "directed",
|
|
248
248
|
initialNodeId: graphMetadata && "initialNodeId" in graphMetadata ? graphMetadata.initialNodeId : null,
|
|
249
249
|
nodes,
|
|
250
250
|
edges: [...seenEdges.values()],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as getEdgeMode } from "../../mode-D8OnHFBk.mjs";
|
|
2
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
3
|
import { XMLBuilder, XMLParser } from "fast-xml-parser";
|
|
3
4
|
|
|
4
5
|
//#region src/formats/gexf/index.ts
|
|
@@ -147,12 +148,15 @@ function toGEXF(graph) {
|
|
|
147
148
|
if (n.width !== void 0 || n.height !== void 0) node["viz:size"] = { "@_value": n.width ?? n.height ?? 0 };
|
|
148
149
|
return node;
|
|
149
150
|
});
|
|
151
|
+
const graphDirected = graph.mode !== "undirected";
|
|
150
152
|
const edges = graph.edges.map((e) => {
|
|
151
153
|
const edge = {
|
|
152
154
|
"@_id": e.id,
|
|
153
155
|
"@_source": e.sourceId,
|
|
154
156
|
"@_target": e.targetId
|
|
155
157
|
};
|
|
158
|
+
const edgeDirected = getEdgeMode(graph, e) !== "undirected";
|
|
159
|
+
if (edgeDirected !== graphDirected) edge["@_type"] = edgeDirected ? "directed" : "undirected";
|
|
156
160
|
if (e.label) edge["@_label"] = e.label;
|
|
157
161
|
if (e.data !== void 0) edge.attvalues = { attvalue: [{
|
|
158
162
|
"@_for": "a_edgeData",
|
|
@@ -212,7 +216,7 @@ function toGEXF(graph) {
|
|
|
212
216
|
"@_xmlns:viz": "http://gexf.net/1.3/viz",
|
|
213
217
|
"@_version": "1.3",
|
|
214
218
|
graph: {
|
|
215
|
-
"@_defaultedgetype": graph.
|
|
219
|
+
"@_defaultedgetype": graph.mode === "undirected" ? "undirected" : "directed",
|
|
216
220
|
...graph.id && { "@_id": graph.id },
|
|
217
221
|
...graph.initialNodeId && { "@_initialNodeId": graph.initialNodeId },
|
|
218
222
|
...graph.direction && { "@_direction": graph.direction },
|
|
@@ -327,11 +331,13 @@ function fromGEXF(xml) {
|
|
|
327
331
|
const b = Number(color["@_b"] ?? 0);
|
|
328
332
|
edge.color = `#${hex(r)}${hex(g)}${hex(b)}`;
|
|
329
333
|
}
|
|
334
|
+
const typeAttr = e["@_type"];
|
|
335
|
+
if (typeAttr !== void 0) edge.mode = String(typeAttr) === "undirected" ? "undirected" : "directed";
|
|
330
336
|
return edge;
|
|
331
337
|
});
|
|
332
338
|
return {
|
|
333
339
|
id: String(graphEl["@_id"] ?? ""),
|
|
334
|
-
|
|
340
|
+
mode: graphType,
|
|
335
341
|
initialNodeId: graphEl["@_initialNodeId"] ?? null,
|
|
336
342
|
nodes,
|
|
337
343
|
edges,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/gml/index.ts
|
|
4
4
|
/**
|
|
@@ -26,7 +26,7 @@ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
|
|
|
26
26
|
function toGML(graph) {
|
|
27
27
|
const lines = [];
|
|
28
28
|
lines.push("graph [");
|
|
29
|
-
lines.push(` directed ${graph.
|
|
29
|
+
lines.push(` directed ${graph.mode === "undirected" ? 0 : 1}`);
|
|
30
30
|
if (graph.id) lines.push(` id ${gmlString(graph.id)}`);
|
|
31
31
|
if (graph.initialNodeId) lines.push(` initialNodeId ${gmlString(graph.initialNodeId)}`);
|
|
32
32
|
if (graph.data !== void 0) lines.push(` data ${gmlString(JSON.stringify(graph.data))}`);
|
|
@@ -166,7 +166,7 @@ function fromGML(gml) {
|
|
|
166
166
|
}
|
|
167
167
|
return {
|
|
168
168
|
id: graphId,
|
|
169
|
-
|
|
169
|
+
mode: directed ? "directed" : "undirected",
|
|
170
170
|
initialNodeId: graphBlock["initialNodeId"] ?? null,
|
|
171
171
|
nodes,
|
|
172
172
|
edges,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as getEdgeMode } from "../../mode-D8OnHFBk.mjs";
|
|
2
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
3
|
import { XMLBuilder, XMLParser } from "fast-xml-parser";
|
|
3
4
|
|
|
4
5
|
//#region src/formats/graphml/index.ts
|
|
@@ -175,7 +176,9 @@ function toGraphML(graph) {
|
|
|
175
176
|
...data.length > 0 && { data }
|
|
176
177
|
};
|
|
177
178
|
});
|
|
179
|
+
const graphDirected = graph.mode !== "undirected";
|
|
178
180
|
const edges = graph.edges.map((edge) => {
|
|
181
|
+
const edgeDirected = getEdgeMode(graph, edge) !== "undirected";
|
|
179
182
|
const data = [];
|
|
180
183
|
if (edge.label) data.push({
|
|
181
184
|
"@_key": "label",
|
|
@@ -225,6 +228,7 @@ function toGraphML(graph) {
|
|
|
225
228
|
"@_id": edge.id,
|
|
226
229
|
"@_source": edge.sourceId,
|
|
227
230
|
"@_target": edge.targetId,
|
|
231
|
+
...edgeDirected !== graphDirected && { "@_directed": edgeDirected ? "true" : "false" },
|
|
228
232
|
...data.length > 0 && { data }
|
|
229
233
|
};
|
|
230
234
|
});
|
|
@@ -255,7 +259,7 @@ function toGraphML(graph) {
|
|
|
255
259
|
key: keys,
|
|
256
260
|
graph: {
|
|
257
261
|
"@_id": graph.id,
|
|
258
|
-
"@_edgedefault": graph.
|
|
262
|
+
"@_edgedefault": graph.mode === "undirected" ? "undirected" : "directed",
|
|
259
263
|
...graphData.length > 0 && { data: graphData },
|
|
260
264
|
node: nodes,
|
|
261
265
|
edge: edges
|
|
@@ -265,7 +269,8 @@ function toGraphML(graph) {
|
|
|
265
269
|
return new XMLBuilder({
|
|
266
270
|
ignoreAttributes: false,
|
|
267
271
|
format: true,
|
|
268
|
-
suppressEmptyNode: true
|
|
272
|
+
suppressEmptyNode: true,
|
|
273
|
+
suppressBooleanAttributes: false
|
|
269
274
|
}).build(obj);
|
|
270
275
|
}
|
|
271
276
|
function fromGraphML(xml) {
|
|
@@ -331,11 +336,13 @@ function fromGraphML(xml) {
|
|
|
331
336
|
if (dataMap.style !== void 0) edge.style = tryParseJSON(dataMap.style);
|
|
332
337
|
if (dataMap.sourcePort !== void 0) edge.sourcePort = dataMap.sourcePort;
|
|
333
338
|
if (dataMap.targetPort !== void 0) edge.targetPort = dataMap.targetPort;
|
|
339
|
+
const directedAttr = edgeEl["@_directed"];
|
|
340
|
+
if (directedAttr !== void 0) edge.mode = String(directedAttr) === "false" ? "undirected" : "directed";
|
|
334
341
|
return edge;
|
|
335
342
|
});
|
|
336
343
|
const graph = {
|
|
337
344
|
id: String(graphEl["@_id"] ?? ""),
|
|
338
|
-
|
|
345
|
+
mode: graphType,
|
|
339
346
|
initialNodeId: graphDataMap.graphInitialNodeId ?? null,
|
|
340
347
|
nodes,
|
|
341
348
|
edges,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/jgf/index.ts
|
|
4
4
|
/**
|
|
@@ -26,7 +26,7 @@ function toJGF(graph) {
|
|
|
26
26
|
if (graph.style !== void 0) metadata.style = graph.style;
|
|
27
27
|
return { graph: {
|
|
28
28
|
id: graph.id || void 0,
|
|
29
|
-
directed: graph.
|
|
29
|
+
directed: graph.mode !== "undirected",
|
|
30
30
|
...Object.keys(metadata).length > 0 && { metadata },
|
|
31
31
|
nodes: graph.nodes.map((n) => {
|
|
32
32
|
const meta = {};
|
|
@@ -93,7 +93,7 @@ function fromJGF(jgf) {
|
|
|
93
93
|
if (!Array.isArray(g.edges)) throw new Error("JGF: \"graph.edges\" must be an array");
|
|
94
94
|
return {
|
|
95
95
|
id: g.id ?? "",
|
|
96
|
-
|
|
96
|
+
mode: g.directed === false ? "undirected" : "directed",
|
|
97
97
|
initialNodeId: g.metadata?.initialNodeId ?? null,
|
|
98
98
|
data: g.metadata?.data,
|
|
99
99
|
...g.metadata?.direction && { direction: g.metadata.direction },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/mermaid/shared.ts
|
|
4
4
|
const MERMAID_TO_DIRECTION = {
|
|
@@ -497,7 +497,7 @@ function fromMermaidSequence(input) {
|
|
|
497
497
|
}
|
|
498
498
|
return {
|
|
499
499
|
id: "",
|
|
500
|
-
|
|
500
|
+
mode: "directed",
|
|
501
501
|
initialNodeId: null,
|
|
502
502
|
nodes: Array.from(nodeMap.values()),
|
|
503
503
|
edges,
|
|
@@ -1292,7 +1292,7 @@ function fromMermaidFlowchart(input) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
return {
|
|
1294
1294
|
id: "",
|
|
1295
|
-
|
|
1295
|
+
mode: "directed",
|
|
1296
1296
|
initialNodeId: null,
|
|
1297
1297
|
nodes: Array.from(nodeMap.values()),
|
|
1298
1298
|
edges,
|
|
@@ -1675,7 +1675,7 @@ function fromMermaidState(input) {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
return {
|
|
1677
1677
|
id: "",
|
|
1678
|
-
|
|
1678
|
+
mode: "directed",
|
|
1679
1679
|
initialNodeId: null,
|
|
1680
1680
|
nodes: Array.from(nodeMap.values()),
|
|
1681
1681
|
edges,
|
|
@@ -2053,7 +2053,7 @@ function fromMermaidClass(input) {
|
|
|
2053
2053
|
}
|
|
2054
2054
|
return {
|
|
2055
2055
|
id: "",
|
|
2056
|
-
|
|
2056
|
+
mode: "directed",
|
|
2057
2057
|
initialNodeId: null,
|
|
2058
2058
|
nodes: Array.from(nodeMap.values()),
|
|
2059
2059
|
edges,
|
|
@@ -2251,7 +2251,7 @@ function fromMermaidER(input) {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
return {
|
|
2253
2253
|
id: "",
|
|
2254
|
-
|
|
2254
|
+
mode: "directed",
|
|
2255
2255
|
initialNodeId: null,
|
|
2256
2256
|
nodes: Array.from(nodeMap.values()),
|
|
2257
2257
|
edges,
|
|
@@ -2409,7 +2409,7 @@ function fromMermaidMindmap(input) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
return {
|
|
2411
2411
|
id: "",
|
|
2412
|
-
|
|
2412
|
+
mode: "directed",
|
|
2413
2413
|
initialNodeId: null,
|
|
2414
2414
|
nodes: Array.from(nodeMap.values()),
|
|
2415
2415
|
edges,
|
|
@@ -2608,7 +2608,7 @@ function fromMermaidBlock(input) {
|
|
|
2608
2608
|
}
|
|
2609
2609
|
return {
|
|
2610
2610
|
id: "",
|
|
2611
|
-
|
|
2611
|
+
mode: "directed",
|
|
2612
2612
|
initialNodeId: null,
|
|
2613
2613
|
nodes: Array.from(nodeMap.values()),
|
|
2614
2614
|
edges,
|
|
@@ -2720,7 +2720,7 @@ function fromMermaidIshikawa(input) {
|
|
|
2720
2720
|
}
|
|
2721
2721
|
return {
|
|
2722
2722
|
id: "",
|
|
2723
|
-
|
|
2723
|
+
mode: "directed",
|
|
2724
2724
|
initialNodeId: null,
|
|
2725
2725
|
nodes,
|
|
2726
2726
|
edges,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createFormatConverter } from "../../converter-
|
|
1
|
+
import { n as createFormatConverter } from "../../converter-udLITX36.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/formats/tgf/index.ts
|
|
4
4
|
/**
|
|
@@ -81,7 +81,7 @@ function fromTGF(tgf) {
|
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
83
83
|
id: "",
|
|
84
|
-
|
|
84
|
+
mode: "directed",
|
|
85
85
|
initialNodeId: null,
|
|
86
86
|
nodes,
|
|
87
87
|
edges,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as VisualGraphFormatConverter, M as VisualGraph } from "../../types-3-FS9NV2.mjs";
|
|
2
2
|
import { EdgeBase, NodeBase } from "@xyflow/system";
|
|
3
3
|
|
|
4
4
|
//#region src/formats/xyflow/index.d.ts
|
|
@@ -46,7 +46,7 @@ function toXYFlow(graph) {
|
|
|
46
46
|
return {
|
|
47
47
|
data: { [STATELYAI_METADATA_KEY]: { graph: {
|
|
48
48
|
id: graph.id,
|
|
49
|
-
|
|
49
|
+
mode: graph.mode,
|
|
50
50
|
initialNodeId: graph.initialNodeId,
|
|
51
51
|
data: graph.data,
|
|
52
52
|
direction: graph.direction,
|
|
@@ -119,7 +119,7 @@ function fromXYFlow(flow) {
|
|
|
119
119
|
const graphMetadata = readMetadata(flow.data)?.graph;
|
|
120
120
|
return {
|
|
121
121
|
id: graphMetadata?.id?.toString() ?? "",
|
|
122
|
-
|
|
122
|
+
mode: graphMetadata?.mode ?? "directed",
|
|
123
123
|
initialNodeId: graphMetadata && "initialNodeId" in graphMetadata ? graphMetadata.initialNodeId : null,
|
|
124
124
|
data: graphMetadata && "data" in graphMetadata ? graphMetadata.data : void 0,
|
|
125
125
|
direction: graphMetadata?.direction ?? "down",
|