@darajs/ui-causal-graph-editor 0.4.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.
Files changed (223) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +12 -0
  3. package/dist/CanvasPool.5cd3cdcd.js +30 -0
  4. package/dist/SharedSystems.140ebe02.js +1905 -0
  5. package/dist/WebGLRenderer.6ede660f.js +2241 -0
  6. package/dist/WebGPURenderer.f884c756.js +1544 -0
  7. package/dist/browserAll.2dcaa9f7.js +953 -0
  8. package/dist/colorToUniform.7c604fe6.js +76 -0
  9. package/dist/index.a01cfc5f.js +61895 -0
  10. package/dist/index.js +35 -0
  11. package/dist/index.umd.cjs +10287 -0
  12. package/dist/init.73e5c5e2.js +2602 -0
  13. package/dist/style.css +1 -0
  14. package/dist/types/graph-viewer/causal-graph-editor.d.ts +58 -0
  15. package/dist/types/graph-viewer/causal-graph-editor.d.ts.map +1 -0
  16. package/dist/types/graph-viewer/storybook/stories-utils.d.ts +1247 -0
  17. package/dist/types/graph-viewer/storybook/stories-utils.d.ts.map +1 -0
  18. package/dist/types/graph-viewer/utils/use-iterate-edges.d.ts +32 -0
  19. package/dist/types/graph-viewer/utils/use-iterate-edges.d.ts.map +1 -0
  20. package/dist/types/graph-viewer/utils/use-iterate-nodes.d.ts +32 -0
  21. package/dist/types/graph-viewer/utils/use-iterate-nodes.d.ts.map +1 -0
  22. package/dist/types/index.d.ts +32 -0
  23. package/dist/types/index.d.ts.map +1 -0
  24. package/dist/types/jest-setup.d.ts +18 -0
  25. package/dist/types/jest-setup.d.ts.map +1 -0
  26. package/dist/types/node-hierarchy-builder/index.d.ts +19 -0
  27. package/dist/types/node-hierarchy-builder/index.d.ts.map +1 -0
  28. package/dist/types/node-hierarchy-builder/layer-divider.d.ts +15 -0
  29. package/dist/types/node-hierarchy-builder/layer-divider.d.ts.map +1 -0
  30. package/dist/types/node-hierarchy-builder/layer-label-editor.d.ts +24 -0
  31. package/dist/types/node-hierarchy-builder/layer-label-editor.d.ts.map +1 -0
  32. package/dist/types/node-hierarchy-builder/layer.d.ts +35 -0
  33. package/dist/types/node-hierarchy-builder/layer.d.ts.map +1 -0
  34. package/dist/types/node-hierarchy-builder/node-hierarchy-builder.d.ts +27 -0
  35. package/dist/types/node-hierarchy-builder/node-hierarchy-builder.d.ts.map +1 -0
  36. package/dist/types/node-hierarchy-builder/node.d.ts +21 -0
  37. package/dist/types/node-hierarchy-builder/node.d.ts.map +1 -0
  38. package/dist/types/node-hierarchy-builder/shared.d.ts +93 -0
  39. package/dist/types/node-hierarchy-builder/shared.d.ts.map +1 -0
  40. package/dist/types/shared/causal-graph-store.d.ts +118 -0
  41. package/dist/types/shared/causal-graph-store.d.ts.map +1 -0
  42. package/dist/types/shared/editor-overlay/buttons/add-node-button.d.ts +25 -0
  43. package/dist/types/shared/editor-overlay/buttons/add-node-button.d.ts.map +1 -0
  44. package/dist/types/shared/editor-overlay/buttons/center-graph-button.d.ts +7 -0
  45. package/dist/types/shared/editor-overlay/buttons/center-graph-button.d.ts.map +1 -0
  46. package/dist/types/shared/editor-overlay/buttons/collapse-all-button.d.ts +7 -0
  47. package/dist/types/shared/editor-overlay/buttons/collapse-all-button.d.ts.map +1 -0
  48. package/dist/types/shared/editor-overlay/buttons/collapse-expand-button.d.ts +26 -0
  49. package/dist/types/shared/editor-overlay/buttons/collapse-expand-button.d.ts.map +1 -0
  50. package/dist/types/shared/editor-overlay/buttons/drag-mode-button.d.ts +27 -0
  51. package/dist/types/shared/editor-overlay/buttons/drag-mode-button.d.ts.map +1 -0
  52. package/dist/types/shared/editor-overlay/buttons/index.d.ts +24 -0
  53. package/dist/types/shared/editor-overlay/buttons/index.d.ts.map +1 -0
  54. package/dist/types/shared/editor-overlay/buttons/recalculate-layout-button.d.ts +7 -0
  55. package/dist/types/shared/editor-overlay/buttons/recalculate-layout-button.d.ts.map +1 -0
  56. package/dist/types/shared/editor-overlay/buttons/save-image-button.d.ts +7 -0
  57. package/dist/types/shared/editor-overlay/buttons/save-image-button.d.ts.map +1 -0
  58. package/dist/types/shared/editor-overlay/buttons/soft-edge-arrow-button.d.ts +19 -0
  59. package/dist/types/shared/editor-overlay/buttons/soft-edge-arrow-button.d.ts.map +1 -0
  60. package/dist/types/shared/editor-overlay/floating-elements.d.ts +29 -0
  61. package/dist/types/shared/editor-overlay/floating-elements.d.ts.map +1 -0
  62. package/dist/types/shared/editor-overlay/index.d.ts +22 -0
  63. package/dist/types/shared/editor-overlay/index.d.ts.map +1 -0
  64. package/dist/types/shared/editor-overlay/legend/index.d.ts +19 -0
  65. package/dist/types/shared/editor-overlay/legend/index.d.ts.map +1 -0
  66. package/dist/types/shared/editor-overlay/legend/legend-data.d.ts +49 -0
  67. package/dist/types/shared/editor-overlay/legend/legend-data.d.ts.map +1 -0
  68. package/dist/types/shared/editor-overlay/legend/legend-list.d.ts +6 -0
  69. package/dist/types/shared/editor-overlay/legend/legend-list.d.ts.map +1 -0
  70. package/dist/types/shared/editor-overlay/legend/legend.d.ts +7 -0
  71. package/dist/types/shared/editor-overlay/legend/legend.d.ts.map +1 -0
  72. package/dist/types/shared/editor-overlay/overlay.d.ts +42 -0
  73. package/dist/types/shared/editor-overlay/overlay.d.ts.map +1 -0
  74. package/dist/types/shared/editor-overlay/panel-content/edge/edge-editor.d.ts +8 -0
  75. package/dist/types/shared/editor-overlay/panel-content/edge/edge-editor.d.ts.map +1 -0
  76. package/dist/types/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts +41 -0
  77. package/dist/types/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts.map +1 -0
  78. package/dist/types/shared/editor-overlay/panel-content/edge/editor-props.d.ts +35 -0
  79. package/dist/types/shared/editor-overlay/panel-content/edge/editor-props.d.ts.map +1 -0
  80. package/dist/types/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts +23 -0
  81. package/dist/types/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts.map +1 -0
  82. package/dist/types/shared/editor-overlay/panel-content/edge/index.d.ts +18 -0
  83. package/dist/types/shared/editor-overlay/panel-content/edge/index.d.ts.map +1 -0
  84. package/dist/types/shared/editor-overlay/panel-content/edge/pag-editor.d.ts +23 -0
  85. package/dist/types/shared/editor-overlay/panel-content/edge/pag-editor.d.ts.map +1 -0
  86. package/dist/types/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts +7 -0
  87. package/dist/types/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts.map +1 -0
  88. package/dist/types/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts +27 -0
  89. package/dist/types/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts.map +1 -0
  90. package/dist/types/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts +15 -0
  91. package/dist/types/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts.map +1 -0
  92. package/dist/types/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts +21 -0
  93. package/dist/types/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts.map +1 -0
  94. package/dist/types/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts +17 -0
  95. package/dist/types/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts.map +1 -0
  96. package/dist/types/shared/editor-overlay/panel-content/edge/sections/index.d.ts +19 -0
  97. package/dist/types/shared/editor-overlay/panel-content/edge/sections/index.d.ts.map +1 -0
  98. package/dist/types/shared/editor-overlay/panel-content/index.d.ts +20 -0
  99. package/dist/types/shared/editor-overlay/panel-content/index.d.ts.map +1 -0
  100. package/dist/types/shared/editor-overlay/panel-content/node/index.d.ts +18 -0
  101. package/dist/types/shared/editor-overlay/panel-content/node/index.d.ts.map +1 -0
  102. package/dist/types/shared/editor-overlay/panel-content/node/label-editor.d.ts +11 -0
  103. package/dist/types/shared/editor-overlay/panel-content/node/label-editor.d.ts.map +1 -0
  104. package/dist/types/shared/editor-overlay/panel-content/node/node-info-content.d.ts +34 -0
  105. package/dist/types/shared/editor-overlay/panel-content/node/node-info-content.d.ts.map +1 -0
  106. package/dist/types/shared/editor-overlay/panel-content/panel-content.d.ts +17 -0
  107. package/dist/types/shared/editor-overlay/panel-content/panel-content.d.ts.map +1 -0
  108. package/dist/types/shared/editor-overlay/panel-content/panel-title.d.ts +12 -0
  109. package/dist/types/shared/editor-overlay/panel-content/panel-title.d.ts.map +1 -0
  110. package/dist/types/shared/editor-overlay/panel-content/styled.d.ts +9 -0
  111. package/dist/types/shared/editor-overlay/panel-content/styled.d.ts.map +1 -0
  112. package/dist/types/shared/editor-overlay/positional-divs.d.ts +25 -0
  113. package/dist/types/shared/editor-overlay/positional-divs.d.ts.map +1 -0
  114. package/dist/types/shared/editor-overlay/search-bar/index.d.ts +19 -0
  115. package/dist/types/shared/editor-overlay/search-bar/index.d.ts.map +1 -0
  116. package/dist/types/shared/editor-overlay/search-bar/search-bar.d.ts +21 -0
  117. package/dist/types/shared/editor-overlay/search-bar/search-bar.d.ts.map +1 -0
  118. package/dist/types/shared/editor-overlay/search-bar/use-search.d.ts +32 -0
  119. package/dist/types/shared/editor-overlay/search-bar/use-search.d.ts.map +1 -0
  120. package/dist/types/shared/editor-overlay/zoom-prompt.d.ts +9 -0
  121. package/dist/types/shared/editor-overlay/zoom-prompt.d.ts.map +1 -0
  122. package/dist/types/shared/graph-context.d.ts +26 -0
  123. package/dist/types/shared/graph-context.d.ts.map +1 -0
  124. package/dist/types/shared/graph-layout/circular-layout.d.ts +32 -0
  125. package/dist/types/shared/graph-layout/circular-layout.d.ts.map +1 -0
  126. package/dist/types/shared/graph-layout/common.d.ts +96 -0
  127. package/dist/types/shared/graph-layout/common.d.ts.map +1 -0
  128. package/dist/types/shared/graph-layout/custom-layout.d.ts +36 -0
  129. package/dist/types/shared/graph-layout/custom-layout.d.ts.map +1 -0
  130. package/dist/types/shared/graph-layout/fcose-layout.d.ts +132 -0
  131. package/dist/types/shared/graph-layout/fcose-layout.d.ts.map +1 -0
  132. package/dist/types/shared/graph-layout/force-atlas-layout.d.ts +103 -0
  133. package/dist/types/shared/graph-layout/force-atlas-layout.d.ts.map +1 -0
  134. package/dist/types/shared/graph-layout/index.d.ts +25 -0
  135. package/dist/types/shared/graph-layout/index.d.ts.map +1 -0
  136. package/dist/types/shared/graph-layout/marketing-layout.d.ts +63 -0
  137. package/dist/types/shared/graph-layout/marketing-layout.d.ts.map +1 -0
  138. package/dist/types/shared/graph-layout/planar-layout.d.ts +67 -0
  139. package/dist/types/shared/graph-layout/planar-layout.d.ts.map +1 -0
  140. package/dist/types/shared/graph-layout/spring-layout.d.ts +101 -0
  141. package/dist/types/shared/graph-layout/spring-layout.d.ts.map +1 -0
  142. package/dist/types/shared/graph-layout/worker/circular.d.ts +5 -0
  143. package/dist/types/shared/graph-layout/worker/circular.d.ts.map +1 -0
  144. package/dist/types/shared/graph-layout/worker/client.d.ts +22 -0
  145. package/dist/types/shared/graph-layout/worker/client.d.ts.map +1 -0
  146. package/dist/types/shared/graph-layout/worker/fcose.d.ts +18 -0
  147. package/dist/types/shared/graph-layout/worker/fcose.d.ts.map +1 -0
  148. package/dist/types/shared/graph-layout/worker/force-atlas.d.ts +5 -0
  149. package/dist/types/shared/graph-layout/worker/force-atlas.d.ts.map +1 -0
  150. package/dist/types/shared/graph-layout/worker/marketing.d.ts +5 -0
  151. package/dist/types/shared/graph-layout/worker/marketing.d.ts.map +1 -0
  152. package/dist/types/shared/graph-layout/worker/planar.d.ts +5 -0
  153. package/dist/types/shared/graph-layout/worker/planar.d.ts.map +1 -0
  154. package/dist/types/shared/graph-layout/worker/spring.d.ts +19 -0
  155. package/dist/types/shared/graph-layout/worker/spring.d.ts.map +1 -0
  156. package/dist/types/shared/graph-layout/worker/worker.d.ts +27 -0
  157. package/dist/types/shared/graph-layout/worker/worker.d.ts.map +1 -0
  158. package/dist/types/shared/parsers.d.ts +43 -0
  159. package/dist/types/shared/parsers.d.ts.map +1 -0
  160. package/dist/types/shared/pointer-context.d.ts +20 -0
  161. package/dist/types/shared/pointer-context.d.ts.map +1 -0
  162. package/dist/types/shared/rendering/background.d.ts +48 -0
  163. package/dist/types/shared/rendering/background.d.ts.map +1 -0
  164. package/dist/types/shared/rendering/colors.d.ts +27 -0
  165. package/dist/types/shared/rendering/colors.d.ts.map +1 -0
  166. package/dist/types/shared/rendering/edge/curve.d.ts +51 -0
  167. package/dist/types/shared/rendering/edge/curve.d.ts.map +1 -0
  168. package/dist/types/shared/rendering/edge/definitions.d.ts +73 -0
  169. package/dist/types/shared/rendering/edge/definitions.d.ts.map +1 -0
  170. package/dist/types/shared/rendering/edge/edge-object.d.ts +93 -0
  171. package/dist/types/shared/rendering/edge/edge-object.d.ts.map +1 -0
  172. package/dist/types/shared/rendering/edge/index.d.ts +19 -0
  173. package/dist/types/shared/rendering/edge/index.d.ts.map +1 -0
  174. package/dist/types/shared/rendering/edge/symbols.d.ts +40 -0
  175. package/dist/types/shared/rendering/edge/symbols.d.ts.map +1 -0
  176. package/dist/types/shared/rendering/edge/utils.d.ts +27 -0
  177. package/dist/types/shared/rendering/edge/utils.d.ts.map +1 -0
  178. package/dist/types/shared/rendering/engine.d.ts +436 -0
  179. package/dist/types/shared/rendering/engine.d.ts.map +1 -0
  180. package/dist/types/shared/rendering/grouping/group-container-object.d.ts +56 -0
  181. package/dist/types/shared/rendering/grouping/group-container-object.d.ts.map +1 -0
  182. package/dist/types/shared/rendering/grouping/index.d.ts +2 -0
  183. package/dist/types/shared/rendering/grouping/index.d.ts.map +1 -0
  184. package/dist/types/shared/rendering/node/definitions.d.ts +59 -0
  185. package/dist/types/shared/rendering/node/definitions.d.ts.map +1 -0
  186. package/dist/types/shared/rendering/node/index.d.ts +20 -0
  187. package/dist/types/shared/rendering/node/index.d.ts.map +1 -0
  188. package/dist/types/shared/rendering/node/node-object.d.ts +78 -0
  189. package/dist/types/shared/rendering/node/node-object.d.ts.map +1 -0
  190. package/dist/types/shared/rendering/node/utils.d.ts +33 -0
  191. package/dist/types/shared/rendering/node/utils.d.ts.map +1 -0
  192. package/dist/types/shared/rendering/svg.d.ts +26 -0
  193. package/dist/types/shared/rendering/svg.d.ts.map +1 -0
  194. package/dist/types/shared/rendering/text.d.ts +33 -0
  195. package/dist/types/shared/rendering/text.d.ts.map +1 -0
  196. package/dist/types/shared/rendering/texture-cache.d.ts +47 -0
  197. package/dist/types/shared/rendering/texture-cache.d.ts.map +1 -0
  198. package/dist/types/shared/rendering/use-render-engine.d.ts +115 -0
  199. package/dist/types/shared/rendering/use-render-engine.d.ts.map +1 -0
  200. package/dist/types/shared/rendering/utils.d.ts +27 -0
  201. package/dist/types/shared/rendering/utils.d.ts.map +1 -0
  202. package/dist/types/shared/serializer.d.ts +39 -0
  203. package/dist/types/shared/serializer.d.ts.map +1 -0
  204. package/dist/types/shared/settings-context.d.ts +56 -0
  205. package/dist/types/shared/settings-context.d.ts.map +1 -0
  206. package/dist/types/shared/styles.d.ts +4 -0
  207. package/dist/types/shared/styles.d.ts.map +1 -0
  208. package/dist/types/shared/use-causal-graph-editor.d.ts +22 -0
  209. package/dist/types/shared/use-causal-graph-editor.d.ts.map +1 -0
  210. package/dist/types/shared/use-drag-mode.d.ts +33 -0
  211. package/dist/types/shared/use-drag-mode.d.ts.map +1 -0
  212. package/dist/types/shared/use-edge-encoder.d.ts +45 -0
  213. package/dist/types/shared/use-edge-encoder.d.ts.map +1 -0
  214. package/dist/types/shared/use-graph-tooltip.d.ts +15 -0
  215. package/dist/types/shared/use-graph-tooltip.d.ts.map +1 -0
  216. package/dist/types/shared/use-pane-visibility.d.ts +12 -0
  217. package/dist/types/shared/use-pane-visibility.d.ts.map +1 -0
  218. package/dist/types/shared/utils.d.ts +79 -0
  219. package/dist/types/shared/utils.d.ts.map +1 -0
  220. package/dist/types/types.d.ts +277 -0
  221. package/dist/types/types.d.ts.map +1 -0
  222. package/dist/webworkerAll.2e3715a5.js +7 -0
  223. package/package.json +120 -0
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { DirectionType, GraphTiers, GroupingLayoutBuilder, TieredGraphLayoutBuilder } from '../../types';
18
+ import type { BaseLayoutParams } from './common';
19
+ import { GraphLayout, GraphLayoutBuilder } from './common';
20
+ export interface FcoseLayoutParams extends BaseLayoutParams {
21
+ edgeElasticity: number;
22
+ edgeLength: number;
23
+ energy: number;
24
+ gravity: number;
25
+ gravityRange: number;
26
+ highQuality: boolean;
27
+ iterations: number;
28
+ nodeRepulsion: number;
29
+ nodeSeparation: number;
30
+ tierSeparation: number;
31
+ orientation?: DirectionType;
32
+ tiers?: GraphTiers;
33
+ group?: string;
34
+ }
35
+ declare class FcoseLayoutBuilder extends GraphLayoutBuilder<FcoseLayout> implements TieredGraphLayoutBuilder, GroupingLayoutBuilder {
36
+ _edgeElasticity: number;
37
+ _edgeLength: number;
38
+ _energy: number;
39
+ _gravity: number;
40
+ _gravityRange: number;
41
+ _highQuality: boolean;
42
+ _iterations: number;
43
+ _nodeRepulsion: number;
44
+ _nodeSeparation: number;
45
+ _tierSeparation: number;
46
+ orientation?: DirectionType;
47
+ tiers: GraphTiers;
48
+ group: string;
49
+ /**
50
+ * Set edge elasticity
51
+ *
52
+ * @param elasticity elasticity parameter
53
+ */
54
+ edgeElasticity(elasticity: number): this;
55
+ /**
56
+ * Set ideal edge length multiplier
57
+ *
58
+ * @param lengthMultiplier length multiplier
59
+ */
60
+ edgeLength(lengthMultiplier: number): this;
61
+ /**
62
+ * Set initial energy on incremental recomputation
63
+ *
64
+ * @param energy energy
65
+ */
66
+ energy(energy: number): this;
67
+ /**
68
+ * Set gravity strength
69
+ *
70
+ * @param gravity gravity
71
+ */
72
+ gravity(gravity: number): this;
73
+ /**
74
+ * Set gravity range
75
+ *
76
+ * @param gravityRange
77
+ */
78
+ gravityRange(gravityRange: number): this;
79
+ /**
80
+ * Toggle high quality mode ('proof' vs 'default')
81
+ *
82
+ * @param highQuality whether to use high quality
83
+ */
84
+ highQuality(highQuality: boolean): this;
85
+ /**
86
+ * Set number of iterations to run for
87
+ *
88
+ * @param iters number of iterations to run for
89
+ */
90
+ iterations(iters: number): this;
91
+ /**
92
+ * Set node repulsion strength
93
+ *
94
+ * @param repulsion repulsion to set
95
+ */
96
+ nodeRepulsion(repulsion: number): this;
97
+ /**
98
+ * Set node separation multiplier
99
+ *
100
+ * @param separation separation
101
+ */
102
+ nodeSeparation(separation: number): this;
103
+ /**
104
+ * Set tier separation
105
+ *
106
+ * @param separation separation
107
+ */
108
+ tierSeparation(separation: number): this;
109
+ build(): FcoseLayout;
110
+ }
111
+ export default class FcoseLayout extends GraphLayout<FcoseLayoutParams> {
112
+ edgeElasticity: number;
113
+ edgeLength: number;
114
+ energy: number;
115
+ gravity: number;
116
+ gravityRange: number;
117
+ highQuality: boolean;
118
+ iterations: number;
119
+ nodeRepulsion: number;
120
+ nodeSeparation: number;
121
+ tierSeparation: number;
122
+ orientation: DirectionType;
123
+ tiers: GraphTiers;
124
+ group: string;
125
+ constructor(builder: FcoseLayoutBuilder);
126
+ get requiresPosition(): boolean;
127
+ get name(): string;
128
+ static get Builder(): FcoseLayoutBuilder;
129
+ toLayoutParams(): FcoseLayoutParams;
130
+ }
131
+ export {};
132
+ //# sourceMappingURL=fcose-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fcose-layout.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/fcose-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UA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AC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK9B;;;;OAIG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAKxC;;;;OAIG;IACH,WAAW,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAKvC;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/B;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKtC;;;;OAIG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKxC;;;;OAIG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKxC,KAAK,IAAI,WAAW;CAIvB;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW,CAAC,iBAAiB,CAAC;IAC5D,cAAc,EAAE,MAAM,CAAC;IAEvB,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,WAAW,EAAE,OAAO,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;IAEnB,aAAa,EAAE,MAAM,CAAC;IAEtB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;IAEvB,WAAW,EAAE,aAAa,CAAC;IAE3B,KAAK,EAAE,UAAU,CAAC;IAElB,KAAK,EAAE,MAAM,CAAC;gBAET,OAAO,EAAE,kBAAkB;IAkBvC,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAGD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,MAAM,KAAK,OAAO,IAAI,kBAAkB,CAEvC;IAED,cAAc,IAAI,iBAAiB;CAkBtC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { BaseLayoutParams } from './common';
18
+ import { GraphLayout, GraphLayoutBuilder } from './common';
19
+ declare class ForceAtlasLayoutBuilder extends GraphLayoutBuilder<ForceAtlasLayout> {
20
+ _barnesHutOptimize: boolean;
21
+ _edgeWeightInfluence: number;
22
+ _gravity: number;
23
+ _iterations: number;
24
+ _linLogMode: boolean;
25
+ _outboundAttractionDistribution: boolean;
26
+ _scalingRatio: number;
27
+ _strongGravityMode: boolean;
28
+ /**
29
+ * Toggle Barnes-Hut optimization
30
+ *
31
+ * @param optimize whether to enable the optimization
32
+ */
33
+ barnesHutOptimize(optimize: boolean): this;
34
+ /**
35
+ * Set the influence of the edge’s weights on the layout
36
+ *
37
+ * @param influence influence parameter
38
+ */
39
+ edgeWeightInfluence(influence: number): this;
40
+ /**
41
+ * Set the gravity parameter
42
+ *
43
+ * @param grav gravity param
44
+ */
45
+ gravity(grav: number): this;
46
+ /**
47
+ * Set the number of iterations to run at once
48
+ *
49
+ * @param iters number of iters to run
50
+ */
51
+ iterations(iters: number): this;
52
+ /**
53
+ * Toggle linLog mode
54
+ *
55
+ * @param linLog whether to enable linLog mode
56
+ */
57
+ linLogMode(linLog: boolean): this;
58
+ /**
59
+ * Toggle outboundAttractionDistribution mode
60
+ *
61
+ * @param attractionDistribution whether to enable attraction distribution mode
62
+ */
63
+ outboundAttractionDistribution(attractionDistribution: boolean): this;
64
+ /**
65
+ * Set the scaling ratio
66
+ *
67
+ * @param ratio new scaling ratio
68
+ */
69
+ scalingRatio(ratio: number): this;
70
+ /**
71
+ * Toggle strong gravity mode
72
+ *
73
+ * @param enableStrongGravity whether to enable the strong gravity mode
74
+ */
75
+ strongGravityMode(enableStrongGravity: boolean): this;
76
+ build(): ForceAtlasLayout;
77
+ }
78
+ export interface ForceAtlasLayoutParams extends BaseLayoutParams {
79
+ barnesHutOptimize: boolean;
80
+ edgeWeightInfluence: number;
81
+ gravity: number;
82
+ iterations: number;
83
+ linLogMode: boolean;
84
+ outboundAttractionDistribution: boolean;
85
+ scalingRatio: number;
86
+ strongGravityMode: boolean;
87
+ }
88
+ export default class ForceAtlasLayout extends GraphLayout<ForceAtlasLayoutParams> {
89
+ barnesHutOptimize: boolean;
90
+ edgeWeightInfluence: number;
91
+ gravity: number;
92
+ iterations: number;
93
+ linLogMode: boolean;
94
+ outboundAttractionDistribution: boolean;
95
+ scalingRatio: number;
96
+ strongGravityMode: boolean;
97
+ constructor(builder: ForceAtlasLayoutBuilder);
98
+ get name(): string;
99
+ static get Builder(): ForceAtlasLayoutBuilder;
100
+ toLayoutParams(): ForceAtlasLayoutParams;
101
+ }
102
+ export {};
103
+ //# sourceMappingURL=force-atlas-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"force-atlas-layout.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/force-atlas-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,cAAM,uBAAwB,SAAQ,kBAAkB,CAAC,gBAAgB,CAAC;IACtE,kBAAkB,UAAS;IAE3B,oBAAoB,SAAK;IAEzB,QAAQ,SAAO;IAEf,WAAW,SAAU;IAErB,WAAW,UAAQ;IAEnB,+BAA+B,UAAQ;IAEvC,aAAa,SAAK;IAElB,kBAAkB,UAAS;IAE3B;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAK1C;;;;OAIG;IACH,mB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sB;CAa3C"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { GraphLayout, type GraphLayoutBuilder } from './common';
18
+ export { default as CustomLayout } from './custom-layout';
19
+ export { default as MarketingLayout } from './marketing-layout';
20
+ export { default as PlanarLayout } from './planar-layout';
21
+ export { default as SpringLayout } from './spring-layout';
22
+ export { default as CircularLayout } from './circular-layout';
23
+ export { default as ForceAtlasLayout } from './force-atlas-layout';
24
+ export { default as FcoseLayout } from './fcose-layout';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { DirectionType, GraphTiers, TieredGraphLayoutBuilder } from '../../types';
18
+ import type { BaseLayoutParams } from './common';
19
+ import { GraphLayout, GraphLayoutBuilder } from './common';
20
+ export type TargetLocation = 'center' | 'bottom';
21
+ declare class MarketingLayoutBuilder extends GraphLayoutBuilder<MarketingLayout> implements TieredGraphLayoutBuilder {
22
+ _targetLocation: TargetLocation;
23
+ _tierSeparation: number;
24
+ orientation: DirectionType;
25
+ tiers: GraphTiers;
26
+ /**
27
+ * Sets the target location and returns the builder
28
+ *
29
+ * @param location location of the target node
30
+ */
31
+ targetLocation(location: TargetLocation): this;
32
+ /**
33
+ * Set tier separation
34
+ *
35
+ * @param separation separation
36
+ */
37
+ tierSeparation(separation: number): this;
38
+ build(): MarketingLayout;
39
+ }
40
+ export interface MarketingLayoutParams extends BaseLayoutParams {
41
+ targetLocation: TargetLocation;
42
+ tierSeparation: number;
43
+ orientation: DirectionType;
44
+ tiers: GraphTiers;
45
+ }
46
+ /**
47
+ * The Marketing layout uses a force simulation with strong forces to lay out nodes in a way
48
+ * that works well with a low number of nodes.
49
+ * The layout does not keep the force simulation running, instead it manually runs a number of ticks
50
+ * whenever the layout is updated.
51
+ */
52
+ export default class MarketingLayout extends GraphLayout<MarketingLayoutParams> {
53
+ targetLocation: TargetLocation;
54
+ tierSeparation: number;
55
+ orientation: DirectionType;
56
+ tiers: GraphTiers;
57
+ constructor(builder: MarketingLayoutBuilder);
58
+ get name(): string;
59
+ static get Builder(): MarketingLayoutBuilder;
60
+ toLayoutParams(): MarketingLayoutParams;
61
+ }
62
+ export {};
63
+ //# sourceMappingURL=marketing-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-layout.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/marketing-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD,cAAM,sBAAuB,SAAQ,kBAAkB,CAAC,eAAe,CAAE,YAAW,wBAAwB;IACxG,eAAe,EAAE,cAAc,CAAY;IAE3C,eAAe,SAAO;IAEtB,WAAW,EAAE,aAAa,CAAgB;IAE1C,KAAK,EAAE,UAAU,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAK9C;;;;OAIG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKxC,KAAK,IAAI,eAAe;CAI3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC3D,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,aAAa,CAAC;IAC3B,KAAK,EAAE,UAAU,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW,CAAC,qBAAqB,CAAC;IACpE,cAAc,EAAE,cAAc,CAAY;IAE1C,cAAc,EAAE,MAAM,CAAC;IAEvB,WAAW,EAAE,aAAa,CAAC;IAE3B,KAAK,EAAE,UAAU,CAAC;gBAEb,OAAO,EAAE,sBAAsB;IAS3C,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,MAAM,KAAK,OAAO,IAAI,sBAAsB,CAE3C;IAED,cAAc,IAAI,qBAAqB;CAS1C"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { LayoutMapping, XYPosition } from 'graphology-layout/utils';
18
+ import type { DirectionType, GraphTiers, SimulationGraph, TieredGraphLayoutBuilder } from '../../types';
19
+ import { PlanarLayeringAlgorithm } from '../../types';
20
+ import type { BaseLayoutParams, LayoutComputationResult } from './common';
21
+ import { GraphLayout, GraphLayoutBuilder } from './common';
22
+ declare class PlanarLayoutBuilder extends GraphLayoutBuilder<PlanarLayout> {
23
+ _orientation: DirectionType;
24
+ _tiers: GraphTiers;
25
+ _layeringAlgorithm: PlanarLayeringAlgorithm;
26
+ /**
27
+ * Sets the nodes orientation
28
+ *
29
+ * @param direction vertical or horizontal
30
+ */
31
+ orientation(direction: DirectionType): this;
32
+ /**
33
+ * Sets the tiers for the graph
34
+ *
35
+ * @param tiers the tiers to use
36
+ */
37
+ tiers(tiers: GraphTiers): this;
38
+ /**
39
+ * Sets the layering algorithm to use
40
+ *
41
+ * @param algorithm the layering algorithm to use
42
+ */
43
+ layeringAlgorithm(algorithm: PlanarLayeringAlgorithm): this;
44
+ build(): PlanarLayout;
45
+ }
46
+ export interface PlanarLayoutParams extends BaseLayoutParams {
47
+ orientation: DirectionType;
48
+ tiers: GraphTiers;
49
+ layeringAlgorithm: PlanarLayeringAlgorithm;
50
+ }
51
+ /**
52
+ * The Planar layout utilises the sugiyama algorithm to lay out nodes in a way that minimises
53
+ * edge crossings.
54
+ */
55
+ export default class PlanarLayout extends GraphLayout<PlanarLayoutParams> implements TieredGraphLayoutBuilder {
56
+ orientation: DirectionType;
57
+ tiers: GraphTiers;
58
+ layeringAlgorithm: PlanarLayeringAlgorithm;
59
+ constructor(builder: PlanarLayoutBuilder);
60
+ get supportsDrag(): boolean;
61
+ applyLayout(graph: SimulationGraph, forceUpdate?: (layout: LayoutMapping<XYPosition>, edgePoints: LayoutMapping<XYPosition[]>) => void): Promise<LayoutComputationResult>;
62
+ get name(): string;
63
+ static get Builder(): PlanarLayoutBuilder;
64
+ toLayoutParams(): PlanarLayoutParams;
65
+ }
66
+ export {};
67
+ //# sourceMappingURL=planar-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planar-layout.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/planar-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,cAAM,mBAAoB,SAAQ,kBAAkB,CAAC,YAAY,CAAC;IAC9D,YAAY,EAAE,aAAa,CAAgB;IAE3C,MAAM,EAAE,UAAU,CAAC;IAEnB,kBAAkB,EAAE,uBAAuB,CAAmC;IAE9E;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI;IAK3C;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAK9B;;;;OAIG;IACH,iBAAiB,CAAC,SAAS,EAAE,uBAAuB,GAAG,IAAI;IAK3D,KAAK,IAAI,YAAY;CAIxB;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,WAAW,EAAE,aAAa,CAAC;IAC3B,KAAK,EAAE,UAAU,CAAC;IAClB,iBAAiB,EAAE,uBAAuB,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW,CAAC,kBAAkB,CAAE,YAAW,wBAAwB;IAClG,WAAW,EAAE,aAAa,CAAgB;IAE1C,KAAK,EAAE,UAAU,CAAC;IAElB,iBAAiB,EAAE,uBAAuB,CAAmC;gBAExE,OAAO,EAAE,mBAAmB;IAQxC,IAAI,YAAY,IAAI,OAAO,CAE1B;IAEK,WAAW,CACb,KAAK,EAAE,eAAe,EACtB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC,KAAK,IAAI,GACnG,OAAO,CAAC,uBAAuB,CAAC;IAqBnC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,MAAM,KAAK,OAAO,IAAI,mBAAmB,CAExC;IAED,cAAc,IAAI,kBAAkB;CAQvC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Copyright 2023 Impulse Innovations Limited
3
+ *
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { LayoutMapping, XYPosition } from 'graphology-layout/utils';
18
+ import type { DirectionType, GraphTiers, GroupingLayoutBuilder, SimulationGraph, TieredGraphLayoutBuilder } from '../../types';
19
+ import type { BaseLayoutParams, LayoutComputationResult } from './common';
20
+ import { GraphLayout, GraphLayoutBuilder } from './common';
21
+ declare class SpringLayoutBuilder extends GraphLayoutBuilder<SpringLayout> implements TieredGraphLayoutBuilder, GroupingLayoutBuilder {
22
+ _collisionForce: number;
23
+ _gravity: number;
24
+ _linkForce: number;
25
+ _warmupTicks: number;
26
+ _tierSeparation: number;
27
+ _groupRepelStrength: number;
28
+ orientation: DirectionType;
29
+ tiers: GraphTiers;
30
+ group: string;
31
+ /**
32
+ * Set the multiplier for collision force
33
+ *
34
+ * @param force force to set
35
+ */
36
+ collisionForce(force: number): this;
37
+ /**
38
+ * Set the multiplier for link force
39
+ *
40
+ * @param force force to set
41
+ */
42
+ linkForce(force: number): this;
43
+ /**
44
+ * Set the gravity force
45
+ *
46
+ * @param force force to set
47
+ */
48
+ gravity(force: number): this;
49
+ /**
50
+ * Sets the number of ticks to run the simulation for before displaying the layout
51
+ *
52
+ * @param ticks number of ticks to run before display
53
+ */
54
+ warmupTicks(ticks: number): this;
55
+ /**
56
+ * Set tier separation
57
+ *
58
+ * @param separation separation
59
+ */
60
+ tierSeparation(separation: number): this;
61
+ /**
62
+ * Set the repulsive force strength between groups
63
+ *
64
+ * @param force force
65
+ */
66
+ groupRepelStrength(force: number): this;
67
+ build(): SpringLayout;
68
+ }
69
+ export interface SpringLayoutParams extends BaseLayoutParams {
70
+ collisionForce: number;
71
+ gravity: number;
72
+ linkForce: number;
73
+ warmupTicks: number;
74
+ tierSeparation: number;
75
+ groupRepelStrength: number;
76
+ orientation: DirectionType;
77
+ tiers: GraphTiers;
78
+ group: string;
79
+ }
80
+ /**
81
+ * The Spring layout uses a force simulation to position nodes.
82
+ * The layout keeps the simulation running as nodes are being dragged which produces the spring behaviour of edges.
83
+ */
84
+ export default class SpringLayout extends GraphLayout<SpringLayoutParams> {
85
+ collisionForce: number;
86
+ gravity: number;
87
+ linkForce: number;
88
+ warmupTicks: number;
89
+ tierSeparation: number;
90
+ groupRepelStrength: number;
91
+ orientation: DirectionType;
92
+ tiers: GraphTiers;
93
+ group: string;
94
+ constructor(builder: SpringLayoutBuilder);
95
+ get name(): string;
96
+ static get Builder(): SpringLayoutBuilder;
97
+ applyLayout(graph: SimulationGraph, forceUpdate?: (layout: LayoutMapping<XYPosition>, edgePoints?: LayoutMapping<XYPosition[]>) => void): Promise<LayoutComputationResult>;
98
+ toLayoutParams(): SpringLayoutParams;
99
+ }
100
+ export {};
101
+ //# sourceMappingURL=spring-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spring-layout.d.ts","sourceRoot":"","sources":["../../../../src/shared/graph-layout/spring-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EACR,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,cAAM,mBACF,SAAQ,kBAAkB,CAAC,YAAY,CACvC,YAAW,wBAAwB,EAAE,qBAAqB;IAE1D,eAAe,SAAK;IAEpB,QAAQ,SAAO;IAEf,UAAU,SAAK;IAEf,YAAY,SAAO;IAEnB,eAAe,SAAO;IAEtB,mBAAmB,SAAQ;IAE3B,WAAW,E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,MAAM,CAEjB;IAED,MAAM,KAAK,OAAO,IAAI,mBAAmB,CAExC;IAEK,WAAW,CACb,KAAK,EAAE,eAAe,EACtB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC,KAAK,IAAI,GACpG,OAAO,CAAC,uBAAuB,CAAC;IAgBnC,cAAc,IAAI,kBAAkB;CAcvC"}
@@ -0,0 +1,5 @@
1
+ import type { SimulationGraph } from '../../../types';
2
+ import type { CircularLayoutParams } from '../circular-layout';
3
+ import type { LayoutComputationResult } from '../common';
4
+ export default function compute(layoutParams: CircularLayoutParams, graph: SimulationGraph): LayoutComputationResult;
5
+ //# sourceMappingURL=circular.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circular.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/circular.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,YAAY,EAAE,oBAAoB,EAAE,KAAK,EAAE,eAAe,GAAG,uBAAuB,CAInH"}
@@ -0,0 +1,22 @@
1
+ import type { LayoutMapping, XYPosition } from 'graphology-layout/utils';
2
+ import * as PIXI from 'pixi.js';
3
+ import { type SimulationGraph } from '../../../types';
4
+ import type { GraphLayout, LayoutComputationCallbacks, SerializableLayoutComputationResult } from '../common';
5
+ interface LayoutEvents {
6
+ computationStart: () => void;
7
+ computationEnd: () => void;
8
+ }
9
+ /**
10
+ * Worker class that handles the layout computation.
11
+ * Creates a web worker and uses it to compute the layout.
12
+ */
13
+ export declare class LayoutWorker extends PIXI.EventEmitter<LayoutEvents> {
14
+ private worker;
15
+ private remoteApi;
16
+ constructor();
17
+ applyLayout(layoutInstance: GraphLayout, graph: SimulationGraph, forceUpdate?: (layout: LayoutMapping<XYPosition>, edgePoints?: LayoutMapping<XYPosition[]>) => void): Promise<SerializableLayoutComputationResult>;
18
+ invokeCallback<CbName extends keyof LayoutComputationCallbacks>(cbName: CbName, ...args: Parameters<LayoutComputationCallbacks[CbName]>): Promise<void>;
19
+ destroy(): void;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,0BAA0B,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAO9G,UAAU,YAAY;IAClB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,SAAS,CAA+B;;IAW1C,WAAW,CACb,cAAc,EAAE,WAAW,EAC3B,KAAK,EAAE,eAAe,EACtB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC,KAAK,IAAI,GACpG,OAAO,CAAC,mCAAmC,CAAC;IAczC,cAAc,CAAC,MAAM,SAAS,MAAM,0BAA0B,EAChE,MAAM,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,UAAU,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,GACxD,OAAO,CAAC,IAAI,CAAC;IAKT,OAAO,IAAI,IAAI;CAGzB"}
@@ -0,0 +1,18 @@
1
+ import type { FcoseRelativePlacementConstraint } from 'cytoscape-fcose';
2
+ import { type DirectionType, type GraphTiers, type SimulationGraph } from '../../../types';
3
+ import type { LayoutComputationResult } from '../common';
4
+ import type { FcoseLayoutParams } from '../fcose-layout';
5
+ interface TiersProperties {
6
+ alignmentConstraint?: string[][];
7
+ relativePlacementConstraint?: FcoseRelativePlacementConstraint[];
8
+ }
9
+ /**
10
+ * Get properties values for tiered fcose layout
11
+ * @param tiers node tiers defined by the user
12
+ * @param orientation the orientation of the graph
13
+ * @param tierSeparation tier separation
14
+ * */
15
+ export declare function getTieredLayoutProperties(graph: SimulationGraph, tiers: GraphTiers, orientation: DirectionType, tierSeparation: number): TiersProperties;
16
+ export default function compute(layoutParams: FcoseLayoutParams, graph: SimulationGraph): Promise<LayoutComputationResult>;
17
+ export {};
18
+ //# sourceMappingURL=fcose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fcose.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/fcose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAI5F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,UAAU,eAAe;IACrB,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACjC,2BAA2B,CAAC,EAAE,gCAAgC,EAAE,CAAC;CACpE;AAuHD;;;;;MAKM;AACN,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,aAAa,EAC1B,cAAc,EAAE,MAAM,GACvB,eAAe,CAyBjB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAC3B,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EAAE,eAAe,GACvB,OAAO,CAAC,uBAAuB,CAAC,CAoGlC"}
@@ -0,0 +1,5 @@
1
+ import { type SimulationGraph } from '../../../types';
2
+ import type { LayoutComputationResult } from '../common';
3
+ import type { ForceAtlasLayoutParams } from '../force-atlas-layout';
4
+ export default function compute(layoutParams: ForceAtlasLayoutParams, graph: SimulationGraph): LayoutComputationResult;
5
+ //# sourceMappingURL=force-atlas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"force-atlas.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/force-atlas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,YAAY,EAAE,sBAAsB,EAAE,KAAK,EAAE,eAAe,GAAG,uBAAuB,CAsDrH"}
@@ -0,0 +1,5 @@
1
+ import type { SimulationGraph } from '../../../types';
2
+ import type { LayoutComputationResult } from '../common';
3
+ import type { MarketingLayoutParams } from '../marketing-layout';
4
+ export default function compute(layoutParams: MarketingLayoutParams, graph: SimulationGraph): LayoutComputationResult;
5
+ //# sourceMappingURL=marketing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/marketing.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAA8B,MAAM,gBAAgB,CAAC;AAElF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAGjE,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,YAAY,EAAE,qBAAqB,EAAE,KAAK,EAAE,eAAe,GAAG,uBAAuB,CA8EpH"}
@@ -0,0 +1,5 @@
1
+ import { type SimulationGraph } from '../../../types';
2
+ import type { LayoutComputationResult } from '../common';
3
+ import type { PlanarLayoutParams } from '../planar-layout';
4
+ export default function compute(layoutParams: PlanarLayoutParams, currentGraph: SimulationGraph): LayoutComputationResult;
5
+ //# sourceMappingURL=planar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planar.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/planar.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4C,KAAK,eAAe,EAAuB,MAAM,gBAAgB,CAAC;AAErH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAiH3D,MAAM,CAAC,OAAO,UAAU,OAAO,CAC3B,YAAY,EAAE,kBAAkB,EAChC,YAAY,EAAE,eAAe,GAC9B,uBAAuB,CAoDzB"}
@@ -0,0 +1,19 @@
1
+ import * as d3 from 'd3';
2
+ import type { LayoutMapping, XYPosition } from 'graphology-layout/utils';
3
+ import type { D3SimulationEdge, DirectionType, GraphTiers, SimulationGraph, SimulationNode, SimulationNodeWithCategory } from '../../../types';
4
+ import type { LayoutComputationResult } from '../common';
5
+ import type { SpringLayoutParams } from '../spring-layout';
6
+ /**
7
+ * Apply forces which are needed as part of a tiered layout.
8
+ * There is one force which snaps the nodes to the relevant layers and another force ordering the nodes within the layers.
9
+ *
10
+ * @param simulation the D3 simulation
11
+ * @param graph the simulation graph
12
+ * @param nodes array of the nodes
13
+ * @param tiers the tiers passed to the layout
14
+ * @param tiersSeparation the separation between the tiers
15
+ * @param orientation the orientation of the layout
16
+ */
17
+ export declare function applyTierForces(simulation: d3.Simulation<SimulationNode, D3SimulationEdge>, graph: SimulationGraph, nodes: SimulationNodeWithCategory[], tiers: GraphTiers, tiersSeparation: number, orientation: DirectionType): void;
18
+ export default function compute(layoutParams: SpringLayoutParams, graph: SimulationGraph, forceUpdate: (layout: LayoutMapping<XYPosition>) => void): LayoutComputationResult;
19
+ //# sourceMappingURL=spring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spring.d.ts","sourceRoot":"","sources":["../../../../../src/shared/graph-layout/worker/spring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,KAAK,EACR,gBAAgB,EAChB,aAAa,EACb,UAAU,EAIV,eAAe,EACf,cAAc,EACd,0BAA0B,EAC7B,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAsD3D;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAC3D,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,0BAA0B,EAAE,EACnC,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,aAAa,GAC3B,IAAI,CA8BN;AA+CD,MAAM,CAAC,OAAO,UAAU,OAAO,CAC3B,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,IAAI,GACzD,uBAAuB,CAoKzB"}