@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,131 @@
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 { EdgeType, } from '../types';
18
+ const RENDERING_META_PREFIX = 'meta.rendering_properties.';
19
+ function isPrefixed(key) {
20
+ return key.startsWith(RENDERING_META_PREFIX);
21
+ }
22
+ function removeEdgePrefix(key) {
23
+ return key.slice(RENDERING_META_PREFIX.length);
24
+ }
25
+ function removeNodePrefix(key) {
26
+ return key.slice(RENDERING_META_PREFIX.length);
27
+ }
28
+ /**
29
+ * Serialize a simulation edge into a causal graph edge
30
+ *
31
+ * @param attributes simulation edge data
32
+ * @param source optional source to include in output data
33
+ * @param destination optional destination to include in output data
34
+ */
35
+ export function serializeGraphEdge(attributes, source, destination) {
36
+ const entries = Object.entries(attributes);
37
+ const unflattenedMeta = Object.fromEntries(entries
38
+ .filter(([key]) => isPrefixed(key))
39
+ .map(([key, val]) => {
40
+ const newKey = removeEdgePrefix(key);
41
+ return [newKey, val];
42
+ }));
43
+ const output = {
44
+ edge_type: attributes.edge_type,
45
+ meta: Object.assign(Object.assign({}, attributes.originalMeta), { rendering_properties: unflattenedMeta }),
46
+ };
47
+ if (source) {
48
+ output.source = source;
49
+ }
50
+ if (destination) {
51
+ output.destination = destination;
52
+ }
53
+ // Reverse the edge if it is a backwards directed edge
54
+ if (output.edge_type === EdgeType.BACKWARDS_DIRECTED_EDGE) {
55
+ output.edge_type = EdgeType.DIRECTED_EDGE;
56
+ if (output.source) {
57
+ output.source = destination;
58
+ }
59
+ if (output.destination) {
60
+ output.destination = source;
61
+ }
62
+ }
63
+ return output;
64
+ }
65
+ /**
66
+ * Serialize a simulation node into a causal graph node
67
+ *
68
+ * @param attributes simulation node data
69
+ * @param includeIdentifier whether to include data to identify the node
70
+ */
71
+ export function serializeGraphNode(attributes, includeIdentifier = false) {
72
+ const entries = Object.entries(attributes);
73
+ const unflattenedMeta = Object.fromEntries(entries
74
+ .filter(([key]) => isPrefixed(key))
75
+ .map(([key, val]) => {
76
+ const newKey = removeNodePrefix(key);
77
+ return [newKey, val];
78
+ }));
79
+ const output = {
80
+ meta: Object.assign(Object.assign({}, attributes.originalMeta), { rendering_properties: unflattenedMeta }),
81
+ variable_type: attributes.variable_type,
82
+ };
83
+ if (includeIdentifier) {
84
+ output.identifier = attributes.id;
85
+ }
86
+ return output;
87
+ }
88
+ /**
89
+ * Serialize internal graph representation into a CausalGraph
90
+ *
91
+ * @param graph internal graph representation
92
+ */
93
+ export function causalGraphSerializer(state) {
94
+ const edges = state.graph.reduceEdges((acc, id, attributes, source, target) => {
95
+ const serializedEdge = serializeGraphEdge(attributes);
96
+ // if the edge is backwards, we need to swap the source and target
97
+ if (attributes.edge_type === EdgeType.BACKWARDS_DIRECTED_EDGE) {
98
+ if (!(target in acc)) {
99
+ acc[target] = {};
100
+ }
101
+ acc[target][source] = serializedEdge;
102
+ }
103
+ else {
104
+ if (!(source in acc)) {
105
+ acc[source] = {};
106
+ }
107
+ acc[source][target] = serializedEdge;
108
+ }
109
+ return acc;
110
+ }, {});
111
+ const nodes = state.graph.reduceNodes((acc, id, attributes) => {
112
+ const entries = Object.entries(attributes);
113
+ const unflattenedMeta = Object.fromEntries(entries
114
+ .filter(([key]) => isPrefixed(key))
115
+ .map(([key, val]) => {
116
+ const newKey = removeNodePrefix(key);
117
+ return [newKey, val];
118
+ }));
119
+ acc[id] = {
120
+ meta: Object.assign(Object.assign({}, attributes.originalMeta), { rendering_properties: unflattenedMeta }),
121
+ variable_type: attributes.variable_type,
122
+ };
123
+ return acc;
124
+ }, {});
125
+ return {
126
+ edges,
127
+ nodes,
128
+ version: state.graph.getAttribute('version'),
129
+ };
130
+ }
131
+ //# sourceMappingURL=serializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/shared/serializer.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,56 @@
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 * as React from 'react';
18
+ import { NotificationPayload } from '@darajs/ui-notifications';
19
+ import { EditorMode } from '../types';
20
+ /**
21
+ * Common graph settings used inside graph sub-components
22
+ */
23
+ export interface Settings {
24
+ /** Whether node dragging is enabled */
25
+ allowNodeDrag?: boolean;
26
+ /** Whether to show the details panel when the graph is not editable */
27
+ allowSelectionWhenNotEditable?: boolean;
28
+ /** Flag for disabling edge addition */
29
+ disableEdgeAdd?: boolean;
30
+ /** Flag for disabling latent node addition */
31
+ disableLatentNodeAdd?: boolean;
32
+ /** Flag for disabling node removal */
33
+ disableNodeRemoval?: boolean;
34
+ /** Allow editing */
35
+ editable?: boolean;
36
+ /** Mode the graph viewer should operate in */
37
+ editorMode?: EditorMode;
38
+ /** On notify handler to show a notification */
39
+ onNotify?: (payload: NotificationPayload) => void | Promise<void>;
40
+ /** Whether to show verbose descriptions in the editor frame */
41
+ verboseDescriptions?: boolean;
42
+ }
43
+ interface SettingsProviderProps {
44
+ children: React.ReactNode;
45
+ settings: Settings;
46
+ }
47
+ /**
48
+ * Wrapper around SettingsContext which requires settings to be set
49
+ */
50
+ export declare function SettingsProvider({ children, settings }: SettingsProviderProps): JSX.Element;
51
+ /**
52
+ * Helper hook that pulls in Settings from the SettingsContext
53
+ */
54
+ export declare function useSettings(): Settings;
55
+ export {};
56
+ //# sourceMappingURL=settings-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-context.d.ts","sourceRoot":"","sources":["../../src/shared/settings-context.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uEAAuE;IACvE,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAID,UAAU,qBAAqB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAE3F;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAQtC"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright 2023 Impulse Innovations Limited
4
+ *
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ import * as React from 'react';
19
+ const SettingsContext = React.createContext(undefined);
20
+ /**
21
+ * Wrapper around SettingsContext which requires settings to be set
22
+ */
23
+ export function SettingsProvider({ children, settings }) {
24
+ return _jsx(SettingsContext.Provider, { value: settings, children: children });
25
+ }
26
+ /**
27
+ * Helper hook that pulls in Settings from the SettingsContext
28
+ */
29
+ export function useSettings() {
30
+ const settings = React.useContext(SettingsContext);
31
+ if (settings === undefined) {
32
+ throw new Error('useSettings must be used within a SettingsProvider');
33
+ }
34
+ return settings;
35
+ }
36
+ //# sourceMappingURL=settings-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-context.js","sourceRoot":"","sources":["../../src/shared/settings-context.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8B/B,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAuB,SAAS,CAAC,CAAC;AAO7E;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAyB;IAC1E,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAA4B,CAAC;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACvB,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAEnD,IAAI,QAAQ,KAAK,SAAS,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;KACzE;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", import("@darajs/styled-components").DefaultTheme, {}, never>;
2
+ export declare const Center: import("styled-components").StyledComponent<"div", import("@darajs/styled-components").DefaultTheme, {}, never>;
3
+ export declare const Graph: import("styled-components").StyledComponent<"div", import("@darajs/styled-components").DefaultTheme, {}, never>;
4
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/shared/styles.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,OAAO,iHAOnB,CAAC;AAEF,eAAO,MAAM,MAAM,iHAMlB,CAAC;AAEF,eAAO,MAAM,KAAK,iHAkBjB,CAAC"}
@@ -0,0 +1,52 @@
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 styled from '@darajs/styled-components';
18
+ export const Wrapper = styled.div `
19
+ overflow: hidden;
20
+ display: flex;
21
+ flex: 1 1 auto;
22
+ flex-direction: column;
23
+
24
+ width: 100%;
25
+ `;
26
+ export const Center = styled.div `
27
+ display: flex;
28
+ flex: 1 1 auto;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ `;
33
+ export const Graph = styled.div `
34
+ cursor: grab;
35
+
36
+ /* This is a CSS trick for the graph to fill the available space of the flex container */
37
+ position: absolute;
38
+ top: 0;
39
+ right: 0;
40
+ bottom: 0;
41
+ left: 0;
42
+
43
+ overflow: hidden;
44
+ flex: 1 1 auto;
45
+
46
+ width: 100%;
47
+ height: 100%;
48
+
49
+ border: 1px solid ${(props) => props.theme.colors.grey2};
50
+ border-radius: 4px;
51
+ `;
52
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/shared/styles.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOhC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAM/B,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;wBAgBP,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;CAE1D,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { CausalGraph, EditorMode, GraphState } from '../types';
2
+ import { GraphActionCreators } from './causal-graph-store';
3
+ export interface UseCausalGraphEditorApi {
4
+ api: GraphApi;
5
+ state: GraphState;
6
+ }
7
+ type ActionName = keyof typeof GraphActionCreators;
8
+ /**
9
+ * Graph API object containing all available methods to modify the graph
10
+ */
11
+ export type GraphApi = {
12
+ [k in ActionName]: (...args: Parameters<typeof GraphActionCreators[k]>) => void;
13
+ };
14
+ /**
15
+ * A helper hook to inject causal graph editor API for given initial graphdata
16
+ */
17
+ export default function useCausalGraphEditor(graphData: CausalGraph, editorMode: EditorMode, availableInputs?: string[], newNodesRequirePosition?: boolean): UseCausalGraphEditorApi;
18
+ export {};
19
+ //# sourceMappingURL=use-causal-graph-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-causal-graph-editor.d.ts","sourceRoot":"","sources":["../../src/shared/use-causal-graph-editor.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAiC,MAAM,sBAAsB,CAAC;AAG1F,MAAM,WAAW,uBAAuB;IACpC,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACrB;AAED,KAAK,UAAU,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAGnD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;KAClB,CAAC,IAAI,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;CAClF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CACxC,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,UAAU,EACtB,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,uBAAuB,CAAC,EAAE,OAAO,GAClC,uBAAuB,CA6CzB"}
@@ -0,0 +1,58 @@
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 isEqual from 'lodash/isEqual';
18
+ import { useEffect, useMemo, useReducer, useRef } from 'react';
19
+ import { GraphActionCreators, GraphActionType, GraphReducer } from './causal-graph-store';
20
+ import { causalGraphParser } from './parsers';
21
+ const actionNames = Object.keys(GraphActionCreators);
22
+ /**
23
+ * A helper hook to inject causal graph editor API for given initial graphdata
24
+ */
25
+ export default function useCausalGraphEditor(graphData, editorMode, availableInputs, newNodesRequirePosition) {
26
+ const [state, dispatch] = useReducer(GraphReducer, {
27
+ editorMode,
28
+ newNodesRequirePosition,
29
+ }, (initState) => {
30
+ return Object.assign(Object.assign({}, initState), { graph: causalGraphParser(graphData, availableInputs) });
31
+ });
32
+ // bind each action creator to dispatch
33
+ const api = useMemo(() => {
34
+ return actionNames.reduce((acc, actionName) => {
35
+ const actionCreator = GraphActionCreators[actionName];
36
+ // eslint-disable-next-line prefer-spread
37
+ acc[actionName] = (...args) => dispatch(actionCreator.apply(null, args));
38
+ return acc;
39
+ }, {});
40
+ }, [dispatch]);
41
+ // Init graph data, update when outside graph nodes/edges changes
42
+ const lastParentData = useRef(graphData); // keep track of last parent data to skip unnecessary updates
43
+ useEffect(() => {
44
+ if (!isEqual(lastParentData.current.nodes, graphData.nodes) ||
45
+ !isEqual(lastParentData.current.edges, graphData.edges)) {
46
+ dispatch({
47
+ graph: causalGraphParser(graphData, availableInputs, state.graph),
48
+ type: GraphActionType.INIT_GRAPH,
49
+ });
50
+ }
51
+ lastParentData.current = graphData;
52
+ }, [graphData]);
53
+ return {
54
+ api,
55
+ state,
56
+ };
57
+ }
58
+ //# sourceMappingURL=use-causal-graph-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-causal-graph-editor.js","sourceRoot":"","sources":["../../src/shared/use-causal-graph-editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAQ9C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAiB,CAAC;AASrE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CACxC,SAAsB,EACtB,UAAsB,EACtB,eAA0B,EAC1B,uBAAiC;IAEjC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,UAAU,CAChC,YAAY,EACZ;QACI,UAAU;QACV,uBAAuB;KAC1B,EACD,CAAC,SAAqB,EAAE,EAAE;QACtB,uCACO,SAAS,KACZ,KAAK,EAAE,iBAAiB,CAAC,SAAS,EAAE,eAAe,CAAC,IACtD;IACN,CAAC,CACJ,CAAC;IAEF,uCAAuC;IACvC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;QACrB,OAAO,WAAW,CAAC,MAAM,CAAW,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;YACpD,MAAM,aAAa,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;YACtD,yCAAyC;YACzC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAsC,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAC3G,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAAc,CAAC,CAAC;IACvB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,iEAAiE;IACjE,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,6DAA6D;IACvG,SAAS,CAAC,GAAG,EAAE;QACX,IACI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC;YACvD,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EACzD;YACE,QAAQ,CAAC;gBACL,KAAK,EAAE,iBAAiB,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC;gBACjE,IAAI,EAAE,eAAe,CAAC,UAAU;aACnC,CAAC,CAAC;SACN;QAED,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC;IACvC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACH,GAAG;QACH,KAAK;KACR,CAAC;AACN,CAAC"}
@@ -0,0 +1,33 @@
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 React from 'react';
18
+ export type DragMode = 'create_edge' | 'move_node';
19
+ /**
20
+ * Helper hook controlling switching and enabling drag mode
21
+ *
22
+ * @param editMode whether app is in edit mode
23
+ * @param allowEdgeAdd whether to allow adding edges
24
+ * @param allowNodeDrag whether to allow node dragging
25
+ * @param onDragModeChange callback to execute whenever drag mode changes
26
+ */
27
+ declare function useDragMode(editMode: boolean, allowEdgeAdd: boolean, allowNodeDrag: boolean, onDragModeChange: (dragMode: DragMode | null) => void): {
28
+ dragEnabled: boolean;
29
+ dragMode: DragMode;
30
+ setDragMode: React.Dispatch<React.SetStateAction<DragMode>>;
31
+ };
32
+ export default useDragMode;
33
+ //# sourceMappingURL=use-drag-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag-mode.d.ts","sourceRoot":"","sources":["../../src/shared/use-drag-mode.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;AAEnD;;;;;;;GAOG;AACH,iBAAS,WAAW,CAChB,QAAQ,EAAE,OAAO,EACjB,YAAY,EAAE,OAAO,EACrB,aAAa,EAAE,OAAO,EACtB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,GACtD;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;CAAE,CAsD3G;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,75 @@
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 { useEffect, useMemo, useState } from 'react';
18
+ /**
19
+ * Helper hook controlling switching and enabling drag mode
20
+ *
21
+ * @param editMode whether app is in edit mode
22
+ * @param allowEdgeAdd whether to allow adding edges
23
+ * @param allowNodeDrag whether to allow node dragging
24
+ * @param onDragModeChange callback to execute whenever drag mode changes
25
+ */
26
+ function useDragMode(editMode, allowEdgeAdd, allowNodeDrag, onDragModeChange) {
27
+ const [dragMode, setDragMode] = useState(() => {
28
+ if (editMode && allowEdgeAdd) {
29
+ return 'create_edge';
30
+ }
31
+ return allowNodeDrag ? 'move_node' : null;
32
+ });
33
+ const dragEnabled = useMemo(() => {
34
+ if (dragMode === 'create_edge') {
35
+ return editMode && allowEdgeAdd;
36
+ }
37
+ if (dragMode === 'move_node') {
38
+ return allowNodeDrag;
39
+ }
40
+ return false;
41
+ }, [dragMode, editMode, allowEdgeAdd]);
42
+ useEffect(() => {
43
+ if (!dragEnabled) {
44
+ onDragModeChange(null);
45
+ }
46
+ else {
47
+ onDragModeChange(dragMode);
48
+ }
49
+ }, [dragMode, dragEnabled]);
50
+ // Register listener to switch modes in edit mode
51
+ // In non-edit mode we stay in one mode only
52
+ useEffect(() => {
53
+ const cmdHandler = (ev) => {
54
+ // Left Alt (for Windows&Mac) or Left CMD (for OSX)
55
+ const codes = ['AltLeft', 'MetaLeft', 'OSLeft'];
56
+ if (codes.includes(ev.code)) {
57
+ setDragMode(dragMode === 'move_node' ? 'create_edge' : 'move_node');
58
+ }
59
+ };
60
+ // If both edge adding and node dragging is not allowed, there is no point in switching modes
61
+ if (editMode && allowEdgeAdd && allowNodeDrag) {
62
+ document.addEventListener('keydown', cmdHandler);
63
+ document.addEventListener('keyup', cmdHandler);
64
+ }
65
+ return () => {
66
+ if (editMode && allowEdgeAdd && allowNodeDrag) {
67
+ document.removeEventListener('keydown', cmdHandler);
68
+ document.removeEventListener('keyup', cmdHandler);
69
+ }
70
+ };
71
+ }, [dragMode]);
72
+ return { dragEnabled, dragMode, setDragMode };
73
+ }
74
+ export default useDragMode;
75
+ //# sourceMappingURL=use-drag-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag-mode.js","sourceRoot":"","sources":["../../src/shared/use-drag-mode.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5D;;;;;;;GAOG;AACH,SAAS,WAAW,CAChB,QAAiB,EACjB,YAAqB,EACrB,aAAsB,EACtB,gBAAqD;IAErD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAW,GAAG,EAAE;QACpD,IAAI,QAAQ,IAAI,YAAY,EAAE;YAC1B,OAAO,aAAa,CAAC;SACxB;QAED,OAAO,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,IAAI,QAAQ,KAAK,aAAa,EAAE;YAC5B,OAAO,QAAQ,IAAI,YAAY,CAAC;SACnC;QAED,IAAI,QAAQ,KAAK,WAAW,EAAE;YAC1B,OAAO,aAAa,CAAC;SACxB;QAED,OAAO,KAAK,CAAC;IACjB,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAEvC,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,WAAW,EAAE;YACd,gBAAgB,CAAC,IAAI,CAAC,CAAC;SAC1B;aAAM;YACH,gBAAgB,CAAC,QAAQ,CAAC,CAAC;SAC9B;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAE5B,iDAAiD;IACjD,4CAA4C;IAC5C,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,UAAU,GAAG,CAAC,EAAiB,EAAQ,EAAE;YAC3C,mDAAmD;YACnD,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;gBACzB,WAAW,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;aACvE;QACL,CAAC,CAAC;QAEF,6FAA6F;QAC7F,IAAI,QAAQ,IAAI,YAAY,IAAI,aAAa,EAAE;YAC3C,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACjD,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;SAClD;QAED,OAAO,GAAG,EAAE;YACR,IAAI,QAAQ,IAAI,YAAY,IAAI,aAAa,EAAE;gBAC3C,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBACpD,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;aACrD;QACL,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AAClD,CAAC;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { EdgeConstraint, EdgeConstraintItem } from '../types';
2
+ /**
3
+ * Parse edge constraints into internal representation
4
+ *
5
+ * @param constraints edge constraints to parse
6
+ */
7
+ export declare function parseConstraints(constraints: EdgeConstraint[]): EdgeConstraintItem[];
8
+ /**
9
+ * Parse internal edge constraint items to external representation
10
+ *
11
+ * @param constraintItems edge constraint items to parse
12
+ */
13
+ export declare function parseConstraintItems(constraintItems: EdgeConstraintItem[]): EdgeConstraint[];
14
+ interface EdgeConstraintEncoderApi {
15
+ /**
16
+ * Add a new constraint
17
+ */
18
+ addConstraint: (source?: string, target?: string) => void;
19
+ /**
20
+ * Current constraints
21
+ */
22
+ constraints: EdgeConstraintItem[];
23
+ /**
24
+ * Remove a constraint with the given id
25
+ */
26
+ removeConstraint: (id: string) => void;
27
+ /**
28
+ * Reverse a given constraint - switch source and target
29
+ */
30
+ reverseConstraint: (edgeConstraint: EdgeConstraintItem) => void;
31
+ /**
32
+ * Update given constraint
33
+ */
34
+ updateConstraint: (edgeConstraint: EdgeConstraintItem) => void;
35
+ }
36
+ /**
37
+ * Hook exposing common logic to manage edge constraints
38
+ * Can be re-used with different frontends to maintain the same functionality
39
+ *
40
+ * @param initialConstraints Initial constraints to show
41
+ * @param onUpdate Handler called whenever constraints are updated
42
+ */
43
+ export declare function useEdgeConstraintEncoder(initialConstraints: EdgeConstraint[], onUpdate?: (constraints: EdgeConstraint[]) => void | Promise<void>): EdgeConstraintEncoderApi;
44
+ export {};
45
+ //# sourceMappingURL=use-edge-encoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-edge-encoder.d.ts","sourceRoot":"","sources":["../../src/shared/use-edge-encoder.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAsB,MAAM,UAAU,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,CAyBpF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,CAK5F;AAED,UAAU,wBAAwB;IAC9B;;OAEG;IACH,aAAa,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D;;OAEG;IACH,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC;;OAEG;IACH,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,iBAAiB,EAAE,CAAC,cAAc,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAChE;;OAEG;IACH,gBAAgB,EAAE,CAAC,cAAc,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAClE;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACpC,kBAAkB,EAAE,cAAc,EAAE,EACpC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACnE,wBAAwB,CAmD1B"}