@antv/g 5.1.4 → 5.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2020,6 +2020,11 @@ var TOUCH_TO_POINTER = {
2020
2020
  */
2021
2021
 
2022
2022
  PropertySyntax["NUMBER"] = "<number>";
2023
+ /**
2024
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/angle
2025
+ */
2026
+
2027
+ PropertySyntax["ANGLE"] = "<angle>";
2023
2028
  /**
2024
2029
  * <number> with range 0..1
2025
2030
  * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#opacity_value
@@ -2071,9 +2076,6 @@ var TOUCH_TO_POINTER = {
2071
2076
 
2072
2077
  var StyleValueRegistry = manaSyringe.Syringe.defineToken('StyleValueRegistry');
2073
2078
 
2074
- var GeometryUpdaterFactory = manaSyringe.Syringe.defineToken('GeometryUpdaterFactory');
2075
- var GeometryAABBUpdater = manaSyringe.Syringe.defineToken('GeometryAABBUpdater');
2076
-
2077
2079
  /**
2078
2080
  * built-in events for element
2079
2081
  * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent
@@ -6904,6 +6906,8 @@ function parseDimension(unitRegExp, string) {
6904
6906
  if (isFinite(Number(string))) {
6905
6907
  if ('px'.search(unitRegExp) >= 0) {
6906
6908
  return new CSSUnitValue(Number(string), 'px');
6909
+ } else if ('deg'.search(unitRegExp) >= 0) {
6910
+ return new CSSUnitValue(Number(string), 'deg');
6907
6911
  }
6908
6912
  }
6909
6913
 
@@ -9110,6 +9114,75 @@ function convertKeyword2Percent(keyword) {
9110
9114
  return keyword;
9111
9115
  }
9112
9116
 
9117
+ var CSSPropertyAngle = {
9118
+ parser: parseAngle,
9119
+ mixer: mergeDimensions,
9120
+ calculator: function calculator(name, oldParsed, parsed, object) {
9121
+ return new CSSUnitValue(convertAngleUnit(parsed), 'deg');
9122
+ }
9123
+ };
9124
+
9125
+ /**
9126
+ * @see /zh/docs/api/basic/display-object#clippath
9127
+ * @example
9128
+ const image = new Image({
9129
+ style: {
9130
+ width: 200,
9131
+ height: 200,
9132
+ clipPath: new Circle({
9133
+ style: {
9134
+ x: 100, // 处于被裁剪图形局部坐标系下
9135
+ y: 100,
9136
+ r: 50,
9137
+ },
9138
+ }),
9139
+ }
9140
+ });
9141
+ */
9142
+
9143
+ var CSSPropertyClipPath = {
9144
+ calculator: function calculator(name, oldClipPath, newClipPath, object) {
9145
+ // unset
9146
+ if (newClipPath instanceof CSSKeywordValue) {
9147
+ newClipPath = null;
9148
+ } // clear ref to old clip path
9149
+
9150
+
9151
+ if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.style.clipPathTargets) {
9152
+ var index = oldClipPath.style.clipPathTargets.indexOf(object);
9153
+ oldClipPath.style.clipPathTargets.splice(index, 1);
9154
+ }
9155
+
9156
+ if (newClipPath) {
9157
+ if (!newClipPath.style.clipPathTargets) {
9158
+ newClipPath.style.clipPathTargets = [];
9159
+ }
9160
+
9161
+ newClipPath.style.clipPathTargets.push(object);
9162
+ }
9163
+
9164
+ dirtifyToRoot(object);
9165
+ return newClipPath;
9166
+ }
9167
+ };
9168
+
9169
+ var CSSPropertyColor = {
9170
+ parser: parseColor,
9171
+ calculator: function calculator(name, oldParsed, parsed, object, registry) {
9172
+ if (parsed instanceof CSSKeywordValue) {
9173
+ // 'unset' 'none'
9174
+ return new CSSRGB(0, 0, 0, 0, parsed.value === 'none');
9175
+ }
9176
+
9177
+ return parsed;
9178
+ },
9179
+ mixer: mergeColors
9180
+ };
9181
+
9182
+ var CSSPropertyFilter = {
9183
+ parser: parseFilter
9184
+ };
9185
+
9113
9186
  function getFontSize(object) {
9114
9187
  var fontSize = object.parsedStyle.fontSize;
9115
9188
 
@@ -9198,6 +9271,60 @@ var CSSPropertyLengthOrPercentage = {
9198
9271
 
9199
9272
  };
9200
9273
 
9274
+ /**
9275
+ * format to Tuple2<CSSUnitValue>
9276
+ *
9277
+ * @example
9278
+ * rect.style.lineDash = 10;
9279
+ * rect.style.lineDash = [10, 10];
9280
+ * rect.style.lineDash = '10 10';
9281
+ */
9282
+
9283
+ var CSSPropertyLengthOrPercentage12 = {
9284
+ parser: function parser(radius) {
9285
+ var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
9286
+ var formatted;
9287
+
9288
+ if (parsed.length === 1) {
9289
+ formatted = [parsed[0], parsed[0]];
9290
+ } else {
9291
+ formatted = [parsed[0], parsed[1]];
9292
+ }
9293
+
9294
+ return formatted;
9295
+ },
9296
+ mixer: mergeDimensionList
9297
+ };
9298
+
9299
+ /**
9300
+ * used in rounded rect
9301
+ *
9302
+ * @example
9303
+ * rect.style.radius = 10;
9304
+ * rect.style.radius = '10 10';
9305
+ * rect.style.radius = '10 10 10 10';
9306
+ */
9307
+
9308
+ var CSSPropertyLengthOrPercentage14 = {
9309
+ parser: function parser(radius) {
9310
+ var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
9311
+ var formatted; // format to Tuple<CSSUnitValue>
9312
+
9313
+ if (parsed.length === 1) {
9314
+ formatted = [parsed[0], parsed[0], parsed[0], parsed[0]];
9315
+ } else if (parsed.length === 2) {
9316
+ formatted = [parsed[0], parsed[1], parsed[0], parsed[1]];
9317
+ } else if (parsed.length === 3) {
9318
+ formatted = [parsed[0], parsed[1], parsed[2], parsed[1]];
9319
+ } else {
9320
+ formatted = [parsed[0], parsed[1], parsed[2], parsed[3]];
9321
+ }
9322
+
9323
+ return formatted;
9324
+ },
9325
+ mixer: mergeDimensionList
9326
+ };
9327
+
9201
9328
  /**
9202
9329
  * local position
9203
9330
  */
@@ -9269,90 +9396,24 @@ var CSSPropertyLocalPosition = {
9269
9396
  }
9270
9397
  };
9271
9398
 
9272
- /**
9273
- * opacity
9274
- */
9275
-
9276
- var CSSPropertyOpacity = {
9399
+ var CSSPropertyOffsetDistance = {
9277
9400
  parser: parseNumber,
9278
- mixer: clampedMergeNumbers(0, 1)
9279
- };
9280
-
9281
- var CSSPropertyColor = {
9282
- parser: parseColor,
9283
- calculator: function calculator(name, oldParsed, parsed, object, registry) {
9284
- if (parsed instanceof CSSKeywordValue) {
9285
- // 'unset' 'none'
9286
- return new CSSRGB(0, 0, 0, 0, parsed.value === 'none');
9287
- }
9288
-
9289
- return parsed;
9290
- },
9291
- mixer: mergeColors
9292
- };
9293
-
9294
- var CSSPropertyFilter = {
9295
- parser: parseFilter
9296
- };
9297
-
9298
- /**
9299
- * format to Tuple2<CSSUnitValue>
9300
- *
9301
- * @example
9302
- * rect.style.lineDash = 10;
9303
- * rect.style.lineDash = [10, 10];
9304
- * rect.style.lineDash = '10 10';
9305
- */
9306
-
9307
- var CSSPropertyLengthOrPercentage12 = {
9308
- parser: function parser(radius) {
9309
- var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
9310
- var formatted;
9311
-
9312
- if (parsed.length === 1) {
9313
- formatted = [parsed[0], parsed[0]];
9314
- } else {
9315
- formatted = [parsed[0], parsed[1]];
9401
+ mixer: clampedMergeNumbers(0, 1),
9402
+ postProcessor: function postProcessor(object) {
9403
+ if (!object.attributes.offsetPath) {
9404
+ return;
9316
9405
  }
9317
9406
 
9318
- return formatted;
9319
- },
9320
- mixer: mergeDimensionList
9321
- };
9322
-
9323
- /**
9324
- * used in rounded rect
9325
- *
9326
- * @example
9327
- * rect.style.radius = 10;
9328
- * rect.style.radius = '10 10';
9329
- * rect.style.radius = '10 10 10 10';
9330
- */
9407
+ var offsetPathNodeName = object.attributes.offsetPath.nodeName;
9331
9408
 
9332
- var CSSPropertyLengthOrPercentage14 = {
9333
- parser: function parser(radius) {
9334
- var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
9335
- var formatted; // format to Tuple<CSSUnitValue>
9409
+ if (offsetPathNodeName === exports.Shape.LINE || offsetPathNodeName === exports.Shape.PATH || offsetPathNodeName === exports.Shape.POLYLINE) {
9410
+ var point = object.attributes.offsetPath.getPoint(object.parsedStyle.offsetDistance.value);
9336
9411
 
9337
- if (parsed.length === 1) {
9338
- formatted = [parsed[0], parsed[0], parsed[0], parsed[0]];
9339
- } else if (parsed.length === 2) {
9340
- formatted = [parsed[0], parsed[1], parsed[0], parsed[1]];
9341
- } else if (parsed.length === 3) {
9342
- formatted = [parsed[0], parsed[1], parsed[2], parsed[1]];
9343
- } else {
9344
- formatted = [parsed[0], parsed[1], parsed[2], parsed[3]];
9412
+ if (point) {
9413
+ object.setLocalPosition(point.x, point.y);
9414
+ }
9345
9415
  }
9346
-
9347
- return formatted;
9348
- },
9349
- mixer: mergeDimensionList
9350
- };
9351
-
9352
- var CSSPropertyShadowBlur = {
9353
- parser: CSSPropertyLengthOrPercentage.parser,
9354
- mixer: clampedMergeNumbers(0, Infinity),
9355
- calculator: CSSPropertyLengthOrPercentage.calculator
9416
+ }
9356
9417
  };
9357
9418
 
9358
9419
  var CSSPropertyOffsetPath = {
@@ -9375,43 +9436,118 @@ var CSSPropertyOffsetPath = {
9375
9436
  }
9376
9437
  };
9377
9438
 
9378
- var CSSPropertyOffsetDistance = {
9439
+ /**
9440
+ * opacity
9441
+ */
9442
+
9443
+ var CSSPropertyOpacity = {
9379
9444
  parser: parseNumber,
9380
- mixer: clampedMergeNumbers(0, 1),
9381
- postProcessor: function postProcessor(object) {
9382
- if (!object.attributes.offsetPath) {
9383
- return;
9445
+ mixer: clampedMergeNumbers(0, 1)
9446
+ };
9447
+
9448
+ var CSSPropertyPath = {
9449
+ /**
9450
+ * path2Curve
9451
+ */
9452
+ parser: parsePath,
9453
+ calculator: function calculator(name, oldParsed, parsed) {
9454
+ // unset
9455
+ if (parsed instanceof CSSKeywordValue && parsed.value === 'unset') {
9456
+ return {
9457
+ absolutePath: [],
9458
+ hasArc: false,
9459
+ segments: [],
9460
+ polygons: [],
9461
+ polylines: [],
9462
+ curve: [],
9463
+ totalLength: 0,
9464
+ curveSegments: [],
9465
+ zCommandIndexes: [],
9466
+ rect: new Rectangle(0, 0, 0, 0)
9467
+ };
9384
9468
  }
9385
9469
 
9386
- var offsetPathNodeName = object.attributes.offsetPath.nodeName;
9470
+ return parsed;
9471
+ },
9472
+ mixer: mergePaths,
9387
9473
 
9388
- if (offsetPathNodeName === exports.Shape.LINE || offsetPathNodeName === exports.Shape.PATH || offsetPathNodeName === exports.Shape.POLYLINE) {
9389
- var point = object.attributes.offsetPath.getPoint(object.parsedStyle.offsetDistance.value);
9474
+ /**
9475
+ * update local position
9476
+ */
9477
+ postProcessor: function postProcessor(object) {
9478
+ if (object.nodeName === exports.Shape.PATH) {
9479
+ var _object$parsedStyle = object.parsedStyle,
9480
+ _object$parsedStyle$d = _object$parsedStyle.defX,
9481
+ defX = _object$parsedStyle$d === void 0 ? 0 : _object$parsedStyle$d,
9482
+ _object$parsedStyle$d2 = _object$parsedStyle.defY,
9483
+ defY = _object$parsedStyle$d2 === void 0 ? 0 : _object$parsedStyle$d2;
9484
+ object.setLocalPosition(defX, defY);
9485
+ }
9486
+ }
9487
+ };
9390
9488
 
9391
- if (point) {
9392
- object.setLocalPosition(point.x, point.y);
9393
- }
9489
+ var CSSPropertyPoints = {
9490
+ parser: parsePoints,
9491
+
9492
+ /**
9493
+ * update local position
9494
+ */
9495
+ postProcessor: function postProcessor(object) {
9496
+ if (object.nodeName === exports.Shape.POLYGON || object.nodeName === exports.Shape.POLYLINE) {
9497
+ var _object$parsedStyle = object.parsedStyle,
9498
+ defX = _object$parsedStyle.defX,
9499
+ defY = _object$parsedStyle.defY;
9500
+ object.setLocalPosition(defX, defY);
9394
9501
  }
9395
9502
  }
9396
9503
  };
9397
9504
 
9398
- var CSSPropertyZIndex = {
9399
- parser: parseNumber,
9505
+ var CSSPropertyShadowBlur = {
9506
+ parser: CSSPropertyLengthOrPercentage.parser,
9507
+ mixer: clampedMergeNumbers(0, Infinity),
9508
+ calculator: CSSPropertyLengthOrPercentage.calculator
9509
+ };
9510
+
9511
+ var CSSPropertyText = {
9512
+ calculator: function calculator(name, oldParsed, parsed, object) {
9513
+ if (parsed instanceof CSSKeywordValue) {
9514
+ if (parsed.value === 'unset') {
9515
+ return '';
9516
+ } else {
9517
+ return parsed.value;
9518
+ }
9519
+ }
9520
+
9521
+ return parsed;
9522
+ },
9400
9523
  postProcessor: function postProcessor(object) {
9401
- if (object.parentNode) {
9402
- var parentEntity = object.parentNode;
9403
- var parentRenderable = parentEntity.renderable;
9404
- var parentSortable = parentEntity.sortable;
9524
+ object.nodeValue = "" + object.parsedStyle.text || '';
9525
+ }
9526
+ };
9405
9527
 
9406
- if (parentRenderable) {
9407
- parentRenderable.dirty = true;
9408
- } // need re-sort on parent
9528
+ /**
9529
+ * it must transform after text get parsed
9530
+ * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-transform
9531
+ */
9532
+ var CSSPropertyTextTransform = {
9533
+ calculator: function calculator(name, oldParsed, parsed, object) {
9534
+ var rawText = object.getAttribute('text');
9409
9535
 
9536
+ if (rawText) {
9537
+ var transformedText = rawText;
9410
9538
 
9411
- if (parentSortable) {
9412
- parentSortable.dirty = true;
9539
+ if (parsed.value === 'capitalize') {
9540
+ transformedText = rawText.charAt(0).toUpperCase() + rawText.slice(1);
9541
+ } else if (parsed.value === 'lowercase') {
9542
+ transformedText = rawText.toLowerCase();
9543
+ } else if (parsed.value === 'uppercase') {
9544
+ transformedText = rawText.toUpperCase();
9413
9545
  }
9546
+
9547
+ object.parsedStyle.text = transformedText;
9414
9548
  }
9549
+
9550
+ return parsed;
9415
9551
  }
9416
9552
  };
9417
9553
 
@@ -9543,143 +9679,23 @@ var CSSPropertyTransformOrigin = {
9543
9679
  parser: parseTransformOrigin
9544
9680
  };
9545
9681
 
9546
- var CSSPropertyPath = {
9547
- /**
9548
- * path2Curve
9549
- */
9550
- parser: parsePath,
9551
- calculator: function calculator(name, oldParsed, parsed) {
9552
- // unset
9553
- if (parsed instanceof CSSKeywordValue && parsed.value === 'unset') {
9554
- return {
9555
- absolutePath: [],
9556
- hasArc: false,
9557
- segments: [],
9558
- polygons: [],
9559
- polylines: [],
9560
- curve: [],
9561
- totalLength: 0,
9562
- curveSegments: [],
9563
- zCommandIndexes: [],
9564
- rect: new Rectangle(0, 0, 0, 0)
9565
- };
9566
- }
9567
-
9568
- return parsed;
9569
- },
9570
- mixer: mergePaths,
9571
-
9572
- /**
9573
- * update local position
9574
- */
9575
- postProcessor: function postProcessor(object) {
9576
- if (object.nodeName === exports.Shape.PATH) {
9577
- var _object$parsedStyle = object.parsedStyle,
9578
- _object$parsedStyle$d = _object$parsedStyle.defX,
9579
- defX = _object$parsedStyle$d === void 0 ? 0 : _object$parsedStyle$d,
9580
- _object$parsedStyle$d2 = _object$parsedStyle.defY,
9581
- defY = _object$parsedStyle$d2 === void 0 ? 0 : _object$parsedStyle$d2;
9582
- object.setLocalPosition(defX, defY);
9583
- }
9584
- }
9585
- };
9586
-
9587
- var CSSPropertyPoints = {
9588
- parser: parsePoints,
9589
-
9590
- /**
9591
- * update local position
9592
- */
9593
- postProcessor: function postProcessor(object) {
9594
- if (object.nodeName === exports.Shape.POLYGON || object.nodeName === exports.Shape.POLYLINE) {
9595
- var _object$parsedStyle = object.parsedStyle,
9596
- defX = _object$parsedStyle.defX,
9597
- defY = _object$parsedStyle.defY;
9598
- object.setLocalPosition(defX, defY);
9599
- }
9600
- }
9601
- };
9602
-
9603
- /**
9604
- * @see /zh/docs/api/basic/display-object#clippath
9605
- * @example
9606
- const image = new Image({
9607
- style: {
9608
- width: 200,
9609
- height: 200,
9610
- clipPath: new Circle({
9611
- style: {
9612
- x: 100, // 处于被裁剪图形局部坐标系下
9613
- y: 100,
9614
- r: 50,
9615
- },
9616
- }),
9617
- }
9618
- });
9619
- */
9620
-
9621
- var CSSPropertyClipPath = {
9622
- calculator: function calculator(name, oldClipPath, newClipPath, object) {
9623
- // unset
9624
- if (newClipPath instanceof CSSKeywordValue) {
9625
- newClipPath = null;
9626
- } // clear ref to old clip path
9627
-
9628
-
9629
- if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.style.clipPathTargets) {
9630
- var index = oldClipPath.style.clipPathTargets.indexOf(object);
9631
- oldClipPath.style.clipPathTargets.splice(index, 1);
9632
- }
9633
-
9634
- if (newClipPath) {
9635
- if (!newClipPath.style.clipPathTargets) {
9636
- newClipPath.style.clipPathTargets = [];
9637
- }
9638
-
9639
- newClipPath.style.clipPathTargets.push(object);
9640
- }
9641
-
9642
- dirtifyToRoot(object);
9643
- return newClipPath;
9644
- }
9645
- };
9646
-
9647
- var CSSPropertyText = {
9648
- calculator: function calculator(name, oldParsed, parsed, object) {
9649
- if (parsed instanceof CSSKeywordValue) {
9650
- if (parsed.value === 'unset') {
9651
- return '';
9652
- } else {
9653
- return parsed.value;
9654
- }
9655
- }
9656
-
9657
- return parsed;
9658
- },
9682
+ var CSSPropertyZIndex = {
9683
+ parser: parseNumber,
9659
9684
  postProcessor: function postProcessor(object) {
9660
- object.nodeValue = "" + object.parsedStyle.text || '';
9661
- }
9662
- };
9685
+ if (object.parentNode) {
9686
+ var parentEntity = object.parentNode;
9687
+ var parentRenderable = parentEntity.renderable;
9688
+ var parentSortable = parentEntity.sortable;
9663
9689
 
9664
- var CSSPropertyTextTransform = {
9665
- calculator: function calculator(name, oldParsed, parsed, object) {
9666
- var rawText = object.getAttribute('text');
9690
+ if (parentRenderable) {
9691
+ parentRenderable.dirty = true;
9692
+ } // need re-sort on parent
9667
9693
 
9668
- if (rawText) {
9669
- var transformedText = rawText;
9670
9694
 
9671
- if (parsed.value === 'capitalize') {
9672
- transformedText = rawText.charAt(0).toUpperCase() + rawText.slice(1);
9673
- } else if (parsed.value === 'lowercase') {
9674
- transformedText = rawText.toLowerCase();
9675
- } else if (parsed.value === 'uppercase') {
9676
- transformedText = rawText.toUpperCase();
9695
+ if (parentSortable) {
9696
+ parentSortable.dirty = true;
9677
9697
  }
9678
-
9679
- object.parsedStyle.text = transformedText;
9680
9698
  }
9681
-
9682
- return parsed;
9683
9699
  }
9684
9700
  };
9685
9701
 
@@ -9896,7 +9912,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
9896
9912
  dirtifyToRoot(target);
9897
9913
  target.dispatchEvent(new MutationEvent(exports.ElementEvent.ATTR_MODIFIED, target, _this2, _this2, 'clipPath', MutationEvent.MODIFICATION, _this2, _this2));
9898
9914
 
9899
- if (target.isCustomElement) {
9915
+ if (target.isCustomElement && target.isConnected) {
9900
9916
  if (target.attributeChangedCallback) {
9901
9917
  target.attributeChangedCallback('clipPath', _this2, _this2);
9902
9918
  }
@@ -9908,7 +9924,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
9908
9924
  renderable.dirty = true;
9909
9925
  this.dispatchEvent(new MutationEvent(exports.ElementEvent.ATTR_MODIFIED, this, oldValue, value, name, MutationEvent.MODIFICATION, oldParsedValue, this.parsedStyle[name]));
9910
9926
 
9911
- if (this.isCustomElement) {
9927
+ if (this.isCustomElement && this.isConnected) {
9912
9928
  if (this.attributeChangedCallback) {
9913
9929
  this.attributeChangedCallback(name, oldValue, value);
9914
9930
  }
@@ -12777,8 +12793,11 @@ var CustomElementRegistry = /*#__PURE__*/function () {
12777
12793
  return CustomElementRegistry;
12778
12794
  }();
12779
12795
 
12796
+ var GeometryUpdaterFactory = manaSyringe.Syringe.defineToken('GeometryUpdaterFactory');
12797
+ var GeometryAABBUpdater = manaSyringe.Syringe.defineToken('GeometryAABBUpdater');
12798
+
12780
12799
  var _PROPERTY_HANDLERS;
12781
- var PROPERTY_HANDLERS = (_PROPERTY_HANDLERS = {}, _PROPERTY_HANDLERS[exports.PropertySyntax.COORDINATE] = CSSPropertyLocalPosition, _PROPERTY_HANDLERS[exports.PropertySyntax.COLOR] = CSSPropertyColor, _PROPERTY_HANDLERS[exports.PropertySyntax.PAINT] = CSSPropertyColor, _PROPERTY_HANDLERS[exports.PropertySyntax.OPACITY_VALUE] = CSSPropertyOpacity, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE] = CSSPropertyLengthOrPercentage, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE_12] = CSSPropertyLengthOrPercentage12, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE_14] = CSSPropertyLengthOrPercentage14, _PROPERTY_HANDLERS[exports.PropertySyntax.SHADOW_BLUR] = CSSPropertyShadowBlur, _PROPERTY_HANDLERS[exports.PropertySyntax.LIST_OF_POINTS] = CSSPropertyPoints, _PROPERTY_HANDLERS[exports.PropertySyntax.PATH] = CSSPropertyPath, _PROPERTY_HANDLERS[exports.PropertySyntax.FILTER] = CSSPropertyFilter, _PROPERTY_HANDLERS[exports.PropertySyntax.Z_INDEX] = CSSPropertyZIndex, _PROPERTY_HANDLERS[exports.PropertySyntax.OFFSET_PATH] = CSSPropertyOffsetPath, _PROPERTY_HANDLERS[exports.PropertySyntax.OFFSET_DISTANCE] = CSSPropertyOffsetDistance, _PROPERTY_HANDLERS[exports.PropertySyntax.CLIP_PATH] = CSSPropertyClipPath, _PROPERTY_HANDLERS[exports.PropertySyntax.TRANSFORM] = CSSPropertyTransform, _PROPERTY_HANDLERS[exports.PropertySyntax.TRANSFORM_ORIGIN] = CSSPropertyTransformOrigin, _PROPERTY_HANDLERS[exports.PropertySyntax.TEXT] = CSSPropertyText, _PROPERTY_HANDLERS[exports.PropertySyntax.TEXT_TRANSFORM] = CSSPropertyTextTransform, _PROPERTY_HANDLERS);
12800
+ var PROPERTY_HANDLERS = (_PROPERTY_HANDLERS = {}, _PROPERTY_HANDLERS[exports.PropertySyntax.COORDINATE] = CSSPropertyLocalPosition, _PROPERTY_HANDLERS[exports.PropertySyntax.ANGLE] = CSSPropertyAngle, _PROPERTY_HANDLERS[exports.PropertySyntax.COLOR] = CSSPropertyColor, _PROPERTY_HANDLERS[exports.PropertySyntax.PAINT] = CSSPropertyColor, _PROPERTY_HANDLERS[exports.PropertySyntax.OPACITY_VALUE] = CSSPropertyOpacity, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE] = CSSPropertyLengthOrPercentage, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE_12] = CSSPropertyLengthOrPercentage12, _PROPERTY_HANDLERS[exports.PropertySyntax.LENGTH_PERCENTAGE_14] = CSSPropertyLengthOrPercentage14, _PROPERTY_HANDLERS[exports.PropertySyntax.SHADOW_BLUR] = CSSPropertyShadowBlur, _PROPERTY_HANDLERS[exports.PropertySyntax.LIST_OF_POINTS] = CSSPropertyPoints, _PROPERTY_HANDLERS[exports.PropertySyntax.PATH] = CSSPropertyPath, _PROPERTY_HANDLERS[exports.PropertySyntax.FILTER] = CSSPropertyFilter, _PROPERTY_HANDLERS[exports.PropertySyntax.Z_INDEX] = CSSPropertyZIndex, _PROPERTY_HANDLERS[exports.PropertySyntax.OFFSET_PATH] = CSSPropertyOffsetPath, _PROPERTY_HANDLERS[exports.PropertySyntax.OFFSET_DISTANCE] = CSSPropertyOffsetDistance, _PROPERTY_HANDLERS[exports.PropertySyntax.CLIP_PATH] = CSSPropertyClipPath, _PROPERTY_HANDLERS[exports.PropertySyntax.TRANSFORM] = CSSPropertyTransform, _PROPERTY_HANDLERS[exports.PropertySyntax.TRANSFORM_ORIGIN] = CSSPropertyTransformOrigin, _PROPERTY_HANDLERS[exports.PropertySyntax.TEXT] = CSSPropertyText, _PROPERTY_HANDLERS[exports.PropertySyntax.TEXT_TRANSFORM] = CSSPropertyTextTransform, _PROPERTY_HANDLERS);
12782
12801
  /**
12783
12802
  * Blink used them in code generation(css_properties.json5)
12784
12803
  */
@@ -13094,14 +13113,17 @@ var BUILT_IN_PROPERTIES = [{
13094
13113
  name: 'text',
13095
13114
  layoutDependent: true,
13096
13115
  defaultValue: '',
13097
- syntax: exports.PropertySyntax.TEXT
13116
+ syntax: exports.PropertySyntax.TEXT,
13117
+ parsePriority: 50
13098
13118
  }, {
13099
13119
  name: 'textTransform',
13100
13120
  layoutDependent: true,
13101
13121
  inherited: true,
13102
13122
  keywords: ['capitalize', 'uppercase', 'lowercase', 'none'],
13103
13123
  defaultValue: 'none',
13104
- syntax: exports.PropertySyntax.TEXT_TRANSFORM
13124
+ syntax: exports.PropertySyntax.TEXT_TRANSFORM,
13125
+ parsePriority: 51 // it must get parsed after text
13126
+
13105
13127
  }, {
13106
13128
  name: 'font',
13107
13129
  layoutDependent: true
@@ -20670,9 +20692,9 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
20670
20692
  var oldRenderer = canvasConfig.renderer;
20671
20693
  canvasConfig.renderer = renderer; // keep all children undestroyed
20672
20694
 
20673
- this.destroy(false); // destroy all plugins
20695
+ this.destroy(false); // destroy all plugins, reverse will mutate origin array
20674
20696
 
20675
- oldRenderer === null || oldRenderer === void 0 ? void 0 : oldRenderer.getPlugins().reverse().forEach(function (plugin) {
20697
+ [].concat(oldRenderer === null || oldRenderer === void 0 ? void 0 : oldRenderer.getPlugins()).reverse().forEach(function (plugin) {
20676
20698
  plugin.destroy(_this6.container);
20677
20699
  });
20678
20700
  this.initRenderer(renderer);
@@ -20821,6 +20843,7 @@ exports.CSSMathValue = CSSMathValue;
20821
20843
  exports.CSSMathVariadic = CSSMathVariadic;
20822
20844
  exports.CSSNumericValue = CSSNumericValue;
20823
20845
  exports.CSSNumericValueType = CSSNumericValueType;
20846
+ exports.CSSPropertyAngle = CSSPropertyAngle;
20824
20847
  exports.CSSPropertyClipPath = CSSPropertyClipPath;
20825
20848
  exports.CSSPropertyColor = CSSPropertyColor;
20826
20849
  exports.CSSPropertyFilter = CSSPropertyFilter;