@antv/g 5.0.23-alpha.0 → 5.0.23-alpha.12

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 (78) hide show
  1. package/dist/index.umd.min.js +2 -2
  2. package/es/css/StyleValueRegistry.d.ts +2 -0
  3. package/es/css/StyleValueRegistry.js +7 -3
  4. package/es/css/cssom/CSSKeywordValue.d.ts +1 -1
  5. package/es/css/cssom/CSSNumericSumValue.d.ts +1 -1
  6. package/es/css/cssom/CSSNumericValue.d.ts +141 -4
  7. package/es/css/cssom/CSSNumericValue.js +1166 -5
  8. package/es/css/cssom/CSSTransformValue.d.ts +1 -1
  9. package/es/css/cssom/index.d.ts +0 -10
  10. package/es/css/cssom/index.js +1 -11
  11. package/es/css/parser/numeric.d.ts +1 -1
  12. package/es/css/parser/numeric.js +1 -1
  13. package/es/css/parser/transform-origin.d.ts +1 -1
  14. package/es/css/parser/transform-origin.js +1 -1
  15. package/es/css/parser/transform.d.ts +1 -3
  16. package/es/css/parser/transform.js +9 -8
  17. package/es/css/properties/CSSPropertyTransform.js +2 -2
  18. package/es/plugins/PrepareRendererPlugin.js +2 -2
  19. package/es/services/RenderingService.js +2 -2
  20. package/lib/css/StyleValueRegistry.d.ts +2 -0
  21. package/lib/css/StyleValueRegistry.js +13 -5
  22. package/lib/css/cssom/CSSKeywordValue.d.ts +1 -1
  23. package/lib/css/cssom/CSSNumericSumValue.d.ts +1 -1
  24. package/lib/css/cssom/CSSNumericValue.d.ts +141 -4
  25. package/lib/css/cssom/CSSNumericValue.js +1232 -58
  26. package/lib/css/cssom/CSSTransformValue.d.ts +1 -1
  27. package/lib/css/cssom/index.d.ts +0 -10
  28. package/lib/css/cssom/index.js +0 -130
  29. package/lib/css/parser/numeric.d.ts +1 -1
  30. package/lib/css/parser/numeric.js +4 -4
  31. package/lib/css/parser/transform-origin.d.ts +1 -1
  32. package/lib/css/parser/transform-origin.js +2 -2
  33. package/lib/css/parser/transform.d.ts +1 -3
  34. package/lib/css/parser/transform.js +25 -24
  35. package/lib/css/properties/CSSPropertyTransform.js +18 -18
  36. package/lib/plugins/PrepareRendererPlugin.js +2 -2
  37. package/lib/services/RenderingService.js +2 -2
  38. package/package.json +3 -3
  39. package/es/css/cssom/CSSMathInvert.d.ts +0 -14
  40. package/es/css/cssom/CSSMathInvert.js +0 -84
  41. package/es/css/cssom/CSSMathMax.d.ts +0 -17
  42. package/es/css/cssom/CSSMathMax.js +0 -118
  43. package/es/css/cssom/CSSMathMin.d.ts +0 -17
  44. package/es/css/cssom/CSSMathMin.js +0 -119
  45. package/es/css/cssom/CSSMathNegate.d.ts +0 -14
  46. package/es/css/cssom/CSSMathNegate.js +0 -80
  47. package/es/css/cssom/CSSMathProduct.d.ts +0 -16
  48. package/es/css/cssom/CSSMathProduct.js +0 -109
  49. package/es/css/cssom/CSSMathSum.d.ts +0 -17
  50. package/es/css/cssom/CSSMathSum.js +0 -117
  51. package/es/css/cssom/CSSMathValue.d.ts +0 -11
  52. package/es/css/cssom/CSSMathValue.js +0 -27
  53. package/es/css/cssom/CSSMathVariadic.d.ts +0 -9
  54. package/es/css/cssom/CSSMathVariadic.js +0 -44
  55. package/es/css/cssom/CSSNumericValueType.d.ts +0 -33
  56. package/es/css/cssom/CSSNumericValueType.js +0 -259
  57. package/es/css/cssom/CSSUnitValue.d.ts +0 -33
  58. package/es/css/cssom/CSSUnitValue.js +0 -252
  59. package/lib/css/cssom/CSSMathInvert.d.ts +0 -14
  60. package/lib/css/cssom/CSSMathInvert.js +0 -94
  61. package/lib/css/cssom/CSSMathMax.d.ts +0 -17
  62. package/lib/css/cssom/CSSMathMax.js +0 -128
  63. package/lib/css/cssom/CSSMathMin.d.ts +0 -17
  64. package/lib/css/cssom/CSSMathMin.js +0 -128
  65. package/lib/css/cssom/CSSMathNegate.d.ts +0 -14
  66. package/lib/css/cssom/CSSMathNegate.js +0 -89
  67. package/lib/css/cssom/CSSMathProduct.d.ts +0 -16
  68. package/lib/css/cssom/CSSMathProduct.js +0 -119
  69. package/lib/css/cssom/CSSMathSum.d.ts +0 -17
  70. package/lib/css/cssom/CSSMathSum.js +0 -129
  71. package/lib/css/cssom/CSSMathValue.d.ts +0 -11
  72. package/lib/css/cssom/CSSMathValue.js +0 -35
  73. package/lib/css/cssom/CSSMathVariadic.d.ts +0 -9
  74. package/lib/css/cssom/CSSMathVariadic.js +0 -55
  75. package/lib/css/cssom/CSSNumericValueType.d.ts +0 -33
  76. package/lib/css/cssom/CSSNumericValueType.js +0 -272
  77. package/lib/css/cssom/CSSUnitValue.d.ts +0 -33
  78. package/lib/css/cssom/CSSUnitValue.js +0 -267
@@ -1,4 +1,4 @@
1
- import type { Nested, ParenLess } from '.';
1
+ import type { Nested, ParenLess } from './types';
2
2
  import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
3
3
  import type { CSSTransformComponent } from './CSSTransformComponent';
4
4
  /**
@@ -10,20 +10,10 @@ export * from './types';
10
10
  export * from './CSSColorValue';
11
11
  export * from './CSSKeywordValue';
12
12
  export * from './CSSMathOperator';
13
- export * from './CSSMathInvert';
14
- export * from './CSSMathMax';
15
- export * from './CSSMathMin';
16
- export * from './CSSMathNegate';
17
- export * from './CSSMathProduct';
18
- export * from './CSSMathSum';
19
- export * from './CSSMathValue';
20
- export * from './CSSMathVariadic';
21
13
  export * from './CSSNumericSumValue';
22
14
  export * from './CSSNumericValue';
23
- export * from './CSSNumericValueType';
24
15
  export * from './CSSRGB';
25
16
  export * from './CSSGradientValue';
26
17
  export * from './CSSStyleValue';
27
18
  export * from './CSSTransformValue';
28
19
  export * from './CSSTranslate';
29
- export * from './CSSUnitValue';
@@ -10,20 +10,10 @@ export * from './types';
10
10
  export * from './CSSColorValue';
11
11
  export * from './CSSKeywordValue';
12
12
  export * from './CSSMathOperator';
13
- export * from './CSSMathInvert';
14
- export * from './CSSMathMax';
15
- export * from './CSSMathMin';
16
- export * from './CSSMathNegate';
17
- export * from './CSSMathProduct';
18
- export * from './CSSMathSum';
19
- export * from './CSSMathValue';
20
- export * from './CSSMathVariadic';
21
13
  export * from './CSSNumericSumValue';
22
14
  export * from './CSSNumericValue';
23
- export * from './CSSNumericValueType';
24
15
  export * from './CSSRGB';
25
16
  export * from './CSSGradientValue';
26
17
  export * from './CSSStyleValue';
27
18
  export * from './CSSTransformValue';
28
- export * from './CSSTranslate';
29
- export * from './CSSUnitValue';
19
+ export * from './CSSTranslate';
@@ -1,4 +1,4 @@
1
- import { CSSUnitValue } from '../cssom';
1
+ import { CSSUnitValue } from '../cssom/CSSNumericValue';
2
2
  export declare function numberToString(x: number): string;
3
3
  /**
4
4
  * parse string or number to CSSUnitValue(numeric)
@@ -1,5 +1,5 @@
1
1
  import { clamp, isString } from '../../utils';
2
- import { CSSUnitValue } from '../cssom';
2
+ import { CSSUnitValue } from '../cssom/CSSNumericValue';
3
3
  export function numberToString(x) {
4
4
  // scale(0.00000001) -> scale(0)
5
5
  // return x.toFixed(6).replace(/0+$/, '').replace(/\.$/, '');
@@ -1,4 +1,4 @@
1
- import { CSSUnitValue } from '../cssom';
1
+ import { CSSUnitValue } from '../cssom/CSSNumericValue';
2
2
  /**
3
3
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
4
4
  * eg. 'center' 'top left' '50px 50px'
@@ -1,5 +1,5 @@
1
1
  import { isString } from '../../utils';
2
- import { CSSUnitValue } from '../cssom';
2
+ import { CSSUnitValue } from '../cssom/CSSNumericValue';
3
3
  import { parseLengthOrPercentage } from './dimension';
4
4
  /**
5
5
  * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
@@ -1,11 +1,9 @@
1
1
  import type { DisplayObject } from '../../display-objects/DisplayObject';
2
- import { CSSUnitValue } from '../cssom';
2
+ import { CSSUnitValue } from '../cssom/CSSNumericValue';
3
3
  export interface ParsedTransform {
4
4
  t: string;
5
5
  d: CSSUnitValue[];
6
6
  }
7
- export declare const Opx: CSSUnitValue;
8
- export declare const Odeg: CSSUnitValue;
9
7
  /**
10
8
  * none
11
9
  * scale(1) scale(1, 2)
@@ -1,8 +1,9 @@
1
- import { parseNumber, mergeNumbers, parseAngle, parseLength, parseLengthOrPercentage, mergeDimensions } from './';
2
- import { UnitType, CSSUnitValue } from '../cssom';
1
+ import { UnitType } from '../cssom/types';
2
+ import { CSSUnitValue, Opx, Odeg } from '../cssom/CSSNumericValue';
3
+ import { mergeDimensions, parseAngle, parseLength, parseLengthOrPercentage } from './dimension';
4
+ import { mergeNumbers, parseNumber } from './numeric';
5
+ import { CSS } from '../CSS';
3
6
  var _ = null;
4
- export var Opx = new CSSUnitValue(0, 'px');
5
- export var Odeg = new CSSUnitValue(0, 'deg');
6
7
 
7
8
  function cast(pattern) {
8
9
  return function (contents) {
@@ -28,10 +29,10 @@ var transformFunctions = {
28
29
  rotatez: ['A'],
29
30
  rotate3d: ['NNNA'],
30
31
  // perspective: ['L'],
31
- scale: ['Nn', cast([_, _, new CSSUnitValue(1)]), id],
32
- scalex: ['N', cast([_, new CSSUnitValue(1), new CSSUnitValue(1)]), cast([_, new CSSUnitValue(1)])],
33
- scaley: ['N', cast([new CSSUnitValue(1), _, new CSSUnitValue(1)]), cast([new CSSUnitValue(1), _])],
34
- scalez: ['N', cast([new CSSUnitValue(1), new CSSUnitValue(1), _])],
32
+ scale: ['Nn', cast([_, _, CSS.number(1)]), id],
33
+ scalex: ['N', cast([_, CSS.number(1), CSS.number(1)]), cast([_, CSS.number(1)])],
34
+ scaley: ['N', cast([CSS.number(1), _, CSS.number(1)]), cast([CSS.number(1), _])],
35
+ scalez: ['N', cast([CSS.number(1), CSS.number(1), _])],
35
36
  scale3d: ['NNN', id],
36
37
  // skew: ['Aa', null, id],
37
38
  // skewx: ['A', null, cast([_, Odeg])],
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { singleton } from 'mana-syringe';
3
- import { CSSKeywordValue } from '../cssom';
4
- import { Opx, Odeg, parseTransform, mergeTransforms } from '../parser';
3
+ import { CSSKeywordValue, Opx, Odeg } from '../cssom';
4
+ import { parseTransform, mergeTransforms } from '../parser';
5
5
  /**
6
6
  * @see /zh/docs/api/animation#支持变换的属性
7
7
  *
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata } from "tslib";
2
2
  import { inject, singleton } from 'mana-syringe';
3
- import { StyleValueRegistry } from '../css';
3
+ import { StyleValueRegistryContribution } from '../css/StyleValueRegistry';
4
4
  import { ElementEvent } from '../dom';
5
5
  import { RenderingContext, RenderingPluginContribution, dirtifyToRoot } from '../services';
6
6
 
@@ -63,7 +63,7 @@ function () {
63
63
 
64
64
  __decorate([inject(RenderingContext), __metadata("design:type", Object)], PrepareRendererPlugin.prototype, "renderingContext", void 0);
65
65
 
66
- __decorate([inject(StyleValueRegistry), __metadata("design:type", StyleValueRegistry)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
66
+ __decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
67
67
 
68
68
  PrepareRendererPlugin = __decorate([singleton({
69
69
  contrib: RenderingPluginContribution
@@ -1,7 +1,7 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata } from "tslib";
2
2
  import { inject, singleton, contrib, Syringe, Contribution } from 'mana-syringe';
3
3
  import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from '../utils';
4
- import { StyleValueRegistry } from '../css';
4
+ import { StyleValueRegistryContribution } from '../css/StyleValueRegistry';
5
5
  import { ElementEvent } from '../dom';
6
6
  import { RenderingContext, RenderReason } from './RenderingContext';
7
7
  import { SceneGraphService, sortByZIndex } from './SceneGraphService';
@@ -219,7 +219,7 @@ function () {
219
219
 
220
220
  __decorate([inject(SceneGraphService), __metadata("design:type", Object)], RenderingService.prototype, "sceneGraphService", void 0);
221
221
 
222
- __decorate([inject(StyleValueRegistry), __metadata("design:type", StyleValueRegistry)], RenderingService.prototype, "styleValueRegistry", void 0);
222
+ __decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], RenderingService.prototype, "styleValueRegistry", void 0);
223
223
 
224
224
  RenderingService = __decorate([singleton()], RenderingService);
225
225
  return RenderingService;
@@ -1,3 +1,4 @@
1
+ import { Syringe } from 'mana-syringe';
1
2
  import type { DisplayObject } from '../display-objects';
2
3
  import type { BaseStyleProps } from '../types';
3
4
  import { CSSStyleValue } from './cssom';
@@ -65,6 +66,7 @@ export interface PropertyMetadata {
65
66
  * Blink used them in code generation(css_properties.json5)
66
67
  */
67
68
  export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
69
+ export declare const StyleValueRegistryContribution: Syringe.DefinedToken;
68
70
  export declare class StyleValueRegistry {
69
71
  /**
70
72
  * need recalc later
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
6
+ exports.StyleValueRegistryContribution = exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -11,7 +11,9 @@ var _manaSyringe = require("mana-syringe");
11
11
 
12
12
  var _glMatrix = require("gl-matrix");
13
13
 
14
- var _services = require("../services");
14
+ var _interfaces = require("../services/aabb/interfaces");
15
+
16
+ var _SceneGraphService = require("../services/SceneGraphService");
15
17
 
16
18
  var _dom = require("../dom");
17
19
 
@@ -431,6 +433,10 @@ var BUILT_IN_PROPERTIES = [{
431
433
  }];
432
434
  exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
433
435
 
436
+ var StyleValueRegistryContribution = _manaSyringe.Syringe.defineToken('StyleValueRegistry');
437
+
438
+ exports.StyleValueRegistryContribution = StyleValueRegistryContribution;
439
+
434
440
  var StyleValueRegistry =
435
441
  /** @class */
436
442
  function () {
@@ -761,7 +767,7 @@ function () {
761
767
  StyleValueRegistry.prototype.updateGeometry = function (object) {
762
768
  var _a;
763
769
 
764
- var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_services.GeometryUpdaterFactory);
770
+ var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_interfaces.GeometryUpdaterFactory);
765
771
 
766
772
  var geometryUpdater = geometryUpdaterFactory(object.nodeName);
767
773
 
@@ -892,7 +898,7 @@ function () {
892
898
  usedOriginYValue -= (anchor && anchor[1].value || 0) * geometry_1.contentBounds.halfExtents[1] * 2;
893
899
  object.setOrigin(usedOriginXValue, usedOriginYValue);
894
900
  object.emit(_dom.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
895
- (0, _services.dirtifyToRoot)(object);
901
+ (0, _SceneGraphService.dirtifyToRoot)(object);
896
902
  }
897
903
  };
898
904
 
@@ -907,7 +913,9 @@ function () {
907
913
  };
908
914
 
909
915
  (0, _tslib.__decorate)([(0, _manaSyringe.postConstruct)(), (0, _tslib.__metadata)("design:type", Function), (0, _tslib.__metadata)("design:paramtypes", []), (0, _tslib.__metadata)("design:returntype", void 0)], StyleValueRegistry.prototype, "init", null);
910
- StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], StyleValueRegistry);
916
+ StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
917
+ token: StyleValueRegistryContribution
918
+ })], StyleValueRegistry);
911
919
  return StyleValueRegistry;
912
920
  }();
913
921
 
@@ -1,4 +1,4 @@
1
- import type { Nested, ParenLess } from '.';
1
+ import type { Nested, ParenLess } from './types';
2
2
  import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
3
3
  /**
4
4
  * CSSKeywordValue represents CSS Values that are specified as keywords
@@ -1,4 +1,4 @@
1
- import type { UnitType } from '.';
1
+ import type { UnitType } from './types';
2
2
  export declare type UnitMap = Record<UnitType, number>;
3
3
  export interface Term {
4
4
  value: number;
@@ -1,7 +1,6 @@
1
- import type { CSSNumericSumValue } from './CSSNumericSumValue';
2
- import type { CSSNumericValueType } from './CSSNumericValueType';
3
- import { CSSStyleValue } from './CSSStyleValue';
4
- import { UnitType, CSSStyleValueType, CSSUnitValue, CSSMathSum } from '.';
1
+ import type { CSSNumericSumValue, UnitMap } from './CSSNumericSumValue';
2
+ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
3
+ import { Nested, ParenLess, UnitType } from './types';
5
4
  export declare type CSSNumberish = number | CSSNumericValue;
6
5
  declare type CSSNumericBaseType = 'length' | 'angle' | 'time' | 'frequency' | 'resolution' | 'flex' | 'percent';
7
6
  interface CSSNumericType {
@@ -14,6 +13,38 @@ interface CSSNumericType {
14
13
  percent: number;
15
14
  percentHint: CSSNumericBaseType;
16
15
  }
16
+ export declare enum BaseType {
17
+ kLength = 0,
18
+ kAngle = 1,
19
+ kTime = 2,
20
+ kFrequency = 3,
21
+ kResolution = 4,
22
+ kFlex = 5,
23
+ kPercent = 6,
24
+ kNumBaseTypes = 7
25
+ }
26
+ export declare function unitTypeToBaseType(unit: UnitType): BaseType.kLength | BaseType.kAngle | BaseType.kTime | BaseType.kFrequency | BaseType.kResolution | BaseType.kFlex | BaseType.kPercent;
27
+ export declare function baseTypeToString(baseType: BaseType): "" | "percent" | "length" | "angle" | "time" | "frequency" | "resolution" | "flex";
28
+ export declare class CSSNumericValueType {
29
+ private exponents;
30
+ private numNonZeroEntries;
31
+ percentHint: BaseType;
32
+ hasPercentHint: boolean;
33
+ constructor(unit?: UnitType, exponent?: number);
34
+ applyPercentHint(hint: BaseType): void;
35
+ hasNonZeroEntries(): boolean;
36
+ isOnlyNonZeroEntry(baseType: BaseType, value: number): boolean;
37
+ exponent(type: BaseType): number;
38
+ setExponent(type: BaseType, newValue: number): void;
39
+ static negateExponents(type: CSSNumericValueType): CSSNumericValueType;
40
+ matchesBaseType(baseType: BaseType): boolean;
41
+ matchesPercentage(): boolean;
42
+ matchesBaseTypePercentage(baseType: BaseType): boolean;
43
+ matchesNumber(): boolean;
44
+ matchesNumberPercentage(): boolean;
45
+ static add(type1: CSSNumericValueType, type2: CSSNumericValueType, error: boolean): CSSNumericValueType;
46
+ static multiply(type1: CSSNumericValueType, type2: CSSNumericValueType, error: boolean): CSSNumericValueType;
47
+ }
17
48
  /**
18
49
  * CSSNumericValue is the base class for numeric and length typed CSS Values.
19
50
  * @see https://drafts.css-houdini.org/css-typed-om/#numeric-objects
@@ -72,4 +103,110 @@ export declare abstract class CSSNumericValue extends CSSStyleValue {
72
103
  negate(): CSSNumericValue;
73
104
  invert(): CSSNumericValue;
74
105
  }
106
+ /**
107
+ * Represents numeric values that can be expressed as a single number plus a
108
+ * unit (or a naked number or percentage).
109
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
110
+ */
111
+ export declare class CSSUnitValue extends CSSNumericValue {
112
+ static toCanonicalUnit(unit: UnitType): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
113
+ static toCanonicalUnitIfPossible(unit: UnitType): UnitType;
114
+ static formatInfinityOrNaN(number: number, suffix?: string): string;
115
+ static formatNumber(number: number, suffix?: string): string;
116
+ unit: UnitType;
117
+ value: number;
118
+ constructor(value: number, unitOrName?: UnitType | string);
119
+ clone(): CSSUnitValue;
120
+ convertTo(target_unit: UnitType): CSSUnitValue;
121
+ equals(other: CSSNumericValue): boolean;
122
+ getType(): CSSStyleValueType;
123
+ sumValue(): CSSNumericSumValue;
124
+ negate(): CSSUnitValue;
125
+ invert(): CSSUnitValue | CSSMathInvert;
126
+ buildCSSText(n: Nested, p: ParenLess, result: string): string;
127
+ }
128
+ /**
129
+ * The CSSMathValue interface of the CSS_Object_Model a base class for classes representing complex numeric values.
130
+ *
131
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
132
+ * @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
133
+ */
134
+ export declare abstract class CSSMathValue extends CSSNumericValue {
135
+ abstract operator: string;
136
+ isUnitValue(): boolean;
137
+ }
138
+ export declare class CSSMathInvert extends CSSMathValue {
139
+ private value;
140
+ static create(value: CSSNumericValue): CSSMathInvert;
141
+ constructor(value: CSSNumericValue, type: CSSNumericValueType);
142
+ operator: string;
143
+ clone(): CSSMathInvert;
144
+ getType(): CSSStyleValueType;
145
+ equals(other: CSSNumericValue): any;
146
+ sumValue(): CSSNumericSumValue;
147
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
148
+ }
149
+ export declare class CSSMathNegate extends CSSMathValue {
150
+ value: CSSNumericValue;
151
+ static create(value: CSSNumericValue): CSSMathNegate;
152
+ constructor(value: CSSNumericValue, type: CSSNumericValueType);
153
+ operator: string;
154
+ clone(): CSSMathNegate;
155
+ getType(): CSSStyleValueType;
156
+ equals(other: CSSNumericValue): any;
157
+ sumValue(): CSSNumericSumValue;
158
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
159
+ }
160
+ export declare function typeCheck(values: CSSNumericValue[], op: Function, error: boolean): CSSNumericValueType;
161
+ export declare abstract class CSSMathVariadic extends CSSMathValue {
162
+ values: CSSNumericValue[];
163
+ constructor(values: CSSNumericValue[], type: CSSNumericValueType);
164
+ numericValues(): CSSNumericValue[];
165
+ equals(other: CSSNumericValue): any;
166
+ }
167
+ export declare class CSSMathMin extends CSSMathVariadic {
168
+ static create(values: CSSNumericValue[]): CSSMathMin;
169
+ operator: string;
170
+ clone(): CSSMathMin;
171
+ getType(): CSSStyleValueType;
172
+ sumValue(): CSSNumericSumValue;
173
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
174
+ }
175
+ export declare class CSSMathMax extends CSSMathVariadic {
176
+ static create(values: CSSNumericValue[]): CSSMathMax;
177
+ operator: string;
178
+ clone(): CSSMathMax;
179
+ getType(): CSSStyleValueType;
180
+ sumValue(): CSSNumericSumValue;
181
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
182
+ }
183
+ /**
184
+ * Represents the sum of one or more CSSNumericValues.
185
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
186
+ */
187
+ export declare class CSSMathSum extends CSSMathVariadic {
188
+ static create(values: CSSNumericValue[]): CSSMathSum;
189
+ static numericTypeFromUnitMap(units: UnitMap): CSSNumericValueType;
190
+ static canCreateNumericTypeFromSumValue(sum: CSSNumericSumValue): boolean;
191
+ operator: string;
192
+ clone(): CSSMathSum;
193
+ getType(): CSSStyleValueType;
194
+ sumValue(): CSSNumericSumValue;
195
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
196
+ }
197
+ /**
198
+ * Represents the product of one or more CSSNumericValues.
199
+ * @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
200
+ */
201
+ export declare class CSSMathProduct extends CSSMathVariadic {
202
+ static create(values: CSSNumericValue[]): CSSMathProduct;
203
+ static multiplyUnitMaps(a: UnitMap, b: UnitMap): UnitMap;
204
+ operator: string;
205
+ clone(): CSSMathProduct;
206
+ getType(): CSSStyleValueType;
207
+ sumValue(): CSSNumericSumValue;
208
+ buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
209
+ }
210
+ export declare const Opx: CSSUnitValue;
211
+ export declare const Odeg: CSSUnitValue;
75
212
  export {};