@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,661 @@
1
+ import { RotatedPointXY } from "../ui";
2
+ import { Group, Node } from "./model/graph";
3
+ import { AnchorOrientationHint } from "./model/anchor";
4
+ /**
5
+ * Determines whether or not logging is currently enabled.
6
+ * @internal
7
+ */
8
+ export declare const logEnabled: boolean;
9
+ /**
10
+ * Logs a console message.
11
+ * @param args
12
+ * @internal
13
+ */
14
+ export declare function log(...args: string[]): void;
15
+ /**
16
+ * Defines an object that has a constructor. Used internally to create endpoints/connectors/overlays from their names. Exposed as public for people to create their own endpoints/connectors/overlays.
17
+ * @internal
18
+ */
19
+ export type Constructable<T> = {
20
+ new (...args: any[]): T;
21
+ };
22
+ /**
23
+ * Returns true if the given `object` can be considered to be an instance of the class `cls`. This is done by
24
+ * testing the prototype chain of the object and checking at each level to see if the prototype is an instance of the given class.
25
+ * @param object Object to test
26
+ * @param cls Class to test for.
27
+ * @internal
28
+ */
29
+ export declare function isAssignableFrom(object: any, cls: any): boolean;
30
+ /**
31
+ * Remove an item from an array
32
+ * @param l Array to remove the item from
33
+ * @param v Item to remove.
34
+ * @returns true if the item was removed, false otherwise.
35
+ * @internal
36
+ */
37
+ export declare function remove<T>(l: Array<T>, v: T): boolean;
38
+ /**
39
+ * Adds an item to a list if the given hash function determines that the item is not already in the list
40
+ * @param list List to add to
41
+ * @param item Item to add
42
+ * @param hashFunction Function to use to check the current items of the list; if this function returns true for any current list item, the insertion does not proceed.
43
+ * @internal
44
+ */
45
+ export declare function addWithFunction<T>(list: Array<T>, item: T, hashFunction: (_a: T) => boolean): void;
46
+ /**
47
+ * Adds an item to a dictionary whose values consists of array of some type. This method is used internally by VisuallyJs and is not intended as part of the public API,
48
+ * and will likely be removed at some point in the future when the code that depends upon it has been refactored.
49
+ * @param map
50
+ * @param key
51
+ * @param value
52
+ * @param insertAtStart
53
+ * @internal
54
+ */
55
+ export declare function addToDictionary<T>(map: Record<string, Array<T>>, key: string, value: any, insertAtStart?: boolean): Array<any>;
56
+ /**
57
+ * Add an item to a list that is stored inside some map. This method is used internally.
58
+ * @param map A map of <K, Array<T>> entries.
59
+ * @param key The ID of the list to search for in the map
60
+ * @param value The value to add to the list, if found
61
+ * @param insertAtStart If true, inserts the new item at the head of the list. Defaults to false.
62
+ * @internal
63
+ */
64
+ export declare function addToList<T, K = string>(map: Map<K, Array<T>>, key: K, value: any, insertAtStart?: boolean): Array<any>;
65
+ /**
66
+ * Add the given item to the given list if it does not exist on the list already.
67
+ * @param list - List to add to
68
+ * @param item - Item to add
69
+ * @param insertAtHead - If true, insert new item at head. Defaults to false.
70
+ * @internal
71
+ */
72
+ export declare function suggest(list: Array<any>, item: any, insertAtHead?: boolean): boolean;
73
+ /**
74
+ * Extract a value from the set where the given predicate returns true for that value.
75
+ * @param s
76
+ * @param f
77
+ * @internal
78
+ */
79
+ export declare function getFromSetWithFunction<T>(s: Set<T>, f: (_a: T) => boolean): T;
80
+ /**
81
+ * Remove the entry from the array for which the function `f` returns true.
82
+ * @param a
83
+ * @param f
84
+ * @returns true if an element was removed, false if not.
85
+ * @internal
86
+ */
87
+ export declare function removeWithFunction<T>(a: Array<T>, f: (_a: T) => boolean): boolean;
88
+ /**
89
+ * Rotate the given point around the given center, by the given rotation (in degrees)
90
+ * @param point
91
+ * @param center
92
+ * @param rotation Rotation in degrees
93
+ * @returns An object consisting of the rotated point, followed by cos theta and sin theta.
94
+ * @internal
95
+ */
96
+ export declare function rotatePoint(point: PointXY, center: PointXY, rotation: number): RotatedPointXY;
97
+ /**
98
+ * Trims whitespace from the given string.
99
+ * @param s String to trim
100
+ * @group Utils
101
+ */
102
+ export declare function fastTrim(s: string): string;
103
+ /**
104
+ * Inserts the given value into the given array at a sorted location.
105
+ * @param value Value to insert
106
+ * @param array Array to insert into
107
+ * @param comparator Function to use when determining sort order.
108
+ * @param sortDescending Defaults to false; if true, the insertion is sorted in reverse order.
109
+ * @internal
110
+ */
111
+ export declare function insertSorted<T>(value: T, array: Array<T>, comparator: (v1: T, v2: T) => number, sortDescending?: boolean): void;
112
+ /**
113
+ * Definition of the extends of some set of elements: the min/max values in each axis.
114
+ * @internal
115
+ */
116
+ export interface Extents {
117
+ /** Minimum in x axis */
118
+ xmin: number;
119
+ /** Minimum in y axis */
120
+ ymin: number;
121
+ /** Maximum in x axis */
122
+ xmax: number;
123
+ /** Maximum in y axis */
124
+ ymax: number;
125
+ }
126
+ /**
127
+ * Returns an empty bounds object, used in certain initializers internally.
128
+ * @internal
129
+ */
130
+ export declare function EMPTY_BOUNDS(): Extents;
131
+ /**
132
+ * Defines an x/y location.
133
+ * @group Data Model
134
+ */
135
+ export interface PointXY {
136
+ /**
137
+ * X location
138
+ */
139
+ x: number;
140
+ /**
141
+ * Y location
142
+ */
143
+ y: number;
144
+ }
145
+ /**
146
+ * Extracts just the x,y properties from the given input value, which may be some other type that just happens to implement PointXY. We use this internally when one of our reference objects contains the values we need, but we want to ensure we have a copy in some local scope, in case we change its values.
147
+ * @param p
148
+ * @internal
149
+ */
150
+ export declare function extractPoint(p: PointXY): PointXY;
151
+ /**
152
+ * Defines the width and height of some element.
153
+ * @group Data Model
154
+ */
155
+ export interface Size {
156
+ /**
157
+ * Element width
158
+ */
159
+ width: number;
160
+ /**
161
+ * element height
162
+ */
163
+ height: number;
164
+ }
165
+ /**
166
+ * Extracts just the width,height properties from the given input value, which may be some other type that just happens to implement Size. We use this internally when one of our reference objects contains the values we need, but we want to ensure we have a copy in some local scope, in case we change its values.
167
+ * @param p
168
+ * @internal
169
+ */
170
+ export declare function extractSize(p: Size): Size;
171
+ /**
172
+ * Extract a rectangle from the given object. We use this internally to ensure we dont overwrite internal object.
173
+ * @param p
174
+ * @internal
175
+ */
176
+ export declare function extractBounds(p: Size & PointXY): RectangleXY;
177
+ /**
178
+ * Defines a rectangle in 2d space - its x/y location, width and height, and optionally the computed center, but that can of course be calculated from the other values. Internally there are times when the code has this to hand so we include it here.
179
+ * @group Data Model
180
+ */
181
+ export interface RectangleXY extends PointXY, Size {
182
+ /**
183
+ * Center of the box. In some cases the code has this information to hand
184
+ * and populates it, but if it is absent you can figure it out from the
185
+ * other values.
186
+ */
187
+ center?: PointXY;
188
+ }
189
+ /**
190
+ * This is an alias for RectangleXY.
191
+ * @group Data Model
192
+ */
193
+ export type BoundingBox = RectangleXY;
194
+ /**
195
+ * Details for a vertex that is enclosed by, or intersects, some specified region. The type parameter T will either be a Node or a Group. EL is the type parameter for the element in the UI.
196
+ * @typeParam T The type of the model object that is intersecting - a Node or a Group.
197
+ * @typeParam EL The element type for the UI. In the browser-ui package this is {@link BrowserElement} - an HTML or SVG element.
198
+ * @group Data Model
199
+ */
200
+ export type IntersectingVertex<EL> = {
201
+ /**
202
+ * Intersecting region
203
+ */
204
+ r: RectangleXY;
205
+ /**
206
+ * The vertex that intersects
207
+ */
208
+ v: Node | Group;
209
+ /**
210
+ * The element representing the vertex in the UI
211
+ */
212
+ el: EL;
213
+ /**
214
+ * The ID of the vertex
215
+ */
216
+ id: string;
217
+ /**
218
+ * True if the vertex is enclosed by the region, false if the vertex only intersects the region.
219
+ */
220
+ enclosed: boolean;
221
+ };
222
+ /**
223
+ * Translates the given rectangle by the given amount in x and y, either in the +ve direction or in the -ve direction,
224
+ * depending on the value of `dir`.
225
+ * @param r Rectangle to translate
226
+ * @param delta How much to translate by in the X and Y axes
227
+ * @param dir 1 to translate right/down, -1 to translate left/up.
228
+ * @internal
229
+ */
230
+ export declare function translateRect(r: RectangleXY, delta: PointXY, dir: 1 | -1): RectangleXY;
231
+ /**
232
+ * Definition of a grid - the width/height of each cell, and, optionally, a threshold value for each axis to use when
233
+ * trying to snap some coordinate to the grid.
234
+ * @group Data Model
235
+ */
236
+ export interface Grid extends Size {
237
+ thresholdX?: number;
238
+ thresholdY?: number;
239
+ }
240
+ /**
241
+ * Defines a line from some point to another.
242
+ * @group Data Model
243
+ */
244
+ export type LineXY = [PointXY, PointXY];
245
+ /**
246
+ * Generate a v4 UUID.
247
+ * @returns String representation of a UUID
248
+ * @group Utils
249
+ */
250
+ export declare function uuid(): string;
251
+ /**
252
+ * Generate a shortened UUID.
253
+ * @param length
254
+ * @group Utils
255
+ */
256
+ export declare function shortUuid(length?: number): string;
257
+ /**
258
+ * gets the midpoints of the four sides of the given rectangle
259
+ * @param r
260
+ * @internal
261
+ */
262
+ export declare function getRectangleMidpoints(r: RectangleXY): Array<PointXY>;
263
+ /**
264
+ * Gets the closest face midpoint from the given rectangle to the given point.
265
+ * @internal
266
+ */
267
+ export declare function getClosestMidpoint(fromPoint: PointXY, r: RectangleXY): PointXY;
268
+ /**
269
+ * Either write a value to an object or reads a value from the object.
270
+ * @param inObj Object to operate on
271
+ * @param path A path in dotted notation to the target in the object
272
+ * @param value The value to write
273
+ * @group Utils
274
+ */
275
+ export declare function data(inObj: Record<string, any>, path: string, value?: any): any;
276
+ /**
277
+ * Partitions a list into two lists - one for which the supplied partitioner returns true (the `left` list), and the other, the
278
+ * `right` list, for which the supplied partitioner does not return true.
279
+ * @param l List to partition
280
+ * @param partitioner Function to use to partition the list.
281
+ * @group Utils
282
+ */
283
+ export declare function partition<T, A extends T, B extends T>(l: ArrayLike<T>, partitioner: (candidate: T) => boolean): {
284
+ left: Array<A>;
285
+ right: Array<B>;
286
+ };
287
+ /**
288
+ * Filters out empty or null values from the given list of strings
289
+ * @internal
290
+ */
291
+ export declare function filterEmpty(l: Array<string>): Array<string>;
292
+ /**
293
+ * Runs the given function for each value in the array that is not null and has a non-zero length.
294
+ * @internal
295
+ */
296
+ export declare function eachNotEmpty(strings: Array<string>, fn: (idx: number, s: string) => any): void;
297
+ /**
298
+ * @internal
299
+ */
300
+ export type ClosestPointCandidate<T extends PointXY> = {
301
+ p: T;
302
+ idx: number;
303
+ distance: number;
304
+ };
305
+ /**
306
+ * Find the closest point out of `locations` to the given point on the given constraining rectangle.
307
+ * @param pos An x,y location in pixel values
308
+ * @param constrainRect Width/height of the bounding box, in pixels
309
+ * @param locations A list of x/y logical locations, whose values are proportional lengths (anchor format).
310
+ * @internal
311
+ */
312
+ export declare function findClosestPoint<T extends PointXY>(pos: PointXY, constrainRect: RectangleXY, locations: Array<T>): ClosestPointCandidate<T>;
313
+ /**
314
+ * Get, or insert then get, a value from the map.
315
+ * @param map Map to get the value from.
316
+ * @param key Key of the value to retrieve
317
+ * @param valueGenerator Method used to generate a value for the key if it is not currently in the map.
318
+ * @internal
319
+ */
320
+ export declare function getsert<K, V>(map: Map<K, V>, key: K, valueGenerator: () => V): V;
321
+ /**
322
+ * Get, or insert then get, a value from the map.
323
+ * @param map Map to get the value from.
324
+ * @param key Key of the value to retrieve
325
+ * @param valueGenerator Method used to generate a value for the key if it is not currently in the map.
326
+ * @internal
327
+ */
328
+ export declare function recordGetsert<V>(map: Record<string, V>, key: string, valueGenerator: () => V): V;
329
+ /**
330
+ * Returns whether or not the given value is of `number` type.
331
+ * @param n
332
+ * @internal
333
+ */
334
+ export declare function isNumber(n: any): boolean;
335
+ /**
336
+ * Returns whether or not the given value is of `string` type.
337
+ * @param s
338
+ * @internal
339
+ */
340
+ export declare function isString(s: any): s is string;
341
+ /**
342
+ * Returns whether or not the given value is of `boolean` type.
343
+ * @param s
344
+ * @internal
345
+ */
346
+ export declare function isBoolean(s: any): boolean;
347
+ /**
348
+ * Returns whether or not the given value is of type `object`
349
+ * @param o
350
+ * @internal
351
+ */
352
+ export declare function isObject(o: any): boolean;
353
+ /**
354
+ * Returns whether or not the given value is of type `Date`
355
+ * @param o
356
+ * @internal
357
+ */
358
+ export declare function isDate(o: any): o is Date;
359
+ /**
360
+ * Returns whether or not the given value is of type `Function`
361
+ * @param o
362
+ * @internal
363
+ */
364
+ export declare function isFunction(o: any): o is Function;
365
+ /**
366
+ * Returns whether or not the given value is of type `Function` and is a named Function.
367
+ * @param o
368
+ * @internal
369
+ */
370
+ export declare function isNamedFunction(o: any): boolean;
371
+ /**
372
+ * Returns whether or not the given object - which may be ArrayLike, or an object - is empty.
373
+ * @param o
374
+ * @internal
375
+ */
376
+ export declare function isEmpty(o: any): boolean;
377
+ /**
378
+ * Returns whether or not the two objects are identical, ie. there are no keys in o1 that do not exist in o2 and vice versa.
379
+ * @param a
380
+ * @param b
381
+ * @internal
382
+ */
383
+ export declare function objectsEqual(a: Record<string, any>, b: Record<string, any>): boolean;
384
+ /**
385
+ * Returns a copy of the given object that has no null values. Note this only operates one level deep.
386
+ * @param obj
387
+ * @internal
388
+ */
389
+ export declare function filterNull(obj: Record<string, any>): Record<string, any>;
390
+ /**
391
+ * Makes a copy of the given object.
392
+ * @param a
393
+ * @internal
394
+ */
395
+ export declare function clone(a: any): any;
396
+ /**
397
+ * Merge the values from `b` into the values from `a`, resulting in `c`. `b` and `a` are unchanged by this method.
398
+ * Not every datatype can be merged - arrays can, and objects can, but primitives (strings/booleans/numbers/functions)
399
+ * cannot, and are overwritten in `c` by the value from `b`, if present.
400
+ *
401
+ * @remarks
402
+ *
403
+ * Collating Values
404
+ * ----------------
405
+ *
406
+ * You can choose to collate strings, booleans or functions if you wish, by providing their key names in the `collations` array. So if
407
+ * you had, say:
408
+ *
409
+ * a:{
410
+ * foo:"hello"
411
+ * }
412
+ *
413
+ * b:{
414
+ * foo:"world"
415
+ * }
416
+ *
417
+ * and you called `merge(a, b, ["foo"])`, then the output would be
418
+ *
419
+ * {
420
+ * foo:["hello", "world"]
421
+ * }
422
+ *
423
+ * if the value in `a` is already an Array then the value from `b` is simply appended:
424
+ *
425
+ * a:{
426
+ * foo:["hello"]
427
+ * }
428
+ *
429
+ * b:{
430
+ * foo:"world"
431
+ * }
432
+ *
433
+ * here the output would be
434
+ *
435
+ * {
436
+ * foo:["hello", "world"]
437
+ * }
438
+ *
439
+ *
440
+ * Overwriting values
441
+ * -----------------
442
+ *
443
+ * If you wish to overwrite, rather than merge, specific values, you can provide their keys in the `overwrites` array. Note that it's unnecessary to
444
+ * specify any primitives in the `overwrites` array, as they will always be overwritten and not merged.
445
+ *
446
+ * a:{
447
+ * foo:["hello", "world"]
448
+ * }
449
+ *
450
+ * b:{
451
+ * foo:"world"
452
+ * }
453
+ *
454
+ * and you called `merge(a, b, null, ["foo"])`, then the output would be
455
+ *
456
+ * {
457
+ * foo:"world"
458
+ * }
459
+ *
460
+ * Note that it is irrelevant, in the case of overwriting, what the type of the parent's value is. It will be overwritten regardless.
461
+ *
462
+ * @param a Parent object
463
+ * @param b Child object
464
+ * @param collations Optional list of parameters to collate, rather than merging or overwriting.
465
+ * @param overwrites Optional list of parameters to overwrite, rather than merging.
466
+ * @internal
467
+ */
468
+ export declare function merge(a: Record<string, any>, b: Record<string, any>, collations?: Array<string>, overwrites?: Array<string>): any;
469
+ /**
470
+ * Returns whether or not the two arrays are identical, ie. they have the same length and every value is the same
471
+ * @param a
472
+ * @param b
473
+ * @internal
474
+ */
475
+ export declare function arraysEqual(a: Array<any>, b: Array<any>): boolean;
476
+ export declare function pointsEqual(p1: PointXY, p2: PointXY): boolean;
477
+ /**
478
+ * Defines the current rotation of some element - its rotation (in degrees) and the center point around which it is rotated.
479
+ * @internal
480
+ */
481
+ export interface Rotation {
482
+ r: number;
483
+ c: PointXY;
484
+ }
485
+ /**
486
+ * A set of compound rotations - used when nesting elements/groups inside other groups.
487
+ * @internal
488
+ */
489
+ export type Rotations = Array<Rotation>;
490
+ /**
491
+ * Applies the given set of Rotations to the given point, and returns a new PointXY. For internal use.
492
+ * @param point - Point to rotate
493
+ * @param rotations - Rotations to apply.
494
+ * @internal
495
+ */
496
+ export declare function applyRotations(point: [number, number, number, number], rotations: Rotations): RotatedPointXY;
497
+ /**
498
+ * Applies the given set of Rotations to the given point, and returns a new PointXY. For internal use.
499
+ * @param point - Point to rotate
500
+ * @param rotations - Rotations to apply.
501
+ * @internal
502
+ */
503
+ export declare function applyRotationsXY(point: PointXY, rotations: Rotations): PointXY;
504
+ /**
505
+ * Replace a value inside some object with another value.
506
+ * @param inObj Object within which to make the replacement.
507
+ * @param path Path to the value to replace. Supports dotted and bracket notation. Eg "foo" means a value with key `foo` in the root. "foo.bar" means a value
508
+ * with key `bar` inside a value with key `foo`. "foo[1]" means the object at index 1 inside a value with key `foo`.
509
+ * @param value Value to replace the original value with.
510
+ * @internal
511
+ */
512
+ export declare function replace(inObj: any, path: string, value: any): any;
513
+ /**
514
+ *
515
+ * Take the given model and expand out any parameters. Parameters to expand are marked inside string values with this syntax:
516
+ *
517
+ * `
518
+ * someKey:"this is a value of type {{type}}"
519
+ * `
520
+ *
521
+ * @param model Object to populate with values.
522
+ * @param values Object containing values to populate
523
+ * @param functionPrefix This is optional, and if present, helps VisuallyJs figure out what to do if a value is a Function.
524
+ * if you do not provide it (and `doNotExpandFunctions` is null, or false), VisuallyJs will run the given values through any functions it finds, and use the function's
525
+ * output as the value in the result. if you do provide the prefix, only functions that are named and have this prefix
526
+ * will be executed; other functions will be passed as values to the output.
527
+ * @param doNotExpandFunctions Defaults to false. If true, Functions will be passed directly from `values` to `model` without being executed.
528
+ * @returns
529
+ * @internal
530
+ */
531
+ export declare function populate(model: any, values: any, functionPrefix?: string, doNotExpandFunctions?: boolean): any;
532
+ /**
533
+ * Implementation of a PriorityQueue.
534
+ * @group Utils
535
+ */
536
+ export declare class PriorityQueue<T> {
537
+ private sorter;
538
+ stack: Array<T>;
539
+ get length(): number;
540
+ constructor(sorter: (a: T, b: T) => number, ...entries: Array<T>);
541
+ /**
542
+ * Add an element, sorted.
543
+ * @param node
544
+ */
545
+ add(node: T): void;
546
+ /**
547
+ * Update the given element - meaning, remove it and re-insert it.
548
+ * @param node
549
+ */
550
+ update(node: T): void;
551
+ /**
552
+ * Remove and return the last entry in the queue (the entry with the highest priority).
553
+ */
554
+ pop(): T;
555
+ /**
556
+ * Remove the given entry from the queue.
557
+ * @param node
558
+ */
559
+ delete(node: T): void;
560
+ /**
561
+ * Get the entry with the lowest priority, or null if the queue is empty.
562
+ */
563
+ head(): T;
564
+ /**
565
+ * Get the entry with the highest priority, and leave it in the queue.
566
+ */
567
+ peek(): T;
568
+ /**
569
+ * Returns whether or not the queue is empty.
570
+ */
571
+ isEmpty(): boolean;
572
+ /**
573
+ * Empties out the queue.
574
+ */
575
+ clear(): void;
576
+ }
577
+ /**
578
+ * Models the minimum and maximum values in an allowed zoom range. These value are expressed decimals: 0.5 means 50%, for instance.
579
+ */
580
+ export type ZoomRange = [number, number];
581
+ /**
582
+ * Base segment in an edge geometry.
583
+ * @group Edges
584
+ * @category Connectors
585
+ */
586
+ export interface BaseGeometrySegment {
587
+ /**
588
+ * X location of first point in segment.
589
+ */
590
+ x1: number;
591
+ /**
592
+ * X location of second point in segment.
593
+ */
594
+ x2: number;
595
+ /**
596
+ * Y location of first point in segment.
597
+ */
598
+ y1: number;
599
+ /**
600
+ * Y location of second point in segment.
601
+ */
602
+ y2: number;
603
+ }
604
+ /**
605
+ * Geometry defines the path along which a connector travels. The internal contents of a Geometry vary between connectors.
606
+ * @group Edges
607
+ * @category Connectors
608
+ */
609
+ export interface Geometry {
610
+ /**
611
+ * Definition of where the edge's source is located.
612
+ */
613
+ source: AnchorPlacement;
614
+ /**
615
+ * Definition of where the edge's target is located.
616
+ */
617
+ target: AnchorPlacement;
618
+ /**
619
+ * List of segments.
620
+ */
621
+ segments: Array<BaseGeometrySegment>;
622
+ }
623
+ /**
624
+ * Defines the current location that an anchor is placed at, for use in edge geometry objects.
625
+ */
626
+ export type AnchorPlacement = {
627
+ /**
628
+ * Current X in canvas coordinates
629
+ */
630
+ curX: number;
631
+ /**
632
+ * Current Y in canvas coordinates
633
+ */
634
+ curY: number;
635
+ /**
636
+ * X location of anchor as a proportion of the width of the element
637
+ */
638
+ x: number;
639
+ /**
640
+ * Y location of anchor as a proportion of the height of the element
641
+ */
642
+ y: number;
643
+ /**
644
+ * Orientation of the source anchor
645
+ */
646
+ ox: AnchorOrientationHint;
647
+ /**
648
+ * Orientation of the target anchor
649
+ */
650
+ oy: AnchorOrientationHint;
651
+ /**
652
+ * Optional offset to apply in X axis - in canvas coordinates. This is applied after the
653
+ * anchor's `x` value is used to compute its location on the vertex.
654
+ */
655
+ offsetX?: number;
656
+ /**
657
+ * Optional offset to apply in Y axis - in canvas coordinates. This is applied after the
658
+ * anchor's `y` value is used to compute its location on the vertex.
659
+ */
660
+ offsetY?: number;
661
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This is the base VisuallyJs package, which uses the internal template engine, and is a dependency for each of the library integrations.
3
+ * @packageDocumentation
4
+ * @groupDescription CSS Classes
5
+ * List of CSS classes assigned to DOM elements by various parts of the VisuallyJs UI
6
+ * @groupDescription Data Model
7
+ * Classes/interfaces used to represent the data model of an app written with VisuallyJs.
8
+ * @groupDescription Utils
9
+ * Various utility functions for operating on the data model and on the UI.
10
+ */
11
+ export * from './browser-ui';
12
+ export * from './ui';
13
+ export * from './core';
14
+ export * from './test-support';
15
+ export { HeadlessRecado, Recado, processExpression, evaluateExpression } from './core/templates';
16
+ export * from './charts';
package/types/l.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function watermark(el: Element, h: boolean, orig?: Element): void;
2
+ export declare function chartWatermark(el: SVGElement, h: boolean, orig?: SVGElement): void;
@@ -0,0 +1 @@
1
+ export * from "./test-support";