import type { IGraphic } from '@visactor/vrender-core'; import type { IMarkSpec } from '../../typings'; import type { IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICellMarkSpec, ICommonSpec, IComposedTextMarkSpec, IGroupMarkSpec, IImageMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IRectMarkSpec, IRippleMarkSpec, IRuleMarkSpec, ISymbolMarkSpec } from '../../typings/visual'; import type { IMark, IMarkRaw } from './common'; import type { MarkType } from './type'; export interface IComponentMark extends IMarkRaw { getComponent: () => IGraphic; clearComponent: () => void; setAttributeTransform: (t: (attrs: any) => any) => any; } export interface IGlyphMark extends IMarkRaw { setGlyphConfig: (cfg: C) => void; getGlyphConfig: () => C; getSubMarks: () => Record; getPositionChannels: () => string[]; } export interface ILabelMark extends ITextMark { skipEncode: boolean; getRule: () => string; setRule: (rule: string) => void; getTarget: () => IMark; setTarget: (target: IMark) => void; getComponent: () => IComponentMark; setComponent: (component: IComponentMark) => void; } export type ITextMark = IMarkRaw & { getTextType: () => 'text' | 'rich'; }; export type ITextSpec = IMarkSpec & { textType?: 'rich' | 'text'; }; export type IPolygonMark = IMarkRaw; export type IArcMark = IMarkRaw; export type IAreaMark = IMarkRaw; export type IBoxPlotMark = IMarkRaw; export type ICellMark = IMarkRaw; export type IImageMark = IMarkRaw; export type ILineMark = IMarkRaw; export type ILinkPathMark = IMarkRaw; export type IPathMark = IMarkRaw; export type IRectMark = IMarkRaw; export type IRippleMark = IMarkRaw; export type IRuleMark = IMarkRaw; export type ISymbolMark = IMarkRaw; export interface IGroupMark extends IMarkRaw { addMark: (m: IMark) => boolean; removeMark: (m: IMark) => boolean; getMarks: () => IMark[]; getMarkInType: (type: MarkType) => IMark[]; getMarkInId: (id: number) => IMark | undefined; getMarkInName: (name: string) => IMark[] | undefined; } export interface ILinkPathConfig { direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial'; }