@visuallyjs/browser-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/css/visuallyjs-theme.css +148 -0
  2. package/css/visuallyjs.css +1879 -0
  3. package/js/visuallyjs.browser-ui.cjs.js +143 -0
  4. package/js/visuallyjs.browser-ui.esm.js +143 -0
  5. package/package.json +16 -0
  6. package/types/browser-ui/base-dom-ui-layout-adapter.d.ts +14 -0
  7. package/types/browser-ui/browser-ui.d.ts +95 -0
  8. package/types/browser-ui/browser-util.d.ts +233 -0
  9. package/types/browser-ui/browser-visuallyjs-instance.d.ts +881 -0
  10. package/types/browser-ui/canvas-layout-adapter.d.ts +15 -0
  11. package/types/browser-ui/collicat.d.ts +245 -0
  12. package/types/browser-ui/components/controls/controls-component.d.ts +137 -0
  13. package/types/browser-ui/components/controls/copy-paste-controls-component.d.ts +9 -0
  14. package/types/browser-ui/components/controls/css-classes.d.ts +79 -0
  15. package/types/browser-ui/components/controls/index.d.ts +4 -0
  16. package/types/browser-ui/components/controls/svg-export-component.d.ts +60 -0
  17. package/types/browser-ui/components/edge-type-picker/edge-type-picker.d.ts +37 -0
  18. package/types/browser-ui/components/edge-type-picker/index.d.ts +1 -0
  19. package/types/browser-ui/components/index.d.ts +4 -0
  20. package/types/browser-ui/components/inspector/color-picker-tag.d.ts +32 -0
  21. package/types/browser-ui/components/inspector/definitions.d.ts +114 -0
  22. package/types/browser-ui/components/inspector/edge-type-tag.d.ts +15 -0
  23. package/types/browser-ui/components/inspector/index.d.ts +6 -0
  24. package/types/browser-ui/components/inspector/inspector.d.ts +138 -0
  25. package/types/browser-ui/components/inspector/shape-type-inspector.d.ts +43 -0
  26. package/types/browser-ui/components/inspector/vanilla-inspector.d.ts +39 -0
  27. package/types/browser-ui/components/palette/index.d.ts +2 -0
  28. package/types/browser-ui/components/palette/palette-content-generator.d.ts +14 -0
  29. package/types/browser-ui/components/palette/palette-options.d.ts +159 -0
  30. package/types/browser-ui/components/palette/palette.d.ts +126 -0
  31. package/types/browser-ui/connector-editor.d.ts +65 -0
  32. package/types/browser-ui/connector-editors/anchors.d.ts +31 -0
  33. package/types/browser-ui/connector-editors/css-constants.d.ts +33 -0
  34. package/types/browser-ui/connector-editors/definitions.d.ts +74 -0
  35. package/types/browser-ui/connector-editors/editor-base.d.ts +177 -0
  36. package/types/browser-ui/connector-editors/index.d.ts +52 -0
  37. package/types/browser-ui/connector-editors/util.d.ts +33 -0
  38. package/types/browser-ui/connector-editors-bezier/bezier-editor.d.ts +82 -0
  39. package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +42 -0
  40. package/types/browser-ui/connector-editors-bezier/index.d.ts +9 -0
  41. package/types/browser-ui/connector-editors-orthogonal/css-constants.d.ts +28 -0
  42. package/types/browser-ui/connector-editors-orthogonal/index.d.ts +9 -0
  43. package/types/browser-ui/connector-editors-orthogonal/orthogonal-editor.d.ts +86 -0
  44. package/types/browser-ui/connector-editors-straight/auto-split-mode.d.ts +24 -0
  45. package/types/browser-ui/connector-editors-straight/click-split-mode.d.ts +20 -0
  46. package/types/browser-ui/connector-editors-straight/css-constants.d.ts +30 -0
  47. package/types/browser-ui/connector-editors-straight/definitions.d.ts +69 -0
  48. package/types/browser-ui/connector-editors-straight/index.d.ts +11 -0
  49. package/types/browser-ui/connector-editors-straight/straight-editor.d.ts +42 -0
  50. package/types/browser-ui/constants.d.ts +79 -0
  51. package/types/browser-ui/copy-paste/clipboard.d.ts +34 -0
  52. package/types/browser-ui/copy-paste/index.d.ts +2 -0
  53. package/types/browser-ui/copy-paste/transformer.d.ts +14 -0
  54. package/types/browser-ui/css-constants.d.ts +436 -0
  55. package/types/browser-ui/d.d.ts +2 -0
  56. package/types/browser-ui/definitions.d.ts +442 -0
  57. package/types/browser-ui/dialogs/binder.d.ts +49 -0
  58. package/types/browser-ui/dialogs/constants.d.ts +51 -0
  59. package/types/browser-ui/dialogs/dialogs.d.ts +30 -0
  60. package/types/browser-ui/dialogs/index.d.ts +3 -0
  61. package/types/browser-ui/drag-manager-2.d.ts +54 -0
  62. package/types/browser-ui/edge-handler-base.d.ts +168 -0
  63. package/types/browser-ui/edge-input-handler.d.ts +116 -0
  64. package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +22 -0
  65. package/types/browser-ui/edge-mappings/index.d.ts +1 -0
  66. package/types/browser-ui/edge-relocate-handler.d.ts +51 -0
  67. package/types/browser-ui/element-drag-handler-2.d.ts +254 -0
  68. package/types/browser-ui/element-dragger.d.ts +45 -0
  69. package/types/browser-ui/element-facade.d.ts +11 -0
  70. package/types/browser-ui/event-manager.d.ts +50 -0
  71. package/types/browser-ui/fixed-layer.d.ts +107 -0
  72. package/types/browser-ui/group-layout-adapter.d.ts +19 -0
  73. package/types/browser-ui/html-element-overlay.d.ts +32 -0
  74. package/types/browser-ui/icons/definitions.d.ts +59 -0
  75. package/types/browser-ui/icons/icon-renderer.d.ts +43 -0
  76. package/types/browser-ui/icons/index.d.ts +2 -0
  77. package/types/browser-ui/index.d.ts +48 -0
  78. package/types/browser-ui/pan-zoom-options.d.ts +262 -0
  79. package/types/browser-ui/pan-zoom.d.ts +674 -0
  80. package/types/browser-ui/paper-renderer/definitions.d.ts +83 -0
  81. package/types/browser-ui/paper-renderer/index.d.ts +2 -0
  82. package/types/browser-ui/paper-renderer/paper.d.ts +50 -0
  83. package/types/browser-ui/pinch-listener.d.ts +33 -0
  84. package/types/browser-ui/plugins/background/available-backgrounds.d.ts +12 -0
  85. package/types/browser-ui/plugins/background/background-options.d.ts +62 -0
  86. package/types/browser-ui/plugins/background/background-plugin.d.ts +62 -0
  87. package/types/browser-ui/plugins/background/generated-grid-background.d.ts +230 -0
  88. package/types/browser-ui/plugins/background/index.d.ts +6 -0
  89. package/types/browser-ui/plugins/background/simple-background.d.ts +33 -0
  90. package/types/browser-ui/plugins/background/tiled-background.d.ts +118 -0
  91. package/types/browser-ui/plugins/browser-ui-plugin.d.ts +90 -0
  92. package/types/browser-ui/plugins/edge-routing/index.d.ts +66 -0
  93. package/types/browser-ui/plugins/index.d.ts +5 -0
  94. package/types/browser-ui/plugins/selected-edge-highlight/index.d.ts +1 -0
  95. package/types/browser-ui/plugins/selected-edge-highlight/selected-edge-highlight-plugin.d.ts +36 -0
  96. package/types/browser-ui/plugins/ui-states/index.d.ts +2 -0
  97. package/types/browser-ui/plugins/ui-states/ui-state.d.ts +14 -0
  98. package/types/browser-ui/plugins/ui-states/ui-states-plugin.d.ts +69 -0
  99. package/types/browser-ui/positioning-and-sizing-utils.d.ts +103 -0
  100. package/types/browser-ui/shape-library/index.d.ts +4 -0
  101. package/types/browser-ui/shape-library/shape-library-definitions.d.ts +243 -0
  102. package/types/browser-ui/shape-library/shape-library.d.ts +266 -0
  103. package/types/browser-ui/shape-library/shapes-basic.d.ts +7 -0
  104. package/types/browser-ui/shape-library/shapes-flowchart.d.ts +7 -0
  105. package/types/browser-ui/storage.d.ts +8 -0
  106. package/types/browser-ui/surface-renderer/anim/anim.d.ts +64 -0
  107. package/types/browser-ui/surface-renderer/anim/constants.d.ts +74 -0
  108. package/types/browser-ui/surface-renderer/anim/definitions.d.ts +134 -0
  109. package/types/browser-ui/surface-renderer/anim/index.d.ts +4 -0
  110. package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +23 -0
  111. package/types/browser-ui/surface-renderer/css-classes.d.ts +64 -0
  112. package/types/browser-ui/surface-renderer/decorators.d.ts +162 -0
  113. package/types/browser-ui/surface-renderer/definitions.d.ts +83 -0
  114. package/types/browser-ui/surface-renderer/diagrams/constants.d.ts +28 -0
  115. package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +528 -0
  116. package/types/browser-ui/surface-renderer/diagrams/diagram-cell.d.ts +123 -0
  117. package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +116 -0
  118. package/types/browser-ui/surface-renderer/diagrams/diagram-palette.d.ts +11 -0
  119. package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +112 -0
  120. package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +221 -0
  121. package/types/browser-ui/surface-renderer/diagrams/index.d.ts +25 -0
  122. package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +59 -0
  123. package/types/browser-ui/surface-renderer/diagrams/util.d.ts +15 -0
  124. package/types/browser-ui/surface-renderer/elastic-group-manager.d.ts +102 -0
  125. package/types/browser-ui/surface-renderer/index.d.ts +34 -0
  126. package/types/browser-ui/surface-renderer/params.d.ts +175 -0
  127. package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +26 -0
  128. package/types/browser-ui/surface-renderer/plugins/controls/index.d.ts +1 -0
  129. package/types/browser-ui/surface-renderer/plugins/drag-groups/drag-groups-plugin.d.ts +78 -0
  130. package/types/browser-ui/surface-renderer/plugins/drag-groups/index.d.ts +1 -0
  131. package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +25 -0
  132. package/types/browser-ui/surface-renderer/plugins/export-controls/index.d.ts +1 -0
  133. package/types/browser-ui/surface-renderer/plugins/index.d.ts +10 -0
  134. package/types/browser-ui/surface-renderer/plugins/lasso/index.d.ts +2 -0
  135. package/types/browser-ui/surface-renderer/plugins/lasso/lasso-plugin.d.ts +78 -0
  136. package/types/browser-ui/surface-renderer/plugins/lasso/lasso.d.ts +74 -0
  137. package/types/browser-ui/surface-renderer/plugins/miniview/index.d.ts +1 -0
  138. package/types/browser-ui/surface-renderer/plugins/miniview/miniview-plugin.d.ts +235 -0
  139. package/types/browser-ui/surface-renderer/plugins/palette/index.d.ts +1 -0
  140. package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +17 -0
  141. package/types/browser-ui/surface-renderer/plugins/pan-buttons/index.d.ts +1 -0
  142. package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +55 -0
  143. package/types/browser-ui/surface-renderer/plugins/resizing-tools/border-drag-handlers.d.ts +3 -0
  144. package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +411 -0
  145. package/types/browser-ui/surface-renderer/plugins/resizing-tools/drag-handlers.d.ts +3 -0
  146. package/types/browser-ui/surface-renderer/plugins/resizing-tools/handle-gen.d.ts +15 -0
  147. package/types/browser-ui/surface-renderer/plugins/resizing-tools/index.d.ts +4 -0
  148. package/types/browser-ui/surface-renderer/plugins/resizing-tools/resizing-tools-plugin.d.ts +185 -0
  149. package/types/browser-ui/surface-renderer/plugins/resizing-tools/util.d.ts +16 -0
  150. package/types/browser-ui/surface-renderer/plugins/snaplines/index.d.ts +1 -0
  151. package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +128 -0
  152. package/types/browser-ui/surface-renderer/plugins/vertex-drawing/definitions.d.ts +90 -0
  153. package/types/browser-ui/surface-renderer/plugins/vertex-drawing/index.d.ts +2 -0
  154. package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +64 -0
  155. package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +127 -0
  156. package/types/browser-ui/surface-renderer/shape-palette.d.ts +55 -0
  157. package/types/browser-ui/surface-renderer/surface-decorator.d.ts +35 -0
  158. package/types/browser-ui/surface-renderer/surface-events.d.ts +9 -0
  159. package/types/browser-ui/surface-renderer/surface-render-options.d.ts +125 -0
  160. package/types/browser-ui/surface-renderer/surface.d.ts +665 -0
  161. package/types/browser-ui/svg-component.d.ts +6 -0
  162. package/types/browser-ui/svg-element-connector.d.ts +16 -0
  163. package/types/browser-ui/svg-element-overlay.d.ts +55 -0
  164. package/types/browser-ui/svg-export/definitions.d.ts +153 -0
  165. package/types/browser-ui/svg-export/image-export-ui.d.ts +20 -0
  166. package/types/browser-ui/svg-export/image-exporter.d.ts +15 -0
  167. package/types/browser-ui/svg-export/index.d.ts +6 -0
  168. package/types/browser-ui/svg-export/svg-export-ui.d.ts +11 -0
  169. package/types/browser-ui/svg-export/svg-exporter.d.ts +8 -0
  170. package/types/browser-ui/svg-export/util.d.ts +23 -0
  171. package/types/browser-ui/svg-util.d.ts +27 -0
  172. package/types/browser-ui/templating/browser-ui-recado.d.ts +48 -0
  173. package/types/browser-ui/templating/custom-tag-definition.d.ts +32 -0
  174. package/types/browser-ui/templating/index.d.ts +11 -0
  175. package/types/browser-ui/templating/recado-template-renderer.d.ts +69 -0
  176. package/types/browser-ui/ui-path.d.ts +57 -0
  177. package/types/browser-ui/util.d.ts +4 -0
  178. package/types/browser-ui/wheel-listener.d.ts +2 -0
  179. package/types/charts/area/area-chart.d.ts +85 -0
  180. package/types/charts/area/index.d.ts +1 -0
  181. package/types/charts/bar-and-column/bar-chart.d.ts +34 -0
  182. package/types/charts/bar-and-column/bar-plot.d.ts +90 -0
  183. package/types/charts/bar-and-column/column-chart.d.ts +35 -0
  184. package/types/charts/bar-and-column/index.d.ts +3 -0
  185. package/types/charts/base-chart.d.ts +395 -0
  186. package/types/charts/base-xy-chart.d.ts +224 -0
  187. package/types/charts/bubble/bubble-chart.d.ts +30 -0
  188. package/types/charts/bubble/definitions.d.ts +32 -0
  189. package/types/charts/bubble/index.d.ts +2 -0
  190. package/types/charts/category-value-chart.d.ts +146 -0
  191. package/types/charts/chart-exporter.d.ts +38 -0
  192. package/types/charts/chart-zoom-controls.d.ts +23 -0
  193. package/types/charts/constants.d.ts +16 -0
  194. package/types/charts/css-classes.d.ts +312 -0
  195. package/types/charts/datasource.d.ts +61 -0
  196. package/types/charts/definitions.d.ts +261 -0
  197. package/types/charts/domain_scale_utilities.d.ts +72 -0
  198. package/types/charts/dual-value-chart.d.ts +60 -0
  199. package/types/charts/gauge/definitions.d.ts +108 -0
  200. package/types/charts/gauge/gauge-chart.d.ts +91 -0
  201. package/types/charts/gauge/index.d.ts +2 -0
  202. package/types/charts/index.d.ts +25 -0
  203. package/types/charts/legend.d.ts +120 -0
  204. package/types/charts/line/index.d.ts +1 -0
  205. package/types/charts/line/line-chart.d.ts +79 -0
  206. package/types/charts/markers.d.ts +13 -0
  207. package/types/charts/pie/index.d.ts +1 -0
  208. package/types/charts/pie/pie-chart.d.ts +146 -0
  209. package/types/charts/plot.d.ts +75 -0
  210. package/types/charts/sankey/index.d.ts +1 -0
  211. package/types/charts/sankey/preprocessor.d.ts +37 -0
  212. package/types/charts/sankey/sankey.d.ts +208 -0
  213. package/types/charts/scatter/definitions.d.ts +6 -0
  214. package/types/charts/scatter/index.d.ts +2 -0
  215. package/types/charts/scatter/scatter-chart.d.ts +16 -0
  216. package/types/charts/series/array-based-series.d.ts +95 -0
  217. package/types/charts/series/collation-series.d.ts +24 -0
  218. package/types/charts/series/definitions.d.ts +52 -0
  219. package/types/charts/series/dual-value-chart-series.d.ts +26 -0
  220. package/types/charts/series/index.d.ts +7 -0
  221. package/types/charts/series/record-based-series.d.ts +58 -0
  222. package/types/charts/series/series.d.ts +66 -0
  223. package/types/charts/series/summing-collation-series.d.ts +31 -0
  224. package/types/charts/series/summing-series.d.ts +19 -0
  225. package/types/charts/series-based-chart.d.ts +59 -0
  226. package/types/charts/tooltip.d.ts +167 -0
  227. package/types/charts/util.d.ts +149 -0
  228. package/types/core/astar/astar-path-finder.d.ts +37 -0
  229. package/types/core/astar/astar-util.d.ts +100 -0
  230. package/types/core/astar/candidate-finder.d.ts +16 -0
  231. package/types/core/astar/candidate-sorter.d.ts +10 -0
  232. package/types/core/astar/definitions.d.ts +185 -0
  233. package/types/core/astar/index.d.ts +3 -0
  234. package/types/core/astar/path-to-segments.d.ts +45 -0
  235. package/types/core/autosaver.d.ts +67 -0
  236. package/types/core/color-generator.d.ts +66 -0
  237. package/types/core/constants.d.ts +181 -0
  238. package/types/core/csv-loader.d.ts +84 -0
  239. package/types/core/datamodel/data-model.d.ts +23 -0
  240. package/types/core/datamodel/vertex-definition.d.ts +40 -0
  241. package/types/core/datasource.d.ts +87 -0
  242. package/types/core/event-constants.d.ts +308 -0
  243. package/types/core/event-generator.d.ts +102 -0
  244. package/types/core/filterable-dataset.d.ts +38 -0
  245. package/types/core/geom.d.ts +278 -0
  246. package/types/core/index.d.ts +39 -0
  247. package/types/core/io.d.ts +106 -0
  248. package/types/core/layout/absolute-layout.d.ts +91 -0
  249. package/types/core/layout/abstract-layout-adapter.d.ts +17 -0
  250. package/types/core/layout/abstract-layout.d.ts +192 -0
  251. package/types/core/layout/circular/circular-layout.d.ts +31 -0
  252. package/types/core/layout/circular/index.d.ts +1 -0
  253. package/types/core/layout/empty-layout.d.ts +17 -0
  254. package/types/core/layout/force-directed/force-directed-layout.d.ts +148 -0
  255. package/types/core/layout/force-directed/index.d.ts +1 -0
  256. package/types/core/layout/grid/definitions.d.ts +81 -0
  257. package/types/core/layout/grid/grid-layout.d.ts +60 -0
  258. package/types/core/layout/grid/index.d.ts +2 -0
  259. package/types/core/layout/hierarchical/abstract-hierarchical-layout.d.ts +90 -0
  260. package/types/core/layout/hierarchical/balloon-layout.d.ts +62 -0
  261. package/types/core/layout/hierarchical/definitions.d.ts +45 -0
  262. package/types/core/layout/hierarchical/hierarchical-layout.d.ts +102 -0
  263. package/types/core/layout/hierarchical/index.d.ts +5 -0
  264. package/types/core/layout/hierarchical/parent-relative-placement.d.ts +96 -0
  265. package/types/core/layout/hierarchy/assign-layers-stage.d.ts +26 -0
  266. package/types/core/layout/hierarchy/crossing-stage.d.ts +78 -0
  267. package/types/core/layout/hierarchy/definitions.d.ts +261 -0
  268. package/types/core/layout/hierarchy/edge-routing.d.ts +25 -0
  269. package/types/core/layout/hierarchy/hierarchy-layout-stage.d.ts +9 -0
  270. package/types/core/layout/hierarchy/hierarchy-layout.d.ts +87 -0
  271. package/types/core/layout/hierarchy/index.d.ts +11 -0
  272. package/types/core/layout/hierarchy/model.d.ts +167 -0
  273. package/types/core/layout/hierarchy/parent-relative-placement.d.ts +69 -0
  274. package/types/core/layout/hierarchy/placement-stage.d.ts +82 -0
  275. package/types/core/layout/hierarchy/util.d.ts +13 -0
  276. package/types/core/layout/hierarchy/vertex-set.d.ts +45 -0
  277. package/types/core/layout/index.d.ts +10 -0
  278. package/types/core/layout/layouts.d.ts +10 -0
  279. package/types/core/magnetizer.d.ts +232 -0
  280. package/types/core/model/anchor.d.ts +38 -0
  281. package/types/core/model/cluster.d.ts +19 -0
  282. package/types/core/model/defs.d.ts +8 -0
  283. package/types/core/model/djikstra.d.ts +26 -0
  284. package/types/core/model/floyd-warshall.d.ts +15 -0
  285. package/types/core/model/graph.d.ts +1166 -0
  286. package/types/core/model/path.d.ts +227 -0
  287. package/types/core/params.d.ts +476 -0
  288. package/types/core/renderer.d.ts +74 -0
  289. package/types/core/router/common.d.ts +104 -0
  290. package/types/core/router/direct-router.d.ts +12 -0
  291. package/types/core/router/index.d.ts +3 -0
  292. package/types/core/router/orthogonal-router.d.ts +46 -0
  293. package/types/core/rtree/definitions.d.ts +24 -0
  294. package/types/core/rtree/hilbert.d.ts +9 -0
  295. package/types/core/rtree/index.d.ts +4 -0
  296. package/types/core/rtree/rtree.d.ts +102 -0
  297. package/types/core/rtree/util.d.ts +55 -0
  298. package/types/core/search/index.d.ts +1 -0
  299. package/types/core/search/visuallyjs-search.d.ts +167 -0
  300. package/types/core/selection.d.ts +394 -0
  301. package/types/core/templates/abstract-entry.d.ts +19 -0
  302. package/types/core/templates/comment-entry.d.ts +11 -0
  303. package/types/core/templates/core.d.ts +162 -0
  304. package/types/core/templates/custom-tag.d.ts +74 -0
  305. package/types/core/templates/defs.d.ts +123 -0
  306. package/types/core/templates/each-entry.d.ts +23 -0
  307. package/types/core/templates/element-entry.d.ts +18 -0
  308. package/types/core/templates/elements.d.ts +14 -0
  309. package/types/core/templates/executions.d.ts +100 -0
  310. package/types/core/templates/expressions.d.ts +47 -0
  311. package/types/core/templates/fake-dom.d.ts +42 -0
  312. package/types/core/templates/headless.d.ts +15 -0
  313. package/types/core/templates/if-entry.d.ts +25 -0
  314. package/types/core/templates/index.d.ts +14 -0
  315. package/types/core/templates/parser.d.ts +84 -0
  316. package/types/core/templates/text-entry.d.ts +17 -0
  317. package/types/core/templates/tmpl-entry.d.ts +13 -0
  318. package/types/core/toolkit.d.ts +1314 -0
  319. package/types/core/undo-redo/compound-action.d.ts +19 -0
  320. package/types/core/undo-redo/edge-action.d.ts +62 -0
  321. package/types/core/undo-redo/group-action.d.ts +60 -0
  322. package/types/core/undo-redo/move-action.d.ts +18 -0
  323. package/types/core/undo-redo/node-group-action.d.ts +62 -0
  324. package/types/core/undo-redo/port-action.d.ts +29 -0
  325. package/types/core/undo-redo/renderer-vertex-removed-action.d.ts +17 -0
  326. package/types/core/undo-redo/set-type-action.d.ts +14 -0
  327. package/types/core/undo-redo/undo-redo.d.ts +203 -0
  328. package/types/core/undo-redo/update-action.d.ts +20 -0
  329. package/types/core/undo-redo/vertex-update-action.d.ts +12 -0
  330. package/types/core/util.d.ts +661 -0
  331. package/types/index.d.ts +16 -0
  332. package/types/l.d.ts +2 -0
  333. package/types/test-support/index.d.ts +1 -0
  334. package/types/test-support/test-support.d.ts +833 -0
  335. package/types/ui/common/abstract-segment.d.ts +88 -0
  336. package/types/ui/common/anchor.d.ts +280 -0
  337. package/types/ui/common/connector.d.ts +106 -0
  338. package/types/ui/common/index.d.ts +5 -0
  339. package/types/ui/common/overlay.d.ts +117 -0
  340. package/types/ui/common/paint-style.d.ts +33 -0
  341. package/types/ui/connector-bezier/abstract-bezier-connector.d.ts +68 -0
  342. package/types/ui/connector-bezier/bezier-connector.d.ts +34 -0
  343. package/types/ui/connector-bezier/bezier-segment.d.ts +31 -0
  344. package/types/ui/connector-bezier/bezier.d.ts +129 -0
  345. package/types/ui/connector-bezier/index.d.ts +6 -0
  346. package/types/ui/connector-bezier/operations.d.ts +18 -0
  347. package/types/ui/connector-bezier/quadratic-bezier-connector.d.ts +35 -0
  348. package/types/ui/connector-orthogonal/default-orthogonal-path-compute.d.ts +11 -0
  349. package/types/ui/connector-orthogonal/definitions.d.ts +120 -0
  350. package/types/ui/connector-orthogonal/index.d.ts +7 -0
  351. package/types/ui/connector-orthogonal/modern-source-target-relocator.d.ts +37 -0
  352. package/types/ui/connector-orthogonal/operations.d.ts +49 -0
  353. package/types/ui/connector-orthogonal/stub-calculators.d.ts +12 -0
  354. package/types/ui/connector-orthogonal/utils.d.ts +134 -0
  355. package/types/ui/connector-orthogonal/vertex-avoidance.d.ts +29 -0
  356. package/types/ui/connector-straight/index.d.ts +2 -0
  357. package/types/ui/connector-straight/operations.d.ts +55 -0
  358. package/types/ui/connector-straight/straight-connector.d.ts +121 -0
  359. package/types/ui/copy-paste/clipboard.d.ts +45 -0
  360. package/types/ui/copy-paste/copy-data.d.ts +93 -0
  361. package/types/ui/copy-paste/index.d.ts +2 -0
  362. package/types/ui/core/callbacks.d.ts +48 -0
  363. package/types/ui/core/component/component.d.ts +115 -0
  364. package/types/ui/core/connector/abstract-connector.d.ts +66 -0
  365. package/types/ui/core/connector/arc-segment.d.ts +39 -0
  366. package/types/ui/core/connector/connection-impl.d.ts +81 -0
  367. package/types/ui/core/connector/connections.d.ts +113 -0
  368. package/types/ui/core/connector/connectors.d.ts +205 -0
  369. package/types/ui/core/connector/operations.d.ts +0 -0
  370. package/types/ui/core/connector/segments.d.ts +24 -0
  371. package/types/ui/core/connector/straight-segment.d.ts +32 -0
  372. package/types/ui/core/constants.d.ts +181 -0
  373. package/types/ui/core/context.d.ts +26 -0
  374. package/types/ui/core/core-events.d.ts +7 -0
  375. package/types/ui/core/core.d.ts +1734 -0
  376. package/types/ui/core/css-constants.d.ts +149 -0
  377. package/types/ui/core/defaults.d.ts +242 -0
  378. package/types/ui/core/definitions.d.ts +540 -0
  379. package/types/ui/core/event-constants.d.ts +510 -0
  380. package/types/ui/core/factory/anchor-record-factory.d.ts +17 -0
  381. package/types/ui/core/factory/continuous-anchors.d.ts +27 -0
  382. package/types/ui/core/factory/overlay-factory.d.ts +8 -0
  383. package/types/ui/core/grid-profile.d.ts +28 -0
  384. package/types/ui/core/group-collapse-expand.d.ts +23 -0
  385. package/types/ui/core/group-sizer.d.ts +9 -0
  386. package/types/ui/core/index.d.ts +45 -0
  387. package/types/ui/core/magnetize-profile.d.ts +82 -0
  388. package/types/ui/core/overlay/arrow-overlay.d.ts +34 -0
  389. package/types/ui/core/overlay/custom-overlay.d.ts +38 -0
  390. package/types/ui/core/overlay/diamond-overlay.d.ts +14 -0
  391. package/types/ui/core/overlay/dot-overlay.d.ts +54 -0
  392. package/types/ui/core/overlay/ellipse-overlay.d.ts +60 -0
  393. package/types/ui/core/overlay/label-overlay.d.ts +37 -0
  394. package/types/ui/core/overlay/overlay.d.ts +131 -0
  395. package/types/ui/core/overlay/plain-arrow-overlay.d.ts +15 -0
  396. package/types/ui/core/overlay/rectangle-overlay.d.ts +66 -0
  397. package/types/ui/core/params.d.ts +223 -0
  398. package/types/ui/core/router/astar-path-finder.d.ts +29 -0
  399. package/types/ui/core/router/base-router.d.ts +100 -0
  400. package/types/ui/core/router/default-router.d.ts +38 -0
  401. package/types/ui/core/router/index.d.ts +5 -0
  402. package/types/ui/core/router/router-utils.d.ts +118 -0
  403. package/types/ui/core/router/router.d.ts +30 -0
  404. package/types/ui/core/type-descriptors.d.ts +83 -0
  405. package/types/ui/core/ui-model.d.ts +65 -0
  406. package/types/ui/core/view/common-options.d.ts +15 -0
  407. package/types/ui/core/view/edge-options.d.ts +126 -0
  408. package/types/ui/core/view/events.d.ts +159 -0
  409. package/types/ui/core/view/group-options.d.ts +75 -0
  410. package/types/ui/core/view/index.d.ts +35 -0
  411. package/types/ui/core/view/node-options.d.ts +20 -0
  412. package/types/ui/core/view/node-or-port-options.d.ts +28 -0
  413. package/types/ui/core/view/port-options.d.ts +51 -0
  414. package/types/ui/core/view/vertex-options.d.ts +28 -0
  415. package/types/ui/core/viewport.d.ts +297 -0
  416. package/types/ui/index.d.ts +9 -0
  417. package/types/ui/plugins/definitions.d.ts +118 -0
  418. package/types/ui/plugins/index.d.ts +2 -0
  419. package/types/ui/plugins/plugins.d.ts +7 -0
  420. package/types/ui/property-mappings/definitions.d.ts +28 -0
  421. package/types/ui/property-mappings/index.d.ts +2 -0
  422. package/types/ui/property-mappings/property-mapper.d.ts +16 -0
  423. package/types/ui/util/index.d.ts +3 -0
  424. package/types/ui/util/property-tracker.d.ts +8 -0
  425. package/types/ui/util/svg-constants.d.ts +111 -0
  426. package/types/ui/util/util.d.ts +69 -0
  427. package/types/version.d.ts +1 -0
@@ -0,0 +1,278 @@
1
+ import { Grid, LineXY, PointXY, RectangleXY } from "./util";
2
+ export type Quadrant = 1 | 2 | 3 | 4;
3
+ /**
4
+ * Definition of 2 PI
5
+ * @internal
6
+ */
7
+ export declare const TWO_PI: number;
8
+ /**
9
+ * Adds the x and y values of the two points and returns a new point.
10
+ * @param p1
11
+ * @param p2
12
+ * @internal
13
+ */
14
+ export declare function add(p1: PointXY, p2: PointXY): PointXY;
15
+ /**
16
+ * Subtracts p2 from p1, returning a new point.
17
+ * @param p1
18
+ * @param p2
19
+ * @returns a new Point, with p2 subtracted from p1.
20
+ * @internal
21
+ */
22
+ export declare function subtract(p1: PointXY, p2: PointXY): PointXY;
23
+ /**
24
+ * Calculates the gradient of a line between the two points.
25
+ * @param p1 First point in the line
26
+ * @param p2 Second point in the line
27
+ * @returns The gradient of a line between the two points.
28
+ * @internal
29
+ */
30
+ export declare function gradient(p1: PointXY, p2: PointXY): number;
31
+ /**
32
+ * Calculates the gradient of a normal to a line between the two points.
33
+ * @param p1 First point in the line
34
+ * @param p2 Second point in the line
35
+ * @returns The gradient of a normal to a line between the two points.
36
+ * @internal
37
+ */
38
+ export declare function normal(p1: PointXY, p2: PointXY): number;
39
+ /**
40
+ * Calculates the length of a line between the two points.
41
+ * @param p1 First point in the line
42
+ * @param p2 Second point in the line
43
+ * @returns The length of a line between the two points.
44
+ * @internal
45
+ */
46
+ export declare function lineLength(p1: PointXY, p2: PointXY): number;
47
+ /**
48
+ * @internal
49
+ * @param p1
50
+ * @param p2
51
+ */
52
+ export declare function manhattanLineLength(p1: PointXY, p2: PointXY): number;
53
+ /**
54
+ * Calculates the quadrant in which the angle between the two points lies.
55
+ * @param p1 First point in the line
56
+ * @param p2 Second point in the line
57
+ * @returns The quadrant - 1 for upper right, 2 for lower right, 3 for lower left, 4 for upper left.
58
+ * @internal
59
+ */
60
+ export declare function quadrant(p1: PointXY, p2: PointXY): Quadrant;
61
+ /**
62
+ * Calculates the angle between the two points.
63
+ * @param p1 First point
64
+ * @param p2 Second point
65
+ * @returns The angle between the two points.
66
+ * @internal
67
+ * @deprecated Can probably replace this with Math.atan2 for better accuracy
68
+ */
69
+ export declare function theta(p1: PointXY, p2: PointXY): number;
70
+ /**
71
+ * Calculates whether or not the two rectangles intersect.
72
+ * @param r1 First rectangle
73
+ * @param r2 Second rectangle
74
+ * @returns True if the rectangles intersect, false otherwise.
75
+ * @internal
76
+ */
77
+ export declare function rectanglesIntersect(r1: RectangleXY, r2: RectangleXY): boolean;
78
+ /**
79
+ * Computes how much the two rectangles overlap, in square units.
80
+ * @param r1
81
+ * @param r2
82
+ */
83
+ export declare function computeRectangleIntersection(r1: RectangleXY, r2: RectangleXY): number;
84
+ /**
85
+ * Trim decimal points from a number. Defaults to 3 decimal points.
86
+ * @param n
87
+ * @param digits
88
+ * @internal
89
+ */
90
+ export declare function fixPrecision(n: number, digits?: number): number;
91
+ /**
92
+ * Compute the intersection of the two lines.
93
+ * @param l1
94
+ * @param l2
95
+ * @returns A point if an intersection found, null otherwise.
96
+ * @internal
97
+ */
98
+ export declare function lineIntersection(l1: LineXY, l2: LineXY): PointXY | null;
99
+ /**
100
+ * Finds all points where the given line intersects the given rectangle.
101
+ * @param line
102
+ * @param r
103
+ * @returns An array of intersection points. If there are no intersection points the array will be empty, but never null.
104
+ * @internal
105
+ */
106
+ export declare function lineRectangleIntersection(line: LineXY, r: RectangleXY): Array<PointXY>;
107
+ /**
108
+ * Returns true if the given line is either entirely within the given rectangle, or it intersects one of the faces of
109
+ * the given rectangle.
110
+ * @param line
111
+ * @param r
112
+ * @internal
113
+ */
114
+ export declare function lineIntersectsOrIsEnclosedByRectangle(line: LineXY, r: RectangleXY): boolean;
115
+ /**
116
+ * Calculates whether or not r2 is completely enclosed by r1.
117
+ * @param r1 First rectangle
118
+ * @param r2 Second rectangle
119
+ * @param [allowSharedEdges=false] If true, the concept of enclosure allows for one or more edges to be shared by the two rectangles.
120
+ * @returns True if r1 encloses r2, false otherwise.
121
+ * @internal
122
+ */
123
+ export declare function encloses(r1: RectangleXY, r2: RectangleXY, allowSharedEdges?: boolean): boolean;
124
+ /**
125
+ * Returns true if the given rectangle contains the given point.
126
+ * @param r
127
+ * @param p
128
+ * @param lax If true, the method will return true of the point lies on the rectangle border, otherwise the method will return false if the point lies on the border.
129
+ * @internal
130
+ */
131
+ export declare function containsPoint(r: RectangleXY, p: PointXY, lax: boolean): boolean;
132
+ /**
133
+ * Calculates a point on the line from `fromPoint` to `toPoint` that is `distance` units along the length of the line.
134
+ * @param fromPoint First point
135
+ * @param toPoint Second point
136
+ * @param distance Distance along the length that the point should be located.
137
+ * @returns Point on the line, in the form `{ x:..., y:... }`.
138
+ * @internal
139
+ */
140
+ export declare function pointOnLine(fromPoint: PointXY, toPoint: PointXY, distance: number): PointXY;
141
+ /**
142
+ * Calculates a line of length `length` that is perpendicular to the line from `fromPoint` to `toPoint`. The line that is
143
+ * returned has `toPoint` as its midpoint and extends (length/2) pixels in each direction from this point.
144
+ * @param fromPoint First point
145
+ * @param toPoint Second point
146
+ * @param length Length of the line to generate
147
+ * @returns Perpendicular line of the required length.
148
+ * @internal
149
+ */
150
+ export declare function perpendicularLineTo(fromPoint: PointXY, toPoint: PointXY, length: number): LineXY;
151
+ /**
152
+ * Returns a line that bisects, and is perpendicular to, the given line, having the requested length. The direction
153
+ * of the returned line is "clockwise" from the coordinates that are passed.
154
+ * @param fromPoint
155
+ * @param toPoint
156
+ * @param length
157
+ * @internal
158
+ */
159
+ export declare function perpendicularBisectingLine(fromPoint: PointXY, toPoint: PointXY, length: number): LineXY;
160
+ /**
161
+ * Snap the given x,y to a point on the grid defined by gridX and gridY, using the given thresholds to calculate proximity to the grid.
162
+ * @param pos Position to transform
163
+ * @param grid Definition of the grid
164
+ * @param thresholdX Defines how close to a grid line in the x axis a value must be in order to be snapped to it.
165
+ * @param thresholdY Defines how close to a grid line in the y axis a value must be in order to be snapped to it.
166
+ * @returns The point to which the position was snapped, given the constraints of the grid.
167
+ * @internal
168
+ */
169
+ export declare function snapToGrid(pos: PointXY, grid: Grid, thresholdX?: number, thresholdY?: number): PointXY;
170
+ /**
171
+ * @internal
172
+ * @param pos
173
+ * @param grid
174
+ */
175
+ export declare function snapToGridUpperBound(pos: PointXY, grid: Grid): PointXY;
176
+ /**
177
+ * Compute the point at which the two lines intersect. The lines are expected to be parallel and either vertical or horizontal.
178
+ * The method will return null if there is no intersection. If you supply lines that are not horizontal or vertical the results
179
+ * of this method are indeterminate.
180
+ * @internal
181
+ * @param line1Point1
182
+ * @param line1Point2
183
+ * @param line2Point1
184
+ * @param line2Point2
185
+ */
186
+ export declare function linesIntersection(line1Point1: number, line1Point2: number, line2Point1: number, line2Point2: number): {
187
+ point1: number;
188
+ point2: number;
189
+ };
190
+ /**
191
+ * Returns whether or not the two given lines, which are expected to be parallel, overlap by an amount not less than `threshold`,
192
+ * which defaults to zero. If you supply lines that are not horizontal or vertical the results of this method are indeterminate.
193
+ * @param line1Point1
194
+ * @param line1Point2
195
+ * @param line2Point1
196
+ * @param line2Point2
197
+ * @param threshold
198
+ * @internal
199
+ */
200
+ export declare function linesOverlap(line1Point1: number, line1Point2: number, line2Point1: number, line2Point2: number, threshold?: number): boolean;
201
+ /**
202
+ * Expands the given rectangle by the given amount in each axis.
203
+ * @param r
204
+ * @param deltaX
205
+ * @param deltaY
206
+ * @internal
207
+ */
208
+ export declare function expandRectangle<T extends RectangleXY>(r: RectangleXY, deltaX: number, deltaY: number): T;
209
+ /**
210
+ * Find the intersection point of the two lines, which are treated as being of
211
+ * unlimited length, ie. if both lines are of non-zero length and are not parallel, then
212
+ * an intersection point is always returned even if they do not actually meet: their projections meet
213
+ * at the point this method returns.
214
+ * @param l1
215
+ * @param l2
216
+ * @internal
217
+ */
218
+ export declare function intersectionOfProjectedLines(l1: LineXY, l2: LineXY): PointXY;
219
+ /**
220
+ * Generates a line that is parallel to the given line, at the given distance
221
+ * away (where distance is applied perpendicular to the line)
222
+ * @param l
223
+ * @param distance
224
+ * @internal
225
+ */
226
+ export declare function parallelLineTo(l: LineXY, distance: number): LineXY;
227
+ /**
228
+ * Generates two lines that are parallel to the given line, at the given distance
229
+ * away (where distance is applied perpendicular to the line), one on either side of the line.
230
+ * @param l
231
+ * @param distance
232
+ * @internal
233
+ */
234
+ export declare function parallelLinesTo(l: LineXY, distance: number): [LineXY, LineXY];
235
+ /**
236
+ * Returns a line that is parallel to the line l, with start point p, and the given length.
237
+ * @param l
238
+ * @param p
239
+ * @param length
240
+ * @internal
241
+ */
242
+ export declare function parallelLineFromPoint(l: LineXY, p: PointXY, length: number): LineXY;
243
+ /**
244
+ * Compute the manhattan distance between the two points.
245
+ * @param x1
246
+ * @param y1
247
+ * @param x2
248
+ * @param y2
249
+ * @internal
250
+ */
251
+ export declare const manhattanDistance: (x1: number, y1: number, x2: number, y2: number) => number;
252
+ /**
253
+ * Compute the euclidean (ie straight line) distance between the two points
254
+ * @param x1
255
+ * @param y1
256
+ * @param x2
257
+ * @param y2
258
+ * @internal
259
+ */
260
+ export declare const euclideanDistance: (x1: number, y1: number, x2: number, y2: number) => number;
261
+ /**
262
+ * Compute the Chebyshev distance between the two points.
263
+ * @param x1
264
+ * @param y1
265
+ * @param x2
266
+ * @param y2
267
+ * @internal
268
+ */
269
+ export declare const chebyshevDistance: (x1: number, y1: number, x2: number, y2: number) => number;
270
+ /**
271
+ * Compute the Octile distance between the two points
272
+ * @param x1
273
+ * @param y1
274
+ * @param x2
275
+ * @param y2
276
+ * @internal
277
+ */
278
+ export declare const octileDistance: (x1: number, y1: number, x2: number, y2: number) => number;
@@ -0,0 +1,39 @@
1
+ export * from './event-generator';
2
+ export * from './model/defs';
3
+ export * from './model/cluster';
4
+ export * from './model/djikstra';
5
+ export * from './model/floyd-warshall';
6
+ export * from './model/graph';
7
+ export * from './model/path';
8
+ export * from './model/anchor';
9
+ export * from './datamodel/data-model';
10
+ export * from './datamodel/vertex-definition';
11
+ export * from './layout';
12
+ export * from "./geom";
13
+ export * from './color-generator';
14
+ export * from "./util";
15
+ export * from "./astar";
16
+ export * from './params';
17
+ export * from './toolkit';
18
+ export * from './io';
19
+ export * from './csv-loader';
20
+ export * from './autosaver';
21
+ export * from './renderer';
22
+ export * from './constants';
23
+ export * from './event-constants';
24
+ export * from './datasource';
25
+ export * from './selection';
26
+ export * from './filterable-dataset';
27
+ export * from "./search";
28
+ export * from './undo-redo/undo-redo';
29
+ export * from './undo-redo/compound-action';
30
+ export * from './undo-redo/group-action';
31
+ export * from './undo-redo/move-action';
32
+ export * from './undo-redo/node-group-action';
33
+ export * from './undo-redo/port-action';
34
+ export * from './undo-redo/update-action';
35
+ export * from './undo-redo/renderer-vertex-removed-action';
36
+ export * from './magnetizer';
37
+ export * from './templates';
38
+ export * from './router';
39
+ export * from './rtree';
@@ -0,0 +1,106 @@
1
+ import { VisuallyJsModel } from "./toolkit";
2
+ import { ObjectData } from "./model/graph";
3
+ import { PointXY, Geometry } from "./util";
4
+ import { ObjectAnchorSpec } from "./model/anchor";
5
+ /**
6
+ * Options for a URL fetch.
7
+ * @group Model
8
+ * @category Input and Output
9
+ */
10
+ export interface UrlFetchOptions {
11
+ type?: string;
12
+ url: string;
13
+ headers?: Record<string, any>;
14
+ success: (r: any) => any;
15
+ error?: (e: any, status?: any) => any;
16
+ dataType?: string;
17
+ data?: any;
18
+ }
19
+ /**
20
+ * Definition of a function that can parse JSON into a model. This is a high level interface that makes no assumptions about data format. You won't need to use this type unless you are writing your own parser.
21
+ * @group Model
22
+ * @category Input and Output
23
+ */
24
+ export type Parser = (data: any, instance: VisuallyJsModel, parameters?: any) => any;
25
+ /**
26
+ * Definition of a function that can export the contents of a model. This is a high level interface that makes no assumptions about data format. You won't need to use this type unless you are writing your own exporter.
27
+ * @group Model
28
+ * @category Input and Output
29
+ */
30
+ export type Exporter = (instance: VisuallyJsModel, parameters: any) => any;
31
+ /**
32
+ * The default type that represents an edge in a dataset to load or a saved dataset
33
+ */
34
+ export interface EdgeData {
35
+ /**
36
+ * Either the ID of the source vertex or a canvas location.
37
+ */
38
+ source: string | PointXY;
39
+ /**
40
+ * Either the ID of the target vertex or a canvas location.
41
+ */
42
+ target: string | PointXY;
43
+ /**
44
+ * Optional data to associate with the edge
45
+ */
46
+ data?: ObjectData;
47
+ /**
48
+ * Optional geometry that defines the edge's path
49
+ */
50
+ geometry?: Geometry;
51
+ /**
52
+ * Cost to associate with the edge. Defaults to 1. This value can be used when computing shortest paths.
53
+ */
54
+ cost?: number;
55
+ /**
56
+ * Whether or not the given edge is directed, ie. when computing a path the edge can only be traversed from source to target. Defaults to false.
57
+ */
58
+ directed?: boolean;
59
+ /**
60
+ * Optional anchors for the edge.
61
+ */
62
+ anchors?: {
63
+ source?: ObjectAnchorSpec;
64
+ target?: ObjectAnchorSpec;
65
+ };
66
+ }
67
+ /**
68
+ * The default type that represents a node in a dataset to load or a saved dataset
69
+ */
70
+ export type NodeData = Record<string, any>;
71
+ /**
72
+ * The default type that represents a group in a dataset to load or a saved dataset
73
+ */
74
+ export type GroupData = Record<string, any>;
75
+ /**
76
+ * The default JSON format, consisting of optional lists of nodes, edges and groups.
77
+ * @group Model
78
+ * @category Input and Output
79
+ */
80
+ export interface VisuallyJsDefaultJSON {
81
+ /**
82
+ * List of nodes.
83
+ */
84
+ nodes?: Array<NodeData>;
85
+ /**
86
+ * List of edges.
87
+ */
88
+ edges?: Array<EdgeData>;
89
+ /**
90
+ * List of groups.
91
+ */
92
+ groups?: Array<GroupData>;
93
+ }
94
+ export declare const JSON_DATATYPE = "json";
95
+ export declare const HIERARCHICAL_JSON_DATATYPE = "hierarchical-json";
96
+ export declare function registerParser(name: string, p: Parser): void;
97
+ export declare function registerExporter(name: string, p: Exporter): void;
98
+ export declare function parse(type: string, source: any, instance: VisuallyJsModel, parameters: any): any;
99
+ /**
100
+ * Internal method that handles data export, by looking for an exporter registered for the given `type`.
101
+ * @param type Format to export the data in
102
+ * @param instance Model to export data from
103
+ * @param parameters Optional parameters for the exporter.
104
+ * @internal
105
+ */
106
+ export declare function exportData(type: string, instance: VisuallyJsModel, parameters: any): any;
@@ -0,0 +1,91 @@
1
+ import { AbstractLayout, InternalLayoutOptions, LayoutParameters } from "./abstract-layout";
2
+ import { Node, Group, Vertex } from "../model/graph";
3
+ import { DataSource } from "../datasource";
4
+ import { PointXY, Size } from "../util";
5
+ /**
6
+ * Parameters for a layout that extends {@link AbsoluteBackedLayout}
7
+ * @group Layouts
8
+ * @category Absolute
9
+ */
10
+ export interface AbsoluteBackedLayoutParameters extends LayoutParameters {
11
+ /**
12
+ * Defaults to false. If true, then the layout will use any position values found in the data for a given vertex.
13
+ */
14
+ absoluteBacked?: boolean;
15
+ }
16
+ /**
17
+ * Constructor parameters for an {@link AbsoluteLayout}.
18
+ * @group Layouts
19
+ * @category Absolute
20
+ */
21
+ export interface AbsoluteLayoutParameters extends AbsoluteBackedLayoutParameters {
22
+ }
23
+ /**
24
+ * Base class for layouts that want to be backed with an absolute layout, ie. if for a given vertex there is positioning data available in the dataset, that positioning data should be used instead of the layout's computed position. This class is abstract and cannot be instantiated - use {@link AbsoluteLayout} for the simplest concrete implementation of this class.
25
+ * @group Layouts
26
+ * @category Absolute
27
+ */
28
+ export declare abstract class AbsoluteBackedLayout<P extends AbsoluteBackedLayoutParameters> extends AbstractLayout<P> {
29
+ private readonly _$_suppliedLocationFunction;
30
+ /**
31
+ * @internal
32
+ */
33
+ absoluteBacked: boolean;
34
+ /**
35
+ * @internal
36
+ */
37
+ protected constructor(params: InternalLayoutOptions<P>);
38
+ protected $_findLocation(v: Vertex, parameters?: AbsoluteBackedLayoutParameters): PointXY;
39
+ /**
40
+ * @internal
41
+ */
42
+ begin(model: DataSource, positionGetter: (id: string) => PointXY, positionSetter: (id: string, x: number, y: number) => void, sizes: Record<string, Size>, parameters: AbsoluteBackedLayoutParameters): void;
43
+ /**
44
+ * @internal
45
+ */
46
+ step(model: DataSource, getPosition: (id: string) => PointXY, setPosition: (id: string, x: number, y: number) => void, sizes: Record<string, Size>, parameters: AbsoluteBackedLayoutParameters): void;
47
+ /**
48
+ * @internal
49
+ */
50
+ end(model: DataSource, getPosition: (id: string) => PointXY, setPosition: (id: string, x: number, y: number) => void, sizes: Record<string, Size>, parameters: AbsoluteBackedLayoutParameters): void;
51
+ /**
52
+ * @internal
53
+ */
54
+ reset(): void;
55
+ /**
56
+ * Gets the position for the given Node/Group as dictated by either the `left`/`top` properties, or some other nominated pair, in the Node/Group's data. This position is what the Absolute layout uses itself, and this method exposes the absolute position for subclasses that wish to make use of the absolute backing.
57
+ * @param v Node/Group to get absolute position for.
58
+ * @param parameters Constructor parameters. May contain a custom `locationFunction`.
59
+ *
60
+ */
61
+ getAbsolutePosition(v: Node | Group, parameters?: LayoutParameters): PointXY;
62
+ }
63
+ /**
64
+ * Constant identifying an Absolute layout.
65
+ * @group Constants
66
+ */
67
+ export declare const LAYOUT_TYPE_ABSOLUTE = "Absolute";
68
+ /**
69
+ * This layout uses the positions defined in your data model to position elements, unless you provide a `locationFunction` in its options. This is the default layout that the UI uses.
70
+ * @group Layouts
71
+ * @category Absolute
72
+ */
73
+ export declare class AbsoluteLayout extends AbsoluteBackedLayout<AbsoluteLayoutParameters> {
74
+ /**
75
+ * Defines the AbsoluteLayout type. You can use this reference in render params.
76
+ *
77
+ */
78
+ static type: string;
79
+ /**
80
+ * @internal
81
+ */
82
+ readonly type: string;
83
+ /**
84
+ * @internal
85
+ */
86
+ constructor(params: InternalLayoutOptions<AbsoluteLayoutParameters>);
87
+ /**
88
+ * @internal
89
+ */
90
+ getDefaultParameters(): Record<string, any>;
91
+ }
@@ -0,0 +1,17 @@
1
+ import { Base, Group, Node } from "../model/graph";
2
+ import { Size } from "../util";
3
+ /**
4
+ * Base class for an object that a layout can use to find information about the size and position of rendered elements, as well as to filter elements it should handle. This is subclassed in {@link CanvasLayoutAdapter} and {@link GroupLayoutAdapter}
5
+ * currently.
6
+ * @internal
7
+ */
8
+ export declare abstract class AbstractLayoutAdapter<E> {
9
+ abstract filter(obj: Base): boolean;
10
+ abstract getElements(): Array<Node | Group>;
11
+ abstract getSize(el: E): Size;
12
+ abstract getViewportPositionById(id: string): {
13
+ r?: number;
14
+ width: number;
15
+ height: number;
16
+ };
17
+ }