import { useLayoutEffect } from 'react'; import { Split, TruncatePriority } from './TruncatedText.types'; export declare const splitCenter: (s: string) => [string, string]; export declare const splitExtension: (s: string) => [string, string]; export declare const splitLeafPath: (s: string) => [string, string]; export declare const splitByIndex: (s: string, index: number) => [string, string]; /** Keep the last `offset` characters in the tail (e.g. a file extension). */ export declare const splitLast: (s: string, offset: number) => [string, string]; /** Keep the first `offset` characters in the head. */ export declare const splitFirst: (s: string, offset: number) => [string, string]; export declare const resolveSplit: (split: Split, contents: string) => [string, string]; export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect; /** * The longest `head…tail` slice of `text` that fits `available` px, measured with * `measure`. Only whole characters are dropped, so it never cuts a glyph, and the * result fits exactly, so there is no trailing-slack gap at the seam. * * `split="center"` is balanced — it keeps a prefix of the head AND a suffix of the * tail so the marker sits in the visual middle and both ends stay visible at any * width. The anchored strategies (`leaf-path`, `extension`, offsets) instead keep * one whole side (chosen by `priority`) and truncate the other. */ export declare const sliceToFit: (text: string, split: Split, priority: TruncatePriority, marker: string, available: number, measure: (s: string) => number) => string; export declare const middleSliceIsTruncated: (el: HTMLElement) => boolean; export declare const middleIsTruncated: (el: HTMLElement) => boolean; //# sourceMappingURL=TruncatedText.helpers.d.ts.map