Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@antv/g-lite

Package Overview
Dependencies
Maintainers
61
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-lite - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

dist/global-runtime.d.ts

10

dist/AbstractRenderer.d.ts

@@ -1,6 +0,7 @@

import type { Syringe } from 'mana-syringe';
import type { CanvasContext } from './dom';
import type { RenderingPlugin } from './services';
import type { RendererConfig } from './types';
export interface RendererPlugin {
name: string;
container: Syringe.Container;
context: CanvasContext;
init: () => void;

@@ -10,3 +11,6 @@ destroy: () => void;

export declare abstract class AbstractRendererPlugin implements RendererPlugin {
container: Syringe.Container;
context: CanvasContext;
protected plugins: any[];
protected addRenderingPlugin(plugin: RenderingPlugin): void;
protected removeAllRenderingPlugins(): void;
abstract name: string;

@@ -13,0 +17,0 @@ abstract init(): void;

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type EventEmitter from 'eventemitter3';

@@ -9,10 +8,5 @@ import type { mat4, vec2, vec3 } from 'gl-matrix';

/**
* 1 of 1 in each Canvas.
*/
export declare const DefaultCamera: Syringe.DefinedToken;
/**
* Different type of cameras, eg. simple camera used in 2D scene or
* advanced camera which can do actions & switch between landmarks.
*/
export declare const CameraContribution: Syringe.DefinedToken;
export declare enum CameraType {

@@ -19,0 +13,0 @@ /**

@@ -1,14 +0,11 @@

import type RBush from 'rbush';
import type { IRenderer } from './AbstractRenderer';
import type { ICamera } from './camera';
import type { RBushNodeAABB } from './components';
import { DisplayObject } from './display-objects';
import type { IChildNode } from './dom';
import type { CanvasContext, IChildNode } from './dom';
import { Document, EventTarget } from './dom';
import { CustomElementRegistry } from './dom/CustomElementRegistry';
import type { ICanvas } from './dom/interfaces';
import { ContextService, EventService, RenderingContext, RenderingService } from './services';
import { EventService, RenderingService } from './services';
import type { PointLike } from './shapes';
import type { Cursor, InteractivePointerEvent } from './types';
import { CanvasConfig } from './types';
import type { CanvasConfig } from './types';
export declare enum CanvasEvent {

@@ -33,6 +30,2 @@ READY = "ready",

/**
* child container of current canvas, use hierarchy container
*/
container: import("mana-syringe").Syringe.Container;
/**
* window.document

@@ -83,7 +76,2 @@ */

private frameId?;
/**
* cache here since inversify's resolving is very slow
*/
private eventService;
private renderingService;
private inited;

@@ -99,2 +87,3 @@ private readyPromise;

private afterRenderEvent;
context: CanvasContext;
constructor(config: CanvasConfig);

@@ -104,3 +93,2 @@ private initRenderingContext;

getConfig(): Partial<CanvasConfig>;
getContainer(): import("mana-syringe").Syringe.Container;
/**

@@ -114,12 +102,9 @@ * get the root displayObject in scenegraph

*/
getCamera(): ICamera;
getContextService(): ContextService<unknown>;
getCamera(): import("./camera").ICamera;
getContextService(): import("./services").ContextService<unknown>;
getEventService(): EventService;
getRenderingService(): RenderingService;
getRenderingContext(): RenderingContext;
getRBushRoot(): RBush<RBushNodeAABB>;
getRenderingContext(): import("./services").RenderingContext;
getStats(): {
total: number; /**
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
*/
total: number;
rendered: number;

@@ -143,3 +128,2 @@ };

private initRenderer;
private loadCommonContainerModule;
private loadRendererContainerModule;

@@ -146,0 +130,0 @@ setRenderer(renderer: IRenderer): Promise<void>;

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
export interface RBushNodeAABB {

@@ -12,3 +11,2 @@ id: number;

}
export declare const RBushRoot: Syringe.DefinedToken;
//# sourceMappingURL=RBushNode.d.ts.map

@@ -206,4 +206,5 @@ import type { CSSNumericSumValue, UnitMap } from './CSSNumericSumValue';

export declare const Opx: CSSUnitValue;
export declare const Lpx: CSSUnitValue;
export declare const Odeg: CSSUnitValue;
export {};
//# sourceMappingURL=CSSNumericValue.d.ts.map

@@ -1,6 +0,4 @@

import { Syringe } from 'mana-syringe';
import type { DisplayObject } from '../display-objects';
import type { IElement } from '../dom';
import type { StyleValueRegistry } from './interfaces';
export declare const CSSPropertySyntaxFactory: Syringe.DefinedToken;
export declare type CSSPropertySyntaxFactory = <P, U>(syntax: string) => CSSProperty<P, U>;

@@ -11,3 +9,2 @@ export declare type Interpolatable = number | boolean | number[] | boolean[];

declare type CSSPropertyCalculator<Parsed, Used> = (name: string, oldParsed: Parsed, parsed: Parsed, object: IElement, registry: StyleValueRegistry) => Used;
export declare const CSSProperty: Syringe.DefinedToken;
/**

@@ -14,0 +11,0 @@ * 1. parser: raw CSS string -> Computed Value

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type { BaseStyleProps } from '..';

@@ -63,6 +62,4 @@ import type { DisplayObject } from '../display-objects';

Z_INDEX = "<z-index>",
OFFSET_PATH = "<offset-path>",
OFFSET_DISTANCE = "<offset-distance>",
CLIP_PATH = "<clip-path>",
TEXT_PATH = "<text-path>",
DEFINED_PATH = "<defined-path>",
MARKER = "<marker>",

@@ -126,3 +123,2 @@ TRANSFORM = "<transform>",

}
export declare const StyleValueRegistry: Syringe.DefinedToken;
export interface StyleValueRegistry {

@@ -138,4 +134,4 @@ recalc: (displayObject: DisplayObject) => void;

}
export declare const LayoutRegistry: Syringe.DefinedToken;
export interface LayoutRegistry {
registerLayout: (name: string, ctor: any) => void;
hasLayout: (name: string) => boolean;

@@ -142,0 +138,0 @@ getLayout: (name: string) => any;

import type { DisplayObject } from '../../display-objects';
import type { CSSUnitValue } from '../cssom';
import { CSSUnitValue } from '../cssom';
export interface ParsedTransform {

@@ -4,0 +4,0 @@ t: string;

import type { DisplayObject } from '../../display-objects';
import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { mergeNumbers } from '../parser';

@@ -5,0 +5,0 @@ export declare class CSSPropertyAngle implements Partial<CSSProperty<CSSUnitValue, number>> {

import type { DisplayObject } from '../../display-objects';
import { SceneGraphService } from '../../services';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
/**
* @see /zh/docs/api/basic/display-object#clippath
* @example
const image = new Image({
style: {
width: 200,
height: 200,
clipPath: new Circle({
style: {
x: 100, // 处于被裁剪图形局部坐标系下
y: 100,
r: 50,
},
}),
}
});
* clipPath / textPath / offsetPath
*/
export declare class CSSPropertyClipPath implements Partial<CSSProperty<DisplayObject, DisplayObject>> {
private sceneGraphService;
constructor(sceneGraphService: SceneGraphService);
calculator(name: string, oldClipPath: DisplayObject, newClipPath: DisplayObject, object: DisplayObject): DisplayObject<any, any>;
calculator(name: string, oldPath: DisplayObject, newPath: DisplayObject, object: DisplayObject): DisplayObject<any, any>;
}
//# sourceMappingURL=CSSPropertyClipPath.d.ts.map
import type { DisplayObject } from '../../display-objects';
import type { CSSGradientValue, CSSRGB } from '../cssom';
import { CSSKeywordValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import type { Pattern } from '../parser/color';

@@ -6,0 +6,0 @@ import { mergeColors } from '../parser/color';

@@ -1,2 +0,2 @@

import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import type { ParsedFilterStyleProperty } from '../parser';

@@ -3,0 +3,0 @@ import { parseFilter } from '../parser/filter';

import type { DisplayObject } from '../../display-objects';
import { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import type { StyleValueRegistry } from '../interfaces';

@@ -5,0 +5,0 @@ import { mergeNumbers } from '../parser';

import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { mergeNumberLists } from '../parser';

@@ -4,0 +4,0 @@ /**

import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { mergeNumberLists } from '../parser';

@@ -4,0 +4,0 @@ /**

import type { DisplayObject } from '../../display-objects';
import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';

@@ -5,0 +5,0 @@ /**

import type { DisplayObject } from '../../display-objects';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
export declare class CSSPropertyMarker implements Partial<CSSProperty<DisplayObject, DisplayObject>> {

@@ -4,0 +4,0 @@ calculator(name: string, oldMarker: DisplayObject, newMarker: DisplayObject, object: DisplayObject): DisplayObject<any, any>;

import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { mergeNumbers } from '../parser/numeric';

@@ -4,0 +4,0 @@ export declare class CSSPropertyNumber implements Partial<CSSProperty<CSSUnitValue, number>> {

import type { DisplayObject } from '../../display-objects';
import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
export declare class CSSPropertyOffsetDistance implements Partial<CSSProperty<CSSUnitValue, number>> {

@@ -5,0 +5,0 @@ parser: {

import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
/**

@@ -4,0 +4,0 @@ * opacity

import type { AbsoluteArray, CurveArray } from '@antv/util';
import type { DisplayObject, ParsedPathStyleProps } from '../../display-objects';
import { Rectangle } from '../../shapes';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { mergePaths, parsePath } from '../parser/path';

@@ -6,0 +6,0 @@ export declare class CSSPropertyPath implements Partial<CSSProperty<ParsedPathStyleProps['path'], ParsedPathStyleProps['path']>> {

import type { DisplayObject } from '../../display-objects';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import { parsePoints } from '../parser/points';

@@ -4,0 +4,0 @@ export declare class CSSPropertyPoints implements Partial<CSSProperty<{

import type { DisplayObject } from '../../display-objects';
import { CSSKeywordValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
export declare class CSSPropertyText implements Partial<CSSProperty<CSSKeywordValue | string, string>> {

@@ -5,0 +5,0 @@ calculator(name: string, oldParsed: CSSKeywordValue | string, parsed: CSSKeywordValue | string, object: DisplayObject): string;

import type { TextTransform } from '../..';
import type { DisplayObject } from '../../display-objects';
import type { CSSKeywordValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
/**

@@ -6,0 +6,0 @@ * it must transform after text get parsed

import type { DisplayObject } from '../../display-objects';
import { CSSKeywordValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
import type { ParsedTransform } from '../parser/transform';

@@ -5,0 +5,0 @@ import { mergeTransforms, parseTransform } from '../parser/transform';

import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
/**

@@ -4,0 +4,0 @@ * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/transform-origin

import type { DisplayObject } from '../../display-objects';
import type { CSSUnitValue } from '../cssom';
import { CSSProperty } from '../CSSProperty';
import type { CSSProperty } from '../CSSProperty';
export declare class CSSPropertyZIndex implements Partial<CSSProperty<CSSUnitValue, number>> {

@@ -5,0 +5,0 @@ parser: {

@@ -12,3 +12,2 @@ export * from './CSSPropertyAngle';

export * from './CSSPropertyOffsetDistance';
export * from './CSSPropertyOffsetPath';
export * from './CSSPropertyOpacity';

@@ -15,0 +14,0 @@ export * from './CSSPropertyPath';

import type { DisplayObject } from '../display-objects';
import { SceneGraphService } from '../services';
import type { GeometryAABBUpdater } from '../services/aabb/interfaces';
import type { BaseStyleProps } from '../types';
import type { CSSStyleValue } from './cssom';
import { CSSPropertySyntaxFactory } from './CSSProperty';
import type { PropertyMetadata, PropertyParseOptions } from './interfaces';
import { StyleValueRegistry } from './interfaces';
import type { PropertyMetadata, PropertyParseOptions, StyleValueRegistry } from './interfaces';
export declare type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';

@@ -16,12 +12,9 @@ /**

export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
private sceneGraphService;
private propertySyntaxFactory;
private geometryUpdaterFactory;
/**
* need recalc later
*/
constructor(sceneGraphService: SceneGraphService, propertySyntaxFactory: CSSPropertySyntaxFactory, geometryUpdaterFactory: (tagName: string) => GeometryAABBUpdater<any>);
constructor();
registerMetadata(metadata: PropertyMetadata): void;
unregisterMetadata(name: string): void;
getPropertySyntax(syntax: string): import("./CSSProperty").CSSProperty<any, any>;
getPropertySyntax(syntax: string): any;
/**

@@ -28,0 +21,0 @@ * * parse value, eg.

@@ -35,4 +35,2 @@ import type { mat3, vec2 } from 'gl-matrix';

private activeAnimations;
private displayObjectPool;
private styleValueRegistry;
constructor(config: DisplayObjectConfig<StyleProps>);

@@ -39,0 +37,0 @@ destroy(): void;

import { Group } from '../display-objects';
import type { DisplayObject } from '../display-objects/DisplayObject';
import type { DisplayObject } from '../display-objects';
import type { BaseStyleProps } from '../types';

@@ -4,0 +4,0 @@ import type { DisplayObjectConfig, IAnimationTimeline, ICanvas, IDocument, IElement, INode } from './interfaces';

import type { Cullable, Geometry, RBushNode, Renderable, Sortable, Transform } from '../components';
import { SceneGraphService } from '../services/interfaces';
import type { AABB, Rectangle } from '../shapes';

@@ -16,3 +15,2 @@ import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';

static isElement(target: IEventTarget | INode | IElement): target is IElement;
protected sceneGraphService: SceneGraphService;
/**

@@ -19,0 +17,0 @@ * Unique id.

import type RBush from 'rbush';
import type { GlobalRuntime } from '..';
import type { ICamera } from '../camera';
import type { RBushNodeAABB } from '../components';
import type { DisplayObject } from '../display-objects';
import type { ContextService, EventService, RenderingService } from '../services';
import type { ContextService, EventService, RenderingContext, RenderingPlugin, RenderingService } from '../services';
import type { PointLike } from '../shapes';

@@ -323,3 +324,2 @@ import type { BaseStyleProps, CanvasConfig, InteractivePointerEvent, Shape, TypeEasingFunction } from '../types';

currentTime: number | null;
attach: (document: IDocument) => void;
destroy: () => void;

@@ -338,5 +338,5 @@ play: (target: IElement, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined) => IAnimation;

finished: Promise<this>;
onfinish: ((this: IAnimation, ev: AnimationPlaybackEvent) => any) | null;
oncancel: ((this: IAnimation, ev: AnimationPlaybackEvent) => any) | null;
onframe: ((this: IAnimation, ev: AnimationPlaybackEvent) => any) | null;
onfinish: ((this: this, ev: AnimationPlaybackEvent) => any) | null;
oncancel: ((this: this, ev: AnimationPlaybackEvent) => any) | null;
onframe: ((this: this, ev: AnimationPlaybackEvent) => any) | null;
currentTime: number;

@@ -400,2 +400,16 @@ startTime: number;

}
export interface CanvasContext {
config: Partial<CanvasConfig>;
camera: ICamera;
/**
* ContextServiceContribution
*/
ContextService: new (context: GlobalRuntime & CanvasContext) => ContextService<unknown>;
contextService: ContextService<unknown>;
renderingService: RenderingService;
eventService: EventService;
rBushRoot: RBush<RBushNodeAABB>;
renderingContext: RenderingContext;
renderingPlugins: RenderingPlugin[];
}
export interface ICanvas extends IEventTarget {

@@ -414,2 +428,3 @@ document: IDocument;

resize: (width: number, height: number) => void;
context: CanvasContext;
getConfig: () => Partial<CanvasConfig>;

@@ -420,3 +435,2 @@ getCamera: () => ICamera;

getEventService: () => EventService;
getRBushRoot: () => RBush<RBushNodeAABB>;
client2Viewport: (client: PointLike) => PointLike;

@@ -423,0 +437,0 @@ viewport2Client: (viewport: PointLike) => PointLike;

@@ -1,5 +0,3 @@

import 'reflect-metadata';
import RBush from 'rbush';
import { StyleValueRegistry } from './css';
export { GlobalContainer, inject, injectable, Module, singleton, Syringe } from 'mana-syringe';
export * from './global-runtime';
export * from './AbstractRenderer';

@@ -17,3 +15,2 @@ export * from './camera';

export { RBush };
export declare const styleValueRegistry: StyleValueRegistry;
//# sourceMappingURL=index.d.ts.map

@@ -1,9 +0,6 @@

import type { Contribution } from 'mana-syringe';
import { Syringe } from 'mana-syringe';
import type { ICamera } from '../camera';
import type { DisplayObject } from '../display-objects/DisplayObject';
import { RenderingContext } from '../services';
import type { RenderingPlugin, RenderingService } from '../services/RenderingService';
export declare const CullingStrategyContribution: Syringe.DefinedToken;
import type { RenderingPlugin, RenderingPluginContext } from '../services/RenderingService';
export interface CullingStrategyContribution {
isVisible: (object: DisplayObject) => boolean;
isVisible: (camera: ICamera, object: DisplayObject) => boolean;
}

@@ -16,8 +13,7 @@ /**

export declare class CullingPlugin implements RenderingPlugin {
private strategyProvider;
private renderingContext;
private strategies;
static tag: string;
constructor(strategyProvider: Contribution.Provider<CullingStrategyContribution>, renderingContext: RenderingContext);
apply(renderingService: RenderingService): void;
constructor(strategies: CullingStrategyContribution[]);
apply(context: RenderingPluginContext): void;
}
//# sourceMappingURL=CullingPlugin.d.ts.map

@@ -1,2 +0,2 @@

import type { RenderingPlugin, RenderingService } from '../services/RenderingService';
import type { RenderingPlugin, RenderingPluginContext } from '../services/RenderingService';
/**

@@ -7,4 +7,4 @@ * Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began

static tag: string;
apply(renderingService: RenderingService): void;
apply(context: RenderingPluginContext): void;
}
//# sourceMappingURL=DirtyCheckPlugin.d.ts.map

@@ -1,4 +0,2 @@

import type { RenderingPlugin } from '../services';
import { ContextService, EventService, RenderingContext, RenderingService } from '../services';
import { CanvasConfig } from '../types';
import type { RenderingPlugin, RenderingPluginContext } from '../services';
/**

@@ -11,13 +9,8 @@ * support mouse & touch events

export declare class EventPlugin implements RenderingPlugin {
private canvasConfig;
private contextService;
private renderingService;
private renderingContext;
private eventService;
static tag: string;
constructor(canvasConfig: CanvasConfig, contextService: ContextService<unknown>, renderingService: RenderingService, renderingContext: RenderingContext, eventService: EventService);
private autoPreventDefault;
private rootPointerEvent;
private rootWheelEvent;
apply(renderingService: RenderingService): void;
private context;
apply(context: RenderingPluginContext): void;
private onPointerMove;

@@ -24,0 +17,0 @@ private getViewportXY;

import type { ICamera } from '../camera';
import type { DisplayObject } from '../display-objects/DisplayObject';
import { CullingStrategyContribution } from './CullingPlugin';
import type { CullingStrategyContribution } from './CullingPlugin';
export declare class FrustumCullingStrategy implements CullingStrategyContribution {
private camera;
constructor(camera: ICamera);
isVisible(object: DisplayObject): boolean;
isVisible(camera: ICamera, object: DisplayObject): boolean;
/**

@@ -9,0 +7,0 @@ *

@@ -1,21 +0,6 @@

import type RBush from 'rbush';
import type { RBushNodeAABB } from '../components';
import { StyleValueRegistry } from '../css';
import type { RenderingPlugin, RenderingService } from '../services';
import { RenderingContext, SceneGraphService } from '../services';
import type { RenderingPlugin, RenderingPluginContext } from '../services';
export declare class PrepareRendererPlugin implements RenderingPlugin {
private renderingContext;
private styleValueRegistry;
private sceneGraphService;
/**
* RBush used in dirty rectangle rendering
*/
static tag: string;
private rBush;
static tag: string;
constructor(renderingContext: RenderingContext, styleValueRegistry: StyleValueRegistry, sceneGraphService: SceneGraphService,
/**
* RBush used in dirty rectangle rendering
*/
rBush: RBush<RBushNodeAABB>);
/**
* sync to RBush later

@@ -25,5 +10,5 @@ */

private pushToSync;
apply(renderingService: RenderingService): void;
apply(context: RenderingPluginContext): void;
private syncRTree;
}
//# sourceMappingURL=PrepareRendererPlugin.d.ts.map
import type { Circle, ParsedCircleStyleProps } from '../../display-objects/Circle';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class CircleUpdater implements GeometryAABBUpdater<ParsedCircleStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedCircleStyleProps, object: Circle): {

import type { Ellipse, ParsedEllipseStyleProps } from '../../display-objects/Ellipse';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class EllipseUpdater implements GeometryAABBUpdater<ParsedEllipseStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedEllipseStyleProps, object: Ellipse): {

@@ -1,6 +0,3 @@

import { Syringe } from 'mana-syringe';
import type { DisplayObject } from '../../display-objects/DisplayObject';
import type { ParsedBaseStyleProps } from '../../types';
export declare const GeometryUpdaterFactory: Syringe.DefinedToken;
export declare const GeometryAABBUpdater: Syringe.DefinedToken;
export interface GeometryAABBUpdater<T extends ParsedBaseStyleProps = any> {

@@ -7,0 +4,0 @@ update: (parsedStyle: T, object: DisplayObject) => {

import type { ParsedLineStyleProps } from '../../display-objects/Line';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class LineUpdater implements GeometryAABBUpdater<ParsedLineStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedLineStyleProps): {

import type { ParsedPathStyleProps } from '../../display-objects';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class PathUpdater implements GeometryAABBUpdater<ParsedPathStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedPathStyleProps): {

import type { ParsedPolylineStyleProps } from '../../display-objects';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class PolylineUpdater implements GeometryAABBUpdater<ParsedPolylineStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedPolylineStyleProps): {

import type { Group, Image, ParsedImageStyleProps, Rect } from '../../display-objects';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
export declare class RectUpdater implements GeometryAABBUpdater<ParsedImageStyleProps> {

@@ -4,0 +4,0 @@ update(parsedStyle: ParsedImageStyleProps, object: Image | Rect | Group): {

import type { DisplayObject, ParsedTextStyleProps } from '../../display-objects';
import { TextService } from '../TextService';
import { GeometryAABBUpdater } from './interfaces';
import type { GeometryAABBUpdater } from './interfaces';
import type { GlobalRuntime } from '../../global-runtime';
export declare class TextUpdater implements GeometryAABBUpdater<ParsedTextStyleProps> {
private textService;
constructor(textService: TextService);
private globalRuntime;
constructor(globalRuntime: GlobalRuntime);
private isReadyToMeasure;

@@ -8,0 +8,0 @@ update(parsedStyle: ParsedTextStyleProps, object: DisplayObject): {

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type { CanvasLike } from '../types';

@@ -18,3 +17,2 @@ export declare type DataURLType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/bmp';

}
export declare const ContextService: Syringe.DefinedToken;
export interface ContextService<Context> {

@@ -21,0 +19,0 @@ init: () => Promise<void>;

@@ -1,2 +0,1 @@

import { DisplayObjectPool } from '../display-objects';
import type { FederatedEvent } from '../dom/FederatedEvent';

@@ -8,5 +7,3 @@ import { FederatedPointerEvent } from '../dom/FederatedPointerEvent';

import type { Cursor, EventPosition } from '../types';
import { CanvasConfig } from '../types';
import { ContextService } from './ContextService';
import { RenderingContext } from './RenderingContext';
import type { CanvasContext, GlobalRuntime } from '..';
declare type Picker = (position: EventPosition) => Promise<IEventTarget | null>;

@@ -23,7 +20,5 @@ export declare type EmitterListeners = Record<string, {

export declare class EventService {
private renderingContext;
private contextService;
private canvasConfig;
private displayObjectPool;
constructor(renderingContext: RenderingContext, contextService: ContextService<any>, canvasConfig: CanvasConfig, displayObjectPool: DisplayObjectPool);
private globalRuntime;
private context;
constructor(globalRuntime: GlobalRuntime, context: CanvasContext);
private rootTarget;

@@ -30,0 +25,0 @@ private emitter;

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type { mat4, quat, vec2, vec3 } from 'gl-matrix';

@@ -6,5 +5,7 @@ import type { Transform } from '../components';

import type { AABB, Rectangle } from '../shapes';
export declare const SceneGraphService: Syringe.DefinedToken;
import type { DisplayObject } from '../display-objects';
export interface SceneGraphService {
triggerPendingEvents: () => void;
updateDisplayObjectDependency: (name: string, oldPath: DisplayObject, newPath: DisplayObject, object: DisplayObject) => void;
informDependentDisplayObjects: (object: DisplayObject) => void;
dirtifyToRoot: (element: INode, affectChildren?: boolean) => void;

@@ -11,0 +12,0 @@ matches: <T extends IElement>(query: string, root: T) => boolean;

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type { DisplayObject, Group } from '../display-objects';

@@ -11,3 +10,2 @@ /**

}
export declare const RenderingContext: Syringe.DefinedToken;
export interface RenderingContext {

@@ -14,0 +12,0 @@ /**

@@ -1,15 +0,12 @@

import type { Contribution } from 'mana-syringe';
import { Syringe } from 'mana-syringe';
import type { GlobalRuntime } from '../global-runtime';
import type { ICamera } from '../camera';
import { StyleValueRegistry } from '../css/interfaces';
import type { DisplayObject } from '../display-objects';
import type { CanvasContext } from '../dom';
import type { EventPosition, InteractivePointerEvent } from '../types';
import { CanvasConfig } from '../types';
import type { CanvasConfig } from '../types';
import { AsyncParallelHook, AsyncSeriesWaterfallHook, SyncHook, SyncWaterfallHook } from '../utils';
import { SceneGraphService } from './interfaces';
import { RenderingContext } from './RenderingContext';
export declare type RenderingPluginContext = CanvasContext & GlobalRuntime;
export interface RenderingPlugin {
apply: (renderer: RenderingService) => void;
apply: (context: RenderingPluginContext) => void;
}
export declare const RenderingPluginContribution: Syringe.DefinedToken;
export interface PickingResult {

@@ -36,9 +33,5 @@ /**

export declare class RenderingService {
private renderingPluginProvider;
private canvasConfig;
private renderingContext;
private sceneGraphService;
private styleValueRegistry;
private camera;
constructor(renderingPluginProvider: Contribution.Provider<RenderingPlugin>, canvasConfig: CanvasConfig, renderingContext: RenderingContext, sceneGraphService: SceneGraphService, styleValueRegistry: StyleValueRegistry, camera: ICamera);
private globalRuntime;
private context;
constructor(globalRuntime: GlobalRuntime, context: CanvasContext);
private inited;

@@ -45,0 +38,0 @@ private stats;

@@ -1,5 +0,2 @@

import { Syringe } from 'mana-syringe';
import type { IElement } from '../dom/interfaces';
export declare const SceneGraphSelectorFactory: Syringe.DefinedToken;
export declare const SceneGraphSelector: Syringe.DefinedToken;
export interface SceneGraphSelector {

@@ -6,0 +3,0 @@ selectOne: <R extends IElement, T extends IElement>(query: string, root: R) => T | null;

import { mat4, quat, vec2, vec3 } from 'gl-matrix';
import type { Transform } from '../components';
import type { DisplayObject } from '../display-objects';
import type { IElement, INode, IParentNode } from '../dom/interfaces';
import { AABB, Rectangle } from '../shapes';
import { SceneGraphService } from './interfaces';
import type { SceneGraphSelector } from './SceneGraphSelector';
import type { SceneGraphService } from './interfaces';
import type { GlobalRuntime } from '../global-runtime';
/**

@@ -13,6 +14,6 @@ * update transform in scene graph

export declare class DefaultSceneGraphService implements SceneGraphService {
private sceneGraphSelectorFactory;
constructor(sceneGraphSelectorFactory: () => SceneGraphSelector);
private runtime;
private pendingEvents;
private boundsChangedEvent;
constructor(runtime: GlobalRuntime);
matches<T extends IElement>(query: string, root: T): boolean;

@@ -93,2 +94,5 @@ querySelector<R extends IElement, T extends IElement>(query: string, root: R): T | null;

dirtifyToRoot(element: INode, affectChildren?: boolean): void;
private displayObjectDependencyMap;
updateDisplayObjectDependency(name: string, oldPath: DisplayObject, newPath: DisplayObject, object: DisplayObject): void;
informDependentDisplayObjects(object: DisplayObject): void;
getPosition(element: INode): vec3;

@@ -95,0 +99,0 @@ getRotation(element: INode): quat;

@@ -1,5 +0,4 @@

import type { CanvasLike } from '..';
import type { CanvasLike, GlobalRuntime } from '..';
import type { ParsedTextStyleProps } from '../display-objects';
import { Rectangle } from '../shapes';
import { OffscreenCanvasCreator } from './OffscreenCanvasCreator';
export interface TextMetrics {

@@ -25,3 +24,4 @@ font: string;

export declare class TextService {
private offscreenCanvas;
private runtime;
constructor(runtime: GlobalRuntime);
/**

@@ -31,3 +31,2 @@ * font metrics cache

private fontMetricsCache;
constructor(offscreenCanvas: OffscreenCanvasCreator);
/**

@@ -34,0 +33,0 @@ * Calculates the ascent, descent and fontSize of a given font-style.

@@ -1,2 +0,1 @@

import { Syringe } from 'mana-syringe';
import type { vec2, vec3 } from 'gl-matrix';

@@ -244,3 +243,2 @@ import type { IEventTarget } from '.';

}
export declare const CanvasConfig: Syringe.DefinedToken;
export interface CanvasConfig {

@@ -310,7 +308,2 @@ /**

/**
* Web Animations API
*/
export declare const AnimationTimelineToken: Syringe.DefinedToken;
export declare const ParseEasingFunction: Syringe.DefinedToken;
/**
* The format to use when defining custom easing functions

@@ -317,0 +310,0 @@ */

{
"name": "@antv/g-lite",
"version": "1.0.10",
"version": "1.0.11",
"description": "A core module for rendering engine implements DOM API.",

@@ -32,3 +32,3 @@ "keywords": [

"dependencies": {
"@antv/g-math": "^1.7.21",
"@antv/g-math": "^1.7.22",
"@antv/util": "^3.2.4",

@@ -39,5 +39,3 @@ "@types/offscreencanvas": "^2019.6.4",

"gl-matrix": "^3.1.0",
"mana-syringe": "^0.3.1",
"rbush": "^3.0.1",
"reflect-metadata": "^0.1.13",
"request-animation-frame-polyfill": "^1.1.2",

@@ -55,3 +53,3 @@ "tslib": "^2.3.1"

},
"gitHead": "f544c40d7f0c7ef712e81bd5311fc70530dc43e7"
"gitHead": "c80e315d8611880f433168adad28dd31f2ad5980"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc