@antv/g-lite 2.0.10 → 2.0.11-alpha.1
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/css/CSSProperty.d.ts +1 -1
- package/dist/css/StyleValueRegistry.d.ts +2 -2
- package/dist/css/cssom/CSSNumericValue.d.ts +0 -1
- package/dist/css/cssom/CSSStyleValue.d.ts +1 -1
- package/dist/css/interfaces.d.ts +1 -8
- package/dist/css/parser/transform.d.ts +3 -2
- package/dist/display-objects/DisplayObject.d.ts +1 -2
- package/dist/dom/Document.d.ts +1 -1
- package/dist/dom/Element.d.ts +0 -1
- package/dist/dom/EventTarget.d.ts +1 -1
- package/dist/dom/FederatedEvent.d.ts +0 -1
- package/dist/dom/Node.d.ts +0 -1
- package/dist/dom/interfaces.d.ts +6 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +4980 -5082
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3765 -3868
- 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 +0 -1
- package/dist/preset.d.ts +1 -0
- package/dist/services/RenderingService.d.ts +6 -0
- package/dist/services/SceneGraphService.d.ts +11 -9
- package/dist/services/interfaces.d.ts +1 -1
- package/dist/types.d.ts +62 -5
- package/dist/utils/assert.d.ts +1 -3
- package/dist/utils/assign.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/math.d.ts +1 -8
- package/package.json +1 -1
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts +0 -13
|
@@ -2,7 +2,7 @@ import type { DisplayObject } from '../display-objects';
|
|
|
2
2
|
import type { GlobalRuntime } from '../global-runtime';
|
|
3
3
|
import type { BaseStyleProps } from '../types';
|
|
4
4
|
import type { CSSStyleValue } from './cssom';
|
|
5
|
-
import type { PropertyMetadata,
|
|
5
|
+
import type { PropertyMetadata, StyleValueRegistry } from './interfaces';
|
|
6
6
|
export type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
|
|
7
7
|
/**
|
|
8
8
|
* Blink used them in code generation(css_properties.json5)
|
|
@@ -27,7 +27,7 @@ export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
|
|
|
27
27
|
* * calculate used value
|
|
28
28
|
* * post process
|
|
29
29
|
*/
|
|
30
|
-
processProperties(object: DisplayObject, attributes: BaseStyleProps,
|
|
30
|
+
processProperties(object: DisplayObject, attributes: BaseStyleProps, skipUpdateAttribute?: boolean, skipParse?: boolean, forceUpdateGeometry?: boolean, usedAttributes?: string[] | undefined, memoize?: boolean): void;
|
|
31
31
|
/**
|
|
32
32
|
* string -> parsed value
|
|
33
33
|
*/
|
|
@@ -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) => "
|
|
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.
|
package/dist/css/interfaces.d.ts
CHANGED
|
@@ -113,13 +113,6 @@ export interface PropertyMetadata {
|
|
|
113
113
|
*/
|
|
114
114
|
syntax?: string;
|
|
115
115
|
}
|
|
116
|
-
export interface PropertyParseOptions {
|
|
117
|
-
skipUpdateAttribute: boolean;
|
|
118
|
-
skipParse: boolean;
|
|
119
|
-
forceUpdateGeometry: boolean;
|
|
120
|
-
usedAttributes: string[];
|
|
121
|
-
memoize: boolean;
|
|
122
|
-
}
|
|
123
116
|
export interface StyleValueRegistry {
|
|
124
117
|
recalc: (displayObject: DisplayObject) => void;
|
|
125
118
|
updateSizeAttenuation: (displayObject: DisplayObject, zoom: number) => void;
|
|
@@ -127,7 +120,7 @@ export interface StyleValueRegistry {
|
|
|
127
120
|
unregisterMetadata: (name: string) => void;
|
|
128
121
|
getPropertySyntax: (syntax: string) => CSSProperty<any, any>;
|
|
129
122
|
addUnresolveProperty: (object: DisplayObject, name: string) => void;
|
|
130
|
-
processProperties: (object: DisplayObject, attributes: BaseStyleProps,
|
|
123
|
+
processProperties: (object: DisplayObject, attributes: BaseStyleProps, skipUpdateAttribute?: boolean, skipParse?: boolean, forceUpdateGeometry?: boolean, usedAttributes?: string[], memoize?: boolean) => void;
|
|
131
124
|
parseProperty: (name: string, value: any, object: DisplayObject, memoized: boolean) => CSSStyleValue;
|
|
132
125
|
computeProperty: (name: string, computed: CSSStyleValue, object: DisplayObject, memoized: boolean) => any;
|
|
133
126
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DisplayObject } from '../../display-objects';
|
|
2
2
|
import { CSSUnitValue } from '../cssom';
|
|
3
|
+
import type { TransformArray } from '../../types';
|
|
3
4
|
export interface ParsedTransform {
|
|
4
5
|
t: string;
|
|
5
6
|
d: CSSUnitValue[];
|
|
@@ -9,8 +10,8 @@ export interface ParsedTransform {
|
|
|
9
10
|
* scale(1) scale(1, 2)
|
|
10
11
|
* scaleX(1)
|
|
11
12
|
*/
|
|
12
|
-
export declare function parseTransform(
|
|
13
|
-
export declare function parseTransformUnmemoize(
|
|
13
|
+
export declare function parseTransform(transform: string | TransformArray): ParsedTransform[];
|
|
14
|
+
export declare function parseTransformUnmemoize(transform: string | TransformArray): ParsedTransform[];
|
|
14
15
|
export declare function convertItemToMatrix(item: ParsedTransform): number[];
|
|
15
16
|
export declare const composeMatrix: (translate: any, scale: any, skew: any, quat: any, perspective: any) => number[];
|
|
16
17
|
export declare function mergeTransforms(left: ParsedTransform[], right: ParsedTransform[], target: DisplayObject | null): [number[][], number[][], (d: number[][]) => string];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { mat3, vec2 } from 'gl-matrix';
|
|
2
2
|
import { mat4, quat, vec3 } from 'gl-matrix';
|
|
3
|
-
import type { PropertyParseOptions } from '../css';
|
|
4
3
|
import type { DisplayObjectConfig, IAnimation, IChildNode } from '../dom';
|
|
5
4
|
import { Element } from '../dom/Element';
|
|
6
5
|
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
@@ -50,7 +49,7 @@ export declare class DisplayObject<StyleProps extends BaseStyleProps = any, Pars
|
|
|
50
49
|
/**
|
|
51
50
|
* called when attributes get changed or initialized
|
|
52
51
|
*/
|
|
53
|
-
internalSetAttribute<Key extends keyof StyleProps>(name: Key, value: StyleProps[Key],
|
|
52
|
+
internalSetAttribute<Key extends keyof StyleProps>(name: Key, value: StyleProps[Key], skipUpdateAttribute?: boolean, skipParse?: boolean, forceUpdateGeometry?: boolean, usedAttributes?: string[], memoize?: boolean): void;
|
|
54
53
|
/**
|
|
55
54
|
* returns different values than getBoundingClientRect(), as the latter returns value relative to the viewport
|
|
56
55
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox
|
package/dist/dom/Document.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Group } from '../display-objects';
|
|
2
1
|
import type { DisplayObject } from '../display-objects';
|
|
2
|
+
import { Group } from '../display-objects';
|
|
3
3
|
import type { BaseStyleProps } from '../types';
|
|
4
4
|
import type { DisplayObjectConfig, IAnimationTimeline, ICanvas, IDocument, IElement, INode } from './interfaces';
|
|
5
5
|
import { Node } from './Node';
|
package/dist/dom/Element.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ 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();
|
|
15
14
|
/**
|
|
16
15
|
* Unique id.
|
|
17
16
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { EventService } from '../services';
|
|
2
2
|
import { Point } from '../shapes/Point';
|
|
3
3
|
import type { IEventTarget } from './interfaces';
|
|
4
|
-
export declare function isFederatedEvent(value: any): value is FederatedEvent;
|
|
5
4
|
/**
|
|
6
5
|
* An DOM-compatible synthetic event implementation that is "forwarded" on behalf of an original
|
|
7
6
|
* FederatedEvent or native Event.
|
package/dist/dom/Node.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ 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();
|
|
34
33
|
shadow: boolean;
|
|
35
34
|
/**
|
|
36
35
|
* points to canvas.document
|
package/dist/dom/interfaces.d.ts
CHANGED
|
@@ -44,8 +44,12 @@ export declare enum ElementEvent {
|
|
|
44
44
|
CULLED = "culled"
|
|
45
45
|
}
|
|
46
46
|
export interface IEventTarget {
|
|
47
|
-
addEventListener
|
|
48
|
-
|
|
47
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
48
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options: AddEventListenerOptions): void;
|
|
49
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture: boolean): void;
|
|
50
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
51
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options: AddEventListenerOptions): void;
|
|
52
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture: boolean): void;
|
|
49
53
|
dispatchEvent: <T extends FederatedEvent>(e: T, skipPropagate?: boolean) => boolean;
|
|
50
54
|
}
|
|
51
55
|
export interface INode extends IEventTarget {
|
package/dist/index.d.ts
CHANGED