@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,113 @@
|
|
|
1
|
+
import { Connection } from "./connection-impl";
|
|
2
|
+
import { OverlaySpec, Connector, ConnectorSpec } from "../../common";
|
|
3
|
+
import { Overlay } from "../overlay/overlay";
|
|
4
|
+
import { LabelOverlay } from "../overlay/label-overlay";
|
|
5
|
+
import { CompiledTypeDescriptor } from "../type-descriptors";
|
|
6
|
+
import { PointXY } from "../../../core";
|
|
7
|
+
export declare const _internalSourceMarkerOverlayId = "___sourceMarker";
|
|
8
|
+
export declare const _internalTargetMarkerOverlayId = "___targetMarker";
|
|
9
|
+
export declare const _internalLabelOverlayId = "__label";
|
|
10
|
+
export declare const _internalLabelOverlayClass = "vjs-default-label";
|
|
11
|
+
export declare const TYPE_ITEM_OVERLAY = "overlay";
|
|
12
|
+
export declare const LOCATION_ATTRIBUTE = "labelLocation";
|
|
13
|
+
/**
|
|
14
|
+
* Add an overlay to the connection. This method is not intended for use by users of the API. You must `revalidate` an associated element for this component if you call this method directly. Consider using the `addOverlay` method of `UICore` instead, which adds the overlay and then revalidates.
|
|
15
|
+
* @param overlay
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function $addOverlay<EL>(c: Connection<EL>, overlay: OverlaySpec): Overlay<EL>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the Overlay with the given ID. You can optionally provide a type parameter for this method in order to get
|
|
21
|
+
* a typed return value (such as `LabelOverlay`, `ArrowOverlay`, etc), since some overlays have methods that
|
|
22
|
+
* others do not.
|
|
23
|
+
* @param id ID of the overlay to retrieve.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function $getOverlay<T extends Overlay<EL>, EL>(c: Connection<EL>, id: string): T;
|
|
27
|
+
/**
|
|
28
|
+
* Gets all the overlays registered on this component.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function $getOverlays<EL>(c: Connection<EL>): Record<string, Overlay<EL>>;
|
|
32
|
+
/**
|
|
33
|
+
* Hide the overlay with the given id.
|
|
34
|
+
* @param id
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function $hideOverlay<EL>(c: Connection<EL>, id: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Hide all overlays, or a specific set of overlays.
|
|
40
|
+
* @param ids optional list of ids to hide.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare function _hideOverlays<EL>(c: Connection<EL>, ...ids: Array<string>): void;
|
|
44
|
+
/**
|
|
45
|
+
* Show a specific overlay (set it to be visible)
|
|
46
|
+
* @param id
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function _showOverlay<E>(c: Connection<E>, id: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Show all overlays, or a specific set of overlays.
|
|
52
|
+
* @param ids optional list of ids to show.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare function _showOverlays<E>(c: Connection<E>, ...ids: Array<string>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Remove all overlays from this component.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare function _removeAllOverlays<E>(c: Connection<E>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Remove the overlay with the given id.
|
|
63
|
+
* @param overlayId
|
|
64
|
+
* @param dontCleanup This is an internal parameter. You are not encouraged to provide a value for this.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare function _removeOverlay<E>(c: Connection<E>, overlayId: string, dontCleanup?: boolean): void;
|
|
68
|
+
/**
|
|
69
|
+
* Remove the given set of overlays, specified by their ids.
|
|
70
|
+
* @param overlays
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export declare function _removeOverlays<E>(c: Connection<E>, ...overlays: string[]): void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare function _getLabelOverlay<EL>(c: Connection<EL>): LabelOverlay<EL>;
|
|
78
|
+
/**
|
|
79
|
+
* Set this component's label.
|
|
80
|
+
* @param l Either some text, or a function which returns some text, or an existing label overlay.
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export declare function _setConnectionLabel<EL>(c: Connection<EL>, l: string | Function | LabelOverlay<EL>): void;
|
|
84
|
+
export declare const ACTION_ADD = "add";
|
|
85
|
+
export declare const ACTION_REMOVE = "remove";
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export declare const TYPE_ITEM_ANCHORS = "anchors";
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare const TYPE_ITEM_CONNECTOR = "connector";
|
|
94
|
+
export declare function applyConnectionType<EL>(conn: Connection<EL>, t: CompiledTypeDescriptor, typeMap: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* Adds a class to a connection
|
|
97
|
+
* @param conn
|
|
98
|
+
* @param c
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export declare function addConnectionClass<E>(conn: Connection<E>, c: string): void;
|
|
102
|
+
export declare function removeConnectionClass<E>(conn: Connection<E>, c: string): void;
|
|
103
|
+
export declare const Connections: {
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
getAbsoluteOverlayPosition<EL>(conn: Connection<EL>, overlay: Overlay<EL>): PointXY;
|
|
108
|
+
setPreparedConnector<EL>(conn: Connection<EL>, connector: Connector, doNotRepaint?: boolean, doNotChangeListenerComponent?: boolean, typeId?: string): void;
|
|
109
|
+
destroy(c: Connection<any>): void;
|
|
110
|
+
setVisible(c: Connection<any>, v: boolean): void;
|
|
111
|
+
_prepareConnector<E>(c: Connection<E>, connectorSpec: ConnectorSpec, typeId?: string): Connector;
|
|
112
|
+
_setConnector(conn: Connection<any>, connectorSpec: ConnectorSpec, doNotRepaint?: boolean, doNotChangeListenerComponent?: boolean, typeId?: string): void;
|
|
113
|
+
};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { ConnectorComputeParams, PaintGeometry } from "./abstract-connector";
|
|
2
|
+
import { Connection } from "./connection-impl";
|
|
3
|
+
import { Segment, Connector, ConnectorOptions } from "../../common";
|
|
4
|
+
import { BoundingBox, PointXY, Geometry } from "../../../core";
|
|
5
|
+
/**
|
|
6
|
+
* Definition of an object that can create instances of some connector type, and perform a few
|
|
7
|
+
* housekeeping tasks on connectors of that type.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface ConnectorHandler {
|
|
11
|
+
compute: (c: Connection<any>, geometry: PaintGeometry, params: ConnectorComputeParams) => Geometry;
|
|
12
|
+
update: (c: Connection<any>, geometry: PaintGeometry, params: ConnectorComputeParams, sourceMoved: boolean, targetMoved: boolean) => Geometry;
|
|
13
|
+
create: <T extends ConnectorOptions, E>(connection: Connection<E>, params: T) => Connector;
|
|
14
|
+
transformGeometry(g: Geometry, dx: number, dy: number): Geometry;
|
|
15
|
+
}
|
|
16
|
+
export declare const exportConnectorGeometry: (ac: Connector) => any;
|
|
17
|
+
export declare const Connectors: {
|
|
18
|
+
/**
|
|
19
|
+
* Prepare a connector using the given name and args.
|
|
20
|
+
* @internal
|
|
21
|
+
* @param connection
|
|
22
|
+
* @param name
|
|
23
|
+
* @param params
|
|
24
|
+
*/
|
|
25
|
+
get: <E>(connection: Connection<E>, name: string, params: any) => Connector;
|
|
26
|
+
register: (name: string, handler: ConnectorHandler) => void;
|
|
27
|
+
compute: (c: Connection<any>, geometry: PaintGeometry, params: ConnectorComputeParams) => Geometry;
|
|
28
|
+
update: (c: Connection<any>, geometry: PaintGeometry, params: ConnectorComputeParams, sourceMoved: boolean, targetMoved: boolean) => Geometry;
|
|
29
|
+
markEdited(connection: Connection<any>, g?: Geometry): void;
|
|
30
|
+
/**
|
|
31
|
+
* Import the given geometry, setting it on the connector, marking the connector persistToModel, and setting
|
|
32
|
+
* anchor locations to the values from the geometry, then locking them. This method does not write the
|
|
33
|
+
* geometry to the underlying edge, because it is called from contexts in which the edge geometry has been set,
|
|
34
|
+
* namely when rendering an edge that has geometry, and when the model posts a geometry updated event. This method is also
|
|
35
|
+
* called from the edge routing plugin, but there the edge is not updated, and I am unsure if it needs to be.
|
|
36
|
+
* @param connection
|
|
37
|
+
* @param g
|
|
38
|
+
*/
|
|
39
|
+
importGeometry(connection: Connection<any>, g: Geometry): void;
|
|
40
|
+
/**
|
|
41
|
+
* Sets anchor locations from the given geometry and locks the anchors. for internal use only.
|
|
42
|
+
* @param connection
|
|
43
|
+
* @param g
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
$_setAnchorsFromGeometry(connection: Connection<any>, g: Geometry): void;
|
|
47
|
+
transformGeometry(ac: Connector, g: Geometry, dx: number, dy: number): Geometry;
|
|
48
|
+
/**
|
|
49
|
+
* Writes geometry into a connector. If `internal` is false, also write the geometry to the edge and marks the
|
|
50
|
+
* connector as edited. This is called by the router's astar compute method (with internal true: only writes to
|
|
51
|
+
* the connector), and also the computeStraight/computeOrthogonal routines, for each of which the `internal` flag is
|
|
52
|
+
* computed based on the connector's state: if it is marked `persistToModel` and there is a valid geometry, internal is false.
|
|
53
|
+
* otherwise it is true. `internal` really means "dont persist to model". why do call sites have to make this decision and it
|
|
54
|
+
* cannot be made here?
|
|
55
|
+
* @param connection
|
|
56
|
+
* @param g
|
|
57
|
+
* @param internal
|
|
58
|
+
*/
|
|
59
|
+
setGeometry(connection: Connection<any>, g: Geometry, internal: boolean): void;
|
|
60
|
+
};
|
|
61
|
+
export declare function defaultExportGeometry(ac: Connector): Geometry;
|
|
62
|
+
/**
|
|
63
|
+
* By default we just set the given geometry as the connector's internal representation.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare function defaultImportGeometry(ac: Connector, g: Geometry): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @param ac
|
|
70
|
+
* @param segment
|
|
71
|
+
*/
|
|
72
|
+
export declare function _updateConnectorBounds(ac: Connector, segment: Segment): void;
|
|
73
|
+
export declare function _clearConnectorSegments(c: Connector): void;
|
|
74
|
+
export declare function _addConnectorSegment(c: Connector, type: string, params: any): void;
|
|
75
|
+
/**
|
|
76
|
+
* This abstraction exists to support using the various pointOnPath, pointAlongPath etc methods, without needing a Connector. The initial use case is to support ad-hoc drawing of edges, for such things as the edge type picker, but also this is really a step on the way to refactoring the paint code to make it less complex and more of a rubber-stamp operation.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export type ConnectorPath = {
|
|
80
|
+
internalSegments: Array<Segment>;
|
|
81
|
+
totalLength: number;
|
|
82
|
+
segmentProportions: Array<[number, number]>;
|
|
83
|
+
segmentProportionalLengths: Array<number>;
|
|
84
|
+
paintInfo: PaintGeometry;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* returns `[segment, proportion of travel in segment, segment index]` for the segment
|
|
88
|
+
* that contains the point which is 'location' distance along the entire path, where
|
|
89
|
+
* 'location' is a decimal between 0 and 1 inclusive. in this connector type, paths
|
|
90
|
+
* are made up of a list of segments, each of which contributes some fraction to
|
|
91
|
+
* the total length.
|
|
92
|
+
* This also supports the 'absolute' property, which lets us specify a location
|
|
93
|
+
* as the absolute distance in pixels, rather than a proportion of the total path.
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
export declare function _findConnectorSegmentForLocation(c: ConnectorPath, location: number, absolute?: boolean): {
|
|
97
|
+
segment: Segment;
|
|
98
|
+
proportion: number;
|
|
99
|
+
index: number;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* @param c
|
|
104
|
+
* @param location
|
|
105
|
+
* @param absolute
|
|
106
|
+
*/
|
|
107
|
+
export declare function _connectorPointOnPath(c: ConnectorPath, location: number, absolute?: boolean): PointXY;
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
* @param c
|
|
111
|
+
* @param location
|
|
112
|
+
* @param absolute
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
export declare function _connectorGradientAtPoint(c: ConnectorPath, location: number, absolute?: boolean): number;
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @param c
|
|
119
|
+
* @param location
|
|
120
|
+
* @param distance
|
|
121
|
+
* @param absolute
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
export declare function _connectorPointAlongPathFrom(c: ConnectorPath, location: number, distance: number, absolute?: boolean): PointXY;
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @param c
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
export declare function _updateConnectorSegmentProportions(c: ConnectorPath): void;
|
|
131
|
+
export declare function _prepareCompute(c: Connector, params: ConnectorComputeParams): PaintGeometry;
|
|
132
|
+
export declare function _computeConnector(connection: Connection<any>, params: ConnectorComputeParams): void;
|
|
133
|
+
/**
|
|
134
|
+
* Clears the connection's geometry and marks it not persistToModel, meaning subsequent
|
|
135
|
+
* path computes for this connector will use the standard compute routine. Also clears out
|
|
136
|
+
* fixed location for connection anchors where the anchor has one or more default locations.
|
|
137
|
+
* @param c
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
export declare function _resetConnectorGeometry(c: Connection<any>): void;
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
* @param c
|
|
144
|
+
*/
|
|
145
|
+
export declare function _resetConnectorBounds(c: Connector): void;
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
type SegmentForPoint = {
|
|
150
|
+
d: number;
|
|
151
|
+
s: Segment;
|
|
152
|
+
x: number;
|
|
153
|
+
y: number;
|
|
154
|
+
l: number;
|
|
155
|
+
x1: number;
|
|
156
|
+
y1: number;
|
|
157
|
+
x2: number;
|
|
158
|
+
y2: number;
|
|
159
|
+
index: number;
|
|
160
|
+
connectorLocation: number;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Function: findSegmentForPoint
|
|
164
|
+
* Returns the segment that is closest to the given [x,y],
|
|
165
|
+
* null if nothing found. This function returns a JS
|
|
166
|
+
* object with:
|
|
167
|
+
*
|
|
168
|
+
* d - distance from segment
|
|
169
|
+
* l - proportional location in segment
|
|
170
|
+
* x - x point on the segment
|
|
171
|
+
* y - y point on the segment
|
|
172
|
+
* s - the segment itself.
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
export declare function _findConnectorSegmentForPoint(c: Connector, x: number, y: number): SegmentForPoint;
|
|
176
|
+
/**
|
|
177
|
+
* @internal
|
|
178
|
+
* @param x1
|
|
179
|
+
* @param y1
|
|
180
|
+
* @param x2
|
|
181
|
+
* @param y2
|
|
182
|
+
*/
|
|
183
|
+
export declare function _connectorLineIntersection(c: Connector, x1: number, y1: number, x2: number, y2: number): Array<PointXY>;
|
|
184
|
+
/**
|
|
185
|
+
* @internal
|
|
186
|
+
* @param x
|
|
187
|
+
* @param y
|
|
188
|
+
* @param w
|
|
189
|
+
* @param h
|
|
190
|
+
*/
|
|
191
|
+
export declare function _connectorBoxIntersection(c: Connector, x: number, y: number, w: number, h: number): Array<PointXY>;
|
|
192
|
+
/**
|
|
193
|
+
* @internal
|
|
194
|
+
* @param box
|
|
195
|
+
*/
|
|
196
|
+
export declare function _connectorBoundingBoxIntersection(c: Connector, box: BoundingBox): Array<PointXY>;
|
|
197
|
+
export declare function isConnector(c: {
|
|
198
|
+
typeDescriptor: string;
|
|
199
|
+
}): c is Connector;
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* @param connector
|
|
203
|
+
*/
|
|
204
|
+
export declare function $getConnectorPathData(connector: Connector): any;
|
|
205
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PointNearPath, Segment, SegmentHandler, SegmentParams } from "../../common";
|
|
2
|
+
import { BoundingBox, PointXY } from "../../../core/util";
|
|
3
|
+
export declare function _registerSegmentHandler<S extends Segment, SP extends SegmentParams>(type: string, handler: SegmentHandler<S, SP>): void;
|
|
4
|
+
export declare const Segments: {
|
|
5
|
+
lineIntersection(segment: Segment, x1: number, y1: number, x2: number, y2: number): Array<PointXY>;
|
|
6
|
+
boxIntersection(segment: Segment, x: number, y: number, w: number, h: number): Array<PointXY>;
|
|
7
|
+
boundingBoxIntersection(segment: Segment, box: BoundingBox): Array<PointXY>;
|
|
8
|
+
pointOnPath(segment: Segment, location: number, absolute?: boolean): PointXY;
|
|
9
|
+
gradientAtPoint(segment: Segment, location: number, absolute?: boolean): number;
|
|
10
|
+
pointAlongPathFrom(segment: Segment, location: number, distance: number, absolute?: boolean): PointXY;
|
|
11
|
+
findClosestPointOnPath(segment: Segment, x: number, y: number): PointNearPath;
|
|
12
|
+
getPath(segment: Segment, isFirstSegment: boolean): string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @param segment
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export declare function _getSegmentLength(segment: Segment): number;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare function _createSegment(type: string, params: SegmentParams): Segment;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import { Segment, SegmentHandler, SegmentParams } from "../../common";
|
|
5
|
+
export type StraightSegmentCoordinates = {
|
|
6
|
+
x1: number;
|
|
7
|
+
y1: number;
|
|
8
|
+
x2: number;
|
|
9
|
+
y2: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface StraightSegmentParams extends SegmentParams {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Constant identifying a Straight segment.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const SEGMENT_TYPE_STRAIGHT = "Straight";
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export interface StraightSegment extends Segment {
|
|
25
|
+
length: number;
|
|
26
|
+
m: number;
|
|
27
|
+
m2: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare const StraightSegmentHandler: SegmentHandler<StraightSegment, StraightSegmentParams>;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const PX = "px";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const NOMINAL_SIZE = "50px";
|
|
6
|
+
export declare const BLOCK = "block";
|
|
7
|
+
export declare const NONE = "none";
|
|
8
|
+
export declare const SOURCE_INDEX = 0;
|
|
9
|
+
export declare const TARGET_INDEX = 1;
|
|
10
|
+
export declare const ABSOLUTE = "absolute";
|
|
11
|
+
export declare const FIXED = "fixed";
|
|
12
|
+
export declare const STATIC = "static";
|
|
13
|
+
export declare const POSITION_RELATIVE = "relative";
|
|
14
|
+
export declare const ATTRIBUTE_GROUP = "data-vjs-group";
|
|
15
|
+
/**
|
|
16
|
+
* Written by the UI when the DOM element is being managed. Does not necessarily mean the DOM element represents part of the model.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare const ATTRIBUTE_MANAGED = "data-vjs-managed";
|
|
20
|
+
/**
|
|
21
|
+
* This attribute can be written onto DOM elements by node/group renderers to instruct VisuallyJs that the given vertex is not draggable.
|
|
22
|
+
* @group Nodes and Groups
|
|
23
|
+
* @category DOM Attributes
|
|
24
|
+
* @domAttribute
|
|
25
|
+
* @context element-dragging
|
|
26
|
+
*/
|
|
27
|
+
export declare const ATTRIBUTE_NOT_DRAGGABLE = "data-vjs-not-draggable";
|
|
28
|
+
/**
|
|
29
|
+
* Written by the Surface when `elementsDraggable` is provided as a constructor option. The value of this attribute will match what you provide for `elementsDraggable`, but it's really only of any use if you set it to `false`, as `true` is the default.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare const ATTRIBUTE_ELEMENTS_DRAGGABLE = "data-vjs-elements-draggable";
|
|
33
|
+
export declare const ATTRIBUTE_TABINDEX = "tabindex";
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const KEY_OVERLAYS = "overlays";
|
|
36
|
+
/**
|
|
37
|
+
* Written by VisuallyJs onto an element that represents some vertex (a node, group or port)
|
|
38
|
+
* @group Nodes and Groups
|
|
39
|
+
* @category DOM Attributes
|
|
40
|
+
* @domAttribute
|
|
41
|
+
* @context ui
|
|
42
|
+
*/
|
|
43
|
+
export declare const ATTRIBUTE_VJS_VERTEX = "data-vjs-vertex";
|
|
44
|
+
/**
|
|
45
|
+
* This attribute indicates that the given element is the specific DOM element to which connections for the given port should be attached. It is distinct from `data-vjs-port-id` in that this attribute is a "physical" presence of a port. Connections to/from the associated port are attached to this DOM element, and not to the element representing the vertex to which the port belongs.
|
|
46
|
+
* @group Nodes and Groups
|
|
47
|
+
* @category DOM Attributes
|
|
48
|
+
* @domAttribute
|
|
49
|
+
* @context edge-dragging
|
|
50
|
+
*/
|
|
51
|
+
export declare const ATTRIBUTE_VJS_PORT = "data-vjs-port";
|
|
52
|
+
/**
|
|
53
|
+
* This attribute indicates the ID of the logical port that the element represents. A logical port is one which exists in the data model, but connections to/from the port in the UI are shown as being attached to the vertex to which the port belongs. Don't confuse this with the `data-vjs-port` attribute. When you drag a connection to/from some DOM element with this attribute set, you are instructing VisuallyJs to associate the source/target of the new edge with a port with the specified ID, but that the edge should be connected visually to the DOM element representing the vertex.
|
|
54
|
+
* @group Nodes and Groups
|
|
55
|
+
* @category DOM Attributes
|
|
56
|
+
* @domAttribute
|
|
57
|
+
* @context edge-dragging
|
|
58
|
+
*/
|
|
59
|
+
export declare const ATTRIBUTE_VJS_PORT_ID = "data-vjs-port-id";
|
|
60
|
+
/**
|
|
61
|
+
* Optional attribute used to tell VisuallyJs the type of the port represented by the given element. Maps to a port type defined in your view.
|
|
62
|
+
* @group Nodes and Groups
|
|
63
|
+
* @category DOM Attributes
|
|
64
|
+
* @domAttribute
|
|
65
|
+
* @context edge-dragging
|
|
66
|
+
*/
|
|
67
|
+
export declare const ATTRIBUTE_VJS_PORT_TYPE = "data-vjs-port-type";
|
|
68
|
+
/**
|
|
69
|
+
* Optional attribute used to tell VisuallyJs what `type` to use from some element that has `data-vjs-source="true"` set.
|
|
70
|
+
* @group Nodes and Groups
|
|
71
|
+
* @category DOM Attributes
|
|
72
|
+
* @domAttribute
|
|
73
|
+
* @context edge-dragging
|
|
74
|
+
*/
|
|
75
|
+
export declare const ATTRIBUTE_VJS_EDGE_TYPE = "data-vjs-edge-type";
|
|
76
|
+
/**
|
|
77
|
+
* Indicates the given DOM element acts as a source for edges dragged with the mouse/touch events. Any element with this attribute set will automatically be excluded from instigating a drag of the vertex on which the element resides
|
|
78
|
+
* @group Nodes and Groups
|
|
79
|
+
* @category DOM Attributes
|
|
80
|
+
* @domAttribute
|
|
81
|
+
* @context edge-dragging
|
|
82
|
+
*/
|
|
83
|
+
export declare const ATTRIBUTE_VJS_SOURCE = "data-vjs-source";
|
|
84
|
+
/**
|
|
85
|
+
* Indicates the given DOM element acts as a target for edges dragged with the mouse/touch events. Elements with this attribute set are not excluded from instigating a drag of the vertex on which the element resides.
|
|
86
|
+
* @group Nodes and Groups
|
|
87
|
+
* @category DOM Attributes
|
|
88
|
+
* @domAttribute
|
|
89
|
+
* @context edge-dragging
|
|
90
|
+
*/
|
|
91
|
+
export declare const ATTRIBUTE_VJS_TARGET = "data-vjs-target";
|
|
92
|
+
/**
|
|
93
|
+
* Indicates the it should be possible to drag loopback connections from this element to itself.
|
|
94
|
+
* @group Nodes and Groups
|
|
95
|
+
* @category DOM Attributes
|
|
96
|
+
* @domAttribute
|
|
97
|
+
* @context edge-dragging
|
|
98
|
+
*/
|
|
99
|
+
export declare const ATTRIBUTE_VJS_ALLOW_LOOPBACK = "data-vjs-allow-loopback";
|
|
100
|
+
/**
|
|
101
|
+
* Indicates the ID of the logical port that the element represents when it is acting as an edge source. In some situations you might want to use the same element as a source and target, but have the data model use different logical ports.
|
|
102
|
+
* @group Nodes and Groups
|
|
103
|
+
* @category DOM Attributes
|
|
104
|
+
* @advanced
|
|
105
|
+
* @domAttribute
|
|
106
|
+
* @context edge-dragging
|
|
107
|
+
*/
|
|
108
|
+
export declare const ATTRIBUTE_VJS_SOURCE_PORT_ID = "data-vjs-source-port-id";
|
|
109
|
+
/**
|
|
110
|
+
* Indicates the ID of the logical port that the element represents when it is acting as an edge target.
|
|
111
|
+
* @group Nodes and Groups
|
|
112
|
+
* @category DOM Attributes
|
|
113
|
+
* @advanced
|
|
114
|
+
* @domAttribute
|
|
115
|
+
* @context edge-dragging
|
|
116
|
+
*/
|
|
117
|
+
export declare const ATTRIBUTE_VJS_TARGET_PORT_ID = "data-vjs-target-port-id";
|
|
118
|
+
/**
|
|
119
|
+
* Indicates the ID of the physical port that the element represents when it is acting as an edge source. In some situations you might want to use the same element as a source and target, but have the data model use different ports ids. See discussion for `data-vjs-port` to read about how this differs from `data-vjs-source-port-id`
|
|
120
|
+
* @group Nodes and Groups
|
|
121
|
+
* @category DOM Attributes
|
|
122
|
+
* @see {@link ATTRIBUTE_VJS_PORT}
|
|
123
|
+
* @advanced
|
|
124
|
+
* @domAttribute
|
|
125
|
+
* @context edge-dragging
|
|
126
|
+
*/
|
|
127
|
+
export declare const ATTRIBUTE_VJS_SOURCE_PORT = "data-vjs-source-port";
|
|
128
|
+
/**
|
|
129
|
+
* Indicates the ID of the physical port represented by this element when the element is acting as the target of some edge. See discussion at `data-vjs-port` to read about how this differs from `data-vjs-target-port-id`
|
|
130
|
+
* @group Nodes and Groups
|
|
131
|
+
* @category DOM Attributes
|
|
132
|
+
* @see {@link ATTRIBUTE_VJS_PORT}
|
|
133
|
+
* @domAttribute
|
|
134
|
+
* @context edge-dragging
|
|
135
|
+
*/
|
|
136
|
+
export declare const ATTRIBUTE_VJS_TARGET_PORT = "data-vjs-target-port";
|
|
137
|
+
/**
|
|
138
|
+
* Indicates the type of the port represented by this element when the element is acting as the source of some edge. Maps to a port type defined in your view. In some situations you might want to use the same element as a source and target, but have the data model use different ports types.
|
|
139
|
+
* @group Nodes and Groups
|
|
140
|
+
* @category DOM Attributes
|
|
141
|
+
* @advanced
|
|
142
|
+
* @domAttribute
|
|
143
|
+
* @context edge-dragging
|
|
144
|
+
*/
|
|
145
|
+
export declare const ATTRIBUTE_VJS_SOURCE_PORT_TYPE = "data-vjs-source-port-type";
|
|
146
|
+
/**
|
|
147
|
+
* Indicates the type of the port represented by this element when the element is acting as the target of some edge. Maps to a port type defined in your view.
|
|
148
|
+
* @group Nodes and Groups
|
|
149
|
+
* @category DOM Attributes
|
|
150
|
+
* @advanced
|
|
151
|
+
* @domAttribute
|
|
152
|
+
* @context edge-dragging
|
|
153
|
+
*/
|
|
154
|
+
export declare const ATTRIBUTE_VJS_TARGET_PORT_TYPE = "data-vjs-target-port-type";
|
|
155
|
+
/**
|
|
156
|
+
* Indicates the element acts as a magnet, when edge snapping is turned on.
|
|
157
|
+
* @group Nodes and Groups
|
|
158
|
+
* @category DOM Attributes
|
|
159
|
+
* @domAttribute
|
|
160
|
+
* @context edge-dragging
|
|
161
|
+
*/
|
|
162
|
+
export declare const ATTRIBUTE_VJS_MAGNET = "data-vjs-magnet";
|
|
163
|
+
/**
|
|
164
|
+
* Attribute written by VisuallyJs to store edge id on its visual representation.
|
|
165
|
+
* @group Edges
|
|
166
|
+
* @category DOM Attributes
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
export declare const ATTRIBUTE_VJS_EDGE = "data-vjs-edge";
|
|
170
|
+
/**
|
|
171
|
+
* Attribute written by VisuallyJs to store overlay id on its visual representation.
|
|
172
|
+
* @group Edges
|
|
173
|
+
* @category DOM Attributes
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
export declare const ATTRIBUTE_VJS_OVERLAY_ID = "data-vjs-overlay-id";
|
|
177
|
+
/**
|
|
178
|
+
* Constant representing the wildcard used in several places in the API.
|
|
179
|
+
* @group Constants
|
|
180
|
+
*/
|
|
181
|
+
export declare const WILDCARD = "*";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OptimisticEventGenerator } from "../../core";
|
|
2
|
+
export declare class VjsContext extends OptimisticEventGenerator {
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
$context: Record<string, any>;
|
|
7
|
+
constructor(initialContext: Record<string, any>);
|
|
8
|
+
/**
|
|
9
|
+
* Gets the named object from the context. May return null. If you want to ensure
|
|
10
|
+
* the context has a certain value, use {@link ensureContext} instead of this method.
|
|
11
|
+
* @param key
|
|
12
|
+
*/
|
|
13
|
+
getFromContext<T = any>(key: string): T;
|
|
14
|
+
/**
|
|
15
|
+
* Either get the named object from the context, or create it, set it, and then return it.
|
|
16
|
+
* @param name
|
|
17
|
+
* @param generator
|
|
18
|
+
*/
|
|
19
|
+
ensureContext<T>(name: string, generator: () => T): T;
|
|
20
|
+
/**
|
|
21
|
+
* Update the context with the given value for the given key.
|
|
22
|
+
* @param key
|
|
23
|
+
* @param value
|
|
24
|
+
*/
|
|
25
|
+
updateContext(key: string, value: any): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EVENT_DESTROY, EVENT_EDGE_GEOMETRY, EVENT_EDGE_REMOVED, EVENT_GROUP_MOVE, EVENT_GROUP_MOVE_END, EVENT_GROUP_MOVE_START, EVENT_GROUP_REMOVED, EVENT_NODE_MOVE, EVENT_NODE_MOVE_END, EVENT_NODE_MOVE_START, EVENT_NODE_REMOVED } from "../../core";
|
|
2
|
+
import { EVENT_GROUP_COLLAPSE, EVENT_GROUP_EXPAND, EVENT_INTERNAL_CONNECTION, EVENT_RENDER_END, EVENT_RENDER_START, EVENT_ZOOM, EVENT_AFTER_LAYOUT_REFRESH, //EVENT_CONNECTION_MOUSEOVER,
|
|
3
|
+
EVENT_GROUP_RELAYOUT, EVENT_GROUP_RENDERED, EVENT_INTERNAL_VERTEX_UPDATED, EVENT_NODE_RENDERED, EVENT_NODE_VISIBILITY, EVENT_PLUGIN_ADDED, EVENT_RELAYOUT, EVENT_PLUGIN_REMOVED, EVENT_ADHOC_LAYOUT } from "./event-constants";
|
|
4
|
+
/**
|
|
5
|
+
* An event that the UI core may fire - meaning subclasses too.
|
|
6
|
+
*/
|
|
7
|
+
export type CoreUIEvent = typeof EVENT_NODE_MOVE_END | typeof EVENT_NODE_MOVE | typeof EVENT_NODE_MOVE_START | typeof EVENT_RENDER_START | typeof EVENT_GROUP_REMOVED | typeof EVENT_GROUP_MOVE | typeof EVENT_GROUP_MOVE_END | typeof EVENT_GROUP_MOVE_START | typeof EVENT_RENDER_END | typeof EVENT_DESTROY | typeof EVENT_RELAYOUT | typeof EVENT_GROUP_COLLAPSE | typeof EVENT_AFTER_LAYOUT_REFRESH | typeof EVENT_GROUP_EXPAND | typeof EVENT_NODE_VISIBILITY | typeof EVENT_GROUP_RENDERED | typeof EVENT_NODE_REMOVED | typeof EVENT_INTERNAL_VERTEX_UPDATED | typeof EVENT_INTERNAL_CONNECTION | typeof EVENT_NODE_RENDERED | typeof EVENT_EDGE_REMOVED | typeof EVENT_ZOOM | typeof EVENT_GROUP_RELAYOUT | typeof EVENT_PLUGIN_ADDED | typeof EVENT_PLUGIN_REMOVED | typeof EVENT_EDGE_GEOMETRY | typeof EVENT_ADHOC_LAYOUT;
|