@antv/g 5.0.22-alpha.2 → 5.0.22-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/es/Canvas.d.ts +0 -3
  2. package/es/css/CSSProperty.d.ts +1 -1
  3. package/es/css/StyleValueRegistry.d.ts +2 -1
  4. package/es/css/StyleValueRegistry.js +5 -4
  5. package/es/css/parser/dimension.d.ts +2 -1
  6. package/es/css/parser/path.d.ts +1 -1
  7. package/es/css/parser/transform-origin.d.ts +1 -1
  8. package/es/css/parser/transform-origin.js +2 -2
  9. package/es/css/properties/CSSPropertyAnchor.d.ts +4 -2
  10. package/es/css/properties/CSSPropertyAnchor.js +2 -1
  11. package/es/css/properties/CSSPropertyClipPath.d.ts +2 -1
  12. package/es/css/properties/CSSPropertyClipPath.js +1 -1
  13. package/es/css/properties/CSSPropertyColor.d.ts +3 -2
  14. package/es/css/properties/CSSPropertyColor.js +1 -1
  15. package/es/css/properties/CSSPropertyFilter.d.ts +3 -2
  16. package/es/css/properties/CSSPropertyFilter.js +1 -1
  17. package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  18. package/es/css/properties/CSSPropertyLengthOrPercentage.js +2 -1
  19. package/es/css/properties/CSSPropertyLineDash.d.ts +4 -2
  20. package/es/css/properties/CSSPropertyLineDash.js +1 -1
  21. package/es/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  22. package/es/css/properties/CSSPropertyLocalPosition.js +1 -1
  23. package/es/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  24. package/es/css/properties/CSSPropertyOffsetDistance.js +2 -1
  25. package/es/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  26. package/es/css/properties/CSSPropertyOpacity.d.ts +3 -2
  27. package/es/css/properties/CSSPropertyOpacity.js +1 -1
  28. package/es/css/properties/CSSPropertyPath.d.ts +3 -2
  29. package/es/css/properties/CSSPropertyPath.js +3 -1
  30. package/es/css/properties/CSSPropertyPoints.d.ts +3 -2
  31. package/es/css/properties/CSSPropertyPoints.js +1 -1
  32. package/es/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  33. package/es/css/properties/CSSPropertyShadowBlur.js +1 -1
  34. package/es/css/properties/CSSPropertyText.d.ts +3 -2
  35. package/es/css/properties/CSSPropertyText.js +1 -1
  36. package/es/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  37. package/es/css/properties/CSSPropertyTextTransform.js +1 -1
  38. package/es/css/properties/CSSPropertyTransform.d.ts +3 -2
  39. package/es/css/properties/CSSPropertyTransform.js +1 -1
  40. package/es/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  41. package/es/css/properties/CSSPropertyTransformOrigin.js +1 -1
  42. package/es/css/properties/CSSPropertyVisibility.d.ts +3 -1
  43. package/es/css/properties/CSSPropertyZIndex.d.ts +4 -2
  44. package/es/css/properties/CSSPropertyZIndex.js +1 -1
  45. package/es/dom/Element.js +1 -1
  46. package/es/dom/MutationEvent.d.ts +1 -1
  47. package/es/dom/MutationObserver.d.ts +2 -1
  48. package/es/dom/MutationObserver.js +1 -1
  49. package/es/dom/MutationRecord.d.ts +1 -1
  50. package/es/dom/Node.js +1 -1
  51. package/es/dom/interfaces.d.ts +2 -1
  52. package/es/plugins/FrustumCullingStrategy.js +1 -1
  53. package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
  54. package/es/services/RenderingService.d.ts +2 -2
  55. package/es/services/TextService.d.ts +2 -2
  56. package/es/services/TextService.js +2 -1
  57. package/es/services/aabb/TextUpdater.d.ts +1 -2
  58. package/es/types.d.ts +1 -2
  59. package/es/utils/path.d.ts +1 -1
  60. package/lib/Canvas.d.ts +0 -3
  61. package/lib/css/CSSProperty.d.ts +1 -1
  62. package/lib/css/StyleValueRegistry.d.ts +2 -1
  63. package/lib/css/StyleValueRegistry.js +14 -8
  64. package/lib/css/parser/dimension.d.ts +2 -1
  65. package/lib/css/parser/path.d.ts +1 -1
  66. package/lib/css/parser/transform-origin.d.ts +1 -1
  67. package/lib/css/parser/transform-origin.js +5 -3
  68. package/lib/css/properties/CSSPropertyAnchor.d.ts +4 -2
  69. package/lib/css/properties/CSSPropertyAnchor.js +5 -3
  70. package/lib/css/properties/CSSPropertyClipPath.d.ts +2 -1
  71. package/lib/css/properties/CSSPropertyClipPath.js +2 -2
  72. package/lib/css/properties/CSSPropertyColor.d.ts +3 -2
  73. package/lib/css/properties/CSSPropertyColor.js +3 -3
  74. package/lib/css/properties/CSSPropertyFilter.d.ts +3 -2
  75. package/lib/css/properties/CSSPropertyFilter.js +2 -2
  76. package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +4 -2
  77. package/lib/css/properties/CSSPropertyLengthOrPercentage.js +11 -9
  78. package/lib/css/properties/CSSPropertyLineDash.d.ts +4 -2
  79. package/lib/css/properties/CSSPropertyLineDash.js +3 -3
  80. package/lib/css/properties/CSSPropertyLocalPosition.d.ts +4 -2
  81. package/lib/css/properties/CSSPropertyLocalPosition.js +3 -3
  82. package/lib/css/properties/CSSPropertyOffsetDistance.d.ts +4 -2
  83. package/lib/css/properties/CSSPropertyOffsetDistance.js +6 -4
  84. package/lib/css/properties/CSSPropertyOffsetPath.d.ts +2 -1
  85. package/lib/css/properties/CSSPropertyOpacity.d.ts +3 -2
  86. package/lib/css/properties/CSSPropertyOpacity.js +3 -3
  87. package/lib/css/properties/CSSPropertyPath.d.ts +3 -2
  88. package/lib/css/properties/CSSPropertyPath.js +9 -5
  89. package/lib/css/properties/CSSPropertyPoints.d.ts +3 -2
  90. package/lib/css/properties/CSSPropertyPoints.js +2 -2
  91. package/lib/css/properties/CSSPropertyShadowBlur.d.ts +1 -1
  92. package/lib/css/properties/CSSPropertyShadowBlur.js +2 -2
  93. package/lib/css/properties/CSSPropertyText.d.ts +3 -2
  94. package/lib/css/properties/CSSPropertyText.js +2 -2
  95. package/lib/css/properties/CSSPropertyTextTransform.d.ts +2 -1
  96. package/lib/css/properties/CSSPropertyTextTransform.js +5 -5
  97. package/lib/css/properties/CSSPropertyTransform.d.ts +3 -2
  98. package/lib/css/properties/CSSPropertyTransform.js +22 -22
  99. package/lib/css/properties/CSSPropertyTransformOrigin.d.ts +3 -2
  100. package/lib/css/properties/CSSPropertyTransformOrigin.js +2 -2
  101. package/lib/css/properties/CSSPropertyVisibility.d.ts +3 -1
  102. package/lib/css/properties/CSSPropertyZIndex.d.ts +4 -2
  103. package/lib/css/properties/CSSPropertyZIndex.js +2 -2
  104. package/lib/dom/Element.js +3 -3
  105. package/lib/dom/MutationEvent.d.ts +1 -1
  106. package/lib/dom/MutationObserver.d.ts +2 -1
  107. package/lib/dom/MutationObserver.js +11 -11
  108. package/lib/dom/MutationRecord.d.ts +1 -1
  109. package/lib/dom/Node.js +4 -4
  110. package/lib/dom/interfaces.d.ts +2 -1
  111. package/lib/plugins/FrustumCullingStrategy.js +2 -2
  112. package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
  113. package/lib/services/RenderingService.d.ts +2 -2
  114. package/lib/services/TextService.d.ts +2 -2
  115. package/lib/services/TextService.js +5 -3
  116. package/lib/services/aabb/TextUpdater.d.ts +1 -2
  117. package/lib/types.d.ts +1 -2
  118. package/lib/utils/path.d.ts +1 -1
  119. package/package.json +1 -1
@@ -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
  */
@@ -748,7 +754,7 @@ var StyleValueRegistry = function () {
748
754
  StyleValueRegistry.prototype.updateGeometry = function (object) {
749
755
  var _a;
750
756
 
751
- var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_.GeometryUpdaterFactory);
757
+ var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_services.GeometryUpdaterFactory);
752
758
 
753
759
  var geometryUpdater = geometryUpdaterFactory(object.nodeName);
754
760
 
@@ -756,11 +762,11 @@ var StyleValueRegistry = function () {
756
762
  var geometry_1 = object.geometry;
757
763
 
758
764
  if (!geometry_1.contentBounds) {
759
- geometry_1.contentBounds = new _.AABB();
765
+ geometry_1.contentBounds = new _shapes.AABB();
760
766
  }
761
767
 
762
768
  if (!geometry_1.renderBounds) {
763
- geometry_1.renderBounds = new _.AABB();
769
+ geometry_1.renderBounds = new _shapes.AABB();
764
770
  }
765
771
 
766
772
  var parsedStyle = object.parsedStyle;
@@ -783,7 +789,7 @@ var StyleValueRegistry = function () {
783
789
  _h = _b.offsetZ,
784
790
  offsetZ = _h === void 0 ? 0 : _h;
785
791
 
786
- 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) {
787
793
  parsedStyle.offsetX = x - (parsedStyle.defX || 0);
788
794
  parsedStyle.offsetY = y - (parsedStyle.defY || 0);
789
795
  parsedStyle.defX = x;
@@ -807,7 +813,7 @@ var StyleValueRegistry = function () {
807
813
  transformOrigin = _j.transformOrigin;
808
814
  var anchor = parsedStyle.anchor; // <Text> use textAlign & textBaseline instead of anchor
809
815
 
810
- if (object.nodeName === _.Shape.TEXT) {
816
+ if (object.nodeName === _types.Shape.TEXT) {
811
817
  delete parsedStyle.anchor;
812
818
  }
813
819
 
@@ -878,8 +884,8 @@ var StyleValueRegistry = function () {
878
884
  usedOriginXValue -= (anchor && anchor[0].value || 0) * geometry_1.contentBounds.halfExtents[0] * 2;
879
885
  usedOriginYValue -= (anchor && anchor[1].value || 0) * geometry_1.contentBounds.halfExtents[1] * 2;
880
886
  object.setOrigin(usedOriginXValue, usedOriginYValue);
881
- object.emit(_.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
882
- (0, _.dirtifyToRoot)(object);
887
+ object.emit(_dom.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
888
+ (0, _services.dirtifyToRoot)(object);
883
889
  }
884
890
  };
885
891
 
@@ -1,4 +1,5 @@
1
- import type { DisplayObject, IElement } from '../..';
1
+ import { IElement } from '../../dom';
2
+ import type { DisplayObject } from '../../display-objects';
2
3
  import type { CSSStyleValue } from '../cssom';
3
4
  import { CSSUnitValue } from '../cssom';
4
5
  import type { CSSValueParser } from './types';
@@ -1,5 +1,5 @@
1
1
  import type { PathCommand } from '../../types';
2
2
  import type { ParsedPathStyleProps } from '../../display-objects';
3
- import type { IElement } from '../..';
3
+ import type { IElement } from '../../dom';
4
4
  export declare function parsePath(path: string): ParsedPathStyleProps;
5
5
  export declare function mergePaths(left: ParsedPathStyleProps, right: ParsedPathStyleProps, object: IElement): [PathCommand[], PathCommand[], (b: PathCommand[]) => PathCommand[]];
@@ -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,7 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
2
- import { CSSUnitValue, parseNumberList } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { DisplayObject } from '../../display-objects';
3
+ import { CSSUnitValue } from '../cssom';
4
+ import { parseNumberList } from '../parser';
3
5
  export declare class CSSPropertyAnchor implements Partial<CSSProperty<CSSUnitValue[], CSSUnitValue[]>> {
4
6
  parser: typeof parseNumberList;
5
7
  calculator(name: string, oldParsed: CSSUnitValue[], parsed: CSSUnitValue[], object: DisplayObject): CSSUnitValue[];
@@ -9,16 +9,18 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _cssom = require("../cssom");
13
+
14
+ var _parser = require("../parser");
13
15
 
14
16
  var CSSPropertyAnchor = function () {
15
17
  function CSSPropertyAnchor() {
16
- this.parser = _.parseNumberList;
18
+ this.parser = _parser.parseNumberList;
17
19
  }
18
20
 
19
21
  CSSPropertyAnchor.prototype.calculator = function (name, oldParsed, parsed, object) {
20
22
  if (parsed.length === 2) {
21
- return [parsed[0], parsed[1], new _.CSSUnitValue(0)];
23
+ return [parsed[0], parsed[1], new _cssom.CSSUnitValue(0)];
22
24
  }
23
25
 
24
26
  return parsed;
@@ -1,4 +1,5 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { DisplayObject } from '../../display-objects';
2
3
  /**
3
4
  * @see /zh/docs/api/basic/display-object#clippath
4
5
  * @example
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _services = require("../../services");
13
13
 
14
14
  /**
15
15
  * @see /zh/docs/api/basic/display-object#clippath
@@ -46,7 +46,7 @@ var CSSPropertyClipPath = function () {
46
46
  newClipPath.style.clipPathTargets.push(object);
47
47
  }
48
48
 
49
- (0, _.dirtifyToRoot)(object);
49
+ (0, _services.dirtifyToRoot)(object);
50
50
  return newClipPath;
51
51
  };
52
52
 
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
2
- import { parseColor, mergeColors } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { DisplayObject } from '../../display-objects';
3
+ import { parseColor, mergeColors } from '../parser';
3
4
  import type { CSSGradientValue } from '../cssom';
4
5
  import { CSSKeywordValue, CSSRGB } from '../cssom';
5
6
  import type { StyleValueRegistry } from '../StyleValueRegistry';
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var _cssom = require("../cssom");
15
15
 
@@ -18,8 +18,8 @@ var _cssom = require("../cssom");
18
18
  */
19
19
  var CSSPropertyColor = function () {
20
20
  function CSSPropertyColor() {
21
- this.parser = _.parseColor;
22
- this.mixer = _.mergeColors;
21
+ this.parser = _parser.parseColor;
22
+ this.mixer = _parser.mergeColors;
23
23
  }
24
24
 
25
25
  CSSPropertyColor.prototype.calculator = function (name, oldParsed, parsed, object, registry) {
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, ParsedFilterStyleProperty } from '../..';
2
- import { parseFilter } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import type { ParsedFilterStyleProperty } from '../parser';
3
+ import { parseFilter } from '../parser';
3
4
  export declare class CSSPropertyFilter implements Partial<CSSProperty<ParsedFilterStyleProperty[], ParsedFilterStyleProperty[]>> {
4
5
  parser: typeof parseFilter;
5
6
  }
@@ -9,11 +9,11 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var CSSPropertyFilter = function () {
15
15
  function CSSPropertyFilter() {
16
- this.parser = _.parseFilter;
16
+ this.parser = _parser.parseFilter;
17
17
  }
18
18
 
19
19
  CSSPropertyFilter = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], CSSPropertyFilter);
@@ -1,6 +1,8 @@
1
- import { CSSUnitValue, mergeDimensions } from '../..';
1
+ import { CSSUnitValue } from '../cssom';
2
+ import { mergeDimensions } from '../parser';
2
3
  import type { StyleValueRegistry } from '../StyleValueRegistry';
3
- import type { DisplayObject, CSSProperty } from '../..';
4
+ import type { DisplayObject } from '../../display-objects';
5
+ import type { CSSProperty } from '../CSSProperty';
4
6
  /**
5
7
  * <length> & <percentage>
6
8
  */
@@ -9,15 +9,17 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _cssom = require("../cssom");
13
+
14
+ var _parser = require("../parser");
13
15
 
14
16
  /**
15
17
  * <length> & <percentage>
16
18
  */
17
19
  var CSSPropertyLengthOrPercentage = function () {
18
20
  function CSSPropertyLengthOrPercentage() {
19
- this.parser = _.parseLengthOrPercentage;
20
- this.mixer = _.mergeDimensions;
21
+ this.parser = _parser.parseLengthOrPercentage;
22
+ this.mixer = _parser.mergeDimensions;
21
23
  }
22
24
  /**
23
25
  * according to parent's bounds
@@ -28,8 +30,8 @@ var CSSPropertyLengthOrPercentage = function () {
28
30
 
29
31
 
30
32
  CSSPropertyLengthOrPercentage.prototype.calculator = function (name, oldParsed, computed, object, registry) {
31
- if (_.CSSUnitValue.isRelativeUnit(computed.unit)) {
32
- if (computed.unit === _.UnitType.kPercentage) {
33
+ if (_cssom.CSSUnitValue.isRelativeUnit(computed.unit)) {
34
+ if (computed.unit === _cssom.UnitType.kPercentage) {
33
35
  // try to resolve according to parent's geometry bounds
34
36
  // if (object.parentElement) {
35
37
  // // registry.registerParentGeometryBoundsChangedHandler(object, name);
@@ -45,10 +47,10 @@ var CSSPropertyLengthOrPercentage = function () {
45
47
  // // { once: true },
46
48
  // // );
47
49
  // }
48
- return new _.CSSUnitValue(0, 'px');
49
- } else if (computed.unit === _.UnitType.kEms) {
50
+ return new _cssom.CSSUnitValue(0, 'px');
51
+ } else if (computed.unit === _cssom.UnitType.kEms) {
50
52
  // TODO: handle ems
51
- return new _.CSSUnitValue(0, 'px');
53
+ return new _cssom.CSSUnitValue(0, 'px');
52
54
  }
53
55
  } else {
54
56
  // remove listener if exists
@@ -71,7 +73,7 @@ var CSSPropertyLengthOrPercentage = function () {
71
73
  CSSPropertyLengthOrPercentage.prototype.calculateUsedValueWithParentBounds = function (object, name) {
72
74
  var bounds = object.parentElement.getGeometryBounds();
73
75
  var computedValue = object.computedStyle[name].value;
74
- return new _.CSSUnitValue(bounds.halfExtents[this.nameToBoundsIndex(name)] * 2 * computedValue / 100, 'px');
76
+ return new _cssom.CSSUnitValue(bounds.halfExtents[this.nameToBoundsIndex(name)] * 2 * computedValue / 100, 'px');
75
77
  };
76
78
 
77
79
  CSSPropertyLengthOrPercentage = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], CSSPropertyLengthOrPercentage);
@@ -1,5 +1,7 @@
1
- import type { CSSProperty, CSSUnitValue, DisplayObject } from '../..';
2
- import { parseDimensionArray, mergeDimensionList } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import type { CSSUnitValue } from '../cssom';
4
+ import { parseDimensionArray, mergeDimensionList } from '../parser';
3
5
  export declare class CSSPropertyLineDash implements Partial<CSSProperty<CSSUnitValue[], CSSUnitValue[]>> {
4
6
  parser: typeof parseDimensionArray;
5
7
  mixer: typeof mergeDimensionList;
@@ -9,12 +9,12 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var CSSPropertyLineDash = function () {
15
15
  function CSSPropertyLineDash() {
16
- this.parser = _.parseDimensionArray;
17
- this.mixer = _.mergeDimensionList;
16
+ this.parser = _parser.parseDimensionArray;
17
+ this.mixer = _parser.mergeDimensionList;
18
18
  }
19
19
 
20
20
  CSSPropertyLineDash.prototype.calculator = function (name, oldParsed, parsed, object) {
@@ -1,5 +1,7 @@
1
- import type { CSSUnitValue, CSSProperty, DisplayObject } from '../..';
2
- import { mergeDimensions } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import type { CSSUnitValue } from '../cssom';
4
+ import { mergeDimensions } from '../parser';
3
5
  import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
4
6
  /**
5
7
  * local position
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var _CSSPropertyLengthOrPercentage = require("./CSSPropertyLengthOrPercentage");
15
15
 
@@ -26,12 +26,12 @@ var CSSPropertyLocalPosition = function (_super) {
26
26
  */
27
27
 
28
28
 
29
- _this.parser = _.parseLengthOrPercentage;
29
+ _this.parser = _parser.parseLengthOrPercentage;
30
30
  /**
31
31
  * mix between CSS.px(x)
32
32
  */
33
33
 
34
- _this.mixer = _.mergeDimensions;
34
+ _this.mixer = _parser.mergeDimensions;
35
35
  return _this;
36
36
  }
37
37
  /**
@@ -1,5 +1,7 @@
1
- import type { CSSUnitValue, CSSProperty, DisplayObject } from '../..';
2
- import { parseNumber } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import type { CSSUnitValue } from '../cssom';
4
+ import { parseNumber } from '../parser';
3
5
  export declare class CSSPropertyOffsetDistance implements Partial<CSSProperty<CSSUnitValue, CSSUnitValue>> {
4
6
  parser: typeof parseNumber;
5
7
  mixer: (left: CSSUnitValue, right: CSSUnitValue) => [number, number, (i: number) => string];
@@ -9,12 +9,14 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _types = require("../../types");
13
+
14
+ var _parser = require("../parser");
13
15
 
14
16
  var CSSPropertyOffsetDistance = function () {
15
17
  function CSSPropertyOffsetDistance() {
16
- this.parser = _.parseNumber;
17
- this.mixer = (0, _.clampedMergeNumbers)(0, 1);
18
+ this.parser = _parser.parseNumber;
19
+ this.mixer = (0, _parser.clampedMergeNumbers)(0, 1);
18
20
  }
19
21
 
20
22
  CSSPropertyOffsetDistance.prototype.postProcessor = function (object) {
@@ -24,7 +26,7 @@ var CSSPropertyOffsetDistance = function () {
24
26
 
25
27
  var offsetPathNodeName = object.attributes.offsetPath.nodeName;
26
28
 
27
- if (offsetPathNodeName === _.Shape.LINE || offsetPathNodeName === _.Shape.PATH || offsetPathNodeName === _.Shape.POLYLINE) {
29
+ if (offsetPathNodeName === _types.Shape.LINE || offsetPathNodeName === _types.Shape.PATH || offsetPathNodeName === _types.Shape.POLYLINE) {
28
30
  var point = object.attributes.offsetPath.getPoint(object.parsedStyle.offsetDistance.value);
29
31
 
30
32
  if (point) {
@@ -1,4 +1,5 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
2
3
  export declare class CSSPropertyOffsetPath implements Partial<CSSProperty<DisplayObject, DisplayObject>> {
3
4
  calculator(name: string, oldOffsetPath: DisplayObject, newOffsetPath: DisplayObject, object: DisplayObject): DisplayObject<any, any>;
4
5
  }
@@ -1,5 +1,6 @@
1
- import type { CSSUnitValue, CSSProperty } from '../..';
2
- import { parseNumber } from '../..';
1
+ import type { CSSUnitValue } from '../cssom';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import { parseNumber } from '../parser';
3
4
  /**
4
5
  * opacity
5
6
  */
@@ -9,15 +9,15 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  /**
15
15
  * opacity
16
16
  */
17
17
  var CSSPropertyOpacity = function () {
18
18
  function CSSPropertyOpacity() {
19
- this.parser = _.parseNumber;
20
- this.mixer = (0, _.clampedMergeNumbers)(0, 1);
19
+ this.parser = _parser.parseNumber;
20
+ this.mixer = (0, _parser.clampedMergeNumbers)(0, 1);
21
21
  }
22
22
 
23
23
  CSSPropertyOpacity = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], CSSPropertyOpacity);
@@ -1,5 +1,6 @@
1
- import type { DisplayObject, CSSProperty, ParsedPathStyleProps } from '../..';
2
- import { parsePath, mergePaths } from '../..';
1
+ import type { DisplayObject, ParsedPathStyleProps } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import { parsePath, mergePaths } from '../parser';
3
4
  export declare class CSSPropertyPath implements Partial<CSSProperty<ParsedPathStyleProps, ParsedPathStyleProps>> {
4
5
  /**
5
6
  * path2Curve
@@ -9,19 +9,23 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _shapes = require("../../shapes");
13
+
14
+ var _cssom = require("../cssom");
15
+
16
+ var _parser = require("../parser");
13
17
 
14
18
  var CSSPropertyPath = function () {
15
19
  function CSSPropertyPath() {
16
20
  /**
17
21
  * path2Curve
18
22
  */
19
- this.parser = _.parsePath;
20
- this.mixer = _.mergePaths;
23
+ this.parser = _parser.parsePath;
24
+ this.mixer = _parser.mergePaths;
21
25
  }
22
26
 
23
27
  CSSPropertyPath.prototype.calculator = function (name, oldParsed, parsed) {
24
- if (parsed instanceof _.CSSKeywordValue) {
28
+ if (parsed instanceof _cssom.CSSKeywordValue) {
25
29
  return {
26
30
  absolutePath: [],
27
31
  hasArc: false,
@@ -32,7 +36,7 @@ var CSSPropertyPath = function () {
32
36
  totalLength: 0,
33
37
  curveSegments: [],
34
38
  zCommandIndexes: [],
35
- rect: new _.Rectangle(0, 0, 0, 0)
39
+ rect: new _shapes.Rectangle(0, 0, 0, 0)
36
40
  };
37
41
  }
38
42
 
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
2
- import { parsePoints } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import { parsePoints } from '../parser';
3
4
  export declare class CSSPropertyPoints implements Partial<CSSProperty<{
4
5
  points: [number, number][];
5
6
  totalLength: number;
@@ -9,11 +9,11 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var CSSPropertyPoints = function () {
15
15
  function CSSPropertyPoints() {
16
- this.parser = _.parsePoints;
16
+ this.parser = _parser.parsePoints;
17
17
  }
18
18
  /**
19
19
  * update local position
@@ -1,4 +1,4 @@
1
1
  import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
2
2
  export declare class CSSPropertyShadowBlur extends CSSPropertyLengthOrPercentage {
3
- mixer: (left: import("../..").CSSUnitValue, right: import("../..").CSSUnitValue) => [number, number, (i: number) => string];
3
+ mixer: (left: import("..").CSSUnitValue, right: import("..").CSSUnitValue) => [number, number, (i: number) => string];
4
4
  }
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _parser = require("../parser");
13
13
 
14
14
  var _CSSPropertyLengthOrPercentage = require("./CSSPropertyLengthOrPercentage");
15
15
 
@@ -19,7 +19,7 @@ var CSSPropertyShadowBlur = function (_super) {
19
19
  function CSSPropertyShadowBlur() {
20
20
  var _this = _super !== null && _super.apply(this, arguments) || this;
21
21
 
22
- _this.mixer = (0, _.clampedMergeNumbers)(0, Infinity);
22
+ _this.mixer = (0, _parser.clampedMergeNumbers)(0, Infinity);
23
23
  return _this;
24
24
  }
25
25
 
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
2
- import { CSSKeywordValue } from '../..';
1
+ import type { CSSProperty } from '../CSSProperty';
2
+ import { CSSKeywordValue } from '../cssom';
3
+ import { DisplayObject } from '../../display-objects';
3
4
  export declare class CSSPropertyText implements Partial<CSSProperty<CSSKeywordValue | string, string>> {
4
5
  calculator(name: string, oldParsed: CSSKeywordValue | string, parsed: CSSKeywordValue | string, object: DisplayObject): string;
5
6
  postProcessor(object: DisplayObject): void;
@@ -9,13 +9,13 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _cssom = require("../cssom");
13
13
 
14
14
  var CSSPropertyText = function () {
15
15
  function CSSPropertyText() {}
16
16
 
17
17
  CSSPropertyText.prototype.calculator = function (name, oldParsed, parsed, object) {
18
- if (parsed instanceof _.CSSKeywordValue) {
18
+ if (parsed instanceof _cssom.CSSKeywordValue) {
19
19
  if (parsed.value === 'unset') {
20
20
  return '';
21
21
  } else {
@@ -1,4 +1,5 @@
1
- import type { CSSProperty, ParsedPathStyleProps, DisplayObject } from '../..';
1
+ import { CSSProperty } from '../CSSProperty';
2
+ import { DisplayObject, ParsedPathStyleProps } from '../../display-objects';
2
3
  export declare class CSSPropertyTextTransform implements Partial<CSSProperty<ParsedPathStyleProps, ParsedPathStyleProps>> {
3
4
  postProcessor(o: DisplayObject): void;
4
5
  }
@@ -9,21 +9,21 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _ = require("../..");
12
+ var _types = require("../../types");
13
13
 
14
14
  var CSSPropertyTextTransform = function () {
15
15
  function CSSPropertyTextTransform() {}
16
16
 
17
17
  CSSPropertyTextTransform.prototype.postProcessor = function (o) {
18
- if (o.nodeName === _.Shape.TEXT) {
18
+ if (o.nodeName === _types.Shape.TEXT) {
19
19
  var object = o;
20
20
  var newTextTransform = object.parsedStyle.textTransform.value;
21
21
 
22
- if (newTextTransform === _.TextTransform.CAPITALIZE) {
22
+ if (newTextTransform === _types.TextTransform.CAPITALIZE) {
23
23
  object.style.text = object.style.text.charAt(0).toUpperCase() + object.style.text.slice(1);
24
- } else if (newTextTransform === _.TextTransform.LOWERCASE) {
24
+ } else if (newTextTransform === _types.TextTransform.LOWERCASE) {
25
25
  object.style.text = object.style.text.toLowerCase();
26
- } else if (newTextTransform === _.TextTransform.UPPERCASE) {
26
+ } else if (newTextTransform === _types.TextTransform.UPPERCASE) {
27
27
  object.style.text = object.style.text.toUpperCase(); // } else if (newTextTransform === TextTransform.NONE) {
28
28
  }
29
29
  }
@@ -1,5 +1,6 @@
1
- import type { CSSProperty, DisplayObject } from '../..';
2
- import { parseTransform, mergeTransforms } from '../..';
1
+ import type { DisplayObject } from '../../display-objects';
2
+ import type { CSSProperty } from '../CSSProperty';
3
+ import { parseTransform, mergeTransforms } from '../parser';
3
4
  /**
4
5
  * @see /zh/docs/api/animation#支持变换的属性
5
6
  *