@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,674 @@
1
+ import { PanAxis, PanZoomOptions } from './pan-zoom-options';
2
+ import { PinchListener } from "./pinch-listener";
3
+ import { FixedElement, FixedElementConstraints, FixedLayer } from "./fixed-layer";
4
+ import { VisuallyJSDOMElement } from "./element-facade";
5
+ import { EventManager } from "./event-manager";
6
+ import { Viewport, ViewportBounds, ZoomToFitIfNecessaryOptions, ZoomToFitOptions, ViewportElement, AlignContentOptions, AlignContentToFaceOptions, CenterContentOptions } from "../ui";
7
+ import { BoundingBox, Extents, PointXY, Size, ZoomRange, Edge, Group, Node, RectangleXY } from "../core";
8
+ import { BrowserElement } from "./util";
9
+ import { Background, ZoomToExtentsOptions } from './definitions';
10
+ /**
11
+ * Added to the viewport element for a pannable and zoomable canvas.
12
+ * @internal
13
+ */
14
+ export declare const CLASS_PAN_ZOOM_VIEWPORT = "vjs-pan-zoom";
15
+ /**
16
+ * Added to the canvas element for a pannable and zoomable canvas.
17
+ * @internal
18
+ */
19
+ export declare const CLASS_PAN_ZOOM_CANVAS = "vjs-pan-zoom-canvas";
20
+ /**
21
+ * @internal
22
+ */
23
+ export interface IntersectingObjectData {
24
+ r: BoundingBox;
25
+ id: string;
26
+ modelObject: Node | Group | Edge;
27
+ objectType: typeof Node.objectType | typeof Group.objectType | typeof Edge.objectType;
28
+ }
29
+ /**
30
+ * Provides Pan/Zoom functionality. This component is not something with which users of the Toolkit are expected to
31
+ * work directly (although in fact it is sufficiently decoupled from the Surface that it could serve as a stand-alone
32
+ * widget for other use cases, which is something we've slated for future investigation). Each Surface widget is
33
+ * backed by a ZoomWidget.
34
+ * @internal
35
+ */
36
+ export declare class PanZoom {
37
+ canvasElement: VisuallyJSDOMElement;
38
+ viewportElement: VisuallyJSDOMElement;
39
+ _panRepeatTimer: number;
40
+ private readonly _doWheelZoom;
41
+ eventManager: EventManager;
42
+ pinchListener: PinchListener;
43
+ position: PointXY;
44
+ zoom: number;
45
+ transformOrigin: PointXY;
46
+ _zoomStep: number;
47
+ panning: boolean;
48
+ aboutToPan: boolean;
49
+ _panFilterFunction: (el: Element) => boolean;
50
+ pinchZooming: boolean;
51
+ zooming: boolean;
52
+ zoomingWithWheel: boolean;
53
+ downAt: PointXY;
54
+ _viewportElementSize: Size;
55
+ _canvasElementSize: Size;
56
+ zoomRange: ZoomRange;
57
+ zoomAtZoomStart: number;
58
+ maximumZoomTravel: number;
59
+ distanceAtZoomStart: number;
60
+ lastDistance: number;
61
+ canvasAtPanStart: PointXY;
62
+ lastMouseX: number;
63
+ lastMouseY: number;
64
+ fixedTransformOrigin: PointXY;
65
+ lastMovedAt: string;
66
+ lastVelocity: number;
67
+ lastAcceleration: number;
68
+ onZoom: Function;
69
+ onMaybeZoom: Function;
70
+ onPan: Function;
71
+ onPanStart: Function;
72
+ onMouseDown: Function;
73
+ onMouseUp: Function;
74
+ onMouseMove: Function;
75
+ onSetTransformOrigin: Function;
76
+ clamp: boolean;
77
+ clampZoom: boolean;
78
+ enablePan: boolean;
79
+ panWithMetaKey: boolean;
80
+ enableWheelZoom: boolean;
81
+ enableAnimation: boolean;
82
+ wheelFilter: (e: MouseEvent) => boolean;
83
+ wheelZoomRequiresMetaKey: boolean;
84
+ wheelDirection: number;
85
+ wheelSensitivity: number;
86
+ wheelPan: boolean;
87
+ wheelPanAxis: PanAxis;
88
+ background: PanZoomBackground;
89
+ fixedLayer: FixedLayer;
90
+ _mouseMove: Function;
91
+ _mouseMoveEnd: Function;
92
+ _mouseMoveReset: Function;
93
+ _mouseDown: Function;
94
+ _contextMenu: Function;
95
+ viewport: Viewport<BrowserElement>;
96
+ private _compoundZoom;
97
+ private _resizeObserver;
98
+ private consumeRightClick;
99
+ private smartMinimumZoom;
100
+ idFunction: (e: Element) => string;
101
+ getOffset: (el: Element) => PointXY;
102
+ getOffsetRelativeToRoot: (el: Element) => PointXY;
103
+ getSize: (el: Element) => Size;
104
+ enabled: boolean;
105
+ clampToBackground: boolean;
106
+ clampToBackgroundExtents: boolean;
107
+ filter: Function;
108
+ private _suspendMap;
109
+ _destroyed: boolean;
110
+ constructor(params: PanZoomOptions);
111
+ /**
112
+ *
113
+ * @internal
114
+ */
115
+ getCompoundZoom(): number;
116
+ /**
117
+ * Calculates the "compound zoom" ie. what the visual zoom is for users. If this component is nested inside one or more
118
+ * elements that have scale applied, adjust for that scale. This is agnostic of whether those parents are other pan/zoom
119
+ * components - they could be any div that has a scale. This method simply gets the offset size of the viewport and
120
+ * compares it with the bounding client rect size to find
121
+ * the visible ratio. This method is called when the pan/zoom is created. It can be called from elsewhere in the codebase - one
122
+ * example at the time of writing is the surface widget calls this method at the start of an element drag
123
+ * @param knownViewportSize
124
+ * @internal
125
+ */
126
+ _computeCompoundZoom(knownViewportSize?: Size): void;
127
+ /**
128
+ * @internal
129
+ */
130
+ $_getViewportSize(): Size;
131
+ private _$_getCanvasSize;
132
+ private _animateToCanvasPosition;
133
+ private _setCanvasPosition;
134
+ private _moveCanvas;
135
+ private _wheelPan;
136
+ private _wheelZoom;
137
+ private wheelPanOrZoom;
138
+ /**
139
+ * Sets whether or not rendering is suspended, which for the moment means that when updateBounds is
140
+ * called, the widget doesn't sort the bounds, since we know there will be more changes to the
141
+ * positions and/or sizes of elements.
142
+ * @param val True to suspend rendering, false to re-enable rendering. If an update was called during the
143
+ * time that rendering was suspended, the positions are sorted once rendering is re-enabled.
144
+ */
145
+ private _cssAnimation;
146
+ private _constructTransformProperty;
147
+ private _writeTransform;
148
+ /**
149
+ * For browsers that support it, use an element animate to set the transform. For browsers that don't support it, just set the transform.
150
+ * @param duration
151
+ * @param onComplete
152
+ * @internal
153
+ */
154
+ private _animateTransform;
155
+ private _constructTransformOriginProperty;
156
+ private _writeTransformOrigin;
157
+ private _originHelper;
158
+ private _setTransformHelper;
159
+ /**
160
+ * sets the canvas's transform-origin to the given x,y, which is a page location.
161
+ * @param x X location in page.
162
+ * @param y Y location in page.
163
+ * @private
164
+ * @internal
165
+ */
166
+ _setTransformOriginToPageLocation(x: number, y: number): void;
167
+ /**
168
+ * changes the transformOrigin of the canvas to be the point on the canvas at which the given event occurred, then shifts the canvas to account for this change (the user sees no shift)
169
+ * @param e Event to use as the new transform origin.
170
+ * @private
171
+ * @internal
172
+ */
173
+ _setTransformOriginToEvent(e: any): void;
174
+ /**
175
+ * Changes the transformOrigin of the canvas to be the given x,y, which is a point on the canvas.
176
+ * @param x X location on the canvas.
177
+ * @param y Y location on the canvas
178
+ * @private
179
+ * @internal
180
+ */
181
+ _setTransformOriginToCanvasPoint(x: number, y: number): void;
182
+ /**
183
+ * Calculate an allowable value for zoom from the desired value.
184
+ * @param desiredZoom
185
+ * @private
186
+ */
187
+ private _constrainZoom;
188
+ private _zoom;
189
+ private _zoomBy;
190
+ private _zoomWithMappedRange;
191
+ private _clamp;
192
+ private _apparentOffset;
193
+ private _canStartPanning;
194
+ private handlers;
195
+ private _call;
196
+ /**
197
+ * Programmatically report a down event in order to kick the widget into action.
198
+ * @param e Mouse event to use to kick things off.
199
+ */
200
+ private start;
201
+ /**
202
+ * Gets the current bounds for the pan zoom.
203
+ * @param padding
204
+ * @param paddingRatio
205
+ */
206
+ getBoundsInfo(padding?: number, paddingRatio?: number): ViewportBounds;
207
+ isPinchZooming(): boolean;
208
+ /**
209
+ * Adds the given element to those that this widget is tracking.
210
+ * @param el - Element to begin tracking.
211
+ */
212
+ add(el: BrowserElement, isDecoration?: boolean): void;
213
+ suspend(el: string | BrowserElement): void;
214
+ isSuspended(el: string | ViewportElement<BrowserElement>): boolean;
215
+ restore(el: string | ViewportElement<BrowserElement>): void;
216
+ /**
217
+ * Removes the given element from the list this widget is tracking. Note that this widget does
218
+ * not remove the element from the DOM.
219
+ * @param Element el Element to stop tracking.
220
+ */
221
+ remove(el: BrowserElement): void;
222
+ /**
223
+ * Removes all tracked elements and resets the widget.
224
+ */
225
+ reset(): void;
226
+ /**
227
+ * Zooms the display so that all the tracked elements fit inside the viewport. This method will also, by default, increase the zoom if necessary - meaning the default behaviour is to adjust the zoom so that the content fills the viewport. You can suppress zoom increase by setting `doNotZoomIfVisible:true` on the parameters to this method.
228
+ */
229
+ zoomToFit(params?: ZoomToFitOptions): void;
230
+ /**
231
+ * Zooms the display so that all the tracked elements fit inside the viewport, but does not make any adjustments to zoom if all the elements are currently visible (it still does center the content though).
232
+ * @param params.padding Optional padding to leave around all elements.
233
+ * @param params.fill Amount of the viewport to fill. By default, this method will zoom so that the content is 0.9 times the size of the viewport.
234
+ * Aesthetically this makes for a more pleasing result than filling the viewport entirely.
235
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
236
+ * @param params.doNotAnimate By default, the centering content step does not use animation. This is due to this method being used most often to initially setup a UI.
237
+ */
238
+ zoomToFitIfNecessary(params?: ZoomToFitIfNecessaryOptions): void;
239
+ /**
240
+ * Zooms the display so that all the given elements fit inside the viewport.
241
+ * @param zParams.elements List of DOM elements to zoom to.
242
+ * @param zParams.fill A decimal indicating how much of the viewport to fill with the zoomed content. Defaults to 0.90.
243
+ * @param zParams.doNotZoomIfVisible If true and the widget determines the entire selection is already
244
+ * visible, the zoom will not be adjusted.
245
+ * @param zParams.doNotAnimate=true By default the widget does not animate this operation. You can override that behaviour by setting doNotAnimate:false.
246
+ */
247
+ zoomToElements(zParams: {
248
+ elements: Array<Element>;
249
+ fill?: number;
250
+ doNotZoomIfVisible?: boolean;
251
+ doNotAnimate?: boolean;
252
+ onComplete?: (p: PointXY) => any;
253
+ doNotFirePanEvent?: boolean;
254
+ }): void;
255
+ /**
256
+ * Zooms the display so that the background fits inside the viewport.
257
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
258
+ * @param params.doNotAnimate If true, centering content will not use animation.
259
+ */
260
+ zoomToBackground(params: {
261
+ doNotAnimate?: boolean;
262
+ onComplete?: (p: PointXY) => any;
263
+ }): void;
264
+ zoomToExtents(zParams: ZoomToExtentsOptions): void;
265
+ /**
266
+ * Sets (or clears) the filter that will be called if the widget needs to know whether to respond to an event that would
267
+ * start a pan. By default, the widget responds to down events on the viewport or the canvas, but not on child nodes. You
268
+ * can supply a function that the widget will call in the event that the down event did not occur on the viewport or the canvas
269
+ * returning true from this function will cause the pan to begin.
270
+ * @param filterFn Function to set as the filter; may be null if you wish to clear it. The function should return true if it wants to honour the down event on the given element.
271
+ */
272
+ setFilter(filterFn: Function): void;
273
+ /**
274
+ * Position the widget so the background is centered in the viewport, without changing the current zoom.
275
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
276
+ * @param params.doNotAnimate If true, centering content will not use animation.
277
+ */
278
+ centerBackground(params: {
279
+ doNotAnimate?: boolean;
280
+ onComplete?: (p: PointXY) => any;
281
+ }): void;
282
+ /**
283
+ * Positions the widget so that the edges of the background align with the viewport. This method is useful for
284
+ * snapping to a corner of the background.
285
+ * @param axes Spec for the axes to align to. This should be a space-separated string containing a value
286
+ * for the x (allowed values `left` and `right`) and, optionally, y (allowed values `top` and `bottom`) axes. The
287
+ * default value is `"left top"`.
288
+ */
289
+ alignBackground(axes: string, animationDuration?: number): void;
290
+ /**
291
+ * Places (using `style.left` and `style.top`) the given element at the given x,y, which is taken to
292
+ * mean an x,y value on the canvas. At zoom 1, with no panning, this will be the same as the given x,y value
293
+ * relative to the viewport origin. But once the canvas has been zoomed and panned we have to map
294
+ * to the altered coordinates. This function also takes into account the difference between the offset of the
295
+ * viewport in the page and the offset of the given element. It is assumed, just because of what this method
296
+ * does, that the given element will be positioned `absolute`, but this method does nothing to ensure that.
297
+ * @param el Element to position.
298
+ * @param x X location on canvas to move element's left edge to.
299
+ * @param y Y location on canvas to move element's top edge to.
300
+ * @param xShift Optional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
301
+ * @param yShift Optional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
302
+ * @param ensureOnScreen If true, will ensure that x and y positions are never negative.
303
+ * @internal
304
+ */
305
+ positionElementAt(el: Element, x: number, y: number, xShift?: number, yShift?: number, ensureOnScreen?: boolean): void;
306
+ /**
307
+ * Places (using `style.left` and `style.top`) the given element at the given page x,y. It is assumed, just because of what this method
308
+ * does, that the given element will be positioned `absolute`, but this method does nothing to ensure that.
309
+ * @param el - Element to position.
310
+ * @param x - X location on canvas to move element's left edge to.
311
+ * @param y - Y location on canvas to move element's top edge to.
312
+ * @param xShift - Optional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
313
+ * @param yShift - Optional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
314
+ */
315
+ positionElementAtPageLocation(el: Element, x: number, y: number, xShift?: number, yShift?: number): void;
316
+ /**
317
+ * Places (using `style.left` and `style.top`) the given element at the page x,y corresponding to the given event. It is assumed, just because of what this method does, that the given element will be positioned `absolute`, but this method does nothing to ensure that.
318
+ * @param el - Element to position.
319
+ * @param evt - Event to position element at.
320
+ * @param xShift - Optional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
321
+ * @param yShift - Optional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
322
+ * @internal
323
+ */
324
+ positionElementAtEventLocation(el: Element, evt?: MouseEvent, xShift?: number, yShift?: number): void;
325
+ /**
326
+ * Zooms the component by the given increment, centered on the location at which the given event occurred.
327
+ * @param e - Browser event
328
+ * @param increment Amount to zoom by (a positive or negative number). If this takes the component out of the current zoom range, it will be clamped.
329
+ * @internal
330
+ */
331
+ zoomToEvent(e: Event, increment: number): void;
332
+ /**
333
+ * Tells the widget that a relayout has occurred. If panning is
334
+ * disabled, the widget will move the canvas element so that all
335
+ * content is visible, and adjust the transform origin so that the ui
336
+ * zooms from the apparent top left corner. Nothing happens as a result of
337
+ * this method if panning is enabled.
338
+ * @param extents Bounds information
339
+ * @internal
340
+ */
341
+ $relayout(extents: Extents): void;
342
+ /**
343
+ * Nudges the zoom by the given amount. Zoom will be clamped to the current zoom range in effect and the
344
+ * value that was ultimately set is returned from this function.
345
+ * @param delta Amount to change zoom by. The value you pass in here is multiplied by
346
+ * 100 to give a percentage value: 1 is 100%, for instance, 0.05 is 5%. You can pass in negative numbers to
347
+ * zoom out.
348
+ * @param e Original event that caused the nudge. May be null.
349
+ * @returns The zoom that was set. Zoom will be clamped to the allowed range.
350
+ */
351
+ nudgeZoom(delta: number, e?: Event): number;
352
+ /**
353
+ * Nudges the wheel zoom by the given amount. This function is intended for use by components that control zoom via the mouse wheel, and not for general usage. See `nudgeZoom` for a more general version of this.
354
+ * @param delta Amount to change zoom by.
355
+ * @param e Original event that caused the nudge. May be null.
356
+ */
357
+ nudgeWheelZoom(delta: number, e?: Event): void;
358
+ /**
359
+ * Pan the canvas to align the content in one or both axes.
360
+ * @param params
361
+ */
362
+ alignContent(params: AlignContentOptions): void;
363
+ /**
364
+ * Pan the canvas to align the content such that the top edge of the topmost element is at the top of the viewport.
365
+ * @param params
366
+ */
367
+ alignContentTop(params?: AlignContentToFaceOptions): void;
368
+ /**
369
+ * Pan the canvas to align the content such that the bottom edge of the bottom element is at the bottom of the viewport.
370
+ * @param params
371
+ */
372
+ alignContentBottom(params?: AlignContentToFaceOptions): void;
373
+ /**
374
+ * Pan the canvas to align the content such that the left edge of the leftmost element is at the left of the viewport.
375
+ * @param params
376
+ */
377
+ alignContentLeft(params?: AlignContentToFaceOptions): void;
378
+ /**
379
+ * Pan the canvas to align the content such that the right edge of the rightmost element is at the right of the viewport.
380
+ * @param params
381
+ */
382
+ alignContentRight(params?: AlignContentToFaceOptions): void;
383
+ /**
384
+ * Centers the tracked content inside the viewport, but does not adjust the current zoom.
385
+ * @param params Method parameters.
386
+ * @param params.bounds Bounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
387
+ * @param params.horizontal True by default. Indicates the content should be centered in the X axis.
388
+ * @param params.vertical True by default. Indicates the content should be centered in the Y axis.
389
+ * @param params.doNotAnimate If true, don't animate while centering.
390
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
391
+ * @param params.doNotFirePanEvent If true, a pan event will not be fired.
392
+ */
393
+ centerContent(params?: CenterContentOptions): void;
394
+ /**
395
+ * Centers the tracked content inside the viewport horizontally, but does not adjust the current zoom.
396
+ * @param params Method parameters.
397
+ * @param params.bounds Bounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
398
+ * @param params.doNotAnimate If true, don't animate while centering.
399
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
400
+ * @param params.doNotFirePanEvent If true, a pan event will not be fired.
401
+ */
402
+ centerContentHorizontally(params: any): void;
403
+ /**
404
+ * Centers the tracked content inside the viewport vertically, but does not adjust the current zoom.
405
+ * @param params Method parameters.
406
+ * @param params.bounds Bounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
407
+ * @param params.doNotAnimate If true, don't animate while centering.
408
+ * @param params.onComplete Optional function to call on operation complete (centering may be animated).
409
+ * @param params.doNotFirePanEvent If true, a pan event will not be fired.
410
+ */
411
+ centerContentVertically(params: any): void;
412
+ /**
413
+ * Centers the given bounds in the viewport, vertically and/or horizontally.
414
+ * @param cparams Optional extra parameters.
415
+ * @param cparams.horizontal Whether or not to center horizontally. Defaults to true.
416
+ * @param cparams.vertical Whether or not to center vertically. Defaults to true.
417
+ * @param cparams.doNotAnimate If true, animation will not be switched on for the operation.
418
+ * @param cparams.onComplete Optional on complete callback
419
+ */
420
+ centerOn(cparams?: {
421
+ horizontal?: boolean;
422
+ vertical?: boolean;
423
+ doNotAnimate?: boolean;
424
+ onComplete?: (xy: PointXY) => any;
425
+ zoom?: number;
426
+ bounds: BoundingBox;
427
+ }): void;
428
+ /**
429
+ * Centers the given bounds in the viewport, horizontally only.
430
+ * @param cparams centering parameters.
431
+ * @param cparams.doNotAnimate If true, animation will not be switched on for the operation.
432
+ * @param cparams.onComplete Optional on complete callback
433
+ */
434
+ centerOnHorizontally(cparams: {
435
+ bounds: BoundingBox;
436
+ doNotAnimate?: boolean;
437
+ onComplete?: (p: PointXY) => any;
438
+ }): void;
439
+ /**
440
+ * Centers the given bounds in the viewport, vertically only.
441
+ * @param cparams Centering parameters.
442
+ * @param cparams.doNotAnimate If true, animation will not be switched on for the operation.
443
+ * @param cparams.onComplete Optional on complete callback
444
+ */
445
+ centerOnVertically(cparams: {
446
+ doNotAnimate?: boolean;
447
+ bounds: BoundingBox;
448
+ onComplete?: (p: PointXY) => any;
449
+ }): void;
450
+ /**
451
+ * Centers on the given bounds and then adjusts the zoom of the widget so that the short axis of the viewport
452
+ * is [1 / fillRatio] larger than its corresponding axis on the centered bounds. `fillRatio` is basically
453
+ * a measure of how much context you want to see around the bounds on which you centered.
454
+ * @param cparams Centering params
455
+ * @param cparams.fillRatio - Proportional ratio of the corresponding bounds' edge to the viewport's short edge. Defaults to 0.6.
456
+ * @param cparams.doNotAnimate - By default, this operation is animated.
457
+ * @internal
458
+ */
459
+ centerOnAndZoom(cparams: {
460
+ bounds: BoundingBox;
461
+ fillRatio?: number;
462
+ doNotAnimate?: boolean;
463
+ }): void;
464
+ /**
465
+ * Gets the canvas location that corresponds to the center of the viewport. Note that this may describe
466
+ * a point outside of the content bounds.
467
+ * @returns x,y location of the logical position on the canvas corresponding to the center of the viewport.
468
+ */
469
+ getViewportCenter(): PointXY;
470
+ /**
471
+ * Sets the location of the canvas such that the given point appears at the center of the viewport.
472
+ * @param xy - location of the point on the canvas to position in the center of the viewport.
473
+ */
474
+ setViewportCenter(xy: PointXY): void;
475
+ /**
476
+ * Sets whether or not the widget clamps the movement of the canvas during pan/zoom
477
+ * to ensure that the managed content never disappears from view.
478
+ * @param c Whether or not to clamp movement.
479
+ */
480
+ setClamping(c: boolean): void;
481
+ /**
482
+ * Returns whether or not the widget clamps the movement of the canvas during pan/zoom/
483
+ */
484
+ isClamping(): boolean;
485
+ /**
486
+ * Sets the current zoom, clamping it to the allowed range.
487
+ * @param z - Zoom value. If this is outside the allowed bounds it will be clamped.
488
+ * @param animate - Whether to animate the change in zoom, or just go straight to the new zoom level.
489
+ * @returns Current zoom. This may or may not be the value you asked for - it might have been clamped to the current allowed zoom range.
490
+ */
491
+ setZoom(z: number, animate?: boolean): number;
492
+ zoomIn(canvasLoc: PointXY, animate?: boolean): number;
493
+ zoomOut(canvasLoc: PointXY, animate?: boolean): number;
494
+ /**
495
+ * Sets the current zoom range. By default, this method checks if the current zoom is within
496
+ * the new range, and if it is not then `setZoom` is called, which will cause the zoom to be clamped
497
+ * to an allowed value in the new range. You can disable this by passing `true` for `doNotClamp`.
498
+ *
499
+ * @param zr New range, as an array consisting of [lower, upper] values. Lower must be less than upper.
500
+ * @param doNotClamp If true, will not check the current zoom to ensure it falls within the new range.
501
+ * @returns Array of [min, max] current zoom values.
502
+ */
503
+ setZoomRange(zr: ZoomRange, doNotClamp?: boolean): ZoomRange;
504
+ /**
505
+ * Gets the current zoom range.
506
+ * @returns Array of [min, max] current zoom values.
507
+ */
508
+ getZoomRange(): ZoomRange;
509
+ /**
510
+ * Gets the current zoom.
511
+ */
512
+ getZoom(): number;
513
+ /**
514
+ * Gets the current position of the panned content.
515
+ * @returns location, in pixels, of the panned content, where 0,0 is the origin of the viewport.
516
+ */
517
+ getPan(): PointXY;
518
+ /**
519
+ * Pans the content by dx and dy.
520
+ * @param dx Amount to pan in X direction
521
+ * @param dy Amount to pan in Y direction
522
+ * @param animate Whether or not to animate the pan.
523
+ * @param onComplete - function to call once the pan is complete
524
+ */
525
+ pan(dx: number, dy: number, animate?: boolean, onComplete?: (m: PointXY) => any): void;
526
+ /**
527
+ * Sets the position of the panned content's origin and invokes an onPan callback.
528
+ * @param left - Position in pixels of the left edge of the panned content.
529
+ * @param top - Position in pixels of the top edge of the panned content.
530
+ * @param animate - Whether or not to animate the pan.
531
+ * @param onComplete - If `animate` is set to true, an optional callback for the end of the pan. This function is
532
+ * passed a PointArray containing the final position.
533
+ */
534
+ setPan(left: number, top: number, animate?: boolean, onComplete?: (p: PointXY) => any): PointXY;
535
+ startPanRepeat(dirX: 1 | 0 | -1, dirY: 1 | 0 | -1, dx: number, dy: number, interval: number, cb?: (total: PointXY) => any): void;
536
+ stopPanRepeat(): void;
537
+ /**
538
+ * Sets the current transform origin, in pixels. Used mainly to support save/restore state.
539
+ * @param x - Position of the X coordinate of the transform origin.
540
+ * @param y - Position of the Y coordinate of the transform origin.
541
+ */
542
+ setTransformOrigin(x: number, y: number): void;
543
+ /**
544
+ * Maps the given page location to a value relative to the viewport origin, allowing for
545
+ * zoom and pan of the canvas. This takes into account the offset of the viewport in the page so that what
546
+ * you get back is the mapped position relative to the target element's [left,top] corner. If
547
+ * you wish, you can supply true for 'doNotAdjustForOffset', to suppress that behavior.
548
+ * @param left X location
549
+ * @param top Y location
550
+ * @param roundValues If true, return integers.
551
+ * @returns The mapped location, as a PointXY object.
552
+ */
553
+ fromPageLocation(left: number, top: number, roundValues?: boolean): PointXY;
554
+ fromWindowLocation(left: number, top: number, roundValues?: boolean): PointXY;
555
+ /**
556
+ * Maps the given location on the canvas to a point relative to the page origin, allowing for zoom and
557
+ * pan of the canvas. This takes into account the offset of the viewport in the page so that what
558
+ * you get back is the mapped position computed relative to the target element's [left,top] corner.
559
+ * @param left
560
+ * @param top
561
+ */
562
+ toPageLocation(left: number, top: number): PointXY;
563
+ /**
564
+ * Maps the page location of the given event to a value relative to the viewport origin, allowing for zoom and pan of the canvas. This takes into account the offset of the viewport in the page so that what you get back is the mapped position relative to the target element's [left,top] corner. If you wish, you can supply true for 'doNotAdjustForOffset', to suppress that behavior.
565
+ * @param event Browser event
566
+ * @returns The mapped location, as {left:number, top:number}
567
+ */
568
+ mapEventLocation(event: MouseEvent): PointXY;
569
+ /**
570
+ * Sets whether or not the component should respond to mouse events.
571
+ * @param state Whether or not to respond to mouse events.
572
+ */
573
+ setEnabled(state: boolean): void;
574
+ /**
575
+ * Takes some element that is in the DOM and moves it so that it appears at the given x,y over the canvas,
576
+ * allowing for the current zoom and pan. It is expected that the element is not one that is currently
577
+ * managed by the widget - a common use case for this is some dialog, which you do not want to append to
578
+ * the canvas since it would have the zoom effect applied.
579
+ * @param el Selector, DOM element or element id representing the element to move.
580
+ * @param x X location to move to.
581
+ * @param y Y location to move to.
582
+ */
583
+ showElementAt(el: HTMLElement, x: number, y: number): void;
584
+ /**
585
+ * Returns the apparent origin of the canvas inside the viewport - the coordinates, in real pixel
586
+ * values, of where the origin of the canvas appears to be. This apparent origin is not necessarily the
587
+ * same as the origin values of the canvas, because the transform origin and zoom values change
588
+ * things. This function can be used in conjunction with the content bounds by widgets such as the miniview,
589
+ * to calculate what is actually visible in the viewport at some point in time.
590
+ * @returns Position of the canvas, relative to the viewport's 0,0.
591
+ */
592
+ getApparentCanvasLocation(): PointXY;
593
+ /**
594
+ * Sets the apparent canvas location - see the notes for getApparentCanvasLocation.
595
+ * @param left - Value in pixels for left edge of canvas.
596
+ * @param top - Value in pixels for top edge of canvas.
597
+ * @returns Position of the actual origin set, after clamping.
598
+ */
599
+ setApparentCanvasLocation(left: number, top: number): PointXY;
600
+ /**
601
+ * Returns a rectangle that defines the visible content area - in _canvas coordinates_. This method tells you the origin and size of a rectangle that defines the extents of the content that is currently visible in the viewport.
602
+ */
603
+ getVisibleContentArea(): RectangleXY;
604
+ /**
605
+ * Appends an element to the viewport so that it floats above the content that is being zoomed and panned.
606
+ * The element will have `position:absolute` set on it. You can float any element you like, but note that the
607
+ * responsibility for setting an appropriate z index is yours.
608
+ * @param el - Element to float.
609
+ * @param pos - Position to float the element at.
610
+ */
611
+ floatElement(el: Element, pos: PointXY): void;
612
+ /**
613
+ * Appends an element to the viewport such that it is zoomed with everything else, but constrains pan
614
+ * in one or both axes so that the element remains fixed with respect to the viewport origin.
615
+ * @param el The DOM element to append.
616
+ * @param pos Location of the element's origin.
617
+ * @param constraints Flags to indicate optional constraint to each axis.
618
+ * @param id Optional ID to assign to the element, for future retrieval
619
+ * @internal
620
+ */
621
+ fixElement(el: BrowserElement, pos: PointXY, constraints?: FixedElementConstraints, id?: string, onTop?: boolean): FixedElement;
622
+ /**
623
+ * Unfixes an element.
624
+ * @param el
625
+ * @internal
626
+ */
627
+ unfixElement(el: Element): void;
628
+ /**
629
+ * Returns whether or not the given point (relative to page origin) is within the viewport for the widget.
630
+ * @param x X location of point to test
631
+ * @param y Y location of point to test
632
+ * @returns true if the point is within the viewport, false if not.
633
+ * @internal
634
+ */
635
+ isInViewport(x: number, y: number): boolean;
636
+ /**
637
+ * Sets the filter used to determine whether or not a given wheel event should be responded to.
638
+ * @param f A function that will be given the current mouse event. You must return false from the function if you wish for the wheel event to be responded to.
639
+ */
640
+ setWheelFilter(f: (e: MouseEvent) => boolean): void;
641
+ addBackground(background: Background): void;
642
+ /**
643
+ * removes the background from the canvas element
644
+ * @internal
645
+ */
646
+ removeBackground(background: Background): void;
647
+ /**
648
+ * Cleans up the pan zoom widget - removes all event bindings, and all elements from the DOM.
649
+ */
650
+ destroy(): void;
651
+ /**
652
+ * returns whether or not the given element is owned by the current background, if there is one. with some library
653
+ * integrations the background can be temporarily null during the processing of an event.
654
+ * @internal
655
+ * @param el
656
+ */
657
+ isBackgroundElement(el: any): boolean;
658
+ }
659
+ /**
660
+ * Panzoom background can have multiple backgrounds.
661
+ */
662
+ declare class PanZoomBackground implements Background {
663
+ backgrounds: Array<Background>;
664
+ addBackground(background: Background): void;
665
+ removeBackground(background: Background): void;
666
+ getWidth(): number;
667
+ getHeight(): number;
668
+ setZoom(z: number, doNotDebounce?: boolean): void;
669
+ owns(el: any): boolean;
670
+ pan(): void;
671
+ destroy(): void;
672
+ _setVisible(v: boolean): void;
673
+ }
674
+ export {};