@antv/g 5.0.23-alpha.0 → 5.0.23-alpha.2
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.
- package/dist/index.umd.min.js +2 -2
- package/es/css/cssom/CSSKeywordValue.d.ts +1 -1
- package/es/css/cssom/CSSNumericSumValue.d.ts +1 -1
- package/es/css/cssom/CSSNumericValue.d.ts +108 -4
- package/es/css/cssom/CSSNumericValue.js +908 -5
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +1 -1
- package/es/css/cssom/CSSTransformValue.d.ts +1 -1
- package/es/css/cssom/index.d.ts +0 -9
- package/es/css/cssom/index.js +1 -10
- package/lib/css/cssom/CSSKeywordValue.d.ts +1 -1
- package/lib/css/cssom/CSSNumericSumValue.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValue.d.ts +108 -4
- package/lib/css/cssom/CSSNumericValue.js +965 -52
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +59 -59
- package/lib/css/cssom/CSSTransformValue.d.ts +1 -1
- package/lib/css/cssom/index.d.ts +0 -9
- package/lib/css/cssom/index.js +0 -117
- package/package.json +3 -3
- package/es/css/cssom/CSSMathInvert.d.ts +0 -14
- package/es/css/cssom/CSSMathInvert.js +0 -84
- package/es/css/cssom/CSSMathMax.d.ts +0 -17
- package/es/css/cssom/CSSMathMax.js +0 -118
- package/es/css/cssom/CSSMathMin.d.ts +0 -17
- package/es/css/cssom/CSSMathMin.js +0 -119
- package/es/css/cssom/CSSMathNegate.d.ts +0 -14
- package/es/css/cssom/CSSMathNegate.js +0 -80
- package/es/css/cssom/CSSMathProduct.d.ts +0 -16
- package/es/css/cssom/CSSMathProduct.js +0 -109
- package/es/css/cssom/CSSMathSum.d.ts +0 -17
- package/es/css/cssom/CSSMathSum.js +0 -117
- package/es/css/cssom/CSSMathValue.d.ts +0 -11
- package/es/css/cssom/CSSMathValue.js +0 -27
- package/es/css/cssom/CSSMathVariadic.d.ts +0 -9
- package/es/css/cssom/CSSMathVariadic.js +0 -44
- package/es/css/cssom/CSSUnitValue.d.ts +0 -33
- package/es/css/cssom/CSSUnitValue.js +0 -252
- package/lib/css/cssom/CSSMathInvert.d.ts +0 -14
- package/lib/css/cssom/CSSMathInvert.js +0 -94
- package/lib/css/cssom/CSSMathMax.d.ts +0 -17
- package/lib/css/cssom/CSSMathMax.js +0 -128
- package/lib/css/cssom/CSSMathMin.d.ts +0 -17
- package/lib/css/cssom/CSSMathMin.js +0 -128
- package/lib/css/cssom/CSSMathNegate.d.ts +0 -14
- package/lib/css/cssom/CSSMathNegate.js +0 -89
- package/lib/css/cssom/CSSMathProduct.d.ts +0 -16
- package/lib/css/cssom/CSSMathProduct.js +0 -119
- package/lib/css/cssom/CSSMathSum.d.ts +0 -17
- package/lib/css/cssom/CSSMathSum.js +0 -129
- package/lib/css/cssom/CSSMathValue.d.ts +0 -11
- package/lib/css/cssom/CSSMathValue.js +0 -35
- package/lib/css/cssom/CSSMathVariadic.d.ts +0 -9
- package/lib/css/cssom/CSSMathVariadic.js +0 -55
- package/lib/css/cssom/CSSUnitValue.d.ts +0 -33
- package/lib/css/cssom/CSSUnitValue.js +0 -267
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DCHECK_EQ, DCHECK_NE } from '../../utils';
|
|
2
|
-
import { UnitType } from '
|
|
2
|
+
import { UnitType } from './types'; // https://drafts.css-houdini.org/css-typed-om/#enumdef-cssnumericbasetype
|
|
3
3
|
|
|
4
4
|
export var BaseType;
|
|
5
5
|
|
package/es/css/cssom/index.d.ts
CHANGED
|
@@ -10,14 +10,6 @@ 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
15
|
export * from './CSSNumericValueType';
|
|
@@ -26,4 +18,3 @@ export * from './CSSGradientValue';
|
|
|
26
18
|
export * from './CSSStyleValue';
|
|
27
19
|
export * from './CSSTransformValue';
|
|
28
20
|
export * from './CSSTranslate';
|
|
29
|
-
export * from './CSSUnitValue';
|
package/es/css/cssom/index.js
CHANGED
|
@@ -10,14 +10,6 @@ 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
15
|
export * from './CSSNumericValueType';
|
|
@@ -25,5 +17,4 @@ export * from './CSSRGB';
|
|
|
25
17
|
export * from './CSSGradientValue';
|
|
26
18
|
export * from './CSSStyleValue';
|
|
27
19
|
export * from './CSSTransformValue';
|
|
28
|
-
export * from './CSSTranslate';
|
|
29
|
-
export * from './CSSUnitValue';
|
|
20
|
+
export * from './CSSTranslate';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CSSNumericSumValue } from './CSSNumericSumValue';
|
|
2
|
-
import
|
|
3
|
-
import { CSSStyleValue } from './CSSStyleValue';
|
|
4
|
-
import {
|
|
1
|
+
import type { CSSNumericSumValue, UnitMap } from './CSSNumericSumValue';
|
|
2
|
+
import { CSSNumericValueType } from './CSSNumericValueType';
|
|
3
|
+
import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
4
|
+
import { Nested, ParenLess, UnitType } from './types';
|
|
5
5
|
export declare type CSSNumberish = number | CSSNumericValue;
|
|
6
6
|
declare type CSSNumericBaseType = 'length' | 'angle' | 'time' | 'frequency' | 'resolution' | 'flex' | 'percent';
|
|
7
7
|
interface CSSNumericType {
|
|
@@ -72,4 +72,108 @@ export declare abstract class CSSNumericValue extends CSSStyleValue {
|
|
|
72
72
|
negate(): CSSNumericValue;
|
|
73
73
|
invert(): CSSNumericValue;
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Represents numeric values that can be expressed as a single number plus a
|
|
77
|
+
* unit (or a naked number or percentage).
|
|
78
|
+
* @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
|
|
79
|
+
*/
|
|
80
|
+
export declare class CSSUnitValue extends CSSNumericValue {
|
|
81
|
+
static toCanonicalUnit(unit: UnitType): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
|
|
82
|
+
static toCanonicalUnitIfPossible(unit: UnitType): UnitType;
|
|
83
|
+
static formatInfinityOrNaN(number: number, suffix?: string): string;
|
|
84
|
+
static formatNumber(number: number, suffix?: string): string;
|
|
85
|
+
unit: UnitType;
|
|
86
|
+
value: number;
|
|
87
|
+
constructor(value: number, unitOrName?: UnitType | string);
|
|
88
|
+
clone(): CSSUnitValue;
|
|
89
|
+
convertTo(target_unit: UnitType): CSSUnitValue;
|
|
90
|
+
equals(other: CSSNumericValue): boolean;
|
|
91
|
+
getType(): CSSStyleValueType;
|
|
92
|
+
sumValue(): CSSNumericSumValue;
|
|
93
|
+
negate(): CSSUnitValue;
|
|
94
|
+
invert(): CSSUnitValue | CSSMathInvert;
|
|
95
|
+
buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The CSSMathValue interface of the CSS_Object_Model a base class for classes representing complex numeric values.
|
|
99
|
+
*
|
|
100
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
|
|
101
|
+
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
|
|
102
|
+
*/
|
|
103
|
+
export declare abstract class CSSMathValue extends CSSNumericValue {
|
|
104
|
+
abstract operator: string;
|
|
105
|
+
isUnitValue(): boolean;
|
|
106
|
+
}
|
|
107
|
+
export declare class CSSMathInvert extends CSSMathValue {
|
|
108
|
+
private value;
|
|
109
|
+
static create(value: CSSNumericValue): CSSMathInvert;
|
|
110
|
+
constructor(value: CSSNumericValue, type: CSSNumericValueType);
|
|
111
|
+
operator: string;
|
|
112
|
+
clone(): CSSMathInvert;
|
|
113
|
+
getType(): CSSStyleValueType;
|
|
114
|
+
equals(other: CSSNumericValue): any;
|
|
115
|
+
sumValue(): CSSNumericSumValue;
|
|
116
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
117
|
+
}
|
|
118
|
+
export declare class CSSMathNegate extends CSSMathValue {
|
|
119
|
+
value: CSSNumericValue;
|
|
120
|
+
static create(value: CSSNumericValue): CSSMathNegate;
|
|
121
|
+
constructor(value: CSSNumericValue, type: CSSNumericValueType);
|
|
122
|
+
operator: string;
|
|
123
|
+
clone(): CSSMathNegate;
|
|
124
|
+
getType(): CSSStyleValueType;
|
|
125
|
+
equals(other: CSSNumericValue): any;
|
|
126
|
+
sumValue(): CSSNumericSumValue;
|
|
127
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
128
|
+
}
|
|
129
|
+
export declare function typeCheck(values: CSSNumericValue[], op: Function, error: boolean): CSSNumericValueType;
|
|
130
|
+
export declare abstract class CSSMathVariadic extends CSSMathValue {
|
|
131
|
+
values: CSSNumericValue[];
|
|
132
|
+
constructor(values: CSSNumericValue[], type: CSSNumericValueType);
|
|
133
|
+
numericValues(): CSSNumericValue[];
|
|
134
|
+
equals(other: CSSNumericValue): any;
|
|
135
|
+
}
|
|
136
|
+
export declare class CSSMathMin extends CSSMathVariadic {
|
|
137
|
+
static create(values: CSSNumericValue[]): CSSMathMin;
|
|
138
|
+
operator: string;
|
|
139
|
+
clone(): CSSMathMin;
|
|
140
|
+
getType(): CSSStyleValueType;
|
|
141
|
+
sumValue(): CSSNumericSumValue;
|
|
142
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
143
|
+
}
|
|
144
|
+
export declare class CSSMathMax extends CSSMathVariadic {
|
|
145
|
+
static create(values: CSSNumericValue[]): CSSMathMax;
|
|
146
|
+
operator: string;
|
|
147
|
+
clone(): CSSMathMax;
|
|
148
|
+
getType(): CSSStyleValueType;
|
|
149
|
+
sumValue(): CSSNumericSumValue;
|
|
150
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Represents the sum of one or more CSSNumericValues.
|
|
154
|
+
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
155
|
+
*/
|
|
156
|
+
export declare class CSSMathSum extends CSSMathVariadic {
|
|
157
|
+
static create(values: CSSNumericValue[]): CSSMathSum;
|
|
158
|
+
static numericTypeFromUnitMap(units: UnitMap): CSSNumericValueType;
|
|
159
|
+
static canCreateNumericTypeFromSumValue(sum: CSSNumericSumValue): boolean;
|
|
160
|
+
operator: string;
|
|
161
|
+
clone(): CSSMathSum;
|
|
162
|
+
getType(): CSSStyleValueType;
|
|
163
|
+
sumValue(): CSSNumericSumValue;
|
|
164
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Represents the product of one or more CSSNumericValues.
|
|
168
|
+
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
|
|
169
|
+
*/
|
|
170
|
+
export declare class CSSMathProduct extends CSSMathVariadic {
|
|
171
|
+
static create(values: CSSNumericValue[]): CSSMathProduct;
|
|
172
|
+
static multiplyUnitMaps(a: UnitMap, b: UnitMap): UnitMap;
|
|
173
|
+
operator: string;
|
|
174
|
+
clone(): CSSMathProduct;
|
|
175
|
+
getType(): CSSStyleValueType;
|
|
176
|
+
sumValue(): CSSNumericSumValue;
|
|
177
|
+
buildCSSText(nested: Nested, paren_less: ParenLess, result: string): string;
|
|
178
|
+
}
|
|
75
179
|
export {};
|