@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,16 @@
|
|
|
1
|
+
import { BrowserUI } from "./browser-visuallyjs-instance";
|
|
2
|
+
import { PaintStyle, Connector, Connection } from "../ui";
|
|
3
|
+
export declare function paintSvgConnector(instance: BrowserUI, connection: Connection<any>, paintStyle: PaintStyle): void;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface SvgConnector extends Connector {
|
|
8
|
+
canvas: SVGElement;
|
|
9
|
+
path?: SVGElement;
|
|
10
|
+
bgPath?: SVGElement;
|
|
11
|
+
classesToAddWhenRendered?: Array<string>;
|
|
12
|
+
sourceZone: SVGElement;
|
|
13
|
+
targetZone: SVGElement;
|
|
14
|
+
gradient?: SVGLinearGradientElement;
|
|
15
|
+
}
|
|
16
|
+
export declare function getConnectorElement(instance: BrowserUI, connection: Connection<any>): SVGElement;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LabelOverlay, PaintStyle, Overlay, OverlayPaintParams, SimpleShapeOverlay } from "../ui";
|
|
2
|
+
import { Extents, PointXY } from "../core";
|
|
3
|
+
import { BrowserUI } from "./browser-visuallyjs-instance";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface SvgOverlayPaintParams<EL> extends Extents, PaintStyle, OverlayPaintParams {
|
|
8
|
+
}
|
|
9
|
+
export interface SvgSimpleShapeOverlayPaintParams<EL> extends SvgOverlayPaintParams<EL> {
|
|
10
|
+
paintStyle: {
|
|
11
|
+
stroke: string;
|
|
12
|
+
fill: string;
|
|
13
|
+
"stroke-width": number;
|
|
14
|
+
};
|
|
15
|
+
atts: Array<Record<string, any>>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export interface SVGLabelOverlayPaintParams extends OverlayPaintParams {
|
|
21
|
+
d: {
|
|
22
|
+
loc: PointXY;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Paints an overlay like arrow, dot, circle etc.
|
|
27
|
+
* @internal
|
|
28
|
+
* @param o
|
|
29
|
+
* @param params
|
|
30
|
+
*/
|
|
31
|
+
export declare function paintSimpleShapeOverlay<EL>(instance: BrowserUI, o: SimpleShapeOverlay<EL>, params: SvgSimpleShapeOverlayPaintParams<EL>, parentOrigin: PointXY): void;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function ensureSVGContentElements(instance: BrowserUI, o: SimpleShapeOverlay<any>): Array<SVGElement>;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function ensureSVGLabelElements(instance: BrowserUI, o: SVGLabelOverlay<any>): Array<SVGElement>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare function paintSVGLabelOverlay(instance: BrowserUI, o: SVGLabelOverlay<any>, params: SVGLabelOverlayPaintParams, parentOrigin: PointXY): void;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function destroySVGOverlay(o: SVGElementOverlay<any>, force?: boolean): void;
|
|
48
|
+
export declare abstract class SVGElementOverlay<EL> extends Overlay<EL> {
|
|
49
|
+
contentElements: Array<SVGElement>;
|
|
50
|
+
backgroundContentElements: Array<SVGElement>;
|
|
51
|
+
}
|
|
52
|
+
export interface SVGLabelOverlay<EL> extends SVGElementOverlay<EL>, LabelOverlay<EL> {
|
|
53
|
+
textElement: SVGTextElement;
|
|
54
|
+
bgElement: SVGRectElement;
|
|
55
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { PointXY } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* Options for an SVG export.
|
|
4
|
+
*/
|
|
5
|
+
export interface SvgExportOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Optional margin to set around the content. Defaults to 50px in x and y
|
|
8
|
+
*/
|
|
9
|
+
margins?: PointXY;
|
|
10
|
+
/**
|
|
11
|
+
* Whether or not to show the grid in the export (the UI itself has to be showing a grid for the export to have one). Defaults to true.
|
|
12
|
+
*/
|
|
13
|
+
showGrid?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Optional width to set on the SVG output. Defaults to unset, meaning the SVG will adapt to whatever its container's width is.
|
|
16
|
+
*/
|
|
17
|
+
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Optional height to set on the SVG output. Defaults to unset, meaning the SVG will adapt to whatever its container's height is.
|
|
20
|
+
*/
|
|
21
|
+
height?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Optional style to set in a `style` element in the SVG header. You can provide the CSS for the style element as a string, or you can provide a JS object.
|
|
24
|
+
*/
|
|
25
|
+
style?: string | Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options for the {@link SvgExportUI}
|
|
29
|
+
* @group Components
|
|
30
|
+
* @category SVG/PNG/JPG Export
|
|
31
|
+
*/
|
|
32
|
+
export interface SvgExportUIOptions extends SvgExportOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Optional filename to use - defaults to `visuallyjs-export`. You do not need to provide the extension.
|
|
35
|
+
*/
|
|
36
|
+
filename?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional label to use on the download button. Defaults to "Download".
|
|
39
|
+
*/
|
|
40
|
+
downloadButtonLabel?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Options for an {@link ImageExporter}
|
|
44
|
+
* @group Components
|
|
45
|
+
* @category SVG/PNG/JPG Export
|
|
46
|
+
*/
|
|
47
|
+
export interface ImageExportOptions extends SvgExportOptions {
|
|
48
|
+
/**
|
|
49
|
+
* Content type for the export. Defaults to `image/png`. Most modern browsers also support `image/jpeg`.
|
|
50
|
+
*/
|
|
51
|
+
type?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Optional quality of the resulting image - only used for jpeg. Defaults to 1.0.
|
|
54
|
+
*/
|
|
55
|
+
quality?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Optional width for the export. The exported image's aspect ratio will always be honoured so if you provide both this and `height`, height will be ignored. If you don't provide this the natural width of the underlying SVG will be used.
|
|
58
|
+
*/
|
|
59
|
+
width?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Optional height for the export. The exported image's aspect ratio will always be honoured so if you provide both this and `width`, this will be ignored. If you don't provide this the natural height of the underlying SVG will be used.
|
|
62
|
+
*/
|
|
63
|
+
height?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Options for an {@link ImageExportUI}
|
|
67
|
+
* @group Components
|
|
68
|
+
* @category SVG/PNG/JPG Export
|
|
69
|
+
*/
|
|
70
|
+
export interface ImageExportUIOptions extends ImageExportOptions {
|
|
71
|
+
/**
|
|
72
|
+
* Optional filename to use - defaults to `visuallyjs-export`. You do not need to provide the extension.
|
|
73
|
+
*/
|
|
74
|
+
filename?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Optional label to use on the download button. Defaults to "Download".
|
|
77
|
+
*/
|
|
78
|
+
downloadButtonLabel?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Optional function to invoke after the UI has been displayed.
|
|
81
|
+
* @param el
|
|
82
|
+
*/
|
|
83
|
+
onShow?: (el: Element, width: number, height: number, url: string) => any;
|
|
84
|
+
/**
|
|
85
|
+
* Optional list of dimensions
|
|
86
|
+
*/
|
|
87
|
+
dimensions?: Array<{
|
|
88
|
+
width?: number;
|
|
89
|
+
height?: number;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Optional function to invoke when the user changes the selected dimensions.
|
|
93
|
+
* @param width
|
|
94
|
+
* @param height
|
|
95
|
+
* @param url
|
|
96
|
+
*/
|
|
97
|
+
onDimensionsChanged?: (width: number, height: number, url: string) => any;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Defines a function callback from an image exporter.
|
|
101
|
+
* @group Components
|
|
102
|
+
* @category SVG/PNG/JPG Export
|
|
103
|
+
*/
|
|
104
|
+
export type ImageReadyFunction = (result: {
|
|
105
|
+
url: string;
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
contentType: string;
|
|
109
|
+
element: SVGElement;
|
|
110
|
+
}) => any;
|
|
111
|
+
/**
|
|
112
|
+
* The modal backing element for SVG/PNG/JPG export dialog
|
|
113
|
+
* @cssClass
|
|
114
|
+
* @context svg-png-jpg-export
|
|
115
|
+
*/
|
|
116
|
+
export declare const CLASS_EXPORT_UNDERLAY = "vjs-export-underlay";
|
|
117
|
+
/**
|
|
118
|
+
* Content element for SVG/PNG/JPG export dialog
|
|
119
|
+
* @cssClass
|
|
120
|
+
* @context svg-png-jpg-export
|
|
121
|
+
*/
|
|
122
|
+
export declare const CLASS_EXPORT_OVERLAY = "vjs-export-overlay";
|
|
123
|
+
/**
|
|
124
|
+
* Class assigned to the cancel button on an export dialog
|
|
125
|
+
* @cssClass
|
|
126
|
+
* @context svg-png-jpg-export
|
|
127
|
+
*/
|
|
128
|
+
export declare const CLASS_EXPORT_CANCEL = "vjs-export-cancel";
|
|
129
|
+
/**
|
|
130
|
+
* Class assigned to the dimensions drop down in an export dialog
|
|
131
|
+
* @cssClass
|
|
132
|
+
* @context svg-png-jpg-export
|
|
133
|
+
*/
|
|
134
|
+
export declare const CLASS_EXPORT_DIMENSIONS = "vjs-export-dimensions";
|
|
135
|
+
/**
|
|
136
|
+
* Class assigned to the element containing buttons and dimensions picker on an export dialog
|
|
137
|
+
* @cssClass
|
|
138
|
+
* @context svg-png-jpg-export
|
|
139
|
+
*/
|
|
140
|
+
export declare const CLASS_EXPORT_DOWNLOAD_TOOLS = "vjs-export-download-tools";
|
|
141
|
+
export declare const DEFAULT_EXPORT_FILENAME = "visuallyjs-export";
|
|
142
|
+
export declare const DEFAULT_DOWNLOAD_BUTTON_LABEL = "Download";
|
|
143
|
+
export declare const CONTENT_TYPES: {
|
|
144
|
+
png: string;
|
|
145
|
+
svg: string;
|
|
146
|
+
jpeg: string;
|
|
147
|
+
};
|
|
148
|
+
/** @internal */
|
|
149
|
+
export declare const TYPE_SVG = "svg";
|
|
150
|
+
/** @internal */
|
|
151
|
+
export declare const TYPE_PNG = "png";
|
|
152
|
+
/** @internal */
|
|
153
|
+
export declare const TYPE_JPG = "jpg";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ImageExportUIOptions } from "./definitions";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
export declare class ImageExportUI {
|
|
4
|
+
private ui;
|
|
5
|
+
underlay: HTMLElement;
|
|
6
|
+
overlay: HTMLElement;
|
|
7
|
+
closeButton: HTMLElement;
|
|
8
|
+
constructor(ui: BrowserUI);
|
|
9
|
+
private _cancel;
|
|
10
|
+
private _export;
|
|
11
|
+
export(options?: ImageExportUIOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
* @param options
|
|
15
|
+
* @param onready
|
|
16
|
+
* @param width
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
private _actuallyDoExport;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImageExportOptions, ImageReadyFunction } from "./definitions";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
import { RectangleXY } from "../../core";
|
|
4
|
+
/**
|
|
5
|
+
* Export the given UI as an image.
|
|
6
|
+
* @param ui
|
|
7
|
+
* @param options
|
|
8
|
+
* @param onready
|
|
9
|
+
*/
|
|
10
|
+
export declare function exportImage(ui: BrowserUI, options: ImageExportOptions, onready: ImageReadyFunction): void;
|
|
11
|
+
export declare function $doImageExport(svgElementInfo: {
|
|
12
|
+
element: SVGElement;
|
|
13
|
+
extents: RectangleXY;
|
|
14
|
+
svg: string;
|
|
15
|
+
}, options: ImageExportOptions, onready: ImageReadyFunction): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SvgExportUIOptions } from "./definitions";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
export declare class SvgExportUI {
|
|
4
|
+
private ui;
|
|
5
|
+
underlay: HTMLElement;
|
|
6
|
+
overlay: HTMLElement;
|
|
7
|
+
closeButton: HTMLElement;
|
|
8
|
+
constructor(ui: BrowserUI);
|
|
9
|
+
private _cancel;
|
|
10
|
+
export(options?: SvgExportUIOptions): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RectangleXY } from "../../core";
|
|
2
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
3
|
+
import { SvgExportOptions } from "./definitions";
|
|
4
|
+
export declare function exportSvg(ui: BrowserUI, options?: SvgExportOptions): {
|
|
5
|
+
element: SVGElement;
|
|
6
|
+
extents: RectangleXY;
|
|
7
|
+
svg: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* @param str
|
|
4
|
+
*/
|
|
5
|
+
export declare function base64Encode(str: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Base 64 encode the contents of some SVG element.
|
|
8
|
+
* @param el
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function base64EncodeSvgElement(el: SVGElement): string;
|
|
12
|
+
/**
|
|
13
|
+
* Base 64 encode some SVG element and return the whole thing as a data url
|
|
14
|
+
* @param el SVG element
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function svgElementToDataUrl(el: SVGElement): string;
|
|
18
|
+
/**
|
|
19
|
+
* Add a prefix to some base 64 encoded SVG to turn it into a data url.
|
|
20
|
+
* @param encodedSvg
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function encodedSvgToDataUrl(encodedSvg: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BrowserElement } from "./util";
|
|
2
|
+
import { GradientSpec } from "../core";
|
|
3
|
+
import { SvgConnector } from "./svg-element-connector";
|
|
4
|
+
export type ElementAttributes = Record<string, string | number | object>;
|
|
5
|
+
export declare function $attr(node: BrowserElement, attributes: ElementAttributes): void;
|
|
6
|
+
export declare function $svgNode(name: string, attributes?: ElementAttributes, style?: Record<string, any>, clazz?: string): SVGElement;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a lineargradient from the given spec.
|
|
9
|
+
* @param x1
|
|
10
|
+
* @param x2
|
|
11
|
+
* @param gradient
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function $createGradient(x1: number, x2: number, gradient: GradientSpec): {
|
|
15
|
+
id: string;
|
|
16
|
+
g: SVGLinearGradientElement;
|
|
17
|
+
};
|
|
18
|
+
export declare function _applyStyles(connector: SvgConnector, node: SVGElement, style: any, ignoreGradient: boolean): void;
|
|
19
|
+
export declare function $appendAtIndex(svg: SVGElement, path: SVGElement, idx: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* Converts the given text element's child content from a string into a set of spans, by splitting the string on whitespace (and newline).
|
|
22
|
+
* @param textElement
|
|
23
|
+
* @param text
|
|
24
|
+
* @param maxWidth
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function convertToMultilineText(textElement: SVGTextElement, text: string, maxWidth: number): SVGTextElement;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CommentFacade, ElementFacade, FragmentFacade, RecadoOptions, TemplateResolver, TextNodeFacade, Recado } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation of TemplateResolver for use in browsers.
|
|
4
|
+
* @param tid
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function InBrowserTemplateResolver(tid: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Implementation of Recado for use with the browser-ui package. Creates DOM elements
|
|
10
|
+
* and fragments.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class BrowserUiRecado extends Recado {
|
|
14
|
+
constructor(options: RecadoOptions);
|
|
15
|
+
/**
|
|
16
|
+
* create an element with the given tag name
|
|
17
|
+
* @internal
|
|
18
|
+
* @param tag
|
|
19
|
+
*/
|
|
20
|
+
ce(tag: string): ElementFacade;
|
|
21
|
+
/**
|
|
22
|
+
* create a fragment
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
cf(): FragmentFacade;
|
|
26
|
+
/**
|
|
27
|
+
* create a text node
|
|
28
|
+
* @internal
|
|
29
|
+
* @param value
|
|
30
|
+
*/
|
|
31
|
+
ctn(value: string): TextNodeFacade;
|
|
32
|
+
/**
|
|
33
|
+
* create a comment.
|
|
34
|
+
* @param content
|
|
35
|
+
*/
|
|
36
|
+
cc(content: string): CommentFacade;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
_getDefaultTemplateResolver(): TemplateResolver;
|
|
41
|
+
removeElement(e: ElementFacade): void;
|
|
42
|
+
removeTextNode(e: TextNodeFacade): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @param options
|
|
47
|
+
*/
|
|
48
|
+
export declare function newRecadoInstance(options?: RecadoOptions): Recado;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Surface } from "../surface-renderer";
|
|
2
|
+
import { Recado, Vertex } from "../../core";
|
|
3
|
+
export interface CustomTagDefinition {
|
|
4
|
+
/**
|
|
5
|
+
* Template for the tag. Must have a single root element.
|
|
6
|
+
*/
|
|
7
|
+
template: string;
|
|
8
|
+
/**
|
|
9
|
+
* This function is called whenever the tag is encountered during rendering. `el` is the root element for a fragment rendered
|
|
10
|
+
* using the definition's `template`. Note that at the time this is called, `el` is not yet in the DOM.
|
|
11
|
+
* @param el
|
|
12
|
+
* @param data
|
|
13
|
+
* @param instance
|
|
14
|
+
* @param surface
|
|
15
|
+
* @param vertex
|
|
16
|
+
*/
|
|
17
|
+
rendered: (el: Element, data: any, instance: Recado, ui: Surface, vertex: Vertex) => any;
|
|
18
|
+
/**
|
|
19
|
+
* This function is called whenever the tag is updated during an update call.
|
|
20
|
+
* @param el
|
|
21
|
+
* @param data
|
|
22
|
+
* @param instance
|
|
23
|
+
* @param surface
|
|
24
|
+
* @param vertex
|
|
25
|
+
*/
|
|
26
|
+
updated: (el: Element, data: any, instance: Recado, ui: Surface, vertex: Vertex) => any;
|
|
27
|
+
/**
|
|
28
|
+
* If set to true, the element rendered for this tag is removed from the DOM. The Toolkit uses this capability internally
|
|
29
|
+
* to add endpoints to the DOM.
|
|
30
|
+
*/
|
|
31
|
+
remove?: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RecadoTemplateRendererOptions } from "./recado-template-renderer";
|
|
2
|
+
import { TemplateRenderer } from "../browser-ui";
|
|
3
|
+
export * from './browser-ui-recado';
|
|
4
|
+
export * from './recado-template-renderer';
|
|
5
|
+
export * from './custom-tag-definition';
|
|
6
|
+
/**
|
|
7
|
+
* Create a template renderer using the template-2 package.
|
|
8
|
+
* @param params
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function newTemplates2Renderer(defaultTemplate: string, useSvgContainer: boolean, params?: RecadoTemplateRendererOptions): TemplateRenderer<Element>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Recado, ElementFacade, RecadoOptions, ObjectData, Vertex, DataSource } from "../../core";
|
|
2
|
+
import { TemplateRenderer } from "../browser-ui";
|
|
3
|
+
import { BrowserElement } from "../util";
|
|
4
|
+
import { BrowserUI } from "../browser-visuallyjs-instance";
|
|
5
|
+
import { VertexMapping } from "../../ui";
|
|
6
|
+
/**
|
|
7
|
+
* The default template to use for a node when the container is an HTML element.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const _defaultNodeHtmlTemplate: string;
|
|
11
|
+
export declare const _defaultPortHtmlTemplate: string;
|
|
12
|
+
/**
|
|
13
|
+
* The default template to use for a group when the container is an HTML element.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const _defaultGroupHtmlTemplate: string;
|
|
17
|
+
/**
|
|
18
|
+
* The default template to use for a node when the container is an SVG element.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const _defaultNodeSvgTemplate: string;
|
|
22
|
+
export declare const _defaultPortSvgTemplate: string;
|
|
23
|
+
/**
|
|
24
|
+
* The default template to use for a node when the container is an SVG element.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const _defaultGroupSvgTemplate: string;
|
|
28
|
+
export declare const _getDefaultTemplate: (type: "html" | "svg", id: string) => string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Options for the recado template engine. Extends RecadoOptions to take optional `tags` map.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export interface RecadoTemplateRendererOptions extends RecadoOptions {
|
|
34
|
+
tags?: Record<string, CustomTagRegistration>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A registration for a custom tag.
|
|
38
|
+
* @group Components
|
|
39
|
+
* @category Templating
|
|
40
|
+
*/
|
|
41
|
+
export interface CustomTagRegistration {
|
|
42
|
+
template: string;
|
|
43
|
+
rendered?: (el: Element, data: any, instance: Recado, surface: BrowserUI, obj: Vertex) => any;
|
|
44
|
+
updated?: (el: Element, data: any, instance: Recado, surface: BrowserUI, obj: Vertex) => any;
|
|
45
|
+
mounted?: (el: BrowserElement, data: any, recado: Recado, parent: ElementFacade) => any;
|
|
46
|
+
fragments?: Record<string, Record<string, string>>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Template renderer that uses the Toolkit's templates-2 engine.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export declare class RecadoTemplateRenderer implements TemplateRenderer<BrowserElement> {
|
|
53
|
+
private recado;
|
|
54
|
+
asynchronous: boolean;
|
|
55
|
+
reactive: boolean;
|
|
56
|
+
usesWrapperElement: boolean;
|
|
57
|
+
uicore: BrowserUI;
|
|
58
|
+
currentVertex: Vertex;
|
|
59
|
+
constructor(defaultTemplate: string, templateResolver: (id: string) => string, params?: RecadoTemplateRendererOptions);
|
|
60
|
+
render(templateId: string, data: ObjectData, dataSource: DataSource, objectType: string, renderer: BrowserUI, def: VertexMapping<any, BrowserElement>, obj: Vertex, eventInfo: any): void;
|
|
61
|
+
rerender(templateId: string, data: ObjectData, dataSource: DataSource, objectType: string, renderer: BrowserUI, def: any, obj: Vertex, eventInfo: any, originalElement: BrowserElement): void;
|
|
62
|
+
private _cleanup;
|
|
63
|
+
cleanupVertex(objId: string, el: BrowserElement): void;
|
|
64
|
+
cleanupPort(objId: string, el: BrowserElement): void;
|
|
65
|
+
addTemplate(id: string, content: string): void;
|
|
66
|
+
registerTag(tagName: string, options: CustomTagRegistration): void;
|
|
67
|
+
update(el: BrowserElement, data: Record<string, any>, v: Vertex, renderer: BrowserUI): void;
|
|
68
|
+
removeElement(el: HTMLElement | SVGElement): void;
|
|
69
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Path } from "../core";
|
|
2
|
+
import { BrowserUI } from "./browser-visuallyjs-instance";
|
|
3
|
+
/**
|
|
4
|
+
* A wrapper around the Toolkit's path object, which offers a few DOM specific methods.
|
|
5
|
+
*/
|
|
6
|
+
export declare class UIPath {
|
|
7
|
+
path: Path;
|
|
8
|
+
private ui;
|
|
9
|
+
/**
|
|
10
|
+
* @param path Underlying path object.
|
|
11
|
+
* @param ui The UI instance that constructed this path.
|
|
12
|
+
*/
|
|
13
|
+
constructor(path: Path, ui: BrowserUI);
|
|
14
|
+
/**
|
|
15
|
+
* Gets the count of vertices in the path.
|
|
16
|
+
*/
|
|
17
|
+
getVertexCount(): number;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the total number of edges in the path.
|
|
20
|
+
*/
|
|
21
|
+
getEdgeCount(): number;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the visible state of all vertices and edges in the path
|
|
24
|
+
* @param val
|
|
25
|
+
*/
|
|
26
|
+
setVisible(val: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Adds a CSS class to the elements representing the vertices in the path
|
|
29
|
+
* @param clazz
|
|
30
|
+
*/
|
|
31
|
+
addVertexClass(clazz: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Removes a CSS class from the elements representing the vertices in the path
|
|
34
|
+
* @param clazz
|
|
35
|
+
*/
|
|
36
|
+
removeVertexClass(clazz: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Adds a CSS class to the elements representing the edges in the path
|
|
39
|
+
* @param clazz
|
|
40
|
+
*/
|
|
41
|
+
addEdgeClass(clazz: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Removes a CSS class from the elements representing the edges in the path
|
|
44
|
+
* @param clazz
|
|
45
|
+
*/
|
|
46
|
+
removeEdgeClass(clazz: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Adds a CSS class to the elements representing the vertices and edges in the path
|
|
49
|
+
* @param clazz
|
|
50
|
+
*/
|
|
51
|
+
addClass(clazz: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a CSS class from the elements representing the vertices and edges in the path
|
|
54
|
+
* @param clazz
|
|
55
|
+
*/
|
|
56
|
+
removeClass(clazz: string): void;
|
|
57
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ChartDimensions } from "../definitions";
|
|
2
|
+
import { ChartSVGElement } from "../util";
|
|
3
|
+
import { CategoryVsAxisPlot, XYPlotOptions } from "../plot";
|
|
4
|
+
import { BrowserElement } from "../../browser-ui";
|
|
5
|
+
import { PointXY } from "../../core";
|
|
6
|
+
import { StackablePlotOptions } from "../bar-and-column/bar-plot";
|
|
7
|
+
import { DomainExtentMap } from "../domain_scale_utilities";
|
|
8
|
+
import { CategoryValueChart, CategoryValueChartOptions } from "../category-value-chart";
|
|
9
|
+
import { RealisedSeries } from "../series";
|
|
10
|
+
/**
|
|
11
|
+
* Options for an area chart
|
|
12
|
+
* @group Charts
|
|
13
|
+
* @category Area Chart
|
|
14
|
+
*/
|
|
15
|
+
export interface AreaChartOptions extends Omit<CategoryValueChartOptions, "plots"> {
|
|
16
|
+
/**
|
|
17
|
+
* If true, draw the line as a series of bezier splines, which makes for a smooth line. Defaults to false.
|
|
18
|
+
*/
|
|
19
|
+
spline?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Options for the area plot.
|
|
22
|
+
*/
|
|
23
|
+
plotOptions?: AreaPlotOptions;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Area charts are a variant of line charts used to visualize volumes. Set `inverted:true` on your AreaChart options if you wish to use the Y axis as the value axis.
|
|
27
|
+
* @group Charts
|
|
28
|
+
* @category Area Chart
|
|
29
|
+
*/
|
|
30
|
+
export declare class AreaChart extends CategoryValueChart {
|
|
31
|
+
constructor(container: BrowserElement, options: AreaChartOptions);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options for an area chart plot
|
|
35
|
+
* @group Charts
|
|
36
|
+
* @category Area Chart
|
|
37
|
+
*/
|
|
38
|
+
export interface AreaPlotOptions extends XYPlotOptions, StackablePlotOptions {
|
|
39
|
+
/**
|
|
40
|
+
* Configuration of the marker dot
|
|
41
|
+
*/
|
|
42
|
+
marker?: {
|
|
43
|
+
/**
|
|
44
|
+
* Whether or not the marker should be enabled. Defaults to true.
|
|
45
|
+
*/
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Size (diameter) of the marker dot.
|
|
49
|
+
*/
|
|
50
|
+
size?: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Used by Area chart
|
|
55
|
+
* @group Charts
|
|
56
|
+
* @category Area Chart
|
|
57
|
+
*/
|
|
58
|
+
export declare class AreaPlot extends CategoryVsAxisPlot {
|
|
59
|
+
chart: CategoryValueChart;
|
|
60
|
+
static type: string;
|
|
61
|
+
stacked: boolean;
|
|
62
|
+
private _markerEnabled;
|
|
63
|
+
private _markerSize;
|
|
64
|
+
private _perimeterMarker;
|
|
65
|
+
private _dataPoints;
|
|
66
|
+
constructor(chart: CategoryValueChart, options: AreaPlotOptions);
|
|
67
|
+
/**
|
|
68
|
+
* Provide domain extents for this plot so XYChart can build scales by domain.
|
|
69
|
+
*
|
|
70
|
+
* Area plots behave like line plots for extents:
|
|
71
|
+
* - value domain is "y" when inverted, otherwise "x"
|
|
72
|
+
* - if stacked, provide an additional stacked domain ("yStacked"/"xStacked")
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
getDomainExtents(): DomainExtentMap;
|
|
77
|
+
$getValueLocation(category: number, series: number, dim: ChartDimensions): number;
|
|
78
|
+
$draw(svgRoot: ChartSVGElement, dim: ChartDimensions, minPlottableValue: number, maxPlottableValue: number): void;
|
|
79
|
+
showMarker(categoryIndex: number, dim: ChartDimensions, focusedSeries: number | null): {
|
|
80
|
+
loc: PointXY;
|
|
81
|
+
series: RealisedSeries;
|
|
82
|
+
seriesIndex: number;
|
|
83
|
+
} | null;
|
|
84
|
+
hideMarker(): void;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./area-chart";
|