import type { FontWidthMap } from '../../../../core/components/text-ellipsis/chars-font-width-map.js'; import type { LabelOptions } from '../../../types/canvas.js'; type LabelWidthOptions = { nameWidth: number; nameValueWidth: number; multiLineWidth: number; }; export declare const LINE_SPACING = 2; export declare const FONT_SIZE_DIFFERENCE = 1; /** * Returns the labelOption that fits the current node * @internal * @param height - height of the node. * @param width - width of the node. * @param fontSize - font size of the label. * @param padding - padding around the label * @param labelWidth - object containing width for each labelFit scenario, */ export declare const getLabelFit: (height: number, width: number, fontSize: number, padding: number, labelWidth: LabelWidthOptions) => "ellipsis" | "inline" | "fallback" | "name" | "multi"; /** * Returns the center of the node. * @internal * @param height - height of the node. * @param width - width of the node. */ export declare const getRectCenter: (width: number, height: number) => { centerX: number; centerY: number; }; /** * Returns the object containing width for each labelFit scenario, * using the character width map for estimated measurements. * @internal * @param nameWidth - pre-calculated name width. * @param value - current node value. * @param charWidthMap - character width map for width estimation. */ export declare const getLabelWidth: (nameWidth: number, value: string, charWidthMap: FontWidthMap) => { nameWidth: number; nameValueWidth: number; multiLineWidth: number; }; /** * Returns the array containing the label items for a given node. * Depending on the available space labels are shown in 2 lines or in 1 line or with name only. * @internal * @param labelFit - current labelFit scenario * @param name - current node name. * @param value - current node value. */ export declare const getAppliedLabels: (labelFit: LabelOptions, name: string, value: string) => string[] | never[]; /** * Returns the vertical offset of the labels. * @internal * @param labels - array of label for the given node. * @param labelIndex - current index of the labels array item. * @param fontSize - font size value. */ export declare const getOffsetY: (labels: string[], labelIndex: number, fontSize: number) => number; export {};