@visactor/vseed 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +646 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildSpec.d.ts +1 -2
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +54 -14290
- package/dist/esm/builder/builder/builder.js +10 -0
- package/dist/esm/builder/builder/builder.js.map +1 -1
- package/dist/esm/builder/builder/prepare.d.ts +12 -0
- package/dist/esm/builder/builder/prepare.js +269 -0
- package/dist/esm/builder/builder/prepare.js.map +1 -0
- package/dist/esm/builder/register/all.js +4 -1
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/index.d.ts +3 -0
- package/dist/esm/builder/register/chartType/index.js +4 -1
- package/dist/esm/builder/register/chartType/raceDonut.d.ts +5 -0
- package/dist/esm/builder/register/chartType/raceDonut.js +9 -0
- package/dist/esm/builder/register/chartType/raceDonut.js.map +1 -0
- package/dist/esm/builder/register/chartType/raceLine.d.ts +5 -0
- package/dist/esm/builder/register/chartType/raceLine.js +9 -0
- package/dist/esm/builder/register/chartType/raceLine.js.map +1 -0
- package/dist/esm/builder/register/chartType/racePie.d.ts +5 -0
- package/dist/esm/builder/register/chartType/racePie.js +9 -0
- package/dist/esm/builder/register/chartType/racePie.js.map +1 -0
- package/dist/esm/dataReshape/constant.d.ts +1 -0
- package/dist/esm/dataReshape/constant.js +2 -1
- package/dist/esm/dataReshape/constant.js.map +1 -1
- package/dist/esm/dataSelector/selector.d.ts +71 -2
- package/dist/esm/dataSelector/selector.js +96 -32
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/index.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.js +4 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/raceDonut.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceDonut.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceDonut.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceLine.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceLine.js +36 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceLine.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/racePie.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/racePie.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/racePie.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.js +4 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceBar.js +0 -3
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceBar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceColumn.js +0 -3
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceColumn.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceDonut.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceDonut.js +74 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceDonut.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceLine.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceLine.js +89 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/raceLine.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/racePie.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/racePie.js +74 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/racePie.js.map +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js +2 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/index.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/raceDonut.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceDonut.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceDonut.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceLine.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceLine.js +25 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceLine.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/racePie.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/racePie.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipeline/racePie.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceScatter.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/raceScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +10 -4
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.d.ts +8 -2
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +13 -4
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +8 -4
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +10 -4
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +9 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +7 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/boxLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js +5 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/index.d.ts +5 -3
- package/dist/esm/pipeline/spec/chart/pipes/player/index.js +5 -3
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.d.ts +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.js +8 -7
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerXY.d.ts → playerBar.d.ts} +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerYX.js → playerBar.js} +6 -7
- package/dist/esm/pipeline/spec/chart/pipes/player/playerBar.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerColumn.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerXY.js → playerColumn.js} +6 -7
- package/dist/esm/pipeline/spec/chart/pipes/player/playerColumn.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerYX.d.ts → playerLine.d.ts} +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/playerLine.js +144 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerLine.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerYY.d.ts → playerPie.d.ts} +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/playerPie.js +174 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerPie.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerScatter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/{playerYY.js → playerScatter.js} +7 -7
- package/dist/esm/pipeline/spec/chart/pipes/player/playerScatter.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +4 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +12 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +6 -3
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +7 -3
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -1
- package/dist/esm/pipeline/utils/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/index.js +1 -0
- package/dist/esm/pipeline/utils/sandbox/builtin-utils.d.ts +6 -0
- package/dist/esm/pipeline/utils/sandbox/builtin-utils.js +337 -0
- package/dist/esm/pipeline/utils/sandbox/builtin-utils.js.map +1 -0
- package/dist/esm/pipeline/utils/sandbox/execute.d.ts +73 -0
- package/dist/esm/pipeline/utils/sandbox/execute.js +716 -0
- package/dist/esm/pipeline/utils/sandbox/execute.js.map +1 -0
- package/dist/esm/pipeline/utils/sandbox/index.d.ts +7 -0
- package/dist/esm/pipeline/utils/sandbox/index.js +3 -0
- package/dist/esm/theme/dark/dark.js +10 -5
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/dark/raceLine.d.ts +182 -0
- package/dist/esm/theme/dark/raceLine.js +39 -0
- package/dist/esm/theme/dark/raceLine.js.map +1 -0
- package/dist/esm/theme/dark/racePie.d.ts +157 -0
- package/dist/esm/theme/dark/racePie.js +18 -0
- package/dist/esm/theme/dark/racePie.js.map +1 -0
- package/dist/esm/theme/light/light.js +6 -1
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/theme/light/raceLine.d.ts +182 -0
- package/dist/esm/theme/light/raceLine.js +39 -0
- package/dist/esm/theme/light/raceLine.js.map +1 -0
- package/dist/esm/theme/light/racePie.d.ts +157 -0
- package/dist/esm/theme/light/racePie.js +18 -0
- package/dist/esm/theme/light/racePie.js.map +1 -0
- package/dist/esm/types/builder/builder.d.ts +1 -0
- package/dist/esm/types/builder/builder.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +682 -18
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +682 -18
- package/dist/esm/types/chartType/bar/zBar.d.ts +362 -10
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +362 -10
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +362 -10
- package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +210 -14
- package/dist/esm/types/chartType/circlePacking/zCirclePacking.d.ts +2 -2
- package/dist/esm/types/chartType/column/zColumn.d.ts +363 -10
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +363 -10
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +362 -10
- package/dist/esm/types/chartType/donut/zDonut.d.ts +2 -2
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +842 -22
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +2 -2
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +2 -2
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +362 -10
- package/dist/esm/types/chartType/index.d.ts +7 -0
- package/dist/esm/types/chartType/index.js +3 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +522 -14
- package/dist/esm/types/chartType/pie/zPie.d.ts +2 -2
- package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +241 -4
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js +1 -1
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
- package/dist/esm/types/chartType/raceBar/raceBar.d.ts +2 -2
- package/dist/esm/types/chartType/raceBar/zRaceBar.d.ts +363 -10
- package/dist/esm/types/chartType/raceColumn/raceColumn.d.ts +106 -3
- package/dist/esm/types/chartType/raceColumn/zRaceColumn.d.ts +363 -10
- package/dist/esm/types/chartType/raceDonut/index.d.ts +2 -0
- package/dist/esm/types/chartType/raceDonut/index.js +1 -0
- package/dist/esm/types/chartType/raceDonut/raceDonut.d.ts +75 -0
- package/dist/esm/types/chartType/raceDonut/zRaceDonut.d.ts +387 -0
- package/dist/esm/types/chartType/raceDonut/zRaceDonut.js +23 -0
- package/dist/esm/types/chartType/raceDonut/zRaceDonut.js.map +1 -0
- package/dist/esm/types/chartType/raceLine/index.d.ts +2 -0
- package/dist/esm/types/chartType/raceLine/index.js +1 -0
- package/dist/esm/types/chartType/raceLine/raceLine.d.ts +122 -0
- package/dist/esm/types/chartType/raceLine/raceLine.js +0 -0
- package/dist/esm/types/chartType/raceLine/zRaceLine.d.ts +1904 -0
- package/dist/esm/types/chartType/raceLine/zRaceLine.js +35 -0
- package/dist/esm/types/chartType/raceLine/zRaceLine.js.map +1 -0
- package/dist/esm/types/chartType/racePie/index.d.ts +2 -0
- package/dist/esm/types/chartType/racePie/index.js +1 -0
- package/dist/esm/types/chartType/racePie/racePie.d.ts +75 -0
- package/dist/esm/types/chartType/racePie/racePie.js +0 -0
- package/dist/esm/types/chartType/racePie/zRacePie.d.ts +387 -0
- package/dist/esm/types/chartType/racePie/zRacePie.js +23 -0
- package/dist/esm/types/chartType/racePie/zRacePie.js.map +1 -0
- package/dist/esm/types/chartType/raceScatter/raceScatter.d.ts +84 -0
- package/dist/esm/types/chartType/raceScatter/zRaceScatter.d.ts +363 -10
- package/dist/esm/types/chartType/radar/zRadar.d.ts +2 -2
- package/dist/esm/types/chartType/rose/zRose.d.ts +2 -2
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +2 -2
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +362 -10
- package/dist/esm/types/chartType/sunburst/sunburst.d.ts +1 -1
- package/dist/esm/types/chartType/sunburst/zSunburst.d.ts +2 -2
- package/dist/esm/types/chartType/table/zTable.d.ts +241 -4
- package/dist/esm/types/chartType/table/zTable.js +1 -1
- package/dist/esm/types/chartType/table/zTable.js.map +1 -1
- package/dist/esm/types/chartType/treeMap/zTreeMap.d.ts +2 -2
- package/dist/esm/types/dataSelector/selector.d.ts +594 -3
- package/dist/esm/types/dataSelector/selector.js +58 -2
- package/dist/esm/types/dataSelector/selector.js.map +1 -1
- package/dist/esm/types/properties/annotation/annotation.d.ts +200 -4
- package/dist/esm/types/properties/annotation/annotationHorizontalLine.d.ts +12 -0
- package/dist/esm/types/properties/annotation/annotationPoint.d.ts +19 -0
- package/dist/esm/types/properties/annotation/annotationVerticalLine.d.ts +12 -0
- package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.d.ts +10 -0
- package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js +2 -0
- package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js.map +1 -1
- package/dist/esm/types/properties/annotation/zAnnotationPoint.d.ts +80 -2
- package/dist/esm/types/properties/annotation/zAnnotationPoint.js +2 -1
- package/dist/esm/types/properties/annotation/zAnnotationPoint.js.map +1 -1
- package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.d.ts +10 -0
- package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js +2 -0
- package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js.map +1 -1
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +105 -2
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +2 -1
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -1
- package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +83 -2
- package/dist/esm/types/properties/chartType/chartType.d.ts +4 -1
- package/dist/esm/types/properties/chartType/chartType.js +3 -0
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/annotation/zAnnotation.d.ts +156 -0
- package/dist/esm/types/properties/config/area.d.ts +160 -4
- package/dist/esm/types/properties/config/bar.d.ts +240 -6
- package/dist/esm/types/properties/config/boxplot.d.ts +80 -2
- package/dist/esm/types/properties/config/circlePacking.d.ts +2 -2
- package/dist/esm/types/properties/config/column.d.ts +240 -6
- package/dist/esm/types/properties/config/config.d.ts +3576 -96
- package/dist/esm/types/properties/config/config.js +4 -1
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/dualAxis.d.ts +80 -2
- package/dist/esm/types/properties/config/funnel.d.ts +2 -2
- package/dist/esm/types/properties/config/heatmap.d.ts +2 -2
- package/dist/esm/types/properties/config/histogram.d.ts +80 -2
- package/dist/esm/types/properties/config/label/zLabel.d.ts +2 -2
- package/dist/esm/types/properties/config/label/zPieLabel.d.ts +2 -2
- package/dist/esm/types/properties/config/line.d.ts +80 -2
- package/dist/esm/types/properties/config/pie.d.ts +6 -6
- package/dist/esm/types/properties/config/player/player.d.ts +2 -2
- package/dist/esm/types/properties/config/player/zPlayer.d.ts +1 -0
- package/dist/esm/types/properties/config/player/zPlayer.js +1 -0
- package/dist/esm/types/properties/config/player/zPlayer.js.map +1 -1
- package/dist/esm/types/properties/config/race.d.ts +2519 -50
- package/dist/esm/types/properties/config/race.js +10 -3
- package/dist/esm/types/properties/config/race.js.map +1 -1
- package/dist/esm/types/properties/config/rose.d.ts +4 -4
- package/dist/esm/types/properties/config/scatter.d.ts +80 -2
- package/dist/esm/types/properties/config/sunburst.d.ts +2 -2
- package/dist/esm/types/properties/config/treeMap.d.ts +2 -2
- package/dist/esm/types/properties/dimensions/index.d.ts +3 -0
- package/dist/esm/types/properties/dimensions/raceDonutDimension.d.ts +14 -0
- package/dist/esm/types/properties/dimensions/raceDonutDimension.js +0 -0
- package/dist/esm/types/properties/dimensions/raceLineDimension.d.ts +15 -0
- package/dist/esm/types/properties/dimensions/raceLineDimension.js +0 -0
- package/dist/esm/types/properties/dimensions/racePieDimension.d.ts +14 -0
- package/dist/esm/types/properties/dimensions/racePieDimension.js +0 -0
- package/dist/esm/types/properties/markStyle/areaStyle.d.ts +19 -0
- package/dist/esm/types/properties/markStyle/barStyle.d.ts +99 -2
- package/dist/esm/types/properties/markStyle/barStyle.js +2 -1
- package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +2 -2
- package/dist/esm/types/properties/markStyle/lineStyle.d.ts +99 -2
- package/dist/esm/types/properties/markStyle/lineStyle.js +2 -1
- package/dist/esm/types/properties/markStyle/lineStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/markStyle.d.ts +648 -24
- package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +2 -2
- package/dist/esm/types/properties/markStyle/pointStyle.d.ts +99 -2
- package/dist/esm/types/properties/markStyle/pointStyle.js +2 -1
- package/dist/esm/types/properties/markStyle/pointStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/zAreaStyle.d.ts +80 -2
- package/dist/esm/types/properties/markStyle/zAreaStyle.js +2 -1
- package/dist/esm/types/properties/markStyle/zAreaStyle.js.map +1 -1
- package/dist/esm/types/properties/measures/hierarchyMeasure.d.ts +10 -0
- package/dist/esm/types/properties/measures/hierarchyMeasure.js +0 -0
- package/dist/esm/types/properties/measures/index.d.ts +4 -1
- package/dist/esm/types/properties/measures/raceDonutMeasure.d.ts +2 -0
- package/dist/esm/types/properties/measures/raceDonutMeasure.js +0 -0
- package/dist/esm/types/properties/measures/raceLineMeasure.d.ts +2 -0
- package/dist/esm/types/properties/measures/raceLineMeasure.js +0 -0
- package/dist/esm/types/properties/measures/racePieMeasure.d.ts +2 -0
- package/dist/esm/types/properties/measures/racePieMeasure.js +0 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +9495 -2535
- package/dist/esm/types/sandbox.d.ts +19 -0
- package/dist/esm/types/sandbox.js +0 -0
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +4 -25058
- package/dist/esm/types/zVseed.js +7 -4
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +4310 -1922
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXY.js.map +0 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYX.js.map +0 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYY.js.map +0 -1
- package/dist/esm/types/properties/measures/hierarchyMeasures.d.ts +0 -4
- /package/dist/esm/types/{properties/measures/hierarchyMeasures.js → chartType/raceDonut/raceDonut.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/utils/sandbox/execute.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/sandbox/execute.ts"],"sourcesContent":["/* eslint-disable no-console */\n/**\n * 增强的安全代码执行器\n * @description 专为 AI 生成代码设计的安全沙箱\n * @module enhancedSecureCodeExecutor\n */\n\nimport type { CodeExecutionOptions, CodeExecutionResult } from 'src/types/sandbox'\nimport { BUILTIN_UTILS_SOURCE } from './builtin-utils'\n\n/**\n * Worker 池管理器\n * @description 复用 Worker 实例,避免重复创建开销\n */\nclass WorkerPool {\n private workers: Worker[] = []\n private availableWorkers: Worker[] = []\n private readonly maxSize: number\n private isInitialized = false\n\n constructor(maxSize = 2) {\n this.maxSize = maxSize\n }\n\n async initialize(): Promise<void> {\n if (this.isInitialized) return\n\n for (let i = 0; i < this.maxSize; i++) {\n try {\n const worker = await this.createSecureWorker()\n this.workers.push(worker)\n this.availableWorkers.push(worker)\n } catch (error) {\n // 某个 Worker 初始化失败时,清理已创建的 Worker\n this.workers.forEach((w) => w.terminate())\n this.workers = []\n this.availableWorkers = []\n throw new Error(`Failed to initialize Worker pool: ${error instanceof Error ? error.message : String(error)}`)\n }\n }\n\n this.isInitialized = true\n }\n\n private createSecureWorker(): Promise<Worker> {\n // 直接使用内置工具库\n const libraryLoadCode = `// 内置工具库(lodash/Ramda 兼容 API)\\n${BUILTIN_UTILS_SOURCE}`\n\n const workerCode = `\n // ============================================\n // 阶段 1: 立即执行安全加固 (IIFE)\n // ============================================\n (function initSecureSandbox() {\n 'use strict';\n \n // 1.1 保存必要的原生引用(在被删除前)\n const nativeImportScripts = self.importScripts;\n const nativePostMessage = self.postMessage.bind(self);\n \n // 1.2 立即删除危险 API\n delete self.importScripts;\n delete self.fetch;\n delete self.XMLHttpRequest;\n delete self.WebSocket;\n \n // 1.3 冻结关键原型链(防止污染和篡改)\n Object.freeze(Object.prototype);\n Object.freeze(Array.prototype);\n Object.freeze(Function.prototype);\n Object.freeze(String.prototype);\n Object.freeze(Number.prototype);\n Object.freeze(Boolean.prototype);\n \n // ============================================\n // 阶段 2: 加载工具库\n // ============================================\n try {\n ${libraryLoadCode}\n } catch (error) {\n nativePostMessage({ \n initError: 'Failed to load utility library: ' + error.message \n });\n return;\n }\n \n // 验证库是否加载成功\n const utilityLib = self._;\n if (!utilityLib) {\n nativePostMessage({ \n initError: 'Builtin utility library (_ or R) not found after loading' \n });\n return;\n }\n \n // ============================================\n // 阶段 3: 创建安全上下文\n // ============================================\n const createSafeContext = (lib) => {\n const allowedGlobals = {\n // 工具库\n _: lib,\n R: lib,\n \n // 基础类型构造函数(只读)\n Array: Array,\n Object: Object,\n String: String,\n Number: Number,\n Boolean: Boolean,\n Date: Date,\n \n // 数学和工具\n Math: Math,\n JSON: JSON,\n \n // 类型检查\n parseInt: parseInt,\n parseFloat: parseFloat,\n isNaN: isNaN,\n isFinite: isFinite,\n \n // 错误类型(用于调试)\n Error: Error,\n TypeError: TypeError,\n RangeError: RangeError,\n \n // 只读的数据引用\n data: null,\n };\n \n // 使用 Proxy 严格控制访问\n return new Proxy(allowedGlobals, {\n get(target, prop) {\n if (prop === Symbol.unscopables) {\n return undefined;\n }\n \n if (prop in target) {\n return target[prop];\n }\n \n // 拒绝访问任何未定义的属性\n throw new ReferenceError(\n \\`'\\${String(prop)}' is not defined. \\\\n\\` +\n \\`Only these globals are available: \\${Object.keys(allowedGlobals).join(', ')}\\`\n );\n },\n \n set(target, prop, value) {\n // 只允许设置 data 属性(用于传递执行数据)\n if (prop === 'data') {\n target[prop] = value;\n return true;\n }\n \n // 拒绝设置其他属性\n throw new TypeError(\n \\`Cannot set property '\\${String(prop)}' on global context\\`\n );\n },\n \n has(target, prop) {\n return prop in target;\n },\n \n // 防止 getOwnPropertyDescriptor 等元编程操作\n getOwnPropertyDescriptor(target, prop) {\n if (prop in target) {\n return Object.getOwnPropertyDescriptor(target, prop);\n }\n return undefined;\n }\n });\n };\n \n const safeContext = createSafeContext(utilityLib);\n \n // ============================================\n // 阶段 4: 代码执行引擎\n // ============================================\n const executeUserCodeSafely = (code, data, timeout) => {\n // 设置超时保护(内层防御)\n let timeoutId = null;\n let isTimedOut = false;\n \n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n isTimedOut = true;\n }, timeout);\n }\n \n try {\n // 超时检查函数\n // ⚠️ 注意:这只能防御\"合作式\"的代码(包含 I/O、迭代、递归)\n // 对于纯计算死循环(while(true){}),只有外层 worker.terminate() 能终止\n const checkTimeout = () => {\n if (isTimedOut) {\n throw new Error(\\`Execution timeout (exceeded \\${timeout}ms)\\`);\n }\n };\n \n // 更新安全上下文中的数据\n safeContext.data = data;\n \n // 提取安全上下文的所有变量名和值\n const contextKeys = Object.keys(safeContext);\n const contextValues = contextKeys.map(key => safeContext[key]);\n \n // 显式遮蔽 Worker 全局对象中的危险变量(设为 undefined)\n const shadowedGlobals = [\n 'self', // Worker 全局对象本身\n 'postMessage', // 通信通道(防止滥用)\n 'close', // Worker 终止方法\n 'importScripts', // 动态加载脚本(已删除,但显式遮蔽更安全)\n 'addEventListener', // 事件监听器\n 'removeEventListener',\n 'dispatchEvent',\n 'onmessage', // 消息处理器\n 'onerror', // 错误处理器\n 'onmessageerror',\n 'setTimeout', // ⚠️ 遮蔽定时器,防止资源泄漏\n 'clearTimeout',\n 'setInterval', // ⚠️ 防止用户创建大量定时器\n 'clearInterval',\n ];\n \n // 包装用户代码:在严格模式下执行,通过参数注入变量\n const wrappedCode = \\`\n \"use strict\";\n // 用户代码在这里执行,可以直接访问注入的变量(_, R, data, Math, etc.)\n \\${code}\n \\`;\n \n // 创建函数:参数是上下文变量名 + checkTimeout + 遮蔽的全局变量名\n const userFunction = new Function(\n ...contextKeys, // 安全上下文变量\n 'checkTimeout', // 超时检查函数(用户可选调用)\n ...shadowedGlobals, // 显式遮蔽的危险全局变量\n wrappedCode\n );\n \n // 执行并获取结果\n const result = userFunction(\n ...contextValues, // 安全上下文的值\n checkTimeout, // 超时检查函数\n ...shadowedGlobals.map(() => undefined) // 所有危险全局变量设为 undefined\n );\n \n // 清除超时\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n \n // 验证返回值(只检查危险类型,不限制结构)\n const validateResultType = (result) => {\n const type = typeof result\n \n // 禁止返回函数、Symbol\n if (type === 'function' || type === 'symbol') {\n throw new TypeError(\n \\`Code must not return \\${type}. Returned types must be serializable.\\`\n );\n }\n \n // 禁止返回 Promise\n if (result && typeof result.then === 'function') {\n throw new TypeError(\n \\`Code must not return a Promise. Async operations are not allowed.\\`\n );\n }\n \n // 如果是数组,检查元素的危险类型\n if (Array.isArray(result)) {\n for (let i = 0; i < result.length; i++) {\n const item = result[i];\n const itemType = typeof item;\n \n if (itemType === 'function' || itemType === 'symbol') {\n throw new TypeError(\n \\`Array element at index \\${i} has forbidden type: \\${itemType}\\`\n );\n }\n \n if (item && typeof item.then === 'function') {\n throw new TypeError(\n \\`Array element at index \\${i} is a Promise. Async operations are not allowed.\\`\n );\n }\n }\n }\n };\n \n validateResultType(result);\n \n return result;\n \n } catch (error) {\n throw error;\n } finally {\n // 清理数据引用(防止内存泄漏)\n safeContext.data = null;\n }\n };\n \n // ============================================\n // 阶段 5: 消息处理\n // ============================================\n self.onmessage = function(event) {\n // ⚠️ 防御性检查:确保消息格式正确\n if (!event || !event.data) {\n nativePostMessage({ \n taskId: 'unknown',\n success: false,\n error: 'Invalid message format: event.data is null or undefined'\n });\n return;\n }\n \n const { code, data, timeout, taskId } = event.data;\n \n // 验证必需字段\n if (!taskId) {\n nativePostMessage({ \n taskId: 'unknown',\n success: false,\n error: 'Invalid message: taskId is required'\n });\n return;\n }\n \n try {\n const result = executeUserCodeSafely(code, data, timeout);\n \n nativePostMessage({ \n taskId,\n success: true,\n result: result \n });\n \n } catch (error) {\n nativePostMessage({ \n taskId,\n success: false,\n error: error.message || String(error),\n errorType: error.constructor.name\n });\n }\n };\n \n // 错误捕获\n self.onerror = function(event) {\n nativePostMessage({ \n globalError: event.message || 'Unknown worker error'\n });\n };\n \n // 发送初始化成功消息\n nativePostMessage({ initialized: true });\n \n })(); // 立即执行\n `\n\n const blob = new Blob([workerCode], { type: 'application/javascript' })\n const blobURL = URL.createObjectURL(blob)\n\n const worker = new Worker(blobURL)\n\n // Worker 构造函数同步加载脚本,立即回收 Blob URL 防止内存泄漏\n URL.revokeObjectURL(blobURL)\n\n // 等待初始化消息\n return new Promise<Worker>((resolve, reject) => {\n let isSettled = false\n\n const cleanup = () => {\n if (!isSettled) {\n isSettled = true\n worker.onmessage = null // ⚠️ 清理监听器防止内存泄漏\n worker.onerror = null\n }\n }\n\n const timeout = setTimeout(() => {\n cleanup()\n worker.terminate()\n reject(new Error('Worker initialization timeout'))\n }, 10000)\n\n worker.onmessage = (e) => {\n if (e.data.initialized) {\n clearTimeout(timeout)\n cleanup()\n resolve(worker)\n } else if (e.data.initError) {\n clearTimeout(timeout)\n cleanup()\n worker.terminate()\n reject(new Error(e.data.initError))\n }\n }\n\n worker.onerror = (errorEvent: ErrorEvent) => {\n clearTimeout(timeout)\n cleanup()\n worker.terminate()\n const errorMessage = errorEvent.message || errorEvent.error?.message || 'Unknown worker initialization error'\n reject(new Error(`Worker initialization failed: ${errorMessage}`))\n }\n })\n }\n\n async acquire(): Promise<Worker> {\n if (!this.isInitialized) {\n await this.initialize()\n }\n\n if (this.availableWorkers.length === 0) {\n // 创建临时 Worker 时需要等待初始化完成\n try {\n const tempWorker = await this.createSecureWorker()\n return tempWorker\n } catch (error) {\n throw new Error(`Failed to create temporary Worker: ${error instanceof Error ? error.message : String(error)}`)\n }\n }\n\n return this.availableWorkers.pop()!\n }\n\n release(worker: Worker): void {\n if (this.workers.includes(worker)) {\n this.availableWorkers.push(worker)\n } else {\n // 临时创建的 Worker,直接终止\n worker.terminate()\n }\n }\n\n terminate(): void {\n this.workers.forEach((worker) => worker.terminate())\n this.workers = []\n this.availableWorkers = []\n this.isInitialized = false\n }\n}\n\n// 全局 Worker 池实例\nlet globalWorkerPool: WorkerPool | null = null\n// 添加初始化锁,防止并发创建多个 pool\nlet poolInitPromise: Promise<WorkerPool> | null = null\n// Worker 池配置\nlet poolConfig = { poolSize: 2 }\n\n/**\n * 获取或创建全局 Worker 池(线程安全)\n */\nfunction getOrCreateWorkerPool(): Promise<WorkerPool> {\n if (globalWorkerPool) {\n return Promise.resolve(globalWorkerPool)\n }\n\n // 如果已经在初始化中,等待现有的初始化完成\n if (poolInitPromise) {\n return poolInitPromise\n }\n\n // 创建新的 pool 并初始化\n poolInitPromise = (async () => {\n try {\n const pool = new WorkerPool(poolConfig.poolSize)\n await pool.initialize()\n globalWorkerPool = pool\n return pool\n } catch (error) {\n // 重置 promise,允许下次重试\n poolInitPromise = null\n throw error\n }\n })()\n\n return poolInitPromise\n}\n\n/**\n * 初始化 Worker 池\n * @description 预热 Worker 实例,提升首次执行性能\n *\n * **⚠️ 注意:这是一个可选的性能优化方法**\n *\n * - **懒加载模式**:如果不调用此方法,Worker 池会在首次使用时自动初始化\n * - **推荐场景**:应用启动时预热,避免首次筛选时的冷启动延迟\n * - **配置选项**:\n * - `poolSize`: Worker 池大小(默认 2)\n *\n * @param options - 初始化选项\n * @param options.poolSize - Worker 池大小,默认为 2\n *\n * @example\n * ```typescript\n * // ✅ 推荐:应用启动时预热(可选)\n * import { initializeWorkerPool } from '@visactor/vseed'\n *\n * // 在 main.ts 或入口文件中\n * await initializeWorkerPool({ poolSize: 2 })\n *\n * // ✅ 也可以:不做任何事,让 Worker 池自动初始化\n * // 首次调用 dynamicFilter 时会自动创建\n * ```\n */\nexport async function initializeWorkerPool(\n options: {\n utilityLibUrl?: string\n utilityLibSource?: string\n poolSize?: number\n } = {},\n): Promise<void> {\n // 设置配置(必须在创建 pool 之前)\n poolConfig = {\n poolSize: options.poolSize ?? 2,\n }\n\n // 使用统一的 getOrCreateWorkerPool 确保状态一致\n await getOrCreateWorkerPool()\n}\n\n/**\n * 销毁 Worker 池\n * @description 终止所有 Worker 实例并清理全局状态\n *\n * **⚠️ 注意:大多数情况下不需要手动调用此方法**\n *\n * - **一般使用**:浏览器会在页面卸载时自动清理 Worker 资源\n * - **建议场景**:\n * - 单元测试的清理阶段(`afterAll` 钩子)\n * - 开发环境热重载时清理旧实例\n * - 动态卸载整个图表库模块(极少见)\n *\n * @example\n * ```typescript\n * // ✅ 推荐:测试环境\n * afterAll(() => {\n * terminateWorkerPool()\n * })\n *\n * // ❌ 不推荐:组件卸载时(Worker 池是全局的,其他组件可能还在使用)\n * onUnmounted(() => {\n * terminateWorkerPool() // 不要这样做!\n * })\n * ```\n */\nexport function terminateWorkerPool(): void {\n if (globalWorkerPool) {\n globalWorkerPool.terminate()\n globalWorkerPool = null\n }\n // 重置初始化 Promise,避免状态不一致\n poolInitPromise = null\n}\n\n/**\n * 增强的安全验证\n * @description 针对 AI 生成代码的特定模式检查\n */\nexport function validateCodeSafety(code: string): void {\n // 1. 基础检查\n if (!code || code.trim().length === 0) {\n throw new Error('Code cannot be empty')\n }\n\n if (code.length > 50000) {\n throw new Error('Code is too long (max 50KB)')\n }\n\n // 2. 必须包含 return\n if (!/\\breturn\\b/.test(code)) {\n throw new Error('Code must contain a return statement')\n }\n\n // 3. 增强的黑名单检查\n const forbiddenPatterns = [\n // 原有的基础黑名单\n { pattern: /\\beval\\b/gi, description: 'eval()' },\n { pattern: /\\bFunction\\s*\\(/gi, description: 'Function constructor' },\n { pattern: /\\bnew\\s+Function\\b/gi, description: 'new Function()' },\n { pattern: /\\bimportScripts\\b/gi, description: 'importScripts()' },\n { pattern: /\\bfetch\\b/gi, description: 'fetch()' },\n { pattern: /\\bXMLHttpRequest\\b/gi, description: 'XMLHttpRequest' },\n { pattern: /\\bWebSocket\\b/gi, description: 'WebSocket' },\n { pattern: /\\blocalStorage\\b/gi, description: 'localStorage' },\n { pattern: /\\bsessionStorage\\b/gi, description: 'sessionStorage' },\n { pattern: /\\bindexedDB\\b/gi, description: 'indexedDB' },\n { pattern: /\\bwindow\\b/gi, description: 'window' },\n { pattern: /\\bdocument\\b/gi, description: 'document' },\n { pattern: /\\bnavigator\\b/gi, description: 'navigator' },\n { pattern: /\\blocation\\b/gi, description: 'location' },\n { pattern: /\\brequire\\b/gi, description: 'require()' },\n { pattern: /\\bimport\\s+/gi, description: 'import statement' },\n { pattern: /\\bexport\\s+/gi, description: 'export statement' },\n\n // 增强:Constructor 访问(绕过检测的常见方式)\n { pattern: /\\bconstructor\\b/gi, description: 'constructor access' },\n { pattern: /\\[['\"]constructor['\"]\\]/gi, description: 'constructor via bracket notation' },\n { pattern: /\\['constructor'\\]/gi, description: 'constructor string access' },\n\n // 增强:原型链操作\n { pattern: /\\b__proto__\\b/gi, description: '__proto__' },\n { pattern: /\\bprototype\\b/gi, description: 'prototype manipulation' },\n { pattern: /Object\\.setPrototypeOf/gi, description: 'Object.setPrototypeOf()' },\n { pattern: /Object\\.getPrototypeOf/gi, description: 'Object.getPrototypeOf()' },\n { pattern: /Object\\.create\\s*\\(\\s*null\\s*\\)/gi, description: 'Object.create(null)' },\n\n // 增强:反射和元编程\n { pattern: /\\bReflect\\./gi, description: 'Reflect API' },\n { pattern: /\\bProxy\\b/gi, description: 'Proxy constructor' },\n\n // 增强:全局对象访问\n { pattern: /\\bglobal\\b/gi, description: 'global object' },\n { pattern: /\\bglobalThis\\b/gi, description: 'globalThis' },\n { pattern: /\\bself\\s*\\[/gi, description: 'self[] access' },\n { pattern: /\\bthis\\s*\\.\\s*constructor/gi, description: 'this.constructor' },\n\n // 增强:异步操作(容易被滥用)\n { pattern: /\\basync\\s+function/gi, description: 'async function' },\n { pattern: /\\bawait\\b/gi, description: 'await keyword' },\n { pattern: /\\bnew\\s+Promise\\b/gi, description: 'new Promise()' },\n { pattern: /\\.then\\s*\\(/gi, description: 'Promise.then()' },\n\n // 增强:生成器(可能导致难以控制的执行)\n { pattern: /\\bfunction\\s*\\*/gi, description: 'generator function' },\n { pattern: /\\byield\\b/gi, description: 'yield keyword' },\n\n // 增强:动态代码生成\n { pattern: /\\.apply\\s*\\(/gi, description: 'Function.apply()' },\n { pattern: /\\.call\\s*\\(/gi, description: 'Function.call()' },\n { pattern: /\\.bind\\s*\\(/gi, description: 'Function.bind()' },\n\n // 增强:Worker 相关\n { pattern: /\\bWorker\\b/gi, description: 'Worker constructor' },\n { pattern: /\\bSharedWorker\\b/gi, description: 'SharedWorker' },\n { pattern: /\\bServiceWorker\\b/gi, description: 'ServiceWorker' },\n ]\n\n for (const { pattern, description } of forbiddenPatterns) {\n if (pattern.test(code)) {\n throw new Error(\n `Security violation: Code contains forbidden pattern \"${description}\". ` +\n `For AI-generated code, please regenerate without this pattern.`,\n )\n }\n }\n\n // 4. 检查可疑的字符串拼接(用于绕过检测)\n const suspiciousPatterns = [\n /['\"]con['\"] *\\+ *['\"]structor['\"]/gi, // \"con\" + \"structor\"\n /['\"]ev['\"] *\\+ *['\"]al['\"]/gi, // \"ev\" + \"al\"\n /['\"]__pro['\"] *\\+ *['\"]to__['\"]/gi, // \"__pro\" + \"to__\"\n /\\b(self|window|global)\\s*\\[\\s*['\"][a-z]+['\"]\\s*\\+\\s*['\"][a-z]+['\"]\\s*\\]/gi, // self[\"x\" + \"y\"]\n ]\n\n for (const pattern of suspiciousPatterns) {\n if (pattern.test(code)) {\n throw new Error(\n 'Security violation: Code contains suspicious string concatenation that may bypass security checks.',\n )\n }\n }\n\n // 5. AI 代码特定检查\n // AI 生成的代码通常比较规范,不应该包含过于 tricky 的写法\n const aiCodeWarnings = [\n { pattern: /\\[['\"][a-z_$]+['\"]\\]/gi, count: 0, threshold: 10, description: 'excessive bracket notation' },\n { pattern: /\\s*\\+\\s*['\"]/gi, count: 0, threshold: 5, description: 'excessive string concatenation' },\n ]\n\n for (const warning of aiCodeWarnings) {\n const matches = code.match(warning.pattern)\n if (matches && matches.length > warning.threshold) {\n throw new Error(\n `Security warning: Code contains ${matches.length} instances of ${warning.description}, ` +\n `which is unusual for AI-generated code. Please regenerate.`,\n )\n }\n }\n}\n\n/**\n * 代码执行函数\n * @description 使用 Worker 池和增强安全检查\n */\nexport async function executeFilterCode(options: CodeExecutionOptions): Promise<CodeExecutionResult> {\n const { code, data, timeout = 2000 } = options\n\n // 1. 环境检查(返回失败结果而不是抛出异常)\n if (typeof Worker === 'undefined') {\n return {\n success: false,\n data: [],\n error: 'Web Worker is not supported in this environment',\n }\n }\n\n try {\n // 2. 增强的安全验证\n validateCodeSafety(code)\n\n // 3. 验证输入数据\n if (!Array.isArray(data)) {\n throw new Error('Input data must be an array')\n }\n\n // 数据大小限制(防止 OOM)\n if (data.length > 100000) {\n console.warn(`[vseed] Large dataset detected: ${data.length} items. Consider pagination for better performance.`)\n }\n\n // ⚠️ 数据内存大小估算(粗略)\n const dataSize = JSON.stringify(data).length\n if (dataSize > 10 * 1024 * 1024) {\n // 10MB\n throw new Error(`Input data is too large (${(dataSize / 1024 / 1024).toFixed(1)}MB). Maximum allowed is 10MB.`)\n }\n\n // 4. 初始化或获取 Worker 池(线程安全)\n const pool = await getOrCreateWorkerPool()\n const worker = await pool.acquire()\n const taskId = `task_${Date.now()}_${Math.random().toString(36).substring(7)}`\n\n // 标记 Worker 是否应该被归还到池中(超时/错误时应该终止而不是归还)\n let shouldReleaseWorker = true\n\n try {\n const result = await new Promise<any[]>((resolve, reject) => {\n // 使用 AbortController 和 cleanup 确保监听器总是被清理\n let isSettled = false\n const cleanup = () => {\n if (!isSettled) {\n isSettled = true\n worker.removeEventListener('message', messageHandler)\n worker.removeEventListener('error', errorHandler)\n }\n }\n\n // 外层超时保护(比内层多 1 秒)\n const outerTimeoutId = setTimeout(() => {\n cleanup()\n shouldReleaseWorker = false // ⚠️ 超时时不归还 Worker\n worker.terminate() // ⚠️ 立即终止 Worker,防止继续消耗 CPU\n reject(new Error(`Execution timeout (exceeded ${timeout}ms) - outer guard`))\n }, timeout + 1000)\n\n // 消息处理\n const messageHandler = (e: MessageEvent) => {\n if (e.data.taskId !== taskId) return\n\n clearTimeout(outerTimeoutId)\n cleanup()\n\n if (e.data.success) {\n resolve(e.data.result)\n } else {\n reject(new Error(`Execution failed: ${e.data.error}${e.data.errorType ? ` (${e.data.errorType})` : ''}`))\n }\n }\n\n // 错误处理\n const errorHandler = (errorEvent: ErrorEvent) => {\n clearTimeout(outerTimeoutId)\n cleanup()\n shouldReleaseWorker = false // ⚠️ Worker 内部错误,不归还\n worker.terminate() // ⚠️ 终止异常的 Worker\n // ✅ 正确提取 ErrorEvent 中的错误信息\n const errorMessage = errorEvent.message || errorEvent.error?.message || 'Unknown worker error'\n reject(new Error(`Worker error: ${errorMessage}`))\n }\n\n worker.addEventListener('message', messageHandler)\n worker.addEventListener('error', errorHandler)\n\n worker.postMessage({\n taskId,\n code,\n data,\n timeout,\n })\n })\n\n return {\n success: true,\n data: result,\n }\n } finally {\n // 只有在正常完成时才归还 Worker\n // 超时或错误时 Worker 已被 terminate(),不应该归还到池中\n if (shouldReleaseWorker && globalWorkerPool) {\n globalWorkerPool.release(worker)\n }\n }\n } catch (error) {\n return {\n success: false,\n data: [],\n error: error instanceof Error ? error.message : String(error),\n }\n }\n}\n"],"names":["WorkerPool","maxSize","i","worker","error","w","Error","String","libraryLoadCode","BUILTIN_UTILS_SOURCE","workerCode","blob","Blob","blobURL","URL","Worker","Promise","resolve","reject","isSettled","cleanup","timeout","setTimeout","e","clearTimeout","errorEvent","errorMessage","tempWorker","globalWorkerPool","poolInitPromise","poolConfig","getOrCreateWorkerPool","pool","initializeWorkerPool","options","terminateWorkerPool","validateCodeSafety","code","forbiddenPatterns","pattern","description","suspiciousPatterns","aiCodeWarnings","warning","matches","executeFilterCode","data","Array","console","dataSize","JSON","taskId","Date","Math","shouldReleaseWorker","result","messageHandler","errorHandler","outerTimeoutId"],"mappings":";AAcA,MAAMA;IACI,UAAoB,EAAE;IACtB,mBAA6B,EAAE;IACtB,QAAe;IACxB,gBAAgB,MAAK;IAE7B,YAAYC,UAAU,CAAC,CAAE;QACvB,IAAI,CAAC,OAAO,GAAGA;IACjB;IAEA,MAAM,aAA4B;QAChC,IAAI,IAAI,CAAC,aAAa,EAAE;QAExB,IAAK,IAAIC,IAAI,GAAGA,IAAI,IAAI,CAAC,OAAO,EAAEA,IAChC,IAAI;YACF,MAAMC,SAAS,MAAM,IAAI,CAAC,kBAAkB;YAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAACA;YAClB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAACA;QAC7B,EAAE,OAAOC,OAAO;YAEd,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAACC,IAAMA,EAAE,SAAS;YACvC,IAAI,CAAC,OAAO,GAAG,EAAE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AC,cAAc,EAAEoB,cAAc;gBAClD;gBAEAvB,OAAO,gBAAgB,CAAC,WAAWqD;gBACnCrD,OAAO,gBAAgB,CAAC,SAASsD;gBAEjCtD,OAAO,WAAW,CAAC;oBACjBgD;oBACAd;oBACAS;oBACAzB;gBACF;YACF;YAEA,OAAO;gBACL,SAAS;gBACT,MAAMkC;YACR;QACF,SAAU;YAGR,IAAID,uBAAuB1B,kBACzBA,iBAAiB,OAAO,CAACzB;QAE7B;IACF,EAAE,OAAOC,OAAO;QACd,OAAO;YACL,SAAS;YACT,MAAM,EAAE;YACR,OAAOA,iBAAiBE,QAAQF,MAAM,OAAO,GAAGG,OAAOH;QACzD;IACF;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 安全代码执行器
|
|
3
|
+
* @description 在 Web Worker 沙箱中安全执行动态筛选代码
|
|
4
|
+
* @module secureCodeExecutor
|
|
5
|
+
*/
|
|
6
|
+
export { executeFilterCode, validateCodeSafety, initializeWorkerPool, terminateWorkerPool } from './execute';
|
|
7
|
+
export { BUILTIN_UTILS_SOURCE, HAS_BUILTIN_UTILS } from './builtin-utils';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { executeFilterCode, initializeWorkerPool, terminateWorkerPool, validateCodeSafety } from "./execute.js";
|
|
2
|
+
import { BUILTIN_UTILS_SOURCE, HAS_BUILTIN_UTILS } from "./builtin-utils.js";
|
|
3
|
+
export { BUILTIN_UTILS_SOURCE, HAS_BUILTIN_UTILS, executeFilterCode, initializeWorkerPool, terminateWorkerPool, validateCodeSafety };
|
|
@@ -14,6 +14,8 @@ import { getHistogramTheme } from "./histogram.js";
|
|
|
14
14
|
import { getBoxPlotTheme } from "./boxPlot.js";
|
|
15
15
|
import { getCirclePackingTheme, getSunburstTheme, getTreeMapTheme } from "./hierarchy.js";
|
|
16
16
|
import { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from "./race.js";
|
|
17
|
+
import { getRaceLineTheme } from "./raceLine.js";
|
|
18
|
+
import { getRaceDonutTheme, getRacePieTheme } from "./racePie.js";
|
|
17
19
|
const darkTheme = ()=>{
|
|
18
20
|
const tableConfig = getDarkTableConfig();
|
|
19
21
|
return {
|
|
@@ -36,16 +38,19 @@ const darkTheme = ()=>{
|
|
|
36
38
|
radar: getRadarTheme(),
|
|
37
39
|
rose: getRoseTheme(),
|
|
38
40
|
roseParallel: getRoseParallelTheme(),
|
|
39
|
-
funnel: getFunnelTheme(),
|
|
40
|
-
heatmap: getHeatmapTheme(),
|
|
41
|
-
histogram: getHistogramTheme(),
|
|
42
|
-
boxPlot: getBoxPlotTheme(),
|
|
43
41
|
treeMap: getTreeMapTheme(),
|
|
44
42
|
sunburst: getSunburstTheme(),
|
|
45
43
|
circlePacking: getCirclePackingTheme(),
|
|
46
44
|
raceBar: getRaceBarTheme(),
|
|
47
45
|
raceColumn: getRaceColumnTheme(),
|
|
48
|
-
raceScatter: getRaceScatterTheme()
|
|
46
|
+
raceScatter: getRaceScatterTheme(),
|
|
47
|
+
raceLine: getRaceLineTheme(),
|
|
48
|
+
racePie: getRacePieTheme(),
|
|
49
|
+
raceDonut: getRaceDonutTheme(),
|
|
50
|
+
funnel: getFunnelTheme(),
|
|
51
|
+
heatmap: getHeatmapTheme(),
|
|
52
|
+
histogram: getHistogramTheme(),
|
|
53
|
+
boxPlot: getBoxPlotTheme()
|
|
49
54
|
}
|
|
50
55
|
};
|
|
51
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig } from 'src/types'\nimport { getDarkTableConfig } from '../common'\n\nimport { getLineTheme } from './line'\nimport { getColumnTheme, getColumnParallelTheme, getColumnPercentTheme } from './column'\nimport { getBarTheme, getBarParallelTheme, getBarPercentTheme } from './bar'\nimport { getAreaTheme, getAreaPercentTheme } from './area'\nimport { getScatterTheme } from './scatter'\nimport { getDualAxisTheme } from './dualAxis'\nimport { getPieTheme, getDonutTheme } from './pie'\nimport { getRadarTheme } from './radar'\nimport { getRoseTheme, getRoseParallelTheme } from './rose'\nimport { getFunnelTheme } from './funnel'\nimport { getHeatmapTheme } from './heatmap'\nimport { getHistogramTheme } from './histogram'\nimport { getBoxPlotTheme } from './boxPlot'\nimport { getTreeMapTheme, getSunburstTheme, getCirclePackingTheme } from './hierarchy'\nimport { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from './race'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: getLineTheme(),\n column: getColumnTheme(),\n columnParallel: getColumnParallelTheme(),\n columnPercent: getColumnPercentTheme(),\n bar: getBarTheme(),\n barParallel: getBarParallelTheme(),\n barPercent: getBarPercentTheme(),\n area: getAreaTheme(),\n areaPercent: getAreaPercentTheme(),\n scatter: getScatterTheme(),\n dualAxis: getDualAxisTheme(),\n\n // polar\n pie: getPieTheme(),\n donut: getDonutTheme(),\n radar: getRadarTheme(),\n rose: getRoseTheme(),\n roseParallel: getRoseParallelTheme(),\n\n //
|
|
1
|
+
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig } from 'src/types'\nimport { getDarkTableConfig } from '../common'\n\nimport { getLineTheme } from './line'\nimport { getColumnTheme, getColumnParallelTheme, getColumnPercentTheme } from './column'\nimport { getBarTheme, getBarParallelTheme, getBarPercentTheme } from './bar'\nimport { getAreaTheme, getAreaPercentTheme } from './area'\nimport { getScatterTheme } from './scatter'\nimport { getDualAxisTheme } from './dualAxis'\nimport { getPieTheme, getDonutTheme } from './pie'\nimport { getRadarTheme } from './radar'\nimport { getRoseTheme, getRoseParallelTheme } from './rose'\nimport { getFunnelTheme } from './funnel'\nimport { getHeatmapTheme } from './heatmap'\nimport { getHistogramTheme } from './histogram'\nimport { getBoxPlotTheme } from './boxPlot'\nimport { getTreeMapTheme, getSunburstTheme, getCirclePackingTheme } from './hierarchy'\nimport { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from './race'\nimport { getRaceLineTheme } from './raceLine'\nimport { getRacePieTheme, getRaceDonutTheme } from './racePie'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: getLineTheme(),\n column: getColumnTheme(),\n columnParallel: getColumnParallelTheme(),\n columnPercent: getColumnPercentTheme(),\n bar: getBarTheme(),\n barParallel: getBarParallelTheme(),\n barPercent: getBarPercentTheme(),\n area: getAreaTheme(),\n areaPercent: getAreaPercentTheme(),\n scatter: getScatterTheme(),\n dualAxis: getDualAxisTheme(),\n\n // polar\n pie: getPieTheme(),\n donut: getDonutTheme(),\n radar: getRadarTheme(),\n rose: getRoseTheme(),\n roseParallel: getRoseParallelTheme(),\n\n // hierarchy\n treeMap: getTreeMapTheme(),\n sunburst: getSunburstTheme(),\n circlePacking: getCirclePackingTheme(),\n\n // race\n raceBar: getRaceBarTheme(),\n raceColumn: getRaceColumnTheme(),\n raceScatter: getRaceScatterTheme(),\n raceLine: getRaceLineTheme(),\n racePie: getRacePieTheme(),\n raceDonut: getRaceDonutTheme(),\n\n // other\n funnel: getFunnelTheme(),\n heatmap: getHeatmapTheme(),\n histogram: getHistogramTheme(),\n boxPlot: getBoxPlotTheme(),\n },\n }\n}\n"],"names":["darkTheme","tableConfig","getDarkTableConfig","getLineTheme","getColumnTheme","getColumnParallelTheme","getColumnPercentTheme","getBarTheme","getBarParallelTheme","getBarPercentTheme","getAreaTheme","getAreaPercentTheme","getScatterTheme","getDualAxisTheme","getPieTheme","getDonutTheme","getRadarTheme","getRoseTheme","getRoseParallelTheme","getTreeMapTheme","getSunburstTheme","getCirclePackingTheme","getRaceBarTheme","getRaceColumnTheme","getRaceScatterTheme","getRaceLineTheme","getRacePieTheme","getRaceDonutTheme","getFunnelTheme","getHeatmapTheme","getHistogramTheme","getBoxPlotTheme"],"mappings":";;;;;;;;;;;;;;;;;;AAqBO,MAAMA,YAAY;IACvB,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YACN,OAAOD;YACP,YAAYA;YAGZ,MAAME;YACN,QAAQC;YACR,gBAAgBC;YAChB,eAAeC;YACf,KAAKC;YACL,aAAaC;YACb,YAAYC;YACZ,MAAMC;YACN,aAAaC;YACb,SAASC;YACT,UAAUC;YAGV,KAAKC;YACL,OAAOC;YACP,OAAOC;YACP,MAAMC;YACN,cAAcC;YAGd,SAASC;YACT,UAAUC;YACV,eAAeC;YAGf,SAASC;YACT,YAAYC;YACZ,aAAaC;YACb,UAAUC;YACV,SAASC;YACT,WAAWC;YAGX,QAAQC;YACR,SAASC;YACT,WAAWC;YACX,SAASC;QACX;IACF;AACF"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { Player } from '../../types';
|
|
2
|
+
export declare const getRaceLineTheme: () => {
|
|
3
|
+
legend: {
|
|
4
|
+
enable: boolean;
|
|
5
|
+
border?: boolean;
|
|
6
|
+
labelColor?: string;
|
|
7
|
+
pagerIconColor?: string;
|
|
8
|
+
pagerIconDisableColor?: string;
|
|
9
|
+
labelFontSize?: number;
|
|
10
|
+
labelFontColor?: string;
|
|
11
|
+
labelFontWeight?: number | string;
|
|
12
|
+
shapeType?: "circle" | "cross" | "diamond" | "square" | "arrow" | "arrow2Left" | "arrow2Right" | "wedge" | "thinTriangle" | "triangle" | "triangleUp" | "triangleDown" | "triangleRight" | "triangleLeft" | "stroke" | "star" | "wye" | "rect" | "arrowLeft" | "arrowRight" | "rectRound" | "roundLine";
|
|
13
|
+
position?: "left" | "leftTop" | "leftBottom" | "lt" | "lb" | "top" | "topLeft" | "topRight" | "tl" | "tr" | "right" | "rightTop" | "rightBottom" | "rt" | "rb" | "bottom" | "bottomLeft" | "bottomRight" | "bl" | "br";
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
};
|
|
16
|
+
xAxis: {
|
|
17
|
+
animation: {
|
|
18
|
+
duration: number | undefined;
|
|
19
|
+
};
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
inverse?: boolean;
|
|
22
|
+
zero?: boolean;
|
|
23
|
+
labelAutoHide?: boolean;
|
|
24
|
+
labelAutoHideGap?: number;
|
|
25
|
+
labelAutoRotate?: boolean;
|
|
26
|
+
labelAutoRotateAngleRange?: number[];
|
|
27
|
+
labelAutoLimit?: boolean;
|
|
28
|
+
labelAutoLimitLength?: number;
|
|
29
|
+
label?: {
|
|
30
|
+
visible?: boolean;
|
|
31
|
+
labelColor?: string;
|
|
32
|
+
labelFontSize?: number;
|
|
33
|
+
labelFontWeight?: number;
|
|
34
|
+
labelAngle?: number;
|
|
35
|
+
};
|
|
36
|
+
line?: {
|
|
37
|
+
visible?: boolean;
|
|
38
|
+
lineColor?: string;
|
|
39
|
+
lineWidth?: number;
|
|
40
|
+
};
|
|
41
|
+
tick?: {
|
|
42
|
+
visible?: boolean;
|
|
43
|
+
tickInside?: boolean;
|
|
44
|
+
tickColor?: string;
|
|
45
|
+
tickSize?: number;
|
|
46
|
+
};
|
|
47
|
+
title?: {
|
|
48
|
+
visible?: boolean;
|
|
49
|
+
titleText?: string;
|
|
50
|
+
titleColor?: string;
|
|
51
|
+
titleFontSize?: number;
|
|
52
|
+
titleFontWeight?: number;
|
|
53
|
+
};
|
|
54
|
+
grid?: {
|
|
55
|
+
visible?: boolean;
|
|
56
|
+
gridColor?: string;
|
|
57
|
+
gridWidth?: number;
|
|
58
|
+
gridLineDash?: number[];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
label: {
|
|
62
|
+
enable: boolean;
|
|
63
|
+
labelStroke: string;
|
|
64
|
+
wrap: boolean;
|
|
65
|
+
showValue: boolean;
|
|
66
|
+
showValuePercent: boolean;
|
|
67
|
+
labelColorSmartInvert: boolean;
|
|
68
|
+
labelOverlap: boolean;
|
|
69
|
+
};
|
|
70
|
+
yAxis: {
|
|
71
|
+
max: boolean;
|
|
72
|
+
animation: {
|
|
73
|
+
duration: number | undefined;
|
|
74
|
+
easing: string;
|
|
75
|
+
};
|
|
76
|
+
nice: boolean;
|
|
77
|
+
visible?: boolean;
|
|
78
|
+
min?: number;
|
|
79
|
+
log?: boolean;
|
|
80
|
+
logBase?: number;
|
|
81
|
+
inverse?: boolean;
|
|
82
|
+
zero?: boolean;
|
|
83
|
+
autoFormat?: boolean;
|
|
84
|
+
numFormat?: import("../../types").NumFormat;
|
|
85
|
+
label?: {
|
|
86
|
+
visible?: boolean;
|
|
87
|
+
labelColor?: string;
|
|
88
|
+
labelFontSize?: number;
|
|
89
|
+
labelFontWeight?: number;
|
|
90
|
+
labelAngle?: number;
|
|
91
|
+
};
|
|
92
|
+
line?: {
|
|
93
|
+
visible?: boolean;
|
|
94
|
+
lineColor?: string;
|
|
95
|
+
lineWidth?: number;
|
|
96
|
+
};
|
|
97
|
+
tick?: {
|
|
98
|
+
visible?: boolean;
|
|
99
|
+
tickInside?: boolean;
|
|
100
|
+
tickColor?: string;
|
|
101
|
+
tickSize?: number;
|
|
102
|
+
};
|
|
103
|
+
title?: {
|
|
104
|
+
visible?: boolean;
|
|
105
|
+
titleText?: string;
|
|
106
|
+
titleColor?: string;
|
|
107
|
+
titleFontSize?: number;
|
|
108
|
+
titleFontWeight?: number;
|
|
109
|
+
};
|
|
110
|
+
grid?: {
|
|
111
|
+
visible?: boolean;
|
|
112
|
+
gridColor?: string;
|
|
113
|
+
gridWidth?: number;
|
|
114
|
+
gridLineDash?: number[];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
player: Player;
|
|
118
|
+
crosshairLine: {
|
|
119
|
+
visible: boolean;
|
|
120
|
+
labelVisible: boolean;
|
|
121
|
+
labelColor: string;
|
|
122
|
+
labelBackgroundColor: string;
|
|
123
|
+
lineColor: string;
|
|
124
|
+
};
|
|
125
|
+
pivotGrid: {
|
|
126
|
+
borderColor?: string | null | undefined;
|
|
127
|
+
bodyFontColor?: string | null | undefined;
|
|
128
|
+
headerFontColor?: string | null | undefined;
|
|
129
|
+
headerBackgroundColor?: string | null | undefined;
|
|
130
|
+
hoverHeaderBackgroundColor?: string | null | undefined;
|
|
131
|
+
hoverHeaderInlineBackgroundColor?: string | null | undefined;
|
|
132
|
+
outlineBorderLineWidth?: number | null | undefined;
|
|
133
|
+
frameCornerRadius?: number | null | undefined;
|
|
134
|
+
minChartWidth?: number | null | undefined;
|
|
135
|
+
minChartHeight?: number | null | undefined;
|
|
136
|
+
titleFontColor?: string | null | undefined;
|
|
137
|
+
titleFontSize?: number | null | undefined;
|
|
138
|
+
titleFontWeight?: string | null | undefined;
|
|
139
|
+
chartGridColor?: string | null | undefined;
|
|
140
|
+
axisLabelColor?: string | null | undefined;
|
|
141
|
+
};
|
|
142
|
+
annotation: {
|
|
143
|
+
annotationPoint: import("../../types").AnnotationPointConfig;
|
|
144
|
+
annotationHorizontalLine: import("../../types").AnnotationHorizontalLineConfig;
|
|
145
|
+
annotationVerticalLine: import("../../types").AnnotationHorizontalLineConfig;
|
|
146
|
+
annotationArea: import("../../types").AnnotationAreaConfig;
|
|
147
|
+
};
|
|
148
|
+
backgroundColor: string;
|
|
149
|
+
color: {
|
|
150
|
+
linearColorScheme: string[];
|
|
151
|
+
colorScheme: string[];
|
|
152
|
+
positiveColor: string;
|
|
153
|
+
negativeColor: string;
|
|
154
|
+
};
|
|
155
|
+
tooltip: {
|
|
156
|
+
enable?: boolean | null | undefined;
|
|
157
|
+
borderColor?: string | null | undefined;
|
|
158
|
+
borderWidth?: number | null | undefined;
|
|
159
|
+
borderRadius?: number | null | undefined;
|
|
160
|
+
padding?: number | number[] | null | undefined;
|
|
161
|
+
backgroundColor?: string | null | undefined;
|
|
162
|
+
lineHeight?: number | null | undefined;
|
|
163
|
+
fontSize?: number | null | undefined;
|
|
164
|
+
lineSpace?: number | null | undefined;
|
|
165
|
+
keyColor?: string | null | undefined;
|
|
166
|
+
valueColor?: string | null | undefined;
|
|
167
|
+
titleColor?: string | null | undefined;
|
|
168
|
+
};
|
|
169
|
+
brush: {
|
|
170
|
+
enable: boolean;
|
|
171
|
+
inBrushStyle?: {
|
|
172
|
+
opacity?: number | undefined;
|
|
173
|
+
stroke?: string | undefined;
|
|
174
|
+
lineWidth?: number | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
outOfBrushStyle?: {
|
|
177
|
+
opacity?: number | undefined;
|
|
178
|
+
stroke?: string | undefined;
|
|
179
|
+
lineWidth?: number | undefined;
|
|
180
|
+
} | undefined;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getLineTheme } from "./line.js";
|
|
2
|
+
import { getDarkPlayer } from "../common/index.js";
|
|
3
|
+
const getRaceLineTheme = ()=>{
|
|
4
|
+
const lineTheme = getLineTheme();
|
|
5
|
+
const player = getDarkPlayer();
|
|
6
|
+
return {
|
|
7
|
+
...lineTheme,
|
|
8
|
+
legend: {
|
|
9
|
+
...lineTheme.legend,
|
|
10
|
+
enable: false
|
|
11
|
+
},
|
|
12
|
+
xAxis: {
|
|
13
|
+
...lineTheme.xAxis,
|
|
14
|
+
animation: {
|
|
15
|
+
duration: player.interval
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
...lineTheme.label,
|
|
20
|
+
enable: false
|
|
21
|
+
},
|
|
22
|
+
yAxis: {
|
|
23
|
+
...lineTheme.yAxis,
|
|
24
|
+
max: true,
|
|
25
|
+
animation: {
|
|
26
|
+
duration: player.interval,
|
|
27
|
+
easing: 'linear'
|
|
28
|
+
},
|
|
29
|
+
nice: true
|
|
30
|
+
},
|
|
31
|
+
player: {
|
|
32
|
+
...player,
|
|
33
|
+
maxCount: false
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export { getRaceLineTheme };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=raceLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme/dark/raceLine.js","sources":["webpack://@visactor/vseed/./src/theme/dark/raceLine.ts"],"sourcesContent":["import type { Player } from 'src/types'\nimport { getLineTheme } from './line'\nimport { getDarkPlayer } from '../common'\n\nexport const getRaceLineTheme = () => {\n const lineTheme = getLineTheme()\n const player = getDarkPlayer() as Player\n\n return {\n ...lineTheme,\n legend: {\n ...lineTheme.legend,\n enable: false,\n },\n xAxis: {\n ...lineTheme.xAxis,\n animation: {\n duration: player.interval,\n },\n },\n label: {\n ...lineTheme.label,\n enable: false,\n },\n yAxis: {\n ...lineTheme.yAxis,\n max: true,\n animation: {\n duration: player.interval,\n easing: 'linear',\n },\n nice: true,\n },\n player: {\n ...player,\n maxCount: false as const,\n } as Player,\n }\n}\n"],"names":["getRaceLineTheme","lineTheme","getLineTheme","player","getDarkPlayer"],"mappings":";;AAIO,MAAMA,mBAAmB;IAC9B,MAAMC,YAAYC;IAClB,MAAMC,SAASC;IAEf,OAAO;QACL,GAAGH,SAAS;QACZ,QAAQ;YACN,GAAGA,UAAU,MAAM;YACnB,QAAQ;QACV;QACA,OAAO;YACL,GAAGA,UAAU,KAAK;YAClB,WAAW;gBACT,UAAUE,OAAO,QAAQ;YAC3B;QACF;QACA,OAAO;YACL,GAAGF,UAAU,KAAK;YAClB,QAAQ;QACV;QACA,OAAO;YACL,GAAGA,UAAU,KAAK;YAClB,KAAK;YACL,WAAW;gBACT,UAAUE,OAAO,QAAQ;gBACzB,QAAQ;YACV;YACA,MAAM;QACR;QACA,QAAQ;YACN,GAAGA,MAAM;YACT,UAAU;QACZ;IACF;AACF"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { Player } from '../../types';
|
|
2
|
+
export declare const getRacePieTheme: () => {
|
|
3
|
+
legend: {
|
|
4
|
+
enable: boolean;
|
|
5
|
+
border?: boolean;
|
|
6
|
+
labelColor?: string;
|
|
7
|
+
pagerIconColor?: string;
|
|
8
|
+
pagerIconDisableColor?: string;
|
|
9
|
+
labelFontSize?: number;
|
|
10
|
+
labelFontColor?: string;
|
|
11
|
+
labelFontWeight?: number | string;
|
|
12
|
+
shapeType?: "circle" | "cross" | "diamond" | "square" | "arrow" | "arrow2Left" | "arrow2Right" | "wedge" | "thinTriangle" | "triangle" | "triangleUp" | "triangleDown" | "triangleRight" | "triangleLeft" | "stroke" | "star" | "wye" | "rect" | "arrowLeft" | "arrowRight" | "rectRound" | "roundLine";
|
|
13
|
+
position?: "left" | "leftTop" | "leftBottom" | "lt" | "lb" | "top" | "topLeft" | "topRight" | "tl" | "tr" | "right" | "rightTop" | "rightBottom" | "rt" | "rb" | "bottom" | "bottomLeft" | "bottomRight" | "bl" | "br";
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
};
|
|
16
|
+
player: Player;
|
|
17
|
+
label: {
|
|
18
|
+
showValuePercent: boolean;
|
|
19
|
+
labelLayout: "arc";
|
|
20
|
+
showDimension: boolean;
|
|
21
|
+
labelStroke: string;
|
|
22
|
+
enable: boolean;
|
|
23
|
+
wrap: boolean;
|
|
24
|
+
showValue: boolean;
|
|
25
|
+
labelColorSmartInvert: boolean;
|
|
26
|
+
labelOverlap: boolean;
|
|
27
|
+
};
|
|
28
|
+
pivotGrid: {
|
|
29
|
+
borderColor?: string | null | undefined;
|
|
30
|
+
bodyFontColor?: string | null | undefined;
|
|
31
|
+
headerFontColor?: string | null | undefined;
|
|
32
|
+
headerBackgroundColor?: string | null | undefined;
|
|
33
|
+
hoverHeaderBackgroundColor?: string | null | undefined;
|
|
34
|
+
hoverHeaderInlineBackgroundColor?: string | null | undefined;
|
|
35
|
+
outlineBorderLineWidth?: number | null | undefined;
|
|
36
|
+
frameCornerRadius?: number | null | undefined;
|
|
37
|
+
minChartWidth?: number | null | undefined;
|
|
38
|
+
minChartHeight?: number | null | undefined;
|
|
39
|
+
titleFontColor?: string | null | undefined;
|
|
40
|
+
titleFontSize?: number | null | undefined;
|
|
41
|
+
titleFontWeight?: string | null | undefined;
|
|
42
|
+
chartGridColor?: string | null | undefined;
|
|
43
|
+
axisLabelColor?: string | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
color: {
|
|
47
|
+
linearColorScheme: string[];
|
|
48
|
+
colorScheme: string[];
|
|
49
|
+
positiveColor: string;
|
|
50
|
+
negativeColor: string;
|
|
51
|
+
};
|
|
52
|
+
tooltip: {
|
|
53
|
+
enable?: boolean | null | undefined;
|
|
54
|
+
borderColor?: string | null | undefined;
|
|
55
|
+
borderWidth?: number | null | undefined;
|
|
56
|
+
borderRadius?: number | null | undefined;
|
|
57
|
+
padding?: number | number[] | null | undefined;
|
|
58
|
+
backgroundColor?: string | null | undefined;
|
|
59
|
+
lineHeight?: number | null | undefined;
|
|
60
|
+
fontSize?: number | null | undefined;
|
|
61
|
+
lineSpace?: number | null | undefined;
|
|
62
|
+
keyColor?: string | null | undefined;
|
|
63
|
+
valueColor?: string | null | undefined;
|
|
64
|
+
titleColor?: string | null | undefined;
|
|
65
|
+
};
|
|
66
|
+
brush: {
|
|
67
|
+
enable: boolean;
|
|
68
|
+
inBrushStyle?: {
|
|
69
|
+
opacity?: number | undefined;
|
|
70
|
+
stroke?: string | undefined;
|
|
71
|
+
lineWidth?: number | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
outOfBrushStyle?: {
|
|
74
|
+
opacity?: number | undefined;
|
|
75
|
+
stroke?: string | undefined;
|
|
76
|
+
lineWidth?: number | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare const getRaceDonutTheme: () => {
|
|
81
|
+
legend: {
|
|
82
|
+
enable: boolean;
|
|
83
|
+
border?: boolean;
|
|
84
|
+
labelColor?: string;
|
|
85
|
+
pagerIconColor?: string;
|
|
86
|
+
pagerIconDisableColor?: string;
|
|
87
|
+
labelFontSize?: number;
|
|
88
|
+
labelFontColor?: string;
|
|
89
|
+
labelFontWeight?: number | string;
|
|
90
|
+
shapeType?: "circle" | "cross" | "diamond" | "square" | "arrow" | "arrow2Left" | "arrow2Right" | "wedge" | "thinTriangle" | "triangle" | "triangleUp" | "triangleDown" | "triangleRight" | "triangleLeft" | "stroke" | "star" | "wye" | "rect" | "arrowLeft" | "arrowRight" | "rectRound" | "roundLine";
|
|
91
|
+
position?: "left" | "leftTop" | "leftBottom" | "lt" | "lb" | "top" | "topLeft" | "topRight" | "tl" | "tr" | "right" | "rightTop" | "rightBottom" | "rt" | "rb" | "bottom" | "bottomLeft" | "bottomRight" | "bl" | "br";
|
|
92
|
+
maxSize?: number;
|
|
93
|
+
};
|
|
94
|
+
player: Player;
|
|
95
|
+
label: {
|
|
96
|
+
showValuePercent: boolean;
|
|
97
|
+
labelLayout: "arc";
|
|
98
|
+
showDimension: boolean;
|
|
99
|
+
labelStroke: string;
|
|
100
|
+
enable: boolean;
|
|
101
|
+
wrap: boolean;
|
|
102
|
+
showValue: boolean;
|
|
103
|
+
labelColorSmartInvert: boolean;
|
|
104
|
+
labelOverlap: boolean;
|
|
105
|
+
};
|
|
106
|
+
pivotGrid: {
|
|
107
|
+
borderColor?: string | null | undefined;
|
|
108
|
+
bodyFontColor?: string | null | undefined;
|
|
109
|
+
headerFontColor?: string | null | undefined;
|
|
110
|
+
headerBackgroundColor?: string | null | undefined;
|
|
111
|
+
hoverHeaderBackgroundColor?: string | null | undefined;
|
|
112
|
+
hoverHeaderInlineBackgroundColor?: string | null | undefined;
|
|
113
|
+
outlineBorderLineWidth?: number | null | undefined;
|
|
114
|
+
frameCornerRadius?: number | null | undefined;
|
|
115
|
+
minChartWidth?: number | null | undefined;
|
|
116
|
+
minChartHeight?: number | null | undefined;
|
|
117
|
+
titleFontColor?: string | null | undefined;
|
|
118
|
+
titleFontSize?: number | null | undefined;
|
|
119
|
+
titleFontWeight?: string | null | undefined;
|
|
120
|
+
chartGridColor?: string | null | undefined;
|
|
121
|
+
axisLabelColor?: string | null | undefined;
|
|
122
|
+
};
|
|
123
|
+
backgroundColor: string;
|
|
124
|
+
color: {
|
|
125
|
+
linearColorScheme: string[];
|
|
126
|
+
colorScheme: string[];
|
|
127
|
+
positiveColor: string;
|
|
128
|
+
negativeColor: string;
|
|
129
|
+
};
|
|
130
|
+
tooltip: {
|
|
131
|
+
enable?: boolean | null | undefined;
|
|
132
|
+
borderColor?: string | null | undefined;
|
|
133
|
+
borderWidth?: number | null | undefined;
|
|
134
|
+
borderRadius?: number | null | undefined;
|
|
135
|
+
padding?: number | number[] | null | undefined;
|
|
136
|
+
backgroundColor?: string | null | undefined;
|
|
137
|
+
lineHeight?: number | null | undefined;
|
|
138
|
+
fontSize?: number | null | undefined;
|
|
139
|
+
lineSpace?: number | null | undefined;
|
|
140
|
+
keyColor?: string | null | undefined;
|
|
141
|
+
valueColor?: string | null | undefined;
|
|
142
|
+
titleColor?: string | null | undefined;
|
|
143
|
+
};
|
|
144
|
+
brush: {
|
|
145
|
+
enable: boolean;
|
|
146
|
+
inBrushStyle?: {
|
|
147
|
+
opacity?: number | undefined;
|
|
148
|
+
stroke?: string | undefined;
|
|
149
|
+
lineWidth?: number | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
outOfBrushStyle?: {
|
|
152
|
+
opacity?: number | undefined;
|
|
153
|
+
stroke?: string | undefined;
|
|
154
|
+
lineWidth?: number | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getPieTheme } from "./pie.js";
|
|
2
|
+
import { getDarkPlayer } from "../common/index.js";
|
|
3
|
+
const getRacePieTheme = ()=>{
|
|
4
|
+
const pieTheme = getPieTheme();
|
|
5
|
+
const player = getDarkPlayer();
|
|
6
|
+
return {
|
|
7
|
+
...pieTheme,
|
|
8
|
+
legend: {
|
|
9
|
+
...pieTheme.legend,
|
|
10
|
+
enable: false
|
|
11
|
+
},
|
|
12
|
+
player
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const getRaceDonutTheme = ()=>getRacePieTheme();
|
|
16
|
+
export { getRaceDonutTheme, getRacePieTheme };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=racePie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme/dark/racePie.js","sources":["webpack://@visactor/vseed/./src/theme/dark/racePie.ts"],"sourcesContent":["import type { Player } from 'src/types'\nimport { getPieTheme } from './pie'\nimport { getDarkPlayer } from '../common'\n\nexport const getRacePieTheme = () => {\n const pieTheme = getPieTheme()\n const player = getDarkPlayer() as Player\n\n return {\n ...pieTheme,\n legend: {\n ...pieTheme.legend,\n enable: false,\n },\n player,\n }\n}\n\nexport const getRaceDonutTheme = () => {\n return getRacePieTheme()\n}\n"],"names":["getRacePieTheme","pieTheme","getPieTheme","player","getDarkPlayer","getRaceDonutTheme"],"mappings":";;AAIO,MAAMA,kBAAkB;IAC7B,MAAMC,WAAWC;IACjB,MAAMC,SAASC;IAEf,OAAO;QACL,GAAGH,QAAQ;QACX,QAAQ;YACN,GAAGA,SAAS,MAAM;YAClB,QAAQ;QACV;QACAE;IACF;AACF;AAEO,MAAME,oBAAoB,IACxBL"}
|
|
@@ -14,6 +14,8 @@ import { getHistogramTheme } from "./histogram.js";
|
|
|
14
14
|
import { getBoxPlotTheme } from "./boxPlot.js";
|
|
15
15
|
import { getCirclePackingTheme, getSunburstTheme, getTreeMapTheme } from "./hierarchy.js";
|
|
16
16
|
import { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from "./race.js";
|
|
17
|
+
import { getRaceLineTheme } from "./raceLine.js";
|
|
18
|
+
import { getRaceDonutTheme, getRacePieTheme } from "./racePie.js";
|
|
17
19
|
const lightTheme = ()=>{
|
|
18
20
|
const tableConfig = getLightTableConfig();
|
|
19
21
|
return {
|
|
@@ -45,7 +47,10 @@ const lightTheme = ()=>{
|
|
|
45
47
|
circlePacking: getCirclePackingTheme(),
|
|
46
48
|
raceBar: getRaceBarTheme(),
|
|
47
49
|
raceColumn: getRaceColumnTheme(),
|
|
48
|
-
raceScatter: getRaceScatterTheme()
|
|
50
|
+
raceScatter: getRaceScatterTheme(),
|
|
51
|
+
raceLine: getRaceLineTheme(),
|
|
52
|
+
racePie: getRacePieTheme(),
|
|
53
|
+
raceDonut: getRaceDonutTheme()
|
|
49
54
|
}
|
|
50
55
|
};
|
|
51
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig } from 'src/types'\nimport { getLightTableConfig } from '../common'\n\nimport { getLineTheme } from './line'\nimport { getColumnTheme, getColumnParallelTheme, getColumnPercentTheme } from './column'\nimport { getBarTheme, getBarParallelTheme, getBarPercentTheme } from './bar'\nimport { getAreaTheme, getAreaPercentTheme } from './area'\nimport { getScatterTheme } from './scatter'\nimport { getDualAxisTheme } from './dualAxis'\nimport { getPieTheme, getDonutTheme } from './pie'\nimport { getRadarTheme } from './radar'\nimport { getRoseTheme, getRoseParallelTheme } from './rose'\nimport { getFunnelTheme } from './funnel'\nimport { getHeatmapTheme } from './heatmap'\nimport { getHistogramTheme } from './histogram'\nimport { getBoxPlotTheme } from './boxPlot'\nimport { getTreeMapTheme, getSunburstTheme, getCirclePackingTheme } from './hierarchy'\nimport { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from './race'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const tableConfig = getLightTableConfig()\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: getLineTheme(),\n column: getColumnTheme(),\n columnParallel: getColumnParallelTheme(),\n columnPercent: getColumnPercentTheme(),\n bar: getBarTheme(),\n barParallel: getBarParallelTheme(),\n barPercent: getBarPercentTheme(),\n area: getAreaTheme(),\n areaPercent: getAreaPercentTheme(),\n scatter: getScatterTheme(),\n dualAxis: getDualAxisTheme(),\n // polar\n pie: getPieTheme(),\n donut: getDonutTheme(),\n radar: getRadarTheme(),\n rose: getRoseTheme(),\n roseParallel: getRoseParallelTheme(),\n // other\n funnel: getFunnelTheme(),\n heatmap: getHeatmapTheme(),\n histogram: getHistogramTheme(),\n boxPlot: getBoxPlotTheme(),\n\n // hierarchy\n treeMap: getTreeMapTheme(),\n sunburst: getSunburstTheme(),\n circlePacking: getCirclePackingTheme(),\n\n // race\n raceBar: getRaceBarTheme(),\n raceColumn: getRaceColumnTheme(),\n raceScatter: getRaceScatterTheme(),\n },\n }\n}\n"],"names":["lightTheme","tableConfig","getLightTableConfig","getLineTheme","getColumnTheme","getColumnParallelTheme","getColumnPercentTheme","getBarTheme","getBarParallelTheme","getBarPercentTheme","getAreaTheme","getAreaPercentTheme","getScatterTheme","getDualAxisTheme","getPieTheme","getDonutTheme","getRadarTheme","getRoseTheme","getRoseParallelTheme","getFunnelTheme","getHeatmapTheme","getHistogramTheme","getBoxPlotTheme","getTreeMapTheme","getSunburstTheme","getCirclePackingTheme","getRaceBarTheme","getRaceColumnTheme","getRaceScatterTheme"],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig } from 'src/types'\nimport { getLightTableConfig } from '../common'\n\nimport { getLineTheme } from './line'\nimport { getColumnTheme, getColumnParallelTheme, getColumnPercentTheme } from './column'\nimport { getBarTheme, getBarParallelTheme, getBarPercentTheme } from './bar'\nimport { getAreaTheme, getAreaPercentTheme } from './area'\nimport { getScatterTheme } from './scatter'\nimport { getDualAxisTheme } from './dualAxis'\nimport { getPieTheme, getDonutTheme } from './pie'\nimport { getRadarTheme } from './radar'\nimport { getRoseTheme, getRoseParallelTheme } from './rose'\nimport { getFunnelTheme } from './funnel'\nimport { getHeatmapTheme } from './heatmap'\nimport { getHistogramTheme } from './histogram'\nimport { getBoxPlotTheme } from './boxPlot'\nimport { getTreeMapTheme, getSunburstTheme, getCirclePackingTheme } from './hierarchy'\nimport { getRaceBarTheme, getRaceColumnTheme, getRaceScatterTheme } from './race'\nimport { getRaceLineTheme } from './raceLine'\nimport { getRacePieTheme, getRaceDonutTheme } from './racePie'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const tableConfig = getLightTableConfig()\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: getLineTheme(),\n column: getColumnTheme(),\n columnParallel: getColumnParallelTheme(),\n columnPercent: getColumnPercentTheme(),\n bar: getBarTheme(),\n barParallel: getBarParallelTheme(),\n barPercent: getBarPercentTheme(),\n area: getAreaTheme(),\n areaPercent: getAreaPercentTheme(),\n scatter: getScatterTheme(),\n dualAxis: getDualAxisTheme(),\n // polar\n pie: getPieTheme(),\n donut: getDonutTheme(),\n radar: getRadarTheme(),\n rose: getRoseTheme(),\n roseParallel: getRoseParallelTheme(),\n // other\n funnel: getFunnelTheme(),\n heatmap: getHeatmapTheme(),\n histogram: getHistogramTheme(),\n boxPlot: getBoxPlotTheme(),\n\n // hierarchy\n treeMap: getTreeMapTheme(),\n sunburst: getSunburstTheme(),\n circlePacking: getCirclePackingTheme(),\n\n // race\n raceBar: getRaceBarTheme(),\n raceColumn: getRaceColumnTheme(),\n raceScatter: getRaceScatterTheme(),\n raceLine: getRaceLineTheme(),\n racePie: getRacePieTheme(),\n raceDonut: getRaceDonutTheme(),\n },\n }\n}\n"],"names":["lightTheme","tableConfig","getLightTableConfig","getLineTheme","getColumnTheme","getColumnParallelTheme","getColumnPercentTheme","getBarTheme","getBarParallelTheme","getBarPercentTheme","getAreaTheme","getAreaPercentTheme","getScatterTheme","getDualAxisTheme","getPieTheme","getDonutTheme","getRadarTheme","getRoseTheme","getRoseParallelTheme","getFunnelTheme","getHeatmapTheme","getHistogramTheme","getBoxPlotTheme","getTreeMapTheme","getSunburstTheme","getCirclePackingTheme","getRaceBarTheme","getRaceColumnTheme","getRaceScatterTheme","getRaceLineTheme","getRacePieTheme","getRaceDonutTheme"],"mappings":";;;;;;;;;;;;;;;;;;AAqBO,MAAMA,aAAa;IACxB,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YAEN,OAAOD;YACP,YAAYA;YAEZ,MAAME;YACN,QAAQC;YACR,gBAAgBC;YAChB,eAAeC;YACf,KAAKC;YACL,aAAaC;YACb,YAAYC;YACZ,MAAMC;YACN,aAAaC;YACb,SAASC;YACT,UAAUC;YAEV,KAAKC;YACL,OAAOC;YACP,OAAOC;YACP,MAAMC;YACN,cAAcC;YAEd,QAAQC;YACR,SAASC;YACT,WAAWC;YACX,SAASC;YAGT,SAASC;YACT,UAAUC;YACV,eAAeC;YAGf,SAASC;YACT,YAAYC;YACZ,aAAaC;YACb,UAAUC;YACV,SAASC;YACT,WAAWC;QACb;IACF;AACF"}
|