@antv/g-lite 2.0.10-alpha.1 → 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.
@@ -45,6 +45,6 @@ export interface CSSProperty<Parsed, Used> {
45
45
  /**
46
46
  * eg. update local position after x/y/z caculated
47
47
  */
48
- postProcessor: (object: IElement, attributes: string[]) => void;
48
+ postProcessor: (object: IElement) => void;
49
49
  }
50
50
  export {};
@@ -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, PropertyParseOptions, StyleValueRegistry } from './interfaces';
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, options?: Partial<PropertyParseOptions>): void;
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) => "" | "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.
@@ -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, options?: Partial<PropertyParseOptions>) => void;
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,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], parseOptions?: Partial<PropertyParseOptions>): void;
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
@@ -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';
@@ -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
  */
@@ -10,7 +10,7 @@ export declare class EventTarget implements IEventTarget {
10
10
  /**
11
11
  * event emitter
12
12
  */
13
- emitter: EventEmitter<string | symbol, any>;
13
+ emitter?: EventEmitter;
14
14
  /**
15
15
  * @deprecated
16
16
  * @alias addEventListener
@@ -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.
@@ -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
@@ -44,8 +44,12 @@ export declare enum ElementEvent {
44
44
  CULLED = "culled"
45
45
  }
46
46
  export interface IEventTarget {
47
- addEventListener: (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void;
48
- removeEventListener: (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void;
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 {