@antv/g 5.0.22-alpha.5 → 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 (274) 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 -1
  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 +8 -0
  18. package/es/css/StyleValueRegistry.js +24 -19
  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 +1 -1
  42. package/es/css/parser/dimension.js +2 -2
  43. package/es/css/parser/numeric.js +1 -1
  44. package/es/css/parser/points.js +1 -1
  45. package/es/css/parser/transform-origin.js +1 -1
  46. package/es/css/properties/CSSPropertyAnchor.js +3 -1
  47. package/es/css/properties/CSSPropertyClipPath.js +3 -1
  48. package/es/css/properties/CSSPropertyColor.js +3 -1
  49. package/es/css/properties/CSSPropertyFilter.js +3 -1
  50. package/es/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
  51. package/es/css/properties/CSSPropertyLineDash.js +3 -1
  52. package/es/css/properties/CSSPropertyLocalPosition.js +3 -1
  53. package/es/css/properties/CSSPropertyOffsetDistance.js +3 -1
  54. package/es/css/properties/CSSPropertyOffsetPath.js +3 -1
  55. package/es/css/properties/CSSPropertyOpacity.js +3 -1
  56. package/es/css/properties/CSSPropertyPath.js +3 -1
  57. package/es/css/properties/CSSPropertyPoints.js +3 -1
  58. package/es/css/properties/CSSPropertyShadowBlur.js +3 -1
  59. package/es/css/properties/CSSPropertyText.d.ts +1 -1
  60. package/es/css/properties/CSSPropertyText.js +4 -2
  61. package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -2
  62. package/es/css/properties/CSSPropertyTextTransform.js +3 -1
  63. package/es/css/properties/CSSPropertyTransform.js +4 -2
  64. package/es/css/properties/CSSPropertyTransformOrigin.js +3 -1
  65. package/es/css/properties/CSSPropertyVisibility.js +3 -1
  66. package/es/css/properties/CSSPropertyZIndex.js +3 -1
  67. package/es/display-objects/Circle.js +3 -1
  68. package/es/display-objects/CustomElement.js +3 -1
  69. package/es/display-objects/DisplayObject.js +7 -4
  70. package/es/display-objects/Ellipse.js +3 -1
  71. package/es/display-objects/Group.js +3 -1
  72. package/es/display-objects/HTML.js +6 -3
  73. package/es/display-objects/Image.js +3 -1
  74. package/es/display-objects/Line.js +3 -1
  75. package/es/display-objects/Path.js +5 -3
  76. package/es/display-objects/Polygon.js +3 -1
  77. package/es/display-objects/Polyline.js +3 -1
  78. package/es/display-objects/Rect.js +3 -1
  79. package/es/display-objects/Text.js +6 -3
  80. package/es/dom/Animation.js +4 -2
  81. package/es/dom/AnimationEffectTiming.js +3 -1
  82. package/es/dom/AnimationEvent.js +3 -1
  83. package/es/dom/AnimationTimeline.js +3 -1
  84. package/es/dom/CustomElementRegistry.js +3 -1
  85. package/es/dom/CustomEvent.js +3 -1
  86. package/es/dom/Document.js +3 -1
  87. package/es/dom/Element.js +7 -5
  88. package/es/dom/EventTarget.js +6 -4
  89. package/es/dom/FederatedEvent.js +3 -1
  90. package/es/dom/FederatedMouseEvent.js +3 -1
  91. package/es/dom/FederatedPointerEvent.js +3 -1
  92. package/es/dom/FederatedTouchEvent.d.ts +13 -0
  93. package/es/dom/FederatedTouchEvent.js +19 -0
  94. package/es/dom/FederatedWheelEvent.js +3 -1
  95. package/es/dom/KeyframeEffect.js +3 -1
  96. package/es/dom/KeyframeList.js +1 -1
  97. package/es/dom/MutationEvent.js +3 -1
  98. package/es/dom/MutationObserver.js +10 -3
  99. package/es/dom/MutationRecord.js +3 -1
  100. package/es/dom/Node.js +4 -2
  101. package/es/plugins/CullingPlugin.js +3 -1
  102. package/es/plugins/DirtyCheckPlugin.js +3 -1
  103. package/es/plugins/EventPlugin.js +4 -2
  104. package/es/plugins/FrustumCullingStrategy.js +3 -1
  105. package/es/plugins/PrepareRendererPlugin.js +3 -1
  106. package/es/services/EventService.js +5 -3
  107. package/es/services/OffscreenCanvasCreator.js +3 -1
  108. package/es/services/RenderingService.js +3 -1
  109. package/es/services/SceneGraphSelector.js +3 -1
  110. package/es/services/SceneGraphService.js +4 -2
  111. package/es/services/TextService.js +5 -3
  112. package/es/services/aabb/CircleUpdater.js +3 -1
  113. package/es/services/aabb/EllipseUpdater.js +3 -1
  114. package/es/services/aabb/LineUpdater.js +3 -1
  115. package/es/services/aabb/PathUpdater.js +3 -1
  116. package/es/services/aabb/PolylineUpdater.js +3 -1
  117. package/es/services/aabb/RectUpdater.js +4 -2
  118. package/es/services/aabb/TextUpdater.js +3 -1
  119. package/es/shapes/AABB.js +3 -1
  120. package/es/shapes/BoundingSphere.js +3 -1
  121. package/es/shapes/Frustum.js +3 -1
  122. package/es/shapes/Plane.js +3 -1
  123. package/es/shapes/Point.js +3 -1
  124. package/es/shapes/Ray.js +3 -1
  125. package/es/shapes/Rectangle.js +3 -1
  126. package/es/types.d.ts +4 -0
  127. package/es/utils/custom-easing.js +1 -1
  128. package/es/utils/math.d.ts +1 -2
  129. package/es/utils/math.js +11 -6
  130. package/es/utils/path.d.ts +1 -1
  131. package/es/utils/path.js +3 -3
  132. package/es/utils/text.js +4 -4
  133. package/lib/AbstractRenderer.js +3 -1
  134. package/lib/Canvas.d.ts +1 -1
  135. package/lib/Canvas.js +5 -3
  136. package/lib/DisplayObjectPool.js +3 -1
  137. package/lib/camera/Camera.d.ts +105 -66
  138. package/lib/camera/Camera.js +314 -179
  139. package/lib/camera/Landmark.d.ts +18 -25
  140. package/lib/camera/Landmark.js +1 -75
  141. package/lib/canvas-module.js +1 -3
  142. package/lib/components/Cullable.js +4 -2
  143. package/lib/components/Geometry.js +3 -1
  144. package/lib/components/Renderable.js +3 -1
  145. package/lib/components/Sortable.js +3 -1
  146. package/lib/components/Transform.js +3 -1
  147. package/lib/css/LayoutRegistry.js +3 -1
  148. package/lib/css/StyleValueRegistry.d.ts +8 -0
  149. package/lib/css/StyleValueRegistry.js +27 -20
  150. package/lib/css/cssom/CSSColorValue.js +3 -1
  151. package/lib/css/cssom/CSSGradientValue.js +9 -7
  152. package/lib/css/cssom/CSSKeywordValue.js +3 -1
  153. package/lib/css/cssom/CSSMathInvert.js +3 -1
  154. package/lib/css/cssom/CSSMathMax.js +3 -1
  155. package/lib/css/cssom/CSSMathMin.js +3 -1
  156. package/lib/css/cssom/CSSMathNegate.js +3 -1
  157. package/lib/css/cssom/CSSMathOperator.js +1 -1
  158. package/lib/css/cssom/CSSMathProduct.js +3 -1
  159. package/lib/css/cssom/CSSMathSum.js +3 -1
  160. package/lib/css/cssom/CSSMathValue.js +3 -1
  161. package/lib/css/cssom/CSSMathVariadic.js +4 -2
  162. package/lib/css/cssom/CSSNumericValue.js +3 -1
  163. package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
  164. package/lib/css/cssom/CSSNumericValueType.js +5 -3
  165. package/lib/css/cssom/CSSRGB.js +4 -2
  166. package/lib/css/cssom/CSSStyleValue.d.ts +1 -1
  167. package/lib/css/cssom/CSSStyleValue.js +4 -2
  168. package/lib/css/cssom/CSSTransformComponent.js +4 -2
  169. package/lib/css/cssom/CSSTransformValue.js +3 -1
  170. package/lib/css/cssom/CSSTranslate.js +3 -1
  171. package/lib/css/cssom/CSSUnitValue.js +4 -2
  172. package/lib/css/cssom/types.js +1 -1
  173. package/lib/css/parser/color.js +7 -7
  174. package/lib/css/parser/dimension.d.ts +1 -1
  175. package/lib/css/parser/dimension.js +9 -8
  176. package/lib/css/parser/numeric.js +6 -6
  177. package/lib/css/parser/path.js +1 -1
  178. package/lib/css/parser/points.js +2 -2
  179. package/lib/css/parser/transform-origin.js +2 -2
  180. package/lib/css/parser/transform.js +2 -2
  181. package/lib/css/properties/CSSPropertyAnchor.js +3 -1
  182. package/lib/css/properties/CSSPropertyClipPath.js +3 -1
  183. package/lib/css/properties/CSSPropertyColor.js +3 -1
  184. package/lib/css/properties/CSSPropertyFilter.js +3 -1
  185. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +3 -1
  186. package/lib/css/properties/CSSPropertyLineDash.js +3 -1
  187. package/lib/css/properties/CSSPropertyLocalPosition.js +3 -1
  188. package/lib/css/properties/CSSPropertyOffsetDistance.js +3 -1
  189. package/lib/css/properties/CSSPropertyOffsetPath.js +3 -1
  190. package/lib/css/properties/CSSPropertyOpacity.js +3 -1
  191. package/lib/css/properties/CSSPropertyPath.js +3 -1
  192. package/lib/css/properties/CSSPropertyPoints.js +3 -1
  193. package/lib/css/properties/CSSPropertyShadowBlur.js +3 -1
  194. package/lib/css/properties/CSSPropertyText.d.ts +1 -1
  195. package/lib/css/properties/CSSPropertyText.js +4 -2
  196. package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -2
  197. package/lib/css/properties/CSSPropertyTextTransform.js +3 -1
  198. package/lib/css/properties/CSSPropertyTransform.js +4 -2
  199. package/lib/css/properties/CSSPropertyTransformOrigin.js +3 -1
  200. package/lib/css/properties/CSSPropertyVisibility.js +3 -1
  201. package/lib/css/properties/CSSPropertyZIndex.js +3 -1
  202. package/lib/display-objects/Circle.js +3 -1
  203. package/lib/display-objects/CustomElement.js +3 -1
  204. package/lib/display-objects/DisplayObject.js +14 -11
  205. package/lib/display-objects/Ellipse.js +3 -1
  206. package/lib/display-objects/Group.js +3 -1
  207. package/lib/display-objects/HTML.js +6 -4
  208. package/lib/display-objects/Image.js +3 -1
  209. package/lib/display-objects/Line.js +3 -1
  210. package/lib/display-objects/Path.js +8 -6
  211. package/lib/display-objects/Polygon.js +3 -1
  212. package/lib/display-objects/Polyline.js +3 -1
  213. package/lib/display-objects/Rect.js +3 -1
  214. package/lib/display-objects/Text.js +6 -4
  215. package/lib/dom/Animation.js +4 -2
  216. package/lib/dom/AnimationEffectTiming.js +3 -1
  217. package/lib/dom/AnimationEvent.js +3 -1
  218. package/lib/dom/AnimationTimeline.js +4 -2
  219. package/lib/dom/CustomElementRegistry.js +3 -1
  220. package/lib/dom/CustomEvent.js +3 -1
  221. package/lib/dom/Document.js +3 -1
  222. package/lib/dom/Element.js +8 -6
  223. package/lib/dom/EventTarget.js +13 -11
  224. package/lib/dom/FederatedEvent.js +3 -1
  225. package/lib/dom/FederatedMouseEvent.js +3 -1
  226. package/lib/dom/FederatedPointerEvent.js +3 -1
  227. package/lib/dom/FederatedTouchEvent.d.ts +13 -0
  228. package/lib/dom/FederatedTouchEvent.js +27 -0
  229. package/lib/dom/FederatedWheelEvent.js +3 -1
  230. package/lib/dom/KeyframeEffect.js +4 -2
  231. package/lib/dom/KeyframeList.js +1 -1
  232. package/lib/dom/MutationEvent.js +3 -1
  233. package/lib/dom/MutationObserver.js +11 -4
  234. package/lib/dom/MutationRecord.js +3 -1
  235. package/lib/dom/Node.js +4 -2
  236. package/lib/index.js +1 -1
  237. package/lib/plugins/CullingPlugin.js +4 -2
  238. package/lib/plugins/DirtyCheckPlugin.js +3 -1
  239. package/lib/plugins/EventPlugin.js +26 -24
  240. package/lib/plugins/FrustumCullingStrategy.js +3 -1
  241. package/lib/plugins/PrepareRendererPlugin.js +3 -1
  242. package/lib/services/EventService.js +5 -3
  243. package/lib/services/OffscreenCanvasCreator.js +3 -1
  244. package/lib/services/RenderingService.js +3 -1
  245. package/lib/services/SceneGraphSelector.js +4 -2
  246. package/lib/services/SceneGraphService.js +7 -5
  247. package/lib/services/TextService.js +5 -3
  248. package/lib/services/aabb/CircleUpdater.js +3 -1
  249. package/lib/services/aabb/EllipseUpdater.js +3 -1
  250. package/lib/services/aabb/LineUpdater.js +3 -1
  251. package/lib/services/aabb/PathUpdater.js +3 -1
  252. package/lib/services/aabb/PolylineUpdater.js +3 -1
  253. package/lib/services/aabb/RectUpdater.js +5 -3
  254. package/lib/services/aabb/TextUpdater.js +3 -1
  255. package/lib/services/aabb/index.js +10 -10
  256. package/lib/services/aabb/interfaces.js +1 -1
  257. package/lib/shapes/AABB.js +3 -1
  258. package/lib/shapes/BoundingSphere.js +3 -1
  259. package/lib/shapes/Frustum.js +4 -2
  260. package/lib/shapes/Plane.js +3 -1
  261. package/lib/shapes/Point.js +3 -1
  262. package/lib/shapes/Ray.js +3 -1
  263. package/lib/shapes/Rectangle.js +3 -1
  264. package/lib/types.d.ts +4 -0
  265. package/lib/types.js +1 -1
  266. package/lib/utils/animation.js +3 -2
  267. package/lib/utils/bezier-easing.js +1 -1
  268. package/lib/utils/custom-easing.js +2 -2
  269. package/lib/utils/math.d.ts +1 -2
  270. package/lib/utils/math.js +20 -17
  271. package/lib/utils/path.d.ts +1 -1
  272. package/lib/utils/path.js +6 -6
  273. package/lib/utils/text.js +5 -5
  274. package/package.json +7 -5
@@ -1,6 +1,6 @@
1
1
  import { __read, __spreadArray } from "tslib";
2
2
  import * as d3 from 'd3-color';
3
- import { clamp, isString } from '@antv/util';
3
+ import { clamp, isString } from 'lodash-es';
4
4
  import { CSSRGB, CSSGradientValue, GradientPatternType } from '../cssom';
5
5
  var regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i;
6
6
  var regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i;
@@ -88,7 +88,7 @@ export function mergeColors(left, right) {
88
88
  }
89
89
 
90
90
  rgba[3] = clamp(rgba[3], 0, 1);
91
- return "rgba(" + rgba.join(',') + ")";
91
+ return "rgba(".concat(rgba.join(','), ")");
92
92
  }];
93
93
  }
94
94
 
@@ -1,4 +1,4 @@
1
- import { IElement } from '../../dom';
1
+ import type { IElement } from '../../dom';
2
2
  import type { DisplayObject } from '../../display-objects';
3
3
  import type { CSSStyleValue } from '../cssom';
4
4
  import { CSSUnitValue } from '../cssom';
@@ -1,10 +1,10 @@
1
- import { isString } from '@antv/util';
1
+ import { isString } from 'lodash-es';
2
2
  import { AABB } from '../../shapes';
3
3
  import { rad2deg, turn2deg } from '../../utils';
4
4
  import { UnitType } from '../cssom';
5
5
  import { CSSUnitValue } from '../cssom';
6
6
  export function parseDimension(unitRegExp, string) {
7
- string = ("" + string).trim().toLowerCase();
7
+ string = "".concat(string).trim().toLowerCase();
8
8
 
9
9
  if (isFinite(Number(string))) {
10
10
  if ('px'.search(unitRegExp) >= 0) {
@@ -1,4 +1,4 @@
1
- import { clamp, isString } from '@antv/util';
1
+ import { clamp, isString } from 'lodash-es';
2
2
  import { CSSUnitValue } from '../cssom';
3
3
  export function numberToString(x) {
4
4
  // scale(0.00000001) -> scale(0)
@@ -1,5 +1,5 @@
1
1
  import { Line as LineUtil, Polyline as PolylineUtil } from '@antv/g-math';
2
- import { isString } from '@antv/util';
2
+ import { isString } from 'lodash-es';
3
3
  export function parsePoints(points) {
4
4
  if (isString(points)) {
5
5
  return null;
@@ -1,4 +1,4 @@
1
- import { isString } from '@antv/util';
1
+ import { isString } from 'lodash-es';
2
2
  import { CSSUnitValue } from '../cssom';
3
3
  import { parseLengthOrPercentage } from './dimension';
4
4
  /**
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
3
3
  import { CSSUnitValue } from '../cssom';
4
4
  import { parseNumberList } from '../parser';
5
5
 
6
- var CSSPropertyAnchor = function () {
6
+ var CSSPropertyAnchor =
7
+ /** @class */
8
+ function () {
7
9
  function CSSPropertyAnchor() {
8
10
  this.parser = parseNumberList;
9
11
  }
@@ -19,7 +19,9 @@ import { dirtifyToRoot } from '../../services';
19
19
  });
20
20
  */
21
21
 
22
- var CSSPropertyClipPath = function () {
22
+ var CSSPropertyClipPath =
23
+ /** @class */
24
+ function () {
23
25
  function CSSPropertyClipPath() {}
24
26
 
25
27
  CSSPropertyClipPath.prototype.calculator = function (name, oldClipPath, newClipPath, object) {
@@ -6,7 +6,9 @@ import { CSSKeywordValue, CSSRGB } from '../cssom';
6
6
  * opacity
7
7
  */
8
8
 
9
- var CSSPropertyColor = function () {
9
+ var CSSPropertyColor =
10
+ /** @class */
11
+ function () {
10
12
  function CSSPropertyColor() {
11
13
  this.parser = parseColor;
12
14
  this.mixer = mergeColors;
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { parseFilter } from '../parser';
4
4
 
5
- var CSSPropertyFilter = function () {
5
+ var CSSPropertyFilter =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyFilter() {
7
9
  this.parser = parseFilter;
8
10
  }
@@ -6,7 +6,9 @@ import { parseLengthOrPercentage, mergeDimensions } from '../parser';
6
6
  * <length> & <percentage>
7
7
  */
8
8
 
9
- var CSSPropertyLengthOrPercentage = function () {
9
+ var CSSPropertyLengthOrPercentage =
10
+ /** @class */
11
+ function () {
10
12
  function CSSPropertyLengthOrPercentage() {
11
13
  this.parser = parseLengthOrPercentage;
12
14
  this.mixer = mergeDimensions;
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { parseDimensionArray, mergeDimensionList } from '../parser';
4
4
 
5
- var CSSPropertyLineDash = function () {
5
+ var CSSPropertyLineDash =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyLineDash() {
7
9
  this.parser = parseDimensionArray;
8
10
  this.mixer = mergeDimensionList;
@@ -6,7 +6,9 @@ import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
6
6
  * local position
7
7
  */
8
8
 
9
- var CSSPropertyLocalPosition = function (_super) {
9
+ var CSSPropertyLocalPosition =
10
+ /** @class */
11
+ function (_super) {
10
12
  __extends(CSSPropertyLocalPosition, _super);
11
13
 
12
14
  function CSSPropertyLocalPosition() {
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
3
3
  import { Shape } from '../../types';
4
4
  import { parseNumber, clampedMergeNumbers } from '../parser';
5
5
 
6
- var CSSPropertyOffsetDistance = function () {
6
+ var CSSPropertyOffsetDistance =
7
+ /** @class */
8
+ function () {
7
9
  function CSSPropertyOffsetDistance() {
8
10
  this.parser = parseNumber;
9
11
  this.mixer = clampedMergeNumbers(0, 1);
@@ -1,7 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
 
4
- var CSSPropertyOffsetPath = function () {
4
+ var CSSPropertyOffsetPath =
5
+ /** @class */
6
+ function () {
5
7
  function CSSPropertyOffsetPath() {}
6
8
 
7
9
  CSSPropertyOffsetPath.prototype.calculator = function (name, oldOffsetPath, newOffsetPath, object) {
@@ -5,7 +5,9 @@ import { parseNumber, clampedMergeNumbers } from '../parser';
5
5
  * opacity
6
6
  */
7
7
 
8
- var CSSPropertyOpacity = function () {
8
+ var CSSPropertyOpacity =
9
+ /** @class */
10
+ function () {
9
11
  function CSSPropertyOpacity() {
10
12
  this.parser = parseNumber;
11
13
  this.mixer = clampedMergeNumbers(0, 1);
@@ -4,7 +4,9 @@ import { Rectangle } from '../../shapes';
4
4
  import { CSSKeywordValue } from '../cssom';
5
5
  import { parsePath, mergePaths } from '../parser';
6
6
 
7
- var CSSPropertyPath = function () {
7
+ var CSSPropertyPath =
8
+ /** @class */
9
+ function () {
8
10
  function CSSPropertyPath() {
9
11
  /**
10
12
  * path2Curve
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { parsePoints } from '../parser';
4
4
 
5
- var CSSPropertyPoints = function () {
5
+ var CSSPropertyPoints =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyPoints() {
7
9
  this.parser = parsePoints;
8
10
  }
@@ -3,7 +3,9 @@ import { singleton } from 'mana-syringe';
3
3
  import { clampedMergeNumbers } from '../parser';
4
4
  import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
5
5
 
6
- var CSSPropertyShadowBlur = function (_super) {
6
+ var CSSPropertyShadowBlur =
7
+ /** @class */
8
+ function (_super) {
7
9
  __extends(CSSPropertyShadowBlur, _super);
8
10
 
9
11
  function CSSPropertyShadowBlur() {
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperty } from '../CSSProperty';
2
2
  import { CSSKeywordValue } from '../cssom';
3
- import { DisplayObject } from '../../display-objects';
3
+ import type { DisplayObject } from '../../display-objects';
4
4
  export declare class CSSPropertyText implements Partial<CSSProperty<CSSKeywordValue | string, string>> {
5
5
  calculator(name: string, oldParsed: CSSKeywordValue | string, parsed: CSSKeywordValue | string, object: DisplayObject): string;
6
6
  postProcessor(object: DisplayObject): void;
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { CSSKeywordValue } from '../cssom';
4
4
 
5
- var CSSPropertyText = function () {
5
+ var CSSPropertyText =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyText() {}
7
9
 
8
10
  CSSPropertyText.prototype.calculator = function (name, oldParsed, parsed, object) {
@@ -18,7 +20,7 @@ var CSSPropertyText = function () {
18
20
  };
19
21
 
20
22
  CSSPropertyText.prototype.postProcessor = function (object) {
21
- object.nodeValue = "" + object.parsedStyle.text || '';
23
+ object.nodeValue = "".concat(object.parsedStyle.text) || '';
22
24
  };
23
25
 
24
26
  CSSPropertyText = __decorate([singleton()], CSSPropertyText);
@@ -1,5 +1,5 @@
1
- import { CSSProperty } from '../CSSProperty';
2
- import { DisplayObject, ParsedPathStyleProps } from '../../display-objects';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { DisplayObject, ParsedPathStyleProps } from '../../display-objects';
3
3
  export declare class CSSPropertyTextTransform implements Partial<CSSProperty<ParsedPathStyleProps, ParsedPathStyleProps>> {
4
4
  postProcessor(o: DisplayObject): void;
5
5
  }
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { TextTransform, Shape } from '../../types';
4
4
 
5
- var CSSPropertyTextTransform = function () {
5
+ var CSSPropertyTextTransform =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyTextTransform() {}
7
9
 
8
10
  CSSPropertyTextTransform.prototype.postProcessor = function (o) {
@@ -1,4 +1,4 @@
1
- import { __decorate } from "tslib"; // import { uniq } from '@antv/util';
1
+ import { __decorate } from "tslib"; // import { uniq } from '@lodash-es';
2
2
 
3
3
  import { singleton } from 'mana-syringe';
4
4
  import { CSSKeywordValue } from '../cssom';
@@ -34,7 +34,9 @@ import { Opx, Odeg, parseTransform, mergeTransforms } from '../parser';
34
34
  * * perspective
35
35
  */
36
36
 
37
- var CSSPropertyTransform = function () {
37
+ var CSSPropertyTransform =
38
+ /** @class */
39
+ function () {
38
40
  function CSSPropertyTransform() {
39
41
  this.parser = parseTransform;
40
42
  this.mixer = mergeTransforms;
@@ -7,7 +7,9 @@ import { parseTransformOrigin } from '../parser';
7
7
  * [10px, 10px] [10%, 10%]
8
8
  */
9
9
 
10
- var CSSPropertyTransformOrigin = function () {
10
+ var CSSPropertyTransformOrigin =
11
+ /** @class */
12
+ function () {
11
13
  function CSSPropertyTransformOrigin() {
12
14
  this.parser = parseTransformOrigin;
13
15
  }
@@ -8,7 +8,9 @@ import { singleton } from 'mana-syringe';
8
8
  *
9
9
  */
10
10
 
11
- var CSSPropertyVisibility = function () {
11
+ var CSSPropertyVisibility =
12
+ /** @class */
13
+ function () {
12
14
  function CSSPropertyVisibility() {}
13
15
 
14
16
  CSSPropertyVisibility.prototype.calculator = function (name, oldParsed, parsed, object) {
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
3
  import { parseNumber } from '../parser';
4
4
 
5
- var CSSPropertyZIndex = function () {
5
+ var CSSPropertyZIndex =
6
+ /** @class */
7
+ function () {
6
8
  function CSSPropertyZIndex() {
7
9
  this.parser = parseNumber;
8
10
  }
@@ -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 Circle = function (_super) {
5
+ var Circle =
6
+ /** @class */
7
+ function (_super) {
6
8
  __extends(Circle, _super);
7
9
 
8
10
  function Circle(_a) {
@@ -6,7 +6,9 @@ import { ElementEvent } from '../dom/interfaces';
6
6
  * @see https://yuque.antfin-inc.com/antv/czqvg5/pgqipg
7
7
  */
8
8
 
9
- var CustomElement = function (_super) {
9
+ var CustomElement =
10
+ /** @class */
11
+ function (_super) {
10
12
  __extends(CustomElement, _super); // private shadowNodes: DisplayObject[] = [];
11
13
 
12
14
 
@@ -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() {