@antv/g6 5.0.0-alpha.9 → 5.0.0-beta.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/dist/g6.min.js +2 -2
- package/esm/api-doc/behaviors.d.ts +2 -0
- package/esm/api-doc/behaviors.js +2 -0
- package/esm/api-doc/behaviors.js.map +1 -0
- package/esm/api-doc/graph.d.ts +4 -0
- package/esm/api-doc/graph.js +4 -0
- package/esm/api-doc/graph.js.map +1 -0
- package/esm/api-doc/item.d.ts +9 -0
- package/esm/api-doc/item.js +3 -0
- package/esm/api-doc/item.js.map +1 -0
- package/esm/api-doc/layout.d.ts +1 -0
- package/esm/api-doc/layout.js +2 -0
- package/esm/api-doc/layout.js.map +1 -0
- package/esm/api-doc/plugins.d.ts +1 -0
- package/esm/api-doc/plugins.js +2 -0
- package/esm/api-doc/plugins.js.map +1 -0
- package/esm/api-doc/types.d.ts +0 -0
- package/esm/api-doc/types.js +3 -0
- package/esm/api-doc/types.js.map +1 -0
- package/esm/api-doc/util.d.ts +3 -0
- package/esm/api-doc/util.js +4 -0
- package/esm/api-doc/util.js.map +1 -0
- package/esm/constant/shape.d.ts +7 -14
- package/esm/constant/shape.js +1 -0
- package/esm/constant/shape.js.map +1 -1
- package/esm/index.d.ts +213 -113
- package/esm/index.js +11 -4
- package/esm/index.js.map +1 -1
- package/esm/item/combo.d.ts +13 -6
- package/esm/item/combo.js +72 -8
- package/esm/item/combo.js.map +1 -1
- package/esm/item/edge.d.ts +12 -9
- package/esm/item/edge.js +38 -11
- package/esm/item/edge.js.map +1 -1
- package/esm/item/item.d.ts +8 -6
- package/esm/item/item.js +124 -81
- package/esm/item/item.js.map +1 -1
- package/esm/item/node.d.ts +14 -9
- package/esm/item/node.js +63 -48
- package/esm/item/node.js.map +1 -1
- package/esm/runtime/controller/data.d.ts +17 -1
- package/esm/runtime/controller/data.js +320 -223
- package/esm/runtime/controller/data.js.map +1 -1
- package/esm/runtime/controller/interaction.d.ts +1 -0
- package/esm/runtime/controller/interaction.js +7 -4
- package/esm/runtime/controller/interaction.js.map +1 -1
- package/esm/runtime/controller/item.d.ts +37 -4
- package/esm/runtime/controller/item.js +475 -177
- package/esm/runtime/controller/item.js.map +1 -1
- package/esm/runtime/controller/layout.d.ts +4 -1
- package/esm/runtime/controller/layout.js +96 -14
- package/esm/runtime/controller/layout.js.map +1 -1
- package/esm/runtime/controller/plugin.d.ts +11 -0
- package/esm/runtime/controller/plugin.js +39 -6
- package/esm/runtime/controller/plugin.js.map +1 -1
- package/esm/runtime/controller/theme.js +8 -4
- package/esm/runtime/controller/theme.js.map +1 -1
- package/esm/runtime/graph.d.ts +181 -39
- package/esm/runtime/graph.js +561 -72
- package/esm/runtime/graph.js.map +1 -1
- package/esm/stdlib/behavior/activate-relations.d.ts +2 -3
- package/esm/stdlib/behavior/activate-relations.js +13 -9
- package/esm/stdlib/behavior/activate-relations.js.map +1 -1
- package/esm/stdlib/behavior/brush-select.d.ts +3 -4
- package/esm/stdlib/behavior/brush-select.js +2 -2
- package/esm/stdlib/behavior/brush-select.js.map +1 -1
- package/esm/stdlib/behavior/click-select.d.ts +2 -3
- package/esm/stdlib/behavior/click-select.js +8 -6
- package/esm/stdlib/behavior/click-select.js.map +1 -1
- package/esm/stdlib/behavior/collapse-expand-combo.d.ts +1 -2
- package/esm/stdlib/behavior/collapse-expand-combo.js +1 -1
- package/esm/stdlib/behavior/collapse-expand-combo.js.map +1 -1
- package/esm/stdlib/behavior/collapse-expand-tree.d.ts +44 -0
- package/esm/stdlib/behavior/collapse-expand-tree.js +69 -0
- package/esm/stdlib/behavior/collapse-expand-tree.js.map +1 -0
- package/esm/stdlib/behavior/drag-canvas.d.ts +1 -2
- package/esm/stdlib/behavior/drag-canvas.js +15 -11
- package/esm/stdlib/behavior/drag-canvas.js.map +1 -1
- package/esm/stdlib/behavior/drag-combo.d.ts +16 -4
- package/esm/stdlib/behavior/drag-combo.js +70 -31
- package/esm/stdlib/behavior/drag-combo.js.map +1 -1
- package/esm/stdlib/behavior/drag-node.d.ts +20 -4
- package/esm/stdlib/behavior/drag-node.js +145 -57
- package/esm/stdlib/behavior/drag-node.js.map +1 -1
- package/esm/stdlib/behavior/hover-activate.d.ts +1 -2
- package/esm/stdlib/behavior/hover-activate.js +1 -1
- package/esm/stdlib/behavior/hover-activate.js.map +1 -1
- package/esm/stdlib/behavior/index.d.ts +15 -0
- package/esm/stdlib/behavior/index.js +16 -0
- package/esm/stdlib/behavior/index.js.map +1 -0
- package/esm/stdlib/behavior/lasso-select.d.ts +7 -3
- package/esm/stdlib/behavior/lasso-select.js +2 -2
- package/esm/stdlib/behavior/lasso-select.js.map +1 -1
- package/esm/stdlib/behavior/orbit-canvas-3d.d.ts +2 -3
- package/esm/stdlib/behavior/orbit-canvas-3d.js +2 -2
- package/esm/stdlib/behavior/orbit-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/rotate-canvas-3d.d.ts +1 -2
- package/esm/stdlib/behavior/rotate-canvas-3d.js +1 -1
- package/esm/stdlib/behavior/rotate-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/track-canvas-3d.d.ts +2 -3
- package/esm/stdlib/behavior/track-canvas-3d.js +2 -2
- package/esm/stdlib/behavior/track-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/types.d.ts +13 -0
- package/esm/stdlib/behavior/types.js +2 -0
- package/esm/stdlib/behavior/types.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.d.ts +1 -2
- package/esm/stdlib/behavior/zoom-canvas-3d.js +7 -7
- package/esm/stdlib/behavior/zoom-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/zoom-canvas.d.ts +1 -2
- package/esm/stdlib/behavior/zoom-canvas.js +20 -18
- package/esm/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/esm/stdlib/data/index.d.ts +3 -0
- package/esm/stdlib/data/index.js +4 -0
- package/esm/stdlib/data/index.js.map +1 -0
- package/esm/stdlib/data/mapNodeSize.d.ts +12 -0
- package/esm/stdlib/data/mapNodeSize.js +43 -0
- package/esm/stdlib/data/mapNodeSize.js.map +1 -0
- package/esm/stdlib/data/transformV4Data.d.ts +9 -0
- package/esm/stdlib/data/transformV4Data.js +142 -0
- package/esm/stdlib/data/transformV4Data.js.map +1 -0
- package/esm/stdlib/data/validateData.d.ts +9 -0
- package/esm/stdlib/data/validateData.js +98 -0
- package/esm/stdlib/data/validateData.js.map +1 -0
- package/esm/stdlib/index.d.ts +113 -69
- package/esm/stdlib/index.js +150 -53
- package/esm/stdlib/index.js.map +1 -1
- package/esm/stdlib/item/combo/index.d.ts +2 -0
- package/esm/stdlib/item/combo/index.js +3 -0
- package/esm/stdlib/item/combo/index.js.map +1 -0
- package/esm/stdlib/item/combo/rect.d.ts +31 -0
- package/esm/stdlib/item/combo/rect.js +65 -0
- package/esm/stdlib/item/combo/rect.js.map +1 -0
- package/esm/stdlib/item/edge/base.d.ts +10 -1
- package/esm/stdlib/item/edge/base.js +36 -5
- package/esm/stdlib/item/edge/base.js.map +1 -1
- package/{lib/stdlib/item/edge/cubic-horizon.d.ts → esm/stdlib/item/edge/cubic-horizontal.d.ts} +6 -7
- package/esm/stdlib/item/edge/{cubic-horizon.js → cubic-horizontal.js} +18 -33
- package/esm/stdlib/item/edge/cubic-horizontal.js.map +1 -0
- package/esm/stdlib/item/edge/cubic-vertical.d.ts +7 -8
- package/esm/stdlib/item/edge/cubic-vertical.js +17 -32
- package/esm/stdlib/item/edge/cubic-vertical.js.map +1 -1
- package/esm/stdlib/item/edge/cubic.d.ts +7 -8
- package/esm/stdlib/item/edge/cubic.js +22 -5
- package/esm/stdlib/item/edge/cubic.js.map +1 -1
- package/esm/stdlib/item/edge/index.d.ts +5 -0
- package/esm/stdlib/item/edge/index.js +5 -0
- package/esm/stdlib/item/edge/index.js.map +1 -1
- package/esm/stdlib/item/edge/line.d.ts +1 -1
- package/esm/stdlib/item/edge/line.js +16 -1
- package/esm/stdlib/item/edge/line.js.map +1 -1
- package/esm/stdlib/item/edge/loop.d.ts +32 -0
- package/esm/stdlib/item/edge/loop.js +115 -0
- package/esm/stdlib/item/edge/loop.js.map +1 -0
- package/esm/stdlib/item/edge/polyline.d.ts +44 -0
- package/esm/stdlib/item/edge/polyline.js +92 -0
- package/esm/stdlib/item/edge/polyline.js.map +1 -0
- package/esm/stdlib/item/edge/quadratic.d.ts +5 -6
- package/esm/stdlib/item/edge/quadratic.js +31 -19
- package/esm/stdlib/item/edge/quadratic.js.map +1 -1
- package/esm/stdlib/item/node/base.d.ts +45 -1
- package/esm/stdlib/item/node/base.js +97 -12
- package/esm/stdlib/item/node/base.js.map +1 -1
- package/esm/stdlib/item/node/base3d.js +1 -1
- package/esm/stdlib/item/node/base3d.js.map +1 -1
- package/esm/stdlib/item/node/circle.js +5 -5
- package/esm/stdlib/item/node/circle.js.map +1 -1
- package/esm/stdlib/item/node/diamond.d.ts +32 -0
- package/esm/stdlib/item/node/diamond.js +79 -0
- package/esm/stdlib/item/node/diamond.js.map +1 -0
- package/esm/stdlib/item/node/donut.d.ts +70 -0
- package/esm/stdlib/item/node/donut.js +207 -0
- package/esm/stdlib/item/node/donut.js.map +1 -0
- package/esm/stdlib/item/node/ellipse.d.ts +32 -0
- package/esm/stdlib/item/node/ellipse.js +71 -0
- package/esm/stdlib/item/node/ellipse.js.map +1 -0
- package/esm/stdlib/item/node/hexagon.d.ts +33 -0
- package/esm/stdlib/item/node/hexagon.js +102 -0
- package/esm/stdlib/item/node/hexagon.js.map +1 -0
- package/esm/stdlib/item/node/index.d.ts +7 -0
- package/esm/stdlib/item/node/index.js +7 -0
- package/esm/stdlib/item/node/index.js.map +1 -1
- package/esm/stdlib/item/node/modelRect.d.ts +61 -0
- package/esm/stdlib/item/node/modelRect.js +186 -0
- package/esm/stdlib/item/node/modelRect.js.map +1 -0
- package/esm/stdlib/item/node/rect.d.ts +1 -0
- package/esm/stdlib/item/node/rect.js +16 -0
- package/esm/stdlib/item/node/rect.js.map +1 -1
- package/esm/stdlib/item/node/star.d.ts +34 -0
- package/esm/stdlib/item/node/star.js +115 -0
- package/esm/stdlib/item/node/star.js.map +1 -0
- package/esm/stdlib/item/node/triangle.d.ts +44 -0
- package/esm/stdlib/item/node/triangle.js +177 -0
- package/esm/stdlib/item/node/triangle.js.map +1 -0
- package/esm/stdlib/plugin/fisheye/index.d.ts +32 -4
- package/esm/stdlib/plugin/fisheye/index.js +3 -2
- package/esm/stdlib/plugin/fisheye/index.js.map +1 -1
- package/esm/stdlib/plugin/grid/index.d.ts +36 -0
- package/esm/stdlib/plugin/grid/index.js +81 -0
- package/esm/stdlib/plugin/grid/index.js.map +1 -0
- package/esm/stdlib/plugin/history/combo-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/combo-command.js +21 -0
- package/esm/stdlib/plugin/history/combo-command.js.map +1 -0
- package/esm/stdlib/plugin/history/command.d.ts +18 -0
- package/esm/stdlib/plugin/history/command.js +51 -0
- package/esm/stdlib/plugin/history/command.js.map +1 -0
- package/esm/stdlib/plugin/history/index.d.ts +112 -0
- package/esm/stdlib/plugin/history/index.js +275 -0
- package/esm/stdlib/plugin/history/index.js.map +1 -0
- package/esm/stdlib/plugin/history/item-data-command.d.ts +14 -0
- package/esm/stdlib/plugin/history/item-data-command.js +63 -0
- package/esm/stdlib/plugin/history/item-data-command.js.map +1 -0
- package/esm/stdlib/plugin/history/layer-updated-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/layer-updated-command.js +21 -0
- package/esm/stdlib/plugin/history/layer-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/history/state-updated-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/state-updated-command.js +20 -0
- package/esm/stdlib/plugin/history/state-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.d.ts +10 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.js +23 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/hull/bubbleset.d.ts +9 -0
- package/esm/stdlib/plugin/hull/bubbleset.js +592 -0
- package/esm/stdlib/plugin/hull/bubbleset.js.map +1 -0
- package/esm/stdlib/plugin/hull/convexHull.d.ts +14 -0
- package/esm/stdlib/plugin/hull/convexHull.js +56 -0
- package/esm/stdlib/plugin/hull/convexHull.js.map +1 -0
- package/esm/stdlib/plugin/hull/hullComponent.d.ts +87 -0
- package/esm/stdlib/plugin/hull/hullComponent.js +382 -0
- package/esm/stdlib/plugin/hull/hullComponent.js.map +1 -0
- package/esm/stdlib/plugin/hull/index.d.ts +59 -0
- package/esm/stdlib/plugin/hull/index.js +161 -0
- package/esm/stdlib/plugin/hull/index.js.map +1 -0
- package/esm/stdlib/plugin/hull/types.d.ts +15 -0
- package/esm/stdlib/plugin/hull/types.js +2 -0
- package/esm/stdlib/plugin/hull/types.js.map +1 -0
- package/esm/stdlib/plugin/hull/util.d.ts +77 -0
- package/esm/stdlib/plugin/hull/util.js +401 -0
- package/esm/stdlib/plugin/hull/util.js.map +1 -0
- package/esm/stdlib/plugin/index.d.ts +8 -0
- package/esm/stdlib/plugin/index.js +9 -0
- package/esm/stdlib/plugin/index.js.map +1 -0
- package/esm/stdlib/plugin/legend/index.d.ts +45 -3
- package/esm/stdlib/plugin/legend/index.js +47 -42
- package/esm/stdlib/plugin/legend/index.js.map +1 -1
- package/esm/stdlib/plugin/menu/index.d.ts +18 -5
- package/esm/stdlib/plugin/menu/index.js +4 -3
- package/esm/stdlib/plugin/menu/index.js.map +1 -1
- package/esm/stdlib/plugin/minimap/index.d.ts +11 -3
- package/esm/stdlib/plugin/minimap/index.js +19 -21
- package/esm/stdlib/plugin/minimap/index.js.map +1 -1
- package/esm/stdlib/plugin/toolbar/index.d.ts +59 -0
- package/esm/stdlib/plugin/toolbar/index.js +215 -0
- package/esm/stdlib/plugin/toolbar/index.js.map +1 -0
- package/esm/stdlib/plugin/tooltip/index.d.ts +24 -3
- package/esm/stdlib/plugin/tooltip/index.js +13 -12
- package/esm/stdlib/plugin/tooltip/index.js.map +1 -1
- package/esm/stdlib/plugin/types.d.ts +8 -0
- package/esm/stdlib/plugin/types.js +2 -0
- package/esm/stdlib/plugin/types.js.map +1 -0
- package/esm/stdlib/theme/dark.d.ts +1 -2
- package/esm/stdlib/theme/dark.js +9 -1
- package/esm/stdlib/theme/dark.js.map +1 -1
- package/esm/stdlib/theme/index.d.ts +2 -0
- package/esm/stdlib/theme/index.js +3 -0
- package/esm/stdlib/theme/index.js.map +1 -0
- package/esm/stdlib/theme/light.d.ts +1 -2
- package/esm/stdlib/theme/light.js +12 -2
- package/esm/stdlib/theme/light.js.map +1 -1
- package/esm/stdlib/themeSolver/base.d.ts +1 -1
- package/esm/stdlib/themeSolver/base.js +1 -1
- package/esm/stdlib/themeSolver/base.js.map +1 -1
- package/esm/stdlib/themeSolver/index.d.ts +3 -0
- package/esm/stdlib/themeSolver/index.js +4 -0
- package/esm/stdlib/themeSolver/index.js.map +1 -0
- package/esm/stdlib/themeSolver/spec.d.ts +2 -4
- package/esm/stdlib/themeSolver/spec.js +2 -2
- package/esm/stdlib/themeSolver/spec.js.map +1 -1
- package/esm/stdlib/themeSolver/subject.d.ts +2 -4
- package/esm/stdlib/themeSolver/subject.js +2 -2
- package/esm/stdlib/themeSolver/subject.js.map +1 -1
- package/esm/types/behavior.js.map +1 -1
- package/esm/types/combo.d.ts +3 -4
- package/esm/types/common.d.ts +10 -0
- package/esm/types/data.d.ts +10 -4
- package/esm/types/edge.d.ts +17 -2
- package/esm/types/graph.d.ts +129 -16
- package/esm/types/history.d.ts +28 -0
- package/esm/types/history.js +6 -0
- package/esm/types/history.js.map +1 -0
- package/esm/types/hook.d.ts +25 -5
- package/esm/types/index.d.ts +11 -5
- package/esm/types/index.js.map +1 -1
- package/esm/types/item.d.ts +10 -4
- package/esm/types/item.js.map +1 -1
- package/esm/types/layout.d.ts +4 -1
- package/esm/types/loop.d.ts +21 -0
- package/esm/types/loop.js +12 -0
- package/esm/types/loop.js.map +1 -0
- package/esm/types/node.d.ts +87 -6
- package/esm/types/plugin.d.ts +4 -0
- package/esm/types/plugin.js +1 -1
- package/esm/types/plugin.js.map +1 -1
- package/esm/types/spec.d.ts +26 -9
- package/esm/types/theme.d.ts +76 -10
- package/esm/types/theme.js +1 -2
- package/esm/types/theme.js.map +1 -1
- package/esm/util/animate.d.ts +2 -2
- package/esm/util/animate.js +52 -17
- package/esm/util/animate.js.map +1 -1
- package/esm/util/array.d.ts +8 -0
- package/esm/util/array.js +11 -1
- package/esm/util/array.js.map +1 -1
- package/esm/util/arrow.d.ts +17 -0
- package/esm/util/arrow.js +56 -0
- package/esm/util/arrow.js.map +1 -0
- package/esm/util/bbox.d.ts +106 -0
- package/esm/util/bbox.js +255 -0
- package/esm/util/bbox.js.map +1 -0
- package/esm/util/behavior.d.ts +2 -0
- package/esm/util/behavior.js +12 -0
- package/esm/util/behavior.js.map +1 -0
- package/esm/util/canvas.d.ts +1 -2
- package/esm/util/canvas.js +3 -20
- package/esm/util/canvas.js.map +1 -1
- package/esm/util/data.d.ts +33 -2
- package/esm/util/data.js +117 -5
- package/esm/util/data.js.map +1 -1
- package/esm/util/event.d.ts +22 -2
- package/esm/util/event.js +54 -0
- package/esm/util/event.js.map +1 -1
- package/esm/util/extend.d.ts +8 -2
- package/esm/util/extend.js.map +1 -1
- package/esm/util/index.d.ts +41 -3
- package/esm/util/index.js +20 -1
- package/esm/util/index.js.map +1 -1
- package/esm/util/item.d.ts +1 -1
- package/esm/util/item.js +7 -5
- package/esm/util/item.js.map +1 -1
- package/esm/util/layout.d.ts +40 -0
- package/esm/util/layout.js +160 -0
- package/esm/util/layout.js.map +1 -0
- package/esm/util/loop.d.ts +37 -0
- package/esm/util/loop.js +104 -0
- package/esm/util/loop.js.map +1 -0
- package/esm/util/mapper.js +4 -9
- package/esm/util/mapper.js.map +1 -1
- package/esm/util/math.d.ts +15 -0
- package/esm/util/math.js +14 -0
- package/esm/util/math.js.map +1 -1
- package/esm/util/mock.d.ts +30 -0
- package/esm/util/mock.js +69 -0
- package/esm/util/mock.js.map +1 -0
- package/esm/util/path.d.ts +11 -0
- package/esm/util/path.js +44 -0
- package/esm/util/path.js.map +1 -0
- package/esm/util/point.d.ts +24 -2
- package/esm/util/point.js +27 -2
- package/esm/util/point.js.map +1 -1
- package/esm/util/polyline.d.ts +113 -0
- package/esm/util/polyline.js +505 -0
- package/esm/util/polyline.js.map +1 -0
- package/esm/util/router.d.ts +31 -0
- package/esm/util/router.js +380 -0
- package/esm/util/router.js.map +1 -0
- package/esm/util/shape.d.ts +3 -3
- package/esm/util/shape.js +19 -3
- package/esm/util/shape.js.map +1 -1
- package/esm/util/shape3d.d.ts +1 -1
- package/esm/util/shape3d.js +12 -6
- package/esm/util/shape3d.js.map +1 -1
- package/esm/util/type.d.ts +6 -0
- package/esm/util/type.js +7 -1
- package/esm/util/type.js.map +1 -1
- package/esm/util/zoom.d.ts +1 -1
- package/esm/util/zoom.js +6 -2
- package/esm/util/zoom.js.map +1 -1
- package/lib/api-doc/behaviors.d.ts +2 -0
- package/lib/api-doc/behaviors.js +18 -0
- package/lib/api-doc/behaviors.js.map +1 -0
- package/lib/api-doc/graph.d.ts +4 -0
- package/lib/api-doc/graph.js +11 -0
- package/lib/api-doc/graph.js.map +1 -0
- package/lib/api-doc/item.d.ts +9 -0
- package/lib/api-doc/item.js +21 -0
- package/lib/api-doc/item.js.map +1 -0
- package/lib/api-doc/layout.d.ts +1 -0
- package/lib/api-doc/layout.js +3 -0
- package/lib/api-doc/layout.js.map +1 -0
- package/lib/api-doc/plugins.d.ts +1 -0
- package/lib/api-doc/plugins.js +18 -0
- package/lib/api-doc/plugins.js.map +1 -0
- package/lib/api-doc/types.d.ts +0 -0
- package/lib/api-doc/types.js +3 -0
- package/lib/api-doc/types.js.map +1 -0
- package/lib/api-doc/util.d.ts +3 -0
- package/lib/api-doc/util.js +10 -0
- package/lib/api-doc/util.js.map +1 -0
- package/lib/constant/shape.d.ts +7 -14
- package/lib/constant/shape.js +1 -0
- package/lib/constant/shape.js.map +1 -1
- package/lib/index.d.ts +213 -113
- package/lib/index.js +13 -3
- package/lib/index.js.map +1 -1
- package/lib/item/combo.d.ts +13 -6
- package/lib/item/combo.js +72 -8
- package/lib/item/combo.js.map +1 -1
- package/lib/item/edge.d.ts +12 -9
- package/lib/item/edge.js +38 -11
- package/lib/item/edge.js.map +1 -1
- package/lib/item/item.d.ts +8 -6
- package/lib/item/item.js +123 -80
- package/lib/item/item.js.map +1 -1
- package/lib/item/node.d.ts +14 -9
- package/lib/item/node.js +63 -48
- package/lib/item/node.js.map +1 -1
- package/lib/runtime/controller/data.d.ts +17 -1
- package/lib/runtime/controller/data.js +318 -221
- package/lib/runtime/controller/data.js.map +1 -1
- package/lib/runtime/controller/interaction.d.ts +1 -0
- package/lib/runtime/controller/interaction.js +7 -4
- package/lib/runtime/controller/interaction.js.map +1 -1
- package/lib/runtime/controller/item.d.ts +37 -4
- package/lib/runtime/controller/item.js +474 -176
- package/lib/runtime/controller/item.js.map +1 -1
- package/lib/runtime/controller/layout.d.ts +4 -1
- package/lib/runtime/controller/layout.js +119 -14
- package/lib/runtime/controller/layout.js.map +1 -1
- package/lib/runtime/controller/plugin.d.ts +11 -0
- package/lib/runtime/controller/plugin.js +39 -6
- package/lib/runtime/controller/plugin.js.map +1 -1
- package/lib/runtime/controller/theme.js +8 -4
- package/lib/runtime/controller/theme.js.map +1 -1
- package/lib/runtime/graph.d.ts +181 -39
- package/lib/runtime/graph.js +560 -71
- package/lib/runtime/graph.js.map +1 -1
- package/lib/stdlib/behavior/activate-relations.d.ts +2 -3
- package/lib/stdlib/behavior/activate-relations.js +14 -9
- package/lib/stdlib/behavior/activate-relations.js.map +1 -1
- package/lib/stdlib/behavior/brush-select.d.ts +3 -4
- package/lib/stdlib/behavior/brush-select.js +3 -2
- package/lib/stdlib/behavior/brush-select.js.map +1 -1
- package/lib/stdlib/behavior/click-select.d.ts +2 -3
- package/lib/stdlib/behavior/click-select.js +9 -6
- package/lib/stdlib/behavior/click-select.js.map +1 -1
- package/lib/stdlib/behavior/collapse-expand-combo.d.ts +1 -2
- package/lib/stdlib/behavior/collapse-expand-combo.js +2 -1
- package/lib/stdlib/behavior/collapse-expand-combo.js.map +1 -1
- package/lib/stdlib/behavior/collapse-expand-tree.d.ts +44 -0
- package/lib/stdlib/behavior/collapse-expand-tree.js +73 -0
- package/lib/stdlib/behavior/collapse-expand-tree.js.map +1 -0
- package/lib/stdlib/behavior/drag-canvas.d.ts +1 -2
- package/lib/stdlib/behavior/drag-canvas.js +16 -11
- package/lib/stdlib/behavior/drag-canvas.js.map +1 -1
- package/lib/stdlib/behavior/drag-combo.d.ts +16 -4
- package/lib/stdlib/behavior/drag-combo.js +70 -30
- package/lib/stdlib/behavior/drag-combo.js.map +1 -1
- package/lib/stdlib/behavior/drag-node.d.ts +20 -4
- package/lib/stdlib/behavior/drag-node.js +145 -56
- package/lib/stdlib/behavior/drag-node.js.map +1 -1
- package/lib/stdlib/behavior/hover-activate.d.ts +1 -2
- package/lib/stdlib/behavior/hover-activate.js +2 -1
- package/lib/stdlib/behavior/hover-activate.js.map +1 -1
- package/lib/stdlib/behavior/index.d.ts +15 -0
- package/lib/stdlib/behavior/index.js +32 -0
- package/lib/stdlib/behavior/index.js.map +1 -0
- package/lib/stdlib/behavior/lasso-select.d.ts +7 -3
- package/lib/stdlib/behavior/lasso-select.js +4 -6
- package/lib/stdlib/behavior/lasso-select.js.map +1 -1
- package/lib/stdlib/behavior/orbit-canvas-3d.d.ts +2 -3
- package/lib/stdlib/behavior/orbit-canvas-3d.js +4 -6
- package/lib/stdlib/behavior/orbit-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/rotate-canvas-3d.d.ts +1 -2
- package/lib/stdlib/behavior/rotate-canvas-3d.js +2 -1
- package/lib/stdlib/behavior/rotate-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/track-canvas-3d.d.ts +2 -3
- package/lib/stdlib/behavior/track-canvas-3d.js +4 -6
- package/lib/stdlib/behavior/track-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/types.d.ts +13 -0
- package/lib/stdlib/behavior/types.js +3 -0
- package/lib/stdlib/behavior/types.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.d.ts +1 -2
- package/lib/stdlib/behavior/zoom-canvas-3d.js +8 -7
- package/lib/stdlib/behavior/zoom-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/zoom-canvas.d.ts +1 -2
- package/lib/stdlib/behavior/zoom-canvas.js +21 -18
- package/lib/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/lib/stdlib/data/index.d.ts +3 -0
- package/lib/stdlib/data/index.js +20 -0
- package/lib/stdlib/data/index.js.map +1 -0
- package/lib/stdlib/data/mapNodeSize.d.ts +12 -0
- package/lib/stdlib/data/mapNodeSize.js +47 -0
- package/lib/stdlib/data/mapNodeSize.js.map +1 -0
- package/lib/stdlib/data/transformV4Data.d.ts +9 -0
- package/lib/stdlib/data/transformV4Data.js +146 -0
- package/lib/stdlib/data/transformV4Data.js.map +1 -0
- package/lib/stdlib/data/validateData.d.ts +9 -0
- package/lib/stdlib/data/validateData.js +102 -0
- package/lib/stdlib/data/validateData.js.map +1 -0
- package/lib/stdlib/index.d.ts +113 -69
- package/lib/stdlib/index.js +188 -67
- package/lib/stdlib/index.js.map +1 -1
- package/lib/stdlib/item/combo/index.d.ts +2 -0
- package/lib/stdlib/item/combo/index.js +19 -0
- package/lib/stdlib/item/combo/index.js.map +1 -0
- package/lib/stdlib/item/combo/rect.d.ts +31 -0
- package/lib/stdlib/item/combo/rect.js +69 -0
- package/lib/stdlib/item/combo/rect.js.map +1 -0
- package/lib/stdlib/item/edge/base.d.ts +10 -1
- package/lib/stdlib/item/edge/base.js +35 -4
- package/lib/stdlib/item/edge/base.js.map +1 -1
- package/{esm/stdlib/item/edge/cubic-horizon.d.ts → lib/stdlib/item/edge/cubic-horizontal.d.ts} +6 -7
- package/lib/stdlib/item/edge/{cubic-horizon.js → cubic-horizontal.js} +20 -35
- package/lib/stdlib/item/edge/cubic-horizontal.js.map +1 -0
- package/lib/stdlib/item/edge/cubic-vertical.d.ts +7 -8
- package/lib/stdlib/item/edge/cubic-vertical.js +17 -32
- package/lib/stdlib/item/edge/cubic-vertical.js.map +1 -1
- package/lib/stdlib/item/edge/cubic.d.ts +7 -8
- package/lib/stdlib/item/edge/cubic.js +22 -5
- package/lib/stdlib/item/edge/cubic.js.map +1 -1
- package/lib/stdlib/item/edge/index.d.ts +5 -0
- package/lib/stdlib/item/edge/index.js +5 -0
- package/lib/stdlib/item/edge/index.js.map +1 -1
- package/lib/stdlib/item/edge/line.d.ts +1 -1
- package/lib/stdlib/item/edge/line.js +16 -1
- package/lib/stdlib/item/edge/line.js.map +1 -1
- package/lib/stdlib/item/edge/loop.d.ts +32 -0
- package/lib/stdlib/item/edge/loop.js +119 -0
- package/lib/stdlib/item/edge/loop.js.map +1 -0
- package/lib/stdlib/item/edge/polyline.d.ts +44 -0
- package/lib/stdlib/item/edge/polyline.js +96 -0
- package/lib/stdlib/item/edge/polyline.js.map +1 -0
- package/lib/stdlib/item/edge/quadratic.d.ts +5 -6
- package/lib/stdlib/item/edge/quadratic.js +33 -21
- package/lib/stdlib/item/edge/quadratic.js.map +1 -1
- package/lib/stdlib/item/node/base.d.ts +45 -1
- package/lib/stdlib/item/node/base.js +97 -12
- package/lib/stdlib/item/node/base.js.map +1 -1
- package/lib/stdlib/item/node/base3d.js +1 -1
- package/lib/stdlib/item/node/base3d.js.map +1 -1
- package/lib/stdlib/item/node/circle.js +5 -5
- package/lib/stdlib/item/node/circle.js.map +1 -1
- package/lib/stdlib/item/node/diamond.d.ts +32 -0
- package/lib/stdlib/item/node/diamond.js +83 -0
- package/lib/stdlib/item/node/diamond.js.map +1 -0
- package/lib/stdlib/item/node/donut.d.ts +70 -0
- package/lib/stdlib/item/node/donut.js +211 -0
- package/lib/stdlib/item/node/donut.js.map +1 -0
- package/lib/stdlib/item/node/ellipse.d.ts +32 -0
- package/lib/stdlib/item/node/ellipse.js +75 -0
- package/lib/stdlib/item/node/ellipse.js.map +1 -0
- package/lib/stdlib/item/node/hexagon.d.ts +33 -0
- package/lib/stdlib/item/node/hexagon.js +106 -0
- package/lib/stdlib/item/node/hexagon.js.map +1 -0
- package/lib/stdlib/item/node/index.d.ts +7 -0
- package/lib/stdlib/item/node/index.js +7 -0
- package/lib/stdlib/item/node/index.js.map +1 -1
- package/lib/stdlib/item/node/modelRect.d.ts +61 -0
- package/lib/stdlib/item/node/modelRect.js +190 -0
- package/lib/stdlib/item/node/modelRect.js.map +1 -0
- package/lib/stdlib/item/node/rect.d.ts +1 -0
- package/lib/stdlib/item/node/rect.js +16 -0
- package/lib/stdlib/item/node/rect.js.map +1 -1
- package/lib/stdlib/item/node/star.d.ts +34 -0
- package/lib/stdlib/item/node/star.js +119 -0
- package/lib/stdlib/item/node/star.js.map +1 -0
- package/lib/stdlib/item/node/triangle.d.ts +44 -0
- package/lib/stdlib/item/node/triangle.js +181 -0
- package/lib/stdlib/item/node/triangle.js.map +1 -0
- package/lib/stdlib/plugin/fisheye/index.d.ts +32 -4
- package/lib/stdlib/plugin/fisheye/index.js +3 -1
- package/lib/stdlib/plugin/fisheye/index.js.map +1 -1
- package/lib/stdlib/plugin/grid/index.d.ts +36 -0
- package/lib/stdlib/plugin/grid/index.js +85 -0
- package/lib/stdlib/plugin/grid/index.js.map +1 -0
- package/lib/stdlib/plugin/history/combo-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/combo-command.js +25 -0
- package/lib/stdlib/plugin/history/combo-command.js.map +1 -0
- package/lib/stdlib/plugin/history/command.d.ts +18 -0
- package/lib/stdlib/plugin/history/command.js +54 -0
- package/lib/stdlib/plugin/history/command.js.map +1 -0
- package/lib/stdlib/plugin/history/index.d.ts +112 -0
- package/lib/stdlib/plugin/history/index.js +283 -0
- package/lib/stdlib/plugin/history/index.js.map +1 -0
- package/lib/stdlib/plugin/history/item-data-command.d.ts +14 -0
- package/lib/stdlib/plugin/history/item-data-command.js +67 -0
- package/lib/stdlib/plugin/history/item-data-command.js.map +1 -0
- package/lib/stdlib/plugin/history/layer-updated-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/layer-updated-command.js +25 -0
- package/lib/stdlib/plugin/history/layer-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/history/state-updated-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/state-updated-command.js +24 -0
- package/lib/stdlib/plugin/history/state-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.d.ts +10 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.js +27 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/hull/bubbleset.d.ts +9 -0
- package/lib/stdlib/plugin/hull/bubbleset.js +596 -0
- package/lib/stdlib/plugin/hull/bubbleset.js.map +1 -0
- package/lib/stdlib/plugin/hull/convexHull.d.ts +14 -0
- package/lib/stdlib/plugin/hull/convexHull.js +61 -0
- package/lib/stdlib/plugin/hull/convexHull.js.map +1 -0
- package/lib/stdlib/plugin/hull/hullComponent.d.ts +87 -0
- package/lib/stdlib/plugin/hull/hullComponent.js +385 -0
- package/lib/stdlib/plugin/hull/hullComponent.js.map +1 -0
- package/lib/stdlib/plugin/hull/index.d.ts +59 -0
- package/lib/stdlib/plugin/hull/index.js +167 -0
- package/lib/stdlib/plugin/hull/index.js.map +1 -0
- package/lib/stdlib/plugin/hull/types.d.ts +15 -0
- package/lib/stdlib/plugin/hull/types.js +3 -0
- package/lib/stdlib/plugin/hull/types.js.map +1 -0
- package/lib/stdlib/plugin/hull/util.d.ts +77 -0
- package/lib/stdlib/plugin/hull/util.js +419 -0
- package/lib/stdlib/plugin/hull/util.js.map +1 -0
- package/lib/stdlib/plugin/index.d.ts +8 -0
- package/lib/stdlib/plugin/index.js +25 -0
- package/lib/stdlib/plugin/index.js.map +1 -0
- package/lib/stdlib/plugin/legend/index.d.ts +45 -3
- package/lib/stdlib/plugin/legend/index.js +46 -40
- package/lib/stdlib/plugin/legend/index.js.map +1 -1
- package/lib/stdlib/plugin/menu/index.d.ts +18 -5
- package/lib/stdlib/plugin/menu/index.js +5 -3
- package/lib/stdlib/plugin/menu/index.js.map +1 -1
- package/lib/stdlib/plugin/minimap/index.d.ts +11 -3
- package/lib/stdlib/plugin/minimap/index.js +19 -20
- package/lib/stdlib/plugin/minimap/index.js.map +1 -1
- package/lib/stdlib/plugin/toolbar/index.d.ts +59 -0
- package/lib/stdlib/plugin/toolbar/index.js +222 -0
- package/lib/stdlib/plugin/toolbar/index.js.map +1 -0
- package/lib/stdlib/plugin/tooltip/index.d.ts +24 -3
- package/lib/stdlib/plugin/tooltip/index.js +14 -12
- package/lib/stdlib/plugin/tooltip/index.js.map +1 -1
- package/lib/stdlib/plugin/types.d.ts +8 -0
- package/lib/stdlib/plugin/types.js +3 -0
- package/lib/stdlib/plugin/types.js.map +1 -0
- package/lib/stdlib/theme/dark.d.ts +1 -2
- package/lib/stdlib/theme/dark.js +10 -1
- package/lib/stdlib/theme/dark.js.map +1 -1
- package/lib/stdlib/theme/index.d.ts +2 -0
- package/lib/stdlib/theme/index.js +19 -0
- package/lib/stdlib/theme/index.js.map +1 -0
- package/lib/stdlib/theme/light.d.ts +1 -2
- package/lib/stdlib/theme/light.js +13 -2
- package/lib/stdlib/theme/light.js.map +1 -1
- package/lib/stdlib/themeSolver/base.d.ts +1 -1
- package/lib/stdlib/themeSolver/base.js +2 -1
- package/lib/stdlib/themeSolver/base.js.map +1 -1
- package/lib/stdlib/themeSolver/index.d.ts +3 -0
- package/lib/stdlib/themeSolver/index.js +20 -0
- package/lib/stdlib/themeSolver/index.js.map +1 -0
- package/lib/stdlib/themeSolver/spec.d.ts +2 -4
- package/lib/stdlib/themeSolver/spec.js +4 -6
- package/lib/stdlib/themeSolver/spec.js.map +1 -1
- package/lib/stdlib/themeSolver/subject.d.ts +2 -4
- package/lib/stdlib/themeSolver/subject.js +4 -4
- package/lib/stdlib/themeSolver/subject.js.map +1 -1
- package/lib/types/behavior.js.map +1 -1
- package/lib/types/combo.d.ts +3 -4
- package/lib/types/common.d.ts +10 -0
- package/lib/types/data.d.ts +10 -4
- package/lib/types/edge.d.ts +17 -2
- package/lib/types/graph.d.ts +129 -16
- package/lib/types/history.d.ts +28 -0
- package/lib/types/history.js +9 -0
- package/lib/types/history.js.map +1 -0
- package/lib/types/hook.d.ts +25 -5
- package/lib/types/index.d.ts +11 -5
- package/lib/types/index.js.map +1 -1
- package/lib/types/item.d.ts +10 -4
- package/lib/types/item.js.map +1 -1
- package/lib/types/layout.d.ts +4 -1
- package/lib/types/loop.d.ts +21 -0
- package/lib/types/loop.js +15 -0
- package/lib/types/loop.js.map +1 -0
- package/lib/types/node.d.ts +87 -6
- package/lib/types/plugin.d.ts +4 -0
- package/lib/types/plugin.js.map +1 -1
- package/lib/types/spec.d.ts +26 -9
- package/lib/types/theme.d.ts +76 -10
- package/lib/types/theme.js +1 -2
- package/lib/types/theme.js.map +1 -1
- package/lib/util/animate.d.ts +2 -2
- package/lib/util/animate.js +52 -17
- package/lib/util/animate.js.map +1 -1
- package/lib/util/array.d.ts +8 -0
- package/lib/util/array.js +13 -2
- package/lib/util/array.js.map +1 -1
- package/lib/util/arrow.d.ts +17 -0
- package/lib/util/arrow.js +60 -0
- package/lib/util/arrow.js.map +1 -0
- package/lib/util/bbox.d.ts +106 -0
- package/lib/util/bbox.js +273 -0
- package/lib/util/bbox.js.map +1 -0
- package/lib/util/behavior.d.ts +2 -0
- package/lib/util/behavior.js +16 -0
- package/lib/util/behavior.js.map +1 -0
- package/lib/util/canvas.d.ts +1 -2
- package/lib/util/canvas.js +3 -20
- package/lib/util/canvas.js.map +1 -1
- package/lib/util/data.d.ts +33 -2
- package/lib/util/data.js +121 -6
- package/lib/util/data.js.map +1 -1
- package/lib/util/event.d.ts +22 -2
- package/lib/util/event.js +56 -1
- package/lib/util/event.js.map +1 -1
- package/lib/util/extend.d.ts +8 -2
- package/lib/util/extend.js.map +1 -1
- package/lib/util/index.d.ts +41 -3
- package/lib/util/index.js +20 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/item.d.ts +1 -1
- package/lib/util/item.js +7 -5
- package/lib/util/item.js.map +1 -1
- package/lib/util/layout.d.ts +40 -0
- package/lib/util/layout.js +172 -0
- package/lib/util/layout.js.map +1 -0
- package/lib/util/loop.d.ts +37 -0
- package/lib/util/loop.js +111 -0
- package/lib/util/loop.js.map +1 -0
- package/lib/util/mapper.js +4 -9
- package/lib/util/mapper.js.map +1 -1
- package/lib/util/math.d.ts +15 -0
- package/lib/util/math.js +17 -1
- package/lib/util/math.js.map +1 -1
- package/lib/util/mock.d.ts +30 -0
- package/lib/util/mock.js +73 -0
- package/lib/util/mock.js.map +1 -0
- package/lib/util/path.d.ts +11 -0
- package/lib/util/path.js +49 -0
- package/lib/util/path.js.map +1 -0
- package/lib/util/point.d.ts +24 -2
- package/lib/util/point.js +31 -3
- package/lib/util/point.js.map +1 -1
- package/lib/util/polyline.d.ts +113 -0
- package/lib/util/polyline.js +524 -0
- package/lib/util/polyline.js.map +1 -0
- package/lib/util/router.d.ts +31 -0
- package/lib/util/router.js +384 -0
- package/lib/util/router.js.map +1 -0
- package/lib/util/shape.d.ts +3 -3
- package/lib/util/shape.js +19 -3
- package/lib/util/shape.js.map +1 -1
- package/lib/util/shape3d.d.ts +1 -1
- package/lib/util/shape3d.js +11 -5
- package/lib/util/shape3d.js.map +1 -1
- package/lib/util/type.d.ts +6 -0
- package/lib/util/type.js +9 -2
- package/lib/util/type.js.map +1 -1
- package/lib/util/zoom.d.ts +1 -1
- package/lib/util/zoom.js +6 -2
- package/lib/util/zoom.js.map +1 -1
- package/package.json +35 -15
- package/src/api-doc/behaviors.ts +2 -0
- package/src/api-doc/graph.ts +4 -0
- package/src/api-doc/item.ts +43 -0
- package/src/api-doc/layout.ts +13 -0
- package/src/api-doc/plugins.ts +1 -0
- package/src/api-doc/readme.md +59 -0
- package/src/api-doc/types.ts +2 -0
- package/src/api-doc/util.ts +3 -0
- package/src/constant/shape.ts +4 -1
- package/src/index.ts +14 -4
- package/src/item/combo.ts +105 -18
- package/src/item/edge.ts +68 -18
- package/src/item/item.ts +138 -82
- package/src/item/node.ts +100 -54
- package/src/runtime/controller/data.ts +410 -258
- package/src/runtime/controller/interaction.ts +8 -4
- package/src/runtime/controller/item.ts +690 -252
- package/src/runtime/controller/layout.ts +147 -14
- package/src/runtime/controller/plugin.ts +47 -10
- package/src/runtime/controller/theme.ts +8 -4
- package/src/runtime/graph.ts +721 -130
- package/src/stdlib/behavior/activate-relations.ts +14 -11
- package/src/stdlib/behavior/brush-select.ts +4 -5
- package/src/stdlib/behavior/click-select.ts +12 -10
- package/src/stdlib/behavior/collapse-expand-combo.ts +1 -3
- package/src/stdlib/behavior/collapse-expand-tree.ts +106 -0
- package/src/stdlib/behavior/drag-canvas.ts +15 -13
- package/src/stdlib/behavior/drag-combo.ts +109 -53
- package/src/stdlib/behavior/drag-node.ts +220 -83
- package/src/stdlib/behavior/hover-activate.ts +1 -2
- package/src/stdlib/behavior/index.ts +15 -0
- package/src/stdlib/behavior/lasso-select.ts +6 -2
- package/src/stdlib/behavior/orbit-canvas-3d.ts +2 -4
- package/src/stdlib/behavior/rotate-canvas-3d.ts +1 -3
- package/src/stdlib/behavior/track-canvas-3d.ts +2 -4
- package/src/stdlib/behavior/types.ts +15 -0
- package/src/stdlib/behavior/zoom-canvas-3d.ts +5 -7
- package/src/stdlib/behavior/zoom-canvas.ts +19 -19
- package/src/stdlib/data/index.ts +3 -0
- package/src/stdlib/data/mapNodeSize.ts +67 -0
- package/src/stdlib/data/transformV4Data.ts +207 -0
- package/src/stdlib/data/validateData.ts +146 -0
- package/src/stdlib/index.ts +215 -53
- package/src/stdlib/item/combo/index.ts +2 -0
- package/src/stdlib/item/combo/rect.ts +123 -0
- package/src/stdlib/item/edge/base.ts +66 -4
- package/src/stdlib/item/edge/{cubic-horizon.ts → cubic-horizontal.ts} +25 -53
- package/src/stdlib/item/edge/cubic-vertical.ts +24 -55
- package/src/stdlib/item/edge/cubic.ts +36 -36
- package/src/stdlib/item/edge/index.ts +5 -0
- package/src/stdlib/item/edge/line.ts +14 -15
- package/src/stdlib/item/edge/loop.ts +162 -0
- package/src/stdlib/item/edge/polyline.ts +161 -0
- package/src/stdlib/item/edge/quadratic.ts +34 -37
- package/src/stdlib/item/node/base.ts +116 -12
- package/src/stdlib/item/node/base3d.ts +2 -0
- package/src/stdlib/item/node/circle.ts +5 -5
- package/src/stdlib/item/node/diamond.ts +144 -0
- package/src/stdlib/item/node/donut.ts +368 -0
- package/src/stdlib/item/node/ellipse.ts +128 -0
- package/src/stdlib/item/node/hexagon.ts +168 -0
- package/src/stdlib/item/node/index.ts +7 -0
- package/src/stdlib/item/node/modelRect.ts +405 -0
- package/src/stdlib/item/node/rect.ts +17 -0
- package/src/stdlib/item/node/star.ts +181 -0
- package/src/stdlib/item/node/triangle.ts +265 -0
- package/src/stdlib/plugin/fisheye/index.ts +35 -6
- package/src/stdlib/plugin/grid/index.ts +125 -0
- package/src/stdlib/plugin/history/combo-command.ts +28 -0
- package/src/stdlib/plugin/history/command.ts +81 -0
- package/src/stdlib/plugin/history/index.ts +347 -0
- package/src/stdlib/plugin/history/item-data-command.ts +96 -0
- package/src/stdlib/plugin/history/layer-updated-command.ts +28 -0
- package/src/stdlib/plugin/history/state-updated-command.ts +36 -0
- package/src/stdlib/plugin/history/visibility-updated-command.ts +41 -0
- package/src/stdlib/plugin/hull/bubbleset.ts +828 -0
- package/src/stdlib/plugin/hull/convexHull.ts +68 -0
- package/src/stdlib/plugin/hull/hullComponent.ts +501 -0
- package/src/stdlib/plugin/hull/index.ts +234 -0
- package/src/stdlib/plugin/hull/types.ts +15 -0
- package/src/stdlib/plugin/hull/util.ts +511 -0
- package/src/stdlib/plugin/index.ts +8 -0
- package/src/stdlib/plugin/legend/index.ts +122 -61
- package/src/stdlib/plugin/menu/index.ts +21 -6
- package/src/stdlib/plugin/minimap/index.ts +35 -26
- package/src/stdlib/plugin/toolbar/index.ts +257 -0
- package/src/stdlib/plugin/tooltip/index.ts +38 -18
- package/src/stdlib/plugin/types.ts +8 -0
- package/src/stdlib/theme/dark.ts +9 -1
- package/src/stdlib/theme/index.ts +2 -0
- package/src/stdlib/theme/light.ts +13 -3
- package/src/stdlib/themeSolver/base.ts +1 -1
- package/src/stdlib/themeSolver/index.ts +3 -0
- package/src/stdlib/themeSolver/spec.ts +2 -5
- package/src/stdlib/themeSolver/subject.ts +2 -5
- package/src/types/behavior.ts +0 -1
- package/src/types/combo.ts +3 -4
- package/src/types/common.ts +13 -0
- package/src/types/data.ts +23 -4
- package/src/types/edge.ts +28 -4
- package/src/types/graph.ts +161 -11
- package/src/types/history.ts +30 -0
- package/src/types/hook.ts +29 -6
- package/src/types/index.ts +37 -12
- package/src/types/item.ts +15 -2
- package/src/types/layout.ts +20 -16
- package/src/types/loop.ts +23 -0
- package/src/types/node.ts +91 -11
- package/src/types/plugin.ts +7 -1
- package/src/types/spec.ts +30 -13
- package/src/types/theme.ts +80 -10
- package/src/util/animate.ts +58 -17
- package/src/util/array.ts +12 -1
- package/src/util/arrow.ts +62 -0
- package/src/util/bbox.ts +298 -0
- package/src/util/behavior.ts +14 -0
- package/src/util/canvas.ts +6 -24
- package/src/util/data.ts +134 -5
- package/src/util/event.ts +86 -2
- package/src/util/extend.ts +8 -2
- package/src/util/index.ts +31 -1
- package/src/util/item.ts +11 -8
- package/src/util/layout.ts +165 -0
- package/src/util/loop.ts +145 -0
- package/src/util/mapper.ts +10 -9
- package/src/util/math.ts +24 -0
- package/src/util/mock.ts +72 -0
- package/src/util/path.ts +52 -0
- package/src/util/point.ts +33 -2
- package/src/util/polyline.ts +676 -0
- package/src/util/router.ts +552 -0
- package/src/util/shape.ts +23 -7
- package/src/util/shape3d.ts +16 -11
- package/src/util/type.ts +8 -1
- package/src/util/zoom.ts +7 -3
- package/esm/stdlib/data/comboFromNode.d.ts +0 -9
- package/esm/stdlib/data/comboFromNode.js +0 -28
- package/esm/stdlib/data/comboFromNode.js.map +0 -1
- package/esm/stdlib/item/edge/cubic-horizon.js.map +0 -1
- package/lib/stdlib/data/comboFromNode.d.ts +0 -9
- package/lib/stdlib/data/comboFromNode.js +0 -32
- package/lib/stdlib/data/comboFromNode.js.map +0 -1
- package/lib/stdlib/item/edge/cubic-horizon.js.map +0 -1
- package/src/stdlib/data/comboFromNode.ts +0 -28
package/lib/types/graph.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EventEmitter from '@antv/event-emitter';
|
|
2
2
|
import { AABB, Canvas, DisplayObject, PointLike } from '@antv/g';
|
|
3
3
|
import { ID } from '@antv/graphlib';
|
|
4
|
+
import { Command } from '../stdlib/plugin/history/command';
|
|
4
5
|
import { Hooks } from '../types/hook';
|
|
5
6
|
import { CameraAnimationOptions } from './animate';
|
|
6
7
|
import { BehaviorOptionsOf, BehaviorRegistry } from './behavior';
|
|
@@ -8,6 +9,7 @@ import { ComboModel, ComboUserModel } from './combo';
|
|
|
8
9
|
import { Padding, Point } from './common';
|
|
9
10
|
import { GraphData } from './data';
|
|
10
11
|
import { EdgeModel, EdgeUserModel } from './edge';
|
|
12
|
+
import type { StackType } from './history';
|
|
11
13
|
import { ITEM_TYPE, SHAPE_TYPE } from './item';
|
|
12
14
|
import { LayoutOptions } from './layout';
|
|
13
15
|
import { NodeModel, NodeUserModel } from './node';
|
|
@@ -102,11 +104,11 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
102
104
|
*/
|
|
103
105
|
getNeighborNodesData: (nodeId: ID, direction?: 'in' | 'out' | 'both') => NodeModel[];
|
|
104
106
|
/**
|
|
105
|
-
*
|
|
106
|
-
* @param
|
|
107
|
-
* @returns
|
|
108
|
-
* @group Data
|
|
107
|
+
* Retrieve the nearby edges for a given node using quadtree collision detection.
|
|
108
|
+
* @param nodeId target node's id
|
|
109
|
+
* @returns edges
|
|
109
110
|
*/
|
|
111
|
+
getNearEdgesForNode: (nodeId: ID) => EdgeModel[];
|
|
110
112
|
getComboChildrenData: (comboId: ID) => (ComboModel | NodeModel)[];
|
|
111
113
|
/**
|
|
112
114
|
* Input data and render the graph.
|
|
@@ -171,7 +173,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
171
173
|
* @param {boolean} stack whether push this operation into graph's stack, true by default
|
|
172
174
|
* @group Data
|
|
173
175
|
*/
|
|
174
|
-
updateNodePosition: (models: Partial<NodeUserModel> | Partial<ComboUserModel | Partial<NodeUserModel>[] | Partial<ComboUserModel>[]>, upsertAncestors?: boolean, stack?: boolean) => NodeModel | ComboModel | NodeModel[] | ComboModel[];
|
|
176
|
+
updateNodePosition: (models: Partial<NodeUserModel> | Partial<ComboUserModel | Partial<NodeUserModel>[] | Partial<ComboUserModel>[]>, upsertAncestors?: boolean, disableAnimate?: boolean, callback?: (model: NodeModel | EdgeModel | ComboModel, canceled?: boolean) => void, stack?: boolean) => NodeModel | ComboModel | NodeModel[] | ComboModel[];
|
|
175
177
|
/**
|
|
176
178
|
* Update one or more combos' positions, it is achieved by move the succeed nodes.
|
|
177
179
|
* Do not update other styles which leads to better performance than updating positions by updateData.
|
|
@@ -179,7 +181,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
179
181
|
* @param {boolean} stack whether push this operation into graph's stack, true by default
|
|
180
182
|
* @group Data
|
|
181
183
|
*/
|
|
182
|
-
updateComboPosition: (models: Partial<ComboUserModel> | Partial<ComboUserModel | Partial<NodeUserModel>[] | Partial<ComboUserModel>[]>, upsertAncestors?: boolean, stack?: boolean) => NodeModel | ComboModel | NodeModel[] | ComboModel[];
|
|
184
|
+
updateComboPosition: (models: Partial<ComboUserModel> | Partial<ComboUserModel | Partial<NodeUserModel>[] | Partial<ComboUserModel>[]>, upsertAncestors?: boolean, disableAnimate?: boolean, callback?: (model: NodeModel | EdgeModel | ComboModel) => void, stack?: boolean) => NodeModel | ComboModel | NodeModel[] | ComboModel[];
|
|
183
185
|
/**
|
|
184
186
|
* Move one or more combos a distance (dx, dy) relatively,
|
|
185
187
|
* do not update other styles which leads to better performance than updating positions by updateData.
|
|
@@ -188,7 +190,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
188
190
|
* @param {boolean} stack whether push this operation into graph's stack, true by default
|
|
189
191
|
* @group Data
|
|
190
192
|
*/
|
|
191
|
-
moveCombo: (ids: ID[], dx: number, dy: number, upsertAncestors?: boolean, stack?: boolean) => ComboModel[];
|
|
193
|
+
moveCombo: (ids: ID[], dx: number, dy: number, upsertAncestors?: boolean, callback?: (model: NodeModel | EdgeModel | ComboModel, canceled?: boolean) => void, stack?: boolean) => ComboModel[];
|
|
192
194
|
/**
|
|
193
195
|
* Move the graph with a relative vector.
|
|
194
196
|
* @param dx x of the relative vector
|
|
@@ -325,28 +327,28 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
325
327
|
* @returns
|
|
326
328
|
* @group Data
|
|
327
329
|
*/
|
|
328
|
-
showItem: (ids: ID | ID[],
|
|
330
|
+
showItem: (ids: ID | ID[], disableAnimate?: boolean) => void;
|
|
329
331
|
/**
|
|
330
332
|
* Hide the item(s).
|
|
331
333
|
* @param ids the item id(s) to be hidden
|
|
332
334
|
* @returns
|
|
333
335
|
* @group Item
|
|
334
336
|
*/
|
|
335
|
-
hideItem: (ids: ID | ID[],
|
|
337
|
+
hideItem: (ids: ID | ID[], disableAnimate?: boolean) => void;
|
|
336
338
|
/**
|
|
337
339
|
* Make the item(s) to the front.
|
|
338
340
|
* @param ids the item id(s) to front
|
|
339
341
|
* @returns
|
|
340
342
|
* @group Item
|
|
341
343
|
*/
|
|
342
|
-
frontItem: (ids: ID | ID[]) => void;
|
|
344
|
+
frontItem: (ids: ID | ID[], stack?: boolean) => void;
|
|
343
345
|
/**
|
|
344
346
|
* Make the item(s) to the back.
|
|
345
347
|
* @param ids the item id(s) to back
|
|
346
348
|
* @returns
|
|
347
349
|
* @group Item
|
|
348
350
|
*/
|
|
349
|
-
backItem: (ids: ID | ID[]) => void;
|
|
351
|
+
backItem: (ids: ID | ID[], stack?: boolean) => void;
|
|
350
352
|
/**
|
|
351
353
|
* Set state for the item(s).
|
|
352
354
|
* @param ids the id(s) for the item(s) to be set
|
|
@@ -355,7 +357,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
355
357
|
* @returns
|
|
356
358
|
* @group Item
|
|
357
359
|
*/
|
|
358
|
-
setItemState: (ids: ID | ID[], state: string, value: boolean) => void;
|
|
360
|
+
setItemState: (ids: ID | ID[], state: string, value: boolean, stack?: boolean) => void;
|
|
359
361
|
/**
|
|
360
362
|
* Get the state value for an item.
|
|
361
363
|
* @param id the id for the item
|
|
@@ -364,6 +366,13 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
364
366
|
* @group Item
|
|
365
367
|
*/
|
|
366
368
|
getItemState: (id: ID, state: string) => boolean | string;
|
|
369
|
+
/**
|
|
370
|
+
* Get all the state names with value true for an item.
|
|
371
|
+
* @param id the id for the item
|
|
372
|
+
* @returns {string[]} the state names with value true
|
|
373
|
+
* @group Item
|
|
374
|
+
*/
|
|
375
|
+
getItemAllStates: (id: ID) => string[];
|
|
367
376
|
/**
|
|
368
377
|
* Clear all the states for item(s).
|
|
369
378
|
* @param ids the id(s) for the item(s) to be clear
|
|
@@ -371,7 +380,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
371
380
|
* @returns
|
|
372
381
|
* @group Item
|
|
373
382
|
*/
|
|
374
|
-
clearItemState: (ids: ID | ID[], states?: string[]) => void;
|
|
383
|
+
clearItemState: (ids: ID | ID[], states?: string[], stack?: boolean) => void;
|
|
375
384
|
/**
|
|
376
385
|
* Get the rendering bbox for a node / edge / combo, or the graph (when the id is not assigned).
|
|
377
386
|
* @param id the id for the node / edge / combo, undefined for the whole graph
|
|
@@ -409,7 +418,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
409
418
|
/**
|
|
410
419
|
* Layout the graph (with current configurations if cfg is not assigned).
|
|
411
420
|
*/
|
|
412
|
-
layout: (options?: LayoutOptions) => Promise<void>;
|
|
421
|
+
layout: (options?: LayoutOptions, disableAnimate?: boolean) => Promise<void>;
|
|
413
422
|
stopLayout: () => void;
|
|
414
423
|
/**
|
|
415
424
|
* Switch mode.
|
|
@@ -418,13 +427,19 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
418
427
|
* @group Interaction
|
|
419
428
|
*/
|
|
420
429
|
setMode: (mode: string) => void;
|
|
430
|
+
/**
|
|
431
|
+
* Get current mode.
|
|
432
|
+
* @returns mode name
|
|
433
|
+
* @group Interaction
|
|
434
|
+
*/
|
|
435
|
+
getMode: () => string;
|
|
421
436
|
/**
|
|
422
437
|
* Add behavior(s) to mode(s).
|
|
423
438
|
* @param behaviors behavior names or configs
|
|
424
439
|
* @param modes mode names
|
|
425
440
|
* @returns
|
|
426
441
|
*/
|
|
427
|
-
addBehaviors: (behaviors: BehaviorOptionsOf<B>[], modes: string | string[]) => void;
|
|
442
|
+
addBehaviors: (behaviors: BehaviorOptionsOf<B> | BehaviorOptionsOf<B>[], modes: string | string[]) => void;
|
|
428
443
|
/**
|
|
429
444
|
* Remove behavior(s) from mode(s).
|
|
430
445
|
* @param behaviors behavior names or configs
|
|
@@ -448,7 +463,7 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
448
463
|
* @returns upserted shape or group
|
|
449
464
|
* @group Interaction
|
|
450
465
|
*/
|
|
451
|
-
drawTransient: (type: ITEM_TYPE | SHAPE_TYPE, id: ID, config: any) => DisplayObject;
|
|
466
|
+
drawTransient: (type: ITEM_TYPE | SHAPE_TYPE, id: ID, config: any, canvas?: Canvas) => DisplayObject;
|
|
452
467
|
/**
|
|
453
468
|
* Add plugin(s) to graph.
|
|
454
469
|
* @param pluginCfgs
|
|
@@ -478,4 +493,102 @@ export interface IGraph<B extends BehaviorRegistry = BehaviorRegistry, T extends
|
|
|
478
493
|
type: string;
|
|
479
494
|
[cfgName: string]: unknown;
|
|
480
495
|
}) => void;
|
|
496
|
+
/**
|
|
497
|
+
* Determine if history (redo/undo) is enabled.
|
|
498
|
+
*/
|
|
499
|
+
isHistoryEnabled: () => void;
|
|
500
|
+
/**
|
|
501
|
+
* Push the operation(s) onto the specified stack
|
|
502
|
+
* @param cmd commands to be pushed
|
|
503
|
+
* @param stackType undo/redo stack
|
|
504
|
+
*/
|
|
505
|
+
pushStack: (cmd: Command[], stackType: StackType) => void;
|
|
506
|
+
/**
|
|
507
|
+
* Pause stacking operation.
|
|
508
|
+
*/
|
|
509
|
+
pauseStacking: () => void;
|
|
510
|
+
/**
|
|
511
|
+
* Resume stacking operation.
|
|
512
|
+
*/
|
|
513
|
+
resumeStacking: () => void;
|
|
514
|
+
/**
|
|
515
|
+
* Execute a callback without allowing any stacking operations.
|
|
516
|
+
* @param callback
|
|
517
|
+
*/
|
|
518
|
+
executeWithoutStacking: (callback: () => void) => void;
|
|
519
|
+
/**
|
|
520
|
+
* Retrieve the current redo stack which consists of operations that could be undone
|
|
521
|
+
*/
|
|
522
|
+
getUndoStack: () => void;
|
|
523
|
+
/**
|
|
524
|
+
* Retrieve the current undo stack which consists of operations that were undone
|
|
525
|
+
*/
|
|
526
|
+
getRedoStack: () => void;
|
|
527
|
+
/**
|
|
528
|
+
* Retrieve the complete history stack
|
|
529
|
+
* @returns
|
|
530
|
+
*/
|
|
531
|
+
getStack: () => void;
|
|
532
|
+
/**
|
|
533
|
+
* Revert the last n operation(s) on the graph.
|
|
534
|
+
* @returns
|
|
535
|
+
*/
|
|
536
|
+
undo: () => void;
|
|
537
|
+
/**
|
|
538
|
+
* Restore the operation that was last n reverted on the graph.
|
|
539
|
+
* @returns
|
|
540
|
+
*/
|
|
541
|
+
redo: () => void;
|
|
542
|
+
/**
|
|
543
|
+
* Indicate whether there are any actions available in the undo stack.
|
|
544
|
+
*/
|
|
545
|
+
canUndo: () => void;
|
|
546
|
+
/**
|
|
547
|
+
* Indicate whether there are any actions available in the redo stack.
|
|
548
|
+
*/
|
|
549
|
+
canRedo: () => void;
|
|
550
|
+
/**
|
|
551
|
+
* Begin a batch operation.
|
|
552
|
+
* Any operations performed between `startBatch` and `stopBatch` are grouped together.
|
|
553
|
+
* treated as a single operation when undoing or redoing.
|
|
554
|
+
*/
|
|
555
|
+
startBatch: () => void;
|
|
556
|
+
/**
|
|
557
|
+
* End a batch operation.
|
|
558
|
+
* Any operations performed between `startBatch` and `stopBatch` are grouped together.
|
|
559
|
+
* treated as a single operation when undoing or redoing.
|
|
560
|
+
*/
|
|
561
|
+
stopBatch: () => void;
|
|
562
|
+
/**
|
|
563
|
+
* Execute a provided function within a batched context
|
|
564
|
+
* All operations performed inside callback will be treated as a composite operation
|
|
565
|
+
* more convenient way without manually invoking `startBatch` and `stopBatch`.
|
|
566
|
+
* @param callback The func containing operations to be batched together.
|
|
567
|
+
*/
|
|
568
|
+
batch: (callback: () => void) => void;
|
|
569
|
+
/**
|
|
570
|
+
* Execute a provided function within a batched context
|
|
571
|
+
* All operations performed inside callback will be treated as a composite operation
|
|
572
|
+
* more convenient way without manually invoking `startBatch` and `stopBatch`.
|
|
573
|
+
* @param callback The func containing operations to be batched together.
|
|
574
|
+
*/
|
|
575
|
+
clearStack: (stackType?: StackType) => void;
|
|
576
|
+
/**
|
|
577
|
+
* Collapse sub tree(s).
|
|
578
|
+
* @param ids Root id(s) of the sub trees.
|
|
579
|
+
* @param disableAnimate Whether disable the animations for this operation.
|
|
580
|
+
* @param stack Whether push this operation to stack.
|
|
581
|
+
* @returns
|
|
582
|
+
* @group Tree
|
|
583
|
+
*/
|
|
584
|
+
collapse: (ids: ID | ID[], disableAnimate?: boolean, stack?: boolean) => void;
|
|
585
|
+
/**
|
|
586
|
+
* Expand sub tree(s).
|
|
587
|
+
* @param ids Root id(s) of the sub trees.
|
|
588
|
+
* @param disableAnimate Whether disable the animations for this operation.
|
|
589
|
+
* @param stack Whether push this operation to stack.
|
|
590
|
+
* @returns
|
|
591
|
+
* @group Tree
|
|
592
|
+
*/
|
|
593
|
+
expand: (ids: ID | ID[], disableAnimate?: boolean, stack?: boolean) => void;
|
|
481
594
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type StackCfg = {
|
|
2
|
+
/** A number representing the size of the stack. */
|
|
3
|
+
stackSize?: number;
|
|
4
|
+
/** Indicate whether the stack is active. If active, operations can be pushed onto the stack; otherwise, cannot. */
|
|
5
|
+
stackActive?: boolean;
|
|
6
|
+
/** Allows finer-grained control over the ignore option.
|
|
7
|
+
* If an API is in excludes, even if its operation type is not ignored, it will not be put on the stack
|
|
8
|
+
*/
|
|
9
|
+
excludes?: string[];
|
|
10
|
+
includes?: string[];
|
|
11
|
+
/** ignore* is a global setting that indicates whether to ignore a certain type of operation */
|
|
12
|
+
ignoreAdd?: boolean;
|
|
13
|
+
/** A boolean indicating whether to ignore remove operations. */
|
|
14
|
+
ignoreRemove?: boolean;
|
|
15
|
+
/** A boolean indicating whether to ignore update operations. */
|
|
16
|
+
ignoreUpdate?: boolean;
|
|
17
|
+
/** A boolean indicating whether to ignore state change operations.*/
|
|
18
|
+
ignoreStateChange?: boolean;
|
|
19
|
+
/** A boolean indicating whether to ignore layer change operations. */
|
|
20
|
+
ignoreLayerChange?: boolean;
|
|
21
|
+
/** A boolean indicating whether to ignore display change operations. */
|
|
22
|
+
ignoreDisplayChange?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare enum STACK_TYPE {
|
|
25
|
+
'redo' = "redo",
|
|
26
|
+
'undo' = "undo"
|
|
27
|
+
}
|
|
28
|
+
export type StackType = `${STACK_TYPE}`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STACK_TYPE = void 0;
|
|
4
|
+
var STACK_TYPE;
|
|
5
|
+
(function (STACK_TYPE) {
|
|
6
|
+
STACK_TYPE["redo"] = "redo";
|
|
7
|
+
STACK_TYPE["undo"] = "undo";
|
|
8
|
+
})(STACK_TYPE || (exports.STACK_TYPE = STACK_TYPE = {}));
|
|
9
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"src/","sources":["types/history.ts"],"names":[],"mappings":";;;AAwBA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,2BAAe,CAAA;IACf,2BAAe,CAAA;AACjB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
|
package/lib/types/hook.d.ts
CHANGED
|
@@ -2,13 +2,15 @@ import { Canvas } from '@antv/g';
|
|
|
2
2
|
import { GraphChange, ID } from '@antv/graphlib';
|
|
3
3
|
import { CameraAnimationOptions } from './animate';
|
|
4
4
|
import { BehaviorOptionsOf } from './behavior';
|
|
5
|
-
import { DataChangeType,
|
|
6
|
-
import { EdgeModelData } from './edge';
|
|
5
|
+
import { DataChangeType, DataConfig, GraphCore } from './data';
|
|
6
|
+
import { EdgeModel, EdgeModelData } from './edge';
|
|
7
7
|
import { ITEM_TYPE, ShapeStyle, SHAPE_TYPE } from './item';
|
|
8
8
|
import { LayoutOptions } from './layout';
|
|
9
|
-
import { NodeModelData } from './node';
|
|
9
|
+
import { NodeModel, NodeModelData } from './node';
|
|
10
10
|
import { ThemeSpecification } from './theme';
|
|
11
11
|
import { GraphTransformOptions } from './view';
|
|
12
|
+
import { ComboModel } from './combo';
|
|
13
|
+
import { Plugin as PluginBase } from './plugin';
|
|
12
14
|
export interface IHook<T> {
|
|
13
15
|
name: string;
|
|
14
16
|
listeners: Function[];
|
|
@@ -31,7 +33,7 @@ export interface Hooks {
|
|
|
31
33
|
}>;
|
|
32
34
|
datachange: IHook<{
|
|
33
35
|
type: DataChangeType;
|
|
34
|
-
data:
|
|
36
|
+
data: DataConfig;
|
|
35
37
|
}>;
|
|
36
38
|
itemchange: IHook<{
|
|
37
39
|
type: ITEM_TYPE;
|
|
@@ -39,7 +41,9 @@ export interface Hooks {
|
|
|
39
41
|
graphCore: GraphCore;
|
|
40
42
|
theme: ThemeSpecification;
|
|
41
43
|
upsertAncestors?: boolean;
|
|
44
|
+
animate?: boolean;
|
|
42
45
|
action?: 'updatePosition';
|
|
46
|
+
callback?: (model: NodeModel | EdgeModel | ComboModel) => void;
|
|
43
47
|
}>;
|
|
44
48
|
render: IHook<{
|
|
45
49
|
graphCore: GraphCore;
|
|
@@ -49,6 +53,7 @@ export interface Hooks {
|
|
|
49
53
|
layout: IHook<{
|
|
50
54
|
graphCore: GraphCore;
|
|
51
55
|
options?: LayoutOptions;
|
|
56
|
+
animate?: boolean;
|
|
52
57
|
}>;
|
|
53
58
|
modechange: IHook<{
|
|
54
59
|
mode: string;
|
|
@@ -62,16 +67,25 @@ export interface Hooks {
|
|
|
62
67
|
ids: ID[];
|
|
63
68
|
states?: string[];
|
|
64
69
|
value?: boolean;
|
|
70
|
+
action?: string;
|
|
71
|
+
enableStack?: boolean;
|
|
72
|
+
changes?: any;
|
|
65
73
|
}>;
|
|
66
74
|
itemvisibilitychange: IHook<{
|
|
67
75
|
ids: ID[];
|
|
68
76
|
graphCore?: GraphCore;
|
|
69
77
|
value?: boolean;
|
|
70
78
|
animate?: boolean;
|
|
79
|
+
action?: string;
|
|
80
|
+
enableStack?: boolean;
|
|
81
|
+
changes?: any;
|
|
71
82
|
}>;
|
|
72
83
|
itemzindexchange: IHook<{
|
|
73
84
|
ids: ID[];
|
|
74
85
|
action: 'front' | 'back';
|
|
86
|
+
graphCore: GraphCore;
|
|
87
|
+
enableStack?: boolean;
|
|
88
|
+
changes?: any;
|
|
75
89
|
}>;
|
|
76
90
|
transientupdate: IHook<{
|
|
77
91
|
type: ITEM_TYPE | SHAPE_TYPE;
|
|
@@ -90,7 +104,7 @@ export interface Hooks {
|
|
|
90
104
|
key: string;
|
|
91
105
|
type: string;
|
|
92
106
|
[cfgName: string]: unknown;
|
|
93
|
-
})[];
|
|
107
|
+
} | PluginBase)[];
|
|
94
108
|
}>;
|
|
95
109
|
themechange: IHook<{
|
|
96
110
|
theme?: ThemeSpecification;
|
|
@@ -100,5 +114,11 @@ export interface Hooks {
|
|
|
100
114
|
transient: Canvas;
|
|
101
115
|
};
|
|
102
116
|
}>;
|
|
117
|
+
treecollapseexpand: IHook<{
|
|
118
|
+
ids: ID[];
|
|
119
|
+
action: 'collapse' | 'expand';
|
|
120
|
+
graphCore: GraphCore;
|
|
121
|
+
animate?: boolean;
|
|
122
|
+
}>;
|
|
103
123
|
destroy: IHook<{}>;
|
|
104
124
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export type { ID } from '@antv/graphlib';
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
2
|
+
export type { IAnimate, IAnimates, AnimateTiming, AnimateCfg } from './animate';
|
|
3
|
+
export type { Behavior, BehaviorOptionsOf, BehaviorRegistry } from './behavior';
|
|
4
|
+
export type { NodeDisplayModel, NodeModel, NodeUserModel, NodeEncode, NodeShapeStyles, NodeLabelPosition, NodeShapesEncode, NodeModelData, } from './node';
|
|
5
|
+
export type { ComboDisplayModel, ComboLabelPosition, ComboModel, ComboModelData, ComboShapeStyles, ComboShapesEncode, ComboUserModel, } from './combo';
|
|
6
|
+
export type { Point } from './common';
|
|
7
|
+
export type { DataConfig, DisplayGraphCore, GraphCore, GraphData, TreeData, } from './data';
|
|
8
|
+
export type { EdgeDisplayModel, EdgeLabelPosition, EdgeModel, EdgeModelData, EdgeShapeStyles, EdgeShapesEncode, EdgeUserModel, } from './edge';
|
|
9
|
+
export type { ICanvasEventType, IG6GraphEvent } from './event';
|
|
6
10
|
export type { IGraph } from './graph';
|
|
11
|
+
export type { StackCfg } from './history';
|
|
7
12
|
export { isImmediatelyInvokedLayoutOptions, isLayoutWorkerized, } from './layout';
|
|
8
13
|
export type { ImmediatelyInvokedLayoutOptions, LayoutOptions, StandardLayoutOptions, } from './layout';
|
|
9
|
-
export type {
|
|
14
|
+
export type { Plugin as PluginBase } from './plugin';
|
|
10
15
|
export type { Specification } from './spec';
|
|
16
|
+
export type { ThemeSpecification } from './theme';
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["types/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["types/index.ts"],"names":[],"mappings":";;;AA0CA,mCAGkB,CAAC,4BAA4B;AAF7C,2HAAA,iCAAiC,OAAA;AACjC,4GAAA,kBAAkB,OAAA"}
|
package/lib/types/item.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ import { AnimateCfg, IAnimates } from './animate';
|
|
|
5
5
|
import { ComboDisplayModel, ComboEncode, ComboModel, ComboModelData, ComboUserModel } from './combo';
|
|
6
6
|
import { EdgeDisplayModel, EdgeEncode, EdgeModel, EdgeModelData, EdgeShapeMap, EdgeUserModel } from './edge';
|
|
7
7
|
import { NodeDisplayModel, NodeEncode, NodeModel, NodeModelData, NodeShapeMap, NodeUserModel } from './node';
|
|
8
|
-
|
|
8
|
+
import { ComboStyleSet, EdgeStyleSet, NodeStyleSet } from './theme';
|
|
9
|
+
export type GShapeStyle = CircleStyleProps & RectStyleProps & EllipseStyleProps & PolygonStyleProps & LineStyleProps & PolylineStyleProps & TextStyleProps & ImageStyleProps & PathStyleProps & SphereGeometryProps & CubeGeometryProps & PlaneGeometryProps & {
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
};
|
|
9
12
|
export type ShapeStyle = Partial<GShapeStyle & {
|
|
10
13
|
animates?: IAnimates;
|
|
11
14
|
lod?: number;
|
|
@@ -157,7 +160,7 @@ export interface IItem {
|
|
|
157
160
|
}, diffState?: {
|
|
158
161
|
previous: State[];
|
|
159
162
|
current: State[];
|
|
160
|
-
}) => void;
|
|
163
|
+
}, animate?: boolean, onfinish?: Function) => void;
|
|
161
164
|
/**
|
|
162
165
|
* Updates the shapes.
|
|
163
166
|
* @internal
|
|
@@ -165,7 +168,10 @@ export interface IItem {
|
|
|
165
168
|
update: (model: ItemModel, diffData: {
|
|
166
169
|
previous: ItemModelData;
|
|
167
170
|
current: ItemModelData;
|
|
168
|
-
},
|
|
171
|
+
}, isReplace?: boolean, itemTheme?: {
|
|
172
|
+
styles: NodeStyleSet | EdgeStyleSet | ComboStyleSet;
|
|
173
|
+
lodStrategy: LodStrategyObj;
|
|
174
|
+
}, onlyMove?: boolean, animate?: boolean, onfinish?: Function) => void;
|
|
169
175
|
/**
|
|
170
176
|
* Update the group's position, e.g. node, combo.
|
|
171
177
|
* @param displayModel
|
|
@@ -176,7 +182,7 @@ export interface IItem {
|
|
|
176
182
|
updatePosition: (displayModel: ItemDisplayModel, diffData?: {
|
|
177
183
|
previous: ItemModelData;
|
|
178
184
|
current: ItemModelData;
|
|
179
|
-
}, onfinish?: Function) => void;
|
|
185
|
+
}, animate?: boolean, onfinish?: Function) => void;
|
|
180
186
|
/**
|
|
181
187
|
* Maps (mapper will be function, value, or encode format) model to displayModel and find out the shapes to be update for incremental updating.
|
|
182
188
|
* @param model inner model
|
package/lib/types/item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sourceRoot":"src/","sources":["types/item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"src/","sources":["types/item.ts"],"names":[],"mappings":";;;AAqIA,IAAY,aAaX;AAbD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;IACf,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,kCAAiB,CAAA;IACjB,0CAAyB,CAAA;IACzB,0CAAyB,CAAA;IACzB,8BAAa,CAAA;IACb,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,4BAAW,CAAA;IACX,sCAAqB,CAAA;AACvB,CAAC,EAbW,aAAa,6BAAb,aAAa,QAaxB"}
|
package/lib/types/layout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAnimationEffectTiming } from '@antv/g';
|
|
2
|
-
import { CircularLayoutOptions, ConcentricLayoutOptions, D3ForceLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, LayoutMapping, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions } from '@antv/layout';
|
|
2
|
+
import { CircularLayoutOptions, ConcentricLayoutOptions, D3ForceLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, Layout, LayoutMapping, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions } from '@antv/layout';
|
|
3
3
|
import { GraphCore } from './data';
|
|
4
4
|
type Animatable = {
|
|
5
5
|
/**
|
|
@@ -66,4 +66,7 @@ interface ForceLayout extends ForceLayoutOptions {
|
|
|
66
66
|
interface ForceAtlas2 extends ForceAtlas2LayoutOptions {
|
|
67
67
|
type: 'forceAtlas2';
|
|
68
68
|
}
|
|
69
|
+
export interface LayoutRegistry {
|
|
70
|
+
[key: string]: Layout<LayoutOptions>;
|
|
71
|
+
}
|
|
69
72
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum LOOP_POSITION {
|
|
2
|
+
'top' = "top",
|
|
3
|
+
'top-right' = "top-right",
|
|
4
|
+
'right' = "right",
|
|
5
|
+
'bottom-right' = "bottom-right",
|
|
6
|
+
'bottom' = "bottom",
|
|
7
|
+
'bottom-left' = "bottom-left",
|
|
8
|
+
'left' = "left",
|
|
9
|
+
'top-left' = "top-left"
|
|
10
|
+
}
|
|
11
|
+
export type LoopPosition = `${LOOP_POSITION}`;
|
|
12
|
+
export type LoopCfg = {
|
|
13
|
+
/** Specifies the relative position of the self-loop to the node. Default: top. */
|
|
14
|
+
position?: LoopPosition;
|
|
15
|
+
/** Determine the position from the edge of the node keyShape to the top of the self-loop, used to specify the curvature of the self-loop, the default is the height. */
|
|
16
|
+
dist?: number;
|
|
17
|
+
/** Specify whether to draw the ring clockwise. Default: true */
|
|
18
|
+
clockwise?: boolean;
|
|
19
|
+
/** For non-circular nodes, the offset between the connection point and the center coordinates of the node (top-right, bottom-right, top-left, bottom-left are special, which are four corner coordinates) in the x-axis or y-axis direction, The default is 1/4 of the minimum value of node width and high. */
|
|
20
|
+
pointPadding?: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOOP_POSITION = void 0;
|
|
4
|
+
var LOOP_POSITION;
|
|
5
|
+
(function (LOOP_POSITION) {
|
|
6
|
+
LOOP_POSITION["top"] = "top";
|
|
7
|
+
LOOP_POSITION["top-right"] = "top-right";
|
|
8
|
+
LOOP_POSITION["right"] = "right";
|
|
9
|
+
LOOP_POSITION["bottom-right"] = "bottom-right";
|
|
10
|
+
LOOP_POSITION["bottom"] = "bottom";
|
|
11
|
+
LOOP_POSITION["bottom-left"] = "bottom-left";
|
|
12
|
+
LOOP_POSITION["left"] = "left";
|
|
13
|
+
LOOP_POSITION["top-left"] = "top-left";
|
|
14
|
+
})(LOOP_POSITION || (exports.LOOP_POSITION = LOOP_POSITION = {}));
|
|
15
|
+
//# sourceMappingURL=loop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop.js","sourceRoot":"src/","sources":["types/loop.ts"],"names":[],"mappings":";;;AAAA,IAAY,aASX;AATD,WAAY,aAAa;IACvB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,gCAAiB,CAAA;IACjB,8CAA+B,CAAA;IAC/B,kCAAmB,CAAA;IACnB,4CAA6B,CAAA;IAC7B,8BAAe,CAAA;IACf,sCAAuB,CAAA;AACzB,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB"}
|