@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,540 @@
1
+ import { Connection } from "./connector/connection-impl";
2
+ import { ViewportElement, ViewportGroupElement } from "./viewport";
3
+ import { Group, Node, Vertex } from "../../core/model/graph";
4
+ import { Extents, PointXY, Size } from "../../core/util";
5
+ import { ExportOptions, VisuallyJsModel } from "../../core/toolkit";
6
+ import { MagnetizeProfile } from "./magnetize-profile";
7
+ import { MagnetizeResult } from "../../core/magnetizer";
8
+ import { ConstrainFunction } from "../util/util";
9
+ import { BOTTOM, CENTER, LEFT, RIGHT, TOP } from "../../core";
10
+ import { UICore } from "./core";
11
+ export type ElementSelectionSpecifier<E> = E | Array<E> | '*';
12
+ export type SelectionList = '*' | Array<string>;
13
+ export interface AbstractSelectOptions<E> {
14
+ scope?: SelectionList;
15
+ source?: ElementSelectionSpecifier<E>;
16
+ target?: ElementSelectionSpecifier<E>;
17
+ }
18
+ export interface SelectOptions<E> extends AbstractSelectOptions<E> {
19
+ connections?: Array<Connection<E>>;
20
+ }
21
+ export interface SelectEndpointOptions<E> extends AbstractSelectOptions<E> {
22
+ element?: ElementSelectionSpecifier<E>;
23
+ }
24
+ /**
25
+ * Optional parameters to the `DeleteConnection` method.
26
+ * @internal
27
+ */
28
+ export type DeleteConnectionOptions = {
29
+ /**
30
+ * if true, force deletion even if the connection tries to cancel the deletion.
31
+ */
32
+ force?: boolean;
33
+ /**
34
+ * If false, an event won't be fired. Otherwise a `connection:detach` event will be fired.
35
+ */
36
+ fireEvent?: boolean;
37
+ /**
38
+ * Optional original event that resulted in the connection being deleted.
39
+ */
40
+ originalEvent?: Event;
41
+ };
42
+ export interface GroupResizeResult<E> {
43
+ element: ViewportGroupElement<E>;
44
+ newGroupSize: Size;
45
+ originalGroupSize: Size;
46
+ }
47
+ /**
48
+ * @internal
49
+ */
50
+ export type GroupContentAreaInfo<E> = {
51
+ pageOrigin: PointXY;
52
+ internalOffset: PointXY;
53
+ contentArea: E;
54
+ isGroupElement: boolean;
55
+ };
56
+ /**
57
+ * @internal
58
+ */
59
+ export interface GroupLayoutResult<E> {
60
+ positions: Record<string, PointXY>;
61
+ sizes: Record<string, Size>;
62
+ extents: Extents;
63
+ element: ViewportGroupElement<E>;
64
+ }
65
+ export interface DragHandler2StartParams<E> {
66
+ /**
67
+ * The mouse event that instigated the drag
68
+ */
69
+ e: MouseEvent;
70
+ /**
71
+ * The element being dragged.
72
+ */
73
+ el: E;
74
+ /**
75
+ * The page position of the initial event. This position is relative to the page origin, and does not take
76
+ * page scroll into account. It _cannot_ be safely compared to the return value of getBoundingClientRect, because
77
+ * getBoundingClientRect returns values relative to the viewport origin (ie. the visible part of the page).
78
+ */
79
+ pagePosition: PointXY;
80
+ /**
81
+ * The page position of the given element translated to the canvas. This value has
82
+ * taken into account page scroll.
83
+ */
84
+ translatedPosition: PointXY;
85
+ size: Size;
86
+ }
87
+ export interface DragHandler2DragParams<E> extends DragHandler2StartParams<E> {
88
+ originalPagePosition: PointXY;
89
+ originalTranslatedPosition: PointXY;
90
+ }
91
+ export interface DragHandler2StopParams<E> extends DragHandler2DragParams<E> {
92
+ }
93
+ export interface DragHandler2<E> {
94
+ selector: string;
95
+ target?: string;
96
+ start: (params: DragHandler2StartParams<E>) => any;
97
+ drag: (params: DragHandler2DragParams<E>) => any;
98
+ stop: (params: DragHandler2StopParams<E>) => any;
99
+ priority?: number;
100
+ constrainFunction: ConstrainFunction<E, any>;
101
+ usesPageCoordinates?: boolean;
102
+ }
103
+ /**
104
+ * Defines a function that will be invoked prior to a vertex being dragged. Returning false from this function will abort the vertex drag.
105
+ */
106
+ export type VertexDragFilter<E> = (p: {
107
+ el: E;
108
+ vertex: Node | Group;
109
+ e: MouseEvent;
110
+ }) => boolean;
111
+ /**
112
+ * Defines a function that can constrain drag.
113
+ */
114
+ export type DragConstrainFunction<E> = (desiredLoc: PointXY, dragEl: E, modelObject: Node | Group, size: Size, currentLoc: PointXY, e: MouseEvent) => PointXY;
115
+ /**
116
+ * Options for element drag
117
+ * @group Components
118
+ * @category Element dragging
119
+ */
120
+ export interface DragOptions<E> {
121
+ /**
122
+ * Optional function to invoke prior to a drag starting.
123
+ */
124
+ filter?: VertexDragFilter<E>;
125
+ /**
126
+ * Optional CSS3 selector identifying parts of nodes/groups that should not cause a drag to start.
127
+ */
128
+ cssFilter?: string;
129
+ /**
130
+ * Optional function to use to constrain element dragging.
131
+ * @param desiredLoc
132
+ * @param dragEl
133
+ * @param size
134
+ * @param currentLoc
135
+ */
136
+ constrainFunction?: DragConstrainFunction<E>;
137
+ /**
138
+ * Defaults to true, meaning the canvas will pan automatically to track elements that have been dragged out of the visible area.
139
+ */
140
+ autoPan?: boolean;
141
+ /**
142
+ * When auto-panning, this is the speed (in milliseconds) at which the canvas repositions itself. Defaults to 15ms.
143
+ */
144
+ autoPanRepeat?: number;
145
+ /**
146
+ * When auto-panning, this is the number of pixels that the canvas repositions itself on each tick. Defaults to 5.
147
+ */
148
+ autoPanDelta?: number;
149
+ /**
150
+ * Optional function that is invoked at the start of a drag, and which identifies allowed drop targets. Each target - the canvas, nodes and groups - is passed in turn to this method; returning false indicates that the given target is not valid for that drag.
151
+ * @param candidate
152
+ * @param target
153
+ * @param onCanvas
154
+ */
155
+ canDrop?: (candidate: Node | Group, target?: Node | Group, onCanvas?: boolean) => boolean;
156
+ }
157
+ /**
158
+ * @internal
159
+ */
160
+ export interface SupportsElementDragging<E> {
161
+ dragOptions: DragOptions<E>;
162
+ addDragHandler(handler: DragHandler2<E>): void;
163
+ $canStartElementDrag(): boolean;
164
+ isDraggable: (e: E) => boolean;
165
+ getZoom: () => number;
166
+ getEffectiveVisibleZoom: () => number;
167
+ magnetizerProfile: MagnetizeProfile;
168
+ $getDragViewportContainer: () => E;
169
+ getContainer: () => E;
170
+ model: VisuallyJsModel;
171
+ autoSizeGroup(group: Group, force: boolean): void;
172
+ $modelLeftAttribute: string;
173
+ $modelTopAttribute: string;
174
+ $startPanRepeat: (dirX: 1 | 0 | -1, dirY: 1 | 0 | -1, dx: number, dy: number, interval: number, cb?: (total: PointXY) => any) => void;
175
+ $stopPanRepeat: () => void;
176
+ $provisionallyMagnetize(focus: Vertex, repositionFocus: boolean, knownLocations: Record<string, PointXY>, knownSizes: Record<string, Size>, magnetizerIsAlreadyPrimed: boolean, invertTrackbackPreference: boolean): MagnetizeResult;
177
+ }
178
+ /**
179
+ * Payload for the node:move:start event that is fired when a node/group has just begun to be moved.
180
+ * @group Events
181
+ * @category Element dragging
182
+ * @eventPayload
183
+ * @context element-dragging
184
+ */
185
+ export interface VertexMoveStartParams<E> {
186
+ dragGroup: Array<{
187
+ el: E;
188
+ pos: PointXY;
189
+ vertex: Node | Group;
190
+ element: ViewportElement<E>;
191
+ }>;
192
+ ui: UICore<E, any>;
193
+ }
194
+ /**
195
+ * Payload for the node:move event that is fired when a node/group has just begun to be moved.
196
+ * @group Events
197
+ * @category Element dragging
198
+ * @eventPayload
199
+ * @context element-dragging
200
+ */
201
+ export interface VertexMoveParams<E> {
202
+ /**
203
+ * The list of vertices that were dragged. This array will always contain at the very least information about a vertex that was dragged. If the vertex was in a drag group then all of the members of that drag group will be in this array too.
204
+ */
205
+ dragGroup: Array<{
206
+ pos: PointXY;
207
+ vertex: Node | Group;
208
+ originalPos: PointXY;
209
+ element: ViewportElement<E>;
210
+ }>;
211
+ /**
212
+ * This object contains a record of the final position of every vertex that was moved as a result of this vertex drag - the vertex itself, any members of a drag group for which the vertex was an active member, plus any elements that may have been moved via the magnetizer during or after the drag.
213
+ */
214
+ positions: Record<string, PointXY>;
215
+ ui: UICore<E, any>;
216
+ }
217
+ /**
218
+ * Payload for the node:move:end event that is fired when a node/group has just been moved.
219
+ * @group Events
220
+ * @category Element dragging
221
+ * @eventPayload
222
+ * @context element-dragging
223
+ */
224
+ export interface VertexMoveEndParams<E> {
225
+ /**
226
+ * The list of vertices that were dragged. This array will always contain at the very least information about a vertex that was dragged. If the vertex was in a drag group then all of the members of that drag group will be in this array too.
227
+ */
228
+ dragGroup: Array<{
229
+ el: E;
230
+ pos: PointXY;
231
+ vertex: Node | Group;
232
+ originalPos: PointXY;
233
+ element: ViewportElement<E>;
234
+ }>;
235
+ ui: UICore<E, any>;
236
+ }
237
+ /**
238
+ * Options for the save method.
239
+ * @group Components
240
+ * @category Input and Output
241
+ */
242
+ export interface UIExportOptions extends ExportOptions {
243
+ }
244
+ /**
245
+ * Return value from UI save; argument to ui load.
246
+ * @group Components
247
+ * @category Input and Output
248
+ */
249
+ export interface UISaveData {
250
+ zoom: number;
251
+ data: any;
252
+ }
253
+ /**
254
+ * Models the current bounds of a viewport, containing its x/y location,
255
+ * width/height and current zoom.
256
+ * @group Components
257
+ */
258
+ export interface ViewportBounds {
259
+ /**
260
+ * Width of the content displayed in the viewport
261
+ */
262
+ width: number;
263
+ /**
264
+ * Height of the content displayed in the viewport
265
+ */
266
+ height: number;
267
+ /**
268
+ * Minimum value in X of the content displayed in the viewport
269
+ */
270
+ x: number;
271
+ /**
272
+ * Minimum value in Y of the content displayed in the viewport
273
+ */
274
+ y: number;
275
+ /**
276
+ * The width of the viewport element.
277
+ */
278
+ vw: number;
279
+ /**
280
+ * The height of the viewport element.
281
+ */
282
+ vh: number;
283
+ /**
284
+ * The content in each axis fills the viewport at some ratio to the viewport size in that axis. This field provides the smaller of those two ratios. The axis it pertains to is not specified. The inverse of this value gives you the zoom level that would allow all the content to fit in the viewport.
285
+ */
286
+ minimumFill: number;
287
+ /**
288
+ * The current zoom level applied in the viewport.
289
+ */
290
+ zoom: number;
291
+ }
292
+ /**
293
+ * A DataHook is a pair of functions that are invoked during a `load` and a `save`. This mechanism is a means you can use for storing/retrieving custom data from the payload the UI exports.
294
+ */
295
+ export interface DataHook {
296
+ load: (d: UISaveData) => any;
297
+ save: (d: UISaveData) => any;
298
+ }
299
+ /**
300
+ * Base options for a find enclosed/intersecting vertices call.
301
+ */
302
+ interface EnclosedOrIntersectingVerticesOptions {
303
+ /**
304
+ * Origin of the search rectangle, in canvas coordinates
305
+ */
306
+ origin: PointXY;
307
+ /**
308
+ * Size of the search rectangle, in canvas coordinates
309
+ */
310
+ dimensions: Size;
311
+ /**
312
+ * If true, ignore groups in the canvas root
313
+ */
314
+ dontIncludeGroups?: boolean;
315
+ /**
316
+ * If true, ignore nodes in the canvas root
317
+ */
318
+ dontIncludeNodes?: boolean;
319
+ /**
320
+ * If true, ignore nodes that are children of groups
321
+ */
322
+ dontIncludeNodesInsideGroups?: boolean;
323
+ /**
324
+ * If true, ignore groups that are children of groups
325
+ */
326
+ dontIncludeNestedGroups?: boolean;
327
+ }
328
+ /**
329
+ * Options for a find intersecting vertices call
330
+ */
331
+ export interface IntersectingVerticesOptions extends EnclosedOrIntersectingVerticesOptions {
332
+ /**
333
+ * If true, only vertices fully enclosed by the search rectangle will be returned
334
+ */
335
+ enclosed?: boolean;
336
+ }
337
+ /**
338
+ * Options for a find enclosed vertices call
339
+ */
340
+ export interface EnclosedVerticesOptions extends EnclosedOrIntersectingVerticesOptions {
341
+ }
342
+ /**
343
+ * Possible alignments for the `alignX` argument to `alignContent`
344
+ */
345
+ export type CanvasAlignmentX = typeof LEFT | typeof CENTER | typeof RIGHT;
346
+ /**
347
+ * Possible alignments for the `alignY` argument to `alignContent`
348
+ */
349
+ export type CanvasAlignmentY = typeof TOP | typeof CENTER | typeof BOTTOM;
350
+ /**
351
+ * Options for a content centering operation.
352
+ */
353
+ export type CenterContentOptions = {
354
+ /**
355
+ * @internal
356
+ */
357
+ bounds?: ViewportBounds;
358
+ /**
359
+ * True by default. Indicates the content should be centered in the X axis.
360
+ */
361
+ horizontal?: boolean;
362
+ /**
363
+ * True by default. Indicates the content should be centered in the Y axis.
364
+ */
365
+ vertical?: boolean;
366
+ /**
367
+ * @internal
368
+ */
369
+ doNotFirePanEvent?: boolean;
370
+ /**
371
+ * Optional function to call on operation complete.
372
+ */
373
+ onComplete?: (p: PointXY) => any;
374
+ /**
375
+ * If true, don't animate while centering. Defaults to false, ie. the operation will be animated.
376
+ */
377
+ doNotAnimate?: boolean;
378
+ /**
379
+ * Zoom level to set, optional
380
+ */
381
+ zoom?: number;
382
+ /**
383
+ * How long, in milliseconds, the animation should take to run.
384
+ */
385
+ animationDuration?: number;
386
+ };
387
+ /**
388
+ * Options for aligning content in the UI.
389
+ */
390
+ export interface AlignContentOptions {
391
+ /**
392
+ * How to align the content in the Y axis - top, bottom or center
393
+ */
394
+ alignY?: CanvasAlignmentY;
395
+ /**
396
+ * How to align the content in the X axis - left, right or center
397
+ */
398
+ alignX?: CanvasAlignmentX;
399
+ /**
400
+ * @internal
401
+ */
402
+ bounds?: ViewportBounds;
403
+ /**
404
+ * How much padding to leave around the content.
405
+ */
406
+ padding?: number;
407
+ /**
408
+ * @internal
409
+ */
410
+ doNotFirePanEvent?: boolean;
411
+ /**
412
+ * Optional function to call on operation complete.
413
+ */
414
+ onComplete?: (p: PointXY) => any;
415
+ /**
416
+ * If true, don't animate while centering. Defaults to false, ie. the operation will be animated.
417
+ */
418
+ doNotAnimate?: boolean;
419
+ /**
420
+ * How long, in milliseconds, the animation should take to run.
421
+ */
422
+ animationDuration?: number;
423
+ /**
424
+ * Zoom to set prior to alignment
425
+ */
426
+ zoom?: number;
427
+ }
428
+ /**
429
+ * Options for aligning content to a specific position in the UI.
430
+ */
431
+ export interface AlignContentToFaceOptions {
432
+ /**
433
+ * Zoom level to set during the alignment
434
+ */
435
+ zoom?: number;
436
+ /**
437
+ * @internal
438
+ */
439
+ doNotFirePanEvent?: boolean;
440
+ /**
441
+ * Optional function to call on operation complete.
442
+ */
443
+ onComplete?: (p: PointXY) => any;
444
+ /**
445
+ * If true, don't animate while centering. Defaults to false, ie. the operation will be animated.
446
+ */
447
+ doNotAnimate?: boolean;
448
+ /**
449
+ * How long, in milliseconds, the animation should take to run.
450
+ */
451
+ animationDuration?: number;
452
+ }
453
+ /**
454
+ * Options for the zoomToElements method.
455
+ */
456
+ export interface ZoomToElementsOptions<EL> {
457
+ /**
458
+ * Array of elements to zoom to
459
+ */
460
+ elements: Array<EL>;
461
+ /**
462
+ * If true, don't animate while zooming. Defaults to false, ie. the operation will be animated.
463
+ */
464
+ doNotAnimate?: boolean;
465
+ /**
466
+ * Optional function to call on operation complete.
467
+ */
468
+ onComplete?: (p: PointXY) => any;
469
+ /**
470
+ * A decimal between 0 and 1, which indicates how much of the viewport size the content will take up. This value is applied as a ratio of the width or height of the viewport - whichever is smaller. The default is 0.9.
471
+ */
472
+ fill?: number;
473
+ /**
474
+ * If the content is all already visible, do not make any changes to zoom.
475
+ */
476
+ doNotZoomIfVisible?: boolean;
477
+ /**
478
+ * @internal
479
+ */
480
+ doNotFirePanEvent?: boolean;
481
+ }
482
+ /**
483
+ * Base Options for the zoomToFit methods.
484
+ */
485
+ export interface BaseZoomToFitOptions {
486
+ /**
487
+ * If true, don't animate while centering. Defaults to false, ie. the operation will be animated.
488
+ */
489
+ doNotAnimate?: boolean;
490
+ /**
491
+ * Optional function to call on operation complete.
492
+ */
493
+ onComplete?: (p: PointXY) => any;
494
+ /**
495
+ * Blank space to leave around the content
496
+ */
497
+ padding?: number;
498
+ /**
499
+ * A decimal between 0 and 1, which indicates how much of the viewport size the content will take up. This value is applied as a ratio of the width or height of the viewport - whichever is smaller. The default is 0.9.
500
+ */
501
+ fill?: number;
502
+ /**
503
+ * How to align the content in the Y axis - top, bottom or center
504
+ */
505
+ alignY?: CanvasAlignmentY;
506
+ /**
507
+ * How to align the content in the X axis - left, right or center
508
+ */
509
+ alignX?: CanvasAlignmentX;
510
+ /**
511
+ * @internal
512
+ */
513
+ doNotFirePanEvent?: boolean;
514
+ }
515
+ /**
516
+ * Options for the zoomToFit method.
517
+ */
518
+ export interface ZoomToFitOptions extends BaseZoomToFitOptions {
519
+ /**
520
+ * If the content is all already visible, do not make any changes to zoom.
521
+ */
522
+ doNotZoomIfVisible?: boolean;
523
+ }
524
+ /**
525
+ * Options for the zoomToFitIfNecessary method.
526
+ */
527
+ export interface ZoomToFitIfNecessaryOptions extends BaseZoomToFitOptions {
528
+ }
529
+ /**
530
+ * @internal
531
+ */
532
+ export declare enum ElementTypes {
533
+ SVG = "SVG",
534
+ HTML = "HTML"
535
+ }
536
+ /**
537
+ * @internal
538
+ */
539
+ export type ElementType = keyof typeof ElementTypes;
540
+ export {};