import { Rectangle } from '@antv/x6-geometry'; import { Dom, Nilable, KeyValue } from '@antv/x6-common'; import { Registry } from '../registry/registry'; import { View } from './view'; import { Cache } from './cache'; import { Markup } from './markup'; import { ToolsView } from './tool'; import { AttrManager } from './attr'; import { FlagManager } from './flag'; import { Attr } from '../registry/attr'; import { Cell } from '../model/cell'; import { Edge } from '../model/edge'; import { Model } from '../model/model'; import { EdgeView } from './edge'; import { NodeView } from './node'; import { Graph } from '../graph'; export declare class CellView extends View { protected static defaults: Partial; static getDefaults(): Partial; static config(options: Partial): void; static getOptions(options: Partial): T; graph: Graph; cell: Entity; protected selectors: Markup.Selectors; protected readonly options: Options; protected readonly flag: FlagManager; protected readonly attr: AttrManager; protected readonly cache: Cache; protected get [Symbol.toStringTag](): string; constructor(cell: Entity, options?: Partial); protected init(): void; protected onRemove(): void; get priority(): number; protected get rootSelector(): string; protected getConstructor(): T; protected ensureOptions(options: Partial): Options; protected getContainerTagName(): string; protected getContainerStyle(): Nilable> | void; protected getContainerAttrs(): Nilable; protected getContainerClassName(): Nilable; protected ensureContainer(): SVGElement | HTMLElement; protected setContainer(container: Element): this; isNodeView(): this is NodeView; isEdgeView(): this is EdgeView; render(): this; confirmUpdate(flag: number, options?: any): number; getBootstrapFlag(): number; getFlag(actions: FlagManager.Actions): number; hasAction(flag: number, actions: FlagManager.Actions): number; removeAction(flag: number, actions: FlagManager.Actions): number; handleAction(flag: number, action: FlagManager.Action, handle: () => void, additionalRemovedActions?: FlagManager.Actions | null): number; protected setup(): void; protected onCellChanged({ options }: Cell.EventArgs['changed']): void; protected onAttrsChange(options: Cell.MutateOptions): void; parseJSONMarkup(markup: Markup.JSONMarkup | Markup.JSONMarkup[], rootElem?: Element): Markup.ParseResult; can(feature: CellView.InteractionNames): boolean; cleanCache(): this; getCache(elem: Element): Cache.Item; getDataOfElement(elem: Element): import("@antv/x6-common").JSONObject; getMatrixOfElement(elem: Element): DOMMatrix; getShapeOfElement(elem: SVGElement): import("@antv/x6-geometry").Path | Rectangle | import("@antv/x6-geometry").Line | import("@antv/x6-geometry").Polyline | import("@antv/x6-geometry").Ellipse; getBoundingRectOfElement(elem: Element): Rectangle; getBBoxOfElement(elem: Element): Rectangle; getUnrotatedBBoxOfElement(elem: SVGElement): Rectangle; getBBox(options?: { useCellGeometry?: boolean; }): Rectangle; getRootTranslatedMatrix(): DOMMatrix; getRootRotatedMatrix(): DOMMatrix; findMagnet(elem?: Element): Element | null; updateAttrs(rootNode: Element, attrs: Attr.CellAttrs, options?: Partial): void; isEdgeElement(magnet?: Element | null): boolean; protected prepareHighlight(elem?: Element | null, options?: CellView.HighlightOptions): Element; highlight(elem?: Element | null, options?: CellView.HighlightOptions): this; unhighlight(elem?: Element | null, options?: CellView.HighlightOptions): this; notifyUnhighlight(magnet: Element, options: CellView.HighlightOptions): void; getEdgeTerminal(magnet: Element, x: number, y: number, edge: Edge, type: Edge.TerminalType): Edge.TerminalCellData; getMagnetFromEdgeTerminal(terminal: Edge.TerminalData): any; protected tools: ToolsView | null; hasTools(name?: string): boolean; addTools(options: ToolsView.Options | null): this; addTools(tools: ToolsView | null): this; updateTools(options?: ToolsView.UpdateOptions): this; removeTools(): this; hideTools(): this; showTools(): this; protected renderTools(): this; notify(name: Key, args: CellView.EventArgs[Key]): this; notify(name: Exclude, args: any): this; protected getEventArgs(e: E): CellView.MouseEventArgs; protected getEventArgs(e: E, x: number, y: number): CellView.MousePositionEventArgs; onClick(e: Dom.ClickEvent, x: number, y: number): void; onDblClick(e: Dom.DoubleClickEvent, x: number, y: number): void; onContextMenu(e: Dom.ContextMenuEvent, x: number, y: number): void; protected cachedModelForMouseEvent: Model | null; onMouseDown(e: Dom.MouseDownEvent, x: number, y: number): void; onMouseUp(e: Dom.MouseUpEvent, x: number, y: number): void; onMouseMove(e: Dom.MouseMoveEvent, x: number, y: number): void; onMouseOver(e: Dom.MouseOverEvent): void; onMouseOut(e: Dom.MouseOutEvent): void; onMouseEnter(e: Dom.MouseEnterEvent): void; onMouseLeave(e: Dom.MouseLeaveEvent): void; onMouseWheel(e: Dom.EventObject, x: number, y: number, delta: number): void; onCustomEvent(e: Dom.MouseDownEvent, name: string, x: number, y: number): void; onMagnetMouseDown(e: Dom.MouseDownEvent, magnet: Element, x: number, y: number): void; onMagnetDblClick(e: Dom.DoubleClickEvent, magnet: Element, x: number, y: number): void; onMagnetContextMenu(e: Dom.ContextMenuEvent, magnet: Element, x: number, y: number): void; onLabelMouseDown(e: Dom.MouseDownEvent, x: number, y: number): void; checkMouseleave(e: Dom.EventObject): void; dispose(): void; } export declare namespace CellView { export interface Options { graph: Graph; priority: number; isSvgElement: boolean; rootSelector: string; bootstrap: FlagManager.Actions; actions: KeyValue; events?: View.Events | null; documentEvents?: View.Events | null; } type Interactable = boolean | ((this: Graph, cellView: CellView) => boolean); interface InteractionMap { edgeMovable?: Interactable; edgeLabelMovable?: Interactable; arrowheadMovable?: Interactable; vertexMovable?: Interactable; vertexAddable?: Interactable; vertexDeletable?: Interactable; useEdgeTools?: Interactable; nodeMovable?: Interactable; magnetConnectable?: Interactable; stopDelegateOnDragging?: Interactable; toolsAddable?: Interactable; } export type InteractionNames = keyof InteractionMap; export type Interacting = boolean | InteractionMap | ((this: Graph, cellView: CellView) => InteractionMap | boolean); export interface HighlightOptions { highlighter?: string | { name: string; args: KeyValue; }; type?: 'embedding' | 'nodeAvailable' | 'magnetAvailable' | 'magnetAdsorbed'; partial?: boolean; } export {}; } export declare namespace CellView { interface PositionEventArgs { x: number; y: number; } interface MouseDeltaEventArgs { delta: number; } interface MouseEventArgs { e: E; view: CellView; cell: Cell; } interface MousePositionEventArgs extends MouseEventArgs, PositionEventArgs { } interface EventArgs extends NodeView.EventArgs, EdgeView.EventArgs { 'cell:click': MousePositionEventArgs; 'cell:dblclick': MousePositionEventArgs; 'cell:contextmenu': MousePositionEventArgs; 'cell:mousedown': MousePositionEventArgs; 'cell:mousemove': MousePositionEventArgs; 'cell:mouseup': MousePositionEventArgs; 'cell:mouseover': MouseEventArgs; 'cell:mouseout': MouseEventArgs; 'cell:mouseenter': MouseEventArgs; 'cell:mouseleave': MouseEventArgs; 'cell:mousewheel': MousePositionEventArgs & MouseDeltaEventArgs; 'cell:customevent': MousePositionEventArgs & { name: string; }; 'cell:highlight': { magnet: Element; view: CellView; cell: Cell; options: CellView.HighlightOptions; }; 'cell:unhighlight': EventArgs['cell:highlight']; } } export declare namespace CellView { const Flag: typeof FlagManager; const Attr: typeof AttrManager; } export declare namespace CellView { const toStringTag: string; function isCellView(instance: any): instance is CellView; } export declare namespace CellView { function priority(value: number): (ctor: Definition) => void; function bootstrap(actions: FlagManager.Actions): (ctor: Definition) => void; } export declare namespace CellView { type CellViewClass = typeof CellView; export interface Definition extends CellViewClass { new (cell: Entity, options: Partial): CellView; } export const registry: Registry, never>; export {}; }