@darajs/ui-causal-graph-editor 1.0.0-a.1

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 (338) hide show
  1. package/LICENSE +201 -0
  2. package/dist/graph-viewer/causal-graph-editor.d.ts +44 -0
  3. package/dist/graph-viewer/causal-graph-editor.d.ts.map +1 -0
  4. package/dist/graph-viewer/causal-graph-editor.js +357 -0
  5. package/dist/graph-viewer/causal-graph-editor.js.map +1 -0
  6. package/dist/graph-viewer/utils/use-iterate-edges.d.ts +32 -0
  7. package/dist/graph-viewer/utils/use-iterate-edges.d.ts.map +1 -0
  8. package/dist/graph-viewer/utils/use-iterate-edges.js +34 -0
  9. package/dist/graph-viewer/utils/use-iterate-edges.js.map +1 -0
  10. package/dist/graph-viewer/utils/use-iterate-nodes.d.ts +32 -0
  11. package/dist/graph-viewer/utils/use-iterate-nodes.d.ts.map +1 -0
  12. package/dist/graph-viewer/utils/use-iterate-nodes.js +30 -0
  13. package/dist/graph-viewer/utils/use-iterate-nodes.js.map +1 -0
  14. package/dist/index.d.ts +22 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +21 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/jest-setup.d.ts +18 -0
  19. package/dist/jest-setup.d.ts.map +1 -0
  20. package/dist/jest-setup.js +18 -0
  21. package/dist/jest-setup.js.map +1 -0
  22. package/dist/node-hierarchy-builder/index.d.ts +19 -0
  23. package/dist/node-hierarchy-builder/index.d.ts.map +1 -0
  24. package/dist/node-hierarchy-builder/index.js +18 -0
  25. package/dist/node-hierarchy-builder/index.js.map +1 -0
  26. package/dist/node-hierarchy-builder/layer-divider.d.ts +15 -0
  27. package/dist/node-hierarchy-builder/layer-divider.d.ts.map +1 -0
  28. package/dist/node-hierarchy-builder/layer-divider.js +122 -0
  29. package/dist/node-hierarchy-builder/layer-divider.js.map +1 -0
  30. package/dist/node-hierarchy-builder/layer-label-editor.d.ts +24 -0
  31. package/dist/node-hierarchy-builder/layer-label-editor.d.ts.map +1 -0
  32. package/dist/node-hierarchy-builder/layer-label-editor.js +93 -0
  33. package/dist/node-hierarchy-builder/layer-label-editor.js.map +1 -0
  34. package/dist/node-hierarchy-builder/layer.d.ts +35 -0
  35. package/dist/node-hierarchy-builder/layer.d.ts.map +1 -0
  36. package/dist/node-hierarchy-builder/layer.js +114 -0
  37. package/dist/node-hierarchy-builder/layer.js.map +1 -0
  38. package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts +27 -0
  39. package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts.map +1 -0
  40. package/dist/node-hierarchy-builder/node-hierarchy-builder.js +190 -0
  41. package/dist/node-hierarchy-builder/node-hierarchy-builder.js.map +1 -0
  42. package/dist/node-hierarchy-builder/node.d.ts +21 -0
  43. package/dist/node-hierarchy-builder/node.d.ts.map +1 -0
  44. package/dist/node-hierarchy-builder/node.js +90 -0
  45. package/dist/node-hierarchy-builder/node.js.map +1 -0
  46. package/dist/node-hierarchy-builder/shared.d.ts +93 -0
  47. package/dist/node-hierarchy-builder/shared.d.ts.map +1 -0
  48. package/dist/node-hierarchy-builder/shared.js +88 -0
  49. package/dist/node-hierarchy-builder/shared.js.map +1 -0
  50. package/dist/shared/causal-graph-store.d.ts +107 -0
  51. package/dist/shared/causal-graph-store.d.ts.map +1 -0
  52. package/dist/shared/causal-graph-store.js +142 -0
  53. package/dist/shared/causal-graph-store.js.map +1 -0
  54. package/dist/shared/editor-overlay/buttons/add-node-button.d.ts +7 -0
  55. package/dist/shared/editor-overlay/buttons/add-node-button.d.ts.map +1 -0
  56. package/dist/shared/editor-overlay/buttons/add-node-button.js +31 -0
  57. package/dist/shared/editor-overlay/buttons/add-node-button.js.map +1 -0
  58. package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts +7 -0
  59. package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts.map +1 -0
  60. package/dist/shared/editor-overlay/buttons/center-graph-button.js +32 -0
  61. package/dist/shared/editor-overlay/buttons/center-graph-button.js.map +1 -0
  62. package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts +27 -0
  63. package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts.map +1 -0
  64. package/dist/shared/editor-overlay/buttons/drag-mode-button.js +35 -0
  65. package/dist/shared/editor-overlay/buttons/drag-mode-button.js.map +1 -0
  66. package/dist/shared/editor-overlay/buttons/index.d.ts +21 -0
  67. package/dist/shared/editor-overlay/buttons/index.d.ts.map +1 -0
  68. package/dist/shared/editor-overlay/buttons/index.js +21 -0
  69. package/dist/shared/editor-overlay/buttons/index.js.map +1 -0
  70. package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts +7 -0
  71. package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts.map +1 -0
  72. package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js +28 -0
  73. package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js.map +1 -0
  74. package/dist/shared/editor-overlay/floating-elements.d.ts +29 -0
  75. package/dist/shared/editor-overlay/floating-elements.d.ts.map +1 -0
  76. package/dist/shared/editor-overlay/floating-elements.js +17 -0
  77. package/dist/shared/editor-overlay/floating-elements.js.map +1 -0
  78. package/dist/shared/editor-overlay/index.d.ts +22 -0
  79. package/dist/shared/editor-overlay/index.d.ts.map +1 -0
  80. package/dist/shared/editor-overlay/index.js +22 -0
  81. package/dist/shared/editor-overlay/index.js.map +1 -0
  82. package/dist/shared/editor-overlay/legend/index.d.ts +19 -0
  83. package/dist/shared/editor-overlay/legend/index.d.ts.map +1 -0
  84. package/dist/shared/editor-overlay/legend/index.js +19 -0
  85. package/dist/shared/editor-overlay/legend/index.js.map +1 -0
  86. package/dist/shared/editor-overlay/legend/legend-data.d.ts +34 -0
  87. package/dist/shared/editor-overlay/legend/legend-data.d.ts.map +1 -0
  88. package/dist/shared/editor-overlay/legend/legend-data.js +41 -0
  89. package/dist/shared/editor-overlay/legend/legend-data.js.map +1 -0
  90. package/dist/shared/editor-overlay/legend/legend-list.d.ts +6 -0
  91. package/dist/shared/editor-overlay/legend/legend-list.d.ts.map +1 -0
  92. package/dist/shared/editor-overlay/legend/legend-list.js +96 -0
  93. package/dist/shared/editor-overlay/legend/legend-list.js.map +1 -0
  94. package/dist/shared/editor-overlay/legend/legend.d.ts +7 -0
  95. package/dist/shared/editor-overlay/legend/legend.d.ts.map +1 -0
  96. package/dist/shared/editor-overlay/legend/legend.js +80 -0
  97. package/dist/shared/editor-overlay/legend/legend.js.map +1 -0
  98. package/dist/shared/editor-overlay/overlay.d.ts +35 -0
  99. package/dist/shared/editor-overlay/overlay.d.ts.map +1 -0
  100. package/dist/shared/editor-overlay/overlay.js +41 -0
  101. package/dist/shared/editor-overlay/overlay.js.map +1 -0
  102. package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts +8 -0
  103. package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts.map +1 -0
  104. package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js +40 -0
  105. package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js.map +1 -0
  106. package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts +22 -0
  107. package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts.map +1 -0
  108. package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js +36 -0
  109. package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js.map +1 -0
  110. package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts +35 -0
  111. package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts.map +1 -0
  112. package/dist/shared/editor-overlay/panel-content/edge/editor-props.js +2 -0
  113. package/dist/shared/editor-overlay/panel-content/edge/editor-props.js.map +1 -0
  114. package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts +23 -0
  115. package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts.map +1 -0
  116. package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js +10 -0
  117. package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js.map +1 -0
  118. package/dist/shared/editor-overlay/panel-content/edge/index.d.ts +18 -0
  119. package/dist/shared/editor-overlay/panel-content/edge/index.d.ts.map +1 -0
  120. package/dist/shared/editor-overlay/panel-content/edge/index.js +18 -0
  121. package/dist/shared/editor-overlay/panel-content/edge/index.js.map +1 -0
  122. package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts +23 -0
  123. package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts.map +1 -0
  124. package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js +10 -0
  125. package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js.map +1 -0
  126. package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts +7 -0
  127. package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts.map +1 -0
  128. package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js +31 -0
  129. package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js.map +1 -0
  130. package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts +27 -0
  131. package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts.map +1 -0
  132. package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js +53 -0
  133. package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js.map +1 -0
  134. package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts +15 -0
  135. package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts.map +1 -0
  136. package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js +60 -0
  137. package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js.map +1 -0
  138. package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts +21 -0
  139. package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts.map +1 -0
  140. package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js +90 -0
  141. package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js.map +1 -0
  142. package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts +17 -0
  143. package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts.map +1 -0
  144. package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js +61 -0
  145. package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js.map +1 -0
  146. package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts +19 -0
  147. package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts.map +1 -0
  148. package/dist/shared/editor-overlay/panel-content/edge/sections/index.js +19 -0
  149. package/dist/shared/editor-overlay/panel-content/edge/sections/index.js.map +1 -0
  150. package/dist/shared/editor-overlay/panel-content/index.d.ts +20 -0
  151. package/dist/shared/editor-overlay/panel-content/index.d.ts.map +1 -0
  152. package/dist/shared/editor-overlay/panel-content/index.js +20 -0
  153. package/dist/shared/editor-overlay/panel-content/index.js.map +1 -0
  154. package/dist/shared/editor-overlay/panel-content/node/index.d.ts +18 -0
  155. package/dist/shared/editor-overlay/panel-content/node/index.d.ts.map +1 -0
  156. package/dist/shared/editor-overlay/panel-content/node/index.js +18 -0
  157. package/dist/shared/editor-overlay/panel-content/node/index.js.map +1 -0
  158. package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts +11 -0
  159. package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts.map +1 -0
  160. package/dist/shared/editor-overlay/panel-content/node/label-editor.js +89 -0
  161. package/dist/shared/editor-overlay/panel-content/node/label-editor.js.map +1 -0
  162. package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts +32 -0
  163. package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts.map +1 -0
  164. package/dist/shared/editor-overlay/panel-content/node/node-info-content.js +12 -0
  165. package/dist/shared/editor-overlay/panel-content/node/node-info-content.js.map +1 -0
  166. package/dist/shared/editor-overlay/panel-content/panel-content.d.ts +17 -0
  167. package/dist/shared/editor-overlay/panel-content/panel-content.d.ts.map +1 -0
  168. package/dist/shared/editor-overlay/panel-content/panel-content.js +27 -0
  169. package/dist/shared/editor-overlay/panel-content/panel-content.js.map +1 -0
  170. package/dist/shared/editor-overlay/panel-content/panel-title.d.ts +12 -0
  171. package/dist/shared/editor-overlay/panel-content/panel-title.d.ts.map +1 -0
  172. package/dist/shared/editor-overlay/panel-content/panel-title.js +48 -0
  173. package/dist/shared/editor-overlay/panel-content/panel-title.js.map +1 -0
  174. package/dist/shared/editor-overlay/panel-content/styled.d.ts +9 -0
  175. package/dist/shared/editor-overlay/panel-content/styled.d.ts.map +1 -0
  176. package/dist/shared/editor-overlay/panel-content/styled.js +43 -0
  177. package/dist/shared/editor-overlay/panel-content/styled.js.map +1 -0
  178. package/dist/shared/editor-overlay/positional-divs.d.ts +14 -0
  179. package/dist/shared/editor-overlay/positional-divs.d.ts.map +1 -0
  180. package/dist/shared/editor-overlay/positional-divs.js +117 -0
  181. package/dist/shared/editor-overlay/positional-divs.js.map +1 -0
  182. package/dist/shared/editor-overlay/search-bar/index.d.ts +19 -0
  183. package/dist/shared/editor-overlay/search-bar/index.d.ts.map +1 -0
  184. package/dist/shared/editor-overlay/search-bar/index.js +19 -0
  185. package/dist/shared/editor-overlay/search-bar/index.js.map +1 -0
  186. package/dist/shared/editor-overlay/search-bar/search-bar.d.ts +21 -0
  187. package/dist/shared/editor-overlay/search-bar/search-bar.d.ts.map +1 -0
  188. package/dist/shared/editor-overlay/search-bar/search-bar.js +160 -0
  189. package/dist/shared/editor-overlay/search-bar/search-bar.js.map +1 -0
  190. package/dist/shared/editor-overlay/search-bar/use-search.d.ts +32 -0
  191. package/dist/shared/editor-overlay/search-bar/use-search.d.ts.map +1 -0
  192. package/dist/shared/editor-overlay/search-bar/use-search.js +75 -0
  193. package/dist/shared/editor-overlay/search-bar/use-search.js.map +1 -0
  194. package/dist/shared/graph-layout/circular-layout.d.ts +18 -0
  195. package/dist/shared/graph-layout/circular-layout.d.ts.map +1 -0
  196. package/dist/shared/graph-layout/circular-layout.js +38 -0
  197. package/dist/shared/graph-layout/circular-layout.js.map +1 -0
  198. package/dist/shared/graph-layout/common.d.ts +64 -0
  199. package/dist/shared/graph-layout/common.d.ts.map +1 -0
  200. package/dist/shared/graph-layout/common.js +42 -0
  201. package/dist/shared/graph-layout/common.js.map +1 -0
  202. package/dist/shared/graph-layout/custom-layout.d.ts +35 -0
  203. package/dist/shared/graph-layout/custom-layout.d.ts.map +1 -0
  204. package/dist/shared/graph-layout/custom-layout.js +29 -0
  205. package/dist/shared/graph-layout/custom-layout.js.map +1 -0
  206. package/dist/shared/graph-layout/fcose-layout.d.ts +88 -0
  207. package/dist/shared/graph-layout/fcose-layout.d.ts.map +1 -0
  208. package/dist/shared/graph-layout/fcose-layout.js +196 -0
  209. package/dist/shared/graph-layout/fcose-layout.js.map +1 -0
  210. package/dist/shared/graph-layout/force-atlas-layout.d.ts +79 -0
  211. package/dist/shared/graph-layout/force-atlas-layout.d.ts.map +1 -0
  212. package/dist/shared/graph-layout/force-atlas-layout.js +163 -0
  213. package/dist/shared/graph-layout/force-atlas-layout.js.map +1 -0
  214. package/dist/shared/graph-layout/index.d.ts +25 -0
  215. package/dist/shared/graph-layout/index.d.ts.map +1 -0
  216. package/dist/shared/graph-layout/index.js +25 -0
  217. package/dist/shared/graph-layout/index.js.map +1 -0
  218. package/dist/shared/graph-layout/marketing-layout.d.ts +30 -0
  219. package/dist/shared/graph-layout/marketing-layout.d.ts.map +1 -0
  220. package/dist/shared/graph-layout/marketing-layout.js +105 -0
  221. package/dist/shared/graph-layout/marketing-layout.js.map +1 -0
  222. package/dist/shared/graph-layout/planar-layout.d.ts +32 -0
  223. package/dist/shared/graph-layout/planar-layout.d.ts.map +1 -0
  224. package/dist/shared/graph-layout/planar-layout.js +95 -0
  225. package/dist/shared/graph-layout/planar-layout.js.map +1 -0
  226. package/dist/shared/graph-layout/spring-layout.d.ts +56 -0
  227. package/dist/shared/graph-layout/spring-layout.d.ts.map +1 -0
  228. package/dist/shared/graph-layout/spring-layout.js +148 -0
  229. package/dist/shared/graph-layout/spring-layout.js.map +1 -0
  230. package/dist/shared/parsers.d.ts +63 -0
  231. package/dist/shared/parsers.d.ts.map +1 -0
  232. package/dist/shared/parsers.js +176 -0
  233. package/dist/shared/parsers.js.map +1 -0
  234. package/dist/shared/pointer-context.d.ts +21 -0
  235. package/dist/shared/pointer-context.d.ts.map +1 -0
  236. package/dist/shared/pointer-context.js +23 -0
  237. package/dist/shared/pointer-context.js.map +1 -0
  238. package/dist/shared/rendering/background.d.ts +32 -0
  239. package/dist/shared/rendering/background.d.ts.map +1 -0
  240. package/dist/shared/rendering/background.js +91 -0
  241. package/dist/shared/rendering/background.js.map +1 -0
  242. package/dist/shared/rendering/colors.d.ts +27 -0
  243. package/dist/shared/rendering/colors.d.ts.map +1 -0
  244. package/dist/shared/rendering/colors.js +14 -0
  245. package/dist/shared/rendering/colors.js.map +1 -0
  246. package/dist/shared/rendering/edge/curve.d.ts +51 -0
  247. package/dist/shared/rendering/edge/curve.d.ts.map +1 -0
  248. package/dist/shared/rendering/edge/curve.js +122 -0
  249. package/dist/shared/rendering/edge/curve.js.map +1 -0
  250. package/dist/shared/rendering/edge/definitions.d.ts +71 -0
  251. package/dist/shared/rendering/edge/definitions.d.ts.map +1 -0
  252. package/dist/shared/rendering/edge/definitions.js +31 -0
  253. package/dist/shared/rendering/edge/definitions.js.map +1 -0
  254. package/dist/shared/rendering/edge/edge-object.d.ts +93 -0
  255. package/dist/shared/rendering/edge/edge-object.d.ts.map +1 -0
  256. package/dist/shared/rendering/edge/edge-object.js +483 -0
  257. package/dist/shared/rendering/edge/edge-object.js.map +1 -0
  258. package/dist/shared/rendering/edge/index.d.ts +19 -0
  259. package/dist/shared/rendering/edge/index.d.ts.map +1 -0
  260. package/dist/shared/rendering/edge/index.js +19 -0
  261. package/dist/shared/rendering/edge/index.js.map +1 -0
  262. package/dist/shared/rendering/edge/symbols.d.ts +40 -0
  263. package/dist/shared/rendering/edge/symbols.d.ts.map +1 -0
  264. package/dist/shared/rendering/edge/symbols.js +150 -0
  265. package/dist/shared/rendering/edge/symbols.js.map +1 -0
  266. package/dist/shared/rendering/engine.d.ts +342 -0
  267. package/dist/shared/rendering/engine.d.ts.map +1 -0
  268. package/dist/shared/rendering/engine.js +990 -0
  269. package/dist/shared/rendering/engine.js.map +1 -0
  270. package/dist/shared/rendering/node/definitions.d.ts +57 -0
  271. package/dist/shared/rendering/node/definitions.d.ts.map +1 -0
  272. package/dist/shared/rendering/node/definitions.js +2 -0
  273. package/dist/shared/rendering/node/definitions.js.map +1 -0
  274. package/dist/shared/rendering/node/index.d.ts +20 -0
  275. package/dist/shared/rendering/node/index.d.ts.map +1 -0
  276. package/dist/shared/rendering/node/index.js +19 -0
  277. package/dist/shared/rendering/node/index.js.map +1 -0
  278. package/dist/shared/rendering/node/node-object.d.ts +77 -0
  279. package/dist/shared/rendering/node/node-object.d.ts.map +1 -0
  280. package/dist/shared/rendering/node/node-object.js +241 -0
  281. package/dist/shared/rendering/node/node-object.js.map +1 -0
  282. package/dist/shared/rendering/node/utils.d.ts +33 -0
  283. package/dist/shared/rendering/node/utils.d.ts.map +1 -0
  284. package/dist/shared/rendering/node/utils.js +27 -0
  285. package/dist/shared/rendering/node/utils.js.map +1 -0
  286. package/dist/shared/rendering/svg.d.ts +26 -0
  287. package/dist/shared/rendering/svg.d.ts.map +1 -0
  288. package/dist/shared/rendering/svg.js +44 -0
  289. package/dist/shared/rendering/svg.js.map +1 -0
  290. package/dist/shared/rendering/text.d.ts +33 -0
  291. package/dist/shared/rendering/text.d.ts.map +1 -0
  292. package/dist/shared/rendering/text.js +107 -0
  293. package/dist/shared/rendering/text.js.map +1 -0
  294. package/dist/shared/rendering/texture-cache.d.ts +32 -0
  295. package/dist/shared/rendering/texture-cache.d.ts.map +1 -0
  296. package/dist/shared/rendering/texture-cache.js +76 -0
  297. package/dist/shared/rendering/texture-cache.js.map +1 -0
  298. package/dist/shared/rendering/use-render-engine.d.ts +86 -0
  299. package/dist/shared/rendering/use-render-engine.d.ts.map +1 -0
  300. package/dist/shared/rendering/use-render-engine.js +89 -0
  301. package/dist/shared/rendering/use-render-engine.js.map +1 -0
  302. package/dist/shared/rendering/utils.d.ts +24 -0
  303. package/dist/shared/rendering/utils.d.ts.map +1 -0
  304. package/dist/shared/rendering/utils.js +60 -0
  305. package/dist/shared/rendering/utils.js.map +1 -0
  306. package/dist/shared/serializer.d.ts +39 -0
  307. package/dist/shared/serializer.d.ts.map +1 -0
  308. package/dist/shared/serializer.js +131 -0
  309. package/dist/shared/serializer.js.map +1 -0
  310. package/dist/shared/settings-context.d.ts +56 -0
  311. package/dist/shared/settings-context.d.ts.map +1 -0
  312. package/dist/shared/settings-context.js +36 -0
  313. package/dist/shared/settings-context.js.map +1 -0
  314. package/dist/shared/styles.d.ts +4 -0
  315. package/dist/shared/styles.d.ts.map +1 -0
  316. package/dist/shared/styles.js +52 -0
  317. package/dist/shared/styles.js.map +1 -0
  318. package/dist/shared/use-causal-graph-editor.d.ts +19 -0
  319. package/dist/shared/use-causal-graph-editor.d.ts.map +1 -0
  320. package/dist/shared/use-causal-graph-editor.js +58 -0
  321. package/dist/shared/use-causal-graph-editor.js.map +1 -0
  322. package/dist/shared/use-drag-mode.d.ts +33 -0
  323. package/dist/shared/use-drag-mode.d.ts.map +1 -0
  324. package/dist/shared/use-drag-mode.js +75 -0
  325. package/dist/shared/use-drag-mode.js.map +1 -0
  326. package/dist/shared/use-edge-encoder.d.ts +45 -0
  327. package/dist/shared/use-edge-encoder.d.ts.map +1 -0
  328. package/dist/shared/use-edge-encoder.js +121 -0
  329. package/dist/shared/use-edge-encoder.js.map +1 -0
  330. package/dist/shared/utils.d.ts +52 -0
  331. package/dist/shared/utils.d.ts.map +1 -0
  332. package/dist/shared/utils.js +99 -0
  333. package/dist/shared/utils.js.map +1 -0
  334. package/dist/types.d.ts +213 -0
  335. package/dist/types.d.ts.map +1 -0
  336. package/dist/types.js +98 -0
  337. package/dist/types.js.map +1 -0
  338. package/package.json +123 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/shared/graph-layout/common.tsx"],"names":[],"mappings":"AAoBA,MAAM,OAAgB,kBAAkB;IAAxC;QACI,cAAS,GAAG,EAAE,CAAC;QAEf,kBAAa,GAAG,EAAE,CAAC;IAuBvB,CAAC;IArBG;;;;OAIG;IACH,QAAQ,CAAC,IAAY;QACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,IAAY;QACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;CAGJ;AAED;;GAEG;AACH,MAAM,OAAgB,WAAW;IAK7B,YAAY,OAAoC;QAC5C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAC9C,CAAC;IAED,kDAAkD;IAClD,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kDAAkD;IAClD,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC;IAChB,CAAC;CAuBJ"}
@@ -0,0 +1,35 @@
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 { LayoutMapping, XYPosition } from 'graphology-layout/utils';
18
+ import { SimulationGraph } from '../../types';
19
+ import { GraphLayout, GraphLayoutBuilder } from './common';
20
+ declare class CustomLayoutBuilder extends GraphLayoutBuilder<CustomLayout> {
21
+ build(): CustomLayout;
22
+ }
23
+ /**
24
+ * Custom layout.
25
+ *
26
+ * Currently does nothing, and passes back the current positions of nodes.
27
+ */
28
+ export default class CustomLayout extends GraphLayout {
29
+ applyLayout(graph: SimulationGraph): Promise<{
30
+ layout: LayoutMapping<XYPosition>;
31
+ }>;
32
+ static get Builder(): CustomLayoutBuilder;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=custom-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-layout.d.ts","sourceRoot":"","sources":["../../../src/shared/graph-layout/custom-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,cAAM,mBAAoB,SAAQ,kBAAkB,CAAC,YAAY,CAAC;IAC9D,KAAK,IAAI,YAAY;CAIxB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACjD,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;QACzC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;KACrC,CAAC;IAcF,MAAM,KAAK,OAAO,IAAI,mBAAmB,CAExC;CACJ"}
@@ -0,0 +1,29 @@
1
+ import { GraphLayout, GraphLayoutBuilder } from './common';
2
+ class CustomLayoutBuilder extends GraphLayoutBuilder {
3
+ build() {
4
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
5
+ return new CustomLayout(this);
6
+ }
7
+ }
8
+ /**
9
+ * Custom layout.
10
+ *
11
+ * Currently does nothing, and passes back the current positions of nodes.
12
+ */
13
+ export default class CustomLayout extends GraphLayout {
14
+ applyLayout(graph) {
15
+ // TODO: in the future this could call a callback passed into the layout to compute a custom layout
16
+ const layout = graph.reduceNodes((acc, node, attrs) => {
17
+ acc[node] = {
18
+ x: attrs['meta.rendering_properties.x'],
19
+ y: attrs['meta.rendering_properties.y'],
20
+ };
21
+ return acc;
22
+ }, {});
23
+ return Promise.resolve({ layout });
24
+ }
25
+ static get Builder() {
26
+ return new CustomLayoutBuilder();
27
+ }
28
+ }
29
+ //# sourceMappingURL=custom-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-layout.js","sourceRoot":"","sources":["../../../src/shared/graph-layout/custom-layout.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,mBAAoB,SAAQ,kBAAgC;IAC9D,KAAK;QACD,mEAAmE;QACnE,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACjD,WAAW,CAAC,KAAsB;QAG9B,mGAAmG;QACnG,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;YAClD,GAAG,CAAC,IAAI,CAAC,GAAG;gBACR,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC;gBACvC,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC;aAC1C,CAAC;YAEF,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAA+B,CAAC,CAAC;QAEpC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,KAAK,OAAO;QACd,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACrC,CAAC;CACJ"}
@@ -0,0 +1,88 @@
1
+ import { LayoutMapping, XYPosition } from 'graphology-layout/utils';
2
+ import { SimulationGraph } from '../../types';
3
+ import { GraphLayout, GraphLayoutBuilder } from './common';
4
+ declare class FcoseLayoutBuilder extends GraphLayoutBuilder<FcoseLayout> {
5
+ _edgeElasticity: number;
6
+ _edgeLength: number;
7
+ _energy: number;
8
+ _gravity: number;
9
+ _gravityRange: number;
10
+ _highQuality: boolean;
11
+ _iterations: number;
12
+ _nodeRepulsion: number;
13
+ _nodeSeparation: number;
14
+ /**
15
+ * Set edge elasticity
16
+ *
17
+ * @param elasticity elasticity parameter
18
+ */
19
+ edgeElasticity(elasticity: number): this;
20
+ /**
21
+ * Set ideal edge length multiplier
22
+ *
23
+ * @param lengthMultiplier length multiplier
24
+ */
25
+ edgeLength(lengthMultiplier: number): this;
26
+ /**
27
+ * Set initial energy on incremental recomputation
28
+ *
29
+ * @param energy energy
30
+ */
31
+ energy(energy: number): this;
32
+ /**
33
+ * Set gravity strength
34
+ *
35
+ * @param gravity gravity
36
+ */
37
+ gravity(gravity: number): this;
38
+ /**
39
+ * Set gravity range
40
+ *
41
+ * @param gravityRange
42
+ */
43
+ gravityRange(gravityRange: number): this;
44
+ /**
45
+ * Toggle high quality mode ('proof' vs 'default')
46
+ *
47
+ * @param highQuality whether to use high quality
48
+ */
49
+ highQuality(highQuality: boolean): this;
50
+ /**
51
+ * Set number of iterations to run for
52
+ *
53
+ * @param iters number of iterations to run for
54
+ */
55
+ iterations(iters: number): this;
56
+ /**
57
+ * Set node repulsion strength
58
+ *
59
+ * @param repulsion repulsion to set
60
+ */
61
+ nodeRepulsion(repulsion: number): this;
62
+ /**
63
+ * Set node separation multiplier
64
+ *
65
+ * @param separation separation
66
+ */
67
+ nodeSeparation(separation: number): this;
68
+ build(): FcoseLayout;
69
+ }
70
+ export default class FcoseLayout extends GraphLayout {
71
+ edgeElasticity: number;
72
+ edgeLength: number;
73
+ energy: number;
74
+ gravity: number;
75
+ gravityRange: number;
76
+ highQuality: boolean;
77
+ iterations: number;
78
+ nodeRepulsion: number;
79
+ nodeSeparation: number;
80
+ constructor(builder: FcoseLayoutBuilder);
81
+ get requiresPosition(): boolean;
82
+ applyLayout(graph: SimulationGraph): Promise<{
83
+ layout: LayoutMapping<XYPosition>;
84
+ }>;
85
+ static get Builder(): FcoseLayoutBuilder;
86
+ }
87
+ export {};
88
+ //# 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":"AAkBA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI3D,cAAM,kBAAmB,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IAC5D,eAAe,SAAQ;IAEvB,WAAW,SAAK;IAEhB,OAAO,SAAO;IAEd,QAAQ,SAAM;IAEd,aAAa,SAAM;IAEnB,YAAY,UAAQ;IAEpB,WAAW,SAAQ;IAEnB,cAAc,SAAQ;IAEtB,eAAe,SAAM;IAErB;;;;OAIG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKxC;;;;OAIG;IACH,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B;;;;OAIG;IACH,OAAO,CAAC,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,KAAK,IAAI,WAAW;CAIvB;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACzC,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;gBAElB,OAAO,EAAE,kBAAkB;IAcvC,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;QACzC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;KACrC,CAAC;IAiEF,MAAM,KAAK,OAAO,IAAI,kBAAkB,CAEvC;CACJ"}
@@ -0,0 +1,196 @@
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 cytoscape from 'cytoscape';
18
+ import fcose from 'cytoscape-fcose';
19
+ import { GraphLayout, GraphLayoutBuilder } from './common';
20
+ cytoscape.use(fcose);
21
+ class FcoseLayoutBuilder extends GraphLayoutBuilder {
22
+ constructor() {
23
+ super(...arguments);
24
+ this._edgeElasticity = 0.45;
25
+ this._edgeLength = 3;
26
+ this._energy = 0.1;
27
+ this._gravity = 35;
28
+ this._gravityRange = 80;
29
+ this._highQuality = true;
30
+ this._iterations = 2500;
31
+ this._nodeRepulsion = 6500;
32
+ this._nodeSeparation = 75;
33
+ }
34
+ /**
35
+ * Set edge elasticity
36
+ *
37
+ * @param elasticity elasticity parameter
38
+ */
39
+ edgeElasticity(elasticity) {
40
+ this._edgeElasticity = elasticity;
41
+ return this;
42
+ }
43
+ /**
44
+ * Set ideal edge length multiplier
45
+ *
46
+ * @param lengthMultiplier length multiplier
47
+ */
48
+ edgeLength(lengthMultiplier) {
49
+ this._edgeLength = lengthMultiplier;
50
+ return this;
51
+ }
52
+ /**
53
+ * Set initial energy on incremental recomputation
54
+ *
55
+ * @param energy energy
56
+ */
57
+ energy(energy) {
58
+ this._energy = energy;
59
+ return this;
60
+ }
61
+ /**
62
+ * Set gravity strength
63
+ *
64
+ * @param gravity gravity
65
+ */
66
+ gravity(gravity) {
67
+ this._gravity = gravity;
68
+ return this;
69
+ }
70
+ /**
71
+ * Set gravity range
72
+ *
73
+ * @param gravityRange
74
+ */
75
+ gravityRange(gravityRange) {
76
+ this._gravityRange = gravityRange;
77
+ return this;
78
+ }
79
+ /**
80
+ * Toggle high quality mode ('proof' vs 'default')
81
+ *
82
+ * @param highQuality whether to use high quality
83
+ */
84
+ highQuality(highQuality) {
85
+ this._highQuality = highQuality;
86
+ return this;
87
+ }
88
+ /**
89
+ * Set number of iterations to run for
90
+ *
91
+ * @param iters number of iterations to run for
92
+ */
93
+ iterations(iters) {
94
+ this._iterations = iters;
95
+ return this;
96
+ }
97
+ /**
98
+ * Set node repulsion strength
99
+ *
100
+ * @param repulsion repulsion to set
101
+ */
102
+ nodeRepulsion(repulsion) {
103
+ this._nodeRepulsion = repulsion;
104
+ return this;
105
+ }
106
+ /**
107
+ * Set node separation multiplier
108
+ *
109
+ * @param separation separation
110
+ */
111
+ nodeSeparation(separation) {
112
+ this._nodeSeparation = separation;
113
+ return this;
114
+ }
115
+ build() {
116
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
117
+ return new FcoseLayout(this);
118
+ }
119
+ }
120
+ export default class FcoseLayout extends GraphLayout {
121
+ constructor(builder) {
122
+ super(builder);
123
+ this.edgeElasticity = builder._edgeElasticity;
124
+ this.edgeLength = builder._edgeLength;
125
+ this.energy = builder._energy;
126
+ this.gravity = builder._gravity;
127
+ this.gravityRange = builder._gravityRange;
128
+ this.highQuality = builder._highQuality;
129
+ this.iterations = builder._iterations;
130
+ this.nodeRepulsion = builder._nodeRepulsion;
131
+ this.nodeSeparation = builder._nodeSeparation;
132
+ }
133
+ // eslint-disable-next-line class-methods-use-this
134
+ get requiresPosition() {
135
+ return false;
136
+ }
137
+ applyLayout(graph) {
138
+ return new Promise((resolve) => {
139
+ const hasPositions = graph.getNodeAttribute(graph.nodes()[0], 'x');
140
+ const size = graph.getAttribute('size');
141
+ const elements = [
142
+ ...graph.mapNodes((id, attrs) => ({
143
+ data: Object.assign(Object.assign({}, attrs), { height: size, width: size }),
144
+ group: 'nodes',
145
+ position: { x: attrs.x, y: attrs.y },
146
+ })),
147
+ ...graph.mapEdges((id, attrs, source, target) => ({
148
+ data: Object.assign(Object.assign({}, attrs), { source, target }),
149
+ group: 'edges',
150
+ })),
151
+ ];
152
+ cytoscape({
153
+ elements,
154
+ headless: true,
155
+ layout: {
156
+ animate: false,
157
+ edgeElasticity: this.edgeElasticity,
158
+ gravity: this.gravity,
159
+ gravityRange: this.gravityRange,
160
+ idealEdgeLength: size * this.edgeLength,
161
+ initialEnergyOnIncremental: this.energy,
162
+ name: 'fcose',
163
+ nodeRepulsion: this.nodeRepulsion,
164
+ nodeSeparation: this.nodeSeparation,
165
+ numIters: this.iterations,
166
+ quality: this.highQuality ? 'proof' : 'default',
167
+ // only randomize if there are no position in graph yet
168
+ randomize: !hasPositions,
169
+ stop: (ev) => {
170
+ const positions = Object.fromEntries(ev.cy.elements('node').map((node) => {
171
+ return [node.id(), node.position()];
172
+ }));
173
+ resolve({ layout: positions });
174
+ },
175
+ uniformNodeDimensions: true,
176
+ },
177
+ // use internal cytoscape styling to make the layout account for node sizes
178
+ style: [
179
+ {
180
+ selector: 'node',
181
+ style: {
182
+ height: size * 2,
183
+ shape: 'ellipse',
184
+ width: size * 2,
185
+ },
186
+ },
187
+ ],
188
+ styleEnabled: true,
189
+ });
190
+ });
191
+ }
192
+ static get Builder() {
193
+ return new FcoseLayoutBuilder();
194
+ }
195
+ }
196
+ //# sourceMappingURL=fcose-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fcose-layout.js","sourceRoot":"","sources":["../../../src/shared/graph-layout/fcose-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,SAA8C,MAAM,WAAW,CAAC;AACvE,OAAO,KAA6B,MAAM,iBAAiB,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAErB,MAAM,kBAAmB,SAAQ,kBAA+B;IAAhE;;QACI,oBAAe,GAAG,IAAI,CAAC;QAEvB,gBAAW,GAAG,CAAC,CAAC;QAEhB,YAAO,GAAG,GAAG,CAAC;QAEd,aAAQ,GAAG,EAAE,CAAC;QAEd,kBAAa,GAAG,EAAE,CAAC;QAEnB,iBAAY,GAAG,IAAI,CAAC;QAEpB,gBAAW,GAAG,IAAI,CAAC;QAEnB,mBAAc,GAAG,IAAI,CAAC;QAEtB,oBAAe,GAAG,EAAE,CAAC;IAgGzB,CAAC;IA9FG;;;;OAIG;IACH,cAAc,CAAC,UAAkB;QAC7B,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC;QAClC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,gBAAwB;QAC/B,IAAI,CAAC,WAAW,GAAG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;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,KAAK,OAAO;QACd,OAAO,IAAI,kBAAkB,EAAE,CAAC;IACpC,CAAC;CACJ"}
@@ -0,0 +1,79 @@
1
+ import { LayoutMapping, XYPosition } from 'graphology-layout/utils';
2
+ import { SimulationGraph } from '../../types';
3
+ import { GraphLayout, GraphLayoutBuilder } from './common';
4
+ declare class ForceAtlasLayoutBuilder extends GraphLayoutBuilder<ForceAtlasLayout> {
5
+ _barnesHutOptimize: boolean;
6
+ _edgeWeightInfluence: number;
7
+ _gravity: number;
8
+ _iterations: number;
9
+ _linLogMode: boolean;
10
+ _outboundAttractionDistribution: boolean;
11
+ _scalingRatio: number;
12
+ _strongGravityMode: boolean;
13
+ /**
14
+ * Toggle Barnes-Hut optimization
15
+ *
16
+ * @param optimize whether to enable the optimization
17
+ */
18
+ barnesHutOptimize(optimize: boolean): this;
19
+ /**
20
+ * Set the influence of the edge’s weights on the layout
21
+ *
22
+ * @param influence influence parameter
23
+ */
24
+ edgeWeightInfluence(influence: number): this;
25
+ /**
26
+ * Set the gravity parameter
27
+ *
28
+ * @param grav gravity param
29
+ */
30
+ gravity(grav: number): this;
31
+ /**
32
+ * Set the number of iterations to run at once
33
+ *
34
+ * @param iters number of iters to run
35
+ */
36
+ iterations(iters: number): this;
37
+ /**
38
+ * Toggle linLog mode
39
+ *
40
+ * @param linLog whether to enable linLog mode
41
+ */
42
+ linLogMode(linLog: boolean): this;
43
+ /**
44
+ * Toggle outboundAttractionDistribution mode
45
+ *
46
+ * @param attractionDistribution whether to enable attraction distribution mode
47
+ */
48
+ outboundAttractionDistribution(attractionDistribution: boolean): this;
49
+ /**
50
+ * Set the scaling ratio
51
+ *
52
+ * @param ratio new scaling ratio
53
+ */
54
+ scalingRatio(ratio: number): this;
55
+ /**
56
+ * Toggle strong gravity mode
57
+ *
58
+ * @param enableStrongGravity whether to enable the strong gravity mode
59
+ */
60
+ strongGravityMode(enableStrongGravity: boolean): this;
61
+ build(): ForceAtlasLayout;
62
+ }
63
+ export default class ForceAtlasLayout extends GraphLayout {
64
+ barnesHutOptimize: boolean;
65
+ edgeWeightInfluence: number;
66
+ gravity: number;
67
+ iterations: number;
68
+ linLogMode: boolean;
69
+ outboundAttractionDistribution: boolean;
70
+ scalingRatio: number;
71
+ strongGravityMode: boolean;
72
+ constructor(builder: ForceAtlasLayoutBuilder);
73
+ applyLayout(graph: SimulationGraph): Promise<{
74
+ layout: LayoutMapping<XYPosition>;
75
+ }>;
76
+ static get Builder(): ForceAtlasLayoutBuilder;
77
+ }
78
+ export {};
79
+ //# 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":"AAmBA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,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,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK5C;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK3B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/B;;;;OAIG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAKjC;;;;OAIG;IACH,8BAA8B,CAAC,sBAAsB,EAAE,OAAO,GAAG,IAAI;IAKrE;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKjC;;;;OAIG;IACH,iBAAiB,CAAC,mBAAmB,EAAE,OAAO,GAAG,IAAI;IAKrD,KAAK,IAAI,gBAAgB;CAI5B;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IAC9C,iBAAiB,EAAE,OAAO,CAAC;IAE3B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,OAAO,CAAC;IAEpB,8BAA8B,EAAE,OAAO,CAAC;IAExC,YAAY,EAAE,MAAM,CAAC;IAErB,iBAAiB,EAAE,OAAO,CAAC;gBAEtB,OAAO,EAAE,uBAAuB;IAY5C,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;QACzC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;KACrC,CAAC;IAoDF,MAAM,KAAK,OAAO,IAAI,uBAAuB,CAE5C;CACJ"}
@@ -0,0 +1,163 @@
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 { random } from 'graphology-layout';
18
+ import forceAtlas from 'graphology-layout-forceatlas2';
19
+ import noverlap from 'graphology-layout-noverlap';
20
+ import { GraphLayout, GraphLayoutBuilder } from './common';
21
+ class ForceAtlasLayoutBuilder extends GraphLayoutBuilder {
22
+ constructor() {
23
+ super(...arguments);
24
+ this._barnesHutOptimize = false;
25
+ this._edgeWeightInfluence = 1;
26
+ this._gravity = 0.2;
27
+ this._iterations = 10000;
28
+ this._linLogMode = true;
29
+ this._outboundAttractionDistribution = true;
30
+ this._scalingRatio = 8;
31
+ this._strongGravityMode = false;
32
+ }
33
+ /**
34
+ * Toggle Barnes-Hut optimization
35
+ *
36
+ * @param optimize whether to enable the optimization
37
+ */
38
+ barnesHutOptimize(optimize) {
39
+ this._barnesHutOptimize = optimize;
40
+ return this;
41
+ }
42
+ /**
43
+ * Set the influence of the edge’s weights on the layout
44
+ *
45
+ * @param influence influence parameter
46
+ */
47
+ edgeWeightInfluence(influence) {
48
+ this._edgeWeightInfluence = influence;
49
+ return this;
50
+ }
51
+ /**
52
+ * Set the gravity parameter
53
+ *
54
+ * @param grav gravity param
55
+ */
56
+ gravity(grav) {
57
+ this._gravity = grav;
58
+ return this;
59
+ }
60
+ /**
61
+ * Set the number of iterations to run at once
62
+ *
63
+ * @param iters number of iters to run
64
+ */
65
+ iterations(iters) {
66
+ this._iterations = iters;
67
+ return this;
68
+ }
69
+ /**
70
+ * Toggle linLog mode
71
+ *
72
+ * @param linLog whether to enable linLog mode
73
+ */
74
+ linLogMode(linLog) {
75
+ this._linLogMode = linLog;
76
+ return this;
77
+ }
78
+ /**
79
+ * Toggle outboundAttractionDistribution mode
80
+ *
81
+ * @param attractionDistribution whether to enable attraction distribution mode
82
+ */
83
+ outboundAttractionDistribution(attractionDistribution) {
84
+ this._outboundAttractionDistribution = attractionDistribution;
85
+ return this;
86
+ }
87
+ /**
88
+ * Set the scaling ratio
89
+ *
90
+ * @param ratio new scaling ratio
91
+ */
92
+ scalingRatio(ratio) {
93
+ this._scalingRatio = ratio;
94
+ return this;
95
+ }
96
+ /**
97
+ * Toggle strong gravity mode
98
+ *
99
+ * @param enableStrongGravity whether to enable the strong gravity mode
100
+ */
101
+ strongGravityMode(enableStrongGravity) {
102
+ this._strongGravityMode = enableStrongGravity;
103
+ return this;
104
+ }
105
+ build() {
106
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
107
+ return new ForceAtlasLayout(this);
108
+ }
109
+ }
110
+ export default class ForceAtlasLayout extends GraphLayout {
111
+ constructor(builder) {
112
+ super(builder);
113
+ this.barnesHutOptimize = builder._barnesHutOptimize;
114
+ this.edgeWeightInfluence = builder._edgeWeightInfluence;
115
+ this.gravity = builder._gravity;
116
+ this.iterations = builder._iterations;
117
+ this.linLogMode = builder._linLogMode;
118
+ this.outboundAttractionDistribution = builder._outboundAttractionDistribution;
119
+ this.scalingRatio = builder._scalingRatio;
120
+ this.strongGravityMode = builder._strongGravityMode;
121
+ }
122
+ applyLayout(graph) {
123
+ const firstNodeAttrs = graph.getNodeAttributes(graph.nodes()[0]);
124
+ const graphClone = graph.copy();
125
+ const size = graphClone.getAttribute('size');
126
+ // If x is not set yet on nodes
127
+ if (!firstNodeAttrs.x) {
128
+ // Create a random layout
129
+ const randomMapping = random(graph, { center: 1000, scale: 2000 });
130
+ graphClone.updateEachNodeAttributes((n, attrs) => (Object.assign(Object.assign({}, attrs), randomMapping[n])));
131
+ // Fix overlaps with noverlap so the force simulation has to do less iterations
132
+ const noverlapMapping = noverlap(graphClone, {
133
+ maxIterations: 100,
134
+ settings: {
135
+ margin: size,
136
+ },
137
+ });
138
+ graphClone.updateEachNodeAttributes((n, attrs) => (Object.assign(Object.assign({}, attrs), noverlapMapping[n])));
139
+ }
140
+ // add size attribute
141
+ graphClone.updateEachNodeAttributes((n, attrs) => (Object.assign(Object.assign({}, attrs), { size })));
142
+ const newLayout = forceAtlas(graphClone, {
143
+ getEdgeWeight: 1,
144
+ iterations: this.iterations,
145
+ settings: {
146
+ adjustSizes: true,
147
+ barnesHutOptimize: this.barnesHutOptimize,
148
+ edgeWeightInfluence: this.edgeWeightInfluence,
149
+ gravity: this.gravity,
150
+ linLogMode: this.linLogMode,
151
+ outboundAttractionDistribution: this.outboundAttractionDistribution,
152
+ scalingRatio: this.scalingRatio,
153
+ slowDown: 5,
154
+ strongGravityMode: this.strongGravityMode,
155
+ },
156
+ });
157
+ return Promise.resolve({ layout: newLayout });
158
+ }
159
+ static get Builder() {
160
+ return new ForceAtlasLayoutBuilder();
161
+ }
162
+ }
163
+ //# sourceMappingURL=force-atlas-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"force-atlas-layout.js","sourceRoot":"","sources":["../../../src/shared/graph-layout/force-atlas-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,UAAU,MAAM,+BAA+B,CAAC;AACvD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAIlD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,uBAAwB,SAAQ,kBAAoC;IAA1E;;QACI,uBAAkB,GAAG,KAAK,CAAC;QAE3B,yBAAoB,GAAG,CAAC,CAAC;QAEzB,aAAQ,GAAG,GAAG,CAAC;QAEf,gBAAW,GAAG,KAAM,CAAC;QAErB,gBAAW,GAAG,IAAI,CAAC;QAEnB,oCAA+B,GAAG,IAAI,CAAC;QAEvC,kBAAa,GAAG,CAAC,CAAC;QAElB,uBAAkB,GAAG,KAAK,CAAC;IAsF/B,CAAC;IApFG;;;;OAIG;IACH,iBAAiB,CAAC,QAAiB;QAC/B,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,SAAiB;QACjC,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;QACtC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,IAAY;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,OAAO,I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iB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;gBAC7C,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,8BAA8B,EAAE,IAAI,CAAC,8BAA8B;gBACnE,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,QAAQ,EAAE,CAAC;gBACX,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;aAC5C;SACJ,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,KAAK,OAAO;QACd,OAAO,IAAI,uBAAuB,EAAE,CAAC;IACzC,CAAC;CACJ"}
@@ -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 } 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,MAAM,UAAU,CAAC;AACvC,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"}