@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,411 @@
|
|
|
1
|
+
import { Group, Node, ObjectData, PointXY, Size, Vertex, VisuallyJsModel } from "../../../../core";
|
|
2
|
+
import { Surface } from "../../surface";
|
|
3
|
+
import { BrowserUIPluginOptions } from "../../../plugins";
|
|
4
|
+
import { BrowserElement } from "../../../util";
|
|
5
|
+
/**
|
|
6
|
+
* The default width/height of a resize handle when the container is an SVG element.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_SVG_HANDLE_SIZE = 12;
|
|
10
|
+
/**
|
|
11
|
+
* The default length of the leader line to the resize handle when using the resizing tools in an SVG container.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_ROTATE_LEADER_LENGTH = 40;
|
|
15
|
+
/**
|
|
16
|
+
* Default size of the rotate handle.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEFAULT_ROTATE_HANDLE_SIZE = 16;
|
|
20
|
+
/**
|
|
21
|
+
* Default size for border handles.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_BORDER_HANDLE_SIZE = 6;
|
|
25
|
+
/**
|
|
26
|
+
* Options for the resizing tool plugin.
|
|
27
|
+
* @group Plugins
|
|
28
|
+
* @category Resizing Tools
|
|
29
|
+
*/
|
|
30
|
+
export interface ResizingToolsPluginOptions extends BrowserUIPluginOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Attribute to use for vertex width - defaults to 'width'
|
|
33
|
+
*/
|
|
34
|
+
widthAttribute?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Attribute to use for vertex height - defaults to 'height'
|
|
37
|
+
*/
|
|
38
|
+
heightAttribute?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Attribute to use for vertex left position - defaults to 'left'
|
|
41
|
+
*/
|
|
42
|
+
leftAttribute?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Attribute to use for vertex top position - defaults to 'top'
|
|
45
|
+
*/
|
|
46
|
+
topAttribute?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional callback invoked after an edit has occurred
|
|
49
|
+
*/
|
|
50
|
+
onEdit?: (o: Node | Group, surface: Surface, toolkit: VisuallyJsModel) => any;
|
|
51
|
+
/**
|
|
52
|
+
* Defaults to false, meaning the resizing tool plugin switches on whenever a new vertex is selected.
|
|
53
|
+
*/
|
|
54
|
+
onDemand?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Minimum height the user can shrink a vertex to. Defaults to 30.
|
|
57
|
+
*/
|
|
58
|
+
minimumHeight?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Minimum width the user can shrink a vertex to. Defaults to 30.
|
|
61
|
+
*/
|
|
62
|
+
minimumWidth?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Defaults to false, meaning size changes conform to an underlying grid, if present
|
|
65
|
+
*/
|
|
66
|
+
ignoreGrid?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Defaults to true, meaning groups will not be shrunk to the point that one or more of their child vertices is no longer visible.
|
|
69
|
+
*/
|
|
70
|
+
constrainGroups?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether or not to support rotation on all elements.. Defaults to false.
|
|
73
|
+
*/
|
|
74
|
+
rotatable?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Optional number of stops to use when rotating. If not provided vertices can be rotated to any angle. If provided, the value is divided into 360 and the result is the angle between each stop. For example, a value of 12 means each stop is 30 degrees.
|
|
77
|
+
*/
|
|
78
|
+
rotationStops?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Whether or not to support resize in the X axis. Defaults to true.
|
|
81
|
+
*/
|
|
82
|
+
resizeX?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether or not to support resize in the Y axis. Defaults to true.
|
|
85
|
+
*/
|
|
86
|
+
resizeY?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Method to use for resize - handles on the corners, or borders. Defaults to handles.
|
|
89
|
+
*/
|
|
90
|
+
resizeMethod?: ResizingToolsResizeMethod;
|
|
91
|
+
/**
|
|
92
|
+
* When resizeMethod is "borders", set this to make the borders visible. Internally this just sets a CSS class on the draw skeleton's parent DOM element, and the appearance of the borders is then controlled via CSS.
|
|
93
|
+
*/
|
|
94
|
+
bordersVisible?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Optional function to invoke when a resize has occurred. The values the resizing plugin wants to write for the vertex are merged on top of the value returned from this function, and the combined payload is written as an update to the vertex in the data model. This exists for internal use mostly but there's no harm in it being exposed for your enjoyment.
|
|
97
|
+
* @param v
|
|
98
|
+
* @param p
|
|
99
|
+
*/
|
|
100
|
+
payloadGenerator?: (v: Node, p: ObjectData) => ObjectData;
|
|
101
|
+
/**
|
|
102
|
+
* Width/height to use for handles. Defaults to 20 pixels.
|
|
103
|
+
*/
|
|
104
|
+
handleSize?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Shape of resize handles. Defaults to circle.
|
|
107
|
+
*/
|
|
108
|
+
handleShape?: "rectangle" | "circle";
|
|
109
|
+
/**
|
|
110
|
+
* Length of the leader line to the resize handle when using the resizing tools in an SVG container. Defaults to 30 pixels.
|
|
111
|
+
*/
|
|
112
|
+
rotateLeaderLength?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Size of the rotate handle. Defaults to 16 pixels.
|
|
115
|
+
*/
|
|
116
|
+
rotateHandleSize?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Size of handles when using "border" resize. Defaults to 6 pixels.
|
|
119
|
+
*/
|
|
120
|
+
borderHandleSize?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Optional function that can decide on whether or not the given vertex should be resizable
|
|
123
|
+
* @param v
|
|
124
|
+
* @param el
|
|
125
|
+
*/
|
|
126
|
+
canResizeFilter?: (v: Vertex, el: BrowserElement) => boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Optional function that can decide on whether or not the given vertex should be rotatable
|
|
129
|
+
* @param v
|
|
130
|
+
* @param el
|
|
131
|
+
*/
|
|
132
|
+
canRotateFilter?: (v: Vertex, el: BrowserElement) => boolean;
|
|
133
|
+
/**
|
|
134
|
+
* How much to offset the resize frame and handles from the bounds of the shape. Defaults to 5 pixels.
|
|
135
|
+
*/
|
|
136
|
+
handleOffset?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Optional function that can inject extra model updates each time a vertex is resized.
|
|
139
|
+
*/
|
|
140
|
+
modelUpdater?: ResizingToolsModelUpdater;
|
|
141
|
+
/**
|
|
142
|
+
* Optional factory that can return a resize handler for some given vertex. You can use this to override the default behaviour for any vertex you choose
|
|
143
|
+
* @param vertex
|
|
144
|
+
*/
|
|
145
|
+
handlerFactory?: ResizingToolsHandlerFactory;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
export declare const DEFAULT_MINIMUM_WIDTH = 30;
|
|
151
|
+
/** @internal */
|
|
152
|
+
export declare const DEFAULT_MINIMUM_HEIGHT = 30;
|
|
153
|
+
/** @internal */
|
|
154
|
+
export declare const DEFAULT_HANDLE_OFFSET = 5;
|
|
155
|
+
/**
|
|
156
|
+
* Defines the resize method using element borders
|
|
157
|
+
* @group Plugins
|
|
158
|
+
* @category Resizing Tools
|
|
159
|
+
* @constant
|
|
160
|
+
*/
|
|
161
|
+
export declare const RESIZING_TOOLS_RESIZE_METHOD_BORDERS = "borders";
|
|
162
|
+
/**
|
|
163
|
+
* Defines the resize method using handles at the corner of an element.
|
|
164
|
+
* @group Plugins
|
|
165
|
+
* @category Resizing Tools
|
|
166
|
+
* @constant
|
|
167
|
+
*/
|
|
168
|
+
export declare const RESIZING_TOOLS_RESIZE_METHOD_HANDLES = "handles";
|
|
169
|
+
/**
|
|
170
|
+
* Defines the available resize methods.
|
|
171
|
+
* @group Plugins
|
|
172
|
+
* @category Resizing Tools
|
|
173
|
+
*/
|
|
174
|
+
export type ResizingToolsResizeMethod = typeof RESIZING_TOOLS_RESIZE_METHOD_BORDERS | typeof RESIZING_TOOLS_RESIZE_METHOD_HANDLES;
|
|
175
|
+
/**
|
|
176
|
+
* Set on the element that is the parent of drag handles when in `handles` resize mode.
|
|
177
|
+
* @group Plugins
|
|
178
|
+
* @category Resizing Tools
|
|
179
|
+
* @cssClass
|
|
180
|
+
* @context resizingTools
|
|
181
|
+
*/
|
|
182
|
+
export declare const CLASS_RESIZE_SKELETON = "vjs-resize-skeleton";
|
|
183
|
+
/**
|
|
184
|
+
* Set on the element that is the parent of drag borders when in `borders` resize mode.
|
|
185
|
+
* @group Plugins
|
|
186
|
+
* @category Resizing Tools
|
|
187
|
+
* @cssClass
|
|
188
|
+
* @context resizingTools
|
|
189
|
+
*/
|
|
190
|
+
export declare const CLASS_RESIZE_SKELETON_BORDERS = "vjs-resize-skeleton-borders";
|
|
191
|
+
/**
|
|
192
|
+
* Set on the resize tool's main group element for some vertex when `bordersVisible` is set to true and the resize mode is {@link RESIZING_TOOLS_RESIZE_METHOD_BORDERS}
|
|
193
|
+
* @group Plugins
|
|
194
|
+
* @category Resizing Tools
|
|
195
|
+
* @cssClass
|
|
196
|
+
* @context resizingTools
|
|
197
|
+
*/
|
|
198
|
+
export declare const CLASS_RESIZE_SKELETON_BORDERS_VISIBLE = "vjs-resize-skeleton-borders-visible";
|
|
199
|
+
/**
|
|
200
|
+
* Set on the frame the resize tool draws around an object it is currently editing.
|
|
201
|
+
* @group Plugins
|
|
202
|
+
* @category Resizing Tools
|
|
203
|
+
* @cssClass
|
|
204
|
+
* @context resizingTools
|
|
205
|
+
*/
|
|
206
|
+
export declare const CLASS_RESIZE_FRAME = "vjs-resize-frame";
|
|
207
|
+
/**
|
|
208
|
+
* Set on the resize handles by the resizing/diagram tools
|
|
209
|
+
* @group Plugins
|
|
210
|
+
* @category Resizing Tools
|
|
211
|
+
* @cssClass
|
|
212
|
+
* @context resizingTools
|
|
213
|
+
*/
|
|
214
|
+
export declare const CLASS_RESIZE_HANDLE = "vjs-resize-handle";
|
|
215
|
+
/**
|
|
216
|
+
* Set on a resize handle when it is being actively used
|
|
217
|
+
* @group Plugins
|
|
218
|
+
* @category Resizing Tools
|
|
219
|
+
* @cssClass
|
|
220
|
+
* @context resizingTools
|
|
221
|
+
*/
|
|
222
|
+
export declare const CLASS_RESIZE_HANDLE_ACTIVE = "vjs-resize-handle-active";
|
|
223
|
+
/**
|
|
224
|
+
* Set on the top left corner resize handle
|
|
225
|
+
* @group Plugins
|
|
226
|
+
* @category Resizing Tools
|
|
227
|
+
* @cssClass
|
|
228
|
+
* @context resizingTools
|
|
229
|
+
*/
|
|
230
|
+
export declare const CLASS_RESIZE_HANDLE_TL = "vjs-resize-handle-tl";
|
|
231
|
+
/**
|
|
232
|
+
* Set on the bottom left corner resize handle
|
|
233
|
+
* @group Plugins
|
|
234
|
+
* @category Resizing Tools
|
|
235
|
+
* @cssClass
|
|
236
|
+
* @context resizingTools
|
|
237
|
+
*/
|
|
238
|
+
export declare const CLASS_RESIZE_HANDLE_BL = "vjs-resize-handle-bl";
|
|
239
|
+
/**
|
|
240
|
+
* Set on the top right corner resize handle
|
|
241
|
+
* @group Plugins
|
|
242
|
+
* @category Resizing Tools
|
|
243
|
+
* @cssClass
|
|
244
|
+
* @context resizingTools
|
|
245
|
+
*/
|
|
246
|
+
export declare const CLASS_RESIZE_HANDLE_TR = "vjs-resize-handle-tr";
|
|
247
|
+
/**
|
|
248
|
+
* Set on the bottom right corner resize handle
|
|
249
|
+
* @group Plugins
|
|
250
|
+
* @category Resizing Tools
|
|
251
|
+
* @cssClass
|
|
252
|
+
* @context resizingTools
|
|
253
|
+
*/
|
|
254
|
+
export declare const CLASS_RESIZE_HANDLE_BR = "vjs-resize-handle-br";
|
|
255
|
+
/**
|
|
256
|
+
* Set on the top center resize handle
|
|
257
|
+
* @group Plugins
|
|
258
|
+
* @category Resizing Tools
|
|
259
|
+
* @cssClass
|
|
260
|
+
* @context resizingTools
|
|
261
|
+
*/
|
|
262
|
+
export declare const CLASS_RESIZE_HANDLE_T = "vjs-resize-handle-t";
|
|
263
|
+
/**
|
|
264
|
+
* Set on the bottom center resize handle
|
|
265
|
+
* @group Plugins
|
|
266
|
+
* @category Resizing Tools
|
|
267
|
+
* @cssClass
|
|
268
|
+
* @context resizingTools
|
|
269
|
+
*/
|
|
270
|
+
export declare const CLASS_RESIZE_HANDLE_B = "vjs-resize-handle-b";
|
|
271
|
+
/**
|
|
272
|
+
* Set on the left center resize handle
|
|
273
|
+
* @group Plugins
|
|
274
|
+
* @category Resizing Tools
|
|
275
|
+
* @cssClass
|
|
276
|
+
* @context resizingTools
|
|
277
|
+
*/
|
|
278
|
+
export declare const CLASS_RESIZE_HANDLE_L = "vjs-resize-handle-l";
|
|
279
|
+
/**
|
|
280
|
+
* Set on the right center resize handle
|
|
281
|
+
* @group Plugins
|
|
282
|
+
* @category Resizing Tools
|
|
283
|
+
* @cssClass
|
|
284
|
+
* @context resizingTools
|
|
285
|
+
*/
|
|
286
|
+
export declare const CLASS_RESIZE_HANDLE_R = "vjs-resize-handle-r";
|
|
287
|
+
/**
|
|
288
|
+
* Set on the border handles
|
|
289
|
+
* @group Plugins
|
|
290
|
+
* @category Resizing Tools
|
|
291
|
+
* @cssClass
|
|
292
|
+
* @context resizingTools
|
|
293
|
+
*/
|
|
294
|
+
export declare const CLASS_RESIZE_BORDER = "vjs-resize-border";
|
|
295
|
+
/**
|
|
296
|
+
* Set on the bottom border handle
|
|
297
|
+
* @group Plugins
|
|
298
|
+
* @category Resizing Tools
|
|
299
|
+
* @cssClass
|
|
300
|
+
* @context resizingTools
|
|
301
|
+
*/
|
|
302
|
+
export declare const CLASS_RESIZE_BORDER_BOTTOM = "vjs-resize-border-b";
|
|
303
|
+
/**
|
|
304
|
+
* Set on the top border handle
|
|
305
|
+
* @group Plugins
|
|
306
|
+
* @category Resizing Tools
|
|
307
|
+
* @cssClass
|
|
308
|
+
* @context resizingTools
|
|
309
|
+
*/
|
|
310
|
+
export declare const CLASS_RESIZE_BORDER_TOP = "vjs-resize-border-t";
|
|
311
|
+
/**
|
|
312
|
+
* Set on the left border handle
|
|
313
|
+
* @group Plugins
|
|
314
|
+
* @category Resizing Tools
|
|
315
|
+
* @cssClass
|
|
316
|
+
* @context resizingTools
|
|
317
|
+
*/
|
|
318
|
+
export declare const CLASS_RESIZE_BORDER_LEFT = "vjs-resize-border-l";
|
|
319
|
+
/**
|
|
320
|
+
* Set on the right border handle
|
|
321
|
+
* @group Plugins
|
|
322
|
+
* @category Resizing Tools
|
|
323
|
+
* @cssClass
|
|
324
|
+
* @context resizingTools
|
|
325
|
+
*/
|
|
326
|
+
export declare const CLASS_RESIZE_BORDER_RIGHT = "vjs-resize-border-r";
|
|
327
|
+
/**
|
|
328
|
+
* Set on the rotation handle
|
|
329
|
+
* @group Plugins
|
|
330
|
+
* @category Resizing Tools
|
|
331
|
+
* @cssClass
|
|
332
|
+
* @context resizingTools
|
|
333
|
+
*/
|
|
334
|
+
export declare const CLASS_ROTATE_HANDLE = "vjs-rotate-handle";
|
|
335
|
+
/**
|
|
336
|
+
* Set on the leader to the rotation handle.
|
|
337
|
+
* @group Plugins
|
|
338
|
+
* @category Resizing Tools
|
|
339
|
+
* @cssClass
|
|
340
|
+
* @context resizingTools
|
|
341
|
+
*/
|
|
342
|
+
export declare const CLASS_ROTATE_LEADER = "vjs-rotate-leader";
|
|
343
|
+
/**
|
|
344
|
+
* When set to true on some element, disables resize in the X axis.
|
|
345
|
+
* @group Plugins
|
|
346
|
+
* @category Resizing Tools
|
|
347
|
+
* @dataAttribute
|
|
348
|
+
* @context resizingTools
|
|
349
|
+
*/
|
|
350
|
+
export declare const ATT_VJS_X_RESIZE = "data-vjs-x-resize";
|
|
351
|
+
/**
|
|
352
|
+
* When set to true on some element, disables resize in the Y axis.
|
|
353
|
+
* @group Plugins
|
|
354
|
+
* @category Resizing Tools
|
|
355
|
+
* @dataAttribute
|
|
356
|
+
* @context resizingTools
|
|
357
|
+
*/
|
|
358
|
+
export declare const ATT_VJS_Y_RESIZE = "data-vjs-y-resize";
|
|
359
|
+
/**
|
|
360
|
+
* When set to false on some element, disables resize.
|
|
361
|
+
* @group Plugins
|
|
362
|
+
* @category Resizing Tools
|
|
363
|
+
* @dataAttribute
|
|
364
|
+
* @context resizingTools
|
|
365
|
+
*/
|
|
366
|
+
export declare const ATT_VJS_RESIZABLE = "data-vjs-resizable";
|
|
367
|
+
/**
|
|
368
|
+
* When set to false on some element, disables rotate.
|
|
369
|
+
* @group Plugins
|
|
370
|
+
* @category Resizing Tools
|
|
371
|
+
* @dataAttribute
|
|
372
|
+
* @context resizingTools
|
|
373
|
+
*/
|
|
374
|
+
export declare const ATT_VJS_ROTATABLE = "data-vjs-rotatable";
|
|
375
|
+
/** @internal */
|
|
376
|
+
export declare const ATT_DATA_DIR = "data-dir";
|
|
377
|
+
/**
|
|
378
|
+
* Possible directions for resize - top/left/bottom/right/top left/top right/bottom right/bottom left
|
|
379
|
+
*/
|
|
380
|
+
export type ResizeDirection = "t" | "l" | "b" | "r" | "tl" | "tr" | "br" | "bl";
|
|
381
|
+
/**
|
|
382
|
+
* Function invoked each time a resize event occurs that a {@link ResizingToolsHandlerFactory} is controlling. This function is expected to return an object containing a new x, y, width and height for the vertex being resized, as well as, optionally, an object containing required updates to other model objects, keyed by the other model object's IDs.
|
|
383
|
+
*/
|
|
384
|
+
export type ResizeFunction = (dx: number, dy: number) => {
|
|
385
|
+
x: number;
|
|
386
|
+
y: number;
|
|
387
|
+
width: number;
|
|
388
|
+
height: number;
|
|
389
|
+
updates?: Record<string, ObjectData>;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* @internal
|
|
393
|
+
*/
|
|
394
|
+
export type ResizeHandler = {
|
|
395
|
+
/**
|
|
396
|
+
* Resize returns new bounds for the element, and optional extra set of updates for other vertices.
|
|
397
|
+
* @param dx
|
|
398
|
+
* @param dy
|
|
399
|
+
*/
|
|
400
|
+
resize: ResizeFunction;
|
|
401
|
+
id: string;
|
|
402
|
+
anchor: [0 | 1 | 0.5, 0 | 1 | 0.5];
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* A factory that can return handlers for resize, given a vertex to resize and a resize direction (as well as the default resize function for the given direction). When a resize begins, the factory is called with the ui, current vertex, resize direction, and default handler. It returns a {@link ResizeFunction} that is invoked each time a discrete resize event then occurs, until the mouse/pointer is released. Each time the resize function is invoked, it is expected to return an object containing a new x, y, width and height for the vertex being resized, as well as, optionally, an object containing required updates to other model objects. This object is keyed by vertex ID, and its values are individual updates to apply to the vertex with that ID.
|
|
406
|
+
*/
|
|
407
|
+
export type ResizingToolsHandlerFactory = (ui: Surface, vertex: Node | Group, resizeDirection: ResizeDirection, defaultHandler: ResizeFunction) => ResizeFunction;
|
|
408
|
+
/**
|
|
409
|
+
* Defines a function that is invoked each time the resizing tools writes a size update to the model. The vertex that was resized, plus its new position and size, are passed to this function, and the function return a record of other updates it wishes to make to the model, keyed by object id. These updates are written and included as part of the transaction, and will be undone if the resize operation is subsequently undone.
|
|
410
|
+
*/
|
|
411
|
+
export type ResizingToolsModelUpdater = (v: Node, pos: PointXY, size: Size) => Record<string, ObjectData>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrowserElement } from "../../../util";
|
|
2
|
+
import { Size } from "../../../../core";
|
|
3
|
+
/**
|
|
4
|
+
@internal
|
|
5
|
+
*/
|
|
6
|
+
export declare function $_createRectangularSvgHandles(handleSize: number, elSize: Size, obj: any, strokeWidth: number, parent: BrowserElement, offset: number, canResizeX: boolean, canResizeY: boolean): any;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* @param handleSize
|
|
10
|
+
* @param elSize
|
|
11
|
+
* @param obj
|
|
12
|
+
* @param strokeWidth
|
|
13
|
+
* @param parent
|
|
14
|
+
*/
|
|
15
|
+
export declare function $_createCircularSvgHandles(handleSize: number, elSize: Size, obj: any, strokeWidth: number, parent: BrowserElement, offset: number, canResizeX: boolean, canResizeY: boolean): any;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ResizingToolsPluginOptions, ResizeHandler, ResizeDirection } from "./definitions";
|
|
2
|
+
import { Grid, PointXY, Group, Node, ObjectData, VisuallyJsModel, Size, Vertex, VertexUpdatedReason } from "../../../../core";
|
|
3
|
+
import { Surface } from "../../surface";
|
|
4
|
+
import { BrowserElement } from "../../../util";
|
|
5
|
+
import { ViewportElement, GroupMapping, ViewportGroupElement, GroupContentAreaInfo, GroupResizeResult } from "../../../../ui";
|
|
6
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin } from "../../../plugins";
|
|
7
|
+
import { ElasticGroupManager } from "../../elastic-group-manager";
|
|
8
|
+
/**
|
|
9
|
+
* This plugin offers tools for users to resize/rotate elements using touch/mouse events.
|
|
10
|
+
* @group Plugins
|
|
11
|
+
* @category Resizing Tools
|
|
12
|
+
*/
|
|
13
|
+
export declare class ResizingToolsPlugin extends BaseBrowserUIPlugin implements BrowserUIPlugin<ResizingToolsPluginOptions> {
|
|
14
|
+
static type: string;
|
|
15
|
+
id: string;
|
|
16
|
+
surface: Surface;
|
|
17
|
+
instance: VisuallyJsModel;
|
|
18
|
+
widthAtt: string;
|
|
19
|
+
heightAtt: string;
|
|
20
|
+
leftAtt: string;
|
|
21
|
+
topAtt: string;
|
|
22
|
+
xAxis: boolean;
|
|
23
|
+
yAxis: boolean;
|
|
24
|
+
resizeX: boolean;
|
|
25
|
+
resizeY: boolean;
|
|
26
|
+
canResizeFilter: (v: Vertex, el: BrowserElement) => boolean;
|
|
27
|
+
canRotateFilter: (v: Vertex, el: BrowserElement) => boolean;
|
|
28
|
+
onEdit: (o: Node | Group, surface: Surface, toolkit: VisuallyJsModel) => any;
|
|
29
|
+
onDemand: boolean;
|
|
30
|
+
_currentDragDirection: ResizeDirection;
|
|
31
|
+
_currentRotation: number;
|
|
32
|
+
_currentPosition: PointXY;
|
|
33
|
+
_currentWidth: number;
|
|
34
|
+
_currentHeight: number;
|
|
35
|
+
_currentCenter: PointXY;
|
|
36
|
+
_currentSize: Size;
|
|
37
|
+
skeletons: Record<string, {
|
|
38
|
+
mel: ViewportElement<BrowserElement>;
|
|
39
|
+
el: BrowserElement;
|
|
40
|
+
canResizeX: boolean;
|
|
41
|
+
canResizeY: boolean;
|
|
42
|
+
handles: {
|
|
43
|
+
tl: BrowserElement;
|
|
44
|
+
bl: BrowserElement;
|
|
45
|
+
tr: BrowserElement;
|
|
46
|
+
br: BrowserElement;
|
|
47
|
+
t?: BrowserElement;
|
|
48
|
+
b?: BrowserElement;
|
|
49
|
+
r?: BrowserElement;
|
|
50
|
+
l?: BrowserElement;
|
|
51
|
+
};
|
|
52
|
+
borders: {
|
|
53
|
+
t: BrowserElement;
|
|
54
|
+
r: BrowserElement;
|
|
55
|
+
b: BrowserElement;
|
|
56
|
+
l: BrowserElement;
|
|
57
|
+
};
|
|
58
|
+
rh?: BrowserElement;
|
|
59
|
+
rl?: BrowserElement;
|
|
60
|
+
rotatable: boolean;
|
|
61
|
+
resizable: boolean;
|
|
62
|
+
frame: BrowserElement;
|
|
63
|
+
}>;
|
|
64
|
+
_groupParent: Group;
|
|
65
|
+
_groupViewportElement: ViewportGroupElement<BrowserElement>;
|
|
66
|
+
_isInsideElasticGroup: boolean;
|
|
67
|
+
_groupParentDef: GroupMapping<BrowserElement>;
|
|
68
|
+
_groupParentContentAreaInfo: GroupContentAreaInfo<BrowserElement>;
|
|
69
|
+
_currentElasticGroup: ElasticGroupManager;
|
|
70
|
+
_viewportElement: ViewportElement<any>;
|
|
71
|
+
private downAt;
|
|
72
|
+
private _downAtRotated;
|
|
73
|
+
private handler;
|
|
74
|
+
private toolkitDragObject;
|
|
75
|
+
private _currentHandle;
|
|
76
|
+
$x1: number;
|
|
77
|
+
$x2: number;
|
|
78
|
+
$y1: number;
|
|
79
|
+
$y2: number;
|
|
80
|
+
private _centerAtDown;
|
|
81
|
+
minimumHeight: number;
|
|
82
|
+
minimumWidth: number;
|
|
83
|
+
currentMinimumWidth: number;
|
|
84
|
+
currentMinimumHeight: number;
|
|
85
|
+
ignoreGrid: boolean;
|
|
86
|
+
grid: Grid;
|
|
87
|
+
_rotatable: boolean;
|
|
88
|
+
_constrainGroups: boolean;
|
|
89
|
+
_rotationStops: number;
|
|
90
|
+
_moving: boolean;
|
|
91
|
+
_rotating: boolean;
|
|
92
|
+
_hasUpdated: boolean;
|
|
93
|
+
protected $handleOffset: number;
|
|
94
|
+
private _modelUpdater;
|
|
95
|
+
private _handlerFactory;
|
|
96
|
+
private _setResizeActive;
|
|
97
|
+
set $moving(v: boolean);
|
|
98
|
+
set $rotating(v: boolean);
|
|
99
|
+
get $busy(): boolean;
|
|
100
|
+
_handleSize: number;
|
|
101
|
+
_handleShape: "rectangle" | "circle";
|
|
102
|
+
_rotateLeaderLength: number;
|
|
103
|
+
_rotateHandleSize: number;
|
|
104
|
+
_borderHandleSize: number;
|
|
105
|
+
_payloadGenerator: (v: Node, p: ObjectData) => ObjectData;
|
|
106
|
+
private resizeMethod;
|
|
107
|
+
private bordersVisible;
|
|
108
|
+
destroy(): void;
|
|
109
|
+
_handleDragHandlers: Record<string, ResizeHandler>;
|
|
110
|
+
_borderDragHandlers: Record<string, ResizeHandler>;
|
|
111
|
+
initialise(surface: Surface, options: ResizingToolsPluginOptions): boolean;
|
|
112
|
+
private _configureGroupParent;
|
|
113
|
+
private _handleMouseDown;
|
|
114
|
+
/**
|
|
115
|
+
* Gets the rotation for the current element, 0 if no current element or the current element declares no value.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
private _getCurrentRotation;
|
|
119
|
+
/**
|
|
120
|
+
* Rotates the given point around the center of the current element, by default in a clockwise direction, or counter clockwise if requested
|
|
121
|
+
* @param p
|
|
122
|
+
* @param anticlockwise
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
private _rotatePointAroundCurrentCenter;
|
|
126
|
+
/**
|
|
127
|
+
* Gets the origin and size of an element that is being managed by the Surface.
|
|
128
|
+
* @param v Vertex Node/group to get position for.
|
|
129
|
+
* @returns A RectangleXY if element was found, otherwise null.
|
|
130
|
+
*/
|
|
131
|
+
private _getViewportCoordinates;
|
|
132
|
+
reset(): void;
|
|
133
|
+
$minWidth(): number;
|
|
134
|
+
$minHeight(): number;
|
|
135
|
+
private _removeSkeleton;
|
|
136
|
+
private _deselect;
|
|
137
|
+
private _select;
|
|
138
|
+
protected _attachSvg(mel: ViewportElement<BrowserElement>, obj: any, canResizeX: boolean, canResizeY: boolean): BrowserElement;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the position of the resize skeleton pertaining to the vertex with the given id, if one is present.
|
|
141
|
+
* Takes position and rotation into account.
|
|
142
|
+
* @internal
|
|
143
|
+
* @param id Vertex ID
|
|
144
|
+
*/
|
|
145
|
+
protected $_setSkeletonPositionById(id: string): boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Generates a payload for an update call, using the appropriate left/top/width/height attributes, and enforcing minWidth/minHeight where necessary.
|
|
148
|
+
* @param x
|
|
149
|
+
* @param y
|
|
150
|
+
* @param width
|
|
151
|
+
* @param height
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
private _generateUpdatePayload;
|
|
155
|
+
private _rotateHandler;
|
|
156
|
+
private _resizeHandler;
|
|
157
|
+
/**
|
|
158
|
+
* gets the current group offset, if any. When the current vertex is not a child of a group this will return [0,0]; otherwise it returns the group's origin plus any internal offset for the content area.
|
|
159
|
+
* @private
|
|
160
|
+
*/
|
|
161
|
+
private _getGroupOffset;
|
|
162
|
+
/**
|
|
163
|
+
* Notification that the vertex was re-rendered. If we're attached to the previous element we do a reset, on the next tick.
|
|
164
|
+
* @param p
|
|
165
|
+
* @private
|
|
166
|
+
*/
|
|
167
|
+
$vertexRerendered(p: {
|
|
168
|
+
el: BrowserElement;
|
|
169
|
+
id: string;
|
|
170
|
+
vertex: Vertex;
|
|
171
|
+
size: Size;
|
|
172
|
+
}): void;
|
|
173
|
+
$vertexRotated(element: ViewportElement<BrowserElement>, rotation: number): void;
|
|
174
|
+
$vertexUpdated(element: ViewportElement<BrowserElement>, reason: VertexUpdatedReason): void;
|
|
175
|
+
/**
|
|
176
|
+
* Redraws handles as appropriate, given the new size of the focus object.
|
|
177
|
+
* @param width
|
|
178
|
+
* @param height
|
|
179
|
+
* @private
|
|
180
|
+
*/
|
|
181
|
+
private _repositionHandles;
|
|
182
|
+
$vertexSynced(element: ViewportElement<BrowserElement>): void;
|
|
183
|
+
$groupResized(params: GroupResizeResult<BrowserElement>): void;
|
|
184
|
+
$groupCollapsed(element: ViewportGroupElement<BrowserElement>): void;
|
|
185
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BrowserElement } from "../../../util";
|
|
2
|
+
import { ViewportElement } from "../../../../ui";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* @param t
|
|
6
|
+
* @param classes
|
|
7
|
+
* @param parent
|
|
8
|
+
* @param attributes
|
|
9
|
+
*/
|
|
10
|
+
export declare function $_createSvg(t: string, classes: Array<string>, parent?: BrowserElement, attributes?: Record<string, any>): BrowserElement;
|
|
11
|
+
/**
|
|
12
|
+
* Sets the position of the given resize skeleton pertaining to the given managed element.
|
|
13
|
+
* Takes position and rotation into account.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function $_setSkeletonPosition(s: BrowserElement, mel: ViewportElement<BrowserElement>): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './snaplines-plugin';
|