@antv/g6 4.8.14 → 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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Plugin = void 0;
|
|
4
|
+
const util_1 = require("@antv/util");
|
|
5
|
+
class Plugin {
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for the Plugin Base Class.
|
|
8
|
+
* @param options options for the plugin
|
|
9
|
+
*/
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.options = (0, util_1.deepMix)(this.getDefaultCfgs(), options);
|
|
12
|
+
this.events = {};
|
|
13
|
+
this.destroyed = false;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update the options for the plugin.
|
|
17
|
+
* @param options
|
|
18
|
+
*/
|
|
19
|
+
updateCfgs(options) {
|
|
20
|
+
this.options = (0, util_1.deepMix)(this.options, options);
|
|
21
|
+
this.init(this.graph);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the defualt options of the plugin.
|
|
25
|
+
*/
|
|
26
|
+
getDefaultCfgs() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Init.
|
|
31
|
+
*/
|
|
32
|
+
init(graph) {
|
|
33
|
+
this.graph = graph;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the key(graph event name) value(listener) map.
|
|
37
|
+
* Should be implemented by the plugin.
|
|
38
|
+
*/
|
|
39
|
+
getEvents() {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Destroy method, should be implemented by the plugin.
|
|
44
|
+
*/
|
|
45
|
+
destroy() {
|
|
46
|
+
const { graph } = this;
|
|
47
|
+
const events = this.events;
|
|
48
|
+
(0, util_1.each)(events, (v, k) => {
|
|
49
|
+
graph.off(k, v);
|
|
50
|
+
});
|
|
51
|
+
this.events = null;
|
|
52
|
+
this.options = null;
|
|
53
|
+
this.destroyed = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.Plugin = Plugin;
|
|
57
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"src/","sources":["types/plugin.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAc3C,MAAsB,MAAM;IAS1B;;;OAGG;IACH,YAAY,OAA2B;QACrC,IAAI,CAAC,OAAO,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,OAA2B;QAC3C,IAAI,CAAC,OAAO,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACI,IAAI,CAAC,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,SAAS;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IACD;;OAEG;IACI,OAAO;QACZ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAA,WAAI,EAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACpB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QACF,IAAI,CAAC,MAA8B,GAAG,IAAI,CAAC;QAC3C,IAAI,CAAC,OAAoC,GAAG,IAAI,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AA9DD,wBA8DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RendererName = 'canvas' | 'svg' | 'webgl' | 'webgl-3d';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"src/","sources":["types/render.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { AnimateCfg } from './animate';
|
|
2
|
+
import { Point } from './common';
|
|
3
|
+
import { FetchDataConfig, GraphData, InlineDataConfig, TransformerFn } from './data';
|
|
4
|
+
import { EdgeDisplayModel, EdgeEncode, EdgeModel, EdgeShapesEncode } from './edge';
|
|
5
|
+
import { NodeDisplayModel, NodeEncode, NodeModel, NodeShapesEncode } from './node';
|
|
6
|
+
import { GraphAlignment } from './view';
|
|
7
|
+
import { ComboDisplayModel, ComboEncode, ComboModel, ComboShapesEncode } from './combo';
|
|
8
|
+
import { BehaviorOptionsOf, BehaviorRegistry } from './behavior';
|
|
9
|
+
import { LayoutOptions } from './layout';
|
|
10
|
+
import { ThemeOptionsOf, ThemeRegistry } from './theme';
|
|
11
|
+
import { RendererName } from './render';
|
|
12
|
+
export interface Specification<B extends BehaviorRegistry, T extends ThemeRegistry> {
|
|
13
|
+
type: 'graph' | 'tree';
|
|
14
|
+
container: string | HTMLElement;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
renderer?: RendererName | {
|
|
18
|
+
type: RendererName;
|
|
19
|
+
pixelRatio: number;
|
|
20
|
+
headless: boolean;
|
|
21
|
+
};
|
|
22
|
+
zoom?: number;
|
|
23
|
+
autoFit?: 'view' | 'center' | {
|
|
24
|
+
position: Point;
|
|
25
|
+
alignment: GraphAlignment;
|
|
26
|
+
};
|
|
27
|
+
optimizeThreshold?: number;
|
|
28
|
+
/** data */
|
|
29
|
+
data: GraphData | InlineDataConfig | FetchDataConfig;
|
|
30
|
+
transform?: string[] | {
|
|
31
|
+
type: string;
|
|
32
|
+
[param: string]: unknown;
|
|
33
|
+
}[] | TransformerFn[];
|
|
34
|
+
/** item */
|
|
35
|
+
node?: ((data: NodeModel) => NodeDisplayModel) | NodeEncode;
|
|
36
|
+
edge?: ((data: EdgeModel) => EdgeDisplayModel) | EdgeEncode;
|
|
37
|
+
combo?: ((data: ComboModel) => ComboDisplayModel) | ComboEncode;
|
|
38
|
+
/** item state styles */
|
|
39
|
+
nodeState?: {
|
|
40
|
+
[stateName: string]: ((data: NodeModel) => NodeDisplayModel) | NodeShapesEncode;
|
|
41
|
+
};
|
|
42
|
+
edgeState?: {
|
|
43
|
+
[stateName: string]: ((data: EdgeModel) => EdgeDisplayModel) | EdgeShapesEncode;
|
|
44
|
+
};
|
|
45
|
+
comboState?: {
|
|
46
|
+
[stateName: string]: ((data: ComboModel) => ComboDisplayModel) | ComboShapesEncode;
|
|
47
|
+
};
|
|
48
|
+
/** layout */
|
|
49
|
+
layout?: LayoutOptions | LayoutOptions[];
|
|
50
|
+
/** interaction */
|
|
51
|
+
modes?: {
|
|
52
|
+
[mode: string]: BehaviorOptionsOf<B>[];
|
|
53
|
+
};
|
|
54
|
+
mode?: 'default' | string;
|
|
55
|
+
/** global animate */
|
|
56
|
+
animate?: AnimateCfg;
|
|
57
|
+
/** free plugins */
|
|
58
|
+
plugins?: (string | {
|
|
59
|
+
key: string;
|
|
60
|
+
type: string;
|
|
61
|
+
[cfgName: string]: unknown;
|
|
62
|
+
})[];
|
|
63
|
+
/** theme */
|
|
64
|
+
theme?: ThemeOptionsOf<T>;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"src/","sources":["types/spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BehaviorRegistry } from './behavior';
|
|
2
|
+
import { ThemeRegistry } from './theme';
|
|
3
|
+
export type StdLibCategory = 'transform' | 'behavior' | 'layout' | 'node' | 'edge' | 'combo' | 'theme' | 'themeSolver' | 'plugin';
|
|
4
|
+
export interface Lib {
|
|
5
|
+
behaviors?: BehaviorRegistry;
|
|
6
|
+
themes?: ThemeRegistry;
|
|
7
|
+
transforms?: Record<string, unknown>;
|
|
8
|
+
layouts?: Record<string, unknown>;
|
|
9
|
+
nodes?: Record<string, unknown>;
|
|
10
|
+
edges?: Record<string, unknown>;
|
|
11
|
+
combos?: Record<string, unknown>;
|
|
12
|
+
plugins?: Record<string, unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdlib.js","sourceRoot":"src/","sources":["types/stdlib.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import BaseThemeSolver from 'stdlib/themeSolver/base';
|
|
2
|
+
import { ComboShapeStyles } from './combo';
|
|
3
|
+
import { EdgeShapeStyles } from './edge';
|
|
4
|
+
import { LodStrategy } from './item';
|
|
5
|
+
import { NodeShapeStyles } from './node';
|
|
6
|
+
export interface ThemeOption {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Base behavior.
|
|
10
|
+
* Two implementing ways: getSpec or getEvents
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class Theme {
|
|
13
|
+
options: any;
|
|
14
|
+
constructor(options: any);
|
|
15
|
+
updateConfig: (options: any) => void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
/** Theme regisry table.
|
|
19
|
+
* @example { 'drag-node': DragNodeBehavior, 'my-drag-node': MyDragNodeBehavior }
|
|
20
|
+
*/
|
|
21
|
+
export interface ThemeRegistry {
|
|
22
|
+
[type: string]: typeof BaseThemeSolver;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type gymnastics, input registry table, output configure type.
|
|
26
|
+
* @example ThemeOptionsOf<{ 'drag-node': typeof DragNodeBehavior }> // 'drag-node' | { type: 'drag-node', key?: 'ctrl' | 'shift' }
|
|
27
|
+
*/
|
|
28
|
+
export type ThemeOptionsOf<T extends ThemeRegistry = {}> = Extract<keyof T, string> | {
|
|
29
|
+
[K in keyof T]: T[K] extends {
|
|
30
|
+
new (options: infer O): any;
|
|
31
|
+
} ? O & {
|
|
32
|
+
type: K;
|
|
33
|
+
} : {
|
|
34
|
+
type: K;
|
|
35
|
+
};
|
|
36
|
+
}[Extract<keyof T, string>];
|
|
37
|
+
export type ThemeObjectOptionsOf<T extends ThemeRegistry = {}> = {
|
|
38
|
+
[K in keyof T]: T[K] extends {
|
|
39
|
+
new (options: infer O): any;
|
|
40
|
+
} ? O & {
|
|
41
|
+
type: K;
|
|
42
|
+
key: string;
|
|
43
|
+
} : never;
|
|
44
|
+
}[Extract<keyof T, string>];
|
|
45
|
+
/** Default and stateStyle for an item */
|
|
46
|
+
export type NodeStyleSet = {
|
|
47
|
+
default?: NodeShapeStyles;
|
|
48
|
+
seledted?: NodeShapeStyles;
|
|
49
|
+
[stateName: string]: NodeShapeStyles;
|
|
50
|
+
};
|
|
51
|
+
export type EdgeStyleSet = {
|
|
52
|
+
default?: EdgeShapeStyles;
|
|
53
|
+
[stateName: string]: EdgeShapeStyles;
|
|
54
|
+
};
|
|
55
|
+
export type ComboStyleSet = {
|
|
56
|
+
default?: ComboShapeStyles;
|
|
57
|
+
[stateName: string]: ComboShapeStyles;
|
|
58
|
+
};
|
|
59
|
+
export type NodeStyleSets = NodeStyleSet[] | {
|
|
60
|
+
[dataTypeValue: string]: NodeStyleSet;
|
|
61
|
+
};
|
|
62
|
+
export type EdgeStyleSets = EdgeStyleSet[] | {
|
|
63
|
+
[dataTypeValue: string]: EdgeStyleSet;
|
|
64
|
+
};
|
|
65
|
+
export type ComboStyleSets = ComboStyleSet[] | {
|
|
66
|
+
[dataTypeValue: string]: ComboStyleSet;
|
|
67
|
+
};
|
|
68
|
+
export interface NodeThemeSpecifications {
|
|
69
|
+
dataTypeField?: string;
|
|
70
|
+
palette?: string[] | {
|
|
71
|
+
[dataTypeValue: string]: string;
|
|
72
|
+
};
|
|
73
|
+
styles?: NodeStyleSets;
|
|
74
|
+
lodStrategy?: LodStrategy;
|
|
75
|
+
}
|
|
76
|
+
export interface EdgeThemeSpecifications {
|
|
77
|
+
dataTypeField?: string;
|
|
78
|
+
palette?: string[] | {
|
|
79
|
+
[dataTypeValue: string]: string;
|
|
80
|
+
};
|
|
81
|
+
styles?: EdgeStyleSets;
|
|
82
|
+
lodStrategy?: LodStrategy;
|
|
83
|
+
}
|
|
84
|
+
export interface ComboThemeSpecifications {
|
|
85
|
+
dataTypeField?: string;
|
|
86
|
+
palette?: string[] | {
|
|
87
|
+
[dataTypeValue: string]: string;
|
|
88
|
+
};
|
|
89
|
+
styles?: ComboStyleSets;
|
|
90
|
+
lodStrategy?: LodStrategy;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Theme specification
|
|
94
|
+
*/
|
|
95
|
+
export interface ThemeSpecification {
|
|
96
|
+
node?: NodeThemeSpecifications;
|
|
97
|
+
edge?: EdgeThemeSpecifications;
|
|
98
|
+
combo?: ComboThemeSpecifications;
|
|
99
|
+
canvas?: {
|
|
100
|
+
[cssName: string]: unknown;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Theme = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base behavior.
|
|
6
|
+
* Two implementing ways: getSpec or getEvents
|
|
7
|
+
*/
|
|
8
|
+
class Theme {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.options = {};
|
|
11
|
+
this.updateConfig = (options) => {
|
|
12
|
+
this.options = Object.assign(this.options, options);
|
|
13
|
+
};
|
|
14
|
+
this.options = options;
|
|
15
|
+
}
|
|
16
|
+
destroy() { }
|
|
17
|
+
}
|
|
18
|
+
exports.Theme = Theme;
|
|
19
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"src/","sources":["types/theme.ts"],"names":[],"mappings":";;;AAOA;;;GAGG;AACH,MAAsB,KAAK;IAEzB,YAAY,OAAY;QADxB,YAAO,GAAQ,EAAE,CAAC;QAIlB,iBAAY,GAAG,CAAC,OAAY,EAAE,EAAE;YAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC,CAAC;QAJA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAID,OAAO,KAAI,CAAC;CACb;AATD,sBASC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface FitViewRules {
|
|
2
|
+
onlyOutOfViewPort?: boolean;
|
|
3
|
+
direction?: 'x' | 'y' | 'both';
|
|
4
|
+
ratioRule?: 'max' | 'min';
|
|
5
|
+
}
|
|
6
|
+
export type GraphAlignment = 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'center' | [number, number];
|
|
7
|
+
export type GraphTransformOptions = {
|
|
8
|
+
translate?: Partial<{
|
|
9
|
+
dx: number;
|
|
10
|
+
dy: number;
|
|
11
|
+
dz: number;
|
|
12
|
+
}>;
|
|
13
|
+
rotate?: {
|
|
14
|
+
angle: number;
|
|
15
|
+
};
|
|
16
|
+
zoom?: {
|
|
17
|
+
ratio: number;
|
|
18
|
+
};
|
|
19
|
+
origin?: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"src/","sources":["types/view.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { DisplayObject, Group, IAnimation } from '@antv/g';
|
|
2
|
+
import { AnimateTiming, IAnimates } from '../types/animate';
|
|
3
|
+
import { ItemShapeStyles } from '../types/item';
|
|
4
|
+
/**
|
|
5
|
+
* Initial(timing = show) shape animation start from init shape styles, and end to the shape's style config.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getShapeAnimateBeginStyles: (shape: any) => {
|
|
8
|
+
fontSize?: undefined;
|
|
9
|
+
opacity?: undefined;
|
|
10
|
+
strokeOpacity?: undefined;
|
|
11
|
+
offsetDistance?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
opacity: number;
|
|
14
|
+
strokeOpacity: number;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
offsetDistance: number;
|
|
17
|
+
lineDash: any[];
|
|
18
|
+
fontSize?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
opacity: number;
|
|
21
|
+
strokeOpacity: number;
|
|
22
|
+
lineWidth: number;
|
|
23
|
+
offsetDistance: number;
|
|
24
|
+
r: number;
|
|
25
|
+
fontSize?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
opacity: number;
|
|
28
|
+
strokeOpacity: number;
|
|
29
|
+
lineWidth: number;
|
|
30
|
+
offsetDistance: number;
|
|
31
|
+
rx: number;
|
|
32
|
+
ry: number;
|
|
33
|
+
fontSize?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
fontSize: number;
|
|
36
|
+
opacity: number;
|
|
37
|
+
strokeOpacity: number;
|
|
38
|
+
offsetDistance: number;
|
|
39
|
+
} | {
|
|
40
|
+
opacity: number;
|
|
41
|
+
strokeOpacity: number;
|
|
42
|
+
lineWidth: number;
|
|
43
|
+
offsetDistance: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
fontSize?: undefined;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Initial(timing = show) group animation start from GROUP_ANIMATE_STYLES[0], and end to GROUP_ANIMATE_STYLES[1].
|
|
50
|
+
*/
|
|
51
|
+
export declare const GROUP_ANIMATE_STYLES: {
|
|
52
|
+
opacity: number;
|
|
53
|
+
transform: string;
|
|
54
|
+
}[];
|
|
55
|
+
/**
|
|
56
|
+
* Default animate options for different timing.
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_ANIMATE_CFG: {
|
|
59
|
+
buildIn: {
|
|
60
|
+
duration: number;
|
|
61
|
+
easing: string;
|
|
62
|
+
iterations: number;
|
|
63
|
+
delay: number;
|
|
64
|
+
fill: string;
|
|
65
|
+
};
|
|
66
|
+
show: {
|
|
67
|
+
duration: number;
|
|
68
|
+
easing: string;
|
|
69
|
+
iterations: number;
|
|
70
|
+
fill: string;
|
|
71
|
+
};
|
|
72
|
+
update: {
|
|
73
|
+
duration: number;
|
|
74
|
+
easing: string;
|
|
75
|
+
iterations: number;
|
|
76
|
+
fill: string;
|
|
77
|
+
};
|
|
78
|
+
zoom: {
|
|
79
|
+
duration: number;
|
|
80
|
+
easing: string;
|
|
81
|
+
iterations: number;
|
|
82
|
+
delay: number;
|
|
83
|
+
fill: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Handle shape and group animations.
|
|
88
|
+
* Should be called after canvas ready and shape appended.
|
|
89
|
+
* @param animates
|
|
90
|
+
* @param mergedStyles
|
|
91
|
+
* @param shapeMap
|
|
92
|
+
* @param group
|
|
93
|
+
* @param timing timing to match 'when' in the animate config in style
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
export declare const animateShapes: (animates: IAnimates, mergedStyles: ItemShapeStyles, shapeMap: {
|
|
97
|
+
[shapeId: string]: DisplayObject<any, any>;
|
|
98
|
+
}, group: Group, timing?: AnimateTiming, changedStates?: string[], onAnimatesFrame?: Function, onAnimatesEnd?: Function) => IAnimation[];
|
|
99
|
+
export declare const getAnimatesExcludePosition: (animates: any) => any;
|
|
100
|
+
export declare const fadeIn: (id: any, shape: any, style: any, hiddenShape: any, animateConfig: any) => void;
|
|
101
|
+
export declare const fadeOut: (id: any, shape: any, hiddenShape: any, animateConfig: any) => void;
|