@statelyai/graph 0.9.0 → 0.11.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.
Files changed (48) hide show
  1. package/dist/{algorithms-3xvCxHzo.mjs → algorithms-BHHg7lGq.mjs} +1448 -1988
  2. package/dist/algorithms-BlM-qoJb.d.mts +178 -0
  3. package/dist/algorithms.d.mts +1 -1
  4. package/dist/algorithms.mjs +1 -1
  5. package/dist/{converter-B5CUD0r9.mjs → converter-Dspillnn.mjs} +2 -2
  6. package/dist/format-support.d.mts +22 -0
  7. package/dist/format-support.mjs +294 -0
  8. package/dist/formats/adjacency-list/index.d.mts +1 -1
  9. package/dist/formats/adjacency-list/index.mjs +1 -1
  10. package/dist/formats/converter/index.d.mts +1 -1
  11. package/dist/formats/converter/index.mjs +1 -1
  12. package/dist/formats/cytoscape/index.d.mts +1 -1
  13. package/dist/formats/cytoscape/index.mjs +1 -1
  14. package/dist/formats/d3/index.d.mts +1 -1
  15. package/dist/formats/d3/index.mjs +1 -1
  16. package/dist/formats/dot/index.d.mts +1 -1
  17. package/dist/formats/dot/index.mjs +1 -1
  18. package/dist/formats/edge-list/index.d.mts +1 -1
  19. package/dist/formats/edge-list/index.mjs +1 -1
  20. package/dist/formats/elk/index.d.mts +1 -1
  21. package/dist/formats/gexf/index.d.mts +1 -1
  22. package/dist/formats/gexf/index.mjs +1 -1
  23. package/dist/formats/gml/index.d.mts +1 -1
  24. package/dist/formats/gml/index.mjs +1 -1
  25. package/dist/formats/graphml/index.d.mts +1 -1
  26. package/dist/formats/graphml/index.mjs +1 -1
  27. package/dist/formats/jgf/index.d.mts +1 -1
  28. package/dist/formats/jgf/index.mjs +1 -1
  29. package/dist/formats/mermaid/index.d.mts +1 -1
  30. package/dist/formats/mermaid/index.mjs +1 -1
  31. package/dist/formats/tgf/index.d.mts +1 -1
  32. package/dist/formats/tgf/index.mjs +1 -1
  33. package/dist/formats/xyflow/index.d.mts +1 -1
  34. package/dist/index.d.mts +7 -7
  35. package/dist/index.mjs +5 -5
  36. package/dist/queries.d.mts +14 -14
  37. package/dist/queries.mjs +17 -10
  38. package/dist/schemas.d.mts +50 -1
  39. package/dist/schemas.mjs +21 -2
  40. package/dist/{types-BzckPChi.d.mts → types-CnZ01raw.d.mts} +31 -16
  41. package/package.json +5 -2
  42. package/schemas/edge.schema.json +16 -1
  43. package/schemas/graph.schema.json +72 -3
  44. package/schemas/node.schema.json +56 -1
  45. package/dist/algorithms-g2uWmPrb.d.mts +0 -786
  46. /package/dist/{adjacency-list-fldj-QAL.mjs → adjacency-list-Ca0VjKIf.mjs} +0 -0
  47. /package/dist/{edge-list-Br05wXMg.mjs → edge-list-gKe8-iRa.mjs} +0 -0
  48. /package/dist/{indexing-DyfgLuzw.mjs → indexing-CJc-ul8e.mjs} +0 -0
@@ -0,0 +1,178 @@
1
+ import { D as SinglePathOptions, g as GraphNode, k as TraversalOptions, n as AllPairsShortestPathsOptions, p as GraphEdge, t as AStarOptions, u as Graph, v as GraphPath, w as PathOptions, x as MSTOptions } from "./types-CnZ01raw.mjs";
2
+
3
+ //#region src/algorithms/traversal.d.ts
4
+ declare function bfs<N>(graph: Graph<N>, startId: string): Generator<GraphNode<N>>;
5
+ declare function dfs<N>(graph: Graph<N>, startId: string): Generator<GraphNode<N>>;
6
+ declare function isAcyclic(graph: Graph): boolean;
7
+ declare function getConnectedComponents<N>(graph: Graph<N>): GraphNode<N>[][];
8
+ declare function getTopologicalSort<N>(graph: Graph<N>): GraphNode<N>[] | null;
9
+ declare function hasPath(graph: Graph, sourceId: string, targetId: string): boolean;
10
+ declare function isConnected(graph: Graph): boolean;
11
+ declare function isTree(graph: Graph): boolean;
12
+ //#endregion
13
+ //#region src/algorithms/paths.d.ts
14
+ declare function genShortestPaths<N, E>(graph: Graph<N, E>, opts?: PathOptions<E>): Generator<GraphPath<N, E>>;
15
+ declare function getShortestPaths<N, E>(graph: Graph<N, E>, opts?: PathOptions<E>): GraphPath<N, E>[];
16
+ declare function getShortestPath<N, E>(graph: Graph<N, E>, opts: SinglePathOptions<E>): GraphPath<N, E> | undefined;
17
+ declare function getSimplePaths<N, E>(graph: Graph<N, E>, opts?: PathOptions<E>): GraphPath<N, E>[];
18
+ declare function genSimplePaths<N, E>(graph: Graph<N, E>, opts?: PathOptions<E>): Generator<GraphPath<N, E>>;
19
+ declare function getSimplePath<N, E>(graph: Graph<N, E>, opts: SinglePathOptions<E>): GraphPath<N, E> | undefined;
20
+ declare function getStronglyConnectedComponents<N>(graph: Graph<N>): GraphNode<N>[][];
21
+ declare function getCycles<N, E>(graph: Graph<N, E>): GraphPath<N, E>[];
22
+ declare function genCycles<N, E>(graph: Graph<N, E>): Generator<GraphPath<N, E>>;
23
+ declare function getAllPairsShortestPaths<N, E>(graph: Graph<N, E>, opts?: AllPairsShortestPathsOptions<E>): GraphPath<N, E>[];
24
+ declare function getAStarPath<N, E>(graph: Graph<N, E>, opts: AStarOptions<E>): GraphPath<N, E> | undefined;
25
+ declare function joinPaths<N, E>(headPath: GraphPath<N, E>, tailPath: GraphPath<N, E>): GraphPath<N, E>;
26
+ //#endregion
27
+ //#region src/algorithms/ordering.d.ts
28
+ declare function getPreorder<N>(graph: Graph<N>, opts?: TraversalOptions): GraphNode<N>[];
29
+ declare function getPostorder<N>(graph: Graph<N>, opts?: TraversalOptions): GraphNode<N>[];
30
+ declare function getPreorders<N>(graph: Graph<N>, opts?: TraversalOptions): GraphNode<N>[][];
31
+ declare function getPostorders<N>(graph: Graph<N>, opts?: TraversalOptions): GraphNode<N>[][];
32
+ declare function genPreorders<N>(graph: Graph<N>, opts?: TraversalOptions): Generator<GraphNode<N>[]>;
33
+ declare function genPostorders<N>(graph: Graph<N>, opts?: TraversalOptions): Generator<GraphNode<N>[]>;
34
+ //#endregion
35
+ //#region src/algorithms/spanning-tree.d.ts
36
+ declare function getMinimumSpanningTree<N, E>(graph: Graph<N, E>, opts?: MSTOptions<E>): Graph<N, E>;
37
+ //#endregion
38
+ //#region src/algorithms/centrality.d.ts
39
+ interface IterativeCentralityOptions {
40
+ alpha?: number;
41
+ maxIterations?: number;
42
+ tolerance?: number;
43
+ }
44
+ interface HITSResult {
45
+ hubs: Record<string, number>;
46
+ authorities: Record<string, number>;
47
+ }
48
+ /**
49
+ * Returns degree centrality scores for all nodes.
50
+ *
51
+ * Degree centrality is the node degree normalized by `n - 1`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const scores = getDegreeCentrality(graph);
56
+ * console.log(scores.a); // 0.5
57
+ * ```
58
+ */
59
+ declare function getDegreeCentrality(graph: Graph): Record<string, number>;
60
+ /**
61
+ * Returns in-degree centrality scores for all nodes.
62
+ *
63
+ * In-degree centrality is the incoming degree normalized by `n - 1`.
64
+ */
65
+ declare function getInDegreeCentrality(graph: Graph): Record<string, number>;
66
+ /**
67
+ * Returns out-degree centrality scores for all nodes.
68
+ *
69
+ * Out-degree centrality is the outgoing degree normalized by `n - 1`.
70
+ */
71
+ declare function getOutDegreeCentrality(graph: Graph): Record<string, number>;
72
+ /**
73
+ * Returns closeness centrality scores for all nodes.
74
+ *
75
+ * Distances are computed over unweighted shortest paths using the graph's
76
+ * existing directed or undirected edge semantics.
77
+ */
78
+ declare function getClosenessCentrality(graph: Graph): Record<string, number>;
79
+ /**
80
+ * Returns betweenness centrality scores for all nodes.
81
+ *
82
+ * Uses Brandes' algorithm over unweighted shortest paths and returns
83
+ * normalized scores.
84
+ */
85
+ declare function getBetweennessCentrality(graph: Graph): Record<string, number>;
86
+ /**
87
+ * Returns PageRank scores for all nodes.
88
+ *
89
+ * Uses power iteration with damping factor `alpha`.
90
+ */
91
+ declare function getPageRank(graph: Graph, options?: IterativeCentralityOptions): Record<string, number>;
92
+ /**
93
+ * Returns HITS hub and authority scores for all nodes.
94
+ *
95
+ * Uses power iteration and L2 normalization per iteration.
96
+ */
97
+ declare function getHITS(graph: Graph, options?: IterativeCentralityOptions): HITSResult;
98
+ /**
99
+ * Returns eigenvector centrality scores for all nodes.
100
+ *
101
+ * Uses power iteration over incoming neighbors for directed graphs and
102
+ * undirected adjacency for undirected graphs.
103
+ */
104
+ declare function getEigenvectorCentrality(graph: Graph, options?: IterativeCentralityOptions): Record<string, number>;
105
+ //#endregion
106
+ //#region src/algorithms/community.d.ts
107
+ interface GirvanNewmanOptions {
108
+ level?: number;
109
+ maxLevels?: number;
110
+ }
111
+ interface LabelPropagationOptions {
112
+ maxIterations?: number;
113
+ }
114
+ type Community<N = any> = GraphNode<N>[];
115
+ /**
116
+ * Returns label-propagation communities for the graph.
117
+ *
118
+ * The implementation is deterministic: ties are broken by lexicographic label
119
+ * order so test results remain stable.
120
+ */
121
+ declare function getLabelPropagationCommunities<N>(graph: Graph<N>, options?: LabelPropagationOptions): Community<N>[];
122
+ /**
123
+ * Lazily yields Girvan-Newman community splits as edge betweenness removes
124
+ * bridge-like edges from the graph.
125
+ */
126
+ declare function genGirvanNewmanCommunities<N>(graph: Graph<N>, options?: GirvanNewmanOptions): Generator<Community<N>[]>;
127
+ /**
128
+ * Returns the requested Girvan-Newman split level eagerly.
129
+ *
130
+ * `level: 1` returns the first split yielded by `genGirvanNewmanCommunities`.
131
+ */
132
+ declare function getGirvanNewmanCommunities<N>(graph: Graph<N>, options?: GirvanNewmanOptions): Community<N>[];
133
+ /**
134
+ * Returns the modularity score for a partition of communities.
135
+ *
136
+ * Community algorithms in this module treat the graph as undirected.
137
+ */
138
+ declare function getModularity<N>(graph: Graph<N>, communities: Community<N>[]): number;
139
+ /**
140
+ * Returns communities found by greedily merging partitions that improve
141
+ * modularity the most at each step.
142
+ */
143
+ declare function getGreedyModularityCommunities<N>(graph: Graph<N>): Community<N>[];
144
+ //#endregion
145
+ //#region src/algorithms/connectivity.d.ts
146
+ /**
147
+ * Returns bridge edges whose removal disconnects the graph.
148
+ *
149
+ * Connectivity algorithms in this module treat the graph as undirected.
150
+ */
151
+ declare function getBridges<N, E>(graph: Graph<N, E>): GraphEdge<E>[];
152
+ /**
153
+ * Returns articulation points (cut vertices) for the graph.
154
+ *
155
+ * Connectivity algorithms in this module treat the graph as undirected.
156
+ */
157
+ declare function getArticulationPoints<N, E>(graph: Graph<N, E>): GraphNode<N>[];
158
+ /**
159
+ * Returns biconnected components as arrays of nodes.
160
+ *
161
+ * Articulation points may appear in multiple returned components.
162
+ */
163
+ declare function getBiconnectedComponents<N, E>(graph: Graph<N, E>): GraphNode<N>[][];
164
+ //#endregion
165
+ //#region src/algorithms/isomorphism.d.ts
166
+ interface IsomorphismOptions<N = any, E = any> {
167
+ nodeMatch?: (a: GraphNode<N>, b: GraphNode<N>) => boolean;
168
+ edgeMatch?: (a: GraphEdge<E>, b: GraphEdge<E>) => boolean;
169
+ }
170
+ /**
171
+ * Returns whether two graphs are structurally isomorphic.
172
+ *
173
+ * Optional `nodeMatch` and `edgeMatch` predicates can refine the match using
174
+ * node and edge payloads.
175
+ */
176
+ declare function isIsomorphic<N, E>(graphA: Graph<N, E>, graphB: Graph<N, E>, options?: IsomorphismOptions<N, E>): boolean;
177
+ //#endregion
178
+ export { genCycles as A, getStronglyConnectedComponents as B, getMinimumSpanningTree as C, getPostorders as D, getPostorder as E, getCycles as F, getTopologicalSort as G, bfs as H, getShortestPath as I, isConnected as J, hasPath as K, getShortestPaths as L, genSimplePaths as M, getAStarPath as N, getPreorder as O, getAllPairsShortestPaths as P, getSimplePath as R, getPageRank as S, genPreorders as T, dfs as U, joinPaths as V, getConnectedComponents as W, isTree as Y, getDegreeCentrality as _, getBridges as a, getInDegreeCentrality as b, genGirvanNewmanCommunities as c, getLabelPropagationCommunities as d, getModularity as f, getClosenessCentrality as g, getBetweennessCentrality as h, getBiconnectedComponents as i, genShortestPaths as j, getPreorders as k, getGirvanNewmanCommunities as l, IterativeCentralityOptions as m, isIsomorphic as n, GirvanNewmanOptions as o, HITSResult as p, isAcyclic as q, getArticulationPoints as r, LabelPropagationOptions as s, IsomorphismOptions as t, getGreedyModularityCommunities as u, getEigenvectorCentrality as v, genPostorders as w, getOutDegreeCentrality as x, getHITS as y, getSimplePaths as z };
@@ -1,2 +1,2 @@
1
- import { A as getArticulationPoints, B as HITSResult, C as hasPath, D as joinPaths, E as isTree, F as genGirvanNewmanCommunities, G as getEigenvectorCentrality, H as getBetweennessCentrality, I as getGirvanNewmanCommunities, J as getOutDegreeCentrality, K as getHITS, L as getGreedyModularityCommunities, M as getBridges, N as GirvanNewmanOptions, O as IsomorphismOptions, P as LabelPropagationOptions, R as getLabelPropagationCommunities, S as getTopologicalSort, T as isConnected, U as getClosenessCentrality, V as IterativeCentralityOptions, W as getDegreeCentrality, Y as getPageRank, _ as getShortestPath, a as genPreorders, b as getSimplePaths, c as getAStarPath, d as getCycles, f as getMinimumSpanningTree, g as getPreorders, h as getPreorder, i as genPostorders, j as getBiconnectedComponents, k as isIsomorphic, l as getAllPairsShortestPaths, m as getPostorders, n as dfs, o as genShortestPaths, p as getPostorder, q as getInDegreeCentrality, r as genCycles, s as genSimplePaths, t as bfs, u as getConnectedComponents, v as getShortestPaths, w as isAcyclic, x as getStronglyConnectedComponents, y as getSimplePath, z as getModularity } from "./algorithms-g2uWmPrb.mjs";
1
+ import { A as genCycles, B as getStronglyConnectedComponents, C as getMinimumSpanningTree, D as getPostorders, E as getPostorder, F as getCycles, G as getTopologicalSort, H as bfs, I as getShortestPath, J as isConnected, K as hasPath, L as getShortestPaths, M as genSimplePaths, N as getAStarPath, O as getPreorder, P as getAllPairsShortestPaths, R as getSimplePath, S as getPageRank, T as genPreorders, U as dfs, V as joinPaths, W as getConnectedComponents, Y as isTree, _ as getDegreeCentrality, a as getBridges, b as getInDegreeCentrality, c as genGirvanNewmanCommunities, d as getLabelPropagationCommunities, f as getModularity, g as getClosenessCentrality, h as getBetweennessCentrality, i as getBiconnectedComponents, j as genShortestPaths, k as getPreorders, l as getGirvanNewmanCommunities, m as IterativeCentralityOptions, n as isIsomorphic, o as GirvanNewmanOptions, p as HITSResult, q as isAcyclic, r as getArticulationPoints, s as LabelPropagationOptions, t as IsomorphismOptions, u as getGreedyModularityCommunities, v as getEigenvectorCentrality, w as genPostorders, x as getOutDegreeCentrality, y as getHITS, z as getSimplePaths } from "./algorithms-BlM-qoJb.mjs";
2
2
  export { GirvanNewmanOptions, HITSResult, IsomorphismOptions, IterativeCentralityOptions, LabelPropagationOptions, bfs, dfs, genCycles, genGirvanNewmanCommunities, genPostorders, genPreorders, genShortestPaths, genSimplePaths, getAStarPath, getAllPairsShortestPaths, getArticulationPoints, getBetweennessCentrality, getBiconnectedComponents, getBridges, getClosenessCentrality, getConnectedComponents, getCycles, getDegreeCentrality, getEigenvectorCentrality, getGirvanNewmanCommunities, getGreedyModularityCommunities, getHITS, getInDegreeCentrality, getLabelPropagationCommunities, getMinimumSpanningTree, getModularity, getOutDegreeCentrality, getPageRank, getPostorder, getPostorders, getPreorder, getPreorders, getShortestPath, getShortestPaths, getSimplePath, getSimplePaths, getStronglyConnectedComponents, getTopologicalSort, hasPath, isAcyclic, isConnected, isIsomorphic, isTree, joinPaths };
@@ -1,3 +1,3 @@
1
- import { A as getBiconnectedComponents, B as getEigenvectorCentrality, C as hasPath, D as joinPaths, E as isTree, F as getLabelPropagationCommunities, H as getInDegreeCentrality, I as getModularity, L as getBetweennessCentrality, M as genGirvanNewmanCommunities, N as getGirvanNewmanCommunities, O as isIsomorphic, P as getGreedyModularityCommunities, R as getClosenessCentrality, S as getTopologicalSort, T as isConnected, U as getOutDegreeCentrality, V as getHITS, W as getPageRank, _ as getShortestPath, a as genPreorders, b as getSimplePaths, c as getAStarPath, d as getCycles, f as getMinimumSpanningTree, g as getPreorders, h as getPreorder, i as genPostorders, j as getBridges, k as getArticulationPoints, l as getAllPairsShortestPaths, m as getPostorders, n as dfs, o as genShortestPaths, p as getPostorder, r as genCycles, s as genSimplePaths, t as bfs, u as getConnectedComponents, v as getShortestPaths, w as isAcyclic, x as getStronglyConnectedComponents, y as getSimplePath, z as getDegreeCentrality } from "./algorithms-3xvCxHzo.mjs";
1
+ import { A as isAcyclic, B as getShortestPaths, C as getPreorder, D as getConnectedComponents, E as dfs, F as genSimplePaths, H as getSimplePaths, I as getAStarPath, L as getAllPairsShortestPaths, M as isTree, N as genCycles, O as getTopologicalSort, P as genShortestPaths, R as getCycles, S as getPostorders, T as bfs, U as getStronglyConnectedComponents, V as getSimplePath, W as joinPaths, _ as getPageRank, a as genGirvanNewmanCommunities, b as genPreorders, c as getLabelPropagationCommunities, d as getClosenessCentrality, f as getDegreeCentrality, g as getOutDegreeCentrality, h as getInDegreeCentrality, i as getBridges, j as isConnected, k as hasPath, l as getModularity, m as getHITS, n as getArticulationPoints, o as getGirvanNewmanCommunities, p as getEigenvectorCentrality, r as getBiconnectedComponents, s as getGreedyModularityCommunities, t as isIsomorphic, u as getBetweennessCentrality, v as getMinimumSpanningTree, w as getPreorders, x as getPostorder, y as genPostorders, z as getShortestPath } from "./algorithms-BHHg7lGq.mjs";
2
2
 
3
3
  export { bfs, dfs, genCycles, genGirvanNewmanCommunities, genPostorders, genPreorders, genShortestPaths, genSimplePaths, getAStarPath, getAllPairsShortestPaths, getArticulationPoints, getBetweennessCentrality, getBiconnectedComponents, getBridges, getClosenessCentrality, getConnectedComponents, getCycles, getDegreeCentrality, getEigenvectorCentrality, getGirvanNewmanCommunities, getGreedyModularityCommunities, getHITS, getInDegreeCentrality, getLabelPropagationCommunities, getMinimumSpanningTree, getModularity, getOutDegreeCentrality, getPageRank, getPostorder, getPostorders, getPreorder, getPreorders, getShortestPath, getShortestPaths, getSimplePath, getSimplePaths, getStronglyConnectedComponents, getTopologicalSort, hasPath, isAcyclic, isConnected, isIsomorphic, isTree, joinPaths };
@@ -1,5 +1,5 @@
1
- import { n as toAdjacencyList, t as fromAdjacencyList } from "./adjacency-list-fldj-QAL.mjs";
2
- import { n as toEdgeList, t as fromEdgeList } from "./edge-list-Br05wXMg.mjs";
1
+ import { n as toAdjacencyList, t as fromAdjacencyList } from "./adjacency-list-Ca0VjKIf.mjs";
2
+ import { n as toEdgeList, t as fromEdgeList } from "./edge-list-gKe8-iRa.mjs";
3
3
 
4
4
  //#region src/formats/converter/index.ts
5
5
  /**
@@ -0,0 +1,22 @@
1
+ //#region src/formats/support.d.ts
2
+ type FormatSupportLevel = 'full' | 'partial' | 'none';
3
+ interface FormatSupportFeatures {
4
+ directed: FormatSupportLevel;
5
+ undirected: FormatSupportLevel;
6
+ hierarchy: FormatSupportLevel;
7
+ ports: FormatSupportLevel;
8
+ visual: FormatSupportLevel;
9
+ style: FormatSupportLevel;
10
+ weight: FormatSupportLevel;
11
+ roundTrip: FormatSupportLevel;
12
+ }
13
+ interface FormatSupportEntry {
14
+ id: string;
15
+ importPath: string;
16
+ features: FormatSupportFeatures;
17
+ notes: string[];
18
+ }
19
+ declare const FORMAT_SUPPORT_MATRIX: FormatSupportEntry[];
20
+ declare function getFormatSupportEntry(id: string): FormatSupportEntry | undefined;
21
+ //#endregion
22
+ export { FORMAT_SUPPORT_MATRIX, type FormatSupportEntry, type FormatSupportFeatures, type FormatSupportLevel, getFormatSupportEntry };
@@ -0,0 +1,294 @@
1
+ //#region src/formats/support.ts
2
+ const FORMAT_SUPPORT_MATRIX = [
3
+ {
4
+ id: "adjacency-list",
5
+ importPath: "@statelyai/graph/adjacency-list",
6
+ features: {
7
+ directed: "full",
8
+ undirected: "partial",
9
+ hierarchy: "none",
10
+ ports: "none",
11
+ visual: "none",
12
+ style: "none",
13
+ weight: "none",
14
+ roundTrip: "partial"
15
+ },
16
+ notes: ["Adjacency lists preserve connectivity, but not edge metadata."]
17
+ },
18
+ {
19
+ id: "cytoscape",
20
+ importPath: "@statelyai/graph/cytoscape",
21
+ features: {
22
+ directed: "full",
23
+ undirected: "full",
24
+ hierarchy: "partial",
25
+ ports: "none",
26
+ visual: "partial",
27
+ style: "partial",
28
+ weight: "full",
29
+ roundTrip: "partial"
30
+ },
31
+ notes: ["Uses Cytoscape JSON element data with partial layout/style fidelity."]
32
+ },
33
+ {
34
+ id: "d3",
35
+ importPath: "@statelyai/graph/d3",
36
+ features: {
37
+ directed: "full",
38
+ undirected: "full",
39
+ hierarchy: "none",
40
+ ports: "none",
41
+ visual: "partial",
42
+ style: "none",
43
+ weight: "full",
44
+ roundTrip: "partial"
45
+ },
46
+ notes: ["Targets force-graph structures, not compound graph metadata."]
47
+ },
48
+ {
49
+ id: "dot",
50
+ importPath: "@statelyai/graph/dot",
51
+ features: {
52
+ directed: "full",
53
+ undirected: "full",
54
+ hierarchy: "partial",
55
+ ports: "partial",
56
+ visual: "partial",
57
+ style: "partial",
58
+ weight: "none",
59
+ roundTrip: "partial"
60
+ },
61
+ notes: ["Port syntax (`:port:compass`) is not fully mapped.", "HTML labels and layout hints beyond `rankdir` are lossy."]
62
+ },
63
+ {
64
+ id: "edge-list",
65
+ importPath: "@statelyai/graph/edge-list",
66
+ features: {
67
+ directed: "full",
68
+ undirected: "partial",
69
+ hierarchy: "none",
70
+ ports: "none",
71
+ visual: "none",
72
+ style: "none",
73
+ weight: "none",
74
+ roundTrip: "partial"
75
+ },
76
+ notes: ["Edge lists preserve endpoints only."]
77
+ },
78
+ {
79
+ id: "elk",
80
+ importPath: "@statelyai/graph/elk",
81
+ features: {
82
+ directed: "full",
83
+ undirected: "partial",
84
+ hierarchy: "full",
85
+ ports: "full",
86
+ visual: "full",
87
+ style: "partial",
88
+ weight: "none",
89
+ roundTrip: "partial"
90
+ },
91
+ notes: ["Optimized for layout exchange with ELK rather than exact styling parity."]
92
+ },
93
+ {
94
+ id: "gexf",
95
+ importPath: "@statelyai/graph/gexf",
96
+ features: {
97
+ directed: "full",
98
+ undirected: "full",
99
+ hierarchy: "none",
100
+ ports: "none",
101
+ visual: "partial",
102
+ style: "partial",
103
+ weight: "full",
104
+ roundTrip: "partial"
105
+ },
106
+ notes: ["Attribute and viz extensions round-trip partially."]
107
+ },
108
+ {
109
+ id: "gml",
110
+ importPath: "@statelyai/graph/gml",
111
+ features: {
112
+ directed: "full",
113
+ undirected: "full",
114
+ hierarchy: "none",
115
+ ports: "none",
116
+ visual: "partial",
117
+ style: "partial",
118
+ weight: "full",
119
+ roundTrip: "partial"
120
+ },
121
+ notes: ["GML support focuses on common graph/node/edge attributes."]
122
+ },
123
+ {
124
+ id: "graphml",
125
+ importPath: "@statelyai/graph/graphml",
126
+ features: {
127
+ directed: "full",
128
+ undirected: "full",
129
+ hierarchy: "none",
130
+ ports: "none",
131
+ visual: "partial",
132
+ style: "partial",
133
+ weight: "full",
134
+ roundTrip: "partial"
135
+ },
136
+ notes: ["GraphML attribute fidelity is good, but not every extension is represented."]
137
+ },
138
+ {
139
+ id: "jgf",
140
+ importPath: "@statelyai/graph/jgf",
141
+ features: {
142
+ directed: "full",
143
+ undirected: "full",
144
+ hierarchy: "none",
145
+ ports: "none",
146
+ visual: "none",
147
+ style: "none",
148
+ weight: "full",
149
+ roundTrip: "partial"
150
+ },
151
+ notes: ["JGF preserves core graph structure and data, but not layout primitives."]
152
+ },
153
+ {
154
+ id: "tgf",
155
+ importPath: "@statelyai/graph/tgf",
156
+ features: {
157
+ directed: "full",
158
+ undirected: "partial",
159
+ hierarchy: "none",
160
+ ports: "none",
161
+ visual: "none",
162
+ style: "none",
163
+ weight: "none",
164
+ roundTrip: "partial"
165
+ },
166
+ notes: ["TGF is intentionally minimal and loses metadata beyond ids and labels."]
167
+ },
168
+ {
169
+ id: "xyflow",
170
+ importPath: "@statelyai/graph/xyflow",
171
+ features: {
172
+ directed: "full",
173
+ undirected: "partial",
174
+ hierarchy: "none",
175
+ ports: "full",
176
+ visual: "full",
177
+ style: "partial",
178
+ weight: "none",
179
+ roundTrip: "partial"
180
+ },
181
+ notes: ["Ports map cleanly to handles, but styling remains adapter-specific."]
182
+ },
183
+ {
184
+ id: "mermaid/block",
185
+ importPath: "@statelyai/graph/mermaid",
186
+ features: {
187
+ directed: "full",
188
+ undirected: "none",
189
+ hierarchy: "partial",
190
+ ports: "none",
191
+ visual: "partial",
192
+ style: "partial",
193
+ weight: "none",
194
+ roundTrip: "partial"
195
+ },
196
+ notes: ["Block edge semantics currently follow flowchart-style behavior."]
197
+ },
198
+ {
199
+ id: "mermaid/class",
200
+ importPath: "@statelyai/graph/mermaid",
201
+ features: {
202
+ directed: "partial",
203
+ undirected: "partial",
204
+ hierarchy: "none",
205
+ ports: "none",
206
+ visual: "none",
207
+ style: "partial",
208
+ weight: "none",
209
+ roundTrip: "partial"
210
+ },
211
+ notes: ["Generic syntax is stored conservatively and not fully parsed."]
212
+ },
213
+ {
214
+ id: "mermaid/er",
215
+ importPath: "@statelyai/graph/mermaid",
216
+ features: {
217
+ directed: "partial",
218
+ undirected: "partial",
219
+ hierarchy: "none",
220
+ ports: "none",
221
+ visual: "none",
222
+ style: "none",
223
+ weight: "none",
224
+ roundTrip: "partial"
225
+ },
226
+ notes: ["Entity attributes and cardinality are preserved better than layout metadata."]
227
+ },
228
+ {
229
+ id: "mermaid/flowchart",
230
+ importPath: "@statelyai/graph/mermaid",
231
+ features: {
232
+ directed: "full",
233
+ undirected: "none",
234
+ hierarchy: "partial",
235
+ ports: "none",
236
+ visual: "partial",
237
+ style: "partial",
238
+ weight: "none",
239
+ roundTrip: "partial"
240
+ },
241
+ notes: ["Index-based `linkStyle` metadata is fragile after graph mutation.", "Mermaid init directives are not fully preserved."]
242
+ },
243
+ {
244
+ id: "mermaid/mindmap",
245
+ importPath: "@statelyai/graph/mermaid",
246
+ features: {
247
+ directed: "partial",
248
+ undirected: "none",
249
+ hierarchy: "full",
250
+ ports: "none",
251
+ visual: "partial",
252
+ style: "none",
253
+ weight: "none",
254
+ roundTrip: "partial"
255
+ },
256
+ notes: ["Icon syntax is stored conservatively and not fully re-emitted."]
257
+ },
258
+ {
259
+ id: "mermaid/sequence",
260
+ importPath: "@statelyai/graph/mermaid",
261
+ features: {
262
+ directed: "full",
263
+ undirected: "none",
264
+ hierarchy: "partial",
265
+ ports: "none",
266
+ visual: "none",
267
+ style: "partial",
268
+ weight: "none",
269
+ roundTrip: "partial"
270
+ },
271
+ notes: ["Actor links and menu syntax are not yet supported."]
272
+ },
273
+ {
274
+ id: "mermaid/state",
275
+ importPath: "@statelyai/graph/mermaid",
276
+ features: {
277
+ directed: "full",
278
+ undirected: "none",
279
+ hierarchy: "full",
280
+ ports: "none",
281
+ visual: "partial",
282
+ style: "partial",
283
+ weight: "none",
284
+ roundTrip: "partial"
285
+ },
286
+ notes: ["State notes are stored, but not fully round-trippable as separate graph entities."]
287
+ }
288
+ ];
289
+ function getFormatSupportEntry(id) {
290
+ return FORMAT_SUPPORT_MATRIX.find((entry) => entry.id === id);
291
+ }
292
+
293
+ //#endregion
294
+ export { FORMAT_SUPPORT_MATRIX, getFormatSupportEntry };
@@ -1,4 +1,4 @@
1
- import { u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/adjacency-list/index.d.ts
4
4
 
@@ -1,3 +1,3 @@
1
- import { n as toAdjacencyList, t as fromAdjacencyList } from "../../adjacency-list-fldj-QAL.mjs";
1
+ import { n as toAdjacencyList, t as fromAdjacencyList } from "../../adjacency-list-Ca0VjKIf.mjs";
2
2
 
3
3
  export { fromAdjacencyList, toAdjacencyList };
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/converter/index.d.ts
4
4
 
@@ -1,3 +1,3 @@
1
- import { n as createFormatConverter, r as edgeListConverter, t as adjacencyListConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter, r as edgeListConverter, t as adjacencyListConverter } from "../../converter-Dspillnn.mjs";
2
2
 
3
3
  export { adjacencyListConverter, createFormatConverter, edgeListConverter };
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/cytoscape/index.d.ts
4
4
  interface CytoscapeNode {
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
 
3
3
  //#region src/formats/cytoscape/index.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/d3/index.d.ts
4
4
  interface D3Node {
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
 
3
3
  //#region src/formats/d3/index.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/dot/index.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
  import parse from "dotparser";
3
3
 
4
4
  //#region src/formats/dot/index.ts
@@ -1,4 +1,4 @@
1
- import { u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/edge-list/index.d.ts
4
4
 
@@ -1,3 +1,3 @@
1
- import { n as toEdgeList, t as fromEdgeList } from "../../edge-list-Br05wXMg.mjs";
1
+ import { n as toEdgeList, t as fromEdgeList } from "../../edge-list-gKe8-iRa.mjs";
2
2
 
3
3
  export { fromEdgeList, toEdgeList };
@@ -1,4 +1,4 @@
1
- import { F as VisualGraphFormatConverter, M as VisualGraph } from "../../types-BzckPChi.mjs";
1
+ import { P as VisualGraphFormatConverter, j as VisualGraph } from "../../types-CnZ01raw.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
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/gexf/index.d.ts
4
4
  declare function toGEXF(graph: Graph): string;
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
  import { XMLBuilder, XMLParser } from "fast-xml-parser";
3
3
 
4
4
  //#region src/formats/gexf/index.ts
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/gml/index.d.ts
4
4
 
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
 
3
3
  //#region src/formats/gml/index.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { g as GraphFormatConverter, u as Graph } from "../../types-BzckPChi.mjs";
1
+ import { h as GraphFormatConverter, u as Graph } from "../../types-CnZ01raw.mjs";
2
2
 
3
3
  //#region src/formats/graphml/index.d.ts
4
4
  declare function toGraphML(graph: Graph): string;
@@ -1,4 +1,4 @@
1
- import { n as createFormatConverter } from "../../converter-B5CUD0r9.mjs";
1
+ import { n as createFormatConverter } from "../../converter-Dspillnn.mjs";
2
2
  import { XMLBuilder, XMLParser } from "fast-xml-parser";
3
3
 
4
4
  //#region src/formats/graphml/index.ts