@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,116 @@
|
|
|
1
|
+
import { Edge, ObjectData, PointXY } from "../../../core";
|
|
2
|
+
import { Diagram } from "./diagram";
|
|
3
|
+
import { DiagramCell } from "./diagram-cell";
|
|
4
|
+
/**
|
|
5
|
+
* A link in a diagram.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DiagramLink {
|
|
8
|
+
private diagram;
|
|
9
|
+
edge: Edge;
|
|
10
|
+
/**
|
|
11
|
+
* This is set when the link has been destroyed, ie. the underlying
|
|
12
|
+
* edge cell was removed from the data model.
|
|
13
|
+
*/
|
|
14
|
+
$destroyed: boolean;
|
|
15
|
+
get id(): string;
|
|
16
|
+
constructor(diagram: Diagram, edge: Edge);
|
|
17
|
+
/**
|
|
18
|
+
* Update the link's backing data.
|
|
19
|
+
* @param updates
|
|
20
|
+
*/
|
|
21
|
+
update(updates: ObjectData): void;
|
|
22
|
+
/**
|
|
23
|
+
* Removes the link from the diagram.
|
|
24
|
+
*/
|
|
25
|
+
remove(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the link's label.
|
|
28
|
+
* @param label
|
|
29
|
+
*/
|
|
30
|
+
setLabel(label: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the link's label.
|
|
33
|
+
*/
|
|
34
|
+
get label(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the link's stroke color.
|
|
37
|
+
* @param color
|
|
38
|
+
*/
|
|
39
|
+
setColor(color: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the link's stroke color.
|
|
42
|
+
*/
|
|
43
|
+
get color(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the link's stroke width.
|
|
46
|
+
* @param lineWidth
|
|
47
|
+
*/
|
|
48
|
+
setLineWidth(lineWidth: number): void;
|
|
49
|
+
/**
|
|
50
|
+
* Gets the link's stroke width.
|
|
51
|
+
*/
|
|
52
|
+
get lineWidth(): number;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the link's outline color.
|
|
55
|
+
* @param outlineColor
|
|
56
|
+
*/
|
|
57
|
+
setOutlineColor(outlineColor: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Gets the link's outline color.
|
|
60
|
+
*/
|
|
61
|
+
get outlineColor(): string;
|
|
62
|
+
/**
|
|
63
|
+
* Sets the link's outline width.
|
|
64
|
+
* @param outlineWidth
|
|
65
|
+
*/
|
|
66
|
+
setOutlineWidth(outlineWidth: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Gets the link's outline width.
|
|
69
|
+
*/
|
|
70
|
+
get outlineWidth(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the link's dash array.
|
|
73
|
+
* @param dashArray
|
|
74
|
+
*/
|
|
75
|
+
setDashArray(dashArray: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Gets the link's dash array.
|
|
78
|
+
*/
|
|
79
|
+
get dashArray(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the link's label location (0 to 1).
|
|
82
|
+
* @param labelLocation
|
|
83
|
+
*/
|
|
84
|
+
setLabelLocation(labelLocation: number): void;
|
|
85
|
+
/**
|
|
86
|
+
* Gets the link's label location.
|
|
87
|
+
*/
|
|
88
|
+
get labelLocation(): number;
|
|
89
|
+
/**
|
|
90
|
+
* Sets the link's source.
|
|
91
|
+
* @param source
|
|
92
|
+
*/
|
|
93
|
+
setSource(source: string | DiagramCell | PointXY): void;
|
|
94
|
+
/**
|
|
95
|
+
* Gets the link's source.
|
|
96
|
+
*/
|
|
97
|
+
get source(): any;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the link's target.
|
|
100
|
+
* @param target
|
|
101
|
+
*/
|
|
102
|
+
setTarget(target: string | DiagramCell | PointXY): void;
|
|
103
|
+
/**
|
|
104
|
+
* Gets the link's target.
|
|
105
|
+
*/
|
|
106
|
+
get target(): any;
|
|
107
|
+
/**
|
|
108
|
+
* Bring this link to the front.
|
|
109
|
+
*/
|
|
110
|
+
toFront(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Send this link to the back.
|
|
113
|
+
*/
|
|
114
|
+
toBack(): void;
|
|
115
|
+
destroy(): void;
|
|
116
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShapePalette } from "../shape-palette";
|
|
2
|
+
import { BrowserElement } from "../../util";
|
|
3
|
+
import { DiagramPaletteOptions } from "./definitions";
|
|
4
|
+
import { Diagram } from "./diagram";
|
|
5
|
+
/**
|
|
6
|
+
* A palette for a diagram - a thin wrapper around ShapePalette offering a couple of diagram specific methods.
|
|
7
|
+
* @group Diagrams
|
|
8
|
+
*/
|
|
9
|
+
export declare class DiagramPalette extends ShapePalette<BrowserElement> {
|
|
10
|
+
constructor(container: HTMLElement, diagram: Diagram, options?: DiagramPaletteOptions);
|
|
11
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Group, Vertex } from "../../../core";
|
|
2
|
+
import { ViewportElement } from "../../../ui";
|
|
3
|
+
import { BrowserElement } from "../../util";
|
|
4
|
+
import { ResizingToolsPlugin, ResizingToolsPluginOptions } from "../plugins";
|
|
5
|
+
import { Surface } from "../surface";
|
|
6
|
+
/**
|
|
7
|
+
* The default size for a button in the diagram tools.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_DIAGRAM_TOOLS_BUTTON_SIZE = 15;
|
|
10
|
+
/**
|
|
11
|
+
* Options for the diagram tools plugin
|
|
12
|
+
*/
|
|
13
|
+
export interface DiagramToolsPluginOptions extends ResizingToolsPluginOptions {
|
|
14
|
+
/**
|
|
15
|
+
* width/height of buttons. Defaults to 15 pixels.
|
|
16
|
+
*/
|
|
17
|
+
buttonSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Whether or not to allow clone of vertices. Defaults to true; is overriden by any `canClone` function passed in.
|
|
20
|
+
*/
|
|
21
|
+
allowClone?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether or not to allow delete of vertices. Defaults to true; is overriden by any `canDelete` function passed in.
|
|
24
|
+
*/
|
|
25
|
+
allowDelete?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether or not to show a handle from which a user can drag a link to other vertices. Defaults to true; is overriden by any `canShowLinkButton` function passed in.
|
|
28
|
+
*/
|
|
29
|
+
allowLink?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* A function that you can provide to instruct the plugin whether or not to show a link handle. The return value of this function overrides the setting of `allowLink`.
|
|
32
|
+
* @param v
|
|
33
|
+
* @param el
|
|
34
|
+
*/
|
|
35
|
+
canShowLinkButton?: (v: Vertex, el: BrowserElement) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* A function that you can provide to instruct the plugin whether or not to show a delete button. The return value of this function overrides the setting of `allowDelete`.
|
|
38
|
+
* @param v
|
|
39
|
+
* @param el
|
|
40
|
+
*/
|
|
41
|
+
canDelete?: (v: Vertex, el: BrowserElement) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* A function that you can provide to instruct the plugin whether or not to show a clone button. The return value of this function overrides the setting of `allowClone`.
|
|
44
|
+
* @param v
|
|
45
|
+
* @param el
|
|
46
|
+
*/
|
|
47
|
+
canClone?: (v: Vertex, el: BrowserElement) => boolean;
|
|
48
|
+
/**
|
|
49
|
+
* A function that you can provide to instruct the plugin whether or not, when removing a group, to also remove its child members. You need to return boolean true from this method in order for group members to be deleted.
|
|
50
|
+
* @param v
|
|
51
|
+
* @param el
|
|
52
|
+
*/
|
|
53
|
+
shouldDeleteGroupMembers?: (g: Group, el: BrowserElement) => boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* CSS class set on all diagram tool buttons
|
|
57
|
+
* @group Diagrams
|
|
58
|
+
* @category CSS Classes
|
|
59
|
+
* @cssClass
|
|
60
|
+
* @context diagramTools
|
|
61
|
+
*/
|
|
62
|
+
export declare const CLASS_DIAGRAM_CELL_TOOL = "vjs-cell-tool";
|
|
63
|
+
/**
|
|
64
|
+
* CSS class set on the clone tool button
|
|
65
|
+
* @group Diagrams
|
|
66
|
+
* @category CSS Classes
|
|
67
|
+
* @cssClass
|
|
68
|
+
* @context diagramTools
|
|
69
|
+
*/
|
|
70
|
+
export declare const CLASS_DIAGRAM_CLONE_CELL = "vjs-clone-cell";
|
|
71
|
+
/**
|
|
72
|
+
* CSS class set on the delete cell button
|
|
73
|
+
* @group Diagrams
|
|
74
|
+
* @category CSS Classes
|
|
75
|
+
* @cssClass
|
|
76
|
+
* @context diagramTools
|
|
77
|
+
*/
|
|
78
|
+
export declare const CLASS_DIAGRAM_DELETE_CELL = "vjs-delete-cell";
|
|
79
|
+
/**
|
|
80
|
+
* CSS class set on the link cell handle
|
|
81
|
+
* @group Diagrams
|
|
82
|
+
* @category CSS Classes
|
|
83
|
+
* @cssClass
|
|
84
|
+
* @context diagramTools
|
|
85
|
+
*/
|
|
86
|
+
export declare const CLASS_DIAGRAM_LINK_CELL = "vjs-link-cell";
|
|
87
|
+
/**
|
|
88
|
+
* Vertex tools for a diagram - resizing, rotating, clone and delete.
|
|
89
|
+
* @group Diagrams
|
|
90
|
+
*/
|
|
91
|
+
export declare class DiagramToolsPlugin extends ResizingToolsPlugin {
|
|
92
|
+
static type: string;
|
|
93
|
+
id: string;
|
|
94
|
+
$buttonSize: number;
|
|
95
|
+
$allowClone: boolean;
|
|
96
|
+
$allowDelete: boolean;
|
|
97
|
+
$allowLink: boolean;
|
|
98
|
+
$canShowLinkButton: (v: Vertex, el: BrowserElement) => boolean;
|
|
99
|
+
$canDelete: (v: Vertex, el: BrowserElement) => boolean;
|
|
100
|
+
$canClone: (v: Vertex, el: BrowserElement) => boolean;
|
|
101
|
+
$shouldDeleteGroupMembers: (g: Group, el: BrowserElement) => boolean;
|
|
102
|
+
$buttonY: number;
|
|
103
|
+
initialise(surface: Surface, options: DiagramToolsPluginOptions): boolean;
|
|
104
|
+
protected _attachSvg(mel: ViewportElement<BrowserElement>, obj: any, resizeX: boolean, resizeY: boolean): BrowserElement;
|
|
105
|
+
private $getCloneButtonX;
|
|
106
|
+
private $getCloneButtonY;
|
|
107
|
+
private $getDeleteButtonX;
|
|
108
|
+
private $getDeleteButtonY;
|
|
109
|
+
private $getLinkButtonX;
|
|
110
|
+
private $getLinkButtonY;
|
|
111
|
+
protected $_setSkeletonPositionById(id: string): boolean;
|
|
112
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { ObjectData, PriorityQueue, SaveOptions, ModelOptions, Edge } from "../../../core";
|
|
2
|
+
import { PropertyTracker, ZoomToFitOptions, ZoomToFitIfNecessaryOptions } from "../../../ui";
|
|
3
|
+
import { BrowserElement } from "../../util";
|
|
4
|
+
import { BrowserUIModel } from "../../browser-ui";
|
|
5
|
+
import { ShapeLibraryImpl } from "../../shape-library";
|
|
6
|
+
import { AddLinkOptions, DiagramOptions, DiagramPaletteOptions, DiagramSaveData, DiagramSaveOptions } from "./definitions";
|
|
7
|
+
import { DiagramCell } from "./diagram-cell";
|
|
8
|
+
import { DiagramLink } from "./diagram-link";
|
|
9
|
+
import { BrowserUI } from "../../browser-visuallyjs-instance";
|
|
10
|
+
import { MiniviewPluginOptions } from "../plugins";
|
|
11
|
+
import { DiagramPalette } from "./diagram-palette";
|
|
12
|
+
import { DiagramActionMediator } from "./mediator";
|
|
13
|
+
import { ImageExportOptions, ImageReadyFunction, SvgExportOptions } from "../../svg-export";
|
|
14
|
+
/**
|
|
15
|
+
* A Diagram draws nodes, edges and group as SVG elements into an SVG container element, and provides a programmatic API for manipulating the various elements.
|
|
16
|
+
* @group Diagrams
|
|
17
|
+
*/
|
|
18
|
+
export declare class Diagram {
|
|
19
|
+
model: BrowserUIModel;
|
|
20
|
+
$shapeLibrary: ShapeLibraryImpl<BrowserElement>;
|
|
21
|
+
$ui: BrowserUI;
|
|
22
|
+
readonly defaultCellWidth: number;
|
|
23
|
+
readonly defaultCellHeight: number;
|
|
24
|
+
get cellWidthAttribute(): string;
|
|
25
|
+
get cellHeightAttribute(): string;
|
|
26
|
+
get cellLeftAttribute(): string;
|
|
27
|
+
get cellTopAttribute(): string;
|
|
28
|
+
labelAttribute: string;
|
|
29
|
+
$_cellMap: Map<string, DiagramCell>;
|
|
30
|
+
$editable: boolean;
|
|
31
|
+
$_cellList: PriorityQueue<DiagramCell>;
|
|
32
|
+
$propertyTracker: PropertyTracker;
|
|
33
|
+
_mediator: DiagramActionMediator;
|
|
34
|
+
constructor(model: BrowserUIModel, container: BrowserElement, options: DiagramOptions);
|
|
35
|
+
private _createView;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
* @param v
|
|
39
|
+
*/
|
|
40
|
+
private _addVertex;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @param v
|
|
44
|
+
*/
|
|
45
|
+
private _removeVertex;
|
|
46
|
+
private _canRotate;
|
|
47
|
+
private _canLink;
|
|
48
|
+
private _canClone;
|
|
49
|
+
private _canResize;
|
|
50
|
+
private _canDelete;
|
|
51
|
+
/**
|
|
52
|
+
* gets the shape type definition corresponding to the given vertex.
|
|
53
|
+
* @param v
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
private _getShapeDefinition;
|
|
57
|
+
$destroy(): void;
|
|
58
|
+
private _resolveId;
|
|
59
|
+
private _resolveCell;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the cell with the given ID. May return null if no matching cell found.
|
|
62
|
+
* @param id
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
getCell(id: string): DiagramCell;
|
|
66
|
+
/**
|
|
67
|
+
* Adds a cell to the diagram.
|
|
68
|
+
* @param o
|
|
69
|
+
*/
|
|
70
|
+
addCell(o: ObjectData): DiagramCell;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the link with the given id.
|
|
73
|
+
* @param id
|
|
74
|
+
*/
|
|
75
|
+
getLink(id: string): DiagramLink;
|
|
76
|
+
/**
|
|
77
|
+
* Add a link to the diagram, which may be connected to a cell at one or both ends, or placed in whitespace.
|
|
78
|
+
* @param o
|
|
79
|
+
*/
|
|
80
|
+
addLink(o: AddLinkOptions): DiagramLink;
|
|
81
|
+
/**
|
|
82
|
+
* Loads data either as an object or from a url into the diagram, first clearing it. Invokes the
|
|
83
|
+
* given onload function after load is complete.
|
|
84
|
+
* @param options
|
|
85
|
+
*/
|
|
86
|
+
load(options: {
|
|
87
|
+
data?: any;
|
|
88
|
+
url?: string;
|
|
89
|
+
onload?: () => any;
|
|
90
|
+
}): void;
|
|
91
|
+
/**
|
|
92
|
+
* Exports the dataset - only the dataset. If you want the dataset plus the current state, use {@link save}
|
|
93
|
+
*/
|
|
94
|
+
exportData(): any;
|
|
95
|
+
/**
|
|
96
|
+
* Exports an SVG representation of the diagram.
|
|
97
|
+
* @returns An SVG element representing the diagram.
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* Exports an SVG representation of the diagram
|
|
101
|
+
* @returns An string representing the diagram in SVG.
|
|
102
|
+
*/
|
|
103
|
+
exportSvg(options?: SvgExportOptions): string;
|
|
104
|
+
/**
|
|
105
|
+
* Exports an image representation of the diagram.
|
|
106
|
+
* @returns An image representing the diagram.
|
|
107
|
+
*/
|
|
108
|
+
exportImage(options: ImageExportOptions, onImageReady: ImageReadyFunction): void;
|
|
109
|
+
/**
|
|
110
|
+
* Exports the dataset and current state as JSON.
|
|
111
|
+
* @param options
|
|
112
|
+
*/
|
|
113
|
+
save(options?: DiagramSaveOptions): DiagramSaveData;
|
|
114
|
+
/**
|
|
115
|
+
* Posts the Diagram data and state via ajax to a given URL.
|
|
116
|
+
* @param options Save options
|
|
117
|
+
*/
|
|
118
|
+
saveToUrl(options: SaveOptions): void;
|
|
119
|
+
/**
|
|
120
|
+
* Gets the number of cells in the diagram
|
|
121
|
+
*/
|
|
122
|
+
getCellCount(): number;
|
|
123
|
+
/**
|
|
124
|
+
* Gets the number of links in the diagram.
|
|
125
|
+
*/
|
|
126
|
+
getLinkCount(): number;
|
|
127
|
+
/**
|
|
128
|
+
* Clears the diagram.
|
|
129
|
+
*/
|
|
130
|
+
clear(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Removes a cell from the diagram.
|
|
133
|
+
* @param cell Either the cell to remove, or the ID of the cell to remove.
|
|
134
|
+
*/
|
|
135
|
+
removeCell(cell: string | DiagramCell): void;
|
|
136
|
+
/**
|
|
137
|
+
* Bring the given cell or link to the front.
|
|
138
|
+
* @param c Cell or link, or its id.
|
|
139
|
+
*/
|
|
140
|
+
toFront(c: string | DiagramCell | DiagramLink): void;
|
|
141
|
+
/**
|
|
142
|
+
* Send the given cell or link to the back.
|
|
143
|
+
* @param c Cell or link, or its id.
|
|
144
|
+
*/
|
|
145
|
+
toBack(c: string | DiagramCell | DiagramLink): void;
|
|
146
|
+
/**
|
|
147
|
+
* Sets the given cell as the selected cell in the model
|
|
148
|
+
* @param c Cell to select.
|
|
149
|
+
*/
|
|
150
|
+
selectCell(c: string | DiagramCell): void;
|
|
151
|
+
/**
|
|
152
|
+
* Sets the given link as the selected link in the model
|
|
153
|
+
* @param l Link to select.
|
|
154
|
+
*/
|
|
155
|
+
selectLink(l: string | DiagramLink | Edge): void;
|
|
156
|
+
/**
|
|
157
|
+
* Alias for selectLink
|
|
158
|
+
* @param l Link to select.
|
|
159
|
+
*/
|
|
160
|
+
selectEdge(l: string | DiagramLink | Edge): void;
|
|
161
|
+
/**
|
|
162
|
+
* Start editing the given edge/link
|
|
163
|
+
*/
|
|
164
|
+
startEditingPath(edgeOrLink: Edge | DiagramLink, params: any): void;
|
|
165
|
+
/**
|
|
166
|
+
* Stop editing a link path. If a path is not being edited this is ignored.
|
|
167
|
+
*/
|
|
168
|
+
stopEditingPath(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Clear the edits for the given edge/link.
|
|
171
|
+
*/
|
|
172
|
+
clearPathEdits(edgeOrLink: Edge | DiagramLink): void;
|
|
173
|
+
/**
|
|
174
|
+
* Gets the current visible zoom.
|
|
175
|
+
*/
|
|
176
|
+
getZoom(): number;
|
|
177
|
+
/**
|
|
178
|
+
* Attach a miniview to this diagram.
|
|
179
|
+
* @param options Options for the miniview.
|
|
180
|
+
*/
|
|
181
|
+
attachMiniview(options: MiniviewPluginOptions): void;
|
|
182
|
+
/**
|
|
183
|
+
* Create a new DiagramPalette in the given container element, and attach it to this Diagram.
|
|
184
|
+
* @param container HTMLElement that will host the palette
|
|
185
|
+
* @param options Options for the palette.
|
|
186
|
+
*/
|
|
187
|
+
attachPalette(container: HTMLElement, options?: DiagramPaletteOptions): DiagramPalette;
|
|
188
|
+
/**
|
|
189
|
+
* Sets the current zoom. If this value is outside the zoom range it will be ignored.
|
|
190
|
+
* @param z
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
193
|
+
setZoom(z: number): void;
|
|
194
|
+
/**
|
|
195
|
+
* Zooms the display so that all the tracked elements fit inside the viewport. This method will also, by default, increase the zoom if necessary - meaning the default behaviour is to adjust the zoom so that the content fills the viewport. You can suppress zoom increase by setting `doNotZoomIfVisible:true` on the parameters to this method.
|
|
196
|
+
* @tags zoom
|
|
197
|
+
*/
|
|
198
|
+
zoomToFit(params?: ZoomToFitOptions): void;
|
|
199
|
+
/**
|
|
200
|
+
* Zooms the display so that all the tracked elements fit inside the viewport, but does not make any adjustments to zoom if all the elements are currently visible (it still does center the content though).
|
|
201
|
+
* @tags zoom
|
|
202
|
+
*/
|
|
203
|
+
zoomToFitIfNecessary(params?: ZoomToFitIfNecessaryOptions): void;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Create a new DiagramPalette in the given container element, and attach it to the given Diagram.
|
|
207
|
+
* @param diagram
|
|
208
|
+
* @param container
|
|
209
|
+
* @param options
|
|
210
|
+
* @group Factory Methods
|
|
211
|
+
*/
|
|
212
|
+
export declare function attachDiagramPalette(diagram: Diagram, container: HTMLElement, options?: DiagramPaletteOptions): DiagramPalette;
|
|
213
|
+
/**
|
|
214
|
+
* Create a new Diagram in the given container element.
|
|
215
|
+
* @param container
|
|
216
|
+
* @param options
|
|
217
|
+
* @param modelOptions
|
|
218
|
+
* @param data
|
|
219
|
+
* @group Factory Methods
|
|
220
|
+
*/
|
|
221
|
+
export declare function createDiagram(container: BrowserElement, options?: DiagramOptions, modelOptions?: ModelOptions, data?: any): Diagram;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SvgExportComponent, SvgExportComponentOptions } from "../../components";
|
|
2
|
+
import { BrowserElement } from "../../util";
|
|
3
|
+
import { Diagram } from "./diagram";
|
|
4
|
+
export * from './constants';
|
|
5
|
+
export * from './definitions';
|
|
6
|
+
export * from './diagram';
|
|
7
|
+
export * from './diagram-tools';
|
|
8
|
+
export * from './diagram-palette';
|
|
9
|
+
export * from './diagram-cell';
|
|
10
|
+
export * from './diagram-link';
|
|
11
|
+
export * from './util';
|
|
12
|
+
export * from './mediator';
|
|
13
|
+
/**
|
|
14
|
+
* Options for a diagram export component.
|
|
15
|
+
*/
|
|
16
|
+
export interface DiagramExportComponentOptions extends SvgExportComponentOptions {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Simple component offering buttons for export of SVG, PNG or JPG from a UI that has an SVG container
|
|
20
|
+
* @group Components
|
|
21
|
+
* @category Export Controls
|
|
22
|
+
*/
|
|
23
|
+
export declare class DiagramExportComponent extends SvgExportComponent {
|
|
24
|
+
constructor(container: BrowserElement, diagram: Diagram, options?: DiagramExportComponentOptions);
|
|
25
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Group, Vertex, Node, ObjectData, Size } from "../../../core";
|
|
2
|
+
import { ShapeType } from "../../shape-library";
|
|
3
|
+
import { BrowserElement } from "../../util";
|
|
4
|
+
/**
|
|
5
|
+
* Defines an object that can decide at runtime whether a given shape should offer various actions in its shape editing tools. Each method in this interface is optional, and does not override any diagram-wide settings for the specific operation. Also, the mediator will not be invoked if a diagram is not editable.
|
|
6
|
+
*/
|
|
7
|
+
export interface DiagramActionMediator {
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether or not the given vertex should be clonable in the UI. Defaults to true, meaning the clone icon will be present in the diagram tools.
|
|
10
|
+
* @param v
|
|
11
|
+
* @param shape
|
|
12
|
+
* @param el
|
|
13
|
+
*/
|
|
14
|
+
canClone?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns whether or not the given vertex should be deletable in the UI. Defaults to true, meaning the delete icon will be present in the diagram tools when the vertex is selected.
|
|
17
|
+
* @param v
|
|
18
|
+
* @param shape
|
|
19
|
+
* @param el
|
|
20
|
+
*/
|
|
21
|
+
canDelete?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Returns whether or not the given vertex should be linkable via edge drag in the UI. Defaults to true, meaning the link icon will be present in the diagram tools when the vertex is selected.
|
|
24
|
+
* @param v
|
|
25
|
+
* @param shape
|
|
26
|
+
* @param el
|
|
27
|
+
*/
|
|
28
|
+
canLink?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Returns whether or not the given vertex should be resizable in the UI. Defaults to true, meaning the resize handles will be present in the diagram tools when the vertex is selected.
|
|
31
|
+
* @param v
|
|
32
|
+
* @param shape
|
|
33
|
+
* @param el
|
|
34
|
+
*/
|
|
35
|
+
canResize?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns whether or not the given vertex should be resizable in the UI. Defaults to true, meaning the rotate handle and leader will be present in the diagram tools when the vertex is selected.
|
|
38
|
+
* @param v
|
|
39
|
+
* @param shape
|
|
40
|
+
* @param el
|
|
41
|
+
*/
|
|
42
|
+
canRotate?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Returns whether or not the given vertex should be draggable in the UI. Defaults to true.
|
|
45
|
+
* @param v
|
|
46
|
+
* @param shape
|
|
47
|
+
* @param el
|
|
48
|
+
*/
|
|
49
|
+
canDrag?: (v: Vertex, shape: ShapeType, el: BrowserElement) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Returns whether or not the given vertex should be droppable on the given target, which may either be another vertex (if `targetVertex` is set), or the diagram canvas (if `isOnCanvas` is set). This method will never be called with both `targetVertex` set an `isOnCanvas` true - it's one or the other.
|
|
52
|
+
* @param v
|
|
53
|
+
* @param shape
|
|
54
|
+
* @param el
|
|
55
|
+
*/
|
|
56
|
+
canDrop?: (vertex: Node | Group, targetVertex?: Node | Group, isOnCanvas?: boolean) => boolean;
|
|
57
|
+
canCollapse?: (group: Group, currentSize: Size) => boolean | ObjectData;
|
|
58
|
+
canExpand?: (group: Group, currentSize: Size) => boolean | ObjectData;
|
|
59
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare function gridBackgroundOptions(): {
|
|
5
|
+
dragOnGrid: boolean;
|
|
6
|
+
showGrid: boolean;
|
|
7
|
+
showBorder: boolean;
|
|
8
|
+
autoShrink: boolean;
|
|
9
|
+
minWidth: number;
|
|
10
|
+
maxWidth: number;
|
|
11
|
+
minHeight: number;
|
|
12
|
+
maxHeight: number;
|
|
13
|
+
showTickMarks: boolean;
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Group, Node, AbstractLayout, PointXY, RectangleXY, Size, Extents } from "../../core";
|
|
2
|
+
import { ViewportElement, ViewportGroupElement, UICore, GroupResizeResult, GroupMapping } from "../../ui";
|
|
3
|
+
import { BrowserElement } from "../util";
|
|
4
|
+
/**
|
|
5
|
+
* Class set on the SVG element we use to track an elastic group resize.
|
|
6
|
+
* @group Nodes and Groups
|
|
7
|
+
* @category CSS Classes
|
|
8
|
+
* @cssClass
|
|
9
|
+
* @context groups
|
|
10
|
+
*/
|
|
11
|
+
export declare const CLASS_ELASTIC_GROUP_RESIZE = "vjs-surface-elastic-group-resize";
|
|
12
|
+
/**
|
|
13
|
+
* Event fired when the elastic group resizes. For internal use.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const EVENT_ELASTIC_GROUP_FRAME_RESIZE = "elasticGroupFrame:resize";
|
|
17
|
+
/**
|
|
18
|
+
* Event fired when the elastic group frame is removed. For internal use.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const EVENT_ELASTIC_GROUP_FRAME_REMOVE = "elasticGroupFrame:remove";
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare class ElasticGroupManager {
|
|
26
|
+
private surface;
|
|
27
|
+
focusVertex: Node | Group;
|
|
28
|
+
group: Group;
|
|
29
|
+
private groupDef;
|
|
30
|
+
groupEntry: RectangleXY;
|
|
31
|
+
focusPosition: RectangleXY;
|
|
32
|
+
siblingEntries: Array<ViewportElement<BrowserElement>>;
|
|
33
|
+
xMinEntries: Array<RectangleXY>;
|
|
34
|
+
xMaxEntries: Array<RectangleXY>;
|
|
35
|
+
yMinEntries: Array<RectangleXY>;
|
|
36
|
+
yMaxEntries: Array<RectangleXY>;
|
|
37
|
+
managedElement: ViewportGroupElement<BrowserElement>;
|
|
38
|
+
uiGroup: ViewportGroupElement<BrowserElement>;
|
|
39
|
+
frame: SVGElement;
|
|
40
|
+
layout: AbstractLayout<any>;
|
|
41
|
+
uiGroupContentArea: BrowserElement;
|
|
42
|
+
_initialExtents: Extents;
|
|
43
|
+
layoutShiftX: number;
|
|
44
|
+
layoutShiftY: number;
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
minSize: Size;
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
parent: ElasticGroupManager;
|
|
51
|
+
constructor(surface: UICore<BrowserElement>, focusVertex: Node | Group, group: Group, groupDef: GroupMapping<BrowserElement>);
|
|
52
|
+
/**
|
|
53
|
+
* Sort the child entries in each of the four directions. The head of each array is then the furthest point in the
|
|
54
|
+
* given direction.
|
|
55
|
+
* @internal
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
_sortEntries(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the position of the current focus, and optionally changes its size, and then recomputes.
|
|
61
|
+
* NOTE: this method expects `pos` to be relative to the focus element's offset parent (whose x/y location
|
|
62
|
+
* is stored in the `groupEntry` member of this class), unless you set `adjustForParent:true`, which is what this
|
|
63
|
+
* class does when it calls a parent instance
|
|
64
|
+
* @internal
|
|
65
|
+
* @param p
|
|
66
|
+
* @param wh
|
|
67
|
+
*/
|
|
68
|
+
setFocusPosition(p: PointXY, allowOriginShrink: boolean, event?: MouseEvent, wh?: Size, adjustForParent?: boolean): void;
|
|
69
|
+
private _$_recompute;
|
|
70
|
+
getCurrentExtents(): Extents;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
cleanup(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Get computed values for some group. If the given group is not managed by this manager and there is a parent manager, delegate to the parent. Otherwise return null.
|
|
77
|
+
* @param groupId
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
getValues(groupId: string): {
|
|
81
|
+
layoutShiftX: number;
|
|
82
|
+
layoutShiftY: number;
|
|
83
|
+
width: number;
|
|
84
|
+
height: number;
|
|
85
|
+
} | null;
|
|
86
|
+
/**
|
|
87
|
+
* Persists the current state of the elastic group to the UI ONLY, NOT to the model. This means it resizes the group content area and repositions the group, if necessary, plus relocates any child elements that have been moved as a result of the group's origin moving. But nothing is written to the model. All of the changes are returned by this method though, and the call site is expected to handle them (for now; this might change in the future. But we need to ensure that any updates this makes to the model are in a transaction, probably one that already is in progress)
|
|
88
|
+
* @param movedElements
|
|
89
|
+
* @param resizedGroups
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
_persistToUI(movedElements?: Record<string, {
|
|
93
|
+
original: PointXY;
|
|
94
|
+
current: PointXY;
|
|
95
|
+
}>, resizedGroups?: Record<string, GroupResizeResult<any>>): {
|
|
96
|
+
movedElements: Record<string, {
|
|
97
|
+
original: PointXY;
|
|
98
|
+
current: PointXY;
|
|
99
|
+
}>;
|
|
100
|
+
resizedGroups: Record<string, GroupResizeResult<any>>;
|
|
101
|
+
};
|
|
102
|
+
}
|