@statelyai/graph 0.3.1 → 0.5.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 (47) hide show
  1. package/README.md +12 -11
  2. package/dist/{algorithms-NWSB2RWj.mjs → algorithms-DldwenLt.mjs} +11 -6
  3. package/dist/algorithms.d.mts +1 -1
  4. package/dist/algorithms.mjs +1 -1
  5. package/dist/{converter-CchokMDg.mjs → converter-B5CUD0r9.mjs} +2 -2
  6. package/dist/formats/adjacency-list/index.d.mts +1 -1
  7. package/dist/formats/adjacency-list/index.mjs +1 -1
  8. package/dist/formats/converter/index.d.mts +2 -2
  9. package/dist/formats/converter/index.mjs +1 -1
  10. package/dist/formats/cytoscape/index.d.mts +1 -1
  11. package/dist/formats/cytoscape/index.mjs +4 -4
  12. package/dist/formats/d3/index.d.mts +1 -1
  13. package/dist/formats/d3/index.mjs +1 -1
  14. package/dist/formats/dot/index.d.mts +1 -1
  15. package/dist/formats/dot/index.mjs +1 -1
  16. package/dist/formats/edge-list/index.d.mts +1 -1
  17. package/dist/formats/edge-list/index.mjs +1 -1
  18. package/dist/formats/elk/index.d.mts +61 -0
  19. package/dist/formats/elk/index.mjs +176 -0
  20. package/dist/formats/gexf/index.d.mts +1 -1
  21. package/dist/formats/gexf/index.mjs +5 -5
  22. package/dist/formats/gml/index.d.mts +1 -1
  23. package/dist/formats/gml/index.mjs +3 -3
  24. package/dist/formats/graphml/index.d.mts +1 -1
  25. package/dist/formats/graphml/index.mjs +2 -2
  26. package/dist/formats/jgf/index.d.mts +1 -1
  27. package/dist/formats/jgf/index.mjs +4 -4
  28. package/dist/formats/mermaid/index.d.mts +46 -33
  29. package/dist/formats/mermaid/index.mjs +319 -35
  30. package/dist/formats/tgf/index.d.mts +1 -1
  31. package/dist/formats/tgf/index.mjs +1 -1
  32. package/dist/formats/xyflow/index.d.mts +73 -0
  33. package/dist/formats/xyflow/index.mjs +133 -0
  34. package/dist/index.d.mts +1 -1
  35. package/dist/index.mjs +5 -5
  36. package/dist/{indexing-eNDrXdDA.mjs → indexing-DyfgLuzw.mjs} +6 -5
  37. package/dist/queries.d.mts +2 -2
  38. package/dist/queries.mjs +9 -9
  39. package/dist/schemas.d.mts +37 -4
  40. package/dist/schemas.mjs +26 -5
  41. package/dist/{types-BDXC1O5b.d.mts → types-FBZCrmnG.d.mts} +17 -6
  42. package/package.json +9 -1
  43. package/schemas/edge.schema.json +32 -1
  44. package/schemas/graph.schema.json +114 -4
  45. package/schemas/node.schema.json +45 -2
  46. /package/dist/{adjacency-list-ITO40kmn.mjs → adjacency-list-fldj-QAL.mjs} +0 -0
  47. /package/dist/{edge-list-CgX6bBIF.mjs → edge-list-Br05wXMg.mjs} +0 -0
@@ -12,6 +12,16 @@
12
12
  "undirected"
13
13
  ]
14
14
  },
15
+ "initialNodeId": {
16
+ "anyOf": [
17
+ {
18
+ "type": "string"
19
+ },
20
+ {
21
+ "type": "null"
22
+ }
23
+ ]
24
+ },
15
25
  "nodes": {
16
26
  "type": "array",
17
27
  "items": {
@@ -34,15 +44,58 @@
34
44
  }
35
45
  ]
36
46
  },
47
+ "initialNodeId": {
48
+ "anyOf": [
49
+ {
50
+ "type": "string"
51
+ },
52
+ {
53
+ "type": "null"
54
+ }
55
+ ]
56
+ },
37
57
  "label": {
38
58
  "type": "string"
39
59
  },
40
- "data": {}
60
+ "data": {},
61
+ "x": {
62
+ "type": "number"
63
+ },
64
+ "y": {
65
+ "type": "number"
66
+ },
67
+ "width": {
68
+ "type": "number"
69
+ },
70
+ "height": {
71
+ "type": "number"
72
+ },
73
+ "shape": {
74
+ "type": "string"
75
+ },
76
+ "color": {
77
+ "type": "string"
78
+ },
79
+ "style": {
80
+ "type": "object",
81
+ "propertyNames": {
82
+ "type": "string"
83
+ },
84
+ "additionalProperties": {
85
+ "anyOf": [
86
+ {
87
+ "type": "string"
88
+ },
89
+ {
90
+ "type": "number"
91
+ }
92
+ ]
93
+ }
94
+ }
41
95
  },
42
96
  "required": [
43
97
  "type",
44
98
  "id",
45
- "parentId",
46
99
  "label",
47
100
  "data"
48
101
  ],
@@ -70,7 +123,38 @@
70
123
  "label": {
71
124
  "type": "string"
72
125
  },
73
- "data": {}
126
+ "data": {},
127
+ "x": {
128
+ "type": "number"
129
+ },
130
+ "y": {
131
+ "type": "number"
132
+ },
133
+ "width": {
134
+ "type": "number"
135
+ },
136
+ "height": {
137
+ "type": "number"
138
+ },
139
+ "color": {
140
+ "type": "string"
141
+ },
142
+ "style": {
143
+ "type": "object",
144
+ "propertyNames": {
145
+ "type": "string"
146
+ },
147
+ "additionalProperties": {
148
+ "anyOf": [
149
+ {
150
+ "type": "string"
151
+ },
152
+ {
153
+ "type": "number"
154
+ }
155
+ ]
156
+ }
157
+ }
74
158
  },
75
159
  "required": [
76
160
  "type",
@@ -83,11 +167,37 @@
83
167
  "additionalProperties": false
84
168
  }
85
169
  },
86
- "data": {}
170
+ "data": {},
171
+ "direction": {
172
+ "type": "string",
173
+ "enum": [
174
+ "up",
175
+ "down",
176
+ "left",
177
+ "right"
178
+ ]
179
+ },
180
+ "style": {
181
+ "type": "object",
182
+ "propertyNames": {
183
+ "type": "string"
184
+ },
185
+ "additionalProperties": {
186
+ "anyOf": [
187
+ {
188
+ "type": "string"
189
+ },
190
+ {
191
+ "type": "number"
192
+ }
193
+ ]
194
+ }
195
+ }
87
196
  },
88
197
  "required": [
89
198
  "id",
90
199
  "type",
200
+ "initialNodeId",
91
201
  "nodes",
92
202
  "edges",
93
203
  "data"
@@ -19,15 +19,58 @@
19
19
  }
20
20
  ]
21
21
  },
22
+ "initialNodeId": {
23
+ "anyOf": [
24
+ {
25
+ "type": "string"
26
+ },
27
+ {
28
+ "type": "null"
29
+ }
30
+ ]
31
+ },
22
32
  "label": {
23
33
  "type": "string"
24
34
  },
25
- "data": {}
35
+ "data": {},
36
+ "x": {
37
+ "type": "number"
38
+ },
39
+ "y": {
40
+ "type": "number"
41
+ },
42
+ "width": {
43
+ "type": "number"
44
+ },
45
+ "height": {
46
+ "type": "number"
47
+ },
48
+ "shape": {
49
+ "type": "string"
50
+ },
51
+ "color": {
52
+ "type": "string"
53
+ },
54
+ "style": {
55
+ "type": "object",
56
+ "propertyNames": {
57
+ "type": "string"
58
+ },
59
+ "additionalProperties": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string"
63
+ },
64
+ {
65
+ "type": "number"
66
+ }
67
+ ]
68
+ }
69
+ }
26
70
  },
27
71
  "required": [
28
72
  "type",
29
73
  "id",
30
- "parentId",
31
74
  "label",
32
75
  "data"
33
76
  ],