@visactor/vchart 1.3.0-beta.9 → 1.3.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/build/es5/index.js +3 -3
- package/build/index.js +17475 -16797
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.js +2 -2
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/area/area.js +2 -2
- package/cjs/chart/area/area.js.map +1 -1
- package/cjs/chart/bar/bar-3d.js +2 -2
- package/cjs/chart/bar/bar-3d.js.map +1 -1
- package/cjs/chart/bar/bar.js +2 -2
- package/cjs/chart/bar/bar.js.map +1 -1
- package/cjs/chart/base-chart.d.ts +1 -0
- package/cjs/chart/base-chart.js +14 -8
- package/cjs/chart/base-chart.js.map +1 -1
- package/cjs/chart/box-plot/box-plot.js +2 -2
- package/cjs/chart/box-plot/box-plot.js.map +1 -1
- package/cjs/chart/cartesian/cartesian.js +1 -1
- package/cjs/chart/cartesian/cartesian.js.map +1 -1
- package/cjs/chart/circle-packing/circle-packing.js +2 -2
- package/cjs/chart/circle-packing/circle-packing.js.map +1 -1
- package/cjs/chart/funnel/funnel-3d.js +2 -2
- package/cjs/chart/funnel/funnel-3d.js.map +1 -1
- package/cjs/chart/funnel/funnel.js +2 -2
- package/cjs/chart/funnel/funnel.js.map +1 -1
- package/cjs/chart/gauge/gauge.js +2 -2
- package/cjs/chart/gauge/gauge.js.map +1 -1
- package/cjs/chart/heatmap/heatmap.js +2 -2
- package/cjs/chart/heatmap/heatmap.js.map +1 -1
- package/cjs/chart/histogram/histogram-3d.js +2 -2
- package/cjs/chart/histogram/histogram-3d.js.map +1 -1
- package/cjs/chart/histogram/histogram.js +2 -2
- package/cjs/chart/histogram/histogram.js.map +1 -1
- package/cjs/chart/index.d.ts +1 -1
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/line/line.js +2 -2
- package/cjs/chart/line/line.js.map +1 -1
- package/cjs/chart/map/map.js +2 -2
- package/cjs/chart/map/map.js.map +1 -1
- package/cjs/chart/pie/pie-3d.js +2 -2
- package/cjs/chart/pie/pie-3d.js.map +1 -1
- package/cjs/chart/pie/pie.js +2 -2
- package/cjs/chart/pie/pie.js.map +1 -1
- package/cjs/chart/polar/progress-like.js +2 -2
- package/cjs/chart/polar/progress-like.js.map +1 -1
- package/cjs/chart/polar/rose-like.js +1 -1
- package/cjs/chart/polar/rose-like.js.map +1 -1
- package/cjs/chart/progress/circular/circular.js +2 -2
- package/cjs/chart/progress/circular/circular.js.map +1 -1
- package/cjs/chart/progress/linear/linear.js +4 -4
- package/cjs/chart/progress/linear/linear.js.map +1 -1
- package/cjs/chart/radar/radar.js +4 -4
- package/cjs/chart/radar/radar.js.map +1 -1
- package/cjs/chart/range-area/range-area.js +2 -2
- package/cjs/chart/range-area/range-area.js.map +1 -1
- package/cjs/chart/range-column/range-column-3d.js +2 -2
- package/cjs/chart/range-column/range-column-3d.js.map +1 -1
- package/cjs/chart/range-column/range-column.js +2 -2
- package/cjs/chart/range-column/range-column.js.map +1 -1
- package/cjs/chart/rose/rose.js +3 -3
- package/cjs/chart/rose/rose.js.map +1 -1
- package/cjs/chart/sankey/sankey.js +2 -2
- package/cjs/chart/sankey/sankey.js.map +1 -1
- package/cjs/chart/scatter/scatter.js +2 -2
- package/cjs/chart/scatter/scatter.js.map +1 -1
- package/cjs/chart/sequence/sequence.js +2 -2
- package/cjs/chart/sequence/sequence.js.map +1 -1
- package/cjs/chart/sunburst/sunburst.js +2 -2
- package/cjs/chart/sunburst/sunburst.js.map +1 -1
- package/cjs/chart/treemap/treemap.js +2 -2
- package/cjs/chart/treemap/treemap.js.map +1 -1
- package/cjs/chart/util.js +1 -1
- package/cjs/chart/util.js.map +1 -1
- package/cjs/chart/waterfall/waterfall.js +2 -2
- package/cjs/chart/waterfall/waterfall.js.map +1 -1
- package/cjs/chart/word-cloud/word-cloud-3d.js +2 -2
- package/cjs/chart/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/chart/word-cloud/word-cloud.js +2 -2
- package/cjs/chart/word-cloud/word-cloud.js.map +1 -1
- package/cjs/compile/compiler.d.ts +4 -0
- package/cjs/compile/compiler.js +4 -0
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compilable-item.d.ts +1 -0
- package/cjs/compile/interface/compilable-item.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +1 -14
- package/cjs/component/axis/base-axis.js +18 -29
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +1 -1
- package/cjs/component/axis/cartesian/axis.js +23 -23
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/index.d.ts +1 -0
- package/cjs/component/axis/cartesian/index.js +2 -1
- package/cjs/component/axis/cartesian/index.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.js +2 -2
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/symlog-axis.d.ts +16 -0
- package/cjs/component/axis/cartesian/symlog-axis.js +23 -0
- package/cjs/component/axis/cartesian/symlog-axis.js.map +1 -0
- package/cjs/component/axis/cartesian/time-axis.js +2 -2
- package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
- package/cjs/component/axis/interface.d.ts +4 -8
- package/cjs/component/axis/interface.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js +3 -3
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/axis/polar/axis.d.ts +1 -1
- package/cjs/component/axis/polar/axis.js +14 -14
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/interface/common.d.ts +1 -1
- package/cjs/component/axis/polar/interface/common.js.map +1 -1
- package/cjs/component/axis/{utils.d.ts → util.d.ts} +1 -1
- package/cjs/component/axis/{utils.js → util.js} +6 -6
- package/cjs/component/axis/util.js.map +1 -0
- package/cjs/component/base/base-component.d.ts +10 -2
- package/cjs/component/base/base-component.js +10 -5
- package/cjs/component/base/base-component.js.map +1 -1
- package/cjs/component/base/interface.d.ts +8 -0
- package/cjs/component/base/interface.js +6 -0
- package/cjs/component/base/interface.js.map +1 -0
- package/cjs/component/base/util.d.ts +2 -1
- package/cjs/component/base/util.js +21 -16
- package/cjs/component/base/util.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +12 -2
- package/cjs/component/brush/brush.js +74 -63
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +2 -2
- package/cjs/component/crosshair/base.js +1 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.js +9 -9
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/crosshair/interface/spec.d.ts +8 -8
- package/cjs/component/crosshair/interface/spec.js.map +1 -1
- package/cjs/component/crosshair/interface/theme.d.ts +3 -1
- package/cjs/component/crosshair/interface/theme.js.map +1 -1
- package/cjs/component/crosshair/polar.js +9 -9
- package/cjs/component/crosshair/polar.js.map +1 -1
- package/cjs/component/crosshair/util.d.ts +5 -0
- package/cjs/component/crosshair/util.js +41 -4
- package/cjs/component/crosshair/util.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.d.ts +1 -1
- package/cjs/component/custom-mark/custom-mark.js +3 -3
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +2 -3
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +6 -6
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +2 -2
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +2 -5
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +2 -0
- package/cjs/component/geo/geo-coordinate.js +15 -5
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/geo/projection.d.ts +1 -0
- package/cjs/component/geo/projection.js +4 -0
- package/cjs/component/geo/projection.js.map +1 -1
- package/cjs/component/index.d.ts +2 -2
- package/cjs/component/index.js +6 -1
- package/cjs/component/index.js.map +1 -1
- package/cjs/component/indicator/indicator.d.ts +1 -0
- package/cjs/component/indicator/indicator.js +10 -7
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/indicator/interface.d.ts +5 -6
- package/cjs/component/indicator/interface.js.map +1 -1
- package/cjs/component/interface/theme.d.ts +2 -2
- package/cjs/component/interface/theme.js.map +1 -1
- package/cjs/component/interface/type.d.ts +1 -0
- package/cjs/component/interface/type.js +12 -11
- package/cjs/component/interface/type.js.map +1 -1
- package/cjs/component/label/base-label.d.ts +0 -1
- package/cjs/component/label/base-label.js +0 -5
- package/cjs/component/label/base-label.js.map +1 -1
- package/cjs/component/label/interface.d.ts +2 -1
- package/cjs/component/label/interface.js.map +1 -1
- package/cjs/component/label/label.d.ts +0 -1
- package/cjs/component/label/label.js +1 -6
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/totalLabel.js +1 -1
- package/cjs/component/label/totalLabel.js.map +1 -1
- package/cjs/component/legend/base-legend.js +4 -4
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/legend/continuous/util.js +4 -4
- package/cjs/component/legend/continuous/util.js.map +1 -1
- package/cjs/component/legend/discrete/interface.d.ts +3 -1
- package/cjs/component/legend/discrete/interface.js.map +1 -1
- package/cjs/component/legend/discrete/legend.js +2 -2
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/legend/discrete/util.js +2 -2
- package/cjs/component/legend/discrete/util.js.map +1 -1
- package/cjs/component/legend/interface.d.ts +2 -6
- package/cjs/component/legend/interface.js.map +1 -1
- package/cjs/component/legend/util.js +2 -2
- package/cjs/component/legend/util.js.map +1 -1
- package/cjs/component/marker/interface.d.ts +2 -2
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/poptip/interface.d.ts +15 -0
- package/cjs/component/poptip/interface.js +6 -0
- package/cjs/component/poptip/interface.js.map +1 -0
- package/cjs/component/title/interface/spec.d.ts +2 -2
- package/cjs/component/title/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js +5 -5
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/content-model.js +2 -2
- package/cjs/component/tooltip/handler/dom/model/content-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/title-model.js +2 -2
- package/cjs/component/tooltip/handler/dom/model/title-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/tooltip-model.js +2 -2
- package/cjs/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/util.js +3 -3
- package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/attribute.js +3 -3
- package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/get-spec.js +1 -1
- package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/cjs/component/tooltip/handler/utils/style.js +2 -2
- package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
- package/cjs/component/tooltip/processor/base.js +1 -1
- package/cjs/component/tooltip/processor/base.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +1 -1
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +20 -17
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/transforms/legend-data/discrete/discrete.js +4 -2
- package/cjs/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/cjs/data/transforms/tick-data/discrete/polar-angle.js +2 -2
- package/cjs/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
- package/cjs/data/transforms/tick-data/util.js +5 -5
- package/cjs/data/transforms/tick-data/util.js.map +1 -1
- package/cjs/event/events/dimension/util/cartesian.js +2 -2
- package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
- package/cjs/event/events/dimension/util/polar.js +1 -1
- package/cjs/event/events/dimension/util/polar.js.map +1 -1
- package/cjs/interaction/trigger.js +2 -2
- package/cjs/interaction/trigger.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +1 -0
- package/cjs/mark/base/base-mark.js +19 -2
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/mark-set/index.d.ts +1 -0
- package/cjs/mark/mark-set/index.js.map +1 -1
- package/cjs/model/base-model.js +2 -2
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -1
- package/cjs/model/interface.js.map +1 -1
- package/cjs/plugin/components/index.d.ts +0 -2
- package/cjs/plugin/components/index.js +1 -2
- package/cjs/plugin/components/index.js.map +1 -1
- package/cjs/series/area/area.d.ts +1 -0
- package/cjs/series/area/area.js +4 -3
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/bar/bar.js +9 -9
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +1 -0
- package/cjs/series/base/base-series.js +25 -8
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/cartesian/cartesian.d.ts +4 -0
- package/cjs/series/cartesian/cartesian.js +16 -4
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/cartesian/interface.d.ts +1 -0
- package/cjs/series/cartesian/interface.js.map +1 -1
- package/cjs/series/dot/dot.js +1 -1
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/funnel/funnel.js +13 -3
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/heatmap/heatmap.js +1 -1
- package/cjs/series/heatmap/heatmap.js.map +1 -1
- package/cjs/series/line/interface.d.ts +0 -2
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.d.ts +1 -0
- package/cjs/series/line/line.js +1 -1
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/map/geo-source.js +2 -2
- package/cjs/series/map/geo-source.js.map +1 -1
- package/cjs/series/map/interface.d.ts +1 -0
- package/cjs/series/map/interface.js.map +1 -1
- package/cjs/series/map/map.js +8 -4
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/mixin/line-mixin.d.ts +1 -1
- package/cjs/series/mixin/line-mixin.js +1 -1
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/pie.js +1 -1
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/interface.d.ts +1 -0
- package/cjs/series/polar/interface.js.map +1 -1
- package/cjs/series/polar/polar.d.ts +4 -0
- package/cjs/series/polar/polar.js +15 -3
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/radar/radar.d.ts +1 -0
- package/cjs/series/radar/radar.js +1 -1
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-column/range-column.js +1 -1
- package/cjs/series/range-column/range-column.js.map +1 -1
- package/cjs/series/rose/rose.js +1 -1
- package/cjs/series/rose/rose.js.map +1 -1
- package/cjs/series/sankey/interface.d.ts +3 -2
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +5 -0
- package/cjs/series/sankey/sankey.js +246 -92
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/scatter/scatter.js +1 -1
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/cjs/series/util/utils.d.ts +4 -1
- package/cjs/series/util/utils.js +8 -6
- package/cjs/series/util/utils.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +4 -4
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/common-axis.js +12 -6
- package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/polar-axis.js +1 -1
- package/cjs/theme/builtin/common/component/axis/polar-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/crosshair.js +73 -117
- package/cjs/theme/builtin/common/component/crosshair.js.map +1 -1
- package/cjs/theme/builtin/common/component/data-zoom.js +19 -7
- package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -1
- package/cjs/theme/builtin/common/component/indicator.js +17 -5
- package/cjs/theme/builtin/common/component/indicator.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/color-legend.js +31 -5
- package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/continuous.js +26 -12
- package/cjs/theme/builtin/common/component/legend/continuous.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js +22 -9
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/size-legend.js +54 -15
- package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/map-label.js +5 -5
- package/cjs/theme/builtin/common/component/map-label.js.map +1 -1
- package/cjs/theme/builtin/common/component/mark-area.js +7 -2
- package/cjs/theme/builtin/common/component/mark-area.js.map +1 -1
- package/cjs/theme/builtin/common/component/mark-line.js +7 -2
- package/cjs/theme/builtin/common/component/mark-line.js.map +1 -1
- package/cjs/theme/builtin/common/component/player.js +33 -7
- package/cjs/theme/builtin/common/component/player.js.map +1 -1
- package/cjs/theme/builtin/common/component/poptip.d.ts +2 -2
- package/cjs/theme/builtin/common/component/poptip.js +20 -12
- package/cjs/theme/builtin/common/component/poptip.js.map +1 -1
- package/cjs/theme/builtin/common/component/title.js +9 -5
- package/cjs/theme/builtin/common/component/title.js.map +1 -1
- package/cjs/theme/builtin/common/component/tooltip.js +13 -10
- package/cjs/theme/builtin/common/component/tooltip.js.map +1 -1
- package/cjs/theme/builtin/common/component/total-label.js +4 -4
- package/cjs/theme/builtin/common/component/total-label.js.map +1 -1
- package/cjs/theme/builtin/common/constants.js +17 -10
- package/cjs/theme/builtin/common/constants.js.map +1 -1
- package/cjs/theme/builtin/common/mark.js +8 -4
- package/cjs/theme/builtin/common/mark.js.map +1 -1
- package/cjs/theme/builtin/common/series/area.js +2 -7
- package/cjs/theme/builtin/common/series/area.js.map +1 -1
- package/cjs/theme/builtin/common/series/bar.js +2 -7
- package/cjs/theme/builtin/common/series/bar.js.map +1 -1
- package/cjs/theme/builtin/common/series/bar3d.js +1 -6
- package/cjs/theme/builtin/common/series/bar3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/circle-packing.js +11 -5
- package/cjs/theme/builtin/common/series/circle-packing.js.map +1 -1
- package/cjs/theme/builtin/common/series/dot.js +11 -3
- package/cjs/theme/builtin/common/series/dot.js.map +1 -1
- package/cjs/theme/builtin/common/series/funnel.js +7 -4
- package/cjs/theme/builtin/common/series/funnel.js.map +1 -1
- package/cjs/theme/builtin/common/series/funnel3d.js +7 -4
- package/cjs/theme/builtin/common/series/funnel3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/line.js +2 -7
- package/cjs/theme/builtin/common/series/line.js.map +1 -1
- package/cjs/theme/builtin/common/series/map.js +4 -2
- package/cjs/theme/builtin/common/series/map.js.map +1 -1
- package/cjs/theme/builtin/common/series/pie.js +1 -6
- package/cjs/theme/builtin/common/series/pie.js.map +1 -1
- package/cjs/theme/builtin/common/series/pie3d.js +2 -9
- package/cjs/theme/builtin/common/series/pie3d.js.map +1 -1
- package/cjs/theme/builtin/common/series/radar.js +2 -7
- package/cjs/theme/builtin/common/series/radar.js.map +1 -1
- package/cjs/theme/builtin/common/series/rangeColumn.js +2 -3
- package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -1
- package/cjs/theme/builtin/common/series/rose.js +1 -2
- package/cjs/theme/builtin/common/series/rose.js.map +1 -1
- package/cjs/theme/builtin/common/series/sankey.js +0 -1
- package/cjs/theme/builtin/common/series/sankey.js.map +1 -1
- package/cjs/theme/builtin/common/series/scatter.js +2 -7
- package/cjs/theme/builtin/common/series/scatter.js.map +1 -1
- package/cjs/theme/builtin/common/series/sunburst.js +5 -2
- package/cjs/theme/builtin/common/series/sunburst.js.map +1 -1
- package/cjs/theme/builtin/common/series/treemap.js +9 -5
- package/cjs/theme/builtin/common/series/treemap.js.map +1 -1
- package/cjs/theme/builtin/common/series/waterfall.js +5 -6
- package/cjs/theme/builtin/common/series/waterfall.js.map +1 -1
- package/cjs/theme/builtin/dark/color-scheme.js +5 -3
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/index.d.ts +0 -1
- package/cjs/theme/builtin/index.js +1 -2
- package/cjs/theme/builtin/index.js.map +1 -1
- package/cjs/theme/builtin/light/color-scheme.js +4 -2
- package/cjs/theme/builtin/light/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/light/index.js +2 -2
- package/cjs/theme/builtin/light/index.js.map +1 -1
- package/cjs/theme/color-scheme/builtin/interface.d.ts +22 -0
- package/cjs/theme/color-scheme/builtin/interface.js +6 -0
- package/cjs/theme/color-scheme/builtin/interface.js.map +1 -0
- package/cjs/theme/color-scheme/interface.d.ts +3 -2
- package/cjs/theme/color-scheme/interface.js.map +1 -1
- package/cjs/theme/color-scheme/util.js +8 -2
- package/cjs/theme/color-scheme/util.js.map +1 -1
- package/cjs/theme/interface.d.ts +16 -5
- package/cjs/theme/interface.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +2 -1
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/visual.d.ts +10 -20
- package/cjs/typings/visual.js.map +1 -1
- package/cjs/util/data.d.ts +0 -8
- package/cjs/util/data.js +2 -9
- package/cjs/util/data.js.map +1 -1
- package/cjs/util/object.d.ts +2 -4
- package/cjs/util/object.js +2 -18
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/scale.d.ts +2 -6
- package/cjs/util/scale.js +1 -6
- package/cjs/util/scale.js.map +1 -1
- package/cjs/util/space.d.ts +3 -10
- package/cjs/util/space.js +13 -28
- package/cjs/util/space.js.map +1 -1
- package/cjs/util/spec/background.d.ts +4 -0
- package/cjs/util/spec/background.js +27 -0
- package/cjs/util/spec/background.js.map +1 -0
- package/cjs/util/spec/clone-deep.d.ts +1 -0
- package/cjs/util/spec/clone-deep.js +27 -0
- package/cjs/util/spec/clone-deep.js.map +1 -0
- package/cjs/util/spec/common.d.ts +3 -0
- package/cjs/util/spec/common.js +23 -0
- package/cjs/util/spec/common.js.map +1 -0
- package/cjs/util/spec/index.d.ts +7 -0
- package/cjs/util/spec/index.js +24 -0
- package/cjs/util/spec/index.js.map +1 -0
- package/cjs/util/spec/merge-spec.d.ts +1 -0
- package/cjs/util/spec/merge-spec.js +58 -0
- package/cjs/util/spec/merge-spec.js.map +1 -0
- package/cjs/util/spec/merge-theme.d.ts +3 -0
- package/cjs/util/spec/merge-theme.js +37 -0
- package/cjs/util/spec/merge-theme.js.map +1 -0
- package/cjs/util/spec/preprocess.d.ts +3 -0
- package/cjs/util/spec/preprocess.js +24 -0
- package/cjs/util/spec/preprocess.js.map +1 -0
- package/cjs/util/spec/transform.d.ts +3 -0
- package/cjs/util/spec/transform.js +28 -0
- package/cjs/util/spec/transform.js.map +1 -0
- package/cjs/util/text.d.ts +1 -2
- package/cjs/util/text.js +4 -14
- package/cjs/util/text.js.map +1 -1
- package/cjs/vchart-all.js +1 -1
- package/cjs/vchart-all.js.map +1 -1
- package/cjs/vchart-simple.js +3 -4
- package/cjs/vchart-simple.js.map +1 -1
- package/esm/animation/utils.js +3 -3
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/area/area.js +3 -3
- package/esm/chart/area/area.js.map +1 -1
- package/esm/chart/bar/bar-3d.js +2 -2
- package/esm/chart/bar/bar-3d.js.map +1 -1
- package/esm/chart/bar/bar.js +2 -2
- package/esm/chart/bar/bar.js.map +1 -1
- package/esm/chart/base-chart.d.ts +1 -0
- package/esm/chart/base-chart.js +14 -8
- package/esm/chart/base-chart.js.map +1 -1
- package/esm/chart/box-plot/box-plot.js +1 -1
- package/esm/chart/box-plot/box-plot.js.map +1 -1
- package/esm/chart/cartesian/cartesian.js +1 -1
- package/esm/chart/cartesian/cartesian.js.map +1 -1
- package/esm/chart/circle-packing/circle-packing.js +1 -1
- package/esm/chart/circle-packing/circle-packing.js.map +1 -1
- package/esm/chart/funnel/funnel-3d.js +1 -1
- package/esm/chart/funnel/funnel-3d.js.map +1 -1
- package/esm/chart/funnel/funnel.js +1 -1
- package/esm/chart/funnel/funnel.js.map +1 -1
- package/esm/chart/gauge/gauge.js +2 -2
- package/esm/chart/gauge/gauge.js.map +1 -1
- package/esm/chart/heatmap/heatmap.js +1 -1
- package/esm/chart/heatmap/heatmap.js.map +1 -1
- package/esm/chart/histogram/histogram-3d.js +2 -2
- package/esm/chart/histogram/histogram-3d.js.map +1 -1
- package/esm/chart/histogram/histogram.js +2 -2
- package/esm/chart/histogram/histogram.js.map +1 -1
- package/esm/chart/index.d.ts +1 -1
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/line/line.js +1 -1
- package/esm/chart/line/line.js.map +1 -1
- package/esm/chart/map/map.js +2 -2
- package/esm/chart/map/map.js.map +1 -1
- package/esm/chart/pie/pie-3d.js +2 -2
- package/esm/chart/pie/pie-3d.js.map +1 -1
- package/esm/chart/pie/pie.js +2 -2
- package/esm/chart/pie/pie.js.map +1 -1
- package/esm/chart/polar/progress-like.js +1 -1
- package/esm/chart/polar/progress-like.js.map +1 -1
- package/esm/chart/polar/rose-like.js +1 -1
- package/esm/chart/polar/rose-like.js.map +1 -1
- package/esm/chart/progress/circular/circular.js +1 -1
- package/esm/chart/progress/circular/circular.js.map +1 -1
- package/esm/chart/progress/linear/linear.js +2 -2
- package/esm/chart/progress/linear/linear.js.map +1 -1
- package/esm/chart/radar/radar.js +5 -5
- package/esm/chart/radar/radar.js.map +1 -1
- package/esm/chart/range-area/range-area.js +1 -1
- package/esm/chart/range-area/range-area.js.map +1 -1
- package/esm/chart/range-column/range-column-3d.js +1 -1
- package/esm/chart/range-column/range-column-3d.js.map +1 -1
- package/esm/chart/range-column/range-column.js +1 -1
- package/esm/chart/range-column/range-column.js.map +1 -1
- package/esm/chart/rose/rose.js +4 -4
- package/esm/chart/rose/rose.js.map +1 -1
- package/esm/chart/sankey/sankey.js +1 -1
- package/esm/chart/sankey/sankey.js.map +1 -1
- package/esm/chart/scatter/scatter.js +2 -2
- package/esm/chart/scatter/scatter.js.map +1 -1
- package/esm/chart/sequence/sequence.js +4 -2
- package/esm/chart/sequence/sequence.js.map +1 -1
- package/esm/chart/sunburst/sunburst.js +1 -1
- package/esm/chart/sunburst/sunburst.js.map +1 -1
- package/esm/chart/treemap/treemap.js +1 -1
- package/esm/chart/treemap/treemap.js.map +1 -1
- package/esm/chart/util.js +2 -2
- package/esm/chart/util.js.map +1 -1
- package/esm/chart/waterfall/waterfall.js +1 -1
- package/esm/chart/waterfall/waterfall.js.map +1 -1
- package/esm/chart/word-cloud/word-cloud-3d.js +1 -1
- package/esm/chart/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/chart/word-cloud/word-cloud.js +1 -1
- package/esm/chart/word-cloud/word-cloud.js.map +1 -1
- package/esm/compile/compiler.d.ts +4 -0
- package/esm/compile/compiler.js +4 -0
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compilable-item.d.ts +1 -0
- package/esm/compile/interface/compilable-item.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +1 -14
- package/esm/component/axis/base-axis.js +19 -30
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +1 -1
- package/esm/component/axis/cartesian/axis.js +20 -20
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/index.d.ts +1 -0
- package/esm/component/axis/cartesian/index.js +2 -0
- package/esm/component/axis/cartesian/index.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.js +1 -3
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/cartesian/symlog-axis.d.ts +16 -0
- package/esm/component/axis/cartesian/symlog-axis.js +24 -0
- package/esm/component/axis/cartesian/symlog-axis.js.map +1 -0
- package/esm/component/axis/cartesian/time-axis.js +3 -3
- package/esm/component/axis/cartesian/time-axis.js.map +1 -1
- package/esm/component/axis/interface.d.ts +4 -8
- package/esm/component/axis/interface.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/axis/polar/axis.d.ts +1 -1
- package/esm/component/axis/polar/axis.js +13 -13
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/interface/common.d.ts +1 -1
- package/esm/component/axis/polar/interface/common.js.map +1 -1
- package/esm/component/axis/{utils.d.ts → util.d.ts} +1 -1
- package/esm/component/axis/{utils.js → util.js} +7 -5
- package/esm/component/axis/util.js.map +1 -0
- package/esm/component/base/base-component.d.ts +10 -2
- package/esm/component/base/base-component.js +9 -5
- package/esm/component/base/base-component.js.map +1 -1
- package/esm/component/base/interface.d.ts +8 -0
- package/esm/component/base/interface.js +2 -0
- package/esm/component/base/interface.js.map +1 -0
- package/esm/component/base/util.d.ts +2 -1
- package/esm/component/base/util.js +14 -7
- package/esm/component/base/util.js.map +1 -1
- package/esm/component/brush/brush.d.ts +12 -2
- package/esm/component/brush/brush.js +74 -62
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +2 -2
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.js +7 -7
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/crosshair/interface/spec.d.ts +8 -8
- package/esm/component/crosshair/interface/spec.js.map +1 -1
- package/esm/component/crosshair/interface/theme.d.ts +3 -1
- package/esm/component/crosshair/interface/theme.js.map +1 -1
- package/esm/component/crosshair/polar.js +8 -8
- package/esm/component/crosshair/polar.js.map +1 -1
- package/esm/component/crosshair/util.d.ts +5 -0
- package/esm/component/crosshair/util.js +34 -0
- package/esm/component/crosshair/util.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.d.ts +1 -1
- package/esm/component/custom-mark/custom-mark.js +4 -4
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +2 -3
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js +8 -6
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +2 -2
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +2 -5
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +2 -0
- package/esm/component/geo/geo-coordinate.js +16 -6
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/geo/projection.d.ts +1 -0
- package/esm/component/geo/projection.js +4 -0
- package/esm/component/geo/projection.js.map +1 -1
- package/esm/component/index.d.ts +2 -2
- package/esm/component/index.js +2 -2
- package/esm/component/index.js.map +1 -1
- package/esm/component/indicator/indicator.d.ts +1 -0
- package/esm/component/indicator/indicator.js +8 -7
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/indicator/interface.d.ts +5 -6
- package/esm/component/indicator/interface.js.map +1 -1
- package/esm/component/interface/theme.d.ts +2 -2
- package/esm/component/interface/theme.js.map +1 -1
- package/esm/component/interface/type.d.ts +1 -0
- package/esm/component/interface/type.js +12 -11
- package/esm/component/interface/type.js.map +1 -1
- package/esm/component/label/base-label.d.ts +0 -1
- package/esm/component/label/base-label.js +0 -5
- package/esm/component/label/base-label.js.map +1 -1
- package/esm/component/label/interface.d.ts +2 -1
- package/esm/component/label/interface.js.map +1 -1
- package/esm/component/label/label.d.ts +0 -1
- package/esm/component/label/label.js +2 -7
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/totalLabel.js +2 -2
- package/esm/component/label/totalLabel.js.map +1 -1
- package/esm/component/legend/base-legend.js +5 -5
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/legend/continuous/util.js +5 -3
- package/esm/component/legend/continuous/util.js.map +1 -1
- package/esm/component/legend/discrete/interface.d.ts +3 -1
- package/esm/component/legend/discrete/interface.js.map +1 -1
- package/esm/component/legend/discrete/legend.js +2 -2
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/legend/discrete/util.js +4 -4
- package/esm/component/legend/discrete/util.js.map +1 -1
- package/esm/component/legend/interface.d.ts +2 -6
- package/esm/component/legend/interface.js.map +1 -1
- package/esm/component/legend/util.js +4 -2
- package/esm/component/legend/util.js.map +1 -1
- package/esm/component/marker/interface.d.ts +2 -2
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/poptip/interface.d.ts +15 -0
- package/esm/component/poptip/interface.js +2 -0
- package/esm/component/poptip/interface.js.map +1 -0
- package/esm/component/title/interface/spec.d.ts +2 -2
- package/esm/component/title/interface/spec.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/content-column-model.js +7 -5
- package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/content-model.js +2 -2
- package/esm/component/tooltip/handler/dom/model/content-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/title-model.js +3 -3
- package/esm/component/tooltip/handler/dom/model/title-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/tooltip-model.js +4 -2
- package/esm/component/tooltip/handler/dom/model/tooltip-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/util.js +4 -4
- package/esm/component/tooltip/handler/dom/util.js.map +1 -1
- package/esm/component/tooltip/handler/utils/attribute.js +5 -5
- package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
- package/esm/component/tooltip/handler/utils/get-spec.js +2 -2
- package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
- package/esm/component/tooltip/handler/utils/style.js +2 -2
- package/esm/component/tooltip/handler/utils/style.js.map +1 -1
- package/esm/component/tooltip/processor/base.js +1 -1
- package/esm/component/tooltip/processor/base.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +2 -2
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +22 -19
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/transforms/legend-data/discrete/discrete.js +4 -3
- package/esm/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/esm/data/transforms/tick-data/discrete/polar-angle.js +1 -1
- package/esm/data/transforms/tick-data/discrete/polar-angle.js.map +1 -1
- package/esm/data/transforms/tick-data/util.js +1 -1
- package/esm/data/transforms/tick-data/util.js.map +1 -1
- package/esm/event/events/dimension/util/cartesian.js +2 -2
- package/esm/event/events/dimension/util/cartesian.js.map +1 -1
- package/esm/event/events/dimension/util/polar.js +1 -1
- package/esm/event/events/dimension/util/polar.js.map +1 -1
- package/esm/interaction/trigger.js +3 -3
- package/esm/interaction/trigger.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +1 -0
- package/esm/mark/base/base-mark.js +20 -3
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/mark-set/index.d.ts +1 -0
- package/esm/mark/mark-set/index.js.map +1 -1
- package/esm/model/base-model.js +4 -4
- package/esm/model/base-model.js.map +1 -1
- package/esm/model/interface.d.ts +1 -1
- package/esm/model/interface.js.map +1 -1
- package/esm/plugin/components/index.d.ts +0 -2
- package/esm/plugin/components/index.js +0 -3
- package/esm/plugin/components/index.js.map +1 -1
- package/esm/series/area/area.d.ts +1 -0
- package/esm/series/area/area.js +5 -5
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/bar/bar.js +2 -4
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/base/base-series.d.ts +1 -0
- package/esm/series/base/base-series.js +25 -9
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/cartesian/cartesian.d.ts +4 -0
- package/esm/series/cartesian/cartesian.js +15 -3
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/cartesian/interface.d.ts +1 -0
- package/esm/series/cartesian/interface.js.map +1 -1
- package/esm/series/dot/dot.js +2 -2
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/funnel/funnel.js +12 -2
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/heatmap/heatmap.js +2 -2
- package/esm/series/heatmap/heatmap.js.map +1 -1
- package/esm/series/line/interface.d.ts +0 -2
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.d.ts +1 -0
- package/esm/series/line/line.js +1 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/map/geo-source.js +3 -1
- package/esm/series/map/geo-source.js.map +1 -1
- package/esm/series/map/interface.d.ts +1 -0
- package/esm/series/map/interface.js.map +1 -1
- package/esm/series/map/map.js +9 -3
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/mixin/line-mixin.d.ts +1 -1
- package/esm/series/mixin/line-mixin.js +2 -2
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/pie.js +2 -2
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/interface.d.ts +1 -0
- package/esm/series/polar/interface.js.map +1 -1
- package/esm/series/polar/polar.d.ts +4 -0
- package/esm/series/polar/polar.js +15 -2
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/radar/radar.d.ts +1 -0
- package/esm/series/radar/radar.js +1 -1
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-column/range-column.js +2 -2
- package/esm/series/range-column/range-column.js.map +1 -1
- package/esm/series/rose/rose.js +2 -2
- package/esm/series/rose/rose.js.map +1 -1
- package/esm/series/sankey/interface.d.ts +3 -2
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +5 -0
- package/esm/series/sankey/sankey.js +248 -93
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/scatter/scatter.js +2 -2
- package/esm/series/scatter/scatter.js.map +1 -1
- package/esm/series/util/utils.d.ts +4 -1
- package/esm/series/util/utils.js +6 -4
- package/esm/series/util/utils.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js +4 -4
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/common-axis.js +12 -6
- package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/polar-axis.js +1 -1
- package/esm/theme/builtin/common/component/axis/polar-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/crosshair.js +73 -117
- package/esm/theme/builtin/common/component/crosshair.js.map +1 -1
- package/esm/theme/builtin/common/component/data-zoom.js +16 -6
- package/esm/theme/builtin/common/component/data-zoom.js.map +1 -1
- package/esm/theme/builtin/common/component/indicator.js +14 -4
- package/esm/theme/builtin/common/component/indicator.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/color-legend.js +32 -4
- package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/continuous.js +26 -12
- package/esm/theme/builtin/common/component/legend/continuous.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/discrete-legend.js +22 -9
- package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/size-legend.js +55 -14
- package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/map-label.js +4 -6
- package/esm/theme/builtin/common/component/map-label.js.map +1 -1
- package/esm/theme/builtin/common/component/mark-area.js +4 -1
- package/esm/theme/builtin/common/component/mark-area.js.map +1 -1
- package/esm/theme/builtin/common/component/mark-line.js +4 -1
- package/esm/theme/builtin/common/component/mark-line.js.map +1 -1
- package/esm/theme/builtin/common/component/player.js +33 -7
- package/esm/theme/builtin/common/component/player.js.map +1 -1
- package/esm/theme/builtin/common/component/poptip.d.ts +2 -2
- package/esm/theme/builtin/common/component/poptip.js +17 -11
- package/esm/theme/builtin/common/component/poptip.js.map +1 -1
- package/esm/theme/builtin/common/component/title.js +9 -5
- package/esm/theme/builtin/common/component/title.js.map +1 -1
- package/esm/theme/builtin/common/component/tooltip.js +12 -11
- package/esm/theme/builtin/common/component/tooltip.js.map +1 -1
- package/esm/theme/builtin/common/component/total-label.js +3 -5
- package/esm/theme/builtin/common/component/total-label.js.map +1 -1
- package/esm/theme/builtin/common/constants.js +16 -7
- package/esm/theme/builtin/common/constants.js.map +1 -1
- package/esm/theme/builtin/common/mark.js +8 -4
- package/esm/theme/builtin/common/mark.js.map +1 -1
- package/esm/theme/builtin/common/series/area.js +1 -4
- package/esm/theme/builtin/common/series/area.js.map +1 -1
- package/esm/theme/builtin/common/series/bar.js +1 -4
- package/esm/theme/builtin/common/series/bar.js.map +1 -1
- package/esm/theme/builtin/common/series/bar3d.js +0 -3
- package/esm/theme/builtin/common/series/bar3d.js.map +1 -1
- package/esm/theme/builtin/common/series/circle-packing.js +8 -4
- package/esm/theme/builtin/common/series/circle-packing.js.map +1 -1
- package/esm/theme/builtin/common/series/dot.js +8 -2
- package/esm/theme/builtin/common/series/dot.js.map +1 -1
- package/esm/theme/builtin/common/series/funnel.js +6 -5
- package/esm/theme/builtin/common/series/funnel.js.map +1 -1
- package/esm/theme/builtin/common/series/funnel3d.js +6 -5
- package/esm/theme/builtin/common/series/funnel3d.js.map +1 -1
- package/esm/theme/builtin/common/series/line.js +1 -4
- package/esm/theme/builtin/common/series/line.js.map +1 -1
- package/esm/theme/builtin/common/series/map.js +4 -2
- package/esm/theme/builtin/common/series/map.js.map +1 -1
- package/esm/theme/builtin/common/series/pie.js +0 -3
- package/esm/theme/builtin/common/series/pie.js.map +1 -1
- package/esm/theme/builtin/common/series/pie3d.js +1 -6
- package/esm/theme/builtin/common/series/pie3d.js.map +1 -1
- package/esm/theme/builtin/common/series/radar.js +1 -4
- package/esm/theme/builtin/common/series/radar.js.map +1 -1
- package/esm/theme/builtin/common/series/rangeColumn.js +1 -4
- package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -1
- package/esm/theme/builtin/common/series/rose.js +1 -2
- package/esm/theme/builtin/common/series/rose.js.map +1 -1
- package/esm/theme/builtin/common/series/sankey.js +0 -1
- package/esm/theme/builtin/common/series/sankey.js.map +1 -1
- package/esm/theme/builtin/common/series/scatter.js +1 -4
- package/esm/theme/builtin/common/series/scatter.js.map +1 -1
- package/esm/theme/builtin/common/series/sunburst.js +6 -1
- package/esm/theme/builtin/common/series/sunburst.js.map +1 -1
- package/esm/theme/builtin/common/series/treemap.js +8 -6
- package/esm/theme/builtin/common/series/treemap.js.map +1 -1
- package/esm/theme/builtin/common/series/waterfall.js +4 -7
- package/esm/theme/builtin/common/series/waterfall.js.map +1 -1
- package/esm/theme/builtin/dark/color-scheme.js +5 -3
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
- package/esm/theme/builtin/index.d.ts +0 -1
- package/esm/theme/builtin/index.js +0 -2
- package/esm/theme/builtin/index.js.map +1 -1
- package/esm/theme/builtin/light/color-scheme.js +4 -2
- package/esm/theme/builtin/light/color-scheme.js.map +1 -1
- package/esm/theme/builtin/light/index.js +2 -2
- package/esm/theme/builtin/light/index.js.map +1 -1
- package/esm/theme/color-scheme/builtin/interface.d.ts +22 -0
- package/esm/theme/color-scheme/builtin/interface.js +2 -0
- package/esm/theme/color-scheme/builtin/interface.js.map +1 -0
- package/esm/theme/color-scheme/interface.d.ts +3 -2
- package/esm/theme/color-scheme/interface.js.map +1 -1
- package/esm/theme/color-scheme/util.js +8 -3
- package/esm/theme/color-scheme/util.js.map +1 -1
- package/esm/theme/interface.d.ts +16 -5
- package/esm/theme/interface.js.map +1 -1
- package/esm/typings/spec/common.d.ts +2 -1
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/visual.d.ts +10 -20
- package/esm/typings/visual.js.map +1 -1
- package/esm/util/data.d.ts +0 -8
- package/esm/util/data.js +1 -7
- package/esm/util/data.js.map +1 -1
- package/esm/util/object.d.ts +2 -4
- package/esm/util/object.js +2 -13
- package/esm/util/object.js.map +1 -1
- package/esm/util/scale.d.ts +2 -6
- package/esm/util/scale.js +1 -5
- package/esm/util/scale.js.map +1 -1
- package/esm/util/space.d.ts +3 -10
- package/esm/util/space.js +5 -23
- package/esm/util/space.js.map +1 -1
- package/esm/util/spec/background.d.ts +4 -0
- package/esm/util/spec/background.js +21 -0
- package/esm/util/spec/background.js.map +1 -0
- package/esm/util/spec/clone-deep.d.ts +1 -0
- package/esm/util/spec/clone-deep.js +20 -0
- package/esm/util/spec/clone-deep.js.map +1 -0
- package/esm/util/spec/common.d.ts +3 -0
- package/esm/util/spec/common.js +15 -0
- package/esm/util/spec/common.js.map +1 -0
- package/esm/util/spec/index.d.ts +7 -0
- package/esm/util/spec/index.js +14 -0
- package/esm/util/spec/index.js.map +1 -0
- package/esm/util/spec/merge-spec.d.ts +1 -0
- package/esm/util/spec/merge-spec.js +48 -0
- package/esm/util/spec/merge-spec.js.map +1 -0
- package/esm/util/spec/merge-theme.d.ts +3 -0
- package/esm/util/spec/merge-theme.js +34 -0
- package/esm/util/spec/merge-theme.js.map +1 -0
- package/esm/util/spec/preprocess.d.ts +3 -0
- package/esm/util/spec/preprocess.js +20 -0
- package/esm/util/spec/preprocess.js.map +1 -0
- package/esm/util/spec/transform.d.ts +3 -0
- package/esm/util/spec/transform.js +20 -0
- package/esm/util/spec/transform.js.map +1 -0
- package/esm/util/text.d.ts +1 -2
- package/esm/util/text.js +4 -12
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-all.js +2 -2
- package/esm/vchart-all.js.map +1 -1
- package/esm/vchart-simple.js +18 -2
- package/esm/vchart-simple.js.map +1 -1
- package/package.json +20 -13
- package/cjs/component/axis/utils.js.map +0 -1
- package/cjs/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
- package/cjs/plugin/components/axis-label-overlap-plugin.js +0 -75
- package/cjs/plugin/components/axis-label-overlap-plugin.js.map +0 -1
- package/cjs/theme/builtin/common/component/axis/log-axis.d.ts +0 -2
- package/cjs/theme/builtin/common/component/axis/log-axis.js +0 -22
- package/cjs/theme/builtin/common/component/axis/log-axis.js.map +0 -1
- package/cjs/theme/builtin/constant.d.ts +0 -2
- package/cjs/theme/builtin/constant.js +0 -8
- package/cjs/theme/builtin/constant.js.map +0 -1
- package/cjs/util/spec.d.ts +0 -17
- package/cjs/util/spec.js +0 -121
- package/cjs/util/spec.js.map +0 -1
- package/esm/component/axis/utils.js.map +0 -1
- package/esm/plugin/components/axis-label-overlap-plugin.d.ts +0 -10
- package/esm/plugin/components/axis-label-overlap-plugin.js +0 -72
- package/esm/plugin/components/axis-label-overlap-plugin.js.map +0 -1
- package/esm/theme/builtin/common/component/axis/log-axis.d.ts +0 -2
- package/esm/theme/builtin/common/component/axis/log-axis.js +0 -18
- package/esm/theme/builtin/common/component/axis/log-axis.js.map +0 -1
- package/esm/theme/builtin/constant.d.ts +0 -2
- package/esm/theme/builtin/constant.js +0 -4
- package/esm/theme/builtin/constant.js.map +0 -1
- package/esm/util/spec.d.ts +0 -17
- package/esm/util/spec.js +0 -112
- package/esm/util/spec.js.map +0 -1
package/cjs/typings/visual.d.ts
CHANGED
|
@@ -42,6 +42,14 @@ export type TextureType = 'circle' | 'dimond' | 'rect' | 'vertical-line' | 'hori
|
|
|
42
42
|
export type ConvertToMarkStyleSpec<T extends Record<string, any>> = {
|
|
43
43
|
[key in keyof T]: VisualType<T[key]>;
|
|
44
44
|
};
|
|
45
|
+
export interface IBorder {
|
|
46
|
+
distance: number | string;
|
|
47
|
+
stroke?: string | IGradient;
|
|
48
|
+
strokeOpacity?: number;
|
|
49
|
+
lineWidth?: number;
|
|
50
|
+
lineDash?: number[];
|
|
51
|
+
lineDashOffset?: number;
|
|
52
|
+
}
|
|
45
53
|
export interface ICommonSpec {
|
|
46
54
|
visible?: boolean;
|
|
47
55
|
x?: number;
|
|
@@ -55,10 +63,6 @@ export interface ICommonSpec {
|
|
|
55
63
|
lineDashOffset?: number;
|
|
56
64
|
cursor?: Cursor;
|
|
57
65
|
zIndex?: number;
|
|
58
|
-
borderSize?: number;
|
|
59
|
-
borderColor?: string;
|
|
60
|
-
borderSpacing?: number;
|
|
61
|
-
borderOpacity?: number;
|
|
62
66
|
angle?: number;
|
|
63
67
|
anchor?: [number, number];
|
|
64
68
|
beta?: number;
|
|
@@ -70,22 +74,8 @@ export interface ICommonSpec {
|
|
|
70
74
|
textureColor?: string;
|
|
71
75
|
textureSize?: number;
|
|
72
76
|
texturePadding?: number;
|
|
73
|
-
outerBorder?:
|
|
74
|
-
|
|
75
|
-
stroke?: string | IGradient;
|
|
76
|
-
strokeOpacity?: number;
|
|
77
|
-
lineWidth?: number;
|
|
78
|
-
lineDash?: number[];
|
|
79
|
-
lineDashOffset?: number;
|
|
80
|
-
};
|
|
81
|
-
innerBorder?: {
|
|
82
|
-
distance: number | string;
|
|
83
|
-
stroke?: string | IGradient;
|
|
84
|
-
strokeOpacity?: number;
|
|
85
|
-
lineWidth?: number;
|
|
86
|
-
lineDash?: number[];
|
|
87
|
-
lineDashOffset?: number;
|
|
88
|
-
};
|
|
77
|
+
outerBorder?: IBorder;
|
|
78
|
+
innerBorder?: IBorder;
|
|
89
79
|
[key: string]: any;
|
|
90
80
|
}
|
|
91
81
|
export interface IFillMarkSpec extends ICommonSpec {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/typings/visual.ts"],"names":[],"mappings":"","file":"visual.js","sourcesContent":["import type { PopTipAttributes } from '@visactor/vrender-components';\nimport type { DataView } from '@visactor/vdataset';\nimport type { Cursor } from './cursor';\nimport type { InterpolateType } from './interpolate';\nimport type { ScaleType } from './scale';\nimport type { ShapeType } from './shape';\nimport type { IPoint } from './coordinate';\nimport type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';\nimport type { Datum, StringOrNumber } from './common';\nimport type { IPadding } from '@visactor/vutils';\nimport type { IColorKey } from '../theme/color-scheme/interface';\nimport type { IRepeatType } from '@visactor/vrender';\n\n// 基础的visual 对应 scale 的属性\nexport interface IVisualSpecBase<D, T> {\n /**\n * type of scale\n */\n type: ScaleType;\n /**\n * will set to scale.domain, it means input of scale\n */\n domain: D[];\n /**\n * will set to scale.range, it means output of scale\n */\n range: T[];\n /**\n * will set to scale.specified if scale support, as a key-value pair matching capability\n * @since 1.1.0\n */\n specified?: { [key: string]: unknown };\n}\n// 用来给用户进行mark.style上的映射配置。所以要配置数据维度\nexport interface IVisualSpecStyle<D, T> extends IVisualSpecBase<D, T> {\n field?: string;\n}\n\nexport type IDataDomainSpec = {\n dataId: string;\n fields: string[];\n};\n\n// 用来提供给用户进行 scale 配置 所以名字是必选的 对用户配置\nexport interface IVisualSpecScale<D, T> extends Omit<IVisualSpecBase<D, T>, 'domain'> {\n id: string;\n domain:\n | IVisualSpecBase<D, T>['domain']\n // 使用数据的字段值,如果 scale 是连续的,就取区间,如果是离散的就使用 values 。\n // 不考虑图表内的交互等数据筛选,这里只用原始数据的统计信息\n | IDataDomainSpec[];\n}\n// 对用户配置\nexport type IVisual<D = any, R = any> = IVisualSpecStyle<D, R> | IVisualScale;\n\nexport interface IVisualScale {\n /**\n * 对应 IVisualSpecScale 的用户配置 scale-id\n */\n scale: string;\n /**\n * 指定参与映射的数据字段\n */\n field?: string;\n /**\n * 当用户指定 field 后,用该属性来控制值域。\n * @default 'none'\n */\n changeDomain?: 'none' | 'replace' | 'expand';\n}\n\nexport type FunctionType<T> = (\n datum: Datum,\n context: IModelMarkAttributeContext,\n opt?: IAttributeOpt,\n source?: DataView\n) => T;\nexport type ValueType<T> = T;\nexport type VisualType<T> = ValueType<T> | FunctionType<T> | IVisual<unknown, T>;\n\nexport type TextureType =\n | 'circle'\n | 'dimond'\n | 'rect'\n | 'vertical-line'\n | 'horizontal-line'\n | 'bias-lr'\n | 'bias-rl'\n | 'grid';\n\n/**\n * style格式转换\n */\nexport type ConvertToMarkStyleSpec<T extends Record<string, any>> = {\n [key in keyof T]: VisualType<T[key]>;\n};\n\nexport interface ICommonSpec {\n visible?: boolean;\n x?: number;\n y?: number;\n z?: number;\n stroke?: string | IGradient | IColorKey | false;\n strokeOpacity?: number;\n opacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n\n cursor?: Cursor;\n zIndex?: number;\n borderSize?: number;\n borderColor?: string;\n borderSpacing?: number;\n borderOpacity?: number;\n angle?: number;\n anchor?: [number, number];\n\n // 3d旋转的属性\n beta?: number;\n alpha?: number;\n anchor3d?: [number, number];\n\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode?: 'accurate' | 'imprecise' | 'custom';\n boundsMode?: 'accurate' | 'imprecise';\n\n // 以下是纹理相关的属性\n /**\n * 纹理的类型\n */\n texture?: TextureType | string;\n /**\n * 纹理的颜色\n */\n textureColor?: string;\n /**\n * 纹理单元的大小\n */\n textureSize?: number; // 纹理大小\n /**\n * 纹理之间空隙的大小\n */\n texturePadding?: number;\n\n /**\n * 外边框\n */\n outerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n /**\n * 内边框\n */\n innerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n\n [key: string]: any;\n}\n\nexport interface IFillMarkSpec extends ICommonSpec {\n fill?: VisualType<string> | IGradient | false | IColorKey;\n fillOpacity?: number;\n // TODO:waite VRender support this api\n // backgroundMode: number; // 填充模式(与具体图元有关)\n // can coexist with fill\n background?: string | HTMLImageElement | HTMLCanvasElement | null;\n}\n\n// export interface IFillImageMarkSpec {\n// fillImage?: string;\n// repeatX?: RepeatXYType;\n// repeatY?: RepeatXYType;\n// imageOrigin?: ImageOriginType;\n// }\n\nexport interface ISymbolMarkSpec extends IFillMarkSpec {\n dx?: number;\n dy?: number;\n size?: number | number[];\n /** 对外声明使用shape,vrender图形属性对应的是shape */\n shape?: ShapeType | string;\n /** FIXME: vrender Symbol接收的图形属性,暂时都申明一下 */\n symbolType?: ShapeType | string;\n scaleX?: number;\n scaleY?: number;\n}\n\n// lineMark 和 areaMark 共同配置\nexport interface ILineLikeMarkSpec extends IFillMarkSpec {\n curveType?: InterpolateType;\n defined?: boolean;\n /**\n * @private 一个标志位,用于通知 VGrammar 是否执行 getLineSegmentConfigs 方法\n */\n enableSegments?: boolean;\n}\n\nexport interface IAreaMarkSpec extends ILineLikeMarkSpec {\n x1?: number;\n y1?: number;\n\n orient?: 'horizontal' | 'vertical';\n}\n\nexport interface ILineMarkSpec extends ILineLikeMarkSpec {\n lineCap?: LineStrokeCap;\n lineJoin?: LineStrokeJoin;\n miterLimit?: number;\n strokeBoundsBuffer?: number;\n}\n\nexport interface IRuleMarkSpec extends ILineMarkSpec {\n x1?: number;\n y1?: number;\n}\n\nexport interface ITextMarkSpec extends IFillMarkSpec {\n /**\n * 文字内容\n */\n text?: StringOrNumber | string[];\n /**\n * x 方向偏移\n */\n dx?: number;\n /**\n * y 方向偏移\n */\n dy?: number;\n /**\n * 字号\n */\n fontSize?: number;\n /**\n * 文字对齐方式\n */\n textAlign?: TextAlign;\n /**\n * 文字居中方式\n */\n textBaseline?: TextBaseLine;\n /**\n * 字体\n */\n fontFamily?: string;\n /**\n * 字重\n */\n fontWeight?: FontWeight;\n /**\n * 字体样式\n */\n fontStyle?: FontStyle;\n /**\n * 文字的最大长度\n */\n maxLineWidth?: number;\n /**\n * 文字超出 maxLineWidth 后的省略符\n */\n ellipsis?: string;\n // TODO: 这些不是常规的文字mark属性,待确认需求背景\n lineBreak?: string;\n /**\n * 下划线\n */\n underline?: boolean;\n /**\n * 中划线\n */\n lineThrough?: boolean;\n /**\n * 行高\n */\n lineHeight?: number;\n /**\n * poptip 相关配置\n */\n poptip?: PopTipAttributes;\n}\n\nexport type IPositionedTextMarkSpec = Omit<ITextMarkSpec, 'align' | 'textAlign' | 'baseline' | 'textBaseline'>;\n\nexport interface IRectMarkSpec extends IFillMarkSpec {\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n width?: number;\n height?: number;\n x1?: number;\n y1?: number;\n}\n\n// 3d rect,支持length表示长宽高中的长属性(深度属性)\nexport interface IRect3dMarkSpec extends IRectMarkSpec {\n length?: number;\n}\n\nexport interface IBoxPlotMarkSpec extends ICommonSpec {\n /**\n * box描边宽度\n */\n lineWidth?: number;\n /**\n * box宽度\n */\n boxWidth?: number;\n /**\n * 最大最小值宽度\n */\n shaftWidth?: number;\n /**\n * 中轴线类型\n */\n shaftShape?: BoxPlotShaftShape;\n /**\n * 盒子填充颜色,为空则不填充\n */\n boxFill?: string;\n // /**\n // * 描边颜色\n // */\n // stroke?: string;\n /**\n * 中轴线透明度,仅当shaftType=bar时生效\n */\n shaftFillOpacity?: number;\n\n min?: (datum: Datum) => number;\n q1?: (datum: Datum) => number;\n median?: (datum: Datum) => number;\n q3?: (datum: Datum) => number;\n max?: (datum: Datum) => number;\n}\n\nexport interface IOutlierMarkSpec {\n //异常点填充颜色\n fill?: string;\n //异常点大小\n size?: number;\n}\n\nexport interface IPathMarkSpec extends IFillMarkSpec {\n path?: string;\n scaleX?: number;\n scaleY?: number;\n scaleCenter?: { x: number; y: number };\n // TODO: 该属性后续可能会删除,未定\n // 平滑缩放,不然会发生跳变,在地图交互场景需要配置为true;常规path缩放不需要\n smoothScale?: boolean;\n}\n\nexport interface ILinkPathMarkSpec extends IFillMarkSpec {\n x0?: number;\n y0?: number;\n x1?: number;\n y1?: number;\n thickness?: number;\n curvature?: number;\n /** round all the coordinates */\n round?: boolean;\n /** the ratio of normal style path */\n ratio?: number;\n align?: 'start' | 'end' | 'center';\n pathType?: 'line' | 'smooth' | 'polyline';\n endArrow?: boolean;\n startArrow?: boolean;\n backgroundStyle?: any;\n direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial';\n}\n\nexport interface IArcMarkSpec extends IFillMarkSpec {\n startAngle?: number;\n endAngle?: number;\n padAngle?: number;\n\n outerRadius?: number;\n innerRadius?: number;\n cornerRadius?: number;\n\n /** arc的中心点偏移距离 */\n centerOffset?: number;\n\n /** arc 的 roundCap 属性,即圆角是否伸出 startAngle 和 endAngle 之外 */\n cap?: boolean | [boolean, boolean];\n /** arc 在 roundCap 打开且应用环形渐变时是否对 cap 部分生效 */\n autoCapConical?: boolean;\n}\n\n// 3d arc,有高度配置\nexport interface IArc3dMarkSpec extends IArcMarkSpec {\n height?: number;\n}\n\nexport interface IProgressArcMarkSpec extends IArcMarkSpec {\n /** 进度条内侧 padding(接受负值) */\n innerPadding?: number;\n /** 进度条外侧 padding(接受负值) */\n outerPadding?: number;\n}\n\nexport interface ICellMarkSpec extends ISymbolMarkSpec {\n padding?: number | number[] | IPadding;\n}\n\nexport interface IGroupMarkSpec extends IFillMarkSpec {\n clip?: boolean;\n width?: number;\n height?: number;\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n}\n\nexport interface IPolygonMarkSpec extends ICommonSpec, IFillMarkSpec {\n points?: IPoint[];\n /**\n * 圆角配置,支持数组配置,数组的顺序同组成 polygon 的顺序对应\n */\n cornerRadius?: number | number[];\n scaleX?: number;\n scaleY?: number;\n}\n\nexport interface IPyramid3dMarkSpec extends IPolygonMarkSpec {\n // 只能有4个顶点\n points?: IPoint[];\n}\n\n/**\n * ImageFill\n */\nexport type RepeatType = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat';\nexport type RepeatXYType = 'no-repeat' | 'repeat' | 'stretch';\nexport type ImageOriginType = 'top' | 'bottom';\n\n/**\n * gradient\n */\nexport type GradientPropValue<T> = ValueType<T> | FunctionType<T>;\nexport type GradientStop = {\n offset: GradientPropValue<number>;\n color: GradientPropValue<string>;\n opacity?: number;\n};\nexport interface IGradientLinear {\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'linear';\n}\n\nexport interface IGradientRadial {\n r0?: GradientPropValue<number>;\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n r1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'radial';\n}\n\nexport interface IGradientConical {\n x?: GradientPropValue<number>;\n y?: GradientPropValue<number>;\n startAngle?: GradientPropValue<number>;\n endAngle?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'conical';\n}\n\nexport type GradientType = 'linear' | 'radial' | 'conical';\nexport type IGradient = IGradientLinear | IGradientRadial | IGradientConical;\n\nexport type LineStrokeCap = 'butt' | 'round' | 'square';\nexport type LineStrokeJoin = 'arcs' | 'bevel' | 'miter' | 'miter-clip' | 'round';\n\nexport type BoxPlotShaftShape = 'line' | 'bar';\n/**\n * threshold\n */\nexport interface IThresholdStyle extends IVisualSpecStyle<number, string> {\n domain: number[];\n field: string;\n range: string[];\n type: 'threshold';\n}\n\n// FIXME: For some tool methods that need to use common configuration types\nexport interface IUnknownMarkSpec extends ICommonSpec {\n [key: string]: unknown;\n}\n\nexport interface IImageMarkSpec extends IFillMarkSpec {\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n width?: number;\n height?: number;\n repeatX?: IRepeatType;\n repeatY?: IRepeatType;\n image: string | HTMLImageElement | HTMLCanvasElement;\n}\n\n/**\n * text\n */\nexport type TextAlign = 'left' | 'right' | 'center';\nexport type TextBaseLine = 'top' | 'bottom' | 'middle' | 'alphabetic';\nexport type FontStyle = 'normal' | 'italic' | 'oblique' | string;\nexport type FontWeight = 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/typings/visual.ts"],"names":[],"mappings":"","file":"visual.js","sourcesContent":["import type { PopTipAttributes } from '@visactor/vrender-components';\nimport type { DataView } from '@visactor/vdataset';\nimport type { Cursor } from './cursor';\nimport type { InterpolateType } from './interpolate';\nimport type { ScaleType } from './scale';\nimport type { ShapeType } from './shape';\nimport type { IPoint } from './coordinate';\nimport type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';\nimport type { Datum, StringOrNumber } from './common';\nimport type { IPadding } from '@visactor/vutils';\nimport type { IColorKey } from '../theme/color-scheme/interface';\nimport type { IRepeatType } from '@visactor/vrender';\n\n// 基础的visual 对应 scale 的属性\nexport interface IVisualSpecBase<D, T> {\n /**\n * type of scale\n */\n type: ScaleType;\n /**\n * will set to scale.domain, it means input of scale\n */\n domain: D[];\n /**\n * will set to scale.range, it means output of scale\n */\n range: T[];\n /**\n * will set to scale.specified if scale support, as a key-value pair matching capability\n * @since 1.1.0\n */\n specified?: { [key: string]: unknown };\n}\n// 用来给用户进行mark.style上的映射配置。所以要配置数据维度\nexport interface IVisualSpecStyle<D, T> extends IVisualSpecBase<D, T> {\n field?: string;\n}\n\nexport type IDataDomainSpec = {\n dataId: string;\n fields: string[];\n};\n\n// 用来提供给用户进行 scale 配置 所以名字是必选的 对用户配置\nexport interface IVisualSpecScale<D, T> extends Omit<IVisualSpecBase<D, T>, 'domain'> {\n id: string;\n domain:\n | IVisualSpecBase<D, T>['domain']\n // 使用数据的字段值,如果 scale 是连续的,就取区间,如果是离散的就使用 values 。\n // 不考虑图表内的交互等数据筛选,这里只用原始数据的统计信息\n | IDataDomainSpec[];\n}\n// 对用户配置\nexport type IVisual<D = any, R = any> = IVisualSpecStyle<D, R> | IVisualScale;\n\nexport interface IVisualScale {\n /**\n * 对应 IVisualSpecScale 的用户配置 scale-id\n */\n scale: string;\n /**\n * 指定参与映射的数据字段\n */\n field?: string;\n /**\n * 当用户指定 field 后,用该属性来控制值域。\n * @default 'none'\n */\n changeDomain?: 'none' | 'replace' | 'expand';\n}\n\nexport type FunctionType<T> = (\n datum: Datum,\n context: IModelMarkAttributeContext,\n opt?: IAttributeOpt,\n source?: DataView\n) => T;\nexport type ValueType<T> = T;\nexport type VisualType<T> = ValueType<T> | FunctionType<T> | IVisual<unknown, T>;\n\nexport type TextureType =\n | 'circle'\n | 'dimond'\n | 'rect'\n | 'vertical-line'\n | 'horizontal-line'\n | 'bias-lr'\n | 'bias-rl'\n | 'grid';\n\n/**\n * style格式转换\n */\nexport type ConvertToMarkStyleSpec<T extends Record<string, any>> = {\n [key in keyof T]: VisualType<T[key]>;\n};\n\n/**\n * border\n */\n\nexport interface IBorder {\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n}\n\nexport interface ICommonSpec {\n visible?: boolean;\n x?: number;\n y?: number;\n z?: number;\n stroke?: string | IGradient | IColorKey | false;\n strokeOpacity?: number;\n opacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n\n cursor?: Cursor;\n zIndex?: number;\n angle?: number;\n anchor?: [number, number];\n\n // 3d旋转的属性\n beta?: number;\n alpha?: number;\n anchor3d?: [number, number];\n\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode?: 'accurate' | 'imprecise' | 'custom';\n boundsMode?: 'accurate' | 'imprecise';\n\n // 以下是纹理相关的属性\n /**\n * 纹理的类型\n */\n texture?: TextureType | string;\n /**\n * 纹理的颜色\n */\n textureColor?: string;\n /**\n * 纹理单元的大小\n */\n textureSize?: number; // 纹理大小\n /**\n * 纹理之间空隙的大小\n */\n texturePadding?: number;\n\n /**\n * 外边框\n */\n outerBorder?: IBorder;\n /**\n * 内边框\n */\n innerBorder?: IBorder;\n\n [key: string]: any;\n}\n\nexport interface IFillMarkSpec extends ICommonSpec {\n fill?: VisualType<string> | IGradient | false | IColorKey;\n fillOpacity?: number;\n // TODO:waite VRender support this api\n // backgroundMode: number; // 填充模式(与具体图元有关)\n // can coexist with fill\n background?: string | HTMLImageElement | HTMLCanvasElement | null;\n}\n\n// export interface IFillImageMarkSpec {\n// fillImage?: string;\n// repeatX?: RepeatXYType;\n// repeatY?: RepeatXYType;\n// imageOrigin?: ImageOriginType;\n// }\n\nexport interface ISymbolMarkSpec extends IFillMarkSpec {\n dx?: number;\n dy?: number;\n size?: number | number[];\n /** 对外声明使用shape,vrender图形属性对应的是shape */\n shape?: ShapeType | string;\n /** FIXME: vrender Symbol接收的图形属性,暂时都申明一下 */\n symbolType?: ShapeType | string;\n scaleX?: number;\n scaleY?: number;\n}\n\n// lineMark 和 areaMark 共同配置\nexport interface ILineLikeMarkSpec extends IFillMarkSpec {\n curveType?: InterpolateType;\n defined?: boolean;\n /**\n * @private 一个标志位,用于通知 VGrammar 是否执行 getLineSegmentConfigs 方法\n */\n enableSegments?: boolean;\n}\n\nexport interface IAreaMarkSpec extends ILineLikeMarkSpec {\n x1?: number;\n y1?: number;\n\n orient?: 'horizontal' | 'vertical';\n}\n\nexport interface ILineMarkSpec extends ILineLikeMarkSpec {\n lineCap?: LineStrokeCap;\n lineJoin?: LineStrokeJoin;\n miterLimit?: number;\n strokeBoundsBuffer?: number;\n}\n\nexport interface IRuleMarkSpec extends ILineMarkSpec {\n x1?: number;\n y1?: number;\n}\n\nexport interface ITextMarkSpec extends IFillMarkSpec {\n /**\n * 文字内容\n */\n text?: StringOrNumber | string[];\n /**\n * x 方向偏移\n */\n dx?: number;\n /**\n * y 方向偏移\n */\n dy?: number;\n /**\n * 字号\n */\n fontSize?: number;\n /**\n * 文字对齐方式\n */\n textAlign?: TextAlign;\n /**\n * 文字居中方式\n */\n textBaseline?: TextBaseLine;\n /**\n * 字体\n */\n fontFamily?: string;\n /**\n * 字重\n */\n fontWeight?: FontWeight;\n /**\n * 字体样式\n */\n fontStyle?: FontStyle;\n /**\n * 文字的最大长度\n */\n maxLineWidth?: number;\n /**\n * 文字超出 maxLineWidth 后的省略符\n */\n ellipsis?: string;\n // TODO: 这些不是常规的文字mark属性,待确认需求背景\n lineBreak?: string;\n /**\n * 下划线\n */\n underline?: boolean;\n /**\n * 中划线\n */\n lineThrough?: boolean;\n /**\n * 行高\n */\n lineHeight?: number;\n /**\n * poptip 相关配置\n */\n poptip?: PopTipAttributes;\n}\n\nexport type IPositionedTextMarkSpec = Omit<ITextMarkSpec, 'align' | 'textAlign' | 'baseline' | 'textBaseline'>;\n\nexport interface IRectMarkSpec extends IFillMarkSpec {\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n width?: number;\n height?: number;\n x1?: number;\n y1?: number;\n}\n\n// 3d rect,支持length表示长宽高中的长属性(深度属性)\nexport interface IRect3dMarkSpec extends IRectMarkSpec {\n length?: number;\n}\n\nexport interface IBoxPlotMarkSpec extends ICommonSpec {\n /**\n * box描边宽度\n */\n lineWidth?: number;\n /**\n * box宽度\n */\n boxWidth?: number;\n /**\n * 最大最小值宽度\n */\n shaftWidth?: number;\n /**\n * 中轴线类型\n */\n shaftShape?: BoxPlotShaftShape;\n /**\n * 盒子填充颜色,为空则不填充\n */\n boxFill?: string;\n // /**\n // * 描边颜色\n // */\n // stroke?: string;\n /**\n * 中轴线透明度,仅当shaftType=bar时生效\n */\n shaftFillOpacity?: number;\n\n min?: (datum: Datum) => number;\n q1?: (datum: Datum) => number;\n median?: (datum: Datum) => number;\n q3?: (datum: Datum) => number;\n max?: (datum: Datum) => number;\n}\n\nexport interface IOutlierMarkSpec {\n //异常点填充颜色\n fill?: string;\n //异常点大小\n size?: number;\n}\n\nexport interface IPathMarkSpec extends IFillMarkSpec {\n path?: string;\n scaleX?: number;\n scaleY?: number;\n scaleCenter?: { x: number; y: number };\n // TODO: 该属性后续可能会删除,未定\n // 平滑缩放,不然会发生跳变,在地图交互场景需要配置为true;常规path缩放不需要\n smoothScale?: boolean;\n}\n\nexport interface ILinkPathMarkSpec extends IFillMarkSpec {\n x0?: number;\n y0?: number;\n x1?: number;\n y1?: number;\n thickness?: number;\n curvature?: number;\n /** round all the coordinates */\n round?: boolean;\n /** the ratio of normal style path */\n ratio?: number;\n align?: 'start' | 'end' | 'center';\n pathType?: 'line' | 'smooth' | 'polyline';\n endArrow?: boolean;\n startArrow?: boolean;\n backgroundStyle?: any;\n direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial';\n}\n\nexport interface IArcMarkSpec extends IFillMarkSpec {\n startAngle?: number;\n endAngle?: number;\n padAngle?: number;\n\n outerRadius?: number;\n innerRadius?: number;\n cornerRadius?: number;\n\n /** arc的中心点偏移距离 */\n centerOffset?: number;\n\n /** arc 的 roundCap 属性,即圆角是否伸出 startAngle 和 endAngle 之外 */\n cap?: boolean | [boolean, boolean];\n /** arc 在 roundCap 打开且应用环形渐变时是否对 cap 部分生效 */\n autoCapConical?: boolean;\n}\n\n// 3d arc,有高度配置\nexport interface IArc3dMarkSpec extends IArcMarkSpec {\n height?: number;\n}\n\nexport interface IProgressArcMarkSpec extends IArcMarkSpec {\n /** 进度条内侧 padding(接受负值) */\n innerPadding?: number;\n /** 进度条外侧 padding(接受负值) */\n outerPadding?: number;\n}\n\nexport interface ICellMarkSpec extends ISymbolMarkSpec {\n padding?: number | number[] | IPadding;\n}\n\nexport interface IGroupMarkSpec extends IFillMarkSpec {\n clip?: boolean;\n width?: number;\n height?: number;\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n}\n\nexport interface IPolygonMarkSpec extends ICommonSpec, IFillMarkSpec {\n points?: IPoint[];\n /**\n * 圆角配置,支持数组配置,数组的顺序同组成 polygon 的顺序对应\n */\n cornerRadius?: number | number[];\n scaleX?: number;\n scaleY?: number;\n}\n\nexport interface IPyramid3dMarkSpec extends IPolygonMarkSpec {\n // 只能有4个顶点\n points?: IPoint[];\n}\n\n/**\n * ImageFill\n */\nexport type RepeatType = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat';\nexport type RepeatXYType = 'no-repeat' | 'repeat' | 'stretch';\nexport type ImageOriginType = 'top' | 'bottom';\n\n/**\n * gradient\n */\nexport type GradientPropValue<T> = ValueType<T> | FunctionType<T>;\nexport type GradientStop = {\n offset: GradientPropValue<number>;\n color: GradientPropValue<string>;\n opacity?: number;\n};\nexport interface IGradientLinear {\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'linear';\n}\n\nexport interface IGradientRadial {\n r0?: GradientPropValue<number>;\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n r1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'radial';\n}\n\nexport interface IGradientConical {\n x?: GradientPropValue<number>;\n y?: GradientPropValue<number>;\n startAngle?: GradientPropValue<number>;\n endAngle?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'conical';\n}\n\nexport type GradientType = 'linear' | 'radial' | 'conical';\nexport type IGradient = IGradientLinear | IGradientRadial | IGradientConical;\n\nexport type LineStrokeCap = 'butt' | 'round' | 'square';\nexport type LineStrokeJoin = 'arcs' | 'bevel' | 'miter' | 'miter-clip' | 'round';\n\nexport type BoxPlotShaftShape = 'line' | 'bar';\n/**\n * threshold\n */\nexport interface IThresholdStyle extends IVisualSpecStyle<number, string> {\n domain: number[];\n field: string;\n range: string[];\n type: 'threshold';\n}\n\n// FIXME: For some tool methods that need to use common configuration types\nexport interface IUnknownMarkSpec extends ICommonSpec {\n [key: string]: unknown;\n}\n\nexport interface IImageMarkSpec extends IFillMarkSpec {\n /**\n * 圆角配置。\n * 1. 如果传入数值,则统一为四个角设置圆角\n * 2. 如果传入数组,则分别为 [上左, 上右, 下右, 下左]\n */\n cornerRadius?: number | number[];\n width?: number;\n height?: number;\n repeatX?: IRepeatType;\n repeatY?: IRepeatType;\n image: string | HTMLImageElement | HTMLCanvasElement;\n}\n\n/**\n * text\n */\nexport type TextAlign = 'left' | 'right' | 'center';\nexport type TextBaseLine = 'top' | 'bottom' | 'middle' | 'alphabetic';\nexport type FontStyle = 'normal' | 'italic' | 'oblique' | string;\nexport type FontWeight = 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n"]}
|
package/cjs/util/data.d.ts
CHANGED
|
@@ -10,12 +10,4 @@ export declare function mergeFields(targetFields: {
|
|
|
10
10
|
key: string;
|
|
11
11
|
operations: StatisticOperations;
|
|
12
12
|
}[];
|
|
13
|
-
export declare function findFields(list: {
|
|
14
|
-
key: string;
|
|
15
|
-
operations: StatisticOperations;
|
|
16
|
-
}[], fieldKey: string): {
|
|
17
|
-
key: string;
|
|
18
|
-
operations: StatisticOperations;
|
|
19
|
-
};
|
|
20
13
|
export declare function getFieldAlias(dataView: DataView, field: string): any;
|
|
21
|
-
export declare function getFieldFormat(dataView: DataView, key: string): any;
|
package/cjs/util/data.js
CHANGED
|
@@ -19,15 +19,8 @@ function getFieldAlias(dataView, field) {
|
|
|
19
19
|
return fields && fields[field] ? null !== (_a = fields[field].alias) && void 0 !== _a ? _a : field : null != field ? field : null;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function getFieldFormat(dataView, key) {
|
|
23
|
-
if (!dataView) return null;
|
|
24
|
-
const fields = dataView.getFields();
|
|
25
|
-
return fields && fields[key] ? fields[key].format : null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
22
|
Object.defineProperty(exports, "__esModule", {
|
|
29
23
|
value: !0
|
|
30
|
-
}), exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.getFieldFormat = getFieldFormat;
|
|
24
|
+
}), exports.getFieldAlias = exports.mergeFields = void 0, exports.mergeFields = mergeFields,
|
|
25
|
+
exports.getFieldAlias = getFieldAlias;
|
|
33
26
|
//# sourceMappingURL=data.js.map
|
package/cjs/util/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/data.ts"],"names":[],"mappings":";;;AAIA,SAAgB,WAAW,CACzB,YAGG,EACH,WAGG;IAKH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,EAAE;YACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC5B;aAAM;YACL,OAAO,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAClF;KACF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAvBD,kCAuBC;AAED,
|
|
1
|
+
{"version":3,"sources":["../src/util/data.ts"],"names":[],"mappings":";;;AAIA,SAAgB,WAAW,CACzB,YAGG,EACH,WAGG;IAKH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,EAAE;YACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC5B;aAAM;YACL,OAAO,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAClF;KACF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAvBD,kCAuBC;AAED,SAAS,UAAU,CACjB,IAGG,EACH,QAAgB;IAEhB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAGD,SAAgB,aAAa,CAAC,QAAkB,EAAE,KAAa;;IAC7D,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;KACtB;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;KACtB;IACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QAClB,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;KACtB;IACD,OAAO,MAAA,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,mCAAI,KAAK,CAAC;AACtC,CAAC;AAZD,sCAYC","file":"data.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { StatisticOperations } from '../data/transforms/dimension-statistics';\nimport type { IFieldsMeta } from '../typings/spec/common';\n\nexport function mergeFields(\n targetFields: {\n key: string;\n operations: StatisticOperations;\n }[],\n mergeFields: {\n key: string;\n operations: StatisticOperations;\n }[]\n): {\n key: string;\n operations: StatisticOperations;\n}[] {\n for (let i = 0; i < mergeFields.length; i++) {\n const element = mergeFields[i];\n const _target = findFields(targetFields, element.key);\n if (!_target) {\n targetFields.push(element);\n } else {\n _target.operations = [...new Set(_target.operations.concat(element.operations))];\n }\n }\n return targetFields;\n}\n\nfunction findFields(\n list: {\n key: string;\n operations: StatisticOperations;\n }[],\n fieldKey: string\n) {\n return list.find(i => i.key === fieldKey);\n}\n\n// 如果不存在别名就返回 field\nexport function getFieldAlias(dataView: DataView, field: string) {\n if (!dataView) {\n return field ?? null;\n }\n const fields = dataView.getFields();\n if (!fields) {\n return field ?? null;\n }\n if (!fields[field]) {\n return field ?? null;\n }\n return fields[field].alias ?? field;\n}\n"]}
|
package/cjs/util/object.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { get, pick,
|
|
2
|
-
export { get, pick,
|
|
3
|
-
export declare function removeEmpty<T extends object>(obj: T): Partial<T>;
|
|
4
|
-
export declare function sortByKey<T extends object>(object: T, includeKeys?: string[], excludeKeys?: string[]): Partial<T>;
|
|
1
|
+
import { get, pick, cloneDeep } from '@visactor/vutils';
|
|
2
|
+
export { get, pick, cloneDeep };
|
|
5
3
|
export declare function field(f: string | string[]): (datum: any) => any;
|
package/cjs/util/object.js
CHANGED
|
@@ -2,21 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.field = exports.
|
|
5
|
+
}), exports.field = exports.cloneDeep = exports.pick = exports.get = void 0;
|
|
6
6
|
|
|
7
7
|
const vutils_1 = require("@visactor/vutils");
|
|
8
8
|
|
|
9
|
-
function removeEmpty(obj) {
|
|
10
|
-
return Object.keys(obj).forEach((key => {
|
|
11
|
-
obj[key] && "object" == typeof obj[key] ? removeEmpty(obj[key]) : void 0 === obj[key] && delete obj[key];
|
|
12
|
-
})), obj;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function sortByKey(object, includeKeys, excludeKeys) {
|
|
16
|
-
return Object.keys(object).sort().reduce(((obj, key) => (includeKeys ? includeKeys.includes(key) && (obj[key] = object[key]) : excludeKeys && !excludeKeys.includes(key) && (obj[key] = object[key]),
|
|
17
|
-
obj)), {});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
9
|
function field(f) {
|
|
21
10
|
return function(datum) {
|
|
22
11
|
let value;
|
|
@@ -35,15 +24,10 @@ Object.defineProperty(exports, "get", {
|
|
|
35
24
|
get: function() {
|
|
36
25
|
return vutils_1.pick;
|
|
37
26
|
}
|
|
38
|
-
}), Object.defineProperty(exports, "merge", {
|
|
39
|
-
enumerable: !0,
|
|
40
|
-
get: function() {
|
|
41
|
-
return vutils_1.merge;
|
|
42
|
-
}
|
|
43
27
|
}), Object.defineProperty(exports, "cloneDeep", {
|
|
44
28
|
enumerable: !0,
|
|
45
29
|
get: function() {
|
|
46
30
|
return vutils_1.cloneDeep;
|
|
47
31
|
}
|
|
48
|
-
}), exports.
|
|
32
|
+
}), exports.field = field;
|
|
49
33
|
//# sourceMappingURL=object.js.map
|
package/cjs/util/object.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/object.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/util/object.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAExD,oFAFA,YAAG,OAEA;AAAE,qFAFA,aAAI,OAEA;AAAE,0FAFA,kBAAS,OAEA;AAE7B,SAAgB,KAAK,CAAC,CAAoB;IACxC,OAAO,UAAU,KAAU;QACzB,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,IAAA,gBAAO,EAAC,CAAC,CAAC,EAAE;YACf,KAAK,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,CAAC,CAAC,CAAC;SACpB;aAAM;YACL,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAC/C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAVD,sBAUC","file":"object.js","sourcesContent":["import { get, pick, cloneDeep, isArray } from '@visactor/vutils';\n\nexport { get, pick, cloneDeep };\n\nexport function field(f: string | string[]) {\n return function (datum: any) {\n let value: any;\n if (!isArray(f)) {\n value = datum?.[f];\n } else {\n value = f.reduce((cur, g) => cur?.[g], datum);\n }\n return value;\n };\n}\n"]}
|
package/cjs/util/scale.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { IGlobalScale } from '../scale/interface';
|
|
3
|
-
import { BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';
|
|
4
|
-
import type {
|
|
5
|
-
import type { ScaleType } from '../typings/scale';
|
|
6
|
-
import type { IVisual, IVisualSpecBase } from '../typings/visual';
|
|
3
|
+
import { type IBaseScale, BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';
|
|
4
|
+
import type { IVisual } from '../typings/visual';
|
|
7
5
|
import { ColorOrdinalScale } from '../scale/color-ordinal-scale';
|
|
8
6
|
declare const defaultScaleMap: {
|
|
9
7
|
linear: typeof LinearScale;
|
|
@@ -18,8 +16,6 @@ export declare function createScaleWithSpec(spec: IVisual<any>, context: {
|
|
|
18
16
|
globalScale: IGlobalScale;
|
|
19
17
|
dataStatistics: DataView;
|
|
20
18
|
}): IBaseScale | null;
|
|
21
|
-
export declare function initScaleWithSpec(scale: IBaseScale, spec: IVisualSpecBase<any, any>): void;
|
|
22
|
-
export declare function isValidScaleType(type: ScaleType): boolean;
|
|
23
19
|
export declare function valueInScaleRange(v: number, s?: IBaseScale): number;
|
|
24
20
|
export declare function isSpecValueWithScale(specValue: any): boolean;
|
|
25
21
|
export {};
|
package/cjs/util/scale.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.isSpecValueWithScale = exports.valueInScaleRange = exports.
|
|
5
|
+
}), exports.isSpecValueWithScale = exports.valueInScaleRange = exports.createScaleWithSpec = exports.createScale = void 0;
|
|
6
6
|
|
|
7
7
|
const vutils_1 = require("@visactor/vutils"), vscale_1 = require("@visactor/vscale"), color_ordinal_scale_1 = require("../scale/color-ordinal-scale"), defaultScaleMap = {
|
|
8
8
|
linear: vscale_1.LinearScale,
|
|
@@ -29,10 +29,6 @@ function initScaleWithSpec(scale, spec) {
|
|
|
29
29
|
spec.specified && scale.specified && scale.specified(spec.specified));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function isValidScaleType(type) {
|
|
33
|
-
return Object.keys(defaultScaleMap).includes(type);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
32
|
function valueInScaleRange(v, s) {
|
|
37
33
|
if (!s) return v;
|
|
38
34
|
const range = s.range(), min = Math.min(range[0], range[range.length - 1]), max = Math.max(range[0], range[range.length - 1]);
|
|
@@ -45,6 +41,5 @@ function isSpecValueWithScale(specValue) {
|
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
exports.createScale = createScale, exports.createScaleWithSpec = createScaleWithSpec,
|
|
48
|
-
exports.initScaleWithSpec = initScaleWithSpec, exports.isValidScaleType = isValidScaleType,
|
|
49
44
|
exports.valueInScaleRange = valueInScaleRange, exports.isSpecValueWithScale = isSpecValueWithScale;
|
|
50
45
|
//# sourceMappingURL=scale.js.map
|
package/cjs/util/scale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/scale.ts"],"names":[],"mappings":";;;AAGA,6CAAqD;AAGrD,
|
|
1
|
+
{"version":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,MAAM,CAAC,CAAC;KAC3B;IAED,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACzB;IAED,IAAI,IAAI,CAAC,SAAS,IAAmB,KAAM,CAAC,SAAS,EAAE;QACtC,KAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACjD;AACH,CAAC;AAED,SAAgB,iBAAiB,CAAC,CAAS,EAAE,CAAc;IACzD,IAAI,CAAC,CAAC,EAAE;QACN,OAAO,CAAC,CAAC;KACV;IACD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AARD,8CAQC;AAED,SAAgB,oBAAoB,CAAC,SAAc;IACjD,OAAO,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,IAAI,IAAA,gBAAO,EAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,CAAC;AAChE,CAAC;AAFD,oDAEC","file":"scale.js","sourcesContent":["/**\n * @description Scale 相关的工具函数\n */\nimport { isString, isValid } from '@visactor/vutils';\nimport type { DataView } from '@visactor/vdataset';\nimport type { IGlobalScale } from '../scale/interface';\nimport { type IBaseScale, BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';\nimport type { IVisual, IVisualSpecBase } from '../typings/visual';\nimport { ColorOrdinalScale } from '../scale/color-ordinal-scale';\n\nconst defaultScaleMap = {\n linear: LinearScale,\n band: BandScale,\n point: PointScale,\n ordinal: OrdinalScale,\n threshold: ThresholdScale,\n colorOrdinal: ColorOrdinalScale\n};\n\nexport function createScale(type: keyof typeof defaultScaleMap): IBaseScale | null {\n const scaleConstructor = defaultScaleMap[type];\n if (scaleConstructor) {\n return new scaleConstructor();\n }\n\n return null;\n}\n\nexport function createScaleWithSpec(\n spec: IVisual<any>,\n context: {\n globalScale: IGlobalScale;\n dataStatistics: DataView;\n }\n): IBaseScale | null {\n if ('scale' in spec && spec.scale) {\n if (isString(spec.scale) && context?.globalScale) {\n return context.globalScale.registerMarkAttributeScale(spec, context.dataStatistics);\n }\n return spec.scale as unknown as IBaseScale;\n }\n const scale = createScale((spec as IVisualSpecBase<any, any>).type);\n if (scale) {\n initScaleWithSpec(scale, spec as IVisualSpecBase<any, any>);\n }\n return scale;\n}\n\n// 需要一个通用的从spec初始化scale的方法,避免在scale属性更新后需要维护多组逻辑\nfunction initScaleWithSpec(scale: IBaseScale, spec: IVisualSpecBase<any, any>) {\n if (!scale || !spec) {\n return;\n }\n\n if (spec.domain) {\n scale.domain(spec.domain);\n }\n\n if (spec.range) {\n scale.range(spec.range);\n }\n\n if (spec.specified && (<OrdinalScale>scale).specified) {\n (<OrdinalScale>scale).specified(spec.specified);\n }\n}\n\nexport function valueInScaleRange(v: number, s?: IBaseScale) {\n if (!s) {\n return v;\n }\n const range = s.range();\n const min = Math.min(range[0], range[range.length - 1]);\n const max = Math.max(range[0], range[range.length - 1]);\n return Math.min(Math.max(min, v), max);\n}\n\nexport function isSpecValueWithScale(specValue: any) {\n return isValid(specValue?.field) && isValid(specValue?.scale);\n}\n"]}
|
package/cjs/util/space.d.ts
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { ILayoutPaddingSpec } from '../model/interface';
|
|
3
|
-
import type { IBoundsLike } from '@visactor/vutils';
|
|
4
|
-
import type { ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';
|
|
1
|
+
import { type IBoundsLike } from '@visactor/vutils';
|
|
2
|
+
import type { ILayoutPaddingSpec, IPercentOffset, ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';
|
|
5
3
|
import type { IPadding, IRect } from '../typings/space';
|
|
6
|
-
import { Direction } from '../typings/space';
|
|
7
4
|
import type { IPoint } from '../typings/coordinate';
|
|
8
5
|
export declare function isValidOrient(orient: string): boolean;
|
|
9
|
-
export declare function getSpecPadding(padding: IPadding | number | undefined | null, defaultPadding: IPadding): IPadding;
|
|
10
6
|
export declare function isPointInRect(point: IPoint, rect: IRect): boolean;
|
|
11
7
|
export declare function isPercent(v: any): v is IPercent;
|
|
12
8
|
export declare function isPercentOffset(v: any): v is IPercentOffset;
|
|
13
9
|
export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect): number;
|
|
14
10
|
export declare function calcPadding(paddingSpec: ILayoutOrientPadding, rect: ILayoutRect, callOp: ILayoutRect): IPadding;
|
|
15
11
|
export declare function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect;
|
|
16
|
-
export declare function boundsOutViewBox(bounds: IBoundsLike, box: IBoundsLike, direction: Direction): {
|
|
17
|
-
start: number;
|
|
18
|
-
end: number;
|
|
19
|
-
};
|
|
20
12
|
export declare function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding;
|
|
21
13
|
export declare function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean): IPoint;
|
|
14
|
+
export declare const getActualNumValue: (originValue: number | string, total: number) => number;
|
package/cjs/util/space.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.
|
|
5
|
+
}), exports.getActualNumValue = exports.convertPoint = exports.normalizeLayoutPaddingSpec = exports.boundsInRect = exports.calcPadding = exports.calcLayoutNumber = exports.isPercentOffset = exports.isPercent = exports.isPointInRect = exports.isValidOrient = void 0;
|
|
6
6
|
|
|
7
|
-
const vutils_1 = require("@visactor/vutils"), type_1 = require("./type")
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), type_1 = require("./type");
|
|
8
8
|
|
|
9
9
|
function isValidOrient(orient) {
|
|
10
10
|
switch (orient) {
|
|
@@ -19,15 +19,6 @@ function isValidOrient(orient) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function getSpecPadding(padding, defaultPadding) {
|
|
23
|
-
return (0, type_1.isNil)(padding) ? Object.assign({}, defaultPadding) : "number" == typeof padding ? {
|
|
24
|
-
top: padding,
|
|
25
|
-
bottom: padding,
|
|
26
|
-
left: padding,
|
|
27
|
-
right: padding
|
|
28
|
-
} : Object.assign(Object.assign({}, defaultPadding), padding);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
22
|
function isPointInRect(point, rect) {
|
|
32
23
|
const {x: x, y: y, width: width, height: height} = rect, {x: x0, y: y0} = point;
|
|
33
24
|
return x0 < x + width && y0 < y + height && y0 > y && x0 > x;
|
|
@@ -81,18 +72,6 @@ function boundsInRect(bounds, rect) {
|
|
|
81
72
|
};
|
|
82
73
|
}
|
|
83
74
|
|
|
84
|
-
function boundsOutViewBox(bounds, box, direction) {
|
|
85
|
-
if (!bounds || !box) return {
|
|
86
|
-
start: 0,
|
|
87
|
-
end: 0
|
|
88
|
-
};
|
|
89
|
-
const start = -(direction === space_1.Direction.horizontal ? bounds.x1 : bounds.y1), end = direction === space_1.Direction.horizontal ? bounds.x2 - (box.x2 - box.x1) : bounds.y2 - (box.y2 - box.y1);
|
|
90
|
-
return {
|
|
91
|
-
start: start > 0 ? start : 0,
|
|
92
|
-
end: end > 0 ? end : 0
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
75
|
function normalizeLayoutPaddingSpec(spec) {
|
|
97
76
|
let result = {};
|
|
98
77
|
return (0, vutils_1.isArray)(spec) ? ((0, type_1.isNil)(spec[0]) || (result.top = result.left = result.bottom = result.right = spec[0]),
|
|
@@ -109,9 +88,15 @@ function convertPoint(point, relativePoint, convert) {
|
|
|
109
88
|
} : point;
|
|
110
89
|
}
|
|
111
90
|
|
|
112
|
-
exports.isValidOrient = isValidOrient, exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
|
|
91
|
+
exports.isValidOrient = isValidOrient, exports.isPointInRect = isPointInRect, exports.isPercent = isPercent,
|
|
92
|
+
exports.isPercentOffset = isPercentOffset, exports.calcLayoutNumber = calcLayoutNumber,
|
|
93
|
+
exports.calcPadding = calcPadding, exports.boundsInRect = boundsInRect, exports.normalizeLayoutPaddingSpec = normalizeLayoutPaddingSpec,
|
|
94
|
+
exports.convertPoint = convertPoint;
|
|
95
|
+
|
|
96
|
+
const getActualNumValue = (originValue, total) => {
|
|
97
|
+
const originNumValue = Number(originValue), originStrValue = originValue.toString();
|
|
98
|
+
return isNaN(originNumValue) && "%" === originStrValue[originStrValue.length - 1] ? total * (Number(originStrValue.slice(0, originStrValue.length - 1)) / 100) : originNumValue;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.getActualNumValue = getActualNumValue;
|
|
117
102
|
//# sourceMappingURL=space.js.map
|
package/cjs/util/space.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/util/space.ts"],"names":[],"mappings":";;;AAGA,6CAA2C;AAC3C,iCAA6F;AAI7F,4CAA6C;AAG7C,SAAgB,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,EAAE;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd;YAC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,EAAE;YACnB,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;SACtC;QACD,IAAI,CAAC,IAAA,YAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,IAAA,YAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;YACnB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;SACvB;QACD,OAAO,MAAM,CAAC;KACf;IACD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,IAAA,iBAAU,EAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;QAClF,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;QAC/D,OAAO,MAAM,CAAC;KACf;IACD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,MAAM,qBAAQ,IAAI,CAAE,CAAC;QACrB,OAAO,MAAM,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA1BD,gEA0BC;AAED,SAAgB,YAAY,CAAC,KAAa,EAAE,aAAqB,EAAE,OAAgB;IACjF,IAAI,OAAO,EAAE;QACX,OAAO;YACL,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;YAC5B,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;SAC7B,CAAC;KACH;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AARD,oCAQC","file":"space.js","sourcesContent":["import type { IPercentOffset } from './../model/interface';\nimport type { ILayoutPaddingSpec } from '../model/interface';\nimport type { IBoundsLike } from '@visactor/vutils';\nimport { isArray } from '@visactor/vutils';\nimport { isNumber, isNil, isString, isFunction, couldBeValidNumber, isObject } from './type';\nimport type { ILayoutNumber, IPercent, ILayoutOrientPadding, ILayoutRect } from '../model/interface';\nimport type { IPadding, IRect } from '../typings/space';\n// eslint-disable-next-line no-duplicate-imports\nimport { Direction } from '../typings/space';\nimport type { IPoint } from '../typings/coordinate';\n\nexport function isValidOrient(orient: string): boolean {\n switch (orient) {\n case 'left':\n case 'right':\n case 'top':\n case 'bottom':\n return true;\n default:\n return false;\n }\n}\n\nexport function getSpecPadding(padding: IPadding | number | undefined | null, defaultPadding: IPadding): IPadding {\n if (isNil(padding)) {\n return { ...defaultPadding };\n }\n if (typeof padding === 'number') {\n return {\n top: padding,\n bottom: padding,\n left: padding,\n right: padding\n };\n }\n return {\n ...defaultPadding,\n ...padding\n };\n}\n\nexport function isPointInRect(point: IPoint, rect: IRect) {\n const { x, y, width, height } = rect;\n const { x: x0, y: y0 } = point;\n return x0 < x + width && y0 < y + height && y0 > y && x0 > x;\n}\n\nexport function isPercent(v: any): v is IPercent {\n if (!isString(v)) {\n return false;\n }\n if (!v.endsWith('%')) {\n return false;\n }\n return couldBeValidNumber(v.substring(0, v.length - 1));\n}\n\nexport function isPercentOffset(v: any): v is IPercentOffset {\n if (!isObject(v)) {\n return false;\n }\n if ('percent' in v || 'offset' in v) {\n return true;\n }\n return false;\n}\n\nexport function calcLayoutNumber(\n v: ILayoutNumber | undefined,\n size: number,\n callOp?: ILayoutRect //如果是函数类型的话,函数的参数\n) {\n if (isNumber(v)) {\n return v;\n }\n if (isPercent(v)) {\n return (Number(v.substring(0, v.length - 1)) * size) / 100;\n }\n if (isFunction(v)) {\n return v(callOp);\n }\n if (isObject(v)) {\n return size * (v.percent ?? 0) + (v.offset ?? 0);\n }\n return 0;\n}\n\nexport function calcPadding(\n paddingSpec: ILayoutOrientPadding,\n rect: ILayoutRect,\n callOp: ILayoutRect //如果是函数类型的话,函数的参数\n): IPadding {\n const result: IPadding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n if (Object.values(paddingSpec).every(value => isNumber(value))) {\n result.top = (<IPadding>paddingSpec).top ?? 0;\n result.right = (<IPadding>paddingSpec).right ?? 0;\n result.bottom = (<IPadding>paddingSpec).bottom ?? 0;\n result.left = (<IPadding>paddingSpec).left ?? 0;\n return result;\n }\n const paddings = [\n {\n orients: ['left', 'right'],\n size: rect.width\n },\n {\n orients: ['top', 'bottom'],\n size: rect.height\n }\n ];\n paddings.forEach(p => {\n p.orients.forEach(o => {\n result[o] = calcLayoutNumber(paddingSpec[o], p.size, callOp);\n });\n });\n return result;\n}\n\nexport function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect {\n if (!bounds) {\n return { width: 0, height: 0 };\n }\n return {\n width: Math.ceil(Math.min(bounds.x2 - bounds.x1, rect.width)),\n height: Math.ceil(Math.min(bounds.y2 - bounds.y1, rect.height))\n };\n}\n\nexport function boundsOutViewBox(\n bounds: IBoundsLike,\n box: IBoundsLike,\n direction: Direction\n): {\n start: number;\n end: number;\n} {\n if (!bounds || !box) {\n return { start: 0, end: 0 };\n }\n const start = -(direction === Direction.horizontal ? bounds.x1 : bounds.y1);\n const end = direction === Direction.horizontal ? bounds.x2 - (box.x2 - box.x1) : bounds.y2 - (box.y2 - box.y1);\n return { start: start > 0 ? start : 0, end: end > 0 ? end : 0 };\n}\n\nexport function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding {\n let result: ILayoutOrientPadding = {};\n if (isArray(spec)) {\n if (!isNil(spec[0])) {\n result.top = result.left = result.bottom = result.right = spec[0];\n }\n if (!isNil(spec[1])) {\n result.left = result.right = spec[1];\n }\n if (!isNil(spec[2])) {\n result.bottom = spec[2];\n }\n if (!isNil(spec[3])) {\n result.left = spec[3];\n }\n return result;\n }\n if (isNumber(spec) || isPercent(spec) || isFunction(spec) || isPercentOffset(spec)) {\n result.top = result.left = result.bottom = result.right = spec;\n return result;\n }\n if (isObject(spec)) {\n result = { ...spec };\n return result;\n }\n return result;\n}\n\nexport function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean) {\n if (convert) {\n return {\n x: point.x + relativePoint.x,\n y: point.y + relativePoint.y\n };\n }\n return point;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/util/space.ts"],"names":[],"mappings":";;;AAAA,6CAA6D;AAC7D,iCAA6F;AAY7F,SAAgB,aAAa,CAAC,MAAc;IAC1C,QAAQ,MAAM,EAAE;QACd,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAVD,sCAUC;AAED,SAAgB,aAAa,CAAC,KAAa,EAAE,IAAW;IACtD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAC/B,OAAO,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,MAAM,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC;AAJD,sCAIC;AAED,SAAgB,SAAS,CAAC,CAAM;IAC9B,IAAI,CAAC,IAAA,eAAQ,EAAC,CAAC,CAAC,EAAE;QAChB,OAAO,KAAK,CAAC;KACd;IACD,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACpB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAA,yBAAkB,EAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AARD,8BAQC;AAED,SAAgB,eAAe,CAAC,CAAM;IACpC,I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E;QAClB,MAAM,qBAAQ,IAAI,CAAE,CAAC;QACrB,OAAO,MAAM,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA1BD,gEA0BC;AAED,SAAgB,YAAY,CAAC,KAAa,EAAE,aAAqB,EAAE,OAAgB;IACjF,IAAI,OAAO,EAAE;QACX,OAAO;YACL,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;YAC5B,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;SAC7B,CAAC;KACH;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AARD,oCAQC;AAQM,MAAM,iBAAiB,GAAG,CAAC,WAA4B,EAAE,KAAa,EAAU,EAAE;IACvF,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9C,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QAC9E,OAAO,KAAK,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;KACnF;IACD,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAPW,QAAA,iBAAiB,qBAO5B","file":"space.js","sourcesContent":["import { isArray, type IBoundsLike } from '@visactor/vutils';\nimport { isNumber, isNil, isString, isFunction, couldBeValidNumber, isObject } from './type';\nimport type {\n ILayoutPaddingSpec,\n IPercentOffset,\n ILayoutNumber,\n IPercent,\n ILayoutOrientPadding,\n ILayoutRect\n} from '../model/interface';\nimport type { IPadding, IRect } from '../typings/space';\nimport type { IPoint } from '../typings/coordinate';\n\nexport function isValidOrient(orient: string): boolean {\n switch (orient) {\n case 'left':\n case 'right':\n case 'top':\n case 'bottom':\n return true;\n default:\n return false;\n }\n}\n\nexport function isPointInRect(point: IPoint, rect: IRect) {\n const { x, y, width, height } = rect;\n const { x: x0, y: y0 } = point;\n return x0 < x + width && y0 < y + height && y0 > y && x0 > x;\n}\n\nexport function isPercent(v: any): v is IPercent {\n if (!isString(v)) {\n return false;\n }\n if (!v.endsWith('%')) {\n return false;\n }\n return couldBeValidNumber(v.substring(0, v.length - 1));\n}\n\nexport function isPercentOffset(v: any): v is IPercentOffset {\n if (!isObject(v)) {\n return false;\n }\n if ('percent' in v || 'offset' in v) {\n return true;\n }\n return false;\n}\n\nexport function calcLayoutNumber(\n v: ILayoutNumber | undefined,\n size: number,\n callOp?: ILayoutRect //如果是函数类型的话,函数的参数\n) {\n if (isNumber(v)) {\n return v;\n }\n if (isPercent(v)) {\n return (Number(v.substring(0, v.length - 1)) * size) / 100;\n }\n if (isFunction(v)) {\n return v(callOp);\n }\n if (isObject(v)) {\n return size * (v.percent ?? 0) + (v.offset ?? 0);\n }\n return 0;\n}\n\nexport function calcPadding(\n paddingSpec: ILayoutOrientPadding,\n rect: ILayoutRect,\n callOp: ILayoutRect //如果是函数类型的话,函数的参数\n): IPadding {\n const result: IPadding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n if (Object.values(paddingSpec).every(value => isNumber(value))) {\n result.top = (<IPadding>paddingSpec).top ?? 0;\n result.right = (<IPadding>paddingSpec).right ?? 0;\n result.bottom = (<IPadding>paddingSpec).bottom ?? 0;\n result.left = (<IPadding>paddingSpec).left ?? 0;\n return result;\n }\n const paddings = [\n {\n orients: ['left', 'right'],\n size: rect.width\n },\n {\n orients: ['top', 'bottom'],\n size: rect.height\n }\n ];\n paddings.forEach(p => {\n p.orients.forEach(o => {\n result[o] = calcLayoutNumber(paddingSpec[o], p.size, callOp);\n });\n });\n return result;\n}\n\nexport function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect {\n if (!bounds) {\n return { width: 0, height: 0 };\n }\n return {\n width: Math.ceil(Math.min(bounds.x2 - bounds.x1, rect.width)),\n height: Math.ceil(Math.min(bounds.y2 - bounds.y1, rect.height))\n };\n}\n\nexport function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding {\n let result: ILayoutOrientPadding = {};\n if (isArray(spec)) {\n if (!isNil(spec[0])) {\n result.top = result.left = result.bottom = result.right = spec[0];\n }\n if (!isNil(spec[1])) {\n result.left = result.right = spec[1];\n }\n if (!isNil(spec[2])) {\n result.bottom = spec[2];\n }\n if (!isNil(spec[3])) {\n result.left = spec[3];\n }\n return result;\n }\n if (isNumber(spec) || isPercent(spec) || isFunction(spec) || isPercentOffset(spec)) {\n result.top = result.left = result.bottom = result.right = spec;\n return result;\n }\n if (isObject(spec)) {\n result = { ...spec };\n return result;\n }\n return result;\n}\n\nexport function convertPoint(point: IPoint, relativePoint: IPoint, convert: boolean) {\n if (convert) {\n return {\n x: point.x + relativePoint.x,\n y: point.y + relativePoint.y\n };\n }\n return point;\n}\n\n/**\n * 将相对数值转换为绝对数值\n * @param originValue 原始值(相对值或绝对值)\n * @param total 总体值\n * @returns 实际绝对数值\n */\nexport const getActualNumValue = (originValue: number | string, total: number): number => {\n const originNumValue = Number(originValue);\n const originStrValue = originValue.toString();\n if (isNaN(originNumValue) && originStrValue[originStrValue.length - 1] === '%') {\n return total * (Number(originStrValue.slice(0, originStrValue.length - 1)) / 100);\n }\n return originNumValue;\n};\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __rest = this && this.__rest || function(s, e) {
|
|
4
|
+
var t = {};
|
|
5
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
6
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
7
|
+
var i = 0;
|
|
8
|
+
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function convertBackgroundSpec(bg) {
|
|
14
|
+
if (!bg) return null;
|
|
15
|
+
if ("string" == typeof bg) return {
|
|
16
|
+
fill: bg,
|
|
17
|
+
fillOpacity: 1
|
|
18
|
+
};
|
|
19
|
+
if ("object" != typeof bg) return null;
|
|
20
|
+
const {x: x, y: y, width: width, height: height, x1: x1, y1: y1, image: image} = bg, rest = __rest(bg, [ "x", "y", "width", "height", "x1", "y1", "image" ]);
|
|
21
|
+
return rest.background = image, rest;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25
|
+
value: !0
|
|
26
|
+
}), exports.convertBackgroundSpec = void 0, exports.convertBackgroundSpec = convertBackgroundSpec;
|
|
27
|
+
//# sourceMappingURL=background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/background.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,qBAAqB,CACnC,EAAmB;IAEnB,IAAI,CAAC,EAAE,EAAE;QACP,OAAO,IAAI,CAAC;KACb;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO;YACL,IAAI,EAAE,EAAE;YACR,WAAW,EAAE,CAAC;SACf,CAAC;KACH;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,KAAc,EAAE,EAAX,IAAI,UAAK,EAAE,EAApD,kDAA+C,CAAK,CAAC;IAC3D,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,sDAkBC","file":"background.js","sourcesContent":["import type { IBackgroundSpec, IBackgroundStyleSpec } from '../../typings';\n\nexport function convertBackgroundSpec(\n bg: IBackgroundSpec\n): Omit<IBackgroundStyleSpec, 'image'> & { background?: IBackgroundStyleSpec['image'] } {\n if (!bg) {\n return null;\n }\n if (typeof bg === 'string') {\n return {\n fill: bg,\n fillOpacity: 1\n };\n }\n if (typeof bg !== 'object') {\n return null;\n }\n const { x, y, width, height, x1, y1, image, ...rest } = bg;\n rest.background = image;\n return rest;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cloneDeepSpec(spec: any): any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.cloneDeepSpec = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), common_1 = require("./common");
|
|
8
|
+
|
|
9
|
+
function cloneDeepSpec(spec) {
|
|
10
|
+
const value = spec;
|
|
11
|
+
let result;
|
|
12
|
+
if (!(0, vutils_1.isValid)(value) || "object" != typeof value) return value;
|
|
13
|
+
if ((0, common_1.isDataView)(value) || (0, common_1.isHTMLElement)(value)) return value;
|
|
14
|
+
const isArr = (0, vutils_1.isArray)(value), length = value.length;
|
|
15
|
+
result = isArr ? new Array(length) : "object" == typeof value ? {} : (0, vutils_1.isBoolean)(value) || (0,
|
|
16
|
+
vutils_1.isNumber)(value) || (0, vutils_1.isString)(value) ? value : (0, vutils_1.isDate)(value) ? new Date(+value) : void 0;
|
|
17
|
+
const props = isArr ? void 0 : Object.keys(Object(value));
|
|
18
|
+
let index = -1;
|
|
19
|
+
if (result) for (;++index < (props || value).length; ) {
|
|
20
|
+
const key = props ? props[index] : index, subValue = value[key];
|
|
21
|
+
result[key] = cloneDeepSpec(subValue);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.cloneDeepS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I,KAAK,GAAG,CAAC,CAAC,CAAC;IACf,IAAI,MAAM,EAAE;QACV,OAAO,EAAE,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE;YACxC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;SACvC;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAhDD,sCAgDC","file":"clone-deep.js","sourcesContent":["import { isArray, isBoolean, isDate, isNumber, isString, isValid } from '@visactor/vutils';\nimport { isDataView, isHTMLElement } from './common';\n\n/**\n * 深拷贝 spec,为避免循环引用,DataView 维持原有引用\n * @param spec 原spec\n */\nexport function cloneDeepSpec(spec: any) {\n const value = spec;\n\n let result;\n if (!isValid(value) || typeof value !== 'object') {\n return value;\n }\n\n // 判断是不是不能深拷贝的对象\n if (isDataView(value) || isHTMLElement(value)) {\n return value;\n }\n\n const isArr = isArray(value);\n const length = value.length;\n // 不考虑特殊数组的额外处理\n if (isArr) {\n result = new Array(length);\n }\n // 不考虑 buffer / arguments 类型的处理以及 prototype 的额外处理\n else if (typeof value === 'object') {\n result = {};\n }\n // 不建议使用作为 Boolean / Number / String 作为构造器\n else if (isBoolean(value) || isNumber(value) || isString(value)) {\n result = value;\n } else if (isDate(value)) {\n result = new Date(+value);\n }\n // 不考虑 ArrayBuffer / DataView / TypedArray / map / set / regexp / symbol 类型\n else {\n result = undefined;\n }\n\n // 不考虑 map / set / TypedArray 类型的赋值\n\n // 不考虑对象的 symbol 属性\n const props = isArr ? undefined : Object.keys(Object(value));\n\n let index = -1;\n if (result) {\n while (++index < (props || value).length) {\n const key = props ? props[index] : index;\n const subValue = value[key];\n result[key] = cloneDeepSpec(subValue);\n }\n }\n return result;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.isHTMLElement = exports.isDataView = void 0;
|
|
6
|
+
|
|
7
|
+
const vdataset_1 = require("@visactor/vdataset");
|
|
8
|
+
|
|
9
|
+
function isDataView(obj) {
|
|
10
|
+
return obj instanceof vdataset_1.DataView;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isHTMLElement(obj) {
|
|
14
|
+
try {
|
|
15
|
+
return obj instanceof Element;
|
|
16
|
+
} catch (_a) {
|
|
17
|
+
const htmlElementKeys = [ "children", "innerHTML", "classList", "setAttribute", "tagName", "getBoundingClientRect" ], keys = Object.keys(obj);
|
|
18
|
+
return htmlElementKeys.every((key => keys.includes(key)));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.isDataView = isDataView, exports.isHTMLElement = isHTMLElement;
|
|
23
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/common.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,GAAG,YAAY,mBAAQ,CAAC;AACjC,CAAC;AAFD,gCAEC;AAED,SAAgB,aAAa,CAAC,GAAQ;IACpC,IAAI;QACF,OAAO,GAAG,YAAY,OAAO,CAAC;KAC/B;IAAC,WAAM;QAEN,MAAM,eAAe,GAAsB;YACzC,UAAU;YACV,WAAW;YACX,WAAW;YACX,cAAc;YACd,SAAS;YACT,uBAAuB;SACxB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KACzD;AACH,CAAC;AAhBD,sCAgBC","file":"common.js","sourcesContent":["import { DataView } from '@visactor/vdataset';\n\nexport function isDataView(obj: any): obj is DataView {\n return obj instanceof DataView;\n}\n\nexport function isHTMLElement(obj: any): obj is Element {\n try {\n return obj instanceof Element;\n } catch {\n // 跨端 plan B\n const htmlElementKeys: (keyof Element)[] = [\n 'children',\n 'innerHTML',\n 'classList',\n 'setAttribute',\n 'tagName',\n 'getBoundingClientRect'\n ];\n const keys = Object.keys(obj);\n return htmlElementKeys.every(key => keys.includes(key));\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./background"), exports), __exportStar(require("./clone-deep"), exports),
|
|
21
|
+
__exportStar(require("./common"), exports), __exportStar(require("./merge-spec"), exports),
|
|
22
|
+
__exportStar(require("./merge-theme"), exports), __exportStar(require("./preprocess"), exports),
|
|
23
|
+
__exportStar(require("./transform"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/util/spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B","file":"index.js","sourcesContent":["export * from './background';\nexport * from './clone-deep';\nexport * from './common';\nexport * from './merge-spec';\nexport * from './merge-theme';\nexport * from './preprocess';\nexport * from './transform';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeSpec(target: any, ...sources: any[]): any;
|