import type { Node, RichContent } from 'ricos-schema'; import type { NodeFilter } from '../visitNodes/index'; type ContentLimits = { nodeCount: number; } | { wordCount: number; } | { maxPlugins: number; }; /** * These options apply only to filtering RichContent. */ export type TruncateOptions = { /** * By default empty paragraphs are merged. Set this to `true` to keep them separate. */ keepEmptyParagraphs: boolean; /** * Use this function to select the types of nodes that will be included in the blocksCount for truncation. */ selectCountableNodes?: NodeFilter; }; export declare const getCountableNodes: (filterFn: NodeFilter) => (container: Node | RichContent) => Node[]; /** * Truncates RichContent by node count, word count, and non-text nodes count. */ export declare const truncateRichContent: (content: RichContent, limits: ContentLimits, options?: TruncateOptions) => RichContent; export {}; //# sourceMappingURL=ricos-truncate.d.ts.map