import { IEdgeStyle, IStyleRule, LkEdgeData, LkNodeData, INodeStyle, IRangeValues, SelectorType } from '@linkurious/rest-client'; export declare enum StyleRuleType { AUTO_RANGE = "autoRange" } export declare class StyleRule implements IStyleRule { type: SelectorType; input: string[] | undefined; index: number; style: T; itemType?: string; value: IRangeValues | number | string | boolean; constructor(model: IStyleRule); static isAutomaticRange(rule: IStyleRule): boolean; /** * Return an int describing specificity of the style. 4 = very specific / 1 = not specific * * @return {number} */ get specificity(): 1 | 2 | 3 | 4; /** * Return true if this style match values */ matchValues(itemType: string | undefined, input: Array | undefined, value: string | undefined): boolean; static inputExists(type: SelectorType, input: Array | undefined): input is Array; /** * Return true if a style can apply to a node */ canApplyTo(data: LkNodeData | LkEdgeData): boolean; /** * Return true or false on rule type 'any' if the current node match the rule */ static checkAny(data: LkNodeData | LkEdgeData, style: INodeStyle | IEdgeStyle): boolean; /** * Return true or false on rule type 'noValue' if the current node match the rule */ static checkNoValue(data: LkNodeData | LkEdgeData, input: Array): boolean; /** * Return true or false on rule type 'NaN' if the current node match the rule */ static checkNan(data: LkNodeData | LkEdgeData, input: Array): boolean; /** * Return true if predicate is true for the node value * * @param value * @param comparator * @return {boolean} */ static checkRange(value: number, comparator: { [key in '<=' | '<' | '>' | '>=']?: number; }): boolean; /** * Return true or false on rule type 'is' if the current node match the rule */ static checkIs(data: LkNodeData | LkEdgeData, input: Array, value: IRangeValues | number | string | boolean): boolean; /** * Check that value of itemType match for the node */ static checkItemType(types: Array, itemType: string | undefined): boolean; /** * Return true if itemType is defined and category exists in an array of categories * * @param {Array | string} types * @param {string} itemType * @return {boolean} */ static matchCategory(types: Array | string, itemType: string | undefined): boolean; /** * Return true if itemType is undefined * * @param {string} itemType * @return {boolean} */ static matchAny(itemType: string | null | undefined): boolean; /** * Return the color for a type */ getTypeColor(type: string): string | undefined | null; }