@antv/g-lite 1.3.0-next.2 → 1.3.0-next.20
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/components/Geometry.d.ts +4 -0
- package/dist/css/StyleValueRegistry.d.ts +1 -1
- package/dist/css/cssom/CSSStyleValue.d.ts +1 -1
- package/dist/css/parser/dimension.d.ts +1 -1
- package/dist/css/parser/path.d.ts +2 -2
- package/dist/css/parser/points.d.ts +1 -1
- package/dist/css/properties/CSSPropertyPath.d.ts +2 -2
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +3 -1
- package/dist/display-objects/Circle.d.ts +1 -1
- package/dist/display-objects/DisplayObject.d.ts +0 -10
- package/dist/display-objects/Ellipse.d.ts +1 -1
- package/dist/display-objects/Group.d.ts +1 -1
- package/dist/display-objects/Image.d.ts +1 -3
- package/dist/display-objects/Path.d.ts +1 -12
- package/dist/display-objects/Rect.d.ts +1 -1
- package/dist/dom/Element.d.ts +1 -0
- package/dist/dom/Node.d.ts +1 -0
- package/dist/dom/interfaces.d.ts +1 -1
- package/dist/global-runtime.d.ts +6 -0
- package/dist/index.esm.js +613 -539
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +612 -537
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/plugins/PrepareRendererPlugin.d.ts +3 -0
- package/dist/services/SceneGraphService.d.ts +12 -12
- package/dist/services/aabb/GroupUpdater.d.ts +10 -0
- package/dist/services/aabb/index.d.ts +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/utils/path.d.ts +2 -1
- package/package.json +3 -3
|
@@ -49,6 +49,6 @@ export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
|
|
|
49
49
|
* update geometry when relative props changed,
|
|
50
50
|
* eg. r of Circle, width/height of Rect
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
updateGeometry(object: DisplayObject): void;
|
|
53
53
|
private isPropertyInheritable;
|
|
54
54
|
}
|
|
@@ -24,7 +24,7 @@ export declare const canonicalUnitTypeForCategory: (category: UnitCategory) => U
|
|
|
24
24
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/css_primitive_value.cc#353
|
|
25
25
|
*/
|
|
26
26
|
export declare const conversionToCanonicalUnitsScaleFactor: (unit_type: UnitType) => number;
|
|
27
|
-
export declare const unitTypeToString: (type: UnitType) => "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "
|
|
27
|
+
export declare const unitTypeToString: (type: UnitType) => "" | "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "%";
|
|
28
28
|
/**
|
|
29
29
|
* CSSStyleValue is the base class for all CSS values accessible from Typed OM.
|
|
30
30
|
* Values that are not yet supported as specific types are also returned as base CSSStyleValues.
|
|
@@ -51,4 +51,4 @@ export declare function convertAngleUnit(value: CSSUnitValue): number;
|
|
|
51
51
|
export declare function parseDimensionArrayFormat(string: string | number | (string | number)[], size: number): number[];
|
|
52
52
|
export declare function parseDimensionArray(string: string | (string | number)[]): CSSUnitValue[];
|
|
53
53
|
export declare function parseDimensionArrayUnmemoize(string: string | (string | number)[]): CSSUnitValue[];
|
|
54
|
-
export declare function convertPercentUnit(valueWithUnit: CSSUnitValue, vec3Index: number, target: DisplayObject): number;
|
|
54
|
+
export declare function convertPercentUnit(valueWithUnit: CSSUnitValue, vec3Index: number, target: DisplayObject, useMin?: boolean): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CurveArray, PathArray } from '@antv/util';
|
|
2
2
|
import type { ParsedPathStyleProps } from '../../display-objects';
|
|
3
3
|
import type { IElement } from '../../dom';
|
|
4
|
-
export declare function parsePath(path: string | PathArray): ParsedPathStyleProps['
|
|
5
|
-
export declare function mergePaths(left: ParsedPathStyleProps['
|
|
4
|
+
export declare function parsePath(path: string | PathArray): ParsedPathStyleProps['d'];
|
|
5
|
+
export declare function mergePaths(left: ParsedPathStyleProps['d'], right: ParsedPathStyleProps['d'], object?: IElement): [CurveArray, CurveArray, (b: CurveArray) => CurveArray];
|
|
@@ -8,7 +8,7 @@ import type { DisplayObject } from '../..';
|
|
|
8
8
|
export declare function parsePoints(pointsOrStr: string | [number, number][], object?: DisplayObject): {
|
|
9
9
|
points: [number, number][];
|
|
10
10
|
totalLength: number;
|
|
11
|
-
segments: [
|
|
11
|
+
segments: any[];
|
|
12
12
|
};
|
|
13
13
|
export declare function mergePoints(left: any, right: any): [
|
|
14
14
|
[
|
|
@@ -3,13 +3,13 @@ import type { ParsedPathStyleProps } from '../../display-objects';
|
|
|
3
3
|
import { Rectangle } from '../../shapes';
|
|
4
4
|
import type { CSSProperty } from '../CSSProperty';
|
|
5
5
|
import { mergePaths, parsePath } from '../parser/path';
|
|
6
|
-
export declare class CSSPropertyPath implements Partial<CSSProperty<ParsedPathStyleProps['
|
|
6
|
+
export declare class CSSPropertyPath implements Partial<CSSProperty<ParsedPathStyleProps['d'], ParsedPathStyleProps['d']>> {
|
|
7
7
|
/**
|
|
8
8
|
* path2Curve
|
|
9
9
|
*/
|
|
10
10
|
parser: typeof parsePath;
|
|
11
11
|
parserWithCSSDisabled: typeof parsePath;
|
|
12
|
-
calculator(name: string, oldParsed: ParsedPathStyleProps['
|
|
12
|
+
calculator(name: string, oldParsed: ParsedPathStyleProps['d'], parsed: ParsedPathStyleProps['d']): {
|
|
13
13
|
absolutePath: AbsoluteArray;
|
|
14
14
|
hasArc: boolean;
|
|
15
15
|
segments: import("../../display-objects").PathSegment[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DisplayObject } from '../../display-objects';
|
|
2
|
+
import { type CSSUnitValue } from '../cssom';
|
|
2
3
|
import type { CSSProperty } from '../CSSProperty';
|
|
3
4
|
/**
|
|
4
5
|
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin
|
|
@@ -11,4 +12,5 @@ export declare class CSSPropertyTransformOrigin implements Partial<CSSProperty<[
|
|
|
11
12
|
cache: Map<any, any>;
|
|
12
13
|
};
|
|
13
14
|
parserUnmemoize: (value: string | number[]) => [CSSUnitValue, CSSUnitValue];
|
|
15
|
+
postProcessor(object: DisplayObject): void;
|
|
14
16
|
}
|
|
@@ -36,5 +36,5 @@ export interface ParsedCircleStyleProps extends ParsedBaseStyleProps {
|
|
|
36
36
|
isSizeAttenuation?: boolean;
|
|
37
37
|
}
|
|
38
38
|
export declare class Circle extends DisplayObject<CircleStyleProps, ParsedCircleStyleProps> {
|
|
39
|
-
constructor(
|
|
39
|
+
constructor(options?: DisplayObjectConfig<CircleStyleProps>);
|
|
40
40
|
}
|
|
@@ -237,16 +237,6 @@ export declare class DisplayObject<StyleProps extends BaseStyleProps = any, Pars
|
|
|
237
237
|
* @deprecated
|
|
238
238
|
*/
|
|
239
239
|
add<T extends IChildNode>(child: T, index?: number): T;
|
|
240
|
-
/**
|
|
241
|
-
* Use `this.style.clipPath` instead.
|
|
242
|
-
* @deprecated
|
|
243
|
-
*/
|
|
244
|
-
setClip(clipPath: DisplayObject | null): void;
|
|
245
|
-
/**
|
|
246
|
-
* Use `this.style.clipPath` instead.
|
|
247
|
-
* @deprecated
|
|
248
|
-
*/
|
|
249
|
-
getClip: () => any;
|
|
250
240
|
/**
|
|
251
241
|
* @deprecated
|
|
252
242
|
*/
|
|
@@ -18,5 +18,5 @@ export interface ParsedEllipseStyleProps extends ParsedBaseStyleProps {
|
|
|
18
18
|
isBillboard?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare class Ellipse extends DisplayObject<EllipseStyleProps, ParsedEllipseStyleProps> {
|
|
21
|
-
constructor(
|
|
21
|
+
constructor(options?: DisplayObjectConfig<EllipseStyleProps>);
|
|
22
22
|
}
|
|
@@ -21,5 +21,5 @@ export interface ParsedGroupStyleProps extends ParsedBaseStyleProps {
|
|
|
21
21
|
</g>
|
|
22
22
|
*/
|
|
23
23
|
export declare class Group extends DisplayObject {
|
|
24
|
-
constructor(
|
|
24
|
+
constructor(options?: DisplayObjectConfig<GroupStyleProps>);
|
|
25
25
|
}
|
|
@@ -5,7 +5,6 @@ export interface ImageStyleProps extends BaseStyleProps {
|
|
|
5
5
|
x?: number | string;
|
|
6
6
|
y?: number | string;
|
|
7
7
|
z?: number;
|
|
8
|
-
img?: string | HTMLImageElement;
|
|
9
8
|
src?: string | HTMLImageElement;
|
|
10
9
|
width?: number | string;
|
|
11
10
|
height?: number | string;
|
|
@@ -30,7 +29,6 @@ export interface ParsedImageStyleProps extends ParsedBaseStyleProps {
|
|
|
30
29
|
x: number;
|
|
31
30
|
y: number;
|
|
32
31
|
z?: number;
|
|
33
|
-
img?: string | HTMLImageElement;
|
|
34
32
|
src?: string | HTMLImageElement;
|
|
35
33
|
width?: number;
|
|
36
34
|
height?: number;
|
|
@@ -40,5 +38,5 @@ export interface ParsedImageStyleProps extends ParsedBaseStyleProps {
|
|
|
40
38
|
keepAspectRatio?: boolean;
|
|
41
39
|
}
|
|
42
40
|
export declare class Image extends DisplayObject<ImageStyleProps, ParsedImageStyleProps> {
|
|
43
|
-
constructor(
|
|
41
|
+
constructor(options?: DisplayObjectConfig<ImageStyleProps>);
|
|
44
42
|
}
|
|
@@ -5,7 +5,6 @@ import { Rectangle } from '../shapes/Rectangle';
|
|
|
5
5
|
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
6
6
|
import { DisplayObject } from './DisplayObject';
|
|
7
7
|
export interface PathStyleProps extends BaseStyleProps {
|
|
8
|
-
path?: string | PathArray;
|
|
9
8
|
d?: string | PathArray;
|
|
10
9
|
/**
|
|
11
10
|
* marker will be positioned at the first point
|
|
@@ -69,17 +68,7 @@ export interface PathArcParams {
|
|
|
69
68
|
sweepFlag: number;
|
|
70
69
|
}
|
|
71
70
|
export interface ParsedPathStyleProps extends ParsedBaseStyleProps {
|
|
72
|
-
|
|
73
|
-
absolutePath: AbsoluteArray;
|
|
74
|
-
hasArc: boolean;
|
|
75
|
-
segments: PathSegment[];
|
|
76
|
-
polygons: [number, number][][];
|
|
77
|
-
polylines: [number, number][][];
|
|
78
|
-
curve: CurveArray;
|
|
79
|
-
totalLength: number;
|
|
80
|
-
rect: Rectangle;
|
|
81
|
-
};
|
|
82
|
-
d?: {
|
|
71
|
+
d: {
|
|
83
72
|
absolutePath: AbsoluteArray;
|
|
84
73
|
hasArc: boolean;
|
|
85
74
|
segments: PathSegment[];
|
|
@@ -23,5 +23,5 @@ export interface ParsedRectStyleProps extends ParsedBaseStyleProps {
|
|
|
23
23
|
radius?: [number, number, number, number];
|
|
24
24
|
}
|
|
25
25
|
export declare class Rect extends DisplayObject<RectStyleProps, ParsedRectStyleProps> {
|
|
26
|
-
constructor(
|
|
26
|
+
constructor(options?: DisplayObjectConfig<RectStyleProps>);
|
|
27
27
|
}
|
package/dist/dom/Element.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function resetEntityCounter(): void;
|
|
|
11
11
|
* * Animation
|
|
12
12
|
*/
|
|
13
13
|
export declare class Element<StyleProps extends BaseStyleProps = any, ParsedStyleProps extends ParsedBaseStyleProps = any> extends Node implements IElement<StyleProps, ParsedStyleProps> {
|
|
14
|
+
constructor();
|
|
14
15
|
/**
|
|
15
16
|
* Unique id.
|
|
16
17
|
*/
|
package/dist/dom/Node.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare abstract class Node extends EventTarget implements INode {
|
|
|
30
30
|
*/
|
|
31
31
|
static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
32
32
|
static isNode(target: IEventTarget | INode): target is INode;
|
|
33
|
+
constructor();
|
|
33
34
|
shadow: boolean;
|
|
34
35
|
/**
|
|
35
36
|
* points to canvas.document
|
package/dist/dom/interfaces.d.ts
CHANGED
|
@@ -303,7 +303,7 @@ export interface IElement<StyleProps = any, ParsedStyleProps = any> extends INod
|
|
|
303
303
|
/**
|
|
304
304
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute
|
|
305
305
|
*/
|
|
306
|
-
setAttribute: <Key extends keyof StyleProps>(attributeName: Key, value: StyleProps[Key], force?: boolean) => void;
|
|
306
|
+
setAttribute: <Key extends keyof StyleProps>(attributeName: Key, value: StyleProps[Key], force?: boolean, memoize?: boolean) => void;
|
|
307
307
|
/**
|
|
308
308
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute
|
|
309
309
|
*/
|
package/dist/global-runtime.d.ts
CHANGED