@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,297 @@
1
+ import { UICore } from "./core";
2
+ import { PointXY, Size, Extents, LineXY, RectangleXY, Group, Vertex, Node } from "../../core";
3
+ import { GroupMapping } from "./view";
4
+ import { GroupContentAreaInfo } from "./definitions";
5
+ import { Connection } from "./connector/connection-impl";
6
+ /**
7
+ * Definition of some element's location and rotation in the viewport.
8
+ * @internal
9
+ */
10
+ export interface ElementPosition extends PointXY {
11
+ width: number;
12
+ height: number;
13
+ r: number;
14
+ c: PointXY;
15
+ dirty: boolean;
16
+ ro: PointXY;
17
+ }
18
+ /**
19
+ * @internal
20
+ */
21
+ export interface ElementBase extends ElementPosition {
22
+ x2: number;
23
+ y2: number;
24
+ id: string;
25
+ }
26
+ /**
27
+ * @internal
28
+ */
29
+ export interface ViewportElement<E> extends ElementBase {
30
+ t: TranslatedViewportElement<E>;
31
+ el: E;
32
+ modelObject: Vertex;
33
+ timestamp?: string;
34
+ connections?: Array<Connection<E>>;
35
+ visible?: boolean;
36
+ }
37
+ export interface ViewportNodeElement<E> extends ViewportElement<E> {
38
+ modelObject: Node;
39
+ }
40
+ /**
41
+ * An element that tracks a Group
42
+ * @internal
43
+ */
44
+ export interface ViewportGroupElement<E> extends ViewportElement<E>, GroupMapping<E> {
45
+ collapsed: boolean;
46
+ proxied: boolean;
47
+ enabled: boolean;
48
+ contentArea: E;
49
+ contentAreaOffset: PointXY;
50
+ lastExpandedSize?: Size;
51
+ modelObject: Group;
52
+ }
53
+ /**
54
+ * @internal
55
+ */
56
+ export interface TranslatedViewportElementBase<E> extends ElementBase {
57
+ cr: number;
58
+ sr: number;
59
+ }
60
+ /**
61
+ * @internal
62
+ */
63
+ export type TranslatedViewportElement<E> = Omit<TranslatedViewportElementBase<E>, "dirty">;
64
+ /**
65
+ * @internal
66
+ * @constructor
67
+ */
68
+ export declare function EMPTY_ELEMENT<E>(id: string): ViewportElement<E>;
69
+ type SortedElement = {
70
+ id: string;
71
+ value: number;
72
+ otherBound: number;
73
+ };
74
+ /**
75
+ * Models the positions of the elements a given instance is tracking. Users of the API should not need to interact directly
76
+ * with a Viewport.
77
+ * @internal
78
+ */
79
+ export declare class Viewport<EL> {
80
+ instance: UICore<EL, any>;
81
+ private getRenderedElement;
82
+ private _currentTransaction;
83
+ private rtree;
84
+ private _suspended;
85
+ private _boundsDirty;
86
+ constructor(instance: UICore<EL, any>, getRenderedElement: (id: string) => EL);
87
+ setSuspended(val: boolean): void;
88
+ /**
89
+ * @deprecated Use RectangleXY in future
90
+ */
91
+ getExtents(): Extents;
92
+ _sortedElements: Record<string, Array<SortedElement>>;
93
+ private _elementMap;
94
+ _transformedElementMap: Record<string, TranslatedViewportElement<EL>>;
95
+ _bounds: Extents;
96
+ private _updateBounds;
97
+ private _recalculateBounds;
98
+ recomputeBounds(): void;
99
+ /**
100
+ * Find all - or just one - viewport element(s) that cover the given point, optionally with a margin around each element.
101
+ * @param x X location to test
102
+ * @param y Y location to test
103
+ * @param margin Optional margin. Provide this if you want to avoid each vertex by some amount.
104
+ * @param greedy If true, the method will exit as soon as it finds one match. In some cases we want to know all the matches and in others we dont.
105
+ * @param ignoreIds
106
+ * @internal
107
+ */
108
+ findVerticesAtPoint(x: number, y: number, margin?: number, greedy?: boolean, ignoreIds?: Array<string>): Array<ViewportElement<any>>;
109
+ /**
110
+ * Returns vertices that intersect the given rectangle, optionally ignoring a set of vertex IDs when performing the calculation. This is used by the astar router and also the lasso.
111
+ * @param rect Rectangle to test
112
+ * @param margin optional margin to add around each vertex when testing for intersection.
113
+ * @param greedy When true, return from the method as soon as a single intersecting vertex is found.
114
+ * @param ignoreIds Optional list of vertex IDs to exclude from the test.
115
+ * @param ignoreBoundaryMatch If true, the rtree search will exclude hits where the search rectangle and the hit only share a boundary.
116
+ * @internal
117
+ */
118
+ findVerticesIntersectingWithRect(rect: RectangleXY, margin: number, greedy: boolean, ignoreIds: Array<string>, ignoreBoundaryMatch: boolean): Array<ViewportElement<any>>;
119
+ /**
120
+ * Returns vertices that are enclosed by the given rectangle, optionally ignoring a set of vertex IDs when performing the calculation.
121
+ * @param rect Rectangle to test
122
+ * @param margin optional margin to add around each vertex when testing for intersection.
123
+ * @param greedy When true, return from the method as soon as a single intersecting vertex is found.
124
+ * @param ignoreIds Optional list of vertex IDs to exclude from the test.
125
+ * @param ignoreBoundaryMatch If true, the rtree search will exclude hits where the search rectangle and the hit only share a boundary.
126
+ * @internal
127
+ */
128
+ findVerticesEnclosedByRect(rect: RectangleXY, margin: number, greedy: boolean, ignoreIds: Array<string>, ignoreBoundaryMatch: boolean): Array<ViewportElement<any>>;
129
+ /**
130
+ * Returns whether or not there are vertices that intersect the given rectangle, optionally ignoring a set of vertex IDs when performing the calculation. This is used by the astar router.
131
+ * @param rect Rectangle to test
132
+ * @param margin optional margin to add around each vertex when testing for intersection.
133
+ * @param ignoreIds Optional list of vertex IDs to exclude from the test.
134
+ * @param ignoreBoundaryMatch If true, the rtree search will exclude hits where the search rectangle and the hit only share a boundary.
135
+ * @internal
136
+ */
137
+ hasVerticesIntersectingWithRect(rect: RectangleXY, margin: number, ignoreIds: Array<string>, ignoreBoundaryMatch: boolean): boolean;
138
+ /**
139
+ * @internal
140
+ * @param l
141
+ * @param margin
142
+ * @param ignoreIds
143
+ */
144
+ hasLineOfSight(l: LineXY, margin: number, ignoreIds?: Array<string>): boolean;
145
+ private _finaliseUpdate;
146
+ /**
147
+ * Updates the element with the given id. Any of the provided values may be null, in which case they are ignored (we never overwrite an existing value with null).
148
+ * @param id
149
+ * @param x
150
+ * @param y
151
+ * @param width
152
+ * @param height
153
+ * @param rotation
154
+ * @param modelObject
155
+ * @param doNotRecalculateBounds Defaults to false. For internal use. If true, does not update viewport bounds after updating the element.
156
+ */
157
+ updateElement(id: string, x: number, y: number, width: number, height: number, rotation: number, modelObject: Vertex, doNotRecalculateBounds: boolean): ViewportElement<EL>;
158
+ $forEachElement(cb: (e: ViewportElement<any>) => any): void;
159
+ $refreshEveryElement(): void;
160
+ $refreshElement(elId: string, doNotRecalculateBounds?: boolean, pos?: PointXY, size?: Size, rotation?: number): ViewportElement<EL>;
161
+ /**
162
+ * Sets the rotation of the element with the given id, recalculating bounds afterwards.
163
+ * @param id
164
+ * @param rotation
165
+ * @internal
166
+ */
167
+ _setElementRotation(id: string, rotation: number): ViewportElement<EL>;
168
+ /**
169
+ * Gets the width of the content managed by the viewport, taking any rotated elements into account.
170
+ */
171
+ getBoundsWidth(): number;
172
+ /**
173
+ * Gets the height of the content managed by the viewport, taking any rotated elements into account.
174
+ */
175
+ getBoundsHeight(): number;
176
+ /**
177
+ * Gets the leftmost point of the content managed by the viewport, taking any rotated elements into account.
178
+ */
179
+ getX(): number;
180
+ /**
181
+ * Gets the topmost of the content managed by the viewport, taking any rotated elements into account.
182
+ */
183
+ getY(): number;
184
+ /**
185
+ * Sets the size of the element with the given ID, recalculating bounds.
186
+ * @param id
187
+ * @param w
188
+ * @param h
189
+ */
190
+ setSize(id: string, w: number, h: number): ViewportElement<EL>;
191
+ /**
192
+ * Sets the [x,y] position of the element with the given ID, recalculating bounds.
193
+ * @param id
194
+ * @param x
195
+ * @param y
196
+ * @internal
197
+ */
198
+ $_updatePosition(id: string, x: number, y: number): ViewportElement<EL>;
199
+ /**
200
+ * Sets the size position of the element with the given ID, recalculating bounds.
201
+ * @param id
202
+ * @param width
203
+ * @param height
204
+ * @internal
205
+ */
206
+ $_updateSize(id: string, width: number, height: number): ViewportElement<EL>;
207
+ /**
208
+ * Clears the internal state of the viewport, removing all elements.
209
+ */
210
+ reset(): void;
211
+ /**
212
+ * Remove the element with the given ID from the viewport.
213
+ * @param id
214
+ */
215
+ remove(id: string): void;
216
+ /**
217
+ * Compute the extents of all the child members of the given group
218
+ * @param trackedGroup
219
+ * @param relativeToCanvasOrigin Defaults to false, meaning the extents are calculated wrt to the group's origin, which is good for when you want to find the size of the group's children. Setting this to true will give you an answer in canvas coordinates.
220
+ * @param knownPositions
221
+ * @param knownSizes
222
+ * @param contentAreaInfo
223
+ * @internal
224
+ */
225
+ $computeGroupContentExtents(trackedGroup: Group, relativeToCanvasOrigin: boolean, knownPositions: Record<string, PointXY>, knownSizes: Record<string, Size>, contentAreaInfo: GroupContentAreaInfo<EL>): Extents;
226
+ /**
227
+ * For the given element ids, compute the extents
228
+ * @param elementIds
229
+ * @param originX
230
+ * @param originY
231
+ * @param knownPositions Optional map of positions already known.
232
+ * @param knownSizes Optional map of sizes already known.
233
+ * @internal
234
+ */
235
+ $computeExtentsForElementIds(elementIds: Array<string>, originX: number, originY: number, knownPositions: Record<string, PointXY>, knownSizes: Record<string, Size>): Extents;
236
+ /**
237
+ * Clear and bulk-load the rtree
238
+ * @internal
239
+ */
240
+ private _repopulateRTree;
241
+ /**
242
+ * Gets the position of the element. This returns both the original position, and also the translated position of the element. Certain internal methods, such as the anchor calculation code, use the unrotated position and then subsequently apply the element's rotation to any calculated positions. Other parts of the codebase - the magnetizer or pan/zoom widget, for instance - are interested in the rotated position.
243
+ * @param id
244
+ */
245
+ getPosition(id: string): ViewportElement<EL>;
246
+ /**
247
+ * Get all elements managed by the Viewport.
248
+ */
249
+ getElements(): Record<string, ViewportElement<EL>>;
250
+ /**
251
+ * Returns whether or not the viewport is empty.
252
+ */
253
+ isEmpty(): boolean;
254
+ /**
255
+ * Gets the position of the element. This returns both the original position, and also the translated position of the element. Certain internal methods, such as the anchor calculation code, use the unrotated position and then subsequently apply the element's rotation to any calculated positions. Other parts of the codebase - the Toolkit's magnetizer or pan/zoom widget, for instance - are interested in the rotated position. If the element is marked 'dirty' it is first refreshed.
256
+ * @param id
257
+ */
258
+ getElement(id: string): ViewportElement<EL>;
259
+ /**
260
+ * gets the element's position in the viewport, null if not found.
261
+ * @param id
262
+ */
263
+ getElementPosition(id: string): PointXY;
264
+ /**
265
+ * gets the element's size in the viewport, null if not found.
266
+ * @param id
267
+ */
268
+ getElementSize(id: string): Size;
269
+ /**
270
+ * gets the element's position+size in the viewport, null if not found.
271
+ * @param id
272
+ */
273
+ getElementBounds(id: string): RectangleXY;
274
+ /**
275
+ * Convenience method for casting the return value of getElement to a tracked group element.
276
+ * @param id
277
+ * @internal
278
+ */
279
+ getGroupElement(id: string): ViewportGroupElement<EL>;
280
+ /**
281
+ * Convenience method for casting the return value of getElement to a tracked node element.
282
+ * @param id
283
+ * @internal
284
+ */
285
+ getNodeElement(id: string): ViewportNodeElement<EL>;
286
+ /**
287
+ * Adds a new element to the viewport. If the model object is a group, we find the content area and its offset, as well as setting a few group flags.
288
+ * @param elId
289
+ * @param el
290
+ * @param modelObject
291
+ * @param position
292
+ * @param size
293
+ * @param rotation
294
+ */
295
+ addElement(elId: string, el: EL, modelObject: Vertex, position: PointXY, size: Size, rotation: number): ViewportElement<any>;
296
+ }
297
+ export {};
@@ -0,0 +1,9 @@
1
+ export * from './copy-paste';
2
+ export * from './common';
3
+ export * from './connector-bezier';
4
+ export * from './connector-orthogonal';
5
+ export * from './connector-straight';
6
+ export * from './core';
7
+ export * from './plugins';
8
+ export * from './property-mappings';
9
+ export * from './util';
@@ -0,0 +1,118 @@
1
+ import { Connection, GroupResizeResult, UICore, ViewportElement, ViewportGroupElement } from "../core";
2
+ import { Vertex, Size, VertexUpdatedReason, Edge } from "../../core";
3
+ /**
4
+ * Placeholder interface for plugin options.
5
+ * @group Plugins
6
+ * @category Definitions
7
+ */
8
+ export interface UIPluginOptions {
9
+ }
10
+ /**
11
+ * A plugin for the UI. You don't need to worry about this class unless you're planning on writing your own plugin.
12
+ * @advanced
13
+ * @group Plugins
14
+ */
15
+ export interface UIPlugin<EL, O extends UIPluginOptions, U extends UICore<EL, any>> {
16
+ id: string;
17
+ initialise(ui: U, options: O): boolean;
18
+ destroy(): void;
19
+ reset(): void;
20
+ /**
21
+ * Invoked when a group member has been removed
22
+ * @param element
23
+ */
24
+ $groupMemberRemoved: (element: ViewportElement<EL>) => any;
25
+ /**
26
+ * Invoked when a group member has been added
27
+ * @param element
28
+ */
29
+ $groupMemberAdded: (element: ViewportElement<EL>) => any;
30
+ /**
31
+ * Invoked when a group has been resized
32
+ * @param element
33
+ */
34
+ $groupResized: (params: GroupResizeResult<EL>) => any;
35
+ /**
36
+ * Invoked when a group has been collapsed
37
+ * @param element
38
+ */
39
+ $groupCollapsed: (element: ViewportGroupElement<EL>) => any;
40
+ /**
41
+ * Invoked when a group has been expanded
42
+ * @param element
43
+ */
44
+ $groupExpanded: (element: ViewportGroupElement<EL>) => any;
45
+ /**
46
+ * Invoked when a node has been removed
47
+ * @param element
48
+ */
49
+ $nodeRemoved: (element: ViewportElement<EL>) => void;
50
+ /**
51
+ * Invoked when a group has been removed
52
+ * @param element
53
+ */
54
+ $groupRemoved: (element: ViewportGroupElement<EL>) => void;
55
+ /**
56
+ * Invoked when an edge has been removed
57
+ * @param element
58
+ */
59
+ $edgeRemoved: (edge: Edge, connection: Connection<EL>) => void;
60
+ /**
61
+ * Invoked when an edge has been updated
62
+ * @param element
63
+ */
64
+ $edgeUpdated: (edge: Edge, connection: Connection<EL>) => void;
65
+ /**
66
+ * Invoked when a vertex has been resized
67
+ * @param element
68
+ */
69
+ $vertexRotated: (element: ViewportElement<EL>, rotationInDegrees: number) => void;
70
+ /**
71
+ * Invoked when a vertex has been rotated
72
+ * @param element
73
+ */
74
+ $vertexResized: (element: ViewportElement<EL>, width: number, height: number) => void;
75
+ /**
76
+ * Invoked when a vertex has been re-rendered (its type was changed and it was rerendered, which may have resulted in a different appearance)
77
+ * @param element
78
+ */
79
+ $vertexRerendered: (p: {
80
+ el: EL;
81
+ id: string;
82
+ vertex: Vertex;
83
+ size: Size;
84
+ }) => void;
85
+ /**
86
+ * Invoked when a vertex has been updated
87
+ * @param element
88
+ */
89
+ $vertexUpdated: (element: ViewportElement<EL>, reason: VertexUpdatedReason) => void;
90
+ /**
91
+ * Invoked when an element has been synced with the view and a repaint was requested.
92
+ * @param element
93
+ */
94
+ $vertexSynced: (element: ViewportElement<EL>) => void;
95
+ }
96
+ /**
97
+ * A full surface plugin spec - name and options.
98
+ * @group Plugins
99
+ * @category Definitions
100
+ * @typeParam O The options type for the specific plugin.
101
+ */
102
+ export type FullPluginSpec<O extends UIPluginOptions> = {
103
+ /**
104
+ * Plugin type
105
+ */
106
+ type: string;
107
+ /**
108
+ * Options for the plugin
109
+ */
110
+ options: O;
111
+ };
112
+ /**
113
+ * A UI plugin spec - either just its name, or its name and options
114
+ * @group Plugins
115
+ * @category Definitions
116
+ * @typeParam O The options type for the specific plugin.
117
+ */
118
+ export type UIPluginSpec<O extends UIPluginOptions> = string | FullPluginSpec<O>;
@@ -0,0 +1,2 @@
1
+ export * from "./definitions";
2
+ export * from "./plugins";
@@ -0,0 +1,7 @@
1
+ import { UIPlugin } from "./definitions";
2
+ import { Constructable } from "../../core";
3
+ export declare const UIPlugins: {
4
+ get: <P extends UIPlugin<any, any, any> = UIPlugin<any, any, any>>(name: string) => P;
5
+ register: <P extends UIPlugin<any, any, any> = UIPlugin<any, any, any>>(name: string, sp: Constructable<P>) => void;
6
+ };
7
+ export declare function registerPlugin(pluginName: string): (constructor: Constructable<any>) => void;
@@ -0,0 +1,28 @@
1
+ import { EdgeMapping } from "../core";
2
+ /**
3
+ * A mapping of some property/properties to a set of appearance values. Currently only used by edges.
4
+ * @typeParam D Identifies the type that each mapping has. For instance, for {@link EdgePropertyMappings}, this type is {@link EdgeDefinition}.
5
+ */
6
+ export interface PropertyMapping<D> {
7
+ /**
8
+ * Property or properties to map. If an array is provided, values are matched against all properties in the order given.
9
+ */
10
+ property: string | Array<string>;
11
+ /**
12
+ * A map whose keys are expected values for the given property (or a space-separated string of values if an array of properties was provided), and the values are the type to apply.
13
+ */
14
+ mappings: Record<string, D>;
15
+ }
16
+ /**
17
+ * A set of property mappings for edges.
18
+ */
19
+ export type EdgePropertyMappings = Array<PropertyMapping<EdgeMapping>>;
20
+ /**
21
+ * A set of {@link PropertyMapping}s - currently only edges are supported, but future versions will support nodes, groups and ports
22
+ */
23
+ export interface PropertyMappings {
24
+ /**
25
+ * Edge property mappings.
26
+ */
27
+ edgeMappings: EdgePropertyMappings;
28
+ }
@@ -0,0 +1,2 @@
1
+ export * from './definitions';
2
+ export * from './property-mapper';
@@ -0,0 +1,16 @@
1
+ import { EdgePropertyMappings, PropertyMappings } from "./definitions";
2
+ import { ObjectData } from "../../core";
3
+ import { UICore } from "../core";
4
+ export declare class PropertyMapper {
5
+ private surface;
6
+ private _$_edgeMappings;
7
+ private _$_originalEdgeTypeFunction;
8
+ constructor(surface: UICore<any>, mappings: PropertyMappings);
9
+ computeTypes(o: ObjectData): string;
10
+ private _$_init;
11
+ /**
12
+ * Gets the list of edge property mappings
13
+ * @internal
14
+ */
15
+ getPropertyMappings(): EdgePropertyMappings;
16
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./util";
2
+ export * from './svg-constants';
3
+ export * from './property-tracker';
@@ -0,0 +1,8 @@
1
+ import { ObjectData, VisuallyJsModel } from "../../core";
2
+ export declare class PropertyTracker {
3
+ $properties: Array<string>;
4
+ $values: ObjectData;
5
+ constructor(model: VisuallyJsModel, initialValues: ObjectData);
6
+ getValue(key: string, defaultValue?: any): any;
7
+ getValues(): ObjectData;
8
+ }
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const FILL = "fill";
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare const STROKE = "stroke";
9
+ /**
10
+ * @internal
11
+ */
12
+ export declare const STROKE_WIDTH = "stroke-width";
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare const LINE_WIDTH = "strokeWidth";
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare const ELEMENT_SVG = "svg";
21
+ /**
22
+ * @internal
23
+ */
24
+ export declare const ELEMENT_DEFS = "defs";
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare const ELEMENT_PATH = "path";
29
+ /**
30
+ * @internal
31
+ */
32
+ export declare const ELEMENT_CIRCLE = "circle";
33
+ /**
34
+ * @internal
35
+ */
36
+ export declare const ELEMENT_ELLIPSE = "ellipse";
37
+ /**
38
+ * @internal
39
+ */
40
+ export declare const ELEMENT_TEXT = "text";
41
+ /**
42
+ * @internal
43
+ */
44
+ export declare const ELEMENT_TSPAN = "tspan";
45
+ /**
46
+ * @internal
47
+ */
48
+ export declare const ELEMENT_RECT = "rect";
49
+ /**
50
+ * @internal
51
+ */
52
+ export declare const ELEMENT_G = "g";
53
+ /**
54
+ * @internal
55
+ */
56
+ export declare const ATTRIBUTE_VERSION = "version";
57
+ /**
58
+ * @internal
59
+ */
60
+ export declare const ATTRIBUTE_XMLNS = "xmlns";
61
+ /**
62
+ * @internal
63
+ */
64
+ export declare const ATTRIBUTE_FILL = "fill";
65
+ /**
66
+ * @internal
67
+ */
68
+ export declare const ATTRIBUTE_STROKE_DASHARRAY = "stroke-dasharray";
69
+ /**
70
+ * @internal
71
+ */
72
+ export declare const ATTRIBUTE_STROKE_LINEJOIN = "stroke-linejoin";
73
+ /**
74
+ * @internal
75
+ */
76
+ export declare const ATTRIBUTE_STROKE_LINECAP = "stroke-linecap";
77
+ /**
78
+ * @internal
79
+ */
80
+ export declare const ATTRIBUTE_STROKE_MITERLIMIT = "stroke-miterlimit";
81
+ /**
82
+ * @internal
83
+ */
84
+ export declare const ATTRIBUTE_STROKE_DASHOFFSET = "stroke-dashoffset";
85
+ /**
86
+ * @internal
87
+ */
88
+ export declare const ATTRIBUTE_STROKE_OPACITY = "stroke-opacity";
89
+ /**
90
+ * @internal
91
+ */
92
+ export declare const ATTRIBUTE_STROKE = "stroke";
93
+ /**
94
+ * @internal
95
+ */
96
+ export declare const ATTRIBUTE_STROKE_WIDTH = "stroke-width";
97
+ /**
98
+ * @internal
99
+ */
100
+ export declare const ATTRIBUTE_VECTOR_EFFECT = "vector-effect";
101
+ /**
102
+ * @internal
103
+ */
104
+ export declare const ATTRIBUTE_VALUE_NON_SCALING_STROKE = "non-scaling-stroke";
105
+ /**
106
+ * @internal
107
+ */
108
+ export declare const ATTRIBUTE_TEXT_ANCHOR = "text-anchor";
109
+ export declare const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
110
+ export declare const XLINK_NAMESPACE = "http://www.w3.org/1999/xlink";
111
+ export declare const XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Internal method used to filter lists, supporting wildcards.
3
+ * @param list
4
+ * @param value
5
+ * @param missingIsFalse
6
+ * @internal
7
+ */
8
+ import { PointXY, Size } from "../../core";
9
+ export declare function filterList(list: Array<any> | string, value: any, missingIsFalse?: boolean): boolean;
10
+ /**
11
+ * Equivalent of Object.assign, which IE11 does not support.
12
+ * @param o1
13
+ * @param o2
14
+ * @param keys Optional list of keys to use to copy values from `o2` to `o1`. If this is not provided, all values are copied.
15
+ * @internal
16
+ */
17
+ export declare function extend<T>(o1: T, o2: T, keys?: string[]): T;
18
+ /**
19
+ * Extension of PointXY used internally to track extra information about the rotation.
20
+ * @internal
21
+ */
22
+ export interface RotatedPointXY extends PointXY {
23
+ cr: number;
24
+ sr: number;
25
+ }
26
+ /**
27
+ * Internal method used to rotate an anchor orientation.
28
+ * @param orientation
29
+ * @param rotation
30
+ * @internal
31
+ */
32
+ export declare function rotateAnchorOrientation(orientation: [number, number], rotation: any): [number, number];
33
+ /**
34
+ * Iterates through the given `obj` and applies the given function. if `obj` is not ArrayLike then the function is
35
+ * executed directly on `obj`.
36
+ * @param obj
37
+ * @param fn
38
+ * @internal
39
+ */
40
+ export declare function each(obj: any, fn: Function): void;
41
+ /**
42
+ * Wraps one function with another, creating a placeholder for the wrapped function if it was null. This is used to wrap the various drag/drop event functions - to allow VisuallyJs to be notified of important lifecycle events without imposing itself on the user's drag/drop functionality.
43
+ * @param wrappedFunction - original function to wrap; may be null.
44
+ * @param newFunction - function to wrap the original with.
45
+ * @param returnOnThisValue - Optional. Indicates that the wrappedFunction should not be executed if the newFunction returns a value matching 'returnOnThisValue'. note that this is a simple comparison and only works for primitives right now.
46
+ * @internal
47
+ */
48
+ export declare function wrap(wrappedFunction: Function, newFunction: Function, returnOnThisValue?: any): () => any;
49
+ /**
50
+ * A copy of a concept from a later version of Typescript than jsPlumb can currently use.
51
+ * @internal
52
+ */
53
+ /**
54
+ * Defines a function that can be used to sort an array.
55
+ * @internal
56
+ */
57
+ export type SortFunction<T> = (a: T, b: T) => number;
58
+ /**
59
+ * Definition of a function that can be used to constrain the movement of an element that is being dragged. The function is
60
+ * given the "desiredLoc", which is the location the element would be moved to if not constrained, and it is expected to return
61
+ * either some other value, meaning place the element at that position, or null, meaning for the given desired location there
62
+ * is no preferred position and the element should not be moved.
63
+ *
64
+ * @param desiredLoc - Position the element will be placed at if unconstrained
65
+ * @param dragEl - the element that is being dragged
66
+ * @param size - The size of the element being dragged
67
+ * @param e - The event associated with this tick of the drag lifecycle.
68
+ */
69
+ export type ConstrainFunction<EL, E> = (desiredLoc: PointXY, dragEl: EL, constrainRect: Size, size: Size, currentPos: PointXY, e: E) => PointXY;
@@ -0,0 +1 @@
1
+ export declare const VERSION = "1.0.0";