@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,528 @@
1
+ import { LabelPosition, ShapeSet } from "../../shape-library";
2
+ import { Group, ObjectData, PointXY, Size, Vertex, Node, BeforeConnectInterceptor } from "../../../core";
3
+ import { DiagramCell } from "./diagram-cell";
4
+ import { GridOptions, UIExportOptions, UICoreDefaults, EdgeEventOptions, OverlaySpec, ConnectorSpec, NodeEventOptions, GroupMapping, NodeMapping, AnchorSpec, EdgePropertyMappings, MagnetizeOptions, PaintStyle, OverlayVisibility, EdgeDeleteConfirmationFunction } from "../../../ui";
5
+ import { SurfaceSaveData } from "../definitions";
6
+ import { BrowserElement } from "../../util";
7
+ import { PaletteMode } from "../../components/palette/palette-options";
8
+ import { PanOptions, WheelOptions, ZoomOptions } from "../../pan-zoom-options";
9
+ import { MiniviewPluginOptions, LassoPluginOptions, ResizingToolsModelUpdater, ResizingToolsHandlerFactory, DragGroupsPluginOptions, ResizingToolsResizeMethod, SnaplinesPluginOptions, PanButtonsPluginOptions } from "../plugins";
10
+ import { EdgeSnapOptions } from "../../edge-handler-base";
11
+ import { DiagramActionMediator } from "./mediator";
12
+ import { OnVertexAddedCallback, FontSpec } from "../../definitions";
13
+ import { EdgeInputMethod } from "../../edge-input-handler";
14
+ import { PreparedShape } from "../shape-palette-options";
15
+ /**
16
+ * Options for the {@link Diagram.addLink method}
17
+ * @group Diagrams
18
+ * @category Options
19
+ */
20
+ export interface AddLinkOptions {
21
+ /**
22
+ * Source cell, cell id or canvas location.
23
+ */
24
+ source: PointXY | string | DiagramCell;
25
+ /**
26
+ * Source cell, cell id or canvas location.
27
+ */
28
+ target: PointXY | string | DiagramCell;
29
+ /**
30
+ * Optional backing data for the link. You can control the link appearance with values in this object, and also store any arbitrary data you wish to.
31
+ */
32
+ data?: ObjectData;
33
+ }
34
+ /**
35
+ * Options for a Diagram grid
36
+ * @group Diagrams
37
+ * @category Options
38
+ */
39
+ export interface DiagramGridOptions extends GridOptions {
40
+ /**
41
+ * Whether or not to show the grid. Defaults to true.
42
+ */
43
+ visible?: boolean;
44
+ }
45
+ /**
46
+ * Defines a function that can generate the backing data for a new edge.
47
+ */
48
+ export type EdgeDataGenerator = (v: Vertex, type: string) => ObjectData;
49
+ /**
50
+ * Options for a diagram.
51
+ * @group Diagrams
52
+ * @category Options
53
+ */
54
+ export interface DiagramOptions {
55
+ /**
56
+ * Defaults to true - whether or not to allow multiple objects to be selected at the same time via shift+click.
57
+ */
58
+ allowMultipleSelections?: boolean;
59
+ /**
60
+ * Defaults to true, meaning the canvas will pan automatically to track elements that have been dragged out of the visible area.
61
+ */
62
+ autoPan?: boolean;
63
+ /**
64
+ * Defaults to true, meaning the user can edit the diagram.
65
+ */
66
+ editable?: boolean;
67
+ edges?: {
68
+ /**
69
+ * Default anchor to use for both source and target of edges.
70
+ */
71
+ anchor?: AnchorSpec;
72
+ /**
73
+ * Anchors to use as source, target of edges. This will take precedence over `anchor`.
74
+ */
75
+ anchors?: [AnchorSpec, AnchorSpec];
76
+ /**
77
+ * Defaults to true - edges are editable when the user taps on them.
78
+ */
79
+ editable?: boolean;
80
+ /**
81
+ * Input method for edges. Defaults to drag.
82
+ */
83
+ inputMethod?: EdgeInputMethod;
84
+ /**
85
+ * Defaults to false. If true, edges will attempt to avoid vertices wherever possible.
86
+ */
87
+ avoidVertices?: boolean;
88
+ /**
89
+ * Mappings from property values to overlays, edge style etc.
90
+ */
91
+ propertyMappings?: EdgePropertyMappings;
92
+ /**
93
+ * Defaults to true - edges which are unattached at either or both of the source/target are allowed.
94
+ */
95
+ allowUnattached?: boolean;
96
+ /**
97
+ * Optional delete button.
98
+ */
99
+ deleteButton?: boolean | OverlayVisibility;
100
+ /**
101
+ * Location for an edge's delete button, if applicable. Defaults to 0.1. You can supply an array of locations if you want multiple buttons.
102
+ */
103
+ deleteButtonLocation?: number | Array<number>;
104
+ /**
105
+ * An optional function to invoke if the user presses the delete button on some edge. When this is present and the user clicks an edge delete button, instead of just deleting the edge, this function is invoked. It is passed the edge that is a candidate for deletion, and a function which you must invoke if you wish to proceed.
106
+ * @param e
107
+ * @param proceed
108
+ */
109
+ deleteConfirm?: EdgeDeleteConfirmationFunction;
110
+ /**
111
+ * Optional class name to set on the delete button. Defaults to "vjs-edge-delete".
112
+ */
113
+ deleteButtonClass?: string;
114
+ /**
115
+ * Optional overlay to place at the source of every edge. Location will be set to 0 and direction will be set to -1. This is a shorthand for declaring an overlay at location 0 in the overlays array.
116
+ */
117
+ sourceMarker?: OverlaySpec;
118
+ /**
119
+ * Optional overlay to place at the target of every edge. Location will be set to 1 and direction will be set to 1. This is a shorthand for declaring an overlay at location 1 in the overlays array.
120
+ */
121
+ targetMarker?: OverlaySpec;
122
+ /**
123
+ * Optional list of overlays to draw on every edge.
124
+ */
125
+ overlays?: Array<OverlaySpec>;
126
+ /**
127
+ * Optional connector spec to use as default for edges. Internally this is mapped to `defaults.connector`; we've exposed it here for convenience.
128
+ */
129
+ connector?: ConnectorSpec;
130
+ /**
131
+ * Whether or not to display labels on edges. Defaults to false. The value for an edge's label is sourced from the `label` field of the edge's data. You can change this via the `labelProperty` setting. The label is placed at location 0.5 by default. You can change that with either the `labelLocation` setting (to change every label), or the `labelLocationProperty` (to set location on a per-edge basis).
132
+ */
133
+ showLabels?: boolean;
134
+ /**
135
+ * Whether or not to reattach this connection automatically should it be detached via user intervention and then dropped onto whitespace.
136
+ */
137
+ reattach?: boolean;
138
+ /**
139
+ * Whether or not edges should be detachable via pointer/touch events by default. The default value for this is true.
140
+ */
141
+ detachable?: boolean;
142
+ /**
143
+ * The name of the property in an edge's data that provides the label for the edge. Defaults to `"label"`.
144
+ */
145
+ labelProperty?: string;
146
+ /**
147
+ * The location to place edge labels at. Defaults to 0.5; it is defined as a proportion of the length of the edge's path. This applies to all edges. You can set location on a per-edge basis via the `labelLocationProperty` setting.
148
+ */
149
+ labelLocation?: number;
150
+ /**
151
+ * The name of the property that indicates where some edge's label should be placed. Defaults to `"labelLocation"`. You can use this to set label location on a per-edge basis. If your edge does not have a property with this key then the `labelLocation` setting will be used.
152
+ */
153
+ labelLocationProperty?: string;
154
+ /**
155
+ * Optional font for edge labels.
156
+ */
157
+ labelFont?: FontSpec;
158
+ /**
159
+ * Optional map of event handlers for edges.
160
+ */
161
+ events?: EdgeEventOptions;
162
+ /**
163
+ * Options for edge snapping.
164
+ */
165
+ snap?: EdgeSnapOptions;
166
+ /**
167
+ * 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.
168
+ */
169
+ layerIndex?: number;
170
+ /**
171
+ * Defaults to true - when an edge is selected, it's bounding box will be highlighted.
172
+ */
173
+ highlightSelected?: boolean;
174
+ /**
175
+ * Styles for the edge highlight box.
176
+ */
177
+ highlightStyle?: PaintStyle;
178
+ };
179
+ /**
180
+ * Defaults to #FFFFFF
181
+ */
182
+ defaultFillColor?: string;
183
+ /**
184
+ * Defaults to #000000
185
+ */
186
+ defaultOutlineColor?: string;
187
+ /**
188
+ * Defaults to 2px
189
+ */
190
+ defaultOutlineWidth?: number;
191
+ /**
192
+ * Defaults to #000000
193
+ */
194
+ defaultColor?: string;
195
+ /**
196
+ * This method is invoked when a user begins to drag a new edge. It is given the vertex the drag is starting from, and any derived type for the edge being dragged. This method can be used for two purposes: firstly, if you return false, the drag will be aborted. Secondly, if you return a data object from this method, that object will be used as the edge's backing data. So a common usage is to use this method to set properties that will define an edge's initial appearance.
197
+ */
198
+ beforeStartConnect?: EdgeDataGenerator;
199
+ /**
200
+ * Definition of a function to use as a beforeConnect interceptor.
201
+ * @param source - The source vertex for the new edge
202
+ * @param target - The target vertex for the new edge
203
+ * @param userInstigated - If true, the new edge came from user activity, with a pointer device or touch input. This will be false whenever the edge is added programmatically, either during a data load or via the `addEdge` method of VisuallyJsModel.
204
+ */
205
+ beforeConnect?: BeforeConnectInterceptor;
206
+ /**
207
+ * Options for cells.
208
+ */
209
+ cells?: {
210
+ /**
211
+ * True by default. Set this to false to stop all forms of edit for cells - delete, rotate, resize, clone
212
+ */
213
+ editable?: boolean;
214
+ /**
215
+ * True by default - cells may be dragged.
216
+ */
217
+ draggable?: boolean;
218
+ /**
219
+ * True by default - cells may be deleted when selected.
220
+ */
221
+ deletable?: boolean;
222
+ /**
223
+ * True by default - cells may be cloned when selected.
224
+ */
225
+ clonable?: boolean;
226
+ /**
227
+ * True by default - cells may be linked to other cells via edge drag
228
+ */
229
+ linkable?: boolean;
230
+ /**
231
+ * The default width of a cell in this diagram. Defaults to 100 pixels.
232
+ */
233
+ defaultWidth?: number;
234
+ /**
235
+ * The default height of a cell in this diagram. Defaults to 80 pixels.
236
+ */
237
+ defaultHeight?: number;
238
+ /**
239
+ * Whether or not to show labels. Defaults to true.
240
+ */
241
+ showLabels?: boolean;
242
+ /**
243
+ * Stroke width to use for outline of svg shapes.
244
+ */
245
+ outlineWidth?: number;
246
+ /**
247
+ * Options for the magnetize functionality of the UI.
248
+ */
249
+ magnetizer?: MagnetizeOptions;
250
+ /**
251
+ * The property containing each cell's label. Defaults to 'label'
252
+ */
253
+ labelProperty?: string;
254
+ /**
255
+ * The property containing each cell's width. Defaults to 'width'
256
+ */
257
+ widthProperty?: string;
258
+ /**
259
+ * The property containing each cell's height. Defaults to 'height'
260
+ */
261
+ heightProperty?: string;
262
+ /**
263
+ * The property containing each cell's left position. Defaults to 'x'.
264
+ */
265
+ leftProperty?: string;
266
+ /**
267
+ * The property containing each cell's top position. Defaults to 'y'.
268
+ */
269
+ topProperty?: string;
270
+ /**
271
+ * The property containing each cell's rotation. Defaults to `rotation`
272
+ */
273
+ rotationProperty?: string;
274
+ /**
275
+ * Whether or not the user should be able to rotate cells in the diagram. Defaults to true. Ignored if editable is false.
276
+ */
277
+ rotatable?: boolean;
278
+ /**
279
+ * Optional number of stops to use when rotating cells. If not provided vertices can be rotated to any angle. If provided, the value is divided into 360 and the result is the angle between each stop. For example, a value of 12 means each stop is 30 degrees.
280
+ */
281
+ rotationStops?: number;
282
+ /**
283
+ * Whether or not the user should be able to resize cells in the diagram using mouse/pointer. Defaults to true. Ignored if editable is false.
284
+ */
285
+ resizable?: boolean;
286
+ /**
287
+ * 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.
288
+ */
289
+ multilineLabels?: boolean;
290
+ /**
291
+ * 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.
292
+ */
293
+ labelFillRatio?: number;
294
+ /**
295
+ * Default position for labels (will be overridden by a shape that defines its own position. Defaults to "center"
296
+ */
297
+ labelPosition?: LabelPosition;
298
+ /**
299
+ * Optional event mappings for all cells.
300
+ */
301
+ events?: NodeEventOptions<any>;
302
+ /**
303
+ * Optional behaviour mapping for groups in the diagram. For many setups, you won't need to use this, as the other options in the `cells` config are quite extensive and can be used to configure many things. For some setups you may need to provide config for group behaviour, such as whether or not vertices can be dragged in/out, whether the group should be resizable, etc. You can also provide group-specific event mappings here. Any `events` you provide here will be merged with the internal event registrations made by the diagram, but if you provide a `template` it will be ignored.
304
+ */
305
+ groups?: DiagramGroupMapping;
306
+ /**
307
+ * Optional function that can return the desired size for some group that is about to be collapsed. In certain diagrams it is useful to be able to decide what this should be at runtime.
308
+ * @param g
309
+ */
310
+ getCollapsedGroupSize?: (g: Group, currentSize: Size) => Size;
311
+ /**
312
+ * Optional mapping for nodes in the diagram. For many setups, you won't need to use this, as the other options in the `cells` config are quite extensive and can be used to configure many things. Any `events` you provide here will be merged with the internal event registrations made by the diagram, but if you provide a `template` it will be ignored.
313
+ */
314
+ nodes?: DiagramNodeMapping;
315
+ resize?: {
316
+ /**
317
+ * Width/height to use for resize handles. Defaults to 20 pixels.
318
+ */
319
+ handleSize?: number;
320
+ /**
321
+ * Shape of resize handles. Defaults to circle.
322
+ */
323
+ handleShape?: "rectangle" | "circle";
324
+ /**
325
+ * Method to use for resize - handles on the corners, or borders. Defaults to handles.
326
+ */
327
+ method?: ResizingToolsResizeMethod;
328
+ /**
329
+ * When method is "borders", set this to make the borders visible. Internally this just sets a CSS class on the draw skeleton's parent DOM element, and the appearance of the borders is then controlled via CSS.
330
+ */
331
+ bordersVisible?: boolean;
332
+ /**
333
+ * Optional function that can attach extra model updates when a resize occurs
334
+ */
335
+ modelUpdater?: ResizingToolsModelUpdater;
336
+ /**
337
+ * Optional factory that can return a resize handler for some given vertex. You can use this to override the default behaviour for any vertex you choose
338
+ */
339
+ handlerFactory?: ResizingToolsHandlerFactory;
340
+ /**
341
+ * Defaults to false, meaning size changes conform to an underlying grid, if present
342
+ */
343
+ ignoreGrid?: boolean;
344
+ /**
345
+ * Whether or not to support resize in the X axis. Defaults to true.
346
+ */
347
+ resizeX?: boolean;
348
+ /**
349
+ * Whether or not to support resize in the Y axis. Defaults to true.
350
+ */
351
+ resizeY?: boolean;
352
+ };
353
+ /**
354
+ * A function that you can provide to instruct the diagram whether or not, when removing a group via the diagram tools, to also remove its child members. You need to return boolean true from this method in order for group members to be deleted.
355
+ * @param v
356
+ * @param el
357
+ */
358
+ shouldDeleteGroupMembers?: (g: Group, el: BrowserElement) => boolean;
359
+ /**
360
+ * Optional spec for font size/style to apply to all shapes. Shapes that have their own font spec will override this.
361
+ */
362
+ font?: FontSpec;
363
+ };
364
+ /**
365
+ * Which shape sets to make available to this diagram.
366
+ */
367
+ shapes?: ShapeSet | Array<ShapeSet>;
368
+ /**
369
+ * Options for the behaviour of the mousewheel (which also covers two finger scrolling on a mac trackpad)
370
+ */
371
+ wheel?: WheelOptions;
372
+ /**
373
+ * Options to control how a user manages zoom on the canvas.
374
+ */
375
+ zoom?: ZoomOptions;
376
+ /**
377
+ * Options to control how a user pans the canvas.
378
+ */
379
+ pan?: PanOptions;
380
+ /**
381
+ * If true, zoom the display so that the dataset is entirely visible after initialisation.
382
+ */
383
+ zoomToFit?: boolean;
384
+ /**
385
+ * If true, zoom the display so that the dataset is entirely visible after initialisation, but only adjust the zoom level if the dataset is not already visible at the default zoom level.
386
+ */
387
+ zoomToFitIfNecessary?: boolean;
388
+ /**
389
+ * Options for a grid for the diagram.
390
+ */
391
+ grid?: DiagramGridOptions;
392
+ /**
393
+ * Defaults for connector/anchors etc
394
+ */
395
+ defaults?: UICoreDefaults<BrowserElement>;
396
+ /**
397
+ * Options for lasso, or just a boolean instructing the diagram to attach a lasso with default options, if true. If no value is set for this, the diagram will not have a lasso attached.
398
+ */
399
+ lasso?: boolean | LassoPluginOptions;
400
+ /**
401
+ * Defaults to true - select a shape/edge if the user taps on it. This is valid also when the diagram is read only.
402
+ */
403
+ selectShapeOnTap?: boolean;
404
+ /**
405
+ * Defaults to true - deselect any currently selected shapes when the user taps on canvas whitespace.
406
+ */
407
+ deselectOnCanvasTap?: boolean;
408
+ /**
409
+ * Options for a miniview
410
+ */
411
+ miniview?: MiniviewPluginOptions;
412
+ /**
413
+ * Defines an object that can decide at runtime whether a given shape should offer various actions in its shape editing tools. Defaults to null.
414
+ */
415
+ mediator?: DiagramActionMediator;
416
+ /**
417
+ * Options for drag groups.
418
+ */
419
+ dragGroups?: DragGroupsPluginOptions;
420
+ /**
421
+ * Controls whether snaplines are displayed, defaults to false. You can either supply a boolean and have the snaplines plugin initialize with its default settings, or supply your own settings.
422
+ */
423
+ snapLines?: boolean | SnaplinesPluginOptions;
424
+ /**
425
+ * Controls whether pan buttons are displayed at the edges of the canvas, defaults to false. You can either supply a boolean and have the panbuttons plugin initialize with its default settings, or supply your own settings.
426
+ */
427
+ panButtons?: boolean | PanButtonsPluginOptions;
428
+ }
429
+ /**
430
+ * Options for a palette for a diagram.
431
+ * @group Diagrams
432
+ * @category Options
433
+ */
434
+ export interface DiagramPaletteOptions {
435
+ /**
436
+ * Optional fill color to use for dragged elements. This should be in RGB format, _not_ a color like 'white' or 'cyan' etc.
437
+ */
438
+ fill?: string;
439
+ /**
440
+ * Optional color to use for outline of dragged elements. Should be in RGB format.
441
+ */
442
+ outline?: string;
443
+ /**
444
+ * Optional size to use for dragged elements.
445
+ */
446
+ dragSize?: Size;
447
+ /**
448
+ * Indicates that when one or more vertices are selected, clicking on an entry in the palette will change the type of the selected vertices to that type. Defaults to true.
449
+ */
450
+ inspector?: boolean;
451
+ /**
452
+ * Optional size to use for icons. Defaults to 150x100 pixels. If you provide this but not `dragSize` this size will also be used for an icon that is being dragged.
453
+ */
454
+ iconSize?: Size;
455
+ /**
456
+ * Optionally show each shape icon's label underneath it
457
+ */
458
+ showLabels?: boolean;
459
+ /**
460
+ * Stroke width to use for shapes in palette. Defaults to 1.
461
+ */
462
+ paletteStrokeWidth?: number;
463
+ /**
464
+ * Message to use for the 'show all' option in the shape set drop down when there is more than one set of shapes. Defaults to `Show all`.
465
+ */
466
+ showAllMessage?: string;
467
+ /**
468
+ * Callback to invoke when a new diagram cell has been added.
469
+ * @param dc
470
+ */
471
+ onCellAdded?: (dc: DiagramCell) => any;
472
+ /**
473
+ * Mode to operate in - 'drag' or 'tap'. Defaults to 'drag' (PALETTE_MODE_DRAG).
474
+ */
475
+ mode?: PaletteMode;
476
+ /**
477
+ * When in tap mode, allow addition of new vertices simply by clicking, instead of requiring a shape be drawn. (When this is true, the drawing method also still works)
478
+ */
479
+ allowClickToAdd?: boolean;
480
+ /**
481
+ * Defaults to true: when in 'tap' mode and a new group/node has been drawn on the canvas, the UI is set back to pan mode.
482
+ */
483
+ autoExitDrawMode?: boolean;
484
+ /**
485
+ * When true (which is the default), a newly dropped shape will be set as the underlying model's selection.
486
+ */
487
+ selectAfterAdd?: boolean;
488
+ /**
489
+ * Optional function that is invoked at the start of a drag, and which identifies allowed drop targets. Each target - the canvas, nodes and groups - is passed in turn to this method; returning false indicates that the given target is not valid for that drag.
490
+ * @param candidate
491
+ * @param target
492
+ * @param onCanvas
493
+ */
494
+ canDrop?: (candidate: Node | Group, target?: Node | Group, onCanvas?: boolean) => boolean;
495
+ /**
496
+ * Optional callback that will be invoked after a new vertex has been dropped and added to the dataset.
497
+ * @param v
498
+ */
499
+ onVertexAdded?: OnVertexAddedCallback;
500
+ /**
501
+ * Optional set of prepared shapes to show in the palette. When this is provided, the palette will only render these shapes, and not the contents of the shape library.
502
+ */
503
+ preparedShapes?: Array<PreparedShape>;
504
+ }
505
+ /**
506
+ * Save options for a Diagram
507
+ * @group Diagrams
508
+ * @category Options
509
+ */
510
+ export interface DiagramSaveOptions extends UIExportOptions {
511
+ }
512
+ /**
513
+ * Defines the format of the data returned from a Diagram save
514
+ * @group Diagrams
515
+ * @category IO
516
+ */
517
+ export interface DiagramSaveData extends SurfaceSaveData {
518
+ }
519
+ /**
520
+ * A group mapping in a Diagram. Intended for advanced use cases where you need fine-grained controls over groups, and the config options available in `cells` are not granular enough.
521
+ */
522
+ export interface DiagramGroupMapping extends Omit<GroupMapping<BrowserElement>, "template" | "ignore" | "templateId"> {
523
+ }
524
+ /**
525
+ * A node mapping in a Diagram. Intended for advanced use cases where you need fine-grained controls over nodes, and the config options available in `cells` are not granular enough.
526
+ */
527
+ export interface DiagramNodeMapping extends Omit<NodeMapping<BrowserElement>, "template" | "ignore" | "templateId"> {
528
+ }
@@ -0,0 +1,123 @@
1
+ import { Size, PointXY, Vertex, ObjectData } from "../../../core";
2
+ import { Diagram } from "./diagram";
3
+ import { BrowserElement } from "../../util";
4
+ /**
5
+ * A cell in a diagram, offering methods to set/get its position and size, and to update its backing data.
6
+ * @group Diagrams
7
+ */
8
+ export declare class DiagramCell {
9
+ private diagram;
10
+ vertex: Vertex;
11
+ /**
12
+ * The DOM element pertaining to the cell. Will be null until rendering
13
+ * has completed.
14
+ */
15
+ el: BrowserElement;
16
+ /**
17
+ * This is set when the cell has been destroyed, ie. the underlying
18
+ * cell was removed from the data model.
19
+ * @internal
20
+ */
21
+ $destroyed: boolean;
22
+ constructor(diagram: Diagram, vertex: Vertex);
23
+ /**
24
+ * Gets the cell's ID.
25
+ */
26
+ get id(): string;
27
+ /**
28
+ * Gets the cell's current z index.
29
+ */
30
+ get zIndex(): any;
31
+ /**
32
+ * Update the cell's backing data. If you want to change the position or size of the cell, use `setSize` or `setPosition` in preference to this.
33
+ * @param updates
34
+ */
35
+ update(updates: ObjectData): void;
36
+ /**
37
+ * Sets the size of the cell
38
+ * @param s The new size to set.
39
+ */
40
+ setSize(s: Size): void;
41
+ /**
42
+ * Sets the position of the cell
43
+ * @param p The new position to set.
44
+ */
45
+ setPosition(p: PointXY): void;
46
+ /**
47
+ * Sets the cell's label.
48
+ * @param label
49
+ */
50
+ setLabel(label: string): void;
51
+ /**
52
+ * Sets the cell's fill color.
53
+ * @param fill Color to set. Use a value in hex or rgb format, not a color name, if you want to export SVG or an image.
54
+ */
55
+ setFill(fill: string): void;
56
+ /**
57
+ * Sets the cell's outline color.
58
+ * @param outline Color to set. Use a value in hex or rgb format, not a color name, if you want to export SVG or an image.
59
+ */
60
+ setOutline(outline: string): void;
61
+ /**
62
+ * Sets the cell's outline stroke width.
63
+ * @param outlineWidth
64
+ */
65
+ setOutlineWidth(outlineWidth: number): void;
66
+ /**
67
+ * Sets the cell's label color
68
+ * @param color
69
+ */
70
+ setColor(color: string): void;
71
+ /**
72
+ * Gets the cell's label. May be null
73
+ */
74
+ get label(): string;
75
+ /**
76
+ * Gets the cell's fill color.
77
+ */
78
+ get fill(): string;
79
+ /**
80
+ * Gets the cell's outline color.
81
+ */
82
+ get outline(): string;
83
+ /**
84
+ * Gets the cell's outline width.
85
+ */
86
+ get outlineWidth(): number;
87
+ /**
88
+ * Gets the cell's text color
89
+ */
90
+ get color(): number;
91
+ /**
92
+ * Get the size of the cell.
93
+ */
94
+ get size(): Size;
95
+ /**
96
+ * Get the width of the cell.
97
+ */
98
+ get width(): number;
99
+ /**
100
+ * Get the height of the cell.
101
+ */
102
+ get height(): number;
103
+ /**
104
+ * Gets the cell's position relative to the canvas origin.
105
+ */
106
+ get position(): PointXY;
107
+ /**
108
+ * Removes the cell, and the model object it represents.
109
+ */
110
+ remove(): void;
111
+ /**
112
+ * @internal
113
+ */
114
+ destroy(): void;
115
+ /**
116
+ * Bring this cell to the front.
117
+ */
118
+ toFront(): void;
119
+ /**
120
+ * Send this cell to the back.
121
+ */
122
+ toBack(): void;
123
+ }