@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.
- package/css/visuallyjs-theme.css +148 -0
- package/css/visuallyjs.css +1879 -0
- package/js/visuallyjs.browser-ui.cjs.js +143 -0
- package/js/visuallyjs.browser-ui.esm.js +143 -0
- package/package.json +16 -0
- package/types/browser-ui/base-dom-ui-layout-adapter.d.ts +14 -0
- package/types/browser-ui/browser-ui.d.ts +95 -0
- package/types/browser-ui/browser-util.d.ts +233 -0
- package/types/browser-ui/browser-visuallyjs-instance.d.ts +881 -0
- package/types/browser-ui/canvas-layout-adapter.d.ts +15 -0
- package/types/browser-ui/collicat.d.ts +245 -0
- package/types/browser-ui/components/controls/controls-component.d.ts +137 -0
- package/types/browser-ui/components/controls/copy-paste-controls-component.d.ts +9 -0
- package/types/browser-ui/components/controls/css-classes.d.ts +79 -0
- package/types/browser-ui/components/controls/index.d.ts +4 -0
- package/types/browser-ui/components/controls/svg-export-component.d.ts +60 -0
- package/types/browser-ui/components/edge-type-picker/edge-type-picker.d.ts +37 -0
- package/types/browser-ui/components/edge-type-picker/index.d.ts +1 -0
- package/types/browser-ui/components/index.d.ts +4 -0
- package/types/browser-ui/components/inspector/color-picker-tag.d.ts +32 -0
- package/types/browser-ui/components/inspector/definitions.d.ts +114 -0
- package/types/browser-ui/components/inspector/edge-type-tag.d.ts +15 -0
- package/types/browser-ui/components/inspector/index.d.ts +6 -0
- package/types/browser-ui/components/inspector/inspector.d.ts +138 -0
- package/types/browser-ui/components/inspector/shape-type-inspector.d.ts +43 -0
- package/types/browser-ui/components/inspector/vanilla-inspector.d.ts +39 -0
- package/types/browser-ui/components/palette/index.d.ts +2 -0
- package/types/browser-ui/components/palette/palette-content-generator.d.ts +14 -0
- package/types/browser-ui/components/palette/palette-options.d.ts +159 -0
- package/types/browser-ui/components/palette/palette.d.ts +126 -0
- package/types/browser-ui/connector-editor.d.ts +65 -0
- package/types/browser-ui/connector-editors/anchors.d.ts +31 -0
- package/types/browser-ui/connector-editors/css-constants.d.ts +33 -0
- package/types/browser-ui/connector-editors/definitions.d.ts +74 -0
- package/types/browser-ui/connector-editors/editor-base.d.ts +177 -0
- package/types/browser-ui/connector-editors/index.d.ts +52 -0
- package/types/browser-ui/connector-editors/util.d.ts +33 -0
- package/types/browser-ui/connector-editors-bezier/bezier-editor.d.ts +82 -0
- package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +42 -0
- package/types/browser-ui/connector-editors-bezier/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/css-constants.d.ts +28 -0
- package/types/browser-ui/connector-editors-orthogonal/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/orthogonal-editor.d.ts +86 -0
- package/types/browser-ui/connector-editors-straight/auto-split-mode.d.ts +24 -0
- package/types/browser-ui/connector-editors-straight/click-split-mode.d.ts +20 -0
- package/types/browser-ui/connector-editors-straight/css-constants.d.ts +30 -0
- package/types/browser-ui/connector-editors-straight/definitions.d.ts +69 -0
- package/types/browser-ui/connector-editors-straight/index.d.ts +11 -0
- package/types/browser-ui/connector-editors-straight/straight-editor.d.ts +42 -0
- package/types/browser-ui/constants.d.ts +79 -0
- package/types/browser-ui/copy-paste/clipboard.d.ts +34 -0
- package/types/browser-ui/copy-paste/index.d.ts +2 -0
- package/types/browser-ui/copy-paste/transformer.d.ts +14 -0
- package/types/browser-ui/css-constants.d.ts +436 -0
- package/types/browser-ui/d.d.ts +2 -0
- package/types/browser-ui/definitions.d.ts +442 -0
- package/types/browser-ui/dialogs/binder.d.ts +49 -0
- package/types/browser-ui/dialogs/constants.d.ts +51 -0
- package/types/browser-ui/dialogs/dialogs.d.ts +30 -0
- package/types/browser-ui/dialogs/index.d.ts +3 -0
- package/types/browser-ui/drag-manager-2.d.ts +54 -0
- package/types/browser-ui/edge-handler-base.d.ts +168 -0
- package/types/browser-ui/edge-input-handler.d.ts +116 -0
- package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +22 -0
- package/types/browser-ui/edge-mappings/index.d.ts +1 -0
- package/types/browser-ui/edge-relocate-handler.d.ts +51 -0
- package/types/browser-ui/element-drag-handler-2.d.ts +254 -0
- package/types/browser-ui/element-dragger.d.ts +45 -0
- package/types/browser-ui/element-facade.d.ts +11 -0
- package/types/browser-ui/event-manager.d.ts +50 -0
- package/types/browser-ui/fixed-layer.d.ts +107 -0
- package/types/browser-ui/group-layout-adapter.d.ts +19 -0
- package/types/browser-ui/html-element-overlay.d.ts +32 -0
- package/types/browser-ui/icons/definitions.d.ts +59 -0
- package/types/browser-ui/icons/icon-renderer.d.ts +43 -0
- package/types/browser-ui/icons/index.d.ts +2 -0
- package/types/browser-ui/index.d.ts +48 -0
- package/types/browser-ui/pan-zoom-options.d.ts +262 -0
- package/types/browser-ui/pan-zoom.d.ts +674 -0
- package/types/browser-ui/paper-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/paper-renderer/index.d.ts +2 -0
- package/types/browser-ui/paper-renderer/paper.d.ts +50 -0
- package/types/browser-ui/pinch-listener.d.ts +33 -0
- package/types/browser-ui/plugins/background/available-backgrounds.d.ts +12 -0
- package/types/browser-ui/plugins/background/background-options.d.ts +62 -0
- package/types/browser-ui/plugins/background/background-plugin.d.ts +62 -0
- package/types/browser-ui/plugins/background/generated-grid-background.d.ts +230 -0
- package/types/browser-ui/plugins/background/index.d.ts +6 -0
- package/types/browser-ui/plugins/background/simple-background.d.ts +33 -0
- package/types/browser-ui/plugins/background/tiled-background.d.ts +118 -0
- package/types/browser-ui/plugins/browser-ui-plugin.d.ts +90 -0
- package/types/browser-ui/plugins/edge-routing/index.d.ts +66 -0
- package/types/browser-ui/plugins/index.d.ts +5 -0
- package/types/browser-ui/plugins/selected-edge-highlight/index.d.ts +1 -0
- package/types/browser-ui/plugins/selected-edge-highlight/selected-edge-highlight-plugin.d.ts +36 -0
- package/types/browser-ui/plugins/ui-states/index.d.ts +2 -0
- package/types/browser-ui/plugins/ui-states/ui-state.d.ts +14 -0
- package/types/browser-ui/plugins/ui-states/ui-states-plugin.d.ts +69 -0
- package/types/browser-ui/positioning-and-sizing-utils.d.ts +103 -0
- package/types/browser-ui/shape-library/index.d.ts +4 -0
- package/types/browser-ui/shape-library/shape-library-definitions.d.ts +243 -0
- package/types/browser-ui/shape-library/shape-library.d.ts +266 -0
- package/types/browser-ui/shape-library/shapes-basic.d.ts +7 -0
- package/types/browser-ui/shape-library/shapes-flowchart.d.ts +7 -0
- package/types/browser-ui/storage.d.ts +8 -0
- package/types/browser-ui/surface-renderer/anim/anim.d.ts +64 -0
- package/types/browser-ui/surface-renderer/anim/constants.d.ts +74 -0
- package/types/browser-ui/surface-renderer/anim/definitions.d.ts +134 -0
- package/types/browser-ui/surface-renderer/anim/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +23 -0
- package/types/browser-ui/surface-renderer/css-classes.d.ts +64 -0
- package/types/browser-ui/surface-renderer/decorators.d.ts +162 -0
- package/types/browser-ui/surface-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/surface-renderer/diagrams/constants.d.ts +28 -0
- package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +528 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-cell.d.ts +123 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +116 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-palette.d.ts +11 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +112 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +221 -0
- package/types/browser-ui/surface-renderer/diagrams/index.d.ts +25 -0
- package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +59 -0
- package/types/browser-ui/surface-renderer/diagrams/util.d.ts +15 -0
- package/types/browser-ui/surface-renderer/elastic-group-manager.d.ts +102 -0
- package/types/browser-ui/surface-renderer/index.d.ts +34 -0
- package/types/browser-ui/surface-renderer/params.d.ts +175 -0
- package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +26 -0
- package/types/browser-ui/surface-renderer/plugins/controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/drag-groups-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +25 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/index.d.ts +10 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso.d.ts +74 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/miniview-plugin.d.ts +235 -0
- package/types/browser-ui/surface-renderer/plugins/palette/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +17 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +55 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/border-drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +411 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/handle-gen.d.ts +15 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/resizing-tools-plugin.d.ts +185 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/util.d.ts +16 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +128 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/definitions.d.ts +90 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +64 -0
- package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +127 -0
- package/types/browser-ui/surface-renderer/shape-palette.d.ts +55 -0
- package/types/browser-ui/surface-renderer/surface-decorator.d.ts +35 -0
- package/types/browser-ui/surface-renderer/surface-events.d.ts +9 -0
- package/types/browser-ui/surface-renderer/surface-render-options.d.ts +125 -0
- package/types/browser-ui/surface-renderer/surface.d.ts +665 -0
- package/types/browser-ui/svg-component.d.ts +6 -0
- package/types/browser-ui/svg-element-connector.d.ts +16 -0
- package/types/browser-ui/svg-element-overlay.d.ts +55 -0
- package/types/browser-ui/svg-export/definitions.d.ts +153 -0
- package/types/browser-ui/svg-export/image-export-ui.d.ts +20 -0
- package/types/browser-ui/svg-export/image-exporter.d.ts +15 -0
- package/types/browser-ui/svg-export/index.d.ts +6 -0
- package/types/browser-ui/svg-export/svg-export-ui.d.ts +11 -0
- package/types/browser-ui/svg-export/svg-exporter.d.ts +8 -0
- package/types/browser-ui/svg-export/util.d.ts +23 -0
- package/types/browser-ui/svg-util.d.ts +27 -0
- package/types/browser-ui/templating/browser-ui-recado.d.ts +48 -0
- package/types/browser-ui/templating/custom-tag-definition.d.ts +32 -0
- package/types/browser-ui/templating/index.d.ts +11 -0
- package/types/browser-ui/templating/recado-template-renderer.d.ts +69 -0
- package/types/browser-ui/ui-path.d.ts +57 -0
- package/types/browser-ui/util.d.ts +4 -0
- package/types/browser-ui/wheel-listener.d.ts +2 -0
- package/types/charts/area/area-chart.d.ts +85 -0
- package/types/charts/area/index.d.ts +1 -0
- package/types/charts/bar-and-column/bar-chart.d.ts +34 -0
- package/types/charts/bar-and-column/bar-plot.d.ts +90 -0
- package/types/charts/bar-and-column/column-chart.d.ts +35 -0
- package/types/charts/bar-and-column/index.d.ts +3 -0
- package/types/charts/base-chart.d.ts +395 -0
- package/types/charts/base-xy-chart.d.ts +224 -0
- package/types/charts/bubble/bubble-chart.d.ts +30 -0
- package/types/charts/bubble/definitions.d.ts +32 -0
- package/types/charts/bubble/index.d.ts +2 -0
- package/types/charts/category-value-chart.d.ts +146 -0
- package/types/charts/chart-exporter.d.ts +38 -0
- package/types/charts/chart-zoom-controls.d.ts +23 -0
- package/types/charts/constants.d.ts +16 -0
- package/types/charts/css-classes.d.ts +312 -0
- package/types/charts/datasource.d.ts +61 -0
- package/types/charts/definitions.d.ts +261 -0
- package/types/charts/domain_scale_utilities.d.ts +72 -0
- package/types/charts/dual-value-chart.d.ts +60 -0
- package/types/charts/gauge/definitions.d.ts +108 -0
- package/types/charts/gauge/gauge-chart.d.ts +91 -0
- package/types/charts/gauge/index.d.ts +2 -0
- package/types/charts/index.d.ts +25 -0
- package/types/charts/legend.d.ts +120 -0
- package/types/charts/line/index.d.ts +1 -0
- package/types/charts/line/line-chart.d.ts +79 -0
- package/types/charts/markers.d.ts +13 -0
- package/types/charts/pie/index.d.ts +1 -0
- package/types/charts/pie/pie-chart.d.ts +146 -0
- package/types/charts/plot.d.ts +75 -0
- package/types/charts/sankey/index.d.ts +1 -0
- package/types/charts/sankey/preprocessor.d.ts +37 -0
- package/types/charts/sankey/sankey.d.ts +208 -0
- package/types/charts/scatter/definitions.d.ts +6 -0
- package/types/charts/scatter/index.d.ts +2 -0
- package/types/charts/scatter/scatter-chart.d.ts +16 -0
- package/types/charts/series/array-based-series.d.ts +95 -0
- package/types/charts/series/collation-series.d.ts +24 -0
- package/types/charts/series/definitions.d.ts +52 -0
- package/types/charts/series/dual-value-chart-series.d.ts +26 -0
- package/types/charts/series/index.d.ts +7 -0
- package/types/charts/series/record-based-series.d.ts +58 -0
- package/types/charts/series/series.d.ts +66 -0
- package/types/charts/series/summing-collation-series.d.ts +31 -0
- package/types/charts/series/summing-series.d.ts +19 -0
- package/types/charts/series-based-chart.d.ts +59 -0
- package/types/charts/tooltip.d.ts +167 -0
- package/types/charts/util.d.ts +149 -0
- package/types/core/astar/astar-path-finder.d.ts +37 -0
- package/types/core/astar/astar-util.d.ts +100 -0
- package/types/core/astar/candidate-finder.d.ts +16 -0
- package/types/core/astar/candidate-sorter.d.ts +10 -0
- package/types/core/astar/definitions.d.ts +185 -0
- package/types/core/astar/index.d.ts +3 -0
- package/types/core/astar/path-to-segments.d.ts +45 -0
- package/types/core/autosaver.d.ts +67 -0
- package/types/core/color-generator.d.ts +66 -0
- package/types/core/constants.d.ts +181 -0
- package/types/core/csv-loader.d.ts +84 -0
- package/types/core/datamodel/data-model.d.ts +23 -0
- package/types/core/datamodel/vertex-definition.d.ts +40 -0
- package/types/core/datasource.d.ts +87 -0
- package/types/core/event-constants.d.ts +308 -0
- package/types/core/event-generator.d.ts +102 -0
- package/types/core/filterable-dataset.d.ts +38 -0
- package/types/core/geom.d.ts +278 -0
- package/types/core/index.d.ts +39 -0
- package/types/core/io.d.ts +106 -0
- package/types/core/layout/absolute-layout.d.ts +91 -0
- package/types/core/layout/abstract-layout-adapter.d.ts +17 -0
- package/types/core/layout/abstract-layout.d.ts +192 -0
- package/types/core/layout/circular/circular-layout.d.ts +31 -0
- package/types/core/layout/circular/index.d.ts +1 -0
- package/types/core/layout/empty-layout.d.ts +17 -0
- package/types/core/layout/force-directed/force-directed-layout.d.ts +148 -0
- package/types/core/layout/force-directed/index.d.ts +1 -0
- package/types/core/layout/grid/definitions.d.ts +81 -0
- package/types/core/layout/grid/grid-layout.d.ts +60 -0
- package/types/core/layout/grid/index.d.ts +2 -0
- package/types/core/layout/hierarchical/abstract-hierarchical-layout.d.ts +90 -0
- package/types/core/layout/hierarchical/balloon-layout.d.ts +62 -0
- package/types/core/layout/hierarchical/definitions.d.ts +45 -0
- package/types/core/layout/hierarchical/hierarchical-layout.d.ts +102 -0
- package/types/core/layout/hierarchical/index.d.ts +5 -0
- package/types/core/layout/hierarchical/parent-relative-placement.d.ts +96 -0
- package/types/core/layout/hierarchy/assign-layers-stage.d.ts +26 -0
- package/types/core/layout/hierarchy/crossing-stage.d.ts +78 -0
- package/types/core/layout/hierarchy/definitions.d.ts +261 -0
- package/types/core/layout/hierarchy/edge-routing.d.ts +25 -0
- package/types/core/layout/hierarchy/hierarchy-layout-stage.d.ts +9 -0
- package/types/core/layout/hierarchy/hierarchy-layout.d.ts +87 -0
- package/types/core/layout/hierarchy/index.d.ts +11 -0
- package/types/core/layout/hierarchy/model.d.ts +167 -0
- package/types/core/layout/hierarchy/parent-relative-placement.d.ts +69 -0
- package/types/core/layout/hierarchy/placement-stage.d.ts +82 -0
- package/types/core/layout/hierarchy/util.d.ts +13 -0
- package/types/core/layout/hierarchy/vertex-set.d.ts +45 -0
- package/types/core/layout/index.d.ts +10 -0
- package/types/core/layout/layouts.d.ts +10 -0
- package/types/core/magnetizer.d.ts +232 -0
- package/types/core/model/anchor.d.ts +38 -0
- package/types/core/model/cluster.d.ts +19 -0
- package/types/core/model/defs.d.ts +8 -0
- package/types/core/model/djikstra.d.ts +26 -0
- package/types/core/model/floyd-warshall.d.ts +15 -0
- package/types/core/model/graph.d.ts +1166 -0
- package/types/core/model/path.d.ts +227 -0
- package/types/core/params.d.ts +476 -0
- package/types/core/renderer.d.ts +74 -0
- package/types/core/router/common.d.ts +104 -0
- package/types/core/router/direct-router.d.ts +12 -0
- package/types/core/router/index.d.ts +3 -0
- package/types/core/router/orthogonal-router.d.ts +46 -0
- package/types/core/rtree/definitions.d.ts +24 -0
- package/types/core/rtree/hilbert.d.ts +9 -0
- package/types/core/rtree/index.d.ts +4 -0
- package/types/core/rtree/rtree.d.ts +102 -0
- package/types/core/rtree/util.d.ts +55 -0
- package/types/core/search/index.d.ts +1 -0
- package/types/core/search/visuallyjs-search.d.ts +167 -0
- package/types/core/selection.d.ts +394 -0
- package/types/core/templates/abstract-entry.d.ts +19 -0
- package/types/core/templates/comment-entry.d.ts +11 -0
- package/types/core/templates/core.d.ts +162 -0
- package/types/core/templates/custom-tag.d.ts +74 -0
- package/types/core/templates/defs.d.ts +123 -0
- package/types/core/templates/each-entry.d.ts +23 -0
- package/types/core/templates/element-entry.d.ts +18 -0
- package/types/core/templates/elements.d.ts +14 -0
- package/types/core/templates/executions.d.ts +100 -0
- package/types/core/templates/expressions.d.ts +47 -0
- package/types/core/templates/fake-dom.d.ts +42 -0
- package/types/core/templates/headless.d.ts +15 -0
- package/types/core/templates/if-entry.d.ts +25 -0
- package/types/core/templates/index.d.ts +14 -0
- package/types/core/templates/parser.d.ts +84 -0
- package/types/core/templates/text-entry.d.ts +17 -0
- package/types/core/templates/tmpl-entry.d.ts +13 -0
- package/types/core/toolkit.d.ts +1314 -0
- package/types/core/undo-redo/compound-action.d.ts +19 -0
- package/types/core/undo-redo/edge-action.d.ts +62 -0
- package/types/core/undo-redo/group-action.d.ts +60 -0
- package/types/core/undo-redo/move-action.d.ts +18 -0
- package/types/core/undo-redo/node-group-action.d.ts +62 -0
- package/types/core/undo-redo/port-action.d.ts +29 -0
- package/types/core/undo-redo/renderer-vertex-removed-action.d.ts +17 -0
- package/types/core/undo-redo/set-type-action.d.ts +14 -0
- package/types/core/undo-redo/undo-redo.d.ts +203 -0
- package/types/core/undo-redo/update-action.d.ts +20 -0
- package/types/core/undo-redo/vertex-update-action.d.ts +12 -0
- package/types/core/util.d.ts +661 -0
- package/types/index.d.ts +16 -0
- package/types/l.d.ts +2 -0
- package/types/test-support/index.d.ts +1 -0
- package/types/test-support/test-support.d.ts +833 -0
- package/types/ui/common/abstract-segment.d.ts +88 -0
- package/types/ui/common/anchor.d.ts +280 -0
- package/types/ui/common/connector.d.ts +106 -0
- package/types/ui/common/index.d.ts +5 -0
- package/types/ui/common/overlay.d.ts +117 -0
- package/types/ui/common/paint-style.d.ts +33 -0
- package/types/ui/connector-bezier/abstract-bezier-connector.d.ts +68 -0
- package/types/ui/connector-bezier/bezier-connector.d.ts +34 -0
- package/types/ui/connector-bezier/bezier-segment.d.ts +31 -0
- package/types/ui/connector-bezier/bezier.d.ts +129 -0
- package/types/ui/connector-bezier/index.d.ts +6 -0
- package/types/ui/connector-bezier/operations.d.ts +18 -0
- package/types/ui/connector-bezier/quadratic-bezier-connector.d.ts +35 -0
- package/types/ui/connector-orthogonal/default-orthogonal-path-compute.d.ts +11 -0
- package/types/ui/connector-orthogonal/definitions.d.ts +120 -0
- package/types/ui/connector-orthogonal/index.d.ts +7 -0
- package/types/ui/connector-orthogonal/modern-source-target-relocator.d.ts +37 -0
- package/types/ui/connector-orthogonal/operations.d.ts +49 -0
- package/types/ui/connector-orthogonal/stub-calculators.d.ts +12 -0
- package/types/ui/connector-orthogonal/utils.d.ts +134 -0
- package/types/ui/connector-orthogonal/vertex-avoidance.d.ts +29 -0
- package/types/ui/connector-straight/index.d.ts +2 -0
- package/types/ui/connector-straight/operations.d.ts +55 -0
- package/types/ui/connector-straight/straight-connector.d.ts +121 -0
- package/types/ui/copy-paste/clipboard.d.ts +45 -0
- package/types/ui/copy-paste/copy-data.d.ts +93 -0
- package/types/ui/copy-paste/index.d.ts +2 -0
- package/types/ui/core/callbacks.d.ts +48 -0
- package/types/ui/core/component/component.d.ts +115 -0
- package/types/ui/core/connector/abstract-connector.d.ts +66 -0
- package/types/ui/core/connector/arc-segment.d.ts +39 -0
- package/types/ui/core/connector/connection-impl.d.ts +81 -0
- package/types/ui/core/connector/connections.d.ts +113 -0
- package/types/ui/core/connector/connectors.d.ts +205 -0
- package/types/ui/core/connector/operations.d.ts +0 -0
- package/types/ui/core/connector/segments.d.ts +24 -0
- package/types/ui/core/connector/straight-segment.d.ts +32 -0
- package/types/ui/core/constants.d.ts +181 -0
- package/types/ui/core/context.d.ts +26 -0
- package/types/ui/core/core-events.d.ts +7 -0
- package/types/ui/core/core.d.ts +1734 -0
- package/types/ui/core/css-constants.d.ts +149 -0
- package/types/ui/core/defaults.d.ts +242 -0
- package/types/ui/core/definitions.d.ts +540 -0
- package/types/ui/core/event-constants.d.ts +510 -0
- package/types/ui/core/factory/anchor-record-factory.d.ts +17 -0
- package/types/ui/core/factory/continuous-anchors.d.ts +27 -0
- package/types/ui/core/factory/overlay-factory.d.ts +8 -0
- package/types/ui/core/grid-profile.d.ts +28 -0
- package/types/ui/core/group-collapse-expand.d.ts +23 -0
- package/types/ui/core/group-sizer.d.ts +9 -0
- package/types/ui/core/index.d.ts +45 -0
- package/types/ui/core/magnetize-profile.d.ts +82 -0
- package/types/ui/core/overlay/arrow-overlay.d.ts +34 -0
- package/types/ui/core/overlay/custom-overlay.d.ts +38 -0
- package/types/ui/core/overlay/diamond-overlay.d.ts +14 -0
- package/types/ui/core/overlay/dot-overlay.d.ts +54 -0
- package/types/ui/core/overlay/ellipse-overlay.d.ts +60 -0
- package/types/ui/core/overlay/label-overlay.d.ts +37 -0
- package/types/ui/core/overlay/overlay.d.ts +131 -0
- package/types/ui/core/overlay/plain-arrow-overlay.d.ts +15 -0
- package/types/ui/core/overlay/rectangle-overlay.d.ts +66 -0
- package/types/ui/core/params.d.ts +223 -0
- package/types/ui/core/router/astar-path-finder.d.ts +29 -0
- package/types/ui/core/router/base-router.d.ts +100 -0
- package/types/ui/core/router/default-router.d.ts +38 -0
- package/types/ui/core/router/index.d.ts +5 -0
- package/types/ui/core/router/router-utils.d.ts +118 -0
- package/types/ui/core/router/router.d.ts +30 -0
- package/types/ui/core/type-descriptors.d.ts +83 -0
- package/types/ui/core/ui-model.d.ts +65 -0
- package/types/ui/core/view/common-options.d.ts +15 -0
- package/types/ui/core/view/edge-options.d.ts +126 -0
- package/types/ui/core/view/events.d.ts +159 -0
- package/types/ui/core/view/group-options.d.ts +75 -0
- package/types/ui/core/view/index.d.ts +35 -0
- package/types/ui/core/view/node-options.d.ts +20 -0
- package/types/ui/core/view/node-or-port-options.d.ts +28 -0
- package/types/ui/core/view/port-options.d.ts +51 -0
- package/types/ui/core/view/vertex-options.d.ts +28 -0
- package/types/ui/core/viewport.d.ts +297 -0
- package/types/ui/index.d.ts +9 -0
- package/types/ui/plugins/definitions.d.ts +118 -0
- package/types/ui/plugins/index.d.ts +2 -0
- package/types/ui/plugins/plugins.d.ts +7 -0
- package/types/ui/property-mappings/definitions.d.ts +28 -0
- package/types/ui/property-mappings/index.d.ts +2 -0
- package/types/ui/property-mappings/property-mapper.d.ts +16 -0
- package/types/ui/util/index.d.ts +3 -0
- package/types/ui/util/property-tracker.d.ts +8 -0
- package/types/ui/util/svg-constants.d.ts +111 -0
- package/types/ui/util/util.d.ts +69 -0
- package/types/version.d.ts +1 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { HasId } from "./model/graph";
|
|
2
|
+
import { PointXY, Size, BoundingBox, Grid } from "./util";
|
|
3
|
+
/**
|
|
4
|
+
* Result value from a run of a {@link Magnetizer}.
|
|
5
|
+
* @group Components
|
|
6
|
+
* @category Magnetizer
|
|
7
|
+
*/
|
|
8
|
+
export type MagnetizeResult = {
|
|
9
|
+
/**
|
|
10
|
+
* Original positions of elements
|
|
11
|
+
*/
|
|
12
|
+
original: Record<string, PointXY>;
|
|
13
|
+
/**
|
|
14
|
+
* New positions for elements.
|
|
15
|
+
*/
|
|
16
|
+
current: Record<string, PointXY>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Options for a run of a {@link Magnetizer}
|
|
20
|
+
* @group Components
|
|
21
|
+
* @category Magnetizer
|
|
22
|
+
*/
|
|
23
|
+
export interface MagnetizerRunOptions<T> {
|
|
24
|
+
/**
|
|
25
|
+
* Element to use as the focus for the magnetize operation. This means its center will be the focus point, and also that it will not be moved
|
|
26
|
+
*/
|
|
27
|
+
focus?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional set of known locations for elements that we want to use. We use this when provisionally setting some element's position - we want to use a new value rather than the current position.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
knownLocations?: Record<string, PointXY>;
|
|
33
|
+
/**
|
|
34
|
+
* Optional set of known sizes for elements that we want to use.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
knownSizes?: Record<string, Size>;
|
|
38
|
+
/**
|
|
39
|
+
* Optional value for the padding to leave between elements. Defaults to 20 pixels in each axis.
|
|
40
|
+
*/
|
|
41
|
+
padding?: PointXY;
|
|
42
|
+
/**
|
|
43
|
+
* Optional origin to use for magnetization process. If not provided, the computed center of the all elements to be magnetized will be used instead.
|
|
44
|
+
*/
|
|
45
|
+
origin?: PointXY;
|
|
46
|
+
/**
|
|
47
|
+
* List of elements to magnetize. If not provided, the magnetizer's current element list is used.
|
|
48
|
+
*/
|
|
49
|
+
elements?: Record<string, T> | Array<T>;
|
|
50
|
+
/**
|
|
51
|
+
* Optional function used to filter elements from being affected by the magnetizer. They are still taken into account when magnetizing the other elements, unless you set `excludeFocus:true`.
|
|
52
|
+
*/
|
|
53
|
+
filter?: FilterFunction<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Number of iterations to run for. More iterations takes longer but does better magnetizing.
|
|
56
|
+
*/
|
|
57
|
+
iterations?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Optional function used to determine which elements to completely exclude from the magnetizer - they are treated as if they do not exist, and other elements may end up positioned intersecting them.
|
|
60
|
+
*/
|
|
61
|
+
exclude?: FilterFunction<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Defaults to false. If true, the magnetizer works in reverse: elements are gathered together (without overlapping)
|
|
64
|
+
*/
|
|
65
|
+
gather?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Optional function used to constrain the movement of elements when the magnetizer is being applied.
|
|
68
|
+
*/
|
|
69
|
+
constrain?: MagnetizerConstrainFunction;
|
|
70
|
+
/**
|
|
71
|
+
* Optional grid to constrain movement to.
|
|
72
|
+
*/
|
|
73
|
+
grid?: Grid;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
* @param el
|
|
77
|
+
*/
|
|
78
|
+
getPosition?: (el: T) => PointXY;
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @param el
|
|
82
|
+
*/
|
|
83
|
+
getSize?: (el: T) => Size;
|
|
84
|
+
/**
|
|
85
|
+
* Threshold beyond which the magnetizer will not attempt to track some element back to its original position. In some cases a user might want to push an element using the magnetizer and have the changes stick. Defaults to Infinity.
|
|
86
|
+
*/
|
|
87
|
+
trackbackThreshold?: number;
|
|
88
|
+
/**
|
|
89
|
+
* If this is set, the magnetizer will not run trackbacks this time it is run.
|
|
90
|
+
*/
|
|
91
|
+
invertTrackbackPreference?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Options for {@link Magnetizer} configuration.
|
|
95
|
+
* @group Components
|
|
96
|
+
* @category Magnetizer
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
export interface MagnetizerOptions<T> {
|
|
100
|
+
/**
|
|
101
|
+
* List of elements to magnetize. If not provided, the magnetizer's current element list is used.
|
|
102
|
+
*/
|
|
103
|
+
elements?: Record<string, T> | Array<T>;
|
|
104
|
+
container?: any;
|
|
105
|
+
getSize: (el: T) => Size;
|
|
106
|
+
getId: (el: T) => string;
|
|
107
|
+
positionGetter: (el: T) => PointXY;
|
|
108
|
+
positionSetter: (el: T, p: PointXY) => any;
|
|
109
|
+
/**
|
|
110
|
+
* Optional function used to constrain the movement of elements when the magnetizer is being applied.
|
|
111
|
+
*/
|
|
112
|
+
constrain?: MagnetizerConstrainFunction;
|
|
113
|
+
/**
|
|
114
|
+
* Optional function used to filter elements from being affected by the magnetizer. They are still taken into account when magnetizing the other elements, unless you set `excludeFocus:true`.
|
|
115
|
+
*/
|
|
116
|
+
filter?: FilterFunction<T>;
|
|
117
|
+
/**
|
|
118
|
+
* Optional function used to determine which elements to completely exclude from the magnetizer - they are treated as if they do not exist, and other elements may end up positioned intersecting them.
|
|
119
|
+
*/
|
|
120
|
+
exclude?: FilterFunction<T>;
|
|
121
|
+
}
|
|
122
|
+
export declare function calculateSpacingAdjustment(r1: BoundingBox, r2: BoundingBox): PointXY;
|
|
123
|
+
export type MagnetizerConstrainFunction = (id: string, current: PointXY, delta: PointXY) => PointXY;
|
|
124
|
+
export type FilterFunction<T> = (id: string, v: T) => boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Offers a means to apply 'magnetization' to some list of elements, pushing them apart so that they do not overlap. For a given run of the magnetizer there is the concept of a "focus" rectangle. The center of this rectangle is the point from which magnetization occurs, with elements being pushed out radially from this point. There are a few different scenarios:
|
|
127
|
+
*
|
|
128
|
+
* - execute magnetizer with a given origin, and affect all elements
|
|
129
|
+
* - execute magnetizer on all elements, having first computed the center of them
|
|
130
|
+
* - execute magnetizer using a specific element as the focus
|
|
131
|
+
*
|
|
132
|
+
* @group Components
|
|
133
|
+
*/
|
|
134
|
+
export declare class Magnetizer<T extends HasId> {
|
|
135
|
+
private _origin;
|
|
136
|
+
private _elements;
|
|
137
|
+
private readonly _constrain;
|
|
138
|
+
private readonly _filter;
|
|
139
|
+
private readonly _exclude;
|
|
140
|
+
private _focusElement;
|
|
141
|
+
private readonly _defaultGetSize;
|
|
142
|
+
private readonly _getId;
|
|
143
|
+
private readonly _defaultGetPosition;
|
|
144
|
+
private readonly _positionSetter;
|
|
145
|
+
private _positionArray;
|
|
146
|
+
private _positions;
|
|
147
|
+
private _originalPositions;
|
|
148
|
+
private _trackedPositions;
|
|
149
|
+
private _trackedMovements;
|
|
150
|
+
private _tracking;
|
|
151
|
+
private _trackbackThreshold;
|
|
152
|
+
private _sizes;
|
|
153
|
+
constructor(params: MagnetizerOptions<T>);
|
|
154
|
+
/**
|
|
155
|
+
* Run the magnetizer using the specified origin.
|
|
156
|
+
* @param origin
|
|
157
|
+
* @param options
|
|
158
|
+
*/
|
|
159
|
+
executeAtPoint(origin: PointXY, options?: MagnetizerRunOptions<T>): MagnetizeResult;
|
|
160
|
+
/**
|
|
161
|
+
* Run the magnetizer using an origin computed to be the center of all elements.
|
|
162
|
+
* @param options
|
|
163
|
+
*/
|
|
164
|
+
executeAtCenter(options?: MagnetizerRunOptions<T>): MagnetizeResult;
|
|
165
|
+
/**
|
|
166
|
+
* Run the magnetizer with the given element as its focus - the focus element will not be shifted.
|
|
167
|
+
* @param focus
|
|
168
|
+
* @param options
|
|
169
|
+
*/
|
|
170
|
+
executeWithFocus(focus: string, options?: MagnetizerRunOptions<T>): MagnetizeResult;
|
|
171
|
+
/**
|
|
172
|
+
* Snaps all elements to a grid. Returns a map of element IDs, representing all the elements that were moved.
|
|
173
|
+
* @param grid
|
|
174
|
+
*/
|
|
175
|
+
snapToGrid(grid: Grid): MagnetizeResult;
|
|
176
|
+
setElements(_els: Array<T>): Magnetizer<T>;
|
|
177
|
+
startTracking(_els: Array<T>, attemptTrackback: boolean, trackbackThreshold: number): Magnetizer<T>;
|
|
178
|
+
stopTracking(): void;
|
|
179
|
+
addElement(el: T, doNotTestForDuplicates?: boolean): this;
|
|
180
|
+
addElements(els: Array<T>, doNotTestForDuplicates?: boolean): this;
|
|
181
|
+
removeElement(el: T): Magnetizer<T>;
|
|
182
|
+
reset(): void;
|
|
183
|
+
private _setOrigin;
|
|
184
|
+
private _updatePositions;
|
|
185
|
+
private _computeExtents;
|
|
186
|
+
/**
|
|
187
|
+
* Attempt to track the given element back from its current position
|
|
188
|
+
* to its original position. We draw a line from the current center
|
|
189
|
+
* to the original center and divide it into a number of steps of roughly
|
|
190
|
+
* 10 pixels. Then we traverse that center line - from the current position -
|
|
191
|
+
* and check for overlap at each location. As soon as there is overlap we stop,
|
|
192
|
+
* and use the furthest point we managed to get to, updating _movedElements
|
|
193
|
+
* at the same time. If we get all the way to the final position without encountering
|
|
194
|
+
* any obstructions we remove the id from _trackedPositions, as it is now
|
|
195
|
+
* back in its original spot. Note that we do not start testing for
|
|
196
|
+
* obstructions in the original location - because it would be possible
|
|
197
|
+
* for an element to appear to pass right through other elements. To make
|
|
198
|
+
* the effect natural it has to work in the way that elements cannot traverse
|
|
199
|
+
* back to their original position as long as there is something obstructing the path.
|
|
200
|
+
* @param id
|
|
201
|
+
* @private
|
|
202
|
+
*/
|
|
203
|
+
private _attemptTrackBack;
|
|
204
|
+
/**
|
|
205
|
+
* If we're in `trackinq` mode and there are some elements that are not in the position they were
|
|
206
|
+
* in at the start of tracking, attempt to track elements back to their original positions. The approach is
|
|
207
|
+
* to cycle through each moved element one at a time and attempt to track it back to its original position.
|
|
208
|
+
* That operation will either be 1) wholly successful, in which case we remove that element from our
|
|
209
|
+
* Set of elements that have moved and update the stored position, as well as add that element to
|
|
210
|
+
* the map of moved elements; 2) partially successful, in which we case we store the new position and add
|
|
211
|
+
* the element to movedElements, or 3) not successful at all. We run a while loop, inside of which we
|
|
212
|
+
* repeatedly iterate the trackedElements set and try to reposition the items. If we get a run where
|
|
213
|
+
* none of the tracked elements were moved then that's the end of this attempt, and we exit. This approach
|
|
214
|
+
* allows us to not have to worry about the order in which elements were moved from their original
|
|
215
|
+
* position, as we incrementally push them all back.
|
|
216
|
+
* @internal
|
|
217
|
+
* @param _movedElements
|
|
218
|
+
* @param p
|
|
219
|
+
* @param e
|
|
220
|
+
* @param g
|
|
221
|
+
*/
|
|
222
|
+
private _runTrackbacks;
|
|
223
|
+
private _run;
|
|
224
|
+
private _gather;
|
|
225
|
+
private _magnetize;
|
|
226
|
+
private _positionElements;
|
|
227
|
+
/**
|
|
228
|
+
* Sort the elements by their distance from the origin. note that right now this is the distance from a point, but ideally this distance would be from the element to the focus, which can be an element. keep that in mind when doing the other gather cases. This sort routine tests each corner of each element, and uses the corner that is closest to the origin as that element's distance from the origin.
|
|
229
|
+
* @private
|
|
230
|
+
*/
|
|
231
|
+
private _sortPositionsByDistanceFromOrigin;
|
|
232
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Definition of an Anchor. This is the type that VisuallyJs converts all others to internally.
|
|
3
|
+
* @group Edges
|
|
4
|
+
*/
|
|
5
|
+
export type ObjectAnchorSpec = {
|
|
6
|
+
/**
|
|
7
|
+
* Location of the anchor in the X axis as a proportion of the element's width
|
|
8
|
+
*/
|
|
9
|
+
x: number;
|
|
10
|
+
/**
|
|
11
|
+
* Location of the anchor in the Y axis as a proportion of the element's width
|
|
12
|
+
*/
|
|
13
|
+
y: number;
|
|
14
|
+
/**
|
|
15
|
+
* Orientation of the anchor in the X axis.
|
|
16
|
+
*/
|
|
17
|
+
ox: AnchorOrientationHint;
|
|
18
|
+
/**
|
|
19
|
+
* Orientation of the anchor in the Y axis.
|
|
20
|
+
*/
|
|
21
|
+
oy: AnchorOrientationHint;
|
|
22
|
+
/**
|
|
23
|
+
* Optional offset to apply to the anchor position in the X axis after computing it via the `x` property. This value is in canvas coordinates.
|
|
24
|
+
*/
|
|
25
|
+
offsetX?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Optional offset to apply to the anchor position in the Y axis after computing it via the `y` property. This value is in canvas coordinates.
|
|
28
|
+
*/
|
|
29
|
+
offsetY?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional port ID to associate with this anchor.
|
|
32
|
+
*/
|
|
33
|
+
portId?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Hints for anchor orientation: -1 means "go backwards in this axis", 0 means no preference, and 1 means "go forwards in this axis".
|
|
37
|
+
*/
|
|
38
|
+
export type AnchorOrientationHint = -1 | 0 | 1;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Edge, Vertex } from "./graph";
|
|
2
|
+
/**
|
|
3
|
+
* Models a group of vertices that, in some context, belong together. The determination of the context is up to the call site.
|
|
4
|
+
* @group Data Model
|
|
5
|
+
* @category Graph Objects
|
|
6
|
+
*/
|
|
7
|
+
export declare class Cluster {
|
|
8
|
+
/**
|
|
9
|
+
* Vertices in the cluster
|
|
10
|
+
*/
|
|
11
|
+
vertices: Array<Vertex>;
|
|
12
|
+
private _edges;
|
|
13
|
+
constructor(seed: Vertex);
|
|
14
|
+
addVertex(v: Vertex): void;
|
|
15
|
+
/**
|
|
16
|
+
* Edges in the cluster
|
|
17
|
+
*/
|
|
18
|
+
get edges(): Array<Edge>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Vertex, Edge } from "./graph";
|
|
2
|
+
import { IGraph } from "./defs";
|
|
3
|
+
export interface DjikstraOptions {
|
|
4
|
+
graph: IGraph;
|
|
5
|
+
source: Vertex;
|
|
6
|
+
target: Vertex;
|
|
7
|
+
sourceId?: string;
|
|
8
|
+
targetId?: string;
|
|
9
|
+
nodeFilter?: Function;
|
|
10
|
+
edgeFilter?: Function;
|
|
11
|
+
processAll?: boolean;
|
|
12
|
+
strict?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ShortestPathComponent {
|
|
15
|
+
vertex: Vertex;
|
|
16
|
+
cost: number;
|
|
17
|
+
edge: Edge;
|
|
18
|
+
}
|
|
19
|
+
export interface ShortestPathResult {
|
|
20
|
+
path?: Array<ShortestPathComponent>;
|
|
21
|
+
pathDistance?: number;
|
|
22
|
+
dist?: Record<string, number>;
|
|
23
|
+
edges?: Record<string, Edge>;
|
|
24
|
+
previous?: Record<string, Vertex>;
|
|
25
|
+
}
|
|
26
|
+
export declare function djikstra(params: DjikstraOptions): ShortestPathResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Graph, Vertex } from "./graph";
|
|
2
|
+
export interface FloydWarshallOptions {
|
|
3
|
+
graph: Graph;
|
|
4
|
+
focus?: Vertex;
|
|
5
|
+
}
|
|
6
|
+
export interface FloydWarshallResult {
|
|
7
|
+
paths: any;
|
|
8
|
+
parents: any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Implementation of the Floyd-Warshall algorithm, which finds the shortest paths between all pairs of vertices in a weighted graph.
|
|
12
|
+
* @param params
|
|
13
|
+
* @group Data Model
|
|
14
|
+
*/
|
|
15
|
+
export declare function floydWarshall(params: FloydWarshallOptions): FloydWarshallResult;
|