@visactor/vgrammar-core 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -0
- package/README.zh-CN.md +11 -0
- package/cjs/component/axis.d.ts +26 -0
- package/cjs/component/axis.js +164 -0
- package/cjs/component/axis.js.map +1 -0
- package/cjs/component/crosshair.d.ts +50 -0
- package/cjs/component/crosshair.js +281 -0
- package/cjs/component/crosshair.js.map +1 -0
- package/cjs/component/datazoom.d.ts +19 -0
- package/cjs/component/datazoom.js +166 -0
- package/cjs/component/datazoom.js.map +1 -0
- package/cjs/component/grid.d.ts +27 -0
- package/cjs/component/grid.js +190 -0
- package/cjs/component/grid.js.map +1 -0
- package/cjs/component/index.d.ts +11 -0
- package/cjs/component/index.js +105 -0
- package/cjs/component/index.js.map +1 -0
- package/cjs/component/label.d.ts +19 -0
- package/cjs/component/label.js +121 -0
- package/cjs/component/label.js.map +1 -0
- package/cjs/component/legend.d.ts +26 -0
- package/cjs/component/legend.js +170 -0
- package/cjs/component/legend.js.map +1 -0
- package/cjs/component/player.d.ts +25 -0
- package/cjs/component/player.js +138 -0
- package/cjs/component/player.js.map +1 -0
- package/cjs/component/scale.d.ts +8 -0
- package/cjs/component/scale.js +25 -0
- package/cjs/component/scale.js.map +1 -0
- package/cjs/component/scrollbar.d.ts +23 -0
- package/cjs/component/scrollbar.js +187 -0
- package/cjs/component/scrollbar.js.map +1 -0
- package/cjs/component/slider.d.ts +19 -0
- package/cjs/component/slider.js +86 -0
- package/cjs/component/slider.js.map +1 -0
- package/cjs/component/title.d.ts +15 -0
- package/cjs/component/title.js +56 -0
- package/cjs/component/title.js.map +1 -0
- package/cjs/component/tooltip.d.ts +62 -0
- package/cjs/component/tooltip.js +305 -0
- package/cjs/component/tooltip.js.map +1 -0
- package/cjs/core/factory.d.ts +35 -0
- package/cjs/core/factory.js +73 -0
- package/cjs/core/factory.js.map +1 -0
- package/cjs/glyph/boxplot.d.ts +10 -0
- package/cjs/glyph/boxplot.js +418 -0
- package/cjs/glyph/boxplot.js.map +1 -0
- package/cjs/glyph/index.d.ts +7 -0
- package/cjs/glyph/index.js +64 -0
- package/cjs/glyph/index.js.map +1 -0
- package/cjs/glyph/link-path.d.ts +7 -0
- package/cjs/glyph/link-path.js +138 -0
- package/cjs/glyph/link-path.js.map +1 -0
- package/cjs/glyph/ripple.d.ts +1 -0
- package/cjs/glyph/ripple.js +44 -0
- package/cjs/glyph/ripple.js.map +1 -0
- package/cjs/glyph/tree-path.d.ts +7 -0
- package/cjs/glyph/tree-path.js +152 -0
- package/cjs/glyph/tree-path.js.map +1 -0
- package/cjs/glyph/violin.d.ts +1 -0
- package/cjs/glyph/violin.js +165 -0
- package/cjs/glyph/violin.js.map +1 -0
- package/cjs/glyph/wave.d.ts +1 -0
- package/cjs/glyph/wave.js +67 -0
- package/cjs/glyph/wave.js.map +1 -0
- package/cjs/graph/animation/animate.d.ts +48 -0
- package/cjs/graph/animation/animate.js +250 -0
- package/cjs/graph/animation/animate.js.map +1 -0
- package/cjs/graph/animation/animation/clip.d.ts +4 -0
- package/cjs/graph/animation/animation/clip.js +54 -0
- package/cjs/graph/animation/animation/clip.js.map +1 -0
- package/cjs/graph/animation/animation/fade.d.ts +4 -0
- package/cjs/graph/animation/animation/fade.js +42 -0
- package/cjs/graph/animation/animation/fade.js.map +1 -0
- package/cjs/graph/animation/animation/grow-cartesian.d.ts +7 -0
- package/cjs/graph/animation/animation/grow-cartesian.js +288 -0
- package/cjs/graph/animation/animation/grow-cartesian.js.map +1 -0
- package/cjs/graph/animation/animation/grow-interval.d.ts +3 -0
- package/cjs/graph/animation/animation/grow-interval.js +194 -0
- package/cjs/graph/animation/animation/grow-interval.js.map +1 -0
- package/cjs/graph/animation/animation/grow-points.d.ts +7 -0
- package/cjs/graph/animation/animation/grow-points.js +118 -0
- package/cjs/graph/animation/animation/grow-points.js.map +1 -0
- package/cjs/graph/animation/animation/grow-polar.d.ts +5 -0
- package/cjs/graph/animation/animation/grow-polar.js +164 -0
- package/cjs/graph/animation/animation/grow-polar.js.map +1 -0
- package/cjs/graph/animation/animation/index.d.ts +11 -0
- package/cjs/graph/animation/animation/index.js +191 -0
- package/cjs/graph/animation/animation/index.js.map +1 -0
- package/cjs/graph/animation/animation/move.d.ts +3 -0
- package/cjs/graph/animation/animation/move.js +90 -0
- package/cjs/graph/animation/animation/move.js.map +1 -0
- package/cjs/graph/animation/animation/rotate.d.ts +3 -0
- package/cjs/graph/animation/animation/rotate.js +42 -0
- package/cjs/graph/animation/animation/rotate.js.map +1 -0
- package/cjs/graph/animation/animation/scale.d.ts +3 -0
- package/cjs/graph/animation/animation/scale.js +84 -0
- package/cjs/graph/animation/animation/scale.js.map +1 -0
- package/cjs/graph/animation/animation/update.d.ts +6 -0
- package/cjs/graph/animation/animation/update.js +22 -0
- package/cjs/graph/animation/animation/update.js.map +1 -0
- package/cjs/graph/animation/animator.d.ts +26 -0
- package/cjs/graph/animation/animator.js +88 -0
- package/cjs/graph/animation/animator.js.map +1 -0
- package/cjs/graph/animation/arranger.d.ts +13 -0
- package/cjs/graph/animation/arranger.js +38 -0
- package/cjs/graph/animation/arranger.js.map +1 -0
- package/cjs/graph/animation/attribute.d.ts +27 -0
- package/cjs/graph/animation/attribute.js +124 -0
- package/cjs/graph/animation/attribute.js.map +1 -0
- package/cjs/graph/animation/config.d.ts +5 -0
- package/cjs/graph/animation/config.js +92 -0
- package/cjs/graph/animation/config.js.map +1 -0
- package/cjs/graph/animation/morph.d.ts +12 -0
- package/cjs/graph/animation/morph.js +174 -0
- package/cjs/graph/animation/morph.js.map +1 -0
- package/cjs/graph/attributes/common.d.ts +2 -0
- package/cjs/graph/attributes/common.js +22 -0
- package/cjs/graph/attributes/common.js.map +1 -0
- package/cjs/graph/attributes/helpers.d.ts +17 -0
- package/cjs/graph/attributes/helpers.js +86 -0
- package/cjs/graph/attributes/helpers.js.map +1 -0
- package/cjs/graph/attributes/index.d.ts +10 -0
- package/cjs/graph/attributes/index.js +257 -0
- package/cjs/graph/attributes/index.js.map +1 -0
- package/cjs/graph/canvas-renderer.d.ts +34 -0
- package/cjs/graph/canvas-renderer.js +121 -0
- package/cjs/graph/canvas-renderer.js.map +1 -0
- package/cjs/graph/constants.d.ts +23 -0
- package/cjs/graph/constants.js +21 -0
- package/cjs/graph/constants.js.map +1 -0
- package/cjs/graph/element.d.ts +66 -0
- package/cjs/graph/element.js +297 -0
- package/cjs/graph/element.js.map +1 -0
- package/cjs/graph/enums.d.ts +153 -0
- package/cjs/graph/enums.js +85 -0
- package/cjs/graph/enums.js.map +1 -0
- package/cjs/graph/glyph-element.d.ts +53 -0
- package/cjs/graph/glyph-element.js +202 -0
- package/cjs/graph/glyph-element.js.map +1 -0
- package/cjs/graph/index.d.ts +3 -0
- package/cjs/graph/index.js +44 -0
- package/cjs/graph/index.js.map +1 -0
- package/cjs/graph/layout/grid.d.ts +3 -0
- package/cjs/graph/layout/grid.js +75 -0
- package/cjs/graph/layout/grid.js.map +1 -0
- package/cjs/graph/layout/layout.d.ts +3 -0
- package/cjs/graph/layout/layout.js +33 -0
- package/cjs/graph/layout/layout.js.map +1 -0
- package/cjs/graph/layout/relative.d.ts +3 -0
- package/cjs/graph/layout/relative.js +86 -0
- package/cjs/graph/layout/relative.js.map +1 -0
- package/cjs/graph/mark/differ.d.ts +20 -0
- package/cjs/graph/mark/differ.js +110 -0
- package/cjs/graph/mark/differ.js.map +1 -0
- package/cjs/graph/mark/encode.d.ts +10 -0
- package/cjs/graph/mark/encode.js +95 -0
- package/cjs/graph/mark/encode.js.map +1 -0
- package/cjs/graph/mark/large-rects.d.ts +10 -0
- package/cjs/graph/mark/large-rects.js +31 -0
- package/cjs/graph/mark/large-rects.js.map +1 -0
- package/cjs/graph/mark/large-symbols.d.ts +11 -0
- package/cjs/graph/mark/large-symbols.js +33 -0
- package/cjs/graph/mark/large-symbols.js.map +1 -0
- package/cjs/graph/mark-tree.d.ts +2 -0
- package/cjs/graph/mark-tree.js +21 -0
- package/cjs/graph/mark-tree.js.map +1 -0
- package/cjs/graph/util/element.d.ts +2 -0
- package/cjs/graph/util/element.js +10 -0
- package/cjs/graph/util/element.js.map +1 -0
- package/cjs/graph/util/env.d.ts +2 -0
- package/cjs/graph/util/env.js +14 -0
- package/cjs/graph/util/env.js.map +1 -0
- package/cjs/graph/util/events-extend.d.ts +5 -0
- package/cjs/graph/util/events-extend.js +18 -0
- package/cjs/graph/util/events-extend.js.map +1 -0
- package/cjs/graph/util/graphic.d.ts +9 -0
- package/cjs/graph/util/graphic.js +59 -0
- package/cjs/graph/util/graphic.js.map +1 -0
- package/cjs/graph/util/point.d.ts +1 -0
- package/cjs/graph/util/point.js +75 -0
- package/cjs/graph/util/point.js.map +1 -0
- package/cjs/index.d.ts +14 -0
- package/cjs/index.js +111 -0
- package/cjs/index.js.map +1 -0
- package/cjs/parse/coordinate.d.ts +7 -0
- package/cjs/parse/coordinate.js +70 -0
- package/cjs/parse/coordinate.js.map +1 -0
- package/cjs/parse/event.d.ts +8 -0
- package/cjs/parse/event.js +33 -0
- package/cjs/parse/event.js.map +1 -0
- package/cjs/parse/mark.d.ts +4 -0
- package/cjs/parse/mark.js +25 -0
- package/cjs/parse/mark.js.map +1 -0
- package/cjs/parse/option.d.ts +3 -0
- package/cjs/parse/option.js +19 -0
- package/cjs/parse/option.js.map +1 -0
- package/cjs/parse/scale.d.ts +8 -0
- package/cjs/parse/scale.js +365 -0
- package/cjs/parse/scale.js.map +1 -0
- package/cjs/parse/transform.d.ts +5 -0
- package/cjs/parse/transform.js +103 -0
- package/cjs/parse/transform.js.map +1 -0
- package/cjs/parse/util.d.ts +13 -0
- package/cjs/parse/util.js +82 -0
- package/cjs/parse/util.js.map +1 -0
- package/cjs/parse/view.d.ts +17 -0
- package/cjs/parse/view.js +108 -0
- package/cjs/parse/view.js.map +1 -0
- package/cjs/semantic-marks/cell.d.ts +13 -0
- package/cjs/semantic-marks/cell.js +61 -0
- package/cjs/semantic-marks/cell.js.map +1 -0
- package/cjs/semantic-marks/interval.d.ts +14 -0
- package/cjs/semantic-marks/interval.js +80 -0
- package/cjs/semantic-marks/interval.js.map +1 -0
- package/cjs/semantic-marks/text.d.ts +10 -0
- package/cjs/semantic-marks/text.js +25 -0
- package/cjs/semantic-marks/text.js.map +1 -0
- package/cjs/theme/common/component.d.ts +15 -0
- package/cjs/theme/common/component.js +493 -0
- package/cjs/theme/common/component.js.map +1 -0
- package/cjs/theme/common/constants.d.ts +1 -0
- package/cjs/theme/common/constants.js +6 -0
- package/cjs/theme/common/constants.js.map +1 -0
- package/cjs/theme/common/mark.d.ts +2 -0
- package/cjs/theme/common/mark.js +15 -0
- package/cjs/theme/common/mark.js.map +1 -0
- package/cjs/theme/dark.d.ts +2 -0
- package/cjs/theme/dark.js +94 -0
- package/cjs/theme/dark.js.map +1 -0
- package/cjs/theme/default.d.ts +2 -0
- package/cjs/theme/default.js +18 -0
- package/cjs/theme/default.js.map +1 -0
- package/cjs/theme/theme-manager.d.ts +8 -0
- package/cjs/theme/theme-manager.js +26 -0
- package/cjs/theme/theme-manager.js.map +1 -0
- package/cjs/transforms/data/bin.d.ts +2 -0
- package/cjs/transforms/data/bin.js +21 -0
- package/cjs/transforms/data/bin.js.map +1 -0
- package/cjs/transforms/data/circular-relation.d.ts +2 -0
- package/cjs/transforms/data/circular-relation.js +56 -0
- package/cjs/transforms/data/circular-relation.js.map +1 -0
- package/cjs/transforms/data/contour.d.ts +2 -0
- package/cjs/transforms/data/contour.js +115 -0
- package/cjs/transforms/data/contour.js.map +1 -0
- package/cjs/transforms/data/filter.d.ts +2 -0
- package/cjs/transforms/data/filter.js +10 -0
- package/cjs/transforms/data/filter.js.map +1 -0
- package/cjs/transforms/data/fold.d.ts +2 -0
- package/cjs/transforms/data/fold.js +24 -0
- package/cjs/transforms/data/fold.js.map +1 -0
- package/cjs/transforms/data/funnel.d.ts +2 -0
- package/cjs/transforms/data/funnel.js +25 -0
- package/cjs/transforms/data/funnel.js.map +1 -0
- package/cjs/transforms/data/join.d.ts +2 -0
- package/cjs/transforms/data/join.js +33 -0
- package/cjs/transforms/data/join.js.map +1 -0
- package/cjs/transforms/data/kde.d.ts +2 -0
- package/cjs/transforms/data/kde.js +90 -0
- package/cjs/transforms/data/kde.js.map +1 -0
- package/cjs/transforms/data/map.d.ts +2 -0
- package/cjs/transforms/data/map.js +23 -0
- package/cjs/transforms/data/map.js.map +1 -0
- package/cjs/transforms/data/pick.d.ts +2 -0
- package/cjs/transforms/data/pick.js +20 -0
- package/cjs/transforms/data/pick.js.map +1 -0
- package/cjs/transforms/data/pie.d.ts +2 -0
- package/cjs/transforms/data/pie.js +24 -0
- package/cjs/transforms/data/pie.js.map +1 -0
- package/cjs/transforms/data/range.d.ts +4 -0
- package/cjs/transforms/data/range.js +15 -0
- package/cjs/transforms/data/range.js.map +1 -0
- package/cjs/transforms/data/sort.d.ts +2 -0
- package/cjs/transforms/data/sort.js +17 -0
- package/cjs/transforms/data/sort.js.map +1 -0
- package/cjs/transforms/data/stack.d.ts +2 -0
- package/cjs/transforms/data/stack.js +74 -0
- package/cjs/transforms/data/stack.js.map +1 -0
- package/cjs/transforms/data/unfold.d.ts +2 -0
- package/cjs/transforms/data/unfold.js +49 -0
- package/cjs/transforms/data/unfold.js.map +1 -0
- package/cjs/transforms/index.d.ts +23 -0
- package/cjs/transforms/index.js +213 -0
- package/cjs/transforms/index.js.map +1 -0
- package/cjs/transforms/mark/dodge.d.ts +2 -0
- package/cjs/transforms/mark/dodge.js +81 -0
- package/cjs/transforms/mark/dodge.js.map +1 -0
- package/cjs/transforms/mark/jitter.d.ts +4 -0
- package/cjs/transforms/mark/jitter.js +53 -0
- package/cjs/transforms/mark/jitter.js.map +1 -0
- package/cjs/transforms/mark/lttb-sample.d.ts +2 -0
- package/cjs/transforms/mark/lttb-sample.js +68 -0
- package/cjs/transforms/mark/lttb-sample.js.map +1 -0
- package/cjs/transforms/mark/mark-overlap.d.ts +2 -0
- package/cjs/transforms/mark/mark-overlap.js +79 -0
- package/cjs/transforms/mark/mark-overlap.js.map +1 -0
- package/cjs/transforms/mark/symmetry.d.ts +2 -0
- package/cjs/transforms/mark/symmetry.js +25 -0
- package/cjs/transforms/mark/symmetry.js.map +1 -0
- package/cjs/transforms/util/util.d.ts +5 -0
- package/cjs/transforms/util/util.js +41 -0
- package/cjs/transforms/util/util.js.map +1 -0
- package/cjs/transforms/view/identifier.d.ts +2 -0
- package/cjs/transforms/view/identifier.js +17 -0
- package/cjs/transforms/view/identifier.js.map +1 -0
- package/cjs/types/animate.d.ts +224 -0
- package/cjs/types/animate.js +6 -0
- package/cjs/types/animate.js.map +1 -0
- package/cjs/types/base.d.ts +36 -0
- package/cjs/types/base.js +6 -0
- package/cjs/types/base.js.map +1 -0
- package/cjs/types/component.d.ts +240 -0
- package/cjs/types/component.js +6 -0
- package/cjs/types/component.js.map +1 -0
- package/cjs/types/coordinate.d.ts +15 -0
- package/cjs/types/coordinate.js +6 -0
- package/cjs/types/coordinate.js.map +1 -0
- package/cjs/types/data.d.ts +55 -0
- package/cjs/types/data.js +5 -0
- package/cjs/types/data.js.map +1 -0
- package/cjs/types/dataflow.d.ts +13 -0
- package/cjs/types/dataflow.js +6 -0
- package/cjs/types/dataflow.js.map +1 -0
- package/cjs/types/element.d.ts +117 -0
- package/cjs/types/element.js +6 -0
- package/cjs/types/element.js.map +1 -0
- package/cjs/types/event.d.ts +58 -0
- package/cjs/types/event.js +6 -0
- package/cjs/types/event.js.map +1 -0
- package/cjs/types/glyph.d.ts +29 -0
- package/cjs/types/glyph.js +6 -0
- package/cjs/types/glyph.js.map +1 -0
- package/cjs/types/grammar.d.ts +184 -0
- package/cjs/types/grammar.js +6 -0
- package/cjs/types/grammar.js.map +1 -0
- package/cjs/types/hooks.d.ts +45 -0
- package/cjs/types/hooks.js +6 -0
- package/cjs/types/hooks.js.map +1 -0
- package/cjs/types/index.d.ts +22 -0
- package/cjs/types/index.js +31 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/layout.d.ts +5 -0
- package/cjs/types/layout.js +6 -0
- package/cjs/types/layout.js.map +1 -0
- package/cjs/types/mark.d.ts +344 -0
- package/cjs/types/mark.js +6 -0
- package/cjs/types/mark.js.map +1 -0
- package/cjs/types/morph.d.ts +29 -0
- package/cjs/types/morph.js +6 -0
- package/cjs/types/morph.js.map +1 -0
- package/cjs/types/plot.d.ts +326 -0
- package/cjs/types/plot.js +6 -0
- package/cjs/types/plot.js.map +1 -0
- package/cjs/types/projection.d.ts +61 -0
- package/cjs/types/projection.js +6 -0
- package/cjs/types/projection.js.map +1 -0
- package/cjs/types/renderer.d.ts +19 -0
- package/cjs/types/renderer.js +6 -0
- package/cjs/types/renderer.js.map +1 -0
- package/cjs/types/scale.d.ts +111 -0
- package/cjs/types/scale.js +6 -0
- package/cjs/types/scale.js.map +1 -0
- package/cjs/types/signal.d.ts +20 -0
- package/cjs/types/signal.js +6 -0
- package/cjs/types/signal.js.map +1 -0
- package/cjs/types/theme.d.ts +41 -0
- package/cjs/types/theme.js +6 -0
- package/cjs/types/theme.js.map +1 -0
- package/cjs/types/transform.d.ts +291 -0
- package/cjs/types/transform.js +6 -0
- package/cjs/types/transform.js.map +1 -0
- package/cjs/types/view.d.ts +217 -0
- package/cjs/types/view.js +6 -0
- package/cjs/types/view.js.map +1 -0
- package/cjs/util/data.d.ts +3 -0
- package/cjs/util/data.js +64 -0
- package/cjs/util/data.js.map +1 -0
- package/cjs/util/grammar-heap.d.ts +14 -0
- package/cjs/util/grammar-heap.js +66 -0
- package/cjs/util/grammar-heap.js.map +1 -0
- package/cjs/util/text.d.ts +19 -0
- package/cjs/util/text.js +32 -0
- package/cjs/util/text.js.map +1 -0
- package/cjs/util/unique-list.d.ts +12 -0
- package/cjs/util/unique-list.js +37 -0
- package/cjs/util/unique-list.js.map +1 -0
- package/cjs/view/View.d.ts +157 -0
- package/cjs/view/View.js +800 -0
- package/cjs/view/View.js.map +1 -0
- package/cjs/view/animate.d.ts +20 -0
- package/cjs/view/animate.js +106 -0
- package/cjs/view/animate.js.map +1 -0
- package/cjs/view/component.d.ts +26 -0
- package/cjs/view/component.js +64 -0
- package/cjs/view/component.js.map +1 -0
- package/cjs/view/constants.d.ts +17 -0
- package/cjs/view/constants.js +13 -0
- package/cjs/view/constants.js.map +1 -0
- package/cjs/view/coordinate.d.ts +23 -0
- package/cjs/view/coordinate.js +59 -0
- package/cjs/view/coordinate.js.map +1 -0
- package/cjs/view/data.d.ts +37 -0
- package/cjs/view/data.js +198 -0
- package/cjs/view/data.js.map +1 -0
- package/cjs/view/dataflow.d.ts +32 -0
- package/cjs/view/dataflow.js +146 -0
- package/cjs/view/dataflow.js.map +1 -0
- package/cjs/view/events.d.ts +4 -0
- package/cjs/view/events.js +34 -0
- package/cjs/view/events.js.map +1 -0
- package/cjs/view/glyph-meta.d.ts +29 -0
- package/cjs/view/glyph-meta.js +45 -0
- package/cjs/view/glyph-meta.js.map +1 -0
- package/cjs/view/glyph.d.ts +14 -0
- package/cjs/view/glyph.js +29 -0
- package/cjs/view/glyph.js.map +1 -0
- package/cjs/view/grammar-base.d.ts +46 -0
- package/cjs/view/grammar-base.js +171 -0
- package/cjs/view/grammar-base.js.map +1 -0
- package/cjs/view/grammar-record.d.ts +39 -0
- package/cjs/view/grammar-record.js +180 -0
- package/cjs/view/grammar-record.js.map +1 -0
- package/cjs/view/group.d.ts +13 -0
- package/cjs/view/group.js +39 -0
- package/cjs/view/group.js.map +1 -0
- package/cjs/view/index.d.ts +1 -0
- package/cjs/view/index.js +21 -0
- package/cjs/view/index.js.map +1 -0
- package/cjs/view/mark.d.ts +112 -0
- package/cjs/view/mark.js +600 -0
- package/cjs/view/mark.js.map +1 -0
- package/cjs/view/scale.d.ts +26 -0
- package/cjs/view/scale.js +86 -0
- package/cjs/view/scale.js.map +1 -0
- package/cjs/view/signal.d.ts +18 -0
- package/cjs/view/signal.js +56 -0
- package/cjs/view/signal.js.map +1 -0
- package/es/component/axis.d.ts +26 -0
- package/es/component/axis.js +162 -0
- package/es/component/axis.js.map +1 -0
- package/es/component/crosshair.d.ts +50 -0
- package/es/component/crosshair.js +275 -0
- package/es/component/crosshair.js.map +1 -0
- package/es/component/datazoom.d.ts +19 -0
- package/es/component/datazoom.js +161 -0
- package/es/component/datazoom.js.map +1 -0
- package/es/component/grid.d.ts +27 -0
- package/es/component/grid.js +193 -0
- package/es/component/grid.js.map +1 -0
- package/es/component/index.d.ts +11 -0
- package/es/component/index.js +22 -0
- package/es/component/index.js.map +1 -0
- package/es/component/label.d.ts +19 -0
- package/es/component/label.js +124 -0
- package/es/component/label.js.map +1 -0
- package/es/component/legend.d.ts +26 -0
- package/es/component/legend.js +169 -0
- package/es/component/legend.js.map +1 -0
- package/es/component/player.d.ts +25 -0
- package/es/component/player.js +136 -0
- package/es/component/player.js.map +1 -0
- package/es/component/scale.d.ts +8 -0
- package/es/component/scale.js +19 -0
- package/es/component/scale.js.map +1 -0
- package/es/component/scrollbar.d.ts +23 -0
- package/es/component/scrollbar.js +184 -0
- package/es/component/scrollbar.js.map +1 -0
- package/es/component/slider.d.ts +19 -0
- package/es/component/slider.js +86 -0
- package/es/component/slider.js.map +1 -0
- package/es/component/title.d.ts +15 -0
- package/es/component/title.js +58 -0
- package/es/component/title.js.map +1 -0
- package/es/component/tooltip.d.ts +62 -0
- package/es/component/tooltip.js +303 -0
- package/es/component/tooltip.js.map +1 -0
- package/es/core/factory.d.ts +35 -0
- package/es/core/factory.js +67 -0
- package/es/core/factory.js.map +1 -0
- package/es/glyph/boxplot.d.ts +10 -0
- package/es/glyph/boxplot.js +410 -0
- package/es/glyph/boxplot.js.map +1 -0
- package/es/glyph/index.d.ts +7 -0
- package/es/glyph/index.js +11 -0
- package/es/glyph/index.js.map +1 -0
- package/es/glyph/link-path.d.ts +7 -0
- package/es/glyph/link-path.js +132 -0
- package/es/glyph/link-path.js.map +1 -0
- package/es/glyph/ripple.d.ts +1 -0
- package/es/glyph/ripple.js +38 -0
- package/es/glyph/ripple.js.map +1 -0
- package/es/glyph/tree-path.d.ts +7 -0
- package/es/glyph/tree-path.js +146 -0
- package/es/glyph/tree-path.js.map +1 -0
- package/es/glyph/violin.d.ts +1 -0
- package/es/glyph/violin.js +163 -0
- package/es/glyph/violin.js.map +1 -0
- package/es/glyph/wave.d.ts +1 -0
- package/es/glyph/wave.js +61 -0
- package/es/glyph/wave.js.map +1 -0
- package/es/graph/animation/animate.d.ts +48 -0
- package/es/graph/animation/animate.js +247 -0
- package/es/graph/animation/animate.js.map +1 -0
- package/es/graph/animation/animation/clip.d.ts +4 -0
- package/es/graph/animation/animation/clip.js +44 -0
- package/es/graph/animation/animation/clip.js.map +1 -0
- package/es/graph/animation/animation/fade.d.ts +4 -0
- package/es/graph/animation/animation/fade.js +32 -0
- package/es/graph/animation/animation/fade.js.map +1 -0
- package/es/graph/animation/animation/grow-cartesian.d.ts +7 -0
- package/es/graph/animation/animation/grow-cartesian.js +272 -0
- package/es/graph/animation/animation/grow-cartesian.js.map +1 -0
- package/es/graph/animation/animation/grow-interval.d.ts +3 -0
- package/es/graph/animation/animation/grow-interval.js +184 -0
- package/es/graph/animation/animation/grow-interval.js.map +1 -0
- package/es/graph/animation/animation/grow-points.d.ts +7 -0
- package/es/graph/animation/animation/grow-points.js +107 -0
- package/es/graph/animation/animation/grow-points.js.map +1 -0
- package/es/graph/animation/animation/grow-polar.d.ts +5 -0
- package/es/graph/animation/animation/grow-polar.js +160 -0
- package/es/graph/animation/animation/grow-polar.js.map +1 -0
- package/es/graph/animation/animation/index.d.ts +11 -0
- package/es/graph/animation/animation/index.js +22 -0
- package/es/graph/animation/animation/index.js.map +1 -0
- package/es/graph/animation/animation/move.d.ts +3 -0
- package/es/graph/animation/animation/move.js +78 -0
- package/es/graph/animation/animation/move.js.map +1 -0
- package/es/graph/animation/animation/rotate.d.ts +3 -0
- package/es/graph/animation/animation/rotate.js +32 -0
- package/es/graph/animation/animation/rotate.js.map +1 -0
- package/es/graph/animation/animation/scale.d.ts +3 -0
- package/es/graph/animation/animation/scale.js +74 -0
- package/es/graph/animation/animation/scale.js.map +1 -0
- package/es/graph/animation/animation/update.d.ts +6 -0
- package/es/graph/animation/animation/update.js +20 -0
- package/es/graph/animation/animation/update.js.map +1 -0
- package/es/graph/animation/animator.d.ts +26 -0
- package/es/graph/animation/animator.js +83 -0
- package/es/graph/animation/animator.js.map +1 -0
- package/es/graph/animation/arranger.d.ts +13 -0
- package/es/graph/animation/arranger.js +29 -0
- package/es/graph/animation/arranger.js.map +1 -0
- package/es/graph/animation/attribute.d.ts +27 -0
- package/es/graph/animation/attribute.js +114 -0
- package/es/graph/animation/attribute.js.map +1 -0
- package/es/graph/animation/config.d.ts +5 -0
- package/es/graph/animation/config.js +84 -0
- package/es/graph/animation/config.js.map +1 -0
- package/es/graph/animation/morph.d.ts +12 -0
- package/es/graph/animation/morph.js +171 -0
- package/es/graph/animation/morph.js.map +1 -0
- package/es/graph/attributes/common.d.ts +2 -0
- package/es/graph/attributes/common.js +13 -0
- package/es/graph/attributes/common.js.map +1 -0
- package/es/graph/attributes/helpers.d.ts +17 -0
- package/es/graph/attributes/helpers.js +75 -0
- package/es/graph/attributes/helpers.js.map +1 -0
- package/es/graph/attributes/index.d.ts +10 -0
- package/es/graph/attributes/index.js +231 -0
- package/es/graph/attributes/index.js.map +1 -0
- package/es/graph/canvas-renderer.d.ts +34 -0
- package/es/graph/canvas-renderer.js +115 -0
- package/es/graph/canvas-renderer.js.map +1 -0
- package/es/graph/constants.d.ts +23 -0
- package/es/graph/constants.js +47 -0
- package/es/graph/constants.js.map +1 -0
- package/es/graph/element.d.ts +66 -0
- package/es/graph/element.js +292 -0
- package/es/graph/element.js.map +1 -0
- package/es/graph/enums.d.ts +153 -0
- package/es/graph/enums.js +129 -0
- package/es/graph/enums.js.map +1 -0
- package/es/graph/glyph-element.d.ts +53 -0
- package/es/graph/glyph-element.js +206 -0
- package/es/graph/glyph-element.js.map +1 -0
- package/es/graph/index.d.ts +3 -0
- package/es/graph/index.js +6 -0
- package/es/graph/index.js.map +1 -0
- package/es/graph/layout/grid.d.ts +3 -0
- package/es/graph/layout/grid.js +66 -0
- package/es/graph/layout/grid.js.map +1 -0
- package/es/graph/layout/layout.d.ts +3 -0
- package/es/graph/layout/layout.js +33 -0
- package/es/graph/layout/layout.js.map +1 -0
- package/es/graph/layout/relative.d.ts +3 -0
- package/es/graph/layout/relative.js +85 -0
- package/es/graph/layout/relative.js.map +1 -0
- package/es/graph/mark/differ.d.ts +20 -0
- package/es/graph/mark/differ.js +104 -0
- package/es/graph/mark/differ.js.map +1 -0
- package/es/graph/mark/encode.d.ts +10 -0
- package/es/graph/mark/encode.js +92 -0
- package/es/graph/mark/encode.js.map +1 -0
- package/es/graph/mark/large-rects.d.ts +10 -0
- package/es/graph/mark/large-rects.js +23 -0
- package/es/graph/mark/large-rects.js.map +1 -0
- package/es/graph/mark/large-symbols.d.ts +11 -0
- package/es/graph/mark/large-symbols.js +27 -0
- package/es/graph/mark/large-symbols.js.map +1 -0
- package/es/graph/mark-tree.d.ts +2 -0
- package/es/graph/mark-tree.js +15 -0
- package/es/graph/mark-tree.js.map +1 -0
- package/es/graph/util/element.d.ts +2 -0
- package/es/graph/util/element.js +8 -0
- package/es/graph/util/element.js.map +1 -0
- package/es/graph/util/env.d.ts +2 -0
- package/es/graph/util/env.js +6 -0
- package/es/graph/util/env.js.map +1 -0
- package/es/graph/util/events-extend.d.ts +5 -0
- package/es/graph/util/events-extend.js +12 -0
- package/es/graph/util/events-extend.js.map +1 -0
- package/es/graph/util/graphic.d.ts +9 -0
- package/es/graph/util/graphic.js +59 -0
- package/es/graph/util/graphic.js.map +1 -0
- package/es/graph/util/point.d.ts +1 -0
- package/es/graph/util/point.js +67 -0
- package/es/graph/util/point.js.map +1 -0
- package/es/index.d.ts +14 -0
- package/es/index.js +27 -0
- package/es/index.js.map +1 -0
- package/es/parse/coordinate.d.ts +7 -0
- package/es/parse/coordinate.js +65 -0
- package/es/parse/coordinate.js.map +1 -0
- package/es/parse/event.d.ts +8 -0
- package/es/parse/event.js +23 -0
- package/es/parse/event.js.map +1 -0
- package/es/parse/mark.d.ts +4 -0
- package/es/parse/mark.js +19 -0
- package/es/parse/mark.js.map +1 -0
- package/es/parse/option.d.ts +3 -0
- package/es/parse/option.js +10 -0
- package/es/parse/option.js.map +1 -0
- package/es/parse/scale.d.ts +8 -0
- package/es/parse/scale.js +347 -0
- package/es/parse/scale.js.map +1 -0
- package/es/parse/transform.d.ts +5 -0
- package/es/parse/transform.js +102 -0
- package/es/parse/transform.js.map +1 -0
- package/es/parse/util.d.ts +13 -0
- package/es/parse/util.js +65 -0
- package/es/parse/util.js.map +1 -0
- package/es/parse/view.d.ts +17 -0
- package/es/parse/view.js +98 -0
- package/es/parse/view.js.map +1 -0
- package/es/semantic-marks/cell.d.ts +13 -0
- package/es/semantic-marks/cell.js +57 -0
- package/es/semantic-marks/cell.js.map +1 -0
- package/es/semantic-marks/interval.d.ts +14 -0
- package/es/semantic-marks/interval.js +87 -0
- package/es/semantic-marks/interval.js.map +1 -0
- package/es/semantic-marks/text.d.ts +10 -0
- package/es/semantic-marks/text.js +22 -0
- package/es/semantic-marks/text.js.map +1 -0
- package/es/theme/common/component.d.ts +15 -0
- package/es/theme/common/component.js +510 -0
- package/es/theme/common/component.js.map +1 -0
- package/es/theme/common/constants.d.ts +1 -0
- package/es/theme/common/constants.js +2 -0
- package/es/theme/common/constants.js.map +1 -0
- package/es/theme/common/mark.d.ts +2 -0
- package/es/theme/common/mark.js +11 -0
- package/es/theme/common/mark.js.map +1 -0
- package/es/theme/dark.d.ts +2 -0
- package/es/theme/dark.js +96 -0
- package/es/theme/dark.js.map +1 -0
- package/es/theme/default.d.ts +2 -0
- package/es/theme/default.js +16 -0
- package/es/theme/default.js.map +1 -0
- package/es/theme/theme-manager.d.ts +8 -0
- package/es/theme/theme-manager.js +22 -0
- package/es/theme/theme-manager.js.map +1 -0
- package/es/transforms/data/bin.d.ts +2 -0
- package/es/transforms/data/bin.js +16 -0
- package/es/transforms/data/bin.js.map +1 -0
- package/es/transforms/data/circular-relation.d.ts +2 -0
- package/es/transforms/data/circular-relation.js +44 -0
- package/es/transforms/data/circular-relation.js.map +1 -0
- package/es/transforms/data/contour.d.ts +2 -0
- package/es/transforms/data/contour.js +111 -0
- package/es/transforms/data/contour.js.map +1 -0
- package/es/transforms/data/filter.d.ts +2 -0
- package/es/transforms/data/filter.js +2 -0
- package/es/transforms/data/filter.js.map +1 -0
- package/es/transforms/data/fold.d.ts +2 -0
- package/es/transforms/data/fold.js +16 -0
- package/es/transforms/data/fold.js.map +1 -0
- package/es/transforms/data/funnel.d.ts +2 -0
- package/es/transforms/data/funnel.js +17 -0
- package/es/transforms/data/funnel.js.map +1 -0
- package/es/transforms/data/join.d.ts +2 -0
- package/es/transforms/data/join.js +26 -0
- package/es/transforms/data/join.js.map +1 -0
- package/es/transforms/data/kde.d.ts +2 -0
- package/es/transforms/data/kde.js +80 -0
- package/es/transforms/data/kde.js.map +1 -0
- package/es/transforms/data/map.d.ts +2 -0
- package/es/transforms/data/map.js +16 -0
- package/es/transforms/data/map.js.map +1 -0
- package/es/transforms/data/pick.d.ts +2 -0
- package/es/transforms/data/pick.js +15 -0
- package/es/transforms/data/pick.js.map +1 -0
- package/es/transforms/data/pie.d.ts +2 -0
- package/es/transforms/data/pie.js +18 -0
- package/es/transforms/data/pie.js.map +1 -0
- package/es/transforms/data/range.d.ts +4 -0
- package/es/transforms/data/range.js +9 -0
- package/es/transforms/data/range.js.map +1 -0
- package/es/transforms/data/sort.d.ts +2 -0
- package/es/transforms/data/sort.js +13 -0
- package/es/transforms/data/sort.js.map +1 -0
- package/es/transforms/data/stack.d.ts +2 -0
- package/es/transforms/data/stack.js +72 -0
- package/es/transforms/data/stack.js.map +1 -0
- package/es/transforms/data/unfold.d.ts +2 -0
- package/es/transforms/data/unfold.js +45 -0
- package/es/transforms/data/unfold.js.map +1 -0
- package/es/transforms/index.d.ts +23 -0
- package/es/transforms/index.js +205 -0
- package/es/transforms/index.js.map +1 -0
- package/es/transforms/mark/dodge.d.ts +2 -0
- package/es/transforms/mark/dodge.js +74 -0
- package/es/transforms/mark/dodge.js.map +1 -0
- package/es/transforms/mark/jitter.d.ts +4 -0
- package/es/transforms/mark/jitter.js +48 -0
- package/es/transforms/mark/jitter.js.map +1 -0
- package/es/transforms/mark/lttb-sample.d.ts +2 -0
- package/es/transforms/mark/lttb-sample.js +60 -0
- package/es/transforms/mark/lttb-sample.js.map +1 -0
- package/es/transforms/mark/mark-overlap.d.ts +2 -0
- package/es/transforms/mark/mark-overlap.js +71 -0
- package/es/transforms/mark/mark-overlap.js.map +1 -0
- package/es/transforms/mark/symmetry.d.ts +2 -0
- package/es/transforms/mark/symmetry.js +20 -0
- package/es/transforms/mark/symmetry.js.map +1 -0
- package/es/transforms/util/util.d.ts +5 -0
- package/es/transforms/util/util.js +33 -0
- package/es/transforms/util/util.js.map +1 -0
- package/es/transforms/view/identifier.d.ts +2 -0
- package/es/transforms/view/identifier.js +13 -0
- package/es/transforms/view/identifier.js.map +1 -0
- package/es/types/animate.d.ts +224 -0
- package/es/types/animate.js +2 -0
- package/es/types/animate.js.map +1 -0
- package/es/types/base.d.ts +36 -0
- package/es/types/base.js +2 -0
- package/es/types/base.js.map +1 -0
- package/es/types/component.d.ts +240 -0
- package/es/types/component.js +2 -0
- package/es/types/component.js.map +1 -0
- package/es/types/coordinate.d.ts +15 -0
- package/es/types/coordinate.js +2 -0
- package/es/types/coordinate.js.map +1 -0
- package/es/types/data.d.ts +55 -0
- package/es/types/data.js +1 -0
- package/es/types/data.js.map +1 -0
- package/es/types/dataflow.d.ts +13 -0
- package/es/types/dataflow.js +2 -0
- package/es/types/dataflow.js.map +1 -0
- package/es/types/element.d.ts +117 -0
- package/es/types/element.js +2 -0
- package/es/types/element.js.map +1 -0
- package/es/types/event.d.ts +58 -0
- package/es/types/event.js +2 -0
- package/es/types/event.js.map +1 -0
- package/es/types/glyph.d.ts +29 -0
- package/es/types/glyph.js +2 -0
- package/es/types/glyph.js.map +1 -0
- package/es/types/grammar.d.ts +184 -0
- package/es/types/grammar.js +2 -0
- package/es/types/grammar.js.map +1 -0
- package/es/types/hooks.d.ts +45 -0
- package/es/types/hooks.js +2 -0
- package/es/types/hooks.js.map +1 -0
- package/es/types/index.d.ts +22 -0
- package/es/types/index.js +44 -0
- package/es/types/index.js.map +1 -0
- package/es/types/layout.d.ts +5 -0
- package/es/types/layout.js +2 -0
- package/es/types/layout.js.map +1 -0
- package/es/types/mark.d.ts +344 -0
- package/es/types/mark.js +2 -0
- package/es/types/mark.js.map +1 -0
- package/es/types/morph.d.ts +29 -0
- package/es/types/morph.js +2 -0
- package/es/types/morph.js.map +1 -0
- package/es/types/plot.d.ts +326 -0
- package/es/types/plot.js +2 -0
- package/es/types/plot.js.map +1 -0
- package/es/types/projection.d.ts +61 -0
- package/es/types/projection.js +2 -0
- package/es/types/projection.js.map +1 -0
- package/es/types/renderer.d.ts +19 -0
- package/es/types/renderer.js +2 -0
- package/es/types/renderer.js.map +1 -0
- package/es/types/scale.d.ts +111 -0
- package/es/types/scale.js +2 -0
- package/es/types/scale.js.map +1 -0
- package/es/types/signal.d.ts +20 -0
- package/es/types/signal.js +2 -0
- package/es/types/signal.js.map +1 -0
- package/es/types/theme.d.ts +41 -0
- package/es/types/theme.js +2 -0
- package/es/types/theme.js.map +1 -0
- package/es/types/transform.d.ts +291 -0
- package/es/types/transform.js +2 -0
- package/es/types/transform.js.map +1 -0
- package/es/types/view.d.ts +217 -0
- package/es/types/view.js +2 -0
- package/es/types/view.js.map +1 -0
- package/es/util/data.d.ts +3 -0
- package/es/util/data.js +60 -0
- package/es/util/data.js.map +1 -0
- package/es/util/grammar-heap.d.ts +14 -0
- package/es/util/grammar-heap.js +58 -0
- package/es/util/grammar-heap.js.map +1 -0
- package/es/util/text.d.ts +19 -0
- package/es/util/text.js +25 -0
- package/es/util/text.js.map +1 -0
- package/es/util/unique-list.d.ts +12 -0
- package/es/util/unique-list.js +29 -0
- package/es/util/unique-list.js.map +1 -0
- package/es/view/View.d.ts +157 -0
- package/es/view/View.js +836 -0
- package/es/view/View.js.map +1 -0
- package/es/view/animate.d.ts +20 -0
- package/es/view/animate.js +98 -0
- package/es/view/animate.js.map +1 -0
- package/es/view/component.d.ts +26 -0
- package/es/view/component.js +64 -0
- package/es/view/component.js.map +1 -0
- package/es/view/constants.d.ts +17 -0
- package/es/view/constants.js +32 -0
- package/es/view/constants.js.map +1 -0
- package/es/view/coordinate.d.ts +23 -0
- package/es/view/coordinate.js +52 -0
- package/es/view/coordinate.js.map +1 -0
- package/es/view/data.d.ts +37 -0
- package/es/view/data.js +195 -0
- package/es/view/data.js.map +1 -0
- package/es/view/dataflow.d.ts +32 -0
- package/es/view/dataflow.js +141 -0
- package/es/view/dataflow.js.map +1 -0
- package/es/view/events.d.ts +4 -0
- package/es/view/events.js +26 -0
- package/es/view/events.js.map +1 -0
- package/es/view/glyph-meta.d.ts +29 -0
- package/es/view/glyph-meta.js +37 -0
- package/es/view/glyph-meta.js.map +1 -0
- package/es/view/glyph.d.ts +14 -0
- package/es/view/glyph.js +27 -0
- package/es/view/glyph.js.map +1 -0
- package/es/view/grammar-base.d.ts +46 -0
- package/es/view/grammar-base.js +165 -0
- package/es/view/grammar-base.js.map +1 -0
- package/es/view/grammar-record.d.ts +39 -0
- package/es/view/grammar-record.js +170 -0
- package/es/view/grammar-record.js.map +1 -0
- package/es/view/group.d.ts +13 -0
- package/es/view/group.js +39 -0
- package/es/view/group.js.map +1 -0
- package/es/view/index.d.ts +1 -0
- package/es/view/index.js +2 -0
- package/es/view/index.js.map +1 -0
- package/es/view/mark.d.ts +112 -0
- package/es/view/mark.js +604 -0
- package/es/view/mark.js.map +1 -0
- package/es/view/scale.d.ts +26 -0
- package/es/view/scale.js +82 -0
- package/es/view/scale.js.map +1 -0
- package/es/view/signal.d.ts +18 -0
- package/es/view/signal.js +52 -0
- package/es/view/signal.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/data.ts"],"names":[],"mappings":"","file":"data.js","sourcesContent":["import type { GrammarSpec, IData } from './grammar';\nimport type { GenericFunctionType, ParameterFunctionType } from './signal';\nimport type { TransformSpec } from './transform';\n\nexport type Datum = any;\n\nexport type DataFunctionCallback<T> = (datum: any, parameters: any) => T;\n\nexport type DataFunctionType<T> = GenericFunctionType<DataFunctionCallback<T>, T>;\n\nexport type DataType = 'boolean' | 'number' | 'date' | 'string';\nexport type DataParseSpec =\n | 'auto'\n | {\n [f: string]: DataType | string;\n };\nexport interface FormatJSONSpec {\n type: 'json';\n parse?: DataParseSpec;\n property?: string;\n copy?: boolean;\n}\nexport interface FormatSVSpec {\n type: 'csv' | 'tsv';\n header?: string[];\n parse?: DataParseSpec;\n}\nexport interface FormatDSVSpec {\n type: 'dsv';\n header?: string[];\n parse?: DataParseSpec;\n delimiter: string;\n}\nexport type FormatTopoJSONSpec = {\n type: 'topojson';\n property?: string;\n} & (\n | {\n feature: string;\n }\n | {\n mesh: string;\n filter: 'interior' | 'exterior' | null;\n }\n);\nexport type DataFormatSpec = FormatJSONSpec | FormatSVSpec | FormatDSVSpec;\n// | FormatTopoJSONSpec\n// | { parse: DataParseSpec };\n\nexport interface IDataFilter {\n source?: string;\n rank?: number;\n filter: (data: Datum[], parameters?: any) => Datum[];\n}\n\n/** 语法元素 Data 配置 */\nexport interface DataSpec extends GrammarSpec {\n /** 数据的唯一标识符 */\n name?: string;\n /** 数据变换配置 */\n transform?: TransformSpec[];\n /**\n * 原始数据配置,解析优先级最高\n */\n values?: Datum[];\n /**\n * 数据url配置,解析优先级第二\n */\n url?: ParameterFunctionType<string>;\n /**\n * 数据源配置,对应的其他Data元素的name\n */\n source?: string | string[] | IData | IData[];\n /**\n * 格式化方法\n */\n format?: ParameterFunctionType<DataFormatSpec>;\n}\n/**\n * the type of sort\n */\nexport type SortOrderType = 'desc' | 'asc';\n\n/**\n * config of sort\n */\nexport interface SortConfigSpec {\n /** the field to be sort */\n field: string | string[];\n /**\n * the order of each field\n */\n order?: SortOrderType | SortOrderType[];\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IGrammarBase } from './grammar';
|
|
2
|
+
export type IDataflowCallback = (df: IDataflow) => void;
|
|
3
|
+
export interface IDataflow {
|
|
4
|
+
logger: any;
|
|
5
|
+
add: (grammar: IGrammarBase) => boolean | undefined;
|
|
6
|
+
remove: (grammar: IGrammarBase) => void;
|
|
7
|
+
hasCommitted: () => boolean;
|
|
8
|
+
commit: (grammar: IGrammarBase) => this;
|
|
9
|
+
evaluate: () => Promise<boolean>;
|
|
10
|
+
evaluateSync: () => boolean;
|
|
11
|
+
runBefore: (callback?: IDataflowCallback) => void;
|
|
12
|
+
runAfter: (callback?: IDataflowCallback) => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/dataflow.ts"],"names":[],"mappings":"","file":"dataflow.js","sourcesContent":["import type { IGrammarBase } from './grammar';\n\nexport type IDataflowCallback = (df: IDataflow) => void;\n\n/**\n * Dataflow定义,\n */\nexport interface IDataflow {\n logger: any;\n add: (grammar: IGrammarBase) => boolean | undefined;\n remove: (grammar: IGrammarBase) => void;\n hasCommitted: () => boolean;\n commit: (grammar: IGrammarBase) => this;\n evaluate: () => Promise<boolean>;\n evaluateSync: () => boolean;\n runBefore: (callback?: IDataflowCallback) => void;\n runAfter: (callback?: IDataflowCallback) => void;\n}\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { IArc, IArc3d, IArea, ICircle, IGlyph, IGraphic, IGroup, IImage, ILine, IPath, IPolygon, IPyramid3d, IRect, IRect3d, IRichText, ISymbol, IText } from '@visactor/vrender';
|
|
2
|
+
import type { DiffState } from '../graph/enums';
|
|
3
|
+
import type { IMark, IGlyphMark } from './grammar';
|
|
4
|
+
import type { BaseEncodeSpec, IMarkConfig, MarkFunctionType, MarkKeySpec, MarkType } from './mark';
|
|
5
|
+
export interface ElementGraphicMap {
|
|
6
|
+
circle: ICircle;
|
|
7
|
+
arc: IArc;
|
|
8
|
+
area: IArea;
|
|
9
|
+
image: IImage;
|
|
10
|
+
line: ILine;
|
|
11
|
+
path: IPath;
|
|
12
|
+
rule: ILine;
|
|
13
|
+
shape: IPath;
|
|
14
|
+
symbol: ISymbol;
|
|
15
|
+
text: IText;
|
|
16
|
+
richtext: IRichText;
|
|
17
|
+
polygon: IPolygon;
|
|
18
|
+
cell: ISymbol;
|
|
19
|
+
interval: IGraphic;
|
|
20
|
+
rect: IRect;
|
|
21
|
+
rect3d: IRect3d;
|
|
22
|
+
arc3d: IArc3d;
|
|
23
|
+
pyramid3d: IPyramid3d;
|
|
24
|
+
group: IGroup;
|
|
25
|
+
glyph: IGlyph;
|
|
26
|
+
linkPath: IGlyph;
|
|
27
|
+
treePath: IGlyph;
|
|
28
|
+
wave: IGlyph;
|
|
29
|
+
ripplePoint: IGlyph;
|
|
30
|
+
barBoxplot: IGlyph;
|
|
31
|
+
boxPlot: IGlyph;
|
|
32
|
+
component: IGroup;
|
|
33
|
+
axis: IGroup;
|
|
34
|
+
legend: IGroup;
|
|
35
|
+
corsshair: IGroup;
|
|
36
|
+
slider: IGroup;
|
|
37
|
+
datazoom: IGroup;
|
|
38
|
+
label: IGroup;
|
|
39
|
+
player: IGroup;
|
|
40
|
+
}
|
|
41
|
+
export type GetGraphicByType<T> = T extends keyof ElementGraphicMap ? ElementGraphicMap[T] : IGraphic;
|
|
42
|
+
export interface MarkElementItem {
|
|
43
|
+
key: string;
|
|
44
|
+
datum: any;
|
|
45
|
+
view: any;
|
|
46
|
+
nextAttrs?: any;
|
|
47
|
+
}
|
|
48
|
+
export interface IElement {
|
|
49
|
+
mark: IMark;
|
|
50
|
+
isReserved: boolean;
|
|
51
|
+
diffState: DiffState;
|
|
52
|
+
key: string;
|
|
53
|
+
groupKey?: string;
|
|
54
|
+
data?: any[];
|
|
55
|
+
items: MarkElementItem[];
|
|
56
|
+
initGraphicItem: (attrs?: any) => void;
|
|
57
|
+
updateGraphicItem: (config: IMarkConfig) => void;
|
|
58
|
+
getDatum: () => any;
|
|
59
|
+
getBounds: () => any;
|
|
60
|
+
getGraphicItem: () => IGraphic;
|
|
61
|
+
getGraphicAttribute: (channel: string, prev?: boolean) => any;
|
|
62
|
+
setGraphicAttribute: (channel: string, value: any, final?: boolean) => void;
|
|
63
|
+
setGraphicAttributes: (attributes: {
|
|
64
|
+
[channel: string]: any;
|
|
65
|
+
}, final?: boolean) => void;
|
|
66
|
+
getItemAttribute: (channel?: string) => any;
|
|
67
|
+
setItemAttributes: (attributes: {
|
|
68
|
+
[channel: string]: any;
|
|
69
|
+
} | any[]) => void;
|
|
70
|
+
updateData: (groupKey: string, data: any[], keyGenerator: MarkKeySpec, view: any) => void;
|
|
71
|
+
state: (markState: MarkFunctionType<string | string[]>, parameters?: any) => void;
|
|
72
|
+
encodeItems: (items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered?: boolean, parameters?: any) => void;
|
|
73
|
+
encodeGraphic: (attributes?: any) => void;
|
|
74
|
+
transformElementItems: (items: MarkElementItem[], markType: MarkType, computePoints?: boolean) => Record<string, any>;
|
|
75
|
+
remove: () => void;
|
|
76
|
+
release: () => void;
|
|
77
|
+
getFinalGraphicAttributes: () => {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
};
|
|
80
|
+
getPrevGraphicAttributes: () => {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
};
|
|
83
|
+
getNextGraphicAttributes: () => {
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
};
|
|
86
|
+
clearChangedGraphicAttributes: () => void;
|
|
87
|
+
clearGraphicAttributes: () => void;
|
|
88
|
+
getStates: () => string[];
|
|
89
|
+
hasState: (state: string) => boolean;
|
|
90
|
+
clearStates: (noAnimation?: boolean) => void;
|
|
91
|
+
addState: (state: string | string[], attrs?: any) => void;
|
|
92
|
+
removeState: (state: string | string[]) => void;
|
|
93
|
+
useStates: (states: string[], noAnimation?: boolean) => void;
|
|
94
|
+
}
|
|
95
|
+
export interface IGlyphElement<P = any> extends IElement {
|
|
96
|
+
mark: IGlyphMark;
|
|
97
|
+
getGlyphGraphicItems: () => {
|
|
98
|
+
[markName: string]: any;
|
|
99
|
+
};
|
|
100
|
+
getGraphicAttribute: (channel: string, prev?: boolean, markName?: any) => any;
|
|
101
|
+
setGraphicAttribute: (channel: string, value: any, final?: boolean, markName?: any) => void;
|
|
102
|
+
setGraphicAttributes: (attributes: {
|
|
103
|
+
[channel: string]: any;
|
|
104
|
+
}, final?: boolean, markName?: any) => void;
|
|
105
|
+
getFinalGraphicAttributes: (markName?: string) => {
|
|
106
|
+
[key: string]: any;
|
|
107
|
+
};
|
|
108
|
+
getPrevGraphicAttributes: (markName?: string) => {
|
|
109
|
+
[key: string]: any;
|
|
110
|
+
};
|
|
111
|
+
getNextGraphicAttributes: (markName?: string) => {
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
};
|
|
114
|
+
encodeCustom: (nextAttrs?: any) => {
|
|
115
|
+
[markName: string]: any;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/element.ts"],"names":[],"mappings":"","file":"element.js","sourcesContent":["import type {\n IArc,\n IArc3d,\n IArea,\n ICircle,\n IGlyph,\n IGraphic,\n IGroup,\n IImage,\n ILine,\n IPath,\n IPolygon,\n IPyramid3d,\n IRect,\n IRect3d,\n IRichText,\n ISymbol,\n IText\n} from '@visactor/vrender';\nimport type { DiffState } from '../graph/enums';\nimport type { IMark, IGlyphMark } from './grammar';\nimport type { BaseEncodeSpec, IMarkConfig, MarkFunctionType, MarkKeySpec, MarkType } from './mark';\n\nexport interface ElementGraphicMap {\n circle: ICircle;\n arc: IArc;\n area: IArea;\n image: IImage;\n line: ILine;\n path: IPath;\n rule: ILine;\n shape: IPath;\n symbol: ISymbol;\n text: IText;\n richtext: IRichText;\n polygon: IPolygon;\n cell: ISymbol;\n interval: IGraphic;\n rect: IRect;\n rect3d: IRect3d;\n arc3d: IArc3d;\n pyramid3d: IPyramid3d;\n group: IGroup;\n glyph: IGlyph;\n linkPath: IGlyph;\n treePath: IGlyph;\n wave: IGlyph;\n ripplePoint: IGlyph;\n barBoxplot: IGlyph;\n boxPlot: IGlyph;\n component: IGroup;\n axis: IGroup;\n legend: IGroup;\n corsshair: IGroup;\n slider: IGroup;\n datazoom: IGroup;\n label: IGroup;\n player: IGroup;\n}\n\nexport type GetGraphicByType<T> = T extends keyof ElementGraphicMap ? ElementGraphicMap[T] : IGraphic;\n\n/**\n * 保存graphicItem状态\n */\nexport interface MarkElementItem {\n /** 唯一key */\n key: string;\n /** 原始数据 */\n datum: any;\n /** VGrammar view */\n view: any;\n /** 当前渲染帧下graphicItem对应的最新属性 */\n nextAttrs?: any;\n /** 是否初始化过,用于解决collection mark对应的item,可能跳过enter状态的问题 */\n // hasEntered: boolean;\n}\nexport interface IElement {\n mark: IMark;\n isReserved: boolean;\n diffState: DiffState;\n key: string;\n groupKey?: string;\n data?: any[];\n /**\n * 不推荐使用,但是collection图元暂时可能回涉及到相关修改\n */\n items: MarkElementItem[];\n\n initGraphicItem: (attrs?: any) => void;\n updateGraphicItem: (config: IMarkConfig) => void;\n\n getDatum: () => any;\n getBounds: () => any;\n getGraphicItem: () => IGraphic;\n\n /**\n * 获取 graphic 视觉通道属性\n * @param channel 视觉通道\n * @param prev 是否从之前的 graphic 属性上获取,默认为 false\n * @returns 视觉通道值\n */\n getGraphicAttribute: (channel: string, prev?: boolean) => any;\n /**\n * 设置 graphic 视觉通道属性\n * @param channel 视觉通道\n * @param value 视觉通道属性\n * @param final 是否更新 graphic 最终变更的视觉通道结果,默认为 false\n */\n setGraphicAttribute: (channel: string, value: any, final?: boolean) => void;\n /**\n * 设置一系列 graphic 视觉通道属性\n * @param attributes 视觉通道键值对\n * @param final 是否更新 graphic 最终变更的视觉通道结果,默认为 false\n */\n setGraphicAttributes: (attributes: { [channel: string]: any }, final?: boolean) => void;\n\n /**\n * 【慎重使用】获取 VGrammar 自身的视觉通道属性\n * 只有在 'afterEncodeItems' 时机的mark transform中才能调用\n */\n getItemAttribute: (channel?: string) => any;\n /**\n * 【慎重使用】设置 VGrammar 自身的视觉通道\n * 只有在 'afterEncodeItems' 时机的mark transform中才能调用\n * @param attributes\n * @returns\n */\n setItemAttributes: (attributes: { [channel: string]: any } | any[]) => void;\n\n // element 执行流程相关接口\n updateData: (groupKey: string, data: any[], keyGenerator: MarkKeySpec, view: any) => void;\n state: (markState: MarkFunctionType<string | string[]>, parameters?: any) => void;\n encodeItems: (items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered?: boolean, parameters?: any) => void;\n encodeGraphic: (attributes?: any) => void;\n transformElementItems: (items: MarkElementItem[], markType: MarkType, computePoints?: boolean) => Record<string, any>;\n remove: () => void;\n release: () => void;\n\n // 动画相关接口\n\n getFinalGraphicAttributes: () => { [key: string]: any };\n getPrevGraphicAttributes: () => { [key: string]: any };\n getNextGraphicAttributes: () => { [key: string]: any };\n clearChangedGraphicAttributes: () => void;\n clearGraphicAttributes: () => void;\n\n // state相关接口\n getStates: () => string[];\n hasState: (state: string) => boolean;\n clearStates: (noAnimation?: boolean) => void;\n addState: (state: string | string[], attrs?: any) => void;\n removeState: (state: string | string[]) => void;\n useStates: (states: string[], noAnimation?: boolean) => void;\n}\n\nexport interface IGlyphElement<P = any> extends IElement {\n mark: IGlyphMark;\n\n getGlyphGraphicItems: () => { [markName: string]: any };\n\n getGraphicAttribute: (channel: string, prev?: boolean, markName?: any) => any;\n setGraphicAttribute: (channel: string, value: any, final?: boolean, markName?: any) => void;\n setGraphicAttributes: (attributes: { [channel: string]: any }, final?: boolean, markName?: any) => void;\n\n getFinalGraphicAttributes: (markName?: string) => { [key: string]: any };\n getPrevGraphicAttributes: (markName?: string) => { [key: string]: any };\n getNextGraphicAttributes: (markName?: string) => { [key: string]: any };\n\n encodeCustom: (nextAttrs?: any) => { [markName: string]: any };\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IAnimationConfig, IElement, IMark } from '.';
|
|
2
|
+
import type { MarkType } from './mark';
|
|
3
|
+
import type { SignalDependency } from './signal';
|
|
4
|
+
export type AnimationEvent = {
|
|
5
|
+
mark: IMark;
|
|
6
|
+
animationState: string;
|
|
7
|
+
animationConfig: IAnimationConfig;
|
|
8
|
+
};
|
|
9
|
+
export type GrammarEvent = MouseEvent & TouchEvent & KeyboardEvent & AnimationEvent;
|
|
10
|
+
export type EventHandler<T> = (event?: GrammarEvent, value?: T) => void;
|
|
11
|
+
export type BaseEventHandler = EventHandler<any>;
|
|
12
|
+
export type ResizeHandler = EventHandler<{
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
}>;
|
|
16
|
+
export type AnimationEventType = 'animationStart' | 'animationEnd' | 'elementAnimationStart' | 'elementAnimationEnd';
|
|
17
|
+
export type AnimationListenerHandler = (event?: AnimationEvent, el?: IElement) => void;
|
|
18
|
+
export type EventType = 'pointerdown' | 'pointerup' | 'pointerupoutside' | 'pointertap' | 'pointerover' | 'pointerenter' | 'pointerleave' | 'pointerout' | 'mousedown' | 'mouseup' | 'mouseupoutside' | 'rightdown' | 'rightup' | 'rightupoutside' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseout' | 'mouseenter' | 'mouseleave' | 'wheel' | 'tap' | 'touchstart' | 'touchend' | 'touchendoutside' | 'touchmove' | 'touchcancel' | 'dragstart' | 'drag' | 'dragenter' | 'dragleave' | 'dragover' | 'dragend' | 'drop' | 'pan' | 'panstart' | 'panend' | 'press' | 'pressup' | 'pressend' | 'pinch' | 'pinchstart' | 'pinchend' | 'swipe' | 'resize';
|
|
19
|
+
export type WindowEventType = string;
|
|
20
|
+
export interface EventCallbackContext extends Event {
|
|
21
|
+
element?: any;
|
|
22
|
+
datum?: any;
|
|
23
|
+
}
|
|
24
|
+
export type EventCallback = (context: EventCallbackContext, params?: any) => any;
|
|
25
|
+
export interface BaseEventSpec {
|
|
26
|
+
type: string;
|
|
27
|
+
filter?: (context: EventCallbackContext) => boolean;
|
|
28
|
+
throttle?: number;
|
|
29
|
+
debounce?: number;
|
|
30
|
+
consume?: boolean;
|
|
31
|
+
callback?: EventCallback;
|
|
32
|
+
dependency?: SignalDependency | SignalDependency[];
|
|
33
|
+
target?: string | Array<{
|
|
34
|
+
target: string;
|
|
35
|
+
callback: EventCallback;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export type MergeEventSpec = Omit<BaseEventSpec, 'type'> & {
|
|
39
|
+
merge: string[] | BaseEventSpec[];
|
|
40
|
+
};
|
|
41
|
+
export interface ParsedViewEventSpec extends BaseEventSpec {
|
|
42
|
+
source?: 'view';
|
|
43
|
+
type: EventType;
|
|
44
|
+
markId?: string;
|
|
45
|
+
markName?: string;
|
|
46
|
+
markType?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ParsedWindowEventSpec extends BaseEventSpec {
|
|
49
|
+
source: 'window';
|
|
50
|
+
type: WindowEventType;
|
|
51
|
+
markId?: string;
|
|
52
|
+
markName?: string;
|
|
53
|
+
markType?: MarkType;
|
|
54
|
+
}
|
|
55
|
+
export type EventSpec = BaseEventSpec | ({
|
|
56
|
+
between: [BaseEventSpec, BaseEventSpec];
|
|
57
|
+
} & BaseEventSpec) | MergeEventSpec;
|
|
58
|
+
export type EventSourceType = 'window' | 'view';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/event.ts"],"names":[],"mappings":"","file":"event.js","sourcesContent":["import type { IAnimationConfig, IElement, IMark } from '.';\nimport type { MarkType } from './mark';\nimport type { SignalDependency } from './signal';\n\nexport type AnimationEvent = {\n mark: IMark;\n animationState: string;\n animationConfig: IAnimationConfig;\n};\n\nexport type GrammarEvent = MouseEvent & TouchEvent & KeyboardEvent & AnimationEvent;\n\nexport type EventHandler<T> = (event?: GrammarEvent, value?: T) => void;\nexport type BaseEventHandler = EventHandler<any>;\nexport type ResizeHandler = EventHandler<{ width?: number; height?: number }>;\n\nexport type AnimationEventType = 'animationStart' | 'animationEnd' | 'elementAnimationStart' | 'elementAnimationEnd';\n\nexport type AnimationListenerHandler = (event?: AnimationEvent, el?: IElement) => void;\n\nexport type EventType =\n | 'pointerdown'\n | 'pointerup'\n // 指针抬起与按下的图形不同时触发\n | 'pointerupoutside'\n | 'pointertap'\n | 'pointerover'\n | 'pointerenter'\n | 'pointerleave'\n | 'pointerout'\n | 'mousedown'\n | 'mouseup'\n | 'mouseupoutside'\n // 右键操作\n | 'rightdown'\n | 'rightup'\n | 'rightupoutside'\n | 'click'\n // 双击\n | 'dblclick'\n | 'mousemove'\n | 'mouseover'\n | 'mouseout'\n // 不会冒泡\n | 'mouseenter'\n // 不会冒泡\n | 'mouseleave'\n | 'wheel'\n | 'tap'\n | 'touchstart'\n | 'touchend'\n | 'touchendoutside'\n | 'touchmove'\n | 'touchcancel'\n // dragNdrop\n | 'dragstart'\n | 'drag'\n | 'dragenter'\n | 'dragleave'\n | 'dragover'\n | 'dragend'\n | 'drop'\n // gesture\n | 'pan'\n | 'panstart'\n | 'panend'\n | 'press'\n | 'pressup'\n | 'pressend'\n | 'pinch'\n | 'pinchstart'\n | 'pinchend'\n | 'swipe'\n // resize\n | 'resize';\n\nexport type WindowEventType = string;\n\nexport interface EventCallbackContext extends Event {\n element?: any;\n datum?: any;\n}\n\nexport type EventCallback = (context: EventCallbackContext, params?: any) => any;\nexport interface BaseEventSpec {\n type: string;\n filter?: (context: EventCallbackContext) => boolean;\n throttle?: number;\n debounce?: number;\n /** 阻止事件的执行和传播 */\n consume?: boolean;\n callback?: EventCallback;\n dependency?: SignalDependency | SignalDependency[];\n target?:\n | string\n | Array<{\n target: string;\n callback: EventCallback;\n }>;\n}\n\nexport type MergeEventSpec = Omit<BaseEventSpec, 'type'> & { merge: string[] | BaseEventSpec[] };\n\nexport interface ParsedViewEventSpec extends BaseEventSpec {\n source?: 'view';\n type: EventType;\n markId?: string;\n markName?: string;\n markType?: string;\n}\n\nexport interface ParsedWindowEventSpec extends BaseEventSpec {\n source: 'window';\n type: WindowEventType;\n markId?: string;\n markName?: string;\n markType?: MarkType;\n}\n\nexport type EventSpec =\n | BaseEventSpec\n | ({\n between: [BaseEventSpec, BaseEventSpec];\n } & BaseEventSpec)\n | MergeEventSpec;\n\nexport type EventSourceType = 'window' | 'view';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Nil } from './base';
|
|
2
|
+
import type { IGlyphElement } from './element';
|
|
3
|
+
import type { MarkType } from './mark';
|
|
4
|
+
export interface IGlyphMeta<EncodeValuesType = any, GlyphConfigType = any> {
|
|
5
|
+
getMarks: () => {
|
|
6
|
+
[markName: string]: MarkType;
|
|
7
|
+
};
|
|
8
|
+
getChannelEncoder: () => {
|
|
9
|
+
[channel: string]: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType>;
|
|
10
|
+
};
|
|
11
|
+
getDefaultEncoder: () => GlyphDefaultEncoder<GlyphConfigType>;
|
|
12
|
+
getFunctionEncoder: () => GlyphFunctionEncoder<GlyphConfigType>;
|
|
13
|
+
getProgressiveChannels: () => string[];
|
|
14
|
+
registerChannelEncoder: ((encoders: {
|
|
15
|
+
[markName: string]: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType>;
|
|
16
|
+
}) => this) & ((channel: string, encoder: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType>) => this);
|
|
17
|
+
registerDefaultEncoder: (encoder: GlyphDefaultEncoder<GlyphConfigType>) => this;
|
|
18
|
+
registerFunctionEncoder: (encoder: GlyphFunctionEncoder<GlyphConfigType>) => this;
|
|
19
|
+
registerProgressiveChannels: (channels: string | string[]) => this;
|
|
20
|
+
}
|
|
21
|
+
export type GlyphChannelEncoder<EncodeValueType = any, EncodeValuesType = any, GlyphConfigType = any> = (channel: string, encodeValue: EncodeValueType, encodeValues: EncodeValuesType, datum: any, element: IGlyphElement, glyphConfig: GlyphConfigType) => {
|
|
22
|
+
[markName: string]: any;
|
|
23
|
+
} | Nil;
|
|
24
|
+
export type GlyphDefaultEncoder<GlyphConfigType = any> = (datum: any, element: IGlyphElement, glyphConfig: GlyphConfigType) => {
|
|
25
|
+
[markName: string]: any;
|
|
26
|
+
};
|
|
27
|
+
export type GlyphFunctionEncoder<GlyphConfigType = any> = (encodeValues: any, datum: any, element: IGlyphElement, glyphConfig: GlyphConfigType) => {
|
|
28
|
+
[markName: string]: any;
|
|
29
|
+
} | Nil;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/glyph.ts"],"names":[],"mappings":"","file":"glyph.js","sourcesContent":["import type { Nil } from './base';\nimport type { IGlyphElement } from './element';\nimport type { MarkType } from './mark';\nexport interface IGlyphMeta<EncodeValuesType = any, GlyphConfigType = any> {\n getMarks: () => { [markName: string]: MarkType };\n\n getChannelEncoder: () => { [channel: string]: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType> };\n getDefaultEncoder: () => GlyphDefaultEncoder<GlyphConfigType>;\n getFunctionEncoder: () => GlyphFunctionEncoder<GlyphConfigType>;\n getProgressiveChannels: () => string[];\n\n registerChannelEncoder: ((encoders: {\n [markName: string]: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType>;\n }) => this) &\n ((channel: string, encoder: GlyphChannelEncoder<any, EncodeValuesType, GlyphConfigType>) => this);\n registerDefaultEncoder: (encoder: GlyphDefaultEncoder<GlyphConfigType>) => this;\n registerFunctionEncoder: (encoder: GlyphFunctionEncoder<GlyphConfigType>) => this;\n registerProgressiveChannels: (channels: string | string[]) => this;\n}\n\nexport type GlyphChannelEncoder<EncodeValueType = any, EncodeValuesType = any, GlyphConfigType = any> = (\n channel: string,\n encodeValue: EncodeValueType,\n encodeValues: EncodeValuesType,\n datum: any,\n element: IGlyphElement,\n glyphConfig: GlyphConfigType\n) => { [markName: string]: any } | Nil;\n\nexport type GlyphDefaultEncoder<GlyphConfigType = any> = (\n datum: any,\n element: IGlyphElement,\n glyphConfig: GlyphConfigType\n) => { [markName: string]: any };\n\nexport type GlyphFunctionEncoder<GlyphConfigType = any> = (\n encodeValues: any,\n datum: any,\n element: IGlyphElement,\n glyphConfig: GlyphConfigType\n) => { [markName: string]: any } | Nil;\n"]}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { EventEmitter, IBounds, IPointLike } from '@visactor/vutils';
|
|
2
|
+
import type { IGraphic, IGroup } from '@visactor/vrender';
|
|
3
|
+
import type { IBaseScale, TickData } from '@visactor/vscale';
|
|
4
|
+
import type { ITransform, TransformSpec } from './transform';
|
|
5
|
+
import type { DataFormatSpec, IDataFilter } from './data';
|
|
6
|
+
import type { ParameterFunctionType, SignalFunctionType } from './signal';
|
|
7
|
+
import type { IAnimate } from './animate';
|
|
8
|
+
import type { IGlyphMeta } from './glyph';
|
|
9
|
+
import type { GrammarTypeEnum } from '../graph/enums';
|
|
10
|
+
import type { Nil } from './base';
|
|
11
|
+
import type { CoordinateFunctionType } from './coordinate';
|
|
12
|
+
import type { IElement } from './element';
|
|
13
|
+
import type { MarkFunctionType, MarkAnimationSpec, MarkType, MarkLayoutSpec, MarkLayoutCallback, MarkSortSpec, MarkKeySpec, IMarkConfig, ChannelEncodeType, AttributeTransform, BaseSignleEncodeSpec } from './mark';
|
|
14
|
+
import type { ScaleConfigureSpec, ScaleData, ScaleFunctionType, GrammarScaleType, MultiScaleData } from './scale';
|
|
15
|
+
import type { IView } from './view';
|
|
16
|
+
import type { BaseEventHandler } from './event';
|
|
17
|
+
import type { ICartesianCoordinate, IPolarCoordinate } from '@visactor/vgrammar-coordinate';
|
|
18
|
+
export type BuiltInGrammarType = keyof typeof GrammarTypeEnum;
|
|
19
|
+
export type GrammarType = BuiltInGrammarType | string;
|
|
20
|
+
export interface IGrammarTask extends ITransform {
|
|
21
|
+
options?: Record<string, any | IGrammarBase> | (IGrammarBase | any)[];
|
|
22
|
+
references?: IGrammarBase[];
|
|
23
|
+
isRawOptions?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface GrammarSpec {
|
|
26
|
+
id?: string;
|
|
27
|
+
dependency?: IGrammarBase[] | IGrammarBase | string[] | string;
|
|
28
|
+
}
|
|
29
|
+
export interface IGrammarBase {
|
|
30
|
+
readonly grammarType: GrammarType;
|
|
31
|
+
readonly view: IView;
|
|
32
|
+
readonly uid: number;
|
|
33
|
+
grammarSource: IGrammarBase;
|
|
34
|
+
targets: IGrammarBase[];
|
|
35
|
+
references: Map<IGrammarBase, number>;
|
|
36
|
+
depend: (grammar: IGrammarBase[] | IGrammarBase | string[] | string) => this;
|
|
37
|
+
addEventListener: (type: string, handler: BaseEventHandler, options?: any) => this;
|
|
38
|
+
removeEventListener: (type: string, handler: BaseEventHandler) => this;
|
|
39
|
+
emit: <T extends EventEmitter.EventNames<string | symbol>>(event: T, ...args: EventEmitter.EventArgs<string | symbol, T>) => boolean;
|
|
40
|
+
emitGrammarEvent: <T extends EventEmitter.EventNames<string | symbol>>(event: T, ...args: EventEmitter.EventArgs<string | symbol, T>) => boolean;
|
|
41
|
+
tasks?: IGrammarTask[];
|
|
42
|
+
rank?: number;
|
|
43
|
+
set: (value: any) => boolean;
|
|
44
|
+
id: (() => string) & ((id: string) => this);
|
|
45
|
+
name: (() => string) & ((name: string) => this);
|
|
46
|
+
attach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;
|
|
47
|
+
detach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;
|
|
48
|
+
detachAll: () => void;
|
|
49
|
+
commit: () => void;
|
|
50
|
+
output: () => any;
|
|
51
|
+
parse: (spec: any) => this;
|
|
52
|
+
parameters: () => {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
};
|
|
55
|
+
evaluateSync?: (upstream: any, parameters: any) => this;
|
|
56
|
+
getSpec: () => any;
|
|
57
|
+
reuse: (grammar: IGrammarBase) => this;
|
|
58
|
+
clear: () => void;
|
|
59
|
+
release: () => void;
|
|
60
|
+
}
|
|
61
|
+
export interface IData extends IGrammarBase {
|
|
62
|
+
values: (values: any | Nil, format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;
|
|
63
|
+
url: (url: ParameterFunctionType<string> | Nil, format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;
|
|
64
|
+
source: (source: string | string[] | IData | IData[], format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;
|
|
65
|
+
transform: (transform: TransformSpec[] | Nil) => this;
|
|
66
|
+
addDataFilter: (filter: IDataFilter | IDataFilter[]) => this;
|
|
67
|
+
removeDataFilter: (filter: IDataFilter | IDataFilter[]) => this;
|
|
68
|
+
field: (field: string) => any[];
|
|
69
|
+
getValue: () => any[];
|
|
70
|
+
getInput: () => any[];
|
|
71
|
+
getDataIDKey: () => string;
|
|
72
|
+
}
|
|
73
|
+
export interface ISignal<T> extends IGrammarBase {
|
|
74
|
+
value: (value: T | Nil) => this;
|
|
75
|
+
update: (update: SignalFunctionType<T> | Nil) => this;
|
|
76
|
+
getValue: () => T;
|
|
77
|
+
}
|
|
78
|
+
export interface IScale extends IGrammarBase {
|
|
79
|
+
domain: (domain: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;
|
|
80
|
+
range: (range: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;
|
|
81
|
+
configure: (config: ScaleConfigureSpec | Nil) => this;
|
|
82
|
+
getScaleType: () => GrammarScaleType;
|
|
83
|
+
getScale: () => IBaseScale;
|
|
84
|
+
ticks: (count?: number) => TickData[];
|
|
85
|
+
getCoordinateAxisPoints: (baseValue?: number) => [IPointLike, IPointLike];
|
|
86
|
+
getCoordinate: () => IPolarCoordinate | ICartesianCoordinate;
|
|
87
|
+
getCoordinateAxisPosition: () => 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'outside' | 'start' | 'end';
|
|
88
|
+
}
|
|
89
|
+
export interface ICoordinate extends IGrammarBase {
|
|
90
|
+
start: (start: CoordinateFunctionType<[number, number]> | Nil) => this;
|
|
91
|
+
end: (end: CoordinateFunctionType<[number, number]> | Nil) => this;
|
|
92
|
+
origin: (origin: CoordinateFunctionType<[number, number]> | Nil) => this;
|
|
93
|
+
translate: (offset: CoordinateFunctionType<[number, number]> | Nil) => this;
|
|
94
|
+
rotate: (angle: CoordinateFunctionType<number> | Nil) => this;
|
|
95
|
+
scale: (ratio: CoordinateFunctionType<[number, number]> | Nil) => this;
|
|
96
|
+
transpose: (isTransposed: CoordinateFunctionType<boolean> | Nil) => this;
|
|
97
|
+
}
|
|
98
|
+
export interface IGroupMark extends IMark {
|
|
99
|
+
children: (IMark | IGroupMark | IGlyphMark)[];
|
|
100
|
+
layoutChildren?: (IMark | IGroupMark | IGlyphMark)[];
|
|
101
|
+
appendChild: (mark: IMark | IGroupMark | IGlyphMark) => this;
|
|
102
|
+
removeChild: (mark: IMark | IGroupMark | IGlyphMark) => this;
|
|
103
|
+
includesChild: (mark: IMark, descendant?: boolean) => boolean;
|
|
104
|
+
updateLayoutChildren: () => this;
|
|
105
|
+
}
|
|
106
|
+
export interface IGlyphMark extends IMark {
|
|
107
|
+
glyphType: string;
|
|
108
|
+
getGlyphMeta: () => IGlyphMeta;
|
|
109
|
+
configureGlyph: (config: any) => this;
|
|
110
|
+
getGlyphConfig: () => any;
|
|
111
|
+
}
|
|
112
|
+
export interface IComponent extends IMark {
|
|
113
|
+
componentType: string;
|
|
114
|
+
configureComponent: (config: any) => this;
|
|
115
|
+
}
|
|
116
|
+
export interface IProgressiveGrammar {
|
|
117
|
+
isProgressive: () => boolean;
|
|
118
|
+
isDoingProgressive: () => boolean;
|
|
119
|
+
clearProgressive: () => void;
|
|
120
|
+
restartProgressive: () => void;
|
|
121
|
+
evaluateProgressive: () => void;
|
|
122
|
+
}
|
|
123
|
+
export interface IMark extends IGrammarBase, IProgressiveGrammar {
|
|
124
|
+
group?: IGroupMark;
|
|
125
|
+
markType: MarkType;
|
|
126
|
+
context: any;
|
|
127
|
+
coord: ICoordinate;
|
|
128
|
+
disableCoordinateTransform?: boolean;
|
|
129
|
+
elements: IElement[];
|
|
130
|
+
elementMap: Map<string, IElement>;
|
|
131
|
+
graphicIndex: number;
|
|
132
|
+
graphicItem?: IGroup;
|
|
133
|
+
animate: IAnimate;
|
|
134
|
+
join: (data: IData | string | Nil, key?: MarkKeySpec, sort?: MarkSortSpec, groupBy?: MarkKeySpec, groupSort?: MarkSortSpec) => this;
|
|
135
|
+
coordinate: (coordinate: ICoordinate | string | Nil) => this;
|
|
136
|
+
state: (state: MarkFunctionType<string | string[]> | Nil) => this;
|
|
137
|
+
encode: ((encoders: BaseSignleEncodeSpec) => this) & ((channel: string, value: ChannelEncodeType) => this);
|
|
138
|
+
encodeState: ((state: string, channel: string, value: ChannelEncodeType) => this) & ((state: string, encoders: BaseSignleEncodeSpec) => this);
|
|
139
|
+
animation: (animationConfig: MarkAnimationSpec | Nil) => this;
|
|
140
|
+
animationState: (animationState: MarkFunctionType<string> | Nil) => this;
|
|
141
|
+
layout: (layout: MarkLayoutSpec | MarkLayoutCallback | Nil) => this;
|
|
142
|
+
configure: (config: IMarkConfig | Nil) => this;
|
|
143
|
+
transform: (transform: TransformSpec[] | Nil) => this;
|
|
144
|
+
needAnimate: () => boolean;
|
|
145
|
+
getBounds: () => IBounds;
|
|
146
|
+
isCollectionMark: () => boolean;
|
|
147
|
+
getAllElements: () => IElement[];
|
|
148
|
+
isUpdated: boolean;
|
|
149
|
+
getGroupGraphicItem: () => any;
|
|
150
|
+
cleanExitElements: () => void;
|
|
151
|
+
addGraphicItem: (attrs: any, groupKey?: string) => IGraphic;
|
|
152
|
+
getMorphConfig: () => {
|
|
153
|
+
morph: boolean;
|
|
154
|
+
morphKey: string | undefined;
|
|
155
|
+
morphElementKey: string | undefined;
|
|
156
|
+
};
|
|
157
|
+
prepareRelease: () => void;
|
|
158
|
+
layoutBounds?: IBounds;
|
|
159
|
+
relativePosition?: {
|
|
160
|
+
top?: number;
|
|
161
|
+
bottom?: number;
|
|
162
|
+
left?: number;
|
|
163
|
+
right?: number;
|
|
164
|
+
};
|
|
165
|
+
needLayout: () => boolean;
|
|
166
|
+
handleLayoutEnd: () => void;
|
|
167
|
+
handleRenderEnd: () => void;
|
|
168
|
+
isLargeMode: () => boolean;
|
|
169
|
+
getAttributeTransforms: () => AttributeTransform[];
|
|
170
|
+
getScalesByChannel: () => Record<string, IBaseScale> | undefined;
|
|
171
|
+
getFieldsByChannel: () => Record<string, string> | undefined;
|
|
172
|
+
getScales: () => Record<string, IBaseScale> | undefined;
|
|
173
|
+
}
|
|
174
|
+
export interface IGrammarBaseConstructor {
|
|
175
|
+
new (view: IView): IGrammarBase;
|
|
176
|
+
}
|
|
177
|
+
export interface ProgressiveContext {
|
|
178
|
+
currentIndex: number;
|
|
179
|
+
totalStep: number;
|
|
180
|
+
step: number;
|
|
181
|
+
data: any[];
|
|
182
|
+
groupKeys?: string[];
|
|
183
|
+
groupedData?: Map<string, any[]>;
|
|
184
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/grammar.ts"],"names":[],"mappings":"","file":"grammar.js","sourcesContent":["import type { EventEmitter, IBounds, IPointLike } from '@visactor/vutils';\nimport type { IGraphic, IGroup } from '@visactor/vrender';\nimport type { IBaseScale, TickData } from '@visactor/vscale';\nimport type { ITransform, TransformSpec } from './transform';\nimport type { DataFormatSpec, IDataFilter } from './data';\nimport type { ParameterFunctionType, SignalFunctionType } from './signal';\nimport type { IAnimate } from './animate';\nimport type { IGlyphMeta } from './glyph';\nimport type { GrammarTypeEnum } from '../graph/enums';\nimport type { Nil } from './base';\nimport type { CoordinateFunctionType } from './coordinate';\nimport type { IElement } from './element';\nimport type {\n MarkFunctionType,\n MarkAnimationSpec,\n MarkType,\n MarkLayoutSpec,\n MarkLayoutCallback,\n MarkSortSpec,\n MarkKeySpec,\n IMarkConfig,\n ChannelEncodeType,\n AttributeTransform,\n BaseSignleEncodeSpec\n} from './mark';\nimport type { ScaleConfigureSpec, ScaleData, ScaleFunctionType, GrammarScaleType, MultiScaleData } from './scale';\nimport type { IView } from './view';\nimport type { BaseEventHandler } from './event';\nimport type { ICartesianCoordinate, IPolarCoordinate } from '@visactor/vgrammar-coordinate';\n\nexport type BuiltInGrammarType = keyof typeof GrammarTypeEnum;\nexport type GrammarType = BuiltInGrammarType | string;\n\n/** 语法元素内置运行的任务 */\nexport interface IGrammarTask extends ITransform {\n /**\n * 参数依赖\n * 只做一级解析\n */\n options?: Record<string, any | IGrammarBase> | (IGrammarBase | any)[];\n /**\n * 依赖的语法元素\n */\n references?: IGrammarBase[];\n /**\n * 是否只支持简单的options配置,不支持在options引用语法元素\n */\n isRawOptions?: boolean;\n}\n\nexport interface GrammarSpec {\n id?: string;\n dependency?: IGrammarBase[] | IGrammarBase | string[] | string;\n}\n\nexport interface IGrammarBase {\n readonly grammarType: GrammarType;\n readonly view: IView;\n readonly uid: number;\n /**\n * 执行的上游节点\n */\n grammarSource: IGrammarBase;\n /**\n * 影响的下游节点\n */\n targets: IGrammarBase[];\n /**\n * 依赖的上游节点,由于不同 spec 配置项中可能引用同一个节点,需要进行计数\n */\n references: Map<IGrammarBase, number>;\n\n depend: (grammar: IGrammarBase[] | IGrammarBase | string[] | string) => this;\n\n addEventListener: (type: string, handler: BaseEventHandler, options?: any) => this;\n removeEventListener: (type: string, handler: BaseEventHandler) => this;\n\n // extended from EventEmitter\n emit: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n emitGrammarEvent: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n\n tasks?: IGrammarTask[];\n // value?: any;\n /** FIXME: operator执行顺序,改造后,dataflow执行元素,应该抽象出来 */\n rank?: number;\n // todo\n set: (value: any) => boolean;\n id: (() => string) & ((id: string) => this);\n name: (() => string) & ((name: string) => this);\n attach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detachAll: () => void;\n commit: () => void;\n output: () => any;\n parse: (spec: any) => this;\n parameters: () => { [key: string]: any };\n evaluateSync?: (upstream: any, parameters: any) => this;\n getSpec: () => any;\n reuse: (grammar: IGrammarBase) => this;\n /** clear references */\n clear: () => void;\n /** release all memory storage */\n release: () => void;\n}\n\nexport interface IData extends IGrammarBase {\n values: (values: any | Nil, format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;\n url: (\n url: ParameterFunctionType<string> | Nil,\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n source: (\n source: string | string[] | IData | IData[],\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n // only used in VGrammar\n addDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n removeDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n\n // data util methods\n field: (field: string) => any[];\n getValue: () => any[];\n getInput: () => any[];\n getDataIDKey: () => string;\n}\n\n/** 语法元素,TODO */\nexport interface ISignal<T> extends IGrammarBase {\n value: (value: T | Nil) => this;\n update: (update: SignalFunctionType<T> | Nil) => this;\n\n getValue: () => T;\n}\n\n/** 语法元素,TODO */\nexport interface IScale extends IGrammarBase {\n domain: (domain: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n range: (range: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n configure: (config: ScaleConfigureSpec | Nil) => this;\n\n // scale util methods\n getScaleType: () => GrammarScaleType;\n getScale: () => IBaseScale;\n ticks: (count?: number) => TickData[];\n getCoordinateAxisPoints: (baseValue?: number) => [IPointLike, IPointLike];\n getCoordinate: () => IPolarCoordinate | ICartesianCoordinate;\n getCoordinateAxisPosition: () => 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'outside' | 'start' | 'end';\n}\n\nexport interface ICoordinate extends IGrammarBase {\n start: (start: CoordinateFunctionType<[number, number]> | Nil) => this;\n end: (end: CoordinateFunctionType<[number, number]> | Nil) => this;\n origin: (origin: CoordinateFunctionType<[number, number]> | Nil) => this;\n\n translate: (offset: CoordinateFunctionType<[number, number]> | Nil) => this;\n rotate: (angle: CoordinateFunctionType<number> | Nil) => this;\n scale: (ratio: CoordinateFunctionType<[number, number]> | Nil) => this;\n transpose: (isTransposed: CoordinateFunctionType<boolean> | Nil) => this;\n\n // coordinate util methods\n}\n\n/** 语法元素,TODO */\n\n/** group mark */\nexport interface IGroupMark extends IMark {\n children: (IMark | IGroupMark | IGlyphMark)[];\n\n layoutChildren?: (IMark | IGroupMark | IGlyphMark)[];\n\n appendChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n removeChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n includesChild: (mark: IMark, descendant?: boolean) => boolean;\n\n updateLayoutChildren: () => this;\n}\n\nexport interface IGlyphMark extends IMark {\n glyphType: string;\n getGlyphMeta: () => IGlyphMeta;\n configureGlyph: (config: any) => this;\n getGlyphConfig: () => any;\n}\n\nexport interface IComponent extends IMark {\n componentType: string;\n configureComponent: (config: any) => this;\n}\n\nexport interface IProgressiveGrammar {\n /** 是否启动了增量渲染模式 */\n isProgressive: () => boolean;\n /** 是否正在执行增量渲染 */\n isDoingProgressive: () => boolean;\n /** 清除增量渲染相关状态 */\n clearProgressive: () => void;\n /** 从第一帧开始增量计算 */\n restartProgressive: () => void;\n /** 分片执行 */\n evaluateProgressive: () => void;\n}\n\nexport interface IMark extends IGrammarBase, IProgressiveGrammar {\n group?: IGroupMark;\n\n markType: MarkType;\n context: any;\n coord: ICoordinate;\n /**\n * disable coordinate transform when need\n */\n disableCoordinateTransform?: boolean;\n elements: IElement[];\n elementMap: Map<string, IElement>;\n graphicIndex: number;\n graphicItem?: IGroup;\n animate: IAnimate;\n\n join: (\n data: IData | string | Nil,\n key?: MarkKeySpec,\n sort?: MarkSortSpec,\n groupBy?: MarkKeySpec,\n groupSort?: MarkSortSpec\n ) => this;\n coordinate: (coordinate: ICoordinate | string | Nil) => this;\n state: (state: MarkFunctionType<string | string[]> | Nil) => this;\n encode: ((encoders: BaseSignleEncodeSpec) => this) & ((channel: string, value: ChannelEncodeType) => this);\n encodeState: ((state: string, channel: string, value: ChannelEncodeType) => this) &\n ((state: string, encoders: BaseSignleEncodeSpec) => this);\n animation: (animationConfig: MarkAnimationSpec | Nil) => this;\n animationState: (animationState: MarkFunctionType<string> | Nil) => this;\n layout: (layout: MarkLayoutSpec | MarkLayoutCallback | Nil) => this;\n configure: (config: IMarkConfig | Nil) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n needAnimate: () => boolean;\n getBounds: () => IBounds;\n isCollectionMark: () => boolean;\n getAllElements: () => IElement[];\n\n // position: () => this;\n // color: () => this;\n // shape: () => this;\n\n // mark 执行流程相关接口\n\n isUpdated: boolean;\n getGroupGraphicItem: () => any;\n cleanExitElements: () => void;\n addGraphicItem: (attrs: any, groupKey?: string) => IGraphic;\n getMorphConfig: () => { morph: boolean; morphKey: string | undefined; morphElementKey: string | undefined };\n prepareRelease: () => void;\n\n layoutBounds?: IBounds;\n relativePosition?: { top?: number; bottom?: number; left?: number; right?: number };\n needLayout: () => boolean;\n handleLayoutEnd: () => void;\n handleRenderEnd: () => void;\n isLargeMode: () => boolean;\n getAttributeTransforms: () => AttributeTransform[];\n\n getScalesByChannel: () => Record<string, IBaseScale> | undefined;\n getFieldsByChannel: () => Record<string, string> | undefined;\n getScales: () => Record<string, IBaseScale> | undefined;\n}\n\nexport interface IGrammarBaseConstructor {\n new (view: IView): IGrammarBase;\n}\n\nexport interface ProgressiveContext {\n currentIndex: number;\n totalStep: number;\n step: number;\n data: any[];\n groupKeys?: string[];\n groupedData?: Map<string, any[]>;\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { HOOK_EVENT } from '../graph/enums';
|
|
2
|
+
export interface Hooks {
|
|
3
|
+
[HOOK_EVENT.BEFORE_PARSE_VIEW]?: () => void;
|
|
4
|
+
[HOOK_EVENT.AFTER_PARSE_VIEW]?: () => void;
|
|
5
|
+
[HOOK_EVENT.BEFORE_TRANSFORM]?: (type: string) => void;
|
|
6
|
+
[HOOK_EVENT.AFTER_TRANSFORM]?: (type: string) => void;
|
|
7
|
+
[HOOK_EVENT.BEFORE_MARK_JOIN]?: () => void;
|
|
8
|
+
[HOOK_EVENT.AFTER_MARK_JOIN]?: () => void;
|
|
9
|
+
[HOOK_EVENT.BEFORE_MARK_UPDATE]?: () => void;
|
|
10
|
+
[HOOK_EVENT.AFTER_MARK_UPDATE]?: () => void;
|
|
11
|
+
[HOOK_EVENT.BEFORE_MARK_STATE]?: () => void;
|
|
12
|
+
[HOOK_EVENT.AFTER_MARK_STATE]?: () => void;
|
|
13
|
+
[HOOK_EVENT.BEFORE_MARK_ENCODE]?: () => void;
|
|
14
|
+
[HOOK_EVENT.AFTER_MARK_ENCODE]?: () => void;
|
|
15
|
+
[HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA]?: () => void;
|
|
16
|
+
[HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA]?: () => void;
|
|
17
|
+
[HOOK_EVENT.BEFORE_ELEMENT_STATE]?: () => void;
|
|
18
|
+
[HOOK_EVENT.AFTER_ELEMENT_STATE]?: () => void;
|
|
19
|
+
[HOOK_EVENT.BEFORE_ELEMENT_ENCODE]?: () => void;
|
|
20
|
+
[HOOK_EVENT.AFTER_ELEMENT_ENCODE]?: () => void;
|
|
21
|
+
[HOOK_EVENT.BEFORE_EVALUATE_DATA]?: () => void;
|
|
22
|
+
[HOOK_EVENT.AFTER_EVALUATE_DATA]?: () => void;
|
|
23
|
+
[HOOK_EVENT.BEFORE_EVALUATE_SCALE]?: () => void;
|
|
24
|
+
[HOOK_EVENT.AFTER_EVALUATE_SCALE]?: () => void;
|
|
25
|
+
[HOOK_EVENT.BEFORE_STAGE_RESIZE]?: () => void;
|
|
26
|
+
[HOOK_EVENT.AFTER_STAGE_RESIZE]?: () => void;
|
|
27
|
+
[HOOK_EVENT.BEFORE_DO_LAYOUT]?: () => void;
|
|
28
|
+
[HOOK_EVENT.AFTER_DO_LAYOUT]?: () => void;
|
|
29
|
+
[HOOK_EVENT.BEFORE_MARK_LAYOUT_END]?: () => void;
|
|
30
|
+
[HOOK_EVENT.AFTER_MARK_LAYOUT_END]?: () => void;
|
|
31
|
+
[HOOK_EVENT.BEFORE_MARK_RENDER_END]?: () => void;
|
|
32
|
+
[HOOK_EVENT.AFTER_MARK_RENDER_END]?: () => void;
|
|
33
|
+
[HOOK_EVENT.BEFORE_DO_RENDER]?: () => void;
|
|
34
|
+
[HOOK_EVENT.AFTER_DO_RENDER]?: () => void;
|
|
35
|
+
[HOOK_EVENT.BEFORE_CREATE_VRENDER_STAGE]?: () => void;
|
|
36
|
+
[HOOK_EVENT.AFTER_CREATE_VRENDER_STAGE]?: () => void;
|
|
37
|
+
[HOOK_EVENT.BEFORE_CREATE_VRENDER_LAYER]?: () => void;
|
|
38
|
+
[HOOK_EVENT.AFTER_CREATE_VRENDER_LAYER]?: () => void;
|
|
39
|
+
[HOOK_EVENT.BEFORE_VRENDER_DRAW]?: () => void;
|
|
40
|
+
[HOOK_EVENT.AFTER_VRENDER_DRAW]?: () => void;
|
|
41
|
+
[HOOK_EVENT.BEFORE_CREATE_VRENDER_MARK]?: () => void;
|
|
42
|
+
[HOOK_EVENT.AFTER_CREATE_VRENDER_MARK]?: () => void;
|
|
43
|
+
[HOOK_EVENT.BEFORE_ADD_VRENDER_MARK]?: () => void;
|
|
44
|
+
[HOOK_EVENT.AFTER_ADD_VRENDER_MARK]?: () => void;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/hooks.ts"],"names":[],"mappings":"","file":"hooks.js","sourcesContent":["import type { HOOK_EVENT } from '../graph/enums';\n\nexport interface Hooks {\n [HOOK_EVENT.BEFORE_PARSE_VIEW]?: () => void;\n [HOOK_EVENT.AFTER_PARSE_VIEW]?: () => void;\n\n // View\n [HOOK_EVENT.BEFORE_TRANSFORM]?: (type: string) => void;\n [HOOK_EVENT.AFTER_TRANSFORM]?: (type: string) => void;\n [HOOK_EVENT.BEFORE_MARK_JOIN]?: () => void;\n [HOOK_EVENT.AFTER_MARK_JOIN]?: () => void;\n [HOOK_EVENT.BEFORE_MARK_UPDATE]?: () => void;\n [HOOK_EVENT.AFTER_MARK_UPDATE]?: () => void;\n [HOOK_EVENT.BEFORE_MARK_STATE]?: () => void;\n [HOOK_EVENT.AFTER_MARK_STATE]?: () => void;\n [HOOK_EVENT.BEFORE_MARK_ENCODE]?: () => void;\n [HOOK_EVENT.AFTER_MARK_ENCODE]?: () => void;\n [HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA]?: () => void;\n [HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA]?: () => void;\n [HOOK_EVENT.BEFORE_ELEMENT_STATE]?: () => void;\n [HOOK_EVENT.AFTER_ELEMENT_STATE]?: () => void;\n [HOOK_EVENT.BEFORE_ELEMENT_ENCODE]?: () => void;\n [HOOK_EVENT.AFTER_ELEMENT_ENCODE]?: () => void;\n\n [HOOK_EVENT.BEFORE_EVALUATE_DATA]?: () => void;\n [HOOK_EVENT.AFTER_EVALUATE_DATA]?: () => void;\n [HOOK_EVENT.BEFORE_EVALUATE_SCALE]?: () => void;\n [HOOK_EVENT.AFTER_EVALUATE_SCALE]?: () => void;\n\n [HOOK_EVENT.BEFORE_STAGE_RESIZE]?: () => void;\n [HOOK_EVENT.AFTER_STAGE_RESIZE]?: () => void;\n\n [HOOK_EVENT.BEFORE_DO_LAYOUT]?: () => void;\n [HOOK_EVENT.AFTER_DO_LAYOUT]?: () => void;\n\n [HOOK_EVENT.BEFORE_MARK_LAYOUT_END]?: () => void;\n [HOOK_EVENT.AFTER_MARK_LAYOUT_END]?: () => void;\n\n [HOOK_EVENT.BEFORE_MARK_RENDER_END]?: () => void;\n [HOOK_EVENT.AFTER_MARK_RENDER_END]?: () => void;\n\n [HOOK_EVENT.BEFORE_DO_RENDER]?: () => void;\n [HOOK_EVENT.AFTER_DO_RENDER]?: () => void;\n\n // Scenegraph\n [HOOK_EVENT.BEFORE_CREATE_VRENDER_STAGE]?: () => void;\n [HOOK_EVENT.AFTER_CREATE_VRENDER_STAGE]?: () => void;\n [HOOK_EVENT.BEFORE_CREATE_VRENDER_LAYER]?: () => void;\n [HOOK_EVENT.AFTER_CREATE_VRENDER_LAYER]?: () => void;\n [HOOK_EVENT.BEFORE_VRENDER_DRAW]?: () => void;\n [HOOK_EVENT.AFTER_VRENDER_DRAW]?: () => void;\n [HOOK_EVENT.BEFORE_CREATE_VRENDER_MARK]?: () => void;\n [HOOK_EVENT.AFTER_CREATE_VRENDER_MARK]?: () => void;\n [HOOK_EVENT.BEFORE_ADD_VRENDER_MARK]?: () => void;\n [HOOK_EVENT.AFTER_ADD_VRENDER_MARK]?: () => void;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './animate';
|
|
2
|
+
export * from './base';
|
|
3
|
+
export * from './component';
|
|
4
|
+
export * from './coordinate';
|
|
5
|
+
export * from './data';
|
|
6
|
+
export * from './dataflow';
|
|
7
|
+
export * from './element';
|
|
8
|
+
export * from './event';
|
|
9
|
+
export * from './glyph';
|
|
10
|
+
export * from './grammar';
|
|
11
|
+
export * from './hooks';
|
|
12
|
+
export * from './layout';
|
|
13
|
+
export * from './mark';
|
|
14
|
+
export * from './morph';
|
|
15
|
+
export * from './projection';
|
|
16
|
+
export * from './renderer';
|
|
17
|
+
export * from './scale';
|
|
18
|
+
export * from './signal';
|
|
19
|
+
export * from './theme';
|
|
20
|
+
export * from './transform';
|
|
21
|
+
export * from './view';
|
|
22
|
+
export * from './plot';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4
|
+
void 0 === k2 && (k2 = k);
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return m[k];
|
|
10
|
+
}
|
|
11
|
+
}), Object.defineProperty(o, k2, desc);
|
|
12
|
+
} : function(o, m, k, k2) {
|
|
13
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
14
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
15
|
+
for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), __exportStar(require("./animate"), exports), __exportStar(require("./base"), exports),
|
|
21
|
+
__exportStar(require("./component"), exports), __exportStar(require("./coordinate"), exports),
|
|
22
|
+
__exportStar(require("./data"), exports), __exportStar(require("./dataflow"), exports),
|
|
23
|
+
__exportStar(require("./element"), exports), __exportStar(require("./event"), exports),
|
|
24
|
+
__exportStar(require("./glyph"), exports), __exportStar(require("./grammar"), exports),
|
|
25
|
+
__exportStar(require("./hooks"), exports), __exportStar(require("./layout"), exports),
|
|
26
|
+
__exportStar(require("./mark"), exports), __exportStar(require("./morph"), exports),
|
|
27
|
+
__exportStar(require("./projection"), exports), __exportStar(require("./renderer"), exports),
|
|
28
|
+
__exportStar(require("./scale"), exports), __exportStar(require("./signal"), exports),
|
|
29
|
+
__exportStar(require("./theme"), exports), __exportStar(require("./transform"), exports),
|
|
30
|
+
__exportStar(require("./view"), exports), __exportStar(require("./plot"), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB;AACvB,yCAAuB","file":"index.js","sourcesContent":["export * from './animate';\nexport * from './base';\nexport * from './component';\nexport * from './coordinate';\nexport * from './data';\nexport * from './dataflow';\nexport * from './element';\nexport * from './event';\nexport * from './glyph';\nexport * from './grammar';\nexport * from './hooks';\nexport * from './layout';\nexport * from './mark';\nexport * from './morph';\nexport * from './projection';\nexport * from './renderer';\nexport * from './scale';\nexport * from './signal';\nexport * from './theme';\nexport * from './transform';\nexport * from './view';\nexport * from './plot';\n"]}
|