@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,31 @@
|
|
|
1
|
+
import { ChartSeries, ChartSeriesOptions } from "./series";
|
|
2
|
+
import { RealisedSeries } from "./definitions";
|
|
3
|
+
export interface SummingCollationSeriesOptions extends ChartSeriesOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the field containing the category/key to group by.
|
|
6
|
+
*/
|
|
7
|
+
categoryField: string;
|
|
8
|
+
/**
|
|
9
|
+
* Name of the field containing the numeric value to sum.
|
|
10
|
+
*/
|
|
11
|
+
sumField: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class SummingCollationSeries extends ChartSeries {
|
|
14
|
+
static type: string;
|
|
15
|
+
sums: Map<any, number>;
|
|
16
|
+
id: string;
|
|
17
|
+
color: string;
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* Name of the field containing the category/key to group by.
|
|
21
|
+
*/
|
|
22
|
+
categoryField: string;
|
|
23
|
+
/**
|
|
24
|
+
* Name of the field containing the numeric value to sum.
|
|
25
|
+
*/
|
|
26
|
+
sumField: string;
|
|
27
|
+
constructor(options: SummingCollationSeriesOptions);
|
|
28
|
+
addValue(data: any): void;
|
|
29
|
+
reset(): void;
|
|
30
|
+
expand(): Array<RealisedSeries>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChartSeries, ChartSeriesOptions } from "./series";
|
|
2
|
+
import { ObjectData } from "../../core";
|
|
3
|
+
import { RealisedSeries } from "./definitions";
|
|
4
|
+
export interface SummingSeriesOptions extends ChartSeriesOptions {
|
|
5
|
+
fields: Array<string>;
|
|
6
|
+
labels?: Array<string>;
|
|
7
|
+
colors?: Array<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare class SummingSeries extends ChartSeries {
|
|
10
|
+
static type: string;
|
|
11
|
+
fields: Array<string>;
|
|
12
|
+
sums: Map<string, number>;
|
|
13
|
+
labels: Array<string>;
|
|
14
|
+
colors: Map<string, string>;
|
|
15
|
+
constructor(options: SummingSeriesOptions);
|
|
16
|
+
addValue(data: ObjectData): void;
|
|
17
|
+
reset(): void;
|
|
18
|
+
expand(): Array<RealisedSeries>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BaseChart, BaseChartOptions, ChartModelFilter } from "./base-chart";
|
|
2
|
+
import { ChartDataSource } from "./datasource";
|
|
3
|
+
import { ChartSeries, ChartSeriesOptions } from "./series/series";
|
|
4
|
+
import { ChartSVGElement } from "./util";
|
|
5
|
+
import { DataSource, ObjectData } from "../core";
|
|
6
|
+
/**
|
|
7
|
+
* Base options for a series based chart
|
|
8
|
+
*/
|
|
9
|
+
export interface SeriesBasedChartOptions<T extends ChartSeriesOptions> extends BaseChartOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Definition of the chart series' to display. You can display multiple series on a chart.
|
|
12
|
+
*/
|
|
13
|
+
series: Array<T>;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the data will be grouped, if the chart type supports it (eg Bar/Column).
|
|
16
|
+
*/
|
|
17
|
+
grouped?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the field that identifies which group a data point belongs to. Defaults to `group`.
|
|
20
|
+
*/
|
|
21
|
+
groupField?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Base class for charts that display one or more data series.
|
|
25
|
+
* @group Charts
|
|
26
|
+
*/
|
|
27
|
+
export declare abstract class SeriesBasedChart<T extends ChartSeriesOptions> extends BaseChart {
|
|
28
|
+
dataSource: ChartDataSource;
|
|
29
|
+
$__series: Array<ChartSeries>;
|
|
30
|
+
$focusedSeries: number | null;
|
|
31
|
+
seriesElements: Array<ChartSVGElement>;
|
|
32
|
+
$model: DataSource;
|
|
33
|
+
$modelFilter: ChartModelFilter;
|
|
34
|
+
$grouped: boolean;
|
|
35
|
+
$groupField: string;
|
|
36
|
+
private _seriesDefinitions;
|
|
37
|
+
constructor(container: HTMLElement | SVGElement, options: SeriesBasedChartOptions<T>);
|
|
38
|
+
$init(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Loads chart data from a data object, URL, VisuallyJs model or Selection, in the latter two cases optionally with a filter.
|
|
41
|
+
* @param options
|
|
42
|
+
*/
|
|
43
|
+
load(options: {
|
|
44
|
+
data?: Array<ObjectData>;
|
|
45
|
+
url?: string;
|
|
46
|
+
dataSource?: DataSource;
|
|
47
|
+
dataSourceFilter?: ChartModelFilter;
|
|
48
|
+
}, onload?: (chart: BaseChart) => any): void;
|
|
49
|
+
setDataSourceFilter(f: ChartModelFilter | null): void;
|
|
50
|
+
/**
|
|
51
|
+
* Reload the chart, without changing any of the options.
|
|
52
|
+
*/
|
|
53
|
+
reload(): void;
|
|
54
|
+
$reset(): void;
|
|
55
|
+
$load(onload?: (chart: BaseChart) => any): void;
|
|
56
|
+
hasData(): boolean;
|
|
57
|
+
protected abstract $doReset(): void;
|
|
58
|
+
protected abstract $doLoad(): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { PointXY, ElementFacade, AbstractEntry, ObjectData } from "../core";
|
|
2
|
+
import { BrowserUiRecado, BrowserElement, FontSpec } from "../browser-ui";
|
|
3
|
+
import { RealisedSeries } from "./series/definitions";
|
|
4
|
+
import { DualValueChartSeries } from "./series";
|
|
5
|
+
/**
|
|
6
|
+
* Options for a tooltip
|
|
7
|
+
*/
|
|
8
|
+
export interface TooltipOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Optional string to append to values
|
|
11
|
+
*/
|
|
12
|
+
valueSuffix?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The text to display. You can use template syntax to access a few context specific variables - see the docs for a discussion.
|
|
15
|
+
*/
|
|
16
|
+
format: string;
|
|
17
|
+
/**
|
|
18
|
+
* Time to display the tooltip, in milliseconds, before hiding it. Defaults to 2500. Set this to -1 to have the Tooltip never hide automatically.
|
|
19
|
+
*/
|
|
20
|
+
timeout?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Optional font for the tooltip.
|
|
23
|
+
*/
|
|
24
|
+
font?: FontSpec;
|
|
25
|
+
/**
|
|
26
|
+
* Fill color. Defaults to white.
|
|
27
|
+
*/
|
|
28
|
+
fill?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Outline color. Defaults to "#999999"
|
|
31
|
+
*/
|
|
32
|
+
outline?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Outline width. Defaults to 1.
|
|
35
|
+
*/
|
|
36
|
+
outlineWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Corner radius for the tooltip. Defaults to 3px.
|
|
39
|
+
*/
|
|
40
|
+
cornerRadius?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Color for text. Defaults to system default.
|
|
43
|
+
*/
|
|
44
|
+
textColor?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Added to a chart tooltip's main element
|
|
48
|
+
* @group Charts
|
|
49
|
+
* @category CSS Classes
|
|
50
|
+
* @cssClass
|
|
51
|
+
* @context charts, tooltips
|
|
52
|
+
*/
|
|
53
|
+
export declare const CLASS_VJS_TOOLTIP = "vjs-tooltip";
|
|
54
|
+
/**
|
|
55
|
+
* Extension of the template renderer to handle tooltips. Only `b`, `strong`, `em` and `br` elements are supported.
|
|
56
|
+
*/
|
|
57
|
+
export declare class TooltipRenderer extends BrowserUiRecado {
|
|
58
|
+
$adt: Array<AbstractEntry>;
|
|
59
|
+
constructor(o: TooltipOptions);
|
|
60
|
+
parseAndValidate(str: string): void;
|
|
61
|
+
ce(tag: string): ElementFacade;
|
|
62
|
+
renderTooltip(d: ObjectData): import("../core/templates/executions").IRootExecution;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Definition of the `series` object passed to a Tooltip
|
|
66
|
+
*/
|
|
67
|
+
export type TooltipDataSeries = {
|
|
68
|
+
/**
|
|
69
|
+
* Color used to represent the series
|
|
70
|
+
*/
|
|
71
|
+
color: string;
|
|
72
|
+
/**
|
|
73
|
+
* Series minimum
|
|
74
|
+
*/
|
|
75
|
+
min: number;
|
|
76
|
+
/**
|
|
77
|
+
* Series maximum
|
|
78
|
+
*/
|
|
79
|
+
max: number;
|
|
80
|
+
/**
|
|
81
|
+
* Series total
|
|
82
|
+
*/
|
|
83
|
+
total: number;
|
|
84
|
+
/**
|
|
85
|
+
* Label for the series
|
|
86
|
+
*/
|
|
87
|
+
label: string;
|
|
88
|
+
/**
|
|
89
|
+
* The series ID.
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Definition of the `point` object passed to a Tooltip. Not every chart type provides every field - see the individual chart docs for discussions.
|
|
95
|
+
*/
|
|
96
|
+
export type TooltipDataPoint = {
|
|
97
|
+
/**
|
|
98
|
+
* Point value, as a string
|
|
99
|
+
*/
|
|
100
|
+
value?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Raw point value
|
|
103
|
+
*/
|
|
104
|
+
rawValue?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Min value, as a string. Only provided in charts displaying a range.
|
|
107
|
+
*/
|
|
108
|
+
minValue?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Raw min value. Only provided in charts displaying a range.
|
|
111
|
+
*/
|
|
112
|
+
rawMinValue?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Miax value, as a string. Only provided in charts displaying a range.
|
|
115
|
+
*/
|
|
116
|
+
maxValue?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Raw max value. Only provided in charts displaying a range.
|
|
119
|
+
*/
|
|
120
|
+
rawMaxValue?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Total for the current stack. Only provided when the chart is displaying a stacked series.
|
|
123
|
+
*/
|
|
124
|
+
stackTotal?: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* A tooltip created for use with Charts but can be used with apps and diagrams.
|
|
128
|
+
*/
|
|
129
|
+
export declare class Tooltip {
|
|
130
|
+
private parentElement;
|
|
131
|
+
root: SVGElement;
|
|
132
|
+
g: SVGElement;
|
|
133
|
+
bg: SVGRectElement;
|
|
134
|
+
text: SVGTextElement;
|
|
135
|
+
private $parser;
|
|
136
|
+
$paddingX: number;
|
|
137
|
+
$paddingY: number;
|
|
138
|
+
$valueSuffix: string;
|
|
139
|
+
_timeout: number;
|
|
140
|
+
_timeoutHandle: number;
|
|
141
|
+
constructor(parentElement: BrowserElement, options: TooltipOptions);
|
|
142
|
+
private _setTimeout;
|
|
143
|
+
private $renderTooltip;
|
|
144
|
+
protected formatValue(v: number | null): string;
|
|
145
|
+
/**
|
|
146
|
+
* Show the tooltip at the given position, which is a point relative to the origin of the Tooltip's container
|
|
147
|
+
* @param position
|
|
148
|
+
* @param tooltipAnchor
|
|
149
|
+
* @param payload
|
|
150
|
+
* @protected
|
|
151
|
+
*/
|
|
152
|
+
protected show(position: PointXY, tooltipAnchor: PointXY, payload: ObjectData): void;
|
|
153
|
+
protected showAtPageLocation(pageLocation: PointXY, tooltipAnchor: PointXY, payload: ObjectData): void;
|
|
154
|
+
hide(): void;
|
|
155
|
+
}
|
|
156
|
+
export declare class CategoryValueTooltip extends Tooltip {
|
|
157
|
+
showTooltip(position: PointXY, tooltipAnchor: PointXY, series: RealisedSeries, category: string, point: {
|
|
158
|
+
value?: number;
|
|
159
|
+
stackTotal?: number;
|
|
160
|
+
stackId?: string;
|
|
161
|
+
minValue?: number;
|
|
162
|
+
maxValue?: number;
|
|
163
|
+
}): void;
|
|
164
|
+
}
|
|
165
|
+
export declare class DualValueAxisTooltip extends Tooltip {
|
|
166
|
+
showTooltip(position: PointXY, tooltipAnchor: PointXY, series: DualValueChartSeries, point: ObjectData): void;
|
|
167
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { BrowserElement, FontSpec, FontStyle } from "../browser-ui";
|
|
2
|
+
import { BaseChart } from "./base-chart";
|
|
3
|
+
import { RectangleXY } from "../core";
|
|
4
|
+
import { AxisCommon, CategoryAxis, ValueAxis } from "./definitions";
|
|
5
|
+
/**
|
|
6
|
+
* internal candidate for a stepped scale.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
interface SteppedScaleCandidate {
|
|
10
|
+
minScale: number;
|
|
11
|
+
maxScale: number;
|
|
12
|
+
stepCount: number;
|
|
13
|
+
step: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Values defining a stepped scale - min, max, step size, step count, and an array of values for the steps.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export interface SteppedScale extends SteppedScaleCandidate {
|
|
20
|
+
steps: Array<number>;
|
|
21
|
+
range: number;
|
|
22
|
+
dataMin: number;
|
|
23
|
+
dataMax: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* For the given min and max, calculate the lowest step value required, and the highest step value required, and the number of steps in between these values. For instance if you entered -145, 45 as the min/max, with a candidate step of 10, then the stepMin calculated would be -150, the stepMax calculated would be 50, and there'd be 20 steps. This method is used in the auto step generator but can also be used then the user has mandated a step size.
|
|
27
|
+
* @param min
|
|
28
|
+
* @param max
|
|
29
|
+
* @param candidateStep
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function _calculateSteps(min: number, max: number, candidateStep: number): SteppedScaleCandidate;
|
|
33
|
+
/**
|
|
34
|
+
* For some given min/max, compute the ideal step size to use as a range. candidateStep is
|
|
35
|
+
* the first value to try; it might be ideal, in which case we use it. But if not, we try
|
|
36
|
+
* the step above (if we had too many steps) or the step below (if we had too few steps).
|
|
37
|
+
* @param min
|
|
38
|
+
* @param max
|
|
39
|
+
* @param candidateStep
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare function _findIdealSteps(min: number, max: number, candidateStep: number, idealStepCount: number): SteppedScale;
|
|
43
|
+
/**
|
|
44
|
+
* Calculates a reasonable scale for the dataset with the given min and max.
|
|
45
|
+
* @param min
|
|
46
|
+
* @param max
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function $autoCalculateChartScale(min: number, max: number, idealStepCount?: number): SteppedScale;
|
|
50
|
+
/**
|
|
51
|
+
* Calculates a scale with the exact number of steps between min and max (inclusive). It is the call site's responsibility to ensure that the numbers all relate in such a way that the labels are reasonable.
|
|
52
|
+
* @param min
|
|
53
|
+
* @param max
|
|
54
|
+
* @param stepCount
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
export declare function $calculateChartScaleWithSteps(min: number, max: number, stepCount: number): SteppedScale;
|
|
58
|
+
/**
|
|
59
|
+
* Calculates the power of 10 corresponding to the given number, eg 625 000 gives '3'
|
|
60
|
+
* @param n
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare function calculatePowerOf10(n: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* Prepare a font spec from the given defaults and candidate. Values are chosen from the candidate by preference, or by the default otherwise. the candidate does not need to exist; call sites can safely pass a null value in here.
|
|
66
|
+
* @param defaultSize
|
|
67
|
+
* @param defaultStyle
|
|
68
|
+
* @param candidate
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare function $prepareFontSpec(defaultSize: number, defaultStyle: FontStyle, defaultWeight: string | number, defaultFamily: string, candidate?: FontSpec): FontSpec;
|
|
72
|
+
/**
|
|
73
|
+
* Helper method to create SVG element for use in a chart.
|
|
74
|
+
* @internal
|
|
75
|
+
* @param tag
|
|
76
|
+
* @param atts
|
|
77
|
+
* @param clazz
|
|
78
|
+
* @param parent
|
|
79
|
+
*/
|
|
80
|
+
export declare function createChartElement(tag: string, atts: Record<string, any>, clazz?: string, parent?: BrowserElement): ChartSVGElement;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* @param text
|
|
84
|
+
* @param atts
|
|
85
|
+
* @param clazz
|
|
86
|
+
* @param parent
|
|
87
|
+
*/
|
|
88
|
+
export declare function createChartTextElement(text: string, atts: Record<string, any>, clazz?: string, parent?: BrowserElement): ChartSVGElement;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
* @param el
|
|
92
|
+
* @param x
|
|
93
|
+
*/
|
|
94
|
+
export declare function setTranslatedX(el: ChartSVGElement, x: number): void;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @param el
|
|
98
|
+
* @param y
|
|
99
|
+
*/
|
|
100
|
+
export declare function setTranslatedY(el: ChartSVGElement, y: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* @param el
|
|
104
|
+
* @param x
|
|
105
|
+
* @param y
|
|
106
|
+
*/
|
|
107
|
+
export declare function setTranslatedPosition(el: BrowserElement, x: number, y: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export interface ChartSVGElement extends SVGElement {
|
|
112
|
+
getBBox(): RectangleXY;
|
|
113
|
+
parentNode: ChartSVGElement;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
* @param a
|
|
118
|
+
*/
|
|
119
|
+
export declare function isValueAxis(a: AxisCommon): a is ValueAxis;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
* @param a
|
|
123
|
+
*/
|
|
124
|
+
export declare function isCategoryAxis(a: AxisCommon): a is CategoryAxis;
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
export declare function emptyBox(): RectangleXY;
|
|
129
|
+
export declare function formatValue(value: number, format?: 'int' | 'float' | number): string;
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
* @param labels
|
|
133
|
+
*/
|
|
134
|
+
export declare function $spaceLabels(labels: Array<ChartSVGElement>, maxAllowedSize: number, axisProperty: "height" | "width", otherAxisProperty: "height" | "width"): boolean;
|
|
135
|
+
export declare function createContrastLabel(text: string, x: number, y: number, color: string, font: FontSpec, parent?: ChartSVGElement): ChartSVGElement;
|
|
136
|
+
/**
|
|
137
|
+
* Returns an export of the chart's container.
|
|
138
|
+
* All CSS classes, data-vjs-*** attributes and pointer-events attributes are stripped from the output.
|
|
139
|
+
* Crosshair elements are also removed.
|
|
140
|
+
* @param chart The chart to export.
|
|
141
|
+
* @param width Optional width for the output SVG.
|
|
142
|
+
* @param height Optional height for the output SVG.
|
|
143
|
+
*/
|
|
144
|
+
export declare function exportSVG(chart: BaseChart, width?: number, height?: number): {
|
|
145
|
+
element: SVGElement;
|
|
146
|
+
extents: RectangleXY;
|
|
147
|
+
svg: string;
|
|
148
|
+
};
|
|
149
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AdjacentCellsFinder, AStarPath, AStarPathConstrainment, DistanceHeuristic } from "./definitions";
|
|
2
|
+
import { AStarGrid } from "./astar-util";
|
|
3
|
+
import { RectangleXY, LineXY, PointXY } from "../util";
|
|
4
|
+
import { HasId, HasWidthHeight, HasXY } from "../model/graph";
|
|
5
|
+
/**
|
|
6
|
+
* Runs the A* path finder.
|
|
7
|
+
*
|
|
8
|
+
* @param source
|
|
9
|
+
* @param target
|
|
10
|
+
* @param sourceId
|
|
11
|
+
* @param targetId
|
|
12
|
+
* @param sourceOrientation
|
|
13
|
+
* @param targetOrientation
|
|
14
|
+
* @param gridCellSize
|
|
15
|
+
* @param constrain Movement constraint when selecting candidate cells.
|
|
16
|
+
* @param distanceHeuristic The heuristic to use when estimating the distance between two cells in the grid.
|
|
17
|
+
* @param vertexBorder Number of cells to pad around each vertex to establish its 'border' - the vertex and the border
|
|
18
|
+
* region are considered as obstacles.
|
|
19
|
+
* @param vertexBuffer Number of cells to pad around each vertex's border to use as the buffer zone, through which paths
|
|
20
|
+
* may traverse. Although with taking out the line of sight finder this concept is probably redundant now.
|
|
21
|
+
* @param getObstacles
|
|
22
|
+
* @param getObstaclesRect
|
|
23
|
+
* @param getAdjacentCells
|
|
24
|
+
* @param hasLineOfSight
|
|
25
|
+
* @param grid
|
|
26
|
+
* @param pathId
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare function astar(source: PointXY, target: PointXY, sourceId: string, targetId: string, sourceOrientation: {
|
|
30
|
+
ox: 1 | 0 | -1;
|
|
31
|
+
oy: 1 | 0 | -1;
|
|
32
|
+
}, targetOrientation: {
|
|
33
|
+
ox: 1 | 0 | -1;
|
|
34
|
+
oy: 1 | 0 | -1;
|
|
35
|
+
}, gridCellSize: number, constrain: AStarPathConstrainment, distanceHeuristic: DistanceHeuristic, vertexBorder: number, vertexBuffer: number, getObstacles: (x: number, y: number, margin?: number) => Array<AStarObstacle>, getObstaclesRect: (rect: RectangleXY, margin?: number) => Array<AStarObstacle>, getAdjacentCells: AdjacentCellsFinder, hasLineOfSight: (grid: AStarGrid, l: LineXY) => boolean, grid?: AStarGrid, pathId?: string): AStarPath;
|
|
36
|
+
export interface AStarObstacle extends HasId, HasXY, HasWidthHeight {
|
|
37
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DirectionFromParent, ParentAxis, PathFinderGridCell } from "./definitions";
|
|
2
|
+
import { AStarObstacle } from "./astar-path-finder";
|
|
3
|
+
import { PointXY, RectangleXY } from "../util";
|
|
4
|
+
/**
|
|
5
|
+
* Grid for an A* path search. Access to grid cells is via the `getCell` method, which lazy loads cell entries. This implementation uses an object in the back end, whose keys are in the form `${x}_${y}`. The advantage of this is that no storage has to be allocated at the start, and the size of the content does not need to be known. It would be good to be able to reuse this grid...somehow.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class AStarGrid {
|
|
9
|
+
gridCellSize: number;
|
|
10
|
+
vertexBorder: number;
|
|
11
|
+
vertexBuffer: number;
|
|
12
|
+
private getCoincidentObstacles;
|
|
13
|
+
private _grid;
|
|
14
|
+
private _canvasOrigin;
|
|
15
|
+
private readonly _obstaclePadding;
|
|
16
|
+
constructor(source: PointXY, target: PointXY, gridCellSize: number, vertexBorder: number, vertexBuffer: number, getCoincidentObstacles: (canvasX: number, canvasY: number, padding: number) => Array<AStarObstacle>);
|
|
17
|
+
/**
|
|
18
|
+
* Map the given x,y in canvas coordinates to the coordinates of the grid cell the point lies in.
|
|
19
|
+
* @param x
|
|
20
|
+
* @param y
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
_mapCanvasLocationToGridCell(x: number, y: number): PointXY;
|
|
24
|
+
_mapCanvasRectangleToGridCells(r: RectangleXY): RectangleXY;
|
|
25
|
+
_mapGridCellToCanvas(gridX: number, gridY: number): RectangleXY;
|
|
26
|
+
sourceId: string;
|
|
27
|
+
targetId: string;
|
|
28
|
+
sourceObstacles: Array<string>;
|
|
29
|
+
targetObstacles: Array<string>;
|
|
30
|
+
sourceBuffers: Array<string>;
|
|
31
|
+
targetBuffers: Array<string>;
|
|
32
|
+
sourceAxis: ParentAxis;
|
|
33
|
+
sourceDirection: DirectionFromParent;
|
|
34
|
+
targetAxis: ParentAxis;
|
|
35
|
+
targetDirection: DirectionFromParent;
|
|
36
|
+
makeKey(x: number, y: number): string;
|
|
37
|
+
private _shouldIgnoreObstacle;
|
|
38
|
+
private _getCell;
|
|
39
|
+
setSourceCell(id: string, x: number, y: number, ax: number, ay: number, axis: ParentAxis, direction: DirectionFromParent): PathFinderGridCell;
|
|
40
|
+
setTargetCell(id: string, x: number, y: number, ax: number, ay: number, axis: ParentAxis, direction: DirectionFromParent): PathFinderGridCell;
|
|
41
|
+
get sourceAndTargetObstacles(): string[];
|
|
42
|
+
/**
|
|
43
|
+
* Gets a cell from the grid, lazy loading it if it does not exist.
|
|
44
|
+
* @param x Grid X
|
|
45
|
+
* @param y Grid Y
|
|
46
|
+
* @param ax Absolute X to set in the cell. Optional. Will be overwritten into a cell that was pulled from cache.
|
|
47
|
+
* @param ay Absolute Y to set in the cell. Optional. Will be overwritten into a cell that was pulled from cache.
|
|
48
|
+
*/
|
|
49
|
+
getCell(x: number, y: number, ax: number, ay: number): PathFinderGridCell;
|
|
50
|
+
/**
|
|
51
|
+
* reinit the grid, which means to reset f,g and h values (and parent refs/axis etc), but NOT to clear out any edges. also we want to leave `occupied` but for that to be reusable it should contain a list of vertex ids, not just a boolean: we have to take into account source/target obstacles when deciding whether a cell should be excluded.
|
|
52
|
+
*/
|
|
53
|
+
reinitialize(): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Infer what the given orientation in X and Y represents in terms of an axis. Used by the path finder internally
|
|
57
|
+
* for the start and end nodes.
|
|
58
|
+
* @param ox
|
|
59
|
+
* @param oy
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare function inferAxis(ox: number, oy: number): ParentAxis;
|
|
63
|
+
export declare function inferDirection(ox: number, oy: number, axis: ParentAxis | undefined): DirectionFromParent;
|
|
64
|
+
/**
|
|
65
|
+
* Infer an axis of travel and a direction from the given orientation. Used when
|
|
66
|
+
* starting a path find.
|
|
67
|
+
* @param o
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare function inferAxisAndDirectionFromOrientation(o: {
|
|
71
|
+
ox: 1 | 0 | -1;
|
|
72
|
+
oy: 1 | 0 | -1;
|
|
73
|
+
}): {
|
|
74
|
+
axis: ParentAxis;
|
|
75
|
+
direction: DirectionFromParent;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Infer an axis of travel (either vertical or horizontal) between source and target by
|
|
79
|
+
* examining their delta in each axis. Whichever axis has the greater delta is the one we choose.
|
|
80
|
+
* This method is a fallback for when we cannot infer an axis from the orientation of the
|
|
81
|
+
* source or target anchor point.
|
|
82
|
+
* @param source
|
|
83
|
+
* @param target
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export declare function inferAxisFromSourceAndTargetLocation(source: PointXY, target: PointXY): ParentAxis;
|
|
87
|
+
/**
|
|
88
|
+
* For some grid cell, determine the axis relationship with its parent. The start and end cells have `fixedAxis` set,
|
|
89
|
+
* which comes from the associated anchor's orientation. For other cells we compute the axis based upon the grid
|
|
90
|
+
* locations of this cell and its parent.
|
|
91
|
+
* @param cell
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
export declare function parentAxis(cell: PathFinderGridCell): ParentAxis;
|
|
95
|
+
/**
|
|
96
|
+
* For some grid cell, determine the direction of travel from its parent cell.
|
|
97
|
+
* @param cell
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export declare function parentDirection(cell: PathFinderGridCell): DirectionFromParent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AdjacentCellsFinder, PathCandidateCell, PathFinderGridCell } from "./definitions";
|
|
2
|
+
import { AStarGrid } from "./astar-util";
|
|
3
|
+
import { AStarObstacle } from "./astar-path-finder";
|
|
4
|
+
/**
|
|
5
|
+
* Find candidate next cells for A* path finder.
|
|
6
|
+
* @internal
|
|
7
|
+
* @param grid
|
|
8
|
+
* @param focus
|
|
9
|
+
* @param x
|
|
10
|
+
* @param y
|
|
11
|
+
* @param gridCellSize
|
|
12
|
+
* @param getObstacles
|
|
13
|
+
* @param getAdjacentCells
|
|
14
|
+
* @param targetCell
|
|
15
|
+
*/
|
|
16
|
+
export declare function findCandidates(grid: AStarGrid, focus: PathFinderGridCell, x: number, y: number, gridCellSize: number, getObstacles: (x: number, y: number, margin?: number) => Array<AStarObstacle>, getAdjacentCells: AdjacentCellsFinder, targetCell: PathFinderGridCell): Array<PathCandidateCell>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PathFinderGridCell } from "./definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Sorter for path candidates.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class CandidateSorter {
|
|
7
|
+
node: PathFinderGridCell;
|
|
8
|
+
constructor();
|
|
9
|
+
sort(n1: PathFinderGridCell, n2: PathFinderGridCell): 0 | 1 | -1;
|
|
10
|
+
}
|