@visactor/vrender-components 0.16.17-alpha.3 → 0.16.17-alpha.8

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.
Files changed (107) hide show
  1. package/cjs/axis/base.js +7 -11
  2. package/cjs/axis/base.js.map +1 -1
  3. package/cjs/axis/circle.d.ts +1 -2
  4. package/cjs/axis/circle.js.map +1 -1
  5. package/cjs/axis/type.d.ts +6 -10
  6. package/cjs/axis/type.js.map +1 -1
  7. package/cjs/constant.d.ts +6 -0
  8. package/cjs/constant.js +6 -1
  9. package/cjs/constant.js.map +1 -1
  10. package/cjs/core/type.d.ts +15 -0
  11. package/cjs/core/type.js.map +1 -1
  12. package/cjs/index.d.ts +1 -1
  13. package/cjs/index.js +1 -1
  14. package/cjs/index.js.map +1 -1
  15. package/cjs/indicator/indicator.js +7 -15
  16. package/cjs/indicator/indicator.js.map +1 -1
  17. package/cjs/indicator/type.d.ts +3 -5
  18. package/cjs/indicator/type.js.map +1 -1
  19. package/cjs/label/area.d.ts +1 -1
  20. package/cjs/label/area.js +2 -2
  21. package/cjs/label/area.js.map +1 -1
  22. package/cjs/label/base.d.ts +1 -1
  23. package/cjs/label/base.js +16 -14
  24. package/cjs/label/base.js.map +1 -1
  25. package/cjs/label/index.d.ts +1 -0
  26. package/cjs/label/index.js +2 -1
  27. package/cjs/label/index.js.map +1 -1
  28. package/cjs/label/line.d.ts +1 -1
  29. package/cjs/label/line.js +3 -3
  30. package/cjs/label/line.js.map +1 -1
  31. package/cjs/label/type.d.ts +1 -0
  32. package/cjs/label/type.js.map +1 -1
  33. package/cjs/legend/discrete/discrete.js +2 -2
  34. package/cjs/legend/discrete/discrete.js.map +1 -1
  35. package/cjs/marker/area.js.map +1 -1
  36. package/cjs/marker/line.js.map +1 -1
  37. package/cjs/marker/point.js.map +1 -1
  38. package/cjs/marker/type.d.ts +14 -14
  39. package/cjs/marker/type.js.map +1 -1
  40. package/cjs/tag/tag.js +5 -9
  41. package/cjs/tag/tag.js.map +1 -1
  42. package/cjs/tag/type.d.ts +3 -5
  43. package/cjs/tag/type.js.map +1 -1
  44. package/cjs/title/title.js +67 -99
  45. package/cjs/title/title.js.map +1 -1
  46. package/cjs/tooltip/tooltip.js +7 -15
  47. package/cjs/tooltip/tooltip.js.map +1 -1
  48. package/cjs/tooltip/util.js +5 -5
  49. package/cjs/tooltip/util.js.map +1 -1
  50. package/cjs/util/label-smartInvert.d.ts +2 -2
  51. package/cjs/util/label-smartInvert.js +9 -5
  52. package/cjs/util/label-smartInvert.js.map +1 -1
  53. package/dist/index.js +180 -152
  54. package/dist/index.min.js +1 -1
  55. package/es/axis/base.js +8 -10
  56. package/es/axis/base.js.map +1 -1
  57. package/es/axis/circle.d.ts +1 -2
  58. package/es/axis/circle.js.map +1 -1
  59. package/es/axis/type.d.ts +6 -10
  60. package/es/axis/type.js.map +1 -1
  61. package/es/constant.d.ts +6 -0
  62. package/es/constant.js +7 -0
  63. package/es/constant.js.map +1 -1
  64. package/es/core/type.d.ts +15 -0
  65. package/es/core/type.js.map +1 -1
  66. package/es/index.d.ts +1 -1
  67. package/es/index.js +1 -1
  68. package/es/index.js.map +1 -1
  69. package/es/indicator/indicator.js +8 -14
  70. package/es/indicator/indicator.js.map +1 -1
  71. package/es/indicator/type.d.ts +3 -5
  72. package/es/indicator/type.js.map +1 -1
  73. package/es/label/area.d.ts +1 -1
  74. package/es/label/area.js +2 -2
  75. package/es/label/area.js.map +1 -1
  76. package/es/label/base.d.ts +1 -1
  77. package/es/label/base.js +16 -13
  78. package/es/label/base.js.map +1 -1
  79. package/es/label/index.d.ts +1 -0
  80. package/es/label/index.js +2 -0
  81. package/es/label/index.js.map +1 -1
  82. package/es/label/line.d.ts +1 -1
  83. package/es/label/line.js +3 -3
  84. package/es/label/line.js.map +1 -1
  85. package/es/label/type.d.ts +1 -0
  86. package/es/label/type.js.map +1 -1
  87. package/es/legend/discrete/discrete.js +2 -2
  88. package/es/legend/discrete/discrete.js.map +1 -1
  89. package/es/marker/area.js.map +1 -1
  90. package/es/marker/line.js.map +1 -1
  91. package/es/marker/point.js.map +1 -1
  92. package/es/marker/type.d.ts +14 -14
  93. package/es/marker/type.js.map +1 -1
  94. package/es/tag/tag.js +6 -8
  95. package/es/tag/tag.js.map +1 -1
  96. package/es/tag/type.d.ts +3 -5
  97. package/es/tag/type.js.map +1 -1
  98. package/es/title/title.js +66 -98
  99. package/es/title/title.js.map +1 -1
  100. package/es/tooltip/tooltip.js +8 -14
  101. package/es/tooltip/tooltip.js.map +1 -1
  102. package/es/tooltip/util.js +5 -5
  103. package/es/tooltip/util.js.map +1 -1
  104. package/es/util/label-smartInvert.d.ts +2 -2
  105. package/es/util/label-smartInvert.js +9 -5
  106. package/es/util/label-smartInvert.js.map +1 -1
  107. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -7715,7 +7715,7 @@
7715
7715
 
7716
7716
  var tempMatrix = new vutils.Matrix(),
7717
7717
  tempBounds$1 = new vutils.AABBBounds();
7718
- var GRAPHIC_UPDATE_TAG_KEY = ["lineWidth", "lineCap", "lineJoin", "miterLimit", "scaleX", "scaleY", "angle", "anchor"];
7718
+ var GRAPHIC_UPDATE_TAG_KEY = ["lineWidth", "scaleX", "scaleY", "angle", "anchor", "visible"];
7719
7719
  var tempConstantXYKey = ["x", "y"],
7720
7720
  tempConstantScaleXYKey = ["scaleX", "scaleY"],
7721
7721
  tempConstantAngleKey = ["angle"],
@@ -11467,9 +11467,7 @@
11467
11467
  cacheList = [];
11468
11468
  _path.forEach(function (item) {
11469
11469
  var cache = new CustomPath2D().fromString(item.d),
11470
- attribute = {
11471
- fill: "black"
11472
- };
11470
+ attribute = {};
11473
11471
  SVG_PARSE_ATTRIBUTE_MAP_KEYS.forEach(function (k) {
11474
11472
  item[k] && (attribute[SVG_PARSE_ATTRIBUTE_MAP[k]] = item[k]);
11475
11473
  }), cacheList.push({
@@ -12483,7 +12481,8 @@
12483
12481
  var _this2 = this;
12484
12482
  var _a;
12485
12483
  var _this$attribute = this.attribute,
12486
- textConfig = _this$attribute.textConfig,
12484
+ _this$attribute$textC = _this$attribute.textConfig,
12485
+ textConfig = _this$attribute$textC === void 0 ? [] : _this$attribute$textC,
12487
12486
  maxWidth = _this$attribute.maxWidth,
12488
12487
  maxHeight = _this$attribute.maxHeight,
12489
12488
  width = _this$attribute.width,
@@ -13526,6 +13525,7 @@
13526
13525
  }, {
13527
13526
  key: "updateRectAABBBounds",
13528
13527
  value: function updateRectAABBBounds(attribute, rectTheme, aabbBounds, graphic) {
13528
+ if (!this._validCheck(attribute, rectTheme, aabbBounds, graphic)) return aabbBounds;
13529
13529
  if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
13530
13530
  var _attribute$width = attribute.width,
13531
13531
  width = _attribute$width === void 0 ? rectTheme.width : _attribute$width,
@@ -13559,13 +13559,14 @@
13559
13559
  }, {
13560
13560
  key: "updateGlyphAABBBounds",
13561
13561
  value: function updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
13562
- return graphic.getSubGraphic().forEach(function (node) {
13562
+ return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach(function (node) {
13563
13563
  aabbBounds.union(node.AABBBounds);
13564
- }), aabbBounds;
13564
+ }), aabbBounds) : aabbBounds;
13565
13565
  }
13566
13566
  }, {
13567
13567
  key: "updateRichTextAABBBounds",
13568
13568
  value: function updateRichTextAABBBounds(attribute, richtextTheme, aabbBounds, graphic) {
13569
+ if (!this._validCheck(attribute, richtextTheme, aabbBounds, graphic)) return aabbBounds;
13569
13570
  if (!graphic) return aabbBounds;
13570
13571
  var _attribute$width2 = attribute.width,
13571
13572
  width = _attribute$width2 === void 0 ? richtextTheme.width : _attribute$width2,
@@ -13618,6 +13619,7 @@
13618
13619
  }, {
13619
13620
  key: "updateTextAABBBounds",
13620
13621
  value: function updateTextAABBBounds(attribute, textTheme, aabbBounds, graphic) {
13622
+ if (!this._validCheck(attribute, textTheme, aabbBounds, graphic)) return aabbBounds;
13621
13623
  if (!graphic) return aabbBounds;
13622
13624
  var _graphic$attribute$te = graphic.attribute.text,
13623
13625
  text = _graphic$attribute$te === void 0 ? textTheme.text : _graphic$attribute$te;
@@ -13642,6 +13644,7 @@
13642
13644
  }, {
13643
13645
  key: "updatePathAABBBounds",
13644
13646
  value: function updatePathAABBBounds(attribute, pathTheme, aabbBounds, graphic) {
13647
+ if (!this._validCheck(attribute, pathTheme, aabbBounds, graphic)) return aabbBounds;
13645
13648
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePathAABBBoundsImprecise(attribute, pathTheme, aabbBounds, graphic);
13646
13649
  var tb1 = this.tempAABBBounds1,
13647
13650
  tb2 = this.tempAABBBounds2;
@@ -13693,6 +13696,7 @@
13693
13696
  }, {
13694
13697
  key: "updatePolygonAABBBounds",
13695
13698
  value: function updatePolygonAABBBounds(attribute, polygonTheme, aabbBounds, graphic) {
13699
+ if (!this._validCheck(attribute, polygonTheme, aabbBounds, graphic)) return aabbBounds;
13696
13700
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds, graphic);
13697
13701
  var tb1 = this.tempAABBBounds1,
13698
13702
  tb2 = this.tempAABBBounds2;
@@ -13713,6 +13717,7 @@
13713
13717
  }, {
13714
13718
  key: "updateLineAABBBounds",
13715
13719
  value: function updateLineAABBBounds(attribute, lineTheme, aabbBounds, graphic) {
13720
+ if (!this._validCheck(attribute, lineTheme, aabbBounds, graphic)) return aabbBounds;
13716
13721
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) : this.updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic));
13717
13722
  var tb1 = this.tempAABBBounds1,
13718
13723
  tb2 = this.tempAABBBounds2;
@@ -13746,6 +13751,7 @@
13746
13751
  }, {
13747
13752
  key: "updateAreaAABBBounds",
13748
13753
  value: function updateAreaAABBBounds(attribute, areaTheme, aabbBounds, graphic) {
13754
+ if (!this._validCheck(attribute, areaTheme, aabbBounds, graphic)) return aabbBounds;
13749
13755
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || (attribute.segments ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic));
13750
13756
  var tb1 = this.tempAABBBounds1,
13751
13757
  tb2 = this.tempAABBBounds2;
@@ -13781,6 +13787,7 @@
13781
13787
  }, {
13782
13788
  key: "updateCircleAABBBounds",
13783
13789
  value: function updateCircleAABBBounds(attribute, circleTheme, aabbBounds, full, graphic) {
13790
+ if (!this._validCheck(attribute, circleTheme, aabbBounds, graphic)) return aabbBounds;
13784
13791
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds, graphic) : this.updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds, graphic));
13785
13792
  var tb1 = this.tempAABBBounds1,
13786
13793
  tb2 = this.tempAABBBounds2;
@@ -13809,6 +13816,7 @@
13809
13816
  }, {
13810
13817
  key: "updateArcAABBBounds",
13811
13818
  value: function updateArcAABBBounds(attribute, arcTheme, aabbBounds, full, graphic) {
13819
+ if (!this._validCheck(attribute, arcTheme, aabbBounds, graphic)) return aabbBounds;
13812
13820
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds, graphic) : this.updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic));
13813
13821
  var tb1 = this.tempAABBBounds1,
13814
13822
  tb2 = this.tempAABBBounds2;
@@ -13850,6 +13858,7 @@
13850
13858
  }, {
13851
13859
  key: "updateSymbolAABBBounds",
13852
13860
  value: function updateSymbolAABBBounds(attribute, symbolTheme, aabbBounds, full, graphic) {
13861
+ if (!this._validCheck(attribute, symbolTheme, aabbBounds, graphic)) return aabbBounds;
13853
13862
  this.updatePathProxyAABBBounds(aabbBounds, graphic) || (full ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds, graphic));
13854
13863
  var tb1 = this.tempAABBBounds1,
13855
13864
  tb2 = this.tempAABBBounds2;
@@ -13882,6 +13891,7 @@
13882
13891
  }, {
13883
13892
  key: "updateImageAABBBounds",
13884
13893
  value: function updateImageAABBBounds(attribute, imageTheme, aabbBounds, graphic) {
13894
+ if (!this._validCheck(attribute, imageTheme, aabbBounds, graphic)) return aabbBounds;
13885
13895
  if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
13886
13896
  var _attribute$width3 = attribute.width,
13887
13897
  width = _attribute$width3 === void 0 ? imageTheme.width : _attribute$width3,
@@ -13928,6 +13938,15 @@
13928
13938
  }
13929
13939
  this.combindShadowAABBBounds(aabbBounds, graphic), vutils.transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix);
13930
13940
  }
13941
+ }, {
13942
+ key: "_validCheck",
13943
+ value: function _validCheck(attribute, theme, aabbBounds, graphic) {
13944
+ if (!graphic) return !0;
13945
+ if (!graphic.valid) return aabbBounds.clear(), !1;
13946
+ var _attribute$visible = attribute.visible,
13947
+ visible = _attribute$visible === void 0 ? theme.visible : _attribute$visible;
13948
+ return !!visible || (aabbBounds.clear(), !1);
13949
+ }
13931
13950
  }]);
13932
13951
  return DefaultGraphicService;
13933
13952
  }();
@@ -15386,10 +15405,20 @@
15386
15405
  var p = context.project(x, y, z),
15387
15406
  camera = context.camera;
15388
15407
  context.camera = null, !1 === parsedPath.draw(context, size, p.x, p.y, void 0, function (p, a) {
15389
- a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY), context.stroke()));
15408
+ var _a, _b, _c;
15409
+ if (symbol._parsedPath.svgCache) {
15410
+ var obj = Object.assign({}, a);
15411
+ obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.fill) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
15412
+ }
15413
+ a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
15390
15414
  }) && context.closePath(), context.camera = camera;
15391
15415
  } else !1 === parsedPath.draw(context, size, x, y, z, function (p, a) {
15392
- a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY), context.stroke()));
15416
+ var _a, _b, _c;
15417
+ if (symbol._parsedPath.svgCache) {
15418
+ var obj = Object.assign({}, a);
15419
+ obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.opacity) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
15420
+ }
15421
+ a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
15393
15422
  }) && context.closePath();
15394
15423
  context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb), doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill())), doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke())), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
15395
15424
  }
@@ -15827,7 +15856,7 @@
15827
15856
  var repeat = 0;
15828
15857
  if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
15829
15858
  var pattern = context.createPattern(res.data, repeatStr[repeat]);
15830
- context.fillStyle = pattern, context.fillRect(x, y, width, height);
15859
+ context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
15831
15860
  } else context.drawImage(res.data, x, y, width, height);
15832
15861
  needRestore && context.restore();
15833
15862
  }
@@ -17055,7 +17084,7 @@
17055
17084
  graphic.add(g);
17056
17085
  });
17057
17086
  } else result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams);
17058
- return context.camera = null, pickParams.in3dInterceptor = !1, result;
17087
+ return context.camera = null, pickParams.in3dInterceptor = !1, context.restore(), result;
17059
17088
  }
17060
17089
  return context.restore(), null;
17061
17090
  }
@@ -20795,18 +20824,18 @@
20795
20824
 
20796
20825
  const defaultAlternativeColors = ['#ffffff', '#000000'];
20797
20826
  const { Color } = vutils.ColorUtil;
20798
- function labelSmartInvert(foregroundColorOrigin, backgroundColorOrogin, textType, contrastRatiosThreshold, alternativeColors) {
20827
+ function labelSmartInvert(foregroundColorOrigin, backgroundColorOrogin, textType, contrastRatiosThreshold, alternativeColors, mode) {
20799
20828
  if (typeof foregroundColorOrigin !== 'string' || typeof backgroundColorOrogin !== 'string') {
20800
20829
  return foregroundColorOrigin;
20801
20830
  }
20802
20831
  const foregroundColor = new Color(foregroundColorOrigin).toHex();
20803
20832
  const backgroundColor = new Color(backgroundColorOrogin).toHex();
20804
- if (!contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold)) {
20805
- return improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors);
20833
+ if (!contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode)) {
20834
+ return improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode);
20806
20835
  }
20807
20836
  return foregroundColor;
20808
20837
  }
20809
- function improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors) {
20838
+ function improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode) {
20810
20839
  const alternativeColorPalletes = [];
20811
20840
  if (alternativeColors) {
20812
20841
  if (alternativeColors instanceof Array) {
@@ -20821,13 +20850,27 @@
20821
20850
  if (foregroundColor === alternativeColor) {
20822
20851
  continue;
20823
20852
  }
20824
- if (contrastAccessibilityChecker(alternativeColor, backgroundColor, textType, contrastRatiosThreshold)) {
20853
+ if (contrastAccessibilityChecker(alternativeColor, backgroundColor, textType, contrastRatiosThreshold, mode)) {
20825
20854
  return alternativeColor;
20826
20855
  }
20827
20856
  }
20828
20857
  return undefined;
20829
20858
  }
20830
- function contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold) {
20859
+ function contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode) {
20860
+ if (mode === 'lightness') {
20861
+ const backgroundColorLightness = Color.getColorBrightness(new Color(backgroundColor));
20862
+ const foregroundColorLightness = Color.getColorBrightness(new Color(foregroundColor));
20863
+ if (foregroundColorLightness < 0.5) {
20864
+ if (backgroundColorLightness >= 0.5) {
20865
+ return true;
20866
+ }
20867
+ return false;
20868
+ }
20869
+ if (backgroundColorLightness < 0.5) {
20870
+ return true;
20871
+ }
20872
+ return false;
20873
+ }
20831
20874
  if (contrastRatiosThreshold) {
20832
20875
  if (contrastRatios(foregroundColor, backgroundColor) > contrastRatiosThreshold) {
20833
20876
  return true;
@@ -20954,6 +20997,12 @@
20954
20997
  [StateValue.hover]: {},
20955
20998
  [StateValue.hoverReverse]: {}
20956
20999
  };
21000
+ const DEFAULT_HTML_TEXT_SPEC = {
21001
+ container: '',
21002
+ width: 30,
21003
+ height: 30,
21004
+ style: {}
21005
+ };
20957
21006
 
20958
21007
  const initTextMeasure = (textSpec, option, useNaiveCanvas) => {
20959
21008
  return new vutils.TextMeasure(Object.assign({ defaultFontParams: {
@@ -20987,7 +21036,7 @@
20987
21036
  }
20988
21037
  render() {
20989
21038
  var _a, _b, _c;
20990
- const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state, type = 'text' } = this.attribute;
21039
+ const { text = '', textStyle = {}, shape = {}, panel = {}, space = 4, minWidth, maxWidth, padding = 4, visible, state, type } = this.attribute;
20991
21040
  const parsedPadding = vutils.normalizePadding(padding);
20992
21041
  const group = this.createOrUpdateChild('tag-content', { x: 0, y: 0, zIndex: 1 }, 'group');
20993
21042
  let symbol;
@@ -21022,7 +21071,7 @@
21022
21071
  }
21023
21072
  }
21024
21073
  else if (type === 'html') {
21025
- const richTextAttrs = Object.assign(Object.assign({ textConfig: [], visible: vutils.isValid(text) && visible !== false, html: Object.assign({ dom: text, container: '', width: 30, height: 30, style: {} }, textStyle) }, textStyle), { x: textX, y: 0 });
21074
+ const richTextAttrs = Object.assign(Object.assign({ textConfig: [], visible: vutils.isValid(text) && visible !== false, html: Object.assign(Object.assign({ dom: text }, DEFAULT_HTML_TEXT_SPEC), textStyle) }, textStyle), { x: textX, y: 0 });
21026
21075
  textShape = group.createOrUpdateChild('tag-text', richTextAttrs, 'richtext');
21027
21076
  const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
21028
21077
  if (visible && vutils.isBoolean(bgVisible)) {
@@ -22383,7 +22432,7 @@
22383
22432
  }
22384
22433
  else if (attributes.textType === 'html') {
22385
22434
  attributes.textConfig = [];
22386
- attributes.html = Object.assign({ dom: attributes.text, container: '', width: 30, height: 30, style: {} }, attributes);
22435
+ attributes.html = Object.assign(Object.assign({ dom: attributes.text }, DEFAULT_HTML_TEXT_SPEC), attributes);
22387
22436
  const text = createRichText(attributes);
22388
22437
  this._bindEvent(text);
22389
22438
  this._setStatesOfText(text);
@@ -22484,10 +22533,11 @@
22484
22533
  : baseMark.attribute.fill }, textStyle), textData);
22485
22534
  const text = this._createLabelText(labelAttribute);
22486
22535
  const textBounds = this.getGraphicBounds(text);
22536
+ const actualPosition = vutils.isFunction(position) ? position(textData) : position;
22487
22537
  const graphicBounds = this._isCollectionBase
22488
- ? this.getGraphicBounds(null, this._idToPoint.get(textData.id))
22489
- : this.getGraphicBounds(baseMark, { x: textData.x, y: textData.y });
22490
- const textLocation = this.labeling(textBounds, graphicBounds, vutils.isFunction(position) ? position(textData) : position, offset);
22538
+ ? this.getGraphicBounds(null, this._idToPoint.get(textData.id), actualPosition)
22539
+ : this.getGraphicBounds(baseMark, { x: textData.x, y: textData.y }, actualPosition);
22540
+ const textLocation = this.labeling(textBounds, graphicBounds, actualPosition, offset);
22491
22541
  if (textLocation) {
22492
22542
  labelAttribute.x = textLocation.x;
22493
22543
  labelAttribute.y = textLocation.y;
@@ -22568,13 +22618,19 @@
22568
22618
  }
22569
22619
  if (!hasPlace && clampForce) {
22570
22620
  const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height);
22571
- if (!(dx === 0 && dy === 0) &&
22572
- canPlace(bmpTool, bitmap, {
22573
- x1: text.AABBBounds.x1 + dx,
22574
- x2: text.AABBBounds.x2 + dx,
22575
- y1: text.AABBBounds.y1 + dy,
22576
- y2: text.AABBBounds.y2 + dy
22577
- })) {
22621
+ if (dx === 0 && dy === 0) {
22622
+ if (canPlace(bmpTool, bitmap, text.AABBBounds)) {
22623
+ bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
22624
+ result.push(text);
22625
+ continue;
22626
+ }
22627
+ }
22628
+ else if (canPlace(bmpTool, bitmap, {
22629
+ x1: text.AABBBounds.x1 + dx,
22630
+ x2: text.AABBBounds.x2 + dx,
22631
+ y1: text.AABBBounds.y1 + dy,
22632
+ y2: text.AABBBounds.y2 + dy
22633
+ })) {
22578
22634
  text.setAttributes({ x: text.attribute.x + dx, y: text.attribute.y + dy });
22579
22635
  bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
22580
22636
  result.push(text);
@@ -22768,7 +22824,7 @@
22768
22824
  _smartInvert(labels) {
22769
22825
  var _a, _b, _c, _d, _e;
22770
22826
  const option = (this.attribute.smartInvert || {});
22771
- const { textType, contrastRatiosThreshold, alternativeColors } = option;
22827
+ const { textType, contrastRatiosThreshold, alternativeColors, mode } = option;
22772
22828
  const fillStrategy = (_a = option.fillStrategy) !== null && _a !== void 0 ? _a : 'invertBase';
22773
22829
  const strokeStrategy = (_b = option.strokeStrategy) !== null && _b !== void 0 ? _b : 'base';
22774
22830
  const brightColor = (_c = option.brightColor) !== null && _c !== void 0 ? _c : '#ffffff';
@@ -22786,7 +22842,7 @@
22786
22842
  const backgroundColor = baseMark.attribute.fill;
22787
22843
  const foregroundColor = label.attribute.fill;
22788
22844
  const baseColor = backgroundColor;
22789
- const invertColor = labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors);
22845
+ const invertColor = labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode);
22790
22846
  const similarColor = contrastAccessibilityChecker(invertColor, brightColor) ? brightColor : darkColor;
22791
22847
  if (outsideEnable) {
22792
22848
  const fill = smartInvertStrategy(fillStrategy, baseColor, invertColor, similarColor);
@@ -22814,7 +22870,7 @@
22814
22870
  }
22815
22871
  if (label.attribute.stroke) {
22816
22872
  label.setAttributes({
22817
- fill: labelSmartInvert(label.attribute.fill, label.attribute.stroke, textType, contrastRatiosThreshold, alternativeColors)
22873
+ fill: labelSmartInvert(label.attribute.fill, label.attribute.stroke, textType, contrastRatiosThreshold, alternativeColors, mode)
22818
22874
  });
22819
22875
  continue;
22820
22876
  }
@@ -22976,12 +23032,11 @@
22976
23032
  super(vutils.merge({}, LineLabel.defaultAttributes, attributes));
22977
23033
  this.name = 'line-label';
22978
23034
  }
22979
- getGraphicBounds(graphic, point = {}) {
23035
+ getGraphicBounds(graphic, point = {}, position = 'end') {
22980
23036
  var _a;
22981
- if (graphic.type !== 'line') {
23037
+ if (!graphic || graphic.type !== 'line') {
22982
23038
  return super.getGraphicBounds(graphic, point);
22983
23039
  }
22984
- const { position = 'end' } = this.attribute;
22985
23040
  const points = ((_a = graphic === null || graphic === void 0 ? void 0 : graphic.attribute) === null || _a === void 0 ? void 0 : _a.points) || [point];
22986
23041
  const index = position === 'start' ? 0 : points.length - 1;
22987
23042
  return {
@@ -23732,39 +23787,16 @@
23732
23787
  pickable: false
23733
23788
  };
23734
23789
 
23735
- class LineDataLabel extends LabelBase {
23736
- constructor(attributes) {
23737
- super(vutils.merge({}, LineDataLabel.defaultAttributes, attributes));
23738
- this.name = 'line-data-label';
23739
- }
23740
- labeling(textBounds, graphicBounds, position = 'top', offset = 0) {
23741
- return labelingPoint(textBounds, graphicBounds, position, offset);
23742
- }
23743
- }
23744
- LineDataLabel.defaultAttributes = {
23745
- textStyle: {
23746
- fontSize: 12,
23747
- fill: '#000',
23748
- textAlign: 'center',
23749
- textBaseline: 'middle',
23750
- boundsPadding: [-1, 0, -1, 0]
23751
- },
23752
- position: 'top',
23753
- offset: 5,
23754
- pickable: false
23755
- };
23756
-
23757
23790
  class AreaLabel extends LabelBase {
23758
23791
  constructor(attributes) {
23759
23792
  super(vutils.merge({}, AreaLabel.defaultAttributes, attributes));
23760
23793
  this.name = 'line-label';
23761
23794
  }
23762
- getGraphicBounds(graphic, point = {}) {
23795
+ getGraphicBounds(graphic, point = {}, position = 'end') {
23763
23796
  var _a;
23764
23797
  if (graphic.type !== 'area') {
23765
23798
  return super.getGraphicBounds(graphic, point);
23766
23799
  }
23767
- const { position = 'end' } = this.attribute;
23768
23800
  const points = ((_a = graphic === null || graphic === void 0 ? void 0 : graphic.attribute) === null || _a === void 0 ? void 0 : _a.points) || [point];
23769
23801
  const index = position === 'start' ? 0 : points.length - 1;
23770
23802
  return {
@@ -23791,6 +23823,28 @@
23791
23823
  pickable: false
23792
23824
  };
23793
23825
 
23826
+ class LineDataLabel extends LabelBase {
23827
+ constructor(attributes) {
23828
+ super(vutils.merge({}, LineDataLabel.defaultAttributes, attributes));
23829
+ this.name = 'line-data-label';
23830
+ }
23831
+ labeling(textBounds, graphicBounds, position = 'top', offset = 0) {
23832
+ return labelingPoint(textBounds, graphicBounds, position, offset);
23833
+ }
23834
+ }
23835
+ LineDataLabel.defaultAttributes = {
23836
+ textStyle: {
23837
+ fontSize: 12,
23838
+ fill: '#000',
23839
+ textAlign: 'center',
23840
+ textBaseline: 'middle',
23841
+ boundsPadding: [-1, 0, -1, 0]
23842
+ },
23843
+ position: 'top',
23844
+ offset: 5,
23845
+ pickable: false
23846
+ };
23847
+
23794
23848
  const labelComponentMap = {
23795
23849
  rect: RectLabel,
23796
23850
  symbol: SymbolLabel,
@@ -24354,15 +24408,15 @@
24354
24408
  var _a, _b, _c, _d;
24355
24409
  const labelStyle = this._getLabelAttribute(item, index, data, layer);
24356
24410
  let text;
24357
- if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'rich') {
24411
+ if (labelStyle.type === 'rich') {
24358
24412
  labelStyle.textConfig = labelStyle.text;
24359
24413
  labelStyle.width = (_a = labelStyle.width) !== null && _a !== void 0 ? _a : 0;
24360
24414
  labelStyle.height = (_b = labelStyle.height) !== null && _b !== void 0 ? _b : 0;
24361
24415
  text = createRichText(labelStyle);
24362
24416
  }
24363
- else if ((labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.type) === 'html') {
24417
+ else if (labelStyle.type === 'html') {
24364
24418
  labelStyle.textConfig = [];
24365
- labelStyle.html = Object.assign({ dom: labelStyle.text, container: '', width: 30, height: 30, style: {} }, labelStyle);
24419
+ labelStyle.html = Object.assign(Object.assign({ dom: labelStyle.text }, DEFAULT_HTML_TEXT_SPEC), labelStyle);
24366
24420
  text = createRichText(labelStyle);
24367
24421
  }
24368
24422
  else {
@@ -28150,7 +28204,7 @@
28150
28204
  let focusSpace = 0;
28151
28205
  if (focus) {
28152
28206
  const focusSize = vutils.get(focusIconStyle, 'size', DEFAULT_SHAPE_SIZE);
28153
- focusShape = createSymbol(Object.assign(Object.assign({ x: 0, y: -focusSize / 2 - 1, strokeBoundsBuffer: 0 }, focusIconStyle), { visible: false, pickMode: 'imprecise', boundsPadding: parsedPadding }));
28207
+ focusShape = createSymbol(Object.assign(Object.assign({ x: 0, y: -focusSize / 2 - 1, strokeBoundsBuffer: 0 }, focusIconStyle), { visible: true, pickMode: 'imprecise', boundsPadding: parsedPadding }));
28154
28208
  this._appendDataToShape(focusShape, exports.LEGEND_ELEMENT_NAME.focus, item, itemGroup);
28155
28209
  focusSpace = focusSize;
28156
28210
  }
@@ -28225,6 +28279,7 @@
28225
28279
  const itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
28226
28280
  itemGroup.attribute.width = itemGroupWidth;
28227
28281
  itemGroup.attribute.height = itemGroupHeight;
28282
+ focusShape && focusShape.setAttribute('visible', false);
28228
28283
  innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]);
28229
28284
  return itemGroup;
28230
28285
  }
@@ -29539,74 +29594,46 @@
29539
29594
  this.name = 'title';
29540
29595
  }
29541
29596
  render() {
29542
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69;
29597
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55;
29543
29598
  const { textType, text, subtextType, textStyle, subtext, subtextStyle, width, height, minWidth, maxWidth, minHeight, maxHeight, align, verticalAlign, padding = 0 } = this.attribute;
29544
29599
  const parsedPadding = vutils.normalizePadding(padding);
29545
29600
  const group = this.createOrUpdateChild('title-container', { x: parsedPadding[3], y: parsedPadding[0], zIndex: 1 }, 'group');
29546
29601
  if (((_a = this.attribute) === null || _a === void 0 ? void 0 : _a.visible) !== false && (textStyle === null || textStyle === void 0 ? void 0 : textStyle.visible) !== false) {
29547
- if (textType === 'rich') {
29548
- const attr = Object.assign({ x: (_b = textStyle.x) !== null && _b !== void 0 ? _b : 0, y: (_c = textStyle.y) !== null && _c !== void 0 ? _c : 0, width: (_e = (_d = textStyle.width) !== null && _d !== void 0 ? _d : width) !== null && _e !== void 0 ? _e : 0, height: (_g = (_f = textStyle.height) !== null && _f !== void 0 ? _f : height) !== null && _g !== void 0 ? _g : 0, ellipsis: (_h = textStyle.ellipsis) !== null && _h !== void 0 ? _h : true, wordBreak: (_j = textStyle.wordBreak) !== null && _j !== void 0 ? _j : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: text }, textStyle);
29602
+ if (textType === 'rich' || vutils.isValid(textStyle.character)) {
29603
+ const attr = Object.assign({ x: (_b = textStyle.x) !== null && _b !== void 0 ? _b : 0, y: (_c = textStyle.y) !== null && _c !== void 0 ? _c : 0, width: (_e = (_d = textStyle.width) !== null && _d !== void 0 ? _d : width) !== null && _e !== void 0 ? _e : 0, height: (_g = (_f = textStyle.height) !== null && _f !== void 0 ? _f : height) !== null && _g !== void 0 ? _g : 0, ellipsis: (_h = textStyle.ellipsis) !== null && _h !== void 0 ? _h : true, wordBreak: (_j = textStyle.wordBreak) !== null && _j !== void 0 ? _j : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: (_k = textStyle.character) !== null && _k !== void 0 ? _k : text }, textStyle);
29549
29604
  this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29550
29605
  }
29551
29606
  else if (textType === 'html') {
29552
- const attr = Object.assign({ html: Object.assign({ dom: text, container: '', width: 30, height: 30, style: '' }, textStyle), x: (_k = textStyle.x) !== null && _k !== void 0 ? _k : 0, y: (_l = textStyle.y) !== null && _l !== void 0 ? _l : 0, width: (_o = (_m = textStyle.width) !== null && _m !== void 0 ? _m : width) !== null && _o !== void 0 ? _o : 0, height: (_q = (_p = textStyle.height) !== null && _p !== void 0 ? _p : height) !== null && _q !== void 0 ? _q : 0, ellipsis: (_r = textStyle.ellipsis) !== null && _r !== void 0 ? _r : true, wordBreak: (_s = textStyle.wordBreak) !== null && _s !== void 0 ? _s : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: [] }, textStyle);
29553
- this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29554
- }
29555
- else if (textStyle && vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.character)) {
29556
- const attr = {
29557
- x: (_t = textStyle.x) !== null && _t !== void 0 ? _t : 0,
29558
- y: (_u = textStyle.y) !== null && _u !== void 0 ? _u : 0,
29559
- width: (_w = (_v = textStyle.width) !== null && _v !== void 0 ? _v : width) !== null && _w !== void 0 ? _w : 0,
29560
- height: (_y = (_x = textStyle.height) !== null && _x !== void 0 ? _x : height) !== null && _y !== void 0 ? _y : 0,
29561
- ellipsis: (_z = textStyle.ellipsis) !== null && _z !== void 0 ? _z : true,
29562
- wordBreak: (_0 = textStyle.wordBreak) !== null && _0 !== void 0 ? _0 : 'break-word',
29563
- maxHeight: textStyle.maxHeight,
29564
- maxWidth: textStyle.maxWidth,
29565
- textConfig: textStyle.character
29566
- };
29607
+ const attr = Object.assign({ html: Object.assign(Object.assign({ dom: text }, DEFAULT_HTML_TEXT_SPEC), textStyle), x: (_l = textStyle.x) !== null && _l !== void 0 ? _l : 0, y: (_m = textStyle.y) !== null && _m !== void 0 ? _m : 0, width: (_p = (_o = textStyle.width) !== null && _o !== void 0 ? _o : width) !== null && _p !== void 0 ? _p : 0, height: (_r = (_q = textStyle.height) !== null && _q !== void 0 ? _q : height) !== null && _r !== void 0 ? _r : 0, ellipsis: (_s = textStyle.ellipsis) !== null && _s !== void 0 ? _s : true, wordBreak: (_t = textStyle.wordBreak) !== null && _t !== void 0 ? _t : 'break-word', maxHeight: textStyle.maxHeight, maxWidth: textStyle.maxWidth, textConfig: [] }, textStyle);
29567
29608
  this._mainTitle = group.createOrUpdateChild('mainTitle', attr, 'richtext');
29568
29609
  }
29569
29610
  else if (vutils.isValid(text)) {
29570
- this._mainTitle = group.createOrUpdateChild('mainTitle', Object.assign(Object.assign({ text: [text] }, textStyle), { maxLineWidth: (_1 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _1 !== void 0 ? _1 : width, heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit, lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp, ellipsis: (_2 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _2 !== void 0 ? _2 : true, x: 0, y: 0 }), 'wrapText');
29611
+ this._mainTitle = group.createOrUpdateChild('mainTitle', Object.assign(Object.assign({ text: [text] }, textStyle), { maxLineWidth: (_u = textStyle === null || textStyle === void 0 ? void 0 : textStyle.maxLineWidth) !== null && _u !== void 0 ? _u : width, heightLimit: textStyle === null || textStyle === void 0 ? void 0 : textStyle.heightLimit, lineClamp: textStyle === null || textStyle === void 0 ? void 0 : textStyle.lineClamp, ellipsis: (_v = textStyle === null || textStyle === void 0 ? void 0 : textStyle.ellipsis) !== null && _v !== void 0 ? _v : true, x: 0, y: 0 }), 'wrapText');
29571
29612
  }
29572
29613
  }
29573
- const maintextHeight = this._mainTitle ? (_3 = this._mainTitle) === null || _3 === void 0 ? void 0 : _3.AABBBounds.height() : 0;
29574
- const maintextWidth = this._mainTitle ? (_4 = this._mainTitle) === null || _4 === void 0 ? void 0 : _4.AABBBounds.width() : 0;
29575
- if (((_5 = this.attribute) === null || _5 === void 0 ? void 0 : _5.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29576
- if (subtextType === 'rich') {
29577
- const attr = Object.assign({ x: (_6 = subtextStyle.x) !== null && _6 !== void 0 ? _6 : 0, y: (_7 = subtextStyle.y) !== null && _7 !== void 0 ? _7 : 0, width: (_9 = (_8 = subtextStyle.width) !== null && _8 !== void 0 ? _8 : width) !== null && _9 !== void 0 ? _9 : 0, height: (_11 = (_10 = subtextStyle.height) !== null && _10 !== void 0 ? _10 : height) !== null && _11 !== void 0 ? _11 : 0, ellipsis: (_12 = subtextStyle.ellipsis) !== null && _12 !== void 0 ? _12 : true, wordBreak: (_13 = subtextStyle.wordBreak) !== null && _13 !== void 0 ? _13 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: subtext }, subtextStyle);
29614
+ const maintextHeight = this._mainTitle ? (_w = this._mainTitle) === null || _w === void 0 ? void 0 : _w.AABBBounds.height() : 0;
29615
+ const maintextWidth = this._mainTitle ? (_x = this._mainTitle) === null || _x === void 0 ? void 0 : _x.AABBBounds.width() : 0;
29616
+ if (((_y = this.attribute) === null || _y === void 0 ? void 0 : _y.visible) !== false && (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.visible) !== false) {
29617
+ if (subtextType === 'rich' || vutils.isValid(subtextStyle.character)) {
29618
+ const attr = Object.assign({ x: (_z = subtextStyle.x) !== null && _z !== void 0 ? _z : 0, y: (_0 = subtextStyle.y) !== null && _0 !== void 0 ? _0 : 0, width: (_2 = (_1 = subtextStyle.width) !== null && _1 !== void 0 ? _1 : width) !== null && _2 !== void 0 ? _2 : 0, height: (_4 = (_3 = subtextStyle.height) !== null && _3 !== void 0 ? _3 : height) !== null && _4 !== void 0 ? _4 : 0, ellipsis: (_5 = subtextStyle.ellipsis) !== null && _5 !== void 0 ? _5 : true, wordBreak: (_6 = subtextStyle.wordBreak) !== null && _6 !== void 0 ? _6 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: (_7 = subtextStyle.character) !== null && _7 !== void 0 ? _7 : subtext }, subtextStyle);
29578
29619
  this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29579
29620
  }
29580
- else if (textType === 'html') {
29581
- const attr = Object.assign({ html: Object.assign({ dom: subtext, container: '', width: 30, height: 30, style: {} }, subtextStyle), x: (_14 = subtextStyle.x) !== null && _14 !== void 0 ? _14 : 0, y: (_15 = subtextStyle.y) !== null && _15 !== void 0 ? _15 : 0, width: (_17 = (_16 = subtextStyle.width) !== null && _16 !== void 0 ? _16 : width) !== null && _17 !== void 0 ? _17 : 0, height: (_19 = (_18 = subtextStyle.height) !== null && _18 !== void 0 ? _18 : height) !== null && _19 !== void 0 ? _19 : 0, ellipsis: (_20 = subtextStyle.ellipsis) !== null && _20 !== void 0 ? _20 : true, wordBreak: (_21 = subtextStyle.wordBreak) !== null && _21 !== void 0 ? _21 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: [] }, subtextStyle);
29582
- this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29583
- }
29584
- else if (subtextStyle && vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.character)) {
29585
- const attr = {
29586
- x: (_22 = subtextStyle.x) !== null && _22 !== void 0 ? _22 : 0,
29587
- y: (_23 = subtextStyle.y) !== null && _23 !== void 0 ? _23 : maintextHeight,
29588
- width: (_25 = (_24 = subtextStyle.width) !== null && _24 !== void 0 ? _24 : width) !== null && _25 !== void 0 ? _25 : 0,
29589
- height: (_27 = (_26 = subtextStyle.height) !== null && _26 !== void 0 ? _26 : height) !== null && _27 !== void 0 ? _27 : 0,
29590
- ellipsis: (_28 = subtextStyle.ellipsis) !== null && _28 !== void 0 ? _28 : true,
29591
- wordBreak: (_29 = subtextStyle.wordBreak) !== null && _29 !== void 0 ? _29 : 'break-word',
29592
- maxHeight: subtextStyle.maxHeight,
29593
- maxWidth: subtextStyle.maxWidth,
29594
- textConfig: subtextStyle.character
29595
- };
29621
+ else if (subtextType === 'html') {
29622
+ const attr = Object.assign({ html: Object.assign(Object.assign({ dom: subtext }, DEFAULT_HTML_TEXT_SPEC), subtextStyle), x: (_8 = subtextStyle.x) !== null && _8 !== void 0 ? _8 : 0, y: (_9 = subtextStyle.y) !== null && _9 !== void 0 ? _9 : 0, width: (_11 = (_10 = subtextStyle.width) !== null && _10 !== void 0 ? _10 : width) !== null && _11 !== void 0 ? _11 : 0, height: (_13 = (_12 = subtextStyle.height) !== null && _12 !== void 0 ? _12 : height) !== null && _13 !== void 0 ? _13 : 0, ellipsis: (_14 = subtextStyle.ellipsis) !== null && _14 !== void 0 ? _14 : true, wordBreak: (_15 = subtextStyle.wordBreak) !== null && _15 !== void 0 ? _15 : 'break-word', maxHeight: subtextStyle.maxHeight, maxWidth: subtextStyle.maxWidth, textConfig: [] }, subtextStyle);
29596
29623
  this._subTitle = group.createOrUpdateChild('subTitle', attr, 'richtext');
29597
29624
  }
29598
29625
  else if (vutils.isValid(subtext)) {
29599
- this._subTitle = group.createOrUpdateChild('subTitle', Object.assign(Object.assign({ text: [subtext] }, subtextStyle), { maxLineWidth: (_30 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _30 !== void 0 ? _30 : width, heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit, lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp, ellipsis: (_31 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _31 !== void 0 ? _31 : true, x: 0, y: maintextHeight }), 'wrapText');
29626
+ this._subTitle = group.createOrUpdateChild('subTitle', Object.assign(Object.assign({ text: [subtext] }, subtextStyle), { maxLineWidth: (_16 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.maxLineWidth) !== null && _16 !== void 0 ? _16 : width, heightLimit: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.heightLimit, lineClamp: subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.lineClamp, ellipsis: (_17 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.ellipsis) !== null && _17 !== void 0 ? _17 : true, x: 0, y: maintextHeight }), 'wrapText');
29600
29627
  }
29601
29628
  }
29602
- const subtextHeight = this._subTitle ? (_32 = this._subTitle) === null || _32 === void 0 ? void 0 : _32.AABBBounds.height() : 0;
29603
- const subtextWidth = this._subTitle ? (_33 = this._subTitle) === null || _33 === void 0 ? void 0 : _33.AABBBounds.width() : 0;
29629
+ const subtextHeight = this._subTitle ? (_18 = this._subTitle) === null || _18 === void 0 ? void 0 : _18.AABBBounds.height() : 0;
29630
+ const subtextWidth = this._subTitle ? (_19 = this._subTitle) === null || _19 === void 0 ? void 0 : _19.AABBBounds.width() : 0;
29604
29631
  let titleWidth = Math.max(maintextWidth, subtextWidth);
29605
- let titleHeight = maintextHeight + ((_34 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _34 !== void 0 ? _34 : subtextHeight);
29632
+ let titleHeight = maintextHeight + ((_20 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _20 !== void 0 ? _20 : subtextHeight);
29606
29633
  if (vutils.isValid(width)) {
29607
29634
  titleWidth = width;
29608
- (_35 = this._mainTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('maxLineWidth', width);
29609
- (_36 = this._subTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('maxLineWidth', width);
29635
+ (_21 = this._mainTitle) === null || _21 === void 0 ? void 0 : _21.setAttribute('maxLineWidth', width);
29636
+ (_22 = this._subTitle) === null || _22 === void 0 ? void 0 : _22.setAttribute('maxLineWidth', width);
29610
29637
  }
29611
29638
  if (vutils.isValid(height)) {
29612
29639
  titleHeight = height;
@@ -29615,10 +29642,10 @@
29615
29642
  titleWidth = minWidth;
29616
29643
  }
29617
29644
  if (vutils.isValid(maxWidth)) {
29618
- (_37 = this._mainTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('maxLineWidth', maxWidth);
29619
- (_38 = this._subTitle) === null || _38 === void 0 ? void 0 : _38.setAttribute('maxLineWidth', maxWidth);
29620
- (_39 = this._mainTitle) === null || _39 === void 0 ? void 0 : _39.setAttribute('maxWidth', maxWidth);
29621
- (_40 = this._subTitle) === null || _40 === void 0 ? void 0 : _40.setAttribute('maxWidth', maxWidth);
29645
+ (_23 = this._mainTitle) === null || _23 === void 0 ? void 0 : _23.setAttribute('maxLineWidth', maxWidth);
29646
+ (_24 = this._subTitle) === null || _24 === void 0 ? void 0 : _24.setAttribute('maxLineWidth', maxWidth);
29647
+ (_25 = this._mainTitle) === null || _25 === void 0 ? void 0 : _25.setAttribute('maxWidth', maxWidth);
29648
+ (_26 = this._subTitle) === null || _26 === void 0 ? void 0 : _26.setAttribute('maxWidth', maxWidth);
29622
29649
  if (titleWidth > maxWidth) {
29623
29650
  titleWidth = maxWidth;
29624
29651
  }
@@ -29627,8 +29654,8 @@
29627
29654
  titleHeight = minHeight;
29628
29655
  }
29629
29656
  if (vutils.isValid(maxHeight)) {
29630
- (_41 = this._mainTitle) === null || _41 === void 0 ? void 0 : _41.setAttribute('maxHeight', maxHeight);
29631
- (_42 = this._subTitle) === null || _42 === void 0 ? void 0 : _42.setAttribute('maxHeight', maxHeight - maintextHeight);
29657
+ (_27 = this._mainTitle) === null || _27 === void 0 ? void 0 : _27.setAttribute('maxHeight', maxHeight);
29658
+ (_28 = this._subTitle) === null || _28 === void 0 ? void 0 : _28.setAttribute('maxHeight', maxHeight - maintextHeight);
29632
29659
  if (titleHeight > maxHeight) {
29633
29660
  titleHeight = maxHeight;
29634
29661
  }
@@ -29638,67 +29665,67 @@
29638
29665
  group.attribute.boundsPadding = parsedPadding;
29639
29666
  if (vutils.isValid(align) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.align)) {
29640
29667
  const mainTitleAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.align) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.align : align;
29641
- const mainTitleWidth = (_43 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _43 !== void 0 ? _43 : maintextWidth;
29668
+ const mainTitleWidth = (_29 = textStyle === null || textStyle === void 0 ? void 0 : textStyle.width) !== null && _29 !== void 0 ? _29 : maintextWidth;
29642
29669
  if (mainTitleAlign === 'left') {
29643
- (_44 = this._mainTitle) === null || _44 === void 0 ? void 0 : _44.setAttribute('x', 0);
29644
- (_45 = this._mainTitle) === null || _45 === void 0 ? void 0 : _45.setAttribute('textAlign', 'left');
29670
+ (_30 = this._mainTitle) === null || _30 === void 0 ? void 0 : _30.setAttribute('x', 0);
29671
+ (_31 = this._mainTitle) === null || _31 === void 0 ? void 0 : _31.setAttribute('textAlign', 'left');
29645
29672
  }
29646
29673
  else if (mainTitleAlign === 'center') {
29647
- (_46 = this._mainTitle) === null || _46 === void 0 ? void 0 : _46.setAttribute('x', mainTitleWidth / 2);
29648
- (_47 = this._mainTitle) === null || _47 === void 0 ? void 0 : _47.setAttribute('textAlign', 'center');
29674
+ (_32 = this._mainTitle) === null || _32 === void 0 ? void 0 : _32.setAttribute('x', mainTitleWidth / 2);
29675
+ (_33 = this._mainTitle) === null || _33 === void 0 ? void 0 : _33.setAttribute('textAlign', 'center');
29649
29676
  }
29650
29677
  else if (mainTitleAlign === 'right') {
29651
- (_48 = this._mainTitle) === null || _48 === void 0 ? void 0 : _48.setAttribute('x', mainTitleWidth);
29652
- (_49 = this._mainTitle) === null || _49 === void 0 ? void 0 : _49.setAttribute('textAlign', 'right');
29678
+ (_34 = this._mainTitle) === null || _34 === void 0 ? void 0 : _34.setAttribute('x', mainTitleWidth);
29679
+ (_35 = this._mainTitle) === null || _35 === void 0 ? void 0 : _35.setAttribute('textAlign', 'right');
29653
29680
  }
29654
29681
  }
29655
29682
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29656
29683
  const mainTitleVerticalAlign = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign : verticalAlign;
29657
29684
  const mainTitleHeight = (textStyle === null || textStyle === void 0 ? void 0 : textStyle.height) ? textStyle === null || textStyle === void 0 ? void 0 : textStyle.height : titleHeight;
29658
29685
  if (mainTitleVerticalAlign === 'top') {
29659
- (_50 = this._mainTitle) === null || _50 === void 0 ? void 0 : _50.setAttribute('y', 0);
29660
- (_51 = this._mainTitle) === null || _51 === void 0 ? void 0 : _51.setAttribute('textBaseline', 'top');
29686
+ (_36 = this._mainTitle) === null || _36 === void 0 ? void 0 : _36.setAttribute('y', 0);
29687
+ (_37 = this._mainTitle) === null || _37 === void 0 ? void 0 : _37.setAttribute('textBaseline', 'top');
29661
29688
  }
29662
29689
  else if (mainTitleVerticalAlign === 'middle') {
29663
- (_52 = this._mainTitle) === null || _52 === void 0 ? void 0 : _52.setAttribute('y', mainTitleHeight / 2);
29664
- (_53 = this._mainTitle) === null || _53 === void 0 ? void 0 : _53.setAttribute('textBaseline', 'middle');
29690
+ (_38 = this._mainTitle) === null || _38 === void 0 ? void 0 : _38.setAttribute('y', mainTitleHeight / 2);
29691
+ (_39 = this._mainTitle) === null || _39 === void 0 ? void 0 : _39.setAttribute('textBaseline', 'middle');
29665
29692
  }
29666
29693
  else if (mainTitleVerticalAlign === 'bottom') {
29667
- (_54 = this._mainTitle) === null || _54 === void 0 ? void 0 : _54.setAttribute('y', mainTitleHeight);
29668
- (_55 = this._mainTitle) === null || _55 === void 0 ? void 0 : _55.setAttribute('textBaseline', 'bottom');
29694
+ (_40 = this._mainTitle) === null || _40 === void 0 ? void 0 : _40.setAttribute('y', mainTitleHeight);
29695
+ (_41 = this._mainTitle) === null || _41 === void 0 ? void 0 : _41.setAttribute('textBaseline', 'bottom');
29669
29696
  }
29670
29697
  }
29671
29698
  if (vutils.isValid(align) || vutils.isValid(subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align)) {
29672
29699
  const subTitleAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.align : align;
29673
- const subTitleWidth = (_56 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _56 !== void 0 ? _56 : subtextWidth;
29700
+ const subTitleWidth = (_42 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.width) !== null && _42 !== void 0 ? _42 : subtextWidth;
29674
29701
  if (subTitleAlign === 'left') {
29675
- (_57 = this._subTitle) === null || _57 === void 0 ? void 0 : _57.setAttribute('x', 0);
29676
- (_58 = this._subTitle) === null || _58 === void 0 ? void 0 : _58.setAttribute('textAlign', 'left');
29702
+ (_43 = this._subTitle) === null || _43 === void 0 ? void 0 : _43.setAttribute('x', 0);
29703
+ (_44 = this._subTitle) === null || _44 === void 0 ? void 0 : _44.setAttribute('textAlign', 'left');
29677
29704
  }
29678
29705
  else if (subTitleAlign === 'center') {
29679
- (_59 = this._subTitle) === null || _59 === void 0 ? void 0 : _59.setAttribute('x', subTitleWidth / 2);
29680
- (_60 = this._subTitle) === null || _60 === void 0 ? void 0 : _60.setAttribute('textAlign', 'center');
29706
+ (_45 = this._subTitle) === null || _45 === void 0 ? void 0 : _45.setAttribute('x', subTitleWidth / 2);
29707
+ (_46 = this._subTitle) === null || _46 === void 0 ? void 0 : _46.setAttribute('textAlign', 'center');
29681
29708
  }
29682
29709
  else if (subTitleAlign === 'right') {
29683
- (_61 = this._subTitle) === null || _61 === void 0 ? void 0 : _61.setAttribute('x', subTitleWidth);
29684
- (_62 = this._subTitle) === null || _62 === void 0 ? void 0 : _62.setAttribute('textAlign', 'right');
29710
+ (_47 = this._subTitle) === null || _47 === void 0 ? void 0 : _47.setAttribute('x', subTitleWidth);
29711
+ (_48 = this._subTitle) === null || _48 === void 0 ? void 0 : _48.setAttribute('textAlign', 'right');
29685
29712
  }
29686
29713
  }
29687
29714
  if (vutils.isValid(verticalAlign) || vutils.isValid(textStyle === null || textStyle === void 0 ? void 0 : textStyle.verticalAlign)) {
29688
29715
  const subTitleVerticalAlign = (subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign) ? subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.verticalAlign : verticalAlign;
29689
29716
  const subTitleYStart = maintextHeight;
29690
- const subTitleHeight = (_63 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _63 !== void 0 ? _63 : 0;
29717
+ const subTitleHeight = (_49 = subtextStyle === null || subtextStyle === void 0 ? void 0 : subtextStyle.height) !== null && _49 !== void 0 ? _49 : 0;
29691
29718
  if (subTitleVerticalAlign === 'top') {
29692
- (_64 = this._subTitle) === null || _64 === void 0 ? void 0 : _64.setAttribute('y', subTitleYStart);
29693
- (_65 = this._subTitle) === null || _65 === void 0 ? void 0 : _65.setAttribute('textBaseline', 'top');
29719
+ (_50 = this._subTitle) === null || _50 === void 0 ? void 0 : _50.setAttribute('y', subTitleYStart);
29720
+ (_51 = this._subTitle) === null || _51 === void 0 ? void 0 : _51.setAttribute('textBaseline', 'top');
29694
29721
  }
29695
29722
  else if (subTitleVerticalAlign === 'middle') {
29696
- (_66 = this._subTitle) === null || _66 === void 0 ? void 0 : _66.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29697
- (_67 = this._subTitle) === null || _67 === void 0 ? void 0 : _67.setAttribute('textBaseline', 'middle');
29723
+ (_52 = this._subTitle) === null || _52 === void 0 ? void 0 : _52.setAttribute('y', subTitleYStart + subTitleHeight / 2);
29724
+ (_53 = this._subTitle) === null || _53 === void 0 ? void 0 : _53.setAttribute('textBaseline', 'middle');
29698
29725
  }
29699
29726
  else if (subTitleVerticalAlign === 'bottom') {
29700
- (_68 = this._subTitle) === null || _68 === void 0 ? void 0 : _68.setAttribute('y', subTitleYStart + subTitleHeight);
29701
- (_69 = this._subTitle) === null || _69 === void 0 ? void 0 : _69.setAttribute('textBaseline', 'bottom');
29727
+ (_54 = this._subTitle) === null || _54 === void 0 ? void 0 : _54.setAttribute('y', subTitleYStart + subTitleHeight);
29728
+ (_55 = this._subTitle) === null || _55 === void 0 ? void 0 : _55.setAttribute('textBaseline', 'bottom');
29702
29729
  }
29703
29730
  }
29704
29731
  }
@@ -29768,7 +29795,7 @@
29768
29795
  this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({ textConfig: titleStyle.text }, titleStyle), { visible: title.visible, x: 0, y: 0, width: (_a = titleStyle.width) !== null && _a !== void 0 ? _a : 0, height: (_b = titleStyle.height) !== null && _b !== void 0 ? _b : 0 }), 'richtext');
29769
29796
  }
29770
29797
  else if (titleStyle.type === 'html') {
29771
- this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({ textConfig: [], html: Object.assign({ dom: titleStyle.text, container: '', width: 30, height: 30, style: {} }, titleStyle) }, titleStyle), { visible: title.visible, x: 0, y: 0 }), 'richtext');
29798
+ this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({ textConfig: [], html: Object.assign(Object.assign({ dom: titleStyle.text }, DEFAULT_HTML_TEXT_SPEC), titleStyle) }, titleStyle), { visible: title.visible, x: 0, y: 0 }), 'richtext');
29772
29799
  }
29773
29800
  else {
29774
29801
  this._title = group.createOrUpdateChild('indicator-title', Object.assign(Object.assign({}, titleStyle), { lineHeight: vutils.isValid(titleStyle.lineHeight) ? titleStyle.lineHeight : titleStyle.fontSize, visible: title.visible, x: 0, y: 0 }), 'text');
@@ -29801,7 +29828,7 @@
29801
29828
  contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({ textConfig: contentStyle.text }, contentStyle), { visible: title.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight, width: (_a = contentStyle.width) !== null && _a !== void 0 ? _a : 0, height: (_b = contentStyle.height) !== null && _b !== void 0 ? _b : 0 }), 'richtext');
29802
29829
  }
29803
29830
  else if (contentStyle.type === 'html') {
29804
- contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({ textConfig: [], html: Object.assign({ dom: contentStyle.text, container: '', width: 30, height: 30, style: {} }, contentStyle) }, contentStyle), { visible: title.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'richtext');
29831
+ contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({ textConfig: [], html: Object.assign(Object.assign({ dom: contentStyle.text }, DEFAULT_HTML_TEXT_SPEC), contentStyle) }, contentStyle), { visible: title.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'richtext');
29805
29832
  }
29806
29833
  else {
29807
29834
  contentComponent = group.createOrUpdateChild('indicator-content-' + i, Object.assign(Object.assign({}, contentStyle), { lineHeight: vutils.isValid(contentStyle.lineHeight) ? contentStyle.lineHeight : contentStyle.fontSize, visible: contentItem.visible, x: 0, y: titleHeight + titleSpace + lastContentHeight }), 'text');
@@ -29829,7 +29856,7 @@
29829
29856
  }
29830
29857
  _setAutoFit(limit, indicatorItem, indicatorItemSpec) {
29831
29858
  var _a, _b, _c, _d, _e, _f;
29832
- const originWidth = measureTextSize((_b = (_a = indicatorItemSpec.style) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : '', (_c = indicatorItemSpec.style) !== null && _c !== void 0 ? _c : {}).width;
29859
+ const originWidth = measureTextSize(((_b = (_a = indicatorItemSpec.style) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : ''), ((_c = indicatorItemSpec.style) !== null && _c !== void 0 ? _c : {})).width;
29833
29860
  if (originWidth > 0) {
29834
29861
  const ratio = (limit * ((_d = indicatorItemSpec.fitPercent) !== null && _d !== void 0 ? _d : 0.5)) / originWidth;
29835
29862
  const fontSize = Math.floor(((_f = (_e = indicatorItemSpec.style) === null || _e === void 0 ? void 0 : _e.fontSize) !== null && _f !== void 0 ? _f : 20) * ratio);
@@ -31068,7 +31095,7 @@
31068
31095
  };
31069
31096
  const getRichTextAttribute = (attr) => {
31070
31097
  const { width, height, wordBreak = 'break-word', textAlign, textBaseline, text } = attr;
31071
- if (typeof text === 'object') {
31098
+ if (Array.isArray(text)) {
31072
31099
  return {
31073
31100
  width,
31074
31101
  height,
@@ -31076,7 +31103,7 @@
31076
31103
  textAlign: textAlign,
31077
31104
  textBaseline: textBaseline,
31078
31105
  singleLine: false,
31079
- textConfig: text.text
31106
+ textConfig: vutils.array(text).map(text => (Object.assign(Object.assign({}, attr), { text })))
31080
31107
  };
31081
31108
  }
31082
31109
  return {
@@ -31086,7 +31113,7 @@
31086
31113
  textAlign: textAlign,
31087
31114
  textBaseline: textBaseline,
31088
31115
  singleLine: false,
31089
- textConfig: vutils.array(text).map(text => (Object.assign(Object.assign({}, attr), { text })))
31116
+ textConfig: text.text
31090
31117
  };
31091
31118
  };
31092
31119
 
@@ -31202,7 +31229,7 @@
31202
31229
  this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ visible: isVisible(titleAttr) && isVisible(titleAttr.value) }, getRichTextAttribute(titleAttr.value)), 'richtext');
31203
31230
  }
31204
31231
  else if (titleAttr.value.text.type === 'html') {
31205
- this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ html: Object.assign({ dom: titleAttr.value.text.text, container: '', width: 30, height: 30, style: {} }, titleAttr.value), visible: isVisible(titleAttr) && isVisible(titleAttr.value), width: titleAttr.value.width, height: titleAttr.value.height, wordBreak: titleAttr.value.wordBreak, textAlign: titleAttr.value.textAlign, textBaseline: titleAttr.value.textBaseline, singleLine: false, textConfig: [] }, titleAttr.value), 'richtext');
31232
+ this._tooltipTitle = this._tooltipTitleContainer.createOrUpdateChild(`${TOOLTIP_TITLE_NAME}-${TOOLTIP_VALUE_NAME_SUFFIX}`, Object.assign({ html: Object.assign(Object.assign({ dom: titleAttr.value.text.text }, DEFAULT_HTML_TEXT_SPEC), titleAttr.value), visible: isVisible(titleAttr) && isVisible(titleAttr.value), width: titleAttr.value.width, height: titleAttr.value.height, wordBreak: titleAttr.value.wordBreak, textAlign: titleAttr.value.textAlign, textBaseline: titleAttr.value.textBaseline, singleLine: false, textConfig: [] }, titleAttr.value), 'richtext');
31206
31233
  }
31207
31234
  }
31208
31235
  else if (titleAttr.value.multiLine) {
@@ -31271,7 +31298,7 @@
31271
31298
  }
31272
31299
  else {
31273
31300
  element = itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_VALUE_NAME_SUFFIX}`, {
31274
- html: Object.assign({ dom: itemAttr.key.text.text, container: '', width: 30, height: 30, style: {} }, itemAttr.key)
31301
+ html: Object.assign(Object.assign({ dom: itemAttr.key.text.text }, DEFAULT_HTML_TEXT_SPEC), itemAttr.key)
31275
31302
  }, 'richtext');
31276
31303
  }
31277
31304
  }
@@ -31659,11 +31686,12 @@
31659
31686
  }
31660
31687
  };
31661
31688
 
31662
- const version = "0.16.17-alpha.3";
31689
+ const version = "0.16.17-alpha.8";
31663
31690
 
31664
31691
  exports.AbstractComponent = AbstractComponent;
31665
31692
  exports.ArcInfo = ArcInfo;
31666
31693
  exports.ArcLabel = ArcLabel;
31694
+ exports.AreaLabel = AreaLabel;
31667
31695
  exports.BasePlayer = BasePlayer;
31668
31696
  exports.Brush = Brush;
31669
31697
  exports.CheckBox = CheckBox;