@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,243 @@
1
+ import { Size, Group, Node, ObjectData, AbstractEntry, CustomTagOptions } from "../../core";
2
+ import { BrowserElement } from "../util";
3
+ import { IconDefinition } from "../icons";
4
+ import { FontSpec } from "../definitions";
5
+ /**
6
+ * Default fill/stroke/text color for items in ShapeLibrary.
7
+ * @internal
8
+ */
9
+ export declare const ShapeLibraryDefaults: {
10
+ FILL: string;
11
+ STROKE: string;
12
+ TEXT_COLOR: string;
13
+ STROKE_WIDTH: number;
14
+ };
15
+ /**
16
+ * The object type for some shape - a node or a group.
17
+ * @group Nodes and Groups
18
+ * @category Shape Libraries
19
+ */
20
+ export type ShapeObjectType = typeof Group.objectType | typeof Node.objectType;
21
+ /**
22
+ * Defines a shape type. If you wish to supply custom shape types you should extend this interface.
23
+ * @group Nodes and Groups
24
+ * @category Shape Libraries
25
+ */
26
+ export interface ShapeType {
27
+ /**
28
+ * The shape's type.
29
+ */
30
+ type: string;
31
+ /**
32
+ * Template representing the shape
33
+ */
34
+ template: string;
35
+ /**
36
+ * Template representing the shape when it is collapsed - only relevant when objectType is Group
37
+ */
38
+ collapsedTemplate?: string;
39
+ /**
40
+ * Label to use for the shape type when displayed in a palette
41
+ */
42
+ label?: string;
43
+ /**
44
+ * Can be shown in a palette to give a user more information about a shape
45
+ */
46
+ description?: string;
47
+ square?: boolean;
48
+ /**
49
+ * Defaults to `Node.objectType`. Indicates the object type - Node or Group - to create in the UI when a shape of this type is dragged.
50
+ */
51
+ objectType?: ShapeObjectType;
52
+ /**
53
+ * Initial size for this specific shape. If not provided defaults will be used.
54
+ */
55
+ initialSize?: Size;
56
+ /**
57
+ * Size for this shape when it is collapsed - only relevant when objectType is Group.
58
+ */
59
+ collapsedSize?: Size;
60
+ /**
61
+ * Optional initial payload to set on model objects that are dragged from a palette onto the canvas.
62
+ */
63
+ payload?: ObjectData;
64
+ /**
65
+ * Optional shape-specific settings for font. This will override library wide font settings.
66
+ */
67
+ font?: FontSpec;
68
+ /**
69
+ * Optional data to use when showing a preview of this shape - some shapes, such as Labels, will not display anything unless provided with a dataset. This config lets you provide the data that will be used when rendering a preview of the shape, for instance in a palette, or when drawing via the vertex drawing plugin.
70
+ */
71
+ previewData?: ObjectData;
72
+ /**
73
+ * Optional icon to use in the shape palette instead of rendering the template.
74
+ */
75
+ icon?: string;
76
+ /**
77
+ * A list of configurable properties exposed by this shape's template.
78
+ * An inspector can read this array to automatically generate an editing UI.
79
+ */
80
+ properties?: Array<ShapePropertyDefinition>;
81
+ /**
82
+ * If true, instructs the inspector to merge this ShapeType's properties onto any defined by its ShapeSet.
83
+ */
84
+ mergeProperties?: boolean;
85
+ /**
86
+ * Where to place the label for this type. Most shapes default to center but sometimes you might want to specify where a particular shape's label should be.
87
+ */
88
+ labelPosition?: LabelPosition;
89
+ /**
90
+ * optional name of the group to which the shape belongs.
91
+ */
92
+ group?: string;
93
+ }
94
+ /**
95
+ * Start placement for shape icon - in x axis this means the left; in y axis it means the top.
96
+ * @group Nodes and Groups
97
+ * @category Shape Libraries
98
+ */
99
+ export declare const ICON_ORIGIN_START = "start";
100
+ /**
101
+ * Center placement for shape icon, x and y axis
102
+ * @group Nodes and Groups
103
+ * @category Shape Libraries
104
+ */
105
+ export declare const ICON_ORIGIN_CENTER = "center";
106
+ /**
107
+ * End placement for shape icon - in x axis this means the right; in y axis it means the bottom.
108
+ * @group Nodes and Groups
109
+ * @category Shape Libraries
110
+ */
111
+ export declare const ICON_ORIGIN_END = "end";
112
+ /**
113
+ * Possible values for shape icon placement, x axis and y axis
114
+ * @group Nodes and Groups
115
+ * @category Shape Libraries
116
+ */
117
+ export type IconOrigin = typeof ICON_ORIGIN_START | typeof ICON_ORIGIN_CENTER | typeof ICON_ORIGIN_END;
118
+ /**
119
+ * Defines a set of shapes. This is the interface you should extend if you wish to supply custom shape sets to the widget.
120
+ * @group Nodes and Groups
121
+ * @category Shape Libraries
122
+ */
123
+ export interface ShapeSet {
124
+ id: string;
125
+ name: string;
126
+ shapes: Array<ShapeType>;
127
+ icons?: Array<IconDefinition>;
128
+ defs?: Record<string, string>;
129
+ children?: Array<ShapeSet>;
130
+ /**
131
+ * A list of configurable properties exposed by shapes in this set.
132
+ */
133
+ properties?: Array<ShapePropertyDefinition>;
134
+ }
135
+ /**
136
+ * @internal
137
+ */
138
+ export interface RenderedShapeSet extends ShapeSet {
139
+ children: Array<RenderedShapeSet>;
140
+ parent?: string;
141
+ }
142
+ /**
143
+ * Defines a library that acts as a factory for shapes.
144
+ * @internal
145
+ */
146
+ export interface ShapeLibrary<T extends ObjectData> {
147
+ $getShapeDefinitionForObject(o: ObjectData, typeParameter?: string, categoryParameter?: string): ShapeType;
148
+ getShapeDefinition(type: string, set?: string): ShapeType;
149
+ renderCompiledShape(data: T, strokeWidth?: number): BrowserElement;
150
+ renderShapeLabel(data: ObjectData, labelProperty: string, strokeWidth: string, label: string, fill: string, stroke: string, font: FontSpec): SVGTextElement;
151
+ getShapeTagDefinition(isSvgContainer: boolean, strokeWidth?: number, includeLabel?: boolean, fontSpec?: FontSpec, labelAttribute?: string, defaultFillColor?: string, defaultOutlineColor?: string, defaultColor?: string): CustomTagOptions;
152
+ getShapeSet(id: string): RenderedShapeSet;
153
+ rootSet: RenderedShapeSet;
154
+ getDefsElements(): Array<Element>;
155
+ getSvgDefsElement(): SVGElement;
156
+ parseDefs(): Array<Array<AbstractEntry>>;
157
+ useMultilineLabels(): boolean;
158
+ $applyMultilineLabel(el: Element, data: ObjectData, labelAttribute: string): void;
159
+ typeParameter: string;
160
+ categoryParameter: string;
161
+ defaultCategoryId: string;
162
+ /**
163
+ * Refreshes the given element by rendering any icons and applying multiline labels.
164
+ * @param el The element to refresh.
165
+ * @param data The data associated with the element.
166
+ * @param labelAttribute The attribute to use for the label.
167
+ */
168
+ refresh(el: BrowserElement, data: T, labelAttribute?: string): void;
169
+ }
170
+ /**
171
+ * Defines a function that can take a vertex's data object and return a document fragment with it rendered.
172
+ * @group Nodes and Groups
173
+ * @category Shape Libraries
174
+ */
175
+ export type ShapeGeneratorFunction = (data: ObjectData) => DocumentFragment;
176
+ /**
177
+ * Name of the default shape set
178
+ * @group Nodes and Groups
179
+ * @category Shape Libraries
180
+ */
181
+ export declare const DEFAULT_SET_NAME = "Default";
182
+ /**
183
+ * @group Nodes and Groups
184
+ * @category Shape Libraries
185
+ */
186
+ export declare const DEFAULT_SET_DESCRIPTION = "Default shapes";
187
+ /**
188
+ * The HTML element used for the SVG shape element.
189
+ * @group Nodes and Groups
190
+ * @category Shape Libraries
191
+ */
192
+ export declare const TAG_SHAPE = "vjs-shape";
193
+ /**
194
+ * This class is assigned to svg text elements serving as shape labels.
195
+ * @group Nodes and Groups
196
+ * @category CSS Classes
197
+ * @cssClass
198
+ * @context shape-library
199
+ */
200
+ export declare const CLASS_SHAPE_LABEL = "vjs-shape-label";
201
+ /**
202
+ * This class is assigned to the parent SVG elements for shapes.
203
+ * @group Nodes and Groups
204
+ * @category CSS Classes
205
+ * @cssClass
206
+ * @context shape-library
207
+ */
208
+ export declare const CLASS_SHAPE = "vjs-shape";
209
+ /**
210
+ * Supported data types for shape properties.
211
+ */
212
+ export type ShapePropertyType = "string" | "number" | "boolean" | "color" | "font";
213
+ /**
214
+ * Defines a single configurable property exposed by a shape.
215
+ */
216
+ export interface ShapePropertyDefinition {
217
+ /**
218
+ * The internal variable name used in the template (e.g., "backgroundColor", "width").
219
+ */
220
+ id: string;
221
+ /**
222
+ * The human-readable name to display in the inspector UI (e.g., "Background Color").
223
+ */
224
+ label: string;
225
+ /**
226
+ * The data type of the property, telling the inspector which UI control to render.
227
+ */
228
+ type: ShapePropertyType;
229
+ /**
230
+ * The default value for this property if it hasn't been explicitly set.
231
+ */
232
+ defaultValue?: any;
233
+ /**
234
+ * Optional description or tooltip to help the user understand what this property does.
235
+ */
236
+ description?: string;
237
+ /**
238
+ * For "number" types, optional min/max constraints.
239
+ */
240
+ min?: number;
241
+ max?: number;
242
+ }
243
+ export type LabelPosition = "top" | "bottom" | "center";
@@ -0,0 +1,266 @@
1
+ import { RenderedShapeSet, ShapeGeneratorFunction, ShapeLibrary, ShapeSet, ShapeType, LabelPosition } from "./shape-library-definitions";
2
+ import { BrowserElement } from "../util";
3
+ import { CustomTagOptions, Recado, AbstractEntry, ObjectData } from "../../core";
4
+ import { IconDefinition } from "../icons";
5
+ import { FontSpec } from "../definitions";
6
+ export declare const ATTRIBUTE_ORIGIN = "origin";
7
+ export declare const ATTRIBUTE_ORIGIN_X = "originX";
8
+ export declare const ATTRIBUTE_ORIGIN_Y = "originY";
9
+ export declare const ATTRIBUTE_ORIENTATION = "orientation";
10
+ export declare const ATTRIBUTE_ICON_SIZE = "size";
11
+ export declare const ATTRIBUTE_ICON_KEY = "key";
12
+ export declare const ATTRIBUTE_ICON_ID = "iconId";
13
+ /**
14
+ * Indicates that the icons in a `vjs-incude-icons` element should be arranged in a horizontal line - this is the default.
15
+ */
16
+ export declare const ICONS_ORIENTATION_HORIZONTAL = "horizontal";
17
+ /**
18
+ * Indicates that the icons in a `vjs-include-icons` element should be arranged in a vertical line.
19
+ */
20
+ export declare const ICONS_ORIENTATION_VERTICAL = "vertical";
21
+ /**
22
+ * This class is assigned to SVG elements serving as icons (via `vjs-icon` or `vjs-icons` in a shape template)
23
+ * @cssClass
24
+ * @context shape-library, shape-icon
25
+ */
26
+ export declare const CLASS_SHAPE_ICON = "vjs-shape-icon";
27
+ /**
28
+ * Tag identifying an icon inclusion in a shape template.
29
+ */
30
+ export declare const ELEMENT_INCLUDE_ICON = "vjs-include-icon";
31
+ /**
32
+ * Tag identifying a set of icon inclusions in a shape template.
33
+ */
34
+ export declare const ELEMENT_INCLUDE_ICONS = "vjs-include-icons";
35
+ /**
36
+ * @internal
37
+ */
38
+ export declare const ROOT_SHAPE_SET = "__vjsRootSet";
39
+ /**
40
+ * The default property name containing a vertex's label
41
+ * @internal
42
+ */
43
+ export declare const DEFAULT_LABEL_PROPERTY = "label";
44
+ /**
45
+ * The default property containing a vertex's fill color
46
+ * @internal
47
+ */
48
+ export declare const DEFAULT_FILL_PROPERTY = "fill";
49
+ /**
50
+ * The default property containing a vertex's outline color
51
+ * @internal
52
+ */
53
+ export declare const DEFAULT_OUTLINE_PROPERTY = "outline";
54
+ /**
55
+ * The default property containing a vertex's outline width color
56
+ * @internal
57
+ */
58
+ export declare const DEFAULT_OUTLINE_WIDTH_PROPERTY = "outlineWidth";
59
+ /**
60
+ * The default property containing a vertex's label color
61
+ * @internal
62
+ */
63
+ export declare const DEFAULT_COLOR_PROPERTY = "color";
64
+ /**
65
+ * Default fill color
66
+ * @internal
67
+ */
68
+ export declare const DEFAULT_FILL_COLOR = "#FFFFFF";
69
+ /**
70
+ * Default outline color
71
+ * @internal
72
+ */
73
+ export declare const DEFAULT_OUTLINE_COLOR = "#000000";
74
+ /**
75
+ * Default outline width
76
+ * @internal
77
+ */
78
+ export declare const DEFAULT_OUTLINE_WIDTH = 2;
79
+ /**
80
+ * Default label color
81
+ * @internal
82
+ */
83
+ export declare const DEFAULT_COLOR = "#000000";
84
+ /**
85
+ * For multiline labels, the proportion of the width of the shape that the longest line can take up.
86
+ * @internal
87
+ */
88
+ export declare const DEFAULT_LABEL_FILL_RATIO = 0.8;
89
+ /**
90
+ * Options for a shape library.
91
+ * @group Nodes and Groups
92
+ * @category Shape Libraries
93
+ */
94
+ export interface ShapeLibraryOptions {
95
+ /**
96
+ * The property to use to map an object's type. Defaults to "type".
97
+ */
98
+ typeParameter?: string;
99
+ /**
100
+ * The property to use to map an object's category (ie which shape set to use). Defaults to "category".
101
+ */
102
+ categoryParameter?: string;
103
+ /**
104
+ * Defaults to true - labels are split across multiple lines to fit inside their shape. Set this to false if you want labels to always be a single line.
105
+ */
106
+ multilineLabels?: boolean;
107
+ /**
108
+ * How much of the width of a shape a multiline label will take up before wrapping. Defaults to 0.8. You can set this to a number greater than 1, if you like, but that will allow the label to overflow.
109
+ */
110
+ labelFillRatio?: number;
111
+ /**
112
+ * Default position for labels (will be overridden by a shape that defines its own position. Defaults to "center"
113
+ */
114
+ labelPosition?: LabelPosition;
115
+ /**
116
+ * Optional default for fill color. If not provided, fill is set to #FFFFFF.
117
+ */
118
+ defaultFillColor?: string;
119
+ /**
120
+ * Optional default for outline color. If not provided, outline is set to #000000.
121
+ */
122
+ defaultOutlineColor?: string;
123
+ }
124
+ /**
125
+ * Default ShapeLibrary implementation. Use one of these to manage a set of shapes for rendering into your vertices and/or for rendering as a palette from which the user can drag new objects.
126
+ * @group Nodes and Groups
127
+ * @category Shape Libraries
128
+ */
129
+ export declare class ShapeLibraryImpl<T extends ObjectData> implements ShapeLibrary<T> {
130
+ compiledShapes: Map<string, ShapeGeneratorFunction>;
131
+ templateRenderer: Recado;
132
+ shapeSets: Map<string, RenderedShapeSet>;
133
+ defaultCategoryId: string;
134
+ private labelPosition;
135
+ rootSet: RenderedShapeSet;
136
+ iconContainerTemplate: string;
137
+ iconContainerAst: Array<AbstractEntry>;
138
+ /**
139
+ * map of icons specs. the keys of this map are set IDs. The values are maps of icon ids to icon definitions.
140
+ * @internal
141
+ */
142
+ iconSpecs: Map<string, Map<string, IconDefinition>>;
143
+ /**
144
+ * Also we keep a list of all icons defs, but here we've stripped the category out. we use this in the event that some data doesn't have a category. then it's a lucky dip. the user gets the first icon with a matching id.
145
+ * @internal
146
+ */
147
+ iconList: Array<IconDefinition>;
148
+ typeParameter: string;
149
+ categoryParameter: string;
150
+ /**
151
+ * @internal
152
+ */
153
+ private readonly multilineLabels;
154
+ private readonly labelFillRatio;
155
+ /**
156
+ * @internal
157
+ */
158
+ useMultilineLabels(): boolean;
159
+ /**
160
+ * ShapeLibrary constructor.
161
+ * @param shapeSets One or more shape sets to include in the library.
162
+ * @param options Options for the library.
163
+ */
164
+ constructor(shapeSets: ShapeSet | Array<ShapeSet>, options?: ShapeLibraryOptions);
165
+ /**
166
+ * Renders any icons found and applies multiline labels, if necessary.
167
+ * @param el
168
+ * @param data
169
+ * @param labelAttribute
170
+ */
171
+ refresh(el: BrowserElement, data: ObjectData, labelAttribute?: string): void;
172
+ private _processShapeSets;
173
+ getShapeSet(id: string): RenderedShapeSet;
174
+ /**
175
+ * Gets the definition for some combination of type and category. May return null.
176
+ * @param type
177
+ * @param set
178
+ */
179
+ getShapeDefinition(type: string, set?: string): ShapeType;
180
+ /**
181
+ * Gets the definition for some data object, using the default type/category parameters, or specific ones that you supply. May return null.
182
+ * @internal
183
+ */
184
+ $getShapeDefinitionForObject(o: ObjectData, typeParameter?: string, categoryParameter?: string): ShapeType;
185
+ /**
186
+ * Gets the template for the given shape type in the given set. If no template is resolved then we return
187
+ * DEFAULT_TEMPLATE (and log the issue to the console).
188
+ * @param type Shape type
189
+ * @param set Name of set. If not provided, the value of `DEFAULT_SET` is used as the set name.
190
+ */
191
+ getShapeTemplate(type: string, set: string): string;
192
+ /**
193
+ * Gets a compiled version of the given shape, creating and caching it if it does not already exist.
194
+ * @param type Shape type.
195
+ * @param category Category to use. Defaults to the ID of the first category provided in the shape list.
196
+ */
197
+ getCompiledShape(type: string, category?: string): ShapeGeneratorFunction;
198
+ /**
199
+ * TODO would this be better done via css? or would that br a problem for headless scenarios?
200
+ * @param el
201
+ * @private
202
+ */
203
+ private _applyVectorEffect;
204
+ /**
205
+ * Render the given data with the appropriate template. A `fill` value is set on the resulting element, and the `vector-effect` attribute is set to 'non scaling stroke', ie. when the shape is scaled due to the element dimensions differing from the viewbox, the stroke does not change.
206
+ * @param data
207
+ * @param strokeWidth Stroke width to use. This is passed to the underlying template and is taken into account by the shape template (or at least, it should be, because it has a bearing on the quality of the result)
208
+ * @param typeParameter Optional key to use to look up an object's type. When not provided, the `typeParameter` from the class is used.
209
+ * @param categoryParameter Optional key to use to look up an object's category. When not provided, the `categoryParameter` from the class is used.
210
+ */
211
+ renderCompiledShape(data: ObjectData, strokeWidth?: number, typeParameter?: string, categoryParameter?: string): HTMLElement | SVGElement;
212
+ /**
213
+ * Render a label element for the given data - an SVG text element. Used by library integrations.
214
+ * @param data Data to extract label from
215
+ * @param labelProperty Name of the property that provides the label. Defaults to "label"
216
+ * @param strokeWidth Optional stroke width, defaults to `0.25px`
217
+ * @param label Optional label to use, overrides extracting label from the data.
218
+ * @internal
219
+ */
220
+ renderShapeLabel(data: ObjectData, labelProperty: string, strokeWidth: string, label: string, fill: string, stroke: string, font: FontSpec): SVGTextElement;
221
+ /**
222
+ * @internal
223
+ * @param type
224
+ * @param category
225
+ * @return {string}
226
+ */
227
+ _shapeKey(type: string, category?: string): string;
228
+ private _getLabelPositionAttributes;
229
+ private _shapesToFragments;
230
+ /**
231
+ * Returns a tag definition that can be used in a Surface's `tags` declaration. Note that this method returns an object containing the tag's implementation, but not the name of the tag. You can call the tag whatever you like.
232
+ * @internal
233
+ */
234
+ getShapeTagDefinition(isSvgContainer: boolean, strokeWidth?: number, includeLabel?: boolean, fontSpec?: FontSpec, labelAttribute?: string, defaultFillColor?: string, defaultOutlineColor?: string, defaultColor?: string, defaultOutlineWidth?: number): CustomTagOptions;
235
+ /**
236
+ * @internal
237
+ */
238
+ _defaultTemplate(): string;
239
+ /**
240
+ * Resolve an icon by its id and set id. If set id is null we just look for the first icon in our list
241
+ * from all sets with the given id. May return null.
242
+ * @param id
243
+ * @param setId
244
+ * @internal
245
+ */
246
+ private _resolveIcon;
247
+ /**
248
+ * Converts text element labels to multiline tspans, if multilineLabels is set to true (which is
249
+ * the default).
250
+ * @param labelElement
251
+ * @param data
252
+ * @param labelAttribute
253
+ * @internal
254
+ */
255
+ $applyMultilineLabel(labelElement: SVGTextElement, data: ObjectData, labelAttribute: string): void;
256
+ /**
257
+ * Check for any icons that were declared and render them.
258
+ * @param el
259
+ * @param data
260
+ * @internal
261
+ */
262
+ private _maybeRenderIcons;
263
+ parseDefs(): Array<Array<AbstractEntry>>;
264
+ getDefsElements(): Array<Element>;
265
+ getSvgDefsElement(): SVGElement;
266
+ }
@@ -0,0 +1,7 @@
1
+ import { ShapeSet } from "./shape-library-definitions";
2
+ /**
3
+ * Shapefile for basic shapes.
4
+ * @group Nodes and Groups
5
+ * @category Shape Libraries
6
+ */
7
+ export declare const BASIC_SHAPES: ShapeSet;
@@ -0,0 +1,7 @@
1
+ import { ShapeSet } from "./shape-library-definitions";
2
+ /**
3
+ * Shapefile for flowchart shapes.
4
+ * @group Nodes and Groups
5
+ * @category Shape Libraries
6
+ */
7
+ export declare const FLOWCHART_SHAPES: ShapeSet;
@@ -0,0 +1,8 @@
1
+ export declare const Storage: {
2
+ set: (key: string, value: any) => void;
3
+ get: (key: string) => any;
4
+ clear: (key: string) => void;
5
+ clearAll: () => void;
6
+ setJSON: (key: string, value: any) => void;
7
+ getJSON: (key: string) => any;
8
+ };
@@ -0,0 +1,64 @@
1
+ import { PathTransport, PathTransportListener } from './path-transport';
2
+ import { Surface } from "../surface";
3
+ import { Edge, Group, Vertex, Node, Path, OptimisticEventGenerator } from "../../../core";
4
+ import { BrowserElement } from "../../util";
5
+ import { OverlayAnimationOptions } from "./definitions";
6
+ import { OverlaySpec } from "../../../ui";
7
+ /**
8
+ * Offers several methods for animating parts of a Surface widget
9
+ * @group Components
10
+ * @category Surface
11
+ */
12
+ export declare class SurfaceAnimator extends OptimisticEventGenerator {
13
+ surface: Surface;
14
+ constructor(surface: Surface);
15
+ /**
16
+ * Animate the given vertex to the given [x,y] location.
17
+ * @param el
18
+ * @param x
19
+ * @param y
20
+ * @param animateOptions
21
+ *
22
+ */
23
+ animateToPosition(el: Node | Group | string | BrowserElement, x: number, y: number, animateOptions?: {
24
+ duration?: number;
25
+ start?: Function;
26
+ step?: Function;
27
+ complete?: Function;
28
+ }): void;
29
+ /**
30
+ * Traces an overlay along an edge.
31
+ * @param params Overlay tracing options
32
+ * @param params.edge Edge, or edge id, to trace the overlay along
33
+ * @param params.overlay Definition of the overlay to trace along the edge.
34
+ *
35
+ */
36
+ traceEdge(params: {
37
+ edge: Edge | string;
38
+ overlay: OverlaySpec;
39
+ options?: OverlayAnimationOptions;
40
+ start?: Function;
41
+ complete?: Function;
42
+ }): void;
43
+ /**
44
+ * Traces an overlay along a path.
45
+ * @param params Path tracing options
46
+ * @param params.path The path to trace. Provide this, or provide `source` and `target`
47
+ * @param params.overlay Definition of the overlay to trace along the path
48
+ * @param params.source Source vertex to trace Path from. Provide this and `target`, or `path`.
49
+ * @param params.target Target vertex to trace Path to. Provide this and `source`, or `path`.
50
+ * @param params.options Options for the animation.
51
+ * @param params.paused If true, the animation will start in a paused state.
52
+ * @param params.listener Optional listener for events.
53
+ *
54
+ */
55
+ tracePath(params: {
56
+ path?: Path;
57
+ source?: Vertex | string;
58
+ target: Vertex | string;
59
+ options?: OverlayAnimationOptions;
60
+ overlay: OverlaySpec;
61
+ paused?: boolean;
62
+ listener?: PathTransportListener;
63
+ }): PathTransport;
64
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Fired at the start of an animated path traversal.
3
+ * @group Paths
4
+ * @category Events
5
+ */
6
+ export declare const EVENT_START_OVERLAY_ANIMATION = "startOverlayAnimation";
7
+ /**
8
+ * Fired at the end of an animated path traversal.
9
+ * @group Paths
10
+ * @category Events
11
+ */
12
+ export declare const EVENT_END_OVERLAY_ANIMATION = "endOverlayAnimation";
13
+ /**
14
+ * Fired when entering a vertex during a path traversal
15
+ * @group Paths
16
+ * @category Events
17
+ */
18
+ export declare const EVENT_START_NODE_TRAVERSAL = "startNodeTraversal";
19
+ /**
20
+ * Fired when exiting a vertex during a path traversal
21
+ * @group Paths
22
+ * @category Events
23
+ */
24
+ export declare const EVENT_END_NODE_TRAVERSAL = "endNodeTraversal";
25
+ /**
26
+ * Assigned to the element that is the source of a path traversal animation.
27
+ * @group Paths
28
+ * @category CSS Classes
29
+ */
30
+ export declare const CLASS_VJS_ANIMATE_SOURCE = "vjs-animate-source";
31
+ /**
32
+ * Assigned to the element that is the target of a path traversal animation.
33
+ * @group Paths
34
+ * @category CSS Classes
35
+ */
36
+ export declare const CLASS_VJS_ANIMATE_TARGET = "vjs-animate-target";
37
+ /**
38
+ * Assigned to an element that a path traversal is currently passing through. The class is removed once the path traversal
39
+ * moves to the next edge, or finishes.
40
+ * @group Paths
41
+ * @category CSS Classes
42
+ */
43
+ export declare const CLASS_VJS_ANIMATE_VERTEX_TRAVERSING = "vjs-animate-node-traversing";
44
+ /**
45
+ * Assigned to an edge that a path traversal is currently travelling along. The class is removed once the path traversal
46
+ * moves to the next vertex, or finishes.
47
+ * @group Paths
48
+ * @category CSS Classes
49
+ */
50
+ export declare const CLASS_VJS_ANIMATE_EDGE_TRAVERSING = "vjs-animate-edge-traversing";
51
+ /**
52
+ * Assigned to all elements that will be traversed by a path traversal. The class is removed at the end of the animation.
53
+ * @group Paths
54
+ * @category CSS Classes
55
+ */
56
+ export declare const CLASS_VJS_ANIMATE_VERTEX_TRAVERSABLE = "vjs-animate-node-traversable";
57
+ /**
58
+ * Assigned to all edges that will be travelled along by a path traversal. The class is removed at the end of the animation.
59
+ * @group Paths
60
+ * @category CSS Classes
61
+ */
62
+ export declare const CLASS_VJS_ANIMATE_EDGE_TRAVERSABLE = "vjs-animate-edge-traversable";
63
+ /**
64
+ * Assigned to an element that has been traversed by a path traversal. The class is removed at the end of the animation.
65
+ * @group Paths
66
+ * @category CSS Classes
67
+ */
68
+ export declare const CLASS_VJS_ANIMATE_VERTEX_TRAVERSED = "vjs-animate-node-traversed";
69
+ /**
70
+ * Assigned to an edge that has been traversed by a path traversal. The class is removed at the end of the animation.
71
+ * @group Paths
72
+ * @category CSS Classes
73
+ */
74
+ export declare const CLASS_VJS_ANIMATE_EDGE_TRAVERSED = "vjs-animate-edge-traversed";