@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,65 @@
|
|
|
1
|
+
import { Edge, Vertex, PointXY, ObjectAnchorSpec } from "../core";
|
|
2
|
+
import { Connection, FullOverlaySpec } from "../ui";
|
|
3
|
+
/**
|
|
4
|
+
* Base options for activating a path editor.
|
|
5
|
+
* @group Edges
|
|
6
|
+
* @category Path Editors
|
|
7
|
+
*/
|
|
8
|
+
export interface ConnectorEditorActivateParams<EL> {
|
|
9
|
+
/**
|
|
10
|
+
* If true, show a button the user can use to delete the edge. Defaults to false.
|
|
11
|
+
*/
|
|
12
|
+
deleteButton?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Classname to set on the delete button. Defaults to "vjs-edge-delete".
|
|
15
|
+
*/
|
|
16
|
+
deleteButtonClass?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Location on the path to put the delete button, as a measure of the length of the path. For instance,
|
|
19
|
+
* the default value of 0.1 means the delete button will be placed at a point that is 1/10th of the total length of the path.
|
|
20
|
+
* Note that you can supply an array of positions here and one delete button will be created for each entry.
|
|
21
|
+
*/
|
|
22
|
+
deleteButtonLocation?: number | Array<number>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional function allowing you to specify the location of the placeholder when the user
|
|
25
|
+
* is dragging anchor.
|
|
26
|
+
* @param el
|
|
27
|
+
* @param elxy
|
|
28
|
+
* @param vertex
|
|
29
|
+
*/
|
|
30
|
+
anchorPositionFinder?: (el: EL, elxy: PointXY, vertex: Vertex) => ObjectAnchorSpec | null;
|
|
31
|
+
/**
|
|
32
|
+
* Optional array of allowed positions for anchors to be relocated to
|
|
33
|
+
*/
|
|
34
|
+
anchorPositions?: Array<ObjectAnchorSpec>;
|
|
35
|
+
/**
|
|
36
|
+
* Optional interceptor to invoke when the user presses the delete button. If the user wishes to go ahead
|
|
37
|
+
* with the edge deletion, `doDelete` will be invoked.
|
|
38
|
+
* @param edge
|
|
39
|
+
* @param connection
|
|
40
|
+
* @param doDelete
|
|
41
|
+
*/
|
|
42
|
+
onMaybeDelete?: (edge: Edge, connection: Connection<EL>, doDelete: (data: Record<string, any>) => any) => any;
|
|
43
|
+
/**
|
|
44
|
+
* Optional array of overlays to decorate the edge with while it is being edited.
|
|
45
|
+
*/
|
|
46
|
+
overlays?: Array<FullOverlaySpec>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export interface ConnectorEditor<EL> {
|
|
52
|
+
reset(): void;
|
|
53
|
+
activate<T extends ConnectorEditorActivateParams<EL>>(edge: Edge, connection: Connection<EL>, params?: T): void;
|
|
54
|
+
deactivate(e?: Event): void;
|
|
55
|
+
/**
|
|
56
|
+
* Returns whether or not the editor has been activated.
|
|
57
|
+
*/
|
|
58
|
+
isActive(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Returns whether or not the editor is in the middle of an operation - the user
|
|
61
|
+
* is dragging a handle, typically.
|
|
62
|
+
*/
|
|
63
|
+
isBusy(): boolean;
|
|
64
|
+
$supportsHoverMode: boolean;
|
|
65
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PointXY, RectangleXY, Vertex } from "../../core";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
import { BrowserElement } from "../util";
|
|
4
|
+
import { AnchorPositionFinder, AnchorRecord, Connection, Face, LightweightAnchor, LightweightContinuousAnchor } from "../../ui";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function relocateContinuousAnchor(anchor: LightweightContinuousAnchor, pos: PointXY, constrainRect: RectangleXY): [AnchorRecord, Face];
|
|
9
|
+
/**
|
|
10
|
+
* Relocate the given dynamic anchor according to the given proximity of `pos` to each of the anchor's supported locations. the face is changed
|
|
11
|
+
* on the anchor itself (and the anchor is locked), and in this case we simply return the current value of `pos`, meaning the user sees the drag proxy
|
|
12
|
+
* under the mouse cursor, which is probably not where the anchor is now positioned, but it makes for a better UX. on drag stop, for all anchor types,
|
|
13
|
+
* the anchor proxy is relocated to the current value.
|
|
14
|
+
* @param anchor
|
|
15
|
+
* @param pos
|
|
16
|
+
* @param constrainRect
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function relocateDynamicAnchor(anchor: LightweightAnchor, pos: PointXY, constrainRect: RectangleXY): AnchorRecord;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* @param anchor
|
|
23
|
+
* @param anchorPositionFinder
|
|
24
|
+
* @param actualElement
|
|
25
|
+
* @param proportionalPos
|
|
26
|
+
* @param vertex
|
|
27
|
+
* @param constrainRect
|
|
28
|
+
* @param connection
|
|
29
|
+
* @param instance
|
|
30
|
+
*/
|
|
31
|
+
export declare function relocateWithPositionFinder(anchor: LightweightAnchor, anchorPositionFinder: AnchorPositionFinder<BrowserElement>, actualElement: BrowserElement, proportionalPos: PointXY, vertex: Vertex, constrainRect: RectangleXY, connection: Connection<any>, instance: BrowserUI): AnchorRecord;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Added to the element placed at the location of an anchor for a connection that is being edited, and to the candidate locations when the anchor is being dragged.
|
|
3
|
+
* @group Edges
|
|
4
|
+
* @category CSS Classes
|
|
5
|
+
* @cssClass
|
|
6
|
+
* @context edges, path-editors
|
|
7
|
+
*/
|
|
8
|
+
export declare const CLASS_ANCHOR_PLACEHOLDER = "vjs-anchor-placeholder";
|
|
9
|
+
/**
|
|
10
|
+
* Added to the elements drawn to show where a certain anchor may be relocated to (only applicable for dynamic anchors)
|
|
11
|
+
* @group Edges
|
|
12
|
+
* @category CSS Classes
|
|
13
|
+
* @cssClass
|
|
14
|
+
* @context edges, path-editors
|
|
15
|
+
*/
|
|
16
|
+
export declare const CLASS_ANCHOR_CANDIDATE = "vjs-anchor-candidate";
|
|
17
|
+
export declare const CLASS_CONNECTION_EDIT = "vjs-connection-edit";
|
|
18
|
+
/**
|
|
19
|
+
* CSS class added to an edge guideline by a connector editor
|
|
20
|
+
* @group Edges
|
|
21
|
+
* @category CSS Classes
|
|
22
|
+
* @cssClass
|
|
23
|
+
* @context edges, path-editors
|
|
24
|
+
*/
|
|
25
|
+
export declare const CLASS_EDGE_GUIDELINE = "vjs-edge-guideline";
|
|
26
|
+
/**
|
|
27
|
+
* Class applied to edge drag handles.
|
|
28
|
+
* @group Edges
|
|
29
|
+
* @category Path Editors
|
|
30
|
+
* @cssClass
|
|
31
|
+
* @context edges, path-editors
|
|
32
|
+
*/
|
|
33
|
+
export declare const EDGE_DRAG_HANDLE = "vjs-edge-handle";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Connection, LightweightAnchor, StraightConnectorSegment } from "../../ui";
|
|
2
|
+
import { Edge, PointXY, Vertex } from "../../core";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const ANCHOR_PLACEHOLDER_SELECTOR: string;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export interface SegmentEditorInfo<HandleType, SegmentType = StraightConnectorSegment> {
|
|
9
|
+
el: HandleType;
|
|
10
|
+
segment: SegmentType;
|
|
11
|
+
edge: Edge;
|
|
12
|
+
connection: Connection<any>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export interface BaseEdgeEditorHandleElement<InfoType extends SegmentEditorInfo<any, any>> extends HTMLElement {
|
|
18
|
+
_vjsDragHandle: InfoType;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The default width and height of the buttons added by a path editor.
|
|
22
|
+
* @group Edges
|
|
23
|
+
* @category Path Editors
|
|
24
|
+
* @constant
|
|
25
|
+
*/
|
|
26
|
+
export declare const DEFAULT_CONNECTOR_EDITOR_BUTTON_SIZE = 12;
|
|
27
|
+
/**
|
|
28
|
+
* The default width and height in pixels of the element used to show the current position of a dynamic anchor, and the positions to which it may be dragged.
|
|
29
|
+
* @group Edges
|
|
30
|
+
* @category Path Editors
|
|
31
|
+
* @constant
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEFAULT_ANCHOR_PLACEHOLDER_SIZE = 15;
|
|
34
|
+
/**
|
|
35
|
+
* Base options for a ConnectorEditor. The options for specific editors extend this interface.
|
|
36
|
+
* @group Edges
|
|
37
|
+
* @category Path Editors
|
|
38
|
+
*/
|
|
39
|
+
export interface ConnectorEditorOptions {
|
|
40
|
+
/**
|
|
41
|
+
* When true (which is the default), tells the EdgePathEditor to mark any new connection dragged with the mouse as "edited", ie. to fix the initial geometry. This is particularly beneficial when using an `anchorPositionFinder`: it results in every new edge having a 'geometry' object, so that if you export the dataset, you will get the anchor values you chose in your anchorPositionFinder. If an edge does not get exported with geometry for its path, next time it is loaded it will be assigned anchors automatically, which may or may not match the anchors you actually wanted.
|
|
42
|
+
*/
|
|
43
|
+
activeMode?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* When true, the path editor is activated when the user hovers over an edge. For touch devices this is ignored, since there are no hover events.
|
|
46
|
+
*/
|
|
47
|
+
hoverMode?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The width and height in pixels of the element used to show the current position of a dynamic anchor, and the positions to which it may be dragged. Defaults to {@link DEFAULT_ANCHOR_PLACEHOLDER_SIZE}
|
|
50
|
+
*/
|
|
51
|
+
anchorPlaceholderSize?: number;
|
|
52
|
+
/**
|
|
53
|
+
* The width and height of the buttons added by this editor.
|
|
54
|
+
*/
|
|
55
|
+
buttonSize?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export type AnchorDragContext = {
|
|
61
|
+
rotation: number;
|
|
62
|
+
center: PointXY;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export interface AnchorPlaceholderElement extends HTMLElement {
|
|
68
|
+
_vjsAnchor: {
|
|
69
|
+
anchor: LightweightAnchor;
|
|
70
|
+
vertex: Vertex;
|
|
71
|
+
idx: number;
|
|
72
|
+
edge: Edge;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Edge, Group, Node } from "../../core";
|
|
2
|
+
import { BrowserElement } from "../util";
|
|
3
|
+
import { DragHandler2, Connector, Connection } from "../../ui";
|
|
4
|
+
import { ConnectorEditorOptions } from "./definitions";
|
|
5
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
6
|
+
import { ConnectorEditor, ConnectorEditorActivateParams } from "../connector-editor";
|
|
7
|
+
import { EventManager } from "../event-manager";
|
|
8
|
+
/**
|
|
9
|
+
* Base class for connector editors. This isn't a class that users of the API will ordinarily need to interact
|
|
10
|
+
* directly with.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class EditorBase<ConnectorType extends Connector> implements ConnectorEditor<BrowserElement> {
|
|
14
|
+
ui: BrowserUI;
|
|
15
|
+
current: Connection<BrowserElement>;
|
|
16
|
+
currentConnector: ConnectorType;
|
|
17
|
+
protected currentEdge: Edge;
|
|
18
|
+
private _currentEdgeType;
|
|
19
|
+
private _currentEdgeTypeMapping;
|
|
20
|
+
$currentEdgeFrame: SVGElement;
|
|
21
|
+
$generatedGeometry: any;
|
|
22
|
+
$hasEdits: boolean;
|
|
23
|
+
private _anchorCandidates;
|
|
24
|
+
currentOverlays: Array<any>;
|
|
25
|
+
protected sourceDimensions: any;
|
|
26
|
+
protected targetDimensions: any;
|
|
27
|
+
private _sourceAnchorPlaceholder;
|
|
28
|
+
private _targetAnchorPlaceholder;
|
|
29
|
+
private _geometryAtStartOfAnchorDrag;
|
|
30
|
+
private _active;
|
|
31
|
+
private _$busy;
|
|
32
|
+
abstract $supportsHoverMode: boolean;
|
|
33
|
+
buttonSize: number;
|
|
34
|
+
private readonly _anchorPlaceholderSize;
|
|
35
|
+
private sourceAnchorPositionFinder;
|
|
36
|
+
private targetAnchorPositionFinder;
|
|
37
|
+
eventManager: EventManager;
|
|
38
|
+
private _currentAnchorPositionFinder;
|
|
39
|
+
private _anchorVertex;
|
|
40
|
+
private _dragHandlers;
|
|
41
|
+
private _anchorDragContext;
|
|
42
|
+
abstract $repaint(args?: any): void;
|
|
43
|
+
isBusy(): boolean;
|
|
44
|
+
private _repaint;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
$cloneCurrentGeometry(): any;
|
|
49
|
+
/**
|
|
50
|
+
* For the given vertex type, retrieve its type definition and return any `anchorPositions` that were
|
|
51
|
+
* registered for it.
|
|
52
|
+
* @param vertex
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private _resolveAnchorPositions;
|
|
56
|
+
protected constructor(ui: BrowserUI, options?: ConnectorEditorOptions);
|
|
57
|
+
private _attachOverlay;
|
|
58
|
+
private _attachOverlays;
|
|
59
|
+
private _detachOverlays;
|
|
60
|
+
private _attachDeleteButton;
|
|
61
|
+
/**
|
|
62
|
+
* Repaints the current connection, passing some arguments, optionally. These are retrieved inside `refresh`, and are ultimately handed off to the subclass's `repaint` method. Subclasses should call this on things like handle dragging, as the existence (and nature of ) args can subsequently be used by their `repaint` method to decide whether or not to redraw all the handles (such as you would in the event of an external paint event), or just to reposition the existing ones. During a drag, of course, blowing away the current handle would be bad.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
protected $repaintConnection(args?: any): void;
|
|
66
|
+
/**
|
|
67
|
+
* Updates the model with new geometry for the given edge.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
protected $updateModel(geometry: any, originalGeometry: any): void;
|
|
71
|
+
/**
|
|
72
|
+
* Redraw anchor placeholders and editor handles.
|
|
73
|
+
* @param args Optional args to pass to the subclass repaint method.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
private _refresh;
|
|
77
|
+
/**
|
|
78
|
+
* Draws, or repositions if they exist already, the anchor placeholders for the current connection.
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
private _drawAnchorPlaceholders;
|
|
82
|
+
/**
|
|
83
|
+
* Removes anchor placeholders.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
private _cleanupAnchors;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
private _clearGeometry;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
reset(): void;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
isActive(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Sets the position of the handle where x,y identifies the desired location of the handle's center. This method
|
|
101
|
+
* gets the element size from the dom in order to adjust the handle location.
|
|
102
|
+
* @internal
|
|
103
|
+
* @param el
|
|
104
|
+
* @param x
|
|
105
|
+
* @param y
|
|
106
|
+
*/
|
|
107
|
+
protected $setElementPosition(el: HTMLElement | SVGElement, x: number, y: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* Activate the editor, with the given Connection.
|
|
110
|
+
* @param edge - Edge to edit.
|
|
111
|
+
* @param connection - Connection to activate the editor for.
|
|
112
|
+
* @param params - optional params for the activation. The type of this depends on the subclass.
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
activate<T extends ConnectorEditorActivateParams<BrowserElement>>(edge: Edge, connection: Connection<BrowserElement>, params?: T): void;
|
|
116
|
+
/**
|
|
117
|
+
* Deactivates the editor, removing all editor handles and anchor placeholders etc. May be called directly by an
|
|
118
|
+
* API user but mostly calling this method is handled internally.
|
|
119
|
+
* @param e
|
|
120
|
+
*/
|
|
121
|
+
deactivate(e?: Event): void;
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @param x
|
|
125
|
+
* @param y
|
|
126
|
+
* @param width
|
|
127
|
+
* @param height
|
|
128
|
+
* @param clazz
|
|
129
|
+
* @param visible
|
|
130
|
+
*/
|
|
131
|
+
$makeAndAppendCircularHandle(x: number, y: number, width: number, height: number, clazz: string, visible?: boolean): SVGElement;
|
|
132
|
+
$makeAndAppendRectangularHandle(x: number, y: number, width: number, height: number, rx: number, ry: number, clazz: string, visible?: boolean): SVGElement;
|
|
133
|
+
$makeAndAppendDeleteHandle(x: number, y: number, width: number, height: number, clazz: string, visible?: boolean): SVGElement;
|
|
134
|
+
protected $addDragHandler(o: DragHandler2<BrowserElement>): void;
|
|
135
|
+
/**
|
|
136
|
+
* An element is being dragged.
|
|
137
|
+
* @param vertex
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
private _elementDragging;
|
|
141
|
+
private _elementDragged;
|
|
142
|
+
/**
|
|
143
|
+
* Abstract method for subclasses to implement. This method is expected to clear everything out of the DOM that the
|
|
144
|
+
* editor has drawn.
|
|
145
|
+
* @private
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
abstract $clearHandles(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Abstract method for subclasses to implement.
|
|
151
|
+
* @param conn
|
|
152
|
+
* @param params
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
abstract $activate(conn: Connection<BrowserElement>, params?: any): void;
|
|
156
|
+
/**
|
|
157
|
+
* Notification that an element has just been dragged. Subclasses should implement.
|
|
158
|
+
* The orthogonal editor trims the edge in response to this. The other editors dont do
|
|
159
|
+
* anything.
|
|
160
|
+
* @param vertex
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
abstract $elementDragged(vertex: Node | Group): void;
|
|
164
|
+
/**
|
|
165
|
+
* Notification that an element is being dragged. Subclasses should implement.
|
|
166
|
+
* Typically they just repaint.
|
|
167
|
+
* @param vertex
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
abstract $elementDragging(vertex: Node | Group): void;
|
|
171
|
+
/**
|
|
172
|
+
* Returns whether the given vertex is either the source or target of the current edge, or if it is the parent vertex for the source or target of the current edge, where the source/target is a port
|
|
173
|
+
* @param vertex
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
private _isEdgeVertexOrParent;
|
|
177
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Edge, Constructable } from "../../core";
|
|
2
|
+
import { BrowserElement } from "../util";
|
|
3
|
+
import { ConnectorEditor, ConnectorEditorActivateParams } from "../connector-editor";
|
|
4
|
+
import { ConnectorEditorOptions } from "./definitions";
|
|
5
|
+
import { Connection } from "../../ui";
|
|
6
|
+
import { Surface } from "../surface-renderer";
|
|
7
|
+
export declare const editors: Map<string, Constructable<ConnectorEditor<BrowserElement>>>;
|
|
8
|
+
export * from "./editor-base";
|
|
9
|
+
export * from './css-constants';
|
|
10
|
+
export * from './definitions';
|
|
11
|
+
export * from './util';
|
|
12
|
+
export * from './anchors';
|
|
13
|
+
/**
|
|
14
|
+
* Editor for edge paths. Supports all connector types.
|
|
15
|
+
* @group Edges
|
|
16
|
+
*/
|
|
17
|
+
export declare class EdgePathEditor {
|
|
18
|
+
readonly ui: Surface;
|
|
19
|
+
private readonly _options?;
|
|
20
|
+
private _connectorEditors;
|
|
21
|
+
private readonly _hoverMode;
|
|
22
|
+
private _suspended;
|
|
23
|
+
private _currentEdge;
|
|
24
|
+
private _activeEditor;
|
|
25
|
+
constructor(ui: Surface, _options?: ConnectorEditorOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Start editing the given edge or connection, optionally with the given edit parameters.
|
|
28
|
+
* @param edgeOrConnection
|
|
29
|
+
* @param params
|
|
30
|
+
*/
|
|
31
|
+
startEditing<T extends ConnectorEditorActivateParams<BrowserElement>>(edgeOrConnection: Edge | Connection<BrowserElement>, params?: T): void;
|
|
32
|
+
/**
|
|
33
|
+
* Stop editing any connector paths.
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
stopEditing(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Clear the edits for the given connection, returning its path to the automatically computed path.
|
|
39
|
+
* @param edgeOrConnection
|
|
40
|
+
*/
|
|
41
|
+
clearEdits(edgeOrConnection: string | Edge | Connection<BrowserElement>): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Resolves a `Connection` from the given input, which can be an edge id, Edge, or Connection.
|
|
44
|
+
* @param edgeOrConnection ID of an Edge, Edge, or Connection
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
private _resolveConnection;
|
|
48
|
+
/**
|
|
49
|
+
* Destroy the path editor - clears the internal map of editors and released held memory.
|
|
50
|
+
*/
|
|
51
|
+
destroy(): void;
|
|
52
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BrowserElement } from "../util";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* @param radius
|
|
6
|
+
* @param clazz
|
|
7
|
+
* @param visible
|
|
8
|
+
*/
|
|
9
|
+
export declare function $makeCircularHandle(radius: number, clazz: string, atts: Record<string, any>, visible?: boolean): SVGElement;
|
|
10
|
+
export declare function $makeRectangularHandle(width: number, height: number, rx: number, ry: number, clazz: string, atts: Record<string, any>, visible?: boolean): SVGElement;
|
|
11
|
+
export declare function $makeSvgAnchorPlaceholder<E extends HTMLElement>(ui: BrowserUI, parent: BrowserElement, x: number, y: number, width: number, height: number, clazz: string, visible?: boolean): E;
|
|
12
|
+
/**
|
|
13
|
+
* Make a circular svg handle, appends it to the tools layer for the given surface, then returns the element.
|
|
14
|
+
* @param ui
|
|
15
|
+
* @param x
|
|
16
|
+
* @param y
|
|
17
|
+
* @param width
|
|
18
|
+
* @param clazz
|
|
19
|
+
* @param visible
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function $makeAndAppendCircularHandle(ui: BrowserUI, x: number, y: number, width: number, clazz: string, atts: Record<string, any>, visible?: boolean): SVGElement;
|
|
23
|
+
/**
|
|
24
|
+
* Make a rectangular svg handle, appends it to the tools layer for the given surface, then returns the element.
|
|
25
|
+
* @param ui
|
|
26
|
+
* @param x
|
|
27
|
+
* @param y
|
|
28
|
+
* @param width
|
|
29
|
+
* @param clazz
|
|
30
|
+
* @param visible
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function $makeAndAppendRectangularHandle(ui: BrowserUI, x: number, y: number, width: number, height: number, rx: number, ry: number, clazz: string, atts: Record<string, any>, visible?: boolean): SVGElement;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { EditorBase } from "../connector-editors/editor-base";
|
|
2
|
+
import { Group, Node } from "../../core";
|
|
3
|
+
import { ConnectorEditorOptions } from "../connector-editors/definitions";
|
|
4
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
5
|
+
import { BrowserElement } from "../util";
|
|
6
|
+
import { Connection, CubicBezierConnector } from "../../ui";
|
|
7
|
+
/**
|
|
8
|
+
* Options for a bezier path editor.
|
|
9
|
+
* @group Edges
|
|
10
|
+
* @category Path Editors
|
|
11
|
+
*/
|
|
12
|
+
export interface BezierEditorOptions extends ConnectorEditorOptions {
|
|
13
|
+
/**
|
|
14
|
+
* What size to use for handles. Defaults to 12 pixels.
|
|
15
|
+
*/
|
|
16
|
+
handleSize?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
interface BezierEditorHandleElement extends HTMLElement {
|
|
22
|
+
idx: 0 | 1;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
interface BezierEditorGuidelineElement extends SVGElement {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Path editor for Bezier connectors.
|
|
31
|
+
* @group Edges
|
|
32
|
+
* @category Path Editors
|
|
33
|
+
*/
|
|
34
|
+
export declare class BezierEditor extends EditorBase<CubicBezierConnector> {
|
|
35
|
+
static type: string;
|
|
36
|
+
$supportsHoverMode: boolean;
|
|
37
|
+
/** @internal */
|
|
38
|
+
h1: BezierEditorHandleElement;
|
|
39
|
+
/** @internal */
|
|
40
|
+
h2: BezierEditorHandleElement;
|
|
41
|
+
/** @internal */
|
|
42
|
+
l1: BezierEditorGuidelineElement;
|
|
43
|
+
/** @internal */
|
|
44
|
+
l2: BezierEditorGuidelineElement;
|
|
45
|
+
/** @internal */
|
|
46
|
+
lockHandles: boolean;
|
|
47
|
+
private readonly _handleSize;
|
|
48
|
+
private _cp1;
|
|
49
|
+
private _cp2;
|
|
50
|
+
private _sp;
|
|
51
|
+
private _tp;
|
|
52
|
+
private _cp1AtDragStart;
|
|
53
|
+
private _cp2AtDragStart;
|
|
54
|
+
/** @internal */
|
|
55
|
+
constructor(ui: BrowserUI, params: BezierEditorOptions);
|
|
56
|
+
$activate(conn: Connection<BrowserElement>, params?: {
|
|
57
|
+
guidelines?: boolean;
|
|
58
|
+
}): void;
|
|
59
|
+
$clearHandles(): void;
|
|
60
|
+
$elementDragged(vertex: Node | Group): void;
|
|
61
|
+
$elementDragging(vertex: Node | Group): void;
|
|
62
|
+
$repaint(args?: any): void;
|
|
63
|
+
private _makeHandles;
|
|
64
|
+
private _updateHandlePositions;
|
|
65
|
+
private _makeGuideline;
|
|
66
|
+
private _updateGuidelines;
|
|
67
|
+
private _updateGuideline;
|
|
68
|
+
private _updateControlPoints;
|
|
69
|
+
private _updateSourceAndTargetPoints;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Path editor for QuadraticBezier connectors.
|
|
73
|
+
* @group Edges
|
|
74
|
+
* @category Path Editors
|
|
75
|
+
*/
|
|
76
|
+
export declare class QuadraticBezierEditor extends BezierEditor {
|
|
77
|
+
/** @internal */
|
|
78
|
+
static type: string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
constructor(ui: BrowserUI, params: any);
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS class added to all handles used by the bezier edge editor.
|
|
3
|
+
* @group Edges
|
|
4
|
+
* @category Path Editors
|
|
5
|
+
*/
|
|
6
|
+
export declare const CLASS_BEZIER_HANDLE = "vjs-bezier-handle";
|
|
7
|
+
/**
|
|
8
|
+
* CSS class assigned to a control point handle in the bezier edge editor
|
|
9
|
+
* @group Edges
|
|
10
|
+
* @category Path Editors
|
|
11
|
+
*/
|
|
12
|
+
export declare const CLASS_BEZIER_HANDLE_CONTROL_POINT = "vjs-bezier-handle-control-point";
|
|
13
|
+
/**
|
|
14
|
+
* CSS class assigned to the first control point handle in the bezier edge editor
|
|
15
|
+
* @group Edges
|
|
16
|
+
* @category Path Editors
|
|
17
|
+
*/
|
|
18
|
+
export declare const CLASS_BEZIER_HANDLE_CONTROL_POINT_1 = "vjs-bezier-handle-control-point-1";
|
|
19
|
+
/**
|
|
20
|
+
* CSS class assigned to the second control point handle in the bezier edge editor
|
|
21
|
+
* @group Edges
|
|
22
|
+
* @category Path Editors
|
|
23
|
+
*/
|
|
24
|
+
export declare const CLASS_BEZIER_HANDLE_CONTROL_POINT_2 = "vjs-bezier-handle-control-point-2";
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare const CLASS_BEZIER_SECONDARY_HANDLE = "vjs-bezier-handle-secondary";
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare const CLASS_BEZIER_SECONDARY_SOURCE_HANDLE = "vjs-bezier-handle-secondary-source";
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare const CLASS_BEZIER_SECONDARY_TARGET_HANDLE = "vjs-bezier-handle-secondary-target";
|
|
37
|
+
/**
|
|
38
|
+
* CSS class assigned to the guidelines linking the anchor points with the control point markers in the bezier edge editor.
|
|
39
|
+
* @group Edges
|
|
40
|
+
* @category Path Editors
|
|
41
|
+
*/
|
|
42
|
+
export declare const CLASS_BEZIER_GUIDELINE = "vjs-bezier-guideline";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './css-constants';
|
|
2
|
+
export * from "./bezier-editor";
|
|
3
|
+
/**
|
|
4
|
+
* Register the bezier/quadratic bezier editors with the connector editors modules. It is not necessary for
|
|
5
|
+
* library users to manually call this method.
|
|
6
|
+
* @group Factory Methods
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function initializeBezierConnectorEditors(): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assigned to all handles in the orthogonal editor
|
|
3
|
+
* @group Edges
|
|
4
|
+
* @category Path Editors
|
|
5
|
+
* @constant
|
|
6
|
+
*/
|
|
7
|
+
export declare const CLASS_ORTHOGONAL_HANDLE: string;
|
|
8
|
+
/**
|
|
9
|
+
* Assigned to segment drag handles in the orthogonal editor
|
|
10
|
+
* @group Edges
|
|
11
|
+
* @category Path Editors
|
|
12
|
+
* @constant
|
|
13
|
+
*/
|
|
14
|
+
export declare const CLASS_ORTHOGONAL_SEGMENT_DRAG_HANDLE: string;
|
|
15
|
+
/**
|
|
16
|
+
* Assigned to segment drag handles on horizontal segments in the orthogonal editor. Indicates a segment can be dragged in the Y axis
|
|
17
|
+
* @group Edges
|
|
18
|
+
* @category Path Editors
|
|
19
|
+
* @constant
|
|
20
|
+
*/
|
|
21
|
+
export declare const CLASS_ORTHOGONAL_SEGMENT_DRAG_HANDLE_VERTICAL: string;
|
|
22
|
+
/**
|
|
23
|
+
* Assigned to segment drag handles on vertical segments in the orthogonal editor. Indicates a segment can be dragged in the X axis
|
|
24
|
+
* @group Edges
|
|
25
|
+
* @category Path Editors
|
|
26
|
+
* @constant
|
|
27
|
+
*/
|
|
28
|
+
export declare const CLASS_ORTHOGONAL_SEGMENT_DRAG_HANDLE_HORIZONTAL: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './css-constants';
|
|
2
|
+
export * from "./orthogonal-editor";
|
|
3
|
+
/**
|
|
4
|
+
* Register the orthogonal editor with the connector editors modules. It is not necessary for
|
|
5
|
+
* library users to manually call this method.
|
|
6
|
+
* @group Factory Methods
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function initializeOrthogonalConnectorEditors(): void;
|