import { type HTMLAttributes } from 'react'; import { FontWidthMap } from './chars-font-width-map.js'; import type { DataTestId } from '../../../../core/types/data-props.js'; import type { MaskingProps } from '../../../../core/types/masking-props.js'; import type { StylingProps } from '../../../../core/types/styling-props.js'; import type { TruncationMode } from '../../../../typography/text-ellipsis/TextEllipsis.js'; /** * The props for the TextEllipsis component. * @public */ export interface TextEllipsisProps extends HTMLAttributes, StylingProps, DataTestId, MaskingProps { /** * Pixel width map per character used to compute truncation. * Keys are single characters and values are their widths in CSS pixels. * Important: the widths must match the effective font family, size, and weight * used in the rendered label (e.g., the legend item). If a character is missing, * the implementation typically falls back to the width of 'W'. * * Example shape: * { 'A': 7.12, 'B': 7.04, ' ': 3.00, '.': 2.00, ... } * * @defaultValue charsFontWidth12pixelsSize400Map */ charsFontWidthMap?: FontWidthMap; /** * The mode used for truncating the text, either at the start, in the middle or at the end. * @defaultValue 'end' */ truncationMode?: TruncationMode; } /** * @public * @param props.charsFontWidthMap - Pixel width map per character (must match the effective font). * @param props.truncationMode - Truncation mode: 'start' | 'middle' | 'end' (default 'end'). */ export declare const ChartTextEllipsis: (props: TextEllipsisProps & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes) => import("react").ReactElement | null;