import type { TruncationMode } from '@dynatrace/strato-components/typography'; 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" | "name" | "multi" | "fallback"; /** * 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 name width for the given context * @internal * @param name - current node name. * @param ctx - canvas context. */ export declare const getNameWidth: (name: string, ctx: CanvasRenderingContext2D) => number; /** * Returns the object containing width for each labelFit scenario * @internal * @param name - current node name. * @param value - current node value. * @param ctx - canvas context. */ export declare const getLabelWidth: (nameWidth: number, value: string, ctx: CanvasRenderingContext2D) => { 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 declare const applyEllipsis: (ctx: CanvasRenderingContext2D, str: string, maxWidth: number, truncationMode: TruncationMode) => string; export {};