@deck.gl-community/graph-layers 9.0.2 → 9.1.0-beta.2

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 (118) hide show
  1. package/LICENSE +1 -1
  2. package/dist/core/graph-engine.d.ts +16 -7
  3. package/dist/core/graph-engine.d.ts.map +1 -1
  4. package/dist/core/graph-engine.js +13 -4
  5. package/dist/core/graph-layout.d.ts +69 -0
  6. package/dist/core/graph-layout.d.ts.map +1 -0
  7. package/dist/core/{base-layout.js → graph-layout.js} +63 -80
  8. package/dist/core/interaction-manager.d.ts +1 -1
  9. package/dist/core/interaction-manager.d.ts.map +1 -1
  10. package/dist/{core → graph}/edge.d.ts +18 -17
  11. package/dist/graph/edge.d.ts.map +1 -0
  12. package/dist/{core → graph}/edge.js +12 -15
  13. package/dist/{core → graph}/graph.d.ts +34 -31
  14. package/dist/graph/graph.d.ts.map +1 -0
  15. package/dist/{core → graph}/graph.js +43 -36
  16. package/dist/{core → graph}/node.d.ts +20 -20
  17. package/dist/graph/node.d.ts.map +1 -0
  18. package/dist/{core → graph}/node.js +16 -18
  19. package/dist/index.cjs +1181 -434
  20. package/dist/index.cjs.map +4 -4
  21. package/dist/index.d.ts +16 -14
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +19 -18
  24. package/dist/layers/graph-layer.d.ts +45 -5
  25. package/dist/layers/graph-layer.d.ts.map +1 -1
  26. package/dist/layers/graph-layer.js +80 -38
  27. package/dist/layers/node-layers/{path-rounded-rectange-layer.d.ts → path-rounded-rectangle-layer.d.ts} +1 -1
  28. package/dist/layers/node-layers/path-rounded-rectangle-layer.d.ts.map +1 -0
  29. package/dist/layers/node-layers/rounded-rectangle-layer-fragment.d.ts +1 -1
  30. package/dist/layers/node-layers/rounded-rectangle-layer-fragment.d.ts.map +1 -1
  31. package/dist/layers/node-layers/rounded-rectangle-layer-fragment.js +1 -3
  32. package/dist/layers/node-layers/rounded-rectangle-layer.d.ts +12 -3
  33. package/dist/layers/node-layers/rounded-rectangle-layer.d.ts.map +1 -1
  34. package/dist/layers/node-layers/rounded-rectangle-layer.js +25 -11
  35. package/dist/layouts/d3-force/d3-force-layout.d.ts +12 -3
  36. package/dist/layouts/d3-force/d3-force-layout.d.ts.map +1 -1
  37. package/dist/layouts/d3-force/d3-force-layout.js +11 -11
  38. package/dist/layouts/d3-force/worker.d.ts.map +1 -1
  39. package/dist/layouts/experimental/force-multi-graph-layout.d.ts +43 -0
  40. package/dist/layouts/experimental/force-multi-graph-layout.d.ts.map +1 -0
  41. package/dist/layouts/experimental/force-multi-graph-layout.js +226 -0
  42. package/dist/layouts/experimental/hive-plot-layout.d.ts +34 -0
  43. package/dist/layouts/experimental/hive-plot-layout.d.ts.map +1 -0
  44. package/dist/layouts/experimental/hive-plot-layout.js +142 -0
  45. package/dist/layouts/experimental/radial-layout.d.ts +28 -0
  46. package/dist/layouts/experimental/radial-layout.d.ts.map +1 -0
  47. package/dist/layouts/experimental/radial-layout.js +164 -0
  48. package/dist/layouts/gpu-force/gpu-force-layout.d.ts +15 -3
  49. package/dist/layouts/gpu-force/gpu-force-layout.d.ts.map +1 -1
  50. package/dist/layouts/gpu-force/gpu-force-layout.js +20 -18
  51. package/dist/layouts/gpu-force/worker.d.ts.map +1 -1
  52. package/dist/layouts/simple-layout.d.ts +42 -0
  53. package/dist/layouts/simple-layout.d.ts.map +1 -0
  54. package/dist/layouts/{simple-layout/simple-layout.js → simple-layout.js} +8 -7
  55. package/dist/loaders/create-graph.d.ts +13 -0
  56. package/dist/loaders/create-graph.d.ts.map +1 -0
  57. package/dist/{utils → loaders}/create-graph.js +9 -4
  58. package/dist/loaders/edge-parsers.d.ts +2 -6
  59. package/dist/loaders/edge-parsers.d.ts.map +1 -1
  60. package/dist/loaders/json-loader.js +1 -1
  61. package/dist/loaders/node-parsers.d.ts +2 -3
  62. package/dist/loaders/node-parsers.d.ts.map +1 -1
  63. package/dist/loaders/simple-json-graph-loader.d.ts +12 -0
  64. package/dist/loaders/simple-json-graph-loader.d.ts.map +1 -0
  65. package/dist/loaders/simple-json-graph-loader.js +20 -0
  66. package/dist/loaders/table-graph-loader.d.ts +17 -0
  67. package/dist/loaders/table-graph-loader.d.ts.map +1 -0
  68. package/dist/loaders/table-graph-loader.js +91 -0
  69. package/dist/utils/log.d.ts +1 -1
  70. package/dist/utils/log.d.ts.map +1 -1
  71. package/dist/utils/log.js +3 -3
  72. package/dist/widgets/long-press-button.d.ts +13 -0
  73. package/dist/widgets/long-press-button.d.ts.map +1 -0
  74. package/dist/widgets/long-press-button.js +31 -0
  75. package/dist/widgets/view-control-widget.d.ts +78 -0
  76. package/dist/widgets/view-control-widget.d.ts.map +1 -0
  77. package/dist/widgets/view-control-widget.js +194 -0
  78. package/package.json +8 -6
  79. package/src/core/graph-engine.ts +30 -10
  80. package/src/core/graph-layout.ts +146 -0
  81. package/src/core/interaction-manager.ts +2 -2
  82. package/src/{core → graph}/edge.ts +19 -17
  83. package/src/{core → graph}/graph.ts +51 -36
  84. package/src/{core → graph}/node.ts +21 -20
  85. package/src/index.ts +28 -28
  86. package/src/layers/graph-layer.ts +133 -46
  87. package/src/layers/node-layers/rounded-rectangle-layer-fragment.ts +1 -3
  88. package/src/layers/node-layers/rounded-rectangle-layer.ts +34 -10
  89. package/src/layouts/d3-force/d3-force-layout.ts +21 -11
  90. package/src/layouts/experimental/force-multi-graph-layout.ts +268 -0
  91. package/src/layouts/experimental/hive-plot-layout.ts +182 -0
  92. package/src/layouts/experimental/radial-layout.ts +210 -0
  93. package/src/layouts/gpu-force/gpu-force-layout.ts +32 -17
  94. package/src/layouts/{simple-layout/simple-layout.ts → simple-layout.ts} +34 -19
  95. package/src/{utils → loaders}/create-graph.ts +9 -4
  96. package/src/loaders/edge-parsers.ts +2 -1
  97. package/src/loaders/json-loader.ts +1 -1
  98. package/src/loaders/node-parsers.ts +2 -1
  99. package/src/loaders/simple-json-graph-loader.ts +28 -0
  100. package/src/loaders/table-graph-loader.ts +124 -0
  101. package/src/utils/log.ts +3 -3
  102. package/src/widgets/long-press-button.tsx +50 -0
  103. package/src/widgets/view-control-widget.tsx +337 -0
  104. package/dist/core/base-layout.d.ts +0 -72
  105. package/dist/core/base-layout.d.ts.map +0 -1
  106. package/dist/core/edge.d.ts.map +0 -1
  107. package/dist/core/graph.d.ts.map +0 -1
  108. package/dist/core/node.d.ts.map +0 -1
  109. package/dist/layers/node-layers/path-rounded-rectange-layer.d.ts.map +0 -1
  110. package/dist/layouts/simple-layout/simple-layout.d.ts +0 -23
  111. package/dist/layouts/simple-layout/simple-layout.d.ts.map +0 -1
  112. package/dist/utils/create-graph.d.ts +0 -9
  113. package/dist/utils/create-graph.d.ts.map +0 -1
  114. package/src/core/base-layout.ts +0 -154
  115. /package/dist/layers/node-layers/{path-rounded-rectange-layer.js → path-rounded-rectangle-layer.js} +0 -0
  116. /package/src/layers/node-layers/{path-rounded-rectange-layer.ts → path-rounded-rectangle-layer.ts} +0 -0
  117. /package/src/layouts/d3-force/{worker.ts → worker.js} +0 -0
  118. /package/src/layouts/gpu-force/{worker.ts → worker.js} +0 -0
@@ -3,11 +3,17 @@
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
5
  import {log} from '../utils/log';
6
- import {Cache} from './cache';
6
+ import {Cache} from '../core/cache';
7
7
  import {Edge} from './edge';
8
8
  import {Node} from './node';
9
9
 
10
- // Basic graph data structure
10
+ export type GraphProps = {
11
+ name?: string;
12
+ nodes?: Node[];
13
+ edges?: Edge[];
14
+ };
15
+
16
+ /** Basic graph data structure */
11
17
  export class Graph extends EventTarget {
12
18
  /** List object of nodes. */
13
19
  private _nodeMap: Record<string, Node> = {};
@@ -23,32 +29,41 @@ export class Graph extends EventTarget {
23
29
  /** Cached data: create array data from maps. */
24
30
  private _cache = new Cache<'nodes' | 'edges', Node[] | Edge[]>();
25
31
 
32
+ constructor(props?: GraphProps);
33
+ constructor(graph: Graph);
34
+
26
35
  /**
27
36
  * The constructor of the Graph class.
28
- * @param {Object} graph - copy the graph if this exists.
37
+ * @param graph - copy the graph if this exists.
29
38
  */
30
- constructor(graph: Graph | null = null) {
39
+ constructor(propsOrGraph?: GraphProps | Graph) {
31
40
  super();
32
41
 
33
- // copy the graph if it exists in the parameter
34
- if (graph) {
35
- // start copying the graph
42
+ if (propsOrGraph instanceof Graph) {
43
+ // if a Graph instance was supplied, copy the supplied graph into this graph
44
+ const graph = propsOrGraph;
45
+ this._name = graph?._name || this._name;
36
46
  this._nodeMap = graph._nodeMap;
37
47
  this._edgeMap = graph._edgeMap;
38
- this._name = graph && graph._name;
48
+ } else {
49
+ // If graphProps were supplied, initialize this graph from the supplied props
50
+ const props = propsOrGraph;
51
+ this._name = props?.name || this._name;
52
+ this.batchAddNodes(props?.nodes || []);
53
+ this.batchAddEdges(props?.edges || []);
39
54
  }
40
55
  }
41
56
 
42
57
  /**
43
58
  * Set graph name
44
- * @param {string} name
59
+ * @param name
45
60
  */
46
61
  setGraphName(name: string): void {
47
62
  this._name = name;
48
63
  }
49
64
 
50
65
  /** Get the name of the graph. Default value is the time stamp when creating this graph.
51
- * @return {string} graph name.
66
+ * @return graph name.
52
67
  */
53
68
  getGraphName(): string {
54
69
  return this._name.toString();
@@ -56,7 +71,7 @@ export class Graph extends EventTarget {
56
71
 
57
72
  /**
58
73
  * Perform a batch of operations defined by cb before indicating graph is updated
59
- * @param {function} cb - a callback fuction containing the operations to perform
74
+ * @param {function} cb - a callback function containing the operations to perform
60
75
  */
61
76
  transaction<T>(cb: (...args: unknown[]) => T): T {
62
77
  try {
@@ -69,7 +84,7 @@ export class Graph extends EventTarget {
69
84
 
70
85
  /**
71
86
  * Add a new node to the graph.
72
- * @param {Node} node - expect a Node object to be added to the graph.
87
+ * @paramnode - expect a Node object to be added to the graph.
73
88
  */
74
89
  addNode(node: Node): void {
75
90
  // add it to the list and map
@@ -81,7 +96,7 @@ export class Graph extends EventTarget {
81
96
 
82
97
  /**
83
98
  * Batch add nodes to the graph.
84
- * @param {Node[]} nodes - a list of nodes to be added.
99
+ * @param nodes - a list of nodes to be added.
85
100
  */
86
101
  batchAddNodes(nodes: Node[]): void {
87
102
  // convert an array of objects to an object
@@ -108,7 +123,7 @@ export class Graph extends EventTarget {
108
123
 
109
124
  /**
110
125
  * Get the node map of the graph. The key of the map is the ID of the nodes.
111
- * @return {Object} - a map of nodes keyed by node IDs.
126
+ * @return - a map of nodes keyed by node IDs.
112
127
  */
113
128
  getNodeMap(): Record<string | number, Node> {
114
129
  return this._nodeMap;
@@ -116,8 +131,8 @@ export class Graph extends EventTarget {
116
131
 
117
132
  /**
118
133
  * Find a node by id
119
- * @param {String} nodeId The id of the node
120
- * @return {Object} Node
134
+ * @param nodeId The id of the node
135
+ * @return Node
121
136
  */
122
137
  findNode(nodeId: string | number): Node | undefined {
123
138
  return this._nodeMap[nodeId];
@@ -125,7 +140,7 @@ export class Graph extends EventTarget {
125
140
 
126
141
  /**
127
142
  * Update the indicated node to the provided value
128
- * @param {Node} node
143
+ * @param node
129
144
  */
130
145
  updateNode(node: Node): void {
131
146
  this._nodeMap[node.getId()] = node;
@@ -135,7 +150,7 @@ export class Graph extends EventTarget {
135
150
 
136
151
  /**
137
152
  * Add a new edge to the graph.
138
- * @param {Edge} edge - expect a Edge object to be added to the graph.
153
+ * @param edge - expect a Edge object to be added to the graph.
139
154
  */
140
155
  addEdge(edge: Edge): void {
141
156
  const sourceNode = this.findNode(edge.getSourceNodeId());
@@ -155,7 +170,7 @@ export class Graph extends EventTarget {
155
170
 
156
171
  /**
157
172
  * Batch add edges to the graph
158
- * @param {Edge[]} edges - a list of edges to be added.
173
+ * @param edges - a list of edges to be added.
159
174
  */
160
175
  batchAddEdges(edges: Edge[]): void {
161
176
  edges.forEach((edge) => this.addEdge(edge));
@@ -164,7 +179,7 @@ export class Graph extends EventTarget {
164
179
 
165
180
  /**
166
181
  * Update the indicated edge to the provided value
167
- * @param {Edge} edge
182
+ * @param edge
168
183
  */
169
184
  updateEdge(edge: Edge): void {
170
185
  this._edgeMap[edge.getId()] = edge;
@@ -174,7 +189,7 @@ export class Graph extends EventTarget {
174
189
 
175
190
  /**
176
191
  * Remove a node from the graph by node ID
177
- * @param {String|Number} nodeId - the ID of the target node.
192
+ * @param nodeId - the ID of the target node.
178
193
  */
179
194
  removeNode(nodeId: string | number): void {
180
195
  const node = this.findNode(nodeId);
@@ -194,7 +209,7 @@ export class Graph extends EventTarget {
194
209
 
195
210
  /**
196
211
  * Get all the edges of the graph.
197
- * @return {Edge[]} get all the edges in the graph.
212
+ * @return get all the edges in the graph.
198
213
  */
199
214
  getEdges(): Edge[] {
200
215
  this._updateCache('edges', () => Object.values(this._edgeMap));
@@ -204,7 +219,7 @@ export class Graph extends EventTarget {
204
219
 
205
220
  /**
206
221
  * Get the edge map of the graph. The key of the map is the ID of the edges.
207
- * @return {Object} - a map of edges keyed by edge IDs.
222
+ * @return - a map of edges keyed by edge IDs.
208
223
  */
209
224
  getEdgeMap(): Record<string, Edge> {
210
225
  return this._edgeMap;
@@ -231,8 +246,8 @@ export class Graph extends EventTarget {
231
246
 
232
247
  /**
233
248
  * Find the edge by edge ID.
234
- * @param {String|Number} id - the target edge ID
235
- * @return {Edge} - the target edge.
249
+ * @param id - the target edge ID
250
+ * @return - the target edge.
236
251
  */
237
252
  findEdge(edgeId: string | number): Edge {
238
253
  return this._edgeMap[edgeId];
@@ -240,8 +255,8 @@ export class Graph extends EventTarget {
240
255
 
241
256
  /**
242
257
  * Return all the connected edges of a node by nodeID.
243
- * @param {String|Number} nodeId - the target node ID
244
- * @return {Edge[]} - an array of the connected edges.
258
+ * @param nodeId - the target node ID
259
+ * @return - an array of the connected edges.
245
260
  */
246
261
  getConnectedEdges(nodeId: string | number): Edge[] {
247
262
  const node = this.findNode(nodeId);
@@ -254,8 +269,8 @@ export class Graph extends EventTarget {
254
269
 
255
270
  /**
256
271
  * Return all the sibling nodes of a node by nodeID.
257
- * @param {String|Number} nodeId - the target node ID
258
- * @return {Node[]} - an array of the sibling nodes.
272
+ * @param nodeId - the target node ID
273
+ * @return - an array of the sibling nodes.
259
274
  */
260
275
  getNodeSiblings(nodeId: string | number): Node[] {
261
276
  const node = this.findNode(nodeId);
@@ -268,8 +283,8 @@ export class Graph extends EventTarget {
268
283
 
269
284
  /**
270
285
  * Get the degree of a node.
271
- * @param {String|Number} nodeId - the target node ID.
272
- * @return {Number} - the degree of the node.
286
+ * @param nodeId - the target node ID.
287
+ * @return - the degree of the node.
273
288
  */
274
289
  getDegree(nodeId: string | number): number {
275
290
  const node = this.findNode(nodeId);
@@ -322,14 +337,14 @@ export class Graph extends EventTarget {
322
337
 
323
338
  /**
324
339
  * Check the equality of two graphs data by checking last update time stamp
325
- * @param {Object} g Another graph to be compared against itself
326
- * @return {Bool} True if the graph is the same as itself.
340
+ * @param graph Another graph to be compared against itself
341
+ * @return true if the graph is the same as itself.
327
342
  */
328
- equals(g: Graph): boolean {
329
- if (!g || !(g instanceof Graph)) {
343
+ equals(graph: Graph): boolean {
344
+ if (!graph || !(graph instanceof Graph)) {
330
345
  return false;
331
346
  }
332
- return this.version === g.version;
347
+ return this.version === graph.version;
333
348
  }
334
349
 
335
350
  _bumpVersion(): void {
@@ -2,17 +2,20 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- import {NODE_STATE, ValueOf} from './constants';
5
+ import {NODE_STATE, ValueOf} from '../core/constants';
6
6
  import {Edge} from './edge';
7
7
 
8
- interface NodeOptions {
8
+ /** Properties for creating a new node */
9
+ export interface NodeOptions {
10
+ /** the unique ID of the node */
9
11
  id: number | string;
10
12
  selectable?: boolean;
11
13
  highlightConnectedEdges?: boolean;
12
- data: Record<string, unknown>;
14
+ /* origin data reference */
15
+ data?: Record<string, unknown>;
13
16
  }
14
17
 
15
- // Basic data structure of a node
18
+ /** Basic data structure of a node */
16
19
  export class Node {
17
20
  public id: string | number;
18
21
  /** Keep a reference to origin data. */
@@ -29,8 +32,6 @@ export class Node {
29
32
  public readonly isNode = true;
30
33
  /**
31
34
  * The constructor of a node
32
- * @param {String|Number} options.id - the unique ID of the node
33
- * @param {Record<string, unknown>} options.data - origin data reference
34
35
  */
35
36
  constructor({id, selectable = false, highlightConnectedEdges = false, data = {}}: NodeOptions) {
36
37
  this.id = id;
@@ -41,7 +42,7 @@ export class Node {
41
42
 
42
43
  /**
43
44
  * Return the ID of the node
44
- * @return {String|Number} - the ID of the node.
45
+ * @return - the ID of the node.
45
46
  */
46
47
  getId(): string | number {
47
48
  return this.id;
@@ -57,7 +58,7 @@ export class Node {
57
58
 
58
59
  /**
59
60
  * Return the in-degree of the node.
60
- * @return {Number} - the in-degree of the node.
61
+ * @return - the in-degree of the node.
61
62
  */
62
63
  getInDegree(): number {
63
64
  const nodeId = this.getId();
@@ -72,7 +73,7 @@ export class Node {
72
73
 
73
74
  /**
74
75
  * Return the out-degree of the node.
75
- * @return {Number} - the out-degree of the node.
76
+ * @return - the out-degree of the node.
76
77
  */
77
78
  getOutDegree(): number {
78
79
  const nodeId = this.getId();
@@ -87,7 +88,7 @@ export class Node {
87
88
 
88
89
  /**
89
90
  * Return all the IDs of the sibling nodes.
90
- * @return {String[]} [description]
91
+ * @return [description]
91
92
  */
92
93
  getSiblingIds(): (string | number)[] {
93
94
  const nodeId = this.getId();
@@ -106,7 +107,7 @@ export class Node {
106
107
 
107
108
  /**
108
109
  * Return all the connected edges.
109
- * @return {Object[]} - an array of the connected edges.
110
+ * @return - an array of the connected edges.
110
111
  */
111
112
  getConnectedEdges(): Edge[] {
112
113
  return Object.values(this._connectedEdges);
@@ -114,8 +115,8 @@ export class Node {
114
115
 
115
116
  /**
116
117
  * Return of the value of the selected property key.
117
- * @param {String} key - property key.
118
- * @return {Any} - the value of the property or undefined (not found).
118
+ * @param key - property key.
119
+ * @return - the value of the property or undefined (not found).
119
120
  */
120
121
  getPropertyValue(key: string): unknown {
121
122
  // try to search the key within this object
@@ -132,7 +133,7 @@ export class Node {
132
133
 
133
134
  /**
134
135
  * Set the new node data.
135
- * @param {Record<string, unknown>} data - the new data of the node
136
+ * @param data - the new data of the node
136
137
  */
137
138
  setData(data: Record<string, unknown>): void {
138
139
  this._data = data;
@@ -140,8 +141,8 @@ export class Node {
140
141
 
141
142
  /**
142
143
  * Update a data property.
143
- * @param {String} key - the key of the property
144
- * @param {Any} value - the value of the property.
144
+ * @param key - the key of the property
145
+ * @param value - the value of the property.
145
146
  */
146
147
  setDataProperty(key: string, value: unknown): void {
147
148
  this._data[key] = value;
@@ -149,7 +150,7 @@ export class Node {
149
150
 
150
151
  /**
151
152
  * Set node state
152
- * @param {String} state - one of NODE_STATE
153
+ * @param state - one of NODE_STATE
153
154
  */
154
155
  setState(state: ValueOf<typeof NODE_STATE>): void {
155
156
  this.state = state;
@@ -157,7 +158,7 @@ export class Node {
157
158
 
158
159
  /**
159
160
  * Get node state
160
- * @returns {string} state - one of NODE_STATE
161
+ * @returns state - one of NODE_STATE
161
162
  */
162
163
  getState(): ValueOf<typeof NODE_STATE> {
163
164
  return this.state;
@@ -165,7 +166,7 @@ export class Node {
165
166
 
166
167
  /**
167
168
  * Add connected edges to the node
168
- * @param {Edge || Edge[]} edge an edge or an array of edges to be added to this._connectedEdges
169
+ * @param edge an edge or an array of edges to be added to this._connectedEdges
169
170
  */
170
171
  addConnectedEdges(edge: Edge | Edge[]): void {
171
172
  const iterableEdges = Array.isArray(edge) ? edge : [edge];
@@ -177,7 +178,7 @@ export class Node {
177
178
 
178
179
  /**
179
180
  * Remove edges from this._connectedEdges
180
- * @param {Edge | Edge[]} edge an edge or an array of edges to be removed from this._connectedEdges
181
+ * @param edge an edge or an array of edges to be removed from this._connectedEdges
181
182
  */
182
183
  removeConnectedEdges(edge: Edge | Edge[]): void {
183
184
  const iterableEdges = Array.isArray(edge) ? edge : [edge];
package/src/index.ts CHANGED
@@ -2,41 +2,41 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
4
 
5
- // react-graph-layers core
5
+ // core - Graph representation and layout
6
+ export {Graph} from './graph/graph';
7
+ export {Node} from './graph/node';
8
+ export {Edge} from './graph/edge';
9
+
6
10
  export {GraphEngine} from './core/graph-engine';
7
- export {Graph} from './core/graph';
8
- export {Node} from './core/node';
9
- export {Edge} from './core/edge';
10
- export {
11
- NODE_STATE,
12
- NODE_TYPE,
13
- EDGE_TYPE,
14
- EDGE_DECORATOR_TYPE,
15
- LAYOUT_STATE,
16
- MARKER_TYPE
17
- } from './core/constants';
18
-
19
- // react-graph-layers layouts
20
- export {BaseLayout} from './core/base-layout';
11
+
12
+ // graph-layers layouts
13
+ export type {GraphLayoutState} from './core/graph-layout';
14
+ export {GraphLayout} from './core/graph-layout';
15
+
16
+ export {SimpleLayout} from './layouts//simple-layout';
21
17
  export {D3ForceLayout} from './layouts/d3-force/d3-force-layout';
22
18
  export {GPUForceLayout} from './layouts/gpu-force/gpu-force-layout';
23
- export {SimpleLayout} from './layouts/simple-layout/simple-layout';
19
+ export {RadialLayout as _RadialLayout} from './layouts/experimental/radial-layout';
20
+ export {ForceMultiGraphLayout as _MultigraphLayout} from './layouts/experimental/force-multi-graph-layout';
21
+ export {HivePlotLayout as _HivePlotLayout} from './layouts/experimental/hive-plot-layout';
24
22
 
25
- // react-graph-layers loaders
26
- export {JSONLoader} from './loaders/json-loader';
27
- export {basicNodeParser} from './loaders/node-parsers';
28
- export {basicEdgeParser} from './loaders/edge-parsers';
29
-
30
- // react-graph-layers utils
31
- export {createGraph} from './utils/create-graph';
32
- export * from './utils/layer-utils';
33
- export * from './utils/log';
23
+ export {NODE_STATE, NODE_TYPE, EDGE_TYPE, EDGE_DECORATOR_TYPE, MARKER_TYPE} from './core/constants';
34
24
 
35
25
  // deck.gl components
36
26
  export {GraphLayer} from './layers/graph-layer';
37
27
  export {EdgeLayer} from './layers/edge-layer';
38
28
 
39
- // DEPRECATED
29
+ // Widgets
40
30
 
41
- /** @deprecated Use EdgeLayer */
42
- export {EdgeLayer as CompositeEdgeLayer} from './layers/edge-layer';
31
+ export {ViewControlWidget} from './widgets/view-control-widget';
32
+
33
+ // graph format loaders
34
+ export {loadSimpleJSONGraph} from './loaders/simple-json-graph-loader';
35
+
36
+ // utils
37
+ export {mixedGetPosition} from './utils/layer-utils';
38
+ export {log} from './utils/log';
39
+
40
+ // DEPRECATED
41
+ export {createGraph} from './loaders/create-graph';
42
+ export {JSONLoader} from './loaders/simple-json-graph-loader';