@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,442 @@
1
+ import { BrowserElement } from "./util";
2
+ import { BoundingBox, Edge, Group, Node, ObjectData, Port, Vertex, VisuallyJsModel, VisuallyJsSelection } from "../core";
3
+ import { PointXY, Size } from "../core";
4
+ import { UICoreDefaults, UICoreOptions, UIEdgeOptions, DragOptions, Overlay, Connection, EdgePropertyMappings, AlignContentOptions } from "../ui";
5
+ import { EdgeInputMethod } from "./edge-input-handler";
6
+ import { ShapeLibrary, ShapeSet } from "./shape-library/shape-library-definitions";
7
+ import { VisuallyJSDOMElement } from "./element-facade";
8
+ import { VertexMapping } from "../ui";
9
+ import { BrowserUI } from "./browser-visuallyjs-instance";
10
+ import { ConnectorEditorActivateParams } from "./connector-editor";
11
+ /**
12
+ * Defines a function used to filter drop on a canvas
13
+ * @group Components
14
+ * @category Palette
15
+ */
16
+ export type CanvasDropFilter<T> = (data: T) => boolean;
17
+ /**
18
+ * Defines a function used to filter drop on an edge.
19
+ * @group Components
20
+ * @category Palette
21
+ */
22
+ export type EdgeDropFilter<T> = (data: T, target: Edge) => boolean;
23
+ /**
24
+ * Defines the callback function invoked when an item is being dragged.
25
+ * @group Components
26
+ * @category Palette
27
+ */
28
+ export type DragFunction<T> = (data: T, el: BrowserElement, e: Event) => any;
29
+ /**
30
+ * Defines the function invoked when an item is dropped onto an existing vertex.
31
+ * @group Components
32
+ * @category Palette
33
+ */
34
+ export type DropFunction<T> = (data: T, target: Node | Group, draggedElement?: BrowserElement, e?: Event, position?: PointXY, canvasLocation?: PointXY, targetLocation?: PointXY, locationOnTarget?: PointXY) => void;
35
+ /**
36
+ * Defines the function invoked when an item is dropped on an edge.
37
+ * @group Components
38
+ * @category Palette
39
+ */
40
+ export type EdgeDropFunction<T> = (data: T, target: Edge, draggedElement?: BrowserElement, e?: Event, position?: PointXY, canvasLocation?: PointXY) => void;
41
+ /**
42
+ * Defines the function invoked when an item is dropped onto whitespace in the canvas.
43
+ * @group Components
44
+ * @category Palette
45
+ */
46
+ export type CanvasDropFunction<T> = (data: T, canvasPosition: PointXY, draggedElement?: BrowserElement, e?: Event, position?: PointXY, elementSize?: Size) => void;
47
+ /**
48
+ * Defines the function that is invoked to gather a dataset to associate with an item that is being dragged.
49
+ * @group Components
50
+ * @category Palette
51
+ * @typeParam T Defines the type of the object that will be created.
52
+ */
53
+ export type DataGeneratorFunction<T> = (el: BrowserElement) => T;
54
+ /**
55
+ * Defines the function invoked to determine the type of some item that is about to be dragged.
56
+ * @group Components
57
+ * @category Palette
58
+ * @typeParam T Defines the kind of the object from which to extract the type id.
59
+ */
60
+ export type TypeGeneratorFunction<T> = (d: T) => string;
61
+ /**
62
+ * Defines the function that is invoked to determine whether an item that is about to be dragged represents a group.
63
+ * @group Components
64
+ * @category Palette
65
+ * @typeParam T Defines the kind of the associated data object.
66
+ */
67
+ export type GroupIdentifierFunction<T> = (d: T, el: BrowserElement) => boolean;
68
+ /**
69
+ * Defines the method signature for the `onVertexAdded` callback.
70
+ * @group Components
71
+ * @category Palette
72
+ */
73
+ export type OnVertexAddedCallback = (p: {
74
+ vertex: Node | Group;
75
+ dropTarget?: DropTargetInfo;
76
+ doModelUpdate: ModelUpdateFunction;
77
+ }) => any;
78
+ /**
79
+ * Defines a function you can call from a vertex added callback to run some model updates that will be included in the same transaction as the one that just added the new vertex. You pass a function in to this method, which contains the model updates you wish to make. Your update function will be passed the UI, its model, and any `context` you provided as a second argument when you called doModelUpdate inside the vertex added callback.
80
+ */
81
+ export type ModelUpdateFunction = (updateFunction: (ui: BrowserUI, model: VisuallyJsModel, context?: any) => any) => void;
82
+ /**
83
+ * When a new vertex was dropped onto an existing vertex, the onVertexAdded callback is passed an object of this type to describe the vertex onto which the new vertex was dropped.
84
+ * @group Components
85
+ * @category Palette
86
+ */
87
+ export type DropTargetInfo = {
88
+ /**
89
+ * The vertex onto which a new vertex was dropped
90
+ */
91
+ vertex: Node | Group;
92
+ /**
93
+ * Position the existing vertex is located at
94
+ */
95
+ pos: PointXY;
96
+ /**
97
+ * Size of the existing vertex
98
+ */
99
+ size: Size;
100
+ };
101
+ /**
102
+ * Definition of a drag group membership - either just the id of a drag group, or the id of a drag group and whether or not
103
+ * this element plays an `active` role in the drag group.
104
+ *
105
+ * @group Components
106
+ * @category Element dragging
107
+ */
108
+ export type DragGroupSpec = string | {
109
+ id: string;
110
+ active: boolean;
111
+ };
112
+ /**
113
+ * Models some discrete object whose class, in the UI, can be manipulated. This can be an edge/vertex, an element in the UI, or the ID of some edge/vertex.
114
+ */
115
+ export type SupportsClassManipulationElement = Edge | Vertex | BrowserElement | string;
116
+ /**
117
+ * List of object whose css class, in the UI, can be manipulated. This means either some object that itself satisfies {@link SupportsClassManipulationElement}, or an array of these, or a NodeList of DOM elements.
118
+ */
119
+ export type SupportsClassManipulation = SupportsClassManipulationElement | ArrayLike<SupportsClassManipulationElement> | NodeListOf<any>;
120
+ /**
121
+ * Common options for edges in the Browser UI package.
122
+ * @group Edges
123
+ * @category Options
124
+ */
125
+ export interface BrowserUIEdgeOptions extends UIEdgeOptions {
126
+ /**
127
+ * Optional set of mappings from property values to edge definitions.
128
+ */
129
+ propertyMappings?: EdgePropertyMappings;
130
+ /**
131
+ * If true, an EdgePathEditor will be registered on the Surface, with which you can interact via the `startEditingPath(..)` and `stopEditingPath()` methods on the Surface.
132
+ */
133
+ editable?: boolean;
134
+ /**
135
+ * Defaults to true, meaning if edges are editable then any new edge is automatically marked edited and its geometry is stored.
136
+ */
137
+ activeEdit?: boolean;
138
+ /**
139
+ * Input method for edges. Defaults to drag.
140
+ */
141
+ inputMethod?: EdgeInputMethod;
142
+ /**
143
+ * Defaults to true, meaning that when a user taps an edge it goes into edit mode.
144
+ */
145
+ editOnTap?: boolean;
146
+ /**
147
+ * This setting is only relevant when you are using an SVG container. By default, edges are drawn in a layer that appears in the DOM after the vertex layer, meaning edges will show above vertices. If you set this to 0, you can force the edge layer to the back.
148
+ */
149
+ layerIndex?: number;
150
+ }
151
+ /**
152
+ * Base options for a renderer in the Browser UI package.
153
+ * @group Components
154
+ * @category Options
155
+ */
156
+ export interface BrowserUIOptions<O extends BrowserUIDefaults = BrowserUIDefaults> extends UICoreOptions<BrowserElement, O> {
157
+ /**
158
+ * Whether or not the elements in the UI should be draggable. Defaults to true.
159
+ */
160
+ elementsDraggable?: boolean;
161
+ /**
162
+ * Options for edges
163
+ */
164
+ edges?: BrowserUIEdgeOptions;
165
+ /**
166
+ * Options for dragging vertices.
167
+ */
168
+ dragOptions?: DragOptions<BrowserElement>;
169
+ /**
170
+ * Optional shape library that can render SVG shapes into node elements. When you provide a shape library to a surface, two things happen: - firstly, the surface registers a `vjs-shape` tag that your templates can use. The `type` of each node is used to extract an appropriate SVG shape definition from the shape library. Secondly, the 'exportToSvg()' method becomes available. Note that SVG export has a few constraints/requirements - see the docs for a discussion.
171
+ */
172
+ shapes?: ShapesOptions;
173
+ /**
174
+ * Defaults to false. When true, VisuallyJs will use an SVG element as the container for all the other elements. You will need to ensure your templates/components write out SVG elements, and you will have to stick to SVG elements in any Decorators. You may wish to consider looking at the {@link Diagram} class if you want to build an SVG diagram.
175
+ */
176
+ useSvgContainer?: boolean;
177
+ /**
178
+ * Optional Selection - or generator - to use as the dataset to render. If you supply this the Surface will render the contents of the selection, or the list of vertices that the given function returns. This is useful for such things as inspector windows for parts of your UI.
179
+ */
180
+ selection?: VisuallyJsSelection | Function;
181
+ /**
182
+ * Whether or not to consume right clicks, which ordinarily will cause a browser to show a context menu with some native browser functions. This defaults to true.
183
+ */
184
+ consumeRightClick?: boolean;
185
+ /**
186
+ * When using 'vanilla' VisuallyJs, you can provide a map of templates here rather than including them somewhere in the HTML of the page. This is ignored when you are using a library integration.
187
+ */
188
+ templates?: Record<string, string>;
189
+ }
190
+ /**
191
+ * Options for a shape library, for use with a Surface or Paper component.
192
+ * @group Components
193
+ * @category Options
194
+ */
195
+ export interface ShapesOptions {
196
+ /**
197
+ * The shape library to use. You must provide either this or `sets`.
198
+ */
199
+ library?: ShapeLibrary<ObjectData>;
200
+ /**
201
+ * List of shape sets - or a single set - to support. Provide this or `library`. If you provide `library` and this, `library` will take precedence.
202
+ */
203
+ sets?: ShapeSet | Array<ShapeSet>;
204
+ /**
205
+ * Optional default for fill color. If not provided, fill is set to #FFFFFF.
206
+ */
207
+ defaultFillColor?: string;
208
+ /**
209
+ * Optional default for outline color. If not provided, outline is set to #000000.
210
+ */
211
+ defaultOutlineColor?: string;
212
+ /**
213
+ * Optional default for text color. If not provided, text is set to #000000.
214
+ */
215
+ defaultColor?: string;
216
+ /**
217
+ * The property to use to map an object's type. Defaults to "type".
218
+ */
219
+ typeParameter?: string;
220
+ /**
221
+ * The property to use to map an object's category (ie which shape set to use). Defaults to "category".
222
+ */
223
+ categoryParameter?: string;
224
+ /**
225
+ * Defaults to true - labels are split across multiple lines to fit inside their shape. Set this to false if you want labels to always be a single line.
226
+ */
227
+ multilineLabels?: boolean;
228
+ /**
229
+ * How much of the width of a shape a multiline label will take up before wrapping. Defaults to 0.8. You can set this to a number greater than 1, if you like, but that will allow the label to overflow.
230
+ */
231
+ labelFillRatio?: number;
232
+ /**
233
+ * The attribute containing each vertex's label. Defaults to 'label'
234
+ */
235
+ labelAttribute?: string;
236
+ /**
237
+ * Whether or not to show labels. Defaults to true.
238
+ */
239
+ showLabels?: boolean;
240
+ /**
241
+ * Stroke width to use when drawing svg shapes.
242
+ */
243
+ strokeWidth?: number;
244
+ /**
245
+ * The name of the tag to make available to node/group renderers. Defaults to `vjs-shape`. Only used with certain advanced usages of Vanilla VisuallyJs. If you're using an integration there's a dedicated shape component you will use instead.
246
+ * @advanced
247
+ */
248
+ tagName?: string;
249
+ /**
250
+ * Optional spec for font size/style to apply to all shapes. Shapes that have their own font spec will override this.
251
+ */
252
+ font?: FontSpec;
253
+ }
254
+ /**
255
+ * Defaults for the BrowserUI implementation of VisuallyJs.
256
+ * @group Components
257
+ * @category Defaults
258
+ */
259
+ export interface BrowserUIDefaults extends UICoreDefaults<BrowserElement> {
260
+ /**
261
+ * Whether or not elements should be draggable. Default value is `true`.
262
+ */
263
+ elementsDraggable?: boolean;
264
+ /**
265
+ * Defaults to true, indicating that a ResizeObserver will be used, where available, to allow VisuallyJs to revalidate elements whose size in the DOM have been changed, without the library user having to call `revalidate()`
266
+ */
267
+ resizeObserver?: boolean;
268
+ /**
269
+ * Defaults to false. When true, VisuallyJs tracks mouseover/mouseout/mouseenter/mouseexit events for overlays, endpoints, elements and connections. Most of the reasoning for having this ability was related to the initial canvas renderer, and with SVG/CSS this functionality is, for the most part, not needed. But you can switch it on if you need to.
270
+ */
271
+ hoverEvents?: boolean;
272
+ useSvgContainer?: boolean;
273
+ }
274
+ /**
275
+ * @internal
276
+ */
277
+ export interface UIComponent {
278
+ canvas: HTMLElement;
279
+ svg: SVGElement;
280
+ }
281
+ /**
282
+ * @internal
283
+ */
284
+ export type ElementModelInfo = {
285
+ /**
286
+ * the port/node/group we're referencing
287
+ */
288
+ obj: Vertex;
289
+ /**
290
+ * if obj is a port, this is its parent. Otherwise this is the same as obj.
291
+ */
292
+ vertex: Node | Group;
293
+ /**
294
+ * corresponding type def for this vertex definition
295
+ */
296
+ typeDef: VertexMapping<any, BrowserElement>;
297
+ /**
298
+ * can be used for all vertex types - we get info from the view matching this port type
299
+ */
300
+ portType: string;
301
+ /**
302
+ * optional ID of the port.
303
+ */
304
+ portId: string;
305
+ /**
306
+ * DOM element corresponding to `vertex`
307
+ */
308
+ vertexEl: VisuallyJSDOMElement;
309
+ /**
310
+ * DOM element corresponding to `obj`
311
+ */
312
+ objEl: BrowserElement;
313
+ /**
314
+ * if true, this port was just created automatically, by a `getPort` call that had `createMissingPorts:true`
315
+ */
316
+ missingPortCreated: boolean;
317
+ };
318
+ /**
319
+ * @internal
320
+ */
321
+ export interface VisuallyJsDOMInformation {
322
+ connection?: Connection<any>;
323
+ overlay?: Overlay<BrowserElement>;
324
+ node?: Node;
325
+ group?: Group;
326
+ port?: Port;
327
+ vertex?: Vertex;
328
+ }
329
+ /**
330
+ * @internal
331
+ */
332
+ export interface InternalBackgroundOptions<T> {
333
+ type: string;
334
+ canvas: BrowserElement;
335
+ viewport: BrowserElement;
336
+ ui: BrowserUI;
337
+ options: T;
338
+ visible: boolean;
339
+ }
340
+ /**
341
+ * Definition of a Background. This is an internal class that users of the SDK won't need to access unless they are writing their own background type.
342
+ * @internal
343
+ */
344
+ export interface Background {
345
+ setZoom(zoom: number, doNotDebounce?: boolean): void;
346
+ getWidth(): number;
347
+ getHeight(): number;
348
+ owns(el: any): boolean;
349
+ pan(): void;
350
+ destroy(): void;
351
+ _setVisible(v: boolean): void;
352
+ }
353
+ /**
354
+ * @internal
355
+ */
356
+ export interface ImageBackground extends Background {
357
+ setUrl(url: string): void;
358
+ }
359
+ /**
360
+ * Style for a font - oblique, italic or normal.
361
+ */
362
+ export type FontStyle = "normal" | "oblique" | "italic";
363
+ /**
364
+ * Font weight to use (e.g., "normal", "bold", "100", "300").
365
+ */
366
+ export type FontWeight = string | number;
367
+ /**
368
+ * Specs for a font. The default values depend on the context.
369
+ */
370
+ export interface FontSpec {
371
+ /**
372
+ * Size of the font. Default value depends on the context this spec occurs in.
373
+ */
374
+ size?: number;
375
+ /**
376
+ * Font style to use. Default value depends on the context this spec occurs in.
377
+ */
378
+ style?: FontStyle;
379
+ /**
380
+ * Font weight to use (e.g., "normal", "bold", "100", "300"). Defaults to null, which browsers treat as "normal".
381
+ */
382
+ weight?: FontWeight;
383
+ /**
384
+ * Font family to use.
385
+ */
386
+ family?: string;
387
+ }
388
+ export declare function supportsPathEditing(o: any): o is SupportsPathEditing;
389
+ /**
390
+ * Definition of a UI that supports path editing
391
+ */
392
+ export interface SupportsPathEditing {
393
+ /**
394
+ * Start editing the given edge or connection.
395
+ */
396
+ startEditingPath<T extends ConnectorEditorActivateParams<BrowserElement>>(edgeOrConnection: Edge | Connection<BrowserElement>, params?: T): void;
397
+ /**
398
+ * Stop editing any connector paths.
399
+ */
400
+ stopEditingPath(): void;
401
+ /**
402
+ * Clear the edits for the given connection.
403
+ */
404
+ clearPathEdits(edgeOrConnection: string | Edge | Connection<BrowserElement>): boolean;
405
+ }
406
+ /**
407
+ * Options for the zoomToExtents method
408
+ */
409
+ export interface ZoomToExtentsOptions {
410
+ /**
411
+ * Extents to zoom to. Can be a single box or an array of boxes; in the latter case VisuallyJs will calculate a minimum bounding box for all the boxes provided.
412
+ */
413
+ extents: BoundingBox | Array<BoundingBox>;
414
+ /**
415
+ * A decimal between 0 and 1, which indicates how much of the viewport size the given extents 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.
416
+ */
417
+ fill?: number;
418
+ /**
419
+ * If the given extents is all already visible, do not make any changes to zoom.
420
+ */
421
+ doNotZoomIfVisible?: boolean;
422
+ /**
423
+ * If true, don't animate while centering. Defaults to false, ie. the operation will be animated.
424
+ */
425
+ doNotAnimate?: boolean;
426
+ /**
427
+ * Optional function to call on operation complete.
428
+ */
429
+ onComplete?: (p: PointXY) => any;
430
+ /**
431
+ * @internal
432
+ */
433
+ doNotFirePanEvent?: boolean;
434
+ }
435
+ export interface SupportsViewportManipulation {
436
+ setPan(x: number, y: number, animate?: boolean): void;
437
+ setZoom(zoom: number, animate?: boolean): number;
438
+ centerOn(element: string | Vertex | Element): void;
439
+ centerOnAndZoom(element: string | Vertex | Element, fillRatio?: number): void;
440
+ alignContent(options: AlignContentOptions): void;
441
+ zoomToExtents(zParams: ZoomToExtentsOptions): void;
442
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Searches children of the given element to find elements that have a `vjs-att` set. For each of those, if the `checkValidity` method is defined,
3
+ * this method executes it. If it returns false, this method returns false. If no elements have `checkValidity` or no `checkValidity()` call
4
+ * returns false, this method returns true.
5
+ *
6
+ * `checkValidity` is a method defined in input elements and textareas, when a `pattern` is defined on the element (or if it is marked
7
+ * required and has no valuer set)
8
+ * @param el
9
+ * @internal
10
+ */
11
+ export declare function checkValidity(el: HTMLElement): boolean;
12
+ /**
13
+ * Extracts a dataset from the given element by finding child elements that have a `vjs-att` attribute set, and extracting from those elements
14
+ * their value. When the same `vjs-att` value appears more than once as a child of `el`, the values are stored in an array for that field.
15
+ * @param el - Element to extract values from.
16
+ * @param unresolvedElementGetter - Optional function to use when an element with an unknown tag has a `vjs-att` declared on it. This function is given the element and whatever it
17
+ * returns - even null - will be set on the outgoing data.
18
+ * @internal
19
+ */
20
+ export declare function extract(el: HTMLElement, unresolvedElementGetter?: (el: Element) => any): Record<string, any>;
21
+ type SupportedCoercion = "integer" | "float";
22
+ /**
23
+ * @internal
24
+ * @param value
25
+ * @param datatype
26
+ */
27
+ export declare function attemptCoerce(value: string, datatype: SupportedCoercion): any;
28
+ /**
29
+ * Extract the value represented by the given element.
30
+ * @param el - Element to extract value from.
31
+ * @param unresolvedElementGetter- Optional function to use when an element with an unknown tag has a `vjs-att` declared on it. This function is given the element and whatever it
32
+ * returns - even null - will be the return value.
33
+ * @internal
34
+ */
35
+ export declare function extractValueFromElement(el: HTMLElement, unresolvedElementGetter?: (el: Element) => any): any;
36
+ /**
37
+ * Apply the given object to the given DOM element. This method will find all child elements of `el` that have a `vjs-att`
38
+ * attribute set, and then attempt to set the value of any found DOM element with a value extracted from `dataset`.
39
+ * @param dataset
40
+ * @param el
41
+ * @param autoCommitHandler
42
+ * @internal
43
+ */
44
+ export declare function apply(dataset: Record<string, any>, el: any, autoCommitHandler?: (e: Element) => any, unresolvedElementSetter?: (e: Element, value: any) => any): void;
45
+ /**
46
+ * @internal
47
+ */
48
+ export declare function clear(els: ArrayLike<any>, source?: any): void;
49
+ export {};
@@ -0,0 +1,51 @@
1
+ export declare const DialogConstants: {
2
+ Attributes: {
3
+ POSITION: string;
4
+ AXIS: string;
5
+ VJS_CANCEL: string;
6
+ VJS_COMMIT: string;
7
+ MULTIPLE: string;
8
+ VJS: string;
9
+ DATATYPE: string;
10
+ TITLE: string;
11
+ FOCUS: string;
12
+ TYPE: string;
13
+ CANCEL: string;
14
+ ID: string;
15
+ };
16
+ Values: {
17
+ BLOCK: string;
18
+ VISIBLE: string;
19
+ HIDDEN: string;
20
+ FIXED: string;
21
+ ABSOLUTE: string;
22
+ TOP: string;
23
+ BOTTOM: string;
24
+ X: string;
25
+ Y: string;
26
+ TRUE: string;
27
+ FALSE: string;
28
+ NONE: string;
29
+ PX: string;
30
+ };
31
+ Events: {
32
+ RESIZE: string;
33
+ CLICK: string;
34
+ KEYUP: string;
35
+ SCROLL: string;
36
+ };
37
+ Elements: {
38
+ BUTTON: string;
39
+ DIV: string;
40
+ TEXT: string;
41
+ RADIO: string;
42
+ CHECKBOX: string;
43
+ SELECT: string;
44
+ TEXTAREA: string;
45
+ COLOR: string;
46
+ HIDDEN: string;
47
+ INPUT: string;
48
+ NUMBER: string;
49
+ RANGE: string;
50
+ };
51
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Defines the function called when a user commits a dialog.
3
+ * @group Components
4
+ * @category Dialogs
5
+ */
6
+ export type CommitFunction = (data: Record<string, any>) => any;
7
+ /**
8
+ * Defines the function called when a user cancels a dialog.
9
+ * @group Components
10
+ * @category Dialogs
11
+ */
12
+ export type CancelFunction = () => any;
13
+ /**
14
+ * Defines the callback invoked when a dialog has opened
15
+ * @group Components
16
+ * @category Dialogs
17
+ */
18
+ export type OpenFunction = (el: HTMLElement) => any;
19
+ /**
20
+ * Defines the interceptor invoked prior to a user closing a Dialog, to allow you to allow or reject the operation
21
+ * @group Components
22
+ * @category Dialogs
23
+ */
24
+ export type MaybeCloseFunction = (data: any) => boolean;
25
+ /**
26
+ * Defines the function invoked after a Dialog has closed.
27
+ * @group Components
28
+ * @category Dialogs
29
+ */
30
+ export type CloseFunction = () => any;
@@ -0,0 +1,3 @@
1
+ export * from './binder';
2
+ export * from './dialogs';
3
+ export * from './constants';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This class manages multiple drag handlers on some container element. Each handler is registered with a CSS selector
3
+ * and optionally a priority. The manager class captures mousedown events on the container and then searches for
4
+ * an appropriate handler to pass the event to, but matching the selectors each handler declares. When a matching selector
5
+ * is found, all of the handlers for that selector are iterated by order of their priority, and the first one that does
6
+ * not return boolean false from the mousedown event (I might call this `start` in fact) becomes the current handler.
7
+ *
8
+ * Mousemove and mouseup handlers are then registered on the document, and move events are passed to the current handler.
9
+ * when the mouseup event occurs it is passed to the handler and the manager stops the drag process.
10
+ */
11
+ import { BrowserElement } from "./util";
12
+ import { DragHandler2 } from "../ui";
13
+ import { PointXY } from "../core";
14
+ export interface DragManager2Options {
15
+ translate?: (p: PointXY) => PointXY;
16
+ init: (e: Event) => void;
17
+ }
18
+ export declare class DragManager2 {
19
+ private container;
20
+ private _enabled;
21
+ private _eventManager;
22
+ private readonly _mousedownHandler;
23
+ private readonly _mousemoveHandler;
24
+ private readonly _mouseupHandler;
25
+ private _currentHandler;
26
+ private _currentDragPayload;
27
+ private _currentDragElement;
28
+ private _currentDragElementSize;
29
+ private _handlers;
30
+ private _selectors;
31
+ private _downAt;
32
+ private _currentPagePosition;
33
+ private _translatedDownAt;
34
+ private _currentTranslatedPosition;
35
+ private _translate;
36
+ private _onInit;
37
+ constructor(container: BrowserElement, options?: DragManager2Options);
38
+ $enable(): void;
39
+ $disable(): void;
40
+ addHandler(handler: DragHandler2<BrowserElement>): void;
41
+ removeHandler(handler: DragHandler2<BrowserElement>): void;
42
+ private _mousedownListener;
43
+ private _mousemoveListener;
44
+ private _mouseupListener;
45
+ /**
46
+ * Cleanup the manager's internal state.
47
+ * @private
48
+ */
49
+ private _cleanup;
50
+ /**
51
+ * Destroy the drag manager - remove its event binding on the container and clean up its internal state.
52
+ */
53
+ destroy(): void;
54
+ }