@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,55 @@
|
|
|
1
|
+
import { InternalStraightConnectorGeometry, SegmentedConnectorCurvedSegment, StraightConnector, StraightConnectorGeometry, StraightConnectorSegment } from "./straight-connector";
|
|
2
|
+
import { ConnectorComputeParams, PaintGeometry } from "../core/connector/abstract-connector";
|
|
3
|
+
import { Connection } from "../core/connector/connection-impl";
|
|
4
|
+
import { PointXY } from "../../core";
|
|
5
|
+
/**
|
|
6
|
+
* Trim the segments of any that have zero length, then either smooth them and apply, or just apply.
|
|
7
|
+
* @param conn
|
|
8
|
+
* @param segments
|
|
9
|
+
* @private
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function _writeSegmentedConnectorSegments(conn: StraightConnector, segments: Array<StraightConnectorSegment>): Array<StraightConnectorSegment>;
|
|
13
|
+
/**
|
|
14
|
+
* Compute the line angle for the given segment.
|
|
15
|
+
* @param cs
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function segmentLineAngle(cs: StraightConnectorSegment): number;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
export declare function connectorSegmentLength(s: StraightConnectorSegment): number;
|
|
24
|
+
export declare function _mapToSpline(points: Array<PointXY>, smoothing: number): Array<{
|
|
25
|
+
type: string;
|
|
26
|
+
segment: SegmentedConnectorCurvedSegment;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Default straight path compute writes a segment for each stub and a segment joining them. If the stubs have 0 length they are trimmed.
|
|
30
|
+
* @param sc
|
|
31
|
+
* @param paintInfo
|
|
32
|
+
* @param params
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function $defaultStraightPathCompute(sc: StraightConnector, paintInfo: PaintGeometry, params: ConnectorComputeParams): Array<StraightConnectorSegment>;
|
|
36
|
+
export declare function updateStraightConnector(connection: Connection<any>, paintInfo: PaintGeometry, params: ConnectorComputeParams, sourceMoved: boolean, targetMoved: boolean): InternalStraightConnectorGeometry;
|
|
37
|
+
/**
|
|
38
|
+
* @param connection
|
|
39
|
+
* @param paintInfo
|
|
40
|
+
* @param params
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare function computeStraightConnector(connection: Connection<any>, paintInfo: PaintGeometry, params: ConnectorComputeParams): InternalStraightConnectorGeometry;
|
|
44
|
+
/**
|
|
45
|
+
* @param g
|
|
46
|
+
* @param dx
|
|
47
|
+
* @param dy
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function transformSegmentedGeometry(g: StraightConnectorGeometry, dx: number, dy: number): StraightConnectorGeometry;
|
|
51
|
+
/**
|
|
52
|
+
* @param s
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare function _trimSegments(s: Array<StraightConnectorSegment>): Array<StraightConnectorSegment>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Connector, ConnectorOptions, ConnectorPathConstrainment } from "../common";
|
|
2
|
+
import { DiagonalAxis, OrthogonalAxis, Geometry, PointXY } from "../../core";
|
|
3
|
+
/**
|
|
4
|
+
* Default amount to smooth the curve by in a smoothed straight connector.
|
|
5
|
+
* @internal
|
|
6
|
+
* @group Edges
|
|
7
|
+
* @category Connectors
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_SMOOTHING = 0.15;
|
|
10
|
+
/**
|
|
11
|
+
* Straight connector type.
|
|
12
|
+
* @group Edges
|
|
13
|
+
* @category Connectors
|
|
14
|
+
* @constant
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONNECTOR_TYPE_STRAIGHT = "Straight";
|
|
17
|
+
/**
|
|
18
|
+
* Options for a straight connector.
|
|
19
|
+
* @group Edges
|
|
20
|
+
* @category Connectors
|
|
21
|
+
*/
|
|
22
|
+
export interface StraightConnectorOptions extends ConnectorOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Whether or not to smooth the connector. Defaults to false. It is not recommended to use this in conjunction with `orthogonal` or `diagonal` constrain, as the line tends to take on a bit of a hand-drawn appearance. It's not without charm but it's also not for everyone.
|
|
25
|
+
*/
|
|
26
|
+
smooth?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The amount of smoothing to apply. The default is 0.15. Values that deviate too much from the default will make your lines look weird.
|
|
29
|
+
*/
|
|
30
|
+
smoothing?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional radius to apply to corners. If you have set `smooth:true` this will be ignored.
|
|
33
|
+
*/
|
|
34
|
+
cornerRadius?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Optional constraint on the direction path segments can travel in. Options are PATH_CONSTRAIN_NONE, PATH_CONSTRAIN_ORTHOGONAL (segments are vertical and/or horizontal lines) and PATH_CONSTRAIN_DIAGONAL (segments are vertical, horizontal, or 45 degree lines). You can also use PATH_CONSTRAIN_MANHATTAN as an alias for PATH_CONSTRAIN_ORTHOGONAL or PATH_CONSTRAIN_METRO as an alias for PATH_CONSTRAIN_DIAGONAL.
|
|
37
|
+
*/
|
|
38
|
+
constrain?: ConnectorPathConstrainment;
|
|
39
|
+
/**
|
|
40
|
+
* For a loopback connection (when constrain is set to orthogonal), the size of the loop.
|
|
41
|
+
*/
|
|
42
|
+
loopbackRadius?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The point to use as the halfway point between the source and target when constrain is set to orthogonal. Defaults to 0.5.
|
|
45
|
+
*/
|
|
46
|
+
midpoint?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Defaults to true, meaning always draw a stub of the desired length, even when the source and target elements are very close together. This only applies when constrain is set to PATH_CONSTRAIN_ORTHOGONAL.
|
|
49
|
+
*/
|
|
50
|
+
alwaysRespectStubs?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If true, and a cornerRadius is set, the lines are drawn in such a way that they look slightly hand drawn.
|
|
53
|
+
*/
|
|
54
|
+
slightlyWonky?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* segment connector segment
|
|
58
|
+
* @internal
|
|
59
|
+
* @group Edges
|
|
60
|
+
* @category Connectors
|
|
61
|
+
*/
|
|
62
|
+
export interface StraightConnectorSegment {
|
|
63
|
+
x1: number;
|
|
64
|
+
y1: number;
|
|
65
|
+
x2: number;
|
|
66
|
+
y2: number;
|
|
67
|
+
o?: OrthogonalAxis | DiagonalAxis;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare function segmentedConnectorSegmentLength(s: StraightConnectorSegment): number;
|
|
73
|
+
/**
|
|
74
|
+
* curved segment, as generated by the smoothing algorithm.
|
|
75
|
+
* @internal
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
export interface SegmentedConnectorCurvedSegment extends StraightConnectorSegment {
|
|
79
|
+
cp1: PointXY;
|
|
80
|
+
cp2: PointXY;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The format used internally to store a straight connector's geometry.
|
|
84
|
+
* @internal
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
export interface InternalStraightConnectorGeometry extends Geometry {
|
|
88
|
+
segments: Array<StraightConnectorSegment>;
|
|
89
|
+
quadrant?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The format used to load/export straight connector geometry
|
|
93
|
+
* @group Edges
|
|
94
|
+
* @category Connectors
|
|
95
|
+
*/
|
|
96
|
+
export interface StraightConnectorGeometry extends Geometry {
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A straight connector consists of a set of segments between 2 points. It may be constrained to be orthogonal, ie. that the segments are vertical or horizontal lines only. It also may be "smoothed", in which the segments are approximated by a series of Bézier curves.
|
|
100
|
+
*/
|
|
101
|
+
export interface StraightConnector extends Connector {
|
|
102
|
+
smooth: boolean;
|
|
103
|
+
smoothing: number;
|
|
104
|
+
geometry: InternalStraightConnectorGeometry;
|
|
105
|
+
cornerRadius: number;
|
|
106
|
+
loopbackRadius: number;
|
|
107
|
+
isLoopbackCurrently: boolean;
|
|
108
|
+
constrain: ConnectorPathConstrainment;
|
|
109
|
+
$pathSegments: Array<StraightConnectorSegment>;
|
|
110
|
+
midpoint: number;
|
|
111
|
+
alwaysRespectStubs: boolean;
|
|
112
|
+
lastx: number;
|
|
113
|
+
lasty: number;
|
|
114
|
+
lastOrientation: number;
|
|
115
|
+
slightlyWonky: boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Straight connector.
|
|
119
|
+
* @group Edges
|
|
120
|
+
* @category Connectors
|
|
121
|
+
*/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ClonedSet, CopyDataTransformer, PasteOptions } from "./copy-data";
|
|
2
|
+
import { VisuallyJsModel } from "../../core/toolkit";
|
|
3
|
+
import { Base } from "../../core/model/graph";
|
|
4
|
+
import { Path } from "../../core/model/path";
|
|
5
|
+
import { VisuallyJsSelection } from '../../core/selection';
|
|
6
|
+
/**
|
|
7
|
+
* Offers methods to copy and paste data from/to a VisuallyJs model instance. This class is abstract and is subclassed to concrete implementations by UI specific packages. In the future if alternate renderers are written for the VisuallyJs model it is expected that an implementation of the Clipboard would be one of the inclusions.
|
|
8
|
+
*
|
|
9
|
+
* @group Components
|
|
10
|
+
* @category Copy/paste
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class Clipboard {
|
|
13
|
+
instance: VisuallyJsModel;
|
|
14
|
+
private stack;
|
|
15
|
+
protected constructor(instance: VisuallyJsModel);
|
|
16
|
+
/**
|
|
17
|
+
* Copy some set of objects into the clipboard.
|
|
18
|
+
* @param obj - The object, or objects, to copy in to the clipboard.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
copy(obj: Base | Array<Base> | Path | VisuallyJsSelection): void;
|
|
22
|
+
/**
|
|
23
|
+
* Paste the clipboard's most recent entry, optionally removing it from the clipboard afterwards.
|
|
24
|
+
* @param options - Options for the paste.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
paste(options?: PasteOptions): ClonedSet;
|
|
28
|
+
/**
|
|
29
|
+
* Removes all entries from the clipboard.
|
|
30
|
+
*/
|
|
31
|
+
clear(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Copies the contents of the associated model instance's current selection into the clipboard.
|
|
34
|
+
*/
|
|
35
|
+
copyCurrentSelection(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Copies and pastes the contents of the associated model instance's current selection into the clipboard. This method is equivalent to calling `copyCurrentSelection()` first and then calling `paste(..)`.
|
|
38
|
+
* @param options - Options for the paste.
|
|
39
|
+
*/
|
|
40
|
+
pasteCurrentSelection(options?: PasteOptions): ClonedSet;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
abstract $getCopyDataTransformer(): CopyDataTransformer;
|
|
45
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { PointXY, RectangleXY, VisuallyJsModel, VisuallyJsSelection, AddEdgeOptions, Edge, Group, ObjectData, Vertex, Node, Geometry } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* Options to use when pasting data.
|
|
4
|
+
* @group Components
|
|
5
|
+
* @category Copy/paste
|
|
6
|
+
*/
|
|
7
|
+
export interface PasteOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Origin to use when pasting the data. Each item's location will be translated when copied accordingly.
|
|
10
|
+
*/
|
|
11
|
+
origin?: PointXY;
|
|
12
|
+
/**
|
|
13
|
+
Indicates that the paste should only paste edges whose source and target vertex are in the CopyData object that is being pasted. When this is set to false - which is the default- , all edges in the CopyData will be pasted, but edges to/from some vertex not in the CopyData will attach to the pasted vertex from the CopyData on one end, and the existing original vertex outside the CopyData on the other.
|
|
14
|
+
*/
|
|
15
|
+
hermetic?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Defaults to false. If true, nested nodes/groups will not be copied when their parents are copied.
|
|
18
|
+
*/
|
|
19
|
+
shallow?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the clipboard will be cleared after this paste operation. Defaults to false.
|
|
22
|
+
*/
|
|
23
|
+
clear?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The return value from a paste. Contains a list of nodes, groups and edges that were pasted, as well as a map of previous edge/vertex ids to their new ids, the computed origin of the copied vertices, and the amount by which the set of objects was translated for the paste (so the paste location is origin + transform).
|
|
27
|
+
* @group Components
|
|
28
|
+
* @category Copy/paste
|
|
29
|
+
*/
|
|
30
|
+
export interface ClonedSet {
|
|
31
|
+
/**
|
|
32
|
+
* List of nodes that were pasted.
|
|
33
|
+
*/
|
|
34
|
+
nodes: Array<ObjectData>;
|
|
35
|
+
/**
|
|
36
|
+
* List of groups that were pasted.
|
|
37
|
+
*/
|
|
38
|
+
groups: Array<ObjectData>;
|
|
39
|
+
/**
|
|
40
|
+
* List of edges that were pasted.
|
|
41
|
+
*/
|
|
42
|
+
edges: Array<AddEdgeOptions>;
|
|
43
|
+
/**
|
|
44
|
+
* Map of nodes/groups that were pasted, keyed by id
|
|
45
|
+
*/
|
|
46
|
+
vertexMap: Map<string, string>;
|
|
47
|
+
/**
|
|
48
|
+
* Map of edges that were pasted, keyed by id
|
|
49
|
+
*/
|
|
50
|
+
edgeMap: Map<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* The computed origin of the set of pasted objects, prior to pasting
|
|
53
|
+
*/
|
|
54
|
+
origin: PointXY;
|
|
55
|
+
/**
|
|
56
|
+
* The transformation applied to the content origin when pasting.
|
|
57
|
+
*/
|
|
58
|
+
transform: PointXY;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Provides helper methods to transform geometry and to retrieve coordinates.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export interface CopyDataTransformer {
|
|
65
|
+
transformGeometry(edge: Edge, dx: number, dy: number): Geometry;
|
|
66
|
+
getCoordinates(vertex: Vertex, relativeToCanvasRoot?: boolean): RectangleXY;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A set of data to be copied.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare class CopyData {
|
|
73
|
+
instance: VisuallyJsModel;
|
|
74
|
+
_nodes: Array<Node>;
|
|
75
|
+
_groups: Array<Group>;
|
|
76
|
+
_edges: Array<Edge>;
|
|
77
|
+
static from(selection: VisuallyJsSelection): CopyData;
|
|
78
|
+
constructor(instance: VisuallyJsModel);
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @param transformer
|
|
82
|
+
* @param options
|
|
83
|
+
*/
|
|
84
|
+
paste(transformer: CopyDataTransformer, options?: PasteOptions): ClonedSet;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @param transformer
|
|
88
|
+
* @param newOrigin
|
|
89
|
+
* @param hermetic
|
|
90
|
+
* @param shallow
|
|
91
|
+
*/
|
|
92
|
+
private _cloneEntries;
|
|
93
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Connection } from "./connector/connection-impl";
|
|
2
|
+
import { Edge } from "../../core/model/graph";
|
|
3
|
+
import { ConnectReason } from "../../core/params";
|
|
4
|
+
/**
|
|
5
|
+
* Definition of the parameters passed to a listener for the `connection` event.
|
|
6
|
+
* @group Events
|
|
7
|
+
*/
|
|
8
|
+
export interface ConnectionEstablishedParams<E = any> {
|
|
9
|
+
connection: Connection<E>;
|
|
10
|
+
reason: ConnectReason;
|
|
11
|
+
edge: Edge;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Definition of the parameters passed to a listener for the `connection:detach` event.
|
|
15
|
+
* @group Events
|
|
16
|
+
*/
|
|
17
|
+
export interface ConnectionDetachedParams<E = any> extends ConnectionEstablishedParams<E> {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Definition of the parameters passed to a listener for the `connection:move` event.
|
|
21
|
+
* @group Events
|
|
22
|
+
*/
|
|
23
|
+
export interface ConnectionMovedParams<E = any> {
|
|
24
|
+
connection: Connection<E>;
|
|
25
|
+
index: number;
|
|
26
|
+
originalSourceId: string;
|
|
27
|
+
newSourceId: string;
|
|
28
|
+
originalTargetId: string;
|
|
29
|
+
newTargetId: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Definition of the parameters passed to the `beforeDrop` interceptor.
|
|
33
|
+
* @group Events
|
|
34
|
+
*/
|
|
35
|
+
export interface BeforeDropParams {
|
|
36
|
+
sourceId: string;
|
|
37
|
+
targetId: string;
|
|
38
|
+
scope: string;
|
|
39
|
+
connection: Connection<any>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Payload for an element managed event
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Payload for an element unmanaged event.
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { CompiledTypeDescriptor } from '../type-descriptors';
|
|
2
|
+
import { UICore } from "../core";
|
|
3
|
+
import { PaintStyle } from "../../common";
|
|
4
|
+
import { Connection } from "../connector/connection-impl";
|
|
5
|
+
import { PointXY } from "../../../core";
|
|
6
|
+
export declare function isConnection(c: any): c is Connection<any>;
|
|
7
|
+
export declare const COMPONENT_TYPE_CONNECTION = "connection";
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function _removeTypeCssHelper<EL>(component: ComponentBase<EL>, typeId: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* helper method to update the hover style whenever it, or paintStyle, changes.
|
|
14
|
+
* we use paintStyle as the foundation and merge hoverPaintStyle over the top.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function _updateHoverStyle<EL>(component: ComponentBase<EL>): void;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export interface ComponentOptions {
|
|
22
|
+
hoverClass?: string;
|
|
23
|
+
scope?: string;
|
|
24
|
+
cssClass?: string;
|
|
25
|
+
data?: any;
|
|
26
|
+
id?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare const ADD_CLASS_ACTION = "add";
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const REMOVE_CLASS_ACTION = "remove";
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export type ClassAction = typeof ADD_CLASS_ACTION | typeof REMOVE_CLASS_ACTION;
|
|
40
|
+
export declare function getComponentXY<EL>(c: ComponentBase<EL>): PointXY;
|
|
41
|
+
/**
|
|
42
|
+
* Base class for components. Perhaps this will disappear over time.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export interface ComponentBase<EL> {
|
|
46
|
+
id: string;
|
|
47
|
+
deleted: boolean;
|
|
48
|
+
instance: UICore<EL>;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
$typeCache: Record<string, Record<string, any>>;
|
|
53
|
+
objectType: string;
|
|
54
|
+
visible: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
paintStyle: PaintStyle;
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
hoverPaintStyle: PaintStyle;
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
paintStyleInUse: PaintStyle;
|
|
67
|
+
$hover: boolean;
|
|
68
|
+
hoverClass: string;
|
|
69
|
+
cssClass: string;
|
|
70
|
+
$types: Set<string>;
|
|
71
|
+
$defaultType: CompiledTypeDescriptor;
|
|
72
|
+
}
|
|
73
|
+
export declare function createComponent<EL>(instance: UICore<EL>, objectType: string, params?: ComponentOptions): ComponentBase<EL>;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare const Components: {
|
|
78
|
+
create<EL>(instance: UICore<EL>, idPrefix: string, params?: ComponentOptions): ComponentBase<EL>;
|
|
79
|
+
addClass<EL>(c: ComponentBase<EL>, clazz: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Removes a css class from the component
|
|
82
|
+
* @param c
|
|
83
|
+
* @param clazz Class to remove. May be a space separated list.
|
|
84
|
+
* @param cascade This is for subclasses to use, if they wish to. For instance, a Connection might want to optionally cascade a css class
|
|
85
|
+
* removal down to its endpoints.
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
removeClass<EL>(c: ComponentBase<EL>, clazz: string, cascade?: boolean): void;
|
|
89
|
+
cacheTypeItem<EL>(c: ComponentBase<EL>, key: string, item: any, typeId: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
hasType<EL>(c: ComponentBase<EL>, typeId: string): boolean;
|
|
94
|
+
removeType<EL>(c: ComponentBase<EL>, typeId: string, params?: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
addType<EL>(c: ComponentBase<EL>, typeId: string, params?: any): void;
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
getCachedTypeItem<EL>(c: ComponentBase<EL>, key: string, typeId: string): any;
|
|
103
|
+
setPaintStyle<EL>(c: ComponentBase<EL>, style: PaintStyle): void;
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
setHoverPaintStyle<EL>(c: ComponentBase<EL>, style: PaintStyle): void;
|
|
108
|
+
getType<EL>(c: ComponentBase<EL>): string[];
|
|
109
|
+
clearTypes<EL>(c: ComponentBase<EL>, params?: any): void;
|
|
110
|
+
setType<EL>(c: ComponentBase<EL>, typeId: string, params?: any): Record<string, any>;
|
|
111
|
+
applyType<EL>(c: ComponentBase<EL>, t: any, params?: any): void;
|
|
112
|
+
appendToDefaultType<EL>(c: ComponentBase<EL>, obj: Record<string, any>): void;
|
|
113
|
+
destroy<EL>(c: ComponentBase<EL>): void;
|
|
114
|
+
setVisible<EL>(c: ComponentBase<EL>, v: boolean): void;
|
|
115
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Connection } from './connection-impl';
|
|
2
|
+
import { ViewportElement } from "../viewport";
|
|
3
|
+
import { Connector, ConnectorOptions, PaintAxis, Orientation } from "../../common";
|
|
4
|
+
import { Quadrant, AnchorPlacement } from "../../../core";
|
|
5
|
+
export type ConnectorComputeParams = {
|
|
6
|
+
sourcePos: AnchorPlacement;
|
|
7
|
+
targetPos: AnchorPlacement;
|
|
8
|
+
strokeWidth: number;
|
|
9
|
+
sourceInfo: ViewportElement<any>;
|
|
10
|
+
targetInfo: ViewportElement<any>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export interface PaintGeometry {
|
|
16
|
+
sx: number;
|
|
17
|
+
sy: number;
|
|
18
|
+
tx: number;
|
|
19
|
+
ty: number;
|
|
20
|
+
so: Orientation;
|
|
21
|
+
to: Orientation;
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
w: number;
|
|
25
|
+
h: number;
|
|
26
|
+
quadrant: Quadrant;
|
|
27
|
+
startStubX: number;
|
|
28
|
+
startStubY: number;
|
|
29
|
+
endStubX: number;
|
|
30
|
+
endStubY: number;
|
|
31
|
+
isXGreaterThanStubTimes2: boolean;
|
|
32
|
+
isYGreaterThanStubTimes2: boolean;
|
|
33
|
+
opposite: boolean;
|
|
34
|
+
perpendicular: boolean;
|
|
35
|
+
orthogonal: boolean;
|
|
36
|
+
sourceAxis: PaintAxis;
|
|
37
|
+
stubs: [number, number];
|
|
38
|
+
anchorOrientation?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function emptyPaintGeometry(): PaintGeometry;
|
|
41
|
+
/**
|
|
42
|
+
* Helper method for connectors - AnchorPlacement is a common component of a connector geometry.
|
|
43
|
+
* @internal
|
|
44
|
+
* @param a
|
|
45
|
+
* @param dx
|
|
46
|
+
* @param dy
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function transformAnchorPlacement(a: AnchorPlacement, dx: number, dy: number): AnchorPlacement;
|
|
50
|
+
/**
|
|
51
|
+
* Base method to use when creating Connectors.
|
|
52
|
+
* @param type
|
|
53
|
+
* @param connection
|
|
54
|
+
* @param params
|
|
55
|
+
* @param defaultStubs
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
export declare function _createConnectorBase(type: string, connection: Connection<any>, params: ConnectorOptions, defaultStubs: [number, number]): Connector;
|
|
59
|
+
/**
|
|
60
|
+
* This is only ever called when setting an anchor location from geometry.
|
|
61
|
+
* @param loc
|
|
62
|
+
* @param connection
|
|
63
|
+
* @param endpointIndex
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare function _setAnchorLocation(loc: AnchorPlacement, connection: Connection<any>, endpointIndex: number): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Segment, SegmentHandler, SegmentParams } from "../../common";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export interface ArcSegmentParams extends SegmentParams {
|
|
7
|
+
cx: number;
|
|
8
|
+
cy: number;
|
|
9
|
+
r: number;
|
|
10
|
+
ac: boolean;
|
|
11
|
+
startAngle?: number;
|
|
12
|
+
endAngle?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
export declare const SEGMENT_TYPE_ARC = "Arc";
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
export interface ArcSegment extends Segment {
|
|
24
|
+
cx: number;
|
|
25
|
+
cy: number;
|
|
26
|
+
radius: number;
|
|
27
|
+
anticlockwise: boolean;
|
|
28
|
+
startAngle: number;
|
|
29
|
+
endAngle: number;
|
|
30
|
+
sweep: number;
|
|
31
|
+
length: number;
|
|
32
|
+
circumference: number;
|
|
33
|
+
frac: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
export declare const ArcSegmentHandler: SegmentHandler<ArcSegment, ArcSegmentParams>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { UICore } from "../core";
|
|
2
|
+
import { ConnectParams } from '../params';
|
|
3
|
+
import { ComponentBase } from "../component/component";
|
|
4
|
+
import { Overlay, OverlayPaintParams } from "../overlay/overlay";
|
|
5
|
+
import { Connector, AnchorSpec, LightweightAnchor } from "../../common";
|
|
6
|
+
import { PointXY, Edge, ProxyLocation } from "../../../core";
|
|
7
|
+
import { ViewportElement } from "../viewport";
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export type ConnectionOptions<E = any> = ConnectParams<E> & {
|
|
12
|
+
source?: E;
|
|
13
|
+
target?: E;
|
|
14
|
+
previousConnection?: Connection<E>;
|
|
15
|
+
geometry?: any;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The information stored when we proxy an edge.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export interface ConnectionProxy<E> {
|
|
22
|
+
originalElement: ViewportElement<E>;
|
|
23
|
+
element: ViewportElement<E>;
|
|
24
|
+
originalAnchor: LightweightAnchor;
|
|
25
|
+
originallyVisible: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The visual representation of an edge.
|
|
29
|
+
*/
|
|
30
|
+
export interface Connection<EL> extends ComponentBase<EL> {
|
|
31
|
+
edge: Edge;
|
|
32
|
+
avoidVertices: boolean;
|
|
33
|
+
lastPaintedAt: string;
|
|
34
|
+
suspendedElement: EL;
|
|
35
|
+
suspendedElementId: string;
|
|
36
|
+
suspendedElementType: string;
|
|
37
|
+
suspendedIndex: number;
|
|
38
|
+
sourceId: string;
|
|
39
|
+
targetId: string;
|
|
40
|
+
sourceElement: EL;
|
|
41
|
+
targetElement: EL;
|
|
42
|
+
detachable: boolean;
|
|
43
|
+
reattach: boolean;
|
|
44
|
+
anchorDefs: {
|
|
45
|
+
source: AnchorSpec;
|
|
46
|
+
target: AnchorSpec;
|
|
47
|
+
};
|
|
48
|
+
anchors: {
|
|
49
|
+
source: LightweightAnchor;
|
|
50
|
+
target: LightweightAnchor;
|
|
51
|
+
};
|
|
52
|
+
instance: UICore<EL>;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
overlays: Record<string, Overlay<EL>>;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
overlayPositions: Record<string, PointXY>;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
overlayPlacements: Record<string, OverlayPaintParams>;
|
|
65
|
+
sourceMarker: Overlay<EL>;
|
|
66
|
+
targetMarker: Overlay<EL>;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
connector: Connector;
|
|
71
|
+
/** @internal */
|
|
72
|
+
proxies: Record<ProxyLocation, Array<ConnectionProxy<EL>>>;
|
|
73
|
+
scope: string;
|
|
74
|
+
}
|
|
75
|
+
export declare const DEFAULT_LABEL_LOCATION = 0.5;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @param instance
|
|
79
|
+
* @param params
|
|
80
|
+
*/
|
|
81
|
+
export declare function $createConnection<EL>(instance: UICore<EL, any>, params: ConnectionOptions<EL>): Connection<EL>;
|