import type { Color } from '@linkurious/ogma'; import { IEdgeStyle, INodeStyle, IStyleAutoRange } from '@linkurious/rest-client'; import { StyleRule } from './styleRule'; import { NodeSizeExtrema } from './nodeAttributes'; import { EdgeWidthExtrema } from './edgeAttributes'; export declare const BASE_GREY = "#7f7f7f"; export declare const PALETTE: string[]; export declare class ItemAttributes { protected colorsCache: Map>; protected _rulesMap: { color?: Array>; icon?: Array>; image?: Array>; shape?: Array>; size?: Array>; width?: Array>; }; constructor(rulesMap: { color?: Array>; icon?: Array>; image?: Array>; shape?: Array>; size?: Array>; width?: Array>; }); /** * Refresh the rules */ refresh(rulesMap: { color?: Array>; icon?: Array>; image?: Array>; shape?: Array>; size?: Array>; width?: Array>; }): void; /** * Return the color for a node when style color is auto */ static autoColor(value: string | undefined, ignoreCase?: boolean): string; /** * Return a number from 0 to number of occurrence in a palette based on a property */ private static getRandomUniqueColorPaletteIndex; /** * Get color of a type */ static getTypeColor(rule: StyleRule, type: string): string | undefined | null; /** * return the corresponding size to the value with a linear function * @param value * @param lower * @param higher * @param extrema */ static getAutomaticRangeStyleLinear(value: number, { max, min }: IStyleAutoRange, lower: EdgeWidthExtrema | NodeSizeExtrema, higher: EdgeWidthExtrema | NodeSizeExtrema): string | undefined; /** * return the corresponding size to the value with a logarithmic function * @param value * @param lower * @param higher * @param extrema */ static getAutomaticRangeStyleLog(value: number, { max, min }: IStyleAutoRange, lower: EdgeWidthExtrema | NodeSizeExtrema, higher: EdgeWidthExtrema | NodeSizeExtrema): string | undefined; isAutoRange(value: string | number | IStyleAutoRange): value is IStyleAutoRange; }