@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,223 @@
|
|
|
1
|
+
import { ConnectorSpec, PaintStyle, OverlaySpec, AnchorSpec, LightweightAnchor } from "../common";
|
|
2
|
+
import { Extents, PointXY, Size, Edge, Group, Node, VisuallyJsRenderer, AbstractLayout, GradientSpec } from "../../core";
|
|
3
|
+
/**
|
|
4
|
+
* Options for the `connect` call on a UICore
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface ConnectParams<E> {
|
|
8
|
+
/**
|
|
9
|
+
* If true, the router should try to route this connection around
|
|
10
|
+
* any vertices that lie in its path.
|
|
11
|
+
*/
|
|
12
|
+
avoidVertices?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Source element for the connection
|
|
15
|
+
*/
|
|
16
|
+
source?: E;
|
|
17
|
+
/**
|
|
18
|
+
* target element for the connection
|
|
19
|
+
*/
|
|
20
|
+
target?: E;
|
|
21
|
+
/**
|
|
22
|
+
* Whether or not the connection is detachable. Defaults to true.
|
|
23
|
+
*/
|
|
24
|
+
detachable?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not to delete the connection's endpoints when this connection is detached. Defaults to false. Does not
|
|
27
|
+
* delete endpoints if they have other connections.
|
|
28
|
+
*/
|
|
29
|
+
deleteEndpointsOnDetach?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether or not to delete any endpoints that were created by this connect call if at some
|
|
32
|
+
* point in the future the endpoint has no remaining connections. Defaults to false.
|
|
33
|
+
*/
|
|
34
|
+
deleteEndpointsOnEmpty?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether or not to reattach this connection automatically should it be detached via user intervention. Defaults to false.
|
|
37
|
+
*/
|
|
38
|
+
reattach?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Spec for the anchor to use for both source and target endpoints.
|
|
41
|
+
*/
|
|
42
|
+
anchor?: AnchorSpec | LightweightAnchor;
|
|
43
|
+
/**
|
|
44
|
+
* Individual anchor specs for the source/target endpoints.
|
|
45
|
+
*/
|
|
46
|
+
anchors?: [AnchorSpec | LightweightAnchor, AnchorSpec | LightweightAnchor];
|
|
47
|
+
/**
|
|
48
|
+
* Optional label to set on the connection. In the default browser UI implementation this is rendered as a `label` attribute on the SVG element representing the connection.
|
|
49
|
+
*/
|
|
50
|
+
label?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Spec for the connector used to paint the connection.
|
|
53
|
+
*/
|
|
54
|
+
connector?: ConnectorSpec;
|
|
55
|
+
/**
|
|
56
|
+
* Optional list of overlays to attach to the connection.
|
|
57
|
+
*/
|
|
58
|
+
overlays?: Array<OverlaySpec>;
|
|
59
|
+
sourceMarker: OverlaySpec;
|
|
60
|
+
targetMarker: OverlaySpec;
|
|
61
|
+
/**
|
|
62
|
+
* Type of the connection. Used in conjunction with the `registerConnectionType` method.
|
|
63
|
+
*/
|
|
64
|
+
type?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Paint style for the connector.
|
|
67
|
+
*/
|
|
68
|
+
paintStyle?: PaintStyle;
|
|
69
|
+
/**
|
|
70
|
+
* Paint style for the connector when in hover mode.
|
|
71
|
+
*/
|
|
72
|
+
hoverPaintStyle?: PaintStyle;
|
|
73
|
+
/**
|
|
74
|
+
* Whether or not the connection is considered to be 'directed'
|
|
75
|
+
*/
|
|
76
|
+
directed?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Cost of the connection. Defaults to 1.
|
|
79
|
+
*/
|
|
80
|
+
cost?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Optional extra parameters to associate with the connection
|
|
83
|
+
*/
|
|
84
|
+
parameters?: Record<string, any>;
|
|
85
|
+
id?: string;
|
|
86
|
+
data?: any;
|
|
87
|
+
cssClass?: string;
|
|
88
|
+
hoverClass?: string;
|
|
89
|
+
outlineColor?: string;
|
|
90
|
+
outlineWidth?: number;
|
|
91
|
+
color?: string;
|
|
92
|
+
lineWidth?: number;
|
|
93
|
+
dashArray?: string;
|
|
94
|
+
gradient?: GradientSpec;
|
|
95
|
+
scope?: string;
|
|
96
|
+
labelLocation?: number;
|
|
97
|
+
useHTMLLabel?: boolean;
|
|
98
|
+
edge?: Edge;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Options for the UpdateOffset method
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
export interface UpdateOffsetOptions {
|
|
105
|
+
timestamp?: string;
|
|
106
|
+
recalc?: boolean;
|
|
107
|
+
elId?: string;
|
|
108
|
+
pos?: PointXY;
|
|
109
|
+
size?: Size;
|
|
110
|
+
rotation?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface RelayoutParams<A extends AbstractLayout<any>> {
|
|
113
|
+
bounds: Extents;
|
|
114
|
+
positions: Record<string, PointXY>;
|
|
115
|
+
sizes: Record<string, Size>;
|
|
116
|
+
layout: A;
|
|
117
|
+
}
|
|
118
|
+
export interface GroupCollapsedParams<E> {
|
|
119
|
+
group: Group;
|
|
120
|
+
}
|
|
121
|
+
export interface GroupExpandedParams<E> {
|
|
122
|
+
group: Group;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Payload for a EVENT_GROUP_MEMBER_ADDED event from the ui
|
|
126
|
+
* @group Events
|
|
127
|
+
* @category UI Event Payloads
|
|
128
|
+
*/
|
|
129
|
+
export interface UIGroupMemberAddedParams<EL> {
|
|
130
|
+
/**
|
|
131
|
+
* Element representing the member that was added to the group
|
|
132
|
+
*/
|
|
133
|
+
el: EL;
|
|
134
|
+
/**
|
|
135
|
+
* Element representing the group
|
|
136
|
+
*/
|
|
137
|
+
groupEl: EL;
|
|
138
|
+
/**
|
|
139
|
+
* Vertex that was added to the group
|
|
140
|
+
*/
|
|
141
|
+
vertex: Node | Group;
|
|
142
|
+
/**
|
|
143
|
+
* Group the vertex was added to
|
|
144
|
+
*/
|
|
145
|
+
group: Group;
|
|
146
|
+
/**
|
|
147
|
+
* Optional new location for the vertex that was added
|
|
148
|
+
*/
|
|
149
|
+
pos?: PointXY;
|
|
150
|
+
/**
|
|
151
|
+
* If a vertex being added to some group is currently a member of some other group, that group is provided here.
|
|
152
|
+
*/
|
|
153
|
+
sourceGroup?: Group;
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
source?: VisuallyJsRenderer<any>;
|
|
158
|
+
/**
|
|
159
|
+
* Set to true if the vertex is also brand new, not copied from elsewhere in the dataset.
|
|
160
|
+
*/
|
|
161
|
+
vertexIsNew?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
payload?: Record<string, any>;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Payload for a EVENT_GROUP_MEMBER_REMOVED event from the UI.
|
|
169
|
+
* @group Events
|
|
170
|
+
* @category UI Event Payloads
|
|
171
|
+
*/
|
|
172
|
+
export interface UIGroupMemberRemovedParams<EL> {
|
|
173
|
+
/**
|
|
174
|
+
* Element representing the member that was added to the group
|
|
175
|
+
*/
|
|
176
|
+
el: EL;
|
|
177
|
+
/**
|
|
178
|
+
* DOM element representing the group
|
|
179
|
+
*/
|
|
180
|
+
groupEl: EL;
|
|
181
|
+
/**
|
|
182
|
+
* Position the member that was removed was located at.
|
|
183
|
+
*/
|
|
184
|
+
pos: PointXY;
|
|
185
|
+
/**
|
|
186
|
+
* Vertex that was removed from the group
|
|
187
|
+
*/
|
|
188
|
+
vertex: Node | Group;
|
|
189
|
+
/**
|
|
190
|
+
* Group the vertex was removed from
|
|
191
|
+
*/
|
|
192
|
+
group: Group;
|
|
193
|
+
/**
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
source?: VisuallyJsRenderer<any>;
|
|
197
|
+
/**
|
|
198
|
+
* If the vertex is being moved to some other group, that group is provided here.
|
|
199
|
+
*/
|
|
200
|
+
targetGroup?: Group;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Payload for an {@link EVENT_NODE_RENDERED} event from the UI.
|
|
204
|
+
* @group Events
|
|
205
|
+
* @category UI Event Payloads
|
|
206
|
+
*/
|
|
207
|
+
export interface NodeRenderedParams<EL> {
|
|
208
|
+
el: EL;
|
|
209
|
+
id: string;
|
|
210
|
+
vertex: Node;
|
|
211
|
+
size: Size;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Payload for an {@link EVENT_GROUP_RENDERED} event from the UI.
|
|
215
|
+
* @group Events
|
|
216
|
+
* @category UI Event Payloads
|
|
217
|
+
*/
|
|
218
|
+
export interface GroupRenderedParams<EL> {
|
|
219
|
+
el: EL;
|
|
220
|
+
id: string;
|
|
221
|
+
vertex: Group;
|
|
222
|
+
size: Size;
|
|
223
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AStarPath, AStarPathConstrainment, DistanceHeuristic } from "../../../core/astar/definitions";
|
|
2
|
+
import { Viewport } from "../viewport";
|
|
3
|
+
import { PointXY } from "../../../core/util";
|
|
4
|
+
import { AStarGrid } from "../../../core/astar/astar-util";
|
|
5
|
+
/**
|
|
6
|
+
* Run the A* path finding algorithm using a Viewport as the datasource.
|
|
7
|
+
* @param source
|
|
8
|
+
* @param target
|
|
9
|
+
* @param sourceId
|
|
10
|
+
* @param targetId
|
|
11
|
+
* @param sourceOrientation
|
|
12
|
+
* @param targetOrientation
|
|
13
|
+
* @param viewport
|
|
14
|
+
* @param gridCellSize
|
|
15
|
+
* @param constrain
|
|
16
|
+
* @param distanceHeuristic
|
|
17
|
+
* @param vertexBorder
|
|
18
|
+
* @param vertexBuffer
|
|
19
|
+
* @param grid
|
|
20
|
+
* @param pathId
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function astarFromViewport(source: PointXY, target: PointXY, sourceId: string, targetId: string, sourceOrientation: {
|
|
24
|
+
ox: 1 | 0 | -1;
|
|
25
|
+
oy: 1 | 0 | -1;
|
|
26
|
+
}, targetOrientation: {
|
|
27
|
+
ox: 1 | 0 | -1;
|
|
28
|
+
oy: 1 | 0 | -1;
|
|
29
|
+
}, viewport: Viewport<any>, gridCellSize: number, constrain: AStarPathConstrainment, distanceHeuristic: DistanceHeuristic, vertexBorder: number, vertexBuffer: number, grid?: AStarGrid, pathId?: string): AStarPath;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AnchorPlacement, Geometry, Edge } from "../../../core";
|
|
2
|
+
import { ConnectionDetachedParams } from "../callbacks";
|
|
3
|
+
import { RedrawResult, Router } from "./router";
|
|
4
|
+
import { Connection } from "../connector/connection-impl";
|
|
5
|
+
import { UICore } from "../core";
|
|
6
|
+
import { ViewportElement } from "../viewport";
|
|
7
|
+
import { AnchorSpec, Connector, AnchorComputeParams, LightweightAnchor, LightweightContinuousAnchor } from "../../common";
|
|
8
|
+
import { AStarGrid } from "../../../core";
|
|
9
|
+
import { ConnectorComputeParams } from "../connector/abstract-connector";
|
|
10
|
+
import { AnchorLists } from "./router-utils";
|
|
11
|
+
/**
|
|
12
|
+
* Base router options. Placeholder interface for subclasses.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export interface BaseRouterOptions {
|
|
16
|
+
gridCellSize?: number;
|
|
17
|
+
avoidVertices?: boolean;
|
|
18
|
+
vertexBuffer?: number;
|
|
19
|
+
vertexBorder?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class BaseRouter<EL> implements Router<EL, LightweightAnchor> {
|
|
25
|
+
instance: UICore<any, any>;
|
|
26
|
+
anchorLists: Map<string, AnchorLists>;
|
|
27
|
+
protected _avoidVertices: boolean;
|
|
28
|
+
protected _gridCellSize: number;
|
|
29
|
+
protected _vertexBuffer: number;
|
|
30
|
+
protected _vertexBorder: number;
|
|
31
|
+
protected _grid: AStarGrid;
|
|
32
|
+
protected constructor(instance: UICore<any, any>, options?: BaseRouterOptions);
|
|
33
|
+
/**
|
|
34
|
+
* Notification that a connection was removed.
|
|
35
|
+
* @param params
|
|
36
|
+
*/
|
|
37
|
+
$connectionRemoved(params: ConnectionDetachedParams<any>): void;
|
|
38
|
+
elementRemoved(el: ViewportElement<EL>): void;
|
|
39
|
+
private _removeConnection;
|
|
40
|
+
$connectionDetachedFromElement(connection: Connection<EL>, el: ViewportElement<any>): void;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the current anchor index in an anchor that has more than one location
|
|
43
|
+
* @internal
|
|
44
|
+
* @param anchor
|
|
45
|
+
* @param idx
|
|
46
|
+
* @param connection
|
|
47
|
+
*/
|
|
48
|
+
$setCurrentLocation(anchor: LightweightAnchor, idx: number, connection?: Connection<any>): void;
|
|
49
|
+
/**
|
|
50
|
+
* Computes the position for an anchor that is neither floating nor continuous, or is currently fixed. This case
|
|
51
|
+
* covers what was previously both DynamicAnchor and Anchor, since those concepts have now been folded into
|
|
52
|
+
* a single concept - any given anchor has one or more locations.
|
|
53
|
+
* @param anchor
|
|
54
|
+
* @param params
|
|
55
|
+
*/
|
|
56
|
+
private _defaultAnchorCompute;
|
|
57
|
+
private _placeContinuousAnchors;
|
|
58
|
+
private _updateContinuousAnchorList;
|
|
59
|
+
/**
|
|
60
|
+
* Remove the given anchor from the continuous anchor lists. This method is invoked when a connection is detached.
|
|
61
|
+
* @param elementId
|
|
62
|
+
* @param anchor
|
|
63
|
+
* @private
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
$_removeAnchorFromAnchorLists(elementId: string, anchor: LightweightContinuousAnchor): void;
|
|
67
|
+
computeAnchorLocation(anchor: LightweightAnchor, params: AnchorComputeParams): AnchorPlacement;
|
|
68
|
+
computePath(connection: Connection<any>, timestamp: string): void;
|
|
69
|
+
abstract _doComputePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string): Geometry;
|
|
70
|
+
abstract _doUpdatePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string, sourceMoved: boolean, targetMoved: boolean): Geometry;
|
|
71
|
+
prepareAnchor(params: AnchorSpec | Array<AnchorSpec>): LightweightAnchor;
|
|
72
|
+
private _orientationCache;
|
|
73
|
+
private _orientationCacheTimestamp;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
* @param c
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
protected _computeObstaclePadding(c: Connector): number;
|
|
80
|
+
private _calculateOrientation;
|
|
81
|
+
/**
|
|
82
|
+
* Redraws every connection. Does not update element positions.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
$redrawEveryConnection(): RedrawResult;
|
|
86
|
+
$redrawConnection(edge: Edge, timestamp?: string): RedrawResult;
|
|
87
|
+
/**
|
|
88
|
+
* Redraws connections for the given element. Does not update element positions.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
$redraw(viewportElement: ViewportElement<EL>, timestamp?: string): RedrawResult;
|
|
92
|
+
/**
|
|
93
|
+
* Redraws a list of connections. Does not update element positions.
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
private _redrawConnections;
|
|
97
|
+
reset(): void;
|
|
98
|
+
setConnectionAnchors(conn: Connection<any>, anchors: [LightweightAnchor, LightweightAnchor]): void;
|
|
99
|
+
private _anchorSelector;
|
|
100
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Connection } from "../connector/connection-impl";
|
|
2
|
+
import { BaseRouter, BaseRouterOptions } from "./base-router";
|
|
3
|
+
import { Connector } from "../../common";
|
|
4
|
+
import { ConnectorComputeParams } from "../connector/abstract-connector";
|
|
5
|
+
import { Geometry, AnchorPlacement } from "../../../core";
|
|
6
|
+
import { UICore } from "../core";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface DefaultRouterOptions extends BaseRouterOptions {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Adjust the given anchor placement for the specified gap amount.
|
|
14
|
+
* @internal
|
|
15
|
+
* @param pos
|
|
16
|
+
* @param gap
|
|
17
|
+
*/
|
|
18
|
+
export declare function _adjustForGap(pos: AnchorPlacement, gap: number): {
|
|
19
|
+
curX: number;
|
|
20
|
+
curY: number;
|
|
21
|
+
ox: import("../../../core").AnchorOrientationHint;
|
|
22
|
+
oy: import("../../../core").AnchorOrientationHint;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare class DefaultRouter<EL> extends BaseRouter<EL> {
|
|
30
|
+
instance: UICore<EL, any>;
|
|
31
|
+
static type: string;
|
|
32
|
+
protected _timestamp: string;
|
|
33
|
+
constructor(instance: UICore<EL, any>, options?: DefaultRouterOptions);
|
|
34
|
+
_doComputePath(connection: Connection<EL>, c: Connector, params: ConnectorComputeParams, timestamp: string): Geometry;
|
|
35
|
+
_doUpdatePath(connection: Connection<EL>, c: Connector, params: ConnectorComputeParams, timestamp: string, sourceMoved: boolean, targetMoved: boolean): Geometry;
|
|
36
|
+
private _doComputePathDefault;
|
|
37
|
+
private _doComputePathAStar;
|
|
38
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { SortFunction } from "../../util";
|
|
2
|
+
import { ViewportElement } from "../viewport";
|
|
3
|
+
import { Connection } from "../connector/connection-impl";
|
|
4
|
+
import { PointXY, RectangleXY, Size, AnchorPlacement } from "../../../core";
|
|
5
|
+
import { AnchorComputeParams, AnchorRecord, Face, LightweightAnchor, LightweightContinuousAnchor } from "../../common";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const edgeSortFunctions: Record<string, SortFunction<AnchorListEntry>>;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface ConnectionFacade {
|
|
14
|
+
placeholder?: boolean;
|
|
15
|
+
sourceId: string;
|
|
16
|
+
targetId: string;
|
|
17
|
+
anchors: {
|
|
18
|
+
source: LightweightAnchor;
|
|
19
|
+
target: LightweightAnchor;
|
|
20
|
+
};
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export interface OrientationResult {
|
|
27
|
+
orientation?: string;
|
|
28
|
+
a: [Face, Face];
|
|
29
|
+
theta?: number;
|
|
30
|
+
theta2?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export type AnchorListEntry = {
|
|
36
|
+
theta: number;
|
|
37
|
+
order: number;
|
|
38
|
+
c: ConnectionFacade;
|
|
39
|
+
elId: string;
|
|
40
|
+
anchor: LightweightAnchor;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export type AnchorLists = {
|
|
46
|
+
top: Array<AnchorListEntry>;
|
|
47
|
+
right: Array<AnchorListEntry>;
|
|
48
|
+
bottom: Array<AnchorListEntry>;
|
|
49
|
+
left: Array<AnchorListEntry>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export type ContinuousAnchorPlacement = {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
xLoc: number;
|
|
58
|
+
yLoc: number;
|
|
59
|
+
c: ConnectionFacade;
|
|
60
|
+
a: LightweightAnchor;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare function _placeAnchorsOnLine<E>(element: ViewportElement<E>, connections: Array<AnchorListEntry>, horizontal: boolean, otherMultiplier: number, reverse: boolean): Array<ContinuousAnchorPlacement>;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @param a
|
|
69
|
+
*/
|
|
70
|
+
export declare function _isContinuousAnchor(a: LightweightAnchor): a is LightweightContinuousAnchor;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @param anchor
|
|
74
|
+
*/
|
|
75
|
+
export declare function _getCurrentAnchorLocation(anchor: LightweightAnchor): [number, AnchorRecord];
|
|
76
|
+
/**
|
|
77
|
+
* Create a padded rectangle around the given point. The point lies on one edge of the resulting rectangle: it is not
|
|
78
|
+
* in the center. The rectangle represents whitespace around some anchor point but does not spill over into the vertex
|
|
79
|
+
* on which the anchor resides.
|
|
80
|
+
* @param point
|
|
81
|
+
* @param face
|
|
82
|
+
* @param size
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export declare function _padPointForFace(point: PointXY, face: Face, size: number): RectangleXY;
|
|
86
|
+
export declare function _padPointForFace2(point: PointXY, face: Face, size: number): RectangleXY;
|
|
87
|
+
/**
|
|
88
|
+
* Create a padded rectangle around the given point. The point lies on one edge of the resulting rectangle: it is not
|
|
89
|
+
* in the center. The rectangle represents whitespace around some anchor point but does not spill over into the vertex
|
|
90
|
+
* on which the anchor resides.
|
|
91
|
+
* @param point
|
|
92
|
+
* @param ox Orientation in X
|
|
93
|
+
* @param oy Orientation in Y
|
|
94
|
+
* @param mainAxisSize Size of the rectangle in the main axis
|
|
95
|
+
* @param otherAxisSize Size of the rectangle in the axis orthogonal to main axis
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export declare function _padPoint(point: PointXY, ox: number, oy: number, mainAxisSize: number, otherAxisSize: number): RectangleXY;
|
|
99
|
+
/**
|
|
100
|
+
* For the given anchor point, constructs a padded box around it to use to check if the anchor is too
|
|
101
|
+
* close to some other element, and a different anchor location might be preferred. If the connection has no
|
|
102
|
+
* connector registered it means it is still being created, so we just pass back a 1x1 rectangle with the given point
|
|
103
|
+
* as origin.
|
|
104
|
+
* @param p
|
|
105
|
+
* @param ox
|
|
106
|
+
* @param oy
|
|
107
|
+
* @param connection
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
export declare function _padAnchorPoint(p: PointXY, ox: -1 | 0 | 1, oy: -1 | 0 | 1, connection: Connection<any>): RectangleXY;
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
* @param loc
|
|
114
|
+
* @param xy
|
|
115
|
+
* @param wh
|
|
116
|
+
* @param params
|
|
117
|
+
*/
|
|
118
|
+
export declare function _computeSingleLocation(loc: AnchorRecord, xy: PointXY, wh: Size, params: AnchorComputeParams): AnchorPlacement;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Connection } from '../connector/connection-impl';
|
|
2
|
+
import { AnchorComputeParams, LightweightAnchor, AnchorSpec } from "../../common";
|
|
3
|
+
import { PointXY, AnchorPlacement, Edge } from "../../../core";
|
|
4
|
+
import { ConnectionDetachedParams } from "../callbacks";
|
|
5
|
+
import { ViewportElement } from "../viewport";
|
|
6
|
+
export interface RedrawResult {
|
|
7
|
+
c: Set<Connection<any>>;
|
|
8
|
+
}
|
|
9
|
+
export declare function EmptyRedrawResult(): RedrawResult;
|
|
10
|
+
export interface Router<EL, A> {
|
|
11
|
+
reset(): void;
|
|
12
|
+
elementRemoved(el: ViewportElement<EL>): void;
|
|
13
|
+
$redrawConnection(edge: Edge, timestamp?: string): RedrawResult;
|
|
14
|
+
$redrawEveryConnection(): RedrawResult;
|
|
15
|
+
$redraw(viewportElement: ViewportElement<EL>, timestamp?: string, offsetToUI?: PointXY): RedrawResult;
|
|
16
|
+
computePath(connection: Connection<EL>, timestamp: string): void;
|
|
17
|
+
computeAnchorLocation(anchor: A, params: AnchorComputeParams): AnchorPlacement;
|
|
18
|
+
prepareAnchor(params: AnchorSpec | Array<AnchorSpec>): A;
|
|
19
|
+
setConnectionAnchors(conn: Connection<EL>, anchors: [A, A]): void;
|
|
20
|
+
$setCurrentLocation(anchor: LightweightAnchor, idx: number, connection?: Connection<any>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Notification that a connection was detached from some element. The connection itself
|
|
23
|
+
* is not being removed; it is being reconnected elsewhere.
|
|
24
|
+
* @param connection
|
|
25
|
+
* @param el
|
|
26
|
+
* @param index
|
|
27
|
+
*/
|
|
28
|
+
$connectionDetachedFromElement(connection: Connection<EL>, el: ViewportElement<any>): void;
|
|
29
|
+
$connectionRemoved(params: ConnectionDetachedParams): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { AnchorSpec, OverlaySpec, PaintStyle, ConnectorSpec, FullOverlaySpec } from "../common";
|
|
2
|
+
/**
|
|
3
|
+
* Base interface for vertex/edge types. This interface contains parameters that are common between the two types, and is shared by internal methods and public methods.
|
|
4
|
+
*/
|
|
5
|
+
export interface TypeDescriptorBase {
|
|
6
|
+
/**
|
|
7
|
+
* CSS class to add to the given component's representation in the UI
|
|
8
|
+
*/
|
|
9
|
+
cssClass?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Paint style to use for the component.
|
|
12
|
+
*/
|
|
13
|
+
paintStyle?: PaintStyle;
|
|
14
|
+
/**
|
|
15
|
+
* Paint style to use for the component when the pointer is hovering over it.
|
|
16
|
+
*/
|
|
17
|
+
hoverPaintStyle?: PaintStyle;
|
|
18
|
+
/**
|
|
19
|
+
* Optional set of parameters to store on the component that is generated from this type.
|
|
20
|
+
*/
|
|
21
|
+
parameters?: Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* [source, target] anchor specs for edges.
|
|
24
|
+
*/
|
|
25
|
+
anchors?: [AnchorSpec, AnchorSpec];
|
|
26
|
+
/**
|
|
27
|
+
* Spec for the anchor to use for both source and target.
|
|
28
|
+
*/
|
|
29
|
+
anchor?: AnchorSpec;
|
|
30
|
+
/**
|
|
31
|
+
* Provides a simple means for controlling connectivity in the UI.
|
|
32
|
+
*/
|
|
33
|
+
scope?: string;
|
|
34
|
+
/**
|
|
35
|
+
* When merging a type description into its parent(s), values in the child for `connector`, `anchor` and `anchors` will always overwrite any such values in the parent. But other values, such as `overlays`, will be merged with their parent's entry for that key. You can force a child's type to override _every_ corresponding value in its parent by setting `mergeStrategy:'override'`.
|
|
36
|
+
*/
|
|
37
|
+
mergeStrategy?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Paint style for connectors created for this type.
|
|
40
|
+
*/
|
|
41
|
+
connectorStyle?: PaintStyle;
|
|
42
|
+
/**
|
|
43
|
+
* Paint style for connectors created for this type when pointer is hovering over the component.
|
|
44
|
+
*/
|
|
45
|
+
connectorHoverStyle?: PaintStyle;
|
|
46
|
+
/**
|
|
47
|
+
* Spec for connectors created for this type.
|
|
48
|
+
*/
|
|
49
|
+
connector?: ConnectorSpec;
|
|
50
|
+
/**
|
|
51
|
+
* Class to add to any connectors created for this type.
|
|
52
|
+
*/
|
|
53
|
+
connectorClass?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Optional overlay to use as source marker.
|
|
56
|
+
*/
|
|
57
|
+
sourceMarker?: OverlaySpec;
|
|
58
|
+
/**
|
|
59
|
+
* Optional overlay to use as target marker.
|
|
60
|
+
*/
|
|
61
|
+
targetMarker?: OverlaySpec;
|
|
62
|
+
/**
|
|
63
|
+
* Array of overlays to add.
|
|
64
|
+
*/
|
|
65
|
+
overlays?: Array<OverlaySpec>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether or not connections of this type should be detachable with the mouse. Defaults to true.
|
|
68
|
+
*/
|
|
69
|
+
detachable?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether or not when a user detaches a connection of this type it should be automatically reattached. Defaults to false.
|
|
72
|
+
*/
|
|
73
|
+
reattach?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Used internally to track connection types - concrete types that have been populated.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export interface CompiledTypeDescriptor extends Omit<TypeDescriptorBase, 'overlays' | 'sourceMarker' | 'targetMarker'> {
|
|
80
|
+
overlays?: Record<string, FullOverlaySpec>;
|
|
81
|
+
sourceMarker?: FullOverlaySpec;
|
|
82
|
+
targetMarker?: FullOverlaySpec;
|
|
83
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PointXY, DataModel, ObjectAnchorSpec, DataSource, Vertex } from "../../core";
|
|
2
|
+
import { EdgeMapping, GroupMapping, NodeMapping, PortMapping, ViewSpec, VertexMapping } from "./view";
|
|
3
|
+
import { UICore } from "./core";
|
|
4
|
+
import { ViewportElement } from "./viewport";
|
|
5
|
+
export declare const DEFAULT_LABEL_LOCATION_ATTRIBUTE = "labelLocation";
|
|
6
|
+
type ModelDefinitionMap = {
|
|
7
|
+
nodes: Map<string, NodeMapping<any>>;
|
|
8
|
+
edges: Map<string, EdgeMapping>;
|
|
9
|
+
groups: Map<string, GroupMapping<any>>;
|
|
10
|
+
ports: Map<string, PortMapping<any>>;
|
|
11
|
+
};
|
|
12
|
+
declare const DEFAULT_MERGE_PARENT_ATTRIBUTE = "parent";
|
|
13
|
+
/**
|
|
14
|
+
* Extract the definition(s) with the given type and merge them,
|
|
15
|
+
* @param type Type, or types, to extract. If a single type is specified that is what will be returned. If an array of
|
|
16
|
+
* types are specified they will all be merged together.
|
|
17
|
+
* @param map Map from which to retrieve individual types
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function mergeWithParents<T extends {
|
|
21
|
+
mergeStrategy?: string;
|
|
22
|
+
[DEFAULT_MERGE_PARENT_ATTRIBUTE]?: string | Array<string>;
|
|
23
|
+
}>(type: Array<string> | string, map: Record<string, T>): any;
|
|
24
|
+
/**
|
|
25
|
+
* A function that returns an anchor definition from the given element, position on the element, and vertex.
|
|
26
|
+
*/
|
|
27
|
+
export type AnchorPositionFinder<EL> = (el: EL, pos: PointXY, vertex: Vertex, vertexDefinition: VertexMapping<any, any>) => ObjectAnchorSpec | null;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function createFinderFromAnchorPositions<EL>(positions: Array<ObjectAnchorSpec>): AnchorPositionFinder<EL>;
|
|
32
|
+
/**
|
|
33
|
+
* A UIModel describes the appearance and behaviour of a set of Nodes, Edges, Ports and Groups. This is an internal class that library users do not directly interact with.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare class UIModel<EL> {
|
|
38
|
+
private model;
|
|
39
|
+
viewOptions: ViewSpec<EL>;
|
|
40
|
+
defMap: ModelDefinitionMap;
|
|
41
|
+
private readonly nodes;
|
|
42
|
+
private readonly edges;
|
|
43
|
+
private readonly groups;
|
|
44
|
+
private readonly ports;
|
|
45
|
+
/**
|
|
46
|
+
*/
|
|
47
|
+
constructor(model: DataSource, dataModel: DataModel, viewOptions: ViewSpec<EL>, uicore: UICore<EL, any>);
|
|
48
|
+
getEdgeDefinition(typeId: string): EdgeMapping;
|
|
49
|
+
getNodeDefinition(typeId: string): NodeMapping<EL>;
|
|
50
|
+
getPortDefinition(typeId: string): PortMapping<EL>;
|
|
51
|
+
getGroupDefinition(typeId: string): GroupMapping<EL>;
|
|
52
|
+
getTypeDefinition<T extends Vertex>(obj: Vertex): NodeMapping<EL> | PortMapping<EL>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Return value from the UI's getObjectInfo method.
|
|
56
|
+
*/
|
|
57
|
+
export interface UIObjectInfo<T, E> {
|
|
58
|
+
el: E;
|
|
59
|
+
uiOnly?: boolean;
|
|
60
|
+
managedElement: ViewportElement<E>;
|
|
61
|
+
type: string;
|
|
62
|
+
obj: T;
|
|
63
|
+
id: string;
|
|
64
|
+
}
|
|
65
|
+
export {};
|