@antv/g 5.0.22-alpha.1 → 5.0.22-alpha.4

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 (273) hide show
  1. package/es/AbstractRenderer.js +1 -3
  2. package/es/Canvas.d.ts +0 -3
  3. package/es/Canvas.js +1 -3
  4. package/es/DisplayObjectPool.js +1 -3
  5. package/es/camera/Camera.js +1 -3
  6. package/es/camera/Landmark.js +1 -3
  7. package/es/components/Cullable.js +1 -3
  8. package/es/components/Geometry.js +1 -3
  9. package/es/components/Renderable.js +1 -3
  10. package/es/components/Sortable.js +1 -3
  11. package/es/components/Transform.js +1 -3
  12. package/es/css/CSSProperty.d.ts +1 -1
  13. package/es/css/LayoutRegistry.js +1 -3
  14. package/es/css/StyleValueRegistry.d.ts +2 -1
  15. package/es/css/StyleValueRegistry.js +6 -7
  16. package/es/css/cssom/CSSColorValue.js +1 -3
  17. package/es/css/cssom/CSSGradientValue.js +6 -8
  18. package/es/css/cssom/CSSKeywordValue.js +1 -3
  19. package/es/css/cssom/CSSMathInvert.js +1 -3
  20. package/es/css/cssom/CSSMathMax.js +1 -3
  21. package/es/css/cssom/CSSMathMin.js +1 -3
  22. package/es/css/cssom/CSSMathNegate.js +1 -3
  23. package/es/css/cssom/CSSMathProduct.js +1 -3
  24. package/es/css/cssom/CSSMathSum.js +1 -3
  25. package/es/css/cssom/CSSMathValue.js +1 -3
  26. package/es/css/cssom/CSSMathVariadic.js +1 -3
  27. package/es/css/cssom/CSSNumericValue.js +1 -3
  28. package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
  29. package/es/css/cssom/CSSNumericValueType.js +1 -3
  30. package/es/css/cssom/CSSRGB.js +2 -4
  31. package/es/css/cssom/CSSStyleValue.d.ts +1 -1
  32. package/es/css/cssom/CSSStyleValue.js +1 -3
  33. package/es/css/cssom/CSSTransformComponent.js +1 -3
  34. package/es/css/cssom/CSSTransformValue.js +1 -3
  35. package/es/css/cssom/CSSTranslate.js +1 -3
  36. package/es/css/cssom/CSSUnitValue.js +2 -4
  37. package/es/css/parser/color.js +1 -1
  38. package/es/css/parser/dimension.js +1 -1
  39. package/es/css/parser/transform-origin.d.ts +1 -1
  40. package/es/css/parser/transform-origin.js +2 -2
  41. package/es/css/parser/transform.d.ts +1 -1
  42. package/es/css/parser/transform.js +2 -2
  43. package/es/css/properties/CSSPropertyAnchor.js +1 -3
  44. package/es/css/properties/CSSPropertyClipPath.js +1 -3
  45. package/es/css/properties/CSSPropertyColor.js +1 -3
  46. package/es/css/properties/CSSPropertyFilter.js +1 -3
  47. package/es/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
  48. package/es/css/properties/CSSPropertyLineDash.js +1 -3
  49. package/es/css/properties/CSSPropertyLocalPosition.js +1 -3
  50. package/es/css/properties/CSSPropertyOffsetDistance.js +1 -3
  51. package/es/css/properties/CSSPropertyOffsetPath.js +1 -3
  52. package/es/css/properties/CSSPropertyOpacity.js +1 -3
  53. package/es/css/properties/CSSPropertyPath.js +1 -3
  54. package/es/css/properties/CSSPropertyPoints.js +1 -3
  55. package/es/css/properties/CSSPropertyShadowBlur.js +1 -3
  56. package/es/css/properties/CSSPropertyText.js +2 -4
  57. package/es/css/properties/CSSPropertyTextTransform.js +1 -3
  58. package/es/css/properties/CSSPropertyTransform.js +1 -3
  59. package/es/css/properties/CSSPropertyTransformOrigin.js +1 -3
  60. package/es/css/properties/CSSPropertyVisibility.js +1 -3
  61. package/es/css/properties/CSSPropertyZIndex.js +1 -3
  62. package/es/display-objects/Circle.js +1 -3
  63. package/es/display-objects/CustomElement.js +1 -3
  64. package/es/display-objects/DisplayObject.js +3 -6
  65. package/es/display-objects/Ellipse.js +1 -3
  66. package/es/display-objects/Group.js +1 -3
  67. package/es/display-objects/HTML.js +3 -6
  68. package/es/display-objects/Image.js +1 -3
  69. package/es/display-objects/Line.js +1 -3
  70. package/es/display-objects/Path.js +1 -3
  71. package/es/display-objects/Polygon.js +1 -3
  72. package/es/display-objects/Polyline.js +1 -3
  73. package/es/display-objects/Rect.js +1 -3
  74. package/es/display-objects/Text.js +3 -6
  75. package/es/dom/Animation.js +2 -4
  76. package/es/dom/AnimationEffectTiming.js +1 -3
  77. package/es/dom/AnimationEvent.js +1 -3
  78. package/es/dom/AnimationTimeline.js +1 -3
  79. package/es/dom/CustomElementRegistry.js +1 -3
  80. package/es/dom/CustomEvent.js +1 -3
  81. package/es/dom/Document.js +1 -3
  82. package/es/dom/Element.js +5 -7
  83. package/es/dom/EventTarget.js +3 -5
  84. package/es/dom/FederatedEvent.js +1 -3
  85. package/es/dom/FederatedMouseEvent.js +1 -3
  86. package/es/dom/FederatedPointerEvent.js +1 -3
  87. package/es/dom/FederatedWheelEvent.js +1 -3
  88. package/es/dom/KeyframeEffect.js +1 -3
  89. package/es/dom/KeyframeList.js +1 -1
  90. package/es/dom/MutationEvent.d.ts +1 -1
  91. package/es/dom/MutationEvent.js +1 -3
  92. package/es/dom/MutationObserver.d.ts +2 -1
  93. package/es/dom/MutationObserver.js +4 -11
  94. package/es/dom/MutationRecord.d.ts +1 -1
  95. package/es/dom/MutationRecord.js +1 -3
  96. package/es/dom/Node.js +3 -5
  97. package/es/dom/interfaces.d.ts +2 -1
  98. package/es/plugins/CullingPlugin.js +1 -3
  99. package/es/plugins/DirtyCheckPlugin.js +1 -3
  100. package/es/plugins/EventPlugin.js +1 -3
  101. package/es/plugins/FrustumCullingStrategy.js +2 -4
  102. package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
  103. package/es/plugins/PrepareRendererPlugin.js +1 -3
  104. package/es/services/EventService.js +3 -5
  105. package/es/services/OffscreenCanvasCreator.js +1 -3
  106. package/es/services/RenderingService.d.ts +2 -2
  107. package/es/services/RenderingService.js +1 -3
  108. package/es/services/SceneGraphSelector.js +1 -3
  109. package/es/services/SceneGraphService.js +1 -3
  110. package/es/services/TextService.d.ts +2 -2
  111. package/es/services/TextService.js +5 -6
  112. package/es/services/aabb/CircleUpdater.js +1 -3
  113. package/es/services/aabb/EllipseUpdater.js +1 -3
  114. package/es/services/aabb/LineUpdater.js +1 -3
  115. package/es/services/aabb/PathUpdater.js +1 -3
  116. package/es/services/aabb/PolylineUpdater.js +1 -3
  117. package/es/services/aabb/RectUpdater.js +1 -3
  118. package/es/services/aabb/TextUpdater.js +1 -3
  119. package/es/shapes/AABB.js +1 -3
  120. package/es/shapes/BoundingSphere.js +1 -3
  121. package/es/shapes/Frustum.js +1 -3
  122. package/es/shapes/Plane.js +1 -3
  123. package/es/shapes/Point.js +1 -3
  124. package/es/shapes/Ray.js +1 -3
  125. package/es/shapes/Rectangle.js +1 -3
  126. package/es/types.d.ts +1 -2
  127. package/es/utils/custom-easing.js +1 -1
  128. package/es/utils/path.d.ts +2 -2
  129. package/es/utils/path.js +3 -3
  130. package/es/utils/text.js +3 -3
  131. package/lib/AbstractRenderer.js +1 -3
  132. package/lib/Canvas.d.ts +0 -3
  133. package/lib/Canvas.js +2 -4
  134. package/lib/DisplayObjectPool.js +1 -3
  135. package/lib/camera/Camera.js +2 -4
  136. package/lib/camera/Landmark.js +1 -3
  137. package/lib/components/Cullable.js +2 -4
  138. package/lib/components/Geometry.js +1 -3
  139. package/lib/components/Renderable.js +1 -3
  140. package/lib/components/Sortable.js +1 -3
  141. package/lib/components/Transform.js +1 -3
  142. package/lib/css/CSSProperty.d.ts +1 -1
  143. package/lib/css/LayoutRegistry.js +1 -3
  144. package/lib/css/StyleValueRegistry.d.ts +2 -1
  145. package/lib/css/StyleValueRegistry.js +15 -11
  146. package/lib/css/cssom/CSSColorValue.js +1 -3
  147. package/lib/css/cssom/CSSGradientValue.js +7 -9
  148. package/lib/css/cssom/CSSKeywordValue.js +1 -3
  149. package/lib/css/cssom/CSSMathInvert.js +1 -3
  150. package/lib/css/cssom/CSSMathMax.js +1 -3
  151. package/lib/css/cssom/CSSMathMin.js +1 -3
  152. package/lib/css/cssom/CSSMathNegate.js +1 -3
  153. package/lib/css/cssom/CSSMathOperator.js +1 -1
  154. package/lib/css/cssom/CSSMathProduct.js +1 -3
  155. package/lib/css/cssom/CSSMathSum.js +1 -3
  156. package/lib/css/cssom/CSSMathValue.js +1 -3
  157. package/lib/css/cssom/CSSMathVariadic.js +2 -4
  158. package/lib/css/cssom/CSSNumericValue.js +1 -3
  159. package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
  160. package/lib/css/cssom/CSSNumericValueType.js +3 -5
  161. package/lib/css/cssom/CSSRGB.js +2 -4
  162. package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
  163. package/lib/css/cssom/CSSStyleValue.js +2 -4
  164. package/lib/css/cssom/CSSTransformComponent.js +2 -4
  165. package/lib/css/cssom/CSSTransformValue.js +1 -3
  166. package/lib/css/cssom/CSSTranslate.js +1 -3
  167. package/lib/css/cssom/CSSUnitValue.js +2 -4
  168. package/lib/css/cssom/types.js +1 -1
  169. package/lib/css/parser/color.js +3 -3
  170. package/lib/css/parser/dimension.js +6 -7
  171. package/lib/css/parser/numeric.js +3 -3
  172. package/lib/css/parser/path.js +1 -1
  173. package/lib/css/parser/transform-origin.d.ts +1 -1
  174. package/lib/css/parser/transform-origin.js +5 -3
  175. package/lib/css/parser/transform.d.ts +1 -1
  176. package/lib/css/parser/transform.js +11 -11
  177. package/lib/css/properties/CSSPropertyAnchor.js +1 -3
  178. package/lib/css/properties/CSSPropertyClipPath.js +1 -3
  179. package/lib/css/properties/CSSPropertyColor.js +1 -3
  180. package/lib/css/properties/CSSPropertyFilter.js +1 -3
  181. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
  182. package/lib/css/properties/CSSPropertyLineDash.js +1 -3
  183. package/lib/css/properties/CSSPropertyLocalPosition.js +1 -3
  184. package/lib/css/properties/CSSPropertyOffsetDistance.js +1 -3
  185. package/lib/css/properties/CSSPropertyOffsetPath.js +1 -3
  186. package/lib/css/properties/CSSPropertyOpacity.js +1 -3
  187. package/lib/css/properties/CSSPropertyPath.js +1 -3
  188. package/lib/css/properties/CSSPropertyPoints.js +1 -3
  189. package/lib/css/properties/CSSPropertyShadowBlur.js +1 -3
  190. package/lib/css/properties/CSSPropertyText.js +2 -4
  191. package/lib/css/properties/CSSPropertyTextTransform.js +1 -3
  192. package/lib/css/properties/CSSPropertyTransform.js +1 -3
  193. package/lib/css/properties/CSSPropertyTransformOrigin.js +1 -3
  194. package/lib/css/properties/CSSPropertyVisibility.js +1 -3
  195. package/lib/css/properties/CSSPropertyZIndex.js +1 -3
  196. package/lib/display-objects/Circle.js +1 -3
  197. package/lib/display-objects/CustomElement.js +1 -3
  198. package/lib/display-objects/DisplayObject.js +3 -6
  199. package/lib/display-objects/Ellipse.js +1 -3
  200. package/lib/display-objects/Group.js +1 -3
  201. package/lib/display-objects/HTML.js +4 -6
  202. package/lib/display-objects/Image.js +1 -3
  203. package/lib/display-objects/Line.js +1 -3
  204. package/lib/display-objects/Path.js +1 -3
  205. package/lib/display-objects/Polygon.js +1 -3
  206. package/lib/display-objects/Polyline.js +1 -3
  207. package/lib/display-objects/Rect.js +1 -3
  208. package/lib/display-objects/Text.js +4 -6
  209. package/lib/dom/Animation.js +2 -4
  210. package/lib/dom/AnimationEffectTiming.js +1 -3
  211. package/lib/dom/AnimationEvent.js +1 -3
  212. package/lib/dom/AnimationTimeline.js +2 -4
  213. package/lib/dom/CustomElementRegistry.js +1 -3
  214. package/lib/dom/CustomEvent.js +1 -3
  215. package/lib/dom/Document.js +1 -3
  216. package/lib/dom/Element.js +7 -9
  217. package/lib/dom/EventTarget.js +3 -5
  218. package/lib/dom/FederatedEvent.js +1 -3
  219. package/lib/dom/FederatedMouseEvent.js +1 -3
  220. package/lib/dom/FederatedPointerEvent.js +1 -3
  221. package/lib/dom/FederatedWheelEvent.js +1 -3
  222. package/lib/dom/KeyframeEffect.js +2 -4
  223. package/lib/dom/KeyframeList.js +1 -1
  224. package/lib/dom/MutationEvent.d.ts +1 -1
  225. package/lib/dom/MutationEvent.js +1 -3
  226. package/lib/dom/MutationObserver.d.ts +2 -1
  227. package/lib/dom/MutationObserver.js +15 -22
  228. package/lib/dom/MutationRecord.d.ts +1 -1
  229. package/lib/dom/MutationRecord.js +1 -3
  230. package/lib/dom/Node.js +6 -8
  231. package/lib/dom/interfaces.d.ts +2 -1
  232. package/lib/index.js +1 -1
  233. package/lib/plugins/CullingPlugin.js +2 -4
  234. package/lib/plugins/DirtyCheckPlugin.js +1 -3
  235. package/lib/plugins/EventPlugin.js +1 -3
  236. package/lib/plugins/FrustumCullingStrategy.js +3 -5
  237. package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
  238. package/lib/plugins/PrepareRendererPlugin.js +1 -3
  239. package/lib/services/EventService.js +3 -5
  240. package/lib/services/OffscreenCanvasCreator.js +1 -3
  241. package/lib/services/RenderingService.d.ts +2 -2
  242. package/lib/services/RenderingService.js +1 -3
  243. package/lib/services/SceneGraphSelector.js +2 -4
  244. package/lib/services/SceneGraphService.js +3 -5
  245. package/lib/services/TextService.d.ts +2 -2
  246. package/lib/services/TextService.js +8 -8
  247. package/lib/services/aabb/CircleUpdater.js +1 -3
  248. package/lib/services/aabb/EllipseUpdater.js +1 -3
  249. package/lib/services/aabb/LineUpdater.js +1 -3
  250. package/lib/services/aabb/PathUpdater.js +1 -3
  251. package/lib/services/aabb/PolylineUpdater.js +1 -3
  252. package/lib/services/aabb/RectUpdater.js +1 -3
  253. package/lib/services/aabb/TextUpdater.js +1 -3
  254. package/lib/services/aabb/index.js +10 -10
  255. package/lib/services/aabb/interfaces.js +1 -1
  256. package/lib/shapes/AABB.js +1 -3
  257. package/lib/shapes/BoundingSphere.js +1 -3
  258. package/lib/shapes/Frustum.js +2 -4
  259. package/lib/shapes/Plane.js +1 -3
  260. package/lib/shapes/Point.js +1 -3
  261. package/lib/shapes/Ray.js +1 -3
  262. package/lib/shapes/Rectangle.js +1 -3
  263. package/lib/types.d.ts +1 -2
  264. package/lib/types.js +1 -1
  265. package/lib/utils/animation.js +2 -3
  266. package/lib/utils/bezier-easing.js +1 -1
  267. package/lib/utils/custom-easing.js +2 -2
  268. package/lib/utils/math.js +9 -9
  269. package/lib/utils/path.d.ts +2 -2
  270. package/lib/utils/path.js +6 -6
  271. package/lib/utils/text.js +3 -3
  272. package/package.json +1 -1
  273. package/dist/index.umd.min.js +0 -30
@@ -9,9 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _FederatedMouseEvent = require("./FederatedMouseEvent");
11
11
 
12
- var FederatedPointerEvent =
13
- /** @class */
14
- function (_super) {
12
+ var FederatedPointerEvent = function (_super) {
15
13
  (0, _tslib.__extends)(FederatedPointerEvent, _super);
16
14
 
17
15
  function FederatedPointerEvent() {
@@ -9,9 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _FederatedMouseEvent = require("./FederatedMouseEvent");
11
11
 
12
- var FederatedWheelEvent =
13
- /** @class */
14
- function (_super) {
12
+ var FederatedWheelEvent = function (_super) {
15
13
  (0, _tslib.__extends)(FederatedWheelEvent, _super);
16
14
 
17
15
  function FederatedWheelEvent() {
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.KeyframeEffect = void 0;
7
6
  exports.makeTiming = makeTiming;
8
7
  exports.normalizeTimingInput = normalizeTimingInput;
9
8
  exports.numericTimingToObject = numericTimingToObject;
9
+ exports.KeyframeEffect = void 0;
10
10
 
11
11
  var _animation = require("../utils/animation");
12
12
 
@@ -92,9 +92,7 @@ function numericTimingToObject(timingInput) {
92
92
  */
93
93
 
94
94
 
95
- var KeyframeEffect =
96
- /** @class */
97
- function () {
95
+ var KeyframeEffect = function () {
98
96
  function KeyframeEffect(target, effectInput, timingInput) {
99
97
  var _this = this;
100
98
 
@@ -102,7 +102,7 @@ function normalizeKeyframes(effectInput, timing) {
102
102
  // TODO: Support add & accumulate in KeyframeEffect.composite
103
103
  // @see https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/composite
104
104
  if (['replace', 'add', 'accumulate', 'auto'].indexOf(memberValue) === -1) {
105
- throw new Error("".concat(memberValue, " compositing is not supported"));
105
+ throw new Error(memberValue + " compositing is not supported");
106
106
  }
107
107
  } else if (member === 'easing') {// TODO: Validate animation-timing-function
108
108
  // @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
@@ -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;
@@ -9,9 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _FederatedEvent = require("./FederatedEvent");
11
11
 
12
- var MutationEvent =
13
- /** @class */
14
- function (_super) {
12
+ var MutationEvent = function (_super) {
15
13
  (0, _tslib.__extends)(MutationEvent, _super);
16
14
 
17
15
  function MutationEvent(typeArg, relatedNode, prevValue, newValue, attrName, attrChange, prevParsedValue, newParsedValue) {
@@ -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 {
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Registration = exports.MutationObserver = void 0;
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
 
@@ -14,9 +14,7 @@ var _MutationRecord = require("./MutationRecord");
14
14
  var uidCounter = 0;
15
15
  var registrationsTable = new WeakMap();
16
16
 
17
- var Registration =
18
- /** @class */
19
- function () {
17
+ var Registration = function () {
20
18
  function Registration(observer, target, options) {
21
19
  this.observer = observer;
22
20
  this.target = target;
@@ -52,10 +50,10 @@ function () {
52
50
 
53
51
  Registration.prototype.addListeners_ = function (node) {
54
52
  var options = this.options;
55
- 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);
56
54
 
57
- if (options.childList) node.addEventListener(_.ElementEvent.INSERTED, this, true);
58
- 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);
59
57
  };
60
58
 
61
59
  Registration.prototype.removeListeners = function () {
@@ -64,10 +62,10 @@ function () {
64
62
 
65
63
  Registration.prototype.removeListeners_ = function (node) {
66
64
  var options = this.options;
67
- 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);
68
66
 
69
- if (options.childList) node.removeEventListener(_.ElementEvent.INSERTED, this, true);
70
- 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);
71
69
  };
72
70
  /**
73
71
  * Adds a transient observer on node. The transient observer gets removed
@@ -115,7 +113,7 @@ function () {
115
113
  var target;
116
114
 
117
115
  switch (e.type) {
118
- case _.ElementEvent.ATTR_MODIFIED:
116
+ case _interfaces.ElementEvent.ATTR_MODIFIED:
119
117
  // http://dom.spec.whatwg.org/#concept-mo-queue-attributes
120
118
  var name_1 = e.attrName; // @ts-ignore
121
119
 
@@ -160,17 +158,17 @@ function () {
160
158
  // });
161
159
  // break;
162
160
 
163
- case _.ElementEvent.REMOVED: // this.addTransientObserver(e.target as IElement);
161
+ case _interfaces.ElementEvent.REMOVED: // this.addTransientObserver(e.target as IElement);
164
162
  // Fall through.
165
163
 
166
- case _.ElementEvent.INSERTED:
164
+ case _interfaces.ElementEvent.INSERTED:
167
165
  // http://dom.spec.whatwg.org/#concept-mo-queue-childlist
168
166
  target = e.relatedNode;
169
167
  var changedNode = e.target;
170
168
  var addedNodes = void 0;
171
169
  var removedNodes = void 0;
172
170
 
173
- if (e.type === _.ElementEvent.INSERTED) {
171
+ if (e.type === _interfaces.ElementEvent.INSERTED) {
174
172
  addedNodes = [changedNode];
175
173
  removedNodes = [];
176
174
  } else {
@@ -206,9 +204,7 @@ exports.Registration = Registration;
206
204
  * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
207
205
  * @see https://github.com/googlearchive/MutationObservers/blob/master/MutationObserver.js
208
206
  */
209
- var MutationObserver =
210
- /** @class */
211
- function () {
207
+ var MutationObserver = function () {
212
208
  function MutationObserver(callback) {
213
209
  this.callback = callback;
214
210
  this.nodes = [];
@@ -218,10 +214,7 @@ function () {
218
214
 
219
215
  MutationObserver.prototype.observe = function (target, options) {
220
216
  // 1.1
221
- if (!options.childList && !options.attributes && !options.characterData || // 1.2
222
- options.attributeOldValue && !options.attributes || // 1.3
223
- options.attributeFilter && options.attributeFilter.length && !options.attributes || // 1.4
224
- options.characterDataOldValue && !options.characterData) {
217
+ if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
225
218
  throw new SyntaxError();
226
219
  }
227
220
 
@@ -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;
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.MutationRecord = void 0;
7
7
 
8
- var MutationRecord =
9
- /** @class */
10
- function () {
8
+ var MutationRecord = function () {
11
9
  function MutationRecord(type, target) {
12
10
  this.type = type;
13
11
  this.target = target;
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
 
@@ -16,9 +16,7 @@ var _EventTarget = require("./EventTarget");
16
16
  /**
17
17
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Node
18
18
  */
19
- var Node =
20
- /** @class */
21
- function (_super) {
19
+ var Node = function (_super) {
22
20
  (0, _tslib.__extends)(Node, _super);
23
21
 
24
22
  function Node() {
@@ -88,7 +86,7 @@ function (_super) {
88
86
 
89
87
  var out = '';
90
88
 
91
- if (this.nodeName === _.Shape.TEXT) {
89
+ if (this.nodeName === _types.Shape.TEXT) {
92
90
  // @ts-ignore
93
91
  out += this.style.text;
94
92
  }
@@ -97,7 +95,7 @@ function (_super) {
97
95
  for (var _b = (0, _tslib.__values)(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
98
96
  var child = _c.value;
99
97
 
100
- if (child.nodeName === _.Shape.TEXT) {
98
+ if (child.nodeName === _types.Shape.TEXT) {
101
99
  out += child.nodeValue;
102
100
  } else {
103
101
  out += child.textContent;
@@ -125,9 +123,9 @@ function (_super) {
125
123
  _this.removeChild(child, true);
126
124
  });
127
125
 
128
- if (this.nodeName === _.Shape.TEXT) {
126
+ if (this.nodeName === _types.Shape.TEXT) {
129
127
  // @ts-ignore
130
- this.style.text = "".concat(content);
128
+ this.style.text = "" + content;
131
129
  } else {// this.appendChild(
132
130
  // new Text({
133
131
  // style: {
@@ -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';
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CullingStrategyContribution = exports.CullingPlugin = void 0;
6
+ exports.CullingPlugin = exports.CullingStrategyContribution = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -21,9 +21,7 @@ var CullingStrategyContribution = _manaSyringe.Syringe.defineToken('CullingStrat
21
21
 
22
22
  exports.CullingStrategyContribution = CullingStrategyContribution;
23
23
 
24
- var CullingPlugin =
25
- /** @class */
26
- function () {
24
+ var CullingPlugin = function () {
27
25
  function CullingPlugin() {}
28
26
 
29
27
  CullingPlugin_1 = CullingPlugin;
@@ -16,9 +16,7 @@ var _RenderingContext = require("../services/RenderingContext");
16
16
  /**
17
17
  * Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began
18
18
  */
19
- var DirtyCheckPlugin =
20
- /** @class */
21
- function () {
19
+ var DirtyCheckPlugin = function () {
22
20
  function DirtyCheckPlugin() {}
23
21
 
24
22
  DirtyCheckPlugin_1 = DirtyCheckPlugin;
@@ -29,9 +29,7 @@ var _event = require("../utils/event");
29
29
  *
30
30
  * also provide some extra events such as `drag`
31
31
  */
32
- var EventPlugin =
33
- /** @class */
34
- function () {
32
+ var EventPlugin = function () {
35
33
  function EventPlugin() {
36
34
  var _this = this;
37
35
 
@@ -17,14 +17,12 @@ 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
- var FrustumCullingStrategy =
26
- /** @class */
27
- function () {
25
+ var FrustumCullingStrategy = function () {
28
26
  function FrustumCullingStrategy() {}
29
27
 
30
28
  FrustumCullingStrategy.prototype.isVisible = function (object) {
@@ -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;
@@ -15,9 +15,7 @@ var _dom = require("../dom");
15
15
 
16
16
  var _services = require("../services");
17
17
 
18
- var PrepareRendererPlugin =
19
- /** @class */
20
- function () {
18
+ var PrepareRendererPlugin = function () {
21
19
  function PrepareRendererPlugin() {}
22
20
 
23
21
  PrepareRendererPlugin_1 = PrepareRendererPlugin;
@@ -33,9 +33,7 @@ var _ContextService = require("./ContextService");
33
33
 
34
34
  var PROPAGATION_LIMIT = 2048;
35
35
 
36
- var EventService =
37
- /** @class */
38
- function (_super) {
36
+ var EventService = function (_super) {
39
37
  (0, _tslib.__extends)(EventService, _super);
40
38
 
41
39
  function EventService() {
@@ -591,7 +589,7 @@ function (_super) {
591
589
  mappers[i].fn(e);
592
590
  }
593
591
  } else {
594
- console.warn("[EventService]: Event mapping not defined for ".concat(e.type));
592
+ console.warn("[EventService]: Event mapping not defined for " + e.type);
595
593
  }
596
594
  };
597
595
 
@@ -923,7 +921,7 @@ function (_super) {
923
921
 
924
922
  EventService.prototype.notifyTarget = function (e, type) {
925
923
  type = type !== null && type !== void 0 ? type : e.type;
926
- var key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? "".concat(type, "capture") : type;
924
+ var key = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? type + "capture" : type;
927
925
  this.notifyListeners(e, key);
928
926
 
929
927
  if (e.eventPhase === e.AT_TARGET) {
@@ -15,9 +15,7 @@ var _manaSyringe = require("mana-syringe");
15
15
  * - g-plugin-canvas-picker `ctx.isPointInPath`
16
16
  * - g-plugin-webgl-renderer `ctx.createLinearGradient` and generate texture
17
17
  */
18
- var OffscreenCanvasCreator =
19
- /** @class */
20
- function () {
18
+ var OffscreenCanvasCreator = function () {
21
19
  function OffscreenCanvasCreator() {}
22
20
 
23
21
  OffscreenCanvasCreator.prototype.getOrCreateCanvas = function (offscreenCanvas) {
@@ -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
  }
@@ -33,9 +33,7 @@ var RenderingPluginContribution = _manaSyringe.Syringe.defineToken('RenderingPlu
33
33
 
34
34
  exports.RenderingPluginContribution = RenderingPluginContribution;
35
35
 
36
- var RenderingService =
37
- /** @class */
38
- function () {
36
+ var RenderingService = function () {
39
37
  function RenderingService() {
40
38
  this.inited = false;
41
39
  this.stats = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SceneGraphSelectorFactory = exports.SceneGraphSelector = exports.DefaultSceneGraphSelector = void 0;
6
+ exports.DefaultSceneGraphSelector = exports.SceneGraphSelector = exports.SceneGraphSelectorFactory = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -29,9 +29,7 @@ var NAME_REGEXP = /\[\s*name=(.*)\s*\]/;
29
29
  * * querySelectorAll
30
30
  */
31
31
 
32
- var DefaultSceneGraphSelector =
33
- /** @class */
34
- function () {
32
+ var DefaultSceneGraphSelector = function () {
35
33
  function DefaultSceneGraphSelector() {}
36
34
 
37
35
  DefaultSceneGraphSelector.prototype.selectOne = function (query, root) {
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SceneGraphService = exports.DefaultSceneGraphService = void 0;
7
- exports.dirtifyToRoot = dirtifyToRoot;
8
6
  exports.sortByZIndex = sortByZIndex;
7
+ exports.dirtifyToRoot = dirtifyToRoot;
8
+ exports.DefaultSceneGraphService = exports.SceneGraphService = void 0;
9
9
 
10
10
  var _tslib = require("tslib");
11
11
 
@@ -74,9 +74,7 @@ var SceneGraphService = _manaSyringe.Syringe.defineToken('SceneGraphService');
74
74
 
75
75
  exports.SceneGraphService = SceneGraphService;
76
76
 
77
- var DefaultSceneGraphService =
78
- /** @class */
79
- function () {
77
+ var DefaultSceneGraphService = function () {
80
78
  function DefaultSceneGraphService() {
81
79
  var _this = this;
82
80
  /**
@@ -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
 
@@ -34,12 +36,10 @@ var regexCannotStartJaJp = /[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾー
34
36
  var regexCannotEndJaJp = /[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/;
35
37
  var regexCannotStartKoKr = /[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/;
36
38
  var regexCannotEndKoKr = /[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/;
37
- var regexCannotStart = new RegExp("".concat(regexCannotStartZhCn.source, "|").concat(regexCannotStartZhTw.source, "|").concat(regexCannotStartJaJp.source, "|").concat(regexCannotStartKoKr.source));
38
- var regexCannotEnd = new RegExp("".concat(regexCannotEndZhCn.source, "|").concat(regexCannotEndZhTw.source, "|").concat(regexCannotEndJaJp.source, "|").concat(regexCannotEndKoKr.source));
39
+ var regexCannotStart = new RegExp(regexCannotStartZhCn.source + "|" + regexCannotStartZhTw.source + "|" + regexCannotStartJaJp.source + "|" + regexCannotStartKoKr.source);
40
+ var regexCannotEnd = new RegExp(regexCannotEndZhCn.source + "|" + regexCannotEndZhTw.source + "|" + regexCannotEndJaJp.source + "|" + regexCannotEndKoKr.source);
39
41
 
40
- var TextService =
41
- /** @class */
42
- function () {
42
+ var TextService = function () {
43
43
  function TextService() {
44
44
  var _this = this;
45
45
 
@@ -165,7 +165,7 @@ function () {
165
165
  // dropShadow = 0,
166
166
  // dropShadowDistance = 0,
167
167
  leading = _c === void 0 ? 0 : _c;
168
- var font = (0, _.toFontString)(parsedStyle);
168
+ var font = (0, _utils.toFontString)(parsedStyle);
169
169
  var fontProperties = this.measureFont(font, offscreenCanvas); // fallback in case UA disallow canvas data extraction
170
170
  // (toDataURI, getImageData functions)
171
171
 
@@ -226,7 +226,7 @@ function () {
226
226
  offsetX -= width;
227
227
  }
228
228
 
229
- 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);
230
230
  })
231
231
  };
232
232
  };
@@ -13,9 +13,7 @@ var _interfaces = require("./interfaces");
13
13
 
14
14
  var _types = require("../../types");
15
15
 
16
- var CircleUpdater =
17
- /** @class */
18
- function () {
16
+ var CircleUpdater = function () {
19
17
  function CircleUpdater() {}
20
18
 
21
19
  CircleUpdater.prototype.update = function (parsedStyle, object) {
@@ -13,9 +13,7 @@ var _interfaces = require("./interfaces");
13
13
 
14
14
  var _types = require("../../types");
15
15
 
16
- var EllipseUpdater =
17
- /** @class */
18
- function () {
16
+ var EllipseUpdater = function () {
19
17
  function EllipseUpdater() {}
20
18
 
21
19
  EllipseUpdater.prototype.update = function (parsedStyle, object) {
@@ -13,9 +13,7 @@ var _interfaces = require("./interfaces");
13
13
 
14
14
  var _types = require("../../types");
15
15
 
16
- var LineUpdater =
17
- /** @class */
18
- function () {
16
+ var LineUpdater = function () {
19
17
  function LineUpdater() {}
20
18
 
21
19
  LineUpdater.prototype.update = function (parsedStyle) {
@@ -13,9 +13,7 @@ var _interfaces = require("./interfaces");
13
13
 
14
14
  var _types = require("../../types");
15
15
 
16
- var PathUpdater =
17
- /** @class */
18
- function () {
16
+ var PathUpdater = function () {
19
17
  function PathUpdater() {}
20
18
 
21
19
  PathUpdater.prototype.update = function (parsedStyle) {
@@ -13,9 +13,7 @@ var _interfaces = require("./interfaces");
13
13
 
14
14
  var _types = require("../../types");
15
15
 
16
- var PolylineUpdater =
17
- /** @class */
18
- function () {
16
+ var PolylineUpdater = function () {
19
17
  function PolylineUpdater() {}
20
18
 
21
19
  PolylineUpdater.prototype.update = function (parsedStyle) {
@@ -17,9 +17,7 @@ var _types = require("../../types");
17
17
 
18
18
  var _css = require("../../css");
19
19
 
20
- var RectUpdater =
21
- /** @class */
22
- function () {
20
+ var RectUpdater = function () {
23
21
  function RectUpdater() {}
24
22
 
25
23
  RectUpdater.prototype.update = function (parsedStyle, object) {
@@ -19,9 +19,7 @@ var _types = require("../../types");
19
19
 
20
20
  var _css = require("../../css");
21
21
 
22
- var TextUpdater =
23
- /** @class */
24
- function () {
22
+ var TextUpdater = function () {
25
23
  function TextUpdater() {}
26
24
 
27
25
  TextUpdater.prototype.isReadyToMeasure = function (parsedStyle, object) {