@visactor/vrender-components 0.17.5-alpha.1 → 0.17.6

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 (53) hide show
  1. package/cjs/index.d.ts +1 -1
  2. package/cjs/index.js +1 -1
  3. package/cjs/index.js.map +1 -1
  4. package/cjs/label/base.js +1 -1
  5. package/cjs/label/base.js.map +1 -1
  6. package/cjs/poptip/index.d.ts +2 -1
  7. package/cjs/poptip/index.js +9 -5
  8. package/cjs/poptip/index.js.map +1 -1
  9. package/cjs/poptip/module.d.ts +3 -0
  10. package/cjs/poptip/module.js +21 -0
  11. package/cjs/poptip/module.js.map +1 -0
  12. package/cjs/poptip/poptip-plugin.js +1 -1
  13. package/cjs/poptip/poptip-plugin.js.map +1 -1
  14. package/cjs/poptip/poptip.js.map +1 -1
  15. package/cjs/poptip/register.d.ts +0 -3
  16. package/cjs/poptip/register.js +3 -15
  17. package/cjs/poptip/register.js.map +1 -1
  18. package/cjs/scrollbar/module.d.ts +3 -0
  19. package/cjs/scrollbar/module.js +17 -0
  20. package/cjs/scrollbar/module.js.map +1 -0
  21. package/cjs/scrollbar/register.d.ts +0 -3
  22. package/cjs/scrollbar/register.js +3 -10
  23. package/cjs/scrollbar/register.js.map +1 -1
  24. package/cjs/util/label-smartInvert.js +5 -11
  25. package/cjs/util/label-smartInvert.js.map +1 -1
  26. package/dist/index.js +345 -551
  27. package/dist/index.min.js +1 -1
  28. package/es/index.d.ts +1 -1
  29. package/es/index.js +1 -1
  30. package/es/index.js.map +1 -1
  31. package/es/label/base.js +1 -1
  32. package/es/label/base.js.map +1 -1
  33. package/es/poptip/index.d.ts +2 -1
  34. package/es/poptip/index.js +3 -1
  35. package/es/poptip/index.js.map +1 -1
  36. package/es/poptip/module.d.ts +3 -0
  37. package/es/poptip/module.js +17 -0
  38. package/es/poptip/module.js.map +1 -0
  39. package/es/poptip/poptip-plugin.js +1 -1
  40. package/es/poptip/poptip-plugin.js.map +1 -1
  41. package/es/poptip/poptip.js.map +1 -1
  42. package/es/poptip/register.d.ts +0 -3
  43. package/es/poptip/register.js +0 -17
  44. package/es/poptip/register.js.map +1 -1
  45. package/es/scrollbar/module.d.ts +3 -0
  46. package/es/scrollbar/module.js +12 -0
  47. package/es/scrollbar/module.js.map +1 -0
  48. package/es/scrollbar/register.d.ts +0 -3
  49. package/es/scrollbar/register.js +0 -12
  50. package/es/scrollbar/register.js.map +1 -1
  51. package/es/util/label-smartInvert.js +3 -9
  52. package/es/util/label-smartInvert.js.map +1 -1
  53. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1476,7 +1476,7 @@
1476
1476
  var EnvContribution = Symbol["for"]("EnvContribution");
1477
1477
  var VGlobal = Symbol["for"]("VGlobal");
1478
1478
 
1479
- var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
1479
+ var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
1480
1480
  var d,
1481
1481
  c = arguments.length,
1482
1482
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -1726,7 +1726,7 @@
1726
1726
  }]);
1727
1727
  return DefaultGlobal;
1728
1728
  }();
1729
- DefaultGlobal = __decorate$R([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(EnvContribution)), __metadata$G("design:paramtypes", [Object])], DefaultGlobal);
1729
+ DefaultGlobal = __decorate$S([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(EnvContribution)), __metadata$G("design:paramtypes", [Object])], DefaultGlobal);
1730
1730
 
1731
1731
  var circleThreshold = vutils.tau - 1e-8;
1732
1732
  var BoundsContext = /*#__PURE__*/function () {
@@ -3167,7 +3167,8 @@
3167
3167
  whiteSpace: "no-wrap",
3168
3168
  heightLimit: 1 / 0,
3169
3169
  lineClamp: 1 / 0,
3170
- suffixPosition: "end"
3170
+ suffixPosition: "end",
3171
+ disableAutoClipedPoptip: void 0
3171
3172
  };
3172
3173
  var DefaultPickStyle = {
3173
3174
  pickStrokeBuffer: 0
@@ -3456,7 +3457,7 @@
3456
3457
  return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
3457
3458
  }
3458
3459
 
3459
- var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3460
+ var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3460
3461
  var d,
3461
3462
  c = arguments.length,
3462
3463
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -3761,9 +3762,9 @@
3761
3762
  }]);
3762
3763
  return ATextMeasure;
3763
3764
  }();
3764
- ATextMeasure = __decorate$Q([injectable()], ATextMeasure);
3765
+ ATextMeasure = __decorate$R([injectable()], ATextMeasure);
3765
3766
 
3766
- var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3767
+ var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3767
3768
  var d,
3768
3769
  c = arguments.length,
3769
3770
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -3780,7 +3781,7 @@
3780
3781
  }
3781
3782
  return _createClass(DefaultTextMeasureContribution);
3782
3783
  }(ATextMeasure);
3783
- DefaultTextMeasureContribution = __decorate$P([injectable()], DefaultTextMeasureContribution);
3784
+ DefaultTextMeasureContribution = __decorate$Q([injectable()], DefaultTextMeasureContribution);
3784
3785
 
3785
3786
  var container = new Container();
3786
3787
 
@@ -3858,7 +3859,7 @@
3858
3859
  }();
3859
3860
  var canvasAllocate = new DefaultCanvasAllocate();
3860
3861
 
3861
- var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3862
+ var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
3862
3863
  var d,
3863
3864
  c = arguments.length,
3864
3865
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -3950,7 +3951,7 @@
3950
3951
  }]);
3951
3952
  return DefaultGraphicUtil;
3952
3953
  }();
3953
- DefaultGraphicUtil = __decorate$O([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(TextMeasureContribution)), __metadata$F("design:paramtypes", [Object])], DefaultGraphicUtil);
3954
+ DefaultGraphicUtil = __decorate$P([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(TextMeasureContribution)), __metadata$F("design:paramtypes", [Object])], DefaultGraphicUtil);
3954
3955
  var TransformMode;
3955
3956
  !function (TransformMode) {
3956
3957
  TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
@@ -4027,7 +4028,7 @@
4027
4028
  }]);
4028
4029
  return DefaultTransformUtil;
4029
4030
  }();
4030
- DefaultTransformUtil = __decorate$O([injectable(), __metadata$F("design:paramtypes", [])], DefaultTransformUtil);
4031
+ DefaultTransformUtil = __decorate$P([injectable(), __metadata$F("design:paramtypes", [])], DefaultTransformUtil);
4031
4032
 
4032
4033
  var defaultThemeObj = {
4033
4034
  arc: DefaultArcAttribute,
@@ -5734,7 +5735,6 @@
5734
5735
  Direction[Direction.LEFT_TO_RIGHT = 0] = "LEFT_TO_RIGHT", Direction[Direction.RIGHT_TO_LEFT = 1] = "RIGHT_TO_LEFT", Direction[Direction.TOP_TO_BOTTOM = 2] = "TOP_TO_BOTTOM", Direction[Direction.BOTTOM_TO_TOP = 3] = "BOTTOM_TO_TOP", Direction[Direction.STROKE = 4] = "STROKE";
5735
5736
  }(Direction || (Direction = {}));
5736
5737
 
5737
- var Color$1 = vutils.ColorUtil.Color;
5738
5738
  var ColorType;
5739
5739
  !function (ColorType) {
5740
5740
  ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
@@ -5751,7 +5751,7 @@
5751
5751
  if (size === ColorType.Color1) {
5752
5752
  var _color = ColorStore.store1[str];
5753
5753
  if (_color) return arr[0] = _color[0], arr[1] = _color[1], arr[2] = _color[2], arr[3] = _color[3], arr;
5754
- var _c = Color$1.parseColorString(str);
5754
+ var _c = vutils.Color.parseColorString(str);
5755
5755
  if (_c) {
5756
5756
  var data = [_c.r / 255, _c.g / 255, _c.b / 255, _c.opacity];
5757
5757
  ColorStore.store1[str] = data, ColorStore.store255[str] = [_c.r, _c.g, _c.b, _c.opacity], arr[0] = data[0], arr[1] = data[1], arr[2] = data[2], arr[3] = data[3];
@@ -5760,7 +5760,7 @@
5760
5760
  }
5761
5761
  var color = ColorStore.store255[str];
5762
5762
  if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
5763
- var c = Color$1.parseColorString(str);
5763
+ var c = vutils.Color.parseColorString(str);
5764
5764
  return c && (ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity], ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity], arr[0] = c.r, arr[1] = c.g, arr[2] = c.b, arr[3] = c.opacity), arr;
5765
5765
  }
5766
5766
  }, {
@@ -7554,7 +7554,7 @@
7554
7554
  var VirtualLayerHandlerContribution = Symbol["for"]("VirtualLayerHandlerContribution");
7555
7555
 
7556
7556
  var _DefaultLayerService_,
7557
- __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7557
+ __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7558
7558
  var d,
7559
7559
  c = arguments.length,
7560
7560
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7647,9 +7647,9 @@
7647
7647
  }]);
7648
7648
  return DefaultLayerService_1;
7649
7649
  }();
7650
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = _DefaultLayerService_ = __decorate$N([injectable(), __metadata$E("design:paramtypes", [])], DefaultLayerService);
7650
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = _DefaultLayerService_ = __decorate$O([injectable(), __metadata$E("design:paramtypes", [])], DefaultLayerService);
7651
7651
 
7652
- var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7652
+ var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7653
7653
  var d,
7654
7654
  c = arguments.length,
7655
7655
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7809,7 +7809,7 @@
7809
7809
  }]);
7810
7810
  return DefaultWindow;
7811
7811
  }();
7812
- DefaultWindow = __decorate$M([injectable(), __metadata$D("design:paramtypes", [])], DefaultWindow);
7812
+ DefaultWindow = __decorate$N([injectable(), __metadata$D("design:paramtypes", [])], DefaultWindow);
7813
7813
 
7814
7814
  var coreModule = new ContainerModule(function (bind) {
7815
7815
  bind(VGlobal).to(DefaultGlobal).inSingletonScope(), bind(VWindow).to(DefaultWindow), bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(DefaultLayerService).inSingletonScope();
@@ -8245,7 +8245,7 @@
8245
8245
  var _a;
8246
8246
  var attribute = this.attribute,
8247
8247
  textTheme = getTheme(this).text;
8248
- if (Array.isArray(attribute.text)) return;
8248
+ if (this.isMultiLine) return;
8249
8249
  var _attribute$maxLineWid = attribute.maxLineWidth,
8250
8250
  maxLineWidth = _attribute$maxLineWid === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid;
8251
8251
  return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
@@ -8253,14 +8253,14 @@
8253
8253
  }, {
8254
8254
  key: "clipedWidth",
8255
8255
  get: function get() {
8256
- if (!Array.isArray(this.attribute.text)) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
8256
+ if (!this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
8257
8257
  }
8258
8258
  }, {
8259
8259
  key: "cliped",
8260
8260
  get: function get() {
8261
8261
  var textTheme = getTheme(this).text,
8262
8262
  attribute = this.attribute;
8263
- if (Array.isArray(attribute.text)) return;
8263
+ if (this.isMultiLine) return;
8264
8264
  var _attribute$maxLineWid2 = attribute.maxLineWidth,
8265
8265
  maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
8266
8266
  return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), this.clipedText !== attribute.text.toString());
@@ -8268,7 +8268,12 @@
8268
8268
  }, {
8269
8269
  key: "multilineLayout",
8270
8270
  get: function get() {
8271
- if (Array.isArray(this.attribute.text)) return this.tryUpdateAABBBounds(), this.cache.layoutData;
8271
+ if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
8272
+ }
8273
+ }, {
8274
+ key: "isMultiLine",
8275
+ get: function get() {
8276
+ return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
8272
8277
  }
8273
8278
  }, {
8274
8279
  key: "isValid",
@@ -11435,7 +11440,7 @@
11435
11440
  var matrixAllocate = new DefaultMatrixAllocate();
11436
11441
  var mat4Allocate = new DefaultMat4Allocate();
11437
11442
 
11438
- var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11443
+ var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11439
11444
  var d,
11440
11445
  c = arguments.length,
11441
11446
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12102,7 +12107,7 @@
12102
12107
  }]);
12103
12108
  return DefaultGraphicService;
12104
12109
  }();
12105
- DefaultGraphicService = __decorate$L([injectable(), __param$x(0, inject(GraphicCreator$1)), __metadata$C("design:paramtypes", [Object])], DefaultGraphicService);
12110
+ DefaultGraphicService = __decorate$M([injectable(), __param$x(0, inject(GraphicCreator$1)), __metadata$C("design:paramtypes", [Object])], DefaultGraphicService);
12106
12111
 
12107
12112
  var GraphicCreator = /*#__PURE__*/function () {
12108
12113
  function GraphicCreator() {
@@ -12387,7 +12392,7 @@
12387
12392
  }), canvasGradient.GetPattern(w + x, h + y, undefined);
12388
12393
  }
12389
12394
 
12390
- var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12395
+ var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12391
12396
  var d,
12392
12397
  c = arguments.length,
12393
12398
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12458,7 +12463,7 @@
12458
12463
  }]);
12459
12464
  return DefaultBaseInteractiveRenderContribution;
12460
12465
  }();
12461
- DefaultBaseInteractiveRenderContribution = __decorate$K([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(InteractiveSubRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
12466
+ DefaultBaseInteractiveRenderContribution = __decorate$L([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(InteractiveSubRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
12462
12467
  var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
12463
12468
  function DefaultBaseTextureRenderContribution() {
12464
12469
  _classCallCheck(this, DefaultBaseTextureRenderContribution);
@@ -12902,6 +12907,13 @@
12902
12907
  }
12903
12908
  var defaultImageBackgroundRenderContribution = new DefaultImageBackgroundRenderContribution();
12904
12909
 
12910
+ var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12911
+ var d,
12912
+ c = arguments.length,
12913
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12914
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12915
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
12916
+ };
12905
12917
  var DefaultRectRenderContribution = /*#__PURE__*/function () {
12906
12918
  function DefaultRectRenderContribution() {
12907
12919
  _classCallCheck(this, DefaultRectRenderContribution);
@@ -12986,6 +12998,7 @@
12986
12998
  }]);
12987
12999
  return SplitRectBeforeRenderContribution;
12988
13000
  }();
13001
+ SplitRectBeforeRenderContribution = __decorate$K([injectable()], SplitRectBeforeRenderContribution);
12989
13002
  var SplitRectAfterRenderContribution = /*#__PURE__*/function () {
12990
13003
  function SplitRectAfterRenderContribution() {
12991
13004
  _classCallCheck(this, SplitRectAfterRenderContribution);
@@ -13014,9 +13027,8 @@
13014
13027
  }]);
13015
13028
  return SplitRectAfterRenderContribution;
13016
13029
  }();
13030
+ SplitRectAfterRenderContribution = __decorate$K([injectable()], SplitRectAfterRenderContribution);
13017
13031
  var defaultRectRenderContribution = new DefaultRectRenderContribution();
13018
- var splitRectBeforeRenderContribution = new SplitRectBeforeRenderContribution();
13019
- var splitRectAfterRenderContribution = new SplitRectAfterRenderContribution();
13020
13032
  var defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
13021
13033
  var defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
13022
13034
 
@@ -14205,7 +14217,7 @@
14205
14217
  function DefaultCanvasRectRender(rectRenderContribitions) {
14206
14218
  var _this;
14207
14219
  _classCallCheck(this, DefaultCanvasRectRender);
14208
- _this = _super.call(this), _this.rectRenderContribitions = rectRenderContribitions, _this.type = "rect", _this.numberType = RECT_NUMBER_TYPE, _this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution, splitRectAfterRenderContribution, splitRectBeforeRenderContribution], _this.init(rectRenderContribitions);
14220
+ _this = _super.call(this), _this.rectRenderContribitions = rectRenderContribitions, _this.type = "rect", _this.numberType = RECT_NUMBER_TYPE, _this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], _this.init(rectRenderContribitions);
14209
14221
  return _this;
14210
14222
  }
14211
14223
  _createClass(DefaultCanvasRectRender, [{
@@ -14410,9 +14422,9 @@
14410
14422
  var _this2 = this;
14411
14423
  var _a, _b, _c;
14412
14424
  var textAttribute = getTheme(text, null == params ? void 0 : params.theme).text,
14413
- _text$attribute = text.attribute,
14414
- str = _text$attribute.text,
14415
- _text$attribute$under = _text$attribute.underline,
14425
+ _text$attribute = text.attribute;
14426
+ _text$attribute.text;
14427
+ var _text$attribute$under = _text$attribute.underline,
14416
14428
  underline = _text$attribute$under === void 0 ? textAttribute.underline : _text$attribute$under,
14417
14429
  _text$attribute$lineT = _text$attribute.lineThrough,
14418
14430
  lineThrough = _text$attribute$lineT === void 0 ? textAttribute.lineThrough : _text$attribute$lineT,
@@ -14420,7 +14432,9 @@
14420
14432
  keepDirIn3d = _text$attribute$keepD === void 0 ? textAttribute.keepDirIn3d : _text$attribute$keepD,
14421
14433
  _text$attribute$direc = _text$attribute.direction,
14422
14434
  direction = _text$attribute$direc === void 0 ? textAttribute.direction : _text$attribute$direc,
14423
- _text$attribute$fontS = _text$attribute.fontSize,
14435
+ _text$attribute$white = _text$attribute.whiteSpace;
14436
+ _text$attribute$white === void 0 ? textAttribute.whiteSpace : _text$attribute$white;
14437
+ var _text$attribute$fontS = _text$attribute.fontSize,
14424
14438
  fontSize = _text$attribute$fontS === void 0 ? textAttribute.fontSize : _text$attribute$fontS,
14425
14439
  _text$attribute$verti = _text$attribute.verticalMode,
14426
14440
  verticalMode = _text$attribute$verti === void 0 ? textAttribute.verticalMode : _text$attribute$verti,
@@ -14457,7 +14471,7 @@
14457
14471
  }
14458
14472
  doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), _this2.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
14459
14473
  };
14460
- if (Array.isArray(str)) {
14474
+ if (text.isMultiLine) {
14461
14475
  if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
14462
14476
  var multilineLayout = text.multilineLayout;
14463
14477
  if (!multilineLayout) return void context.highPerformanceRestore();
@@ -15095,6 +15109,11 @@
15095
15109
  value: function register(plugin) {
15096
15110
  "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.push(plugin) : "onRegister" === plugin.activeEvent && (this.onRegisterPlugin.push(plugin), plugin.activate(this));
15097
15111
  }
15112
+ }, {
15113
+ key: "unRegister",
15114
+ value: function unRegister(plugin) {
15115
+ "onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
15116
+ }
15098
15117
  }, {
15099
15118
  key: "release",
15100
15119
  value: function release() {
@@ -16656,7 +16675,7 @@
16656
16675
 
16657
16676
  var loadRectModule = !1;
16658
16677
  var rectModule = new ContainerModule(function (bind) {
16659
- loadRectModule || (loadRectModule = !0, bind(DefaultCanvasRectRender).toSelf().inSingletonScope(), bind(RectRender).to(DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(RectRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, RectRenderContribution));
16678
+ loadRectModule || (loadRectModule = !0, bind(DefaultCanvasRectRender).toSelf().inSingletonScope(), bind(RectRender).to(DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(SplitRectAfterRenderContribution).toSelf(), bind(SplitRectBeforeRenderContribution).toSelf(), bind(RectRenderContribution).toService(SplitRectAfterRenderContribution), bind(RectRenderContribution).toService(SplitRectBeforeRenderContribution), bind(RectRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, RectRenderContribution));
16660
16679
  });
16661
16680
 
16662
16681
  var loadLineModule = !1;
@@ -16947,277 +16966,6 @@
16947
16966
  }
16948
16967
  }
16949
16968
 
16950
- function __rest(s, e) {
16951
- var t = {};
16952
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
16953
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16954
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
16955
- }
16956
- return t;
16957
- }
16958
- function __decorate$m(decorators, target, key, desc) {
16959
- var c = arguments.length,
16960
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
16961
- d;
16962
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16963
- return c > 3 && r && Object.defineProperty(target, key, r), r;
16964
- }
16965
- function __awaiter(thisArg, _arguments, P, generator) {
16966
- function adopt(value) {
16967
- return value instanceof P ? value : new P(function (resolve) {
16968
- resolve(value);
16969
- });
16970
- }
16971
- return new (P || (P = Promise))(function (resolve, reject) {
16972
- function fulfilled(value) {
16973
- try {
16974
- step(generator.next(value));
16975
- } catch (e) {
16976
- reject(e);
16977
- }
16978
- }
16979
- function rejected(value) {
16980
- try {
16981
- step(generator["throw"](value));
16982
- } catch (e) {
16983
- reject(e);
16984
- }
16985
- }
16986
- function step(result) {
16987
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
16988
- }
16989
- step((generator = generator.apply(thisArg, _arguments || [])).next());
16990
- });
16991
- }
16992
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
16993
- var e = new Error(message);
16994
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
16995
- };
16996
-
16997
- var ScrollBarPlugin_1;
16998
- let ScrollBarPlugin = ScrollBarPlugin_1 = class ScrollBarPlugin {
16999
- constructor() {
17000
- this.name = 'scrollbar';
17001
- this.activeEvent = 'onRegister';
17002
- this._uid = Generator.GenAutoIncrementId();
17003
- this.key = this.name + this._uid;
17004
- this.scroll = (e) => {
17005
- var _a;
17006
- const graphic = e.target;
17007
- const data = this.getScrollContainer(graphic);
17008
- const { g: scrollContainer } = data;
17009
- let { showH, showV } = data;
17010
- if (!scrollContainer || scrollContainer.count === 1) {
17011
- return;
17012
- }
17013
- this.scrollContainerBounds = scrollContainer.AABBBounds.clone();
17014
- if (vutils.abs(e.deltaX) > vutils.abs(e.deltaY)) {
17015
- showH = showH && true;
17016
- showV = showV && false;
17017
- }
17018
- else {
17019
- showH = showH && false;
17020
- showV = showV && true;
17021
- }
17022
- scrollContainer.setAttributes({
17023
- scrollX: showH ? (scrollContainer.attribute.scrollX || 0) + e.deltaX : scrollContainer.attribute.scrollX || 0,
17024
- scrollY: showV ? (scrollContainer.attribute.scrollY || 0) + e.deltaY : scrollContainer.attribute.scrollY || 0
17025
- });
17026
- const childrenBounds = this.childrenBounds;
17027
- const scrollContainerBounds = this.scrollContainerBounds;
17028
- childrenBounds.clear();
17029
- scrollContainer.forEachChildren((c) => {
17030
- childrenBounds.union(c.AABBBounds);
17031
- });
17032
- childrenBounds.transformWithMatrix(scrollContainer.transMatrix);
17033
- if (showH && scrollContainerBounds.x1 <= childrenBounds.x1 && scrollContainerBounds.x2 >= childrenBounds.x2) {
17034
- showH = false;
17035
- }
17036
- if (showV && scrollContainerBounds.y1 <= childrenBounds.y1 && scrollContainerBounds.y2 >= childrenBounds.y2) {
17037
- showV = false;
17038
- }
17039
- const m = scrollContainer.transMatrix;
17040
- scrollContainerBounds.translate(-m.e, -m.f);
17041
- childrenBounds.translate(-m.e, -m.f);
17042
- if (showH) {
17043
- childrenBounds.x1 = vutils.min(childrenBounds.x1, scrollContainerBounds.x1);
17044
- childrenBounds.x2 = vutils.max(childrenBounds.x2, scrollContainerBounds.x2);
17045
- }
17046
- if (showV) {
17047
- childrenBounds.y1 = vutils.min(childrenBounds.y1, scrollContainerBounds.y1);
17048
- childrenBounds.y2 = vutils.max(childrenBounds.y2, scrollContainerBounds.y2);
17049
- }
17050
- childrenBounds.translate(scrollContainer.attribute.scrollX, scrollContainer.attribute.scrollY);
17051
- const shadowRoot = (_a = scrollContainer.shadowRoot) !== null && _a !== void 0 ? _a : scrollContainer.attachShadow();
17052
- const container = shadowRoot.createOrUpdateChild('scroll-bar', {}, 'group');
17053
- const { h, v, deltaH, deltaV } = this.addOrUpdateScroll(showH, showV, container, scrollContainer);
17054
- scrollContainer.setAttributes({
17055
- scrollX: h ? scrollContainer.attribute.scrollX || 0 : (scrollContainer.attribute.scrollX || 0) + deltaH,
17056
- scrollY: v ? scrollContainer.attribute.scrollY || 0 : (scrollContainer.attribute.scrollY || 0) + deltaV
17057
- });
17058
- };
17059
- }
17060
- activate(context) {
17061
- this.pluginService = context;
17062
- const { stage } = this.pluginService;
17063
- this.childrenBounds = new vutils.AABBBounds();
17064
- stage.addEventListener('wheel', this.scroll);
17065
- this.params = ScrollBarPlugin_1.defaultParams;
17066
- }
17067
- addOrUpdateScroll(showH, showV, container, scrollContainer) {
17068
- const scrollbars = container.children;
17069
- let h = false;
17070
- let v = false;
17071
- let deltaH = 0;
17072
- let deltaV = 0;
17073
- if (showH) {
17074
- const hScrollbar = scrollbars.filter((g) => g.attribute.direction !== 'vertical')[0];
17075
- const d = this.addOrUpdateHScroll(this.scrollContainerBounds, container, hScrollbar);
17076
- h = d.valid;
17077
- deltaH = d.delta;
17078
- this.disappearScrollBar(hScrollbar, v);
17079
- }
17080
- if (showV) {
17081
- const vScrollbar = scrollbars.filter((g) => g.attribute.direction === 'vertical')[0];
17082
- const d = this.addOrUpdateVScroll(this.scrollContainerBounds, container, vScrollbar);
17083
- v = d.valid;
17084
- deltaV = d.delta;
17085
- this.disappearScrollBar(vScrollbar, v);
17086
- }
17087
- return {
17088
- h,
17089
- deltaH,
17090
- v,
17091
- deltaV
17092
- };
17093
- }
17094
- addOrUpdateHScroll(scrollContainerB, container, scrollBar) {
17095
- if (!scrollBar) {
17096
- scrollBar = new ScrollBar({
17097
- direction: 'horizontal',
17098
- x: 0,
17099
- y: 0,
17100
- width: scrollContainerB.width(),
17101
- height: 12,
17102
- padding: [2, 0],
17103
- railStyle: {
17104
- fill: 'rgba(0, 0, 0, .1)'
17105
- },
17106
- range: [0, 0.05]
17107
- });
17108
- container.add(scrollBar);
17109
- }
17110
- const b = scrollBar.AABBBounds;
17111
- const childrenBounds = this.childrenBounds;
17112
- const y = scrollContainerB.y2 - b.height();
17113
- const ratio = Math.min(b.width() / this.childrenBounds.width(), 1);
17114
- let start = ((scrollContainerB.x1 - childrenBounds.x1) / (childrenBounds.width() - scrollContainerB.width())) * (1 - ratio);
17115
- let valid = true;
17116
- let delta = 0;
17117
- if (start < 0) {
17118
- start = 0;
17119
- valid = false;
17120
- delta = scrollContainerB.x1 - childrenBounds.x1;
17121
- }
17122
- else if (start + ratio > 1) {
17123
- start = 1 - ratio;
17124
- valid = false;
17125
- delta = scrollContainerB.x1 - childrenBounds.x1 - (childrenBounds.width() - scrollContainerB.width());
17126
- }
17127
- scrollBar.setAttributes({
17128
- y,
17129
- visibleAll: true,
17130
- range: [start, start + ratio]
17131
- });
17132
- return {
17133
- valid,
17134
- delta
17135
- };
17136
- }
17137
- addOrUpdateVScroll(scrollContainerB, container, scrollBar) {
17138
- if (!scrollBar) {
17139
- scrollBar = new ScrollBar({
17140
- direction: 'vertical',
17141
- x: 0,
17142
- y: 0,
17143
- width: 12,
17144
- height: scrollContainerB.height(),
17145
- padding: [2, 0],
17146
- railStyle: {
17147
- fill: 'rgba(0, 0, 0, .1)'
17148
- },
17149
- range: [0, 0.05]
17150
- });
17151
- container.add(scrollBar);
17152
- }
17153
- const b = scrollBar.AABBBounds;
17154
- const x = scrollContainerB.x2 - b.width();
17155
- const childrenBounds = this.childrenBounds;
17156
- const ratio = Math.min(b.height() / childrenBounds.height(), 1);
17157
- let start = ((scrollContainerB.y1 - childrenBounds.y1) / (childrenBounds.height() - scrollContainerB.height())) * (1 - ratio);
17158
- let valid = true;
17159
- let delta = 0;
17160
- if (start < 0) {
17161
- start = 0;
17162
- valid = false;
17163
- delta = scrollContainerB.y1 - childrenBounds.y1;
17164
- }
17165
- else if (start + ratio > 1) {
17166
- start = 1 - ratio;
17167
- valid = false;
17168
- delta = scrollContainerB.y1 - childrenBounds.y1 - (childrenBounds.height() - scrollContainerB.height());
17169
- }
17170
- scrollBar.setAttributes({
17171
- x,
17172
- visibleAll: true,
17173
- range: [start, start + ratio]
17174
- });
17175
- return {
17176
- valid,
17177
- delta
17178
- };
17179
- }
17180
- disappearScrollBar(scrollBar, valid) {
17181
- var _a;
17182
- if (scrollBar._plugin_timeout) {
17183
- clearTimeout(scrollBar._plugin_timeout);
17184
- }
17185
- scrollBar._plugin_timeout = setTimeout(() => {
17186
- scrollBar.setAttribute('visibleAll', false);
17187
- }, (_a = this.params.timeout) !== null && _a !== void 0 ? _a : 0);
17188
- }
17189
- getScrollContainer(graphic) {
17190
- let g = graphic;
17191
- while (g) {
17192
- if (g.attribute.overflow && g.attribute.overflow !== 'hidden') {
17193
- const overflow = g.attribute.overflow;
17194
- let showH = false;
17195
- let showV = false;
17196
- if (overflow === 'scroll') {
17197
- (showH = true), (showV = true);
17198
- }
17199
- else {
17200
- showH = overflow === 'scroll-x';
17201
- showV = !showH;
17202
- }
17203
- return { g: g, showH, showV };
17204
- }
17205
- g = g.parent;
17206
- }
17207
- return null;
17208
- }
17209
- deactivate(context) {
17210
- const { stage } = this.pluginService;
17211
- stage.removeEventListener('wheel', this.scroll);
17212
- }
17213
- };
17214
- ScrollBarPlugin.defaultParams = {
17215
- timeout: 500
17216
- };
17217
- ScrollBarPlugin = ScrollBarPlugin_1 = __decorate$m([
17218
- injectable()
17219
- ], ScrollBarPlugin);
17220
-
17221
16969
  var MathPickerContribution = Symbol["for"]("MathPickerContribution");
17222
16970
  var MathArcPicker = Symbol["for"]("MathArcPicker");
17223
16971
  var MathAreaPicker = Symbol["for"]("MathAreaPicker");
@@ -17242,7 +16990,7 @@
17242
16990
  var CanvasRichTextPicker = Symbol["for"]("CanvasRichTextPicker");
17243
16991
  var CanvasPickerContribution = Symbol["for"]("CanvasPickerContribution");
17244
16992
 
17245
- var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
16993
+ var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17246
16994
  var d,
17247
16995
  c = arguments.length,
17248
16996
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17294,14 +17042,14 @@
17294
17042
  }]);
17295
17043
  return DefaultCanvasArcPicker;
17296
17044
  }();
17297
- DefaultCanvasArcPicker = __decorate$l([injectable(), __param$h(0, inject(ArcRender)), __metadata$h("design:paramtypes", [Object])], DefaultCanvasArcPicker);
17045
+ DefaultCanvasArcPicker = __decorate$m([injectable(), __param$h(0, inject(ArcRender)), __metadata$h("design:paramtypes", [Object])], DefaultCanvasArcPicker);
17298
17046
 
17299
17047
  var loadArcPick$1 = !1;
17300
17048
  var arcCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17301
17049
  loadArcPick$1 || (loadArcPick$1 = !0, bind(CanvasArcPicker).to(DefaultCanvasArcPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasArcPicker));
17302
17050
  });
17303
17051
 
17304
- var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17052
+ var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17305
17053
  var d,
17306
17054
  c = arguments.length,
17307
17055
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17353,14 +17101,14 @@
17353
17101
  }]);
17354
17102
  return DefaultMathArcPicker;
17355
17103
  }();
17356
- DefaultMathArcPicker = __decorate$k([injectable(), __param$g(0, inject(ArcRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathArcPicker);
17104
+ DefaultMathArcPicker = __decorate$l([injectable(), __param$g(0, inject(ArcRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathArcPicker);
17357
17105
 
17358
17106
  var loadArcPick = !1;
17359
17107
  var arcMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17360
17108
  loadArcPick || (loadArcPick = !0, bind(MathArcPicker).to(DefaultMathArcPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathArcPicker));
17361
17109
  });
17362
17110
 
17363
- var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17111
+ var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17364
17112
  var d,
17365
17113
  c = arguments.length,
17366
17114
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17431,14 +17179,14 @@
17431
17179
  }]);
17432
17180
  return DefaultCanvasRectPicker;
17433
17181
  }();
17434
- DefaultCanvasRectPicker = __decorate$j([injectable(), __param$f(0, inject(RectRender)), __metadata$f("design:paramtypes", [Object])], DefaultCanvasRectPicker);
17182
+ DefaultCanvasRectPicker = __decorate$k([injectable(), __param$f(0, inject(RectRender)), __metadata$f("design:paramtypes", [Object])], DefaultCanvasRectPicker);
17435
17183
 
17436
17184
  var loadRectPick$1 = !1;
17437
17185
  var rectCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17438
17186
  loadRectPick$1 || (loadRectPick$1 = !0, bind(CanvasRectPicker).to(DefaultCanvasRectPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRectPicker));
17439
17187
  });
17440
17188
 
17441
- var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17189
+ var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17442
17190
  var d,
17443
17191
  c = arguments.length,
17444
17192
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17509,14 +17257,14 @@
17509
17257
  }]);
17510
17258
  return DefaultMathRectPicker;
17511
17259
  }();
17512
- DefaultMathRectPicker = __decorate$i([injectable(), __param$e(0, inject(RectRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathRectPicker);
17260
+ DefaultMathRectPicker = __decorate$j([injectable(), __param$e(0, inject(RectRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathRectPicker);
17513
17261
 
17514
17262
  var loadRectPick = !1;
17515
17263
  var rectMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17516
17264
  loadRectPick || (loadRectPick = !0, bind(MathRectPicker).to(DefaultMathRectPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathRectPicker));
17517
17265
  });
17518
17266
 
17519
- var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17267
+ var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17520
17268
  var d,
17521
17269
  c = arguments.length,
17522
17270
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17532,9 +17280,9 @@
17532
17280
  }
17533
17281
  return _createClass(BasePicker);
17534
17282
  }(BaseRender);
17535
- BasePicker = __decorate$h([injectable()], BasePicker);
17283
+ BasePicker = __decorate$i([injectable()], BasePicker);
17536
17284
 
17537
- var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17285
+ var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17538
17286
  var d,
17539
17287
  c = arguments.length,
17540
17288
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17593,14 +17341,14 @@
17593
17341
  }]);
17594
17342
  return DefaultCanvasLinePicker;
17595
17343
  }(BasePicker);
17596
- DefaultCanvasLinePicker = __decorate$g([injectable(), __param$d(0, inject(LineRender)), __metadata$d("design:paramtypes", [Object])], DefaultCanvasLinePicker);
17344
+ DefaultCanvasLinePicker = __decorate$h([injectable(), __param$d(0, inject(LineRender)), __metadata$d("design:paramtypes", [Object])], DefaultCanvasLinePicker);
17597
17345
 
17598
17346
  var loadLinePick$1 = !1;
17599
17347
  var lineCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17600
17348
  loadLinePick$1 || (loadLinePick$1 = !0, bind(CanvasLinePicker).to(DefaultCanvasLinePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLinePicker));
17601
17349
  });
17602
17350
 
17603
- var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17351
+ var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17604
17352
  var d,
17605
17353
  c = arguments.length,
17606
17354
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17651,14 +17399,14 @@
17651
17399
  }]);
17652
17400
  return DefaultMathLinePicker;
17653
17401
  }();
17654
- DefaultMathLinePicker = __decorate$f([injectable(), __param$c(0, inject(LineRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathLinePicker);
17402
+ DefaultMathLinePicker = __decorate$g([injectable(), __param$c(0, inject(LineRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathLinePicker);
17655
17403
 
17656
17404
  var loadLinePick = !1;
17657
17405
  var lineMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17658
17406
  loadLinePick || (loadLinePick = !0, bind(MathLinePicker).to(DefaultMathLinePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathLinePicker));
17659
17407
  });
17660
17408
 
17661
- var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17409
+ var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17662
17410
  var d,
17663
17411
  c = arguments.length,
17664
17412
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17704,14 +17452,14 @@
17704
17452
  }]);
17705
17453
  return DefaultCanvasAreaPicker;
17706
17454
  }();
17707
- DefaultCanvasAreaPicker = __decorate$e([injectable(), __param$b(0, inject(AreaRender)), __metadata$b("design:paramtypes", [Object])], DefaultCanvasAreaPicker);
17455
+ DefaultCanvasAreaPicker = __decorate$f([injectable(), __param$b(0, inject(AreaRender)), __metadata$b("design:paramtypes", [Object])], DefaultCanvasAreaPicker);
17708
17456
 
17709
17457
  var loadAreaPick$1 = !1;
17710
17458
  var areaCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17711
17459
  loadAreaPick$1 || (loadAreaPick$1 = !0, bind(CanvasAreaPicker).to(DefaultCanvasAreaPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasAreaPicker));
17712
17460
  });
17713
17461
 
17714
- var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17462
+ var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17715
17463
  var d,
17716
17464
  c = arguments.length,
17717
17465
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17757,14 +17505,14 @@
17757
17505
  }]);
17758
17506
  return DefaultMathAreaPicker;
17759
17507
  }();
17760
- DefaultMathAreaPicker = __decorate$d([injectable(), __param$a(0, inject(AreaRender)), __metadata$a("design:paramtypes", [Object])], DefaultMathAreaPicker);
17508
+ DefaultMathAreaPicker = __decorate$e([injectable(), __param$a(0, inject(AreaRender)), __metadata$a("design:paramtypes", [Object])], DefaultMathAreaPicker);
17761
17509
 
17762
17510
  var loadAreaPick = !1;
17763
17511
  var areaMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17764
17512
  loadAreaPick || (loadAreaPick = !0, bind(MathAreaPicker).to(DefaultMathAreaPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathAreaPicker));
17765
17513
  });
17766
17514
 
17767
- var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17515
+ var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17768
17516
  var d,
17769
17517
  c = arguments.length,
17770
17518
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17826,14 +17574,14 @@
17826
17574
  }]);
17827
17575
  return DefaultCanvasSymbolPicker;
17828
17576
  }(BasePicker);
17829
- DefaultCanvasSymbolPicker = __decorate$c([injectable(), __param$9(0, inject(SymbolRender)), __metadata$9("design:paramtypes", [Object])], DefaultCanvasSymbolPicker);
17577
+ DefaultCanvasSymbolPicker = __decorate$d([injectable(), __param$9(0, inject(SymbolRender)), __metadata$9("design:paramtypes", [Object])], DefaultCanvasSymbolPicker);
17830
17578
 
17831
17579
  var loadSymbolPick$1 = !1;
17832
17580
  var symbolCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17833
17581
  loadSymbolPick$1 || (loadSymbolPick$1 = !0, bind(CanvasSymbolPicker).to(DefaultCanvasSymbolPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
17834
17582
  });
17835
17583
 
17836
- var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17584
+ var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17837
17585
  var d,
17838
17586
  c = arguments.length,
17839
17587
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17884,14 +17632,14 @@
17884
17632
  }]);
17885
17633
  return DefaultMathSymbolPicker;
17886
17634
  }();
17887
- DefaultMathSymbolPicker = __decorate$b([injectable(), __param$8(0, inject(SymbolRender)), __metadata$8("design:paramtypes", [Object])], DefaultMathSymbolPicker);
17635
+ DefaultMathSymbolPicker = __decorate$c([injectable(), __param$8(0, inject(SymbolRender)), __metadata$8("design:paramtypes", [Object])], DefaultMathSymbolPicker);
17888
17636
 
17889
17637
  var loadSymbolPick = !1;
17890
17638
  var symbolMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17891
17639
  loadSymbolPick || (loadSymbolPick = !0, bind(MathSymbolPicker).to(DefaultMathSymbolPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathSymbolPicker));
17892
17640
  });
17893
17641
 
17894
- var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17642
+ var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17895
17643
  var d,
17896
17644
  c = arguments.length,
17897
17645
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -17942,14 +17690,14 @@
17942
17690
  }]);
17943
17691
  return DefaultCanvasCirclePicker;
17944
17692
  }();
17945
- DefaultCanvasCirclePicker = __decorate$a([injectable(), __param$7(0, inject(CircleRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
17693
+ DefaultCanvasCirclePicker = __decorate$b([injectable(), __param$7(0, inject(CircleRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
17946
17694
 
17947
17695
  var loadCirclePick$1 = !1;
17948
17696
  var circleCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
17949
17697
  loadCirclePick$1 || (loadCirclePick$1 = !0, bind(CanvasCirclePicker).to(DefaultCanvasCirclePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasCirclePicker));
17950
17698
  });
17951
17699
 
17952
- var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17700
+ var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17953
17701
  var d,
17954
17702
  c = arguments.length,
17955
17703
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18000,14 +17748,14 @@
18000
17748
  }]);
18001
17749
  return DefaultMathCirclePicker;
18002
17750
  }();
18003
- DefaultMathCirclePicker = __decorate$9([injectable(), __param$6(0, inject(CircleRender)), __metadata$6("design:paramtypes", [Object])], DefaultMathCirclePicker);
17751
+ DefaultMathCirclePicker = __decorate$a([injectable(), __param$6(0, inject(CircleRender)), __metadata$6("design:paramtypes", [Object])], DefaultMathCirclePicker);
18004
17752
 
18005
17753
  var loadCirclePick = !1;
18006
17754
  var circleMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18007
17755
  loadCirclePick || (loadCirclePick = !0, bind(MathCirclePicker).to(DefaultMathCirclePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathCirclePicker));
18008
17756
  });
18009
17757
 
18010
- var __decorate$8 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17758
+ var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18011
17759
  var d,
18012
17760
  c = arguments.length,
18013
17761
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18079,14 +17827,14 @@
18079
17827
  }]);
18080
17828
  return DefaultCanvasTextPicker;
18081
17829
  }(BasePicker);
18082
- DefaultCanvasTextPicker = __decorate$8([injectable(), __param$5(0, inject(TextRender)), __metadata$5("design:paramtypes", [Object])], DefaultCanvasTextPicker);
17830
+ DefaultCanvasTextPicker = __decorate$9([injectable(), __param$5(0, inject(TextRender)), __metadata$5("design:paramtypes", [Object])], DefaultCanvasTextPicker);
18083
17831
 
18084
17832
  var loadTextPick$1 = !1;
18085
17833
  var textCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18086
17834
  loadTextPick$1 || (loadTextPick$1 = !0, bind(CanvasTextPicker).to(DefaultCanvasTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasTextPicker));
18087
17835
  });
18088
17836
 
18089
- var __decorate$7 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17837
+ var __decorate$8 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18090
17838
  var d,
18091
17839
  c = arguments.length,
18092
17840
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18106,14 +17854,14 @@
18106
17854
  }]);
18107
17855
  return DefaultMathTextPicker;
18108
17856
  }();
18109
- DefaultMathTextPicker = __decorate$7([injectable()], DefaultMathTextPicker);
17857
+ DefaultMathTextPicker = __decorate$8([injectable()], DefaultMathTextPicker);
18110
17858
 
18111
17859
  var loadTextPick = !1;
18112
17860
  var textMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18113
17861
  loadTextPick || (loadTextPick = !0, bind(MathTextPicker).to(DefaultMathTextPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathTextPicker));
18114
17862
  });
18115
17863
 
18116
- var __decorate$6 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17864
+ var __decorate$7 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18117
17865
  var d,
18118
17866
  c = arguments.length,
18119
17867
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18172,14 +17920,14 @@
18172
17920
  }]);
18173
17921
  return DefaultCanvasPathPicker;
18174
17922
  }(BasePicker);
18175
- DefaultCanvasPathPicker = __decorate$6([injectable(), __param$4(0, inject(PathRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasPathPicker);
17923
+ DefaultCanvasPathPicker = __decorate$7([injectable(), __param$4(0, inject(PathRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasPathPicker);
18176
17924
 
18177
17925
  var loadPathPick$1 = !1;
18178
17926
  var pathCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18179
17927
  loadPathPick$1 || (loadPathPick$1 = !0, bind(CanvasPathPicker).to(DefaultCanvasPathPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPathPicker));
18180
17928
  });
18181
17929
 
18182
- var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17930
+ var __decorate$6 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18183
17931
  var d,
18184
17932
  c = arguments.length,
18185
17933
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18230,14 +17978,14 @@
18230
17978
  }]);
18231
17979
  return DefaultMathPathPicker;
18232
17980
  }();
18233
- DefaultMathPathPicker = __decorate$5([injectable(), __param$3(0, inject(PathRender)), __metadata$3("design:paramtypes", [Object])], DefaultMathPathPicker);
17981
+ DefaultMathPathPicker = __decorate$6([injectable(), __param$3(0, inject(PathRender)), __metadata$3("design:paramtypes", [Object])], DefaultMathPathPicker);
18234
17982
 
18235
17983
  var loadPathPick = !1;
18236
17984
  var pathMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18237
17985
  loadPathPick || (loadPathPick = !0, bind(MathPathPicker).to(DefaultMathPathPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPathPicker));
18238
17986
  });
18239
17987
 
18240
- var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
17988
+ var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18241
17989
  var d,
18242
17990
  c = arguments.length,
18243
17991
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18288,14 +18036,14 @@
18288
18036
  }]);
18289
18037
  return DefaultCanvasPolygonPicker;
18290
18038
  }();
18291
- DefaultCanvasPolygonPicker = __decorate$4([injectable(), __param$2(0, inject(PolygonRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
18039
+ DefaultCanvasPolygonPicker = __decorate$5([injectable(), __param$2(0, inject(PolygonRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
18292
18040
 
18293
18041
  var loadPolygonPick$1 = !1;
18294
18042
  var polygonCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18295
18043
  loadPolygonPick$1 || (loadPolygonPick$1 = !0, bind(CanvasPolygonPicker).to(DefaultCanvasPolygonPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
18296
18044
  });
18297
18045
 
18298
- var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18046
+ var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18299
18047
  var d,
18300
18048
  c = arguments.length,
18301
18049
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18345,14 +18093,14 @@
18345
18093
  }]);
18346
18094
  return DefaultMathPolygonPicker;
18347
18095
  }();
18348
- DefaultMathPolygonPicker = __decorate$3([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultMathPolygonPicker);
18096
+ DefaultMathPolygonPicker = __decorate$4([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultMathPolygonPicker);
18349
18097
 
18350
18098
  var loadPolygonPick = !1;
18351
18099
  var polygonMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18352
18100
  loadPolygonPick || (loadPolygonPick = !0, bind(MathPolygonPicker).to(DefaultMathPolygonPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPolygonPicker));
18353
18101
  });
18354
18102
 
18355
- var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18103
+ var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18356
18104
  var d,
18357
18105
  c = arguments.length,
18358
18106
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18380,14 +18128,14 @@
18380
18128
  }]);
18381
18129
  return DefaultCanvasRichTextPicker;
18382
18130
  }();
18383
- DefaultCanvasRichTextPicker = __decorate$2([injectable(), __param(0, inject(RichTextRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasRichTextPicker);
18131
+ DefaultCanvasRichTextPicker = __decorate$3([injectable(), __param(0, inject(RichTextRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasRichTextPicker);
18384
18132
 
18385
18133
  var loadRichtextPick = !1;
18386
18134
  var richtextCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18387
18135
  loadRichtextPick || (loadRichtextPick = !0, bind(CanvasRichTextPicker).to(DefaultCanvasRichTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
18388
18136
  });
18389
18137
 
18390
- var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18138
+ var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18391
18139
  var d,
18392
18140
  c = arguments.length,
18393
18141
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18409,14 +18157,14 @@
18409
18157
  }]);
18410
18158
  return DefaultMathImagePicker;
18411
18159
  }();
18412
- DefaultMathImagePicker = __decorate$1([injectable()], DefaultMathImagePicker);
18160
+ DefaultMathImagePicker = __decorate$2([injectable()], DefaultMathImagePicker);
18413
18161
 
18414
18162
  var loadRichTextPick = !1;
18415
18163
  var richTextMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
18416
18164
  loadRichTextPick || (loadRichTextPick = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
18417
18165
  });
18418
18166
 
18419
- var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18167
+ var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
18420
18168
  var d,
18421
18169
  c = arguments.length,
18422
18170
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -18438,7 +18186,7 @@
18438
18186
  }]);
18439
18187
  return DefaultCanvasImagePicker;
18440
18188
  }();
18441
- DefaultCanvasImagePicker = __decorate([injectable()], DefaultCanvasImagePicker);
18189
+ DefaultCanvasImagePicker = __decorate$1([injectable()], DefaultCanvasImagePicker);
18442
18190
 
18443
18191
  var loadImagePick$1 = !1;
18444
18192
  var imageCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
@@ -18517,12 +18265,6 @@
18517
18265
  loaded || (loaded = !0, registerWrapTextGraphic());
18518
18266
  }
18519
18267
 
18520
- new ContainerModule((bind, unbind, isBound, rebind) => {
18521
- if (!isBound(ScrollBarPlugin)) {
18522
- bind(ScrollBarPlugin).toSelf();
18523
- bind(AutoEnablePlugins).toService(ScrollBarPlugin);
18524
- }
18525
- });
18526
18268
  function loadScrollbarComponent() {
18527
18269
  registerGroup();
18528
18270
  registerRect();
@@ -18772,6 +18514,53 @@
18772
18514
  realTime: true
18773
18515
  };
18774
18516
 
18517
+ function __rest(s, e) {
18518
+ var t = {};
18519
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
18520
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18521
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
18522
+ }
18523
+ return t;
18524
+ }
18525
+ function __decorate(decorators, target, key, desc) {
18526
+ var c = arguments.length,
18527
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
18528
+ d;
18529
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18530
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
18531
+ }
18532
+ function __awaiter(thisArg, _arguments, P, generator) {
18533
+ function adopt(value) {
18534
+ return value instanceof P ? value : new P(function (resolve) {
18535
+ resolve(value);
18536
+ });
18537
+ }
18538
+ return new (P || (P = Promise))(function (resolve, reject) {
18539
+ function fulfilled(value) {
18540
+ try {
18541
+ step(generator.next(value));
18542
+ } catch (e) {
18543
+ reject(e);
18544
+ }
18545
+ }
18546
+ function rejected(value) {
18547
+ try {
18548
+ step(generator["throw"](value));
18549
+ } catch (e) {
18550
+ reject(e);
18551
+ }
18552
+ }
18553
+ function step(result) {
18554
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
18555
+ }
18556
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18557
+ });
18558
+ }
18559
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
18560
+ var e = new Error(message);
18561
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
18562
+ };
18563
+
18775
18564
  function traverseGroup(group, cb) {
18776
18565
  group.forEachChildren(node => {
18777
18566
  const stopped = cb(node);
@@ -18808,13 +18597,12 @@
18808
18597
  }
18809
18598
 
18810
18599
  const defaultAlternativeColors = ['#ffffff', '#000000'];
18811
- const { Color } = vutils.ColorUtil;
18812
18600
  function labelSmartInvert(foregroundColorOrigin, backgroundColorOrogin, textType, contrastRatiosThreshold, alternativeColors, mode) {
18813
18601
  if (typeof foregroundColorOrigin !== 'string' || typeof backgroundColorOrogin !== 'string') {
18814
18602
  return foregroundColorOrigin;
18815
18603
  }
18816
- const foregroundColor = new Color(foregroundColorOrigin).toHex();
18817
- const backgroundColor = new Color(backgroundColorOrogin).toHex();
18604
+ const foregroundColor = new vutils.Color(foregroundColorOrigin).toHex();
18605
+ const backgroundColor = new vutils.Color(backgroundColorOrogin).toHex();
18818
18606
  if (!contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode)) {
18819
18607
  return improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode);
18820
18608
  }
@@ -18843,8 +18631,8 @@
18843
18631
  }
18844
18632
  function contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode) {
18845
18633
  if (mode === 'lightness') {
18846
- const backgroundColorLightness = Color.getColorBrightness(new Color(backgroundColor));
18847
- const foregroundColorLightness = Color.getColorBrightness(new Color(foregroundColor));
18634
+ const backgroundColorLightness = vutils.Color.getColorBrightness(new vutils.Color(backgroundColor));
18635
+ const foregroundColorLightness = vutils.Color.getColorBrightness(new vutils.Color(foregroundColor));
18848
18636
  if (foregroundColorLightness < 0.5) {
18849
18637
  if (backgroundColorLightness >= 0.5) {
18850
18638
  return true;
@@ -18882,7 +18670,7 @@
18882
18670
  return contrastRatios;
18883
18671
  }
18884
18672
  function getColorLuminance(color) {
18885
- const rgb8bit = vutils.ColorUtil.hexToRgb(color);
18673
+ const rgb8bit = vutils.hexToRgb(color);
18886
18674
  const RsRGB = rgb8bit[0] / 255;
18887
18675
  const GsRGB = rgb8bit[1] / 255;
18888
18676
  const BsRGB = rgb8bit[2] / 255;
@@ -19190,189 +18978,11 @@
19190
18978
  poptip: vutils.merge({}, DEFAULT_THEME)
19191
18979
  };
19192
18980
 
19193
- function wrapPoptip(target, source) {
19194
- vutils.merge(target, theme.poptip, source);
19195
- return target;
19196
- }
19197
- let PopTipRenderContribution = class PopTipRenderContribution {
19198
- render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19199
- var _a;
19200
- if (graphic._showPoptip === 1) {
19201
- const { visible, visibleCb } = graphic.attribute.poptip || {};
19202
- if (visible === false || (visibleCb && visibleCb(graphic) === false)) {
19203
- return;
19204
- }
19205
- const attribute = {};
19206
- vutils.merge(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {});
19207
- if (!this.poptipComponent) {
19208
- this.poptipComponent = new PopTip(attribute);
19209
- }
19210
- else {
19211
- this.poptipComponent.initAttributes(attribute);
19212
- }
19213
- let poptip = graphic.attribute.poptip || {};
19214
- if (graphic.type === 'text' && poptip.title == null && poptip.content == null) {
19215
- const out = {};
19216
- wrapPoptip(out, poptip);
19217
- poptip = out;
19218
- poptip.content = (_a = poptip.content) !== null && _a !== void 0 ? _a : graphic.attribute.text;
19219
- }
19220
- const matrix = graphic.globalTransMatrix;
19221
- this.poptipComponent.setAttributes(Object.assign(Object.assign({ visibleAll: true, pickable: false, childrenPickable: false }, poptip), { x: matrix.e, y: matrix.f }));
19222
- drawContext.stage.tryInitInteractiveLayer();
19223
- const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
19224
- if (interactiveLayer) {
19225
- interactiveLayer.add(this.poptipComponent);
19226
- }
19227
- }
19228
- else if (graphic._showPoptip === 2) {
19229
- graphic._showPoptip = 0;
19230
- this.poptipComponent &&
19231
- this.poptipComponent.setAttributes({
19232
- visibleAll: false
19233
- });
19234
- }
19235
- }
19236
- };
19237
- PopTipRenderContribution = __decorate$m([
19238
- injectable()
19239
- ], PopTipRenderContribution);
19240
-
19241
- let PopTipPlugin = class PopTipPlugin {
19242
- constructor() {
19243
- this.name = 'poptip';
19244
- this.activeEvent = 'onRegister';
19245
- this._uid = Generator.GenAutoIncrementId();
19246
- this.key = this.name + this._uid;
19247
- this.poptip = (e) => {
19248
- const graphic = e.target;
19249
- if (graphic.isContainer || !graphic.attribute) {
19250
- this.unpoptip(e);
19251
- return;
19252
- }
19253
- if (graphic === this.activeGraphic) {
19254
- return;
19255
- }
19256
- const { poptip } = graphic.attribute;
19257
- if (poptip) {
19258
- graphic.setAttributes({});
19259
- graphic._showPoptip = 1;
19260
- }
19261
- if (this.activeGraphic) {
19262
- this.activeGraphic.setAttributes({});
19263
- this.activeGraphic._showPoptip = 2;
19264
- }
19265
- this.setActiveGraphic(graphic, true);
19266
- };
19267
- this.unpoptip = (e) => {
19268
- if (!this.activeGraphic) {
19269
- return;
19270
- }
19271
- this.activeGraphic.setAttributes({});
19272
- this.activeGraphic._showPoptip = 2;
19273
- this.setActiveGraphic(null, true);
19274
- };
19275
- }
19276
- activate(context) {
19277
- this.pluginService = context;
19278
- const { stage } = this.pluginService;
19279
- stage.addEventListener('pointerover', this.poptip);
19280
- }
19281
- setActiveGraphic(graphic, rerender) {
19282
- this.activeGraphic = graphic;
19283
- this.pluginService.stage.renderNextFrame();
19284
- }
19285
- deactivate(context) {
19286
- const { stage } = this.pluginService;
19287
- stage.removeEventListener('pointerover', this.poptip);
19288
- }
19289
- };
19290
- PopTipPlugin = __decorate$m([
19291
- injectable()
19292
- ], PopTipPlugin);
19293
- let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
19294
- constructor() {
19295
- this.name = 'poptipForText';
19296
- this.activeEvent = 'onRegister';
19297
- this._uid = Generator.GenAutoIncrementId();
19298
- this.key = this.name + this._uid;
19299
- this.pointerlave = (e) => {
19300
- const { stage } = this.pluginService;
19301
- if (e.target === stage) {
19302
- this.unpoptip(e);
19303
- }
19304
- };
19305
- this.poptip = (e) => {
19306
- const graphic = e.target;
19307
- if (graphic.type !== 'text' || !graphic.cliped || graphic.isContainer || !graphic.attribute) {
19308
- this.unpoptip(e);
19309
- return;
19310
- }
19311
- if (graphic === this.activeGraphic) {
19312
- return;
19313
- }
19314
- const { poptip = {} } = graphic.attribute;
19315
- if (poptip) {
19316
- graphic.setAttributes({});
19317
- graphic._showPoptip = 1;
19318
- }
19319
- if (this.activeGraphic) {
19320
- this.activeGraphic.setAttributes({});
19321
- this.activeGraphic._showPoptip = 2;
19322
- }
19323
- this.setActiveGraphic(graphic, true);
19324
- };
19325
- this.unpoptip = (e) => {
19326
- if (!this.activeGraphic) {
19327
- return;
19328
- }
19329
- this.activeGraphic.setAttributes({});
19330
- this.activeGraphic._showPoptip = 2;
19331
- this.setActiveGraphic(null, true);
19332
- };
19333
- }
19334
- activate(context) {
19335
- this.pluginService = context;
19336
- const { stage } = this.pluginService;
19337
- stage.addEventListener('pointerover', this.poptip);
19338
- stage.addEventListener('pointerleave', this.pointerlave);
19339
- }
19340
- setActiveGraphic(graphic, rerender) {
19341
- this.activeGraphic = graphic;
19342
- this.pluginService.stage.renderNextFrame();
19343
- }
19344
- deactivate(context) {
19345
- const { stage } = this.pluginService;
19346
- stage.removeEventListener('pointerover', this.poptip);
19347
- stage.removeEventListener('pointerleave', this.pointerlave);
19348
- }
19349
- };
19350
- PopTipForClipedTextPlugin = __decorate$m([
19351
- injectable()
19352
- ], PopTipForClipedTextPlugin);
19353
-
19354
- const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19355
- if (!isBound(PopTipRenderContribution)) {
19356
- bind(PopTipRenderContribution).toSelf().inSingletonScope();
19357
- bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);
19358
- }
19359
- if (!isBound(PopTipPlugin)) {
19360
- bind(PopTipPlugin).toSelf();
19361
- bind(AutoEnablePlugins).toService(PopTipPlugin);
19362
- }
19363
- if (!isBound(PopTipForClipedTextPlugin)) {
19364
- bind(PopTipForClipedTextPlugin).toSelf();
19365
- bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
19366
- }
19367
- });
19368
- function loadPoptip() {
19369
- container.load(popTipModule);
19370
- }
19371
- function loadPoptipComponent() {
19372
- registerGroup();
19373
- registerWrapText();
19374
- registerSymbol();
19375
- registerRect();
18981
+ function loadPoptipComponent() {
18982
+ registerGroup();
18983
+ registerWrapText();
18984
+ registerSymbol();
18985
+ registerRect();
19376
18986
  }
19377
18987
  function setPoptipTheme(defaultPoptipTheme) {
19378
18988
  vutils.merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
@@ -19565,6 +19175,189 @@
19565
19175
  padding: 10
19566
19176
  };
19567
19177
 
19178
+ function wrapPoptip(target, source) {
19179
+ vutils.merge(target, theme.poptip, source);
19180
+ return target;
19181
+ }
19182
+ let PopTipRenderContribution = class PopTipRenderContribution {
19183
+ render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19184
+ var _a;
19185
+ if (graphic._showPoptip === 1) {
19186
+ const { visible, visibleCb } = graphic.attribute.poptip || {};
19187
+ if (visible === false || (visibleCb && visibleCb(graphic) === false)) {
19188
+ return;
19189
+ }
19190
+ const attribute = {};
19191
+ vutils.merge(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {});
19192
+ if (!this.poptipComponent) {
19193
+ this.poptipComponent = new PopTip(attribute);
19194
+ }
19195
+ else {
19196
+ this.poptipComponent.initAttributes(attribute);
19197
+ }
19198
+ let poptip = graphic.attribute.poptip || {};
19199
+ if (graphic.type === 'text' && poptip.title == null && poptip.content == null) {
19200
+ const out = {};
19201
+ wrapPoptip(out, poptip);
19202
+ poptip = out;
19203
+ poptip.content = (_a = poptip.content) !== null && _a !== void 0 ? _a : graphic.attribute.text;
19204
+ }
19205
+ const matrix = graphic.globalTransMatrix;
19206
+ this.poptipComponent.setAttributes(Object.assign(Object.assign({ visibleAll: true, pickable: false, childrenPickable: false }, poptip), { x: matrix.e, y: matrix.f }));
19207
+ drawContext.stage.tryInitInteractiveLayer();
19208
+ const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
19209
+ if (interactiveLayer) {
19210
+ interactiveLayer.add(this.poptipComponent);
19211
+ }
19212
+ }
19213
+ else if (graphic._showPoptip === 2) {
19214
+ graphic._showPoptip = 0;
19215
+ this.poptipComponent &&
19216
+ this.poptipComponent.setAttributes({
19217
+ visibleAll: false
19218
+ });
19219
+ }
19220
+ }
19221
+ };
19222
+ PopTipRenderContribution = __decorate([
19223
+ injectable()
19224
+ ], PopTipRenderContribution);
19225
+
19226
+ let PopTipPlugin = class PopTipPlugin {
19227
+ constructor() {
19228
+ this.name = 'poptip';
19229
+ this.activeEvent = 'onRegister';
19230
+ this._uid = Generator.GenAutoIncrementId();
19231
+ this.key = this.name + this._uid;
19232
+ this.poptip = (e) => {
19233
+ const graphic = e.target;
19234
+ if (graphic.isContainer || !graphic.attribute) {
19235
+ this.unpoptip(e);
19236
+ return;
19237
+ }
19238
+ if (graphic === this.activeGraphic) {
19239
+ return;
19240
+ }
19241
+ const { poptip } = graphic.attribute;
19242
+ if (poptip) {
19243
+ graphic.setAttributes({});
19244
+ graphic._showPoptip = 1;
19245
+ }
19246
+ if (this.activeGraphic) {
19247
+ this.activeGraphic.setAttributes({});
19248
+ this.activeGraphic._showPoptip = 2;
19249
+ }
19250
+ this.setActiveGraphic(graphic, true);
19251
+ };
19252
+ this.unpoptip = (e) => {
19253
+ if (!this.activeGraphic) {
19254
+ return;
19255
+ }
19256
+ this.activeGraphic.setAttributes({});
19257
+ this.activeGraphic._showPoptip = 2;
19258
+ this.setActiveGraphic(null, true);
19259
+ };
19260
+ }
19261
+ activate(context) {
19262
+ this.pluginService = context;
19263
+ const { stage } = this.pluginService;
19264
+ stage.addEventListener('pointerover', this.poptip);
19265
+ }
19266
+ setActiveGraphic(graphic, rerender) {
19267
+ this.activeGraphic = graphic;
19268
+ this.pluginService.stage.renderNextFrame();
19269
+ }
19270
+ deactivate(context) {
19271
+ const { stage } = this.pluginService;
19272
+ stage.removeEventListener('pointerover', this.poptip);
19273
+ }
19274
+ };
19275
+ PopTipPlugin = __decorate([
19276
+ injectable()
19277
+ ], PopTipPlugin);
19278
+ let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
19279
+ constructor() {
19280
+ this.name = 'poptipForText';
19281
+ this.activeEvent = 'onRegister';
19282
+ this._uid = Generator.GenAutoIncrementId();
19283
+ this.key = this.name + this._uid;
19284
+ this.pointerlave = (e) => {
19285
+ const { stage } = this.pluginService;
19286
+ if (e.target === stage) {
19287
+ this.unpoptip(e);
19288
+ }
19289
+ };
19290
+ this.poptip = (e) => {
19291
+ const graphic = e.target;
19292
+ if (graphic.type !== 'text' ||
19293
+ !graphic.cliped ||
19294
+ graphic.isContainer ||
19295
+ !graphic.attribute ||
19296
+ graphic.attribute.disableAutoClipedPoptip) {
19297
+ this.unpoptip(e);
19298
+ return;
19299
+ }
19300
+ if (graphic === this.activeGraphic) {
19301
+ return;
19302
+ }
19303
+ const { poptip = {} } = graphic.attribute;
19304
+ if (poptip) {
19305
+ graphic.setAttributes({});
19306
+ graphic._showPoptip = 1;
19307
+ }
19308
+ if (this.activeGraphic) {
19309
+ this.activeGraphic.setAttributes({});
19310
+ this.activeGraphic._showPoptip = 2;
19311
+ }
19312
+ this.setActiveGraphic(graphic, true);
19313
+ };
19314
+ this.unpoptip = (e) => {
19315
+ if (!this.activeGraphic) {
19316
+ return;
19317
+ }
19318
+ this.activeGraphic.setAttributes({});
19319
+ this.activeGraphic._showPoptip = 2;
19320
+ this.setActiveGraphic(null, true);
19321
+ };
19322
+ }
19323
+ activate(context) {
19324
+ this.pluginService = context;
19325
+ const { stage } = this.pluginService;
19326
+ stage.addEventListener('pointerover', this.poptip);
19327
+ stage.addEventListener('pointerleave', this.pointerlave);
19328
+ }
19329
+ setActiveGraphic(graphic, rerender) {
19330
+ this.activeGraphic = graphic;
19331
+ this.pluginService.stage.renderNextFrame();
19332
+ }
19333
+ deactivate(context) {
19334
+ const { stage } = this.pluginService;
19335
+ stage.removeEventListener('pointerover', this.poptip);
19336
+ stage.removeEventListener('pointerleave', this.pointerlave);
19337
+ }
19338
+ };
19339
+ PopTipForClipedTextPlugin = __decorate([
19340
+ injectable()
19341
+ ], PopTipForClipedTextPlugin);
19342
+
19343
+ const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
19344
+ if (!isBound(PopTipRenderContribution)) {
19345
+ bind(PopTipRenderContribution).toSelf().inSingletonScope();
19346
+ bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);
19347
+ }
19348
+ if (!isBound(PopTipPlugin)) {
19349
+ bind(PopTipPlugin).toSelf();
19350
+ bind(AutoEnablePlugins).toService(PopTipPlugin);
19351
+ }
19352
+ if (!isBound(PopTipForClipedTextPlugin)) {
19353
+ bind(PopTipForClipedTextPlugin).toSelf();
19354
+ bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
19355
+ }
19356
+ });
19357
+ function loadPoptip() {
19358
+ container.load(popTipModule);
19359
+ }
19360
+
19568
19361
  class CrosshairBase extends AbstractComponent {
19569
19362
  constructor() {
19570
19363
  super(...arguments);
@@ -20728,12 +20521,13 @@
20728
20521
  this.add(labelLine);
20729
20522
  }
20730
20523
  this._syncStateWithRelatedGraphic(relatedGraphic);
20731
- relatedGraphic.once('animate-bind', a => {
20732
- text.setAttributes(from);
20733
- labelLine && labelLine.setAttributes(from);
20734
- const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
20735
- relatedGraphic.on('afterAttributeUpdate', listener);
20736
- });
20524
+ this._animationConfig.enter.duration > 0 &&
20525
+ relatedGraphic.once('animate-bind', a => {
20526
+ text.setAttributes(from);
20527
+ labelLine && labelLine.setAttributes(from);
20528
+ const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
20529
+ relatedGraphic.on('afterAttributeUpdate', listener);
20530
+ });
20737
20531
  }
20738
20532
  }
20739
20533
  else if (state === 'update') {
@@ -29926,7 +29720,7 @@
29926
29720
  }
29927
29721
  };
29928
29722
 
29929
- const version = "0.17.5-alpha.1";
29723
+ const version = "0.17.6";
29930
29724
 
29931
29725
  exports.AbstractComponent = AbstractComponent;
29932
29726
  exports.ArcInfo = ArcInfo;