@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
@@ -1,4 +1,4 @@
1
- import type { IElement } from '..';
1
+ import type { IElement } from '../dom';
2
2
  import type { StyleValueRegistry } from './StyleValueRegistry';
3
3
  export declare type Interpolatable = number | boolean | number[] | boolean[];
4
4
  declare type CSSPropertyMixer<Parsed = any, T extends Interpolatable = any> = (left: Parsed, right: Parsed, displayObject: IElement | null) => [T, T, (i: T) => string | any] | undefined;
@@ -18,9 +18,7 @@ var _manaSyringe = require("mana-syringe");
18
18
  * // use with `display` property
19
19
  * group.style.display = 'layout(centering)';
20
20
  */
21
- var LayoutRegistry =
22
- /** @class */
23
- function () {
21
+ var LayoutRegistry = function () {
24
22
  function LayoutRegistry() {}
25
23
 
26
24
  LayoutRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], LayoutRegistry);
@@ -1,4 +1,5 @@
1
- import type { DisplayObject, BaseStyleProps } from '..';
1
+ import type { DisplayObject } from '../display-objects';
2
+ import type { BaseStyleProps } from '../types';
2
3
  import { CSSStyleValue } from './cssom';
3
4
  export declare type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
4
5
  export interface PropertyParseOptions {
@@ -11,7 +11,11 @@ var _manaSyringe = require("mana-syringe");
11
11
 
12
12
  var _glMatrix = require("gl-matrix");
13
13
 
14
- var _ = require("..");
14
+ var _services = require("../services");
15
+
16
+ var _dom = require("../dom");
17
+
18
+ var _types = require("../types");
15
19
 
16
20
  var _cssom = require("./cssom");
17
21
 
@@ -21,6 +25,8 @@ var _properties = require("./properties");
21
25
 
22
26
  var _utils = require("../utils");
23
27
 
28
+ var _shapes = require("../shapes");
29
+
24
30
  /**
25
31
  * Blink used them in code generation(css_properties.json5)
26
32
  */
@@ -420,9 +426,7 @@ var BUILT_IN_PROPERTIES = [{
420
426
  }];
421
427
  exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
422
428
 
423
- var StyleValueRegistry =
424
- /** @class */
425
- function () {
429
+ var StyleValueRegistry = function () {
426
430
  function StyleValueRegistry() {
427
431
  /**
428
432
  * need recalc later
@@ -750,7 +754,7 @@ function () {
750
754
  StyleValueRegistry.prototype.updateGeometry = function (object) {
751
755
  var _a;
752
756
 
753
- var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_.GeometryUpdaterFactory);
757
+ var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_services.GeometryUpdaterFactory);
754
758
 
755
759
  var geometryUpdater = geometryUpdaterFactory(object.nodeName);
756
760
 
@@ -758,11 +762,11 @@ function () {
758
762
  var geometry_1 = object.geometry;
759
763
 
760
764
  if (!geometry_1.contentBounds) {
761
- geometry_1.contentBounds = new _.AABB();
765
+ geometry_1.contentBounds = new _shapes.AABB();
762
766
  }
763
767
 
764
768
  if (!geometry_1.renderBounds) {
765
- geometry_1.renderBounds = new _.AABB();
769
+ geometry_1.renderBounds = new _shapes.AABB();
766
770
  }
767
771
 
768
772
  var parsedStyle = object.parsedStyle;
@@ -785,7 +789,7 @@ function () {
785
789
  _h = _b.offsetZ,
786
790
  offsetZ = _h === void 0 ? 0 : _h;
787
791
 
788
- if (object.nodeName === _.Shape.LINE || object.nodeName === _.Shape.POLYLINE || object.nodeName === _.Shape.POLYGON || object.nodeName === _.Shape.PATH) {
792
+ if (object.nodeName === _types.Shape.LINE || object.nodeName === _types.Shape.POLYLINE || object.nodeName === _types.Shape.POLYGON || object.nodeName === _types.Shape.PATH) {
789
793
  parsedStyle.offsetX = x - (parsedStyle.defX || 0);
790
794
  parsedStyle.offsetY = y - (parsedStyle.defY || 0);
791
795
  parsedStyle.defX = x;
@@ -809,7 +813,7 @@ function () {
809
813
  transformOrigin = _j.transformOrigin;
810
814
  var anchor = parsedStyle.anchor; // <Text> use textAlign & textBaseline instead of anchor
811
815
 
812
- if (object.nodeName === _.Shape.TEXT) {
816
+ if (object.nodeName === _types.Shape.TEXT) {
813
817
  delete parsedStyle.anchor;
814
818
  }
815
819
 
@@ -880,8 +884,8 @@ function () {
880
884
  usedOriginXValue -= (anchor && anchor[0].value || 0) * geometry_1.contentBounds.halfExtents[0] * 2;
881
885
  usedOriginYValue -= (anchor && anchor[1].value || 0) * geometry_1.contentBounds.halfExtents[1] * 2;
882
886
  object.setOrigin(usedOriginXValue, usedOriginYValue);
883
- object.emit(_.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
884
- (0, _.dirtifyToRoot)(object);
887
+ object.emit(_dom.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
888
+ (0, _services.dirtifyToRoot)(object);
885
889
  }
886
890
  };
887
891
 
@@ -14,9 +14,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
14
14
  *
15
15
  * @see https://drafts.css-houdini.org/css-typed-om-1/#colorvalue-objects
16
16
  */
17
- var CSSColorValue =
18
- /** @class */
19
- function (_super) {
17
+ var CSSColorValue = function (_super) {
20
18
  (0, _tslib.__extends)(CSSColorValue, _super);
21
19
 
22
20
  function CSSColorValue(colorSpace) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.GradientPatternType = exports.CSSGradientValue = void 0;
6
+ exports.CSSGradientValue = exports.GradientPatternType = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -19,9 +19,7 @@ exports.GradientPatternType = GradientPatternType;
19
19
  GradientPatternType[GradientPatternType["Pattern"] = 3] = "Pattern";
20
20
  })(GradientPatternType || (exports.GradientPatternType = GradientPatternType = {}));
21
21
 
22
- var CSSGradientValue =
23
- /** @class */
24
- function (_super) {
22
+ var CSSGradientValue = function (_super) {
25
23
  (0, _tslib.__extends)(CSSGradientValue, _super);
26
24
 
27
25
  function CSSGradientValue(type, value) {
@@ -40,15 +38,15 @@ function (_super) {
40
38
  var text = '';
41
39
 
42
40
  if (this.type === GradientPatternType.LinearGradient) {
43
- text = "linear-gradient(".concat(this.value.steps.map(function (step) {
41
+ text = "linear-gradient(" + this.value.steps.map(function (step) {
44
42
  return step.join(',');
45
- }).join(','), ")");
43
+ }).join(',') + ")";
46
44
  } else if (this.type === GradientPatternType.RadialGradient) {
47
- text = "radial-gradient(".concat(this.value.steps.map(function (step) {
45
+ text = "radial-gradient(" + this.value.steps.map(function (step) {
48
46
  return step.join(',');
49
- }).join(','), ")");
47
+ }).join(',') + ")";
50
48
  } else if (this.type === GradientPatternType.Pattern) {
51
- text = "url(".concat(this.value.src, ")");
49
+ text = "url(" + this.value.src + ")";
52
50
  }
53
51
 
54
52
  return result += text;
@@ -15,9 +15,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
15
15
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSKeywordValue
16
16
  * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_keyword_value.idl
17
17
  */
18
- var CSSKeywordValue =
19
- /** @class */
20
- function (_super) {
18
+ var CSSKeywordValue = function (_super) {
21
19
  (0, _tslib.__extends)(CSSKeywordValue, _super);
22
20
 
23
21
  function CSSKeywordValue(value) {
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
11
11
 
12
12
  var _ = require(".");
13
13
 
14
- var CSSMathInvert =
15
- /** @class */
16
- function (_super) {
14
+ var CSSMathInvert = function (_super) {
17
15
  (0, _tslib.__extends)(CSSMathInvert, _super);
18
16
 
19
17
  function CSSMathInvert(value, type) {
@@ -19,9 +19,7 @@ var _ = require(".");
19
19
  */
20
20
  // Represents the maximum of one or more CSSNumericValues.
21
21
  // @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
22
- var CSSMathMax =
23
- /** @class */
24
- function (_super) {
22
+ var CSSMathMax = function (_super) {
25
23
  (0, _tslib.__extends)(CSSMathMax, _super);
26
24
 
27
25
  function CSSMathMax() {
@@ -19,9 +19,7 @@ var _ = require(".");
19
19
  */
20
20
  // Represents the minimum of one or more CSSNumericValues.
21
21
  // @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
22
- var CSSMathMin =
23
- /** @class */
24
- function (_super) {
22
+ var CSSMathMin = function (_super) {
25
23
  (0, _tslib.__extends)(CSSMathMin, _super);
26
24
 
27
25
  function CSSMathMin() {
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
11
11
 
12
12
  var _ = require(".");
13
13
 
14
- var CSSMathNegate =
15
- /** @class */
16
- function (_super) {
14
+ var CSSMathNegate = function (_super) {
17
15
  (0, _tslib.__extends)(CSSMathNegate, _super);
18
16
 
19
17
  function CSSMathNegate(value, type) {
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CSSMathOperator = void 0;
7
6
  exports.isComparison = isComparison;
7
+ exports.CSSMathOperator = void 0;
8
8
  var CSSMathOperator;
9
9
  exports.CSSMathOperator = CSSMathOperator;
10
10
 
@@ -17,9 +17,7 @@ var _ = require(".");
17
17
  * Represents the product of one or more CSSNumericValues.
18
18
  * @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
19
19
  */
20
- var CSSMathProduct =
21
- /** @class */
22
- function (_super) {
20
+ var CSSMathProduct = function (_super) {
23
21
  (0, _tslib.__extends)(CSSMathProduct, _super);
24
22
 
25
23
  function CSSMathProduct() {
@@ -17,9 +17,7 @@ var _ = require(".");
17
17
  * Represents the sum of one or more CSSNumericValues.
18
18
  * @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
19
19
  */
20
- var CSSMathSum =
21
- /** @class */
22
- function (_super) {
20
+ var CSSMathSum = function (_super) {
23
21
  (0, _tslib.__extends)(CSSMathSum, _super);
24
22
 
25
23
  function CSSMathSum() {
@@ -15,9 +15,7 @@ var _CSSNumericValue = require("./CSSNumericValue");
15
15
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
16
16
  * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
17
17
  */
18
- var CSSMathValue =
19
- /** @class */
20
- function (_super) {
18
+ var CSSMathValue = function (_super) {
21
19
  (0, _tslib.__extends)(CSSMathValue, _super);
22
20
 
23
21
  function CSSMathValue() {
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CSSMathVariadic = void 0;
7
6
  exports.typeCheck = typeCheck;
7
+ exports.CSSMathVariadic = void 0;
8
8
 
9
9
  var _tslib = require("tslib");
10
10
 
@@ -23,9 +23,7 @@ function typeCheck(values, op, error) {
23
23
  } // Represents an arithmetic operation with one or more CSSNumericValues.
24
24
 
25
25
 
26
- var CSSMathVariadic =
27
- /** @class */
28
- function (_super) {
26
+ var CSSMathVariadic = function (_super) {
29
27
  (0, _tslib.__extends)(CSSMathVariadic, _super);
30
28
 
31
29
  function CSSMathVariadic(values, type) {
@@ -19,9 +19,7 @@ var _ = require(".");
19
19
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
20
20
  * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
21
21
  */
22
- var CSSNumericValue =
23
- /** @class */
24
- function (_super) {
22
+ var CSSNumericValue = function (_super) {
25
23
  (0, _tslib.__extends)(CSSNumericValue, _super);
26
24
 
27
25
  function CSSNumericValue(type_) {
@@ -10,7 +10,7 @@ export declare enum BaseType {
10
10
  kNumBaseTypes = 7
11
11
  }
12
12
  export declare function unitTypeToBaseType(unit: UnitType): BaseType.kLength | BaseType.kAngle | BaseType.kTime | BaseType.kFrequency | BaseType.kResolution | BaseType.kFlex | BaseType.kPercent;
13
- export declare function baseTypeToString(baseType: BaseType): "" | "percent" | "length" | "angle" | "time" | "frequency" | "resolution" | "flex";
13
+ export declare function baseTypeToString(baseType: BaseType): "" | "time" | "flex" | "percent" | "length" | "angle" | "frequency" | "resolution";
14
14
  export declare class CSSNumericValueType {
15
15
  private exponents;
16
16
  private numNonZeroEntries;
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CSSNumericValueType = exports.BaseType = void 0;
7
- exports.baseTypeToString = baseTypeToString;
8
6
  exports.unitTypeToBaseType = unitTypeToBaseType;
7
+ exports.baseTypeToString = baseTypeToString;
8
+ exports.CSSNumericValueType = exports.BaseType = void 0;
9
9
 
10
10
  var _utils = require("../../utils");
11
11
 
@@ -134,9 +134,7 @@ function baseTypeToString(baseType) {
134
134
  return '';
135
135
  }
136
136
 
137
- var CSSNumericValueType =
138
- /** @class */
139
- function () {
137
+ var CSSNumericValueType = function () {
140
138
  function CSSNumericValueType(unit, exponent) {
141
139
  if (unit === void 0) {
142
140
  unit = _.UnitType.kNumber;
@@ -14,9 +14,7 @@ var _CSSColorValue = require("./CSSColorValue");
14
14
  *
15
15
  * @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
16
16
  */
17
- var CSSRGB =
18
- /** @class */
19
- function (_super) {
17
+ var CSSRGB = function (_super) {
20
18
  (0, _tslib.__extends)(CSSRGB, _super);
21
19
 
22
20
  function CSSRGB(r, g, b, alpha,
@@ -47,7 +45,7 @@ function (_super) {
47
45
  };
48
46
 
49
47
  CSSRGB.prototype.buildCSSText = function (n, p, result) {
50
- return result + "rgba(".concat(this.r, ",").concat(this.g, ",").concat(this.b, ",").concat(this.alpha, ")");
48
+ return result + ("rgba(" + this.r + "," + this.g + "," + this.b + "," + this.alpha + ")");
51
49
  };
52
50
 
53
51
  return CSSRGB;
@@ -29,7 +29,7 @@ export declare abstract class CSSStyleValue {
29
29
  static parseAll(propertyName: string, value: string): CSSStyleValue[];
30
30
  static unitFromName(name: string): UnitType;
31
31
  static unitTypeToUnitCategory(type: UnitType): UnitCategory;
32
- static unitTypeToString(type: UnitType): "" | "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "%";
32
+ static unitTypeToString(type: UnitType): "" | "em" | "s" | "px" | "deg" | "rad" | "grad" | "ms" | "rem" | "turn" | "%";
33
33
  static stringToUnitType(name: string): UnitType;
34
34
  static canonicalUnitTypeForCategory(category: UnitCategory): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
35
35
  /**
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CSSStyleValueType = exports.CSSStyleValue = void 0;
6
+ exports.CSSStyleValue = exports.CSSStyleValueType = void 0;
7
7
 
8
8
  var _types = require("./types");
9
9
 
@@ -265,9 +265,7 @@ function parseCSSStyleValue(propertyName, value) {
265
265
  */
266
266
 
267
267
 
268
- var CSSStyleValue =
269
- /** @class */
270
- function () {
268
+ var CSSStyleValue = function () {
271
269
  function CSSStyleValue() {}
272
270
 
273
271
  CSSStyleValue.parse = function (propertyName, value) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TransformComponentType = exports.CSSTransformComponent = void 0;
6
+ exports.CSSTransformComponent = exports.TransformComponentType = void 0;
7
7
  var TransformComponentType;
8
8
  exports.TransformComponentType = TransformComponentType;
9
9
 
@@ -26,9 +26,7 @@ exports.TransformComponentType = TransformComponentType;
26
26
  */
27
27
 
28
28
 
29
- var CSSTransformComponent =
30
- /** @class */
31
- function () {
29
+ var CSSTransformComponent = function () {
32
30
  function CSSTransformComponent(is2D) {
33
31
  this.is2D = is2D;
34
32
  }
@@ -14,9 +14,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
14
14
  *
15
15
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformValue
16
16
  */
17
- var CSSTransformValue =
18
- /** @class */
19
- function (_super) {
17
+ var CSSTransformValue = function (_super) {
20
18
  (0, _tslib.__extends)(CSSTransformValue, _super);
21
19
 
22
20
  function CSSTransformValue(transforms) {
@@ -17,9 +17,7 @@ var _CSSTransformComponent = require("./CSSTransformComponent");
17
17
  *
18
18
  * @see https://drafts.css-houdini.org/css-typed-om/#csstranslate
19
19
  */
20
- var CSSTranslate =
21
- /** @class */
22
- function (_super) {
20
+ var CSSTranslate = function (_super) {
23
21
  (0, _tslib.__extends)(CSSTranslate, _super);
24
22
 
25
23
  function CSSTranslate(x, y, z, is2D) {
@@ -31,9 +31,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
31
31
  * unit (or a naked number or percentage).
32
32
  * @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
33
33
  */
34
- var CSSUnitValue =
35
- /** @class */
36
- function (_super) {
34
+ var CSSUnitValue = function (_super) {
37
35
  (0, _tslib.__extends)(CSSUnitValue, _super);
38
36
 
39
37
  function CSSUnitValue(value, unitOrName) {
@@ -252,7 +250,7 @@ function (_super) {
252
250
  text = CSSUnitValue.formatNumber(value, unit_1);
253
251
  }
254
252
  } else {
255
- text = "".concat(value).concat(unit);
253
+ text = "" + value + unit;
256
254
  }
257
255
  }
258
256
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ValueRange = exports.UnitType = exports.UnitCategory = exports.ParenLess = exports.Nested = void 0;
6
+ exports.ParenLess = exports.Nested = exports.ValueRange = exports.UnitCategory = exports.UnitType = void 0;
7
7
  // These units are iterated through, so be careful when adding or changing the
8
8
  // order.
9
9
  var UnitType;
@@ -1,12 +1,12 @@
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
7
7
  });
8
- exports.mergeColors = mergeColors;
9
8
  exports.parseColor = parseColor;
9
+ exports.mergeColors = mergeColors;
10
10
 
11
11
  var _tslib = require("tslib");
12
12
 
@@ -107,7 +107,7 @@ function mergeColors(left, right) {
107
107
  }
108
108
 
109
109
  rgba[3] = (0, _util.clamp)(rgba[3], 0, 1);
110
- return "rgba(".concat(rgba.join(','), ")");
110
+ return "rgba(" + rgba.join(',') + ")";
111
111
  }];
112
112
  }
113
113
 
@@ -3,14 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.convertAngleUnit = convertAngleUnit;
7
- exports.convertPercentUnit = convertPercentUnit;
8
- exports.mergeDimensionList = mergeDimensionList;
9
- exports.mergeDimensions = mergeDimensions;
10
- exports.parseAngle = void 0;
11
6
  exports.parseDimension = parseDimension;
7
+ exports.mergeDimensions = mergeDimensions;
8
+ exports.convertAngleUnit = convertAngleUnit;
12
9
  exports.parseDimensionArray = parseDimensionArray;
13
- exports.parserPercentage = exports.parseLengthOrPercentage = exports.parseLength = void 0;
10
+ exports.mergeDimensionList = mergeDimensionList;
11
+ exports.convertPercentUnit = convertPercentUnit;
12
+ exports.parseAngle = exports.parseLengthOrPercentage = exports.parserPercentage = exports.parseLength = void 0;
14
13
 
15
14
  var _util = require("@antv/util");
16
15
 
@@ -21,7 +20,7 @@ var _utils = require("../../utils");
21
20
  var _cssom = require("../cssom");
22
21
 
23
22
  function parseDimension(unitRegExp, string) {
24
- string = "".concat(string).trim().toLowerCase();
23
+ string = ("" + string).trim().toLowerCase();
25
24
 
26
25
  if (isFinite(Number(string))) {
27
26
  if ('px'.search(unitRegExp) >= 0) {
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.clampedMergeNumbers = clampedMergeNumbers;
7
- exports.mergeNumberLists = mergeNumberLists;
8
- exports.mergeNumbers = mergeNumbers;
9
6
  exports.numberToString = numberToString;
10
7
  exports.parseNumber = parseNumber;
11
8
  exports.parseNumberList = parseNumberList;
9
+ exports.mergeNumbers = mergeNumbers;
10
+ exports.clampedMergeNumbers = clampedMergeNumbers;
11
+ exports.mergeNumberLists = mergeNumberLists;
12
12
 
13
13
  var _util = require("@antv/util");
14
14
 
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.mergePaths = mergePaths;
7
6
  exports.parsePath = parsePath;
7
+ exports.mergePaths = mergePaths;
8
8
 
9
9
  var _tslib = require("tslib");
10
10
 
@@ -1,4 +1,4 @@
1
- import { CSSUnitValue } from '..';
1
+ import { CSSUnitValue } from '../cssom';
2
2
  /**
3
3
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
4
4
  * eg. 'center' 'top left' '50px 50px'
@@ -7,7 +7,9 @@ exports.parseTransformOrigin = parseTransformOrigin;
7
7
 
8
8
  var _util = require("@antv/util");
9
9
 
10
- var _ = require("..");
10
+ var _cssom = require("../cssom");
11
+
12
+ var _dimension = require("./dimension");
11
13
 
12
14
  /**
13
15
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
@@ -33,9 +35,9 @@ function parseTransformOrigin(value) {
33
35
  } // eg. center bottom
34
36
 
35
37
 
36
- return [(0, _.parseLengthOrPercentage)(convertKeyword2Percent(values[0])), (0, _.parseLengthOrPercentage)(convertKeyword2Percent(values[1]))];
38
+ return [(0, _dimension.parseLengthOrPercentage)(convertKeyword2Percent(values[0])), (0, _dimension.parseLengthOrPercentage)(convertKeyword2Percent(values[1]))];
37
39
  } else {
38
- return [new _.CSSUnitValue(value[0] || 0, 'px'), new _.CSSUnitValue(value[1] || 0, 'px')];
40
+ return [new _cssom.CSSUnitValue(value[0] || 0, 'px'), new _cssom.CSSUnitValue(value[1] || 0, 'px')];
39
41
  }
40
42
  }
41
43
 
@@ -1,5 +1,5 @@
1
- import { CSSUnitValue } from '..';
2
1
  import type { DisplayObject } from '../../display-objects/DisplayObject';
2
+ import { CSSUnitValue } from '../cssom';
3
3
  export interface ParsedTransform {
4
4
  t: string;
5
5
  d: CSSUnitValue[];
@@ -3,18 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Opx = exports.Odeg = void 0;
7
- exports.mergeTransforms = mergeTransforms;
8
6
  exports.parseTransform = parseTransform;
7
+ exports.mergeTransforms = mergeTransforms;
8
+ exports.Odeg = exports.Opx = void 0;
9
9
 
10
- var _2 = require("..");
10
+ var _2 = require("./");
11
11
 
12
12
  var _cssom = require("../cssom");
13
13
 
14
14
  var _ = null;
15
- var Opx = new _2.CSSUnitValue(0, 'px');
15
+ var Opx = new _cssom.CSSUnitValue(0, 'px');
16
16
  exports.Opx = Opx;
17
- var Odeg = new _2.CSSUnitValue(0, 'deg');
17
+ var Odeg = new _cssom.CSSUnitValue(0, 'deg');
18
18
  exports.Odeg = Odeg;
19
19
 
20
20
  function cast(pattern) {
@@ -41,10 +41,10 @@ var transformFunctions = {
41
41
  rotatez: ['A'],
42
42
  rotate3d: ['NNNA'],
43
43
  // perspective: ['L'],
44
- scale: ['Nn', cast([_, _, new _2.CSSUnitValue(1)]), id],
45
- scalex: ['N', cast([_, new _2.CSSUnitValue(1), new _2.CSSUnitValue(1)]), cast([_, new _2.CSSUnitValue(1)])],
46
- scaley: ['N', cast([new _2.CSSUnitValue(1), _, new _2.CSSUnitValue(1)]), cast([new _2.CSSUnitValue(1), _])],
47
- scalez: ['N', cast([new _2.CSSUnitValue(1), new _2.CSSUnitValue(1), _])],
44
+ scale: ['Nn', cast([_, _, new _cssom.CSSUnitValue(1)]), id],
45
+ scalex: ['N', cast([_, new _cssom.CSSUnitValue(1), new _cssom.CSSUnitValue(1)]), cast([_, new _cssom.CSSUnitValue(1)])],
46
+ scaley: ['N', cast([new _cssom.CSSUnitValue(1), _, new _cssom.CSSUnitValue(1)]), cast([new _cssom.CSSUnitValue(1), _])],
47
+ scalez: ['N', cast([new _cssom.CSSUnitValue(1), new _cssom.CSSUnitValue(1), _])],
48
48
  scale3d: ['NNN', id],
49
49
  // skew: ['Aa', null, id],
50
50
  // skewx: ['A', null, cast([_, Odeg])],
@@ -203,10 +203,10 @@ function mergeTransforms(left, right, target) {
203
203
  t: type,
204
204
  d: args.map(function (arg) {
205
205
  if (typeof arg === 'number') {
206
- return new _2.CSSUnitValue(defaultValue);
206
+ return new _cssom.CSSUnitValue(defaultValue);
207
207
  }
208
208
 
209
- return new _2.CSSUnitValue(defaultValue, arg.unit); // {
209
+ return new _cssom.CSSUnitValue(defaultValue, arg.unit); // {
210
210
  // unit: arg.unit,
211
211
  // value: defaultValue,
212
212
  // };