import type { Extractor } from '../ricos-content/extractor-infra.js';
import type { ImageMedia, VideoMedia } from '../ricos-content/RicosContentAPI/get-media-data.js';
import type { Translatable } from '../ricos-content/TranslatableAPI/types.js';
import type { TruncateOptions } from '../ricos-content/truncateContent/ricos-truncate.js';
import type { ContentBuilder as _ContentBuilder } from '../ricos-content/types/index.js';
import type { RicosDocument, RicosDocumentNode, Decoration, Node_Type as RicosDocumentNodeType_Type, TextData as _TextData, ParagraphData as _ParagraphData, NodeStyle as _NodeStyle, Metadata as _Metadata, GalleryData_Item as _GalleryData_Item } from '../ricos-schema/next-schema/index.js';
export type { RicosDocument, RicosDocumentNode, Decoration, AppEmbedData, AudioData, BulletedListData, ButtonData, CheckboxListData, CollapsibleListData, FileData, GalleryData, GalleryData_Item, GIF, GIFData, HeadingData, HTMLData, ImageData, LayoutCellData, LayoutData, Link, Link_Rel, LinkPreviewData, ListItemNodeData, Media, MentionData, Node, OrderedListData, ParagraphData, PluginContainerData_Spoiler, PollData, ShapeData, TextData, VideoData, } from '../ricos-schema/next-schema/index.js';
export { AppEmbedData_AppType, ButtonData_Type, CollapsibleListData_Direction, Decoration_Type, DividerData_Alignment, DividerData_LineStyle, DividerData_Width, FontSizeData_fontType, GalleryOptions_ItemStyle_Crop, GalleryOptions_Layout_Orientation, GalleryOptions_Layout_Type, GalleryOptions_Thumbnails_Alignment, GIFData_GIFType, HTMLData_Source, Link_Target, Node_Type, PluginContainerData_Alignment, PluginContainerData_Width_Type, PollData_Design_PollDesign_Background_Type, PollData_Layout_PollLayout_Direction, PollData_Layout_PollLayout_Type, PollData_Poll_Settings_Permissions_ViewRole, PollData_Poll_Settings_Permissions_VoteRole, RichContent, TextStyle_TextAlignment, } from '../ricos-schema/next-schema/index.js';
type ContentLimits = {
    nodeCount: number;
} | {
    wordCount: number;
} | {
    maxPlugins: number;
};
type MediaUrlResolvers = {
    image?: (fileId: string) => string;
    video?: (fileId: string) => string;
    thumbnail?: (fileId: string) => string;
};
export declare const createEmptyContent: (metadata?: {
    version?: number;
    id?: string;
    createdTimestamp?: Date;
    updatedTimestamp?: Date;
}) => RicosDocument;
export declare const ensureContentId: (content?: RicosDocument) => RicosDocument;
export declare const fromPlainText: (text: string) => RicosDocument;
export declare const fromCKEditorHtml: (s: string, interceptorFn?: any) => RicosDocument;
export declare const fromRichTextHtml: (s: string, interceptor?: any) => RicosDocument;
export declare const translateContent: (content: RicosDocument, translatables: Translatable[]) => RicosDocument;
export declare const truncateRichContent: (content: RicosDocument, limits: ContentLimits, options?: TruncateOptions) => RicosDocument;
export declare const truncateContent: (content: RicosDocument, limits: {
    blocksCount?: number;
    wordsCount?: number;
    maxPlugins?: number;
}, options?: TruncateOptions) => {
    content: RicosDocument;
    isTruncated: boolean;
};
export declare const getContentLength: (content: RicosDocument) => number;
export declare const getMediaData: (content: RicosDocument, mediaUrlResolvers?: MediaUrlResolvers) => (ImageMedia | VideoMedia)[];
export declare const getPluginData: <T>(content: RicosDocument, type: RicosDocumentNodeType_Type) => T[];
export declare const getText: (content: RicosDocument) => string[];
export declare const toHtml: (content: RicosDocumentNode[] | RicosDocument, interceptorFn?: any, separator?: string) => string;
export type InterceptorToHtml = (context: {
    node: RicosDocumentNode;
    result: string | string[];
}) => string | string[];
export declare const toPlainText: (content: RicosDocument, options?: {
    urlShortener?: (url: string) => Promise<string>;
    getVideoUrl?: (fileId: string) => Promise<string>;
    getVideoEmbeddedUrl?: (url: string) => Promise<string>;
    getAudioUrl?: (fileId: string) => Promise<string>;
    getGifUrl?: (url: string) => Promise<string>;
    delimiter?: string;
    addLinksToText?: boolean;
}) => Promise<string>;
export declare const toPlainTextSync: (content: RicosDocument, options?: {
    urlShortener?: (url: string) => string;
    getVideoUrl?: (fileId: string) => string;
    getVideoEmbeddedUrl?: (url: string) => string;
    getAudioUrl?: (fileId: string) => string;
    getGifUrl?: (url: string) => string;
    delimiter?: string;
    addLinksToText?: boolean;
}) => string;
export declare const toTranslatables: (content: Pick<RicosDocument, 'nodes'>) => Translatable[];
export declare function isRichContent(content: any): content is RicosDocument;
export declare const isRichContentEmpty: (contentState: RicosDocument) => boolean;
export declare const isRichContentEqual: (a: RicosDocument | undefined, b: RicosDocument | undefined) => boolean;
export declare const modify: (content: RicosDocument) => {
    filter: (predicate: (node: RicosDocumentNode) => boolean) => {
        filter: (predicate: (node: RicosDocumentNode) => boolean) => any;
        set: (setter: (node: RicosDocumentNode) => RicosDocumentNode | RicosDocumentNode[]) => RicosDocument;
    };
    set: (setter: (node: RicosDocumentNode) => RicosDocumentNode | RicosDocumentNode[]) => RicosDocument;
};
export { ACTION_BUTTON_TYPE, AUDIO_TYPE, CODE_BLOCK_TYPE, COLLAPSIBLE_LIST_TYPE, compare, createContent, DIVIDER_TYPE, EMBED_TYPE, EMOJI_TYPE, EXTERNAL_MENTIONS_TYPE, FILE_UPLOAD_TYPE, GALLERY_TYPE, getTextDirection, GIPHY_TYPE, HASHTAG_TYPE, HEADINGS_DROPDOWN_TYPE, HTML_TYPE, IMAGE_TYPE, type ImageMedia, isContentStateEmpty, LINE_SPACING_TYPE, LINK_BUTTON_TYPE, LINK_PREVIEW_TYPE, LINK_TYPE, MENTION_TYPE, POLL_TYPE, RICOS_ANCHOR_TYPE, RICOS_DIVIDER_TYPE, RICOS_FILE_TYPE, RICOS_GALLERY_TYPE, RICOS_GIPHY_TYPE, RICOS_IMAGE_TYPE, RICOS_LAYOUT_TYPE, RICOS_LINK_BUTTON_TYPE, RICOS_LINK_PREVIEW_TYPE, RICOS_LINK_TYPE, RICOS_MENTION_TYPE, RICOS_POLL_TYPE, RICOS_SHAPE_TYPE, RICOS_VERTICAL_EMBED_TYPE, RICOS_VIDEO_TYPE, SHAPE_TYPE, SPOILER_TYPE, TABLE_TYPE, TOC_TYPE, TEXT_COLOR_TYPE, TEXT_HIGHLIGHT_TYPE, TIPTAP_SHAPE_TYPE, Version, VERTICAL_EMBED_TYPE, VIDEO_TYPE, type VideoMedia, } from '../ricos-content/index.js';
export type ListItemData = {
    text: _TextData[];
    data: _ParagraphData;
};
export { extractMedia } from '../ricos-content/lib/extract-media.js';
export type { Extractor } from '../ricos-content/extractor-infra.js';
export declare const extract: (nodes: RicosDocumentNode | RicosDocumentNode[]) => Extractor<RicosDocumentNode>;
export declare const createParagraphNode: (nodes?: RicosDocumentNode[], data?: _ParagraphData, style?: _NodeStyle) => RicosDocumentNode;
export declare const createTextNode: (text: string, decorations?: Decoration[]) => RicosDocumentNode;
export declare const initializeMetadata: (metadata?: {
    version?: number;
    id?: string;
    createdTimestamp?: Date;
    updatedTimestamp?: Date;
}) => _Metadata;
/**
 * Imperative content builder. Each `add*` method returns a `RicosDocument` whose `nodes`
 * include the newly-added node(s). Pass a `generateId` callback to produce unique node IDs.
 */
export type RicosContentBuilder = {
    [K in keyof _ContentBuilder]: _ContentBuilder[K] extends (arg: infer A) => unknown ? (arg: A) => RicosDocument : _ContentBuilder[K];
};
export declare const setupContentBuilder: (generateId: () => string) => RicosContentBuilder;
/** Context passed to `getCountableNodes` filter fn — the node's ancestors and previous sibling at visit time. */
export type NodeFilterContext = {
    parents: RicosDocumentNode[];
    previousSibling: RicosDocumentNode | undefined;
};
export declare const getCountableNodes: (filterFn: (node: RicosDocumentNode, context: NodeFilterContext) => boolean) => (container: RicosDocumentNode | RicosDocument) => RicosDocumentNode[];
export declare const getAnchorableNodesQuery: (contentExtractor: Extractor<RicosDocumentNode>, selectedNodeId: any) => RicosDocumentNode[];
export declare const convertItemData: (args: {
    items: _GalleryData_Item[];
    relValue?: string;
    anchorTarget?: string;
    baseUrl?: string;
}) => any[];
export { resolveFileUrl } from '../ricos-media/index.js';
//# sourceMappingURL=content.d.ts.map