@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,50 @@
|
|
|
1
|
+
import { PointXY } from "../core";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function isTouchDevice(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function isMouseDevice(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Force VisuallyJs to act as if touch events are available.
|
|
12
|
+
* @internal
|
|
13
|
+
* @param value
|
|
14
|
+
*/
|
|
15
|
+
export declare function setForceTouchEvents(value: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* force VisuallyJs to act is if pointer events are available.
|
|
18
|
+
* @internal
|
|
19
|
+
* @param value
|
|
20
|
+
*/
|
|
21
|
+
export declare function setForceMouseEvents(value: boolean): void;
|
|
22
|
+
export declare function pageLocation(e: Event): PointXY;
|
|
23
|
+
export declare function getTouch(touches: TouchList, idx: number): Touch;
|
|
24
|
+
export declare function touches(e: any): TouchList;
|
|
25
|
+
export declare function touchCount(e: Event): number;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the page location for the given event, abstracting out differences between touch and mouse events.
|
|
28
|
+
* @param e
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function getPageLocation(e: any): PointXY;
|
|
32
|
+
export interface EventManagerOptions {
|
|
33
|
+
clickThreshold?: number;
|
|
34
|
+
dblClickThreshold?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare class EventManager {
|
|
37
|
+
clickThreshold: number;
|
|
38
|
+
dblClickThreshold: number;
|
|
39
|
+
private readonly tapHandler;
|
|
40
|
+
private readonly mouseEnterExitHandler;
|
|
41
|
+
constructor(params?: EventManagerOptions);
|
|
42
|
+
private _doBind;
|
|
43
|
+
on(el: any, event: string, children?: string | Function, fn?: Function, options?: {
|
|
44
|
+
passive?: boolean;
|
|
45
|
+
capture?: boolean;
|
|
46
|
+
once?: boolean;
|
|
47
|
+
}): this;
|
|
48
|
+
off(el: any, event: string, fn: any): this;
|
|
49
|
+
trigger(el: any, event: string, originalEvent: any, payload?: any, detail?: number): this;
|
|
50
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { PanZoom } from "./pan-zoom";
|
|
2
|
+
import { BrowserElement } from "./util";
|
|
3
|
+
import { PointXY, TOP, BOTTOM, LEFT, RIGHT } from "../core";
|
|
4
|
+
/**
|
|
5
|
+
* Definition of a fixed element.
|
|
6
|
+
* @group Components
|
|
7
|
+
* @category Surface
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type FixedElement = {
|
|
11
|
+
/**
|
|
12
|
+
* Element that is fixed
|
|
13
|
+
*/
|
|
14
|
+
el: BrowserElement;
|
|
15
|
+
/**
|
|
16
|
+
* Whether or not the element's left position is fixed
|
|
17
|
+
*/
|
|
18
|
+
left: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether or not the element's top position is fixed
|
|
21
|
+
*/
|
|
22
|
+
top: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Position of the fixed element
|
|
25
|
+
*/
|
|
26
|
+
pos: PointXY;
|
|
27
|
+
/**
|
|
28
|
+
* Alignment in the x axis
|
|
29
|
+
*/
|
|
30
|
+
alignX: FixedElementHorizontalAlignment;
|
|
31
|
+
/**
|
|
32
|
+
* Alignment in the Y axis
|
|
33
|
+
*/
|
|
34
|
+
alignY: FixedElementVerticalAlignment;
|
|
35
|
+
/**
|
|
36
|
+
* Position the element is currently at
|
|
37
|
+
*/
|
|
38
|
+
currentPosition: PointXY;
|
|
39
|
+
/**
|
|
40
|
+
* Ideal position for the element
|
|
41
|
+
*/
|
|
42
|
+
requestedPosition: PointXY;
|
|
43
|
+
/**
|
|
44
|
+
* Handle for the element.
|
|
45
|
+
*/
|
|
46
|
+
id?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Constraint for a fixed element
|
|
50
|
+
* @group Components
|
|
51
|
+
* @category Surface
|
|
52
|
+
*/
|
|
53
|
+
export type FixedElementConstraint = typeof LEFT | typeof TOP;
|
|
54
|
+
/**
|
|
55
|
+
* Possible constraints for a fixed element.
|
|
56
|
+
* @group Components
|
|
57
|
+
* @category Surface
|
|
58
|
+
*/
|
|
59
|
+
export type FixedElementConstraints = {
|
|
60
|
+
/**
|
|
61
|
+
* Whether or not the element's left position is fixed
|
|
62
|
+
*/
|
|
63
|
+
[LEFT]?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not the element's top position is fixed
|
|
66
|
+
*/
|
|
67
|
+
[TOP]?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Alignment in the x axis
|
|
70
|
+
*/
|
|
71
|
+
alignX?: FixedElementHorizontalAlignment;
|
|
72
|
+
/**
|
|
73
|
+
* Alignment in the y axis
|
|
74
|
+
*/
|
|
75
|
+
alignY?: FixedElementVerticalAlignment;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Horizontal alignments for a fixed element.
|
|
79
|
+
* @group Components
|
|
80
|
+
* @category Surface
|
|
81
|
+
*/
|
|
82
|
+
export type FixedElementHorizontalAlignment = typeof LEFT | typeof RIGHT;
|
|
83
|
+
/**
|
|
84
|
+
* Vertical alignments for a fixed element.
|
|
85
|
+
* @group Components
|
|
86
|
+
* @category Surface
|
|
87
|
+
*/
|
|
88
|
+
export type FixedElementVerticalAlignment = typeof TOP | typeof BOTTOM;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
export declare class FixedLayer {
|
|
93
|
+
panZoom: PanZoom;
|
|
94
|
+
private elementPositionSetter;
|
|
95
|
+
fixedElements: Record<string, FixedElement>;
|
|
96
|
+
constructor(panZoom: PanZoom, elementPositionSetter: (el: BrowserElement, p: PointXY) => void);
|
|
97
|
+
private _findRequestedPosition;
|
|
98
|
+
private _fixElements;
|
|
99
|
+
pan(): void;
|
|
100
|
+
append(el: BrowserElement, pos: PointXY, constraints: FixedElementConstraints, id: string, onTop: boolean): FixedElement;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* @param el
|
|
104
|
+
*/
|
|
105
|
+
remove(el: Element): void;
|
|
106
|
+
destroy(): void;
|
|
107
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Base, Group, Node } from "../core/model/graph";
|
|
2
|
+
import { UICore } from "../ui/core";
|
|
3
|
+
import { BaseDomUiLayoutAdapter } from "./base-dom-ui-layout-adapter";
|
|
4
|
+
/**
|
|
5
|
+
* Layout adapter that operates on a single group. `getElements` returns member of this group. `filter` filters out
|
|
6
|
+
* vertices that are not children of this group.
|
|
7
|
+
*
|
|
8
|
+
* TODO why exactly does `filter` have to exist here? If `getElements` only returns group members, what's the
|
|
9
|
+
* filter for?
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class GroupLayoutAdapter extends BaseDomUiLayoutAdapter {
|
|
14
|
+
protected group: Group;
|
|
15
|
+
protected ui: UICore<any, any>;
|
|
16
|
+
constructor(group: Group, ui: UICore<any, any>);
|
|
17
|
+
getElements(): Array<Node | Group>;
|
|
18
|
+
filter(obj: Base): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VisuallyJSDOMElement } from './element-facade';
|
|
2
|
+
import { Overlay, UICore, OverlayPaintParams, Connection } from "../ui";
|
|
3
|
+
import { PointXY, Size } from "../core";
|
|
4
|
+
import { BrowserElement } from "./util";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* @param o
|
|
8
|
+
*/
|
|
9
|
+
export declare function isHTMLLabelOverlay(o: Overlay<any>): o is HTMLElementOverlayHolder;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface HTMLElementOverlayHolder extends Overlay<BrowserElement> {
|
|
14
|
+
contentElement: VisuallyJSDOMElement;
|
|
15
|
+
cachedDimensions: Size;
|
|
16
|
+
}
|
|
17
|
+
export interface HTMLElementOverlayPaintParams extends OverlayPaintParams {
|
|
18
|
+
d: {
|
|
19
|
+
minx: number;
|
|
20
|
+
miny: number;
|
|
21
|
+
td: Size;
|
|
22
|
+
cxy: PointXY;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare class HTMLElementOverlay {
|
|
26
|
+
instance: UICore<BrowserElement>;
|
|
27
|
+
overlay: Overlay<BrowserElement>;
|
|
28
|
+
protected htmlElementOverlay: HTMLElementOverlayHolder;
|
|
29
|
+
constructor(instance: UICore<BrowserElement>, overlay: Overlay<BrowserElement>);
|
|
30
|
+
static getElement(instance: UICore<BrowserElement>, o: HTMLElementOverlayHolder, component?: Connection<BrowserElement>, elementCreator?: (c: Connection<BrowserElement>) => Element): Element;
|
|
31
|
+
static destroy(o: HTMLElementOverlayHolder): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { RectangleXY } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* A link icon
|
|
4
|
+
* @icon
|
|
5
|
+
*/
|
|
6
|
+
export declare const ICON_LINK = "link";
|
|
7
|
+
/**
|
|
8
|
+
* Icon for the clone tool
|
|
9
|
+
* @icon
|
|
10
|
+
*/
|
|
11
|
+
export declare const ICON_CLONE = "clone";
|
|
12
|
+
/**
|
|
13
|
+
* Icon for the trash tool
|
|
14
|
+
* @icon
|
|
15
|
+
*/
|
|
16
|
+
export declare const ICON_TRASH = "trash";
|
|
17
|
+
/**
|
|
18
|
+
* An 'x' icon
|
|
19
|
+
* @icon
|
|
20
|
+
*/
|
|
21
|
+
export declare const ICON_CROSS = "cross";
|
|
22
|
+
/**
|
|
23
|
+
* A plus sign icon
|
|
24
|
+
* @icon
|
|
25
|
+
*/
|
|
26
|
+
export declare const ICON_PLUS = "plus";
|
|
27
|
+
/**
|
|
28
|
+
* A circle icon
|
|
29
|
+
* @icon
|
|
30
|
+
*/
|
|
31
|
+
export declare const ICON_CIRCLE = "circle";
|
|
32
|
+
/**
|
|
33
|
+
* a 12 point gear icon
|
|
34
|
+
* @icon
|
|
35
|
+
*/
|
|
36
|
+
export declare const ICON_GEAR = "gear";
|
|
37
|
+
/**
|
|
38
|
+
* Definition of an icon that can be rendered into an SVG element.
|
|
39
|
+
*/
|
|
40
|
+
export interface IconDefinition {
|
|
41
|
+
id: string;
|
|
42
|
+
viewBox: RectangleXY;
|
|
43
|
+
label?: string;
|
|
44
|
+
atts?: Record<string, any>;
|
|
45
|
+
shapes: Array<{
|
|
46
|
+
tag: string;
|
|
47
|
+
atts?: Record<string, any>;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Map of default icons that ship with VisuallyJs
|
|
52
|
+
*/
|
|
53
|
+
export declare const defaultIcons: Record<string, IconDefinition>;
|
|
54
|
+
/**
|
|
55
|
+
* Clone a default icon definition and give it a new ID.
|
|
56
|
+
* @param iconOrId
|
|
57
|
+
* @param newId
|
|
58
|
+
*/
|
|
59
|
+
export declare function cloneIcon(iconOrId: string | IconDefinition, newId: string): IconDefinition;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IconDefinition } from "./definitions";
|
|
2
|
+
import { BrowserElement } from "../util";
|
|
3
|
+
/**
|
|
4
|
+
* Render the given icon.
|
|
5
|
+
* @internal
|
|
6
|
+
* @param icon Definition of the icon to render
|
|
7
|
+
* @param width Width to use for the SVG
|
|
8
|
+
* @param height Height to use for the SVG
|
|
9
|
+
* @param classes Optional list of CSS classes to set on the SVG
|
|
10
|
+
* @param atts Optional map of attributes to set on the SVG
|
|
11
|
+
* @param parent Optional parent element to append the SVG to
|
|
12
|
+
* @param shapeAtts Optional extra attributes to merge with the shape's declared attributes at render time.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderIcon(icon: IconDefinition, width: number, height: number, classes?: Array<string>, atts?: Record<string, any>, parent?: BrowserElement, shapeAtts?: Record<string, any>): any;
|
|
15
|
+
/**
|
|
16
|
+
* Render the icon with the given name from the default set of icons shipped with VisuallyJs.
|
|
17
|
+
* @param id ID of the icon to render
|
|
18
|
+
* @param width Width to use for the SVG
|
|
19
|
+
* @param height Height to use for the SVG
|
|
20
|
+
* @param classes Optional list of CSS classes to set on the SVG
|
|
21
|
+
* @param atts Optional map of attributes to set on the SVG
|
|
22
|
+
* @param parent Optional parent element to append the SVG to
|
|
23
|
+
* @param shapeAtts Optional extra attributes to merge with the shape's declared attributes at render time.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function renderNamedIcon(id: string, width: number, height: number, classes?: Array<string>, atts?: Record<string, any>, parent?: BrowserElement, shapeAtts?: Record<string, any>): any;
|
|
27
|
+
/**
|
|
28
|
+
* Provides a base class you can use to create a web component that can render an icon anywhere in your markup. An example of this is in our BPMN starter application, where we extend this component to create a component that can render BPMN icons in the object inspector.
|
|
29
|
+
*
|
|
30
|
+
* This class expects an `icon-id` attribute, which identifies the icon you wish to render. By default this class will look for the icon in the defaultIcons map. Subclasses can override the `findIcon` method to implement custom behaviour. When a subclass returns null, the defaultIcons are tested.
|
|
31
|
+
* @group Web Components
|
|
32
|
+
*/
|
|
33
|
+
export declare class IconElement extends HTMLElement {
|
|
34
|
+
static get observedAttributes(): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Finds an icon by ID. Subclasses will want to extend this. If a subclass returns null, the defaultIcons map is tested for the icon.
|
|
37
|
+
* @param id
|
|
38
|
+
*/
|
|
39
|
+
findIcon(id: string): IconDefinition | null;
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
attributeChangedCallback(): void;
|
|
42
|
+
render(): void;
|
|
43
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export { addWheelListener, removeWheelListener } from "./wheel-listener";
|
|
2
|
+
export * from './definitions';
|
|
3
|
+
export * from './paper-renderer';
|
|
4
|
+
export * from './surface-renderer';
|
|
5
|
+
export * from './base-dom-ui-layout-adapter';
|
|
6
|
+
export * from './browser-visuallyjs-instance';
|
|
7
|
+
export * from './browser-util';
|
|
8
|
+
export * from './canvas-layout-adapter';
|
|
9
|
+
export * from './collicat';
|
|
10
|
+
export * from './connector-editor';
|
|
11
|
+
export * from './constants';
|
|
12
|
+
export * from './css-constants';
|
|
13
|
+
export * from './edge-mappings';
|
|
14
|
+
export * from './shape-library';
|
|
15
|
+
export * from './plugins';
|
|
16
|
+
export * from './copy-paste';
|
|
17
|
+
export * from './storage';
|
|
18
|
+
export * from './icons';
|
|
19
|
+
export * from './svg-export';
|
|
20
|
+
export * from './edge-handler-base';
|
|
21
|
+
export * from './edge-input-handler';
|
|
22
|
+
export * from './edge-relocate-handler';
|
|
23
|
+
export * from './element-drag-handler-2';
|
|
24
|
+
export * from './element-dragger';
|
|
25
|
+
export * from './element-facade';
|
|
26
|
+
export { EventManager, pageLocation, touches, touchCount, getTouch, getPageLocation, setForceTouchEvents, setForceMouseEvents, isTouchDevice, isMouseDevice } from './event-manager';
|
|
27
|
+
export * from './fixed-layer';
|
|
28
|
+
export * from './group-layout-adapter';
|
|
29
|
+
export * from './html-element-overlay';
|
|
30
|
+
export * from "./pan-zoom";
|
|
31
|
+
export * from "./pan-zoom-options";
|
|
32
|
+
export * from "./pinch-listener";
|
|
33
|
+
export * from "./positioning-and-sizing-utils";
|
|
34
|
+
export * from './svg-component';
|
|
35
|
+
export * from './svg-element-connector';
|
|
36
|
+
export * from './svg-element-overlay';
|
|
37
|
+
export * from './svg-util';
|
|
38
|
+
export * from './util';
|
|
39
|
+
export * from "./wheel-listener";
|
|
40
|
+
export * from './components';
|
|
41
|
+
export * from './templating';
|
|
42
|
+
export * from './dialogs';
|
|
43
|
+
export * from './browser-ui';
|
|
44
|
+
export * from './connector-editors';
|
|
45
|
+
export * from './connector-editors-bezier';
|
|
46
|
+
export * from './connector-editors-orthogonal';
|
|
47
|
+
export * from './connector-editors-straight';
|
|
48
|
+
export declare function ready(f: Function): void;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { Viewport } from "../ui";
|
|
2
|
+
import { PointXY, Size, ZoomRange } from "../core";
|
|
3
|
+
import { BrowserElement } from "./util";
|
|
4
|
+
import { Background } from "./definitions";
|
|
5
|
+
/**
|
|
6
|
+
* Axes in which the canvas can be panned - x, y, or both. Used with the {@link WheelOptions} interface.
|
|
7
|
+
*/
|
|
8
|
+
export type PanAxis = "both" | "x" | "y";
|
|
9
|
+
/**
|
|
10
|
+
* Options to control how a user manages zoom on the canvas.
|
|
11
|
+
*/
|
|
12
|
+
export interface ZoomOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Whether or not zoom is enabled. Defaults to true.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* When true - which is the default - the wheel will be used for zoom.
|
|
18
|
+
*/
|
|
19
|
+
wheel?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Zoom range to support. The default is [0.05, 3]
|
|
22
|
+
*/
|
|
23
|
+
range?: ZoomRange;
|
|
24
|
+
/**
|
|
25
|
+
* Initial zoom value. Defaults to 1.
|
|
26
|
+
*/
|
|
27
|
+
initialValue?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Optional fixed transform origin for the canvas. Defaults to null.When this is supplied the zoom function does not change the transform origin You can still zoom and pan but the zoom/pan is applied relative to the top/left corner of the content.
|
|
30
|
+
*/
|
|
31
|
+
fixedTransformOrigin?: PointXY;
|
|
32
|
+
/**
|
|
33
|
+
* When zooming by step, this defines the change in zoom for each step. Defaults to 0.25.
|
|
34
|
+
*/
|
|
35
|
+
step?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Options to control how a user pans the canvas.
|
|
39
|
+
*/
|
|
40
|
+
export interface PanOptions {
|
|
41
|
+
/**
|
|
42
|
+
* Defaults to true, meaning panning is enabled.
|
|
43
|
+
*/
|
|
44
|
+
enabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Defaults to false, meaning panning works via canvas drag. If you set this to true, the mousewheel (or move events on a touchpad) will pan the canvas. This will also override any zoom wheel flag.
|
|
47
|
+
*/
|
|
48
|
+
wheel?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional axes in which to constrain pan - 'x', 'y' or 'both'. Defaults to 'both'.
|
|
51
|
+
*/
|
|
52
|
+
axis?: PanAxis;
|
|
53
|
+
/**
|
|
54
|
+
* Optional function which is called at the start of panning and can return false to reject pan starting.
|
|
55
|
+
*/
|
|
56
|
+
filter?: (el: Element) => boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Optional, defaults to false. When true, the user must hold down the meta key (ctrl on windows) in order to pan.
|
|
59
|
+
*/
|
|
60
|
+
useMetaKey?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Options for how to respond to wheel events.
|
|
64
|
+
*/
|
|
65
|
+
export interface WheelOptions {
|
|
66
|
+
/**
|
|
67
|
+
* Optional function to call to check if wheel zooming should be enabled for the current event target.
|
|
68
|
+
* @param e Mouse event for the wheel
|
|
69
|
+
*/
|
|
70
|
+
filter?: (e: MouseEvent) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* If true, the "meta" key (CMD on Mac, Ctrl on windows/linux) must be pressed in order for wheel zoom to operate. This can be useful if your UI fills the screen in one or more axes and your users would not be able to scroll past the Surface widget.
|
|
73
|
+
*/
|
|
74
|
+
useMetaKey?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* How sensitive the wheel should be.
|
|
77
|
+
*/
|
|
78
|
+
sensitivity?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Defaults to false. If true, the zoom direction is reversed: wheel up zooms out, and wheel down zooms in.
|
|
81
|
+
*/
|
|
82
|
+
reverse?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Optional CSS 3 selector to check if the wheel should be enabled for the current event target.
|
|
85
|
+
*/
|
|
86
|
+
cssFilter?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export interface PanZoomWheelOptions extends WheelOptions {
|
|
92
|
+
/**
|
|
93
|
+
* Whether or not wheel zoom is enabled. Defaults to true. You cannot set this and also `pan`.
|
|
94
|
+
*/
|
|
95
|
+
zoom?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether or not to pan the display when the wheel is moved. Defaults to false. You cannot set this and also `zoom`.
|
|
98
|
+
*/
|
|
99
|
+
pan?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* For use with pan:true - defines the axes in which the widget will pan in response to the wheel
|
|
102
|
+
*/
|
|
103
|
+
axis?: PanAxis;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Options for the PanZoom widget. This widget is used internally by VisuallyJs and is not something users of the library will need to interact with.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export interface PanZoomOptions {
|
|
110
|
+
/**
|
|
111
|
+
* The element to apply pan/zoom to.
|
|
112
|
+
*/
|
|
113
|
+
canvasElement: BrowserElement;
|
|
114
|
+
/**
|
|
115
|
+
* The element that will act as the viewport for the canvas.
|
|
116
|
+
*/
|
|
117
|
+
viewportElement: BrowserElement;
|
|
118
|
+
/**
|
|
119
|
+
* A function that can return the x,y location of the given element, relative to the origin of the canvas the pan zoom
|
|
120
|
+
* is controlling.
|
|
121
|
+
* @param el
|
|
122
|
+
*/
|
|
123
|
+
getOffset: (el: BrowserElement) => PointXY;
|
|
124
|
+
/**
|
|
125
|
+
* A function that can return the x,y location of the given element, relative to the document origin
|
|
126
|
+
* @param el
|
|
127
|
+
*/
|
|
128
|
+
getOffsetRelativeToRoot: (el: BrowserElement) => PointXY;
|
|
129
|
+
/**
|
|
130
|
+
* Gets the size of some element
|
|
131
|
+
*/
|
|
132
|
+
getSize: (el: BrowserElement) => Size;
|
|
133
|
+
/**
|
|
134
|
+
* Helper function to set the position of some element.
|
|
135
|
+
*/
|
|
136
|
+
elementPositionSetter: (el: BrowserElement, p: PointXY) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Initial zoom for the widget. Defaults to 1.
|
|
139
|
+
*/
|
|
140
|
+
zoom?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Zoom range for the widget. Defaults to [0.05, 3].
|
|
143
|
+
*/
|
|
144
|
+
zoomRange?: ZoomRange;
|
|
145
|
+
/**
|
|
146
|
+
* Delta for zoom when stepping in/out. Defaults to 0.25
|
|
147
|
+
*/
|
|
148
|
+
zoomStep?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Whether to clamp when panning such that there is always content visible. Defaults to true.
|
|
151
|
+
*/
|
|
152
|
+
clamp?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Whether to clamp when zooming such that there is always content visible. Defaults to true.
|
|
155
|
+
*/
|
|
156
|
+
clampZoom?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Whether or not to clamp to the background image. This flag means the widget will always ensure at least some
|
|
159
|
+
* of the background is visible. See `clampToBackgroundExtents` for a variant of this. Defaults to false.
|
|
160
|
+
*/
|
|
161
|
+
clampToBackground?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Clamps movement so that when zoomed out, the background image always fills the viewport. Defaults to false.
|
|
164
|
+
*/
|
|
165
|
+
clampToBackgroundExtents?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* How far, in pixels, to pan on pan nudge. Defaults to 50 pixels.
|
|
168
|
+
*/
|
|
169
|
+
panDistance?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Whether or not pan is enabled. Defaults to true.
|
|
172
|
+
*/
|
|
173
|
+
enablePan?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Optional function which is called at the start of panning and can return false
|
|
176
|
+
* to reject pan starting.
|
|
177
|
+
*/
|
|
178
|
+
panFilter?: (el: Element) => boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Defaults to false. When true, user must hold down meta key (ctrl on windows) to pan.
|
|
181
|
+
*/
|
|
182
|
+
panWithMetaKey?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Enable animations for panning. Defaults to true.
|
|
185
|
+
*/
|
|
186
|
+
enableAnimation?: boolean;
|
|
187
|
+
viewport: Viewport<BrowserElement>;
|
|
188
|
+
/**
|
|
189
|
+
* Function the widget can use to derive an ID for the given element.
|
|
190
|
+
* @param e
|
|
191
|
+
*/
|
|
192
|
+
idFunction: (e: Element) => string;
|
|
193
|
+
/**
|
|
194
|
+
* Options for the wheel.
|
|
195
|
+
*/
|
|
196
|
+
wheel: PanZoomWheelOptions;
|
|
197
|
+
/**
|
|
198
|
+
* Optional map of event handlers
|
|
199
|
+
*/
|
|
200
|
+
events?: {
|
|
201
|
+
/**
|
|
202
|
+
* Optional function callback for when zoom changes.
|
|
203
|
+
*/
|
|
204
|
+
zoom?: Function;
|
|
205
|
+
/**
|
|
206
|
+
* Optional function callback for when pan changes.
|
|
207
|
+
*/
|
|
208
|
+
pan?: Function;
|
|
209
|
+
/**
|
|
210
|
+
* Optional callback for when pan starts
|
|
211
|
+
*/
|
|
212
|
+
panStart?: Function;
|
|
213
|
+
/**
|
|
214
|
+
* Optional function callback for mouseup event.
|
|
215
|
+
*/
|
|
216
|
+
mouseup?: Function;
|
|
217
|
+
/**
|
|
218
|
+
* Optional function callback for mousedown event.
|
|
219
|
+
*/
|
|
220
|
+
mousedown?: Function;
|
|
221
|
+
/**
|
|
222
|
+
* Optional interceptor for zoom. Returning false prevents zoom from occurring.
|
|
223
|
+
*/
|
|
224
|
+
maybeZoom?: Function;
|
|
225
|
+
/**
|
|
226
|
+
* Optional function callback for mousemove event.
|
|
227
|
+
*/
|
|
228
|
+
mousemove?: Function;
|
|
229
|
+
/**
|
|
230
|
+
* Optional function callback for transform origin change. This is given the [x,y] (in percent) of the new
|
|
231
|
+
* origin, and the [left, top] (in absolute values) of the canvas.
|
|
232
|
+
*/
|
|
233
|
+
transformOrigin?: Function;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Useful for development: set this to false if you don't want the widget to consume context menu clicks.
|
|
237
|
+
*/
|
|
238
|
+
consumeRightClick?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* NOT IMPLEMENTED. This is a placeholder for possible future functionality, which will mean that the lower zoom
|
|
241
|
+
* bound refers to a multiple of the content bounds, not the viewport.
|
|
242
|
+
*/
|
|
243
|
+
smartMinimumZoom?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Whether or not the widget is enabled, ie. responding to mouse input. Defaults to true.
|
|
246
|
+
*/
|
|
247
|
+
enabled?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Optional filter that will be called on down event, with the event target and the event. Returning true
|
|
250
|
+
* from this function means the widget should respond to the event.
|
|
251
|
+
*/
|
|
252
|
+
filter?: Function;
|
|
253
|
+
/**
|
|
254
|
+
* Optional background. Can also be set via setBackground(..)
|
|
255
|
+
*/
|
|
256
|
+
background?: Background;
|
|
257
|
+
/**
|
|
258
|
+
* Optional fixed transform origin. When this is supplied the zoom function does not change the transform origin, and neither
|
|
259
|
+
* does the pan. You can still zoom and pan but the zoom is applied relative to the top/left corner of the content.
|
|
260
|
+
*/
|
|
261
|
+
fixedTransformOrigin?: PointXY;
|
|
262
|
+
}
|