@visactor/vgrammar-core
Version:
VGrammar is a visual grammar library
24 lines (23 loc) • 1.4 kB
TypeScript
import { GrammarMarkType } from '../graph/enums';
import type { IGroupMark, IView, IComponent, ComponentSpec, IData, Nil, MarkFunctionType, StateEncodeSpec, BaseSingleEncodeSpec } from '../types';
import { Mark } from './mark';
export declare class Component extends Mark implements IComponent {
markType: GrammarMarkType.component;
readonly componentType: string;
protected spec: ComponentSpec;
protected mode?: '2d' | '3d';
protected _componentDatum: any;
protected _encoders: StateEncodeSpec;
constructor(view: IView, componentType: string, group?: IGroupMark, mode?: '2d' | '3d');
configureComponent(config: any): this;
addGraphicItem(attrs: any, groupKey?: string, newGraphicItem?: any): any;
join(data: IData | string | Nil): this;
encodeState(state: string, channel: string | BaseSingleEncodeSpec, value?: MarkFunctionType<any>): this;
parseRenderContext(): {
large: boolean;
};
protected _prepareRejoin(): void;
protected evaluateJoin(data: any[]): void;
protected _updateComponentEncoders(): void;
protected _getEncoders(): StateEncodeSpec<Partial<Omit<import("@visactor/vrender-core").IGraphicAttribute, "strokeSeg" | "boundsPadding" | "pickMode" | "boundsMode" | "customPickShape" | "pickable" | "childrenPickable" | "visible" | "zIndex" | "layout" | "keepDirIn3d" | "postMatrix" | "anchor" | "anchor3d">>>;
}