/** * MiddleTruncate — CSS-only middle truncation primitive. * * Truncates text from the middle, preserving the start and/or end portions. * Supports two strategies: * * - `strategy='chars'` — splits by individual characters, useful for hashes, * UUIDs, commit SHAs, or any long identifier where you want to keep the * first N and last M characters visible. * * - `strategy='segments'` — splits by a separator string (e.g. '/', '.', '-'), * useful for file paths, domain names, or k8s resource names where segment * boundaries are semantically meaningful. * * Uses CSS-only flex truncation: the `start` segment uses `flex-1 min-w-0 truncate` * so the browser truncates it automatically when the container is too narrow. * Zero JS measurement, zero ResizeObserver. * * @module @mks2508/mks-ui/react/ui/MiddleTruncate * * @example * ```tsx * // Hash truncation — preserve first 6 and last 4 chars * * // → 0xABCD…7890 * ``` * * @example * ```tsx * // File path — preserve filename + parent dir * * // → src/…/ChromeShell.tsx * ``` * * @example * ```tsx * // Domain — preserve root + TLD * * // → api.…example.com * ``` * * @example * ```tsx * // With slot overrides for custom styling * * ``` */ import type { IMiddleTruncateProps } from './MiddleTruncate.types'; /** * Middle-truncates text, preserving start and/or end portions. * * @param props - See {@link IMiddleTruncateProps} */ export declare const MiddleTruncate: import("react").MemoExoticComponent<(props: IMiddleTruncateProps) => React.ReactElement>; export { MiddleTruncateStyles, middleTruncateVariants, } from './MiddleTruncate.styles'; export type { TMiddleTruncateSlot } from './MiddleTruncate.styles'; export type { IMiddleTruncateProps } from './MiddleTruncate.types'; //# sourceMappingURL=index.d.ts.map