@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,34 @@
1
+ import { BezierConnectorBase, AbstractBezierOptions } from "./abstract-bezier-connector";
2
+ import { Connection } from "../core/connector/connection-impl";
3
+ /**
4
+ * Options for {@link CubicBezierConnector}
5
+ * @group Edges
6
+ * @category Connectors
7
+ */
8
+ export interface BezierConnectorOptions extends AbstractBezierOptions {
9
+ /**
10
+ * Where to put the control point relative to the source/target. The number provided here should be a decimal, whose value defines the proportional distance between the source and target that the control point should be located at. The default value is 0.45. Larger values will make the Bezier curvier.
11
+ */
12
+ scale?: number;
13
+ }
14
+ /**
15
+ * Defines the Bezier connector type.
16
+ * @constant
17
+ * @group Edges
18
+ * @category Constants
19
+ */
20
+ export declare const CONNECTOR_TYPE_CUBIC_BEZIER = "Bezier";
21
+ /**
22
+ * A connector that draws a Bezier curve having two control points.
23
+ * @group Edges
24
+ * @category Connectors
25
+ */
26
+ export interface CubicBezierConnector extends BezierConnectorBase {
27
+ scale: number;
28
+ }
29
+ /**
30
+ * @param connection
31
+ * @param params
32
+ * @internal
33
+ */
34
+ export declare function _createCubicBezierConnector(connection: Connection<any>, params: BezierConnectorOptions): CubicBezierConnector;
@@ -0,0 +1,31 @@
1
+ import { Curve } from "./bezier";
2
+ import { Segment, SegmentHandler, SegmentParams } from "../common";
3
+ import { PointXY } from "../../core/util";
4
+ /**
5
+ * @internal
6
+ * @private
7
+ */
8
+ export interface BezierSegmentParams extends SegmentParams {
9
+ cp1: PointXY;
10
+ cp2: PointXY;
11
+ }
12
+ /**
13
+ * @internal
14
+ * @private
15
+ */
16
+ export declare const SEGMENT_TYPE_BEZIER = "Bezier";
17
+ /**
18
+ * @internal
19
+ * @private
20
+ */
21
+ export interface BezierSegment extends Segment {
22
+ curve: Curve;
23
+ cp1: PointXY;
24
+ cp2: PointXY;
25
+ length: number;
26
+ }
27
+ /**
28
+ * @internal
29
+ * @private
30
+ */
31
+ export declare const BezierSegmentHandler: SegmentHandler<BezierSegment, BezierSegmentParams>;
@@ -0,0 +1,129 @@
1
+ import { BoundingBox, LineXY, PointXY } from "../../core/util";
2
+ export type Curve = Array<PointXY>;
3
+ export type PointOnPath = {
4
+ point: PointXY;
5
+ location: number;
6
+ };
7
+ export type DistanceFromCurve = {
8
+ location: number;
9
+ distance: number;
10
+ };
11
+ export type AxisCoefficients = [number, number, number, number];
12
+ /**
13
+ * Calculates the distance that the given point lies from the given Bezier. Note that it is computed relative to the center of the Bezier,
14
+ * so if you have stroked the curve with a wide pen you may wish to take that into account! The distance returned is relative to the values
15
+ * of the curve and the point - it will most likely be pixels.
16
+ *
17
+ * @param point - a point in the form {x:567, y:3342}
18
+ * @param curve - a Bezier curve: an Array of PointXY objects. Note that this is currently
19
+ * hardcoded to assume cubix beziers, but would be better off supporting any degree.
20
+ * @returns a JS object literal containing location and distance. Location is analogous to the location
21
+ * argument you pass to the pointOnPath function: it is a ratio of distance travelled along the curve. Distance is the distance in pixels from
22
+ * the point to the curve.
23
+ * @internal
24
+ */
25
+ export declare function distanceFromCurve(point: PointXY, curve: Curve): DistanceFromCurve;
26
+ /**
27
+ * Calculates the nearest point to the given point on the given curve. The return value of this is a JS object literal, containing both the point's coordinates and also the 'location' of the point (see above).
28
+ * @internal
29
+ */
30
+ export declare function nearestPointOnCurve(point: PointXY, curve: Curve): {
31
+ point: PointXY;
32
+ location: number;
33
+ };
34
+ /**
35
+ *
36
+ * @internal
37
+ * @param curve
38
+ */
39
+ export declare function computeBezierLength(curve: Curve): number;
40
+ /**
41
+ * calculates a point on the curve, for a Bezier of arbitrary order.
42
+ * @param curve an array of control points, eg [{x:10,y:20}, {x:50,y:50}, {x:100,y:100}, {x:120,y:100}]. For a cubic bezier this should have four points.
43
+ * @param location a decimal indicating the distance along the curve the point should be located at. this is the distance along the curve as it travels, taking the way it bends into account. should be a number from 0 to 1, inclusive.
44
+ * @internal
45
+ */
46
+ export declare function pointOnCurve(curve: Curve, location: number): PointXY;
47
+ /**
48
+ *
49
+ * @internal
50
+ * @param p1
51
+ * @param p2
52
+ */
53
+ export declare function dist(p1: PointXY, p2: PointXY): number;
54
+ /**
55
+ *
56
+ * @internal
57
+ * @param curve
58
+ */
59
+ export declare function isPoint(curve: Curve): boolean;
60
+ /**
61
+ * finds the point that is 'distance' along the path from 'location'. this method returns both the x,y location of the point and also
62
+ * its 'location' (proportion of travel along the path); the method below - _pointAlongPathFrom - calls this method and just returns the
63
+ * point.
64
+ *
65
+ * TODO The compute length functionality was made much faster recently, using a lookup table. is it possible to use that lookup table find
66
+ * a value for the point some distance along the curve from somewhere?
67
+ * @internal
68
+ */
69
+ export declare function pointAlongPath(curve: Curve, location: number, distance: number): PointOnPath;
70
+ /**
71
+ * finds the point that is 'distance' along the path from 'location'.
72
+ * @internal
73
+ */
74
+ export declare function pointAlongCurveFrom(curve: Curve, location: number, distance: number): PointXY;
75
+ /**
76
+ * finds the location that is 'distance' along the path from 'location'.
77
+ * @internal
78
+ */
79
+ export declare function locationAlongCurveFrom(curve: Curve, location: number, distance: number): number;
80
+ /**
81
+ * Calculates the gradient at the point on the given curve at the given location
82
+ * @returns a decimal between 0 and 1 inclusive.
83
+ * @internal
84
+ */
85
+ export declare function gradientAtPoint(curve: Curve, location: number): number;
86
+ /**
87
+ * Returns the gradient of the curve at the point which is 'distance' from the given location.
88
+ * if this point is greater than location 1, the gradient at location 1 is returned.
89
+ * if this point is less than location 0, the gradient at location 0 is returned.
90
+ * @returns a decimal between 0 and 1 inclusive.
91
+ * @internal
92
+ */
93
+ export declare function gradientAtPointAlongPathFrom(curve: Curve, location: number, distance: number): number;
94
+ /**
95
+ * calculates a line that is 'length' pixels long, perpendicular to, and centered on, the path at 'distance' pixels from the given location.
96
+ * if distance is not supplied, the perpendicular for the given location is computed (ie. we set distance to zero).
97
+ * @internal
98
+ */
99
+ export declare function perpendicularToPathAt(curve: Curve, location: number, length: number, distance: number): LineXY;
100
+ /**
101
+ * Calculates all intersections of the given line with the given curve.
102
+ * @param x1
103
+ * @param y1
104
+ * @param x2
105
+ * @param y2
106
+ * @param curve
107
+ * @returns Array of intersecting points.
108
+ * @internal
109
+ */
110
+ export declare function bezierLineIntersection(x1: number, y1: number, x2: number, y2: number, curve: Curve): Array<PointXY>;
111
+ /**
112
+ * Calculates all intersections of the given box with the given curve.
113
+ * @param x X position of top left corner of box
114
+ * @param y Y position of top left corner of box
115
+ * @param w width of box
116
+ * @param h height of box
117
+ * @param curve
118
+ * @returns Array of intersecting points.
119
+ * @internal
120
+ */
121
+ export declare function boxIntersection(x: number, y: number, w: number, h: number, curve: Curve): Array<PointXY>;
122
+ /**
123
+ * Calculates all intersections of the given bounding box with the given curve.
124
+ * @param boundingBox Bounding box to test for intersections.
125
+ * @param curve
126
+ * @returns Array of intersecting points.
127
+ * @internal
128
+ */
129
+ export declare function boundingBoxIntersection(boundingBox: BoundingBox, curve: Curve): Array<PointXY>;
@@ -0,0 +1,6 @@
1
+ export * from "./abstract-bezier-connector";
2
+ export * from "./bezier";
3
+ export * from "./bezier-segment";
4
+ export * from "./bezier-connector";
5
+ export * from "./quadratic-bezier-connector";
6
+ export * from './operations';
@@ -0,0 +1,18 @@
1
+ import { BezierConnectorGeometry } from "./abstract-bezier-connector";
2
+ import { ConnectorComputeParams, PaintGeometry } from "../core/connector/abstract-connector";
3
+ import { Connection } from "../core/connector/connection-impl";
4
+ export declare function updateBezierConnector(connection: Connection<any>, paintInfo: PaintGeometry, p: ConnectorComputeParams, sourceMoved: boolean, targetMoved: boolean): BezierConnectorGeometry;
5
+ /**
6
+ * @internal
7
+ * @param connection
8
+ * @param paintInfo
9
+ * @param p
10
+ */
11
+ export declare function computeBezierConnector(connection: Connection<any>, paintInfo: PaintGeometry, p: ConnectorComputeParams): BezierConnectorGeometry;
12
+ /**
13
+ * @internal
14
+ * @param g
15
+ * @param dx
16
+ * @param dy
17
+ */
18
+ export declare function transformBezierGeometry(g: BezierConnectorGeometry, dx: number, dy: number): BezierConnectorGeometry;
@@ -0,0 +1,35 @@
1
+ import { BezierConnectorBase, AbstractBezierOptions } from "./abstract-bezier-connector";
2
+ import { Connection } from "../core/connector/connection-impl";
3
+ import { PointXY } from "../../core/util";
4
+ /**
5
+ * Options for a {@link QuadraticBezierConnector}
6
+ * @group Edges
7
+ * @category Connectors
8
+ */
9
+ export interface QuadraticBezierConnectorOptions extends AbstractBezierOptions {
10
+ /**
11
+ * A measure of how "curvy" the bezier is. In terms of maths what this translates to is how far from the midpoint of the curve the control points is positioned.
12
+ */
13
+ curviness?: number;
14
+ }
15
+ /**
16
+ * Defines the quadratic bezier connector type.
17
+ * @constant
18
+ * @group Edges
19
+ * @category Connectors
20
+ */
21
+ export declare const CONNECTOR_TYPE_QUADRATIC_BEZIER = "QuadraticBezier";
22
+ /**
23
+ * A connector that draws a Bezier curve with a single control point.
24
+ * @group Edges
25
+ * @category Connectors
26
+ */
27
+ export interface QuadraticBezierConnector extends BezierConnectorBase {
28
+ _controlPoint: PointXY;
29
+ }
30
+ /**
31
+ * @param connection
32
+ * @param params
33
+ * @internal
34
+ */
35
+ export declare function _createQuadraticBezierConnector(connection: Connection<any>, params: QuadraticBezierConnectorOptions): QuadraticBezierConnector;
@@ -0,0 +1,11 @@
1
+ import { IOrthogonalConnector, OrthogonalSegment } from "./definitions";
2
+ import { ConnectorComputeParams, PaintGeometry } from "../core/connector/abstract-connector";
3
+ import { StraightConnector } from "../connector-straight/straight-connector";
4
+ /**
5
+ * Default routine for computing an orthogonal path.
6
+ * @param oc
7
+ * @param paintInfo
8
+ * @param params
9
+ * @internal
10
+ */
11
+ export declare function $defaultOrthogonalPathCompute(oc: IOrthogonalConnector | StraightConnector, paintInfo: PaintGeometry, params: ConnectorComputeParams): Array<OrthogonalSegment>;
@@ -0,0 +1,120 @@
1
+ import { Connector, ConnectorOptions } from "../common";
2
+ import { OrthogonalAxis, Geometry } from "../../core";
3
+ import { StraightConnectorSegment } from "../connector-straight";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const ORIENTATION_PERPENDICULAR = "perpendicular";
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare const ORIENTATION_ORTHOGONAL = "orthogonal";
12
+ /**
13
+ * @internal
14
+ */
15
+ export declare const ORIENTATION_OPPOSITE = "opposite";
16
+ /**
17
+ * @internal
18
+ */
19
+ export type Direction = -1 | 1;
20
+ /**
21
+ * TODO just use one type in VJS. The `o` field may be null if the segment is not orthogonal.
22
+ * @internal
23
+ */
24
+ export interface OrthogonalSegment extends StraightConnectorSegment {
25
+ o: OrthogonalAxis;
26
+ }
27
+ /**
28
+ * @internal
29
+ */
30
+ export type SegmentContext = {
31
+ segment: OrthogonalSegment;
32
+ prev?: OrthogonalSegment;
33
+ next?: OrthogonalSegment;
34
+ index: number;
35
+ axis: OrthogonalAxis;
36
+ left?: [OrthogonalSegment, number];
37
+ right?: [OrthogonalSegment, number];
38
+ };
39
+ /**
40
+ * @internal
41
+ */
42
+ export type SegmentMoveResult = {
43
+ ctx: SegmentContext;
44
+ segments: Array<OrthogonalSegment>;
45
+ index: number;
46
+ };
47
+ /**
48
+ * Options for an orthogonal connector.
49
+ * @group Edges
50
+ * @category Connectors
51
+ */
52
+ export interface OrthogonalConnectorOptions extends ConnectorOptions {
53
+ /**
54
+ * The point to use as the halfway point between the source and target. Defaults to 0.5.
55
+ */
56
+ midpoint?: number;
57
+ /**
58
+ * Defaults to true, meaning always draw a stub of the desired length, even when the source and target elements are very close together.
59
+ */
60
+ alwaysRespectStubs?: boolean;
61
+ /**
62
+ * Optional curvature of the corners in the connector. Defaults to 0.
63
+ */
64
+ cornerRadius?: number;
65
+ /**
66
+ * For a loopback connection, the size of the loop.
67
+ */
68
+ loopbackRadius?: number;
69
+ /**
70
+ * If true, and a cornerRadius is set, the lines are drawn in such a way that they look slightly hand drawn.
71
+ */
72
+ slightlyWonky?: boolean;
73
+ }
74
+ /**
75
+ * The format used internally to store an orthogonal connector's geometry.
76
+ * @internal
77
+ */
78
+ export interface InternalOrthogonalConnectorGeometry extends Geometry {
79
+ segments: Array<OrthogonalSegment>;
80
+ quadrant?: number;
81
+ }
82
+ /**
83
+ * Defines the Orthogonal connector type.
84
+ * @group Edges
85
+ * @category Connectors
86
+ * @constant
87
+ */
88
+ export declare const CONNECTOR_TYPE_ORTHOGONAL = "Orthogonal";
89
+ /**
90
+ * A Straight connector with bezier smoothing.
91
+ * @group Edges
92
+ * @category Connectors
93
+ * @constant
94
+ */
95
+ export declare const CONNECTOR_TYPE_SMOOTH = "Smooth";
96
+ /**
97
+ * Constant identifying the default stub length to use for orthogonal stubs
98
+ * @group Edges
99
+ * @category Connectors
100
+ * @internal
101
+ */
102
+ export declare const DEFAULT_ORTHOGONAL_STUB = 30;
103
+ /**
104
+ * An Orthogonal connector.
105
+ * @internal
106
+ */
107
+ export interface IOrthogonalConnector extends Connector {
108
+ midpoint: number;
109
+ alwaysRespectStubs: boolean;
110
+ lastx: number;
111
+ lasty: number;
112
+ lastOrientation: number;
113
+ cornerRadius: number;
114
+ loopbackRadius: number;
115
+ isLoopbackCurrently: boolean;
116
+ geometry: InternalOrthogonalConnectorGeometry;
117
+ slightlyWonky: boolean;
118
+ $pathSegments: Array<OrthogonalSegment>;
119
+ vertexAvoidance: boolean;
120
+ }
@@ -0,0 +1,7 @@
1
+ export * from './definitions';
2
+ export * from './utils';
3
+ export * from './vertex-avoidance';
4
+ export * from './operations';
5
+ export * from './default-orthogonal-path-compute';
6
+ export * from "./modern-source-target-relocator";
7
+ export * from "./stub-calculators";
@@ -0,0 +1,37 @@
1
+ import { ConnectorComputeParams, PaintGeometry } from "../core/connector/abstract-connector";
2
+ import { IOrthogonalConnector, OrthogonalSegment } from "./definitions";
3
+ /**
4
+ * Rewrite orthogonal connectors
5
+ * @internal
6
+ * @param oc
7
+ * @param paintInfo
8
+ * @param params
9
+ */
10
+ export declare function $rewriteOrthogonalConnector(oc: IOrthogonalConnector, paintInfo: PaintGeometry, params: ConnectorComputeParams): void;
11
+ /**
12
+ * @internal
13
+ * @param oc
14
+ * @param segments
15
+ * @private
16
+ *
17
+ * Removes segments that are smaller than the connector's stub and which lie between two segments of the other orientation - basically the bottom edge of a U shape.
18
+ * this only applies for segments which are not attached to one of the stubs, and it's only U shape:
19
+ *
20
+ * |
21
+ * --------------------
22
+ * |
23
+ * ----------------
24
+ * |
25
+ *
26
+ * Here we'd rewrite to
27
+ *
28
+ * |
29
+ * ----
30
+ * |
31
+ * |
32
+ *
33
+ *
34
+ *
35
+ */
36
+ export declare function _removeShortSegments(oc: IOrthogonalConnector, segments: Array<OrthogonalSegment>): Array<OrthogonalSegment>;
37
+ export declare function stubRelocator(index: 0 | 1, oc: IOrthogonalConnector, paintInfo: PaintGeometry, params: ConnectorComputeParams): void;
@@ -0,0 +1,49 @@
1
+ import { ConnectorComputeParams, PaintGeometry } from "../core/connector/abstract-connector";
2
+ import { IOrthogonalConnector, OrthogonalSegment, SegmentMoveResult } from "./definitions";
3
+ import { PointXY, AnchorPlacement } from "../../core";
4
+ import { StraightConnector } from "../connector-straight/straight-connector";
5
+ import { Connection } from "../core";
6
+ /**
7
+ * Updates an orthogonal connector that has user path edits, if the source or target position for this connector has changed since
8
+ * it was last painted.
9
+ * @param sp
10
+ * @param tp
11
+ * @param oc
12
+ * @param paintInfo
13
+ * @param params
14
+ * @internal
15
+ */
16
+ export declare function updateEditedOrthogonalConnector(sp: AnchorPlacement, tp: AnchorPlacement, oc: IOrthogonalConnector, paintInfo: PaintGeometry, params: ConnectorComputeParams, sourceMoved: boolean, targetMoved: boolean): void;
17
+ /**
18
+ * @internal
19
+ * @param oc
20
+ * @param segment
21
+ * @param pos
22
+ * @param sourceInfo
23
+ * @param targetInfo
24
+ * @param doNotRunVertexAvoidance
25
+ * @private
26
+ */
27
+ export declare function _setOrthogonalSegmentPosition(conn: Connection<any>, oc: IOrthogonalConnector, segment: OrthogonalSegment, pos: PointXY, doNotRunVertexAvoidance?: boolean): SegmentMoveResult;
28
+ export declare function _trimOrthogonalSegments(segments: Array<OrthogonalSegment>): Array<OrthogonalSegment>;
29
+ /**
30
+ * @internal
31
+ * @param oc
32
+ * @private
33
+ */
34
+ export declare function _trimOrthogonalConnector(oc: IOrthogonalConnector): void;
35
+ /**
36
+ * @internal
37
+ * @private
38
+ * @param oc
39
+ * @param segments
40
+ * @param paintInfo
41
+ */
42
+ /**
43
+ * @internal
44
+ * @param oc
45
+ * @param idx
46
+ * @param orientation
47
+ * @private
48
+ */
49
+ export declare function _setOrthogonalAnchorOrientation(oc: IOrthogonalConnector | StraightConnector, idx: number, orientation: number[]): void;
@@ -0,0 +1,12 @@
1
+ import { X, Y, PointXY } from "../../core";
2
+ import { ConnectorComputeParams, PaintGeometry } from "../core";
3
+ type StubCalculator = (paintInfo: PaintGeometry, alwaysRespectStubs: boolean) => number[];
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const stubCalculators: Map<string, StubCalculator>;
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare const lineCalculators: Map<string, (p: PaintGeometry, params: ConnectorComputeParams, axis: typeof X | typeof Y, startStub: number, otherStartStub: number, endStub: number, otherEndStub: number, midx: number, midy: number, maxStub: number) => Array<PointXY>>;
12
+ export {};
@@ -0,0 +1,134 @@
1
+ import { Direction, OrthogonalSegment } from "./definitions";
2
+ import { ORTHOGONAL_AXIS_HORIZONTAL, ORTHOGONAL_AXIS_VERTICAL, OrthogonalAxis, AnchorPlacement } from "../../core";
3
+ import { PaintGeometry } from "../core/connector/abstract-connector";
4
+ /**
5
+ * Returns whether or not the given value lies between v1 and v2.
6
+ * @param value Value to compare
7
+ * @param v1 One bound of the range. This method orders the bounds as needed.
8
+ * @param v2 Other bound of the range. This method orders the bounds as needed.
9
+ * @param inclusive If true, value can also equal v1 or v2 (ie the range is inclusive)
10
+ * @internal
11
+ */
12
+ export declare function valueInRange(value: number, v1: number, v2: number, inclusive?: boolean): boolean;
13
+ /**
14
+ * from some given vertical segment, find the next horizontal segment, gathering any other vertical segments found along the way. Searches as far as the end stub.
15
+ * @param currentSegment
16
+ * @param currentSegmentIndex
17
+ * @param segments
18
+ * @internal
19
+ */
20
+ export declare function _findNextHorizontalSegment(currentSegment: OrthogonalSegment, currentSegmentIndex: number, segments: Array<OrthogonalSegment>): {
21
+ segment: OrthogonalSegment;
22
+ index: number;
23
+ others: Array<OrthogonalSegment>;
24
+ };
25
+ /**
26
+ * @internal
27
+ * @param currentSegment
28
+ * @param currentSegmentIndex
29
+ * @param segments
30
+ * @private
31
+ */
32
+ export declare function _findPreviousHorizontalSegment(currentSegment: OrthogonalSegment, currentSegmentIndex: number, segments: Array<OrthogonalSegment>): {
33
+ segment: OrthogonalSegment;
34
+ index: number;
35
+ others: Array<OrthogonalSegment>;
36
+ };
37
+ /**
38
+ * @internal
39
+ * from some given horizontal segment, find the next vertical segment, gathering any other horizontal segments found along the way. Searches as far as the end stub.
40
+ * @param currentSegment
41
+ * @param currentSegmentIndex
42
+ * @param segments
43
+ * @private
44
+ */
45
+ export declare function _findNextVerticalSegment(currentSegment: OrthogonalSegment, currentSegmentIndex: number, segments: Array<OrthogonalSegment>): {
46
+ segment: OrthogonalSegment;
47
+ index: number;
48
+ others: Array<OrthogonalSegment>;
49
+ };
50
+ /**
51
+ * @internal
52
+ * @param currentSegment
53
+ * @param currentSegmentIndex
54
+ * @param segments
55
+ * @private
56
+ */
57
+ export declare function _findPreviousVerticalSegment(currentSegment: OrthogonalSegment, currentSegmentIndex: number, segments: Array<OrthogonalSegment>): {
58
+ segment: OrthogonalSegment;
59
+ index: number;
60
+ others: Array<OrthogonalSegment>;
61
+ };
62
+ /**
63
+ * @internal
64
+ * @param currentIndex
65
+ * @param type
66
+ * @param segments
67
+ * @param increment
68
+ * @private
69
+ */
70
+ export declare function _findNextSegmentOfType(currentIndex: number, type: OrthogonalAxis, segments: Array<OrthogonalSegment>, increment: 1 | -1): {
71
+ segment: OrthogonalSegment;
72
+ index: number;
73
+ others: Array<OrthogonalSegment>;
74
+ };
75
+ /**
76
+ * Finds a segment with the given orientation in the given direction from some start point.
77
+ * If `segment` is provided we use its index as the start point. Otherwise we use either the
78
+ * 1st segment (the one after the start stub) or the second last segment (the one before the target
79
+ * stub), depending on the value of `dir`. The start and end stubs are excluded from the search.
80
+ * @internal
81
+ * @private
82
+ * @param segments
83
+ * @param dir
84
+ * @param axis
85
+ * @param segment
86
+ */
87
+ export declare function findSegment(segments: Array<OrthogonalSegment>, dir: Direction, axis: OrthogonalAxis, segment?: OrthogonalSegment): [OrthogonalSegment, number];
88
+ /**
89
+ * Looks for a segment of the given axis, in the given direction, that is immediately adjacent to the given `ref` segment. This
90
+ * method will return null even it finds a segment with the appropriate axis unless that segment
91
+ * is immediately adjacent.
92
+ * @param segments
93
+ * @param dir
94
+ * @param axis
95
+ * @param ref
96
+ * @internal
97
+ */
98
+ export declare function findAdjacentSegment(segments: Array<OrthogonalSegment>, dir: Direction, axis: OrthogonalAxis, ref: OrthogonalSegment): [OrthogonalSegment, number];
99
+ /**
100
+ * @internal
101
+ * @param segment
102
+ */
103
+ export declare function aSegmentDirections(segment: OrthogonalSegment): {
104
+ [ORTHOGONAL_AXIS_HORIZONTAL]: number;
105
+ [ORTHOGONAL_AXIS_VERTICAL]: number;
106
+ };
107
+ /**
108
+ * @internal
109
+ * @private
110
+ * @param segment
111
+ */
112
+ export declare function segmentDirections(segment: OrthogonalSegment): [number, number];
113
+ /**
114
+ * @internal
115
+ * @private
116
+ * @param p1
117
+ * @param p2
118
+ */
119
+ export declare function anchorPlacementEquals(p1: AnchorPlacement, p2: AnchorPlacement): boolean;
120
+ /**
121
+ * @internal
122
+ * @private
123
+ * @param connector
124
+ * @param x
125
+ * @param y
126
+ * @param paintInfo
127
+ * @param dx
128
+ * @param dy
129
+ */
130
+ export declare function addSegment(connector: {
131
+ lastx: number;
132
+ lasty: number;
133
+ orthogonalSegments: Array<OrthogonalSegment>;
134
+ }, x: number, y: number, paintInfo: PaintGeometry, dx: number, dy: number): void;
@@ -0,0 +1,29 @@
1
+ import { IOrthogonalConnector, OrthogonalSegment } from "./definitions";
2
+ import { ViewportElement } from "../core";
3
+ /**
4
+ * @internal
5
+ * @param segments
6
+ * @param sourceInfo
7
+ * @param vertexPadding
8
+ */
9
+ export declare function sourceVertexAvoidance(segments: Array<OrthogonalSegment>, sourceInfo: ViewportElement<any>, vertexPadding: number): boolean;
10
+ /**
11
+ * @internal
12
+ * @param segments
13
+ * @param targetInfo
14
+ * @param vertexPadding
15
+ */
16
+ export declare function targetVertexAvoidance(segments: Array<OrthogonalSegment>, targetInfo: ViewportElement<any>, vertexPadding: number): boolean;
17
+ /**
18
+ * @internal
19
+ * @param oc
20
+ * @param segments
21
+ * @param sourceInfo
22
+ * @param targetInfo
23
+ * @param targetFirst
24
+ */
25
+ export declare function vertexAvoidance(oc: IOrthogonalConnector, segments: Array<OrthogonalSegment>, sourceInfo: ViewportElement<any>, targetInfo: ViewportElement<any>, targetFirst: boolean): {
26
+ sourceAdjusted: boolean;
27
+ targetAdjusted: boolean;
28
+ segments: Array<OrthogonalSegment>;
29
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./straight-connector";
2
+ export * from "./operations";