@antv/g-lite 2.6.0 → 2.7.1

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.esm.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * @antv/g-lite
3
3
  * @description A core module for rendering engine implements DOM API.
4
- * @version 2.6.0
5
- * @date 12/22/2025, 3:02:41 AM
4
+ * @version 2.7.1
5
+ * @date 10/10/2026, 9:45:35 AM
6
6
  * @author AntVis
7
7
  * @docs https://g.antv.antgroup.com/
8
8
  */
@@ -3075,7 +3075,7 @@ var CSSStyleValue = /*#__PURE__*/function () {
3075
3075
  // type === UnitType.kChs ||
3076
3076
  // this.isViewportPercentageLength(type) ||
3077
3077
  // this.isContainerPercentageLength(type)
3078
- ;
3078
+ ;
3079
3079
  }
3080
3080
  }, {
3081
3081
  key: "isTime",
@@ -8232,7 +8232,7 @@ var FederatedEvent = /*#__PURE__*/function () {
8232
8232
  }]);
8233
8233
  }();
8234
8234
 
8235
- var FederatedMouseEvent = /*#__PURE__*/function (_ref) {
8235
+ var FederatedMouseEvent = /*#__PURE__*/function (_FederatedEvent) {
8236
8236
  function FederatedMouseEvent() {
8237
8237
  var _this;
8238
8238
  _classCallCheck(this, FederatedMouseEvent);
@@ -8271,7 +8271,7 @@ var FederatedMouseEvent = /*#__PURE__*/function (_ref) {
8271
8271
  _this.screen = new Point();
8272
8272
  return _this;
8273
8273
  }
8274
- _inherits(FederatedMouseEvent, _ref);
8274
+ _inherits(FederatedMouseEvent, _FederatedEvent);
8275
8275
  return _createClass(FederatedMouseEvent, [{
8276
8276
  key: "clientX",
8277
8277
  get: function get() {
@@ -12002,13 +12002,6 @@ var Element = /*#__PURE__*/function (_Node) {
12002
12002
  dirtyChildren: [],
12003
12003
  dirtyReason: undefined
12004
12004
  };
12005
- /**
12006
- * @deprecated Legacy property for RBush spatial indexing.
12007
- * Will be removed in future versions.
12008
- */
12009
- _this.rBushNode = {
12010
- aabb: undefined
12011
- };
12012
12005
  /**
12013
12006
  * https://developer.mozilla.org/zh-CN/docs/Web/API/Element/namespaceURI
12014
12007
  */
@@ -12820,6 +12813,35 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
12820
12813
  }
12821
12814
  }
12822
12815
 
12816
+ /**
12817
+ * batch update attributes without attributeChangedCallback, for performance
12818
+ * use with caution
12819
+ * @param attributes
12820
+ * @param parseOptions
12821
+ * @experimental
12822
+ */
12823
+ }, {
12824
+ key: "setAttributes",
12825
+ value: function setAttributes(attributes) {
12826
+ var parseOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12827
+ var _parseOptions$skipDis = parseOptions.skipDispatchAttrModifiedEvent,
12828
+ skipDispatchAttrModifiedEvent = _parseOptions$skipDis === void 0 ? false : _parseOptions$skipDis;
12829
+ var oldAttributes;
12830
+ var oldParsedValues;
12831
+ if (!skipDispatchAttrModifiedEvent) {
12832
+ oldAttributes = _objectSpread({}, this.attributes);
12833
+ oldParsedValues = _objectSpread({}, this.parsedStyle);
12834
+ }
12835
+ runtime.styleValueRegistry.processProperties(this, attributes, parseOptions);
12836
+ // redraw at next frame
12837
+ this.dirty();
12838
+ if (!skipDispatchAttrModifiedEvent) {
12839
+ for (var key in attributes) {
12840
+ this.dispatchAttrModifiedEvent(key, oldAttributes[key], attributes[key], oldParsedValues[key]);
12841
+ }
12842
+ }
12843
+ }
12844
+
12823
12845
  /**
12824
12846
  * called when attributes get changed or initialized
12825
12847
  */
@@ -12833,6 +12855,14 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
12833
12855
 
12834
12856
  // redraw at next frame
12835
12857
  this.dirty();
12858
+
12859
+ // return;
12860
+
12861
+ this.dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue);
12862
+ }
12863
+ }, {
12864
+ key: "dispatchAttrModifiedEvent",
12865
+ value: function dispatchAttrModifiedEvent(name, oldValue, value, oldParsedValue) {
12836
12866
  var newParsedValue = this.parsedStyle[name];
12837
12867
  if (this.isConnected) {
12838
12868
  attrModifiedEvent.relatedNode = this;
@@ -15456,10 +15486,20 @@ var PrepareRendererPlugin = /*#__PURE__*/function () {
15456
15486
  renderingService.dirty();
15457
15487
  };
15458
15488
  var handleBoundsChanged = function handleBoundsChanged(e) {
15459
- var _this$mutationRecords;
15460
15489
  var records = e.detail;
15461
15490
  // Store mutation records for potential future processing
15462
- (_this$mutationRecords = _this.mutationRecords).push.apply(_this$mutationRecords, _toConsumableArray(records));
15491
+ var _iterator = _createForOfIteratorHelper(records),
15492
+ _step;
15493
+ try {
15494
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
15495
+ var record = _step.value;
15496
+ _this.mutationRecords.push(record);
15497
+ }
15498
+ } catch (err) {
15499
+ _iterator.e(err);
15500
+ } finally {
15501
+ _iterator.f();
15502
+ }
15463
15503
  renderingService.dirty();
15464
15504
  };
15465
15505
  var handleMounted = function handleMounted(e) {