UNPKG

@visactor/vrender-core

Version:

```typescript import { xxx } from '@visactor/vrender-core'; ```

38 lines (37 loc) 1.76 kB
import type { ITheme, IThemeSpec } from './theme'; import type { IGraphicAttribute, IGraphic } from '../graphic'; import type { INode } from '../node-tree'; import type { GraphicAttributeMap } from './creator'; import type { StateDefinitionsInput } from '../../graphic/state/state-definition'; import type { SharedStateScope } from '../../graphic/state/shared-state-scope'; export type IGroupAttribute = { path: IGraphic[]; width: number; height: number; cornerRadius: number | number[]; cornerType: 'round' | 'bevel'; clip: boolean; visibleAll: boolean; display?: 'relative' | 'inner-block' | 'flex'; flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse'; flexWrap?: 'nowrap' | 'wrap'; justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'; alignItems?: 'flex-start' | 'flex-end' | 'center'; alignContent?: 'flex-start' | 'center' | 'space-between' | 'space-around'; baseOpacity?: number; drawMode?: 0 | 1 | 2; }; export type IGroupGraphicAttribute = Partial<IGraphicAttribute> & Partial<IGroupAttribute>; export interface IGroup extends IGraphic<IGroupGraphicAttribute> { childrenPickable?: boolean; theme?: ITheme; sharedStateDefinitions?: StateDefinitionsInput<Record<string, any>>; sharedStateScope?: SharedStateScope<Record<string, any>>; createTheme: () => void; hideAll: () => void; showAll: () => void; setTheme: (t: IThemeSpec) => void; incrementalAppendChild: (node: INode, highPerformance?: boolean) => INode | null; incrementalClearChild: () => void; createOrUpdateChild: <T extends keyof GraphicAttributeMap>(graphicName: string, attributes: GraphicAttributeMap[T], graphicType: T) => INode; }