@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,134 @@
|
|
|
1
|
+
import { EVENT_END_NODE_TRAVERSAL, EVENT_END_OVERLAY_ANIMATION, EVENT_START_NODE_TRAVERSAL, EVENT_START_OVERLAY_ANIMATION } from "./constants";
|
|
2
|
+
import { BrowserElement } from "../../util";
|
|
3
|
+
import { Connection } from "../../../ui";
|
|
4
|
+
import { EventGenerator } from "../../../core";
|
|
5
|
+
/**
|
|
6
|
+
* Represents the initial phase of an animation, before it has started moving.
|
|
7
|
+
* @constant
|
|
8
|
+
*/
|
|
9
|
+
export declare const ANIMATION_PHASE_INITIALIZED = "INITIALIZED";
|
|
10
|
+
/**
|
|
11
|
+
* Represents the phase of an animation where the start vertex is being traversed
|
|
12
|
+
* @constant
|
|
13
|
+
*/
|
|
14
|
+
export declare const ANIMATION_PHASE_TRAVERSING_START = "TRAVERSING_START";
|
|
15
|
+
/**
|
|
16
|
+
* Represents the phase of an animation where an edge is being traversed.
|
|
17
|
+
* @constant
|
|
18
|
+
*/
|
|
19
|
+
export declare const ANIMATION_PHASE_TRAVERSING_EDGE = "TRAVERSING_EDGE";
|
|
20
|
+
/**
|
|
21
|
+
* Represents the phase of an animation where the end vertex is being traversed.
|
|
22
|
+
* @constant
|
|
23
|
+
*/
|
|
24
|
+
export declare const ANIMATION_PHASE_TRAVERSING_END = "TRAVERSING_END";
|
|
25
|
+
/**
|
|
26
|
+
* Represents an animation that has been cancelled
|
|
27
|
+
* @constant
|
|
28
|
+
*/
|
|
29
|
+
export declare const ANIMATION_PHASE_CANCELLED = "CANCELLED";
|
|
30
|
+
/**
|
|
31
|
+
* Represents an animation that has run through and finished.
|
|
32
|
+
* @constant
|
|
33
|
+
*/
|
|
34
|
+
export declare const ANIMATION_PHASE_FINISHED = "FINISHED";
|
|
35
|
+
/**
|
|
36
|
+
* A phase in an Animation.
|
|
37
|
+
* @group Components
|
|
38
|
+
*/
|
|
39
|
+
export type AnimationPhase = typeof ANIMATION_PHASE_INITIALIZED | typeof ANIMATION_PHASE_TRAVERSING_START | typeof ANIMATION_PHASE_TRAVERSING_EDGE | typeof ANIMATION_PHASE_TRAVERSING_END | typeof ANIMATION_PHASE_CANCELLED | typeof ANIMATION_PHASE_FINISHED;
|
|
40
|
+
/**
|
|
41
|
+
* Available animation events.
|
|
42
|
+
* @group Events
|
|
43
|
+
*/
|
|
44
|
+
export type AnimationEvent = typeof EVENT_START_OVERLAY_ANIMATION | typeof EVENT_END_OVERLAY_ANIMATION | typeof EVENT_START_NODE_TRAVERSAL | typeof EVENT_END_NODE_TRAVERSAL;
|
|
45
|
+
/**
|
|
46
|
+
* The type defining the object that is passed to all events fired by the `tracePath` method.
|
|
47
|
+
* @group Events
|
|
48
|
+
*/
|
|
49
|
+
export type AnimationEventCallbackParams = {
|
|
50
|
+
/**
|
|
51
|
+
* Connection on which the path is being traced
|
|
52
|
+
*/
|
|
53
|
+
connection: Connection<Element>;
|
|
54
|
+
/**
|
|
55
|
+
* Animation manager
|
|
56
|
+
*/
|
|
57
|
+
harness: ConnectionOverlayAnimator;
|
|
58
|
+
/**
|
|
59
|
+
* The element being animated.
|
|
60
|
+
*/
|
|
61
|
+
element?: BrowserElement;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Options for animating an overlay along an edge
|
|
65
|
+
* @group Components
|
|
66
|
+
*/
|
|
67
|
+
export interface OverlayAnimationOptions {
|
|
68
|
+
/**
|
|
69
|
+
* Defaults to true, meaning traverse from the source to the target.
|
|
70
|
+
*/
|
|
71
|
+
forwards?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* How long, in milliseconds, to dwell on the source before beginning to move. Defaults to 350ms.
|
|
74
|
+
*/
|
|
75
|
+
dwell?: number;
|
|
76
|
+
/**
|
|
77
|
+
* How fast to travel, in pixels per second. Defaults to 100.
|
|
78
|
+
*/
|
|
79
|
+
speed?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Time between frames. Defaults to 30ms.
|
|
82
|
+
*/
|
|
83
|
+
rate?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Optional set of event listeners.
|
|
86
|
+
*/
|
|
87
|
+
events?: Record<string, (p: AnimationEventCallbackParams) => any>;
|
|
88
|
+
/**
|
|
89
|
+
* If true, the animation starts in a paused state.
|
|
90
|
+
*/
|
|
91
|
+
paused?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* If true, the animation will loop.
|
|
94
|
+
*/
|
|
95
|
+
loop?: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export interface InternalOverlayAnimationOptions extends OverlayAnimationOptions {
|
|
101
|
+
/**
|
|
102
|
+
* Used internally to indicate this is the final animation in a series.
|
|
103
|
+
*/
|
|
104
|
+
isFinal?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Used internally to chain a set of animations.
|
|
107
|
+
*/
|
|
108
|
+
previous?: ConnectionOverlayAnimator;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Definition of the control surface for a specific segment in the tracePath method.
|
|
112
|
+
*/
|
|
113
|
+
export type ConnectionOverlayAnimator = {
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
eventGenerator: EventGenerator;
|
|
118
|
+
/**
|
|
119
|
+
* Play the animation
|
|
120
|
+
*/
|
|
121
|
+
play: () => any;
|
|
122
|
+
/**
|
|
123
|
+
* Pause the animation
|
|
124
|
+
*/
|
|
125
|
+
pause: () => any;
|
|
126
|
+
/**
|
|
127
|
+
* Cancel the animation
|
|
128
|
+
*/
|
|
129
|
+
cancel: () => any;
|
|
130
|
+
/**
|
|
131
|
+
* The connection the overlay is being animated on.
|
|
132
|
+
*/
|
|
133
|
+
connection: Connection<Element>;
|
|
134
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ConnectionOverlayAnimator } from "./definitions";
|
|
2
|
+
import { OptimisticEventGenerator } from "../../../core";
|
|
3
|
+
export type PathTransportListener = (s: string) => any;
|
|
4
|
+
export declare enum PathTransportState {
|
|
5
|
+
STOPPED = "stopped",
|
|
6
|
+
FINISHED = "finished",
|
|
7
|
+
PAUSED = "paused",
|
|
8
|
+
PLAYING = "playing"
|
|
9
|
+
}
|
|
10
|
+
export type CurrentState = PathTransportState;
|
|
11
|
+
export declare const EVENT_STATE = "state";
|
|
12
|
+
export declare class PathTransport extends OptimisticEventGenerator {
|
|
13
|
+
components: Array<any>;
|
|
14
|
+
params: any;
|
|
15
|
+
pathExists: true;
|
|
16
|
+
state: CurrentState;
|
|
17
|
+
currentlyAnimatingConnection: ConnectionOverlayAnimator;
|
|
18
|
+
constructor(components: Array<any>, params: any);
|
|
19
|
+
setState(s: CurrentState): void;
|
|
20
|
+
pause(): void;
|
|
21
|
+
play(): void;
|
|
22
|
+
cancel(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assigned to the parent element for one set of icons in the shape library palette
|
|
3
|
+
* @cssClass
|
|
4
|
+
* @context shapePalette
|
|
5
|
+
* @group Diagrams
|
|
6
|
+
* @category CSS Classes
|
|
7
|
+
*/
|
|
8
|
+
export declare const CLASS_PALETTE_SET = "vjs-shape-library-palette-set";
|
|
9
|
+
/**
|
|
10
|
+
* Assigned to the root element for a shape library palette
|
|
11
|
+
* @cssClass
|
|
12
|
+
* @context shapePalette
|
|
13
|
+
* @group Diagrams
|
|
14
|
+
* @category CSS Classes
|
|
15
|
+
*/
|
|
16
|
+
export declare const CLASS_PALETTE = "vjs-shape-library-palette";
|
|
17
|
+
/**
|
|
18
|
+
* Assigned to the drop-down that is shown when there are multiple shape sets in the palette
|
|
19
|
+
* @cssClass
|
|
20
|
+
* @context shapePalette
|
|
21
|
+
* @group Diagrams
|
|
22
|
+
* @category CSS Classes
|
|
23
|
+
*/
|
|
24
|
+
export declare const CLASS_PALETTE_SET_FILTER = "vjs-shape-library-palette-filter";
|
|
25
|
+
/**
|
|
26
|
+
* Assigned to each shape icon in the palette
|
|
27
|
+
* @cssClass
|
|
28
|
+
* @context shapePalette
|
|
29
|
+
* @group Diagrams
|
|
30
|
+
* @category CSS Classes
|
|
31
|
+
*/
|
|
32
|
+
export declare const CLASS_PALETTE_SHAPE = "vjs-shape-library-palette-shape";
|
|
33
|
+
/**
|
|
34
|
+
* Assigned to the label for each shape icon, if you have `showLabels:true` set.
|
|
35
|
+
* @cssClass
|
|
36
|
+
* @context shapePalette
|
|
37
|
+
* @group Diagrams
|
|
38
|
+
* @category CSS Classes
|
|
39
|
+
*/
|
|
40
|
+
export declare const CLASS_PALETTE_SHAPE_LABEL = "vjs-shape-library-palette-label";
|
|
41
|
+
/**
|
|
42
|
+
* Assigned to the title element for a set of icons
|
|
43
|
+
* @cssClass
|
|
44
|
+
* @context shapePalette
|
|
45
|
+
* @group Diagrams
|
|
46
|
+
* @category CSS Classes
|
|
47
|
+
*/
|
|
48
|
+
export declare const CLASS_PALETTE_SET_TITLE = "vjs-shape-library-palette-set-title";
|
|
49
|
+
/**
|
|
50
|
+
* Assigned to the parent element of the shapes in one set of icons
|
|
51
|
+
* @cssClass
|
|
52
|
+
* @context shapePalette
|
|
53
|
+
* @group Diagrams
|
|
54
|
+
* @category CSS Classes
|
|
55
|
+
*/
|
|
56
|
+
export declare const CLASS_PALETTE_SET_SHAPES = "vjs-shape-library-palette-set-shapes";
|
|
57
|
+
/**
|
|
58
|
+
* When in `tap` mode, this class is added to the lasso used to draw new vertices
|
|
59
|
+
* @cssClass
|
|
60
|
+
* @context shapePalette
|
|
61
|
+
* @group Diagrams
|
|
62
|
+
* @category CSS Classes
|
|
63
|
+
*/
|
|
64
|
+
export declare const CLASS_PALETTE_VERTEX_DRAWING_LASSO = "vjs-shape-library-palette-lasso";
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Surface } from "./surface";
|
|
2
|
+
import { BrowserElement } from "../util";
|
|
3
|
+
import { FixedElement, FixedElementConstraints } from "../fixed-layer";
|
|
4
|
+
import { AbstractLayoutAdapter, AbstractLayout, BOTTOM, BoundingBox, Extents, LEFT, PointXY, RIGHT, TOP, VisuallyJsModel, Constructable } from "../../core";
|
|
5
|
+
/**
|
|
6
|
+
* Possible values for element horizontal aligment.
|
|
7
|
+
* @group Components
|
|
8
|
+
* @category Decorators
|
|
9
|
+
*/
|
|
10
|
+
export type AppendedElementHorizontalAlignment = typeof RIGHT | typeof LEFT;
|
|
11
|
+
/**
|
|
12
|
+
* Possible values for element vertical aligment.
|
|
13
|
+
* @group Components
|
|
14
|
+
* @category Decorators
|
|
15
|
+
*/
|
|
16
|
+
export type AppendedElementVerticalAlignment = typeof TOP | typeof BOTTOM;
|
|
17
|
+
/**
|
|
18
|
+
* Alignment settings in x and y axes.
|
|
19
|
+
* @group Components
|
|
20
|
+
* @category Decorators
|
|
21
|
+
*/
|
|
22
|
+
export type AppendedElementAlignments = {
|
|
23
|
+
/**
|
|
24
|
+
* Alignment in X axis
|
|
25
|
+
*/
|
|
26
|
+
alignX?: AppendedElementHorizontalAlignment;
|
|
27
|
+
/**
|
|
28
|
+
* Alignment in Y axis
|
|
29
|
+
*/
|
|
30
|
+
alignY?: AppendedElementVerticalAlignment;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Parameters for a decorator. These are the parameters that are passed
|
|
34
|
+
* in to a Decorator's `decorate` method when it is called.
|
|
35
|
+
* @group Components
|
|
36
|
+
* @category Decorators
|
|
37
|
+
*/
|
|
38
|
+
export type DecorateParams = {
|
|
39
|
+
/**
|
|
40
|
+
* The underlying Surface
|
|
41
|
+
*/
|
|
42
|
+
surface: Surface;
|
|
43
|
+
adapter: AbstractLayoutAdapter<BrowserElement>;
|
|
44
|
+
/**
|
|
45
|
+
* The surface's current layout
|
|
46
|
+
*/
|
|
47
|
+
layout: AbstractLayout<any>;
|
|
48
|
+
/**
|
|
49
|
+
* A method you can use to set the absolute position of some element.
|
|
50
|
+
* @param el
|
|
51
|
+
* @param xy
|
|
52
|
+
*/
|
|
53
|
+
setAbsolutePosition: (el: BrowserElement, xy: PointXY) => void;
|
|
54
|
+
model: VisuallyJsModel;
|
|
55
|
+
bounds: Extents;
|
|
56
|
+
positions: Record<string, PointXY>;
|
|
57
|
+
/**
|
|
58
|
+
* A method you can use to place some element at a fixed position relative to
|
|
59
|
+
* the origin of the surface's viewport. The element will remain fixed in that position
|
|
60
|
+
* if the surface is zoomed or panned.
|
|
61
|
+
* @param el Element to place
|
|
62
|
+
* @param pos Position relative to the canvas origin to place the element.
|
|
63
|
+
* @param constraints
|
|
64
|
+
* @param id
|
|
65
|
+
*/
|
|
66
|
+
fixElement: (el: BrowserElement, pos: PointXY, constraints?: FixedElementConstraints, id?: string) => FixedElement;
|
|
67
|
+
floatElement: (el: BrowserElement, pos: PointXY) => void;
|
|
68
|
+
appendElement: (el: BrowserElement, pos: PointXY, alignment?: AppendedElementAlignments) => void;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* options passed to the `reset` method on a Decorator.
|
|
72
|
+
* @group Components
|
|
73
|
+
* @category Decorators
|
|
74
|
+
*/
|
|
75
|
+
export type DecorateResetParams = {
|
|
76
|
+
/**
|
|
77
|
+
* Removes the given element from the canvas.
|
|
78
|
+
* @param el
|
|
79
|
+
*/
|
|
80
|
+
remove: (el: BrowserElement) => any;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Base interface for the methods a decorator needs to provide.
|
|
84
|
+
* @group Components
|
|
85
|
+
* @category Surface
|
|
86
|
+
*/
|
|
87
|
+
export interface IDecorator<T> {
|
|
88
|
+
/**
|
|
89
|
+
* This method is invoked when the model's graph is cleared. You may or may not want to do anything in response to that -
|
|
90
|
+
* one option is to call `clear()` on the decorator to remove its elements.
|
|
91
|
+
* @param params
|
|
92
|
+
*/
|
|
93
|
+
reset(params: DecorateResetParams): void;
|
|
94
|
+
decorate(params: DecorateParams): void;
|
|
95
|
+
id?: string;
|
|
96
|
+
/**
|
|
97
|
+
* When true, indicates that this Decorator updates its associated elements incrementally with each call. When false, the
|
|
98
|
+
* surface will clear everything associated with this decorator prior to invoking `decorate`. The default value for this is false,
|
|
99
|
+
* meaning the surface will clear everything prior to calling `decorate`.
|
|
100
|
+
*/
|
|
101
|
+
incremental?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Superclass for decorators. You should extend this class when you create a decorator.
|
|
105
|
+
* @group Components
|
|
106
|
+
* @category Surface
|
|
107
|
+
*/
|
|
108
|
+
export declare abstract class Decorator implements IDecorator<BrowserElement> {
|
|
109
|
+
protected adapter: Surface;
|
|
110
|
+
protected container: BrowserElement;
|
|
111
|
+
id: string;
|
|
112
|
+
protected constructor(params: Record<string, any>, adapter: Surface, container: BrowserElement, id: string);
|
|
113
|
+
abstract incremental: boolean;
|
|
114
|
+
abstract reset(params: DecorateResetParams): void;
|
|
115
|
+
abstract decorate(params: DecorateParams): void;
|
|
116
|
+
fixedElements: Set<FixedElement>;
|
|
117
|
+
floatedElements: Set<{
|
|
118
|
+
el: BrowserElement;
|
|
119
|
+
constraints: Record<string, any>;
|
|
120
|
+
pos: PointXY;
|
|
121
|
+
}>;
|
|
122
|
+
appendedElements: Set<{
|
|
123
|
+
el: BrowserElement;
|
|
124
|
+
constraints: Record<string, any>;
|
|
125
|
+
pos: PointXY;
|
|
126
|
+
}>;
|
|
127
|
+
getFixedElement(id: string): FixedElement;
|
|
128
|
+
getBounds(): BoundingBox;
|
|
129
|
+
/**
|
|
130
|
+
* Removes all elements added by this decorator.
|
|
131
|
+
*/
|
|
132
|
+
clear(): void;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Created internally when a decorator is passed in as an object to a render call. You do not need to create these manually.
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export declare class SyntheticDecorator extends Decorator {
|
|
139
|
+
private methods;
|
|
140
|
+
incremental: boolean;
|
|
141
|
+
constructor(methods: IDecorator<BrowserElement>, params: Record<string, any>, adapter: Surface, container: BrowserElement, id: string, incremental?: boolean);
|
|
142
|
+
decorate(params: DecorateParams): void;
|
|
143
|
+
reset(params: DecorateResetParams): void;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Decorator factory. Call `register` to add a new decorator type.
|
|
147
|
+
* @group Components
|
|
148
|
+
* @category Decorators
|
|
149
|
+
*/
|
|
150
|
+
export declare const Decorators: {
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
get: (name: string, params: Record<string, any>, adapter: Surface, container: Element, id: string) => Decorator;
|
|
155
|
+
/**
|
|
156
|
+
* Register a decorator type, which you can then reference by name.
|
|
157
|
+
* @param name
|
|
158
|
+
* @param dec
|
|
159
|
+
*
|
|
160
|
+
*/
|
|
161
|
+
register: (name: string, dec: Constructable<Decorator>) => void;
|
|
162
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { BrowserElement } from "../util";
|
|
2
|
+
import { EVENT_CANVAS_CLICK, EVENT_CANVAS_DBLCLICK, EVENT_EDGE_REDRAW, EVENT_PAN, EVENT_SURFACE_MODE_CHANGED, EVENT_ZOOM, UIObjectInfo, VertexCloneOptions, UISaveData } from "../../ui";
|
|
3
|
+
import { PointXY, Edge, Group, Node, Port, Vertex } from "../../core";
|
|
4
|
+
import { BrowserUIModel } from "../browser-ui";
|
|
5
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
6
|
+
/**
|
|
7
|
+
* Identifies the 'pan' mode in the surface. In this mode the canvas is panned via pointer drag or via wheel events
|
|
8
|
+
*/
|
|
9
|
+
export declare const SURFACE_MODE_PAN = "pan";
|
|
10
|
+
/**
|
|
11
|
+
* Identifies the 'select' mode in the surface. In this mode, panning is disabled and pointer drag s used to lasso items.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SURFACE_MODE_SELECT = "select";
|
|
14
|
+
/**
|
|
15
|
+
* Identifies the 'disabled' mode in the surface, in which no interaction may take place with the canvas.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SURFACE_MODE_DISABLED = "disabled";
|
|
18
|
+
/**
|
|
19
|
+
* Identifies the mode in which pointer drag will cause vertices to be drawn. This surface will only enter this mode if there is a vertex drawing plugin attached.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SURFACE_MODE_VERTEX_DRAWING = "vertexDrawing";
|
|
22
|
+
/**
|
|
23
|
+
* Possible surface modes.
|
|
24
|
+
* @group Components
|
|
25
|
+
* @category Surface
|
|
26
|
+
*/
|
|
27
|
+
export type SurfaceMode = typeof SURFACE_MODE_PAN | typeof SURFACE_MODE_DISABLED | typeof SURFACE_MODE_SELECT | typeof SURFACE_MODE_VERTEX_DRAWING;
|
|
28
|
+
/**
|
|
29
|
+
* The spec for one model event binding in a surface. Consists of the event name, a CSS selector identifying which elements to listen to, and a callback to invoke.
|
|
30
|
+
* @group Events
|
|
31
|
+
* @category Payloads
|
|
32
|
+
*/
|
|
33
|
+
export interface ModelEventSpec {
|
|
34
|
+
event: string;
|
|
35
|
+
selector: string;
|
|
36
|
+
callback: ModelEventCallback<Edge | Node | Group | Port | Vertex>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Callback payload for a model event.
|
|
40
|
+
* @group Events
|
|
41
|
+
* @typeParam T Maps the type of object the event pertains to - a Node, Group, Edge or Port.
|
|
42
|
+
* @typeParam E Maps the event class you expect as a return value. Providing this helps you to type things more strictly.
|
|
43
|
+
*/
|
|
44
|
+
export type ModelEventCallbackPayload<T = any, E extends Event = Event> = {
|
|
45
|
+
event: E;
|
|
46
|
+
eventTarget: BrowserElement;
|
|
47
|
+
objectInfo: UIObjectInfo<T, BrowserElement>;
|
|
48
|
+
model: BrowserUIModel;
|
|
49
|
+
ui: BrowserUI;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Callback for a model event.
|
|
53
|
+
* @group Events
|
|
54
|
+
* @typeParam T Maps the type of object the event pertains to - a Node, Group, Edge or Port.
|
|
55
|
+
* @typeParam E Maps the event class you expect as a return value. Providing this helps you to type things more strictly.
|
|
56
|
+
*/
|
|
57
|
+
export type ModelEventCallback<T = any, E extends Event = Event> = (p: ModelEventCallbackPayload<T, E>) => any;
|
|
58
|
+
/**
|
|
59
|
+
* Events fired by the Surface only.
|
|
60
|
+
* @group Events
|
|
61
|
+
* @category Surface
|
|
62
|
+
*/
|
|
63
|
+
export type SurfaceEvents = typeof EVENT_PAN | typeof EVENT_ZOOM | typeof EVENT_SURFACE_MODE_CHANGED | typeof EVENT_CANVAS_CLICK | typeof EVENT_CANVAS_DBLCLICK | typeof EVENT_EDGE_REDRAW;
|
|
64
|
+
/**
|
|
65
|
+
* Options for a clone operation in a Surface
|
|
66
|
+
* @group Components
|
|
67
|
+
* @category Surface
|
|
68
|
+
*/
|
|
69
|
+
export interface SurfaceVertexCloneOptions extends VertexCloneOptions {
|
|
70
|
+
/**
|
|
71
|
+
* Defaults to false. If true, briefly flash the new vertex after the clone.
|
|
72
|
+
*/
|
|
73
|
+
flash?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Definition of the payload returned from the Surface's exportData method.
|
|
77
|
+
* @group Components
|
|
78
|
+
* @category Input and Output
|
|
79
|
+
*/
|
|
80
|
+
export interface SurfaceSaveData extends UISaveData {
|
|
81
|
+
pan: PointXY;
|
|
82
|
+
transformOrigin: PointXY;
|
|
83
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ShapeSet } from "../../shape-library";
|
|
2
|
+
/**
|
|
3
|
+
* CSS class set on all nodes in a diagram.
|
|
4
|
+
* @group Diagrams
|
|
5
|
+
* @category CSS Classes
|
|
6
|
+
* @cssClass
|
|
7
|
+
* @context Diagram
|
|
8
|
+
*/
|
|
9
|
+
export declare const CLASS_DIAGRAM_NODE = "vjs-diagram-node";
|
|
10
|
+
/**
|
|
11
|
+
* CSS class set on all groups in a diagram.
|
|
12
|
+
* @group Diagrams
|
|
13
|
+
* @category CSS Classes
|
|
14
|
+
* @cssClass
|
|
15
|
+
* @context Diagram
|
|
16
|
+
*/
|
|
17
|
+
export declare const CLASS_DIAGRAM_GROUP = "vjs-diagram-group";
|
|
18
|
+
/**
|
|
19
|
+
* The default width of a cell in a diagram
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_DIAGRAM_CELL_WIDTH = 100;
|
|
23
|
+
/**
|
|
24
|
+
* The default height of a cell in a diagram
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_DIAGRAM_CELL_HEIGHT = 80;
|
|
28
|
+
export declare const DEFAULT_SHAPE_SETS: Array<ShapeSet>;
|