@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,34 @@
|
|
|
1
|
+
import { Decorator } from "./decorators";
|
|
2
|
+
import { BrowserElement } from "../util";
|
|
3
|
+
import { ModelOptions, Constructable } from "../../core";
|
|
4
|
+
import { SurfaceOptions } from "./surface-render-options";
|
|
5
|
+
export * from './definitions';
|
|
6
|
+
export * from './plugins';
|
|
7
|
+
export * from './anim';
|
|
8
|
+
export * from './decorators';
|
|
9
|
+
export * from './elastic-group-manager';
|
|
10
|
+
export * from './params';
|
|
11
|
+
export * from './shape-palette';
|
|
12
|
+
export * from './shape-palette-options';
|
|
13
|
+
export * from './surface';
|
|
14
|
+
export * from './surface-decorator';
|
|
15
|
+
export * from './surface-events';
|
|
16
|
+
export * from './surface-render-options';
|
|
17
|
+
export * from './diagrams';
|
|
18
|
+
export * from './css-classes';
|
|
19
|
+
/**
|
|
20
|
+
* Register a new decorator for use with the {@link Surface} component.
|
|
21
|
+
* @param name Name to use when registering the decorator.
|
|
22
|
+
* @param dec Decorator function.
|
|
23
|
+
* @group Components
|
|
24
|
+
* @category Decorators
|
|
25
|
+
*/
|
|
26
|
+
export declare function registerDecorator(name: string, dec: Constructable<Decorator>): void;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a Surface, rendering to the given container, with the given surface options and model options. This method provides a shortcut to the standard procedure of creating a model first and then rendering it to a Surface. The Surface created by this method uses the default template mechanism for rendering vertices.
|
|
29
|
+
* @param container
|
|
30
|
+
* @param options
|
|
31
|
+
* @param modelOptions
|
|
32
|
+
* @group Factory Methods
|
|
33
|
+
*/
|
|
34
|
+
export declare function createSurface(container: BrowserElement, options?: SurfaceOptions, modelOptions?: ModelOptions): import("./surface").Surface;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { Geometry, PointXY, Size, Edge, Group, Port, Vertex, Node, GroupMemberAddedParams, GroupMemberRemovedParams } from "../../core";
|
|
2
|
+
import { Connection } from "../../ui";
|
|
3
|
+
import { Surface } from './surface';
|
|
4
|
+
import { BrowserElement } from "../util";
|
|
5
|
+
/**
|
|
6
|
+
* Payload for a `port:removed` event from a Surface.
|
|
7
|
+
* @group Events
|
|
8
|
+
* @category UI Event Payloads
|
|
9
|
+
*/
|
|
10
|
+
export interface SurfacePortRemovedParams {
|
|
11
|
+
vertex: Node | Group;
|
|
12
|
+
port: Port;
|
|
13
|
+
portEl: Element;
|
|
14
|
+
vertexEl: Element;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Payload for a group:resize event from a surface.
|
|
18
|
+
* @group Events
|
|
19
|
+
* @category UI Event Payloads
|
|
20
|
+
*/
|
|
21
|
+
export interface SurfaceGroupResizedParams {
|
|
22
|
+
group: Group;
|
|
23
|
+
el: Element;
|
|
24
|
+
w: number;
|
|
25
|
+
h: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Payload for an edge:added event from a surface.
|
|
29
|
+
* @group Events
|
|
30
|
+
* @category UI Event Payloads
|
|
31
|
+
*/
|
|
32
|
+
export interface SurfaceEdgeAddedParams {
|
|
33
|
+
/**
|
|
34
|
+
* Source vertex for the new edge
|
|
35
|
+
*/
|
|
36
|
+
source: Vertex;
|
|
37
|
+
/**
|
|
38
|
+
* Target vertex for the new edge
|
|
39
|
+
*/
|
|
40
|
+
target: Vertex;
|
|
41
|
+
/**
|
|
42
|
+
* Connection representing the edge in the UI
|
|
43
|
+
*/
|
|
44
|
+
connection: Connection<BrowserElement>;
|
|
45
|
+
/**
|
|
46
|
+
* The edge that was added
|
|
47
|
+
*/
|
|
48
|
+
edge: Edge;
|
|
49
|
+
/**
|
|
50
|
+
* Associated geometry, may be null
|
|
51
|
+
*/
|
|
52
|
+
geometry: Geometry;
|
|
53
|
+
/**
|
|
54
|
+
* True if the edge was added via the mouse (or touch events), false if added programmatically
|
|
55
|
+
*/
|
|
56
|
+
addedByMouse: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Payload for a `node:added` or `group:added` event from the Surface.
|
|
60
|
+
* @group Events
|
|
61
|
+
* @category UI Event Payloads
|
|
62
|
+
*/
|
|
63
|
+
export interface SurfaceVertexAddedParams {
|
|
64
|
+
/**
|
|
65
|
+
* DOM element representing the vertex
|
|
66
|
+
*/
|
|
67
|
+
el: BrowserElement;
|
|
68
|
+
/**
|
|
69
|
+
* ID of the vertex that was added
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
/**
|
|
73
|
+
* Vertex that was added
|
|
74
|
+
*/
|
|
75
|
+
vertex: Node | Group;
|
|
76
|
+
/**
|
|
77
|
+
* Optional position the vertex was added at.
|
|
78
|
+
*/
|
|
79
|
+
pos?: PointXY;
|
|
80
|
+
/**
|
|
81
|
+
* can be set if not currently bulk loading.
|
|
82
|
+
*/
|
|
83
|
+
size?: Size;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Payload for a `node:added` event from the Surface.
|
|
87
|
+
* @group Events
|
|
88
|
+
* @category UI Event Payloads
|
|
89
|
+
*/
|
|
90
|
+
export interface SurfaceNodeAddedParams extends SurfaceVertexAddedParams {
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Payload for a `group:added` event from the Surface.
|
|
94
|
+
* @group Events
|
|
95
|
+
* @category UI Event Payloads
|
|
96
|
+
*/
|
|
97
|
+
export interface SurfaceGroupAddedParams extends SurfaceVertexAddedParams {
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Payload for a `group:member:added` event from the Surface.
|
|
101
|
+
* @group Events
|
|
102
|
+
* @category UI Event Payloads
|
|
103
|
+
*/
|
|
104
|
+
export interface SurfaceGroupMemberAddedParams extends GroupMemberAddedParams {
|
|
105
|
+
/**
|
|
106
|
+
* DOM element representing the member that was added to the group
|
|
107
|
+
*/
|
|
108
|
+
el: Element;
|
|
109
|
+
/**
|
|
110
|
+
* DOM element representing the group
|
|
111
|
+
*/
|
|
112
|
+
groupEl: Element;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Payload for a `group:member:removed` event from the Surface.
|
|
116
|
+
* @group Events
|
|
117
|
+
* @category UI Event Payloads
|
|
118
|
+
*/
|
|
119
|
+
export interface SurfaceGroupMemberRemovedParams extends GroupMemberRemovedParams {
|
|
120
|
+
/**
|
|
121
|
+
* DOM element representing the member that was added to the group
|
|
122
|
+
*/
|
|
123
|
+
el: Element;
|
|
124
|
+
/**
|
|
125
|
+
* DOM element representing the group
|
|
126
|
+
*/
|
|
127
|
+
groupEl: Element;
|
|
128
|
+
/**
|
|
129
|
+
* Position the member that was removed was located at.
|
|
130
|
+
*/
|
|
131
|
+
pos: PointXY;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Payload for a pan/zoom event from a surface.
|
|
135
|
+
* @group Events
|
|
136
|
+
* @category UI Event Payloads
|
|
137
|
+
*/
|
|
138
|
+
export interface PanZoomEventPayload {
|
|
139
|
+
/**
|
|
140
|
+
* Current x pan value
|
|
141
|
+
*/
|
|
142
|
+
x: number;
|
|
143
|
+
/**
|
|
144
|
+
* Current y pan value
|
|
145
|
+
*/
|
|
146
|
+
y: number;
|
|
147
|
+
/**
|
|
148
|
+
* current zoom
|
|
149
|
+
*/
|
|
150
|
+
zoom: number;
|
|
151
|
+
/**
|
|
152
|
+
* previous zoom
|
|
153
|
+
*/
|
|
154
|
+
oldZoom: number;
|
|
155
|
+
/**
|
|
156
|
+
* Event that caused the pan. May be null.
|
|
157
|
+
*/
|
|
158
|
+
event?: Event;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Payload for a group:collapse event from a surface
|
|
162
|
+
* @group Events
|
|
163
|
+
* @category UI Event Payloads
|
|
164
|
+
*/
|
|
165
|
+
export interface SurfaceGroupCollapsedParams {
|
|
166
|
+
group: Group;
|
|
167
|
+
renderer: Surface;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Payload for a group:expand event from a surface
|
|
171
|
+
* @group Events
|
|
172
|
+
* @category UI Event Payloads
|
|
173
|
+
*/
|
|
174
|
+
export interface SurfaceGroupExpandedParams extends SurfaceGroupCollapsedParams {
|
|
175
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin } from "../../../plugins";
|
|
2
|
+
import { ControlsComponent, ControlsComponentOptions } from "../../../components";
|
|
3
|
+
import { BrowserElement } from "../../../util";
|
|
4
|
+
import { BrowserUI } from "../../../browser-visuallyjs-instance";
|
|
5
|
+
/**
|
|
6
|
+
* Options for the controls plugin.
|
|
7
|
+
*/
|
|
8
|
+
export interface ControlsPluginOptions extends ControlsComponentOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The element that will host the controls
|
|
11
|
+
*/
|
|
12
|
+
container: BrowserElement;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Controls component plugin wrapper.
|
|
16
|
+
* @group Plugins
|
|
17
|
+
* @category Controls
|
|
18
|
+
*/
|
|
19
|
+
export declare class ControlsPlugin extends BaseBrowserUIPlugin implements BrowserUIPlugin<ControlsPluginOptions> {
|
|
20
|
+
static type: string;
|
|
21
|
+
id: "controls";
|
|
22
|
+
$component: ControlsComponent;
|
|
23
|
+
initialise(ui: BrowserUI, options: ControlsPluginOptions): boolean;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
reset(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./controls-plugin";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ObjectData, Vertex, Node } from "../../../../core";
|
|
2
|
+
import { DragGroupSpec } from "../../../definitions";
|
|
3
|
+
import { Surface } from "../../surface";
|
|
4
|
+
import { BrowserElement } from "../../../util";
|
|
5
|
+
import { VisuallyJSDOMElement } from "../../../element-facade";
|
|
6
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin, BrowserUIPluginOptions } from "../../../plugins";
|
|
7
|
+
/**
|
|
8
|
+
* Options for the drag groups plugin.
|
|
9
|
+
* @group Plugins
|
|
10
|
+
* @category Drag Groups
|
|
11
|
+
*/
|
|
12
|
+
export interface DragGroupsPluginOptions extends BrowserUIPluginOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Function to call to assign a drag group for the given vertex. May return null, meaning no drag group.
|
|
15
|
+
* @param v
|
|
16
|
+
*/
|
|
17
|
+
assignDragGroup: (v: Vertex) => DragGroupSpec;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Provides the ability to assign elements to groups for dragging purposes: when a member of some group is dragged, the other elements of the group can be dragged along with it.
|
|
21
|
+
*
|
|
22
|
+
* The core concept is of the "DragGroup", which is basically just a tag. Each member of a group can belong to the group in one of two roles:
|
|
23
|
+
*
|
|
24
|
+
* - **active** The element, when dragged, causes all of the other members of the group to be dragged too.
|
|
25
|
+
* - **passive** The element, when dragged, will not cause any of the other members of the group to be dragged. But when an active member of the group is dragged, passive elements are dragged at the same time.
|
|
26
|
+
*
|
|
27
|
+
* When you configure this plugin you are required to provide an `assignDragGroup` function, whose signature is:
|
|
28
|
+
*
|
|
29
|
+
* assignDragGroup:(v:Vertex) => DragGroupSpec
|
|
30
|
+
*
|
|
31
|
+
* The return value `DragGroupSpec` may be either:
|
|
32
|
+
*
|
|
33
|
+
* - a string, in which case the element is added to the drag group with the given name in an active role
|
|
34
|
+
* - an object containing `id` and `active` which you can specify the active/passive role
|
|
35
|
+
* - null, in which case the element is not added to a drag group.
|
|
36
|
+
*
|
|
37
|
+
* @group Plugins
|
|
38
|
+
* @category Drag Groups
|
|
39
|
+
*/
|
|
40
|
+
export declare class DragGroupsPlugin extends BaseBrowserUIPlugin implements BrowserUIPlugin<DragGroupsPluginOptions> {
|
|
41
|
+
static type: string;
|
|
42
|
+
id: "dragGroups";
|
|
43
|
+
surface: Surface;
|
|
44
|
+
private _pendingDragGroupAssignments;
|
|
45
|
+
dragGroupAssigner: (v: Vertex) => DragGroupSpec;
|
|
46
|
+
initialise(surface: Surface, options: DragGroupsPluginOptions): boolean;
|
|
47
|
+
destroy(): void;
|
|
48
|
+
reset(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Runs each of the given objects through the code that automatically assigns them to a drag group.
|
|
51
|
+
* @param objects
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
assignToDragGroup(...objects: Array<string | Node | ObjectData | VisuallyJSDOMElement>): void;
|
|
55
|
+
/**
|
|
56
|
+
* Removes the given object(s) from any drag group they may belong to. You don't need to specify the name of the drag group since an object may belong to only one at a time.
|
|
57
|
+
* @param objects
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
removeFromDragGroup(...objects: Array<string | Node | ObjectData | BrowserElement>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Adds the given objects to the given drag group.
|
|
63
|
+
* @param spec Spec for the drag group. If you supply a string, then all objects are added to the drag group with that name, and they are marked "active". If you supply an object in the form `{ id:string, active?:boolean }` then all the objects are added to the drag group with the active state you provide.
|
|
64
|
+
* @param objects Objects to add.
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
addToDragGroup(spec: DragGroupSpec, ...objects: Array<string | Node | ObjectData | VisuallyJSDOMElement>): void;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
* @param el
|
|
71
|
+
* @param v
|
|
72
|
+
*/
|
|
73
|
+
private _doAssignDragGroup;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
private _assignPendingDragGroups;
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./drag-groups-plugin";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin } from "../../../plugins";
|
|
2
|
+
import { SvgExportComponent, SvgExportComponentOptions } from "../../../components";
|
|
3
|
+
import { BrowserElement } from "../../../util";
|
|
4
|
+
import { BrowserUI } from "../../../browser-visuallyjs-instance";
|
|
5
|
+
/**
|
|
6
|
+
* Options for the export controls plugin
|
|
7
|
+
*/
|
|
8
|
+
export interface ExportControlsPluginOptions extends SvgExportComponentOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The element that will host the controls
|
|
11
|
+
*/
|
|
12
|
+
container: BrowserElement;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Export Controls component plugin wrapper.
|
|
16
|
+
* @group Plugins
|
|
17
|
+
* @category Controls
|
|
18
|
+
*/
|
|
19
|
+
export declare class ExportControlsPlugin extends BaseBrowserUIPlugin implements BrowserUIPlugin<ExportControlsPluginOptions> {
|
|
20
|
+
$component: SvgExportComponent;
|
|
21
|
+
initialise(ui: BrowserUI, options: ExportControlsPluginOptions): boolean;
|
|
22
|
+
id: "exportControls";
|
|
23
|
+
destroy(): void;
|
|
24
|
+
reset(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./export-controls-plugin";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './lasso';
|
|
2
|
+
export * from './miniview';
|
|
3
|
+
export * from './controls';
|
|
4
|
+
export * from './export-controls';
|
|
5
|
+
export * from './drag-groups';
|
|
6
|
+
export * from './snaplines';
|
|
7
|
+
export * from './palette';
|
|
8
|
+
export * from './pan-buttons';
|
|
9
|
+
export * from './vertex-drawing';
|
|
10
|
+
export * from './resizing-tools';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Edge, Vertex, PointXY } from "../../../../core";
|
|
2
|
+
import { Surface } from "../../surface";
|
|
3
|
+
import { SurfaceMode } from "../../definitions";
|
|
4
|
+
import { BrowserElement } from "../../../util";
|
|
5
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin, BrowserUIPluginOptions } from "../../../plugins";
|
|
6
|
+
/**
|
|
7
|
+
* @group Plugins
|
|
8
|
+
* @category Lasso
|
|
9
|
+
*/
|
|
10
|
+
export interface LassoPluginOptions extends BrowserUIPluginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Optional function to call when lasso selection starts.
|
|
13
|
+
*/
|
|
14
|
+
onStart?: Function;
|
|
15
|
+
/**
|
|
16
|
+
* Optional function to call when lasso selection ends.
|
|
17
|
+
*/
|
|
18
|
+
onEnd?: Function;
|
|
19
|
+
/**
|
|
20
|
+
* Optional function to call when one or more objects has been selected by the lasso.
|
|
21
|
+
*/
|
|
22
|
+
onSelect?: (vertices: Array<Vertex>) => any;
|
|
23
|
+
/**
|
|
24
|
+
* Defaults to false, meaning the lasso is drawn as a rectangle. If true, the lasso is drawn as a set of masks,
|
|
25
|
+
* with the lasso area drawn as a "hole" in the masks.
|
|
26
|
+
*/
|
|
27
|
+
invert?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Optional CSS3 filter identifying elements you do not want to lasso
|
|
30
|
+
*/
|
|
31
|
+
filter?: ((e: MouseEvent) => boolean) | string;
|
|
32
|
+
/**
|
|
33
|
+
* Defaults to false. If true, edges are included in the lasso selection.
|
|
34
|
+
*/
|
|
35
|
+
includeEdges?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Optional filter that is passed every vertex/edge that the lasso would ordinarily select, and if this function returns false
|
|
38
|
+
* then the vertex/edge is not added to the selection
|
|
39
|
+
* @param o - Edge or Vertex to possibly filter.
|
|
40
|
+
*/
|
|
41
|
+
selectionFilter?: (o: Edge | Vertex) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When true (which is the default) the lasso exits after a selection has been made.
|
|
44
|
+
*/
|
|
45
|
+
autoExit?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Extra class(es) to add to the lasso's DOM element
|
|
48
|
+
*/
|
|
49
|
+
cssClass?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Optional function that generates the DOM element for the lasso to use. This is
|
|
52
|
+
* for advanced usage scenarios and most users will not need to supply this.
|
|
53
|
+
* @param origin
|
|
54
|
+
* @param e
|
|
55
|
+
*/
|
|
56
|
+
generateLassoContent?: (origin: PointXY, e: MouseEvent) => BrowserElement;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A Surface plugin that allows the user to select multiple elements with the mouse.
|
|
60
|
+
* @group Plugins
|
|
61
|
+
* @category Lasso
|
|
62
|
+
*/
|
|
63
|
+
export declare class LassoPlugin extends BaseBrowserUIPlugin implements BrowserUIPlugin<LassoPluginOptions> {
|
|
64
|
+
static type: string;
|
|
65
|
+
id: "lasso";
|
|
66
|
+
surfaceMode: SurfaceMode;
|
|
67
|
+
surface: Surface;
|
|
68
|
+
private lasso;
|
|
69
|
+
onStart: Function;
|
|
70
|
+
onEnd: Function;
|
|
71
|
+
onSelect: (vertices: Array<Vertex>) => any;
|
|
72
|
+
selectionFilter: (o: Edge | Vertex) => boolean;
|
|
73
|
+
autoExit: boolean;
|
|
74
|
+
lassoSelections: Array<any>;
|
|
75
|
+
destroy(): void;
|
|
76
|
+
initialise(surface: Surface, options: LassoPluginOptions): boolean;
|
|
77
|
+
reset(): void;
|
|
78
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Surface } from "../../surface";
|
|
2
|
+
import { BrowserElement } from "../../../util";
|
|
3
|
+
import { PointXY, Size } from "../../../../core";
|
|
4
|
+
export interface LassoOptions {
|
|
5
|
+
canvas: Element;
|
|
6
|
+
onStart?: (pagePosition: PointXY, canvasPosition: PointXY, shiftKey: boolean, e: MouseEvent) => any;
|
|
7
|
+
onEnd?: (visibleOrigin: PointXY, size: Size) => any;
|
|
8
|
+
onSelect?: (pagePosition: PointXY, pageSize: Size, canvasPosition: PointXY, canvasSize: Size, axesPositive: [boolean, boolean], shiftKey: boolean) => any;
|
|
9
|
+
/**
|
|
10
|
+
* Will be invoked if the user does mousedown then mouseup without moving in between. Used by the vertex drawing plugin
|
|
11
|
+
* @param p
|
|
12
|
+
* @param e
|
|
13
|
+
*/
|
|
14
|
+
onClick?: (p: PointXY, e: MouseEvent) => any;
|
|
15
|
+
invert?: boolean;
|
|
16
|
+
surface: Surface;
|
|
17
|
+
filter?: ((e: MouseEvent) => boolean) | string;
|
|
18
|
+
cssClass?: string;
|
|
19
|
+
/** optionally users of the lasso can impose a grid on its movement. used internally by the vertex drawing plugin. */
|
|
20
|
+
mapToGrid?: (p: PointXY) => PointXY;
|
|
21
|
+
/**
|
|
22
|
+
* Optional method that can return an element to inject as the lasso's child.
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
generateLassoContent?: (origin: PointXY, e: MouseEvent) => BrowserElement;
|
|
26
|
+
}
|
|
27
|
+
export declare class Lasso {
|
|
28
|
+
visibleOrigin: PointXY;
|
|
29
|
+
size: Size;
|
|
30
|
+
_generateLassoContent: (origin: PointXY, e: MouseEvent) => BrowserElement;
|
|
31
|
+
el: HTMLElement;
|
|
32
|
+
masks: Record<string, HTMLElement>;
|
|
33
|
+
origin: PointXY;
|
|
34
|
+
canvasOrigin: PointXY;
|
|
35
|
+
onStart: (origin: PointXY, canvasPosition: PointXY, shiftKey: boolean, e: MouseEvent) => any;
|
|
36
|
+
onEnd: (visibleOrigin: PointXY, size: Size) => any;
|
|
37
|
+
onSelect: (pagePosition: PointXY, pageSize: Size, canvasPosition: PointXY, canvasSize: Size, axesPositive: [boolean, boolean], shiftKey: boolean, lassoContent?: BrowserElement) => any;
|
|
38
|
+
onClick: (p: PointXY, e: MouseEvent) => any;
|
|
39
|
+
hasMoved: boolean;
|
|
40
|
+
down: boolean;
|
|
41
|
+
moving: boolean;
|
|
42
|
+
invert: boolean;
|
|
43
|
+
surface: Surface;
|
|
44
|
+
private _filter;
|
|
45
|
+
private eventManager;
|
|
46
|
+
private readonly _mapToGrid;
|
|
47
|
+
downListener: Function;
|
|
48
|
+
upListener: Function;
|
|
49
|
+
moveListener: Function;
|
|
50
|
+
downEvent: string;
|
|
51
|
+
upEvent: string;
|
|
52
|
+
moveEvent: string;
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
_generatedLassoContent: BrowserElement;
|
|
55
|
+
constructor(options: LassoOptions);
|
|
56
|
+
private _prepareFilter;
|
|
57
|
+
private _position;
|
|
58
|
+
private _setVisible;
|
|
59
|
+
private _mapPoint;
|
|
60
|
+
private _downListener;
|
|
61
|
+
private _moveListener;
|
|
62
|
+
private _upListener;
|
|
63
|
+
private _createMasks;
|
|
64
|
+
/**
|
|
65
|
+
* Returns whether or not the lasso is active.
|
|
66
|
+
* @returns true if active, false otherwise.
|
|
67
|
+
*/
|
|
68
|
+
isActive(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Sets whether or not the lasso responds to mouse events.
|
|
71
|
+
* @param e Enabled state.
|
|
72
|
+
*/
|
|
73
|
+
setEnabled(e: boolean): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./miniview-plugin";
|