@antv/g 5.0.22-alpha.2 → 5.0.22-alpha.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.
Files changed (119) hide show
  1. package/es/Canvas.d.ts +0 -3
  2. package/es/css/CSSProperty.d.ts +1 -1
  3. package/es/css/StyleValueRegistry.d.ts +2 -1
  4. package/es/css/StyleValueRegistry.js +5 -4
  5. package/es/css/parser/dimension.d.ts +2 -1
  6. package/es/css/parser/path.d.ts +1 -1
  7. package/es/css/parser/transform-origin.d.ts +1 -1
  8. package/es/css/parser/transform-origin.js +2 -2
  9. package/es/css/properties/CSSPropertyAnchor.d.ts +4 -2
  10. package/es/css/properties/CSSPropertyAnchor.js +2 -1
  11. package/es/css/properties/CSSPropertyClipPath.d.ts +2 -1
  12. package/es/css/properties/CSSPropertyClipPath.js +1 -1
  13. package/es/css/properties/CSSPropertyColor.d.ts +3 -2
  14. package/es/css/properties/CSSPropertyColor.js +1 -1
  15. package/es/css/properties/CSSPropertyFilter.d.ts +3 -2
  16. package/es/css/properties/CSSPropertyFilter.js +1 -1
  17. package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  18. package/es/css/properties/CSSPropertyLengthOrPercentage.js +2 -1
  19. package/es/css/properties/CSSPropertyLineDash.d.ts +4 -2
  20. package/es/css/properties/CSSPropertyLineDash.js +1 -1
  21. package/es/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  22. package/es/css/properties/CSSPropertyLocalPosition.js +1 -1
  23. package/es/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  24. package/es/css/properties/CSSPropertyOffsetDistance.js +2 -1
  25. package/es/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  26. package/es/css/properties/CSSPropertyOpacity.d.ts +3 -2
  27. package/es/css/properties/CSSPropertyOpacity.js +1 -1
  28. package/es/css/properties/CSSPropertyPath.d.ts +3 -2
  29. package/es/css/properties/CSSPropertyPath.js +3 -1
  30. package/es/css/properties/CSSPropertyPoints.d.ts +3 -2
  31. package/es/css/properties/CSSPropertyPoints.js +1 -1
  32. package/es/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  33. package/es/css/properties/CSSPropertyShadowBlur.js +1 -1
  34. package/es/css/properties/CSSPropertyText.d.ts +3 -2
  35. package/es/css/properties/CSSPropertyText.js +1 -1
  36. package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  37. package/es/css/properties/CSSPropertyTextTransform.js +1 -1
  38. package/es/css/properties/CSSPropertyTransform.d.ts +3 -2
  39. package/es/css/properties/CSSPropertyTransform.js +1 -1
  40. package/es/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  41. package/es/css/properties/CSSPropertyTransformOrigin.js +1 -1
  42. package/es/css/properties/CSSPropertyVisibility.d.ts +3 -1
  43. package/es/css/properties/CSSPropertyZIndex.d.ts +4 -2
  44. package/es/css/properties/CSSPropertyZIndex.js +1 -1
  45. package/es/dom/Element.js +1 -1
  46. package/es/dom/MutationEvent.d.ts +1 -1
  47. package/es/dom/MutationObserver.d.ts +2 -1
  48. package/es/dom/MutationObserver.js +1 -1
  49. package/es/dom/MutationRecord.d.ts +1 -1
  50. package/es/dom/Node.js +1 -1
  51. package/es/dom/interfaces.d.ts +2 -1
  52. package/es/plugins/FrustumCullingStrategy.js +1 -1
  53. package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
  54. package/es/services/RenderingService.d.ts +2 -2
  55. package/es/services/TextService.d.ts +2 -2
  56. package/es/services/TextService.js +2 -1
  57. package/es/services/aabb/TextUpdater.d.ts +1 -2
  58. package/es/types.d.ts +1 -2
  59. package/es/utils/path.d.ts +1 -1
  60. package/lib/Canvas.d.ts +0 -3
  61. package/lib/css/CSSProperty.d.ts +1 -1
  62. package/lib/css/StyleValueRegistry.d.ts +2 -1
  63. package/lib/css/StyleValueRegistry.js +14 -8
  64. package/lib/css/parser/dimension.d.ts +2 -1
  65. package/lib/css/parser/path.d.ts +1 -1
  66. package/lib/css/parser/transform-origin.d.ts +1 -1
  67. package/lib/css/parser/transform-origin.js +5 -3
  68. package/lib/css/properties/CSSPropertyAnchor.d.ts +4 -2
  69. package/lib/css/properties/CSSPropertyAnchor.js +5 -3
  70. package/lib/css/properties/CSSPropertyClipPath.d.ts +2 -1
  71. package/lib/css/properties/CSSPropertyClipPath.js +2 -2
  72. package/lib/css/properties/CSSPropertyColor.d.ts +3 -2
  73. package/lib/css/properties/CSSPropertyColor.js +3 -3
  74. package/lib/css/properties/CSSPropertyFilter.d.ts +3 -2
  75. package/lib/css/properties/CSSPropertyFilter.js +2 -2
  76. package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  77. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +11 -9
  78. package/lib/css/properties/CSSPropertyLineDash.d.ts +4 -2
  79. package/lib/css/properties/CSSPropertyLineDash.js +3 -3
  80. package/lib/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  81. package/lib/css/properties/CSSPropertyLocalPosition.js +3 -3
  82. package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  83. package/lib/css/properties/CSSPropertyOffsetDistance.js +6 -4
  84. package/lib/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  85. package/lib/css/properties/CSSPropertyOpacity.d.ts +3 -2
  86. package/lib/css/properties/CSSPropertyOpacity.js +3 -3
  87. package/lib/css/properties/CSSPropertyPath.d.ts +3 -2
  88. package/lib/css/properties/CSSPropertyPath.js +9 -5
  89. package/lib/css/properties/CSSPropertyPoints.d.ts +3 -2
  90. package/lib/css/properties/CSSPropertyPoints.js +2 -2
  91. package/lib/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  92. package/lib/css/properties/CSSPropertyShadowBlur.js +2 -2
  93. package/lib/css/properties/CSSPropertyText.d.ts +3 -2
  94. package/lib/css/properties/CSSPropertyText.js +2 -2
  95. package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  96. package/lib/css/properties/CSSPropertyTextTransform.js +5 -5
  97. package/lib/css/properties/CSSPropertyTransform.d.ts +3 -2
  98. package/lib/css/properties/CSSPropertyTransform.js +22 -22
  99. package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  100. package/lib/css/properties/CSSPropertyTransformOrigin.js +2 -2
  101. package/lib/css/properties/CSSPropertyVisibility.d.ts +3 -1
  102. package/lib/css/properties/CSSPropertyZIndex.d.ts +4 -2
  103. package/lib/css/properties/CSSPropertyZIndex.js +2 -2
  104. package/lib/dom/Element.js +3 -3
  105. package/lib/dom/MutationEvent.d.ts +1 -1
  106. package/lib/dom/MutationObserver.d.ts +2 -1
  107. package/lib/dom/MutationObserver.js +11 -11
  108. package/lib/dom/MutationRecord.d.ts +1 -1
  109. package/lib/dom/Node.js +4 -4
  110. package/lib/dom/interfaces.d.ts +2 -1
  111. package/lib/plugins/FrustumCullingStrategy.js +2 -2
  112. package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
  113. package/lib/services/RenderingService.d.ts +2 -2
  114. package/lib/services/TextService.d.ts +2 -2
  115. package/lib/services/TextService.js +5 -3
  116. package/lib/services/aabb/TextUpdater.d.ts +1 -2
  117. package/lib/types.d.ts +1 -2
  118. package/lib/utils/path.d.ts +1 -1
  119. package/package.json +1 -1
@@ -9,10 +9,10 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
13
-
14
12
  var _cssom = require("../cssom");
15
13
 
14
+ var _parser = require("../parser");
15
+
16
16
  // import { uniq } from '@antv/util';
17
17
 
18
18
  /**
@@ -47,8 +47,8 @@ var _cssom = require("../cssom");
47
47
  */
48
48
  var CSSPropertyTransform = function () {
49
49
  function CSSPropertyTransform() {
50
- this.parser = _.parseTransform;
51
- this.mixer = _.mergeTransforms;
50
+ this.parser = _parser.parseTransform;
51
+ this.mixer = _parser.mergeTransforms;
52
52
  }
53
53
 
54
54
  CSSPropertyTransform.prototype.calculator = function (name, oldValue, newValue, object) {
@@ -111,40 +111,40 @@ var CSSPropertyTransform = function () {
111
111
  }) || [1, 1, 1];
112
112
  object.scaleLocal(newScale[0] / oldScale[0], newScale[1] / oldScale[1], newScale[2] / oldScale[2]);
113
113
  } else if (t === 'translate') {
114
- var newTranslation = value && value.d || [_.Opx, _.Opx];
115
- var oldTranslation = old && old.d || [_.Opx, _.Opx];
114
+ var newTranslation = value && value.d || [_parser.Opx, _parser.Opx];
115
+ var oldTranslation = old && old.d || [_parser.Opx, _parser.Opx];
116
116
  object.translateLocal(newTranslation[0].value - oldTranslation[0].value, newTranslation[1].value - oldTranslation[1].value, 0);
117
117
  } else if (t === 'translatex') {
118
- var newTranslation = value && value.d || [_.Opx];
119
- var oldTranslation = old && old.d || [_.Opx];
118
+ var newTranslation = value && value.d || [_parser.Opx];
119
+ var oldTranslation = old && old.d || [_parser.Opx];
120
120
  object.translateLocal(newTranslation[0].value - oldTranslation[0].value, 0, 0);
121
121
  } else if (t === 'translatey') {
122
- var newTranslation = value && value.d || [_.Opx];
123
- var oldTranslation = old && old.d || [_.Opx];
122
+ var newTranslation = value && value.d || [_parser.Opx];
123
+ var oldTranslation = old && old.d || [_parser.Opx];
124
124
  object.translateLocal(0, newTranslation[0].value - oldTranslation[0].value, 0);
125
125
  } else if (t === 'translatez') {
126
- var newTranslation = value && value.d || [_.Opx];
127
- var oldTranslation = old && old.d || [_.Opx];
126
+ var newTranslation = value && value.d || [_parser.Opx];
127
+ var oldTranslation = old && old.d || [_parser.Opx];
128
128
  object.translateLocal(0, 0, newTranslation[0].value - oldTranslation[0].value);
129
129
  } else if (t === 'translate3d') {
130
- var newTranslation = value && value.d || [_.Opx, _.Opx, _.Opx];
131
- var oldTranslation = old && old.d || [_.Opx, _.Opx, _.Opx];
130
+ var newTranslation = value && value.d || [_parser.Opx, _parser.Opx, _parser.Opx];
131
+ var oldTranslation = old && old.d || [_parser.Opx, _parser.Opx, _parser.Opx];
132
132
  object.translateLocal(newTranslation[0].value - oldTranslation[0].value, newTranslation[1].value - oldTranslation[1].value, newTranslation[2].value - oldTranslation[2].value);
133
133
  } else if (t === 'rotate') {
134
- var newAngles = value && value.d || [_.Odeg];
135
- var oldAngles = old && old.d || [_.Odeg];
134
+ var newAngles = value && value.d || [_parser.Odeg];
135
+ var oldAngles = old && old.d || [_parser.Odeg];
136
136
  object.rotateLocal(0, 0, newAngles[0].value - oldAngles[0].value);
137
137
  } else if (t === 'rotatex') {
138
- var newAngles = value && value.d || [_.Odeg];
139
- var oldAngles = old && old.d || [_.Odeg];
138
+ var newAngles = value && value.d || [_parser.Odeg];
139
+ var oldAngles = old && old.d || [_parser.Odeg];
140
140
  object.rotateLocal(newAngles[0].value - oldAngles[0].value, 0, 0);
141
141
  } else if (t === 'rotatey') {
142
- var newAngles = value && value.d || [_.Odeg];
143
- var oldAngles = old && old.d || [_.Odeg];
142
+ var newAngles = value && value.d || [_parser.Odeg];
143
+ var oldAngles = old && old.d || [_parser.Odeg];
144
144
  object.rotateLocal(0, newAngles[0].value - oldAngles[0].value, 0);
145
145
  } else if (t === 'rotatez') {
146
- var newAngles = value && value.d || [_.Odeg];
147
- var oldAngles = old && old.d || [_.Odeg];
146
+ var newAngles = value && value.d || [_parser.Odeg];
147
+ var oldAngles = old && old.d || [_parser.Odeg];
148
148
  object.rotateLocal(0, 0, newAngles[0].value - oldAngles[0].value);
149
149
  } else if (t === 'rotate3d') {// 暂不支持绕指定轴旋转
150
150
  // const newAngles = value && value.d || [Odeg, Odeg, Odeg];
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, CSSUnitValue } from '../..';
2
- import { parseTransformOrigin } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { CSSUnitValue } from '../cssom';
3
+ import { parseTransformOrigin } from '../parser';
3
4
  /**
4
5
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
5
6
  * @example
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  /**
15
15
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
@@ -18,7 +18,7 @@ var _ = require("../..");
18
18
  */
19
19
  var CSSPropertyTransformOrigin = function () {
20
20
  function CSSPropertyTransformOrigin() {
21
- this.parser = _.parseTransformOrigin;
21
+ this.parser = _parser.parseTransformOrigin;
22
22
  }
23
23
 
24
24
  CSSPropertyTransformOrigin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], CSSPropertyTransformOrigin);
@@ -1,4 +1,6 @@
1
- import type { CSSKeywordValue, CSSProperty, DisplayObject } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { CSSKeywordValue } from '../cssom';
3
+ import type { DisplayObject } from '../../display-objects';
2
4
  /**
3
5
  * should
4
6
  *
@@ -1,5 +1,7 @@
1
- import type { CSSProperty, CSSUnitValue, DisplayObject } from '../..';
2
- import { parseNumber } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { CSSUnitValue } from '../cssom';
3
+ import type { DisplayObject } from '../../display-objects';
4
+ import { parseNumber } from '../parser';
3
5
  export declare class CSSPropertyZIndex implements Partial<CSSProperty<CSSUnitValue, CSSUnitValue>> {
4
6
  parser: typeof parseNumber;
5
7
  postProcessor(object: DisplayObject): void;
@@ -9,11 +9,11 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var CSSPropertyZIndex = function () {
15
15
  function CSSPropertyZIndex() {
16
- this.parser = _.parseNumber;
16
+ this.parser = _parser.parseNumber;
17
17
  }
18
18
 
19
19
  CSSPropertyZIndex.prototype.postProcessor = function (object) {
@@ -21,7 +21,7 @@ var _interfaces = require("./interfaces");
21
21
 
22
22
  var _utils = require("../utils");
23
23
 
24
- var _ = require("..");
24
+ var _MutationEvent = require("./MutationEvent");
25
25
 
26
26
  var entityCounter = 0;
27
27
  /**
@@ -189,7 +189,7 @@ var Element = function (_super) {
189
189
  // index,
190
190
  // });
191
191
 
192
- child.dispatchEvent(new _.MutationEvent(_interfaces.ElementEvent.INSERTED, this, '', '', '', 0, '', ''));
192
+ child.dispatchEvent(new _MutationEvent.MutationEvent(_interfaces.ElementEvent.INSERTED, this, '', '', '', 0, '', ''));
193
193
  return child;
194
194
  };
195
195
 
@@ -220,7 +220,7 @@ var Element = function (_super) {
220
220
  destroy = true;
221
221
  }
222
222
 
223
- child.dispatchEvent(new _.MutationEvent(_interfaces.ElementEvent.REMOVED, this, '', '', '', 0, '', '')); // emit destroy event
223
+ child.dispatchEvent(new _MutationEvent.MutationEvent(_interfaces.ElementEvent.REMOVED, this, '', '', '', 0, '', '')); // emit destroy event
224
224
 
225
225
  if (destroy) {
226
226
  child.emit(_interfaces.ElementEvent.DESTROY, {});
@@ -1,4 +1,4 @@
1
- import type { ElementEvent, IElement } from '..';
1
+ import type { ElementEvent, IElement } from './interfaces';
2
2
  import { FederatedEvent } from './FederatedEvent';
3
3
  export declare class MutationEvent extends FederatedEvent {
4
4
  relatedNode: IElement;
@@ -1,4 +1,5 @@
1
- import type { IElement, DisplayObject } from '..';
1
+ import type { IElement } from './interfaces';
2
+ import type { DisplayObject } from '../display-objects';
2
3
  import { MutationEvent } from './MutationEvent';
3
4
  import { MutationRecord } from './MutationRecord';
4
5
  export declare class Registration {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.MutationObserver = exports.Registration = void 0;
7
7
 
8
- var _ = require("..");
8
+ var _interfaces = require("./interfaces");
9
9
 
10
10
  var _MutationEvent = require("./MutationEvent");
11
11
 
@@ -50,10 +50,10 @@ var Registration = function () {
50
50
 
51
51
  Registration.prototype.addListeners_ = function (node) {
52
52
  var options = this.options;
53
- if (options.attributes) node.addEventListener(_.ElementEvent.ATTR_MODIFIED, this, true); // if (options.characterData) node.addEventListener('DOMCharacterDataModified', this, true);
53
+ if (options.attributes) node.addEventListener(_interfaces.ElementEvent.ATTR_MODIFIED, this, true); // if (options.characterData) node.addEventListener('DOMCharacterDataModified', this, true);
54
54
 
55
- if (options.childList) node.addEventListener(_.ElementEvent.INSERTED, this, true);
56
- if (options.childList || options.subtree) node.addEventListener(_.ElementEvent.REMOVED, this, true);
55
+ if (options.childList) node.addEventListener(_interfaces.ElementEvent.INSERTED, this, true);
56
+ if (options.childList || options.subtree) node.addEventListener(_interfaces.ElementEvent.REMOVED, this, true);
57
57
  };
58
58
 
59
59
  Registration.prototype.removeListeners = function () {
@@ -62,10 +62,10 @@ var Registration = function () {
62
62
 
63
63
  Registration.prototype.removeListeners_ = function (node) {
64
64
  var options = this.options;
65
- if (options.attributes) node.removeEventListener(_.ElementEvent.ATTR_MODIFIED, this, true); // if (options.characterData) node.removeEventListener('DOMCharacterDataModified', this, true);
65
+ if (options.attributes) node.removeEventListener(_interfaces.ElementEvent.ATTR_MODIFIED, this, true); // if (options.characterData) node.removeEventListener('DOMCharacterDataModified', this, true);
66
66
 
67
- if (options.childList) node.removeEventListener(_.ElementEvent.INSERTED, this, true);
68
- if (options.childList || options.subtree) node.removeEventListener(_.ElementEvent.REMOVED, this, true);
67
+ if (options.childList) node.removeEventListener(_interfaces.ElementEvent.INSERTED, this, true);
68
+ if (options.childList || options.subtree) node.removeEventListener(_interfaces.ElementEvent.REMOVED, this, true);
69
69
  };
70
70
  /**
71
71
  * Adds a transient observer on node. The transient observer gets removed
@@ -113,7 +113,7 @@ var Registration = function () {
113
113
  var target;
114
114
 
115
115
  switch (e.type) {
116
- case _.ElementEvent.ATTR_MODIFIED:
116
+ case _interfaces.ElementEvent.ATTR_MODIFIED:
117
117
  // http://dom.spec.whatwg.org/#concept-mo-queue-attributes
118
118
  var name_1 = e.attrName; // @ts-ignore
119
119
 
@@ -158,17 +158,17 @@ var Registration = function () {
158
158
  // });
159
159
  // break;
160
160
 
161
- case _.ElementEvent.REMOVED: // this.addTransientObserver(e.target as IElement);
161
+ case _interfaces.ElementEvent.REMOVED: // this.addTransientObserver(e.target as IElement);
162
162
  // Fall through.
163
163
 
164
- case _.ElementEvent.INSERTED:
164
+ case _interfaces.ElementEvent.INSERTED:
165
165
  // http://dom.spec.whatwg.org/#concept-mo-queue-childlist
166
166
  target = e.relatedNode;
167
167
  var changedNode = e.target;
168
168
  var addedNodes = void 0;
169
169
  var removedNodes = void 0;
170
170
 
171
- if (e.type === _.ElementEvent.INSERTED) {
171
+ if (e.type === _interfaces.ElementEvent.INSERTED) {
172
172
  addedNodes = [changedNode];
173
173
  removedNodes = [];
174
174
  } else {
@@ -1,4 +1,4 @@
1
- import type { IElement } from '..';
1
+ import type { IElement } from './interfaces';
2
2
  export declare class MutationRecord {
3
3
  type: MutationRecordType;
4
4
  target: IElement;
package/lib/dom/Node.js CHANGED
@@ -7,7 +7,7 @@ exports.Node = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
10
- var _ = require("..");
10
+ var _types = require("../types");
11
11
 
12
12
  var _EventTarget = require("./EventTarget");
13
13
 
@@ -86,7 +86,7 @@ var Node = function (_super) {
86
86
 
87
87
  var out = '';
88
88
 
89
- if (this.nodeName === _.Shape.TEXT) {
89
+ if (this.nodeName === _types.Shape.TEXT) {
90
90
  // @ts-ignore
91
91
  out += this.style.text;
92
92
  }
@@ -95,7 +95,7 @@ var Node = function (_super) {
95
95
  for (var _b = (0, _tslib.__values)(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
96
96
  var child = _c.value;
97
97
 
98
- if (child.nodeName === _.Shape.TEXT) {
98
+ if (child.nodeName === _types.Shape.TEXT) {
99
99
  out += child.nodeValue;
100
100
  } else {
101
101
  out += child.textContent;
@@ -123,7 +123,7 @@ var Node = function (_super) {
123
123
  _this.removeChild(child, true);
124
124
  });
125
125
 
126
- if (this.nodeName === _.Shape.TEXT) {
126
+ if (this.nodeName === _types.Shape.TEXT) {
127
127
  // @ts-ignore
128
128
  this.style.text = "" + content;
129
129
  } else {// this.appendChild(
@@ -3,7 +3,8 @@ import type { AnimationTimeline } from './AnimationTimeline';
3
3
  import type { BaseStyleProps, Shape } from '../types';
4
4
  import type { FederatedEvent } from './FederatedEvent';
5
5
  import type { CustomElementRegistry } from './CustomElementRegistry';
6
- import type { CanvasConfig, DisplayObject, InteractivePointerEvent } from '..';
6
+ import type { CanvasConfig, InteractivePointerEvent } from '../types';
7
+ import type { DisplayObject } from '../display-objects';
7
8
  import type { PointLike } from '../shapes';
8
9
  import type { Camera } from '../camera';
9
10
  import type { ContextService, EventService, RenderingService } from '../services';
@@ -17,10 +17,10 @@ var _shapes = require("../shapes");
17
17
 
18
18
  var _Camera = require("../camera/Camera");
19
19
 
20
- var _ = require("..");
20
+ var _types = require("../types");
21
21
 
22
22
  // group is not a 2d shape
23
- var shape2D = [_.Shape.CIRCLE, _.Shape.ELLIPSE, _.Shape.IMAGE, _.Shape.RECT, _.Shape.LINE, _.Shape.POLYLINE, _.Shape.POLYGON, _.Shape.TEXT, _.Shape.PATH, _.Shape.HTML];
23
+ var shape2D = [_types.Shape.CIRCLE, _types.Shape.ELLIPSE, _types.Shape.IMAGE, _types.Shape.RECT, _types.Shape.LINE, _types.Shape.POLYLINE, _types.Shape.POLYGON, _types.Shape.TEXT, _types.Shape.PATH, _types.Shape.HTML];
24
24
 
25
25
  var FrustumCullingStrategy = function () {
26
26
  function FrustumCullingStrategy() {}
@@ -1,4 +1,4 @@
1
- import type { RenderingService, RenderingPlugin } from '../services/RenderingService';
1
+ import type { RenderingService, RenderingPlugin } from '../services';
2
2
  export declare class PrepareRendererPlugin implements RenderingPlugin {
3
3
  static tag: string;
4
4
  private renderingContext;
@@ -1,7 +1,7 @@
1
1
  import { Syringe } from 'mana-syringe';
2
2
  import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from 'tapable';
3
- import type { CanvasConfig, DisplayObject } from '..';
4
- import type { EventPosition, InteractivePointerEvent } from '../types';
3
+ import type { DisplayObject } from '../display-objects';
4
+ import type { CanvasConfig, EventPosition, InteractivePointerEvent } from '../types';
5
5
  export interface RenderingPlugin {
6
6
  apply: (renderer: RenderingService) => void;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="offscreencanvas" />
2
- import type { ParsedTextStyleProps } from '..';
3
- import { Rectangle } from '..';
2
+ import type { ParsedTextStyleProps } from '../display-objects';
3
+ import { Rectangle } from '../shapes';
4
4
  export interface TextMetrics {
5
5
  font: string;
6
6
  width: number;
@@ -9,7 +9,9 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("..");
12
+ var _utils = require("../utils");
13
+
14
+ var _shapes = require("../shapes");
13
15
 
14
16
  var _OffscreenCanvasCreator = require("./OffscreenCanvasCreator");
15
17
 
@@ -163,7 +165,7 @@ var TextService = function () {
163
165
  // dropShadow = 0,
164
166
  // dropShadowDistance = 0,
165
167
  leading = _c === void 0 ? 0 : _c;
166
- var font = (0, _.toFontString)(parsedStyle);
168
+ var font = (0, _utils.toFontString)(parsedStyle);
167
169
  var fontProperties = this.measureFont(font, offscreenCanvas); // fallback in case UA disallow canvas data extraction
168
170
  // (toDataURI, getImageData functions)
169
171
 
@@ -224,7 +226,7 @@ var TextService = function () {
224
226
  offsetX -= width;
225
227
  }
226
228
 
227
- return new _.Rectangle(offsetX - lineWidth.value / 2, offsetY + i * lineHeight, width + lineWidth.value, lineHeight);
229
+ return new _shapes.Rectangle(offsetX - lineWidth.value / 2, offsetY + i * lineHeight, width + lineWidth.value, lineHeight);
228
230
  })
229
231
  };
230
232
  };
@@ -1,6 +1,5 @@
1
1
  import { GeometryAABBUpdater } from './interfaces';
2
- import type { ParsedTextStyleProps } from '../../display-objects/Text';
3
- import type { DisplayObject } from '../..';
2
+ import type { DisplayObject, ParsedTextStyleProps } from '../../display-objects';
4
3
  export declare class TextUpdater implements GeometryAABBUpdater<ParsedTextStyleProps> {
5
4
  private textService;
6
5
  private isReadyToMeasure;
package/lib/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="offscreencanvas" />
2
2
  import type { vec2, vec3 } from 'gl-matrix';
3
- import type { ParsedPathStyleProps, ParsedPolylineStyleProps } from './display-objects';
4
- import type { DisplayObject } from './display-objects';
3
+ import type { DisplayObject, ParsedPathStyleProps, ParsedPolylineStyleProps } from './display-objects';
5
4
  import type { IRenderer } from './AbstractRenderer';
6
5
  import type { CSSGlobalKeywords, CSSGradientValue, CSSKeywordValue, CSSRGB, CSSUnitValue } from './css';
7
6
  import { Syringe } from 'mana-syringe';
@@ -1,4 +1,4 @@
1
- import type { DisplayObject } from '../display-objects/DisplayObject';
1
+ import type { DisplayObject } from '../display-objects';
2
2
  import type { PathCommand } from '../types';
3
3
  export declare function equalizeSegments(path1: PathCommand[], path2: PathCommand[], TL?: number): PathCommand[][];
4
4
  export declare function getDrawDirection(pathArray: PathCommand[]): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g",
3
- "version": "5.0.22-alpha.2",
3
+ "version": "5.0.22-alpha.5",
4
4
  "description": "A core module including ECS and DI container.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",