@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,83 @@
|
|
|
1
|
+
import { BrowserUIDefaults, BrowserUIOptions } from "../definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Css class added to a Paper component's container element
|
|
4
|
+
* @cssClass
|
|
5
|
+
* @context paper
|
|
6
|
+
*/
|
|
7
|
+
export declare const CLASS_PAPER = "vjs-paper";
|
|
8
|
+
/**
|
|
9
|
+
* Css class added to the DOM element used to render a Paper object.
|
|
10
|
+
* @group Components
|
|
11
|
+
* @category Paper
|
|
12
|
+
* @cssClass
|
|
13
|
+
* @context paper
|
|
14
|
+
*/
|
|
15
|
+
export declare const CLASS_PAPER_CANVAS = "vjs-paper-canvas";
|
|
16
|
+
/**
|
|
17
|
+
* Default margin to leave around content in a Paper object.
|
|
18
|
+
* @group Components
|
|
19
|
+
* @category Paper
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_PAPER_MARGIN = 20;
|
|
22
|
+
/**
|
|
23
|
+
* Css class added to elements used to render nodes in a Paper object.
|
|
24
|
+
* @group Components
|
|
25
|
+
* @category Paper
|
|
26
|
+
* @cssClass
|
|
27
|
+
* @context paper
|
|
28
|
+
*/
|
|
29
|
+
export declare const CLASS_PAPER_NODE = "vjs-paper-node";
|
|
30
|
+
/**
|
|
31
|
+
* Constant used to specify that a paper should be left/top aligned.
|
|
32
|
+
* @group Components
|
|
33
|
+
* @category Paper
|
|
34
|
+
*/
|
|
35
|
+
export declare const PAPER_ALIGN_START = "start";
|
|
36
|
+
/**
|
|
37
|
+
* Constant used to specify that a paper should be center aligned.
|
|
38
|
+
* @group Components
|
|
39
|
+
* @category Paper
|
|
40
|
+
*/
|
|
41
|
+
export declare const PAPER_ALIGN_CENTER = "center";
|
|
42
|
+
/**
|
|
43
|
+
* Constant used to specify that a paper should be right/bottom aligned.
|
|
44
|
+
* @group Components
|
|
45
|
+
* @category Paper
|
|
46
|
+
*/
|
|
47
|
+
export declare const PAPER_ALIGN_END = "end";
|
|
48
|
+
/**
|
|
49
|
+
* Defines how to align the content in a Paper object. In most situations, the dimensions of the paper's content is not square, and the dimensions of the paper itself is not square either. When this is the case, there is one axis in which there is more whitespace than the other. This type identifies the strategies available for aligning the Paper content with respect to the whitespace. The default is to center it, in each axis.
|
|
50
|
+
* @group Components
|
|
51
|
+
* @category Paper
|
|
52
|
+
*/
|
|
53
|
+
export type PaperAlignment = typeof PAPER_ALIGN_START | typeof PAPER_ALIGN_CENTER | typeof PAPER_ALIGN_END;
|
|
54
|
+
/**
|
|
55
|
+
* Options specific to the Paper UI.
|
|
56
|
+
* @group Components
|
|
57
|
+
* @category Paper
|
|
58
|
+
*/
|
|
59
|
+
export interface PaperOptions extends BrowserUIOptions<PaperDefaults> {
|
|
60
|
+
/**
|
|
61
|
+
* Margin to leave around content
|
|
62
|
+
*/
|
|
63
|
+
margin?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Strategy to use to place content within whitespace. This applies to both axes; use horizontalAlign and/or verticalAlign to set axes differently.
|
|
66
|
+
*/
|
|
67
|
+
align?: PaperAlignment;
|
|
68
|
+
/**
|
|
69
|
+
* Strategy to use to place content within whitespace in the horizontal axis.
|
|
70
|
+
*/
|
|
71
|
+
horizontalAlign?: PaperAlignment;
|
|
72
|
+
/**
|
|
73
|
+
* Strategy to use to place content within whitespace in the vertical axis.
|
|
74
|
+
*/
|
|
75
|
+
verticalAlign?: PaperAlignment;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Defaults for a Paper renderer
|
|
79
|
+
* @group Components
|
|
80
|
+
* @category Defaults
|
|
81
|
+
*/
|
|
82
|
+
export interface PaperDefaults extends BrowserUIDefaults {
|
|
83
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
2
|
+
import { ModelOptions, DataSource, PointXY, RectangleXY } from "../../core";
|
|
3
|
+
import { BrowserElement } from "../util";
|
|
4
|
+
import { ViewportBounds } from "../../ui";
|
|
5
|
+
import { BrowserUIModel, TemplateRenderer } from "../browser-ui";
|
|
6
|
+
import { PaperDefaults, PaperAlignment, PaperOptions } from "./definitions";
|
|
7
|
+
import { Background } from "../definitions";
|
|
8
|
+
/**
|
|
9
|
+
* Provides a canvas on which nodes, groups and edges can be rendered, with support for layouts and various plugins. This is not a class that API users should instantiate directly: for users of a library integration, a Paper will be created internally by the appropriate component; for users of vanilla VisuallyJs, a Paper is created either via the {@link createPaper} factory method, or via a `renderPaper` call on an instance of the {@link BrowserUIModel}.
|
|
10
|
+
* @group Components
|
|
11
|
+
*/
|
|
12
|
+
export declare class Paper extends BrowserUI {
|
|
13
|
+
model: BrowserUIModel;
|
|
14
|
+
private $canvas;
|
|
15
|
+
$margin: number;
|
|
16
|
+
$horizontalAlign: PaperAlignment;
|
|
17
|
+
$verticalAlign: PaperAlignment;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @param model
|
|
21
|
+
* @param dataSource
|
|
22
|
+
* @param container
|
|
23
|
+
* @param options
|
|
24
|
+
* @param templateRenderer
|
|
25
|
+
* @param defaults
|
|
26
|
+
*/
|
|
27
|
+
constructor(model: BrowserUIModel, dataSource: DataSource, container: BrowserElement, options: PaperOptions, templateRenderer: TemplateRenderer<BrowserElement>, defaults: PaperDefaults);
|
|
28
|
+
$getCanvasElement(): HTMLElement | SVGElement;
|
|
29
|
+
/**
|
|
30
|
+
* Synchronises the view with the dataset, ensuring all the content is visible.
|
|
31
|
+
*/
|
|
32
|
+
syncView(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the margin to be used and synchronises the view.
|
|
35
|
+
* @param m
|
|
36
|
+
*/
|
|
37
|
+
setMargin(m: number): void;
|
|
38
|
+
toPageLocation(left: number, top: number): PointXY;
|
|
39
|
+
fromPageLocation(left: number, top: number, roundValues?: boolean): PointXY;
|
|
40
|
+
fromWindowLocation(left: number, top: number, roundValues?: boolean): PointXY;
|
|
41
|
+
mapEventLocation(event: MouseEvent): PointXY;
|
|
42
|
+
getViewportBoundsInfo(): ViewportBounds;
|
|
43
|
+
getApparentCanvasLocation(): PointXY;
|
|
44
|
+
addBackground(background: Background): void;
|
|
45
|
+
removeBackground(background: Background): void;
|
|
46
|
+
zoomOut(canvasLoc?: PointXY): void;
|
|
47
|
+
zoomIn(canvasLoc?: PointXY): void;
|
|
48
|
+
getVisibleCanvasBounds(): RectangleXY;
|
|
49
|
+
}
|
|
50
|
+
export declare function createPaper(container: BrowserElement, options?: PaperOptions, modelOptions?: ModelOptions, data?: any): Paper;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventManager } from "./event-manager";
|
|
2
|
+
import { PointXY } from "../core/util";
|
|
3
|
+
/**
|
|
4
|
+
* Pinch listener for all touch browsers - ipad, android, and windows laptops/surfaces. Needless to say,
|
|
5
|
+
* every browser does it differently. IE10+ uses PointerEvents; ipad safari/windows chrome/ipad chrome/
|
|
6
|
+
* android chrome use TouchEvents. The listener posts pinchstart, pinch happening, and pinch end events.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface PinchListenerOptions {
|
|
10
|
+
el: any;
|
|
11
|
+
onPinchStart?: Function;
|
|
12
|
+
onPinch?: Function;
|
|
13
|
+
onPinchEnd?: Function;
|
|
14
|
+
enableWheelZoom?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class PinchListener {
|
|
17
|
+
isPointerDevice: boolean;
|
|
18
|
+
isTouchDevice: boolean;
|
|
19
|
+
center: PointXY;
|
|
20
|
+
radius: number;
|
|
21
|
+
startRadius: number;
|
|
22
|
+
onPinchStart: Function;
|
|
23
|
+
onPinch: Function;
|
|
24
|
+
onPinchEnd: Function;
|
|
25
|
+
eventManager: EventManager;
|
|
26
|
+
constructor(params: PinchListenerOptions);
|
|
27
|
+
private _fire;
|
|
28
|
+
private _fireEnd;
|
|
29
|
+
private bind;
|
|
30
|
+
private unbind;
|
|
31
|
+
listenerTypes: Record<string, (p: PinchListenerOptions) => void>;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Background } from "../../definitions";
|
|
2
|
+
import { Constructable } from "../../../core";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* background factory.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const AvailableBackgrounds: {
|
|
10
|
+
get: (name: string) => Constructable<Background>;
|
|
11
|
+
register: (name: string, b: Constructable<Background>) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BrowserUI } from "../../browser-visuallyjs-instance";
|
|
2
|
+
import { Background } from "../../definitions";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the `logarithmic` tiling strategy
|
|
5
|
+
*/
|
|
6
|
+
export declare const TILING_STRATEGY_LOGARITHMIC = "logarithmic";
|
|
7
|
+
/**
|
|
8
|
+
* Defines the `absolute` tiling strategy
|
|
9
|
+
*/
|
|
10
|
+
export declare const TILING_STRATEGY_ABSOLUTE = "absolute";
|
|
11
|
+
/**
|
|
12
|
+
* Defines how the tiles are arranged in a tiled background layer. With `TILING_STRATEGY_LOGARITHMIC` each layer is assumed to have a maximum of (2^level+1) tiles in each axis (for instance at level 0, 2 tiles). This setup is how apps like Google maps arrange their tiles. With `TILING_STRATEGY_ABSOLUTE` tiling, the number of tiles in each axis is computed as the size of the image in that axis divided by the tile size in that axis. Thus, for each zoom level, there are the same number of tiles.
|
|
13
|
+
*
|
|
14
|
+
* @group Plugins
|
|
15
|
+
* @category Background
|
|
16
|
+
*/
|
|
17
|
+
export type TilingStrategy = typeof TILING_STRATEGY_ABSOLUTE | typeof TILING_STRATEGY_LOGARITHMIC;
|
|
18
|
+
/**
|
|
19
|
+
* Callback from the {@link SimpleBackground} when the background image has loaded.
|
|
20
|
+
* @group Plugins
|
|
21
|
+
* @category Background
|
|
22
|
+
*/
|
|
23
|
+
export type OnBackgroundReadyCallback = (bg: Background, ui: BrowserUI) => any;
|
|
24
|
+
/**
|
|
25
|
+
* Base options for a background
|
|
26
|
+
* @group Plugins
|
|
27
|
+
* @category Background
|
|
28
|
+
*/
|
|
29
|
+
export interface BackgroundOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Type of background to render.
|
|
32
|
+
*/
|
|
33
|
+
type: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional function to call when the image has loaded (or otherwise claims to be ready)
|
|
36
|
+
*/
|
|
37
|
+
onBackgroundReady?: OnBackgroundReadyCallback;
|
|
38
|
+
/**
|
|
39
|
+
* Whether or not the background should initially be visible. Defaults to true.
|
|
40
|
+
*/
|
|
41
|
+
visible?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Options for an {@link ImageBackground}
|
|
45
|
+
* @group Plugins
|
|
46
|
+
* @category Background
|
|
47
|
+
*/
|
|
48
|
+
export interface ImageBackgroundOptions extends BackgroundOptions {
|
|
49
|
+
/**
|
|
50
|
+
* URL for the background. When `type` is set to `BackgroundTypes.simple` you can supply either this, or an Image. When `type` is set to `BackgroundTypes.tiled`, you can supply this, or you can supply a `urlGenerator` function instead. If you supply `url` and no `urlGenerator`, the url you supply is treated as a template for the url for any given tile, and is expected to contain `{z}`, `{x}` and `{y}` placeholders. The form of the URL can be anything you like as long as it has the placeholders for z, x and y. For instance:
|
|
51
|
+
*
|
|
52
|
+
* `http://foo.com/{z}/{x}/{y}`
|
|
53
|
+
* `https://bar.com?zoom={z}&x={x}&y={y}`
|
|
54
|
+
*
|
|
55
|
+
* etc
|
|
56
|
+
*/
|
|
57
|
+
url?: string;
|
|
58
|
+
/**
|
|
59
|
+
* For `simple` backgrounds, the image to use. Optional; you can also supply a url.
|
|
60
|
+
*/
|
|
61
|
+
img?: HTMLImageElement;
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BackgroundOptions } from "./background-options";
|
|
2
|
+
import { InternalBackgroundOptions } from "../../definitions";
|
|
3
|
+
import { BrowserUI } from "../../browser-visuallyjs-instance";
|
|
4
|
+
import { Background } from "../../definitions";
|
|
5
|
+
import { BaseBrowserUIPlugin, BrowserUIPlugin } from "../browser-ui-plugin";
|
|
6
|
+
/**
|
|
7
|
+
* Offers a means to manage backgrounds for a browser UI.
|
|
8
|
+
* @group Plugins
|
|
9
|
+
* @category Background
|
|
10
|
+
*/
|
|
11
|
+
export declare class BackgroundPlugin<T extends BackgroundOptions> extends BaseBrowserUIPlugin implements BrowserUIPlugin<InternalBackgroundOptions<T>> {
|
|
12
|
+
static type: string;
|
|
13
|
+
id: "background";
|
|
14
|
+
/**
|
|
15
|
+
* Exposed for exporter to use
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
background: Background;
|
|
19
|
+
private _visible;
|
|
20
|
+
ui: BrowserUI;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
* @param ui
|
|
24
|
+
* @param backgroundOptions
|
|
25
|
+
*/
|
|
26
|
+
initialise<T extends BackgroundOptions>(ui: BrowserUI, backgroundOptions: InternalBackgroundOptions<T>): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
destroy(): void;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
reset(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the current image url.
|
|
37
|
+
*
|
|
38
|
+
* @param url
|
|
39
|
+
*/
|
|
40
|
+
setUrl(url: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the background to be visible.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
show(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the background to be invisible
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
hide(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Toggles the visible state of the background.
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
toggle(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Sets the visible state of the background
|
|
58
|
+
* @param v
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
setVisible(v: boolean): void;
|
|
62
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { BackgroundOptions } from "./background-options";
|
|
2
|
+
import { ViewportBounds } from "../../../ui";
|
|
3
|
+
import { Grid } from "../../../core";
|
|
4
|
+
import { BrowserUI } from "../../browser-visuallyjs-instance";
|
|
5
|
+
import { Background, InternalBackgroundOptions } from "../../definitions";
|
|
6
|
+
export declare enum GridTypes {
|
|
7
|
+
dotted = "dotted",
|
|
8
|
+
lines = "lines"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Defines the 'dotted' grid type
|
|
12
|
+
* @group Plugins
|
|
13
|
+
* @category Background
|
|
14
|
+
* @constant
|
|
15
|
+
*/
|
|
16
|
+
export declare const GRID_TYPE_DOTTED = "dotted";
|
|
17
|
+
/**
|
|
18
|
+
* Defines the 'lines' grid type
|
|
19
|
+
* @group Plugins
|
|
20
|
+
* @category Background
|
|
21
|
+
* @constant
|
|
22
|
+
*/
|
|
23
|
+
export declare const GRID_TYPE_LINES = "lines";
|
|
24
|
+
/**
|
|
25
|
+
* Grid type for grid background.
|
|
26
|
+
* @group Plugins
|
|
27
|
+
* @category Background
|
|
28
|
+
*/
|
|
29
|
+
export type GridType = typeof GRID_TYPE_DOTTED | typeof GRID_TYPE_LINES;
|
|
30
|
+
/**
|
|
31
|
+
* Options for the generated grid background.
|
|
32
|
+
* @group Plugins
|
|
33
|
+
* @category Background
|
|
34
|
+
*/
|
|
35
|
+
export interface GeneratedGridBackgroundOptions extends BackgroundOptions {
|
|
36
|
+
/**
|
|
37
|
+
* The grid to use. This is optional; if you do not supply one the background will attempt to read the grid definition from the Surface. If that is also not set then a default grid of 50x50 pixels will be used.
|
|
38
|
+
*/
|
|
39
|
+
grid?: Grid;
|
|
40
|
+
/**
|
|
41
|
+
* Whether or not to show a thick border around the entire background. Defaults to false.
|
|
42
|
+
*/
|
|
43
|
+
showBorder?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The minimum width for the grid. The value you provided is divided by 2 and then the grid is guaranteed to always at least span the range of (-minWidth / 2) - (minWidth / 2). Defaults to 20 000.
|
|
46
|
+
*/
|
|
47
|
+
minWidth?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The minimum height for the grid. The value you provided is divided by 2 and then the grid is guaranteed to always at least span the range of (-minHeight / 2) - (minHeight / 2). Defaults to 20 000.
|
|
50
|
+
*/
|
|
51
|
+
minHeight?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Defaults to false. If true, the grid will also draw tick marks between the grid lines.
|
|
54
|
+
*/
|
|
55
|
+
showTickMarks?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Number of tick marks to draw per cell. Defaults to 2.
|
|
58
|
+
*/
|
|
59
|
+
tickMarksPerCell?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The maximum width for the grid. The value you provided is divided by 2 and then the grid is guaranteed to never exceed the range of (-maxWidth / 2) - (maxWidth / 2). maxWidth takes precedence over minWidth.
|
|
62
|
+
*/
|
|
63
|
+
maxWidth?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The maximum height for the grid. The value you provided is divided by 2 and then the grid is guaranteed to never exceed the range of (-maxHeight / 2) - (maxHeight / 2). maxHeight takes precedence over minHeight.
|
|
66
|
+
*/
|
|
67
|
+
maxHeight?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Defaults to true, and instructs the grid that if the grid has grown beyond any minimum value set in either axis, if the content bounds subsequently shrink in that axis below the minimum, the grid should shrink back to the minimum. If you set this to false the grid will never shrink back to its minimum values once they have been exceeded.
|
|
70
|
+
*/
|
|
71
|
+
autoShrink?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Type of grid - lines or dots. Defaults to lines.
|
|
74
|
+
*/
|
|
75
|
+
gridType?: GridType;
|
|
76
|
+
/**
|
|
77
|
+
* The radius for dots representing grid positions (when gridType id GridTypes.dotted). Defaults to 2.
|
|
78
|
+
*/
|
|
79
|
+
dotRadius?: number;
|
|
80
|
+
/**
|
|
81
|
+
* The radius for dots representing grid tick marks (when gridType id GridTypes.dotted). Defaults to 1.
|
|
82
|
+
*/
|
|
83
|
+
tickDotRadius?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Whether or not the background is initially visible. Defaults to true.
|
|
86
|
+
*/
|
|
87
|
+
visible?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The grid that will be used in the absence of a grid in the background options or a grid set on the surface.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare const DEFAULT_GRID: Grid;
|
|
94
|
+
/**
|
|
95
|
+
* The default number of tick marks per cell.
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export declare const DEFAULT_TICK_MARKS_PER_CELL = 2;
|
|
99
|
+
/**
|
|
100
|
+
* The default width of tick marks
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export declare const DEFAULT_TICK_LINE_STROKE = "#ddd";
|
|
104
|
+
/**
|
|
105
|
+
* The default stroke color of tick marks.
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
export declare const DEFAULT_LINE_STROKE = "#ddd";
|
|
109
|
+
/**
|
|
110
|
+
* The css class that will be added to a grid background's main element
|
|
111
|
+
* @group Plugins
|
|
112
|
+
* @category Background
|
|
113
|
+
* @cssClass
|
|
114
|
+
* @context generatedGrid
|
|
115
|
+
*/
|
|
116
|
+
export declare const CLASS_BACKGROUND = "vjs-background";
|
|
117
|
+
/**
|
|
118
|
+
* The css class that will be added to a grid background's border
|
|
119
|
+
* @group Plugins
|
|
120
|
+
* @category Background
|
|
121
|
+
* @cssClass
|
|
122
|
+
* @context generatedGrid
|
|
123
|
+
*/
|
|
124
|
+
export declare const CLASS_BACKGROUND_BORDER = "vjs-background-border";
|
|
125
|
+
/**
|
|
126
|
+
* The css class that will be added to the major and minor dots/lines in a grid background
|
|
127
|
+
* @group Plugins
|
|
128
|
+
* @category Background
|
|
129
|
+
* @cssClass
|
|
130
|
+
* @context generatedGrid
|
|
131
|
+
*/
|
|
132
|
+
export declare const CLASS_BACKGROUND_GRID = "vjs-background-grid";
|
|
133
|
+
/**
|
|
134
|
+
* The class that will be added to the lines representing a grid background's tick marks (when gridType is GridTypes.lines)
|
|
135
|
+
* @group Plugins
|
|
136
|
+
* @category Background
|
|
137
|
+
* @cssClass
|
|
138
|
+
* @context generatedGrid
|
|
139
|
+
*/
|
|
140
|
+
export declare const CLASS_BACKGROUND_GRID_MINOR = "vjs-background-grid-minor";
|
|
141
|
+
/**
|
|
142
|
+
* The class that will be added to the lines representing a grid background's grid lines (when gridType is GridTypes.lines)
|
|
143
|
+
* @group Plugins
|
|
144
|
+
* @category Background
|
|
145
|
+
* @cssClass
|
|
146
|
+
* @context generatedGrid
|
|
147
|
+
*/
|
|
148
|
+
export declare const CLASS_BACKGROUND_GRID_MAJOR = "vjs-background-grid-major";
|
|
149
|
+
/**
|
|
150
|
+
* The class that will be added to the dots representing a grid background's grid lines (when gridType is GridTypes.dotted)
|
|
151
|
+
* @group Plugins
|
|
152
|
+
* @category Background
|
|
153
|
+
* @cssClass
|
|
154
|
+
* @context generatedGrid
|
|
155
|
+
*/
|
|
156
|
+
export declare const CLASS_BACKGROUND_GRID_DOT_MAJOR = "vjs-background-grid-dotted-major";
|
|
157
|
+
/**
|
|
158
|
+
* The class that will be added to the dots representing a grid background's grid tick marks (when gridType is GridTypes.dotted)
|
|
159
|
+
* @group Plugins
|
|
160
|
+
* @category Background
|
|
161
|
+
* @cssClass
|
|
162
|
+
* @context generatedGrid
|
|
163
|
+
*/
|
|
164
|
+
export declare const CLASS_BACKGROUND_GRID_DOT_MINOR = "vjs-background-grid-dotted-minor";
|
|
165
|
+
/**
|
|
166
|
+
* A background that generates an SVG grid based upon the current content bounds,
|
|
167
|
+
* ensuring that there is always a grid visible underneath the content. The grid may consist of
|
|
168
|
+
* lines or dots - control this via the `gridType` option.
|
|
169
|
+
*
|
|
170
|
+
* The size of the grid can be mandated in the options for the background, or
|
|
171
|
+
* it can be extracted from the surface.
|
|
172
|
+
*
|
|
173
|
+
* You can hide/show the background grid via the `hide()`, `show()`, `toggle()` or `setVisible(boolean)`
|
|
174
|
+
* methods.
|
|
175
|
+
*
|
|
176
|
+
* @group Plugins
|
|
177
|
+
* @category Background
|
|
178
|
+
*/
|
|
179
|
+
export declare class GeneratedGridBackground implements Background {
|
|
180
|
+
_suspended: boolean;
|
|
181
|
+
static type: string;
|
|
182
|
+
type: string;
|
|
183
|
+
grid: Grid;
|
|
184
|
+
ui: BrowserUI;
|
|
185
|
+
showBorder: boolean;
|
|
186
|
+
minWidth: number;
|
|
187
|
+
minHeight: number;
|
|
188
|
+
maxWidth: number;
|
|
189
|
+
maxHeight: number;
|
|
190
|
+
showTickMarks: boolean;
|
|
191
|
+
tickMarksPerCell: number;
|
|
192
|
+
autoShrink: boolean;
|
|
193
|
+
dotRadius: number;
|
|
194
|
+
tickDotRadius: number;
|
|
195
|
+
gridType: GridType;
|
|
196
|
+
currentBounds: ViewportBounds;
|
|
197
|
+
_maximumExtentsReached: {
|
|
198
|
+
minX: number;
|
|
199
|
+
minY: number;
|
|
200
|
+
maxX: number;
|
|
201
|
+
maxY: number;
|
|
202
|
+
};
|
|
203
|
+
backgroundContainer: SVGElement;
|
|
204
|
+
private readonly _$_majorGridId;
|
|
205
|
+
private readonly _$_minorGridId;
|
|
206
|
+
constructor(params: InternalBackgroundOptions<GeneratedGridBackgroundOptions>);
|
|
207
|
+
owns(el: any): boolean;
|
|
208
|
+
getWidth(): number;
|
|
209
|
+
getHeight(): number;
|
|
210
|
+
setZoom(zoom: number, doNotDebounce?: boolean): void;
|
|
211
|
+
pan(): void;
|
|
212
|
+
destroy(): void;
|
|
213
|
+
private _recompute;
|
|
214
|
+
private _$_minorLinesGrid;
|
|
215
|
+
private _$_majorLinesGrid;
|
|
216
|
+
private _$_minorDotsGrid;
|
|
217
|
+
private _$_majorDotsGrid;
|
|
218
|
+
private _$_generateGridPattern;
|
|
219
|
+
/**
|
|
220
|
+
* Generates the SVG markup for the grid. Exposed as a public method for use by the exporter but not part of the public API.
|
|
221
|
+
* @internal
|
|
222
|
+
*/
|
|
223
|
+
generateGrid(): string;
|
|
224
|
+
/**
|
|
225
|
+
* Sets the visible state of the grid
|
|
226
|
+
* @param v
|
|
227
|
+
*
|
|
228
|
+
*/
|
|
229
|
+
_setVisible(v: boolean): void;
|
|
230
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ImageBackgroundOptions, OnBackgroundReadyCallback } from "./background-options";
|
|
2
|
+
import { BrowserUI } from "../../browser-visuallyjs-instance";
|
|
3
|
+
import { ImageBackground, InternalBackgroundOptions } from "../../definitions";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface SimpleBackgroundOptions extends ImageBackgroundOptions {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A background consisting of a single image.
|
|
11
|
+
* @group Plugins
|
|
12
|
+
* @category Background
|
|
13
|
+
*/
|
|
14
|
+
export declare class SimpleBackground implements ImageBackground {
|
|
15
|
+
static type: string;
|
|
16
|
+
type: string;
|
|
17
|
+
canvas: HTMLElement;
|
|
18
|
+
onBackgroundReady: OnBackgroundReadyCallback;
|
|
19
|
+
imagePlaceholder: HTMLImageElement;
|
|
20
|
+
ui: BrowserUI;
|
|
21
|
+
protected image: HTMLImageElement;
|
|
22
|
+
protected url: string;
|
|
23
|
+
constructor(params: InternalBackgroundOptions<SimpleBackgroundOptions>);
|
|
24
|
+
protected _init(params: SimpleBackgroundOptions): void;
|
|
25
|
+
setUrl(url: string): void;
|
|
26
|
+
owns(el: any): boolean;
|
|
27
|
+
getWidth(): number;
|
|
28
|
+
getHeight(): number;
|
|
29
|
+
setZoom(zoom: number, doNotDebounce?: boolean): void;
|
|
30
|
+
pan(): void;
|
|
31
|
+
destroy(): void;
|
|
32
|
+
_setVisible(v: boolean): void;
|
|
33
|
+
}
|