@antv/g6 4.8.14-beta.0 → 5.0.0-alpha.1
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 +19 -3
- package/esm/constant/index.d.ts +1 -0
- package/esm/constant/index.js +2 -0
- package/esm/constant/index.js.map +1 -0
- package/esm/constant/shape.d.ts +27 -0
- package/esm/constant/shape.js +26 -0
- package/esm/constant/shape.js.map +1 -0
- package/esm/index.d.ts +124 -0
- package/esm/index.js +11 -0
- package/esm/index.js.map +1 -0
- package/esm/item/combo.d.ts +4 -0
- package/esm/item/combo.js +4 -0
- package/esm/item/combo.js.map +1 -0
- package/esm/item/edge.d.ts +54 -0
- package/esm/item/edge.js +113 -0
- package/esm/item/edge.js.map +1 -0
- package/esm/item/item.d.ts +189 -0
- package/esm/item/item.js +636 -0
- package/esm/item/item.js.map +1 -0
- package/esm/item/node.d.ts +54 -0
- package/esm/item/node.js +170 -0
- package/esm/item/node.js.map +1 -0
- package/esm/runtime/controller/data.d.ts +65 -0
- package/esm/runtime/controller/data.js +489 -0
- package/esm/runtime/controller/data.js.map +1 -0
- package/esm/runtime/controller/extension.d.ts +9 -0
- package/esm/runtime/controller/extension.js +11 -0
- package/esm/runtime/controller/extension.js.map +1 -0
- package/esm/runtime/controller/index.d.ts +7 -0
- package/esm/runtime/controller/index.js +8 -0
- package/esm/runtime/controller/index.js.map +1 -0
- package/esm/runtime/controller/interaction.d.ts +51 -0
- package/esm/runtime/controller/interaction.js +259 -0
- package/esm/runtime/controller/interaction.js.map +1 -0
- package/esm/runtime/controller/item.d.ts +101 -0
- package/esm/runtime/controller/item.js +537 -0
- package/esm/runtime/controller/item.js.map +1 -0
- package/esm/runtime/controller/layout.d.ts +30 -0
- package/esm/runtime/controller/layout.js +204 -0
- package/esm/runtime/controller/layout.js.map +1 -0
- package/esm/runtime/controller/plugin.d.ts +34 -0
- package/esm/runtime/controller/plugin.js +140 -0
- package/esm/runtime/controller/plugin.js.map +1 -0
- package/esm/runtime/controller/theme.d.ts +29 -0
- package/esm/runtime/controller/theme.js +54 -0
- package/esm/runtime/controller/theme.js.map +1 -0
- package/esm/runtime/controller/viewport.d.ts +11 -0
- package/esm/runtime/controller/viewport.js +102 -0
- package/esm/runtime/controller/viewport.js.map +1 -0
- package/esm/runtime/graph.d.ts +462 -0
- package/esm/runtime/graph.js +1077 -0
- package/esm/runtime/graph.js.map +1 -0
- package/esm/runtime/hooks.d.ts +33 -0
- package/esm/runtime/hooks.js +74 -0
- package/esm/runtime/hooks.js.map +1 -0
- package/esm/stdlib/behavior/activate-relations.d.ts +62 -0
- package/esm/stdlib/behavior/activate-relations.js +81 -0
- package/esm/stdlib/behavior/activate-relations.js.map +1 -0
- package/esm/stdlib/behavior/brush-select.d.ts +110 -0
- package/esm/stdlib/behavior/brush-select.js +268 -0
- package/esm/stdlib/behavior/brush-select.js.map +1 -0
- package/esm/stdlib/behavior/click-select.d.ts +71 -0
- package/esm/stdlib/behavior/click-select.js +143 -0
- package/esm/stdlib/behavior/click-select.js.map +1 -0
- package/esm/stdlib/behavior/drag-canvas.d.ts +82 -0
- package/esm/stdlib/behavior/drag-canvas.js +246 -0
- package/esm/stdlib/behavior/drag-canvas.js.map +1 -0
- package/esm/stdlib/behavior/drag-node.d.ts +80 -0
- package/esm/stdlib/behavior/drag-node.js +250 -0
- package/esm/stdlib/behavior/drag-node.js.map +1 -0
- package/esm/stdlib/behavior/hover-activate.d.ts +41 -0
- package/esm/stdlib/behavior/hover-activate.js +63 -0
- package/esm/stdlib/behavior/hover-activate.js.map +1 -0
- package/esm/stdlib/behavior/lasso-select.d.ts +27 -0
- package/esm/stdlib/behavior/lasso-select.js +79 -0
- package/esm/stdlib/behavior/lasso-select.js.map +1 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.d.ts +37 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.js +62 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.d.ts +61 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.js +123 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/track-canvas-3d.d.ts +37 -0
- package/esm/stdlib/behavior/track-canvas-3d.js +62 -0
- package/esm/stdlib/behavior/track-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.d.ts +51 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.js +74 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas.d.ts +61 -0
- package/esm/stdlib/behavior/zoom-canvas.js +160 -0
- package/esm/stdlib/behavior/zoom-canvas.js.map +1 -0
- package/esm/stdlib/data/comboFromNode.d.ts +9 -0
- package/esm/stdlib/data/comboFromNode.js +28 -0
- package/esm/stdlib/data/comboFromNode.js.map +1 -0
- package/esm/stdlib/index.d.ts +80 -0
- package/esm/stdlib/index.js +82 -0
- package/esm/stdlib/index.js.map +1 -0
- package/esm/stdlib/item/edge/base.d.ts +111 -0
- package/esm/stdlib/item/edge/base.js +341 -0
- package/esm/stdlib/item/edge/base.js.map +1 -0
- package/esm/stdlib/item/edge/index.d.ts +1 -0
- package/esm/stdlib/item/edge/index.js +2 -0
- package/esm/stdlib/item/edge/index.js.map +1 -0
- package/esm/stdlib/item/edge/line.d.ts +33 -0
- package/esm/stdlib/item/edge/line.js +45 -0
- package/esm/stdlib/item/edge/line.js.map +1 -0
- package/esm/stdlib/item/node/base.d.ts +137 -0
- package/esm/stdlib/item/node/base.js +414 -0
- package/esm/stdlib/item/node/base.js.map +1 -0
- package/esm/stdlib/item/node/base3d.d.ts +72 -0
- package/esm/stdlib/item/node/base3d.js +113 -0
- package/esm/stdlib/item/node/base3d.js.map +1 -0
- package/esm/stdlib/item/node/circle.d.ts +30 -0
- package/esm/stdlib/item/node/circle.js +56 -0
- package/esm/stdlib/item/node/circle.js.map +1 -0
- package/esm/stdlib/item/node/index.d.ts +2 -0
- package/esm/stdlib/item/node/index.js +3 -0
- package/esm/stdlib/item/node/index.js.map +1 -0
- package/esm/stdlib/item/node/sphere.d.ts +33 -0
- package/esm/stdlib/item/node/sphere.js +52 -0
- package/esm/stdlib/item/node/sphere.js.map +1 -0
- package/esm/stdlib/plugin/legend/index.d.ts +121 -0
- package/esm/stdlib/plugin/legend/index.js +587 -0
- package/esm/stdlib/plugin/legend/index.js.map +1 -0
- package/esm/stdlib/plugin/minimap/index.d.ts +106 -0
- package/esm/stdlib/plugin/minimap/index.js +578 -0
- package/esm/stdlib/plugin/minimap/index.js.map +1 -0
- package/esm/stdlib/selector/lasso.d.ts +15 -0
- package/esm/stdlib/selector/lasso.js +61 -0
- package/esm/stdlib/selector/lasso.js.map +1 -0
- package/esm/stdlib/selector/rect.d.ts +16 -0
- package/esm/stdlib/selector/rect.js +54 -0
- package/esm/stdlib/selector/rect.js.map +1 -0
- package/esm/stdlib/theme/dark.d.ts +3 -0
- package/esm/stdlib/theme/dark.js +279 -0
- package/esm/stdlib/theme/dark.js.map +1 -0
- package/esm/stdlib/theme/light.d.ts +3 -0
- package/esm/stdlib/theme/light.js +274 -0
- package/esm/stdlib/theme/light.js.map +1 -0
- package/esm/stdlib/themeSolver/base.d.ts +15 -0
- package/esm/stdlib/themeSolver/base.js +11 -0
- package/esm/stdlib/themeSolver/base.js.map +1 -0
- package/esm/stdlib/themeSolver/spec.d.ts +37 -0
- package/esm/stdlib/themeSolver/spec.js +66 -0
- package/esm/stdlib/themeSolver/spec.js.map +1 -0
- package/esm/stdlib/themeSolver/subject.d.ts +43 -0
- package/esm/stdlib/themeSolver/subject.js +396 -0
- package/esm/stdlib/themeSolver/subject.js.map +1 -0
- package/esm/types/animate.d.ts +59 -0
- package/esm/types/animate.js +2 -0
- package/esm/types/animate.js.map +1 -0
- package/esm/types/behavior.d.ts +45 -0
- package/esm/types/behavior.js +14 -0
- package/esm/types/behavior.js.map +1 -0
- package/esm/types/combo.d.ts +87 -0
- package/esm/types/combo.js +2 -0
- package/esm/types/combo.js.map +1 -0
- package/esm/types/common.d.ts +6 -0
- package/esm/types/common.js +2 -0
- package/esm/types/common.js.map +1 -0
- package/esm/types/data.d.ts +21 -0
- package/esm/types/data.js +2 -0
- package/esm/types/data.js.map +1 -0
- package/esm/types/edge.d.ts +100 -0
- package/esm/types/edge.js +2 -0
- package/esm/types/edge.js.map +1 -0
- package/esm/types/event.d.ts +30 -0
- package/esm/types/event.js +31 -0
- package/esm/types/event.js.map +1 -0
- package/esm/types/graph.d.ts +445 -0
- package/esm/types/graph.js +2 -0
- package/esm/types/graph.js.map +1 -0
- package/esm/types/hook.d.ts +97 -0
- package/esm/types/hook.js +2 -0
- package/esm/types/hook.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.js +2 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/item.d.ts +229 -0
- package/esm/types/item.js +16 -0
- package/esm/types/item.js.map +1 -0
- package/esm/types/layout.d.ts +69 -0
- package/esm/types/layout.js +20 -0
- package/esm/types/layout.js.map +1 -0
- package/esm/types/node.d.ts +134 -0
- package/esm/types/node.js +2 -0
- package/esm/types/node.js.map +1 -0
- package/esm/types/plugin.d.ts +40 -0
- package/esm/types/plugin.js +53 -0
- package/esm/types/plugin.js.map +1 -0
- package/esm/types/render.d.ts +1 -0
- package/esm/types/render.js +2 -0
- package/esm/types/render.js.map +1 -0
- package/esm/types/spec.d.ts +65 -0
- package/esm/types/spec.js +2 -0
- package/esm/types/spec.js.map +1 -0
- package/esm/types/stdlib.d.ts +13 -0
- package/esm/types/stdlib.js +2 -0
- package/esm/types/stdlib.js.map +1 -0
- package/esm/types/theme.d.ts +102 -0
- package/esm/types/theme.js +15 -0
- package/esm/types/theme.js.map +1 -0
- package/esm/types/view.d.ts +23 -0
- package/esm/types/view.js +2 -0
- package/esm/types/view.js.map +1 -0
- package/esm/util/animate.d.ts +101 -0
- package/esm/util/animate.js +350 -0
- package/esm/util/animate.js.map +1 -0
- package/esm/util/array.d.ts +20 -0
- package/esm/util/array.js +60 -0
- package/esm/util/array.js.map +1 -0
- package/esm/util/canvas.d.ts +20 -0
- package/esm/util/canvas.js +81 -0
- package/esm/util/canvas.js.map +1 -0
- package/esm/util/event.d.ts +12 -0
- package/esm/util/event.js +26 -0
- package/esm/util/event.js.map +1 -0
- package/esm/util/extend.d.ts +21 -0
- package/esm/util/extend.js +22 -0
- package/esm/util/extend.js.map +1 -0
- package/esm/util/extension.d.ts +10 -0
- package/esm/util/extension.js +24 -0
- package/esm/util/extension.js.map +1 -0
- package/esm/util/index.d.ts +14 -0
- package/esm/util/index.js +5 -0
- package/esm/util/index.js.map +1 -0
- package/esm/util/item.d.ts +14 -0
- package/esm/util/item.js +42 -0
- package/esm/util/item.js.map +1 -0
- package/esm/util/mapper.d.ts +17 -0
- package/esm/util/mapper.js +60 -0
- package/esm/util/mapper.js.map +1 -0
- package/esm/util/math.d.ts +8 -0
- package/esm/util/math.js +9 -0
- package/esm/util/math.js.map +1 -0
- package/esm/util/point.d.ts +61 -0
- package/esm/util/point.js +160 -0
- package/esm/util/point.js.map +1 -0
- package/esm/util/shape.d.ts +105 -0
- package/esm/util/shape.js +504 -0
- package/esm/util/shape.js.map +1 -0
- package/esm/util/shape3d.d.ts +23 -0
- package/esm/util/shape3d.js +147 -0
- package/esm/util/shape3d.js.map +1 -0
- package/esm/util/text.d.ts +18 -0
- package/esm/util/text.js +36 -0
- package/esm/util/text.js.map +1 -0
- package/esm/util/type.d.ts +2 -0
- package/esm/util/type.js +2 -0
- package/esm/util/type.js.map +1 -0
- package/esm/util/zoom.d.ts +17 -0
- package/esm/util/zoom.js +36 -0
- package/esm/util/zoom.js.map +1 -0
- package/lib/constant/index.d.ts +1 -0
- package/lib/constant/index.js +18 -0
- package/lib/constant/index.js.map +1 -0
- package/lib/constant/shape.d.ts +27 -0
- package/lib/constant/shape.js +29 -0
- package/lib/constant/shape.js.map +1 -0
- package/lib/index.d.ts +124 -4
- package/lib/index.js +30 -27
- package/lib/index.js.map +1 -0
- package/lib/item/combo.d.ts +4 -0
- package/lib/item/combo.js +10 -0
- package/lib/item/combo.js.map +1 -0
- package/lib/item/edge.d.ts +54 -0
- package/lib/item/edge.js +119 -0
- package/lib/item/edge.js.map +1 -0
- package/lib/item/item.d.ts +189 -0
- package/lib/item/item.js +639 -0
- package/lib/item/item.js.map +1 -0
- package/lib/item/node.d.ts +54 -0
- package/lib/item/node.js +176 -0
- package/lib/item/node.js.map +1 -0
- package/lib/runtime/controller/data.d.ts +65 -0
- package/lib/runtime/controller/data.js +493 -0
- package/lib/runtime/controller/data.js.map +1 -0
- package/lib/runtime/controller/extension.d.ts +9 -0
- package/lib/runtime/controller/extension.js +15 -0
- package/lib/runtime/controller/extension.js.map +1 -0
- package/lib/runtime/controller/index.d.ts +7 -0
- package/lib/runtime/controller/index.js +24 -0
- package/lib/runtime/controller/index.js.map +1 -0
- package/lib/runtime/controller/interaction.d.ts +51 -0
- package/lib/runtime/controller/interaction.js +263 -0
- package/lib/runtime/controller/interaction.js.map +1 -0
- package/lib/runtime/controller/item.d.ts +101 -0
- package/lib/runtime/controller/item.js +544 -0
- package/lib/runtime/controller/item.js.map +1 -0
- package/lib/runtime/controller/layout.d.ts +30 -0
- package/lib/runtime/controller/layout.js +208 -0
- package/lib/runtime/controller/layout.js.map +1 -0
- package/lib/runtime/controller/plugin.d.ts +34 -0
- package/lib/runtime/controller/plugin.js +147 -0
- package/lib/runtime/controller/plugin.js.map +1 -0
- package/lib/runtime/controller/theme.d.ts +29 -0
- package/lib/runtime/controller/theme.js +61 -0
- package/lib/runtime/controller/theme.js.map +1 -0
- package/lib/runtime/controller/viewport.d.ts +11 -0
- package/lib/runtime/controller/viewport.js +106 -0
- package/lib/runtime/controller/viewport.js.map +1 -0
- package/lib/runtime/graph.d.ts +462 -0
- package/lib/runtime/graph.js +1083 -0
- package/lib/runtime/graph.js.map +1 -0
- package/lib/runtime/hooks.d.ts +33 -0
- package/lib/runtime/hooks.js +77 -0
- package/lib/runtime/hooks.js.map +1 -0
- package/lib/stdlib/behavior/activate-relations.d.ts +62 -0
- package/lib/stdlib/behavior/activate-relations.js +84 -0
- package/lib/stdlib/behavior/activate-relations.js.map +1 -0
- package/lib/stdlib/behavior/brush-select.d.ts +110 -0
- package/lib/stdlib/behavior/brush-select.js +271 -0
- package/lib/stdlib/behavior/brush-select.js.map +1 -0
- package/lib/stdlib/behavior/click-select.d.ts +71 -0
- package/lib/stdlib/behavior/click-select.js +146 -0
- package/lib/stdlib/behavior/click-select.js.map +1 -0
- package/lib/stdlib/behavior/drag-canvas.d.ts +82 -0
- package/lib/stdlib/behavior/drag-canvas.js +249 -0
- package/lib/stdlib/behavior/drag-canvas.js.map +1 -0
- package/lib/stdlib/behavior/drag-node.d.ts +80 -0
- package/lib/stdlib/behavior/drag-node.js +253 -0
- package/lib/stdlib/behavior/drag-node.js.map +1 -0
- package/lib/stdlib/behavior/hover-activate.d.ts +41 -0
- package/lib/stdlib/behavior/hover-activate.js +67 -0
- package/lib/stdlib/behavior/hover-activate.js.map +1 -0
- package/lib/stdlib/behavior/lasso-select.d.ts +27 -0
- package/lib/stdlib/behavior/lasso-select.js +85 -0
- package/lib/stdlib/behavior/lasso-select.js.map +1 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.d.ts +37 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.js +68 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.d.ts +61 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.js +126 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/track-canvas-3d.d.ts +37 -0
- package/lib/stdlib/behavior/track-canvas-3d.js +68 -0
- package/lib/stdlib/behavior/track-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.d.ts +51 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.js +77 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas.d.ts +61 -0
- package/lib/stdlib/behavior/zoom-canvas.js +163 -0
- package/lib/stdlib/behavior/zoom-canvas.js.map +1 -0
- package/lib/stdlib/data/comboFromNode.d.ts +9 -0
- package/lib/stdlib/data/comboFromNode.js +32 -0
- package/lib/stdlib/data/comboFromNode.js.map +1 -0
- package/lib/stdlib/index.d.ts +80 -0
- package/lib/stdlib/index.js +90 -0
- package/lib/stdlib/index.js.map +1 -0
- package/lib/stdlib/item/edge/base.d.ts +111 -0
- package/lib/stdlib/item/edge/base.js +345 -0
- package/lib/stdlib/item/edge/base.js.map +1 -0
- package/lib/stdlib/item/edge/index.d.ts +1 -0
- package/lib/stdlib/item/edge/index.js +18 -0
- package/lib/stdlib/item/edge/index.js.map +1 -0
- package/lib/stdlib/item/edge/line.d.ts +33 -0
- package/lib/stdlib/item/edge/line.js +49 -0
- package/lib/stdlib/item/edge/line.js.map +1 -0
- package/lib/stdlib/item/node/base.d.ts +137 -0
- package/lib/stdlib/item/node/base.js +418 -0
- package/lib/stdlib/item/node/base.js.map +1 -0
- package/lib/stdlib/item/node/base3d.d.ts +72 -0
- package/lib/stdlib/item/node/base3d.js +117 -0
- package/lib/stdlib/item/node/base3d.js.map +1 -0
- package/lib/stdlib/item/node/circle.d.ts +30 -0
- package/lib/stdlib/item/node/circle.js +60 -0
- package/lib/stdlib/item/node/circle.js.map +1 -0
- package/lib/stdlib/item/node/index.d.ts +2 -0
- package/lib/stdlib/item/node/index.js +19 -0
- package/lib/stdlib/item/node/index.js.map +1 -0
- package/lib/stdlib/item/node/sphere.d.ts +33 -0
- package/lib/stdlib/item/node/sphere.js +56 -0
- package/lib/stdlib/item/node/sphere.js.map +1 -0
- package/lib/stdlib/plugin/legend/index.d.ts +121 -0
- package/lib/stdlib/plugin/legend/index.js +590 -0
- package/lib/stdlib/plugin/legend/index.js.map +1 -0
- package/lib/stdlib/plugin/minimap/index.d.ts +106 -0
- package/lib/stdlib/plugin/minimap/index.js +581 -0
- package/lib/stdlib/plugin/minimap/index.js.map +1 -0
- package/lib/stdlib/selector/lasso.d.ts +15 -0
- package/lib/stdlib/selector/lasso.js +63 -0
- package/lib/stdlib/selector/lasso.js.map +1 -0
- package/lib/stdlib/selector/rect.d.ts +16 -0
- package/lib/stdlib/selector/rect.js +56 -0
- package/lib/stdlib/selector/rect.js.map +1 -0
- package/lib/stdlib/theme/dark.d.ts +3 -0
- package/lib/stdlib/theme/dark.js +281 -0
- package/lib/stdlib/theme/dark.js.map +1 -0
- package/lib/stdlib/theme/light.d.ts +3 -0
- package/lib/stdlib/theme/light.js +276 -0
- package/lib/stdlib/theme/light.js.map +1 -0
- package/lib/stdlib/themeSolver/base.d.ts +15 -0
- package/lib/stdlib/themeSolver/base.js +14 -0
- package/lib/stdlib/themeSolver/base.js.map +1 -0
- package/lib/stdlib/themeSolver/spec.d.ts +37 -0
- package/lib/stdlib/themeSolver/spec.js +72 -0
- package/lib/stdlib/themeSolver/spec.js.map +1 -0
- package/lib/stdlib/themeSolver/subject.d.ts +43 -0
- package/lib/stdlib/themeSolver/subject.js +404 -0
- package/lib/stdlib/themeSolver/subject.js.map +1 -0
- package/lib/types/animate.d.ts +59 -0
- package/lib/types/animate.js +3 -0
- package/lib/types/animate.js.map +1 -0
- package/lib/types/behavior.d.ts +45 -0
- package/lib/types/behavior.js +18 -0
- package/lib/types/behavior.js.map +1 -0
- package/lib/types/combo.d.ts +87 -0
- package/lib/types/combo.js +3 -0
- package/lib/types/combo.js.map +1 -0
- package/lib/types/common.d.ts +6 -0
- package/lib/types/common.js +3 -0
- package/lib/types/common.js.map +1 -0
- package/lib/types/data.d.ts +21 -0
- package/lib/types/data.js +3 -0
- package/lib/types/data.js.map +1 -0
- package/lib/types/edge.d.ts +100 -0
- package/lib/types/edge.js +3 -0
- package/lib/types/edge.js.map +1 -0
- package/lib/types/event.d.ts +30 -0
- package/lib/types/event.js +34 -0
- package/lib/types/event.js.map +1 -0
- package/lib/types/graph.d.ts +445 -0
- package/lib/types/graph.js +3 -0
- package/lib/types/graph.js.map +1 -0
- package/lib/types/hook.d.ts +97 -0
- package/lib/types/hook.js +3 -0
- package/lib/types/hook.js.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.js +7 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/item.d.ts +229 -0
- package/lib/types/item.js +19 -0
- package/lib/types/item.js.map +1 -0
- package/lib/types/layout.d.ts +69 -0
- package/lib/types/layout.js +25 -0
- package/lib/types/layout.js.map +1 -0
- package/lib/types/node.d.ts +134 -0
- package/lib/types/node.js +3 -0
- package/lib/types/node.js.map +1 -0
- package/lib/types/plugin.d.ts +40 -0
- package/lib/types/plugin.js +57 -0
- package/lib/types/plugin.js.map +1 -0
- package/lib/types/render.d.ts +1 -0
- package/lib/types/render.js +3 -0
- package/lib/types/render.js.map +1 -0
- package/lib/types/spec.d.ts +65 -0
- package/lib/types/spec.js +3 -0
- package/lib/types/spec.js.map +1 -0
- package/lib/types/stdlib.d.ts +13 -0
- package/lib/types/stdlib.js +3 -0
- package/lib/types/stdlib.js.map +1 -0
- package/lib/types/theme.d.ts +102 -0
- package/lib/types/theme.js +19 -0
- package/lib/types/theme.js.map +1 -0
- package/lib/types/view.d.ts +23 -0
- package/lib/types/view.js +3 -0
- package/lib/types/view.js.map +1 -0
- package/lib/util/animate.d.ts +101 -0
- package/lib/util/animate.js +358 -0
- package/lib/util/animate.js.map +1 -0
- package/lib/util/array.d.ts +20 -0
- package/lib/util/array.js +68 -0
- package/lib/util/array.js.map +1 -0
- package/lib/util/canvas.d.ts +20 -0
- package/lib/util/canvas.js +86 -0
- package/lib/util/canvas.js.map +1 -0
- package/lib/util/event.d.ts +12 -0
- package/lib/util/event.js +30 -0
- package/lib/util/event.js.map +1 -0
- package/lib/util/extend.d.ts +21 -0
- package/lib/util/extend.js +29 -0
- package/lib/util/extend.js.map +1 -0
- package/lib/util/extension.d.ts +10 -0
- package/lib/util/extension.js +29 -0
- package/lib/util/extension.js.map +1 -0
- package/lib/util/index.d.ts +14 -0
- package/lib/util/index.js +7 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/item.d.ts +14 -0
- package/lib/util/item.js +47 -0
- package/lib/util/item.js.map +1 -0
- package/lib/util/mapper.d.ts +17 -0
- package/lib/util/mapper.js +63 -0
- package/lib/util/mapper.js.map +1 -0
- package/lib/util/math.d.ts +8 -0
- package/lib/util/math.js +13 -0
- package/lib/util/math.js.map +1 -0
- package/lib/util/point.d.ts +61 -0
- package/lib/util/point.js +169 -0
- package/lib/util/point.js.map +1 -0
- package/lib/util/shape.d.ts +105 -0
- package/lib/util/shape.js +519 -0
- package/lib/util/shape.js.map +1 -0
- package/lib/util/shape3d.d.ts +23 -0
- package/lib/util/shape3d.js +153 -0
- package/lib/util/shape3d.js.map +1 -0
- package/lib/util/text.d.ts +18 -0
- package/lib/util/text.js +41 -0
- package/lib/util/text.js.map +1 -0
- package/lib/util/type.d.ts +2 -0
- package/lib/util/type.js +6 -0
- package/lib/util/type.js.map +1 -0
- package/lib/util/zoom.d.ts +17 -0
- package/lib/util/zoom.js +41 -0
- package/lib/util/zoom.js.map +1 -0
- package/package.json +82 -50
- package/src/constant/index.ts +1 -0
- package/src/constant/shape.ts +33 -0
- package/src/index.ts +13 -0
- package/src/item/combo.ts +5 -0
- package/src/item/edge.ts +177 -0
- package/src/item/item.ts +812 -0
- package/src/item/node.ts +275 -0
- package/src/runtime/controller/data.ts +575 -0
- package/src/runtime/controller/extension.ts +14 -0
- package/src/runtime/controller/index.ts +7 -0
- package/src/runtime/controller/interaction.ts +343 -0
- package/src/runtime/controller/item.ts +780 -0
- package/src/runtime/controller/layout.ts +251 -0
- package/src/runtime/controller/plugin.ts +171 -0
- package/src/runtime/controller/theme.ts +69 -0
- package/src/runtime/controller/viewport.ts +131 -0
- package/src/runtime/graph.ts +1439 -0
- package/src/runtime/hooks.ts +64 -0
- package/src/stdlib/behavior/activate-relations.ts +139 -0
- package/src/stdlib/behavior/brush-select.ts +386 -0
- package/src/stdlib/behavior/click-select.ts +201 -0
- package/src/stdlib/behavior/drag-canvas.ts +333 -0
- package/src/stdlib/behavior/drag-node.ts +402 -0
- package/src/stdlib/behavior/hover-activate.ts +106 -0
- package/src/stdlib/behavior/lasso-select.ts +94 -0
- package/src/stdlib/behavior/orbit-canvas-3d.ts +104 -0
- package/src/stdlib/behavior/rotate-canvas-3d.ts +172 -0
- package/src/stdlib/behavior/track-canvas-3d.ts +104 -0
- package/src/stdlib/behavior/zoom-canvas-3d.ts +127 -0
- package/src/stdlib/behavior/zoom-canvas.ts +244 -0
- package/src/stdlib/data/comboFromNode.ts +28 -0
- package/src/stdlib/index.ts +87 -0
- package/src/stdlib/item/edge/base.ts +571 -0
- package/src/stdlib/item/edge/index.ts +1 -0
- package/src/stdlib/item/edge/line.ts +98 -0
- package/src/stdlib/item/node/base.ts +726 -0
- package/src/stdlib/item/node/base3d.ts +192 -0
- package/src/stdlib/item/node/circle.ts +113 -0
- package/src/stdlib/item/node/index.ts +2 -0
- package/src/stdlib/item/node/sphere.ts +99 -0
- package/src/stdlib/plugin/legend/index.ts +733 -0
- package/src/stdlib/plugin/minimap/index.ts +689 -0
- package/src/stdlib/selector/lasso.ts +75 -0
- package/src/stdlib/selector/rect.ts +78 -0
- package/src/stdlib/theme/dark.ts +340 -0
- package/src/stdlib/theme/light.ts +333 -0
- package/src/stdlib/themeSolver/base.ts +22 -0
- package/src/stdlib/themeSolver/spec.ts +110 -0
- package/src/stdlib/themeSolver/subject.ts +502 -0
- package/src/types/animate.ts +71 -0
- package/src/types/behavior.ts +49 -0
- package/src/types/combo.ts +120 -0
- package/src/types/common.ts +7 -0
- package/src/types/data.ts +35 -0
- package/src/types/edge.ts +119 -0
- package/src/types/event.ts +47 -0
- package/src/types/graph.ts +573 -0
- package/src/types/hook.ts +98 -0
- package/src/types/index.ts +29 -0
- package/src/types/item.ts +324 -0
- package/src/types/layout.ts +138 -0
- package/src/types/node.ts +162 -0
- package/src/types/plugin.ts +77 -0
- package/src/types/render.ts +1 -0
- package/src/types/spec.ts +116 -0
- package/src/types/stdlib.ts +25 -0
- package/src/types/theme.ts +101 -0
- package/src/types/view.ts +31 -0
- package/src/util/animate.ts +430 -0
- package/src/util/array.ts +57 -0
- package/src/util/canvas.ts +95 -0
- package/src/util/event.ts +34 -0
- package/src/util/extend.ts +42 -0
- package/src/util/extension.ts +29 -0
- package/src/util/index.ts +4 -0
- package/src/util/item.ts +70 -0
- package/src/util/mapper.ts +61 -0
- package/src/util/math.ts +9 -0
- package/src/util/point.ts +195 -0
- package/src/util/shape.ts +609 -0
- package/src/util/shape3d.ts +198 -0
- package/src/util/text.ts +49 -0
- package/src/util/type.ts +4 -0
- package/src/util/zoom.ts +39 -0
- package/README.en-US.md +0 -170
- package/README.md +0 -177
- package/dist/g6.min.js.map +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './shape';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["constant/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const RESERVED_SHAPE_IDS: string[];
|
|
2
|
+
export declare const OTHER_SHAPES_FIELD_NAME = "otherShapes";
|
|
3
|
+
export declare const DEFAULT_LABEL_BG_PADDING: number[];
|
|
4
|
+
/** Default shape style to avoid shape value missing */
|
|
5
|
+
export declare const DEFAULT_SHAPE_STYLE: {
|
|
6
|
+
opacity: number;
|
|
7
|
+
fillOpacity: number;
|
|
8
|
+
shadowColor: any;
|
|
9
|
+
shadowBlur: number;
|
|
10
|
+
lineDash: any;
|
|
11
|
+
zIndex: number;
|
|
12
|
+
};
|
|
13
|
+
/** Default text style to avoid shape value missing */
|
|
14
|
+
export declare const DEFAULT_TEXT_STYLE: {
|
|
15
|
+
fontSize: number;
|
|
16
|
+
fontFamily: string;
|
|
17
|
+
fontWeight: string;
|
|
18
|
+
fontVariant: string;
|
|
19
|
+
fontStyle: string;
|
|
20
|
+
lineWidth: number;
|
|
21
|
+
opacity: number;
|
|
22
|
+
fillOpacity: number;
|
|
23
|
+
shadowColor: any;
|
|
24
|
+
shadowBlur: number;
|
|
25
|
+
lineDash: any;
|
|
26
|
+
zIndex: number;
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const RESERVED_SHAPE_IDS = [
|
|
2
|
+
'keyShape',
|
|
3
|
+
'labelShape',
|
|
4
|
+
'labelBackgroundShape',
|
|
5
|
+
'iconShape',
|
|
6
|
+
'haloShape',
|
|
7
|
+
'anchorShapes',
|
|
8
|
+
'badgeShapes',
|
|
9
|
+
];
|
|
10
|
+
export const OTHER_SHAPES_FIELD_NAME = 'otherShapes';
|
|
11
|
+
export const DEFAULT_LABEL_BG_PADDING = [4, 4, 4, 4];
|
|
12
|
+
/** Default shape style to avoid shape value missing */
|
|
13
|
+
export const DEFAULT_SHAPE_STYLE = {
|
|
14
|
+
opacity: 1,
|
|
15
|
+
fillOpacity: 1,
|
|
16
|
+
shadowColor: undefined,
|
|
17
|
+
shadowBlur: 0,
|
|
18
|
+
lineDash: undefined,
|
|
19
|
+
zIndex: 0,
|
|
20
|
+
};
|
|
21
|
+
/** Default text style to avoid shape value missing */
|
|
22
|
+
export const DEFAULT_TEXT_STYLE = Object.assign(Object.assign({}, DEFAULT_SHAPE_STYLE), { fontSize: 12, fontFamily: 'sans-serif', fontWeight: 'normal', fontVariant: 'normal', fontStyle: 'normal',
|
|
23
|
+
// textBaseline: 'middle',
|
|
24
|
+
// textAlign: 'center',
|
|
25
|
+
lineWidth: 0 });
|
|
26
|
+
//# sourceMappingURL=shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"src/","sources":["constant/shape.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,UAAU;IACV,YAAY;IACZ,sBAAsB;IACtB,WAAW;IACX,WAAW;IACX,cAAc;IACd,aAAa;CACd,CAAC;AACF,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACrD,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,CAAC;CACV,CAAC;AACF,sDAAsD;AACtD,MAAM,CAAC,MAAM,kBAAkB,mCAC1B,mBAAmB,KACtB,QAAQ,EAAE,EAAE,EACZ,UAAU,EAAE,YAAY,EACxB,UAAU,EAAE,QAAQ,EACpB,WAAW,EAAE,QAAQ,EACrB,SAAS,EAAE,QAAQ;IACnB,0BAA0B;IAC1B,uBAAuB;IACvB,SAAS,EAAE,CAAC,GACb,CAAC"}
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import EmptyGraph from './runtime/graph';
|
|
2
|
+
import { stdLib } from './stdlib';
|
|
3
|
+
export * from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Extend the graph class with std lib
|
|
6
|
+
*/
|
|
7
|
+
declare const Graph: {
|
|
8
|
+
new (spec: import("./types").Specification<{
|
|
9
|
+
'activate-relations': typeof import("./stdlib/behavior/activate-relations").default;
|
|
10
|
+
'drag-canvas': typeof import("./stdlib/behavior/drag-canvas").default;
|
|
11
|
+
'hover-activate': typeof import("./stdlib/behavior/hover-activate").HoverActivate;
|
|
12
|
+
'zoom-canvas': typeof import("./stdlib/behavior/zoom-canvas").default;
|
|
13
|
+
'drag-node': typeof import("./stdlib/behavior/drag-node").default;
|
|
14
|
+
'click-select': typeof import("./stdlib/behavior/click-select").default;
|
|
15
|
+
'brush-select': typeof import("./stdlib/behavior/brush-select").default;
|
|
16
|
+
'lasso-select': typeof import("./stdlib/behavior/lasso-select").default;
|
|
17
|
+
'zoom-canvas-3d': typeof import("./stdlib/behavior/zoom-canvas-3d").default;
|
|
18
|
+
'rotate-canvas-3d': typeof import("./stdlib/behavior/rotate-canvas-3d").default;
|
|
19
|
+
'track-canvas-3d': typeof import("./stdlib/behavior/track-canvas-3d").default;
|
|
20
|
+
'orbit-canvas-3d': typeof import("./stdlib/behavior/orbit-canvas-3d").default;
|
|
21
|
+
}, {
|
|
22
|
+
spec: typeof import("./stdlib/themeSolver/spec").default;
|
|
23
|
+
subject: typeof import("./stdlib/themeSolver/subject").default;
|
|
24
|
+
}>): EmptyGraph<{
|
|
25
|
+
'activate-relations': typeof import("./stdlib/behavior/activate-relations").default;
|
|
26
|
+
'drag-canvas': typeof import("./stdlib/behavior/drag-canvas").default;
|
|
27
|
+
'hover-activate': typeof import("./stdlib/behavior/hover-activate").HoverActivate;
|
|
28
|
+
'zoom-canvas': typeof import("./stdlib/behavior/zoom-canvas").default;
|
|
29
|
+
'drag-node': typeof import("./stdlib/behavior/drag-node").default;
|
|
30
|
+
'click-select': typeof import("./stdlib/behavior/click-select").default;
|
|
31
|
+
'brush-select': typeof import("./stdlib/behavior/brush-select").default;
|
|
32
|
+
'lasso-select': typeof import("./stdlib/behavior/lasso-select").default;
|
|
33
|
+
'zoom-canvas-3d': typeof import("./stdlib/behavior/zoom-canvas-3d").default;
|
|
34
|
+
'rotate-canvas-3d': typeof import("./stdlib/behavior/rotate-canvas-3d").default;
|
|
35
|
+
'track-canvas-3d': typeof import("./stdlib/behavior/track-canvas-3d").default;
|
|
36
|
+
'orbit-canvas-3d': typeof import("./stdlib/behavior/orbit-canvas-3d").default;
|
|
37
|
+
}, {
|
|
38
|
+
spec: typeof import("./stdlib/themeSolver/spec").default;
|
|
39
|
+
subject: typeof import("./stdlib/themeSolver/subject").default;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
export { Graph, stdLib };
|
|
43
|
+
declare const _default: {
|
|
44
|
+
Graph: {
|
|
45
|
+
new (spec: import("./types").Specification<{
|
|
46
|
+
'activate-relations': typeof import("./stdlib/behavior/activate-relations").default;
|
|
47
|
+
'drag-canvas': typeof import("./stdlib/behavior/drag-canvas").default;
|
|
48
|
+
'hover-activate': typeof import("./stdlib/behavior/hover-activate").HoverActivate;
|
|
49
|
+
'zoom-canvas': typeof import("./stdlib/behavior/zoom-canvas").default;
|
|
50
|
+
'drag-node': typeof import("./stdlib/behavior/drag-node").default;
|
|
51
|
+
'click-select': typeof import("./stdlib/behavior/click-select").default;
|
|
52
|
+
'brush-select': typeof import("./stdlib/behavior/brush-select").default;
|
|
53
|
+
'lasso-select': typeof import("./stdlib/behavior/lasso-select").default;
|
|
54
|
+
'zoom-canvas-3d': typeof import("./stdlib/behavior/zoom-canvas-3d").default;
|
|
55
|
+
'rotate-canvas-3d': typeof import("./stdlib/behavior/rotate-canvas-3d").default;
|
|
56
|
+
'track-canvas-3d': typeof import("./stdlib/behavior/track-canvas-3d").default;
|
|
57
|
+
'orbit-canvas-3d': typeof import("./stdlib/behavior/orbit-canvas-3d").default;
|
|
58
|
+
}, {
|
|
59
|
+
spec: typeof import("./stdlib/themeSolver/spec").default;
|
|
60
|
+
subject: typeof import("./stdlib/themeSolver/subject").default;
|
|
61
|
+
}>): EmptyGraph<{
|
|
62
|
+
'activate-relations': typeof import("./stdlib/behavior/activate-relations").default;
|
|
63
|
+
'drag-canvas': typeof import("./stdlib/behavior/drag-canvas").default;
|
|
64
|
+
'hover-activate': typeof import("./stdlib/behavior/hover-activate").HoverActivate;
|
|
65
|
+
'zoom-canvas': typeof import("./stdlib/behavior/zoom-canvas").default;
|
|
66
|
+
'drag-node': typeof import("./stdlib/behavior/drag-node").default;
|
|
67
|
+
'click-select': typeof import("./stdlib/behavior/click-select").default;
|
|
68
|
+
'brush-select': typeof import("./stdlib/behavior/brush-select").default;
|
|
69
|
+
'lasso-select': typeof import("./stdlib/behavior/lasso-select").default;
|
|
70
|
+
'zoom-canvas-3d': typeof import("./stdlib/behavior/zoom-canvas-3d").default;
|
|
71
|
+
'rotate-canvas-3d': typeof import("./stdlib/behavior/rotate-canvas-3d").default;
|
|
72
|
+
'track-canvas-3d': typeof import("./stdlib/behavior/track-canvas-3d").default;
|
|
73
|
+
'orbit-canvas-3d': typeof import("./stdlib/behavior/orbit-canvas-3d").default;
|
|
74
|
+
}, {
|
|
75
|
+
spec: typeof import("./stdlib/themeSolver/spec").default;
|
|
76
|
+
subject: typeof import("./stdlib/themeSolver/subject").default;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
79
|
+
stdLib: {
|
|
80
|
+
transforms: {
|
|
81
|
+
comboFromNode: (data: import("./types").GraphData) => {
|
|
82
|
+
nodes: import("./types").NodeUserModel[];
|
|
83
|
+
edges: import("./types").EdgeUserModel[];
|
|
84
|
+
combos: any[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
themes: {
|
|
88
|
+
light: import("./types/theme").ThemeSpecification;
|
|
89
|
+
dark: import("./types/theme").ThemeSpecification;
|
|
90
|
+
};
|
|
91
|
+
themeSolvers: {
|
|
92
|
+
spec: typeof import("./stdlib/themeSolver/spec").default;
|
|
93
|
+
subject: typeof import("./stdlib/themeSolver/subject").default;
|
|
94
|
+
};
|
|
95
|
+
layouts: Record<string, import("@antv/layout").LayoutConstructor<any>>;
|
|
96
|
+
behaviors: {
|
|
97
|
+
'activate-relations': typeof import("./stdlib/behavior/activate-relations").default;
|
|
98
|
+
'drag-canvas': typeof import("./stdlib/behavior/drag-canvas").default;
|
|
99
|
+
'hover-activate': typeof import("./stdlib/behavior/hover-activate").HoverActivate;
|
|
100
|
+
'zoom-canvas': typeof import("./stdlib/behavior/zoom-canvas").default;
|
|
101
|
+
'drag-node': typeof import("./stdlib/behavior/drag-node").default;
|
|
102
|
+
'click-select': typeof import("./stdlib/behavior/click-select").default;
|
|
103
|
+
'brush-select': typeof import("./stdlib/behavior/brush-select").default;
|
|
104
|
+
'lasso-select': typeof import("./stdlib/behavior/lasso-select").default;
|
|
105
|
+
'zoom-canvas-3d': typeof import("./stdlib/behavior/zoom-canvas-3d").default;
|
|
106
|
+
'rotate-canvas-3d': typeof import("./stdlib/behavior/rotate-canvas-3d").default;
|
|
107
|
+
'track-canvas-3d': typeof import("./stdlib/behavior/track-canvas-3d").default;
|
|
108
|
+
'orbit-canvas-3d': typeof import("./stdlib/behavior/orbit-canvas-3d").default;
|
|
109
|
+
};
|
|
110
|
+
plugins: {
|
|
111
|
+
minimap: typeof import("./stdlib/plugin/minimap").default;
|
|
112
|
+
legend: typeof import("./stdlib/plugin/legend").default;
|
|
113
|
+
};
|
|
114
|
+
nodes: {
|
|
115
|
+
'circle-node': typeof import("./stdlib/item/node").CircleNode;
|
|
116
|
+
'sphere-node': typeof import("./stdlib/item/node").SphereNode;
|
|
117
|
+
};
|
|
118
|
+
edges: {
|
|
119
|
+
'line-edge': typeof import("./stdlib/item/edge").LineEdge;
|
|
120
|
+
};
|
|
121
|
+
combos: {};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export default _default;
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import EmptyGraph from './runtime/graph';
|
|
2
|
+
import { stdLib } from './stdlib';
|
|
3
|
+
import { extend } from './util/extend';
|
|
4
|
+
export * from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Extend the graph class with std lib
|
|
7
|
+
*/
|
|
8
|
+
const Graph = extend((EmptyGraph), stdLib);
|
|
9
|
+
export { Graph, stdLib };
|
|
10
|
+
export default { Graph, stdLib };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,cAAc,SAAS,CAAC;AAExB;;GAEG;AACH,MAAM,KAAK,GAAG,MAAM,CAAC,CAAA,UAAkB,CAAA,EAAE,MAAM,CAAC,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAEzB,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combo.js","sourceRoot":"src/","sources":["item/combo.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,IAAI;CAEtC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Group } from '@antv/g';
|
|
2
|
+
import { EdgeDisplayModel, EdgeModel } from '../types';
|
|
3
|
+
import { EdgeModelData } from '../types/edge';
|
|
4
|
+
import { DisplayMapper, State, lodStrategyObj } from '../types/item';
|
|
5
|
+
import Item from './item';
|
|
6
|
+
import Node from './node';
|
|
7
|
+
import { EdgeStyleSet } from '../types/theme';
|
|
8
|
+
interface IProps {
|
|
9
|
+
model: EdgeModel;
|
|
10
|
+
renderExtensions: any;
|
|
11
|
+
containerGroup: Group;
|
|
12
|
+
mapper: DisplayMapper;
|
|
13
|
+
stateMapper: {
|
|
14
|
+
[stateName: string]: DisplayMapper;
|
|
15
|
+
};
|
|
16
|
+
sourceItem: Node;
|
|
17
|
+
targetItem: Node;
|
|
18
|
+
zoom?: number;
|
|
19
|
+
theme: {
|
|
20
|
+
styles: EdgeStyleSet;
|
|
21
|
+
lodStrategy: lodStrategyObj;
|
|
22
|
+
};
|
|
23
|
+
onframe?: Function;
|
|
24
|
+
}
|
|
25
|
+
export default class Edge extends Item {
|
|
26
|
+
destroyed: boolean;
|
|
27
|
+
model: EdgeModel;
|
|
28
|
+
displayModel: EdgeDisplayModel;
|
|
29
|
+
/** Set to different value in implements */
|
|
30
|
+
type: 'edge';
|
|
31
|
+
sourceItem: Node;
|
|
32
|
+
targetItem: Node;
|
|
33
|
+
constructor(props: IProps);
|
|
34
|
+
draw(displayModel: EdgeDisplayModel, diffData?: {
|
|
35
|
+
previous: EdgeModelData;
|
|
36
|
+
current: EdgeModelData;
|
|
37
|
+
}, diffState?: {
|
|
38
|
+
previous: State[];
|
|
39
|
+
current: State[];
|
|
40
|
+
}, onfinish?: Function): void;
|
|
41
|
+
/**
|
|
42
|
+
* Sometimes no changes on edge data, but need to re-draw it
|
|
43
|
+
* e.g. source and target nodes' position changed
|
|
44
|
+
*/
|
|
45
|
+
forceUpdate: Function;
|
|
46
|
+
/**
|
|
47
|
+
* Update end item for item and re-draw the edge
|
|
48
|
+
* @param type update source or target
|
|
49
|
+
* @param endItem new item to ended
|
|
50
|
+
*/
|
|
51
|
+
updateEnd(type: 'source' | 'target', endItem: Node): void;
|
|
52
|
+
clone(containerGroup: Group, sourceItem: Node, targetItem: Node, onlyKeyShape?: boolean, disableAnimate?: boolean): Group | Edge;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
package/esm/item/edge.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Group } from '@antv/g';
|
|
2
|
+
import { clone, throttle } from '@antv/util';
|
|
3
|
+
import { updateShapes } from '../util/shape';
|
|
4
|
+
import Item from './item';
|
|
5
|
+
import { animateShapes } from '../util/animate';
|
|
6
|
+
export default class Edge extends Item {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.destroyed = false;
|
|
10
|
+
/** Set to different value in implements */
|
|
11
|
+
this.type = 'edge';
|
|
12
|
+
/**
|
|
13
|
+
* Sometimes no changes on edge data, but need to re-draw it
|
|
14
|
+
* e.g. source and target nodes' position changed
|
|
15
|
+
*/
|
|
16
|
+
this.forceUpdate = throttle(() => {
|
|
17
|
+
if (!this.destroyed)
|
|
18
|
+
this.draw(this.displayModel);
|
|
19
|
+
}, 16, {
|
|
20
|
+
leading: true,
|
|
21
|
+
trailing: true,
|
|
22
|
+
});
|
|
23
|
+
this.type = 'edge';
|
|
24
|
+
this.init(props);
|
|
25
|
+
const { sourceItem, targetItem } = props;
|
|
26
|
+
this.sourceItem = sourceItem;
|
|
27
|
+
this.targetItem = targetItem;
|
|
28
|
+
this.draw(this.displayModel);
|
|
29
|
+
}
|
|
30
|
+
draw(displayModel, diffData, diffState, onfinish = () => { }) {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
// get the end points
|
|
33
|
+
const { x: sx, y: sy, z: sz } = this.sourceItem.model.data;
|
|
34
|
+
const { x: tx, y: ty, z: tz } = this.targetItem.model.data;
|
|
35
|
+
const sourcePoint = this.sourceItem.getAnchorPoint({ x: tx, y: ty, z: tz });
|
|
36
|
+
const targetPoint = this.targetItem.getAnchorPoint({ x: sx, y: sy, z: sz });
|
|
37
|
+
this.renderExt.mergeStyles(displayModel);
|
|
38
|
+
const firstRendering = !((_a = this.shapeMap) === null || _a === void 0 ? void 0 : _a.keyShape);
|
|
39
|
+
this.renderExt.setSourcePoint(sourcePoint);
|
|
40
|
+
this.renderExt.setTargetPoint(targetPoint);
|
|
41
|
+
const shapeMap = this.renderExt.draw(displayModel, sourcePoint, targetPoint, this.shapeMap, diffData, diffState);
|
|
42
|
+
// add shapes to group, and update shapeMap
|
|
43
|
+
this.shapeMap = updateShapes(this.shapeMap, shapeMap, this.group);
|
|
44
|
+
// handle shape's and group's animate
|
|
45
|
+
const { animates, disableAnimate } = displayModel.data;
|
|
46
|
+
const usingAnimates = Object.assign({}, animates);
|
|
47
|
+
const targetStyles = this.renderExt.mergedStyles;
|
|
48
|
+
const { haloShape, labelShape } = this.shapeMap;
|
|
49
|
+
haloShape === null || haloShape === void 0 ? void 0 : haloShape.toBack();
|
|
50
|
+
labelShape === null || labelShape === void 0 ? void 0 : labelShape.toFront();
|
|
51
|
+
super.draw(displayModel, diffData, diffState);
|
|
52
|
+
this.renderExt.updateCache(this.shapeMap);
|
|
53
|
+
if (firstRendering) {
|
|
54
|
+
// update the transform
|
|
55
|
+
this.renderExt.onZoom(this.shapeMap, this.zoom);
|
|
56
|
+
}
|
|
57
|
+
// terminate previous animations
|
|
58
|
+
this.stopAnimations();
|
|
59
|
+
const timing = firstRendering ? 'buildIn' : 'update';
|
|
60
|
+
// handle shape's animate
|
|
61
|
+
if (!disableAnimate && ((_b = usingAnimates[timing]) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
62
|
+
this.animations = animateShapes(usingAnimates, targetStyles, // targetStylesMap
|
|
63
|
+
this.shapeMap, // shapeMap
|
|
64
|
+
this.group, firstRendering ? 'buildIn' : 'update', this.changedStates, this.animateFrameListener, () => onfinish(displayModel.id));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Update end item for item and re-draw the edge
|
|
69
|
+
* @param type update source or target
|
|
70
|
+
* @param endItem new item to ended
|
|
71
|
+
*/
|
|
72
|
+
updateEnd(type, endItem) {
|
|
73
|
+
if (type === 'source')
|
|
74
|
+
this.sourceItem = endItem;
|
|
75
|
+
else if (type === 'target')
|
|
76
|
+
this.targetItem = endItem;
|
|
77
|
+
this.draw(this.displayModel);
|
|
78
|
+
}
|
|
79
|
+
// public update(model: EdgeModel) {
|
|
80
|
+
// super.update(model);
|
|
81
|
+
// }
|
|
82
|
+
clone(containerGroup, sourceItem, targetItem, onlyKeyShape, disableAnimate) {
|
|
83
|
+
if (onlyKeyShape) {
|
|
84
|
+
const clonedKeyShape = this.shapeMap.keyShape.cloneNode();
|
|
85
|
+
const clonedGroup = new Group();
|
|
86
|
+
clonedGroup.appendChild(clonedKeyShape);
|
|
87
|
+
containerGroup.appendChild(clonedGroup);
|
|
88
|
+
return clonedGroup;
|
|
89
|
+
}
|
|
90
|
+
const clonedModel = clone(this.model);
|
|
91
|
+
clonedModel.data.disableAnimate = disableAnimate;
|
|
92
|
+
const clonedEdge = new Edge({
|
|
93
|
+
model: clonedModel,
|
|
94
|
+
renderExtensions: this.renderExtensions,
|
|
95
|
+
sourceItem,
|
|
96
|
+
targetItem,
|
|
97
|
+
containerGroup,
|
|
98
|
+
mapper: this.mapper,
|
|
99
|
+
stateMapper: this.stateMapper,
|
|
100
|
+
zoom: this.zoom,
|
|
101
|
+
theme: {
|
|
102
|
+
styles: this.themeStyles,
|
|
103
|
+
lodStrategy: this.lodStrategy,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
Object.keys(this.shapeMap).forEach((shapeId) => {
|
|
107
|
+
if (!this.shapeMap[shapeId].isVisible())
|
|
108
|
+
clonedEdge.shapeMap[shapeId].hide();
|
|
109
|
+
});
|
|
110
|
+
return clonedEdge;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=edge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"src/","sources":["item/edge.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { Group, DisplayObject, AABB, IAnimation } from '@antv/g';
|
|
2
|
+
import { EdgeShapeMap } from '../types/edge';
|
|
3
|
+
import { DisplayMapper, IItem, ItemDisplayModel, ItemModel, ItemModelData, ItemShapeStyles, ITEM_TYPE, State, lodStrategyObj } from '../types/item';
|
|
4
|
+
import { NodeShapeMap } from '../types/node';
|
|
5
|
+
import { EdgeStyleSet, NodeStyleSet } from '../types/theme';
|
|
6
|
+
export default abstract class Item implements IItem {
|
|
7
|
+
destroyed: boolean;
|
|
8
|
+
/** Inner model. */
|
|
9
|
+
model: ItemModel;
|
|
10
|
+
/** Display model, user will not touch it. */
|
|
11
|
+
displayModel: ItemDisplayModel;
|
|
12
|
+
/** The mapper configured at graph with field name 'node' / 'edge' / 'combo'. */
|
|
13
|
+
mapper: DisplayMapper;
|
|
14
|
+
/** The state sstyle mapper configured at traph with field name 'nodeState' / 'edgeState' / 'comboState'. */
|
|
15
|
+
stateMapper: {
|
|
16
|
+
[stateName: string]: DisplayMapper;
|
|
17
|
+
};
|
|
18
|
+
/** The graphic group for item drawing. */
|
|
19
|
+
group: Group;
|
|
20
|
+
/** The keyShape of the item. */
|
|
21
|
+
keyShape: DisplayObject;
|
|
22
|
+
/** render extension for this item. */
|
|
23
|
+
renderExt: any;
|
|
24
|
+
/** Visibility. */
|
|
25
|
+
visible: boolean;
|
|
26
|
+
/** The states on the item. */
|
|
27
|
+
states: {
|
|
28
|
+
name: string;
|
|
29
|
+
value: string | boolean;
|
|
30
|
+
}[];
|
|
31
|
+
/** The map caches the shapes of the item. The key is the shape id, the value is the g shape. */
|
|
32
|
+
shapeMap: NodeShapeMap | EdgeShapeMap;
|
|
33
|
+
afterDrawShapeMap: {};
|
|
34
|
+
/** Set to different value in implements. */
|
|
35
|
+
type: ITEM_TYPE;
|
|
36
|
+
/** The flag of transient item. */
|
|
37
|
+
transient: Boolean;
|
|
38
|
+
renderExtensions: any;
|
|
39
|
+
/** Cache the animation instances to stop at next lifecycle. */
|
|
40
|
+
animations: IAnimation[];
|
|
41
|
+
themeStyles: {
|
|
42
|
+
default?: ItemShapeStyles;
|
|
43
|
+
[stateName: string]: ItemShapeStyles;
|
|
44
|
+
};
|
|
45
|
+
/** The zoom strategy to show and hide shapes according to their lod. */
|
|
46
|
+
lodStrategy: lodStrategyObj;
|
|
47
|
+
/** Last zoom ratio. */
|
|
48
|
+
zoom: number;
|
|
49
|
+
/** Cache the chaging states which are not consomed by draw */
|
|
50
|
+
changedStates: string[];
|
|
51
|
+
/** The listener for the animations frames. */
|
|
52
|
+
onframe: Function;
|
|
53
|
+
private device;
|
|
54
|
+
/** Cache the dirty tags for states when data changed, to re-map the state styles when state changed */
|
|
55
|
+
private stateDirtyMap;
|
|
56
|
+
private cacheStateStyles;
|
|
57
|
+
private cacheHiddenShape;
|
|
58
|
+
constructor(props: any);
|
|
59
|
+
/** Initiate the item. */
|
|
60
|
+
init(props: any): void;
|
|
61
|
+
/**
|
|
62
|
+
* Draws the shapes.
|
|
63
|
+
* @internal
|
|
64
|
+
* */
|
|
65
|
+
draw(displayModel: ItemDisplayModel, diffData?: {
|
|
66
|
+
previous: ItemModelData;
|
|
67
|
+
current: ItemModelData;
|
|
68
|
+
}, diffState?: {
|
|
69
|
+
previous: State[];
|
|
70
|
+
current: State[];
|
|
71
|
+
}, onfinish?: Function): void;
|
|
72
|
+
/**
|
|
73
|
+
* Updates the shapes.
|
|
74
|
+
* @internal
|
|
75
|
+
* */
|
|
76
|
+
update(model: ItemModel, diffData?: {
|
|
77
|
+
previous: ItemModelData;
|
|
78
|
+
current: ItemModelData;
|
|
79
|
+
}, isReplace?: boolean, itemTheme?: {
|
|
80
|
+
styles: NodeStyleSet | EdgeStyleSet;
|
|
81
|
+
lodStrategy: lodStrategyObj;
|
|
82
|
+
}, onlyMove?: boolean, onfinish?: Function): void;
|
|
83
|
+
/**
|
|
84
|
+
* Update the group's position, e.g. node, combo.
|
|
85
|
+
* @param displayModel
|
|
86
|
+
* @param diffData
|
|
87
|
+
* @param onfinish
|
|
88
|
+
* @returns
|
|
89
|
+
*/
|
|
90
|
+
updatePosition(displayModel: ItemDisplayModel, diffData?: {
|
|
91
|
+
previous: ItemModelData;
|
|
92
|
+
current: ItemModelData;
|
|
93
|
+
}, onfinish?: Function): void;
|
|
94
|
+
/**
|
|
95
|
+
* Maps (mapper will be function, value, or encode format) model to displayModel and find out the shapes to be update for incremental updating.
|
|
96
|
+
* @param model inner model
|
|
97
|
+
* @param diffData changes from graphCore changed event
|
|
98
|
+
* @param isReplace whether replace the whole data or partial update
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
getDisplayModelAndChanges(innerModel: ItemModel, diffData?: {
|
|
102
|
+
previous: ItemModelData;
|
|
103
|
+
current: ItemModelData;
|
|
104
|
+
}, isReplace?: boolean): {
|
|
105
|
+
model: ItemDisplayModel;
|
|
106
|
+
typeChange?: boolean;
|
|
107
|
+
};
|
|
108
|
+
getID(): import("@antv/graphlib").ID;
|
|
109
|
+
getType(): ITEM_TYPE;
|
|
110
|
+
/** Show the item. */
|
|
111
|
+
show(animate?: boolean): void;
|
|
112
|
+
/** Hides the item. */
|
|
113
|
+
hide(animate?: boolean): void;
|
|
114
|
+
/** Returns the visibility of the item. */
|
|
115
|
+
isVisible(): boolean;
|
|
116
|
+
/** Puts the item to the front in its graphic group. */
|
|
117
|
+
toFront(): void;
|
|
118
|
+
/** Puts the item to the back in its graphic group. */
|
|
119
|
+
toBack(): void;
|
|
120
|
+
/**
|
|
121
|
+
* The state value for the item, false if the item does not have the state.
|
|
122
|
+
* @param state state name
|
|
123
|
+
* @returns { boolean | string } the state value
|
|
124
|
+
*/
|
|
125
|
+
hasState(state: string): string | boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Set the state for the item.
|
|
128
|
+
* @param state state name
|
|
129
|
+
* @param value state value
|
|
130
|
+
*/
|
|
131
|
+
setState(state: string, value: string | boolean): void;
|
|
132
|
+
/**
|
|
133
|
+
* Clear the states for the item.
|
|
134
|
+
* @param states the states to be cleared. All the states will be cleared if the states is not assigned
|
|
135
|
+
*/
|
|
136
|
+
clearStates(states?: string[]): void;
|
|
137
|
+
/**
|
|
138
|
+
* Get all the states of the item.
|
|
139
|
+
* @retruns states array with has { name: string, value: string | boolean } format item
|
|
140
|
+
*/
|
|
141
|
+
getStates(): {
|
|
142
|
+
name: string;
|
|
143
|
+
value: string | boolean;
|
|
144
|
+
}[];
|
|
145
|
+
/**
|
|
146
|
+
* Run some thing with animations, e.g. hide, show, destroy.
|
|
147
|
+
* @param animates
|
|
148
|
+
* @param timing
|
|
149
|
+
* @param targetStyleMap
|
|
150
|
+
* @param callback
|
|
151
|
+
* @returns
|
|
152
|
+
*/
|
|
153
|
+
private runWithAnimates;
|
|
154
|
+
/**
|
|
155
|
+
* Re-draw the item with merged state styles.
|
|
156
|
+
* @param previousStates previous states
|
|
157
|
+
* @returns
|
|
158
|
+
*/
|
|
159
|
+
private drawWithStates;
|
|
160
|
+
/**
|
|
161
|
+
* Get the rendering bouding box of the keyShape.
|
|
162
|
+
* @returns keyShape's rendering bounding box
|
|
163
|
+
*/
|
|
164
|
+
getKeyBBox(): AABB;
|
|
165
|
+
/**
|
|
166
|
+
* Get the local bounding box for the keyShape.
|
|
167
|
+
* */
|
|
168
|
+
getLocalKeyBBox(): AABB;
|
|
169
|
+
/**
|
|
170
|
+
* Get the rendering bouding box of the whole item.
|
|
171
|
+
* @returns item's rendering bounding box
|
|
172
|
+
*/
|
|
173
|
+
getBBox(): AABB;
|
|
174
|
+
/**
|
|
175
|
+
* Stop all the animations on the item.
|
|
176
|
+
*/
|
|
177
|
+
stopAnimations(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Animations' frame listemer.
|
|
180
|
+
*/
|
|
181
|
+
animateFrameListener: Function;
|
|
182
|
+
/**
|
|
183
|
+
* Call render extension's onZoom to response the graph zooming.
|
|
184
|
+
* @param zoom
|
|
185
|
+
*/
|
|
186
|
+
updateZoom(zoom: any): void;
|
|
187
|
+
/** Destroy the item. */
|
|
188
|
+
destroy(): void;
|
|
189
|
+
}
|