@antv/g 5.0.22-alpha.3 → 5.0.22-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/dist/index.umd.min.js +30 -0
  2. package/es/AbstractRenderer.js +3 -1
  3. package/es/Canvas.d.ts +1 -4
  4. package/es/Canvas.js +5 -3
  5. package/es/DisplayObjectPool.js +3 -1
  6. package/es/camera/Camera.d.ts +105 -66
  7. package/es/camera/Camera.js +307 -171
  8. package/es/camera/Landmark.d.ts +18 -25
  9. package/es/camera/Landmark.js +1 -72
  10. package/es/canvas-module.js +2 -4
  11. package/es/components/Cullable.js +3 -1
  12. package/es/components/Geometry.js +3 -1
  13. package/es/components/Renderable.js +3 -1
  14. package/es/components/Sortable.js +3 -1
  15. package/es/components/Transform.js +3 -1
  16. package/es/css/LayoutRegistry.js +3 -1
  17. package/es/css/StyleValueRegistry.d.ts +10 -1
  18. package/es/css/StyleValueRegistry.js +28 -22
  19. package/es/css/cssom/CSSColorValue.js +3 -1
  20. package/es/css/cssom/CSSGradientValue.js +8 -6
  21. package/es/css/cssom/CSSKeywordValue.js +3 -1
  22. package/es/css/cssom/CSSMathInvert.js +3 -1
  23. package/es/css/cssom/CSSMathMax.js +3 -1
  24. package/es/css/cssom/CSSMathMin.js +3 -1
  25. package/es/css/cssom/CSSMathNegate.js +3 -1
  26. package/es/css/cssom/CSSMathProduct.js +3 -1
  27. package/es/css/cssom/CSSMathSum.js +3 -1
  28. package/es/css/cssom/CSSMathValue.js +3 -1
  29. package/es/css/cssom/CSSMathVariadic.js +3 -1
  30. package/es/css/cssom/CSSNumericValue.js +3 -1
  31. package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
  32. package/es/css/cssom/CSSNumericValueType.js +3 -1
  33. package/es/css/cssom/CSSRGB.js +4 -2
  34. package/es/css/cssom/CSSStyleValue.d.ts +1 -1
  35. package/es/css/cssom/CSSStyleValue.js +3 -1
  36. package/es/css/cssom/CSSTransformComponent.js +3 -1
  37. package/es/css/cssom/CSSTransformValue.js +3 -1
  38. package/es/css/cssom/CSSTranslate.js +3 -1
  39. package/es/css/cssom/CSSUnitValue.js +4 -2
  40. package/es/css/parser/color.js +2 -2
  41. package/es/css/parser/dimension.d.ts +2 -1
  42. package/es/css/parser/dimension.js +2 -2
  43. package/es/css/parser/numeric.js +1 -1
  44. package/es/css/parser/path.d.ts +1 -1
  45. package/es/css/parser/points.js +1 -1
  46. package/es/css/parser/transform-origin.d.ts +1 -1
  47. package/es/css/parser/transform-origin.js +3 -3
  48. package/es/css/properties/CSSPropertyAnchor.d.ts +4 -2
  49. package/es/css/properties/CSSPropertyAnchor.js +5 -2
  50. package/es/css/properties/CSSPropertyClipPath.d.ts +2 -1
  51. package/es/css/properties/CSSPropertyClipPath.js +4 -2
  52. package/es/css/properties/CSSPropertyColor.d.ts +3 -2
  53. package/es/css/properties/CSSPropertyColor.js +4 -2
  54. package/es/css/properties/CSSPropertyFilter.d.ts +3 -2
  55. package/es/css/properties/CSSPropertyFilter.js +4 -2
  56. package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  57. package/es/css/properties/CSSPropertyLengthOrPercentage.js +5 -2
  58. package/es/css/properties/CSSPropertyLineDash.d.ts +4 -2
  59. package/es/css/properties/CSSPropertyLineDash.js +4 -2
  60. package/es/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  61. package/es/css/properties/CSSPropertyLocalPosition.js +4 -2
  62. package/es/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  63. package/es/css/properties/CSSPropertyOffsetDistance.js +5 -2
  64. package/es/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  65. package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
  66. package/es/css/properties/CSSPropertyOpacity.d.ts +3 -2
  67. package/es/css/properties/CSSPropertyOpacity.js +4 -2
  68. package/es/css/properties/CSSPropertyPath.d.ts +3 -2
  69. package/es/css/properties/CSSPropertyPath.js +6 -2
  70. package/es/css/properties/CSSPropertyPoints.d.ts +3 -2
  71. package/es/css/properties/CSSPropertyPoints.js +4 -2
  72. package/es/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  73. package/es/css/properties/CSSPropertyShadowBlur.js +4 -2
  74. package/es/css/properties/CSSPropertyText.d.ts +3 -2
  75. package/es/css/properties/CSSPropertyText.js +5 -3
  76. package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  77. package/es/css/properties/CSSPropertyTextTransform.js +4 -2
  78. package/es/css/properties/CSSPropertyTransform.d.ts +3 -2
  79. package/es/css/properties/CSSPropertyTransform.js +5 -3
  80. package/es/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  81. package/es/css/properties/CSSPropertyTransformOrigin.js +4 -2
  82. package/es/css/properties/CSSPropertyVisibility.d.ts +3 -1
  83. package/es/css/properties/CSSPropertyVisibility.js +3 -1
  84. package/es/css/properties/CSSPropertyZIndex.d.ts +4 -2
  85. package/es/css/properties/CSSPropertyZIndex.js +4 -2
  86. package/es/display-objects/Circle.js +3 -1
  87. package/es/display-objects/CustomElement.js +3 -1
  88. package/es/display-objects/DisplayObject.js +7 -4
  89. package/es/display-objects/Ellipse.js +3 -1
  90. package/es/display-objects/Group.js +3 -1
  91. package/es/display-objects/HTML.js +6 -3
  92. package/es/display-objects/Image.js +3 -1
  93. package/es/display-objects/Line.js +3 -1
  94. package/es/display-objects/Path.js +5 -3
  95. package/es/display-objects/Polygon.js +3 -1
  96. package/es/display-objects/Polyline.js +3 -1
  97. package/es/display-objects/Rect.js +3 -1
  98. package/es/display-objects/Text.js +6 -3
  99. package/es/dom/Animation.js +4 -2
  100. package/es/dom/AnimationEffectTiming.js +3 -1
  101. package/es/dom/AnimationEvent.js +3 -1
  102. package/es/dom/AnimationTimeline.js +3 -1
  103. package/es/dom/CustomElementRegistry.js +3 -1
  104. package/es/dom/CustomEvent.js +3 -1
  105. package/es/dom/Document.js +3 -1
  106. package/es/dom/Element.js +8 -6
  107. package/es/dom/EventTarget.js +6 -4
  108. package/es/dom/FederatedEvent.js +3 -1
  109. package/es/dom/FederatedMouseEvent.js +3 -1
  110. package/es/dom/FederatedPointerEvent.js +3 -1
  111. package/es/dom/FederatedTouchEvent.d.ts +13 -0
  112. package/es/dom/FederatedTouchEvent.js +19 -0
  113. package/es/dom/FederatedWheelEvent.js +3 -1
  114. package/es/dom/KeyframeEffect.js +3 -1
  115. package/es/dom/KeyframeList.js +1 -1
  116. package/es/dom/MutationEvent.d.ts +1 -1
  117. package/es/dom/MutationEvent.js +3 -1
  118. package/es/dom/MutationObserver.d.ts +2 -1
  119. package/es/dom/MutationObserver.js +11 -4
  120. package/es/dom/MutationRecord.d.ts +1 -1
  121. package/es/dom/MutationRecord.js +3 -1
  122. package/es/dom/Node.js +5 -3
  123. package/es/dom/interfaces.d.ts +2 -1
  124. package/es/plugins/CullingPlugin.js +3 -1
  125. package/es/plugins/DirtyCheckPlugin.js +3 -1
  126. package/es/plugins/EventPlugin.js +4 -2
  127. package/es/plugins/FrustumCullingStrategy.js +3 -1
  128. package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
  129. package/es/plugins/PrepareRendererPlugin.js +3 -1
  130. package/es/services/EventService.js +5 -3
  131. package/es/services/OffscreenCanvasCreator.js +3 -1
  132. package/es/services/RenderingService.d.ts +2 -2
  133. package/es/services/RenderingService.js +3 -1
  134. package/es/services/SceneGraphSelector.js +3 -1
  135. package/es/services/SceneGraphService.js +4 -2
  136. package/es/services/TextService.d.ts +2 -2
  137. package/es/services/TextService.js +7 -4
  138. package/es/services/aabb/CircleUpdater.js +3 -1
  139. package/es/services/aabb/EllipseUpdater.js +3 -1
  140. package/es/services/aabb/LineUpdater.js +3 -1
  141. package/es/services/aabb/PathUpdater.js +3 -1
  142. package/es/services/aabb/PolylineUpdater.js +3 -1
  143. package/es/services/aabb/RectUpdater.js +4 -2
  144. package/es/services/aabb/TextUpdater.d.ts +1 -2
  145. package/es/services/aabb/TextUpdater.js +3 -1
  146. package/es/shapes/AABB.js +3 -1
  147. package/es/shapes/BoundingSphere.js +3 -1
  148. package/es/shapes/Frustum.js +3 -1
  149. package/es/shapes/Plane.js +3 -1
  150. package/es/shapes/Point.js +3 -1
  151. package/es/shapes/Ray.js +3 -1
  152. package/es/shapes/Rectangle.js +3 -1
  153. package/es/types.d.ts +4 -0
  154. package/es/utils/custom-easing.js +1 -1
  155. package/es/utils/math.d.ts +1 -2
  156. package/es/utils/math.js +11 -6
  157. package/es/utils/path.d.ts +2 -2
  158. package/es/utils/path.js +3 -3
  159. package/es/utils/text.js +4 -4
  160. package/lib/AbstractRenderer.js +3 -1
  161. package/lib/Canvas.d.ts +1 -4
  162. package/lib/Canvas.js +5 -3
  163. package/lib/DisplayObjectPool.js +3 -1
  164. package/lib/camera/Camera.d.ts +105 -66
  165. package/lib/camera/Camera.js +314 -179
  166. package/lib/camera/Landmark.d.ts +18 -25
  167. package/lib/camera/Landmark.js +1 -75
  168. package/lib/canvas-module.js +1 -3
  169. package/lib/components/Cullable.js +4 -2
  170. package/lib/components/Geometry.js +3 -1
  171. package/lib/components/Renderable.js +3 -1
  172. package/lib/components/Sortable.js +3 -1
  173. package/lib/components/Transform.js +3 -1
  174. package/lib/css/LayoutRegistry.js +3 -1
  175. package/lib/css/StyleValueRegistry.d.ts +10 -1
  176. package/lib/css/StyleValueRegistry.js +38 -27
  177. package/lib/css/cssom/CSSColorValue.js +3 -1
  178. package/lib/css/cssom/CSSGradientValue.js +9 -7
  179. package/lib/css/cssom/CSSKeywordValue.js +3 -1
  180. package/lib/css/cssom/CSSMathInvert.js +3 -1
  181. package/lib/css/cssom/CSSMathMax.js +3 -1
  182. package/lib/css/cssom/CSSMathMin.js +3 -1
  183. package/lib/css/cssom/CSSMathNegate.js +3 -1
  184. package/lib/css/cssom/CSSMathOperator.js +1 -1
  185. package/lib/css/cssom/CSSMathProduct.js +3 -1
  186. package/lib/css/cssom/CSSMathSum.js +3 -1
  187. package/lib/css/cssom/CSSMathValue.js +3 -1
  188. package/lib/css/cssom/CSSMathVariadic.js +4 -2
  189. package/lib/css/cssom/CSSNumericValue.js +3 -1
  190. package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
  191. package/lib/css/cssom/CSSNumericValueType.js +5 -3
  192. package/lib/css/cssom/CSSRGB.js +4 -2
  193. package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
  194. package/lib/css/cssom/CSSStyleValue.js +4 -2
  195. package/lib/css/cssom/CSSTransformComponent.js +4 -2
  196. package/lib/css/cssom/CSSTransformValue.js +3 -1
  197. package/lib/css/cssom/CSSTranslate.js +3 -1
  198. package/lib/css/cssom/CSSUnitValue.js +4 -2
  199. package/lib/css/cssom/types.js +1 -1
  200. package/lib/css/parser/color.js +7 -7
  201. package/lib/css/parser/dimension.d.ts +2 -1
  202. package/lib/css/parser/dimension.js +9 -8
  203. package/lib/css/parser/numeric.js +6 -6
  204. package/lib/css/parser/path.d.ts +1 -1
  205. package/lib/css/parser/path.js +1 -1
  206. package/lib/css/parser/points.js +2 -2
  207. package/lib/css/parser/transform-origin.d.ts +1 -1
  208. package/lib/css/parser/transform-origin.js +7 -5
  209. package/lib/css/parser/transform.js +2 -2
  210. package/lib/css/properties/CSSPropertyAnchor.d.ts +4 -2
  211. package/lib/css/properties/CSSPropertyAnchor.js +8 -4
  212. package/lib/css/properties/CSSPropertyClipPath.d.ts +2 -1
  213. package/lib/css/properties/CSSPropertyClipPath.js +5 -3
  214. package/lib/css/properties/CSSPropertyColor.d.ts +3 -2
  215. package/lib/css/properties/CSSPropertyColor.js +6 -4
  216. package/lib/css/properties/CSSPropertyFilter.d.ts +3 -2
  217. package/lib/css/properties/CSSPropertyFilter.js +5 -3
  218. package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  219. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +14 -10
  220. package/lib/css/properties/CSSPropertyLineDash.d.ts +4 -2
  221. package/lib/css/properties/CSSPropertyLineDash.js +6 -4
  222. package/lib/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  223. package/lib/css/properties/CSSPropertyLocalPosition.js +6 -4
  224. package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  225. package/lib/css/properties/CSSPropertyOffsetDistance.js +9 -5
  226. package/lib/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  227. package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
  228. package/lib/css/properties/CSSPropertyOpacity.d.ts +3 -2
  229. package/lib/css/properties/CSSPropertyOpacity.js +6 -4
  230. package/lib/css/properties/CSSPropertyPath.d.ts +3 -2
  231. package/lib/css/properties/CSSPropertyPath.js +12 -6
  232. package/lib/css/properties/CSSPropertyPoints.d.ts +3 -2
  233. package/lib/css/properties/CSSPropertyPoints.js +5 -3
  234. package/lib/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  235. package/lib/css/properties/CSSPropertyShadowBlur.js +5 -3
  236. package/lib/css/properties/CSSPropertyText.d.ts +3 -2
  237. package/lib/css/properties/CSSPropertyText.js +6 -4
  238. package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  239. package/lib/css/properties/CSSPropertyTextTransform.js +8 -6
  240. package/lib/css/properties/CSSPropertyTransform.d.ts +3 -2
  241. package/lib/css/properties/CSSPropertyTransform.js +26 -24
  242. package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  243. package/lib/css/properties/CSSPropertyTransformOrigin.js +5 -3
  244. package/lib/css/properties/CSSPropertyVisibility.d.ts +3 -1
  245. package/lib/css/properties/CSSPropertyVisibility.js +3 -1
  246. package/lib/css/properties/CSSPropertyZIndex.d.ts +4 -2
  247. package/lib/css/properties/CSSPropertyZIndex.js +5 -3
  248. package/lib/display-objects/Circle.js +3 -1
  249. package/lib/display-objects/CustomElement.js +3 -1
  250. package/lib/display-objects/DisplayObject.js +14 -11
  251. package/lib/display-objects/Ellipse.js +3 -1
  252. package/lib/display-objects/Group.js +3 -1
  253. package/lib/display-objects/HTML.js +6 -4
  254. package/lib/display-objects/Image.js +3 -1
  255. package/lib/display-objects/Line.js +3 -1
  256. package/lib/display-objects/Path.js +8 -6
  257. package/lib/display-objects/Polygon.js +3 -1
  258. package/lib/display-objects/Polyline.js +3 -1
  259. package/lib/display-objects/Rect.js +3 -1
  260. package/lib/display-objects/Text.js +6 -4
  261. package/lib/dom/Animation.js +4 -2
  262. package/lib/dom/AnimationEffectTiming.js +3 -1
  263. package/lib/dom/AnimationEvent.js +3 -1
  264. package/lib/dom/AnimationTimeline.js +4 -2
  265. package/lib/dom/CustomElementRegistry.js +3 -1
  266. package/lib/dom/CustomEvent.js +3 -1
  267. package/lib/dom/Document.js +3 -1
  268. package/lib/dom/Element.js +11 -9
  269. package/lib/dom/EventTarget.js +13 -11
  270. package/lib/dom/FederatedEvent.js +3 -1
  271. package/lib/dom/FederatedMouseEvent.js +3 -1
  272. package/lib/dom/FederatedPointerEvent.js +3 -1
  273. package/lib/dom/FederatedTouchEvent.d.ts +13 -0
  274. package/lib/dom/FederatedTouchEvent.js +27 -0
  275. package/lib/dom/FederatedWheelEvent.js +3 -1
  276. package/lib/dom/KeyframeEffect.js +4 -2
  277. package/lib/dom/KeyframeList.js +1 -1
  278. package/lib/dom/MutationEvent.d.ts +1 -1
  279. package/lib/dom/MutationEvent.js +3 -1
  280. package/lib/dom/MutationObserver.d.ts +2 -1
  281. package/lib/dom/MutationObserver.js +22 -15
  282. package/lib/dom/MutationRecord.d.ts +1 -1
  283. package/lib/dom/MutationRecord.js +3 -1
  284. package/lib/dom/Node.js +8 -6
  285. package/lib/dom/interfaces.d.ts +2 -1
  286. package/lib/index.js +1 -1
  287. package/lib/plugins/CullingPlugin.js +4 -2
  288. package/lib/plugins/DirtyCheckPlugin.js +3 -1
  289. package/lib/plugins/EventPlugin.js +26 -24
  290. package/lib/plugins/FrustumCullingStrategy.js +3 -1
  291. package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
  292. package/lib/plugins/PrepareRendererPlugin.js +3 -1
  293. package/lib/services/EventService.js +5 -3
  294. package/lib/services/OffscreenCanvasCreator.js +3 -1
  295. package/lib/services/RenderingService.d.ts +2 -2
  296. package/lib/services/RenderingService.js +3 -1
  297. package/lib/services/SceneGraphSelector.js +4 -2
  298. package/lib/services/SceneGraphService.js +7 -5
  299. package/lib/services/TextService.d.ts +2 -2
  300. package/lib/services/TextService.js +10 -6
  301. package/lib/services/aabb/CircleUpdater.js +3 -1
  302. package/lib/services/aabb/EllipseUpdater.js +3 -1
  303. package/lib/services/aabb/LineUpdater.js +3 -1
  304. package/lib/services/aabb/PathUpdater.js +3 -1
  305. package/lib/services/aabb/PolylineUpdater.js +3 -1
  306. package/lib/services/aabb/RectUpdater.js +5 -3
  307. package/lib/services/aabb/TextUpdater.d.ts +1 -2
  308. package/lib/services/aabb/TextUpdater.js +3 -1
  309. package/lib/services/aabb/index.js +10 -10
  310. package/lib/services/aabb/interfaces.js +1 -1
  311. package/lib/shapes/AABB.js +3 -1
  312. package/lib/shapes/BoundingSphere.js +3 -1
  313. package/lib/shapes/Frustum.js +4 -2
  314. package/lib/shapes/Plane.js +3 -1
  315. package/lib/shapes/Point.js +3 -1
  316. package/lib/shapes/Ray.js +3 -1
  317. package/lib/shapes/Rectangle.js +3 -1
  318. package/lib/types.d.ts +4 -0
  319. package/lib/types.js +1 -1
  320. package/lib/utils/animation.js +3 -2
  321. package/lib/utils/bezier-easing.js +1 -1
  322. package/lib/utils/custom-easing.js +2 -2
  323. package/lib/utils/math.d.ts +1 -2
  324. package/lib/utils/math.js +20 -17
  325. package/lib/utils/path.d.ts +2 -2
  326. package/lib/utils/path.js +6 -6
  327. package/lib/utils/text.js +5 -5
  328. package/package.json +7 -5
@@ -1,6 +1,6 @@
1
1
  import { __assign, __extends, __read, __spreadArray } from "tslib";
2
2
  import { GlobalContainer } from 'mana-syringe';
3
- import { isEqual, isNil, isObject, isUndefined } from '@antv/util';
3
+ import { isEqual, isNil, isObject, isUndefined } from 'lodash-es';
4
4
  import { mat4, quat, vec3 } from 'gl-matrix';
5
5
  import { DisplayObjectPool } from '../DisplayObjectPool';
6
6
  import { KeyframeEffect } from '../dom/KeyframeEffect';
@@ -56,14 +56,17 @@ var DEFAULT_STYLE_PROPS = {
56
56
  * * attributeChanged
57
57
  */
58
58
 
59
- var DisplayObject = function (_super) {
59
+ var DisplayObject =
60
+ /** @class */
61
+ function (_super) {
60
62
  __extends(DisplayObject, _super);
61
63
 
62
64
  function DisplayObject(config) {
63
- var _a, _b, _c;
65
+ var _this = this;
64
66
 
65
- var _this = _super.call(this) || this;
67
+ var _a, _b, _c;
66
68
 
69
+ _this = _super.call(this) || this;
67
70
  _this.styleValueRegistry = GlobalContainer.get(StyleValueRegistry);
68
71
  /**
69
72
  * push to active animations after calling `animate()`
@@ -2,7 +2,9 @@ import { __assign, __extends, __rest } from "tslib";
2
2
  import { Shape } from '../types';
3
3
  import { DisplayObject } from './DisplayObject';
4
4
 
5
- var Ellipse = function (_super) {
5
+ var Ellipse =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(Ellipse, _super);
7
9
 
8
10
  function Ellipse(_a) {
@@ -12,7 +12,9 @@ import { DisplayObject } from './DisplayObject';
12
12
  </g>
13
13
  */
14
14
 
15
- var Group = function (_super) {
15
+ var Group =
16
+ /** @class */
17
+ function (_super) {
16
18
  __extends(Group, _super);
17
19
 
18
20
  function Group(_a) {
@@ -8,7 +8,9 @@ import { mat4, vec3 } from 'gl-matrix';
8
8
  * @see https://github.com/pmndrs/drei#html
9
9
  */
10
10
 
11
- var HTML = function (_super) {
11
+ var HTML =
12
+ /** @class */
13
+ function (_super) {
12
14
  __extends(HTML, _super);
13
15
 
14
16
  function HTML(_a) {
@@ -16,10 +18,12 @@ var HTML = function (_super) {
16
18
  _a = {};
17
19
  }
18
20
 
21
+ var _this = this;
22
+
19
23
  var style = _a.style,
20
24
  rest = __rest(_a, ["style"]);
21
25
 
22
- var _this = _super.call(this, __assign({
26
+ _this = _super.call(this, __assign({
23
27
  type: Shape.HTML,
24
28
  style: __assign({
25
29
  innerHTML: '',
@@ -27,7 +31,6 @@ var HTML = function (_super) {
27
31
  style: ''
28
32
  }, style)
29
33
  }, rest)) || this;
30
-
31
34
  _this.cullable.enable = false;
32
35
  return _this;
33
36
  }
@@ -2,7 +2,9 @@ import { __assign, __extends, __rest } from "tslib";
2
2
  import { Shape } from '../types';
3
3
  import { DisplayObject } from './DisplayObject';
4
4
 
5
- var Image = function (_super) {
5
+ var Image =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(Image, _super);
7
9
 
8
10
  function Image(_a) {
@@ -4,7 +4,9 @@ import { Shape } from '../types';
4
4
  import { DisplayObject } from './DisplayObject';
5
5
  import { Point } from '../shapes';
6
6
 
7
- var Line = function (_super) {
7
+ var Line =
8
+ /** @class */
9
+ function (_super) {
8
10
  __extends(Line, _super);
9
11
 
10
12
  function Line(_a) {
@@ -1,11 +1,13 @@
1
1
  import { __assign, __extends, __rest } from "tslib";
2
+ import { Cubic as CubicUtil } from '@antv/g-math';
3
+ import { isNil } from 'lodash-es';
2
4
  import { Shape } from '../types';
3
5
  import { DisplayObject } from './DisplayObject';
4
6
  import { Point } from '../shapes';
5
- import { Cubic as CubicUtil } from '@antv/g-math';
6
- import { isNil } from '@antv/util';
7
7
 
8
- var Path = function (_super) {
8
+ var Path =
9
+ /** @class */
10
+ function (_super) {
9
11
  __extends(Path, _super);
10
12
 
11
13
  function Path(_a) {
@@ -2,7 +2,9 @@ import { __assign, __extends, __rest } from "tslib";
2
2
  import { Shape } from '../types';
3
3
  import { DisplayObject } from './DisplayObject';
4
4
 
5
- var Polygon = function (_super) {
5
+ var Polygon =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(Polygon, _super);
7
9
 
8
10
  function Polygon(_a) {
@@ -4,7 +4,9 @@ import { Shape } from '../types';
4
4
  import { DisplayObject } from './DisplayObject';
5
5
  import { Point } from '../shapes';
6
6
 
7
- var Polyline = function (_super) {
7
+ var Polyline =
8
+ /** @class */
9
+ function (_super) {
8
10
  __extends(Polyline, _super);
9
11
 
10
12
  function Polyline(_a) {
@@ -2,7 +2,9 @@ import { __assign, __extends, __rest } from "tslib";
2
2
  import { Shape } from '../types';
3
3
  import { DisplayObject } from './DisplayObject';
4
4
 
5
- var Rect = function (_super) {
5
+ var Rect =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(Rect, _super);
7
9
 
8
10
  function Rect(_a) {
@@ -5,7 +5,9 @@ import { DisplayObject } from './DisplayObject';
5
5
  * <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
6
6
  */
7
7
 
8
- var Text = function (_super) {
8
+ var Text =
9
+ /** @class */
10
+ function (_super) {
9
11
  __extends(Text, _super);
10
12
 
11
13
  function Text(_a) {
@@ -13,10 +15,12 @@ var Text = function (_super) {
13
15
  _a = {};
14
16
  }
15
17
 
18
+ var _this = this;
19
+
16
20
  var style = _a.style,
17
21
  rest = __rest(_a, ["style"]);
18
22
 
19
- var _this = _super.call(this, __assign({
23
+ _this = _super.call(this, __assign({
20
24
  type: Shape.TEXT,
21
25
  style: __assign({
22
26
  text: '',
@@ -52,7 +56,6 @@ var Text = function (_super) {
52
56
  * @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
53
57
  */
54
58
 
55
-
56
59
  _this.LENGTHADJUST_SPACING = 1;
57
60
  _this.LENGTHADJUST_SPACINGANDGLYPHS = 2;
58
61
  _this.LENGTHADJUST_UNKNOWN = 0;
@@ -4,7 +4,9 @@ var sequenceNumber = 0;
4
4
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation
5
5
  */
6
6
 
7
- var Animation = function () {
7
+ var Animation =
8
+ /** @class */
9
+ function () {
8
10
  function Animation(effect, timeline) {
9
11
  this.currentTimePending = false;
10
12
  /**
@@ -21,7 +23,7 @@ var Animation = function () {
21
23
  this.effect = effect;
22
24
  effect.animation = this;
23
25
  this.timeline = timeline;
24
- this.id = "" + sequenceNumber++;
26
+ this.id = "".concat(sequenceNumber++);
25
27
  this._inEffect = !!this.effect.update(0);
26
28
  this._holdTime = 0;
27
29
  this._paused = false;
@@ -3,7 +3,9 @@ import { linear, parseEasingFunction } from '../utils/animation';
3
3
  * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming
4
4
  */
5
5
 
6
- var AnimationEffectTiming = function () {
6
+ var AnimationEffectTiming =
7
+ /** @class */
8
+ function () {
7
9
  function AnimationEffectTiming() {
8
10
  /**
9
11
  * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/delay
@@ -4,7 +4,9 @@ import { FederatedEvent } from './FederatedEvent';
4
4
  * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent
5
5
  */
6
6
 
7
- var AnimationEvent = function (_super) {
7
+ var AnimationEvent =
8
+ /** @class */
9
+ function (_super) {
8
10
  __extends(AnimationEvent, _super);
9
11
 
10
12
  function AnimationEvent(manager, target, currentTime, timelineTime) {
@@ -7,7 +7,9 @@ export function compareAnimations(leftAnimation, rightAnimation) {
7
7
  * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
8
8
  */
9
9
 
10
- var AnimationTimeline = function () {
10
+ var AnimationTimeline =
11
+ /** @class */
12
+ function () {
11
13
  function AnimationTimeline(document) {
12
14
  var _this = this;
13
15
 
@@ -6,7 +6,9 @@ import { Ellipse, Circle, Rect, Image, Line, Path, Group, Polygon, Polyline, Tex
6
6
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
7
7
  */
8
8
 
9
- var CustomElementRegistry = function () {
9
+ var CustomElementRegistry =
10
+ /** @class */
11
+ function () {
10
12
  function CustomElementRegistry() {
11
13
  this.registry = {};
12
14
  this.define(Shape.CIRCLE, Circle);
@@ -13,7 +13,9 @@ import { FederatedEvent } from './FederatedEvent';
13
13
  circle.dispatchEvent(event);
14
14
  */
15
15
 
16
- var CustomEvent = function (_super) {
16
+ var CustomEvent =
17
+ /** @class */
18
+ function (_super) {
17
19
  __extends(CustomEvent, _super); // eslint-disable-next-line @typescript-eslint/ban-types
18
20
 
19
21
 
@@ -9,7 +9,9 @@ import { BUILT_IN_PROPERTIES } from '../css';
9
9
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Document
10
10
  */
11
11
 
12
- var Document = function (_super) {
12
+ var Document =
13
+ /** @class */
14
+ function (_super) {
13
15
  __extends(Document, _super);
14
16
 
15
17
  function Document() {
package/es/dom/Element.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { __extends, __read, __spreadArray } from "tslib";
2
2
  import { GlobalContainer } from 'mana-syringe';
3
- import { isNil } from '@antv/util';
3
+ import { isNil } from 'lodash-es';
4
4
  import { SceneGraphService } from '../services/SceneGraphService';
5
5
  import { Cullable, Geometry, Renderable, Transform, Sortable } from '../components';
6
6
  import { Node } from './Node';
7
7
  import { ElementEvent } from './interfaces';
8
8
  import { formatAttribute } from '../utils';
9
- import { MutationEvent } from '..';
9
+ import { MutationEvent } from './MutationEvent';
10
10
  var entityCounter = 0;
11
11
  /**
12
12
  * Has following capabilities:
@@ -15,7 +15,9 @@ var entityCounter = 0;
15
15
  * * Animation
16
16
  */
17
17
 
18
- var Element = function (_super) {
18
+ var Element =
19
+ /** @class */
20
+ function (_super) {
19
21
  __extends(Element, _super);
20
22
 
21
23
  function Element() {
@@ -248,15 +250,15 @@ var Element = function (_super) {
248
250
  };
249
251
 
250
252
  Element.prototype.getElementById = function (id) {
251
- return this.sceneGraphService.querySelector("#" + id, this);
253
+ return this.sceneGraphService.querySelector("#".concat(id), this);
252
254
  };
253
255
 
254
256
  Element.prototype.getElementsByName = function (name) {
255
- return this.sceneGraphService.querySelectorAll("[name=\"" + name + "\"]", this);
257
+ return this.sceneGraphService.querySelectorAll("[name=\"".concat(name, "\"]"), this);
256
258
  };
257
259
 
258
260
  Element.prototype.getElementsByClassName = function (className) {
259
- return this.sceneGraphService.querySelectorAll("." + className, this);
261
+ return this.sceneGraphService.querySelectorAll(".".concat(className), this);
260
262
  };
261
263
 
262
264
  Element.prototype.getElementsByTagName = function (tagName) {
@@ -1,5 +1,5 @@
1
1
  import { __read, __spreadArray } from "tslib";
2
- import { isBoolean, isFunction, isObject } from '@antv/util';
2
+ import { isBoolean, isFunction, isObject } from 'lodash-es';
3
3
  import { EventEmitter } from 'eventemitter3';
4
4
  import { CustomEvent } from './CustomEvent';
5
5
  import { FederatedEvent } from './FederatedEvent';
@@ -10,7 +10,9 @@ export var DELEGATION_SPLITTER = ':';
10
10
  * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
11
11
  */
12
12
 
13
- var EventTarget = function () {
13
+ var EventTarget =
14
+ /** @class */
15
+ function () {
14
16
  function EventTarget() {
15
17
  /**
16
18
  * event emitter
@@ -52,7 +54,7 @@ var EventTarget = function () {
52
54
  useDelegatedName = true;
53
55
  }
54
56
 
55
- type = capture ? type + "capture" : type;
57
+ type = capture ? "".concat(type, "capture") : type;
56
58
  listener = isFunction(listener) ? listener : listener.handleEvent; // compatible with G 3.0
57
59
 
58
60
  if (useDelegatedName) {
@@ -108,7 +110,7 @@ var EventTarget = function () {
108
110
  EventTarget.prototype.removeEventListener = function (type, listener, options) {
109
111
  var capture = isBoolean(options) && options || isObject(options) && options.capture;
110
112
  var context = isFunction(listener) ? undefined : listener;
111
- type = capture ? type + "capture" : type;
113
+ type = capture ? "".concat(type, "capture") : type;
112
114
  listener = isFunction(listener) ? listener : listener === null || listener === void 0 ? void 0 : listener.handleEvent;
113
115
  this.emitter.off(type, listener, context);
114
116
  return this;
@@ -4,7 +4,9 @@ import { Point } from '../shapes/Point';
4
4
  * FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.
5
5
  */
6
6
 
7
- var FederatedEvent = function () {
7
+ var FederatedEvent =
8
+ /** @class */
9
+ function () {
8
10
  /**
9
11
  * The event boundary which manages this event. Propagation can only occur
10
12
  * within the boundary's jurisdiction.
@@ -2,7 +2,9 @@ import { __extends } from "tslib";
2
2
  import { FederatedEvent } from './FederatedEvent';
3
3
  import { Point } from '../shapes/Point';
4
4
 
5
- var FederatedMouseEvent = function (_super) {
5
+ var FederatedMouseEvent =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(FederatedMouseEvent, _super);
7
9
 
8
10
  function FederatedMouseEvent() {
@@ -1,7 +1,9 @@
1
1
  import { __extends } from "tslib";
2
2
  import { FederatedMouseEvent } from './FederatedMouseEvent';
3
3
 
4
- var FederatedPointerEvent = function (_super) {
4
+ var FederatedPointerEvent =
5
+ /** @class */
6
+ function (_super) {
5
7
  __extends(FederatedPointerEvent, _super);
6
8
 
7
9
  function FederatedPointerEvent() {
@@ -0,0 +1,13 @@
1
+ import { FederatedEvent } from './FederatedEvent';
2
+ /**
3
+ * @see https://w3c.github.io/touch-events/#touchevent-interface
4
+ */
5
+ export declare class FederatedTouchEvent extends FederatedEvent<MouseEvent | PointerEvent | TouchEvent> implements TouchEvent {
6
+ altKey: boolean;
7
+ ctrlKey: boolean;
8
+ metaKey: boolean;
9
+ shiftKey: boolean;
10
+ changedTouches: TouchList;
11
+ targetTouches: TouchList;
12
+ touches: TouchList;
13
+ }
@@ -0,0 +1,19 @@
1
+ import { __extends } from "tslib";
2
+ import { FederatedEvent } from './FederatedEvent';
3
+ /**
4
+ * @see https://w3c.github.io/touch-events/#touchevent-interface
5
+ */
6
+
7
+ var FederatedTouchEvent =
8
+ /** @class */
9
+ function (_super) {
10
+ __extends(FederatedTouchEvent, _super);
11
+
12
+ function FederatedTouchEvent() {
13
+ return _super !== null && _super.apply(this, arguments) || this;
14
+ }
15
+
16
+ return FederatedTouchEvent;
17
+ }(FederatedEvent);
18
+
19
+ export { FederatedTouchEvent };
@@ -1,7 +1,9 @@
1
1
  import { __extends } from "tslib";
2
2
  import { FederatedMouseEvent } from './FederatedMouseEvent';
3
3
 
4
- var FederatedWheelEvent = function (_super) {
4
+ var FederatedWheelEvent =
5
+ /** @class */
6
+ function (_super) {
5
7
  __extends(FederatedWheelEvent, _super);
6
8
 
7
9
  function FederatedWheelEvent() {
@@ -74,7 +74,9 @@ export function numericTimingToObject(timingInput) {
74
74
  *
75
75
  */
76
76
 
77
- var KeyframeEffect = function () {
77
+ var KeyframeEffect =
78
+ /** @class */
79
+ function () {
78
80
  function KeyframeEffect(target, effectInput, timingInput) {
79
81
  var _this = this;
80
82
 
@@ -95,7 +95,7 @@ export function normalizeKeyframes(effectInput, timing) {
95
95
  // TODO: Support add & accumulate in KeyframeEffect.composite
96
96
  // @see https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect/composite
97
97
  if (['replace', 'add', 'accumulate', 'auto'].indexOf(memberValue) === -1) {
98
- throw new Error(memberValue + " compositing is not supported");
98
+ throw new Error("".concat(memberValue, " compositing is not supported"));
99
99
  }
100
100
  } else if (member === 'easing') {// TODO: Validate animation-timing-function
101
101
  // @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;
@@ -1,7 +1,9 @@
1
1
  import { __extends } from "tslib";
2
2
  import { FederatedEvent } from './FederatedEvent';
3
3
 
4
- var MutationEvent = function (_super) {
4
+ var MutationEvent =
5
+ /** @class */
6
+ function (_super) {
5
7
  __extends(MutationEvent, _super);
6
8
 
7
9
  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 {
@@ -1,10 +1,12 @@
1
- import { ElementEvent } from '..';
1
+ import { ElementEvent } from './interfaces';
2
2
  import { MutationEvent } from './MutationEvent';
3
3
  import { MutationRecord } from './MutationRecord';
4
4
  var uidCounter = 0;
5
5
  var registrationsTable = new WeakMap();
6
6
 
7
- var Registration = function () {
7
+ var Registration =
8
+ /** @class */
9
+ function () {
8
10
  function Registration(observer, target, options) {
9
11
  this.observer = observer;
10
12
  this.target = target;
@@ -194,7 +196,9 @@ export { Registration };
194
196
  * @see https://github.com/googlearchive/MutationObservers/blob/master/MutationObserver.js
195
197
  */
196
198
 
197
- var MutationObserver = function () {
199
+ var MutationObserver =
200
+ /** @class */
201
+ function () {
198
202
  function MutationObserver(callback) {
199
203
  this.callback = callback;
200
204
  this.nodes = [];
@@ -204,7 +208,10 @@ var MutationObserver = function () {
204
208
 
205
209
  MutationObserver.prototype.observe = function (target, options) {
206
210
  // 1.1
207
- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
211
+ if (!options.childList && !options.attributes && !options.characterData || // 1.2
212
+ options.attributeOldValue && !options.attributes || // 1.3
213
+ options.attributeFilter && options.attributeFilter.length && !options.attributes || // 1.4
214
+ options.characterDataOldValue && !options.characterData) {
208
215
  throw new SyntaxError();
209
216
  }
210
217
 
@@ -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;
@@ -1,4 +1,6 @@
1
- var MutationRecord = function () {
1
+ var MutationRecord =
2
+ /** @class */
3
+ function () {
2
4
  function MutationRecord(type, target) {
3
5
  this.type = type;
4
6
  this.target = target;
package/es/dom/Node.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import { __extends, __values } from "tslib";
2
- import { Shape } from '..'; // import { Text } from '../display-objects/Text';
2
+ import { Shape } from '../types'; // import { Text } from '../display-objects/Text';
3
3
 
4
4
  import { EventTarget } from './EventTarget';
5
5
  /**
6
6
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Node
7
7
  */
8
8
 
9
- var Node = function (_super) {
9
+ var Node =
10
+ /** @class */
11
+ function (_super) {
10
12
  __extends(Node, _super);
11
13
 
12
14
  function Node() {
@@ -115,7 +117,7 @@ var Node = function (_super) {
115
117
 
116
118
  if (this.nodeName === Shape.TEXT) {
117
119
  // @ts-ignore
118
- this.style.text = "" + content;
120
+ this.style.text = "".concat(content);
119
121
  } else {// this.appendChild(
120
122
  // new Text({
121
123
  // 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';
@@ -8,7 +8,9 @@ export var CullingStrategyContribution = Syringe.defineToken('CullingStrategyCon
8
8
  * 2. other custom culling strategies, eg. frustum culling
9
9
  */
10
10
 
11
- var CullingPlugin = function () {
11
+ var CullingPlugin =
12
+ /** @class */
13
+ function () {
12
14
  function CullingPlugin() {}
13
15
 
14
16
  CullingPlugin_1 = CullingPlugin;
@@ -6,7 +6,9 @@ import { RenderingContext, RenderReason } from '../services/RenderingContext';
6
6
  * Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began
7
7
  */
8
8
 
9
- var DirtyCheckPlugin = function () {
9
+ var DirtyCheckPlugin =
10
+ /** @class */
11
+ function () {
10
12
  function DirtyCheckPlugin() {}
11
13
 
12
14
  DirtyCheckPlugin_1 = DirtyCheckPlugin;
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata, __values } from "tslib";
2
2
  import { inject, singleton } from 'mana-syringe';
3
- import { isUndefined } from '@antv/util';
3
+ import { isUndefined } from 'lodash-es';
4
4
  import { FederatedPointerEvent } from '../dom/FederatedPointerEvent';
5
5
  import { FederatedWheelEvent } from '../dom/FederatedWheelEvent';
6
6
  import { RenderingContext } from '../services';
@@ -15,7 +15,9 @@ import { MOUSE_POINTER_ID, TOUCH_TO_POINTER } from '../utils/event';
15
15
  * also provide some extra events such as `drag`
16
16
  */
17
17
 
18
- var EventPlugin = function () {
18
+ var EventPlugin =
19
+ /** @class */
20
+ function () {
19
21
  function EventPlugin() {
20
22
  var _this = this;
21
23
 
@@ -8,7 +8,9 @@ import { Shape } from '../types'; // group is not a 2d shape
8
8
 
9
9
  var shape2D = [Shape.CIRCLE, Shape.ELLIPSE, Shape.IMAGE, Shape.RECT, Shape.LINE, Shape.POLYLINE, Shape.POLYGON, Shape.TEXT, Shape.PATH, Shape.HTML];
10
10
 
11
- var FrustumCullingStrategy = function () {
11
+ var FrustumCullingStrategy =
12
+ /** @class */
13
+ function () {
12
14
  function FrustumCullingStrategy() {}
13
15
 
14
16
  FrustumCullingStrategy.prototype.isVisible = function (object) {